@inkeep/open-knowledge 0.41.0-beta.1 → 0.41.0-beta.2
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/{acp-harness-probe-DG_N-xCg.mjs → acp-harness-probe-3CFDDPVl.mjs} +2 -2
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/cli.mjs +6 -6
- package/dist/constants-CZ8NFmlZ.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-DHbkyZcY.mjs → init-2yIvpr4B.mjs} +3 -3
- package/dist/init-CtYgAsHx.mjs +1 -0
- package/dist/{launch-json-removal-DEkSArVn.mjs → launch-json-removal-CptGKLK_.mjs} +2 -2
- package/dist/{loader-CtUNSVqY.mjs → loader-4upXoAKc.mjs} +2 -2
- package/dist/loader-CbsXNIN0.mjs +1 -0
- package/dist/preview-DkPNmdc1.mjs +1 -0
- package/dist/{preview-D8prmtEo.mjs → preview-DxtFkMmQ.mjs} +2 -2
- package/dist/public/assets/{EnableSyncConfirmDialog-qh42LoQ3.js → EnableSyncConfirmDialog-AdVrVz1y.js} +1 -1
- package/dist/public/assets/FeedbackForm-CrwXjkZy.js +1 -0
- package/dist/public/assets/{SettingsDialogBody-M8pN3I6T.js → SettingsDialogBody-BceO9KUZ.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-DDyIoxqn.js → ShareReceiveMissDialog--OvJvh_h.js} +1 -1
- package/dist/public/assets/{auth-state-cache-IekcI6Q7.js → auth-state-cache-BltHO1Gr.js} +1 -1
- package/dist/public/assets/{index-srNkoNf3.js → index-CWGpwyLE.js} +5 -5
- package/dist/public/assets/{index-CdImiwcR.css → index-Dghffuut.css} +1 -1
- package/dist/public/assets/pending-receive-nav-store-ph-Aqnma.js +1 -0
- package/dist/public/index.html +5 -5
- package/dist/{repair-launch-json-B1wg4Jgw.mjs → repair-launch-json-D3XbPlDO.mjs} +2 -2
- package/dist/{repair-mcp-configs-Bui5exNN.mjs → repair-mcp-configs-DY2IxCII.mjs} +2 -2
- package/dist/{src-CfQpfw-m.mjs → src-CnyjX5Lj.mjs} +2 -2
- package/dist/{start-ZajRdKs2.mjs → start-y5LmZhJG.mjs} +2 -2
- package/dist/start-zeyY0ALU.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-um5sZXfU.mjs +0 -2
- package/dist/init-Dq0FsoEG.mjs +0 -1
- package/dist/loader-DnOIHMVI.mjs +0 -1
- package/dist/preview-FogWf-1_.mjs +0 -1
- package/dist/public/assets/FeedbackForm-varEQbsq.js +0 -1
- package/dist/public/assets/pending-receive-nav-store-BrnytM0j.js +0 -1
- package/dist/start-CEnHqmuX.mjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./telemetry-impl-BKKGF3Eq.js","./chunk-zsgVPwQN.js","./preload-helper-2ej06EnG.js","./trace-api-BEJdTRcX.js","./propagation-api-C2s1QQGZ.js","./ReportBugDialogBody-BBAPrsS2.js","./dist-HcWgGcjp.js","./lib-7eiHvDyn.js","./markdownit-D5ckRcLX.js","./w3c-keyname-BPyKWMWB.js","./dist-De9aiAJx.js","./jsx-runtime-Dda6ZcOg.js","./react-BN2QHhcO.js","./checkbox-DgMFNyxc.js","./dist-CwZTPnUs.js","./floating-ui.dom-DhDEJ-Ns.js","./dist-BNSJKKYT.js","./createLucideIcon-BwsSSL7z.js","./bundle-mjs-Dy8bHgkj.js","./react-dom-BtuvISNc.js","./dist-DEF-YX4p.js","./check-DJxEKgxy.js","./compiler-runtime-YPpVnfQ-.js","./dialog-BvA78Pbg.js","./es2015-BPXMTj9r.js","./button-B5JstM7q.js","./x-CxAa17gB.js","./CopyButton-tIb30IiS.js","./tooltip-BI4ZrlGO.js","./copy-C1RMi2cI.js","./loader-circle-DquHdXOY.js","./triangle-alert-CoYdkHNh.js","./badge-kWhLcwP5.js","./input-DAAOxj0-.js","./textarea-BuxwyMFe.js","./external-link-I5y7ImPR.js","./clipboard-adapter-Drwe8q2F.js","./GraphPanel-9aikCCVz.js","./dist-BsjuWfqE.js","./toggle-group-D6QJybW6.js","./dist-DoyeToaO.js","./dist-UJD1w5LO.js","./useQuery-4J-R1a0S.js","./min-BNBb-xib.js","./src-CrMlpkn3.js","./colors-C5iIWSWx.js","./ordinal-BIOoIzFp.js","./init-C7ZvyJtv.js","./isObject-DaX0mC2K.js","./now-Dq6LIEaU.js","./arrow-up-right-DtHvY6Qg.js","./prop-types-Q2HEN1Rj.js","./navigation-targets-CHPfEHEd.js","./file-tree-utils-CEfCYY3r.js","./doc-hash-B0QmkVn8.js","./documents-events-Uo9wt1xU.js","./documents-fetch-DjUIhwk3.js","./parse-api-error-CWeCvbNN.js","./startup-marks-lzQ6NDDC.js","./dist-C3RLAwRF.js","./target-navigation-intent-CINxIuHF.js","./panel-DoEQccon.js","./ActivityModeContent-DPVvqOCP.js","./DocumentContext-BJ03S99t.js","./esm-BTOPTNTx.js","./dist-Ds91W2q2.js","./dist-PyCLG6aQ.js","./dist-Ck2P_69m.js","./dist-BPbnU4MJ.js","./dist-EBCF8Hyi.js","./dist-BHnd2TCW.js","./dist-DNTp9iqB.js","./dist-Cm6pClkc2.js","./dist-CUQV7eXO.js","./stex-CcubjMmP.js","./config-provider-Dt6xxnVq.js","./client-version-BHprFAGg.js","./use-apply-config-color-theme-DvEpRM5l.js","./config-context-Lgd8fBM2.js","./switch-BHGjWF45.js","./chevron-down-DQUaF_vw.js","./collapsible-snx-HFVG.js","./terminal-input-events-Bedf4049.js","./CodeMirrorPropInput-BmF3Mqr-.js","./folder-open-uBVyDcrj.js","./trash-2-Baoxa0CE.js","./git-branch-Dt9AthpR.js","./chevron-right-DNxn1CM1.js","./workspace-paths-DnSg30T1.js","./eye-Bd06Ragq.js","./hash-BBX_Yf_s.js","./info-CUyu_utl.js","./paperclip-B0H0WUBm.js","./sliders-horizontal-BF9G548a.js","./dist-t90i8nhW.js","./file-tree-rename-validation-VypXChwN.js","./use-collab-url-YWBnKc4x.js","./DocumentContext-B0sQn39F.css","./timeline-diff-store-C_Gy5mJi.js","./agent-diff-store-D-khHmXD.js","./cursor-BSZbWhxr.js","./copilot-fpMAoCAq.js","./use-activity-panel-CoN6TcKH.js","./agent-presence-DNc33brV.js","./lru-string-cache-mZvIfIzw.js","./SettingsDialogBody-
|
|
2
|
-
import{o as e,t}from"./chunk-zsgVPwQN.js";import{t as n}from"./preload-helper-2ej06EnG.js";import{t as r}from"./jsx-runtime-Dda6ZcOg.js";import{$ as i,$t as a,A as o,At as s,B as c,Bt as l,C as u,Ct as d,D as f,Dt as p,Et as m,F as h,Ft as g,G as _,H as v,Ht as y,I as b,It as x,J as S,Jt as C,K as w,Kt as T,L as E,Lt as D,M as O,Mt as k,N as A,Nt as j,O as M,Ot as N,P,Pt as F,Q as I,Qt as L,R,Rt as z,S as B,St as V,T as H,Tt as U,U as W,Ut as G,V as K,Vt as ee,W as te,Wt as ne,X as re,Xt as ie,Y as ae,Yt as oe,Z as se,Zt as ce,_t as le,a as ue,an as de,at as fe,bt as pe,c as me,ct as he,d as ge,dn as _e,dt as ve,en as ye,et as be,f as xe,ft as Se,g as Ce,gt as we,h as Te,ht as Ee,i as De,in as Oe,j as ke,jt as Ae,k as je,kt as Me,l as Ne,ln as Pe,lt as Fe,m as Ie,mt as Le,n as Re,nn as ze,nt as Be,o as Ve,ot as He,p as Ue,pt as We,q as Ge,qt as Ke,r as qe,rn as Je,s as Ye,sn as Xe,st as Ze,t as Qe,tn as $e,tt as et,u as tt,un as nt,ut as rt,v as it,vt as at,w as ot,wt as st,x as ct,xt as lt,y as ut,yt as dt,z as ft,zt as pt}from"./DocumentContext-BJ03S99t.js";import{t as mt}from"./react-BN2QHhcO.js";import{n as q,r as ht,t as gt}from"./dist-De9aiAJx.js";import{_ as _t,a as vt,c as yt,d as bt,f as xt,g as St,h as Ct,i as wt,l as Tt,m as Et,n as Dt,o as Ot,p as kt,r as At,s as jt,t as Mt,u as Nt,v as Pt,y as Ft}from"./useQuery-4J-R1a0S.js";import{n as It,t as Lt}from"./dist-C3RLAwRF.js";import{t as Rt}from"./react-dom-BtuvISNc.js";import{t as zt}from"./compiler-runtime-YPpVnfQ-.js";import{a as Bt,c as Vt,i as Ht,l as Ut,o as Wt,r as Gt,s as Kt,t as qt,u as Jt}from"./terminal-input-events-Bedf4049.js";import{n as Yt,s as J,t as Xt}from"./createLucideIcon-BwsSSL7z.js";import{n as Zt,r as Qt,t as Y}from"./button-B5JstM7q.js";import{c as $t,d as en,o as tn,r as nn,u as rn}from"./dist-BNSJKKYT.js";import{i as an,n as on,r as sn,t as cn}from"./tooltip-BI4ZrlGO.js";import{n as ln,r as un,t as dn}from"./collapsible-snx-HFVG.js";import{a as fn,c as pn,i as mn,n as hn,o as gn,s as _n,t as vn}from"./dialog-BvA78Pbg.js";import{$ as yn,A as bn,B as xn,C as Sn,E as Cn,G as wn,H as Tn,K as En,N as Dn,Q as On,T as kn,U as An,X as jn,_ as Mn,b as Nn,ct as Pn,dt as Fn,et as In,f as Ln,ft as Rn,k as zn,l as Bn,lt as Vn,m as Hn,q as Un,st as Wn,tt as Gn,u as Kn,ut as qn,z as Jn}from"./CodeMirrorPropInput-BmF3Mqr-.js";import{t as Yn}from"./checkbox-DgMFNyxc.js";import{a as Xn,d as Zn,i as Qn,l as $n,n as er,o as tr,r as nr,s as rr,t as ir,u as ar}from"./floating-ui.dom-DhDEJ-Ns.js";import{_ as or,a as sr,c as cr,d as lr,f as ur,g as dr,h as fr,i as pr,l as mr,m as hr,n as gr,o as _r,p as vr,r as yr,s as br,t as xr,u as Sr}from"./dist-B2SLv_cy.js";import{a as Cr,d as wr,f as Tr,i as Er,m as Dr,n as Or,o as kr,p as Ar,r as jr,s as Mr,t as Nr,u as Pr}from"./dropdown-menu-Br5y3pW-.js";import{t as Fr}from"./label-BPs9TAEe.js";import{c as Ir,s as Lr}from"./switch-BHGjWF45.js";import{n as Rr,t as zr}from"./radio-group-CAXEEQ3G.js";import{t as Br}from"./separator-DDR192VD.js";import{n as Vr,r as Hr,t as Ur}from"./toggle-group-D6QJybW6.js";import{C as Wr,S as Gr,a as Kr,b as qr,c as Jr,f as Yr,h as Xr,n as Zr,o as Qr,r as $r,s as ei,t as ti,u as ni,v as ri,x as ii}from"./agent-visibility-DFPh0MZF.js";import{a as ai,i as oi,n as si,r as ci}from"./terminal-telemetry-2DZ6gb5C.js";import{$a as li,$i as ui,A as di,An as fi,B as pi,Ba as mi,Bi as hi,Bn as gi,Cr as _i,Ct as vi,Dn as yi,Fa as bi,Fr as xi,Ga as Si,Gn as Ci,H as wi,Hi as Ti,Hr as Ei,Ht as Di,I as Oi,Ii as ki,Ja as Ai,Ji as ji,Ka as Mi,Ki as Ni,Kr as Pi,Li as Fi,Lr as Ii,Mn as Li,N as Ri,Na as zi,Nn as Bi,O as Vi,On as Hi,Ot as Ui,P as Wi,Qa as Gi,Qi as Ki,Qr as qi,Rn as Ji,Rt as Yi,Si as Xi,T as Zi,Ti as Qi,Ua as $i,Ui as ea,Un as ta,Ur as na,Ut as ra,Vi as ia,Vn as aa,Vr as oa,Xr as sa,Ya as ca,Yi as la,Yn as ua,Za as da,Zi as fa,Zt as pa,_t as ma,bn as ha,c as ga,ct as _a,di as va,dr as ya,ei as ba,eo as xa,fi as Sa,fn as Ca,fr as wa,g as Ta,gi as Ea,gr as Da,hi as Oa,hr as ka,ir as Aa,it as ja,j as Ma,kn as Na,kr as Pa,kt as Fa,lr as Ia,mi as La,n as Ra,na as za,oi as Ba,pi as Va,pn as Ha,qa as Ua,qi as Wa,qn as Ga,qr as Ka,qt as qa,r as Ja,ri as Ya,rt as Xa,sr as Za,t as Qa,ti as $a,to as eo,vr as to,w as no,wn as ro,x as io,xi as ao,yn as oo,za as so,zt as co}from"./dist-HcWgGcjp.js";import{t as lo}from"./git-branch-Dt9AthpR.js";import{c as uo,d as fo,f as po,l as mo,p as ho,u as go}from"./EnableSyncConfirmDialog-qh42LoQ3.js";import{t as _o}from"./arrow-up-right-DtHvY6Qg.js";import{r as vo,t as yo}from"./RegisteredAgentIcon-BYstaLMY.js";import{a as bo,c as xo,d as So,f as Co,i as wo,l as To,m as Eo,n as Do,o as Oo,p as ko,r as Ao,s as jo,t as Mo,u as No}from"./PropertyPanel-78PoXJcO.js";import{t as Po}from"./case-sensitive-B_HNX58h.js";import{t as Fo}from"./check-DJxEKgxy.js";import{t as Io}from"./chevron-left-DemaPXNL.js";import{t as Lo}from"./chevron-down-DQUaF_vw.js";import{t as Ro}from"./chevron-right-DNxn1CM1.js";import{t as zo}from"./CopyButton-tIb30IiS.js";import{a as Bo,i as Vo,n as Ho,o as Uo,r as Wo,s as Go}from"./prop-types-Q2HEN1Rj.js";import{S as Ko,_ as qo,a as Jo,b as Yo,c as Xo,d as Zo,f as Qo,g as $o,i as es,l as ts,m as ns,n as rs,o as is,p as as,r as os,s as ss,u as cs,v as ls,x as us,y as ds}from"./skill-actions-P41Hsf-8.js";import{B as fs,D as ps,E as ms,F as hs,G as gs,H as _s,I as vs,K as ys,L as bs,M as xs,N as Ss,O as Cs,P as ws,R as Ts,S as Es,T as Ds,U as Os,V as ks,W as As,_ as js,a as Ms,c as Ns,j as Ps,l as Fs,m as Is,n as Ls,r as Rs,t as zs,u as Bs,v as Vs,w as Hs,z as Us}from"./auth-state-cache-IekcI6Q7.js";import{a as Ws,d as Gs,i as Ks,l as qs,n as Js,o as Ys,r as Xs,s as Zs,t as Qs,u as $s}from"./workspace-paths-DnSg30T1.js";import{t as ec}from"./copy-C1RMi2cI.js";import{n as tc,t as nc}from"./square-pen-DYNBYC6t.js";import{t as rc}from"./eye-Bd06Ragq.js";import{a as ic,i as ac,n as oc,o as sc,r as cc,s as lc,t as uc}from"./pending-receive-nav-store-BrnytM0j.js";import{t as dc}from"./folder-open-uBVyDcrj.js";import{i as fc,o as pc,t as mc}from"./open-managed-artifact-tab-C7p0w8HU.js";import{t as hc}from"./hash-BBX_Yf_s.js";import{A as gc,C as _c,D as vc,E as yc,M as bc,N as xc,T as Sc,_ as Cc,a as wc,c as Tc,d as Ec,f as Dc,g as Oc,h as kc,i as Ac,j as jc,k as Mc,l as Nc,m as Pc,n as Fc,o as Ic,p as Lc,r as Rc,s as zc,t as Bc,u as Vc,v as Hc,w as Uc,x as Wc,y as Gc}from"./terminal-launch-events-CyMVdsrl.js";import{t as Kc}from"./info-CUyu_utl.js";import{t as qc}from"./loader-circle-DquHdXOY.js";import{t as Jc}from"./miss-dialog-store-tptqlgbE.js";import{n as Yc,t as Xc}from"./panel-right-open-DXZ0AA7N.js";import{t as Zc}from"./paperclip-B0H0WUBm.js";import{t as Qc}from"./refresh-cw-iL3pn0CM.js";import{c as $c,n as el,o as tl,r as nl,s as rl,t as il}from"./field-L06JWfWh.js";import{t as al}from"./sliders-horizontal-BF9G548a.js";import{t as ol}from"./trash-2-Baoxa0CE.js";import{t as sl}from"./triangle-alert-CoYdkHNh.js";import{i as cl,n as ll,r as ul,t as dl}from"./timeline-diff-store-C_Gy5mJi.js";import{t as fl}from"./x-CxAa17gB.js";import{n as X,t as pl}from"./dist-t90i8nhW.js";import{a as ml,i as hl,n as gl,r as _l}from"./project-paths-s6FVZ5CP.js";import{t as vl}from"./input-DAAOxj0-.js";import{t as yl}from"./dist-BsjuWfqE.js";import{f as bl,h as xl,i as Sl,m as Cl,n as wl,o as Tl,r as El,t as Dl,u as Ol}from"./use-settings-route-e5KO0G3R.js";import{t as kl}from"./parse-api-error-CWeCvbNN.js";import{n as Al,r as jl,t as Ml}from"./file-tree-rename-validation-VypXChwN.js";import{a as Nl,c as Pl,d as Fl,i as Il,l as Ll,n as Rl,o as zl,s as Bl,u as Vl}from"./file-tree-utils-CEfCYY3r.js";import{a as Hl,i as Ul,n as Wl,o as Gl,r as Kl,s as ql}from"./navigation-targets-CHPfEHEd.js";import{c as Jl,i as Yl,l as Xl,n as Zl,o as Ql,r as $l,s as eu,u as tu}from"./documents-events-Uo9wt1xU.js";import{t as nu}from"./documents-fetch-DjUIhwk3.js";import{a as ru,i as iu,o as au}from"./startup-marks-lzQ6NDDC.js";import{a as ou,c as su,d as cu,f as lu,i as uu,l as du,n as fu,o as pu,r as mu,s as hu,t as gu,u as _u}from"./doc-hash-B0QmkVn8.js";import{t as vu}from"./badge-kWhLcwP5.js";import{c as yu,i as bu,n as xu,t as Su}from"./config-provider-Dt6xxnVq.js";import{i as Cu,r as wu,t as Tu}from"./use-collab-url-YWBnKc4x.js";import{n as Eu,t as Du}from"./client-version-BHprFAGg.js";import{$ as Ou,Et as ku,Ft as Au,I as ju,It as Mu,J as Nu,Lt as Pu,Mt as Fu,Nt as Iu,Ot as Lu,Q as Ru,X as zu,Z as Bu,jt as Vu,k as Hu,kt as Uu,ot as Wu,w as Gu,wt as Ku,xt as qu}from"./dist-Ds91W2q2.js";import{n as Ju,s as Yu,t as Xu}from"./esm-BTOPTNTx.js";import{n as Zu}from"./dist-Cm6pClkc2.js";import{n as Qu}from"./config-context-Lgd8fBM2.js";import{n as $u,t as ed}from"./external-link-I5y7ImPR.js";import{n as td,r as nd,t as rd}from"./worktree-store-CcI-M07q.js";import{t as id}from"./use-workspace-DYQ06EP5.js";import{c as ad,i as od,n as sd,r as cd,s as ld,t as ud}from"./selection-context-D2dMzfKp.js";import{_ as dd,a as fd,b as pd,c as md,d as hd,f as gd,g as _d,h as vd,i as yd,l as bd,m as xd,n as Sd,o as Cd,p as wd,s as Td,t as Ed,u as Dd,v as Od,x as kd}from"./typing-burst-detector-KeOYl1MN.js";import{t as Ad}from"./use-installed-clis-Civ9j_Zf.js";import{a as jd,i as Md,n as Nd,o as Pd,r as Fd,s as Id,t as Ld}from"./panel-DoEQccon.js";import{t as Rd}from"./target-navigation-intent-CINxIuHF.js";import{t as zd}from"./lint-plugin-meta-CZ4Yze5u.js";import{t as Bd}from"./skeleton-CHlN2fwE.js";import{c as Vd,i as Hd,l as Ud,r as Wd}from"./lint-config-client-DGu5tve1.js";import{a as Gd,o as Kd,t as qd}from"./agent-diff-store-D-khHmXD.js";import{t as Jd}from"./dist-DVNg6hPx.js";import{a as Yd,i as Xd,n as Zd,o as Qd,r as $d,t as ef}from"./EditorModeToggle-DLNQAqae.js";import{n as tf}from"./clipboard-adapter-Drwe8q2F.js";import{a as nf,n as rf,s as af}from"./follow-file-DcOgGK76.js";import{a as of,f as sf,i as cf,l as lf,n as uf,p as df,r as ff,s as pf,t as mf,u as hf}from"./sortable.esm-Cj1OlkyK.js";import{t as gf}from"./textarea-BuxwyMFe.js";import{i as _f,o as vf,r as yf,u as bf}from"./skills-api-BQ2-TlzN.js";import{C as xf,D as Sf,E as Cf,O as wf,S as Tf,T as Ef,_ as Df,a as Of,b as kf,c as Af,d as jf,f as Mf,g as Nf,h as Pf,i as Ff,k as If,l as Lf,m as Rf,n as zf,o as Bf,p as Vf,r as Hf,s as Uf,t as Wf,u as Gf,v as Kf,w as qf,x as Jf,y as Yf}from"./file-tree-adapter-BhgVCRpc.js";import{t as Xf}from"./use-live-xterm-theme--GcodYbe.js";import{n as Zf,r as Qf}from"./agent-presence-DNc33brV.js";import{a as $f,c as ep,d as tp,f as np,i as rp,l as ip,m as ap,n as op,o as sp,s as cp,t as lp,u as up}from"./form-DqVoiojI.js";import{n as dp,t as fp}from"./mcp-consent-store-D6bfXqet.js";import{a as pp,t as mp}from"./receive-store-CHxUL4MW.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function hp(){({BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.40.0`})?.VITE_OTEL_ENABLED===`true`&&n(()=>import(`./telemetry-impl-BKKGF3Eq.js`).then(e=>e.install()),__vite__mapDeps([0,1,2,3,4]),import.meta.url)}var gp=class extends vt{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||_p(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Ot({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),yt.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function _p(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var vp=class extends Ft{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new gp({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=yp(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=yp(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=yp(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=yp(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){yt.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>xt(t,e))}findAll(e={}){return this.getAll().filter(t=>xt(e,t))}notify(e){yt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return yt.batch(()=>Promise.all(e.map(e=>e.continue().catch(Et))))}};function yp(e){return e.options.scope?.id}var bp=class extends Ft{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??bt(r,t),a=this.get(i);return a||(a=new wt({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){yt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>kt(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>kt(e,t)):t}notify(e){yt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){yt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){yt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},xp=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new bp,this.#t=e.mutationCache||new vp,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Pt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=jt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(St(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Tt(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return yt.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;yt.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return yt.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=yt.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Et).catch(Et)}invalidateQueries(e,t={}){return yt.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=yt.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Et)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Et)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(St(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Et).catch(Et)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Et).catch(Et)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return jt.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Nt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Ct(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Nt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Ct(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=bt(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===_t&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Sp=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Cp=t(((e,t)=>{t.exports=Sp()})),wp=t((e=>{var t=Cp(),n=mt(),r=Rt();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var A=Symbol.for(`react.client.reference`);function j(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===A?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?j(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return j(e(t))}catch{}}return null}var M=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},I=[],L=-1;function R(e){return{current:e}}function z(e){0>L||(e.current=I[L],I[L]=null,L--)}function B(e,t){L++,I[L]=e.current,e.current=t}var V=R(null),H=R(null),U=R(null),W=R(null);function G(e,t){switch(B(U,t),B(H,e),B(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ud(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ud(t),e=Wd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(V),B(V,e)}function K(){z(V),z(H),z(U)}function ee(e){e.memoizedState!==null&&B(W,e);var t=V.current,n=Wd(t,e.type);t!==n&&(B(H,e),B(V,n))}function te(e){H.current===e&&(z(V),z(H)),W.current===e&&(z(W),ep._currentValue=F)}var ne,re;function ie(e){if(ne===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ne=t&&t[1]||``,re=-1<e.stack.indexOf(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./telemetry-impl-BKKGF3Eq.js","./chunk-zsgVPwQN.js","./preload-helper-2ej06EnG.js","./trace-api-BEJdTRcX.js","./propagation-api-C2s1QQGZ.js","./ReportBugDialogBody-BBAPrsS2.js","./dist-HcWgGcjp.js","./lib-7eiHvDyn.js","./markdownit-D5ckRcLX.js","./w3c-keyname-BPyKWMWB.js","./dist-De9aiAJx.js","./jsx-runtime-Dda6ZcOg.js","./react-BN2QHhcO.js","./checkbox-DgMFNyxc.js","./dist-CwZTPnUs.js","./floating-ui.dom-DhDEJ-Ns.js","./dist-BNSJKKYT.js","./createLucideIcon-BwsSSL7z.js","./bundle-mjs-Dy8bHgkj.js","./react-dom-BtuvISNc.js","./dist-DEF-YX4p.js","./check-DJxEKgxy.js","./compiler-runtime-YPpVnfQ-.js","./dialog-BvA78Pbg.js","./es2015-BPXMTj9r.js","./button-B5JstM7q.js","./x-CxAa17gB.js","./CopyButton-tIb30IiS.js","./tooltip-BI4ZrlGO.js","./copy-C1RMi2cI.js","./loader-circle-DquHdXOY.js","./triangle-alert-CoYdkHNh.js","./badge-kWhLcwP5.js","./input-DAAOxj0-.js","./textarea-BuxwyMFe.js","./external-link-I5y7ImPR.js","./clipboard-adapter-Drwe8q2F.js","./GraphPanel-9aikCCVz.js","./dist-BsjuWfqE.js","./toggle-group-D6QJybW6.js","./dist-DoyeToaO.js","./dist-UJD1w5LO.js","./useQuery-4J-R1a0S.js","./min-BNBb-xib.js","./src-CrMlpkn3.js","./colors-C5iIWSWx.js","./ordinal-BIOoIzFp.js","./init-C7ZvyJtv.js","./isObject-DaX0mC2K.js","./now-Dq6LIEaU.js","./arrow-up-right-DtHvY6Qg.js","./prop-types-Q2HEN1Rj.js","./navigation-targets-CHPfEHEd.js","./file-tree-utils-CEfCYY3r.js","./doc-hash-B0QmkVn8.js","./documents-events-Uo9wt1xU.js","./documents-fetch-DjUIhwk3.js","./parse-api-error-CWeCvbNN.js","./startup-marks-lzQ6NDDC.js","./dist-C3RLAwRF.js","./target-navigation-intent-CINxIuHF.js","./panel-DoEQccon.js","./ActivityModeContent-DPVvqOCP.js","./DocumentContext-BJ03S99t.js","./esm-BTOPTNTx.js","./dist-Ds91W2q2.js","./dist-PyCLG6aQ.js","./dist-Ck2P_69m.js","./dist-BPbnU4MJ.js","./dist-EBCF8Hyi.js","./dist-BHnd2TCW.js","./dist-DNTp9iqB.js","./dist-Cm6pClkc2.js","./dist-CUQV7eXO.js","./stex-CcubjMmP.js","./config-provider-Dt6xxnVq.js","./client-version-BHprFAGg.js","./use-apply-config-color-theme-DvEpRM5l.js","./config-context-Lgd8fBM2.js","./switch-BHGjWF45.js","./chevron-down-DQUaF_vw.js","./collapsible-snx-HFVG.js","./terminal-input-events-Bedf4049.js","./CodeMirrorPropInput-BmF3Mqr-.js","./folder-open-uBVyDcrj.js","./trash-2-Baoxa0CE.js","./git-branch-Dt9AthpR.js","./chevron-right-DNxn1CM1.js","./workspace-paths-DnSg30T1.js","./eye-Bd06Ragq.js","./hash-BBX_Yf_s.js","./info-CUyu_utl.js","./paperclip-B0H0WUBm.js","./sliders-horizontal-BF9G548a.js","./dist-t90i8nhW.js","./file-tree-rename-validation-VypXChwN.js","./use-collab-url-YWBnKc4x.js","./DocumentContext-B0sQn39F.css","./timeline-diff-store-C_Gy5mJi.js","./agent-diff-store-D-khHmXD.js","./cursor-BSZbWhxr.js","./copilot-fpMAoCAq.js","./use-activity-panel-CoN6TcKH.js","./agent-presence-DNc33brV.js","./lru-string-cache-mZvIfIzw.js","./SettingsDialogBody-BceO9KUZ.js","./sortable.esm-Cj1OlkyK.js","./dropdown-menu-Br5y3pW-.js","./dist-B2SLv_cy.js","./label-BPs9TAEe.js","./radio-group-CAXEEQ3G.js","./separator-DDR192VD.js","./EnableSyncConfirmDialog-AdVrVz1y.js","./RegisteredAgentIcon-BYstaLMY.js","./skill-actions-P41Hsf-8.js","./refresh-cw-iL3pn0CM.js","./agent-visibility-DFPh0MZF.js","./use-settings-route-e5KO0G3R.js","./skills-api-BQ2-TlzN.js","./use-workspace-DYQ06EP5.js","./auth-state-cache-BltHO1Gr.js","./square-pen-DYNBYC6t.js","./open-managed-artifact-tab-C7p0w8HU.js","./field-L06JWfWh.js","./form-DqVoiojI.js","./schema-fields-view-intent-BjfU6Zlh.js","./lint-plugin-meta-CZ4Yze5u.js","./markdownlint-rule-browser-tjMFNWqD.js","./skeleton-CHlN2fwE.js","./tag-pill-input-Bvy4mqfW.js","./lint-config-client-DGu5tve1.js","./use-terminal-enabled-BRlMHf_O.js","./terminal-telemetry-2DZ6gb5C.js","./ManagedArtifactProperties-Zh0UMOHM.js","./PropertyPanel-78PoXJcO.js","./format-Dz9WHgnR.js","./braces-DUywltjC.js","./selection-context-D2dMzfKp.js","./MermaidDocEditor-BVyyuKXk.js","./dist-DVNg6hPx.js","./src-4qYd01Hl.js","./SourceEditor-D3hrzHEC.js","./typing-burst-detector-KeOYl1MN.js","./wrench-C6cgdqwA.js","./SkillEditorActions-DhQfUDip.js","./LintConfigEditor-CFDGbSGe.js","./EditorModeToggle-DLNQAqae.js","./useLintConfigViewMode-B3XLyk60.js","./SchemaConfigEditor-pbMciNlu.js","./case-sensitive-B_HNX58h.js","./TimelineDiffPane-BMHugnJ2.js","./use-timeline-entry-diff-D0wDA0Sq.js","./libesm-Dk2Xd9ht.js","./panel-right-open-DXZ0AA7N.js","./AgentDiffPane-coenbSva.js","./AppMenubar-CqSGRAc3.js","./AgentThreadClientBinder-DRfKUzM5.js","./thread-client-CZmxW8Kl.js","./TerminalSessionsHost-BzmdsMrJ.js","./terminal-launch-events-CyMVdsrl.js","./McpConsentDialogBody-CMu1TYud.js","./mcp-consent-store-D6bfXqet.js","./ShareBranchSwitchDialog-0huPygyG.js","./miss-dialog-store-tptqlgbE.js","./share-metadata-rows-Bv7Ioipm.js","./desktop-bridge-types-D4yyohEA.js","./receive-store-CHxUL4MW.js","./worktree-store-CcI-M07q.js","./ShareReceiveMissDialog--OvJvh_h.js","./pending-receive-nav-store-ph-Aqnma.js","./ConsentDialogBody-Cdr00Adv.js","./project-paths-s6FVZ5CP.js","./ShareReceiveDialog-hM8VMNZj.js","./TerminalWindowApp-D1MufP7s.js","./use-live-xterm-theme--GcodYbe.js","./use-installed-clis-Civ9j_Zf.js","./telemetry-startup-DukOvXUN.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e,t}from"./chunk-zsgVPwQN.js";import{t as n}from"./preload-helper-2ej06EnG.js";import{t as r}from"./jsx-runtime-Dda6ZcOg.js";import{$ as i,$t as a,A as o,At as s,B as c,Bt as l,C as u,Ct as d,D as f,Dt as p,Et as m,F as h,Ft as g,G as _,H as v,Ht as y,I as b,It as x,J as S,Jt as C,K as w,Kt as T,L as E,Lt as D,M as O,Mt as k,N as A,Nt as j,O as M,Ot as N,P,Pt as F,Q as I,Qt as L,R,Rt as z,S as B,St as V,T as H,Tt as U,U as W,Ut as G,V as K,Vt as ee,W as te,Wt as ne,X as re,Xt as ie,Y as ae,Yt as oe,Z as se,Zt as ce,_t as le,a as ue,an as de,at as fe,bt as pe,c as me,ct as he,d as ge,dn as _e,dt as ve,en as ye,et as be,f as xe,ft as Se,g as Ce,gt as we,h as Te,ht as Ee,i as De,in as Oe,j as ke,jt as Ae,k as je,kt as Me,l as Ne,ln as Pe,lt as Fe,m as Ie,mt as Le,n as Re,nn as ze,nt as Be,o as Ve,ot as He,p as Ue,pt as We,q as Ge,qt as Ke,r as qe,rn as Je,s as Ye,sn as Xe,st as Ze,t as Qe,tn as $e,tt as et,u as tt,un as nt,ut as rt,v as it,vt as at,w as ot,wt as st,x as ct,xt as lt,y as ut,yt as dt,z as ft,zt as pt}from"./DocumentContext-BJ03S99t.js";import{t as mt}from"./react-BN2QHhcO.js";import{n as q,r as ht,t as gt}from"./dist-De9aiAJx.js";import{_ as _t,a as vt,c as yt,d as bt,f as xt,g as St,h as Ct,i as wt,l as Tt,m as Et,n as Dt,o as Ot,p as kt,r as At,s as jt,t as Mt,u as Nt,v as Pt,y as Ft}from"./useQuery-4J-R1a0S.js";import{n as It,t as Lt}from"./dist-C3RLAwRF.js";import{t as Rt}from"./react-dom-BtuvISNc.js";import{t as zt}from"./compiler-runtime-YPpVnfQ-.js";import{a as Bt,c as Vt,i as Ht,l as Ut,o as Wt,r as Gt,s as Kt,t as qt,u as Jt}from"./terminal-input-events-Bedf4049.js";import{n as Yt,s as J,t as Xt}from"./createLucideIcon-BwsSSL7z.js";import{n as Zt,r as Qt,t as Y}from"./button-B5JstM7q.js";import{c as $t,d as en,o as tn,r as nn,u as rn}from"./dist-BNSJKKYT.js";import{i as an,n as on,r as sn,t as cn}from"./tooltip-BI4ZrlGO.js";import{n as ln,r as un,t as dn}from"./collapsible-snx-HFVG.js";import{a as fn,c as pn,i as mn,n as hn,o as gn,s as _n,t as vn}from"./dialog-BvA78Pbg.js";import{$ as yn,A as bn,B as xn,C as Sn,E as Cn,G as wn,H as Tn,K as En,N as Dn,Q as On,T as kn,U as An,X as jn,_ as Mn,b as Nn,ct as Pn,dt as Fn,et as In,f as Ln,ft as Rn,k as zn,l as Bn,lt as Vn,m as Hn,q as Un,st as Wn,tt as Gn,u as Kn,ut as qn,z as Jn}from"./CodeMirrorPropInput-BmF3Mqr-.js";import{t as Yn}from"./checkbox-DgMFNyxc.js";import{a as Xn,d as Zn,i as Qn,l as $n,n as er,o as tr,r as nr,s as rr,t as ir,u as ar}from"./floating-ui.dom-DhDEJ-Ns.js";import{_ as or,a as sr,c as cr,d as lr,f as ur,g as dr,h as fr,i as pr,l as mr,m as hr,n as gr,o as _r,p as vr,r as yr,s as br,t as xr,u as Sr}from"./dist-B2SLv_cy.js";import{a as Cr,d as wr,f as Tr,i as Er,m as Dr,n as Or,o as kr,p as Ar,r as jr,s as Mr,t as Nr,u as Pr}from"./dropdown-menu-Br5y3pW-.js";import{t as Fr}from"./label-BPs9TAEe.js";import{c as Ir,s as Lr}from"./switch-BHGjWF45.js";import{n as Rr,t as zr}from"./radio-group-CAXEEQ3G.js";import{t as Br}from"./separator-DDR192VD.js";import{n as Vr,r as Hr,t as Ur}from"./toggle-group-D6QJybW6.js";import{C as Wr,S as Gr,a as Kr,b as qr,c as Jr,f as Yr,h as Xr,n as Zr,o as Qr,r as $r,s as ei,t as ti,u as ni,v as ri,x as ii}from"./agent-visibility-DFPh0MZF.js";import{a as ai,i as oi,n as si,r as ci}from"./terminal-telemetry-2DZ6gb5C.js";import{$a as li,$i as ui,A as di,An as fi,B as pi,Ba as mi,Bi as hi,Bn as gi,Cr as _i,Ct as vi,Dn as yi,Fa as bi,Fr as xi,Ga as Si,Gn as Ci,H as wi,Hi as Ti,Hr as Ei,Ht as Di,I as Oi,Ii as ki,Ja as Ai,Ji as ji,Ka as Mi,Ki as Ni,Kr as Pi,Li as Fi,Lr as Ii,Mn as Li,N as Ri,Na as zi,Nn as Bi,O as Vi,On as Hi,Ot as Ui,P as Wi,Qa as Gi,Qi as Ki,Qr as qi,Rn as Ji,Rt as Yi,Si as Xi,T as Zi,Ti as Qi,Ua as $i,Ui as ea,Un as ta,Ur as na,Ut as ra,Vi as ia,Vn as aa,Vr as oa,Xr as sa,Ya as ca,Yi as la,Yn as ua,Za as da,Zi as fa,Zt as pa,_t as ma,bn as ha,c as ga,ct as _a,di as va,dr as ya,ei as ba,eo as xa,fi as Sa,fn as Ca,fr as wa,g as Ta,gi as Ea,gr as Da,hi as Oa,hr as ka,ir as Aa,it as ja,j as Ma,kn as Na,kr as Pa,kt as Fa,lr as Ia,mi as La,n as Ra,na as za,oi as Ba,pi as Va,pn as Ha,qa as Ua,qi as Wa,qn as Ga,qr as Ka,qt as qa,r as Ja,ri as Ya,rt as Xa,sr as Za,t as Qa,ti as $a,to as eo,vr as to,w as no,wn as ro,x as io,xi as ao,yn as oo,za as so,zt as co}from"./dist-HcWgGcjp.js";import{t as lo}from"./git-branch-Dt9AthpR.js";import{c as uo,d as fo,f as po,l as mo,p as ho,u as go}from"./EnableSyncConfirmDialog-AdVrVz1y.js";import{t as _o}from"./arrow-up-right-DtHvY6Qg.js";import{r as vo,t as yo}from"./RegisteredAgentIcon-BYstaLMY.js";import{a as bo,c as xo,d as So,f as Co,i as wo,l as To,m as Eo,n as Do,o as Oo,p as ko,r as Ao,s as jo,t as Mo,u as No}from"./PropertyPanel-78PoXJcO.js";import{t as Po}from"./case-sensitive-B_HNX58h.js";import{t as Fo}from"./check-DJxEKgxy.js";import{t as Io}from"./chevron-left-DemaPXNL.js";import{t as Lo}from"./chevron-down-DQUaF_vw.js";import{t as Ro}from"./chevron-right-DNxn1CM1.js";import{t as zo}from"./CopyButton-tIb30IiS.js";import{a as Bo,i as Vo,n as Ho,o as Uo,r as Wo,s as Go}from"./prop-types-Q2HEN1Rj.js";import{S as Ko,_ as qo,a as Jo,b as Yo,c as Xo,d as Zo,f as Qo,g as $o,i as es,l as ts,m as ns,n as rs,o as is,p as as,r as os,s as ss,u as cs,v as ls,x as us,y as ds}from"./skill-actions-P41Hsf-8.js";import{B as fs,D as ps,E as ms,F as hs,G as gs,H as _s,I as vs,K as ys,L as bs,M as xs,N as Ss,O as Cs,P as ws,R as Ts,S as Es,T as Ds,U as Os,V as ks,W as As,_ as js,a as Ms,c as Ns,j as Ps,l as Fs,m as Is,n as Ls,r as Rs,t as zs,u as Bs,v as Vs,w as Hs,z as Us}from"./auth-state-cache-BltHO1Gr.js";import{a as Ws,d as Gs,i as Ks,l as qs,n as Js,o as Ys,r as Xs,s as Zs,t as Qs,u as $s}from"./workspace-paths-DnSg30T1.js";import{t as ec}from"./copy-C1RMi2cI.js";import{n as tc,t as nc}from"./square-pen-DYNBYC6t.js";import{t as rc}from"./eye-Bd06Ragq.js";import{a as ic,i as ac,n as oc,o as sc,r as cc,s as lc,t as uc}from"./pending-receive-nav-store-ph-Aqnma.js";import{t as dc}from"./folder-open-uBVyDcrj.js";import{i as fc,o as pc,t as mc}from"./open-managed-artifact-tab-C7p0w8HU.js";import{t as hc}from"./hash-BBX_Yf_s.js";import{A as gc,C as _c,D as vc,E as yc,M as bc,N as xc,T as Sc,_ as Cc,a as wc,c as Tc,d as Ec,f as Dc,g as Oc,h as kc,i as Ac,j as jc,k as Mc,l as Nc,m as Pc,n as Fc,o as Ic,p as Lc,r as Rc,s as zc,t as Bc,u as Vc,v as Hc,w as Uc,x as Wc,y as Gc}from"./terminal-launch-events-CyMVdsrl.js";import{t as Kc}from"./info-CUyu_utl.js";import{t as qc}from"./loader-circle-DquHdXOY.js";import{t as Jc}from"./miss-dialog-store-tptqlgbE.js";import{n as Yc,t as Xc}from"./panel-right-open-DXZ0AA7N.js";import{t as Zc}from"./paperclip-B0H0WUBm.js";import{t as Qc}from"./refresh-cw-iL3pn0CM.js";import{c as $c,n as el,o as tl,r as nl,s as rl,t as il}from"./field-L06JWfWh.js";import{t as al}from"./sliders-horizontal-BF9G548a.js";import{t as ol}from"./trash-2-Baoxa0CE.js";import{t as sl}from"./triangle-alert-CoYdkHNh.js";import{i as cl,n as ll,r as ul,t as dl}from"./timeline-diff-store-C_Gy5mJi.js";import{t as fl}from"./x-CxAa17gB.js";import{n as X,t as pl}from"./dist-t90i8nhW.js";import{a as ml,i as hl,n as gl,r as _l}from"./project-paths-s6FVZ5CP.js";import{t as vl}from"./input-DAAOxj0-.js";import{t as yl}from"./dist-BsjuWfqE.js";import{f as bl,h as xl,i as Sl,m as Cl,n as wl,o as Tl,r as El,t as Dl,u as Ol}from"./use-settings-route-e5KO0G3R.js";import{t as kl}from"./parse-api-error-CWeCvbNN.js";import{n as Al,r as jl,t as Ml}from"./file-tree-rename-validation-VypXChwN.js";import{a as Nl,c as Pl,d as Fl,i as Il,l as Ll,n as Rl,o as zl,s as Bl,u as Vl}from"./file-tree-utils-CEfCYY3r.js";import{a as Hl,i as Ul,n as Wl,o as Gl,r as Kl,s as ql}from"./navigation-targets-CHPfEHEd.js";import{c as Jl,i as Yl,l as Xl,n as Zl,o as Ql,r as $l,s as eu,u as tu}from"./documents-events-Uo9wt1xU.js";import{t as nu}from"./documents-fetch-DjUIhwk3.js";import{a as ru,i as iu,o as au}from"./startup-marks-lzQ6NDDC.js";import{a as ou,c as su,d as cu,f as lu,i as uu,l as du,n as fu,o as pu,r as mu,s as hu,t as gu,u as _u}from"./doc-hash-B0QmkVn8.js";import{t as vu}from"./badge-kWhLcwP5.js";import{c as yu,i as bu,n as xu,t as Su}from"./config-provider-Dt6xxnVq.js";import{i as Cu,r as wu,t as Tu}from"./use-collab-url-YWBnKc4x.js";import{n as Eu,t as Du}from"./client-version-BHprFAGg.js";import{$ as Ou,Et as ku,Ft as Au,I as ju,It as Mu,J as Nu,Lt as Pu,Mt as Fu,Nt as Iu,Ot as Lu,Q as Ru,X as zu,Z as Bu,jt as Vu,k as Hu,kt as Uu,ot as Wu,w as Gu,wt as Ku,xt as qu}from"./dist-Ds91W2q2.js";import{n as Ju,s as Yu,t as Xu}from"./esm-BTOPTNTx.js";import{n as Zu}from"./dist-Cm6pClkc2.js";import{n as Qu}from"./config-context-Lgd8fBM2.js";import{n as $u,t as ed}from"./external-link-I5y7ImPR.js";import{n as td,r as nd,t as rd}from"./worktree-store-CcI-M07q.js";import{t as id}from"./use-workspace-DYQ06EP5.js";import{c as ad,i as od,n as sd,r as cd,s as ld,t as ud}from"./selection-context-D2dMzfKp.js";import{_ as dd,a as fd,b as pd,c as md,d as hd,f as gd,g as _d,h as vd,i as yd,l as bd,m as xd,n as Sd,o as Cd,p as wd,s as Td,t as Ed,u as Dd,v as Od,x as kd}from"./typing-burst-detector-KeOYl1MN.js";import{t as Ad}from"./use-installed-clis-Civ9j_Zf.js";import{a as jd,i as Md,n as Nd,o as Pd,r as Fd,s as Id,t as Ld}from"./panel-DoEQccon.js";import{t as Rd}from"./target-navigation-intent-CINxIuHF.js";import{t as zd}from"./lint-plugin-meta-CZ4Yze5u.js";import{t as Bd}from"./skeleton-CHlN2fwE.js";import{c as Vd,i as Hd,l as Ud,r as Wd}from"./lint-config-client-DGu5tve1.js";import{a as Gd,o as Kd,t as qd}from"./agent-diff-store-D-khHmXD.js";import{t as Jd}from"./dist-DVNg6hPx.js";import{a as Yd,i as Xd,n as Zd,o as Qd,r as $d,t as ef}from"./EditorModeToggle-DLNQAqae.js";import{n as tf}from"./clipboard-adapter-Drwe8q2F.js";import{a as nf,n as rf,s as af}from"./follow-file-DcOgGK76.js";import{a as of,f as sf,i as cf,l as lf,n as uf,p as df,r as ff,s as pf,t as mf,u as hf}from"./sortable.esm-Cj1OlkyK.js";import{t as gf}from"./textarea-BuxwyMFe.js";import{i as _f,o as vf,r as yf,u as bf}from"./skills-api-BQ2-TlzN.js";import{C as xf,D as Sf,E as Cf,O as wf,S as Tf,T as Ef,_ as Df,a as Of,b as kf,c as Af,d as jf,f as Mf,g as Nf,h as Pf,i as Ff,k as If,l as Lf,m as Rf,n as zf,o as Bf,p as Vf,r as Hf,s as Uf,t as Wf,u as Gf,v as Kf,w as qf,x as Jf,y as Yf}from"./file-tree-adapter-BhgVCRpc.js";import{t as Xf}from"./use-live-xterm-theme--GcodYbe.js";import{n as Zf,r as Qf}from"./agent-presence-DNc33brV.js";import{a as $f,c as ep,d as tp,f as np,i as rp,l as ip,m as ap,n as op,o as sp,s as cp,t as lp,u as up}from"./form-DqVoiojI.js";import{n as dp,t as fp}from"./mcp-consent-store-D6bfXqet.js";import{a as pp,t as mp}from"./receive-store-CHxUL4MW.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function hp(){({BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.40.0`})?.VITE_OTEL_ENABLED===`true`&&n(()=>import(`./telemetry-impl-BKKGF3Eq.js`).then(e=>e.install()),__vite__mapDeps([0,1,2,3,4]),import.meta.url)}var gp=class extends vt{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||_p(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Ot({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),yt.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function _p(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var vp=class extends Ft{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new gp({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=yp(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=yp(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=yp(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=yp(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){yt.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>xt(t,e))}findAll(e={}){return this.getAll().filter(t=>xt(e,t))}notify(e){yt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return yt.batch(()=>Promise.all(e.map(e=>e.continue().catch(Et))))}};function yp(e){return e.options.scope?.id}var bp=class extends Ft{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??bt(r,t),a=this.get(i);return a||(a=new wt({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){yt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>kt(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>kt(e,t)):t}notify(e){yt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){yt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){yt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},xp=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new bp,this.#t=e.mutationCache||new vp,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Pt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=jt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(St(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Tt(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return yt.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;yt.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return yt.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=yt.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Et).catch(Et)}invalidateQueries(e,t={}){return yt.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=yt.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Et)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Et)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(St(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Et).catch(Et)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Et).catch(Et)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return jt.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Nt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Ct(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Nt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Ct(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=bt(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===_t&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Sp=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Cp=t(((e,t)=>{t.exports=Sp()})),wp=t((e=>{var t=Cp(),n=mt(),r=Rt();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var A=Symbol.for(`react.client.reference`);function j(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===A?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?j(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return j(e(t))}catch{}}return null}var M=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},I=[],L=-1;function R(e){return{current:e}}function z(e){0>L||(e.current=I[L],I[L]=null,L--)}function B(e,t){L++,I[L]=e.current,e.current=t}var V=R(null),H=R(null),U=R(null),W=R(null);function G(e,t){switch(B(U,t),B(H,e),B(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ud(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ud(t),e=Wd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(V),B(V,e)}function K(){z(V),z(H),z(U)}function ee(e){e.memoizedState!==null&&B(W,e);var t=V.current,n=Wd(t,e.type);t!==n&&(B(H,e),B(V,n))}function te(e){H.current===e&&(z(V),z(H)),W.current===e&&(z(W),ep._currentValue=F)}var ne,re;function ie(e){if(ne===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ne=t&&t[1]||``,re=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+ne+e+re}var ae=!1;function oe(e,t){if(!e||ae)return``;ae=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
5
|
`),l=s.split(`
|
|
@@ -7,11 +7,11 @@ import{o as e,t}from"./chunk-zsgVPwQN.js";import{t as n}from"./preload-helper-2e
|
|
|
7
7
|
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ie(n):``}function se(e,t){switch(e.tag){case 26:case 27:case 5:return ie(e.type);case 16:return ie(`Lazy`);case 13:return e.child!==t&&t!==null?ie(`Suspense Fallback`):ie(`Suspense`);case 19:return ie(`SuspenseList`);case 0:case 15:return oe(e.type,!1);case 11:return oe(e.type.render,!1);case 1:return oe(e.type,!0);case 31:return ie(`Activity`);default:return``}}function ce(e){try{var t=``,n=null;do t+=se(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
8
|
Error generating stack: `+e.message+`
|
|
9
9
|
`+e.stack}}var le=Object.prototype.hasOwnProperty,ue=t.unstable_scheduleCallback,de=t.unstable_cancelCallback,fe=t.unstable_shouldYield,pe=t.unstable_requestPaint,me=t.unstable_now,he=t.unstable_getCurrentPriorityLevel,ge=t.unstable_ImmediatePriority,_e=t.unstable_UserBlockingPriority,ve=t.unstable_NormalPriority,ye=t.unstable_LowPriority,be=t.unstable_IdlePriority,xe=t.log,Se=t.unstable_setDisableYieldValue,Ce=null,we=null;function Te(e){if(typeof xe==`function`&&Se(e),we&&typeof we.setStrictMode==`function`)try{we.setStrictMode(Ce,e)}catch{}}var Ee=Math.clz32?Math.clz32:ke,De=Math.log,Oe=Math.LN2;function ke(e){return e>>>=0,e===0?32:31-(De(e)/Oe|0)|0}var Ae=256,je=262144,Me=4194304;function Ne(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Pe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ne(n))):i=Ne(o):i=Ne(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ne(n))):i=Ne(o)):i=Ne(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Fe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ie(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Le(){var e=Me;return Me<<=1,!(Me&62914560)&&(Me=4194304),e}function Re(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Be(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ee(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ve(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ve(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ee(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function He(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ee(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ue(e,t){var n=t&-t;return n=n&42?1:We(n),(n&(e.suspendedLanes|t))===0?n:0}function We(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ge(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ke(){var e=P.p;return e===0?(e=window.event,e===void 0?32:gp(e.type)):e}function qe(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var Je=Math.random().toString(36).slice(2),Ye=`__reactFiber$`+Je,Xe=`__reactProps$`+Je,Ze=`__reactContainer$`+Je,Qe=`__reactEvents$`+Je,$e=`__reactListeners$`+Je,et=`__reactHandles$`+Je,tt=`__reactResources$`+Je,nt=`__reactMarker$`+Je;function rt(e){delete e[Ye],delete e[Xe],delete e[Qe],delete e[$e],delete e[et]}function it(e){var t=e[Ye];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ze]||n[Ye]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pf(e);e!==null;){if(n=e[Ye])return n;e=pf(e)}return t}e=n,n=e.parentNode}return null}function at(e){if(e=e[Ye]||e[Ze]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ot(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function st(e){var t=e[tt];return t||=e[tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ct(e){e[nt]=!0}var lt=new Set,ut={};function dt(e,t){ft(e,t),ft(e+`Capture`,t)}function ft(e,t){for(ut[e]=t,e=0;e<t.length;e++)lt.add(t[e])}var pt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),q={},ht={};function gt(e){return le.call(ht,e)?!0:le.call(q,e)?!1:pt.test(e)?ht[e]=!0:(q[e]=!0,!1)}function _t(e,t,n){if(gt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function vt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function yt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function bt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function xt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function St(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ct(e){if(!e._valueTracker){var t=xt(e)?`checked`:`value`;e._valueTracker=St(e,t,``+e[t])}}function wt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=xt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Tt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Et=/[\n"\\]/g;function Dt(e){return e.replace(Et,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ot(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+bt(t)):e.value!==``+bt(t)&&(e.value=``+bt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):At(e,o,bt(n)):At(e,o,bt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+bt(s):e.removeAttribute(`name`)}function kt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ct(e);return}n=n==null?``:``+bt(n),t=t==null?n:``+bt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ct(e)}function At(e,t,n){t===`number`&&Tt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function jt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+bt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Mt(e,t,n){if(t!=null&&(t=``+bt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+bt(n)}function Nt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(M(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=bt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ct(e)}function Pt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ft=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function It(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Ft.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Lt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&It(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&It(e,o,t[o])}function zt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Bt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Vt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ht(e){return Vt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Ut(){}var Wt=null;function Gt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kt=null,qt=null;function Jt(e){var t=at(e);if(t&&(e=t.stateNode)){var n=e[Xe]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ot(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Dt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Xe]||null;if(!a)throw Error(i(90));Ot(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&wt(r)}break a;case`textarea`:Mt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&jt(e,!!n.multiple,t,!1)}}}var Yt=!1;function J(e,t,n){if(Yt)return e(t,n);Yt=!0;try{return e(t)}finally{if(Yt=!1,(Kt!==null||qt!==null)&&(yu(),Kt&&(t=Kt,e=qt,qt=Kt=null,Jt(t),e)))for(t=0;t<e.length;t++)Jt(e[t])}}function Xt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Xe]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Zt=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Qt=!1;if(Zt)try{var Y={};Object.defineProperty(Y,`passive`,{get:function(){Qt=!0}}),window.addEventListener(`test`,Y,Y),window.removeEventListener(`test`,Y,Y)}catch{Qt=!1}var $t=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t=en,n=t.length,r,i=`value`in $t?$t.value:$t.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return tn=i.slice(e,1<r?1-r:void 0)}function rn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function an(){return!0}function on(){return!1}function sn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?an:on,this.isPropagationStopped=on,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ln=sn(cn),un=f({},cn,{view:0,detail:0}),dn=sn(un),fn,pn,mn,hn=f({},un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==mn&&(mn&&e.type===`mousemove`?(fn=e.screenX-mn.screenX,pn=e.screenY-mn.screenY):pn=fn=0,mn=e),fn)},movementY:function(e){return`movementY`in e?e.movementY:pn}}),gn=sn(hn),_n=sn(f({},hn,{dataTransfer:0})),vn=sn(f({},un,{relatedTarget:0})),yn=sn(f({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=sn(f({},cn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),xn=sn(f({},cn,{data:0})),Sn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Cn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},wn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Tn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wn[e])?!!t[e]:!1}function En(){return Tn}var Dn=sn(f({},un,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=rn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Cn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return e.type===`keypress`?rn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?rn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),On=sn(f({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),kn=sn(f({},un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),An=sn(f({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),jn=sn(f({},hn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Mn=sn(f({},cn,{newState:0,oldState:0})),Nn=[9,13,27,32],Pn=Zt&&`CompositionEvent`in window,Fn=null;Zt&&`documentMode`in document&&(Fn=document.documentMode);var In=Zt&&`TextEvent`in window&&!Fn,Ln=Zt&&(!Pn||Fn&&8<Fn&&11>=Fn),Rn=` `,zn=!1;function Bn(e,t){switch(e){case`keyup`:return Nn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Vn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Hn=!1;function Un(e,t){switch(e){case`compositionend`:return Vn(t);case`keypress`:return t.which===32?(zn=!0,Rn):null;case`textInput`:return e=t.data,e===Rn&&zn?null:e;default:return null}}function Wn(e,t){if(Hn)return e===`compositionend`||!Pn&&Bn(e,t)?(e=nn(),tn=en=$t=null,Hn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Ln&&t.locale!==`ko`?null:t.data;default:return null}}var Gn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Gn[e.type]:t===`textarea`}function qn(e,t,n,r){Kt?qt?qt.push(r):qt=[r]:Kt=r,t=Dd(t,`onChange`),0<t.length&&(n=new ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Jn=null,Yn=null;function Xn(e){yd(e,0)}function Zn(e){if(wt(ot(e)))return e}function Qn(e,t){if(e===`change`)return t}var $n=!1;if(Zt){var er;if(Zt){var tr=`oninput`in document;if(!tr){var nr=document.createElement(`div`);nr.setAttribute(`oninput`,`return;`),tr=typeof nr.oninput==`function`}er=tr}else er=!1;$n=er&&(!document.documentMode||9<document.documentMode)}function rr(){Jn&&(Jn.detachEvent(`onpropertychange`,ir),Yn=Jn=null)}function ir(e){if(e.propertyName===`value`&&Zn(Yn)){var t=[];qn(t,Yn,e,Gt(e)),J(Xn,t)}}function ar(e,t,n){e===`focusin`?(rr(),Jn=t,Yn=n,Jn.attachEvent(`onpropertychange`,ir)):e===`focusout`&&rr()}function or(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Zn(Yn)}function sr(e,t){if(e===`click`)return Zn(t)}function cr(e,t){if(e===`input`||e===`change`)return Zn(t)}function lr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var ur=typeof Object.is==`function`?Object.is:lr;function dr(e,t){if(ur(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!le.call(t,i)||!ur(e[i],t[i]))return!1}return!0}function fr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var n=fr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=fr(n)}}function mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Tt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Tt(e.document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var _r=Zt&&`documentMode`in document&&11>=document.documentMode,vr=null,yr=null,br=null,xr=!1;function Sr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xr||vr==null||vr!==Tt(r)||(r=vr,`selectionStart`in r&&gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),br&&dr(br,r)||(br=r,r=Dd(yr,`onSelect`),0<r.length&&(t=new ln(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}function Cr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var wr={animationend:Cr(`Animation`,`AnimationEnd`),animationiteration:Cr(`Animation`,`AnimationIteration`),animationstart:Cr(`Animation`,`AnimationStart`),transitionrun:Cr(`Transition`,`TransitionRun`),transitionstart:Cr(`Transition`,`TransitionStart`),transitioncancel:Cr(`Transition`,`TransitionCancel`),transitionend:Cr(`Transition`,`TransitionEnd`)},Tr={},Er={};Zt&&(Er=document.createElement(`div`).style,`AnimationEvent`in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),`TransitionEvent`in window||delete wr.transitionend.transition);function Dr(e){if(Tr[e])return Tr[e];if(!wr[e])return e;var t=wr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Er)return Tr[e]=t[n];return e}var Or=Dr(`animationend`),kr=Dr(`animationiteration`),Ar=Dr(`animationstart`),jr=Dr(`transitionrun`),Mr=Dr(`transitionstart`),Nr=Dr(`transitioncancel`),Pr=Dr(`transitionend`),Fr=new Map,Ir=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Ir.push(`scrollEnd`);function Lr(e,t){Fr.set(e,t),dt(t,[e])}var Rr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},zr=[],Br=0,Vr=0;function Hr(){for(var e=Br,t=Vr=Br=0;t<e;){var n=zr[t];zr[t++]=null;var r=zr[t];zr[t++]=null;var i=zr[t];zr[t++]=null;var a=zr[t];if(zr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Kr(n,i,a)}}function Ur(e,t,n,r){zr[Br++]=e,zr[Br++]=t,zr[Br++]=n,zr[Br++]=r,Vr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Wr(e,t,n,r){return Ur(e,t,n,r),qr(e)}function Gr(e,t){return Ur(e,null,null,t),qr(e)}function Kr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ee(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function qr(e){if(50<uu)throw uu=0,du=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Jr={};function Yr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(e,t,n,r){return new Yr(e,t,n,r)}function Zr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qr(e,t){var n=e.alternate;return n===null?(n=Xr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function $r(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ei(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)Zr(e)&&(s=1);else if(typeof e==`string`)s=Gf(e,n,V.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=Xr(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return ti(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=Xr(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=Xr(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=Xr(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Xr(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ti(e,t,n,r){return e=Xr(7,e,r,t),e.lanes=n,e}function ni(e,t,n){return e=Xr(6,e,null,t),e.lanes=n,e}function ri(e){var t=Xr(18,null,null,0);return t.stateNode=e,t}function ii(e,t,n){return t=Xr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ai=new WeakMap;function oi(e,t){if(typeof e==`object`&&e){var n=ai.get(e);return n===void 0?(t={value:e,source:t,stack:ce(t)},ai.set(e,t),t):n}return{value:e,source:t,stack:ce(t)}}var si=[],ci=0,li=null,ui=0,di=[],fi=0,pi=null,mi=1,hi=``;function gi(e,t){si[ci++]=ui,si[ci++]=li,li=e,ui=t}function _i(e,t,n){di[fi++]=mi,di[fi++]=hi,di[fi++]=pi,pi=e;var r=mi;e=hi;var i=32-Ee(r)-1;r&=~(1<<i),n+=1;var a=32-Ee(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,mi=1<<32-Ee(t)+i|n<<i|r,hi=a+e}else mi=1<<a|n<<i|r,hi=e}function vi(e){e.return!==null&&(gi(e,1),_i(e,1,0))}function yi(e){for(;e===li;)li=si[--ci],si[ci]=null,ui=si[--ci],si[ci]=null;for(;e===pi;)pi=di[--fi],di[fi]=null,hi=di[--fi],di[fi]=null,mi=di[--fi],di[fi]=null}function bi(e,t){di[fi++]=mi,di[fi++]=hi,di[fi++]=pi,mi=t.id,hi=t.overflow,pi=e}var xi=null,Si=null,Ci=!1,wi=null,Ti=!1,Ei=Error(i(519));function Di(e){throw Ni(oi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ei}function Oi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ye]=e,t[Xe]=r,n){case`dialog`:bd(`cancel`,t),bd(`close`,t);break;case`iframe`:case`object`:case`embed`:bd(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)bd(_d[n],t);break;case`source`:bd(`error`,t);break;case`img`:case`image`:case`link`:bd(`error`,t),bd(`load`,t);break;case`details`:bd(`toggle`,t);break;case`input`:bd(`invalid`,t),kt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:bd(`invalid`,t);break;case`textarea`:bd(`invalid`,t),Nt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Nd(t.textContent,n)?(r.popover!=null&&(bd(`beforetoggle`,t),bd(`toggle`,t)),r.onScroll!=null&&bd(`scroll`,t),r.onScrollEnd!=null&&bd(`scrollend`,t),r.onClick!=null&&(t.onclick=Ut),t=!0):t=!1,t||Di(e,!0)}function ki(e){for(xi=e.return;xi;)switch(xi.tag){case 5:case 31:case 13:Ti=!1;return;case 27:case 3:Ti=!0;return;default:xi=xi.return}}function Ai(e){if(e!==xi)return!1;if(!Ci)return ki(e),Ci=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Gd(e.type,e.memoizedProps)),n=!n),n&&Si&&Di(e),ki(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Si=ff(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Si=ff(e)}else t===27?(t=Si,$d(e.type)?(e=df,df=null,Si=e):Si=t):Si=xi?uf(e.stateNode.nextSibling):null;return!0}function ji(){Si=xi=null,Ci=!1}function Mi(){var e=wi;return e!==null&&(Xl===null?Xl=e:Xl.push.apply(Xl,e),wi=null),e}function Ni(e){wi===null?wi=[e]:wi.push(e)}var Pi=R(null),Fi=null,Ii=null;function Li(e,t,n){B(Pi,t._currentValue),t._currentValue=n}function Ri(e){e._currentValue=Pi.current,z(Pi)}function zi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Bi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),zi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),zi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Vi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;ur(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===W.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ep]:e.push(ep))}a=a.return}e!==null&&Bi(t,e,n,r),t.flags|=262144}function Hi(e){for(e=e.firstContext;e!==null;){if(!ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ui(e){Fi=e,Ii=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Wi(e){return Ki(Fi,e)}function Gi(e,t){return Fi===null&&Ui(e),Ki(e,t)}function Ki(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ii===null){if(e===null)throw Error(i(308));Ii=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ii=Ii.next=t;return n}var qi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ji=t.unstable_scheduleCallback,Yi=t.unstable_NormalPriority,Xi={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zi(){return{controller:new qi,data:new Map,refCount:0}}function Qi(e){e.refCount--,e.refCount===0&&Ji(Yi,function(){e.controller.abort()})}var $i=null,ea=0,ta=0,na=null;function ra(e,t){if($i===null){var n=$i=[];ea=0,ta=dd(),na={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ea++,t.then(ia,ia),t}function ia(){if(--ea===0&&$i!==null){na!==null&&(na.status=`fulfilled`);var e=$i;$i=null,ta=0,na=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function aa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var oa=N.S;N.S=function(e,t){$l=me(),typeof t==`object`&&t&&typeof t.then==`function`&&ra(e,t),oa!==null&&oa(e,t)};var sa=R(null);function ca(){var e=sa.current;return e===null?Pl.pooledCache:e}function la(e,t){t===null?B(sa,sa.current):B(sa,t.pool)}function ua(){var e=ca();return e===null?null:{parent:Xi._currentValue,pool:e}}var da=Error(i(460)),fa=Error(i(474)),pa=Error(i(542)),ma={then:function(){}};function ha(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ga(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ut,Ut),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ba(e),e;default:if(typeof t.status==`string`)t.then(Ut,Ut);else{if(e=Pl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ba(e),e}throw va=t,da}}function _a(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(va=e,da):e}}var va=null;function ya(){if(va===null)throw Error(i(459));var e=va;return va=null,e}function ba(e){if(e===da||e===pa)throw Error(i(483))}var xa=null,Sa=0;function Ca(e){var t=Sa;return Sa+=1,xa===null&&(xa=[]),ga(xa,e,t)}function wa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ta(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ea(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Qr(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ni(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&_a(i)===t.type)?(t=a(t,n.props),wa(t,n),t.return=e,t):(t=ei(n.type,n.key,n.props,null,e.mode,r),wa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ii(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ti(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ni(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ei(t.type,t.key,t.props,null,e.mode,n),wa(n,t),n.return=e,n;case h:return t=ii(t,e.mode,n),t.return=e,t;case T:return t=_a(t),f(e,t,n)}if(M(t)||k(t))return t=ti(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ca(t),n);if(t.$$typeof===b)return f(e,Gi(e,t),n);Ta(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=_a(n),p(e,t,n,r)}if(M(n)||k(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ca(n),r);if(n.$$typeof===b)return p(e,t,Gi(e,n),r);Ta(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=_a(r),_(e,t,n,r,i)}if(M(r)||k(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Ca(r),i);if(r.$$typeof===b)return _(e,t,n,Gi(t,r),i);Ta(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Ci&&gi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Ci&&gi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Ci&&gi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Ci&&gi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Ci&&gi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Ci&&gi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&_a(l)===r.type){n(e,r.sibling),c=a(r,o.props),wa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=ti(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ei(o.type,o.key,o.props,null,e.mode,c),wa(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ii(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=_a(o),x(e,r,o,c)}if(M(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ca(o),c);if(o.$$typeof===b)return x(e,r,Gi(e,o),c);Ta(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ni(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Sa=0;var i=x(e,t,n,r);return xa=null,i}catch(t){if(t===da||t===pa)throw t;var a=Xr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Da=Ea(!0),Oa=Ea(!1),ka=!1;function Aa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ja(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ma(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Na(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Nl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=qr(e),Kr(e,null,n),t}return Ur(e,r,t,n),qr(e)}function Pa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,He(e,n)}}function Fa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ia=!1;function La(){if(Ia){var e=na;if(e!==null)throw e}}function Ra(e,t,n,r){Ia=!1;var i=e.updateQueue;ka=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Il&p)===p:(r&p)===p){p!==0&&p===ta&&(Ia=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:ka=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Wl|=o,e.lanes=o,e.memoizedState=d}}function za(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ba(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)za(n[e],t)}var Va=R(null),Ha=R(0);function Ua(e,t){e=Hl,B(Ha,e),B(Va,t),Hl=e|t.baseLanes}function Wa(){B(Ha,Hl),B(Va,Va.current)}function Ga(){Hl=Ha.current,z(Va),z(Ha)}var Ka=R(null),qa=null;function Ja(e){var t=e.alternate;B($a,$a.current&1),B(Ka,e),qa===null&&(t===null||Va.current!==null||t.memoizedState!==null)&&(qa=e)}function Ya(e){B($a,$a.current),B(Ka,e),qa===null&&(qa=e)}function Xa(e){e.tag===22?(B($a,$a.current),B(Ka,e),qa===null&&(qa=e)):Za(e)}function Za(){B($a,$a.current),B(Ka,Ka.current)}function Qa(e){z(Ka),qa===e&&(qa=null),z($a)}var $a=R(0);function eo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sf(n)||cf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var to=0,no=null,ro=null,io=null,ao=!1,oo=!1,so=!1,co=0,lo=0,uo=null,fo=0;function po(){throw Error(i(321))}function mo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ur(e[n],t[n]))return!1;return!0}function ho(e,t,n,r,i,a){return to=a,no=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Ms:Ns,so=!1,a=n(r,i),so=!1,oo&&(a=_o(t,n,r,i)),go(e),a}function go(e){N.H=js;var t=ro!==null&&ro.next!==null;if(to=0,io=ro=no=null,ao=!1,lo=0,uo=null,t)throw Error(i(300));e===null||Xs||(e=e.dependencies,e!==null&&Hi(e)&&(Xs=!0))}function _o(e,t,n,r){no=e;var a=0;do{if(oo&&(uo=null),lo=0,oo=!1,25<=a)throw Error(i(301));if(a+=1,io=ro=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=Ps,o=t(n,r)}while(oo);return o}function vo(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?To(t):t,e=e.useState()[0],(ro===null?null:ro.memoizedState)!==e&&(no.flags|=1024),t}function yo(){var e=co!==0;return co=0,e}function bo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function xo(e){if(ao){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ao=!1}to=0,io=ro=no=null,oo=!1,lo=co=0,uo=null}function So(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return io===null?no.memoizedState=io=e:io=io.next=e,io}function Co(){if(ro===null){var e=no.alternate;e=e===null?null:e.memoizedState}else e=ro.next;var t=io===null?no.memoizedState:io.next;if(t!==null)io=t,ro=e;else{if(e===null)throw no.alternate===null?Error(i(467)):Error(i(310));ro=e,e={memoizedState:ro.memoizedState,baseState:ro.baseState,baseQueue:ro.baseQueue,queue:ro.queue,next:null},io===null?no.memoizedState=io=e:io=io.next=e}return io}function wo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function To(e){var t=lo;return lo+=1,uo===null&&(uo=[]),e=ga(uo,e,t),t=no,(io===null?t.memoizedState:io.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Ms:Ns),e}function Eo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return To(e);if(e.$$typeof===b)return Wi(e)}throw Error(i(438,String(e)))}function Do(e){var t=null,n=no.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=no.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=wo(),no.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function Oo(e,t){return typeof t==`function`?t(e):t}function ko(e){return Ao(Co(),ro,e)}function Ao(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(to&f)===f:(Il&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ta&&(d=!0);else if((to&p)===p){u=u.next,p===ta&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,no.lanes|=p,Wl|=p;f=u.action,so&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,no.lanes|=f,Wl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!ur(o,e.memoizedState)&&(Xs=!0,d&&(n=na,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function jo(e){var t=Co(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);ur(o,t.memoizedState)||(Xs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Mo(e,t,n){var r=no,a=Co(),o=Ci;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!ur((ro||a).memoizedState,n);if(s&&(a.memoizedState=n,Xs=!0),a=a.queue,rs(Fo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||io!==null&&io.memoizedState.tag&1){if(r.flags|=2048,Qo(9,{destroy:void 0},Po.bind(null,r,a,n,t),null),Pl===null)throw Error(i(349));o||to&127||No(r,t,n)}return n}function No(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=no.updateQueue,t===null?(t=wo(),no.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Po(e,t,n,r){t.value=n,t.getSnapshot=r,Io(t)&&Lo(e)}function Fo(e,t,n){return n(function(){Io(t)&&Lo(e)})}function Io(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ur(e,n)}catch{return!0}}function Lo(e){var t=Gr(e,2);t!==null&&mu(t,e,2)}function Ro(e){var t=So();if(typeof e==`function`){var n=e;if(e=n(),so){Te(!0);try{n()}finally{Te(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:e},t}function zo(e,t,n,r){return e.baseState=n,Ao(e,ro,typeof r==`function`?r:Oo)}function Bo(e,t,n,r,a){if(Os(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Vo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Vo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Ho(e,t,s)}catch(n){Wo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Ho(e,t,a)}catch(n){Wo(e,t,n)}}function Ho(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Uo(e,t,n)},function(n){return Wo(e,t,n)}):Uo(e,t,n)}function Uo(e,t,n){t.status=`fulfilled`,t.value=n,Go(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Vo(e,n)))}function Wo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Go(t),t=t.next;while(t!==r)}e.action=null}function Go(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ko(e,t){return t}function qo(e,t){if(Ci){var n=Pl.formState;if(n!==null){a:{var r=no;if(Ci){if(Si){b:{for(var i=Si,a=Ti;i.nodeType!==8;){if(!a){i=null;break b}if(i=uf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Si=uf(i.nextSibling),r=i.data===`F!`;break a}}Di(r)}r=!1}r&&(t=n[0])}}return n=So(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:t},n.queue=r,n=Ts.bind(null,no,r),r.dispatch=n,r=Ro(!1),a=Ds.bind(null,no,!1,r.queue),r=So(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Bo.bind(null,no,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Jo(e){return Yo(Co(),ro,e)}function Yo(e,t,n){if(t=Ao(e,t,Ko)[0],e=ko(Oo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=To(t)}catch(e){throw e===da?pa:e}else r=t;t=Co();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(no.flags|=2048,Qo(9,{destroy:void 0},Xo.bind(null,i,n),null)),[r,a,e]}function Xo(e,t){e.action=t}function Zo(e){var t=Co(),n=ro;if(n!==null)return Yo(t,n,e);Co(),t=t.memoizedState,n=Co();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Qo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=no.updateQueue,t===null&&(t=wo(),no.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function $o(){return Co().memoizedState}function es(e,t,n,r){var i=So();no.flags|=e,i.memoizedState=Qo(1|t,{destroy:void 0},n,r===void 0?null:r)}function ts(e,t,n,r){var i=Co();r=r===void 0?null:r;var a=i.memoizedState.inst;ro!==null&&r!==null&&mo(r,ro.memoizedState.deps)?i.memoizedState=Qo(t,a,n,r):(no.flags|=e,i.memoizedState=Qo(1|t,a,n,r))}function ns(e,t){es(8390656,8,e,t)}function rs(e,t){ts(2048,8,e,t)}function is(e){no.flags|=4;var t=no.updateQueue;if(t===null)t=wo(),no.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function as(e){var t=Co().memoizedState;return is({ref:t,nextImpl:e}),function(){if(Nl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function os(e,t){return ts(4,2,e,t)}function ss(e,t){return ts(4,4,e,t)}function cs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ls(e,t,n){n=n==null?null:n.concat([e]),ts(4,4,cs.bind(null,t,e),n)}function us(){}function ds(e,t){var n=Co();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&mo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function fs(e,t){var n=Co();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&mo(t,r[1]))return r[0];if(r=e(),so){Te(!0);try{e()}finally{Te(!1)}}return n.memoizedState=[r,t],r}function ps(e,t,n){return n===void 0||to&1073741824&&!(Il&261930)?e.memoizedState=t:(e.memoizedState=n,e=pu(),no.lanes|=e,Wl|=e,n)}function ms(e,t,n,r){return ur(n,t)?n:Va.current===null?!(to&42)||to&1073741824&&!(Il&261930)?(Xs=!0,e.memoizedState=n):(e=pu(),no.lanes|=e,Wl|=e,t):(e=ps(e,n,r),ur(e,t)||(Xs=!0),e)}function hs(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};N.T=s,Ds(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Es(e,t,aa(c,r),fu(e)):Es(e,t,r,fu(e))}catch(n){Es(e,t,{then:function(){},status:`rejected`,reason:n},fu())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function gs(){}function _s(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=vs(e).queue;hs(e,a,t,F,n===null?gs:function(){return ys(e),n(r)})}function vs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ys(e){var t=vs(e);t.next===null&&(t=e.alternate.memoizedState),Es(e,t.next.queue,{},fu())}function bs(){return Wi(ep)}function xs(){return Co().memoizedState}function Ss(){return Co().memoizedState}function Cs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=fu();e=Ma(n);var r=Na(t,e,n);r!==null&&(mu(r,t,n),Pa(r,t,n)),t={cache:Zi()},e.payload=t;return}t=t.return}}function ws(e,t,n){var r=fu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Os(e)?ks(t,n):(n=Wr(e,t,n,r),n!==null&&(mu(n,e,r),As(n,t,r)))}function Ts(e,t,n){Es(e,t,n,fu())}function Es(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Os(e))ks(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,ur(s,o))return Ur(e,t,i,0),Pl===null&&Hr(),!1}catch{}if(n=Wr(e,t,i,r),n!==null)return mu(n,e,r),As(n,t,r),!0}return!1}function Ds(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Os(e)){if(t)throw Error(i(479))}else t=Wr(e,n,r,2),t!==null&&mu(t,e,2)}function Os(e){var t=e.alternate;return e===no||t!==null&&t===no}function ks(e,t){oo=ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function As(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,He(e,n)}}var js={readContext:Wi,use:Eo,useCallback:po,useContext:po,useEffect:po,useImperativeHandle:po,useLayoutEffect:po,useInsertionEffect:po,useMemo:po,useReducer:po,useRef:po,useState:po,useDebugValue:po,useDeferredValue:po,useTransition:po,useSyncExternalStore:po,useId:po,useHostTransitionStatus:po,useFormState:po,useActionState:po,useOptimistic:po,useMemoCache:po,useCacheRefresh:po};js.useEffectEvent=po;var Ms={readContext:Wi,use:Eo,useCallback:function(e,t){return So().memoizedState=[e,t===void 0?null:t],e},useContext:Wi,useEffect:ns,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),es(4194308,4,cs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){es(4,2,e,t)},useMemo:function(e,t){var n=So();t=t===void 0?null:t;var r=e();if(so){Te(!0);try{e()}finally{Te(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=So();if(n!==void 0){var i=n(t);if(so){Te(!0);try{n(t)}finally{Te(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ws.bind(null,no,e),[r.memoizedState,e]},useRef:function(e){var t=So();return e={current:e},t.memoizedState=e},useState:function(e){e=Ro(e);var t=e.queue,n=Ts.bind(null,no,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:us,useDeferredValue:function(e,t){return ps(So(),e,t)},useTransition:function(){var e=Ro(!1);return e=hs.bind(null,no,e.queue,!0,!1),So().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=no,a=So();if(Ci){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Pl===null)throw Error(i(349));Il&127||No(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ns(Fo.bind(null,r,o,e),[e]),r.flags|=2048,Qo(9,{destroy:void 0},Po.bind(null,r,o,n,t),null),n},useId:function(){var e=So(),t=Pl.identifierPrefix;if(Ci){var n=hi,r=mi;n=(r&~(1<<32-Ee(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=co++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=fo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:bs,useFormState:qo,useActionState:qo,useOptimistic:function(e){var t=So();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ds.bind(null,no,!0,n),n.dispatch=t,[e,t]},useMemoCache:Do,useCacheRefresh:function(){return So().memoizedState=Cs.bind(null,no)},useEffectEvent:function(e){var t=So(),n={impl:e};return t.memoizedState=n,function(){if(Nl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ns={readContext:Wi,use:Eo,useCallback:ds,useContext:Wi,useEffect:rs,useImperativeHandle:ls,useInsertionEffect:os,useLayoutEffect:ss,useMemo:fs,useReducer:ko,useRef:$o,useState:function(){return ko(Oo)},useDebugValue:us,useDeferredValue:function(e,t){return ms(Co(),ro.memoizedState,e,t)},useTransition:function(){var e=ko(Oo)[0],t=Co().memoizedState;return[typeof e==`boolean`?e:To(e),t]},useSyncExternalStore:Mo,useId:xs,useHostTransitionStatus:bs,useFormState:Jo,useActionState:Jo,useOptimistic:function(e,t){return zo(Co(),ro,e,t)},useMemoCache:Do,useCacheRefresh:Ss};Ns.useEffectEvent=as;var Ps={readContext:Wi,use:Eo,useCallback:ds,useContext:Wi,useEffect:rs,useImperativeHandle:ls,useInsertionEffect:os,useLayoutEffect:ss,useMemo:fs,useReducer:jo,useRef:$o,useState:function(){return jo(Oo)},useDebugValue:us,useDeferredValue:function(e,t){var n=Co();return ro===null?ps(n,e,t):ms(n,ro.memoizedState,e,t)},useTransition:function(){var e=jo(Oo)[0],t=Co().memoizedState;return[typeof e==`boolean`?e:To(e),t]},useSyncExternalStore:Mo,useId:xs,useHostTransitionStatus:bs,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){var n=Co();return ro===null?(n.baseState=e,[e,n.queue.dispatch]):zo(n,ro,e,t)},useMemoCache:Do,useCacheRefresh:Ss};Ps.useEffectEvent=as;function Fs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Is={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Ma(r);i.payload=t,n!=null&&(i.callback=n),t=Na(e,i,r),t!==null&&(mu(t,e,r),Pa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Ma(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Na(e,i,r),t!==null&&(mu(t,e,r),Pa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fu(),r=Ma(n);r.tag=2,t!=null&&(r.callback=t),t=Na(e,r,n),t!==null&&(mu(t,e,n),Pa(t,e,n))}};function Ls(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!dr(n,r)||!dr(i,a):!0}function Rs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Is.enqueueReplaceState(t,t.state,null)}function zs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Bs(e){Rr(e)}function Vs(e){console.error(e)}function Hs(e){Rr(e)}function Us(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ws(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Gs(e,t,n){return n=Ma(n),n.tag=3,n.payload={element:null},n.callback=function(){Us(e,t)},n}function Ks(e){return e=Ma(e),e.tag=3,e}function qs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ws(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ws(t,n,r),typeof i!=`function`&&(nu===null?nu=new Set([this]):nu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Js(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Vi(t,n,a,!0),n=Ka.current,n!==null){switch(n.tag){case 31:case 13:return qa===null?Eu():n.alternate===null&&Ul===0&&(Ul=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ma?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===ma?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Eu(),!1}if(Ci)return t=Ka.current,t===null?(r!==Ei&&(t=Error(i(423),{cause:r}),Ni(oi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=oi(r,n),a=Gs(e.stateNode,r,a),Fa(e,a),Ul!==4&&(Ul=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ei&&(e=Error(i(422),{cause:r}),Ni(oi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=oi(o,n),Yl===null?Yl=[o]:Yl.push(o),Ul!==4&&(Ul=2),t===null)return!0;r=oi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Gs(n.stateNode,r,e),Fa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(nu===null||!nu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ks(a),qs(a,e,n,r),Fa(n,a),!1}n=n.return}while(n!==null);return!1}var Ys=Error(i(461)),Xs=!1;function Zs(e,t,n,r){t.child=e===null?Oa(t,null,n,r):Da(t,e.child,n,r)}function Qs(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ui(t),r=ho(e,t,n,o,a,i),s=yo(),e!==null&&!Xs?(bo(e,t,i),Sc(e,t,i)):(Ci&&s&&vi(t),t.flags|=1,Zs(e,t,r,i),t.child)}function $s(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Zr(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ec(e,t,a,r,i)):(e=ei(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Cc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?dr:n,n(o,r)&&e.ref===t.ref)return Sc(e,t,i)}return t.flags|=1,e=Qr(a,r),e.ref=t.ref,e.return=t,t.child=e}function ec(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(dr(a,r)&&e.ref===t.ref)if(Xs=!1,t.pendingProps=r=a,Cc(e,i))e.flags&131072&&(Xs=!0);else return t.lanes=e.lanes,Sc(e,t,i)}return cc(e,t,n,r,i)}function tc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&la(t,a===null?null:a.cachePool),a===null?Wa():Ua(t,a),Xa(t);else return r=t.lanes=536870912,rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&la(t,null),Wa(),Za(t)):(la(t,a.cachePool),Ua(t,a),Za(t),t.memoizedState=null);return Zs(e,t,i,n),t.child}function nc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rc(e,t,n,r,i){var a=ca();return a=a===null?null:{parent:Xi._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&la(t,null),Wa(),Xa(t),e!==null&&Vi(e,t,r,!0),t.childLanes=i,null}function ic(e,t){return t=_c({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ac(e,t,n){return Da(t,e.child,null,n),e=ic(t,t.pendingProps),e.flags|=2,Qa(t),t.memoizedState=null,e}function oc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ci){if(r.mode===`hidden`)return e=ic(t,r),t.lanes=536870912,nc(null,e);if(Ya(t),(e=Si)?(e=of(e,Ti),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pi===null?null:{id:mi,overflow:hi},retryLane:536870912,hydrationErrors:null},n=ri(e),n.return=t,t.child=n,xi=t,Si=null)):e=null,e===null)throw Di(t);return t.lanes=536870912,null}return ic(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ya(t),a)if(t.flags&256)t.flags&=-257,t=ac(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Xs||Vi(e,t,n,!1),a=(n&e.childLanes)!==0,Xs||a){if(r=Pl,r!==null&&(s=Ue(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Gr(e,s),mu(r,e,s),Ys;Eu(),t=ac(e,t,n)}else e=o.treeContext,Si=uf(s.nextSibling),xi=t,Ci=!0,wi=null,Ti=!1,e!==null&&bi(t,e),t=ic(t,r),t.flags|=4096;return t}return e=Qr(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function sc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function cc(e,t,n,r,i){return Ui(t),n=ho(e,t,n,r,void 0,i),r=yo(),e!==null&&!Xs?(bo(e,t,i),Sc(e,t,i)):(Ci&&r&&vi(t),t.flags|=1,Zs(e,t,n,i),t.child)}function lc(e,t,n,r,i,a){return Ui(t),t.updateQueue=null,n=_o(t,r,n,i),go(e),r=yo(),e!==null&&!Xs?(bo(e,t,a),Sc(e,t,a)):(Ci&&r&&vi(t),t.flags|=1,Zs(e,t,n,a),t.child)}function uc(e,t,n,r,i){if(Ui(t),t.stateNode===null){var a=Jr,o=n.contextType;typeof o==`object`&&o&&(a=Wi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Is,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Aa(t),o=n.contextType,a.context=typeof o==`object`&&o?Wi(o):Jr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Fs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Is.enqueueReplaceState(a,a.state,null),Ra(t,r,a,i),La(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Jr,typeof u==`object`&&u&&(o=Wi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Rs(t,a,r,o),ka=!1;var f=t.memoizedState;a.state=f,Ra(t,r,a,i),La(),l=t.memoizedState,s||f!==l||ka?(typeof d==`function`&&(Fs(t,n,d,r),l=t.memoizedState),(c=ka||Ls(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ja(e,t),o=t.memoizedProps,u=zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Jr,typeof l==`object`&&l&&(c=Wi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Rs(t,a,r,c),ka=!1,f=t.memoizedState,a.state=f,Ra(t,r,a,i),La();var p=t.memoizedState;o!==d||f!==p||ka||e!==null&&e.dependencies!==null&&Hi(e.dependencies)?(typeof s==`function`&&(Fs(t,n,s,r),p=t.memoizedState),(u=ka||Ls(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Hi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,sc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Da(t,e.child,null,i),t.child=Da(t,null,n,i)):Zs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Sc(e,t,i),e}function dc(e,t,n,r){return ji(),t.flags|=256,Zs(e,t,n,r),t.child}var fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pc(e){return{baseLanes:e,cachePool:ua()}}function mc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ql),e}function hc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:($a.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ci){if(a?Ja(t):Za(t),(e=Si)?(e=of(e,Ti),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pi===null?null:{id:mi,overflow:hi},retryLane:536870912,hydrationErrors:null},n=ri(e),n.return=t,t.child=n,xi=t,Si=null)):e=null,e===null)throw Di(t);return cf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(Za(t),a=t.mode,c=_c({mode:`hidden`,children:c},a),r=ti(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=pc(n),r.childLanes=mc(e,s,n),t.memoizedState=fc,nc(null,r)):(Ja(t),gc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Ja(t),t.flags&=-257,t=vc(e,t,n)):t.memoizedState===null?(Za(t),c=r.fallback,a=t.mode,r=_c({mode:`visible`,children:r.children},a),c=ti(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Da(t,e.child,null,n),r=t.child,r.memoizedState=pc(n),r.childLanes=mc(e,s,n),t.memoizedState=fc,t=nc(null,r)):(Za(t),t.child=e.child,t.flags|=128,t=null);else if(Ja(t),cf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ni({value:r,source:null,stack:null}),t=vc(e,t,n)}else if(Xs||Vi(e,t,n,!1),s=(n&e.childLanes)!==0,Xs||s){if(s=Pl,s!==null&&(r=Ue(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Gr(e,r),mu(s,e,r),Ys;sf(c)||Eu(),t=vc(e,t,n)}else sf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Si=uf(c.nextSibling),xi=t,Ci=!0,wi=null,Ti=!1,e!==null&&bi(t,e),t=gc(t,r.children),t.flags|=4096);return t}return a?(Za(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=Qr(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ti(c,a,n,null),c.flags|=2):c=Qr(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,nc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=pc(n):(a=c.cachePool,a===null?a=ua():(l=Xi._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=mc(e,s,n),t.memoizedState=fc,nc(e.child,r)):(Ja(t),n=e.child,e=n.sibling,n=Qr(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function gc(e,t){return t=_c({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function _c(e,t){return e=Xr(22,e,null,t),e.lanes=0,e}function vc(e,t,n){return Da(t,e.child,null,n),e=gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),zi(e.return,t,n)}function bc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function xc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=$a.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B($a,o),Zs(e,t,r,n),r=Ci?ui:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&yc(e,n,t);else if(e.tag===19)yc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&eo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),bc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&eo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}bc(t,!0,n,null,a,r);break;case`together`:bc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Sc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Vi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Qr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Cc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Hi(e))):!0}function wc(e,t,n){switch(t.tag){case 3:G(t,t.stateNode.containerInfo),Li(t,Xi,e.memoizedState.cache),ji();break;case 27:case 5:ee(t);break;case 4:G(t,t.stateNode.containerInfo);break;case 10:Li(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ya(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Ja(t),e=Sc(e,t,n),e===null?null:e.sibling):hc(e,t,n):(Ja(t),t.flags|=128,null);Ja(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Vi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return xc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B($a,$a.current),r)break;return null;case 22:return t.lanes=0,tc(e,t,n,t.pendingProps);case 24:Li(t,Xi,e.memoizedState.cache)}return Sc(e,t,n)}function Tc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xs=!0;else{if(!Cc(e,n)&&!(t.flags&128))return Xs=!1,wc(e,t,n);Xs=!!(e.flags&131072)}else Xs=!1,Ci&&t.flags&1048576&&_i(t,ui,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=_a(t.elementType),t.type=e,typeof e==`function`)Zr(e)?(r=zs(e,r),t.tag=1,t=uc(null,t,e,r,n)):(t.tag=0,t=cc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=Qs(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=$s(null,t,e,r,n);break a}}throw t=j(e)||e,Error(i(306,t,``))}}return t;case 0:return cc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=zs(r,t.pendingProps),uc(e,t,r,a,n);case 3:a:{if(G(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,ja(e,t),Ra(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Li(t,Xi,r),r!==o.cache&&Bi(t,[Xi],n,!0),La(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=dc(e,t,r,n);break a}else if(r!==a){a=oi(Error(i(424)),t),Ni(a),t=dc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Si=uf(e.firstChild),xi=t,Ci=!0,wi=null,Ti=!0,n=Oa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ji(),r===a){t=Sc(e,t,n);break a}Zs(e,t,r,n)}t=t.child}return t;case 26:return sc(e,t),e===null?(n=jf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ci||(n=t.type,e=t.pendingProps,r=Hd(U.current).createElement(n),r[Ye]=t,r[Xe]=e,Id(r,n,e),ct(r),t.stateNode=r):t.memoizedState=jf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ee(t),e===null&&Ci&&(r=t.stateNode=mf(t.type,t.pendingProps,U.current),xi=t,Ti=!0,a=Si,$d(t.type)?(df=a,Si=uf(r.firstChild)):Si=a),Zs(e,t,t.pendingProps.children,n),sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ci&&((a=r=Si)&&(r=rf(r,t.type,t.pendingProps,Ti),r===null?a=!1:(t.stateNode=r,xi=t,Si=uf(r.firstChild),Ti=!1,a=!0)),a||Di(t)),ee(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Gd(a,o)?r=null:s!==null&&Gd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=ho(e,t,vo,null,null,n),ep._currentValue=a),sc(e,t),Zs(e,t,r,n),t.child;case 6:return e===null&&Ci&&((e=n=Si)&&(n=af(n,t.pendingProps,Ti),n===null?e=!1:(t.stateNode=n,xi=t,Si=null,e=!0)),e||Di(t)),null;case 13:return hc(e,t,n);case 4:return G(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Da(t,null,r,n):Zs(e,t,r,n),t.child;case 11:return Qs(e,t,t.type,t.pendingProps,n);case 7:return Zs(e,t,t.pendingProps,n),t.child;case 8:return Zs(e,t,t.pendingProps.children,n),t.child;case 12:return Zs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Li(t,t.type,r.value),Zs(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Ui(t),a=Wi(a),r=r(a),t.flags|=1,Zs(e,t,r,n),t.child;case 14:return $s(e,t,t.type,t.pendingProps,n);case 15:return ec(e,t,t.type,t.pendingProps,n);case 19:return xc(e,t,n);case 31:return oc(e,t,n);case 22:return tc(e,t,n,t.pendingProps);case 24:return Ui(t),r=Wi(Xi),e===null?(a=ca(),a===null&&(a=Pl,o=Zi(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Aa(t),Li(t,Xi,a)):((e.lanes&n)!==0&&(ja(e,t),Ra(t,null,null,n),La()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Li(t,Xi,r),r!==a.cache&&Bi(t,[Xi],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Li(t,Xi,r))),Zs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ec(e){e.flags|=4}function Dc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Cu())e.flags|=8192;else throw va=ma,fa}else e.flags&=-16777217}function Oc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Kf(t))if(Cu())e.flags|=8192;else throw va=ma,fa}function kc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Le(),e.lanes|=t,Jl|=t)}function Ac(e,t){if(!Ci)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function jc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Mc(e,t,n){var r=t.pendingProps;switch(yi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jc(t),null;case 1:return jc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ri(Xi),K(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ai(t)?Ec(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Mi())),jc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Ec(t),o===null?(jc(t),Dc(t,a,null,r,n)):(jc(t),Oc(t,o))):o?o===e.memoizedState?(jc(t),t.flags&=-16777217):(Ec(t),jc(t),Oc(t,o)):(e=e.memoizedProps,e!==r&&Ec(t),jc(t),Dc(t,a,e,r,n)),null;case 27:if(te(t),n=U.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return jc(t),null}e=V.current,Ai(t)?Oi(t,e):(e=mf(a,r,n),t.stateNode=e,Ec(t))}return jc(t),null;case 5:if(te(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return jc(t),null}if(o=V.current,Ai(t))Oi(t,o);else{var s=Hd(U.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ye]=t,o[Xe]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Id(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ec(t)}}return jc(t),Dc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=U.current,Ai(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=xi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ye]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Di(t,!0)}else e=Hd(e).createTextNode(r),e[Ye]=t,t.stateNode=e}return jc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ai(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ye]=t}else ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),e=!1}else n=Mi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Qa(t),t):(Qa(t),null);if(t.flags&128)throw Error(i(558))}return jc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ai(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ye]=t}else ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),a=!1}else a=Mi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Qa(t),t):(Qa(t),null)}return Qa(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),kc(t,t.updateQueue),jc(t),null);case 4:return K(),e===null&&Cd(t.stateNode.containerInfo),jc(t),null;case 10:return Ri(t.type),jc(t),null;case 19:if(z($a),r=t.memoizedState,r===null)return jc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Ac(r,!1);else{if(Ul!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=eo(e),o!==null){for(t.flags|=128,Ac(r,!1),e=o.updateQueue,t.updateQueue=e,kc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)$r(n,e),n=n.sibling;return B($a,$a.current&1|2),Ci&&gi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&me()>eu&&(t.flags|=128,a=!0,Ac(r,!1),t.lanes=4194304)}else{if(!a)if(e=eo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,kc(t,e),Ac(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ci)return jc(t),null}else 2*me()-r.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,a=!0,Ac(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(jc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=me(),e.sibling=null,n=$a.current,B($a,a?n&1|2:n&1),Ci&&gi(t,r.treeForkCount),e);case 22:case 23:return Qa(t),Ga(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(jc(t),t.subtreeFlags&6&&(t.flags|=8192)):jc(t),n=t.updateQueue,n!==null&&kc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&z(sa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ri(Xi),jc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Nc(e,t){switch(yi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ri(Xi),K(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return te(t),null;case 31:if(t.memoizedState!==null){if(Qa(t),t.alternate===null)throw Error(i(340));ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Qa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z($a),null;case 4:return K(),null;case 10:return Ri(t.type),null;case 22:case 23:return Qa(t),Ga(),e!==null&&z(sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ri(Xi),null;case 25:return null;default:return null}}function Pc(e,t){switch(yi(t),t.tag){case 3:Ri(Xi),K();break;case 26:case 27:case 5:te(t);break;case 4:K();break;case 31:t.memoizedState!==null&&Qa(t);break;case 13:Qa(t);break;case 19:z($a);break;case 10:Ri(t.type);break;case 22:case 23:Qa(t),Ga(),e!==null&&z(sa);break;case 24:Ri(Xi)}}function Fc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Wu(t,t.return,e)}}function Ic(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Wu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Wu(t,t.return,e)}}function Lc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ba(t,n)}catch(t){Wu(e,e.return,t)}}}function Rc(e,t,n){n.props=zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Wu(e,t,n)}}function zc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Wu(e,t,n)}}function Bc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Wu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Wu(e,t,n)}else n.current=null}function Vc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Wu(e,e.return,t)}}function Hc(e,t,n){try{var r=e.stateNode;Ld(r,e.type,n,t),r[Xe]=t}catch(t){Wu(e,e.return,t)}}function Uc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$d(e.type)||e.tag===4}function Wc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Uc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$d(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Gc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ut));else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Id(t,r,n),t[Ye]=e,t[Xe]=n}catch(t){Wu(e,e.return,t)}}var Jc=!1,Yc=!1,Xc=!1,Zc=typeof WeakSet==`function`?WeakSet:Set,Qc=null;function $c(e,t){if(e=e.containerInfo,Bd=lp,e=hr(e),gr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Vd={focusedElem:e,selectionRange:n},lp=!1,Qc=t;Qc!==null;)if(t=Qc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Qc=e;else for(;Qc!==null;){switch(t=Qc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=zs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Wu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)nf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:nf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,Qc=e;break}Qc=t.return}}function el(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ml(e,n),r&4&&Fc(5,n);break;case 1:if(ml(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Wu(n,n.return,e)}else{var i=zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Wu(n,n.return,e)}}r&64&&Lc(n),r&512&&zc(n,n.return);break;case 3:if(ml(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ba(e,t)}catch(e){Wu(n,n.return,e)}}break;case 27:t===null&&r&4&&qc(n);case 26:case 5:ml(e,n),t===null&&r&4&&Vc(n),r&512&&zc(n,n.return);break;case 12:ml(e,n);break;case 31:ml(e,n),r&4&&ol(e,n);break;case 13:ml(e,n),r&4&&sl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),lf(e,n))));break;case 22:if(r=n.memoizedState!==null||Jc,!r){t=t!==null&&t.memoizedState!==null||Yc,i=Jc;var a=Yc;Jc=r,(Yc=t)&&!a?gl(e,n,(n.subtreeFlags&8772)!=0):ml(e,n),Jc=i,Yc=a}break;case 30:break;default:ml(e,n)}}function tl(e){var t=e.alternate;t!==null&&(e.alternate=null,tl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&rt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var nl=null,rl=!1;function il(e,t,n){for(n=n.child;n!==null;)al(e,t,n),n=n.sibling}function al(e,t,n){if(we&&typeof we.onCommitFiberUnmount==`function`)try{we.onCommitFiberUnmount(Ce,n)}catch{}switch(n.tag){case 26:Yc||Bc(n,t),il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Yc||Bc(n,t);var r=nl,i=rl;$d(n.type)&&(nl=n.stateNode,rl=!1),il(e,t,n),hf(n.stateNode),nl=r,rl=i;break;case 5:Yc||Bc(n,t);case 6:if(r=nl,i=rl,nl=null,il(e,t,n),nl=r,rl=i,nl!==null)if(rl)try{(nl.nodeType===9?nl.body:nl.nodeName===`HTML`?nl.ownerDocument.body:nl).removeChild(n.stateNode)}catch(e){Wu(n,t,e)}else try{nl.removeChild(n.stateNode)}catch(e){Wu(n,t,e)}break;case 18:nl!==null&&(rl?(e=nl,ef(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):ef(nl,n.stateNode));break;case 4:r=nl,i=rl,nl=n.stateNode.containerInfo,rl=!0,il(e,t,n),nl=r,rl=i;break;case 0:case 11:case 14:case 15:Ic(2,n,t),Yc||Ic(4,n,t),il(e,t,n);break;case 1:Yc||(Bc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Rc(n,t,r)),il(e,t,n);break;case 21:il(e,t,n);break;case 22:Yc=(r=Yc)||n.memoizedState!==null,il(e,t,n),Yc=r;break;default:il(e,t,n)}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Wu(t,t.return,e)}}}function sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Wu(t,t.return,e)}}function cl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zc),t;default:throw Error(i(435,e.tag))}}function ll(e,t){var n=cl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function ul(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if($d(c.type)){nl=c.stateNode,rl=!1;break a}break;case 5:nl=c.stateNode,rl=!1;break a;case 3:case 4:nl=c.stateNode.containerInfo,rl=!0;break a}c=c.return}if(nl===null)throw Error(i(160));al(o,s,a),nl=null,rl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fl(t,e),t=t.sibling}var dl=null;function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ul(t,e),X(e),r&4&&(Ic(3,e,e.return),Fc(3,e),Ic(5,e,e.return));break;case 1:ul(t,e),X(e),r&512&&(Yc||n===null||Bc(n,n.return)),r&64&&Jc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=dl;if(ul(t,e),X(e),r&512&&(Yc||n===null||Bc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[nt]||o[Ye]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Id(o,r,n),o[Ye]=e,ct(o),r=o;break a;case`link`:var s=Uf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Id(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Uf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Id(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[Ye]=e,ct(o),r=o}e.stateNode=r}else Wf(a,e.type,e.stateNode);else e.stateNode=Rf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Hc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Wf(a,e.type,e.stateNode):Rf(a,r,e.memoizedProps))}break;case 27:ul(t,e),X(e),r&512&&(Yc||n===null||Bc(n,n.return)),n!==null&&r&4&&Hc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ul(t,e),X(e),r&512&&(Yc||n===null||Bc(n,n.return)),e.flags&32){a=e.stateNode;try{Pt(a,``)}catch(t){Wu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Hc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Xc=!0);break;case 6:if(ul(t,e),X(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Wu(e,e.return,t)}}break;case 3:if(Hf=null,a=dl,dl=vf(t.containerInfo),ul(t,e),dl=a,X(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Wu(e,e.return,t)}Xc&&(Xc=!1,pl(e));break;case 4:r=dl,dl=vf(e.stateNode.containerInfo),ul(t,e),X(e),dl=r;break;case 12:ul(t,e),X(e);break;case 31:ul(t,e),X(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 13:ul(t,e),X(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ql=me()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Jc,d=Yc;if(Jc=u||a,Yc=d||l,ul(t,e),Yc=d,Jc=u,X(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Jc||Yc||hl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Wu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Wu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?tf(m,!0):tf(l.stateNode,!1)}catch(e){Wu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ll(e,n))));break;case 19:ul(t,e),X(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 30:break;case 21:break;default:ul(t,e),X(e)}}function X(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Uc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Kc(e,Wc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Pt(o,``),n.flags&=-33),Kc(e,Wc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Gc(e,Wc(e),s);break;default:throw Error(i(161))}}catch(t){Wu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function pl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;pl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ml(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)el(e,t.alternate,t),t=t.sibling}function hl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ic(4,t,t.return),hl(t);break;case 1:Bc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Rc(t,t.return,n),hl(t);break;case 27:hf(t.stateNode);case 26:case 5:Bc(t,t.return),hl(t);break;case 22:t.memoizedState===null&&hl(t);break;case 30:hl(t);break;default:hl(t)}e=e.sibling}}function gl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:gl(i,a,n),Fc(4,a);break;case 1:if(gl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Wu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)za(c[i],s)}catch(e){Wu(r,r.return,e)}}n&&o&64&&Lc(a),zc(a,a.return);break;case 27:qc(a);case 26:case 5:gl(i,a,n),n&&r===null&&o&4&&Vc(a),zc(a,a.return);break;case 12:gl(i,a,n);break;case 31:gl(i,a,n),n&&o&4&&ol(i,a);break;case 13:gl(i,a,n),n&&o&4&&sl(i,a);break;case 22:a.memoizedState===null&&gl(i,a,n),zc(a,a.return);break;case 30:break;default:gl(i,a,n)}t=t.sibling}}function _l(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Qi(n))}function vl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qi(e))}function yl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bl(e,t,n,r),t=t.sibling}function bl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:yl(e,t,n,r),i&2048&&Fc(9,t);break;case 1:yl(e,t,n,r);break;case 3:yl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qi(e)));break;case 12:if(i&2048){yl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Wu(t,t.return,e)}}else yl(e,t,n,r);break;case 31:yl(e,t,n,r);break;case 13:yl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?yl(e,t,n,r):(a._visibility|=2,xl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?yl(e,t,n,r):Sl(e,t),i&2048&&_l(o,t);break;case 24:yl(e,t,n,r),i&2048&&vl(t.alternate,t);break;default:yl(e,t,n,r)}}function xl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:xl(a,o,s,c,i),Fc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,xl(a,o,s,c,i)):u._visibility&2?xl(a,o,s,c,i):Sl(a,o),i&&l&2048&&_l(o.alternate,o);break;case 24:xl(a,o,s,c,i),i&&l&2048&&vl(o.alternate,o);break;default:xl(a,o,s,c,i)}t=t.sibling}}function Sl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Sl(n,r),i&2048&&_l(r.alternate,r);break;case 24:Sl(n,r),i&2048&&vl(r.alternate,r);break;default:Sl(n,r)}t=t.sibling}}var Cl=8192;function wl(e,t,n){if(e.subtreeFlags&Cl)for(e=e.child;e!==null;)Tl(e,t,n),e=e.sibling}function Tl(e,t,n){switch(e.tag){case 26:wl(e,t,n),e.flags&Cl&&e.memoizedState!==null&&qf(n,dl,e.memoizedState,e.memoizedProps);break;case 5:wl(e,t,n);break;case 3:case 4:var r=dl;dl=vf(e.stateNode.containerInfo),wl(e,t,n),dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Cl,Cl=16777216,wl(e,t,n),Cl=r):wl(e,t,n));break;default:wl(e,t,n)}}function El(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Dl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,Al(r,e)}El(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ol(e),e=e.sibling}function Ol(e){switch(e.tag){case 0:case 11:case 15:Dl(e),e.flags&2048&&Ic(9,e,e.return);break;case 3:Dl(e);break;case 12:Dl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,kl(e)):Dl(e);break;default:Dl(e)}}function kl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,Al(r,e)}El(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ic(8,t,t.return),kl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,kl(t));break;default:kl(t)}e=e.sibling}}function Al(e,t){for(;Qc!==null;){var n=Qc;switch(n.tag){case 0:case 11:case 15:Ic(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Qi(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Qc=r;else a:for(n=e;Qc!==null;){r=Qc;var i=r.sibling,a=r.return;if(tl(r),r===n){Qc=null;break a}if(i!==null){i.return=a,Qc=i;break a}Qc=a}}}var jl={getCacheForType:function(e){var t=Wi(Xi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Wi(Xi).controller.signal}},Ml=typeof WeakMap==`function`?WeakMap:Map,Nl=0,Pl=null,Fl=null,Il=0,Ll=0,Rl=null,zl=!1,Bl=!1,Vl=!1,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=null,Xl=null,Zl=!1,Ql=0,$l=0,eu=1/0,tu=null,nu=null,ru=0,iu=null,au=null,ou=0,su=0,cu=null,lu=null,uu=0,du=null;function fu(){return Nl&2&&Il!==0?Il&-Il:N.T===null?Ke():dd()}function pu(){if(ql===0)if(!(Il&536870912)||Ci){var e=je;je<<=1,!(je&3932160)&&(je=262144),ql=e}else ql=536870912;return e=Ka.current,e!==null&&(e.flags|=32),ql}function mu(e,t,n){(e===Pl&&(Ll===2||Ll===9)||e.cancelPendingCommit!==null)&&(xu(e,0),vu(e,Il,ql,!1)),ze(e,n),(!(Nl&2)||e!==Pl)&&(e===Pl&&(!(Nl&2)&&(Gl|=n),Ul===4&&vu(e,Il,ql,!1)),rd(e))}function hu(e,t,n){if(Nl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Fe(e,t),a=r?ku(e,t):Du(e,t,!0),o=r;do{if(a===0){Bl&&!r&&vu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!_u(n)){a=Du(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Yl;var l=c.current.memoizedState.isDehydrated;if(l&&(xu(c,s).flags|=256),s=Du(c,s,!1),s!==2){if(Vl&&!l){c.errorRecoveryDisabledLanes|=o,Gl|=o,a=4;break a}o=Xl,Xl=a,o!==null&&(Xl===null?Xl=o:Xl.push.apply(Xl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){xu(e,0),vu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:vu(r,t,ql,!zl);break a;case 2:Xl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Ql+300-me(),10<a)){if(vu(r,t,ql,!zl),Pe(r,0,!0)!==0)break a;ou=t,r.timeoutHandle=Jd(gu.bind(null,r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,`Throttled`,-0,0),a);break a}gu(r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,null,-0,0)}}break}while(1);rd(e)}function gu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ut},Tl(t,a,d);var m=(a&62914560)===a?Ql-me():(a&4194048)===a?$l-me():0;if(m=Yf(d,m),m!==null){ou=a,e.cancelPendingCommit=m(Iu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),vu(e,a,o,!l);return}}Iu(e,t,a,n,r,i,o,s,c)}function _u(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!ur(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vu(e,t,n,r){t&=~Kl,t&=~Gl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ee(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ve(e,n,t)}function yu(){return Nl&6?!0:(id(0,!1),!1)}function bu(){if(Fl!==null){if(Ll===0)var e=Fl.return;else e=Fl,Ii=Fi=null,xo(e),xa=null,Sa=0,e=Fl;for(;e!==null;)Pc(e.alternate,e),e=e.return;Fl=null}}function xu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Yd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ou=0,bu(),Pl=e,Fl=n=Qr(e.current,null),Il=t,Ll=0,Rl=null,zl=!1,Bl=Fe(e,t),Vl=!1,Jl=ql=Kl=Gl=Wl=Ul=0,Xl=Yl=null,Zl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ee(r),a=1<<i;t|=e[i],r&=~a}return Hl=t,Hr(),n}function Su(e,t){no=null,N.H=js,t===da||t===pa?(t=ya(),Ll=3):t===fa?(t=ya(),Ll=4):Ll=t===Ys?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Rl=t,Fl===null&&(Ul=1,Us(e,oi(t,e.current)))}function Cu(){var e=Ka.current;return e===null?!0:(Il&4194048)===Il?qa===null:(Il&62914560)===Il||Il&536870912?e===qa:!1}function wu(){var e=N.H;return N.H=js,e===null?js:e}function Tu(){var e=N.A;return N.A=jl,e}function Eu(){Ul=4,zl||(Il&4194048)!==Il&&Ka.current!==null||(Bl=!0),!(Wl&134217727)&&!(Gl&134217727)||Pl===null||vu(Pl,Il,ql,!1)}function Du(e,t,n){var r=Nl;Nl|=2;var i=wu(),a=Tu();(Pl!==e||Il!==t)&&(tu=null,xu(e,t)),t=!1;var o=Ul;a:do try{if(Ll!==0&&Fl!==null){var s=Fl,c=Rl;switch(Ll){case 8:bu(),o=6;break a;case 3:case 2:case 9:case 6:Ka.current===null&&(t=!0);var l=Ll;if(Ll=0,Rl=null,Nu(e,s,c,l),n&&Bl){o=0;break a}break;default:l=Ll,Ll=0,Rl=null,Nu(e,s,c,l)}}Ou(),o=Ul;break}catch(t){Su(e,t)}while(1);return t&&e.shellSuspendCounter++,Ii=Fi=null,Nl=r,N.H=i,N.A=a,Fl===null&&(Pl=null,Il=0,Hr()),o}function Ou(){for(;Fl!==null;)ju(Fl)}function ku(e,t){var n=Nl;Nl|=2;var r=wu(),a=Tu();Pl!==e||Il!==t?(tu=null,eu=me()+500,xu(e,t)):Bl=Fe(e,t);a:do try{if(Ll!==0&&Fl!==null){t=Fl;var o=Rl;b:switch(Ll){case 1:Ll=0,Rl=null,Nu(e,t,o,1);break;case 2:case 9:if(ha(o)){Ll=0,Rl=null,Mu(t);break}t=function(){Ll!==2&&Ll!==9||Pl!==e||(Ll=7),rd(e)},o.then(t,t);break a;case 3:Ll=7;break a;case 4:Ll=5;break a;case 7:ha(o)?(Ll=0,Rl=null,Mu(t)):(Ll=0,Rl=null,Nu(e,t,o,7));break;case 5:var s=null;switch(Fl.tag){case 26:s=Fl.memoizedState;case 5:case 27:var c=Fl;if(s?Kf(s):c.stateNode.complete){Ll=0,Rl=null;var l=c.sibling;if(l!==null)Fl=l;else{var u=c.return;u===null?Fl=null:(Fl=u,Pu(u))}break b}}Ll=0,Rl=null,Nu(e,t,o,5);break;case 6:Ll=0,Rl=null,Nu(e,t,o,6);break;case 8:bu(),Ul=6;break a;default:throw Error(i(462))}}Au();break}catch(t){Su(e,t)}while(1);return Ii=Fi=null,N.H=r,N.A=a,Nl=n,Fl===null?(Pl=null,Il=0,Hr(),Ul):0}function Au(){for(;Fl!==null&&!fe();)ju(Fl)}function ju(e){var t=Tc(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Pu(e):Fl=t}function Mu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=lc(n,t,t.pendingProps,t.type,void 0,Il);break;case 11:t=lc(n,t,t.pendingProps,t.type.render,t.ref,Il);break;case 5:xo(t);default:Pc(n,t),t=Fl=$r(t,Hl),t=Tc(n,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Pu(e):Fl=t}function Nu(e,t,n,r){Ii=Fi=null,xo(t),xa=null,Sa=0;var i=t.return;try{if(Js(e,i,t,n,Il)){Ul=1,Us(e,oi(n,e.current)),Fl=null;return}}catch(t){if(i!==null)throw Fl=i,t;Ul=1,Us(e,oi(n,e.current)),Fl=null;return}t.flags&32768?(Ci||r===1?e=!0:Bl||Il&536870912?e=!1:(zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ka.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fu(t,e)):Pu(t)}function Pu(e){var t=e;do{if(t.flags&32768){Fu(t,zl);return}e=t.return;var n=Mc(t.alternate,t,Hl);if(n!==null){Fl=n;return}if(t=t.sibling,t!==null){Fl=t;return}Fl=t=e}while(t!==null);Ul===0&&(Ul=5)}function Fu(e,t){do{var n=Nc(e.alternate,e);if(n!==null){n.flags&=32767,Fl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Fl=e;return}Fl=e=n}while(e!==null);Ul=6,Fl=null}function Iu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Vu();while(ru!==0);if(Nl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Vr,Be(e,n,o,s,c,l),e===Pl&&(Fl=Pl=null,Il=0),au=t,iu=e,ou=n,su=o,cu=a,lu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(ve,function(){return Hu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=N.T,N.T=null,a=P.p,P.p=2,s=Nl,Nl|=4;try{$c(e,t,n)}finally{Nl=s,P.p=a,N.T=r}}ru=1,Lu(),Ru(),zu()}}function Lu(){if(ru===1){ru=0;var e=iu,t=au,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Nl;Nl|=4;try{fl(t,e);var a=Vd,o=hr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&mr(s.ownerDocument.documentElement,s)){if(c!==null&&gr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=pr(s,h),v=pr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}lp=!!Bd,Vd=Bd=null}finally{Nl=i,P.p=r,N.T=n}}e.current=t,ru=2}}function Ru(){if(ru===2){ru=0;var e=iu,t=au,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Nl;Nl|=4;try{el(e,t.alternate,t)}finally{Nl=i,P.p=r,N.T=n}}ru=3}}function zu(){if(ru===4||ru===3){ru=0,pe();var e=iu,t=au,n=ou,r=lu;t.subtreeFlags&10256||t.flags&10256?ru=5:(ru=0,au=iu=null,Bu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(nu=null),Ge(n),t=t.stateNode,we&&typeof we.onCommitFiberRoot==`function`)try{we.onCommitFiberRoot(Ce,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=N.T,i=P.p,P.p=2,N.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{N.T=t,P.p=i}}ou&3&&Vu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===du?uu++:(uu=0,du=e):uu=0,id(0,!1)}}function Bu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Qi(t)))}function Vu(){return Lu(),Ru(),zu(),Hu()}function Hu(){if(ru!==5)return!1;var e=iu,t=su;su=0;var n=Ge(ou),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=cu,cu=null;var o=iu,s=ou;if(ru=0,au=iu=null,ou=0,Nl&6)throw Error(i(331));var c=Nl;if(Nl|=4,Ol(o.current),bl(o,o.current,s,n),Nl=c,id(0,!1),we&&typeof we.onPostCommitFiberRoot==`function`)try{we.onPostCommitFiberRoot(Ce,o)}catch{}return!0}finally{P.p=a,N.T=r,Bu(e,t)}}function Uu(e,t,n){t=oi(n,t),t=Gs(e.stateNode,t,2),e=Na(e,t,2),e!==null&&(ze(e,2),rd(e))}function Wu(e,t,n){if(e.tag===3)Uu(e,e,n);else for(;t!==null;){if(t.tag===3){Uu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(nu===null||!nu.has(r))){e=oi(n,e),n=Ks(2),r=Na(t,n,2),r!==null&&(qs(n,r,t,e),ze(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ml;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Vl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Pl===e&&(Il&n)===n&&(Ul===4||Ul===3&&(Il&62914560)===Il&&300>me()-Ql?!(Nl&2)&&xu(e,0):Kl|=n,Jl===Il&&(Jl=0)),rd(e)}function qu(e,t){t===0&&(t=Le()),e=Gr(e,t),e!==null&&(ze(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return ue(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ee(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Il,a=Pe(r,r===Pl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Fe(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&qd()&&(e=nd);for(var t=me(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}ru!==0&&ru!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ee(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ie(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Pl,n=Il,n=Pe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ll===2||Ll===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&de(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Fe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&de(r),Ge(n)){case 2:case 8:n=_e;break;case 32:n=ve;break;case 268435456:n=be;break;default:n=ve}return r=cd.bind(null,e),n=ue(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&de(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(ru!==0&&ru!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Vu()&&e.callbackNode!==n)return null;var r=Il;return r=Pe(e,e===Pl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(hu(e,r,t),sd(e,me()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Vu())return null;hu(e,t,!0)}function ud(){Zd(function(){Nl&6?ue(ge,ad):od()})}function dd(){if(nd===0){var e=ta;e===0&&(e=Ae,Ae<<=1,!(Ae&261888)&&(Ae=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Ht(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[Xe]||null).action),o=r.submitter;o&&(t=(t=o[Xe]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new ln(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);_s(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),_s(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Ir.length;hd++){var gd=Ir[hd];Lr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Lr(Or,`onAnimationEnd`),Lr(kr,`onAnimationIteration`),Lr(Ar,`onAnimationStart`),Lr(`dblclick`,`onDoubleClick`),Lr(`focusin`,`onFocus`),Lr(`focusout`,`onBlur`),Lr(jr,`onTransitionRun`),Lr(Mr,`onTransitionStart`),Lr(Nr,`onTransitionCancel`),Lr(Pr,`onTransitionEnd`),ft(`onMouseEnter`,[`mouseout`,`mouseover`]),ft(`onMouseLeave`,[`mouseout`,`mouseover`]),ft(`onPointerEnter`,[`pointerout`,`pointerover`]),ft(`onPointerLeave`,[`pointerout`,`pointerover`]),dt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),dt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),dt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),dt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),dt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),dt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Rr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Rr(e)}i.currentTarget=null,a=c}}}}function bd(e,t){var n=t[Qe];n===void 0&&(n=t[Qe]=new Set);var r=e+`__bubble`;n.has(r)||(wd(t,e,2,!1),n.add(r))}function xd(e,t,n){var r=0;t&&(r|=4),wd(n,e,r,t)}var Sd=`_reactListening`+Math.random().toString(36).slice(2);function Cd(e){if(!e[Sd]){e[Sd]=!0,lt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||xd(t,!1,e),xd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sd]||(t[Sd]=!0,xd(`selectionchange`,!1,t))}}function wd(e,t,n,r){switch(gp(t)){case 2:var i=up;break;case 8:i=dp;break;default:i=fp}n=i.bind(null,t,n,e),i=void 0,!Qt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Td(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=it(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}J(function(){var r=a,i=Gt(n),s=[];a:{var c=Fr.get(e);if(c!==void 0){var l=ln,u=e;switch(e){case`keypress`:if(rn(n)===0)break a;case`keydown`:case`keyup`:l=Dn;break;case`focusin`:u=`focus`,l=vn;break;case`focusout`:u=`blur`,l=vn;break;case`beforeblur`:case`afterblur`:l=vn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=_n;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=kn;break;case Or:case kr:case Ar:l=yn;break;case Pr:l=An;break;case`scroll`:case`scrollend`:l=dn;break;case`wheel`:l=jn;break;case`copy`:case`cut`:case`paste`:l=bn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=On;break;case`toggle`:case`beforetoggle`:l=Mn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Xt(m,p),g!=null&&d.push(Ed(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Wt&&(u=n.relatedTarget||n.fromElement)&&(it(u)||u[Ze]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?it(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=gn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=On,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ot(l),h=u==null?c:ot(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,it(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Od,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&kd(s,c,l,d,!1),u!==null&&f!==null&&kd(s,f,u,d,!0)}}a:{if(c=r?ot(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=Qn;else if(Kn(c))if($n)v=cr;else{v=or;var y=ar}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&zt(r.elementType)&&(v=Qn):v=sr;if(v&&=v(e,r)){qn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&At(c,`number`,c.value)}switch(y=r?ot(r):window,e){case`focusin`:(Kn(y)||y.contentEditable===`true`)&&(vr=y,yr=r,br=null);break;case`focusout`:br=yr=vr=null;break;case`mousedown`:xr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:xr=!1,Sr(s,n,i);break;case`selectionchange`:if(_r)break;case`keydown`:case`keyup`:Sr(s,n,i)}var b;if(Pn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Hn?Bn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Ln&&n.locale!==`ko`&&(Hn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Hn&&(b=nn()):($t=i,en=`value`in $t?$t.value:$t.textContent,Hn=!0)),y=Dd(r,x),0<y.length&&(x=new xn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Vn(n),b!==null&&(x.data=b)))),(b=In?Un(e,n):Wn(e,n))&&(x=Dd(r,`onBeforeInput`),0<x.length&&(y=new xn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Ed(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Xt(e,n),i!=null&&r.unshift(Ed(e,i,a)),i=Xt(e,t),i!=null&&r.push(Ed(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Od(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Xt(n,a),l!=null&&o.unshift(Ed(n,l,c))):i||(l=Xt(n,a),l!=null&&o.push(Ed(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ad=/\r\n?/g,jd=/\u0000|\uFFFD/g;function Md(e){return(typeof e==`string`?e:``+e).replace(Ad,`
|
|
10
|
-
`).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Pd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Pt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Pt(e,``+r);break;case`className`:vt(e,`class`,r);break;case`tabIndex`:vt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:vt(e,n,r);break;case`style`:Lt(e,r,o);break;case`data`:if(t!==`object`){vt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ht(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Pd(e,t,`name`,a.name,a,null),Pd(e,t,`formEncType`,a.formEncType,a,null),Pd(e,t,`formMethod`,a.formMethod,a,null),Pd(e,t,`formTarget`,a.formTarget,a,null)):(Pd(e,t,`encType`,a.encType,a,null),Pd(e,t,`method`,a.method,a,null),Pd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ht(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Ut);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Ht(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:bd(`beforetoggle`,e),bd(`toggle`,e),_t(e,`popover`,r);break;case`xlinkActuate`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:_t(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Bt.get(n)||n,_t(e,n,r))}}function Fd(e,t,n,r,a,o){switch(n){case`style`:Lt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Pt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Pt(e,``+r);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Ut);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ut.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[Xe]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):_t(e,n,r)}}}function Id(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:bd(`error`,e),bd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,o,s,n,null)}}a&&Pd(e,t,`srcSet`,n.srcSet,n,null),r&&Pd(e,t,`src`,n.src,n,null);return;case`input`:bd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Pd(e,t,r,d,n,null)}}kt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in bd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Pd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&jt(e,!!r,n,!0):jt(e,!!r,t,!1);return;case`textarea`:for(s in bd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Pd(e,t,s,c,n,null)}Nt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Pd(e,t,l,r,n,null)}return;case`dialog`:bd(`beforetoggle`,e),bd(`toggle`,e),bd(`cancel`,e),bd(`close`,e);break;case`iframe`:case`object`:bd(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)bd(_d[r],e);break;case`image`:bd(`error`,e),bd(`load`,e);break;case`details`:bd(`toggle`,e);break;case`embed`:case`source`:case`link`:bd(`error`,e),bd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,u,r,n,null)}return;default:if(zt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Fd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Pd(e,t,c,r,n,null))}function Ld(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Pd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Pd(e,t,p,m,r,f)}}Ot(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Pd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Pd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?jt(e,!!n,n?[]:``,!1):jt(e,!!n,t,!0)):jt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Pd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Pd(e,t,s,a,r,o)}Mt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Pd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Pd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Pd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Pd(e,t,u,p,r,m)}return;default:if(zt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Fd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Fd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Pd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Pd(e,t,f,p,r,m)}function Rd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function zd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Rd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Rd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Bd=null,Vd=null;function Hd(e){return e.nodeType===9?e:e.ownerDocument}function Ud(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Wd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Gd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Kd=null;function qd(){var e=window.event;return e&&e.type===`popstate`?e===Kd?!1:(Kd=e,!0):(Kd=null,!1)}var Jd=typeof setTimeout==`function`?setTimeout:void 0,Yd=typeof clearTimeout==`function`?clearTimeout:void 0,Xd=typeof Promise==`function`?Promise:void 0,Zd=typeof queueMicrotask==`function`?queueMicrotask:Xd===void 0?Jd:function(e){return Xd.resolve(null).then(e).catch(Qd)};function Qd(e){setTimeout(function(){throw e})}function $d(e){return e===`head`}function ef(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)hf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,hf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[nt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&hf(e.ownerDocument.body);n=i}while(n);Np(t)}function tf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function nf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nf(n),rt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[nt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=uf(e.nextSibling),e===null)break}return null}function af(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=uf(e.nextSibling),e===null))return null;return e}function of(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=uf(e.nextSibling),e===null))return null;return e}function sf(e){return e.data===`$?`||e.data===`$~`}function cf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function uf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var df=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return uf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function mf(e,t,n){switch(t=Hd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function hf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);rt(e)}var gf=new Map,_f=new Set;function vf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yf=P.d;P.d={f:bf,r:xf,D:wf,C:Tf,L:Ef,m:Df,X:kf,S:Of,M:Af};function bf(){var e=yf.f(),t=yu();return e||t}function xf(e){var t=at(e);t!==null&&t.tag===5&&t.type===`form`?ys(t):yf.r(e)}var Sf=typeof document>`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=Dt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),ct(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Dt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Dt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Dt(n.imageSizes)+`"]`)):i+=`[href="`+Dt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Id(t,`link`,e),ct(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Dt(r)+`"][href="`+Dt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Id(r,`link`,e),ct(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=st(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);ct(c),Id(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=st(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),ct(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=st(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),ct(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var a=(a=U.current)?vf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=st(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=st(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},gf.set(e,n),o||Ff(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=st(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Mf(e){return`href="`+Dt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Id(t,`link`,n),ct(t),e.head.appendChild(t))}function If(e){return`[src="`+Dt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Dt(n.href)+`"]`);if(r)return t.instance=r,ct(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ct(r),Id(r,`style`,a),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Mf(n.href);var o=e.querySelector(Nf(a));if(o)return t.state.loading|=4,t.instance=o,ct(o),o;r=Pf(n),(a=gf.get(a))&&Bf(r,a),o=(e.ownerDocument||e).createElement(`link`),ct(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(a=e.querySelector(Lf(o)))?(t.instance=a,ct(a),a):(r=n,(a=gf.get(o))&&(r=f({},n),Vf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ct(a),Id(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Hf=null;function Uf(e,t,n){if(Hf===null){var r=new Map,i=Hf=new Map;i.set(n,r)}else i=Hf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[nt]||a[Ye]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Wf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Gf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ct(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),ct(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Jf===0&&(Jf=62500*zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Xf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ep={$$typeof:b,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function tp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Re(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Re(0),this.hiddenUpdates=Re(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function np(e,t,n,r,i,a,o,s,c,l,u,d){return e=new tp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Xr(3,null,null,t),e.current=a,a.stateNode=e,t=Zi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Aa(a),e}function rp(e){return e?(e=Jr,e):Jr}function ip(e,t,n,r,i,a){i=rp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ma(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Na(e,r,t),n!==null&&(mu(n,e,t),Pa(n,e,t))}function ap(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function op(e,t){ap(e,t),(e=e.alternate)&&ap(e,t)}function sp(e){if(e.tag===13||e.tag===31){var t=Gr(e,67108864);t!==null&&mu(t,e,67108864),op(e,67108864)}}function cp(e){if(e.tag===13||e.tag===31){var t=fu();t=We(t);var n=Gr(e,t);n!==null&&mu(n,e,t),op(e,t)}}var lp=!0;function up(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,fp(e,t,n,r)}finally{P.p=a,N.T=i}}function dp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,fp(e,t,n,r)}finally{P.p=a,N.T=i}}function fp(e,t,n,r){if(lp){var i=pp(r);if(i===null)Td(e,t,r,mp,n),Z(e,r);else if(Ep(i,e,t,n,r))r.stopPropagation();else if(Z(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=at(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ne(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ee(o);s.entanglements[1]|=c,o&=~c}rd(a),!(Nl&6)&&(eu=me()+500,id(0,!1))}}break;case 31:case 13:s=Gr(a,2),s!==null&&mu(s,a,2),yu(),op(a,2)}if(a=pp(r),a===null&&Td(e,t,r,mp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function pp(e){return e=Gt(e),hp(e)}var mp=null;function hp(e){if(mp=null,e=it(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return mp=e,null}function gp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(he()){case ge:return 2;case _e:return 8;case ve:case ye:return 32;case be:return 268435456;default:return 32}default:return 32}}var _p=!1,vp=null,yp=null,bp=null,xp=new Map,Sp=new Map,wp=[],Tp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Z(e,t){switch(e){case`focusin`:case`focusout`:vp=null;break;case`dragenter`:case`dragleave`:yp=null;break;case`mouseover`:case`mouseout`:bp=null;break;case`pointerover`:case`pointerout`:xp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Sp.delete(t.pointerId)}}function Q(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=at(t),t!==null&&sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ep(e,t,n,r,i){switch(t){case`focusin`:return vp=Q(vp,e,t,n,r,i),!0;case`dragenter`:return yp=Q(yp,e,t,n,r,i),!0;case`mouseover`:return bp=Q(bp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return xp.set(a,Q(xp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Sp.set(a,Q(Sp.get(a)||null,e,t,n,r,i)),!0}return!1}function $(e){var t=it(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,qe(e.priority,function(){cp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,qe(e.priority,function(){cp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Wt=r,n.target.dispatchEvent(r),Wt=null}else return t=at(n),t!==null&&sp(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){_p=!1,vp!==null&&Dp(vp)&&(vp=null),yp!==null&&Dp(yp)&&(yp=null),bp!==null&&Dp(bp)&&(bp=null),xp.forEach(Op),Sp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,_p||(_p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(hp(r||n)===null)continue;break}var a=at(n);a!==null&&(e.splice(t,3),t-=3,_s(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}vp!==null&&Ap(vp,e),yp!==null&&Ap(yp,e),bp!==null&&Ap(bp,e),xp.forEach(t),Sp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)$(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Xe]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Xe]||null)s=o.formAction;else if(hp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ip(n,fu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ip(e.current,2,null,e,null,null),yu(),t[Ze]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ke();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&$(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(i(527,Lp,`19.2.5`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ce=zp.inject(Rp),we=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Bs,s=Vs,c=Hs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=np(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[Ze]=t.current,Cd(e),new Fp(t)}})),Tp=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=wp()})),Z=r(),Q=e(mt(),1),Ep=Tp(),$=zt(),Dp=3100,Op=3;function kp(e,t,n){let r=n?.windowMs??600,i=n?.maxLevel??Op;if(e===0||t>=r)return 1;let a=e+1;return a>i?i:a}var Ap={0:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},1:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},2:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},3:{count:16,startRadius:11,baseDistance:7,distanceVariance:3,sizeMin:.45,sizeMax:1.2,maxDelay:500,durationMin:1100,durationMax:2400}},jp=[`var(--color-azure-blue)`,`var(--color-sky-blue)`,`var(--color-violet-300)`,`var(--color-orange-light)`,`var(--color-crystal-blue)`,`var(--color-white-cream)`];function Mp(e,t={}){let n=t.rng??Math.random,r=t.colors??jp,i=Ap[e];if(i.count===0||r.length===0)return[];let a=[],o=Math.PI*2/i.count;for(let e=0;e<i.count;e++){let t=e*o+(n()-.5)*o*.7,s=i.baseDistance+(n()-.5)*2*i.distanceVariance,c=i.sizeMin+n()*(i.sizeMax-i.sizeMin),l=n()*i.maxDelay,u=i.durationMin+n()*(i.durationMax-i.durationMin),d=Math.floor(n()*r.length),f=Math.cos(t),p=Math.sin(t);a.push({id:e,dx:f*s,dy:p*s,originDx:f*i.startRadius,originDy:p*i.startRadius,size:c,color:r[d]??`currentColor`,delay:l,duration:u})}return a}var Np=1.8,Pp=90,Fp=16,Ip=380,Lp=.025,Rp=.1,zp=.18,Bp=400,Vp=9.2736,Hp=18.1799,Up=14.5244,Wp={1:{halfWidth:1.5,apexLift:2.2},2:{halfWidth:1.4,apexLift:2.6},3:{halfWidth:1.25,apexLift:3}};function Gp(e,t){let{halfWidth:n,apexLift:r}=Wp[t];return`M${e-n} ${Up+.3} Q${e} ${Up-r}, ${e+n} ${Up+.3}`}function Kp(e){let t=1.5,n=.3;return`M${e-t} ${Up-n} Q${e} ${Up+1.4}, ${e+t} ${Up-n}`}var qp=15,Jp=15;function Yp(e){return{fill:e.color,"--fx-tx":`${e.dx}px`,"--fx-ty":`${e.dy}px`,"--fx-delay":`${e.delay}ms`,"--fx-duration":`${e.duration}ms`}}function Xp(e){let t=(0,$.c)(71),{size:n,className:r,trackMouse:i,variant:a,celebrateSignal:o}=e,s=n===void 0?48:n,c=i===void 0?!0:i,l=a===void 0?`default`:a,u=o===void 0?0:o,d=(0,Q.useRef)(null),f=(0,Q.useRef)(null),p=(0,Q.useRef)(null),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={x:0,y:0},t[0]=m):m=t[0];let h=(0,Q.useRef)(m),[g,_]=(0,Q.useState)(0),[v,y]=(0,Q.useState)(0),b;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[1]=b):b=t[1];let[x,S]=(0,Q.useState)(b),C=(0,Q.useRef)(0),w=(0,Q.useRef)(void 0),T=l===`sleeping`,E;t[2]!==g||t[3]!==T?(E=function(){if(T)return;let e=typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),t=C.current===0?1/0:e-C.current;C.current=e;let n=kp(g,t);_(n),y(em),S(Mp(n)),clearTimeout(w.current),w.current=setTimeout(()=>{_(0),S([])},Dp)},t[2]=g,t[3]=T,t[4]=E):E=t[4];let D=E,O,k;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>()=>clearTimeout(w.current),k=[],t[5]=O,t[6]=k):(O=t[5],k=t[6]),(0,Q.useEffect)(O,k);let A,j;t[7]!==u||t[8]!==T?(A=()=>{u===0||T||(_(3),y($p),S(Mp(3)),clearTimeout(w.current),w.current=setTimeout(()=>{_(0),S([])},Dp))},j=[u,T],t[7]=u,t[8]=T,t[9]=A,t[10]=j):(A=t[9],j=t[10]),(0,Q.useEffect)(A,j);let M,N;t[11]!==T||t[12]!==c?(M=()=>{if(!c||T||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let e=0,t=0,n=!1,r=0,i=0,a=0,o=0,s=0,l=function(){s===0&&(s=requestAnimationFrame(m))},u=function(r){e=r.clientX,t=r.clientY,n=!0,l()};function m(){s=0;let c=f.current,u=d.current;if(!c||!u){l();return}let m=n;n=!1;let g=c.getBoundingClientRect(),_=g.left+g.width/2,v=g.top+g.height*.48,y=e-_,b=t-v,x=Math.hypot(y,b),S=Math.max(-1,Math.min(1,y/Ip)),C=-Math.max(-1,Math.min(1,b/Ip))*Fp,w=S*Fp,T=0,E=0;if(x>=1){let e=Math.min(x/Pp,1)*Np;T=y/x*e,E=b/x*e}let D=Math.abs(C-r)<.01&&Math.abs(w-i)<.01&&Math.abs(T-a)<.01&&Math.abs(E-o)<.01;if(!m&&D)return;l(),r+=(C-r)*Rp,i+=(w-i)*Rp,u.style.transform=`perspective(${Bp}px) rotateX(${r.toFixed(3)}deg) rotateY(${i.toFixed(3)}deg)`,a+=(T-a)*zp,o+=(E-o)*zp;let O=i*Lp,k=-r*Lp,A=a+O,j=o+k;h.current.x=A,h.current.y=j,p.current?.setAttribute(`transform`,`translate(${A.toFixed(3)} ${j.toFixed(3)})`)}return document.addEventListener(`mousemove`,u,{passive:!0}),l(),()=>{document.removeEventListener(`mousemove`,u),s!==0&&cancelAnimationFrame(s),s=0,d.current&&(d.current.style.transform=``),h.current={x:0,y:0},p.current?.removeAttribute(`transform`)}},N=[c,T],t[11]=T,t[12]=c,t[13]=M,t[14]=N):(M=t[13],N=t[14]),(0,Q.useEffect)(M,N);let P;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>{let e=p.current;if(!e)return;let{x:t,y:n}=h.current;e.setAttribute(`transform`,`translate(${t.toFixed(3)} ${n.toFixed(3)})`)},t[15]=P):P=t[15],(0,Q.useLayoutEffect)(P);let F=g>0,I=F?g:1,L=F?`ok-blob-clicked-${g}`:null,R;t[16]===r?R=t[17]:(R=J(`ok-blob-3d-wrapper`,r),t[16]=r,t[17]=R);let z=T?`cursor-default`:`cursor-pointer`,B=`body-${v}`,V=T&&`ok-blob-sleeping`,H;t[18]!==L||t[19]!==V?(H=J(`ok-blob-group`,V,L),t[18]=L,t[19]=V,t[20]=H):H=t[20];let U;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Z.jsx)(`path`,{d:`M25.2339 6.78134C25.5199 7.35734 25.8179 8.47234 26.0179 9.07834C26.0189 9.08234 26.0209 9.08634 26.0219 9.09134C26.0229 9.09534 26.0249 9.10034 26.0259 9.10434C26.0539 9.19734 26.0949 9.29533 26.1519 9.41633C26.2919 9.71133 26.5269 10.1173 27.1299 11.1683C27.3259 11.4643 27.5209 11.7693 27.7119 12.0903C29.9739 15.1623 29.3259 20.1913 27.0469 22.9153C26.7779 23.2953 26.4869 23.6043 26.1889 23.8863C26.1519 23.9253 26.1129 23.9643 26.0729 24.0033C25.3159 24.7543 24.2949 25.4673 23.6129 25.8323C22.7469 26.2983 22.1349 26.5483 21.6299 26.7463C20.3649 27.3063 19.0609 27.7733 17.6569 28.0423C15.9649 28.3513 14.1939 28.4433 12.4569 28.1373C11.4779 27.9663 10.5119 27.6663 9.60891 27.2493C8.77491 26.8663 7.99192 26.3853 7.26992 25.8403C6.83592 25.5393 6.43893 25.2343 6.08093 24.9383C5.57893 24.5223 5.15993 24.1263 4.83493 23.7793C4.04993 22.9443 3.31593 21.8893 2.80893 21.0953C2.72593 20.9663 2.64792 20.8433 2.57592 20.7293C2.56192 20.7093 2.54793 20.6893 2.53393 20.6703C2.08593 20.0263 1.71892 19.3293 1.43792 18.5993C1.42892 18.5453 1.42093 18.4903 1.41293 18.4353C1.32093 17.7443 1.08292 16.9423 1.01092 15.6333C0.984921 15.0653 0.998928 14.4013 1.12393 13.6353C1.20693 13.1413 1.31993 12.9023 1.40893 12.7113C1.43593 12.6543 1.46193 12.6023 1.48593 12.5483C1.56793 12.3653 1.59392 12.1563 1.63592 11.9083C1.68992 11.5883 1.76992 11.1943 2.04592 10.7553C2.94392 9.37934 3.36792 8.81934 3.66592 8.33934C3.75592 8.20334 3.84292 8.08134 3.94192 7.96634C4.21592 7.64634 4.67693 7.29534 5.10293 7.05734C5.16693 7.02234 5.23093 6.98834 5.29193 6.95534C5.62993 6.77834 6.22592 6.30135 6.66992 5.92035C6.83692 5.77635 7.08193 5.60735 7.37393 5.40935C7.67393 5.20535 8.02593 4.96934 8.39193 4.70234C9.32093 4.02634 9.84091 3.69134 10.2599 3.42334C10.3799 3.34734 10.4919 3.27734 10.6049 3.20834C10.9609 2.98834 11.4149 2.73034 11.8869 2.48634C12.4519 2.19334 13.0469 1.92133 13.5089 1.72233C14.7399 1.30233 16.0539 1.01333 17.4169 1.00033C18.1169 0.991333 18.7939 1.16534 19.2389 1.43034C19.6869 1.69534 19.8689 2.00335 19.8039 2.23935C19.7379 2.47835 19.4399 2.63634 19.0109 2.74734C18.5789 2.85634 18.0469 2.92035 17.4889 2.96135C16.3639 3.04235 15.2399 3.36435 14.1499 3.80835C12.8199 4.35135 11.5379 5.07133 10.2719 5.84733C9.38691 6.39133 8.51192 6.97334 7.63592 7.56834C7.54492 7.63034 7.45492 7.69135 7.36492 7.75235C6.97392 8.06635 6.58293 8.38134 6.22293 8.66334C5.97893 8.85734 5.76793 9.04834 5.59393 9.21434C5.26893 9.52334 5.02393 9.74334 4.81893 9.93934C4.67793 10.0753 4.55793 10.2013 4.45593 10.3443C4.40093 10.4213 4.32992 10.5273 4.24792 10.6593C3.90492 11.1933 3.44493 12.1693 3.15393 13.1173C3.01893 13.5363 2.87991 14.0343 2.79391 14.5253C2.66591 15.2253 2.65594 15.9053 2.71994 16.2373C2.82794 16.8193 2.95593 17.4833 3.14093 18.0553C3.31293 18.6003 3.52991 19.0583 3.70791 19.2823C3.81591 19.4183 3.90394 19.5473 3.99594 19.6913C4.09394 19.8413 4.19191 20.0073 4.31091 20.2033C4.47891 20.4803 4.68592 20.8163 5.00192 21.2493C5.36492 21.7463 5.61793 22.1043 5.83493 22.4023C6.14493 22.8243 6.38591 23.1343 6.83691 23.5033C7.33891 23.9113 7.86593 24.3113 8.26693 24.6393C8.44893 24.7883 8.66993 24.9443 8.90493 25.0963C9.21593 25.2963 9.55192 25.4893 9.85592 25.6703C10.1059 25.8203 10.3059 25.9633 10.4869 26.0863C10.5429 26.1243 10.5979 26.1603 10.6519 26.1943C10.8699 26.2803 11.0929 26.3593 11.3159 26.4283C11.3539 26.4323 11.3949 26.4353 11.4369 26.4393C11.6509 26.4573 11.9089 26.4733 12.2209 26.5133C12.7169 26.5753 13.1399 26.6603 13.6019 26.7243C13.9589 26.7733 14.3409 26.8083 14.7729 26.7893C15.0729 26.7753 15.4069 26.7353 15.7389 26.6813C16.2349 26.6023 16.7179 26.4943 17.0569 26.4473C17.1499 26.4343 17.2359 26.4343 17.3209 26.4373C17.3489 26.4393 17.3799 26.4413 17.4109 26.4433C17.4119 26.4433 17.4119 26.4433 17.4129 26.4433C17.4199 26.4433 17.4279 26.4443 17.4349 26.4443C18.2329 26.2413 19.0259 25.9433 19.7959 25.5983C19.8609 25.5633 19.9259 25.5273 19.9899 25.4913C20.3059 25.3173 20.6049 25.1383 20.7869 24.9943C20.9829 24.8393 21.5189 24.5373 22.0579 24.1853C22.4109 23.9553 22.7649 23.7053 23.0369 23.4833C23.1949 23.3553 23.3689 23.2693 23.5479 23.1773C23.7129 23.0923 23.8809 23.0013 24.0349 22.8653C24.1109 22.7983 24.1869 22.7173 24.2639 22.6303C24.3309 22.5563 24.4039 22.4723 24.4759 22.3923C24.5459 22.3153 24.7199 22.1723 24.9139 21.9793C25.0079 21.8863 25.1059 21.7783 25.1909 21.6713C25.2199 21.6323 25.2489 21.5943 25.2769 21.5553C25.5919 21.0403 25.8779 20.5003 26.1019 19.9653C26.1299 19.8403 26.1379 19.7293 26.1279 19.6373C26.1199 19.5703 26.1029 19.5113 26.0839 19.4503C26.0599 19.3643 26.0329 19.2773 26.0239 19.1723C26.0169 19.0893 26.0309 19.0043 26.0629 18.9543C26.0779 18.9323 26.0969 18.9143 26.1129 18.8993C26.1329 18.8823 26.1499 18.8673 26.1569 18.8443C26.1609 18.8273 26.1579 18.8073 26.1529 18.7833C26.1459 18.7443 26.1369 18.6943 26.1539 18.6293C26.2189 18.3853 26.2869 18.1103 26.3319 17.8383C26.3829 17.5393 26.4049 17.2433 26.3949 17.0123C26.3849 16.7493 26.3909 16.3823 26.3469 16.0003C26.3179 15.7343 26.2659 15.4663 26.1979 15.2383C26.1319 15.0143 26.0219 14.7913 25.9039 14.5783C25.7629 14.3223 25.6119 14.0783 25.5169 13.8453C25.4969 13.7983 25.4999 13.7263 25.4999 13.6323C25.5009 13.5673 25.4999 13.4913 25.4919 13.4083C25.3239 13.1243 25.1459 12.8423 24.9589 12.5483C24.9479 12.5413 24.9369 12.5333 24.9249 12.5263C24.6689 12.3503 24.3139 12.1173 24.0769 11.5503C24.0179 11.4063 24.0069 11.2983 23.9969 11.1993C23.9859 11.1013 23.9799 11.0183 23.9289 10.9093C23.8709 10.7853 23.7759 10.6583 23.6709 10.4993C23.5849 10.3703 23.4899 10.2133 23.4199 10.0423C23.3819 9.95134 23.3509 9.85734 23.3329 9.75934C23.3299 9.74334 23.3269 9.72534 23.3229 9.70634C23.2899 9.52734 23.2439 9.26534 23.2409 8.98634C23.0209 8.24434 22.8339 7.48833 22.6519 6.77633C22.3429 5.57133 22.0519 4.54234 21.3329 3.95434C20.9839 3.65334 20.5689 3.35433 20.2459 3.05433C19.9259 2.75633 19.7449 2.47534 19.8019 2.23834C19.8639 2.00634 20.1589 1.82934 20.6659 1.80534C21.1699 1.78334 21.8699 1.93235 22.5209 2.39235C23.6159 3.14235 24.2029 4.38334 24.5599 5.35734C24.5829 5.40834 24.6049 5.46034 24.6259 5.51234C24.7849 5.89434 24.9529 6.22834 25.1199 6.55534C25.1579 6.63034 25.1969 6.70834 25.2339 6.78134Z`,className:`ok-blob-body`}),t[21]=U):U=t[21];let W=(F||T)&&`ok-blob-eye-hidden`,G;t[22]===W?G=t[23]:(G=J(`ok-blob-eye`,W),t[22]=W,t[23]=G);let K;t[24]===G?K=t[25]:(K=(0,Z.jsx)(`ellipse`,{cx:Vp,cy:Up,rx:1.2722,ry:1.9083,className:G}),t[24]=G,t[25]=K);let ee=(F||T)&&`ok-blob-eye-hidden`,te;t[26]===ee?te=t[27]:(te=J(`ok-blob-eye ok-blob-eye-right`,ee),t[26]=ee,t[27]=te);let ne;t[28]===te?ne=t[29]:(ne=(0,Z.jsx)(`ellipse`,{cx:Hp,cy:Up,rx:1.2722,ry:1.9083,className:te}),t[28]=te,t[29]=ne);let re;t[30]===I?re=t[31]:(re=Gp(Vp,I),t[30]=I,t[31]=re);let ie=(!F||T)&&`ok-blob-eye-hidden`,ae;t[32]===ie?ae=t[33]:(ae=J(`ok-blob-happy-eye`,ie),t[32]=ie,t[33]=ae);let oe;t[34]!==re||t[35]!==ae?(oe=(0,Z.jsx)(`path`,{d:re,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:ae}),t[34]=re,t[35]=ae,t[36]=oe):oe=t[36];let se;t[37]===I?se=t[38]:(se=Gp(Hp,I),t[37]=I,t[38]=se);let ce=(!F||T)&&`ok-blob-eye-hidden`,le;t[39]===ce?le=t[40]:(le=J(`ok-blob-happy-eye`,ce),t[39]=ce,t[40]=le);let ue;t[41]!==se||t[42]!==le?(ue=(0,Z.jsx)(`path`,{d:se,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:le}),t[41]=se,t[42]=le,t[43]=ue):ue=t[43];let de;t[44]===T?de=t[45]:(de=T?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`path`,{d:Kp(Vp),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`}),(0,Z.jsx)(`path`,{d:Kp(Hp),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`})]}):null,t[44]=T,t[45]=de);let fe;t[46]!==K||t[47]!==ne||t[48]!==oe||t[49]!==ue||t[50]!==de?(fe=(0,Z.jsxs)(`g`,{ref:p,children:[K,ne,oe,ue,de]}),t[46]=K,t[47]=ne,t[48]=oe,t[49]=ue,t[50]=de,t[51]=fe):fe=t[51];let pe;t[52]!==B||t[53]!==H||t[54]!==fe?(pe=(0,Z.jsxs)(`g`,{className:H,children:[U,fe]},B),t[52]=B,t[53]=H,t[54]=fe,t[55]=pe):pe=t[55];let me;t[56]===T?me=t[57]:(me=T?(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`text`,{x:21,y:7,className:`ok-blob-z ok-blob-z-1`,children:`z`}),(0,Z.jsx)(`text`,{x:26,y:2,className:`ok-blob-z ok-blob-z-2`,children:`z`})]}):null,t[56]=T,t[57]=me);let he;t[58]!==v||t[59]!==x?(he=x.length>0&&(0,Z.jsx)(`g`,{children:x.map(Zp)},`firework-${v}`),t[58]=v,t[59]=x,t[60]=he):he=t[60];let ge;t[61]!==D||t[62]!==s||t[63]!==z||t[64]!==pe||t[65]!==me||t[66]!==he?(ge=(0,Z.jsxs)(`svg`,{ref:f,width:s,height:s,viewBox:`0 0 30 30`,fill:`none`,overflow:`visible`,xmlns:`http://www.w3.org/2000/svg`,className:z,"aria-hidden":`true`,onClick:D,onMouseDown:Qp,children:[pe,me,he]}),t[61]=D,t[62]=s,t[63]=z,t[64]=pe,t[65]=me,t[66]=he,t[67]=ge):ge=t[67];let _e;return t[68]!==R||t[69]!==ge?(_e=(0,Z.jsx)(`span`,{ref:d,className:R,children:ge}),t[68]=R,t[69]=ge,t[70]=_e):_e=t[70],_e}function Zp(e){return(0,Z.jsx)(`circle`,{cx:qp+e.originDx,cy:Jp+e.originDy,r:e.size,className:`ok-blob-firework`,style:Yp(e)},e.id)}function Qp(e){return e.preventDefault()}function $p(e){return e+1}function em(e){return e+1}var tm=(0,Q.lazy)(()=>n(()=>import(`./ReportBugDialogBody-BBAPrsS2.js`),__vite__mapDeps([5,1,6,2,3,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]),import.meta.url)),nm=1200,rm=`[cmdk-root],[data-radix-popper-content-wrapper]`,im=500;function am(e){let t=(0,$.c)(8),[n,r]=(0,Q.useState)(e.open),[i,a]=(0,Q.useState)(!1),[o,s]=(0,Q.useState)(null),c=(0,Q.useRef)(0);e.open&&!n&&r(!0);let l,u;if(t[0]!==e.crashInvite||t[1]!==e.open?(l=()=>{if(!e.open){a(!1);return}let t=c.current+=1,n=window.okDesktop?.bugReport?.captureScreenshot;if(typeof n!=`function`||e.crashInvite!==void 0){s(null),a(!0);return}s(null);let r=!1,i=e=>{r||c.current!==t||(r=!0,s(e),a(!0))},o=setTimeout(()=>i(null),nm),l=performance.now(),u=0,d=()=>{if(c.current!==t)return;let e=performance.now()-l>=im;if(document.querySelector(rm)!==null&&!e){u=requestAnimationFrame(d);return}u=requestAnimationFrame(()=>{c.current===t&&n().then(i).catch(()=>i(null))})};return u=requestAnimationFrame(d),()=>{c.current+=1,clearTimeout(o),cancelAnimationFrame(u)}},u=[e.open,e.crashInvite],t[0]=e.crashInvite,t[1]=e.open,t[2]=l,t[3]=u):(l=t[2],u=t[3]),(0,Q.useEffect)(l,u),!n)return null;let d=e.open&&i,f;return t[4]!==e||t[5]!==o||t[6]!==d?(f=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(tm,{...e,open:d,screenshot:o})}),t[4]=e,t[5]=o,t[6]=d,t[7]=f):f=t[7],f}var om=`ContextMenu`,[sm,cm]=rn(om,[or]),lm=or(),[um,dm]=sm(om),fm=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=Q.useState(!1),c=lm(t),l=nn(r),u=Q.useCallback(e=>{s(e),l(e)},[l]);return(0,Z.jsx)(um,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,Z.jsx)(ur,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};fm.displayName=om;var pm=`ContextMenuTrigger`,mm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=dm(pm,n),o=lm(n),s=Q.useRef({x:0,y:0}),c=Q.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=Q.useRef(0),u=Q.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return Q.useEffect(()=>u,[u]),Q.useEffect(()=>void(r&&u()),[r,u]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(xr,{...o,virtualRef:c}),(0,Z.jsx)(en.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:$t(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:$t(e.onPointerDown,Um(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:$t(e.onPointerMove,Um(u)),onPointerCancel:r?e.onPointerCancel:$t(e.onPointerCancel,Um(u)),onPointerUp:r?e.onPointerUp:$t(e.onPointerUp,Um(u))})]})});mm.displayName=pm;var hm=`ContextMenuPortal`,gm=e=>{let{__scopeContextMenu:t,...n}=e,r=lm(t);return(0,Z.jsx)(mr,{...r,...n})};gm.displayName=hm;var _m=`ContextMenuContent`,vm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=dm(_m,n),a=lm(n),o=Q.useRef(!1);return(0,Z.jsx)(pr,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});vm.displayName=_m;var ym=`ContextMenuGroup`,bm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(sr,{...i,...r,ref:t})});bm.displayName=ym;var xm=`ContextMenuLabel`,Sm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(cr,{...i,...r,ref:t})});Sm.displayName=xm;var Cm=`ContextMenuItem`,wm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(_r,{...i,...r,ref:t})});wm.displayName=Cm;var Tm=`ContextMenuCheckboxItem`,Em=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(yr,{...i,...r,ref:t})});Em.displayName=Tm;var Dm=`ContextMenuRadioGroup`,Om=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(Sr,{...i,...r,ref:t})});Om.displayName=Dm;var km=`ContextMenuRadioItem`,Am=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(lr,{...i,...r,ref:t})});Am.displayName=km;var jm=`ContextMenuItemIndicator`,Mm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(br,{...i,...r,ref:t})});Mm.displayName=jm;var Nm=`ContextMenuSeparator`,Pm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(vr,{...i,...r,ref:t})});Pm.displayName=Nm;var Fm=`ContextMenuArrow`,Im=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(gr,{...i,...r,ref:t})});Im.displayName=Fm;var Lm=`ContextMenuSub`,Rm=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=lm(t),[s,c]=tn({prop:i,defaultProp:a??!1,onChange:r,caller:Lm});return(0,Z.jsx)(hr,{...o,open:s,onOpenChange:c,children:n})};Rm.displayName=Lm;var zm=`ContextMenuSubTrigger`,Bm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(dr,{...i,...r,ref:t})});Bm.displayName=zm;var Vm=`ContextMenuSubContent`,Hm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(fr,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Hm.displayName=Vm;function Um(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Wm=fm,Gm=mm,Km=gm,qm=vm,Jm=bm,Ym=Sm,Xm=wm,Zm=Em,Qm=Mm,$m=Pm,eh=Rm,th=Bm,nh=Hm;function rh(e){let t=(0,$.c)(24),{error:n,resetErrorBoundary:r}=e,{_:i}=ht(),[a,o]=(0,Q.useState)(!1),s=(0,Q.useRef)(null),c=typeof window<`u`?window.okDesktop:void 0,l;t[0]!==i||t[1]!==n?(l=n instanceof Error&&n.message?n.message:i({id:`W5A0Ly`}),t[0]=i,t[1]=n,t[2]=l):l=t[2];let u=l,d,f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{s.current?.focus()},f=[],t[3]=d,t[4]=f):(d=t[3],f=t[4]),(0,Q.useEffect)(d,f);let p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(Xp,{size:80,variant:`sleeping`}),t[5]=p):p=t[5];let m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(`h1`,{id:`app-error-title`,className:`text-2xl font-light tracking-tighter text-balance`,children:(0,Z.jsx)(q,{id:`nwtY4N`})}),t[6]=m):m=t[6];let h;t[7]===u?h=t[8]:(h=(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[m,(0,Z.jsx)(`p`,{className:`max-w-sm text-sm break-words text-muted-foreground`,children:u})]}),t[7]=u,t[8]=h);let g;t[9]===r?g=t[10]:(g=()=>r(),t[9]=r,t[10]=g);let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(q,{id:`KDw4GX`}),t[11]=_):_=t[11];let v;t[12]===g?v=t[13]:(v=(0,Z.jsx)(Y,{ref:s,variant:`default`,onClick:g,children:_}),t[12]=g,t[13]=v);let y;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(y=c?(0,Z.jsx)(Y,{variant:`ghost`,className:`font-mono uppercase`,onClick:()=>o(!0),children:(0,Z.jsx)(q,{id:`ii5mVn`})}):null,t[14]=y):y=t[14];let b;t[15]===v?b=t[16]:(b=(0,Z.jsxs)(`div`,{className:`mt-1 flex gap-2`,children:[v,y]}),t[15]=v,t[16]=b);let x;t[17]!==n||t[18]!==a?(x=c?(0,Z.jsx)(oh,{children:(0,Z.jsx)(am,{open:a,onOpenChange:o,systemWide:c.config.mode===`navigator`,crashContext:{source:`app shell`,errorMessage:n instanceof Error&&n.message?n.message:String(n)}})}):null,t[17]=n,t[18]=a,t[19]=x):x=t[19];let S;return t[20]!==b||t[21]!==x||t[22]!==h?(S=(0,Z.jsxs)(`div`,{role:`alert`,"aria-labelledby":`app-error-title`,"data-slot":`app-error-boundary`,className:`flex h-screen flex-col items-center justify-center gap-8 p-8 text-center`,children:[p,h,b,x]}),t[20]=b,t[21]=x,t[22]=h,t[23]=S):S=t[23],S}function ih(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(Jt,{FallbackComponent:rh,onError:ah,children:n}),t[0]=n,t[1]=r),r}function ah(e){console.error(`[AppErrorBoundary] app-shell render crash`,e)}function oh(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(Jt,{fallback:null,onError:sh,children:n}),t[0]=n,t[1]=r),r}function sh(e){console.error(`[CrashReportingBoundary] crash-reporting UI render crash`,e)}function ch(){let e=(0,$.c)(5),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`acp-catalog`],queryFn:dh,staleTime:3e5},e[0]=t):t=e[0];let n=Mt(t),r;e[1]===n.data?.agents?r=e[2]:(r=()=>(ii(ci(n.data?.agents??[]).map(uh)),lh),e[1]=n.data?.agents,e[2]=r);let i;return e[3]===n.data?i=e[4]:(i=[n.data],e[3]=n.data,e[4]=i),(0,Q.useEffect)(r,i),null}function lh(){return ii([])}function uh(e){return{source:e.source,id:e.id,name:e.name,...e.iconUrl===void 0?{}:{iconUrl:e.iconUrl}}}function dh(e){let{signal:t}=e;return oi(t)}var fh=Xt(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),ph=Xt(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),mh=Xt(`bird`,[[`path`,{d:`M16 7h.01`,key:`1kdx03`}],[`path`,{d:`M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20`,key:`oj1oa8`}],[`path`,{d:`m20 7 2 .5-2 .5`,key:`12nv4d`}],[`path`,{d:`M10 18v3`,key:`1yea0a`}],[`path`,{d:`M14 17.75V21`,key:`1pymcb`}],[`path`,{d:`M7 18a6 6 0 0 0 3.84-10.61`,key:`1npnn0`}]]),hh=Xt(`blocks`,[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]),gh=Xt(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),_h=Xt(`book-marked`,[[`path`,{d:`M10 2v8l3-3 3 3V2`,key:`sqw3rj`}],[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),vh=Xt(`cat`,[[`path`,{d:`M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z`,key:`x6xyqk`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M11.25 16.25h1.5L12 17l-.75-.75Z`,key:`12kq1m`}]]),yh=Xt(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),bh=Xt(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),xh=Xt(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Sh=Xt(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),Ch=Xt(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),wh=Xt(`dog`,[[`path`,{d:`M11.25 16.25h1.5L12 17z`,key:`w7jh35`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309`,key:`u7s9ue`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5`,key:`v8hric`}]]),Th=Xt(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Eh=Xt(`file-check`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]),Dh=Xt(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),Oh=Xt(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),kh=Xt(`file-exclamation-point`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Ah=Xt(`file-key`,[[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M4 12v6`,key:`bg1pfk`}],[`path`,{d:`M4 14h2`,key:`1sf9f8`}],[`path`,{d:`M9.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v4`,key:`d56i0q`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),jh=Xt(`fish`,[[`path`,{d:`M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z`,key:`15baut`}],[`path`,{d:`M18 12v.5`,key:`18hhni`}],[`path`,{d:`M16 17.93a9.77 9.77 0 0 1 0-11.86`,key:`16dt7o`}],[`path`,{d:`M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33`,key:`l9di03`}],[`path`,{d:`M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4`,key:`1kjonw`}],[`path`,{d:`m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98`,key:`1zlm23`}]]),Mh=Xt(`fold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3-3-3 3`,key:`e37ymu`}],[`path`,{d:`m15 5-3 3-3-3`,key:`19d6lf`}]]),Nh=Xt(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),Ph=Xt(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Fh=Xt(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Ih=Xt(`grid-2x2-x`,[[`path`,{d:`M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3`,key:`11za1p`}],[`path`,{d:`m16 16 5 5`,key:`8tpb07`}],[`path`,{d:`m16 21 5-5`,key:`193jll`}]]),Lh=Xt(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),Rh=Xt(`hexagon`,[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}]]),zh=Xt(`highlighter`,[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]),Bh=Xt(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),Vh=Xt(`library`,[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]),Hh=Xt(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),Uh=Xt(`list-collapse`,[[`path`,{d:`M10 5h11`,key:`1hkqpe`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 19h11`,key:`14g2nv`}],[`path`,{d:`m3 10 3-3-3-3`,key:`i7pm08`}],[`path`,{d:`m3 20 3-3-3-3`,key:`20gx1n`}]]),Wh=Xt(`list-plus`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]),Gh=Xt(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),Kh=Xt(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),qh=Xt(`megaphone`,[[`path`,{d:`M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z`,key:`q8bfy3`}],[`path`,{d:`M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14`,key:`1853fq`}],[`path`,{d:`M8 6v8`,key:`15ugcq`}]]),Jh=Xt(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),Yh=Xt(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Xh=Xt(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`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`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Zh=Xt(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),Qh=Xt(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),$h=Xt(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),eg=Xt(`pilcrow`,[[`path`,{d:`M13 4v16`,key:`8vvj80`}],[`path`,{d:`M17 4v16`,key:`7dpous`}],[`path`,{d:`M19 4H9.5a4.5 4.5 0 0 0 0 9H13`,key:`sh4n9v`}]]),tg=Xt(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),ng=Xt(`rabbit`,[[`path`,{d:`M13 16a3 3 0 0 1 2.24 5`,key:`1epib5`}],[`path`,{d:`M18 12h.01`,key:`yjnet6`}],[`path`,{d:`M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3`,key:`ue9ozu`}],[`path`,{d:`M20 8.54V4a2 2 0 1 0-4 0v3`,key:`49iql8`}],[`path`,{d:`M7.612 12.524a3 3 0 1 0-1.6 4.3`,key:`1e33i0`}]]),rg=Xt(`rat`,[[`path`,{d:`M13 22H4a2 2 0 0 1 0-4h12`,key:`bt3f23`}],[`path`,{d:`M13.236 18a3 3 0 0 0-2.2-5`,key:`1tbvmo`}],[`path`,{d:`M16 9h.01`,key:`1bdo4e`}],[`path`,{d:`M16.82 3.94a3 3 0 1 1 3.237 4.868l1.815 2.587a1.5 1.5 0 0 1-1.5 2.1l-2.872-.453a3 3 0 0 0-3.5 3`,key:`9ch7kn`}],[`path`,{d:`M17 4.988a3 3 0 1 0-5.2 2.052A7 7 0 0 0 4 14.015 4 4 0 0 0 8 18`,key:`3s7e9i`}]]),ig=Xt(`replace-all`,[[`path`,{d:`M14 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`zg1ipl`}],[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M19 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`txt6k4`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),ag=Xt(`replace`,[[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),og=Xt(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),sg=Xt(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),cg=Xt(`shrimp`,[[`path`,{d:`M11 12h.01`,key:`1lr4k6`}],[`path`,{d:`M13 22c.5-.5 1.12-1 2.5-1-1.38 0-2-.5-2.5-1`,key:`fatpdi`}],[`path`,{d:`M14 2a3.28 3.28 0 0 1-3.227 1.798l-6.17-.561A2.387 2.387 0 1 0 4.387 8H15.5a1 1 0 0 1 0 13 1 1 0 0 0 0-5H12a7 7 0 0 1-7-7V8`,key:`kehrqe`}],[`path`,{d:`M14 8a8.5 8.5 0 0 1 0 8`,key:`1imjx2`}],[`path`,{d:`M16 16c2 0 4.5-4 4-6`,key:`z0nejz`}]]),lg=Xt(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),ug=Xt(`spell-check`,[[`path`,{d:`m6 16 6-12 6 12`,key:`1b4byz`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`m16 20 2 2 4-4`,key:`13tcca`}]]),dg=Xt(`square-code`,[[`path`,{d:`m10 9-3 3 3 3`,key:`1oro0q`}],[`path`,{d:`m14 15 3-3-3-3`,key:`bz13h7`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),fg=Xt(`squirrel`,[[`path`,{d:`M15.236 22a3 3 0 0 0-2.2-5`,key:`21bitc`}],[`path`,{d:`M16 20a3 3 0 0 1 3-3h1a2 2 0 0 0 2-2v-2a4 4 0 0 0-4-4V4`,key:`oh0fg0`}],[`path`,{d:`M18 13h.01`,key:`9veqaj`}],[`path`,{d:`M18 6a4 4 0 0 0-4 4 7 7 0 0 0-7 7c0-5 4-5 4-10.5a4.5 4.5 0 1 0-9 0 2.5 2.5 0 0 0 5 0C7 10 3 11 3 17c0 2.8 2.2 5 5 5h10`,key:`980v8a`}]]),pg=Xt(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),mg=Xt(`sticky-note`,[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]),hg=Xt(`strikethrough`,[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),gg=Xt(`table-properties`,[[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),_g=Xt(`telescope`,[[`path`,{d:`m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44`,key:`k4qptu`}],[`path`,{d:`m13.56 11.747 4.332-.924`,key:`19l80z`}],[`path`,{d:`m16 21-3.105-6.21`,key:`7oh9d`}],[`path`,{d:`M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z`,key:`m7xp4m`}],[`path`,{d:`m6.158 8.633 1.114 4.456`,key:`74o979`}],[`path`,{d:`m8 21 3.105-6.21`,key:`1fvxut`}],[`circle`,{cx:`12`,cy:`13`,r:`2`,key:`1c1ljs`}]]),vg=Xt(`text-align-center`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M17 12H7`,key:`16if0g`}],[`path`,{d:`M19 19H5`,key:`vjpgq2`}]]),yg=Xt(`text-align-end`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M21 19H7`,key:`4cu937`}]]),bg=Xt(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),xg=Xt(`text-quote`,[[`path`,{d:`M17 5H3`,key:`1cn7zz`}],[`path`,{d:`M21 12H8`,key:`scolzb`}],[`path`,{d:`M21 19H8`,key:`13qgcb`}],[`path`,{d:`M3 12v7`,key:`1ri8j3`}]]),Sg=Xt(`thumbs-down`,[[`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`,key:`m61m77`}],[`path`,{d:`M17 14V2`,key:`8ymqnk`}]]),Cg=Xt(`thumbs-up`,[[`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`,key:`emmmcr`}],[`path`,{d:`M7 10v12`,key:`1qc93n`}]]),wg=Xt(`turtle`,[[`path`,{d:`m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z`,key:`1lbbv7`}],[`path`,{d:`M4.82 7.9 8 10`,key:`m9wose`}],[`path`,{d:`M15.18 7.9 12 10`,key:`p8dp2u`}],[`path`,{d:`M16.93 10H20a2 2 0 0 1 0 4H2`,key:`12nsm7`}]]),Tg=Xt(`underline`,[[`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`,key:`9kb039`}],[`line`,{x1:`4`,x2:`20`,y1:`20`,y2:`20`,key:`nun2al`}]]),Eg=Xt(`unfold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m15 5-3-3-3 3`,key:`itvq4r`}]]),Dg=Xt(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Og=Xt(`whole-word`,[[`circle`,{cx:`7`,cy:`12`,r:`3`,key:`12clwm`}],[`path`,{d:`M10 9v6`,key:`17i7lo`}],[`circle`,{cx:`17`,cy:`12`,r:`3`,key:`gl7c2s`}],[`path`,{d:`M14 7v8`,key:`dl84cr`}],[`path`,{d:`M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1`,key:`lt2kga`}]]),kg=180,Ag=5e3;function jg(e,t){if(e===``||t===``)return``;let n=e.includes(`\\`)&&!e.includes(`/`)?`\\`:`/`;return`${e.replace(/[/\\]+$/,``)}${n}${t}`}function Mg(e){if(e===``)return``;let t=e.split(/[/\\]/).filter(Boolean);return t.length>0?t[t.length-1]??e:e}function Ng(e){let{parent:t,sanitizedName:n,enclosingProject:r,enclosingGit:i,targetState:a}=e;return t===``||n===``?{kind:`idle`}:r===null?i===null?a===`exists-nonempty`?{kind:`block-nonempty`}:{kind:`free`}:{kind:`confirm-git`,gitRoot:i.gitRoot}:{kind:`block-nested`,rootPath:r.rootPath}}function Pg(e){let t=e instanceof Error?e.message:String(e);for(let e of io)if(t.startsWith(`${e}:`)||t.includes(`${e}: `))return e===`nested-project`||e===`target-not-empty`?{reason:e}:{reason:e,message:t};return{reason:`unknown`,message:t}}function Fg(e){switch(e.reason){case`nested-project`:return{id:`ScwcF2`};case`target-not-empty`:return{id:`e8L17t`};case`invalid-args`:return{id:`6bTTAN`};case`mkdir-failed`:return{id:`gJR87V`};case`git-init-failed`:return{id:`4CfgPM`};case`init-failed`:return{id:`l17ab4`};case`discovery-failed`:return{id:`ThmUrC`};case`unknown`:return{id:`AddR83`}}}function Ig(e){let t=(0,$.c)(186),{open:n,onOpenChange:r,bridge:i,initialPackId:a,packs:o}=e,{_:s}=ht(),c=(0,Q.useId)(),l=(0,Q.useId)(),u=(0,Q.useId)(),d=(0,Q.useId)(),[f,p]=(0,Q.useState)(``),[m,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(Ug),[b,x]=(0,Q.useState)(`shared`),[S,C]=(0,Q.useState)(!1),w;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(w={kind:`idle`},t[0]=w):w=t[0];let[T,E]=(0,Q.useState)(w),[D,O]=(0,Q.useState)(`idle`),[k,A]=(0,Q.useState)(!1),[j,M]=(0,Q.useState)(null),N;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(N={kind:`idle`},t[1]=N):N=t[1];let[P,F]=(0,Q.useState)(N),[I,L]=(0,Q.useState)(0),R;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(R=new Set,t[2]=R):R=t[2];let z=(0,Q.useRef)(R),B=(0,Q.useRef)(null),V=(0,Q.useRef)(null),H=(0,Q.useRef)(null),U=(0,Q.useRef)(0),W,G;t[3]!==i||t[4]!==n?(W=()=>{if(!n)return;z.current.clear(),M(null),E({kind:`idle`}),O(`idle`),A(!1),_(``),y(new Set(Ja)),x(`shared`),C(!1),F({kind:`idle`}),U.current+=1;let e=!1;p(``),h(!0),i.fs.defaultProjectsRoot().then(t=>{e||p(t)}).catch(Hg).finally(()=>{e||h(!1)});let t=requestAnimationFrame(()=>{H.current?.focus()});return()=>{e=!0,cancelAnimationFrame(t)}},G=[n,i],t[3]=i,t[4]=n,t[5]=W,t[6]=G):(W=t[5],G=t[6]),(0,Q.useEffect)(W,G);let K;t[7]!==i||t[8]!==f||t[9]!==g||t[10]!==n?(K=()=>{if(!n)return;V.current!==null&&clearTimeout(V.current),B.current!==null&&B.current.abort();let e=Pi(g);if(f===``||e===``){E({kind:`idle`}),O(`idle`);return}let t=f,r=jg(t,e),a=new AbortController;return B.current=a,V.current=setTimeout(()=>{O(`in-flight`),Promise.all([i.fs.findEnclosingProjectRoot(t),i.fs.findEnclosingGitRoot(t),i.fs.folderState(r)]).then(n=>{let[r,i,o]=n;a.signal.aborted||(O(`idle`),E(Ng({parent:t,sanitizedName:e,enclosingProject:r,enclosingGit:i,targetState:o})))}).catch(e=>{a.signal.aborted||(console.warn(`[CreateProjectDialog] cascade probe failed:`,e),O(`idle`),E({kind:`free`}))})},kg),()=>{V.current!==null&&clearTimeout(V.current),a.abort()}},t[7]=i,t[8]=f,t[9]=g,t[10]=n,t[11]=K):K=t[11];let ee;t[12]!==i||t[13]!==f||t[14]!==g||t[15]!==n||t[16]!==I?(ee=[n,f,g,i,I],t[12]=i,t[13]=f,t[14]=g,t[15]=n,t[16]=I,t[17]=ee):ee=t[17],(0,Q.useEffect)(K,ee);let te,ne;t[18]===n?(te=t[19],ne=t[20]):(te=()=>{if(!n)return;let e=()=>L(Vg);return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},ne=[n],t[18]=n,t[19]=te,t[20]=ne),(0,Q.useEffect)(te,ne);let re=(0,Q.useRef)(`idle`),ie,ae;t[21]===D?(ie=t[22],ae=t[23]):(ie=()=>{re.current=D},ae=[D],t[21]=D,t[22]=ie,t[23]=ae),(0,Q.useEffect)(ie,ae);let oe,se;t[24]!==T.kind||t[25]!==n?(oe=()=>{if(!n||T.kind!==`confirm-git`)return;let e=setInterval(()=>{re.current!==`in-flight`&&L(Bg)},Ag);return()=>clearInterval(e)},se=[n,T.kind],t[24]=T.kind,t[25]=n,t[26]=oe,t[27]=se):(oe=t[26],se=t[27]),(0,Q.useEffect)(oe,se);let ce;t[28]!==T.gitRoot||t[29]!==T.kind||t[30]!==P.gitRoot||t[31]!==P.kind?(ce=()=>{if(T.kind!==`confirm-git`){P.kind!==`idle`&&(U.current+=1,F({kind:`idle`}));return}P.kind===`confirming`&&P.gitRoot!==T.gitRoot&&F({kind:`idle`}),P.kind===`pending`&&P.gitRoot!==T.gitRoot&&(U.current+=1,F({kind:`idle`}))},t[28]=T.gitRoot,t[29]=T.kind,t[30]=P.gitRoot,t[31]=P.kind,t[32]=ce):ce=t[32];let le;t[33]!==T||t[34]!==P?(le=[T,P],t[33]=T,t[34]=P,t[35]=le):le=t[35],(0,Q.useEffect)(ce,le);let ue;t[36]!==i||t[37]!==T.kind||t[38]!==n?(ue=()=>{if(!n)return;let e=null;T.kind===`block-nested`?e=`nested`:T.kind===`block-nonempty`?e=`nonempty`:T.kind===`confirm-git`&&(e=`git-confirm`),e!==null&&(z.current.has(e)||(z.current.add(e),i.project.recordCreateNewBannerShown(e).catch(zg)))},t[36]=i,t[37]=T.kind,t[38]=n,t[39]=ue):ue=t[39];let de;t[40]!==i||t[41]!==T||t[42]!==n?(de=[n,T,i],t[40]=i,t[41]=T,t[42]=n,t[43]=de):de=t[43],(0,Q.useEffect)(ue,de);let fe;t[44]!==a||t[45]!==o?(fe=o?.find(e=>e.id===a),t[44]=a,t[45]=o,t[46]=fe):fe=t[46];let pe=fe,me=g,he,ge,_e,ve,ye;t[47]!==T.kind||t[48]!==f||t[49]!==me?(ve=me===``?``:Pi(me),ge=me!==``&&ve!==me&&ve!==``,_e=me!==``&&ve===``,he=T.kind===`block-nonempty`,ye=f!==``&&ve!==``?jg(f,ve):``,t[47]=T.kind,t[48]=f,t[49]=me,t[50]=he,t[51]=ge,t[52]=_e,t[53]=ve,t[54]=ye):(he=t[50],ge=t[51],_e=t[52],ve=t[53],ye=t[54]);let be=ye,xe=!k&&f!==``&&me!==``&&ve!==``&&D===`idle`&&(T.kind===`free`||T.kind===`confirm-git`),Se=k||me!==``&&!xe,Ce;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=function(e){y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[55]=Ce):Ce=t[55];let we=Ce,Te;t[56]!==i||t[57]!==f?(Te=async function(){try{let e=await i.dialog.openFolder(f===``?void 0:{defaultPath:f});if(e===null)return;p(e),L(Rg),M(null)}catch(e){console.warn(`[CreateProjectDialog] dialog.openFolder failed:`,e)}},t[56]=i,t[57]=f,t[58]=Te):Te=t[58];let Ee=Te,De;t[59]!==s||t[60]!==i||t[61]!==k||t[62]!==xe||t[63]!==v||t[64]!==a||t[65]!==f||t[66]!==r||t[67]!==me||t[68]!==ve||t[69]!==b?(De=async function(e){if(e.preventDefault(),!k){if(me.trim()===``){X.error(s({id:`5OqaJi`})),H.current?.focus();return}if(xe){A(!0),M(null);try{await i.project.createNew({parent:f,name:ve,editors:Array.from(v),sharing:b,packId:a}),r(!1)}catch(e){M(Pg(e)),A(!1)}}}},t[59]=s,t[60]=i,t[61]=k,t[62]=xe,t[63]=v,t[64]=a,t[65]=f,t[66]=r,t[67]=me,t[68]=ve,t[69]=b,t[70]=De):De=t[70];let Oe=De,ke;t[71]!==k||t[72]!==r?(ke=function(e){k||r(e)},t[71]=k,t[72]=r,t[73]=ke):ke=t[73];let Ae=ke,je;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(je=async function(e){F({kind:`confirming`,gitRoot:e})},t[74]=je):je=t[74];let Me=je,Ne;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=async function(){F({kind:`idle`})},t[75]=Ne):Ne=t[75];let Pe=Ne,Fe;t[76]===i?Fe=t[77]:(Fe=async function(e){let t=U.current+1;U.current=t,F({kind:`pending`,gitRoot:e});try{if(await i.fs.removeGitFolder(e),U.current!==t)return;L(Lg),F({kind:`idle`})}catch(e){let n=e;if(U.current!==t)return;let r=n instanceof Error?n.message:String(n);console.error(`[CreateProjectDialog] bridge.fs.removeGitFolder failed:`,n),F({kind:`error`,message:r})}},t[76]=i,t[77]=Fe);let Ie=Fe,Le;t[78]!==i||t[79]!==r?(Le=async function(e){r(!1);try{await i.project.open({path:e,target:`new-window`,entryPoint:`create-new-nested-redirect`})}catch(e){console.warn(`[CreateProjectDialog] project.open failed:`,e)}},t[78]=i,t[79]=r,t[80]=Le):Le=t[80];let Re=Le,ze=_e||he||ge?`${u} ${d}`:u,Be;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,Z.jsx)(pn,{children:(0,Z.jsx)(q,{id:`wbv9xO`})}),t[81]=Be):Be=t[81];let Ve;t[82]===pe?Ve=t[83]:(Ve=(0,Z.jsxs)(_n,{children:[Be,(0,Z.jsx)(fn,{children:pe?(0,Z.jsx)(q,{id:`D2CwBE`,values:{0:pe.name,1:pe.entryCounts.folders},components:{0:(0,Z.jsx)(`strong`,{})}}):(0,Z.jsx)(q,{id:`O6yEPk`})})]}),t[82]=pe,t[83]=Ve);let He;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,Z.jsx)(q,{id:`OyIC0Q`}),t[84]=He):He=t[84];let Ue;t[85]===l?Ue=t[86]:(Ue=(0,Z.jsx)(Fr,{htmlFor:l,children:He}),t[85]=l,t[86]=Ue);let We;t[87]===s?We=t[88]:(We=s({id:`cV7LOw`}),t[87]=s,t[88]=We);let Ge;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=e=>_(e.target.value),t[89]=Ge):Ge=t[89];let Ke=_e||he,qe;t[90]!==k||t[91]!==g||t[92]!==ze||t[93]!==l||t[94]!==We||t[95]!==Ke?(qe=(0,Z.jsx)(vl,{id:l,ref:H,value:g,placeholder:We,onChange:Ge,disabled:k,autoComplete:`off`,"aria-invalid":Ke,"aria-describedby":ze,"data-testid":`create-name`}),t[90]=k,t[91]=g,t[92]=ze,t[93]=l,t[94]=We,t[95]=Ke,t[96]=qe):qe=t[96];let Je;t[97]!==d||t[98]!==he||t[99]!==ge||t[100]!==_e||t[101]!==ve?(Je=_e?(0,Z.jsx)(`p`,{id:d,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-name-error-erased`,children:(0,Z.jsx)(q,{id:`_PBJRl`})}):he?(0,Z.jsx)(`p`,{id:d,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-name-error-taken`,children:(0,Z.jsx)(q,{id:`7apDiJ`,values:{sanitized:ve},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):ge?(0,Z.jsx)(`p`,{id:d,role:`status`,"aria-live":`polite`,className:`text-1sm text-muted-foreground`,"data-testid":`create-name-hint-diverged`,children:(0,Z.jsx)(q,{id:`KnoB--`,values:{sanitized:ve},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):null,t[97]=d,t[98]=he,t[99]=ge,t[100]=_e,t[101]=ve,t[102]=Je):Je=t[102];let Ye;t[103]!==Ue||t[104]!==qe||t[105]!==Je?(Ye=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Ue,qe,Je]}),t[103]=Ue,t[104]=qe,t[105]=Je,t[106]=Ye):Ye=t[106];let Xe;t[107]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,Z.jsx)(Fr,{children:(0,Z.jsx)(q,{id:`wJijgU`})}),t[107]=Xe):Xe=t[107];let Ze;t[108]!==f||t[109]!==m?(Ze=f===``?m?(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(q,{id:`iHAJDj`})}):(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(q,{id:`8m8diM`})}):f,t[108]=f,t[109]=m,t[110]=Ze):Ze=t[110];let Qe;t[111]===Ze?Qe=t[112]:(Qe=(0,Z.jsx)(`div`,{className:`min-w-0 flex-1 rounded-md border border-input bg-muted/50 px-2.5 py-1 text-sm text-foreground wrap-break-word`,"data-testid":`create-location-display`,children:Ze}),t[111]=Ze,t[112]=Qe);let $e;t[113]===Ee?$e=t[114]:($e=()=>void Ee(),t[113]=Ee,t[114]=$e);let et;t[115]===Symbol.for(`react.memo_cache_sentinel`)?(et=(0,Z.jsx)(q,{id:`O2UpM1`}),t[115]=et):et=t[115];let tt;t[116]!==k||t[117]!==$e?(tt=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,className:`shrink-0`,disabled:k,onClick:$e,"data-testid":`create-browse`,children:et}),t[116]=k,t[117]=$e,t[118]=tt):tt=t[118];let nt;t[119]!==Qe||t[120]!==tt?(nt=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[Qe,tt]}),t[119]=Qe,t[120]=tt,t[121]=nt):nt=t[121];let rt;t[122]===be?rt=t[123]:(rt=be===``?null:(0,Z.jsx)(q,{id:`k_yIIc`,values:{targetPreview:be},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}}),t[122]=be,t[123]=rt);let it;t[124]!==u||t[125]!==rt?(it=(0,Z.jsx)(`p`,{id:u,className:`text-1sm text-muted-foreground wrap-break-word`,"aria-live":`polite`,"data-testid":`create-target-caption`,children:rt}),t[124]=u,t[125]=rt,t[126]=it):it=t[126];let at;t[127]!==nt||t[128]!==it?(at=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Xe,nt,it]}),t[127]=nt,t[128]=it,t[129]=at):at=t[129];let ot;t[130]!==T||t[131]!==Ie||t[132]!==Re||t[133]!==P?(ot=(0,Z.jsx)(Wg,{cascade:T,onOpenNested:Re,removeGitState:P,onRequestRemoveGit:Me,onCancelRemoveGit:Pe,onConfirmRemoveGit:Ie}),t[130]=T,t[131]=Ie,t[132]=Re,t[133]=P,t[134]=ot):ot=t[134];let st;t[135]===Symbol.for(`react.memo_cache_sentinel`)?(st=(0,Z.jsxs)(un,{className:`group flex w-full items-center justify-between gap-2 px-3 py-2 text-sm font-medium hover:bg-muted/50`,"data-testid":`create-advanced-trigger`,children:[(0,Z.jsx)(q,{id:`VNgKZz`}),(0,Z.jsx)(Ro,{className:`size-4 transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`,"aria-hidden":!0})]}),t[135]=st):st=t[135];let ct;t[136]===Symbol.for(`react.memo_cache_sentinel`)?(ct=(0,Z.jsx)(`legend`,{className:`text-sm font-medium`,children:(0,Z.jsx)(q,{id:`0YEbfk`})}),t[136]=ct):ct=t[136];let lt;t[137]===Symbol.for(`react.memo_cache_sentinel`)?(lt=(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`8IP5jY`})}),t[137]=lt):lt=t[137];let ut;t[138]!==k||t[139]!==v?(ut=Ja.map(e=>{let t=`create-editor-${e}`;return(0,Z.jsxs)(Fr,{htmlFor:t,className:`text-sm font-normal`,children:[(0,Z.jsx)(Yn,{id:t,checked:v.has(e),onCheckedChange:()=>we(e),disabled:k,"data-testid":`create-editor-${e}`}),(0,Z.jsx)(`span`,{children:Wi[e]})]},e)}),t[138]=k,t[139]=v,t[140]=ut):ut=t[140];let dt;t[141]===ut?dt=t[142]:(dt=(0,Z.jsxs)(`fieldset`,{className:`flex flex-col space-y-2 pb-2`,children:[ct,lt,ut]}),t[141]=ut,t[142]=dt);let ft;t[143]!==k||t[144]!==b?(ft=(0,Z.jsx)(ml,{idPrefix:`create`,testIdPrefix:`create-sharing`,value:b,onValueChange:x,disabled:k}),t[143]=k,t[144]=b,t[145]=ft):ft=t[145];let pt;t[146]!==dt||t[147]!==ft?(pt=(0,Z.jsxs)(ln,{className:`space-y-6 border-t border-border px-3 py-4`,children:[dt,ft]}),t[146]=dt,t[147]=ft,t[148]=pt):pt=t[148];let mt;t[149]!==S||t[150]!==pt?(mt=(0,Z.jsxs)(dn,{open:S,onOpenChange:C,className:`rounded-md border border-border`,"data-testid":`create-advanced`,children:[st,pt]}),t[149]=S,t[150]=pt,t[151]=mt):mt=t[151];let gt;t[152]!==s||t[153]!==j?(gt=j===null?null:(0,Z.jsx)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-submit-error`,children:s(Fg(j))}),t[152]=s,t[153]=j,t[154]=gt):gt=t[154];let _t;t[155]!==c||t[156]!==Oe||t[157]!==Ye||t[158]!==at||t[159]!==ot||t[160]!==mt||t[161]!==gt?(_t=(0,Z.jsx)(hn,{className:`space-y-6`,children:(0,Z.jsxs)(`form`,{id:c,onSubmit:Oe,"data-testid":`create-project-form`,className:`space-y-6`,children:[Ye,at,ot,mt,gt]})}),t[155]=c,t[156]=Oe,t[157]=Ye,t[158]=at,t[159]=ot,t[160]=mt,t[161]=gt,t[162]=_t):_t=t[162];let vt;t[163]===r?vt=t[164]:(vt=()=>r(!1),t[163]=r,t[164]=vt);let yt;t[165]===Symbol.for(`react.memo_cache_sentinel`)?(yt=(0,Z.jsx)(q,{id:`dEgA5A`}),t[165]=yt):yt=t[165];let bt;t[166]!==k||t[167]!==vt?(bt=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,className:`font-mono uppercase`,onClick:vt,disabled:k,"data-testid":`create-cancel`,children:yt}),t[166]=k,t[167]=vt,t[168]=bt):bt=t[168];let xt;t[169]===k?xt=t[170]:(xt=k?(0,Z.jsx)(q,{id:`E9bKSA`}):(0,Z.jsx)(q,{id:`hYgDIe`}),t[169]=k,t[170]=xt);let St;t[171]!==c||t[172]!==Se||t[173]!==xt?(St=(0,Z.jsx)(Y,{type:`submit`,form:c,disabled:Se,"data-testid":`create-submit`,children:xt}),t[171]=c,t[172]=Se,t[173]=xt,t[174]=St):St=t[174];let Ct;t[175]!==bt||t[176]!==St?(Ct=(0,Z.jsxs)(gn,{children:[bt,St]}),t[175]=bt,t[176]=St,t[177]=Ct):Ct=t[177];let wt;t[178]!==Ve||t[179]!==_t||t[180]!==Ct?(wt=(0,Z.jsxs)(mn,{className:`sm:max-w-lg`,"data-testid":`create-project-dialog`,children:[Ve,_t,Ct]}),t[178]=Ve,t[179]=_t,t[180]=Ct,t[181]=wt):wt=t[181];let Tt;return t[182]!==Ae||t[183]!==n||t[184]!==wt?(Tt=(0,Z.jsx)(vn,{open:n,onOpenChange:Ae,children:wt}),t[182]=Ae,t[183]=n,t[184]=wt,t[185]=Tt):Tt=t[185],Tt}function Lg(e){return e+1}function Rg(e){return e+1}function zg(){}function Bg(e){return e+1}function Vg(e){return e+1}function Hg(e){console.warn(`[CreateProjectDialog] defaultProjectsRoot probe failed:`,e)}function Ug(){return new Set(Ja)}function Wg(e){let t=(0,$.c)(37),{cascade:n,onOpenNested:r,removeGitState:i,onRequestRemoveGit:a,onCancelRemoveGit:o,onConfirmRemoveGit:s}=e;if(n.kind===`idle`||n.kind===`free`||n.kind===`block-nonempty`)return null;if(n.kind===`block-nested`){let{rootPath:e}=n,i;t[0]===e?i=t[1]:(i=Mg(e),t[0]=e,t[1]=i);let a=i,o;t[2]===e?o=t[3]:(o={rootPath:e},t[2]=e,t[3]=o);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})},t[4]=s):s=t[4];let c;t[5]===o?c=t[6]:(c=(0,Z.jsx)(`p`,{className:`mb-2`,children:(0,Z.jsx)(q,{id:`W7XJN4`,values:o,components:s})}),t[5]=o,t[6]=c);let l;t[7]!==r||t[8]!==e?(l=()=>r(e),t[7]=r,t[8]=e,t[9]=l):l=t[9];let u;t[10]===a?u=t[11]:(u=(0,Z.jsx)(q,{id:`1Ta7Fd`,values:{basename:a}}),t[10]=a,t[11]=u);let d;t[12]!==l||t[13]!==u?(d=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:l,"data-testid":`create-banner-nested-open`,children:u}),t[12]=l,t[13]=u,t[14]=d):d=t[14];let f;return t[15]!==c||t[16]!==d?(f=(0,Z.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-banner-nested`,children:[c,d]}),t[15]=c,t[16]=d,t[17]=f):f=t[17],f}if(n.kind===`confirm-git`){let{gitRoot:e}=n,r;if(t[18]!==e){let n;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(n=/\/+$/,t[20]=n):n=t[20],r=e.replace(n,``),t[18]=e,t[19]=r}else r=t[19];let c=`${r}/.git`,l=i.kind===`error`?i.message:null,u;t[21]===e?u=t[22]:(u={gitRoot:e},t[21]=e,t[22]=u);let d;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(d={0:(0,Z.jsx)(`code`,{}),1:(0,Z.jsx)(`code`,{})},t[23]=d):d=t[23];let f;t[24]===u?f=t[25]:(f=(0,Z.jsx)(`p`,{children:(0,Z.jsx)(q,{id:`FEK4oC`,values:u,components:d})}),t[24]=u,t[25]=f);let p;t[26]!==e||t[27]!==o||t[28]!==s||t[29]!==a||t[30]!==l||t[31]!==i.kind||t[32]!==c?(p=i.kind===`idle`||i.kind===`error`?(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-1`,children:[(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>a(e),"data-testid":`create-banner-git-remove`,children:(0,Z.jsx)(q,{id:`YTLmTM`,components:{0:(0,Z.jsx)(`code`,{})}})}),i.kind===`error`?(0,Z.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,"data-testid":`create-banner-git-remove-error`,children:(0,Z.jsx)(q,{id:`SkMZlS`,values:{targetGitPath:c,removeGitError:l},components:{0:(0,Z.jsx)(`code`,{})}})}):null]}):(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 rounded border border-blue-400/60 bg-white/40 p-2 dark:border-blue-600/60 dark:bg-black/20`,"data-testid":`create-banner-git-remove-confirm`,children:[(0,Z.jsx)(`p`,{className:`text-xs`,children:(0,Z.jsx)(q,{id:`WZ-vBy`,values:{targetGitPath:c},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Z.jsx)(Y,{type:`button`,variant:`destructive`,size:`sm`,disabled:i.kind===`pending`,onClick:()=>s(e),"data-testid":`create-banner-git-remove-confirm-button`,children:i.kind===`pending`?(0,Z.jsx)(q,{id:`0-31GV`}):(0,Z.jsx)(q,{id:`v-h2hx`,values:{targetGitPath:c}})}),(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`sm`,disabled:i.kind===`pending`,onClick:o,"data-testid":`create-banner-git-remove-cancel`,children:(0,Z.jsx)(q,{id:`dEgA5A`})})]})]}),t[26]=e,t[27]=o,t[28]=s,t[29]=a,t[30]=l,t[31]=i.kind,t[32]=c,t[33]=p):p=t[33];let m;return t[34]!==f||t[35]!==p?(m=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded-md border border-blue-300 bg-blue-50 px-3 py-2 text-sm text-blue-900 dark:border-blue-700 dark:bg-blue-950 dark:text-blue-200`,"data-testid":`create-banner-git-confirm`,children:[f,p]}),t[34]=f,t[35]=p,t[36]=m):m=t[36],m}return null}var Gg=`open-knowledge:doc-panel-tab`,Kg=null;function qg(){let e=Kg;return Kg=null,e}function Jg(e,t=typeof window>`u`?new EventTarget:window){Kg=e,t.dispatchEvent(new CustomEvent(Gg,{detail:{tab:e}}))}function Yg(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail?.tab:void 0;n&&e(n)};return t.addEventListener(Gg,n),()=>t.removeEventListener(Gg,n)}function Xg(e){let t=(0,$.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`GitHub`}),r=(0,Z.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,Z.jsxs)(`svg`,{role:`img`,fill:`currentColor`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}var Zg={messages:JSON.parse(`{"--T3kB":["Loading preview"],"-3Qbv7":[["count","plural",{"one":["matches ","#"," file"],"other":["matches ","#"," files"]}]],"-3ois8":["Hard break"],"-5jISU":[["0","plural",{"one":["#"," template"],"other":["#"," templates"]}]],"-7s4fw":["Search agents"],"-8PP0T":["Match case"],"-FeyRg":["Keep original file"],"-K0AvT":["Disconnect"],"-LHLx7":["edited template"],"-QCLWk":["Templates available"],"-Qw-1t":["GitHub authentication failed. Try signing in again."],"-WFFG2":["Default properties"],"-YV1Uo":["Pattern ",["patternNumber"]],"-bFGPF":["Next change"],"-dNlfM":["Undid the last edit on ",["docName"]],"-f2Ogn":["Keep this project in sync with your git remote. Follow fetches updates without pushing; full sync pushes your commits too. Turning sync on requires confirmation."],"-g6KIS":["Unrecognized link"],"-imiMK":["Follow — updates flow in from your remote; your edits stay on this computer."],"-kbIAr":["Links & images"],"-lCAuQ":["Loading graph"],"-o5XAG":["Sent privately to the OpenKnowledge team, along with your note and app version. Never posted publicly."],"-q4abP":["Results capped — this workspace has more files than search can index. A missing file may be a cap artifact, not a typo."],"-r_Kx7":["Create skill"],"-slrNR":["Toggle a task list."],"-uaQnI":["No matching worktrees or branches."],"-wePNM":["Search matches file names, paths, and folders. Open a file to search its body (⌘F)."],"-zA2E7":["Couldn't create the worktree. Try a different name."],"-zy2Nq":["Type"],"0-31GV":["Removing"],"00c7t0":["Ask AI about this code block"],"02P3hL":["Upload failed: ",["message"]],"03wKPg":["A report helps us find the cause. Nothing is sent until you review it."],"04RA0-":["Failed to enable sync — ",["detail"]],"04XyCH":["Adds a managed block to ",["0"]],"05n5wS":["Doc mention suggestions"],"06SZfb":["Template \\"",["trimmedTitle"],"\\" created"],"07eGJB":["Couldn't move skill: ",["0"]],"07gHun":["You don't have access to this private repo. Sign in with an account that does."],"07q4Qk":["File sidebar"],"09Tv5j":["Reconnecting…"],"0BB9ID":["No headings yet."],"0BfhAj":["Reset view"],"0E9DR6":["Type to find a doc"],"0Er6-M":["Restarting"],"0Gd0NU":["Shared"],"0LBDjY":["\\"",["0"],"\\" uninstalled — back to a draft"],"0NA4b3":["Keep my version"],"0NkNB5":[["0"],"mo ago"],"0QVrvp":["Maximum agents already running"],"0TnCvC":["Rename ",["0"]],"0YEbfk":["Connect to AI tools"],"0YUS3Q":["Subfolder under current folder"],"0_J12R":["New file from template \\"",["displayTitle"],"\\" (",["fileName"],") in ",["targetLabel"]],"0eHrMb":["Could not complete delete"],"0g7rCZ":["Duplicated to \\"",["0"],"\\""],"0inVGS":["Helps your coding agent recognize OpenKnowledge projects and route reads and writes through it."],"0jD-Gn":["A team knowledge base, a personal wiki, project docs..."],"0kTAXe":["Open source: ",["mirrorSrc"]],"0qyKG6":["Synced from disk"],"0rwwOn":["By tag"],"0s8-e8":["Select, enter, or leave block components and fallback source blocks from keyboard boundaries."],"0t0bbC":["Could not save sync preference: ",["detail"]],"0uTHCg":["Start a new OpenKnowledge project."],"0wswKc":["Horizontal rule that divides sections."],"0xnQ_X":["Updates flow in"],"0xnmlQ":["Repository name"],"0yL--g":["Review conflicts"],"0zAhu6":["every doc"],"10g8I_":["Turn off Only markdown files"],"12F9WL":["(no id)"],"151wvk":["Show sidebar"],"161NCV":["Stopping"],"16D5Zj":["Are you sure you want to delete ",["itemName"],"? This action cannot be undone."],"16eIWu":["Force stop"],"170Js2":["Hide panel"],"1AumWo":["Push failed — check the server logs for details."],"1CalO6":["Style"],"1DahsC":["Search settings"],"1EcCom":[["keyName"]," value"],"1FLarN":["Describe what you want to create to continue"],"1GhYxC":["of ",["totalPages"]],"1HBhDS":["Checking out files"],"1OKzC_":["Your report couldn't be sent. Try again or email it instead."],"1QfxQT":["Dismiss"],"1RluQD":["Show replace"],"1TNIig":["Open"],"1Ta7Fd":["Open ",["basename"]],"1XSMhZ":["Switching to <0>local-only</0> will refuse until they're untracked via<1> git rm --cached</1>."],"1YJ4Yg":["Update available",["0"]],"1ZpfyB":["Open with AI ",["displayName"],", ",["hint"]],"1a6ICf":["Following the agent's edits"],"1bDVu5":["Workspace Command Palette"],"1d1F11":["Select all files and folders"],"1di5fu":["Document not found"],"1hvhf0":["The folder on disk and the id agents use to invoke this skill."],"1njn7W":["Light"],"1nke1r":["Open ",["0"]," on GitHub (opens in a new tab)"],"1t_NnN":["Reject"],"2-CeZn":["Your report is saved on this Mac, so nothing was lost. You can email it to us instead."],"2277Tu":["Collapse graph"],"237hSL":["Ended"],"25Pw6a":["Cloning"],"27TLNq":["Enable ",["displayName"]," CLI"],"27XW26":["Clone happens in the Project Navigator. Reclick the share link there."],"28B21t":["Agent Skills"],"29VNqC":["Unknown error"],"29XZXN":["Set git identity"],"2AIVbm":["Review your report"],"2B6eYX":["What this checkbox changes"],"2BBAbc":["List"],"2CHoQv":["Force Reload"],"2FYpfJ":["More"],"2FnYUD":["App & system info, recent app logs, and project server logs: the essentials we need to reproduce the issue."],"2G-56b":["Failed to update markdownlint rules"],"2GT3Hf":["Global"],"2H43L8":["Secrets like API keys and tokens are redacted automatically."],"2IYGkU":["This doc has unpushed changes. Recipients will see the last pushed version."],"2QM24L":["All tags"],"2RBzMG":["Network error — check your connection and try again"],"2Snes1":["This sends the link's address off your machine"],"2XQ8Ww":["Open preview when agent edits"],"2YOwme":["Restarted — now running v",["appRuntime"],"."],"2YZwPB":["Forward-links response did not match expected shape."],"2bVHbB":["Available in every project on this computer."],"2hYmUH":["my@email.com"],"2hpdRq":["Hide panel (",["panelShortcutLabel"],")"],"2j1kfc":["Enter a valid URL (for example https://api.openai.com/v1)."],"2m_bmh":[["label"]," (",["0"],")"],"2myNzt":["We've filed it with the team and attached your logs."],"2n3oDU":["Project-level pages ordered by inbound link count, up to ",["FULLSCREEN_HUB_LIMIT"]," results."],"2ojpo0":["Dock sessions on the right"],"2pR7ad":["Embeddings API key"],"2q_Q7x":["Visibility"],"2rLM8r":["Couldn't start the agent thread — please try again."],"2ryd91":["Failed to rename property"],"2tgFCe":["Starting clone"],"2vIPtm":["Open link in new tab"],"2wxgft":["Rename"],"322lyb":["Highlight tips, warnings, and notes."],"34qyH5":["Could not reach server"],"36WXSC":["Couldn't delete template: ",["error"]],"36aWJD":["Join us on Discord"],"37P2BJ":["Search schemas"],"38foVZ":["Loading diff"],"3BLniE":["Configuration problems"],"3BnyYc":["This doc isn't on GitHub yet. The link won't work until it's pushed."],"3DJEEt":[["sizeText"]," · secrets redacted · ",["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]],"3DTatP":["Copy a prompt for your agent, start a blank file, or scaffold from a template."],"3FMvls":["A short line shown under the title in the template list."],"3Fcb0I":["Open graph"],"3HAPpl":["No schemas match your search."],"3HNlwb":["Hello, world!"],"3Ib6FN":["Move down"],"3Ijjy1":["Couldn't load this skill's files."],"3J7d2N":["Big section heading."],"3JYy1p":["Branch ",["0"]," no longer exists. Cloned to default branch."],"3LbBJn":["Attach images"],"3MnvrL":["Showing top ",["0"]," matches — keep typing to narrow"],"3Mwaly":["Could not initialize ",["0"],"."],"3SDfZl":["<0>Mirror — pick a source.</0> Set <1>src</1> + <2>anchor</2> via the property panel to point at a <3><MirrorSource></3> elsewhere."],"3SZrdj":["Check for updates…"],"3TSz9S":["Minimize"],"3VbwPp":["Open ",["keyName"]," in browser"],"3VsNTI":["Loading document"],"3YWddZ":["No content changes in this version"],"3YvS-c":["New tab"],"3_6U6f":["Connect to GitHub"],"3__SjS":["breadcrumb"],"3a_Bd7":["Open source doc: ",["mirrorSrc"]],"3aeN7X":["All files"],"3cOo2C":["Create a folder from the current document or folder context."],"3ePd3I":["What's new"],"3h5zMp":["Something went wrong loading the settings panel."],"3iyGWF":["Open recent project"],"3jod3l":["Connect GitHub"],"3l_cXP":["Take a look if you'd like. This exact file is what we receive."],"3m2GBo":["Searching docs"],"3mFsc3":["Restore with remote changes"],"3o3tur":["Starter content"],"3oEK1e":["Resuming the conversation"],"3oh0nQ":["Nested .okignore error in ",["path"]],"3pU8e-":["Pin tab"],"3wiBAs":["Where should it live?"],"3y6XTb":["Semantic search"],"3zyg_A":["Ignore patterns"],"438Fca":["Cloned successfully, but could not open the project."],"44DSl0":["Already have a git repository? Add it with <0>git remote add origin <url></0> in this project's folder. This page updates automatically once a remote is detected."],"45MZFs":["Commands"],"47EXvY":["This replaces the current skill content with the bundled version ",["0"]," (you have ",["1"],"). Any local edits will be replaced — your current version is saved to history first, so you can restore it."],"484LKL":["Remove link"],"48uGTI":["Failed to load docs. Press Escape and re-open to retry."],"494br3":["Shared with everyone on this project — committed to config.yml via git."],"4A3Yzu":["Code block"],"4BITzH":["Error:"],"4CfgPM":["Project folder created, but git init failed. Try again."],"4DcimZ":["Updated ",["lastSyncedRelative"]],"4E9jPa":["Create your first project"],"4EZrJN":["Rules"],"4Gz2wC":["Failed to upload file"],"4KmEoC":["Hotkeys"],"4NC2Ym":["Move to the next or previous table cell."],"4PYsOz":["Hide Files (",["sidebarShortcutLabel"],")"],"4Sxexw":["Source undo or redo"],"4TzU0n":["Initialize"],"4XL6N4":["Detected from the editors this project is set up for. Adjust to control where every skill installs."],"4buZWd":["Inherited from ",["path"]],"4cEClj":["Sessions"],"4c_a6S":["Nothing set yet."],"4g19V6":["Failed to update property"],"4h3e0H":["Couldn't update skills sharing — ",["detail"],"."],"4hJhzz":["Table"],"4ieVh2":["Pick “Custom” above to use this palette."],"4jDd0j":["Anyone can see"],"4mLBx9":["Subscriptions aren't available right now."],"4niEzY":["Sandboxed HTML embed — write HTML, see the rendered preview live."],"4nj6n8":["/api/config returned HTTP ",["code"]],"4rjwLG":["Create with ",["0"]," CLI"],"4sKwf6":["File already exists"],"4uNLmk":["Pulling"],"4v2Yyz":["Select every visible file-tree row when focus is in the Files sidebar."],"4xtLTl":["Hidden folder “",["basename"],"”"],"4zEZS5":["Auto-sync is on for this worktree, inherited from ",["project"],". Change it in Settings → Sync."],"4zGlN_":["Paste image URL or click upload"],"4z_1j2":["Rendered"],"5-FeN2":["Share URL"],"5-o4kO":["Only markdown files"],"50ORFs":["Reset ",["0"]," to default"],"54Y6Fg":["Could not load templates. Try again later."],"56WWtu":["Couldn't load starter packs: ",["error"]],"56xUL1":["Property name"],"57fiu8":["(read-only — edit in source mode for now)"],"5ALjdr":["Move through visual-editor find results from the find field."],"5Ajb15":["The formula <0>c = √(a² + b²)</0> renders inline."],"5AzM72":["This setting is per-machine and isn't shared with collaborators."],"5ClEAu":["Inline hashtag for cross-doc grouping."],"5D3Ior":["Hide folder"],"5F5HYj":[["ahead"]," ahead, ",["behind"]," behind"],"5GKMSz":["Indent or outdent the current list item."],"5GRxoA":["Search files, folders, and commands for the current workspace."],"5LXwX8":["This permanently removes ",["path"],". Agents that reference this template by name will fail until it's recreated or replaced by one in a parent folder."],"5OTgC7":["Open and focus the bottom Ask AI prompt composer."],"5OqaJi":["Enter a project name"],"5PHgV2":["You can also create one from a terminal with <0>ok bug-report</0>."],"5PrrYw":["Start ",["agentName"]],"5QGTaA":["Could not copy relative path"],"5SwVv1":["Not installed"],"5Szq6N":["This endpoint ignored the vector size you configured. Remove <0>search.semantic.dimensions</0> to use the model's own size."],"5Tk8Fb":["Loading files"],"5Umg9i":["Disable external link previews"],"5WDhAk":["Link to a page or external URL."],"5Y17qa":["Applies to (globs — leading ! excludes; empty means every doc)"],"5ZB7XC":["File drop zone"],"5ZbJFS":["Your current version is saved first, so this is reversible."],"5_8TCr":["Fix all (",["count"],")"],"5_j-DA":["Kill Terminal"],"5aahsI":["nothing (",["0"]," is not a valid pattern)"],"5e1Dri":["The menu label agents pick this template by (required)."],"5gr_ev":["Becomes the document's content when someone creates a doc from this template. Type <0>",["dateToken"],"</0> or <1>",["userToken"],"</1> to fill in today's date or the author's name automatically."],"5jEnaB":["Not available on this platform"],"5kWklo":["(some may already be hidden by other rules)"],"5lWFkC":["Sign in"],"5mksg0":["Failed to disable semantic search — ",["detail"]],"5qNxOe":[["count","plural",{"one":["#"," item could not be moved to the Trash. Do you want to permanently delete instead?"],"other":["#"," items could not be moved to the Trash. Do you want to permanently delete instead?"]}]],"5qQr1u":["Allowed values for ",["field"]],"5rnB76":["Your edits stay on this computer"],"5tcmwY":["Add value"],"5vYdh9":["New thread with ",["0"]],"5wV2qQ":["and more"],"5y_9lO":["Waiting for authorization"],"6-wLTJ":[["behind"]," behind origin"],"60vpJN":["What were you doing?"],"62Pc08":["Install for Claude Chat & Cowork (Desktop App)"],"62bOuM":["Latest edit"],"636K3K":["Delete adjacent chip"],"67f-3g":["Duplicate succeeded but the sidebar may be out of date — refresh to resync"],"6Aih4U":["Offline"],"6EKG_c":["What agents match on to decide when to use the skill."],"6HCOwA":["Failed to open."],"6KCH4m":["Hidden files"],"6LbUG7":["The repository is private and your GitHub account doesn't have access to it."],"6MnZEC":["Terminal failed to load"],"6O626z":["No headings match \\"",["trimmedAnchorQuery"],"\\""],"6Pxqwv":["No project templates yet. Create one to make it available everywhere in this project. Folder-scoped templates live on each folder's overview page."],"6Uau97":["Skip"],"6V3Ea3":["Copied"],"6VqW-1":["Remove ",["keyName"]],"6WdDG7":["Page"],"6YtxFj":["Name"],"6ZhdPI":["What the agent may read, write, and surface."],"6_ZOw4":["Copied full path"],"6bTTAN":["Invalid input — pick a different folder."],"6cR-PU":["Already open"],"6caB2T":["Connect an existing repository"],"6cuT_1":["Open date picker for ",["keyName"]],"6cyguR":["Connect GitHub to continue."],"6eniID":["Map the architecture"],"6fGjTz":["Show fewer"],"6g2jsp":["Update skill"],"6gRgw8":["Retry"],"6h4zVU":["What would you like to create?"],"6hYjww":["Create a token on ",["host"]],"6hfDJr":["Server error: ",["status"]],"6iDEWA":["Show panel"],"6ibbCg":["Create your first file"],"6ki7F2":[["0","plural",{"one":["#"," item"],"other":["#"," items"]}]],"6lGV3K":["Show less"],"6m_7We":["Open this settings dialog."],"6pe_G5":["Element type"],"6q0rnH":["writing"],"6qMe0o":["Draft a technical spec for my project. Start with an overview, then add cross-linked pages for the architecture, the key modules, and the open questions, all linked from a specs index."],"6s7LXO":["Heads up"],"6u9LvN":[["days","plural",{"one":["#"," day ago"],"other":["#"," days ago"]}]],"6vEr3W":["Link target"],"6zzhQL":["Send your report by email"],"72xhRD":["Diagram view mode"],"74-bX-":["A pull quote stands out from the surrounding text."],"74C2zx":["Edit schema ",["file"]],"74eHt-":["No file or folder selected"],"75Y1dk":["Horizontal pill strip + active panel below; click a pill to switch panels."],"77SdEP":["Delete ",["itemName"]],"78G7R3":["Validate document frontmatter against JSON Schema files, scoped to doc sets by glob."],"7FamGZ":["Go to line"],"7Fkcej":["+ Add ",["addChildName"]],"7H4UHD":["Documents tagged <0>#",["tagName"],"</0>"],"7IsvrP":["Checking for updates"],"7JtSLi":["Failed to delete path"],"7OhaRy":["Source search"],"7Ongq0":["Condense my AGENTS.md file to less than 40k characters"],"7OwvEL":["Show HTML preview"],"7PNNNs":["This sends content off your machine"],"7PXYaF":["<0>ok</0> won't run in external terminals until you add it later from the File menu. OpenKnowledge's built-in terminal and AI tools keep working."],"7PzzBU":["User"],"7YRrJ9":["Available in the OpenKnowledge desktop app. From a terminal, use<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."],"7_bFEL":["Drag ",["patternText"]," to reorder"],"7apDiJ":["A folder named <0>",["sanitized"],"</0> already has files here. Pick a different name."],"7cAW1G":["No API key is set for this endpoint. Add one above."],"7d1a0d":["Public"],"7hctf2":["Describe the project you want to create"],"7jIIFX":["You're all set up!"],"7kb4LU":["Approved"],"7l15X4":["failed"],"7qRHf0":["Install for Claude Chat & Cowork"],"7uBlRT":["Copy the focused file-tree item so Paste can duplicate it."],"7vQdBK":["Loading the conversation"],"80c4-P":["Code copied to clipboard"],"81H_23":["Add properties"],"881Uwh":["Delete selected table"],"89TtiD":["New file from template \\"",["displayTitle"],"\\" (",["fileName"],") in the project root"],"89y7ar":[["sizeText"]," · secrets redacted"],"8F1i42":["Page not found"],"8FqTCr":[["chunksRemaining","plural",{"one":["#"," unresolved hunk"],"other":["#"," unresolved hunks"]}]],"8Gzz2G":["worktree of ",["worktreeOf"]],"8IP5jY":["Each selected tool gets an OpenKnowledge MCP entry."],"8Jm2EP":["Toggle heading levels 1 through 6."],"8L0EPw":["or paste a token"],"8OGgNM":["Open or close visual-editor find."],"8OxKZy":["Move succeeded but the sidebar may be out of date — refresh to resync"],"8PifYj":["Mermaid diagram"],"8PmoQF":["Open the insert menu in an empty or active text position."],"8RtNI0":["Failed to load documents"],"8TvlHF":["Crash dump"],"8Vq20-":["Switch worktree"],"8Wav8y":["If an update arrives for something you are editing, you choose which version to keep, like a merge conflict."],"8XQRON":["Loading repositories"],"8_brI5":["Name is required"],"8cS0nH":["Config sharing unavailable: ",["0"],"."],"8cpOa8":["Couldn't disconnect — please try again."],"8cpeU3":["Shared repositories"],"8eW0WQ":["No matching repositories."],"8fRyLo":["Invalid patch payload"],"8fc_3j":["Protected branch — cannot push"],"8k6INX":["Paste a personal access token for <0>",["host"],"</0>."],"8lwQlE":[["0"]," added, ",["1"]," removed"],"8m8diM":["No location selected. Use Browse to choose a folder."],"8nWu1k":["Empty diagram"],"8ruqQi":["Broken internal links"],"8sMErm":["Enable Follow?"],"8t9CRE":["Starting ",["agentName"],"…"],"8tjQCz":["Explore"],"8uAWix":["This template lives in a parent folder — deleting it affects every folder beneath it that doesn't define its own version."],"8vCZcs":["Failed to open file."],"8vETh9":["Show"],"92rbk2":["Mirror loading <0>",["mirrorRef"],"</0>"],"96G6Re":["New folder"],"96w9hU":["Something went wrong opening this file (HTTP ",["status"],")."],"98FP1E":["This schema carries root-level advanced rules the editor does not show (",["0"],") — they still validate and survive every edit. Open the schema file to see them."],"99eR72":["Visual editor table selection"],"9Bd18D":["Failed to load hub pages"],"9KooKn":["Run a project audit from the Problems panel."],"9NJWgv":["Backlinks"],"9OIqw4":["You don't have write access to this repo."],"9PQysm":["Hide advanced"],"9R7pRC":["No tags match \\"",["trimmed"],"\\". Continue typing to create one."],"9UQ730":["Clone"],"9V0W-R":["Adds the OpenKnowledge skill to the <0>Claude Desktop App</0> so it's available in Chat and Cowork sessions."],"9Vh9Jf":["Reopen this window to sign in with your browser"],"9XIEYq":["Attach the file in an email to <0/>"],"9aVlF2":["Change provider"],"9bCiQ8":["No pages are missing incoming graph links."],"9bG48P":["Sending"],"9clcD5":["Open documents tagged #",["chip"]],"9dVehq":["More grant options"],"9dw5bW":["Create with ",["0"]],"9euN0m":[["count","plural",{"one":["#"," more cross-doc participant"],"other":["#"," more cross-doc participants"]}]],"9fhQRL":["Beta channel"],"9fvog2":["Preview unavailable: ",["errorDetail"]],"9i21pa":["Commits happen automatically"],"9jnjV0":["Embed an audio file with native player controls."],"9mEZeD":[["name"]," CLI"],"9nIrRp":["Nested fields"],"9npOH9":["Open file"],"9o1bIV":[["behind"]," behind"],"9oE4C3":["Browse your repos:"],"9sBe85":["Follow us on"],"9tJX8r":["By meaning"],"9uI_rE":["Undo"],"9xCnv8":["Hide Terminal"],"9zb2WA":["Connecting"],"A1taO8":["Search"],"A50vr3":["Use lowercase letters, digits, and <0>-</0> only."],"A5CYnd":["Broken link"],"A5hiCy":["Create template"],"A67Uwj":["Still loading"],"A6h5b-":["File duplicated"],"AAlr5Y":["No collab server for this worktree — run <0>ok start</0> here, or reopen the project."],"AB4qw9":["New terminal"],"AE7BY3":["The terminal session ended."],"AIVHDc":["Choose what a new session starts"],"AIn2Yv":[["displayName"]," CLI, ",["hint"]],"AItsE5":["Open it there"],"AKxFtn":[["openedWorktreeCount","plural",{"one":["worktree"],"other":["worktrees"]}]],"ALhMYW":["Terminal"],"APNlbk":["exit ",["0"]],"AQ-Lfg":["Couldn't load templates"],"AQGtjK":["Commands run with the full access of your macOS user account on this machine. Turn this off to disable the shell."],"ASqqsQ":["Maximum ",["MAX_ATTACHMENTS"]," attachments"],"ATGYL1":["Email address"],"AVW-K9":["Failed to load orphan pages"],"AWOSPo":["Zoom in"],"AaaESH":["Auto-sync is off for this worktree, inherited from ",["project"],". Change it in Settings → Sync."],"AcK_r0":["Claude CLI"],"AczYxH":["Custom open-knowledge entry — not managed by OpenKnowledge"],"AdcGcG":["Applying your change"],"AddR83":["Could not create project. Try again or pick a different location."],"AeHuzT":["# One pattern per line.\\n# Examples:\\n# drafts/\\n# *.draft.md\\n# !keep.md"],"AeXO77":["Account"],"AhoGwP":["Set up OpenKnowledge integrations"],"AiNMQ7":["This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."],"Aif3E7":["Enable semantic search"],"Am78jY":["Drag ",["keyName"]," to reorder"],"ApeA0n":["Undid ",["dropCount"]," edits on ",["docName"]],"Aq-O0x":["status"],"AqnqMJ":["API key set"],"AsqRE_":["Default location for new attachments"],"AtBdnD":["Couldn't delete skill: ",["error"]],"AwLCZA":["The endpoint answered, but not with an OpenAI-compatible embeddings response. Check the base URL."],"B11p-O":["Edit markdown link"],"B2DrPb":["Auto-save"],"B2Srgd":[["packName"]," skill installed."],"B3NAZC":["Open Navigator"],"B4_ipX":[["conflictCount","plural",{"one":["#"," file conflicted"],"other":["#"," files conflicted"]}]],"B6Lac2":["+",["overflowCount"]," more"],"BAH4qX":["Selected graph item"],"BBqGS9":["Desktop"],"BD0XSC":["Failed to load project templates"],"BEkF-P":[["userName"],", ",["tabCount","plural",{"one":["#"," concurrent tab"],"other":["#"," concurrent tabs"]}]],"BGHHtQ":["Single page"],"BH56dn":["Custom display text"],"BQKHuL":["Restart terminal"],"BQu9Pg":["Symlink"],"BUyQnq":["Couldn't restart the server. Try \`ok start\` in this folder."],"BY-g4_":["Add pattern"],"Ba4D2x":["Template imported"],"Bdha5y":["Publishing..."],"BeWTQy":["Loading starter packs"],"BgV29F":["Visual editor find input focused"],"Bh9671":["This project is local-only, so .ok/skills is hidden from git and these skills can't be committed or shared. Share just the skills folder — the rest of your OK config stays on this computer."],"BjitBo":["Download ",["0"]],"Bn9-El":["default"],"Bv5a9_":["Selection statistics"],"Bx4EXG":["Actions for ",["label"]],"By-7Pn":["Toggle a bullet list."],"BymzO4":["Document outline"],"C-mmmK":["The model id your endpoint serves. Its vector size is detected automatically — clear the field to go back to ",["DEFAULT_EMBEDDINGS_MODEL"],"."],"C-xgad":["or use a starter pack"],"C0hoX6":["Always included"],"C52RBg":["Validate document frontmatter against standard JSON Schema files (draft-07). Toggle a schema on to validate the docs its globs match; violations surface as warnings and never block a write. Use Edit to open the schema file."],"C62P6b":["Editor selection"],"C7XjNB":["Global Skill"],"C9TBvF":["No Outgoing"],"CBsdhe":["The agent isn't stopping. Force stop closes this thread and quits the agent."],"CCTop_":["Recent"],"CFnavk":["This project isn't a git repository, so worktrees aren't available."],"CKyk7Q":["Go back"],"COr1Y7":["Pick <0>openknowledge.skill</0> from your <1>Downloads</1> folder. It enables automatically."],"CPmYSG":["Checking for agents"],"CSL0l1":["Couldn't clear the key — please try again."],"CTJLpz":["\\"",["trimmed"],"\\" already exists here"],"CU3AiE":["Switching branches"],"CVRM5N":["Follow fetches updates from your remote git repository and fast-forwards your copy automatically. Your local edits stay on this computer and are never pushed."],"CWjM1r":["docs directly in ",["0"],"/"],"CWzc2T":["<0>~/.ok/bin</0> and <1>~/.ok/env.sh</1> stay either way — the app always maintains them."],"CXTwen":["Can't safely edit this project config"],"CXj9C-":["New property name"],"C_Lyvh":["Failed to save theme setting"],"C_WGy8":["This file is too large to open in the built-in text editor (1 MB limit). Use Open file below to open it in another app."],"C_cPoW":["Your GitHub session expired — sign in again to verify push access."],"ChAtFg":["You don't have permission to push to this repo"],"CifUuG":["Update available"],"Ck9XRt":["Couldn't save the key — please try again."],"CmeH9S":["Add property to ",["keyName"]],"CnOGgs":["Sync mode"],"CoHvYd":["Moved ",["0"]," to position ",["1"]," of ",["2"]],"CooKEf":["Dock sessions at the bottom"],"CvsD6Y":["via ",["viaTags"]],"CwOXMT":["Value for ",["keyName"]],"D-Oh1s":["How to set up ",["0"]," (opens in browser)"],"D-_B7l":["Connected — this endpoint returns ",["0"],"-dimension vectors."],"D12vtS":["(detached)"],"D2CwBE":["Create a new OpenKnowledge project from the <0>",["0"],"</0> starter pack (",["1","plural",{"one":["#"," folder"],"other":["#"," folders"]}]," and starter templates) in the folder of your choice."],"D2E7tr":["This permanently deletes ",["deleteTarget"]," from the project and removes its mapping from config.yml. Docs it validated keep their frontmatter; they just stop being checked."],"D2emTw":["Something went wrong sending your feedback. Please try again."],"D4H2N6":["Remove ",["tag"]],"D8JJwQ":["Feedback isn't available right now. Please try again later."],"D8OV7J":["Only collaborators"],"DDTdLl":["Code block settings"],"DELNQk":["Collaborators see your in-progress edits as soon as they sync."],"DEWDbv":["Show diagram"],"DF1MtZ":["Loading conflict for ",["filePath"]],"DFfRbX":["Sync status: ",["syncStateLabel"]," — git identity unset"],"DId6MT":["Project-level pages with no outgoing graph edges."],"DJd000":["Activate the previous editor tab."],"DKYW1G":["This setting is per-machine and isn't shared with collaborators. It needs an API key (set below) unless your endpoint is a local server that doesn't require one."],"DMeaxi":["Downloading ",["0"]," ",["1"],"…"],"DPfwMq":["Done"],"DTI-fp":["This ",["targetNoun"]," only exists on branch <0>",["shareBranch"],"</0>. You have uncommitted changes that prevent switching here — open it in a worktree to leave your changes untouched."],"DUWgfT":["Re-authenticate with GitHub Enterprise Server"],"DVh_Tb":["Failed to clean up after trash"],"DXd9LM":["New worktree"],"D_WKe_":["Click an agent's avatar in the presence bar to view their session."],"DbILZA":["No matches. Some files are excluded from search (hidden or ignored files)."],"DcLaew":["Custom theme"],"DeDYLr":["Unrecognized wiki link"],"DgcGrb":[["fileCount","plural",{"one":["file"],"other":["files"]}]],"DhK_hZ":["Moved \\"",["name"],"\\" to ",["0"]," (",["skipped"]," binary file(s) not copied)"],"DhLHEb":["Failed to load activity"],"DiFKSL":["Counting markdown files"],"Dnn2XG":["Automatic"],"DrYM2Z":["Sync disabled"],"DsDwR-":[["0","plural",{"one":["#"," error"],"other":["#"," errors"]}]],"DskIkK":["Sign-in stream ended without confirmation — please try again"],"Dub54T":["Preview browsers can't auto-copy. Use Cmd/Ctrl+C on the URL above, or open OK in the desktop app."],"Dvwa0U":["Create a worktree from this branch"],"Dw1T_W":["Rename ",["label"]],"Dz7fsq":["Zoom In"],"E1Da_b":["This permanently removes ",["0"],". Agents that invoke this skill by name will fail until it's recreated."],"E1_c72":["Task list"],"E1tG2u":["Get Claude Code"],"E2Mv-X":["Copy source"],"E4XYYH":["Enable terminal for this project"],"E5WeIy":["Reopen the most recently closed editor tab."],"E6lrpp":["Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."],"E7BhZn":["Blank note"],"E9bKSA":["Creating"],"E9gh86":["You can attach up to ",["MAX_ATTACHMENTS"]," images."],"EARn6h":["Couldn't share skills — ",["detail"],"."],"EBVbtP":["Could not duplicate item"],"EDl9kS":["Subscribe"],"EDm3wJ":["Loading diff renderer"],"EEYbdt":["Publish"],"EHu0x2":["Syncing"],"EJuO7B":["Connect a GitHub account to browse and sync your repositories."],"EKwNEe":["Cached embeddings belong to the endpoint and model that produced them, so this rebuilds the index from scratch."],"ELYtNJ":[".ok folders"],"EL_YRd":["Mirror of <0>api-spec</0>"],"ENpRJV":["External link previews"],"EO4Dt1":["Enable ",["file"]],"EOjU5V":["Inline Math Properties"],"EPwuTC":[["usedLabel"]," / ",["sizeLabel"]," tokens used"],"ETyvvg":["No language match."],"EWCJFu":["Created ",["target"]],"EWPtMO":["Code"],"EWX92Z":["Collapse Ask AI"],"EZVxVz":["Replace the active match from the replace field."],"E_BHoD":["Could not move \\"",["targetName"],"\\" to the Trash. Do you want to permanently delete instead?"],"E_tNGD":["Connected as @",["login"]],"Ea1prf":["Choose which editors every skill in this project installs into."],"EarrCe":["Search emoji"],"Eax_et":["Accent"],"EbMUlU":["Agent mode"],"EbZT7P":["Toggle the left file sidebar."],"EbjWsS":["Current commit"],"EcM3k7":["Failed to clean up pending ",["kind"]],"EdQY6l":["None"],"EeUucb":["Rule editing is available for the project's root markdownlint config"],"Ef7StM":["Unknown"],"EhDLBx":["You modified <0>",["filePath"],"</0> locally, but it was deleted upstream."],"Ehkru0":["Open, navigate, accept, or dismiss CodeMirror completion suggestions."],"EiVgl5":["You don't have permission to push to this repo."],"Eji13z":["Toggle highlight formatting."],"EkH9pt":["Update"],"EkUnmS":["any"],"El7NbA":["Heading 2"],"ElatXA":["Context window: ",["percent"],"% used, ",["usedLabel"]," of ",["sizeLabel"]," tokens"],"Emz5BG":["Embeddings are computed only when a search runs and are cached locally under <0>.ok/local</0>."],"EoaQyO":["Append-only log of what changed."],"EqrC_R":["Undo failed: ",["message"]],"EqtBXb":["Visual editor find open"],"ErRi6L":["Template \\"",["label"],"\\" deleted"],"Es-eZU":["Remove from recent projects"],"Ev2r9A":["No results"],"EvPX7f":["Opens a folder picker to choose where to clone the repository."],"Evq3lu":["Orphan mode"],"ExPiRQ":["Move to the next CodeMirror lint diagnostic."],"ExUzM4":["skill \\"",["0"],"\\""],"F-NRCj":["Add property"],"F-vBv0":["Ask"],"F0OA00":["Get ",["displayName"]],"F1T9y_":["Showing top matches — keep typing to narrow"],"F4IYWe":["Share doc"],"F4vEsL":["Sync status: ",["syncStateLabel"]],"F6pfE9":["Active"],"FBknns":["HTML"],"FCAcjR":["Run a real terminal docked inside OpenKnowledge, starting in this project's folder."],"FCKppt":["Endpoint"],"FCxvG5":["First item"],"FDBwmS":["Open folder…"],"FEK4oC":["OpenKnowledge will be initialized at <0>",["gitRoot"],"</0> — the parent of your new folder, because it contains a <1>.git</1> folder (one project per git repo)."],"FEqWFL":["Guides your AI agents on how to work here."],"FEr96N":["Theme"],"FF7V5K":["Actual Size"],"FNTx6u":["Search \\"",["semanticSubmitQuery"],"\\" by meaning"],"FOGD7m":["Create something great."],"FRYB1Q":["/api/config returned a malformed body"],"FRqZ9v":["Couldn't update skill: ",["0"]],"FTBN5g":["How validation findings surface across the project. These choices are committed to config.yml and shared with every collaborator via git."],"FTUGgh":["Enter a repository URL or owner/repo"],"FUMerq":["Could not enable sync: ",["detail"]],"FWQuPE":["This project is running a different, incompatible build of OpenKnowledge than this app (v",["0"],")."],"FXk_zY":["Adds a guided workflow for authoring new Agent Skills."],"FZtBeR":["Enable ",["0"]],"FgRAvd":["Logs & system info"],"FjkaiT":["Zoom out"],"FqGWeR":["Couldn't reach the agent registry."],"FqTpiN":["Bird wiki"],"Fqr8BP":["Multi-page PDF viewer with toolbar controls (thumbnails, page nav, zoom)."],"Fqx38P":["What got in the way?"],"Fsx78O":["Add the <0>ok</0> command to your terminal"],"FvMSms":["Renaming changes the file on disk and the id agents use to pick this template."],"FvpFSZ":["Reveal in Finder, ",["hint"]],"Fxf4jq":["Description (optional)"],"Fy4GgU":["Explain how your codebase works so teammates and AI agents can find their way around. Good for documenting the architecture, the main parts, and the questions new contributors always ask."],"FyW0WO":["Authorize in browser"],"G-JBA1":["Source mode requires a live connection — your edits are saved and will appear when you reconnect."],"G-h6qN":[["0","plural",{"one":["#"," option set"],"other":["#"," options set"]}]],"G0YZ-I":["Indent or outdent list item"],"G1Gw0v":["New template"],"G1XxbZ":["Checkbox"],"G4-bgo":["Ask AI (from selection)"],"G7-rf8":["Pattern syntax error: ",["message"]],"G7bn_N":["Start an agent"],"G7cMuO":["HTML preview"],"G8t9NN":["Add a property"],"GA-UkN":[["keyName"]," type: ",["typeLabel"],". Click to change."],"GDvlUT":["Role"],"GF51cw":["Give the AI tools you use access to read and update your projects. Pick what to set up below, and change it anytime."],"GGsM4y":["Selected in graph"],"GHsJb8":["Show .ok folders"],"GJH-AT":[["docName"]," is ",["0"],". OpenKnowledge currently opens files up to ",["1"],"."],"GK-IRZ":["Undo buttons are disabled — per-session state has been garbage-collected."],"GLxIKR":["How to push manually"],"GN6L5F":["Filename"],"GQDSBN":["Layout options"],"GSYWCm":["Hide document panel"],"GUYwCr":["Dismiss notice"],"GUqTzn":["Competitor research"],"GXf9hG":["Cloning ",["repoName"],"..."],"GZzDqc":["Details about the error you just hit are included. Secrets like API keys and tokens are redacted automatically."],"G_686w":["Task List"],"G_efLf":["Installed into"],"G_hVTP":["Enable Themes"],"G_mWXb":["Filter languages"],"GamjcN":["Template saved"],"GemPfn":["Failed to parse forward-links error response (HTTP ",["status"],")"],"Gfr4fu":["Server can't open documents"],"GhjUB_":["Reconnected"],"GkYV_4":["Renamed ",["0"]," → ",["1"]],"Gp_twO":["Local path"],"GsBUCk":["Loading settings"],"Gt4gOO":["This folder has unpushed changes. Recipients will see the last pushed version."],"GtJbUa":["Background"],"GuaJb-":["Open email draft"],"GubkSu":["Use a starter pack"],"GuqOb1":["Failed to load headings"],"Gx0VS1":["e.g. drafts/ or *.draft.md"],"GzPQ2f":["Stay in the loop"],"H-hzll":["Please choose Good or Not great."],"H-vDm3":["Relaunching to install the update…"],"H08D2X":["Open a single markdown file in a temporary session, without project setup."],"H0WlWQ":["Grid of rows and columns with a header row."],"H3oH0g":["Redo"],"H6nKok":["Show in File Manager"],"H86f9p":["Collapse"],"H9E1bE":["Reset to default (removes it from config.yml)"],"HAvRAI":[["skillCount","plural",{"one":["skill"],"other":["skills"]}]],"HCn0Ay":["Toggle strikethrough formatting."],"HGNCsl":["Connection lost — keep this tab open, your edits will sync when reconnected"],"HIb0vl":["Network error — please try again"],"HM56Bx":["Creating..."],"HPTPGr":["Create a new spec file for my user story"],"HSh8u_":["Folders"],"HTW0Zw":["One more step: run <0>claude</0> in this project and approve OpenKnowledge once."],"HdkSiO":["New file"],"HfI1dR":["I already have it locally →"],"HjNrT0":[["0","plural",{"one":["#"," backlink"],"other":["#"," backlinks"]}]],"Hl89Qd":["Loading templates"],"HlmZBk":["Documents response did not match expected shape."],"Hngy37":["No problems found — but no lint plugins are enabled, so only links are checked."],"Hnl9nT":["Set where pasted and dropped files are stored for this project."],"HoWElC":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy of branch <0>",["branch"],"</0>. Please commit your changes or enable auto-sync."],"Hp1l6f":["Current"],"Hp4rRh":["Custom endpoint"],"HpK_8d":["Reload"],"HptUxX":["Number"],"HqOPpj":["Git needs a helper tool (such as git-lfs) that isn't installed or couldn't be found. Install it, then try again."],"HqiZvw":["OpenKnowledge stores its configuration and internal files inside a newly created <0>.ok</0> directory in your project root folder."],"Hrz9NY":["Wiki link"],"HyvSqq":["Project Skill"],"HzVv6g":["Paste"],"I-xnra":[["0"]," hex value"],"I1gRhX":["Failed to rename"],"I5685_":["Try a prompt"],"I5AfhE":["Sync status unavailable — server unreachable."],"I7Exsw":["Follow us on X"],"IA1wNb":["The Claude Desktop App didn't open the file. Is it installed? (",["msg"],")"],"IA6JW2":["Detecting"],"ICoNYz":["You can also manage this in Settings."],"IFALcX":["Description for ",["field"]],"IFezUv":["The audit could not be completed. Try again."],"IInnZo":["Conflict"],"IKoTAC":["Keep disabled"],"IN4UX8":["Search (",["searchShortcut"],")"],"IQPyrD":["Missing page — click to create"],"IQgeSn":["Failed to save the schema field"],"IRv9cH":["Cloned ",["repoName"],"."],"IWGfGF":["Checking your GitHub connection"],"IX7-sq":["Something went wrong opening \\"",["docName"],"\\"."],"IX_uXB":["my-feature"],"IYciRC":["Thanks for the report!"],"IajAbS":["Add a starter pack"],"If0crP":["Open with AI ",["targetDisplayName"],", ",["hint"]],"IgTwLt":["Open this document in the editor and collapse the graph."],"Ik-gP0":["Heading H",["level"],": ",["text"]],"IlH15B":["Start a session with the + button, or launch an agent from a page."],"Iq8zdU":["Close terminal"],"IrB5AK":["Server-side cleanup failed for ",["failedCount","plural",{"one":["#"," item"],"other":["#"," items"]}]],"IrC12v":["Application"],"IreQBq":["Repository"],"It9ARY":["Toggle the right document panel."],"ItxGi3":["Attachments must total under 3 MB."],"Ix0K8o":["Hide external URL nodes"],"IxyZXD":["Screenshot"],"Izb10l":["Fix all ",["count"]," fixable problems"],"J2Mv98":["Name (e.g. ",["login"],")"],"J2_JuX":["nothing (",["0"]," cannot match a doc)"],"J2eKUI":["File"],"J3HzPL":["Collapse ",["keyName"]],"J6N5MX":["Couldn't construct the share URL. Try Done and re-share."],"J6mxC1":["A network problem or GitHub outage interrupted the clone."],"JCxGEX":["No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."],"JE21eh":["Symlink to ",["targetPath"]],"JHf6qZ":["you@company.com"],"JJcBCm":[["0"]," total"],"JK-Ave":["Hide thumbnails"],"JL3si7":["Updating"],"JLUTgi":["No tags yet — author \`#tagname\` in any doc to populate the index."],"JLzQi_":["Close ",["accessibleLabel"]],"JM_aq-":["Use an https:// URL — http:// is only allowed for localhost."],"JOcPqH":["Bring a remote repository onto this machine."],"JWsZlx":["Open a project to edit."],"JZ8cO6":["Light, dark, or follow the OS."],"J_bJiH":["Pick a built-in IDE color palette, or define your own."],"Jejur6":["Couldn't load document"],"JfPuv7":[["shareBranch"]," isn't a valid branch name."],"Jhj_lh":["Modify the link target, anchor, and display label."],"JkCD2u":["Sync paused — you don't have permission to push to this repo"],"JlFcis":["Send"],"JmfgFc":["(a worktree of ",["0"],")"],"Jqqevv":["System error"],"JsY1p5":["Denied"],"JtD-Br":["Page link"],"Jw6EC4":["Branch switch failed — try opening the ",["targetNoun"]," manually."],"K-a33w":["Start writing to create this page"],"K-h9cT":["Couldn't save the resolution for ",["filePath"],"."],"K0FgsP":[".ok/skills is committable so your team gets your skills; the rest of .ok/ stays on this computer."],"K0N7zS":["Config sharing status read failed"],"K1ckLX":["Failed to create folder"],"K2v7QF":["Couldn't share skills"],"K6MQQk":["Sync is failing. See the sync status for details."],"K6jjWB":[["packName"]," was already set up. Nothing to do."],"K6jxcj":["Add a key"],"K8-WWn":["Move between table cells"],"K9J00P":["Clone failed — connection error"],"KDuPiY":["Uploading ",["fileName"]],"KDw4GX":["Try again"],"KFdXwz":["Show panel (",["panelShortcut"],")"],"KH5bQi":["Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."],"KIIamL":["OpenKnowledge will create commits and push them to your remote automatically. If you do not want automatic commits in your git history, you should not enable auto-sync."],"KOZud0":["Build a competitor research knowledge base. Start with an overview page, then add cross-linked pages for each competitor, their products and pricing, and the sources behind every claim."],"KPW5WC":["moved template"],"KQGZuq":["Reused if it already exists, created if not."],"KRJ6xh":["No tags yet. Continue typing to create one."],"KUjOb9":["running"],"KWL_Ih":["Blog post"],"KX1MZR":["Your repositories"],"KYSocE":["Research the extinction of flightless birds"],"KYcZ6Y":["Above"],"KZLdgR":["See <0>#design-docs</0> for the latest specs."],"K_vT1F":["Upstream sync"],"KaFCD3":["Open this link in a new tab and collapse the graph."],"Kf7GG5":["Restarting the server…"],"Kgdbkt":["Switch to local-only refused"],"Kh1n4a":["<",["componentName"],"> isn't a known component. Copy the source to use it elsewhere, or delete the block."],"Khxcyu":["Terminal access isn't enabled for this project."],"Kiytqd":["Exception: skills are shared"],"KkEAud":["Create a file from the current document or folder context."],"KmydK6":["Bold"],"KnoB--":["Will be saved as <0>",["sanitized"],"</0>."],"KpOJFY":["Enable external link previews"],"Kr3VPS":["Codex will still ask until you run \\"ok init\\" in a terminal for this project."],"KsAPaB":["This branch is checked out in:"],"KszKI_":["Skill level"],"KtACeE":["Default: <0>",["0"],"</0>"],"KujtjC":["Find"],"L-rMC9":["Reset to default"],"L1BQTH":[["0"]," isn't installed yet — opening its download page."],"L1ZE3M":["Document statistics"],"L3CEC1":["this item"],"L4Cdd9":["or create a new file <0/>"],"L6Hhh6":["(root)"],"L8fKuc":["Run this in your terminal"],"L9Y9Om":["Top linked pages"],"LBwUR6":["Branch switch timed out — try opening the ",["targetNoun"]," manually."],"LCUy_N":["Session ended"],"LDuM35":["Replace current match from field"],"LE7t79":["Clone to a new folder"],"LKIPzv":[["laterEdits","plural",{"one":["Removes ","#"," newer edit on this file."],"other":["Removes ","#"," newer edits on this file."]}]],"LKOLNn":["No AI agents installed"],"LNum6A":[["minutes"]," min ago"],"LPAv9E":[["days"],"d ago"],"LQdLio":["New schema"],"LQsCPn":["Local commits are keeping this copy from updating"],"LRgZAt":[["owner"],"/",["name"]," already exists"],"LTeJuX":["Toggle Full Screen"],"LXdWeS":["Medium section heading."],"LXfNU-":["Navigation and suggestions"],"LYufDw":["Failed to enable semantic search — ",["detail"]],"LbmLyU":["Can't safely edit this tool's config"],"Lcehxn":["Save resolution"],"LdABLa":["Could not open ",["target"],". Try opening it manually."],"LdKIHS":["Draft a spec"],"LdyooL":["link"],"LeGeTf":["OpenKnowledge on GitHub"],"LhQlGR":["This project is running an older version of OpenKnowledge (v",["0"],") than this app (v",["1"],")."],"LhWYpm":["Other OK paths are tracked upstream:"],"LiAw2k":["What this changes"],"LlHqdU":["Initializing project"],"Llyqvo":["This usually means one of:"],"LpB85N":["Plain"],"LtI9AS":["Owner"],"LtSYdi":["Reveal in Finder"],"LtiJ5c":["Project skill"],"LuoJWu":[["truncatedShownCount","plural",{"one":["Showing the first item in one folder — the rest of that folder is hidden."],"other":["Showing the first ",["formattedCount"]," items in one folder — the rest of that folder is hidden."]}]],"LvdLef":["Thanks for the feedback!"],"LwMxXg":["Failed to open worktree."],"M-IF14":["Report reference"],"M1OfV9":["Next source diagnostic"],"M3ytY_":["This looks like a drive root (e.g., C:\\\\). Scaffolding here will scan an entire drive."],"M5_9s2":["Sending report"],"M5mfAe":["Add tag"],"M6mvVi":["Copy relative path"],"M9597s":["Preparing share URL..."],"MCjC9A":["Delete ",["deleteDescriptorLabel"]],"MDBJwN":["Hard to use"],"MDZSJe":["When the agent runs its scheduled work."],"MGBNwj":["Pause sync"],"MGb89P":["Insert, delete, move, copy, and indent source editor lines through CodeMirror's default keymap."],"MHrjPM":["Title"],"MJqRO6":["Your report is being sent."],"MJuO1q":["Context window:"],"MKEPCY":["Follow"],"MQIM_Y":["Couldn't copy. Select the URL above to copy it manually."],"MRZxAn":["Edited"],"MTs6g3":["Couldn't reconnect after server restart"],"MUBR8r":["Rename succeeded but the tabstrip may be out of date — refresh to resync"],"MUrVEo":["No recent projects."],"MV-Dkb":["Found ",["countDisplay"]," markdown files"],"MVxpbf":["Find and replace"],"MZSBsh":["No templates yet. Add one to give new docs in this folder a ready-made starting point."],"MZoxVx":["Failed to load tags. Press Escape and re-open to retry."],"Mb_20S":["Visual"],"Md709y":["Loading ",["fileName"]],"MdpSC1":["New skill"],"Mh_4hd":["Previous tab"],"Mj8R8K":["Couldn't install skill: ",["0"]],"MmDDWK":["Recently opened"],"MmqnGI":["No global skills yet."],"Mnavhe":[["propPanelDescriptorLabel"]," Properties"],"MqQoV-":["Describe what you want to build, start a blank file, or scaffold from a template."],"MqsbfN":["Turn on external link previews?"],"MrwYIK":["Toggle a source comment through CodeMirror."],"MsuXaI":["Hide panel (",["panelShortcut"],")"],"My0wYT":["When you hover an external link, its URL is sent to the destination site to fetch the page's preview metadata — one request per previewed link."],"My9uXI":["Updated \\"",["display"],"\\" to ",["0"]," — your previous version is in history if you need to restore it."],"MysZUL":["Connecting to ",["agentName"],"…"],"N-IonL":["How unresolved wiki-links are reported in the Problems panel, audits, and agent tools."],"N1KkEO":["Jump to last tab"],"N1YYa7":["Loading image"],"N1mdmS":["This file can't be opened in the text editor."],"N2FcBE":["Synced"],"N2S1rs":["Empty"],"N2eHWq":["Code Block"],"N3_ozB":["Hubs"],"N55YNr":["Choose whether this project's OpenKnowledge setup, including its AI-tool connections, is saved with the project so teammates get it too, or kept only on your computer."],"NEzPEh":["Create a new branch, or check out an existing one, in its own window."],"NF_Wcg":["Show skills section"],"NIWAux":["No docs registered under #",["tagDocsName"],"."],"NJyQi_":["Branch ",["shareBranch"]," no longer exists on the remote."],"NKkZXl":["Initialize and open"],"NNJsn7":["One more step: enable it in Cursor → Settings → Tools & MCP (Cursor leaves project servers off until you turn them on)."],"NOHyEE":["Retry push"],"NORKZU":["Pattern warnings: ",["summary"]],"NQ8llq":["Add item"],"NQXwDy":["Edit in config file"],"NRSLBe":[["diffMin"],"m ago"],"NSnIUP":["Two-page (even)"],"NUr4kz":["A reusable starting point for new documents in this folder."],"NYUhy5":["Subfolder name"],"NYn1cR":["Loading editor"],"NYu2Pt":["New project…"],"N_7kkF":["Read through this codebase and draft a technical spec for the most complex module: an overview, the architecture, key files, and open questions, all linked from a specs index page."],"Nay2Yr":["No agents match your search."],"NcurBF":["Pan down"],"NgZwB0":[["enabledCount"],"/",["0"]," on"],"NjrIak":["File: <0>",["fixedName"],".md</0>"],"NkXEFS":["Restore failed — document unchanged"],"NmPNJJ":["Copy code"],"Nn4GgW":["Will be created as <0>",["sanitizedName"],"</0>"],"NnQapF":["Open with AI ",["targetDisplayName"]],"NpC29w":["Create a new list item from the current list item."],"NrFwux":["Failed to save content rules — ",["0"]],"Nu4DdT":["Sync"],"Nu4oKW":["Description"],"NuH1jp":["Public repository"],"Nv3mUj":["Show advanced"],"NvOvTi":["Create in <0>",["dirDisplay"],"</0>"],"Nwbs0q":["Don't show"],"NxW-md":["Resize ",["handleKey"]],"NzFvyK":["Session ended — undo unavailable"],"NzluOx":["(optional)"],"O0Z2Xr":["Outgoing"],"O2UpM1":["Browse"],"O3oNi5":["Email"],"O4PnDd":["AI tool management is only available in the OpenKnowledge desktop app."],"O6yEPk":["Create a new OpenKnowledge project in the folder of your choice."],"O7_W_a":["Open with AI"],"O9oQJS":["Send report"],"OD0FCX":["Hidden “",["basename"],"”"],"ODGGlj":["Folder name: ",["detail"]],"OEEQKT":["Good"],"OETysD":["No hub pages yet. Hubs appear once pages accumulate inbound graph links."],"OEu_0l":["Failed to load skills: ",["0"]],"OFBmkg":["Search files, commands, projects, and AI handoff actions. With text selected in the visual editor, this chord adds a link instead."],"OJOA7Z":["⋯ ",["0"]," unchanged lines"],"OJTOUj":["Requires ",["brand"],"."],"OJeiSH":["Failed to add property"],"OLBz-_":["Mermaid diagram failed to render."],"OLIKgw":["Drag item ",["0"]," to reorder"],"ONPvOb":["Loading agent activity"],"ONgEZF":["Loading headings for ",["pageTarget"]],"OOIVJo":["Uninstalled \\"",["0"],"\\" from ",["1"]],"OPOiKn":["Content rules"],"OTF92M":["Label <0>(optional display text)</0>"],"OVjNeX":["Terminal ",["0"]],"OX2Neh":["Inline code"],"OXb_Df":["Settings content"],"OXdGnd":["Problems"],"OYnx7O":["Path cannot start with \\"/\\""],"OZJeTZ":["Skill"],"OZavHH":["everything under ",["0"],"/"],"Oawo4U":["The report service couldn't be reached."],"OcBurH":["Choose which agents appear in the agent selector. Turn one off to hide it everywhere."],"OdmsFg":["Failed to delete item"],"OeAl1e":["e.g. assets/uploads"],"OfhWJH":["Reset"],"OgyJSr":["Local only"],"OiHJdA":["Move through slash, wiki-link, tag, and path suggestions; accept or dismiss the active suggestion."],"Oj-JV8":["A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Use <0>Test connection</0> under Custom endpoint to see what went wrong."],"Okd2Xv":["Toggle underline formatting."],"OlAl5i":["Expand all"],"Oo_WWc":["No pages found"],"Oos8fo":["Copy command"],"OplnBG":["Managing AI tools is unavailable in this build."],"OuY8t9":["Open in current branch"],"OvEjsP":["Copying..."],"OxplNM":["Updated \\"",["0"],"\\": added ",["1"],", removed ",["2"]],"Oxyd5f":["Pick a name"],"OyIC0Q":["Project name"],"P-ye9o":["Could not open folder picker"],"P0HC30":["This ",["targetNoun"]," moved to <0>",["0"],"</0>. Open it there?"],"P3NS4G":["Pattern syntax error (line ",["lineNumber"],"): ",["message"]],"P3hnm0":["File too large to open"],"P47EWZ":["Could not update sidebar settings"],"P6gXB-":["Replace ",["keyName"]],"P6lAT3":["Folder target: ",["linkTitle"],". Click to open the overview."],"P8yDjG":["Name can’t be empty, \\".\\", \\"..\\", or contain / or \\\\"],"PB4upl":["Find previous match"],"PBwmDJ":["Searching by meaning"],"PBxg_E":["Not now"],"PCSkw2":["Skills"],"PGPGsL":["Add description"],"PIMM5l":["You're subscribed!"],"PKLY-1":["Opening..."],"PKjGhT":["Headings"],"PMyJ9C":["No edit session yet"],"PPFQ3o":["Installed \\"",["0"],"\\" into ",["1"]],"PQCdtv":["\\"",["docName"],"\\" doesn't exist."],"PR9FSv":["Move to the next visual-editor find result."],"PRnH8G":["of ",["0"]],"PTb1Nx":["Sync is paused. Turn it back on to resume."],"PVUn_c":["Open folder"],"PVggyD":["Frontmatter schemas"],"PYmp-0":["Import as template"],"PZtgO0":["Opening worktree"],"P_bX4O":["How to set up"],"Pck6eI":["Pick a built-in IDE palette. The dark IDE themes override the light/dark setting in Preferences."],"PdA9NZ":[["ahead"]," ahead"],"PdJZ5p":["No skills yet."],"Pgu10b":["Saved as <0>",["slug"],".md</0>"],"PgzIpb":["Move to the previous visual-editor find result."],"PhLu69":["That endpoint can't be used. Enter an https:// URL — http:// is only allowed for localhost."],"PiH3UR":["Copied!"],"PijLsG":["File name (created in .ok/schemas/)"],"PkeYXL":["Expanded graph mode"],"Pkw7J9":["This folder is empty."],"PlGC6r":["the git exclude file isn't writable"],"PpJy-V":["The endpoint didn't respond in time."],"PqYWiC":["Couldn't restart the server automatically. Try running \`ok stop all\` in a terminal, then reopen this project — or restart your computer if it persists."],"PrJYSN":["This folder isn't on GitHub yet. The link won't work until it's pushed."],"PrhzDE":["Pan up"],"Q1mtyd":["Hide sidebar"],"Q5fqMz":["Connection error — try again"],"Q6hhn8":["Preferences"],"Q7W-mC":["Same folder as current file"],"Q7cNKe":["Skills are now shared. Commit .ok/skills to share them with your team."],"Q7xfEj":["done"],"Q8A-U_":["Connected to"],"QAi7Q9":["Branch <0>",["trimmed"],"</0> already has a worktree — it'll open in its own window."],"QDZbvN":[["diffDays"],"d ago"],"QLgdT6":["any doc named ",["0"]],"QM3SBZ":["Plan (",["done"],"/",["0"],")"],"QOINDn":["empty"],"QQbwzK":["No agents available."],"QQghPu":["Install in Claude Desktop"],"QR5SP1":["created template"],"QTsvh1":["This agent needs you to sign in first — see the notice below."],"QYTOaN":["You can change this later in <0>Settings → Sync</0>."],"QYfQdv":[["displayName"]," CLI"],"QcpeeE":["Navigate to ",["docName"]],"QfFBdJ":["The template's filename (without \`.md\`)."],"Qj4RL5":["Completed:"],"QlAG4m":["Tell us more (optional)"],"QlxHAH":["Showing results for \\"",["semanticResultsLabel"],"\\""],"QqBQu1":["Label <0>(visible link text)</0>"],"Qvls7J":["Eng specs"],"Qw-7Ie":["A simple place to write, with one file per topic and a daily journal. Pick this if you just want to start writing and let the links between notes build up over time."],"QyioBP":["Move up"],"R0cyYB":[["0","plural",{"one":["#"," request blocked by the preview's security policy"],"other":["#"," requests blocked by the preview's security policy"]}]],"R0jJzV":["Paste URL, owner/repo, or search your repos"],"R3y75Z":["Edit source"],"R4OWFD":["Sections"],"R65q-K":["A real shell is off for this project. Turning it on runs commands with the full access of your macOS user account."],"R9IDFz":["Renames the folder on disk and the id agents use to invoke it."],"R9Khdg":["Auto"],"RDjuBN":["Setup"],"RDrXh4":["Configure user, project, and integration settings."],"RG4XHV":["Copy ",["0"]," prompt"],"RGCCrg":["Copy share link"],"RGkNeJ":["Initialize a starter pack"],"RJ3a8Z":["Looking for <0>",["lookingForUrl"],"</0>."],"RMQe3p":["Are you sure you want to convert this file into a template? The original file will be deleted. This action cannot be undone."],"RN62Q8":["We'll build <0>openknowledge.skill</0>, save it to <1>~/Downloads</1>, and open the Claude Desktop App for you."],"RO-yts":["Failed to disable link previews — ",["detail"]],"RSqaSd":["Project root"],"RVZJWQ":["Search projects..."],"RXEbZy":["In app"],"RXNu_r":["Shared via git with everyone working on this project."],"RY6Bq1":["Open shared ",["targetNoun"]],"R_U_A4":["Add file or folder pattern, e.g. guides/**/*"],"RaPMZv":["Keyboard shortcuts available in the editor and workspace."],"Rah7yq":["What should the AI do? (optional)"],"Rb1zMa":["No excerpt"],"RcrskJ":["Formatting looked wrong"],"RfHNf8":["Open activity panel for ",["tooltipName"]],"RfaEio":["Toggle source comment"],"RfilGt":["No rules match your filters."],"RgbKEe":["You don't have access to this repository."],"RhX_1U":["Sent to <0>",["endpointHost"],"</0> to embed your content. Stored on this machine only (in <1>~/.ok/secrets.yml</1>), never in the project."],"Rj01Fz":["Links"],"RlCInP":["Slash commands"],"RlLl3G":["Actions for ",["0"]],"RmBY0A":["No git remote"],"RnrnTe":["Already set up — ok is available in your terminal"],"RoafuO":["Send feedback"],"RobAKV":["Update the destination and optional section anchor."],"Rq1vFD":["Tree view options"],"RrAIZx":["What config sharing covers"],"Rsdhj9":["Configuration warnings"],"Rx5ReQ":["Rename ",["keyName"]],"RyIKxy":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy, and that change hasn't synced yet."],"S33tz3":["Not connected"],"S48xcO":["pending"],"S60KvX":["Delete this conversation?"],"S6l5dv":["Could not start creating a new item"],"S9Vnum":["Remove ",["patternText"]],"S9t1PI":["Fixing ",["0"],"/",["1"]],"SCoBBH":["Tag suggestions"],"SCzAbA":[["phase"]," — ",["pct"],"%"],"SF9qpO":["Share your email for followups"],"SFN6dN":["Heading 3"],"SItQRc":["How do you like OpenKnowledge?"],"SOPwPh":["Restore to this edit"],"SQWJ-i":["Restore sessions"],"STOrpI":["lint"],"STTOnz":[["keyName"]," type: complex value (nested; read-only)"],"SUOoXn":["Failed to open project."],"SVLPt5":[["formatted"]," GitHub stars"],"SXCSQd":["Copied path"],"SYfHmN":["Unpin tab"],"Sc1bKE":["Local collaboration data for \\"",["docName"],"\\" could not be cleared in time. Reload to retry."],"ScwcF2":["A project already exists at this location. Pick a different parent folder."],"SfxQX8":["Writes a project-MCP config for each selected tool."],"SgKLfA":["Not connected to GitHub."],"Sh3Qkg":["No matching branches."],"Si7mIR":["Create report"],"SiFgBx":["docs matching ",["0"]],"SiUUCS":["Next match"],"SkMZlS":["Couldn't remove <0>",["targetGitPath"],"</0>: ",["removeGitError"]],"Skr_7L":["Search worktrees"],"SlfejT":["Error"],"Sq8lf2":["Editors to install skills into"],"SrOuyg":["Document panels"],"SvBFYA":["No recent projects"],"Sxx_Zz":["Follow is on for this worktree, inherited from ",["project"],". Change it in Settings → Sync."],"T-654M":["Loading PDF"],"T0OVm7":["The default branch is protected — pushes need a pull request."],"T3Mld1":["Window"],"T3j-7o":["e.g. Switching projects while a sync was running"],"TEEPPF":["Will replace existing OpenKnowledge entry"],"TJnkyf":["ok ui responded but server.lock has no port yet"],"TKQ7K-":["Install"],"TLIO3j":["Toggle italic formatting."],"TMLAx2":["Required"],"TQJCR6":[["0","plural",{"one":["#"," result"],"other":["#"," results"]}]],"TTDXD8":["New worktree…"],"TUzThQ":["Share skills"],"T_R-Qz":["Primary"],"T_wG4n":["We couldn't check your GitHub connection."],"Ta25TG":["No history yet"],"TbjyhA":["Docs"],"TdfEV7":["Archived"],"TdlVEN":["This field carries additional schema keywords the editor does not show — they are preserved on save."],"Te6sK2":["Heads up: editing any rule or option here creates a <0>.markdownlint.json</0> file in your project to save your changes."],"ThmUrC":["Could not finalize project setup. Try again."],"Tjc1pH":["Section <0>(optional heading anchor)</0>"],"TsZmgr":["The file on disk, and the id agents use."],"TvY_XA":["Documentation"],"TwYboS":["Navigate CodeMirror source search results or dismiss the search panel."],"Tz0i8g":["Settings"],"Tz4dq-":["This request is no longer active."],"Tz9pJB":["Clone stream ended unexpectedly — check if the clone completed"],"U0QBh4":["Not great"],"U2Kx6T":["Close all unpinned"],"U2pMtf":["tag-name"],"U3IvM5":["Full guide"],"U4nTfu":["Enable Follow"],"U5Spo9":["Content directory must be inside the project"],"U6wmNc":["Sync paused"],"U7HJ4y":["Managed by OpenKnowledge (read-only)"],"U88xbi":["Failed to create the schema file"],"U8CD-l":["Copy full path, No workspace"],"U9tm58":["Hide problem indicators"],"UBv8UK":["Delete Permanently"],"UDFrWm":["Checking GitHub connection..."],"UGeJuP":["Allowed values (empty = any)"],"UL8A9w":["Tag"],"ULRb5t":["Adds telemetry, server state, and runtime info when available. Document names are anonymized."],"UMrOy2":["Skill \\"",["trimmedName"],"\\" created"],"UPjaXD":["Couldn't duplicate \\"",["0"],"\\": ",["1"]],"UQAp48":["Search templates"],"UQMMvx":["Moved \\"",["name"],"\\" to ",["0"]],"URmyfc":["Details"],"UTNVyS":["Select the full source document."],"UTZ97u":["Selection must be inside the project"],"UTgWxm":["Nothing was uploaded. The report stays on this Mac until you email it to us."],"UVDasf":["Sync is off — your edits stay on this computer until you commit and push manually."],"UVLlMV":["Couldn't reach GitHub. Try again?"],"UW2Fg3":["This project's running server doesn't support live editing. Restart OpenKnowledge to fix."],"UW93oq":["Replace key"],"UYcGIW":["Connecting — waiting for collab server"],"Ua78MH":["no response"],"UaDyeb":["Hide selection preview"],"Uay5NL":["This ",["targetNoun"]," was added to branch <0>",["shareBranch"],"</0> recently. Switch and update to open it."],"Uci-Ph":["Ordered List"],"Ud0Pj9":["<0>Mirror source removed.</0> The doc <1>",["src"],"</1> is no longer available."],"UfW9Kr":["Your search queries and the full text of matching pages are sent to your embeddings provider (OpenAI by default) to compute embeddings."],"UhpfxY":["Pan left"],"UkQGhd":["Hide replace"],"Up2_7p":["Copy full path"],"UpCz01":["This doc"],"UuYo7g":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy. Please commit your changes or enable auto-sync."],"Uuj_R4":["New from template"],"Uw6ERJ":["Couldn't copy: ",["detail"]],"UyROxs":[["mins","plural",{"one":["#"," min ago"],"other":["#"," min ago"]}]],"V2Gmie":["These rules come from your project's <0>",["configFile"],"</0> file, which fully governs linting for this project. Turn rules on or off and edit their options here; changes write back to the file."],"V48OUT":["You deleted <0>",["filePath"],"</0> locally, but it was modified upstream."],"V7QxyT":["Connection dropped"],"VAHWL_":["Connected as <0>@",["signedInLogin"],"</0>"],"VBE2dw":["Build and keep track of the world behind your story. A home for your characters, places, factions, and the lore that ties them together, so details stay consistent as you write."],"VFQXPl":["External link previews show a card with the site name, page title, and description when you hover a link."],"VITWk5":["Managed by OpenKnowledge"],"VIwCaD":["Entry"],"VM7H66":["This file is binary and can't be shown as text."],"VNgKZz":["Advanced settings"],"VTulZj":["Open in worktree"],"VUijjF":["Embed an image with optional alt text."],"VYd_YA":["Open an existing project folder from disk."],"VZGh8G":["Fold, unfold, fold all, or unfold all source ranges."],"VZSBXL":["Semantic ranking activates the first time an agent runs a search."],"V_6bJ4":["Terminal settings not loaded yet — try again in a moment."],"V_wltx":["Enter a title for this template."],"Va3xJe":["Add field"],"VbqhBI":["Already at ",["assetContentPath"]," — reusing."],"VcqWBy":["Upload may have succeeded but the sidebar is out of date — refresh to resync"],"VdXv4D":["Clone from GitHub"],"Vftef5":["Common markdown issues — hard tabs, heading increments, list markers, and more."],"Vlc75q":["Keep file deleted"],"VsaI0G":[["folderCount","plural",{"one":["folder"],"other":["folders"]}]],"VuxVSP":["Start source completion"],"VvS_k_":["Config sharing is now local-only."],"VxO6wR":["Delete selected files or folders"],"VzGJRl":["Add link"],"W-ntoW":["heading-slug"],"W0i24j":["Object"],"W1SI2K":[["0","plural",{"one":["#"," warning"],"other":["#"," warnings"]}]],"W1qRuM":["This document is already active in the editor. Use Open to collapse the graph."],"W5A0Ly":["An unexpected error occurred."],"W7XJN4":["Can't nest projects. An OpenKnowledge project already exists at <0>",["rootPath"],"</0>. Choose a location outside it, or open that project instead."],"W8vpBM":["starter pack"],"W9_Bub":["Local changes overlap with incoming sync"],"WFEbV1":["Flag common markdown issues in the editor. Powered by <0>markdownlint<1/></0>."],"WHPvOb":["All files are hidden by view filters."],"WJjviG":["What to include"],"WL6puM":["Path resolves outside project"],"WMCwmR":["Check for updates"],"WMIKXK":["Are you sure you want to delete ",["targetCount"]," selected items? Folders and all files inside them will be deleted. This action cannot be undone."],"WPwDin":["Open folder on disk"],"WR0y2O":["Share folder"],"WRNXKp":["Searching"],"WRdYfS":["Refresh audit"],"WWcqsG":["Start here: what this is and how it's organized."],"WZ-vBy":["Permanently deletes <0>",["targetGitPath"],"</0> and all its git history. Working files stay in place. If the parent git repo is intentional (e.g. you cloned it), cancel and pick a location outside it."],"Waiy-j":["The agent's persona, values, and voice."],"WamGNs":["Failed to load PDF: ",["error"]],"WcWS__":["Download file"],"Wcv-Zi":["Make this knowledge base available as a Claude Skill."],"We7h2I":["📝 or assets/icon.png"],"Weq9zb":["General"],"Wfy3rU":["Agent settings"],"Wgmlsw":["Fetching"],"Wh0im4":["editing [[",["realCurrentDoc"],"]]"],"WhOsNE":["Strikethrough"],"Wi-VWy":["Couldn't send the report"],"WkTLN7":["Show only markdown files"],"WmPbvm":["Get product updates in your inbox."],"Wq6Wcm":["Please enter a valid email address."],"WqLq6M":["Open with AI ",["displayName"]],"Wtw22s":["Installing"],"WuntOK":["Preview of the screenshot"],"WyQxwa":["Connect this project to GitHub to share."],"WyXG7w":["Close all"],"Wyxs0x":["Path cannot contain \\"..\\""],"X0ttSN":["No tags match \\"",["tagListQuery"],"\\"."],"X7u0xR":[["0"]," templates available"],"X8kjQX":["Re-authenticate with GitHub"],"X9VpsP":["Loading folder contents"],"XAyxsa":["Check out remote branch"],"XDzAnp":["Opens in a new tab"],"XH30C4":["document"],"XJOV1Y":["Activity"],"XNBGZw":["Message not sent: ",["0"]],"XPJ0sN":[["settingsDescriptorLabel"]," properties"],"XPqe3B":["Create new tag #",["tagValue"]],"XQkJlB":["No open conversations. Reopen a past one, or start a session with the + button."],"XRuL0i":["Create page"],"XT-L4j":["Turn on an agent to create with AI"],"XU0OXn":["Enable auto-sync"],"XU5AOg":["Input"],"XV5sC0":["Open worktree"],"XW18jo":["Page headings response did not match success schema"],"XYlJJT":["Setting up"],"XZkdtg":["Switch branch"],"XcGbim":["Show hidden files"],"Xet9MX":["Failed to load backlinks"],"Xewl6B":["Your local copy is behind. Pull the latest changes, then open the link again."],"XfzqjK":["template \\"",["name"],"\\""],"Xg-Ntj":["The token needs the repo and read:user scopes."],"Xisk4u":["Edited ",["editedAgo"]],"Xk0-VC":["Previews of links to other documents in this project are always on and read from the local index — nothing leaves your computer for those."],"XklovM":["Working…"],"Xl-UUg":["guides/install or https://example.com"],"XmJfZT":["name"],"XnlF3W":["Add the next matching source selection."],"XopE_I":["Failed to parse backlinks error response (HTTP ",["status"],")"],"XpIZmv":["Fenced code block with monospace text."],"XqNHcm":["Couldn't update skill targets: ",["0"]],"XtRoxT":["Page ",["pageNumber"]],"XuQzrk":["Couldn't restart the server — another process owns it. Quit other OpenKnowledge windows for this project, then try again."],"Xv_ijG":["https://github.com/owner/repo or owner/repo"],"Xw_maT":["Type a query, then press ↵ to search your pages by meaning."],"Xwump4":["no git repository here"],"XyOUTJ":["Exit merge"],"Xzy0s0":["Remove ",["fullLabel"]," from context"],"Y-Urt2":["Block math equation rendered with KaTeX from a LaTeX source string."],"Y1QMlM":["Get set up"],"Y1kX2z":["OpenKnowledge initializes at <0>",["projectDir"],"</0> — the parent of <1>",["pickedRelative"],"</1> because it contains a <2>.git</2> folder (one .ok/ per git repo). <3>Content directory</3> defaults to <4>.</4> (the whole repo); type a sub-folder to narrow it."],"Y2tU6I":["Delete ",["0"]],"Y6PKd1":["Remove ",["name"]," from recent projects"],"Y6SK9K":["Show source"],"Y8ViJx":["A newer version may have been deployed since this tab opened."],"YBt9YP":["Beta"],"YC6_wP":["Edit ",["keyName"]],"YDL7N6":["Lint plugins — which rule families run and their per-rule settings — are configured on their own tab under This project → Plugins."],"YEIS9T":["Edits apply live. Light or dark is chosen from the background."],"YEP3X2":["Delete a table when the active table cell selection covers the full table."],"YGIi_c":["Reinstall"],"YGNRB5":["— except"],"YJ1BTp":["A skill with that name already exists."],"YJPN3F":["Too slow"],"YKLP_-":["Template renamed"],"YLMBSd":["e.g. The editor froze after I pasted a large table"],"YPFBfr":[["detail"]," - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"YRavYS":["A personal color-theme picker — not shared with your project. When on, it appears under Plugins in the sidebar."],"YSFv5w":["No git repository — config sharing does not apply here."],"YTLmTM":["Remove the parent <0>.git</0> folder"],"YW7Q86":["Search settings not yet loaded — try again in a moment"],"Y_GpJd":["The ",["0"]," download request timed out."],"Y_ZQ6l":["Installing ",["agentName"],"…"],"Y_kL7X":["Customize how the editor looks and behaves."],"YaeyFh":["Pulls may overwrite uncommitted edits in your local files."],"Yea-K5":["Restore to this point"],"Yi0VMG":["Upload ",["keyName"]],"YjMLg2":["Off — external links show only their URL. No requests leave this computer."],"YjhKI5":["Cloning..."],"YlDuro":["Fit height"],"YsEYYS":[["behind","plural",{"one":["#"," commit behind"],"other":["#"," commits behind"]}]],"YwPUUP":["This pack is already set up here."],"YyXtnN":["Underline"],"Z1LF1M":["Sharing a doc needs a GitHub repository. Create one for this project."],"Z2M5XM":["Reason: ",["reason"]," (",["osDetail"],")"],"Z3FXyt":["Loading..."],"Z5h97D":["Hide files and folders from your knowledge base. Hidden items don’t appear in the file tree, search, or AI tools. <0>Learn more about patterns</0>."],"Z6rrjc":["No <0>.markdownlint.*</0> file yet — every rule runs on the same defaults as the VS Code markdownlint extension: all on, except line length."],"Z79bnE":["View diff for edit ",["burstNumber"]," of ",["docName"]],"Z7x_Zh":["Git needs ",["tool"]," for this repository, but it isn't installed or couldn't be found. Install it, then try again."],"Z8KDox":["Enter a folder name (e.g. brain)."],"Z8lGw6":["Share"],"ZARuZJ":["Couldn't load files"],"ZBt4rI":["Instruction for the AI"],"ZBxvV3":["New Terminal"],"ZI8uvA":["No problems found."],"ZNK2Tq":["root"],"ZQJ1IV":["Activate the last editor tab."],"ZQLDTl":["created folder"],"ZU8VV_":["Remove failed: ",["error"]],"ZVOhXM":["Failed to update sync — ",["detail"]],"ZW3mlR":["Diff render mode"],"ZWgr0b":["In a subfolder"],"ZWolSV":["You picked the filesystem root (/). Scaffolding here will scan every file on this machine — make sure that's what you want."],"ZWwYwM":["Base branch"],"ZWxfrc":["cleared folder properties"],"ZWyHmq":["This project"],"ZYtq3m":["Connect the AI tools you use to this specific project. These files live in the project folder, so anyone who opens it gets the same setup."],"ZatAO_":["Failed to enable link previews — ",["detail"]],"Zf0w-R":["Take a piece of writing from a rough idea to a finished draft to something you're ready to share. Good for blog posts, essays, or anything you want to move through clear stages."],"ZgGuA4":[["0","plural",{"one":["File"],"other":["Files"]}]],"ZgJVnp":["Check spelling while typing"],"Zhe80e":["Restore to edit ",["burstNumber"]," of ",["docName"]],"ZhhOwV":["Quote"],"ZjtgI-":["Command palette"],"ZoOlzR":["App & system info and recent app logs. No project is open, so project logs aren't included."],"Zon_qG":["Mirror source <0>",["label"],"</0>"],"ZptNUh":["Show ",["hidden"]," more"],"ZsGpr_":["Paste link"],"Zue_jx":["Your GitHub token is missing required scopes. Try signing in again."],"Zul8Ry":["never"],"ZvzbDF":["Add it directly to this project."],"ZxXhLY":["Hide Files (",["sidebarShortcut"],")"],"Zz25kq":["Show Files (",["sidebarShortcut"],")"],"_0JUKX":["Bug reporting needs the OpenKnowledge desktop app."],"_5qBNl":["AI tools & CLI"],"_6FVBz":["Jump to tab 1-8"],"_7UQ7y":["Whole word"],"_8quCH":["From template"],"_902BE":["This ",["targetNoun"]," was shared from branch <0>",["shareBranch"],"</0>. You're currently on <1>",["currentLabel"],"</1>."],"_FLBbi":[["sizeText"]," · secrets redacted · crash dump not redacted"],"_GRWOJ":["Change the embeddings provider?"],"_IGfXZ":["OpenKnowledge quit unexpectedly last time."],"_IX_7x":["Other"],"_JOGC0":["Send feedback…"],"_LczaQ":["Denied — ",["optionName"]],"_NWEid":["Search schema files by path"],"_NX6gG":["Managing project AI tools is unavailable in this build."],"_PACVa":["Release notes"],"_PBJRl":["Add at least one letter or number."],"_Pmhxt":["… earlier output trimmed"],"_QwkMu":["No matching paths"],"_RcqUM":["You picked your home directory. OpenKnowledge will index everything in your home tree — large and may surface personal files."],"_SDGzH":["Continue in browser"],"_TDESN":["Network error - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"_TF8ep":["Failed to render PDF"],"_W-elG":["(inline)"],"_WPP7e":["Read-only copy of a MirrorSource block from another doc. Edit at the source and it updates live."],"_XWY2J":["Terminal disabled"],"_ayOfA":["A knowledge base that follows Google's Open Knowledge Format, a shared way of organizing what you know. Pick this if you want your notes to work well with other tools that understand the format."],"_azghp":["Previous change"],"_bth6g":["Claude Code is installed, but OpenKnowledge tools aren't connected to it yet."],"_eguJc":["Uploading"],"_gO_m8":["Waiting for your approval"],"_gkGSK":["deleted template"],"_hPpdX":["Skill renamed"],"_pY_Vq":["The repository was moved, renamed, or deleted."],"_qD6mn":["Pick the folder where you've cloned it."],"_rP3HI":[["minutes"],"m ago"],"_tekeB":["updated folder properties"],"_tjopj":["Paste duplicate"],"_yB-24":["everything under any ",["0"],"/ folder"],"a-cKXz":["Select all source"],"a3H_MR":["Open and focus the Ask AI composer for the current editor selection."],"a45f2c":["Glob patterns this schema applies to"],"a4FRQv":["Undo to this edit?"],"a5Gha5":["Local changes blocked the merge"],"a5W0q0":["Are you sure you want to delete ",["folderName"],"/ and all files inside? This action cannot be undone."],"a7P3nH":["Personal to this device — stored in your user config, not shared."],"a9OzSn":["No pages found for \\"",["trimmedQuery"],"\\""],"aBgwis":["Scope"],"aByJ8j":["How does sharing work?"],"aCoQfY":["New changes from your remote appear in your copy automatically."],"aE2_XM":["One pattern per line — appended to <0>.okignore</0>."],"aENGMB":["Semantic search adds meaning-based ranking to the search tool so conceptually-related pages surface even without shared keywords."],"aHPdYV":["Go to line ",["displayLine"]],"aM23Wr":["page-name"],"aOp3hw":["Couldn't move to Trash"],"aQD_86":["Failed to update the embeddings provider — ",["detail"]],"aRI3Om":["Close Window"],"aWlJai":["Starting sign-in flow"],"a_u4ck":["Loading tags"],"aaE55D":["Clear ",["keyName"]],"aaI6cN":["Couldn't connect to the agent service. Make sure the OpenKnowledge server is running and up to date (restart it if it was already running), then try again."],"aalx4E":["Editing broken MDX source: ",["reason"]],"abiHje":["Delete selected items"],"adsMWO":["Resolving deltas"],"aiArms":["We couldn't clone this repository."],"ajHi4O":["Auto-sync is paused — you don't have permission to push to this repo. Switch to Follow to keep receiving updates."],"ajz9F8":["Couldn't load conflict content for ",["filePath"],". Try reloading the page."],"ak4LLg":["Clear menu"],"anmUZq":["Missing a feature"],"aoa6xA":["network error (is \`ok ui\` running?)"],"arUUsK":["Product updates"],"ax9kie":["Link preview settings not yet loaded — try again in a moment"],"az8lvo":["Off"],"b18t0_":["Close diff"],"b3Thhd":["Upload failed"],"b4AQFK":["Open activity panel for ",["tooltipName"],", editing ",["realCurrentDoc"]],"b4VvP-":["Existing branch <0>",["trimmed"],"</0> will be checked out into its own window, under <1>.ok/worktrees/</1>."],"b4itZn":["Working"],"b5aNbi":["The ",["targetNoun"]," could not be opened — try navigating to it manually."],"b6Fgpe":["Each pack scaffolds your project with ready-made folders and templates."],"bBE5tC":["Detected on this machine"],"bBcFK_":["Open emoji picker for ",["keyName"]],"bD8I7O":["Complete"],"bF22t6":["Remove field ",["field"]],"bGa3Fk":["Uploading file"],"bH382I":["Edit this HTML — the preview updates live."],"bSD4im":["Search worktrees and branches"],"bS_boY":["Replace current match"],"bUUVED":["Asset"],"bV6DJA":["Who you are, so the agent has your context."],"bWLmRK":["Could not fetch branch. Check your connection."],"ba3vIW":[["templateCount","plural",{"one":["template"],"other":["templates"]}]],"bbJ-VR":["Zoom Out"],"bcDHUM":[["descriptorLabel"]," — render error, source editable below"],"bcjYUA":["Fold or unfold source"],"bkQRMh":["Paragraph"],"blFttG":["Search projects"],"bmC18N":["Clearing local collaboration data for \\"",["docName"],"\\" before reconnecting."],"brCtGB":["History unavailable"],"bultyE":["When enabled, the agent opens or refreshes the preview after each edit. Disable if you manage your own preview window (OK Desktop, a browser tab on another display, etc.)."],"bwil08":["Building <0>openknowledge.skill</0> and opening the Claude Desktop App"],"c1LZZH":["Link copied."],"c3XJ18":["Help"],"c3ZGrq":["the doc ",["0"]],"c4fVUV":["Fix"],"c5PTFE":["Dev instance: ",["label"]," (isolated from other worktrees)"],"c5f7sm":["Code block language: ",["currentLabel"],". Click to change."],"c5rF4v":["What is this knowledge base for?"],"c863eW":["Could not switch to ",["shareBranch"],". Try switching manually."],"c8iK2Y":["No templates found."],"c8jBgX":["Checking for updates on GitHub"],"cCd8Bs":["Cut"],"cD3aew":["Re-embedding happens as searches run, so coverage restarts at zero and refills."],"cEoyWz":["Add item to ",["keyName"]],"cF9DyA":["Reconnecting after server restart"],"cFCKYZ":["Deny"],"cGV6Mh":["Show a preview card when you hover an external link in the editor. This setting applies only to this computer."],"cHhH3i":["a required git tool"],"cIptmH":["In the Claude Desktop App"],"cKjLuT":["(project + user)"],"cN1Gcp":["A worktree folder for ",["shareBranch"]," already exists."],"cOJyVj":["Disable Themes"],"cOSAfL":["No repositories found on your GitHub account."],"cOrTMo":["Your share link is ready below."],"cRHuuI":["Couldn't copy path"],"cRm498":["No schema files in this project yet — create one to start validating."],"cSCbv3":["BETA"],"cUK8lW":[["conflictCount","plural",{"one":["#"," conflict"],"other":["#"," conflicts"]}]],"cUk6TF":["Sync failed — check the server logs for details."],"cV7LOw":["Team Wiki"],"cZGNlb":["Add another pattern"],"cZI5AL":["OK Desktop"],"cZ_8zB":["Stays on this computer."],"caw8gO":[["strandedCommitCount","plural",{"one":["You have 1 change you haven't shared. It will stay on this computer."],"other":["You have ","#"," changes you haven't shared. They will stay on this computer."]}]],"ccNps_":["Only modified"],"cd5EXh":["Report a bug"],"cdm00A":["No Incoming"],"cdmk8A":["Uncommitted changes"],"cgl-gn":["Connected to GitHub"],"chL5IG":["Community"],"cklVjM":["Timeline"],"cn1sLi":["Couldn't connect OpenKnowledge tools to Claude Code. Please try again."],"cnGeoo":["Delete"],"cqQyPB":["Folder name"],"crqzW5":["AI tools"],"cs4mps":["Config sharing"],"csDS2L":["Available"],"cstC0z":["Pattern (regex)"],"ct2kv5":["No headings in ",["pageTarget"]],"cuA8QW":["Organize specs"],"d1JjXo":["Your local copy of branch <0>",["branch"],"</0> is behind. Pull the latest changes, then open the link again."],"d2uTPx":["Server error (HTTP ",["status"],")"],"d5rK4X":[["chars","plural",{"one":["char"],"other":["chars"]}]],"dCIGNG":["Border"],"dD7NPy":["Outline"],"dDpCOp":["Rename succeeded but the sidebar may be out of date — refresh to resync"],"dEgA5A":["Cancel"],"dGAdpH":["New branch <0>",["trimmed"],"</0> will be created from <1>",["currentBaseLabel"],"</1>, in its own worktree under <2>.ok/worktrees/</2>."],"dIYSqk":["remote"],"dJw2_7":["Saved with the project for your team."],"dMsx3p":["Home page and navigation hub."],"dNM58w":["Claude Code (claude) isn't installed or on your PATH."],"dOHMA0":["Failed to move"],"dOxPd4":["Footnote"],"dPOFid":["Show or hide terminal"],"dQHSCs":["Convert (delete original)"],"dTaauv":["Reason: ",["reason"]],"dUCQo4":["Renamed to \\"",["trimmed"],"\\""],"dUQ7_J":["Add meaning-based ranking to search so conceptually-related pages surface even when they share no keywords. This setting applies only to this computer."],"dURmlQ":["\\"frontmatter\\" is a reserved property name"],"dVaXnv":["Content rules not yet loaded — try again in a moment"],"dXCi3J":["Something broke"],"dXWMFn":["Removes this skill from your editors."],"dYCvMf":["Couldn't resume this conversation: ",["0"]],"darW93":[["pageCount","plural",{"one":["The full text of your 1 page will be sent to <0>",["host"],"</0> as it is re-embedded."],"other":["The full text of all ",["pageCount"]," pages will be sent to <1>",["host"],"</1> as they are re-embedded."]}]],"dbapvC":["Follow us on social media"],"dbhUX1":["Hide this file"],"dbtjJh":["(opens in new tab)"],"djc1l9":["More than ",["0"]," requests were blocked by the preview's security policy"],"djjdjr":[["deleteCount","plural",{"one":["Delete"],"other":["Delete ","#"," items"]}]],"dprWmL":["Anchor in this page"],"dr1vFs":["Replace all matches"],"dw_3cv":["Rename skill"],"dw_dUJ":["Failed to duplicate path"],"dx-TwN":["Running project audit"],"e0NrBM":["Project"],"e1Rn_k":["Open containing folder"],"e1hptq":["Embed a video with native player controls."],"e2zZ3E":["Test connection"],"e4FxjG":["See all ",["0"]," starter packs"],"e4GHWP":["Pull"],"e4PbgC":["Duplicate the file-tree item copied from the Files sidebar."],"e60wew":["Allowed element values for ",["field"]],"e8L17t":["A non-empty folder already exists at this path. Pick a different folder."],"e8zRrb":["Show Files"],"e8zYa8":["Could not open ",["shareBranch"]," in a worktree. Try again."],"e9sHSO":["Pick up where you left off"],"eBIT9h":["Paste failed.",["restoreSuffix"]],"eFJkVt":["Clone failed: ",["cloneError"]],"eG8Jsg":["Toggle source tab focus mode"],"eGUbmF":["Copy selected file or folder"],"eJitUk":["Upload from computer"],"eKThTQ":["Failed to reorder"],"eNQGRb":["Inline LaTeX math rendered with KaTeX."],"ePK91l":["Edit"],"eQkgKV":["Installed"],"eQxm13":["Failed to update attachment location — ",["detail"]],"eTL5y9":["Show selection preview"],"eTsJYJ":["description"],"eVPynQ":["Open <0><1>",["verificationUri"],"</1><2/></0> and enter this code:"],"el312q":["Install skills into"],"emgiet":["Authoritative content; mirrored verbatim everywhere it's referenced."],"enPTnx":["line ",["displayLine"]],"eneWvv":["Draft"],"epuNYK":["Mark a block as the source of truth. Mirrors elsewhere update live as you edit it."],"euc6Ns":["Duplicate"],"evHlIg":["Follow never pushes or commits your local changes. They stay only on this machine."],"evs0iw":["Tags matching \\"",["tagListQuery"],"\\""],"ezUmoU":["Allowed element values (empty = any)"],"f1XQyZ":["Move block"],"f3Nvg7":[["0"]," can't continue this conversation — the transcript is kept, but the agent session is gone."],"f65AOQ":["Start from"],"f8jU-L":[["0"],"/",["1"]," — ",["2"]],"f9lQNJ":["Adds a managed block to"],"fBHvBn":["There's no project folder for this window, so a terminal can't start here."],"fG0X0e":["Install ",["brand"]," →"],"fIgqfQ":["Reinstalling"],"fJ3EbT":["Themes"],"fJgQHX":["Failed to create file"],"fNr-MX":["Disable semantic search"],"fR-Kdc":["(project-level only)"],"fSRzLo":["Show document panel"],"fVcm9t":[["0","plural",{"one":["#"," doc"],"other":["#"," docs"]}]],"fWi7pn":["Initialize starter pack"],"fWsBTs":["Something went wrong. Please try again."],"fYKgzG":["Failed to load recent projects."],"fYjgXu":["Unordered list of items."],"fZj9em":["Fix ",["flatId"]],"f_PkYv":["Restarting closes this project's server. Connected agents (Claude Code, Codex, Cursor) will see their OpenKnowledge MCP connection close unexpectedly — you may need to restart the agent, or toggle its OpenKnowledge MCP server off and on, to reconnect."],"fbdLmk":["Toggle bold formatting."],"fbsiBw":["Something went wrong starting the terminal."],"fcgvCA":["Claude"],"fiMNLl":["Sync settings not yet loaded — try again in a moment"],"fj5YiP":["Downloads a fresh copy from GitHub."],"fnlBN4":["Auto-approve settings not yet loaded — try again in a moment"],"fo0VXg":["Uninstall"],"fqSfXY":["Replace"],"fru3T7":["Could not fix ",["0"]," of ",["1"]," files."],"ft-BOm":["Report a bug…"],"fuJZKk":["Search branches"],"fwhX-N":["Indent or outdent source"],"fwrPh4":["Please enter a valid email."],"fxJk_6":["<0>Have more to add?</0> Write to <1/> and mention your reference."],"fxbCNQ":["Synced. The link is up to date."],"g2Tj8R":["Full"],"g3UF2V":["Accept"],"g4WlQK":["Project AI tool management is only available in the OpenKnowledge desktop app."],"g4XBm0":["Small section heading."],"g4e0hS":["Ask ",["agentName"]],"g58Kwy":["<",["descriptorLabel"],"> failed to render (likely a bad prop). Copy the source to see what went wrong, or delete the block."],"g85bAo":["Synced ",["lastSyncedRelative"]],"gBbxn_":["Checking sign-in status"],"gGVP4q":["Click <0>+</0> <1/> <2>Create skill</2> <3/> <4>Upload skill</4>."],"gHSAWT":["Create worktree <0>“<1>",["typedName"],"</1>”</0>"],"gITz7o":["Move the cursor or extend selection through CodeMirror's standard source-editor navigation keymap."],"gJR87V":["Could not create the project folder. Pick a different folder."],"gKi-a_":["New project"],"gOD68k":["Open a single markdown file — no project setup."],"gQV-9w":["Branch switched but the ",["targetNoun"]," could not be opened — try navigating to it manually."],"gUlRQj":["Orphans"],"gYz2ep":["Expires in ",["timeLabel"]],"gZElfU":["Fixing ",["0"]," of ",["1"]," files"],"gbHcbI":["Failed to delete property"],"geIbmI":["Reset ",["file"]," to default"],"gfdqcY":["Couldn't apply the change: ",["0"]],"gfohmY":["Connect tools"],"ggm6JX":["This page doesn't exist yet. Open it to create the page in the editor and collapse the graph."],"ggs9f8":["Search files, folders, or commands"],"gh27t1":["Link previews"],"gijbne":["Failed to rename path"],"gk_-qj":["Couldn't rename template: ",["0"]],"gljvbT":[["words","plural",{"one":["word"],"other":["words"]}]],"glzsS_":["Pan right"],"gmJ0An":["Failed to open folder."],"goO4Ll":["Editor status bar"],"gp3I7-":["Before syncing, set your identity for git commits:"],"gtEbeW":["Highlight"],"gtGQ9S":["Start ",["agentName"],", ",["hint"]],"gvApb7":["Turn the things you read into clear, trusted articles. Save a source, figure out what it means, then keep the final version so you can rely on it later."],"gwykHF":["This doc hasn't synced to GitHub yet. The link will work after the next sync."],"h-AdvS":["The folders and templates are already here, so there's nothing to add."],"h06R3C":["No pages are missing outgoing graph links."],"h16FyT":["Lists"],"h3QZcB":["A branch named ",["shareBranch"]," already exists. Open its worktree from the switcher instead."],"h7FzJC":["Link-graph response did not match expected shape."],"h9QFb9":["Skill \\"",["0"],"\\" deleted"],"hBMK4W":["Project templates"],"hCOLSd":["Keep a written record of how your product gets built. A home for proposing ideas, recording decisions, writing specs, and capturing what you learned after something broke."],"hDEaQu":["Connect OpenKnowledge to other tools you use."],"hDKtoF":[["diffHrs"],"h ago"],"hDoLrm":["Remove ",["projectName"]," from recent projects"],"hGmuTc":["Docs tagged #",["tagDocsName"]],"hHMv6l":["Delete block"],"hItdtk":["Browse folder"],"hLKfZe":["Use a token instead"],"hLod4_":["Convert to template"],"hLy8b1":["Updated to Version ",["version"]],"hQXiDc":["Search branches..."],"hSBIG-":["A title, description, tags — anything that describes this folder."],"hSySVc":["Install handoff failed: ",["msg"]],"hXUWyd":["Value is required"],"hXbSxc":["Asset: ",["title"]],"hY8pka":["Select next occurrence"],"hYDc6B":["Name cannot be empty"],"hYgDIe":["Create"],"hZoBHK":["Empty starting content"],"haHgQj":["Copied relative path"],"habOU_":["Failed to update the auto-approve setting — ",["detail"]],"he3ygx":["Copy"],"hgtsat":["Failed to delete ",["file"]],"hh4mVC":["Ask AI to fix ",["flatId"]],"hjO0Mq":["Add tab"],"hmYd9H":["Keep track of the people and companies you work with and the meetings you have with them. Good for remembering who someone is, how you know them, and what you last talked about."],"hnq8fP":["Remove ",["label"]," from context"],"hpDtUm":["External wiki link"],"hpzRlK":["Reopen closed tab"],"hvZwVx":["Convert"],"hwFOFD":["Settings failed to load"],"hxBHxQ":["A line with a footnote<0><1>[1]</1></0> and a definition shown below."],"hxEUVJ":["Initialize ",["selectedPackName"]],"hxYFzm":["Full sync — your commits push and remote changes pull automatically."],"hyCxJY":["Open that worktree instead"],"hynz2K":["Download started"],"i-ShMB":["Diagram"],"i09An-":["Restored an earlier version (",["0"],")"],"i1flq_":["Wiki link suggestions"],"i3f2kh":["No matching commands."],"i6ng22":["Switch to Follow"],"i92eAT":["We'll create a repository and start syncing — no terminal needed."],"i9OyGp":["Undo or redo"],"i9TPUi":["This ",["targetNoun"]," isn't on branch <0>",["branch"],"</0>. It may not have been pushed yet."],"i9toLO":["Agent configuration file"],"iAoh55":["Update \\"",["0"],"\\"?"],"iDZtvM":["Failed to load templates: ",["message"]],"iEQQyu":["Agent"],"iEYxO4":["Show thumbnails"],"iGCs04":["No templates available"],"iH8pgl":["Back"],"iHAJDj":["Resolving default location"],"iIaSUD":["Whitespace"],"iKSP5j":["Word wrap"],"iKZkk1":["Property value"],"iMYFJM":["This window can't store a token — open Settings from the main app window."],"iMkWoF":["Turn on"],"iO8V-7":["Create worktree"],"iOHg1t":["Open embedded URL in new tab"],"iRdfLr":["Dev instance: ",["label"]],"iSLIjg":["Connect"],"iSQTsg":["Ordered list"],"iSnkwB":["Failed to open cloned project."],"iTylMl":["Templates"],"iXTp5j":["Scope: "],"idD8Ev":["Saved"],"idni-S":["Values for ",["keyName"]],"ig5vUe":["Failed to load file"],"ii5mVn":["Report this error"],"iilQXA":["Folder duplicated"],"ijLc3m":["Bullet list"],"ilodsp":["Let agents use OpenKnowledge without asking"],"ioMn4Z":["New from Template…"],"ipn17C":["The <0>type</0> every document created from this template gets (e.g. <1>research-note</1>). Keeps new docs Open Knowledge Format–conformant."],"iqIDv4":["Sync status unavailable"],"iqugog":["Initialize failed: ",["errorDetail"]],"irFGwu":["Template list"],"irrm_E":["Remove selection"],"isRobC":["New"],"itxlnr":["Setup files include: <0>.ok/</0>, AI-tool MCP configs (<1>.mcp.json</1> and per-tool files), project skills.<2/><3>Shared</3> commits them to git, so anyone who clones the repo gets the same setup. <4/><5>Local only</5> keeps them out of git (via <6>.git/info/exclude</6>)."],"iuTKci":["No edits yet."],"iv452l":["Documentation for ",["0"]," (opens in browser)"],"iy64Li":["Full sync — your edits are committed and pushed to your remote automatically."],"iycx_A":["Pushing"],"j5CWO4":["Up to date"],"j9Vqvc":["inherited"],"j9tqwO":["Not in sidebar"],"jAMpHn":["What is a starter pack?"],"jBVUXo":["Couldn't open the terminal — please try again."],"jC8LSZ":["Reset view filters"],"jEZ6Lf":["provisional"],"jEdF24":["Missing page: ",["linkTitle"],". Click to create."],"jKd3AP":["Could not enable the terminal: ",["0"]],"jL3gox":["Select a value"],"jPUPvG":["Couldn't resolve the conflict for ",["filePath"],"."],"jRAGrQ":["Configure agents"],"jRHdCz":["Failed to load PDF"],"jSO1X5":["Inherited templates can't be renamed here — rename it in the folder that owns it."],"jSY41h":["\\"",["docName"],"\\" took too long. Check your connection."],"jTLWxh":["Embed an external page in an inline iframe (docs, demos, Figma, CodeSandbox)."],"jX0IPx":["A skill with this name already exists."],"jZ_E5M":["Fetch failed — check the server logs for details."],"j_Z6g7":["Shared default"],"jbSG8V":["Show Files (",["sidebarShortcutLabel"],")"],"jdGUeI":["Couldn't create template: ",["error"]],"jeJexw":["Couldn't finish installing ",["0"]," — see below."],"jerqF0":["Loading branch state"],"jhtG3I":[" Your selection has been restored."],"jjtmV_":["First file name"],"jnCROW":["A memory snapshot from the crash, and the artifact that helps us most. It can contain document content and can't be redacted, so uncheck it if you'd rather not share it."],"jol95m":["Failed to open Project Navigator."],"jpctdh":["View"],"jtg_8-":["Build a knowledge wiki about the different types of flightless birds. Start with an overview page, then add cross-linked pages for each major group (ratites like ostriches, emus, and kiwis; penguins; and flightless rails), the regions they live in, and a timeline of how flightlessness evolved."],"ju38ms":["This project has no git repository — sharing mode does not apply. Initialize a repo to enable the toggle."],"jwnpdM":["A template named <0>",["trimmedSlug"],"</0> already exists here. Saving creates a local copy that overrides it for this folder."],"jxtXZI":["Install the gh CLI"],"k0dL2I":["Reconnecting to the agent service…"],"k0vc0N":["New terminal tab"],"k2fEi7":["User plugins are personal to this device — turn them on or off here. The choice lives in your user config and is never committed to the project. Each enabled plugin gets its own page under Plugins in the settings sidebar."],"k4CuuV":["Ready-made folders and templates to get you started quickly. Select a pack to preview what gets created, then add it to your project."],"k7Hoig":["No content changes at this version."],"k8xtrB":["Not required for a localhost endpoint like <0>",["endpointHost"],"</0> — most local servers ignore it. Add one only if yours needs it."],"kCNU4q":["Indexing your pages — ",["semanticIndexedCount"]," of ",["semanticTotalCount"]," ready. Results may be incomplete."],"kCqCyf":["Open CodeMirror's lint diagnostics panel."],"kDwcbW":["Go to line ",["displayLine"]," in ",["0"]],"kFLlsI":["Insert a footnote reference + matching definition stub."],"kLv8d3":["Your copy of branch <0>",["shareBranch"],"</0> has changes that aren't on GitHub. The ",["targetNoun"]," will appear once the branch syncs."],"kNqMMd":["Folder"],"kRTXGw":["Point semantic search at any OpenAI-compatible embeddings endpoint — a self-hosted server or another provider. The API key above is for whichever endpoint you set here."],"kUn-CN":["Sync off"],"kV2YZv":["Don't see <0>Skills</0>? Enable <1>Settings <2/> Capabilities <3/> Code execution and file creation</1> first."],"kYL1lH":["Agent activity"],"k_Dqw1":[["0","plural",{"one":["No problems across ","#"," document."],"other":["No problems across ","#"," documents."]}]],"k_pade":["Config sharing is now shared. Commit the OK files to share with your team."],"k_yIIc":["Will be created at: <0>",["targetPreview"],"</0>"],"ka6Eke":["Open file on disk"],"kdzzOK":["Off — search ranks by keyword only. No content leaves this computer."],"keNFEd":["Set identity"],"khCa4M":["Teaches coding agents in this project to read and write through OpenKnowledge."],"kj9pAE":["Creating page"],"kknhfj":["No changes"],"klPS-L":["Original file — before this agent's edits."],"kmKqZg":["Clusters"],"knjOzA":["Tag value"],"ko386X":["A document has a conflict — resolve it to keep it up to date."],"kolRU1":["Do you want to permanently delete instead?"],"kooyLJ":["Failed to rename the field"],"kpqWwG":["This ",["targetNoun"]," was removed from branch <0>",["branch"],"</0>."],"ktspdq":["Tint and badge files that have lint or link problems, without opening them."],"ku0yLQ":["Pages are embedded the first time a search needs them."],"ky9Tuc":["Edit ",["0"]," source"],"l-4nnw":["Search rules"],"l17ab4":["Could not write project files. Try a different location."],"l1aQKz":["Visual editor table"],"l1l8sj":[["0"],"d ago"],"l3s5ri":["Import"],"l3zD7w":["Starting the agent…"],"l46MqT":["Next tab"],"l6kpzR":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy of branch <0>",["branch"],"</0>, and that change hasn't synced yet."],"l7Qq48":["This agent runs through ",["0"],", which isn't installed. Open Knowledge can download a private copy of ",["1"]," ",["2"]," (about ",["3"]," MB from ",["4"],") that won't touch the rest of your system."],"lAiyU_":["Only the current document uses <0>#",["tag"],"</0>."],"lCC_D5":["Subscribing..."],"lGs_bQ":["Page <0>*</0>"],"lHCR4I":["Clear the field to reset back to the default OpenAI endpoint."],"lHwYMr":["Server error: ",["status"]," ",["statusText"]],"lI0Td2":["Use letters, digits, <0>_</0> and <1>-</1> only."],"lKQnp-":["Installed ",["0"]," ",["1"]],"lPzyrU":["All hunks resolved"],"lVWEIL":["Indexed ",["embedded"]," of ",["total"]," pages."],"lWNpNB":["Add cursors or select matching occurrences through CodeMirror."],"lXKZGw":["Heading 1"],"lY27jj":[["0"],"y ago"],"lZAiSP":["Backlinks response did not match expected shape."],"l_FAT6":["Use letters, digits, <0>-</0> or <1>_</1> only."],"l_UFPv":["Properties"],"lb_UU4":["Sync now"],"lbkOif":["Undo or redo visual-editor changes through TipTap collaboration history."],"lhjq3G":["Reset ",["labelText"]," to default"],"ljFWEt":["No settings found"],"ljHjfg":["That branch is already open in another worktree."],"lkYioO":["Show or hide document panel"],"ll2yNl":["Content directory"],"lmBPt0":["Only external links trigger a request. Links to other documents in this project preview from the local index and never leave your computer."],"lond3p":["Shows above the code body. Round-trips as \`title=\\"...\\"\` in markdown."],"lrhetp":["+ ",["overflow"]," more"],"lyWa43":["Project-level disconnected pages"],"lzmtKp":["Failed to load folder properties: ",["message"]],"lzwo7p":["Could not open GitHub sign-in. Please try again."],"m16xKo":["Add"],"m2T1Xj":["Tag #",["tagValue"],", ",["uses"]],"m6YGpY":["Active panel content for the selected tab shows here."],"mAzs2H":["Disable ",["file"]],"mBltnd":["Path suggestions"],"mCB6Je":["Select All"],"mGaZwZ":["See the full install guide"],"mHVPm5":["Reconnect required"],"mHf8mp":["Delete schema file ",["file"]],"mLAjyL":["Give the AI tools you use access to read and update your projects. Checking a box sets it up right away; unchecking removes it."],"mPneVR":["Updated \\"",["display"],"\\" to ",["0"],"."],"mPy9lS":["Organize my existing specs into a linked index grouped by area, and flag any that have drifted out of sync with the current code."],"mToVM9":["Message ",["agentName"]],"mU3j1b":["Remove item ",["0"]],"mVFyH-":[["accessibleLabel"]," (conflict)"],"mWVJRX":["Collapsible section with a clickable summary."],"mY8U64":["Teach agents a repeatable task. You can edit the body after creating."],"mYGY3B":["Date"],"mYzDD_":["A worktree folder for that branch already exists."],"mZ1r4i":["Create a document from ",["label"]],"maDWIB":["Mirror source <0>api-spec</0>"],"makN88":["No patterns yet. Type a folder or file name below to start hiding files."],"mdKFEy":["You cancelled loading \\"",["docName"],"\\"."],"mdzKSV":[["nodeCount","plural",{"one":["#"," node"],"other":["#"," nodes"]}]],"mf37rL":["Retrying"],"mg0YGL":["Source multi-cursor and multi-select"],"mk2poV":["e.g. server.ts"],"mmpzAq":["Wrap long lines in the markdown source editor."],"mo22UP":["Toggle inline code formatting."],"mqSwZH":["<0>Mirror anchor not found.</0> No <1>",["mirrorSourceTag"],"</1> exists in <2>",["src"],"</2>."],"msOK6I":["Repositories you've already cloned may keep syncing through git's own saved credentials, even after you disconnect."],"msqUNq":["Ready-made folders and templates to get you started quickly."],"msuDyW":["Set the sync default for users opening this project for the first time. This setting is committed to your repository."],"mu1O0q":["Open Knowledge can manage ",["0"]," editor skill(s) for this project. Import moves them into .ok/skills and replaces the .claude, .codex, etc. copies with symlinks — one place to edit, in sync everywhere. If those folders are committed to git, review the change first; symlinks can behave differently on some editors and on Windows."],"mwMF9u":["Open CodeMirror search in source editor mode."],"mxGJVE":["Switch worktree…"],"mxY24F":["Duplicate the focused file-tree item when focus is in the Files sidebar."],"n2lRue":["Commit or stash changes to switch:"],"n3wx1q":["Restore to this version?"],"n5n_vi":["Private repository"],"n6hXUm":["Auto-sync periodically fetches, pulls, and pushes commits to your remote git repository so your edits stay in sync across machines."],"n7aopT":["Editor mode"],"n8DwqQ":["Connects automatically the next time you open this project in a trusted Codex session."],"nCzR-G":["Copy code ",["userCode"]],"nD7Fx9":["This replaces the current skill content with the bundled version ",["0"],". Any local edits will be replaced — your current version is saved to history first, so you can restore it."],"nDT8qt":["Initialized ",["0"]," but could not open it."],"nJq7et":["Couldn't uninstall skill: ",["0"]],"nMSYz5":["This path is on an external volume (/Volumes/...). OpenKnowledge will lose track of files when the drive ejects."],"nNYV3Y":["and ",["remaining"]," more"],"nOEDQs":["Failed to update sync mode — ",["detail"]],"nP-KFo":["New ",["0"]," chat"],"nP76lk":["Applies to all projects on this machine. Claude and Codex, started from the built-in terminal, auto-approve OpenKnowledge's read and write tools (Claude also auto-runs \\"ok open\\"). Deleting, moving, sharing, installing skills, other commands, and non-OpenKnowledge file edits still ask. Cursor, OpenCode, and Pi are unaffected. Best-effort per agent."],"nTwL53":["Open a doc to share its URL."],"nUNZL4":["Ask ",["0"]],"nWv1ja":["Manage hidden files in Settings → Ignore patterns."],"nYKerc":["(user-level only)"],"nYeBmY":[["hours"],"h ago"],"nbfdhU":["Integrations"],"nc-ipN":["Field editing is available for schema files mapped in the Frontmatter schemas plugin"],"ndeI89":["Use Cmd/Ctrl+C to copy the link below, or open OK in the desktop app."],"ndwmea":["unavailable on this platform"],"neRy3o":["Split list item"],"nfPccR":[["laterEdits","plural",{"one":["Rolls back ","#"," later edit."],"other":["Rolls back ","#"," later edits."]}]],"nfoduq":["create worktree"],"nft48x":["Stored at <0>.ok/templates/</0> in this project. Available in every folder (folder-scoped templates can override by filename)."],"ng2Ibo":["Branch name"],"njBeMm":["Both"],"njU86j":["Property \\"",["trimmed"],"\\" already exists"],"nmwqWS":["Not answered"],"noH1JX":["Couldn't reach collab server — ",["errorDetail"],". Try <0>ok status</0> or check <1>.ok/local/last-spawn-error.log</1>."],"np9pbC":["Show ",["inAppHiddenCount"]," more"],"npcziF":["Install on"],"nqV0Kk":["This folder hasn't synced to GitHub yet. The link will work after the next sync."],"nrGWJ7":["Git identity isn't set — commits use a default author. Set yours so teammates see your name."],"nrXDdR":["Field name"],"nskygk":["Choose agent"],"nwtY4N":["Something went wrong"],"nxlOpL":["OpenKnowledge is using this GitHub account."],"ny6vNn":["OpenKnowledge is using a GitHub account provided by the gh CLI. There's no separate OpenKnowledge credential to disconnect."],"nzHlj8":["Close ",["0"]],"nzaV6Q":["Page thumbnails"],"o2yoFu":["Reveal in Finder, No workspace"],"o49mDZ":["Loading timeline history"],"o4dcAf":["Reveal in File Explorer, ",["hint"]],"o9CrsQ":["research-note"],"oAFVKX":["Failed to update the project sync default — ",["detail"]],"oAGN8p":["Remote branch <0>",["remoteCheckoutRef"],"</0> will be checked out as a new local tracking branch <1>",["trimmed"],"</1>, in its own window under <2>.ok/worktrees/</2>."],"oBK5fD":["Overlapping edits"],"oBXkm2":["Delete code block"],"oCHfGC":["Level"],"oCNLN8":["Toggle the bottom terminal panel. With text selected, stage it in the terminal's AI input instead."],"oCZkaG":["Copy path"],"oJl7eO":["Unknown component: ",["componentName"]," — source editable below"],"oKBnk5":["More requests were blocked."],"oQA-cA":["Full path"],"oS1YpJ":["Open the Project Navigator."],"oWsZk8":["Create missing page ",["target"]],"oXKEsy":["Delete an adjacent wiki-link or tag chip."],"oXlLi4":["Project plugins are your project's authoring standard — turn them on or off here. The choice is committed to config.yml and shared with every collaborator via git. Each enabled plugin gets its own page under Plugins in the settings sidebar."],"oYepHb":["The terminal is turned off for this project. Turn it back on to run commands here."],"of3tF-":["You picked ~/Documents. OpenKnowledge will index every markdown file under it. If you only want to manage a sub-folder, choose a smaller scope."],"ogAuyr":["Back to document view"],"ohUJJM":["Plugins"],"oi4zaa":["Remember this for future agents"],"omXJcU":["Close others"],"onTlRk":["Couldn't update skills sharing"],"optX0N":[["0"],"h ago"],"oqB2ez":["Previous match"],"osRqlv":["Open delete confirmation for the selected file-tree items."],"ot5BRK":["Duplicate selected file or folder"],"otE4aj":["Show external URL nodes"],"ou1hFW":["Toggle an ordered list."],"outYNy":["Duplicate name \\"",["keyName"],"\\""],"ovIGrT":["Local collaboration data for \\"",["docName"],"\\" could not be cleared. Reload to retry."],"p0Iq25":["Insert link"],"p2LEhJ":["Personal access token"],"p8TjFD":["Collapse session dock"],"p98xmP":["Applies to"],"p9sdCy":["New ignore pattern"],"pAgkuZ":["Reopening \\"",["docName"],"\\" with a fresh local collaboration cache."],"pBROkv":["Thanks for subscribing. Watch your inbox for product updates."],"pEQFsW":["No matching projects."],"pFagOn":["Source editing"],"pHYP6v":["Open <0>Customize</0> in the sidebar <1/> <2>Skills</2>."],"pQf2Ux":[".ok/skills is back to local-only."],"pTPqMK":["Toggle a fenced code block."],"pUKV4K":["Auto-denied"],"pWT04I":["Checking..."],"pWbsW6":["Loading docs"],"pZAs1T":["Failed to load outgoing links"],"paCw0z":["everything under ",["0"],"/ folders inside ",["1"],"/"],"pajIrl":["Could not turn off the terminal: ",["0"]],"pbwTg6":[["seconds"],"s ago"],"pckX1A":[["0","plural",{"one":["#"," use"],"other":["#"," uses"]}]],"pcqlQu":[["0","plural",{"one":["Folder"],"other":["Folders"]}]],"pgDlbM":["Toggle Developer Tools"],"pgq_xf":[["0"],"/",["1"]," ",["2"]],"phM8Kh":["Found the repo but could not open the project. Please try again."],"pha01Y":["Project-level pages with no incoming graph edges."],"pkAft1":["Search failed."],"pmUArF":["Workspace"],"ppDgFi":["Restart with this app's version"],"psfGPX":["MCP connections"],"psl2Sj":["Your change is still being saved — run the test again in a moment."],"pvnfJD":["Dark"],"pzutoc":["Italic"],"q2kXMG":["Inline Math"],"q3TWG7":["Move to Trash"],"q4YJl_":["The terminal session ended (exit code ",["0"],")."],"q6-JVU":["Loading pages"],"q7F5am":["title"],"qAQVSD":["Page headings response was not JSON"],"qAhFeg":[["userName"]," · ",["tabCount","plural",{"one":["#"," tab"],"other":["#"," tabs"]}]],"qAx7xG":["Fixed folder in content root"],"qC7PwZ":["Failed to remove the field"],"qEEfPk":["Bug report ",["0"]],"qEIFZu":["Key ending in ",["keyHint"]],"qEue6Q":[" or "],"qFWMl-":["View as text"],"qIJIrD":["Testing"],"qNOgUu":["Edits at the source land here — no copy-paste drift."],"qRZh7J":["Let Tab leave the source editor instead of indenting."],"qSKu2v":["Source navigation and selection"],"qSxaOz":["Accept their deletion"],"qX-ABr":["Or to use browser sign-in instead:"],"qXN416":["Couldn't share skills: internal error. Please restart the app."],"qXg5W9":["File saves to <0>~/Downloads/openknowledge.skill</0>."],"qXsafh":["Publish to GitHub"],"qZv5ZR":["Config sharing toggle failed"],"q_9EcE":["Enable git auto-sync?"],"q_z77Z":["Heading levels"],"qaHyRJ":[["linkCount","plural",{"one":["#"," link"],"other":["#"," links"]}]],"qbfj1f":["Receiving objects"],"qdBUHP":["Couldn't load ",["fileName"]],"qi1F96":["Reveal in File Explorer"],"qiN9NB":["Surface"],"qiRoLb":["Summarize everything I changed this week"],"qioCwA":["Jump to page ",["pageNumber"]],"qjHMHf":["Failed to disable sync — ",["detail"]],"qmL1UG":["Uploading securely"],"qo4zCg":["Path cannot contain backslashes"],"qpQwGC":["Describe what you're working on and the agent sets it up for you."],"qribBG":["schema ",["deleteTarget"]],"qvWGzP":["Collapse all"],"qyLmWw":["Source editor search panel"],"r-OJYm":["Enter a valid branch name (no spaces, no leading dot, no \\"..\\")."],"r2eKE3":["Sign in to ",["agentName"]," first"],"r2huLx":["Undo, redo, or undo selection changes through CodeMirror history."],"r4R7AZ":["Network error during cleanup"],"r51jLC":["File saved & Claude Desktop App opened"],"r6ncaO":["Close tab"],"r6y-jM":["Warning"],"r871ed":["Your knowledge base is now on GitHub at <0>",["ownerLogin"],"/",["repoName"],"</0>."],"rBc32v":["Couldn't reach the embeddings provider — press ↵ to retry"],"rD-woT":["Tell us what went wrong and we'll gather the logs. Nothing leaves your Mac until you've reviewed it."],"rDOuNw":["Failed to import template"],"rFTdVq":["Show in Explorer"],"rFmBG3":["Color theme"],"rFw02Q":["Uploading ",["keyName"]],"rJVoVX":["Source find results"],"rNifQd":["Remove property"],"rQAQus":["Couldn't save template: ",["error"]],"rQRrkB":["yesterday"],"rSoi6g":[["displayName"]," (",["bin"],") isn't installed or on your PATH."],"rVJpLz":["On — hovering an external link sends its URL to the destination site to fetch a preview."],"rVxu1k":["No pages link here yet."],"rXz97P":["Numbered list of items."],"rZ9HZq":["To do"],"rZVMkf":["Visual editor replace input focused"],"rageVb":["Custom HTML with a live preview pane (sandboxed iframe)."],"rbrHTd":["Approved — ",["optionName"]],"rdU729":["Layout"],"rfFpcF":["Remove ",["chip"]],"rg7hNd":["Rate your experience"],"rgPqOw":["Convert the current block to a paragraph."],"ri6zS-":["The schema file does not exist or failed to load — adding a field creates it."],"riqekz":["Suggestion menu navigation"],"rlUzXK":["Could not validate folder. Please try again."],"rn7n0G":["Resume sync"],"rnX-1S":["Enable plugins"],"roAe2K":["Link URL"],"roiUQQ":["This page doesn't link to anything yet."],"rppgXF":["Disconnecting"],"rssK8c":["Ignore patterns (raw text)"],"rtdR4v":["Show or hide Files"],"rwrPbS":["Component boundary navigation"],"s-MGs7":["Resources"],"s-XOaI":["File name"],"s0-xF4":["Tell us how it's going"],"s061i4":["Relative path"],"s0IDhW":["This file could not be found."],"s0J_k9":[["0","plural",{"one":["#"," key"],"other":["#"," keys"]}]],"s0_GnA":["Opening ",["openingLabel"],"…"],"s1c0ja":["Bullet List"],"s3caR3":["Deleting"],"s7us1p":["Only PNG, JPEG, or WebP images are allowed."],"sE7R19":["Could not load templates: ",["templatesError"],". You can still create a blank note."],"sER-bs":["Files"],"sFhaTJ":["Disambiguates similarly-named templates in the menu."],"sHrqDx":["Couldn't rename skill: ",["0"]],"sICrVf":["Restored to the version from ",["0"]],"sIGbBZ":["Convert selection to footnote"],"sIxSSP":["Resolve conflict in your terminal"],"sJK6pq":["Permission denied"],"sJWhgo":["Unknown component: ",["unregisteredComponentName"]],"sNeKjP":["Failed to store the token — try again"],"sOxZaS":["Failed to load graph"],"sZ2IOu":["This ",["targetNoun"]," was shared from branch <0>",["shareBranch"],"</0>. It doesn't exist on your current branch (<1>",["currentLabel"],"</1>)."],"saIASg":["Second item"],"saYiIO":["Path cannot contain null bytes"],"scu3wk":["Model"],"seeS6l":["Setup OpenKnowledge in this folder?"],"sgmRY8":["Skipped downloading ",["0"],"."],"shNd9t":["Slash command menu"],"si3L24":["Open an additional terminal tab. With text selected, stage it in the new tab's AI input."],"skf5Ix":["Indent or outdent source editor lines."],"sn5BEU":[["sizeText"]," · secrets redacted · ",["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]," · crash dump not redacted"],"snrVQ7":["probe failed"],"ssuwjF":["Branch"],"stlgky":["On — your search queries and the text of matching pages are sent to your embeddings provider (OpenAI by default) to compute embeddings."],"sweBEk":["Model: <0>",["0"],"</0>"],"sxTdZI":["Loading paths…"],"sxjyRq":["Worktrees"],"sxkWRg":["Advanced"],"syi2ye":[["percent"],"% used (",["left"],"% left)"],"t-JXbf":["Notion-style inline row for a downloadable file. Drag-drop also works."],"t18QYR":["Unpin ",["accessibleLabel"]],"t2TkQ3":["Sync paused — resolve conflicts to resume."],"t422_7":["Uninstall everywhere"],"t4sFKC":["New branch <0>",["trimmed"],"</0> will be created from the current commit, in its own worktree under <1>.ok/worktrees/</1>."],"t6w1cq":["Open a blank editor tab."],"t9Qn8y":["No agents enabled"],"tAPZEx":["Below"],"tHKQ6j":["Renaming"],"tN5WTS":["The provider rejected the request. Check the API key and the model id."],"tP5DDk":["Apply link"],"tUvUfp":["Use a folder you already have."],"t_YqKh":["Remove"],"tcjTlU":["Starter packs"],"teD0H9":["Couldn't open a worktree for that branch."],"ten9en":["Recent project"],"tfDRzk":["Save"],"tfi40B":["Failed to create page"],"tgWuMB":["Modified"],"thnPBX":["Activate the next editor tab."],"ti6aF_":["Ask ",["0"]," CLI"],"tiWX6q":["Source editor"],"tjXez2":["blog-post"],"tnG-m6":["Auto-sync is paused — sign in to resume."],"toyw51":["Mermaid diagram controls"],"tsiTqO":["Paste your API key"],"tsyExA":["Connect your AI tools to OpenKnowledge"],"tzZ6ha":["Connect to GitHub Enterprise Server"],"u-9fWA":["See <0>Architecture</0> for the system overview."],"u3BOHd":[["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]],"u3YnKw":["Could not construct share URL."],"u3wRF-":["Published"],"u5Utjn":[["0"]," needs ",["1"]],"u5hSeG":["Share feedback"],"u6Hp4N":["Markdown"],"u7H-Wn":["Show panel (",["panelShortcutLabel"],")"],"u7U_Ij":["Link the selected text, or edit the link under the caret."],"uA_jXp":["Switch and update branch"],"uCaIdy":["GitHub sign-in is missing or expired. Reconnect to resume syncing."],"uDlyqd":["Document the architecture of this repo: create an overview page that links to a page per major module describing its responsibilities and entry points."],"uF9ruK":["Saving"],"uFOL2y":["No project skills yet. Author one to teach agents a repeatable task scoped to this knowledge base."],"uFQbYd":["Home page and entry point."],"uGaIIS":["Check out worktree"],"uH_S-u":[["loadErrorTitle"],": ",["message"]],"uKRYiW":["Sync status unavailable — server error."],"uL_Wx8":["The terminal stopped unexpectedly."],"uM6jnS":["Restore failed"],"uMHsvM":["A <0>Modified</0> badge marks schemas your config maps — on or off. Reset removes the mapping from config.yml."],"uNGmQn":["Couldn't run the test. Check that OpenKnowledge is still running."],"uO9WLl":["Push"],"uQNW00":["Detached HEAD — checkout a branch to resume"],"uQewpR":["Couldn't restart the server — it's running under a different account. Restart your computer to clear it, then reopen this project."],"uR2YT3":["Show problem indicators"],"uUiiyC":["You don't have permission to push to this repo. Follow can still keep your copy up to date."],"uVbUP8":["Settings…"],"uWtdQR":["No templates yet. Add one in this folder's Templates section, or in Settings → Templates."],"u_lS4C":["Clone complete — opening project"],"uaUc6t":["Restart server"],"ubMwcO":["The terminal session ended (signal ",["0"],")."],"ucXZ0k":["Loading agents…"],"ugoTXs":["folder"],"uhJEA2":[["count","plural",{"one":["#"," more participant"],"other":["#"," more participants"]}]],"uksqrP":["Repository not found. It may have been renamed, deleted, or moved."],"ul1Atu":["Converting..."],"un8kBM":["Creating page: ",["linkTitle"],"."],"ur2XSb":["Visual editor"],"uuoHOU":["Command failed."],"uynXup":[["tokens","plural",{"one":["token"],"other":["tokens"]}]],"v-h2hx":["Delete ",["targetGitPath"]],"v2ZW0K":["Enable terminal"],"v2a04T":["markdownlint rules"],"v41fCm":["File not found"],"v75Em9":[["uploadedCount","plural",{"one":["Uploaded one file"],"other":["Uploaded ",["uploadedCount"]," files"]}]],"v77jrg":["Visual editor selection"],"v7hK0U":["Use lowercase letters, digits, and hyphens only."],"v7lbnC":["Find next match"],"vAYoCZ":["Couldn't open the worktree. Try again."],"vDXqVv":["Insert a markdown hard break."],"vEJDlt":["The file is in your Trash; the file-watcher will reconcile."],"vF68cg":["Fields"],"vGeNNQ":["Copy a prompt and paste it into your agent to set up your project."],"vIxrEk":["Fit width"],"vLyv1R":["Hide"],"vPKX2i":["In app (beta)"],"vQIVHc":["Folder properties"],"vWc9a0":["Type to edit; <0>⌘ Enter</0> saves, <1>Esc</1> cancels."],"vYPvPB":["Switch project…"],"vZVeFG":["Upload failed — please try again"],"v_2_3v":["Deleted ",["file"]],"v_cQn_":["The provider rejected the request (HTTP ",["0"],"). Check the API key and the model id."],"vbK_ZG":["Files sidebar"],"ve8vEM":["Code expired — please try again"],"vfRlCI":["Could not copy full path"],"vfWA_g":["You picked ~/Desktop. OpenKnowledge will index everything on your desktop."],"vhAnzJ":["Turn on semantic search?"],"viwC-K":["Failed to remove project."],"vja0Dg":["Open session dock"],"vppAju":["Where newly added attachments are placed."],"vv7kpg":["Cancelled"],"vvWZnu":["Diff unavailable"],"w3tVpc":["No links yet. Add wiki links or markdown links to build a graph."],"w3vFfL":["Hide Files"],"w4hMYl":["Could not read branch state for this project. Close this dialog and open the share link again."],"w61W3L":["Remove ",["0"]],"w6sBjd":["Terminal settings not yet loaded — try again in a moment"],"w6sT-y":["Follow the agent's edits"],"w7SsvI":["That folder isn't an OpenKnowledge project yet. Initialize it and open?"],"w7nm4K":["Indented blockquote for citations."],"wDgmsr":["\\"",["0"],"\\" install refreshed (",["1"],")"],"wGSHzy":["Activate one of the first eight editor tabs."],"wJijgU":["Location"],"wJo9oS":["Close find"],"wQp1V3":["Mirror of <0>",["src"],"</0>"],"wT4iQr":["Open visual-editor find with replace controls expanded."],"wTcjov":["No workspace"],"wU8WyK":["Element fields"],"wVa83H":["Couldn't create the report"],"wXO4Tg":[["hrs"],"h ago"],"wXw19Y":["Removed \\"",["projectName"],"\\" from recent projects. Its folder no longer exists."],"w_Sphq":["Attachments"],"waFx9W":["Managed"],"wbv9xO":["Create new project"],"wdxz7K":["Source"],"weP6me":["Couldn't load docs — type @ again to retry"],"wlwXUk":["You picked ~/Downloads. Files there are usually transient — consider a stable folder instead."],"wn8EJi":["Skills teach agents repeatable tasks. Author them here; install a skill to project it into your editors' skill folders."],"wndeIl":["Project-level pages with neither incoming nor outgoing graph edges."],"ws5o1F":["Checked by: ",["0"]],"wtcxiD":["Share this setup with your team?"],"wvbc1r":["Couldn't open document"],"wzq9Rv":["A branch with that name already exists. Open its worktree from the switcher instead."],"x-5mJ1":["Install on all"],"x2fr_j":["Graph"],"x3-2ta":[["packName"]," initialized (",["projectEntries","plural",{"one":["#"," entry"],"other":["#"," entries"]}],")"],"x3kWeu":["Problem indicators in the file explorer"],"x4pGVR":["Semantic search is on, but no API key is set — search falls back to keyword matching. Add one below."],"x57cJf":["Open link"],"xCJdfg":["Clear"],"xCdTnb":["Close new tab"],"xDBki3":["Heading suggestions"],"xDEcka":["The provider is rate-limiting this key. Try again in a moment."],"xFQRu4":["I already have it locally"],"xG4tb6":["Lost connection to \\"",["docName"],"\\"."],"xHGM4U":["Hide HTML preview"],"xK291b":["Two-page (odd)"],"xNyj3h":["Reinstall for Claude Chat & Cowork"],"xOTzt5":["just now"],"xSVO3J":["What gets created"],"xV5sXw":[["0"],"w ago"],"xWEvuo":["Ask AI"],"xXo8FT":["Save failed: ",["error"]],"xYMPyY":["Paste was incomplete — ",["chunksCompleted"]," of ",["totalChunks"]," chunks landed.",["restoreSuffix"]],"xaDWAI":["Switch project"],"xbdtfY":["Markdown source"],"xc4g25":["Parse failed"],"xeXS4P":["Or use a starter pack"],"xeiujy":["Text"],"xhlFsx":["Inherited — set a value here to replace it."],"xi9KGG":["Show Terminal"],"xiv-dW":["No files yet."],"xlQpTE":["More refusal options"],"xloBjn":["Relative Path"],"xnP32l":["No description yet — add one so agents know when to use this skill."],"xrVr_k":["Couldn't create skill: ",["0"]],"xsZhu-":["Page number"],"xzAmL_":["Auto-approved"],"xzktOa":["Edit wiki link"],"y1t8bQ":["Settings sections"],"y3aU20":["Save changes"],"y46m5r":["The desktop app isn't responding. Refresh and try again."],"y5FUYi":["Suggestion menu open"],"y5UgU8":["Disable ",["0"]],"y8B54M":["Couldn't send your prompt — please try again."],"yCX4jp":[" Your selection could not be restored."],"yEJ-sl":["The preview blocks resources that don't meet its security rules (for example plain http:// URLs, or code that uses eval). The content above may render incompletely."],"yFr-5x":["Couldn't reach the endpoint. Check the URL and that the server is up."],"yFyZMJ":["No pages matched \\"",["semanticQueryText"],"\\" by meaning."],"yH7T4q":[["failedCount","plural",{"one":["1 file failed to upload"],"other":[["failedCount"]," files failed to upload"]}]],"yHikCO":["Open CodeMirror's go-to-line prompt."],"yIPXut":["Preparing search"],"yKu_3Y":["Restore"],"yLEyuq":["Product updates in your inbox."],"yLq4w4":["Separator"],"yMgL_E":["Find field navigation"],"yQE2r9":["Loading"],"yQyglE":["No matching docs"],"yR5LHI":["Enter a 6-digit hex like #1A2B3C"],"yUxR-Q":["Expand ",["keyName"]],"yWSvcf":["Content root"],"yWWThY":["Asset reference"],"yYR6za":["Display text"],"yZepkk":["Git sync"],"yZmvQ4":["This project's server (v",["0"],") is newer than this app (v",["1"],")."],"y_5CE8":["Item ",["0"]],"y_K0Dz":["What happened?"],"yaPGPa":["Open a project to manage its AI tool connections."],"ycIX5i":["You're signed out — sign in to resume syncing."],"ydzS9x":["Exit"],"yf5auF":["Search rules by id, alias, or name"],"yf5r22":[["keyName"]," type: ",["typeLabel"]," (inherited from folder properties; not editable here)"],"ygCKqB":["Stop"],"yhdqox":["Installed — ok is available in external terminals. Unchecking removes it; OpenKnowledge's built-in terminal and AI tools keep working."],"yitgD9":["Failed to load skill targets: ",["0"]],"yjExfe":["Branch <0>",["shareBranch"],"</0> is checked out in:"],"ylXj1N":["Selected"],"ymWJLd":["Show ",["0"]," more"],"ynIa4S":["Visual editor list item"],"ypw6My":["Showing top ",["0"]," headings — keep typing to narrow"],"ysxgu8":["project"],"yutJKi":["Checklist with checkboxes."],"yvG-l1":["Open source lint panel"],"yvHDYG":["Claude Desktop"],"yxF19Y":[["0","plural",{"one":["#"," plugin"],"other":["#"," plugins"]}]],"yz7wBu":["Close"],"yzF66j":["Link"],"yzGPkm":["Expand graph"],"yzYE4B":["A picture of the app from just before you opened this. It isn't redacted, so check the preview and uncheck it if anything shouldn't be shared."],"z-lawV":["worktree"],"z0a2EA":["Diagram from Mermaid source — flowchart, sequence, class, state, ER, gantt, pie."],"z1uNN0":["No emoji found."],"z2JdQ-":["Config sharing unchanged — see details below."],"z2funE":["Full Path"],"z5pqI8":["Cannot upload: no document is open"],"z60Lgn":["Saves the file to <0>~/Downloads/openknowledge.skill</0> and opens the Claude Desktop App. Requires Node.js or Bun on your PATH."],"zAJzIg":["Problems in ",["0"]],"zAsDLY":["Graph visualization of document links"],"zBUqvf":["Set up OpenKnowledge integrations…"],"zKxoPm":["Couldn't rename \\"",["0"],"\\": ",["1"]],"zL0LPh":["Global outside text fields"],"zLGXna":["No starter packs available."],"zLak8b":["Activate new tab"],"zQBg2C":["Move the current block up or down one position."],"zUhPuR":["Open containing folder, ",["hint"]],"zXj1rA":["Search by meaning"],"zYp8Sr":["A <0>Modified</0> badge marks rules your config sets explicitly — directly, or inherited through <1>extends</1>. Unmarked rules keep their default state."],"zZ_I5K":["Open project menu"],"zaXlhf":["The properties block at the top of this doc has a formatting error. Switch to source mode to fix it."],"zbymaY":[["0"],"m ago"],"zcmYx4":["git configuration is unavailable"],"zd00pH":["Copy Path"],"zgSFyG":["External link"],"zkz0Fg":["Set up syncing"],"zlErBl":["Page headings error response did not match RFC 9457"],"zo3Dl7":["Toggle thumbnails"],"zrP8HX":["Frontmatter every document created from this template starts with. Values are YAML — a list is <0>[a, b]</0>; <1>{",["date"],"}</1> fills in on create."],"ztKII6":["Failed to add item"],"zvjCD4":["Detailed diagnostics"],"zwBp5t":["Private"],"zyKa-I":["Star us on GitHub"],"zz_Wd_":["Mode"]}`)},Qg=`en`;yl.load(Qg,Zg.messages),yl.activate(Qg);function $g(e){if(e===null)return`none`;switch(e.kind){case`doc`:case`folder-index`:return`doc`;case`folder`:return`folder`;case`asset`:case`skill-file`:case`large-file`:return`asset`;case`missing`:return`none`}}var e_={newFile:{id:`HdkSiO`},newFolder:{id:`96G6Re`},openGraph:{id:`3Fcb0I`},initializeStarterPack:{id:`fWi7pn`},newProject:{id:`gKi-a_`},openFolderOnDisk:{id:`WPwDin`},openFileOnDisk:{id:`ka6Eke`},switchProject:{id:`xaDWAI`},settings:{id:`Tz0i8g`},installClaudeDesktop:{id:`62Pc08`},reportBug:{id:`cd5EXh`},sendFeedback:{id:`RoafuO`},newFromTemplate:{id:`Uuj_R4`},rename:{id:`2wxgft`},duplicate:{id:`euc6Ns`},moveToTrash:{id:`q3TWG7`},revealInFinder:{id:`LtSYdi`},copyFullPath:{id:`Up2_7p`},copyRelativePath:{id:`M6mvVi`},closeTab:{id:`r6ncaO`},newWorktree:{id:`DXd9LM`},switchWorktree:{id:`8Vq20-`},sidebarShow:{id:`151wvk`},sidebarHide:{id:`Q1mtyd`},docPanelShow:{id:`fSRzLo`},docPanelHide:{id:`GSYWCm`},terminalShow:{id:`xi9KGG`},terminalHide:{id:`9xCnv8`},showHiddenFiles:{id:`XcGbim`},showOkFolders:{id:`GHsJb8`},showOnlyMarkdownFiles:{id:`WkTLN7`},showSkillsSection:{id:`NF_Wcg`},expandAll:{id:`OlAl5i`},collapseAll:{id:`qvWGzP`},newTerminal:{id:`ZBxvV3`},killTerminal:{id:`5_j-DA`},checkForUpdates:{id:`WMCwmR`},setUpIntegrations:{id:`AhoGwP`},checkSpelling:{id:`ZgJVnp`},openOnGithub:{id:`LeGeTf`}},t_={"new-file":Pn,"new-folder":Ph,"open-graph":Yh,"initialize-starter-pack":Zh,"new-project":Ut,"open-folder":dc,"open-file":Wn,"switch-project":$e,settings:og,"install-claude-desktop":tc,"report-bug":nt,"send-feedback":Jh,"new-from-template":Pn,rename:$s,duplicate:ec,"move-to-trash":ol,"reveal-in-finder":dc,"copy-full-path":ec,"copy-relative-path":ec,"close-tab":fl,"new-worktree":lo,"switch-worktree":lo,"toggle-sidebar":oe,"toggle-doc-panel":bc,"toggle-terminal":jc,"toggle-show-hidden-files":rc,"toggle-show-ok-folders":Fh,"toggle-show-only-markdown-files":Wn,"toggle-show-skills-section":qs,"expand-all-tree":Eg,"collapse-all-tree":Mh,"new-terminal":jc,"kill-terminal":jc,"check-for-updates":Qc,"set-up-integrations":hh,"toggle-spell-check":ug,"open-github":Xg},n_={"new-file":e=>{e.closePalette(),e.openNewItemDialog(`file`)},"new-folder":e=>{e.closePalette(),e.openNewItemDialog(`folder`)},"open-graph":e=>{e.closePalette(),Jg(`graph`)},"initialize-starter-pack":e=>{e.closePalette(),e.openSeedDialog()},"new-project":e=>{e.closePalette(),e.openCreateProjectDialog()},"open-folder":e=>{let t=e.bridge;t&&e.runAction(async()=>{let e=await t.dialog.openFolder();e&&await t.project.open({path:e,target:`new-window`,entryPoint:`pick-existing`})})},"open-file":e=>{let t=e.bridge;t&&e.runAction(()=>t.project.openFile())},"switch-project":e=>{let t=e.bridge;t&&e.runAction(()=>t.navigator.open(),yl._({id:`jol95m`}))},settings:e=>{e.closePalette(),window.location.hash!==`#settings`&&(window.location.hash=Dl)},"install-claude-desktop":e=>{e.closePalette(),window.location.hash=`#install-claude-desktop`},"report-bug":e=>{e.closePalette(),e.openReportBugDialog()},"send-feedback":e=>{e.closePalette(),e.openFeedbackDialog()},"check-for-updates":e=>e.runAction(async()=>{await e.bridge?.update.checkNow()}),"set-up-integrations":e=>e.runAction(async()=>{await e.bridge?.mcpWiring.reconfigure()}),"toggle-spell-check":e=>e.runAction(async()=>{await e.bridge?.spellcheck.toggle()}),"open-github":e=>e.openExternalUrl(_a)};function r_(e){return{host:e.bridge===null?`web`:`desktop`,activeTargetKind:e.contextualTargetKind,singleFile:e.singleFile,terminalLive:e.viewMenuState.terminalLive===!0,canExpandAll:e.viewMenuState.canExpandAll!==!1,canCollapseAll:e.viewMenuState.canCollapseAll!==!1,hasActiveDoc:e.activeDocName!==null,showInstallSkill:!1}}function i_(e,t){if(e.stateToggle){let n=t.viewMenuState[e.stateToggle.stateField]===!0?e.stateToggle.hideKey:e.stateToggle.showKey;return yl._(e_[n])}return yl._(e_[e.labelKey])}function a_(e){let t=e.menuActionId;return e=>e.emitMenuAction(t)}function o_(e){let t=e.palette;if(!t)throw Error(`command ${e.id} has no palette presence`);let n=t_[e.id];if(!n)throw Error(`command ${e.id} has no palette icon`);let r=e.checkField;return{id:e.id,menuActionId:e.menuActionId,label:t=>i_(e,t),keywords:e.keywords,icon:n,group:t.group,visibility:t.visibility,shortcutId:e.shortcutId,shortcutDesktopOnly:e.shortcutDesktopOnly,checked:r?e=>e.viewMenuState[r]===!0:void 0,available:t=>Li(e.availability,r_(t)),dispatch:n_[e.id]??a_(e)}}var s_=Ta.flatMap(e=>e.palette?[o_(e)]:[]),c_=`ok-omnibar-recents-v1`,l_=10;function u_(e){return typeof e==`object`&&!!e&&(e.kind===`file`||e.kind===`folder`)&&typeof e.path==`string`&&typeof e.lastOpenedAt==`string`}function d_(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function f_(e,t){return`${e}:${t}`}function p_(e){let t=d_(e);if(!t)return[];try{let e=t.getItem(c_);if(!e)return[];let n=JSON.parse(e);return Array.isArray(n)?n.filter(u_).slice(0,l_):[]}catch{return[]}}function m_(e,t){let n=d_(t);if(n)try{n.setItem(c_,JSON.stringify(e.slice(0,l_)))}catch(e){console.warn(`[omnibar] Failed to save recent entries:`,e)}}function h_(e,t){return[t,...e.filter(e=>e.kind!==t.kind||e.path!==t.path)].slice(0,l_)}function g_(e,t){return e.filter(e=>t.has(f_(e.kind,e.path)))}var __=50,v_=50,y_=``,b_=null;function x_(e){return e.trim().toLowerCase()}function S_(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function C_(e){let t=e.trim();return t?[...new Set(t.split(/\s+/).filter(Boolean))].sort((e,t)=>t.length-e.length):[]}function w_(e,t,n=new Map,r=new Map,i=new Set){let a=[],o=new Set;for(let t of e){o.add(t);let e=r.get(t),i=e?.modified,s=n.get(t);a.push({kind:`file`,path:t,name:va(t),...s&&{title:s},...e?.docExt&&{docExt:e.docExt},...i&&{modifiedTs:Date.parse(i)}})}for(let e of i)o.has(e)||(o.add(e),a.push({kind:`file`,path:e,name:va(e),bodyIndexed:!1}));for(let e of t)a.push({kind:`folder`,path:e,name:va(e)});return a.sort((e,t)=>{let n=e.path.localeCompare(t.path);return n===0?e.kind===t.kind?0:e.kind===`folder`?-1:1:n}),a}function T_(e){return Hi({kind:e.kind===`folder`?`folder`:e.bodyIndexed===!1?`file`:`page`,path:e.path,title:e.title??e.name,modifiedTs:e.modifiedTs??0})}function E_(e){return{entries:e,byId:new Map(e.map(e=>[`${e.kind===`folder`?`folder`:e.bodyIndexed===!1?`file`:`page`}:${e.path}`,e])),corpus:yi(e.map(T_))}}function D_(e){return e.map(e=>`${e.kind}\u0000${e.path}\u0000${e.title??``}\u0000${e.docExt??``}\u0000${e.modifiedTs??0} ${e.bodyIndexed===!1?`0`:`1`}`).join(``)}function O_(e){let t=D_(e);return b_&&y_===t?b_:(y_=t,b_=E_(e),b_)}function k_(e,t,n=__){return A_(O_(e),t,n)}function A_(e,t,n=__){let r=x_(t);return r?Ka(e.corpus,r,{intent:`omnibar`,limit:n,scopes:[`page`,`folder`,`file`]}).map(t=>e.byId.get(t.document.id)).filter(e=>e!==void 0):e.entries.slice(0,20)}function j_(e,t){let n=C_(t);if(n.length===0||e.length===0)return[{text:e,match:!1,start:0}];let r=RegExp(`(${n.map(S_).join(`|`)})`,`gi`),i=[],a=0;for(let t of e.matchAll(r)){let n=t.index??0;n>a&&i.push({text:e.slice(a,n),match:!1,start:a}),i.push({text:t[0],match:!0,start:n}),a=n+t[0].length}return a<e.length&&i.push({text:e.slice(a),match:!1,start:a}),i.length>0?i:[{text:e,match:!1,start:0}]}function M_(e){if(e.kind!==`page`&&e.kind!==`folder`&&e.kind!==`file`||typeof e.path!=`string`)return null;let t=va(e.path);return{kind:e.kind===`folder`?`folder`:`file`,path:e.path,name:t,...e.kind===`file`&&{bodyIndexed:!1},...e.title&&{title:e.title},...e.snippet&&{snippet:e.snippet},...typeof e.score==`number`&&{score:e.score}}}async function N_(e,t={}){let n=e.trim();if(!n)return{entries:[],truncated:!1,ready:!0};let r=await fetch(`/api/search`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({query:n,intent:`full_text`,ranking:t.semantic?`relevance`:`navigation`,scopes:[`page`,`folder`,`content`,`file`],limit:t.limit??v_,source:`omnibar`,...t.semantic?{semantic:!0}:{}}),signal:t.signal});if(!r.ok){let e=await r.json().catch(()=>null);throw Error(kl(e)??`Search failed with status ${r.status}`)}let i=await r.json();return{entries:(i.results??[]).map(M_).filter(e=>!!e),truncated:i.truncated===!0,ready:i.ready!==!1}}function P_(e,t,n=[]){let r=x_(t);return r?x_([e,...n].join(` `)).includes(r):!0}function F_(e,t,n={}){if(e.trim()===``)return`idle`;if(t.length===0)return`empty`;if(n.truncated)return`truncated`;for(let e of t)if(`snippet`in e&&typeof e.snippet==`string`&&e.snippet.length>0)return`content`;return`name-only`}function I_(e){let{query:t,firedQuery:n,status:r,resultCount:i}=e,a=i>0,o=t!==``&&t!==n,s=a&&(r===`loading`||t!==n),c=null;r===`error`&&t!==``?c={kind:`retry`,query:t}:o&&r!==`loading`&&(c={kind:`search`,query:t});let l=null;return r===`loading`?l=`searching`:t===``&&!a?l=`empty`:r===`success`&&!o&&!a&&(l=`no-results`),{submit:c,results:{show:a,dimmed:s,forQuery:a?n:null},notice:l}}var L_=`tag:`;function R_(e,t){if(!e.toLowerCase().startsWith(`tag:`))return{kind:`normal`,query:e};let n=e.slice(4).replace(/^\s+/,``).trim();return n&&t.has(n)?{kind:`tag-docs`,tagName:n}:{kind:`tag-list`,query:n}}function z_(e,t){return G(e,t)}var B_=y;async function V_(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok)throw Error(`/api/tags/${e} responded with ${t.status}`);let n=await t.json();return Array.isArray(n.docs)?n.docs:[]}var H_=(0,Q.lazy)(()=>n(()=>import(`./FeedbackForm-varEQbsq.js`).then(e=>({default:e.FeedbackForm})),[],import.meta.url)),U_=e=>{let t=(0,$.c)(11),{open:n,onOpenChange:r,source:i,onSuccess:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(_n,{children:(0,Z.jsx)(pn,{children:(0,Z.jsx)(q,{id:`SItQRc`})})}),t[0]=o):o=t[0];let s;t[1]!==r||t[2]!==a?(s=()=>{r(!1),a?.()},t[1]=r,t[2]=a,t[3]=s):s=t[3];let c;t[4]!==i||t[5]!==s?(c=(0,Z.jsxs)(mn,{children:[o,(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(H_,{source:i,onSuccess:s})})]}),t[4]=i,t[5]=s,t[6]=c):c=t[6];let l;return t[7]!==r||t[8]!==n||t[9]!==c?(l=(0,Z.jsx)(vn,{open:n,onOpenChange:r,children:c}),t[7]=r,t[8]=n,t[9]=c,t[10]=l):l=t[10],l},W_=[`.md`,`.mdx`];function G_(e){let t=e.toLowerCase();for(let e of W_)if(t.endsWith(e))return e;return null}var K_={local:0,inherited:1};function q_(e){return[...e].sort((e,t)=>{let n=K_[e.scope]-K_[t.scope];if(n!==0)return n;let r=(e.title??e.name).toLowerCase(),i=(t.title??t.name).toLowerCase();return r.localeCompare(i)})}var J_=`__blank__`;function Y_(e){return e.trim()?e.includes(`..`)?`dotdot`:e.startsWith(`/`)?`leading-slash`:e.includes(`\\`)?`backslash`:e.includes(`\0`)?`null-byte`:null:`empty`}function X_(e){switch(e){case`empty`:return{id:`hYDc6B`};case`dotdot`:return{id:`Wyxs0x`};case`leading-slash`:return{id:`OYnx7O`};case`backslash`:return{id:`qo4zCg`};case`null-byte`:return{id:`saYiIO`}}}function Z_(e){let t=e.fileName.trim(),n=G_(t)?t:`${t}${e.fileExtension??`.md`}`;if(e.kind===`folder`){let t=(e.folderName??``).trim();return`${e.initialDir?`${e.initialDir}/${t}`:t}/${n}`}return e.initialDir?`${e.initialDir}/${n}`:n}function Q_(e,t){return Cl(e.target)?!1:xl(e,`new-item`,t)}function $_(e){let t=e.value.lastIndexOf(`.`);t>0?e.setSelectionRange(0,t):e.select()}function ev(e){let t=(0,$.c)(136),{open:n,onOpenChange:r,kind:i,initialDir:a,suggestedName:o,initialTemplate:s,defaultToTemplate:c,description:l,onCreated:u,folderConfig:d}=e,{_:f}=ht(),{addPage:p}=Vo(),h=Os(d?null:a),g=d??h,[_,v]=(0,Q.useState)(``),[y,b]=(0,Q.useState)(``),[x,S]=(0,Q.useState)(J_),[C,w]=(0,Q.useState)(!1),[T,E]=(0,Q.useState)(null),[D,O]=(0,Q.useState)(!1),[k,A]=(0,Q.useState)(null),j=(0,Q.useId)(),M=(0,Q.useId)(),N=(0,Q.useId)(),P=(0,Q.useId)(),F=(0,Q.useId)(),[I,L]=(0,Q.useState)(!1),R=(0,Q.useRef)(null),z=(0,Q.useRef)(null),B,V;t[0]!==s||t[1]!==i||t[2]!==n||t[3]!==o?(B=()=>{n&&(E(null),A(null),O(!1),b(``),S(i===`file`&&s?s:J_),w(!1),L(!1),v(i===`file`?o??`untitled`:`index`))},V=[n,i,o,s],t[0]=s,t[1]=i,t[2]=n,t[3]=o,t[4]=B,t[5]=V):(B=t[4],V=t[5]),(0,Q.useEffect)(B,V);let H;t[6]!==g.state.data||t[7]!==g.state.status?(H=g.state.status===`ready`?q_(g.state.data.folder.templates_available??[]):[],t[6]=g.state.data,t[7]=g.state.status,t[8]=H):H=t[8];let U=H,W;t[9]!==g.state.data||t[10]!==g.state.status||t[11]!==n||t[12]!==x?(W=()=>{n&&x!==J_&&g.state.status===`ready`&&((g.state.data.folder.templates_available??[]).some(e=>e.name===x)||S(J_))},t[9]=g.state.data,t[10]=g.state.status,t[11]=n,t[12]=x,t[13]=W):W=t[13];let G;t[14]!==g.state||t[15]!==n||t[16]!==x?(G=[n,x,g.state],t[14]=g.state,t[15]=n,t[16]=x,t[17]=G):G=t[17],(0,Q.useEffect)(W,G);let K;t[18]!==c||t[19]!==g.state.data||t[20]!==g.state.status||t[21]!==s||t[22]!==n||t[23]!==C?(K=()=>{if(!n||!c||s||C||g.state.status!==`ready`)return;let e=q_(g.state.data.folder.templates_available??[]);e.length>0&&S(e[0].name)},t[18]=c,t[19]=g.state.data,t[20]=g.state.status,t[21]=s,t[22]=n,t[23]=C,t[24]=K):K=t[24];let ee;t[25]!==c||t[26]!==g.state||t[27]!==s||t[28]!==n||t[29]!==C?(ee=[n,c,s,C,g.state],t[25]=c,t[26]=g.state,t[27]=s,t[28]=n,t[29]=C,t[30]=ee):ee=t[30],(0,Q.useEffect)(K,ee);let te=i===`file`,ne=g.state.status===`loading`||g.state.status===`idle`,re=g.state.status===`error`?g.state.message:null,ie;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ie=function(e){v(e),E(null)},t[31]=ie):ie=t[31];let ae=ie,oe;t[32]!==_||t[33]!==y||t[34]!==a||t[35]!==i?(oe=function(){return Z_({kind:i,initialDir:a,fileName:_,folderName:y})},t[32]=_,t[33]=y,t[34]=a,t[35]=i,t[36]=oe):oe=t[36];let se=oe,ce;t[37]!==f||t[38]!==_||t[39]!==y||t[40]!==i?(ce=function(){if(i===`folder`){let e=Y_(y.trim());if(e)return{message:f({id:`ODGGlj`,values:{detail:f(X_(e))}}),field:`folder`}}let e=Y_(_.trim());return e?{message:f(X_(e)),field:`file`}:null},t[37]=f,t[38]=_,t[39]=y,t[40]=i,t[41]=ce):ce=t[41];let le=ce,ue;t[42]!==D||t[43]!==_||t[44]!==y||t[45]!==i?(ue=D||!_.trim()||i===`folder`&&!y.trim(),t[42]=D,t[43]=_,t[44]=y,t[45]=i,t[46]=ue):ue=t[46];let de=ue,fe;t[47]!==f||t[48]!==p||t[49]!==se||t[50]!==le||t[51]!==i||t[52]!==u||t[53]!==r||t[54]!==x?(fe=async function(){let e=le();if(e){E(e.message),A(e.field);return}O(!0),E(null),A(null);let t=se(),n=i===`file`&&x!==J_?x:void 0,a={path:t};n!==void 0&&(a.template=n);try{let e=await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(a)}),t=e.status,n=await m(e,f({id:`d2uTPx`,values:{status:t}}));if(!n.ok){O(!1),E(n.title),A(`form`);return}let o=Zi.safeParse(n.body);if(O(!1),!o.success){E(f(i===`folder`?{id:`K1ckLX`}:{id:`fJgQHX`})),A(`form`);return}let s=o.data.docName;r(!1),window.location.hash=`#/${s}`,p(s),$l([`files`,`backlinks`,`graph`]),u?.(s)}catch(e){console.warn(`[NewItemDialog] create failed:`,e),O(!1),E(f({id:`HIb0vl`})),A(`form`)}},t[47]=f,t[48]=p,t[49]=se,t[50]=le,t[51]=i,t[52]=u,t[53]=r,t[54]=x,t[55]=fe):fe=t[55];let pe=fe,me;t[56]!==f||t[57]!==a?(me=a||f({id:`L6Hhh6`}),t[56]=f,t[57]=a,t[58]=me):me=t[58];let he=me,ge;t[59]===i?ge=t[60]:(ge=(0,Z.jsx)(pn,{children:i===`file`?(0,Z.jsx)(q,{id:`HdkSiO`}):(0,Z.jsx)(q,{id:`96G6Re`})}),t[59]=i,t[60]=ge);let _e;t[61]!==l||t[62]!==he?(_e=l??(0,Z.jsx)(q,{id:`NvOvTi`,values:{dirDisplay:he},components:{0:(0,Z.jsx)(`span`,{className:`font-medium text-foreground`})}}),t[61]=l,t[62]=he,t[63]=_e):_e=t[63];let ve;t[64]===_e?ve=t[65]:(ve=(0,Z.jsx)(fn,{children:_e}),t[64]=_e,t[65]=ve);let ye;t[66]!==ge||t[67]!==ve?(ye=(0,Z.jsxs)(_n,{children:[ge,ve]}),t[66]=ge,t[67]=ve,t[68]=ye):ye=t[68];let be;t[69]!==x||t[70]!==te||t[71]!==P||t[72]!==I||t[73]!==F||t[74]!==U||t[75]!==re||t[76]!==ne?(be=te&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`span`,{id:P,className:`text-sm font-medium`,children:(0,Z.jsx)(q,{id:`f65AOQ`})}),re?(0,Z.jsx)(`p`,{role:`alert`,className:`text-1sm text-destructive`,children:(0,Z.jsx)(q,{id:`sE7R19`,values:{templatesError:re}})}):null,(0,Z.jsx)(nv,{triggerId:F,labelledById:P,open:I,onOpenChange:L,value:x,onValueChange:e=>{S(e),w(!0)},templates:U,loading:ne}),!ne&&!re&&U.length===0?(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`uWtdQR`})}):null]}),t[69]=x,t[70]=te,t[71]=P,t[72]=I,t[73]=F,t[74]=U,t[75]=re,t[76]=ne,t[77]=be):be=t[77];let xe;t[78]!==f||t[79]!==T||t[80]!==k||t[81]!==j||t[82]!==M||t[83]!==y||t[84]!==i?(xe=i===`folder`&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:M,children:(0,Z.jsx)(q,{id:`cqQyPB`})}),(0,Z.jsx)(vl,{ref:z,id:M,value:y,onChange:e=>{b(e.target.value),E(null)},placeholder:`folder-name`,autoFocus:!0,"aria-describedby":T&&(k===`folder`||k===`form`)?j:void 0,"aria-invalid":T&&(k===`folder`||k===`form`)?!0:void 0,onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault();let t=Y_(y.trim());if(t){E(f({id:`ODGGlj`,values:{detail:f(X_(t))}})),A(`folder`);return}R.current?.focus()}}})]}),t[78]=f,t[79]=T,t[80]=k,t[81]=j,t[82]=M,t[83]=y,t[84]=i,t[85]=xe):xe=t[85];let Se;t[86]===i?Se=t[87]:(Se=i===`folder`?(0,Z.jsx)(q,{id:`jjtmV_`}):(0,Z.jsx)(q,{id:`s-XOaI`}),t[86]=i,t[87]=Se);let Ce;t[88]!==N||t[89]!==Se?(Ce=(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:N,children:Se}),t[88]=N,t[89]=Se,t[90]=Ce):Ce=t[90];let we;t[91]===Symbol.for(`react.memo_cache_sentinel`)?(we=e=>ae(e.target.value),t[91]=we):we=t[91];let Te=i===`file`,Ee=T&&(k===`file`||k===`form`)?j:void 0,De=T&&(k===`file`||k===`form`)?!0:void 0,Oe;t[92]!==pe||t[93]!==de?(Oe=e=>{e.key===`Enter`&&!de&&pe()},t[92]=pe,t[93]=de,t[94]=Oe):Oe=t[94];let ke;t[95]!==N||t[96]!==_||t[97]!==Te||t[98]!==Ee||t[99]!==De||t[100]!==Oe?(ke=(0,Z.jsx)(vl,{ref:R,id:N,value:_,onChange:we,placeholder:`my-note`,autoFocus:Te,"aria-describedby":Ee,"aria-invalid":De,onFocus:tv,onKeyDown:Oe}),t[95]=N,t[96]=_,t[97]=Te,t[98]=Ee,t[99]=De,t[100]=Oe,t[101]=ke):ke=t[101];let Ae;t[102]!==T||t[103]!==j?(Ae=T&&(0,Z.jsx)(`p`,{id:j,role:`alert`,className:`text-1sm text-destructive`,children:T}),t[102]=T,t[103]=j,t[104]=Ae):Ae=t[104];let je;t[105]!==Ce||t[106]!==ke||t[107]!==Ae?(je=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Ce,ke,Ae]}),t[105]=Ce,t[106]=ke,t[107]=Ae,t[108]=je):je=t[108];let Me;t[109]!==be||t[110]!==xe||t[111]!==je?(Me=(0,Z.jsxs)(hn,{className:`space-y-6 pb-1`,children:[be,xe,je]}),t[109]=be,t[110]=xe,t[111]=je,t[112]=Me):Me=t[112];let Ne;t[113]===r?Ne=t[114]:(Ne=()=>r(!1),t[113]=r,t[114]=Ne);let Pe;t[115]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,Z.jsx)(q,{id:`dEgA5A`}),t[115]=Pe):Pe=t[115];let Fe;t[116]!==D||t[117]!==Ne?(Fe=(0,Z.jsx)(Y,{variant:`outline`,className:`font-mono uppercase`,onClick:Ne,disabled:D,children:Pe}),t[116]=D,t[117]=Ne,t[118]=Fe):Fe=t[118];let Ie;t[119]===D?Ie=t[120]:(Ie=D?(0,Z.jsx)(q,{id:`E9bKSA`}):(0,Z.jsx)(q,{id:`hYgDIe`}),t[119]=D,t[120]=Ie);let Le;t[121]!==pe||t[122]!==de||t[123]!==Ie?(Le=(0,Z.jsx)(Y,{onClick:pe,disabled:de,children:Ie}),t[121]=pe,t[122]=de,t[123]=Ie,t[124]=Le):Le=t[124];let Re;t[125]!==Fe||t[126]!==Le?(Re=(0,Z.jsxs)(gn,{children:[Fe,Le]}),t[125]=Fe,t[126]=Le,t[127]=Re):Re=t[127];let ze;t[128]!==ye||t[129]!==Me||t[130]!==Re?(ze=(0,Z.jsxs)(mn,{className:`sm:max-w-md`,"data-ok-layer-spawned":``,children:[ye,Me,Re]}),t[128]=ye,t[129]=Me,t[130]=Re,t[131]=ze):ze=t[131];let Be;return t[132]!==r||t[133]!==n||t[134]!==ze?(Be=(0,Z.jsx)(vn,{open:n,onOpenChange:r,children:ze}),t[132]=r,t[133]=n,t[134]=ze,t[135]=Be):Be=t[135],Be}function tv(e){return $_(e.currentTarget)}function nv(e){let t=(0,$.c)(66),{triggerId:n,labelledById:r,open:i,onOpenChange:a,value:o,onValueChange:c,templates:l,loading:u}=e,{_:d}=ht(),f=(0,Q.useId)(),p;if(t[0]!==l||t[1]!==o){let e;t[3]===o?e=t[4]:(e=e=>e.name===o,t[3]=o,t[4]=e),p=l.find(e),t[0]=l,t[1]=o,t[2]=p}else p=t[2];let m=p,h=o===J_,g=i?f:void 0,_=`${r} ${n}`,v;t[5]!==h||t[6]!==u||t[7]!==m?.name||t[8]!==m?.title||t[9]!==o?(v=u?(0,Z.jsx)(q,{id:`Hl89Qd`}):h?(0,Z.jsx)(q,{id:`E7BhZn`}):m?.title??m?.name??o,t[5]=h,t[6]=u,t[7]=m?.name,t[8]=m?.title,t[9]=o,t[10]=v):v=t[10];let y;t[11]===v?y=t[12]:(y=(0,Z.jsx)(`span`,{className:`truncate`,children:v}),t[11]=v,t[12]=y);let b;t[13]!==h||t[14]!==u||t[15]!==m?(b=!u&&!h&&m?(0,Z.jsx)(ov,{entry:m}):null,t[13]=h,t[14]=u,t[15]=m,t[16]=b):b=t[16];let x;t[17]!==y||t[18]!==b?(x=(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[y,b]}),t[17]=y,t[18]=b,t[19]=x):x=t[19];let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(yh,{className:`ml-2 size-4 shrink-0 opacity-50`,"aria-hidden":`true`}),t[20]=S):S=t[20];let C;t[21]!==u||t[22]!==i||t[23]!==g||t[24]!==_||t[25]!==x||t[26]!==n?(C=(0,Z.jsx)(Vt,{asChild:!0,children:(0,Z.jsxs)(Y,{id:n,type:`button`,variant:`outline`,role:`combobox`,"aria-expanded":i,"aria-haspopup":`listbox`,"aria-controls":g,"aria-labelledby":_,disabled:u,className:`w-full justify-between font-normal`,children:[x,S]})}),t[21]=u,t[22]=i,t[23]=g,t[24]=_,t[25]=x,t[26]=n,t[27]=C):C=t[27];let w;t[28]===d?w=t[29]:(w=d({id:`UQAp48`}),t[28]=d,t[29]=w);let T;t[30]===w?T=t[31]:(T=(0,Z.jsx)(k,{placeholder:w}),t[30]=w,t[31]=T);let E;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsx)(s,{children:(0,Z.jsx)(q,{id:`c8iK2Y`})}),t[32]=E):E=t[32];let D;if(t[33]!==a||t[34]!==c||t[35]!==l||t[36]!==o){let e;t[38]!==a||t[39]!==c||t[40]!==o?(e=e=>{let t=e.title??e.name,n=e.title&&e.title!==e.name?e.name:void 0,r=`${e.scope}:${e.source_folder}:${e.name}`;return(0,Z.jsxs)(j,{value:r,keywords:[t,e.name,e.description??``,e.scope,e.source_folder??``],onSelect:()=>{c(e.name),a(!1)},className:`items-start gap-3`,children:[(0,Z.jsx)(Fo,{className:J(`mt-1 size-4 shrink-0`,o===e.name?`opacity-100`:`opacity-0`),"aria-hidden":`true`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`truncate text-sm font-medium`,children:t}),n?(0,Z.jsx)(`code`,{className:`font-mono text-2xs text-muted-foreground shrink-0`,children:n}):null,(0,Z.jsx)(ov,{entry:e,className:`ml-auto`})]}),e.description?(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:e.description}):null]})]},r)},t[38]=a,t[39]=c,t[40]=o,t[41]=e):e=t[41],D=l.map(e),t[33]=a,t[34]=c,t[35]=l,t[36]=o,t[37]=D}else D=t[37];let O;t[42]!==a||t[43]!==c?(O=()=>{c(J_),a(!1)},t[42]=a,t[43]=c,t[44]=O):O=t[44];let A=o===J_?`opacity-100`:`opacity-0`,M;t[45]===A?M=t[46]:(M=J(`mt-1 size-4 shrink-0`,A),t[45]=A,t[46]=M);let P;t[47]===M?P=t[48]:(P=(0,Z.jsx)(Fo,{className:M,"aria-hidden":`true`}),t[47]=M,t[48]=P);let I;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Z.jsx)(`span`,{className:`text-sm font-medium`,children:(0,Z.jsx)(q,{id:`E7BhZn`})}),t[49]=I):I=t[49];let L;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[I,(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:(0,Z.jsx)(q,{id:`hZoBHK`})})]}),t[50]=L):L=t[50];let R;t[51]!==O||t[52]!==P?(R=(0,Z.jsxs)(j,{value:`Blank note empty`,onSelect:O,className:`items-start gap-3`,children:[P,L]}),t[51]=O,t[52]=P,t[53]=R):R=t[53];let z;t[54]!==f||t[55]!==D||t[56]!==R?(z=(0,Z.jsxs)(F,{id:f,className:`subtle-scrollbar`,children:[E,D,R]}),t[54]=f,t[55]=D,t[56]=R,t[57]=z):z=t[57];let B;t[58]!==T||t[59]!==z?(B=(0,Z.jsx)(Kt,{className:`w-[var(--radix-popover-trigger-width)] p-0`,align:`start`,onOpenAutoFocus:av,onWheel:iv,onTouchMove:rv,children:(0,Z.jsxs)(N,{children:[T,z]})}),t[58]=T,t[59]=z,t[60]=B):B=t[60];let V;return t[61]!==a||t[62]!==i||t[63]!==B||t[64]!==C?(V=(0,Z.jsxs)(Bt,{open:i,onOpenChange:a,children:[C,B]}),t[61]=a,t[62]=i,t[63]=B,t[64]=C,t[65]=V):V=t[65],V}function rv(e){e.stopPropagation()}function iv(e){e.stopPropagation()}function av(e){e.preventDefault(),e.currentTarget.querySelector(`[cmdk-input]`)?.focus()}function ov(e){let t=(0,$.c)(7),{entry:n,className:r}=e;if(n.scope===`inherited`){let e;t[0]===r?e=t[1]:(e=J(`shrink-0 text-2xs`,r),t[0]=r,t[1]=e);let i;t[2]===n.source_folder?i=t[3]:(i=n.source_folder||(0,Z.jsx)(q,{id:`ZNK2Tq`}),t[2]=n.source_folder,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,Z.jsx)(vu,{variant:`gray`,className:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}return null}function sv(e){return e.split(`/`).pop()??e}function cv(e,t){let n=[];for(let r of t?.folders??[]){let t=`${r.path}/.ok/templates/`,i=e.created.filter(e=>e.kind===`file`&&(e.path.startsWith(t)||e.path.includes(`/${t}`))).map(e=>sv(e.path)),a=i.length,o=e.created.some(e=>e.kind===`folder`&&(e.path===r.path||e.path.endsWith(`/${r.path}`)));(a>0||o)&&n.push({path:r.path,summary:r.summary,templateCount:a,templates:i})}return n}function lv(e){return e.created.filter(e=>e.kind===`file`&&!e.path.split(`/`).includes(`.ok`)).map(e=>({path:e.path,name:sv(e.path)}))}function uv(e){let t=(0,$.c)(17),{plan:n,selectedPack:r}=e,{_:i}=ht(),a,o,s,c;if(t[0]!==i||t[1]!==n||t[2]!==r){let e=cv(n,r),l=lv(n),u=n.packSkill?.pending?n.packSkill:void 0,d=e.length,f=l.length,p=e.reduce(_v,0),m=+!!u,h={"log.md":i({id:`EoaQyO`}),"USER.md":i({id:`bV6DJA`}),"SOUL.md":i({id:`Waiy-j`}),"ACCESS_POLICY.md":i({id:`6ZhdPI`}),"HEARTBEAT.md":i({id:`MDZSJe`}),"OVERVIEW.md":i({id:`dMsx3p`}),"welcome.md":i({id:`WWcqsG`}),"index.md":i({id:`uFQbYd`})},g=[d>0?{key:`folders`,n:d,label:i({id:`VsaI0G`,values:{folderCount:d}})}:null,f>0?{key:`files`,n:f,label:i({id:`DgcGrb`,values:{fileCount:f}})}:null,p>0?{key:`templates`,n:p,label:i({id:`ba3vIW`,values:{templateCount:p}})}:null,m>0?{key:`skills`,n:m,label:i({id:`HAvRAI`,values:{skillCount:m}})}:null].filter(gv),_=e.map(e=>({key:`folder:${e.path}`,icon:Fh,name:`${sv(e.path)}/`,pill:e.templateCount>0?i({id:`-5jISU`,values:{0:e.templateCount}}):void 0,pillTooltip:e.templateCount>0?e.templates:void 0,description:e.summary||void 0})),v=l.map(e=>({key:`file:${e.path}`,icon:de,name:e.name,title:e.name,description:h[e.name]})),y=u?[{key:`skill:${u.name}`,icon:Rh,name:Ws(u.name),title:u.name,description:i({id:`FEqWFL`})}]:[],b=[{key:`folders`,label:i({id:`pcqlQu`,values:{0:_.length}}),rows:_},{key:`files`,label:i({id:`ZgGuA4`,values:{0:v.length}}),rows:v},{key:`skill`,label:i({id:`OZJeTZ`}),rows:y}].filter(hv);s=`space-y-5`;let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(`h3`,{className:`flex items-center gap-1.5 text-xs font-medium uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(q,{id:`xSVO3J`})}),t[7]=x):x=t[7];let S=g.length>0?(0,Z.jsx)(`div`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5 text-xs`,children:g.map(mv)}):null;t[8]===S?c=t[9]:(c=(0,Z.jsxs)(`div`,{className:`flex flex-wrap justify-between items-baseline gap-x-2 gap-y-0.5`,children:[x,S]}),t[8]=S,t[9]=c),a=`space-y-5`,o=b.map(dv),t[0]=i,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=c}else a=t[3],o=t[4],s=t[5],c=t[6];let l;t[10]!==a||t[11]!==o?(l=(0,Z.jsx)(`div`,{className:a,children:o}),t[10]=a,t[11]=o,t[12]=l):l=t[12];let u;return t[13]!==s||t[14]!==c||t[15]!==l?(u=(0,Z.jsxs)(`section`,{className:s,children:[c,l]}),t[13]=s,t[14]=c,t[15]=l,t[16]=u):u=t[16],u}function dv(e){return(0,Z.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,Z.jsxs)(`h4`,{className:`flex items-baseline gap-2 text-xs font-medium uppercase font-mono tracking-wider text-muted-foreground`,children:[(0,Z.jsx)(`span`,{children:e.label}),(0,Z.jsx)(`span`,{className:`text-muted-foreground/50`,children:e.rows.length})]}),(0,Z.jsx)(`ul`,{className:`space-y-4`,children:e.rows.map(fv)})]},e.key)}function fv(e){let t=e.icon;return(0,Z.jsxs)(`li`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{"aria-hidden":`true`,className:`flex size-8 shrink-0 items-center justify-center rounded-lg border border-border/60`,children:(0,Z.jsx)(t,{className:`size-4 text-muted-foreground`})}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 py-0.5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`code`,{className:`min-w-0 flex-1 truncate font-mono text-1sm text-foreground/90`,title:e.title,children:e.name}),e.pill?e.pillTooltip&&e.pillTooltip.length>0?(0,Z.jsxs)(cn,{children:[(0,Z.jsx)(an,{className:`shrink-0 cursor-help rounded bg-transparent p-0 font-mono text-2xs uppercase tracking-wide text-muted-foreground transition-colors hover:text-foreground/70 focus-visible:text-foreground/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,children:e.pill}),(0,Z.jsx)(on,{children:(0,Z.jsx)(`ul`,{className:`space-y-0.5 text-left font-mono`,children:e.pillTooltip.map(pv)})})]}):(0,Z.jsx)(`span`,{className:`shrink-0 font-mono text-2xs uppercase tracking-wide text-muted-foreground`,children:e.pill}):null]}),e.description?(0,Z.jsx)(`p`,{className:`mt-0.5 text-xs leading-relaxed text-muted-foreground`,children:e.description}):null]})]},e.key)}function pv(e){return(0,Z.jsx)(`li`,{children:e},e)}function mv(e,t){return(0,Z.jsxs)(Q.Fragment,{children:[t>0?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground/50`,children:`·`}):null,(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`span`,{className:`text-foreground/80`,children:e.n}),` `,(0,Z.jsx)(`span`,{className:`text-muted-foreground/80`,children:e.label})]})]},e.key)}function hv(e){return e.rows.length>0}function gv(e){return e!==null}function _v(e,t){return e+t.templateCount}async function vv(e){let t=await e.json().catch(()=>null),n=ma.safeParse(t);if(!n.success)return{kind:`internal`,message:`HTTP ${e.status}`};let r=n.data.detail??n.data.title,i=n.data.type;return i===`urn:ok:error:seed-prerequisite-missing`?{kind:`prerequisite-missing`,message:r}:i===`urn:ok:error:seed-invalid-root`?{kind:`invalid-root`,message:r}:i===`urn:ok:error:no-project-dir`?{kind:`no-project`,message:r}:{kind:`internal`,message:r}}function yv(){let e=typeof window<`u`?window.okDesktop:void 0;if(e?.seed){let t=e.seed.apply;return{plan:e.seed.plan,apply:async(e,n)=>{let r=await t(e,n);return r.ok&&Yl(),r},listPacks:e.seed.listPacks}}return{plan:async e=>{let t=new URLSearchParams;e?.rootDir&&t.set(`rootDir`,e.rootDir),e?.packId&&t.set(`packId`,e.packId);let n=t.toString(),r=await fetch(`/api/seed/plan${n?`?${n}`:``}`);if(!r.ok)return{ok:!1,error:await vv(r)};let i=await r.json().catch(()=>null);return i?.plan?{ok:!0,plan:i.plan}:{ok:!1,error:{kind:`internal`,message:`Malformed plan response`}}},apply:async(e,t)=>{let n=await fetch(`/api/seed/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({plan:e,packId:t?.packId})});if(!n.ok)return{ok:!1,error:await vv(n)};let r=await n.json().catch(()=>null);return r?.result?(Yl(),{ok:!0,result:r.result}):{ok:!1,error:{kind:`internal`,message:`Malformed apply response`}}},listPacks:async()=>{let e=await fetch(`/api/seed/packs`);if(!e.ok)return{ok:!1,error:{kind:`internal`,message:`HTTP ${e.status}`}};let t=await e.json().catch(()=>null);return!t||!Array.isArray(t.packs)?{ok:!1,error:{kind:`internal`,message:`Malformed listPacks response`}}:{ok:!0,packs:t.packs}}}}var bv={"knowledge-base":Vh,"software-lifecycle":lo,"codebase-wiki":_h,"plain-notes":mg,worldbuilding:Sh,"writing-pipeline":$h,"entity-vault":Yh,okf:Eh};function xv(e){return bv[e]??Vh}function Sv(e){let t=(0,$.c)(69),{onPackSelect:n,onCreateBlankFile:r,collapsedPackIds:i,className:a,packs:o}=e,{_:s}=ht(),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(null),[f,p]=(0,Q.useState)(!1),m=o===void 0,h,g;t[0]===m?(h=t[1],g=t[2]):(h=()=>{if(!m)return;let e=!1;return(async()=>{try{let t=await yv().listPacks();if(e)return;t.ok?l(t.packs):d(t.error.message)}catch(t){let n=t;if(e)return;d(n instanceof Error?n.message:String(n))}})(),()=>{e=!0}},g=[m],t[0]=m,t[1]=h,t[2]=g),(0,Q.useEffect)(h,g);let _=m?c:o;if(u!==null){let e;t[3]===a?e=t[4]:(e=J(`rounded-md bg-destructive/10 p-4 text-sm text-destructive`,a),t[3]=a,t[4]=e);let n;t[5]===u?n=t[6]:(n=(0,Z.jsx)(q,{id:`56WWtu`,values:{error:u}}),t[5]=u,t[6]=n);let r;return t[7]!==e||t[8]!==n?(r=(0,Z.jsx)(`div`,{role:`alert`,className:e,children:n}),t[7]=e,t[8]=n,t[9]=r):r=t[9],r}if(_===null){let e;t[10]===a?e=t[11]:(e=J(`@container/packgrid w-full max-w-5xl`,a),t[10]=a,t[11]=e);let n;t[12]===s?n=t[13]:(n=s({id:`BeWTQy`}),t[12]=s,t[13]=n);let r;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(`div`,{className:`grid gap-4 @sm/packgrid:grid-cols-2 @2xl/packgrid:grid-cols-3`,children:Array.from({length:Object.keys(bv).length},wv).map(Cv)}),t[14]=r):r=t[14];let i;return t[15]!==e||t[16]!==n||t[17]!==r?(i=(0,Z.jsx)(`div`,{role:`status`,className:e,"aria-busy":`true`,"aria-label":n,children:r}),t[15]=e,t[16]=n,t[17]=r,t[18]=i):i=t[18],i}if(_.length===0){let e;t[19]===a?e=t[20]:(e=J(`flex w-full max-w-5xl items-center justify-center rounded-2xl border border-dashed border-border/60 bg-muted/20 p-8 text-sm text-muted-foreground`,a),t[19]=a,t[20]=e);let n;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(q,{id:`zLGXna`}),t[21]=n):n=t[21];let r;return t[22]===e?r=t[23]:(r=(0,Z.jsx)(`div`,{role:`status`,className:e,children:n}),t[22]=e,t[23]=r),r}let v;t[24]===i?v=t[25]:(v=i??[],t[24]=i,t[25]=v);let y;t[26]===v?y=t[27]:(y=new Set(v),t[26]=v,t[27]=y);let b=y,x,S,C,w,T,E,D,O,k;if(t[28]!==a||t[29]!==b||t[30]!==f||t[31]!==r||t[32]!==n||t[33]!==_){let e;t[43]===b?e=t[44]:(e=e=>!b.has(e.id),t[43]=b,t[44]=e);let i=_.filter(e),o;t[45]===b?o=t[46]:(o=e=>b.has(e.id),t[45]=b,t[46]=o),C=_.filter(o),S=C.length>0,w=S||r!=null,t[47]===a?k=t[48]:(k=J(`@container/packgrid w-full max-w-5xl`,a),t[47]=a,t[48]=k),x=dn,T=f,E=p;let s;t[49]===n?s=t[50]:(s=e=>(0,Z.jsx)(Tv,{pack:e,onSelect:()=>n(e.id)},e.id),t[49]=n,t[50]=s);let c=i.map(s);t[51]===c?D=t[52]:(D=(0,Z.jsx)(`div`,{className:`grid gap-4 @sm/packgrid:grid-cols-2 @2xl/packgrid:grid-cols-3`,children:c}),t[51]=c,t[52]=D),O=S?(0,Z.jsx)(ln,{className:`-mx-1 -mb-1 overflow-hidden px-1 pb-1 data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,children:(0,Z.jsx)(`div`,{className:J(`grid gap-4 @sm/packgrid:grid-cols-2 @2xl/packgrid:grid-cols-3`,`pt-4`),children:C.map(e=>(0,Z.jsx)(Tv,{pack:e,onSelect:()=>n(e.id)},e.id))})}):null,t[28]=a,t[29]=b,t[30]=f,t[31]=r,t[32]=n,t[33]=_,t[34]=x,t[35]=S,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=D,t[41]=O,t[42]=k}else x=t[34],S=t[35],C=t[36],w=t[37],T=t[38],E=t[39],D=t[40],O=t[41],k=t[42];let A;t[53]!==f||t[54]!==S||t[55]!==C||t[56]!==r||t[57]!==w?(A=w?(0,Z.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center justify-between gap-2`,children:[S?(0,Z.jsx)(un,{asChild:!0,children:(0,Z.jsxs)(Y,{type:`button`,variant:`link-muted`,size:`sm`,children:[f?(0,Z.jsx)(q,{id:`6lGV3K`}):(0,Z.jsx)(q,{id:`ymWJLd`,values:{0:C.length}}),(0,Z.jsx)(Lo,{"aria-hidden":`true`,className:J(`size-3.5 transition-transform`,f&&`rotate-180`)})]})}):(0,Z.jsx)(`span`,{}),r?(0,Z.jsx)(Y,{type:`button`,variant:`link-muted`,size:`sm`,onClick:r,children:(0,Z.jsx)(q,{id:`L4Cdd9`,components:{0:(0,Z.jsx)(qn,{"aria-hidden":`true`,className:`size-3.5`})}})}):null]}):null,t[53]=f,t[54]=S,t[55]=C,t[56]=r,t[57]=w,t[58]=A):A=t[58];let j;t[59]!==x||t[60]!==A||t[61]!==T||t[62]!==E||t[63]!==D||t[64]!==O?(j=(0,Z.jsxs)(x,{open:T,onOpenChange:E,children:[D,O,A]}),t[59]=x,t[60]=A,t[61]=T,t[62]=E,t[63]=D,t[64]=O,t[65]=j):j=t[65];let M;return t[66]!==j||t[67]!==k?(M=(0,Z.jsx)(`div`,{className:k,children:j}),t[66]=j,t[67]=k,t[68]=M):M=t[68],M}function Cv(e){return(0,Z.jsx)(Ev,{},`skeleton-${e}`)}function wv(e,t){return t}function Tv(e){let t=(0,$.c)(17),{pack:n,onSelect:r}=e,i;t[0]===n.id?i=t[1]:(i=xv(n.id),t[0]=n.id,t[1]=i);let a=i,o;t[2]===a?o=t[3]:(o=(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`mt-0.5 shrink-0 text-muted-foreground`,children:(0,Z.jsx)(a,{className:`size-3.5`})}),t[2]=a,t[3]=o);let s;t[4]===n.name?s=t[5]:(s=(0,Z.jsx)(`h3`,{className:`min-w-0 wrap-break-word text-sm font-medium leading-tight`,children:n.name}),t[4]=n.name,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-row items-start gap-2`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;t[9]===n.description?l=t[10]:(l=(0,Z.jsx)(`p`,{className:`line-clamp-2 text-1sm leading-relaxed text-muted-foreground`,children:n.description}),t[9]=n.description,t[10]=l);let u;t[11]!==c||t[12]!==l?(u=(0,Z.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col gap-2`,children:[c,l]}),t[11]=c,t[12]=l,t[13]=u):u=t[13];let d;return t[14]!==r||t[15]!==u?(d=(0,Z.jsx)(`button`,{type:`button`,onClick:r,className:`group flex h-full min-w-0 flex-col items-start gap-4 rounded-2xl border border-border/60 bg-card p-5 text-left transition-[border-color,box-shadow,transform] hover:border-border hover:shadow-sm focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px`,children:u}),t[14]=r,t[15]=u,t[16]=d):d=t[16],d}function Ev(){let e=(0,$.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`span`,{className:`size-10 animate-pulse rounded-lg bg-muted`,"aria-hidden":`true`,children:(0,Z.jsx)(qc,{className:`size-5 animate-spin text-muted-foreground opacity-0`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex h-full min-h-[200px] flex-col items-start gap-4 rounded-xl border border-border/60 bg-card p-6`,children:[t,(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`h-4 w-1/2 animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-4/5 animate-pulse rounded bg-muted`})]}),(0,Z.jsx)(`div`,{className:`mt-auto h-3 w-20 animate-pulse rounded bg-muted`})]}),e[1]=n):n=e[1],n}var Dv=`knowledge-base`;function Ov(e){let t=(0,$.c)(94),{open:n,onOpenChange:r,onSeedApplied:i,initialPackId:a}=e,{_:o}=ht(),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={kind:`loading`},t[0]=s):s=t[0];let[c,l]=(0,Q.useState)(s),[u,d]=(0,Q.useState)(null),[f,p]=(0,Q.useState)(a??Dv),[m,h]=(0,Q.useState)(`project-root`),[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(a===void 0?`pick`:`configure`),b=(0,Q.useRef)(!0),x=u?.find(e=>e.id===f),S,C;t[1]!==n||t[2]!==u?(S=()=>{if(!n||u!==null)return;let e=!1;return(async()=>{try{let t=await yv().listPacks();if(e)return;t.ok?d(t.packs):(d([]),l({kind:`error`,message:t.error.message}))}catch(t){let n=t;if(e)return;d([]),l({kind:`error`,message:n instanceof Error?n.message:String(n)})}})(),()=>{e=!0}},C=[n,u],t[1]=n,t[2]=u,t[3]=S,t[4]=C):(S=t[3],C=t[4]),(0,Q.useEffect)(S,C);let w,T;t[5]!==a||t[6]!==n?(w=()=>{n&&(p(a??Dv),h(`project-root`),_(``),y(a===void 0?`pick`:`configure`),l({kind:`loading`}),b.current=!0)},T=[n,a],t[5]=a,t[6]=n,t[7]=w,t[8]=T):(w=t[7],T=t[8]),(0,Q.useEffect)(w,T),(0,Q.useEffect)(()=>{x&&_(x.defaultSubfolder??``)},[x]);let E;t[9]===g?E=t[10]:(E=g.trim(),t[9]=g,t[10]=E);let D=E,O=m===`subfolder`&&D===``,k,A;t[11]!==o||t[12]!==n||t[13]!==u||t[14]!==m||t[15]!==f||t[16]!==v||t[17]!==O||t[18]!==D?(k=()=>{if(!n||v!==`configure`||u===null)return;if(O){l({kind:`error`,message:o({id:`Z8KDox`})});return}let e=m===`project-root`?void 0:D,t=b.current?0:200;b.current=!1;let r=!1,i=setTimeout(()=>{r||(l(kv),yv().plan({rootDir:e,packId:f}).then(e=>{if(!r){if(!e.ok){l({kind:`error`,message:e.error.message});return}l(e.plan.created.length>0||e.plan.packSkill?.pending===!0?{kind:`plan`,plan:e.plan}:{kind:`already-seeded`,plan:e.plan})}}).catch(e=>{r||l({kind:`error`,message:e instanceof Error?e.message:String(e)})}))},t);return()=>{r=!0,clearTimeout(i)}},A=[n,v,u,f,m,D,O,o],t[11]=o,t[12]=n,t[13]=u,t[14]=m,t[15]=f,t[16]=v,t[17]=O,t[18]=D,t[19]=k,t[20]=A):(k=t[19],A=t[20]),(0,Q.useEffect)(k,A);let j=async function(){if(c.kind!==`plan`)return;let e=c.plan;l({kind:`applying`,plan:e});let t;try{t=await yv().apply(e,{packId:f})}catch(t){let n=t,r=n instanceof Error?n.message:String(n);X.error(o({id:`iqugog`,values:{errorDetail:r}})),l({kind:`plan`,plan:e});return}if(t.ok){let n=x?.name??o({id:`W8vpBM`}),a=t.result.applied,s=e.packSkill?.pending===!0,c=o(a>0?{id:`x3-2ta`,values:{packName:n,projectEntries:a}}:s?{id:`B2Srgd`,values:{packName:n}}:{id:`K6jjWB`,values:{packName:n}});X.success(c),i?.(),r(!1)}else{let n=t.error.message;X.error(o({id:`iqugog`,values:{errorDetail:n}})),l({kind:`plan`,plan:e})}},M=a!==void 0,N=x?.name,P=o(v===`configure`&&x?{id:`hxEUVJ`,values:{selectedPackName:N}}:{id:`RGkNeJ`}),F;t[21]===o?F=t[22]:(F=o({id:`gvApb7`}),t[21]=o,t[22]=F);let I;t[23]===o?I=t[24]:(I=o({id:`hCOLSd`}),t[23]=o,t[24]=I);let L;t[25]===o?L=t[26]:(L=o({id:`Fy4GgU`}),t[25]=o,t[26]=L);let R;t[27]===o?R=t[28]:(R=o({id:`Qw-7Ie`}),t[27]=o,t[28]=R);let z;t[29]===o?z=t[30]:(z=o({id:`_ayOfA`}),t[29]=o,t[30]=z);let B;t[31]===o?B=t[32]:(B=o({id:`Zf0w-R`}),t[31]=o,t[32]=B);let V;t[33]===o?V=t[34]:(V=o({id:`hmYd9H`}),t[33]=o,t[34]=V);let H;t[35]===o?H=t[36]:(H=o({id:`VBE2dw`}),t[35]=o,t[36]=H);let U;t[37]!==F||t[38]!==I||t[39]!==L||t[40]!==R||t[41]!==z||t[42]!==B||t[43]!==V||t[44]!==H?(U={"knowledge-base":F,"software-lifecycle":I,"codebase-wiki":L,"plain-notes":R,okf:z,"writing-pipeline":B,"entity-vault":V,worldbuilding:H},t[37]=F,t[38]=I,t[39]=L,t[40]=R,t[41]=z,t[42]=B,t[43]=V,t[44]=H,t[45]=U):U=t[45];let W=U,G;t[46]!==o||t[47]!==W||t[48]!==x||t[49]!==v?(G=v===`configure`&&x?W[x.id]??x.description:o({id:`msqUNq`}),t[46]=o,t[47]=W,t[48]=x,t[49]=v,t[50]=G):G=t[50];let K=G,ee;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ee=function(e){p(e),y(`configure`),b.current=!0},t[51]=ee):ee=t[51];let te=ee,ne;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(ne=function(){y(`pick`),l({kind:`loading`}),b.current=!0},t[52]=ne):ne=t[52];let re=ne,ie;t[53]===P?ie=t[54]:(ie=(0,Z.jsx)(pn,{children:P}),t[53]=P,t[54]=ie);let ae;t[55]===K?ae=t[56]:(ae=(0,Z.jsx)(fn,{children:K}),t[55]=K,t[56]=ae);let oe;t[57]!==ie||t[58]!==ae?(oe=(0,Z.jsxs)(_n,{children:[ie,ae]}),t[57]=ie,t[58]=ae,t[59]=oe):oe=t[59];let se;t[60]!==u||t[61]!==c||t[62]!==m||t[63]!==x||t[64]!==v||t[65]!==g?(se=v===`pick`?(0,Z.jsx)(hn,{children:(0,Z.jsx)(Sv,{packs:u,onPackSelect:te})}):(0,Z.jsxs)(hn,{className:`space-y-6`,children:[(0,Z.jsx)(Av,{choice:m,subfolder:g,placeholder:x?.defaultSubfolder??`subfolder`,onChoiceChange:h,onSubfolderChange:_}),(0,Z.jsx)(jv,{phase:c,selectedPack:x})]}),t[60]=u,t[61]=c,t[62]=m,t[63]=x,t[64]=v,t[65]=g,t[66]=se):se=t[66];let ce;t[67]!==M||t[68]!==v?(ce=v===`configure`&&!M?(0,Z.jsxs)(Y,{className:`mr-auto uppercase font-mono`,variant:`ghost`,onClick:re,children:[(0,Z.jsx)(Fn,{"aria-hidden":`true`,className:`h-4 w-4`}),(0,Z.jsx)(q,{id:`iH8pgl`})]}):null,t[67]=M,t[68]=v,t[69]=ce):ce=t[69];let le;t[70]===r?le=t[71]:(le=()=>r(!1),t[70]=r,t[71]=le);let ue;t[72]===c.kind?ue=t[73]:(ue=c.kind===`already-seeded`||c.kind===`error`?(0,Z.jsx)(q,{id:`yz7wBu`}):(0,Z.jsx)(q,{id:`dEgA5A`}),t[72]=c.kind,t[73]=ue);let de;t[74]!==le||t[75]!==ue?(de=(0,Z.jsx)(Y,{className:`uppercase font-mono`,variant:`outline`,onClick:le,children:ue}),t[74]=le,t[75]=ue,t[76]=de):de=t[76];let fe;t[77]!==j||t[78]!==c.kind||t[79]!==v||t[80]!==O?(fe=v===`configure`&&c.kind===`plan`?(0,Z.jsx)(Y,{onClick:j,disabled:O,children:(0,Z.jsx)(q,{id:`4TzU0n`})}):v===`configure`&&c.kind===`applying`?(0,Z.jsxs)(Y,{disabled:!0,children:[(0,Z.jsx)(qc,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),(0,Z.jsx)(q,{id:`XYlJJT`})]}):null,t[77]=j,t[78]=c.kind,t[79]=v,t[80]=O,t[81]=fe):fe=t[81];let pe;t[82]!==ce||t[83]!==de||t[84]!==fe?(pe=(0,Z.jsxs)(gn,{children:[ce,de,fe]}),t[82]=ce,t[83]=de,t[84]=fe,t[85]=pe):pe=t[85];let me;t[86]!==oe||t[87]!==se||t[88]!==pe?(me=(0,Z.jsxs)(mn,{className:`sm:max-w-4xl`,"data-ok-layer-spawned":``,children:[oe,se,pe]}),t[86]=oe,t[87]=se,t[88]=pe,t[89]=me):me=t[89];let he;return t[90]!==r||t[91]!==n||t[92]!==me?(he=(0,Z.jsx)(vn,{open:n,onOpenChange:r,children:me}),t[90]=r,t[91]=n,t[92]=me,t[93]=he):he=t[93],he}function kv(e){return e.kind===`plan`||e.kind===`already-seeded`?e:{kind:`loading`}}function Av(e){let t=(0,$.c)(22),{choice:n,subfolder:r,placeholder:i,onChoiceChange:a,onSubfolderChange:o}=e,{_:s}=ht(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`p`,{className:`text-sm font-medium`,children:(0,Z.jsx)(q,{id:`3wiBAs`})}),t[0]=c):c=t[0];let l;t[1]===a?l=t[2]:(l=e=>a(e),t[1]=a,t[2]=l);let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(rl,{children:(0,Z.jsx)(q,{id:`RSqaSd`})}),t[3]=u):u=t[3];let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(tl,{htmlFor:`seed-root-project-root`,children:(0,Z.jsxs)(il,{orientation:`horizontal`,children:[(0,Z.jsxs)(el,{children:[u,(0,Z.jsx)(nl,{className:`text-1sm`,children:(0,Z.jsx)(q,{id:`ZvzbDF`})})]}),(0,Z.jsx)(Rr,{value:`project-root`,id:`seed-root-project-root`})]})}),t[4]=d):d=t[4];let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(rl,{children:(0,Z.jsx)(q,{id:`ZWgr0b`})}),t[5]=f):f=t[5];let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(nl,{className:`nth-last-2:mt-0 text-1sm`,children:(0,Z.jsx)(q,{id:`KQGZuq`})}),t[6]=p):p=t[6];let m;t[7]!==s||t[8]!==n||t[9]!==o||t[10]!==i||t[11]!==r?(m=n===`subfolder`&&(0,Z.jsx)(vl,{value:r,onChange:e=>o(e.target.value),placeholder:i,"aria-label":s({id:`NYUhy5`}),spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,className:`mt-1.5 font-mono text-xs bg-background`}),t[7]=s,t[8]=n,t[9]=o,t[10]=i,t[11]=r,t[12]=m):m=t[12];let h;t[13]===m?h=t[14]:(h=(0,Z.jsxs)(el,{children:[f,p,m]}),t[13]=m,t[14]=h);let g;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(Rr,{value:`subfolder`,id:`seed-root-subfolder`}),t[15]=g):g=t[15];let _;t[16]===h?_=t[17]:(_=(0,Z.jsx)(tl,{htmlFor:`seed-root-subfolder`,children:(0,Z.jsxs)(il,{orientation:`horizontal`,children:[h,g]})}),t[16]=h,t[17]=_);let v;return t[18]!==n||t[19]!==_||t[20]!==l?(v=(0,Z.jsxs)(`div`,{className:`space-y-2 py-1`,children:[c,(0,Z.jsxs)(zr,{className:`sm:flex`,value:n,onValueChange:l,children:[d,_]})]}),t[18]=n,t[19]=_,t[20]=l,t[21]=v):v=t[21],v}function jv(e){let t=(0,$.c)(19),{phase:n,selectedPack:r}=e,{_:i}=ht();if(n.kind===`loading`){let e=r?.folders.length??6,n;t[0]===i?n=t[1]:(n=i({id:`--T3kB`}),t[0]=i,t[1]=n);let a;t[2]===e?a=t[3]:(a=(0,Z.jsx)(`ul`,{className:`space-y-2`,children:Array.from({length:e},Pv).map(Nv)}),t[2]=e,t[3]=a);let o;return t[4]!==n||t[5]!==a?(o=(0,Z.jsx)(`section`,{role:`status`,"aria-busy":`true`,"aria-label":n,children:a}),t[4]=n,t[5]=a,t[6]=o):o=t[6],o}if(n.kind===`error`){let e;return t[7]===n.message?e=t[8]:(e=(0,Z.jsx)(`div`,{className:`rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:n.message}),t[7]=n.message,t[8]=e),e}if(n.kind===`already-seeded`){let e;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`font-medium`,children:(0,Z.jsx)(q,{id:`YwPUUP`})}),t[9]=e):e=t[9];let n;return t[10]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`py-2 text-sm`,children:[e,(0,Z.jsx)(`p`,{className:`text-muted-foreground`,children:(0,Z.jsx)(q,{id:`h-AdvS`})})]}),t[10]=n):n=t[10],n}let a;t[11]!==n.plan||t[12]!==r?(a=n.plan.created.length>0||n.plan.packSkill?.pending?(0,Z.jsx)(uv,{plan:n.plan,selectedPack:r}):null,t[11]=n.plan,t[12]=r,t[13]=a):a=t[13];let o;t[14]===n.plan.warnings?o=t[15]:(o=n.plan.warnings.length>0?(0,Z.jsx)(`div`,{className:`rounded-md bg-warning/10 p-3 text-xs text-warning-foreground`,children:n.plan.warnings.map(Mv)}):null,t[14]=n.plan.warnings,t[15]=o);let s;return t[16]!==a||t[17]!==o?(s=(0,Z.jsxs)(`div`,{className:`space-y-6 py-1 text-sm`,children:[a,o]}),t[16]=a,t[17]=o,t[18]=s):s=t[18],s}function Mv(e){return(0,Z.jsx)(`p`,{children:e},e)}function Nv(e){return(0,Z.jsxs)(`li`,{"aria-hidden":`true`,className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`size-8 shrink-0 animate-pulse rounded-lg bg-muted`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 py-0.5`,children:[(0,Z.jsx)(`span`,{className:`block h-3.5 w-28 animate-pulse rounded bg-muted`}),(0,Z.jsx)(`span`,{className:`mt-2 block h-3 w-4/5 animate-pulse rounded bg-muted`})]})]},`seed-skeleton-${e}`)}function Pv(e,t){return t}function Fv(){return(0,Q.useSyncExternalStore)(nd,rd,rd)}function Iv(e,t){return e instanceof Error&&e.message?e.message:t}async function Lv(e,t,n,r=`action`){try{n(null),await e()}catch(e){console.error(`[${r}] action failed:`,e),n(Iv(e,t))}}async function Rv(e,t,n=X,r=`action`){await Lv(e,t,e=>{e!==null&&n.error(e)},r)}var zv=(0,Q.createContext)(!1);function Bv(e){let t=(0,$.c)(5),{children:n}=e,[r,i]=(0,Q.useState)(Hv),a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{if(window.okDesktop)return;let e=new AbortController;return Cu(e.signal).then(t=>{e.signal.aborted||t.status!==`ok`||i(t.config.singleFile)}).catch(Vv),()=>e.abort()},o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o);let s;return t[2]!==n||t[3]!==r?(s=(0,Z.jsx)(zv,{value:r,children:n}),t[2]=n,t[3]=r,t[4]=s):s=t[4],s}function Vv(){}function Hv(){return typeof window<`u`?window.okDesktop?.config.singleFile??!1:!1}function Uv(){return(0,Q.use)(zv)}function Wv(e,t,n){let r=[],i=new Set,a=new Set,o=t!==null&&t.mainRoot===e.project.mainRoot;e.projectSynthesized||(r.push({branch:e.project.branch??null,path:e.project.path,opened:!0,isMain:!0,isCurrent:e.project.path===n}),i.add(e.project.path),e.project.branch!=null&&a.add(e.project.branch));let s=[...e.worktrees].sort((e,t)=>t.lastOpenedAt.localeCompare(e.lastOpenedAt));for(let e of s)i.has(e.path)||(r.push({branch:e.branch??null,path:e.path,opened:!0,isMain:!1,isCurrent:e.path===n}),i.add(e.path),e.branch!=null&&a.add(e.branch));if(o){let e=t.entries.filter(e=>e.branch!==null&&!a.has(e.branch)&&(e.worktreePath===null||!i.has(e.worktreePath))).sort((e,t)=>(e.branch??``).localeCompare(t.branch??``));for(let t of e)r.push({branch:t.branch,path:t.worktreePath,opened:t.worktreePath!==null,isMain:t.isMain,isCurrent:t.isCurrent}),t.branch!=null&&a.add(t.branch),t.worktreePath!=null&&i.add(t.worktreePath)}return r.sort((e,t)=>Gv(e)-Gv(t))}function Gv(e){return e.isMain?0:e.opened?1:2}function Kv(e){let t=e.split(/[/\\]/).filter(e=>e.length>0);return t.length>0?t[t.length-1]??e:e}function qv(e){let t=[],n=new Map;for(let r of e){let e=r.gitCommonDir,i=r.mainRoot;if(e===void 0||i===void 0){t.push({project:r,mainRoot:r.path,worktrees:[]});continue}let a=n.get(e);a===void 0&&(a=t.length,n.set(e,a),t.push({project:null,mainRoot:i,worktrees:[]}));let o=t[a];o!==void 0&&(r.isLinkedWorktree?o.worktrees.push(r):o.project===null&&(o.project=r))}return t.map(e=>{let t=e.project===null;return{project:e.project??{path:e.mainRoot,name:Kv(e.mainRoot),lastOpenedAt:``},worktrees:e.worktrees,projectSynthesized:t}})}function Jv(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(Wm,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function Yv(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`select-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(Gm,{"data-slot":`context-menu-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Xv(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(Jm,{"data-slot":`context-menu-group`,...n}),t[2]=n,t[3]=r),r}function Zv(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(eh,{"data-slot":`context-menu-sub`,...n}),t[2]=n,t[3]=r),r}function Qv(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(Km,{children:(0,Z.jsx)(qm,{"data-slot":`context-menu-content`,className:i,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function $v(e){let t=(0,$.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=J(`group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,Z.jsx)(Xm,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function ey(e){let t=(0,$.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,inset:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=J(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(Ro,{className:`ml-auto`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,Z.jsxs)(th,{"data-slot":`context-menu-sub-trigger`,"data-inset":i,className:o,...a,children:[n,s]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function ty(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:overflow-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0 subtle-scrollbar`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(nh,{"data-slot":`context-menu-sub-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ny(e){let t=(0,$.c)(15),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:i,children:r,checked:n,inset:a,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s;t[6]===i?s=t[7]:(s=J(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),t[6]=i,t[7]=s);let c;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`span`,{className:`pointer-events-none absolute right-2`,children:(0,Z.jsx)(Qm,{children:(0,Z.jsx)(Fo,{})})}),t[8]=c):c=t[8];let l;return t[9]!==n||t[10]!==r||t[11]!==a||t[12]!==o||t[13]!==s?(l=(0,Z.jsxs)(Zm,{"data-slot":`context-menu-checkbox-item`,"data-inset":a,className:s,checked:n,...o,children:[c,r]}),t[9]=n,t[10]=r,t[11]=a,t[12]=o,t[13]=s,t[14]=l):l=t[14],l}function ry(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=J(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,Z.jsx)(Ym,{"data-slot":`context-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function iy(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`-mx-1 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)($m,{"data-slot":`context-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ay(e){let t=(0,$.c)(14),{path:n,name:r,onRemoveRecent:i,testIdPrefix:a}=e,{_:o}=ht(),s;t[0]!==o||t[1]!==r?(s=o({id:`Y6PKd1`,values:{name:r}}),t[0]=o,t[1]=r,t[2]=s):s=t[2];let c;t[3]===o?c=t[4]:(c=o({id:`Es-eZU`}),t[3]=o,t[4]=c);let l;t[5]!==i||t[6]!==n?(l=e=>{e.stopPropagation(),i(n)},t[5]=i,t[6]=n,t[7]=l):l=t[7];let u=`${a}-remove-${n}`,d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(fl,{"aria-hidden":`true`,className:`size-3.5`}),t[8]=d):d=t[8];let f;return t[9]!==s||t[10]!==c||t[11]!==l||t[12]!==u?(f=(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,tabIndex:-1,"aria-hidden":`true`,"aria-label":s,title:c,onClick:l,className:`absolute top-1/2 right-1 size-6 -translate-y-1/2 text-muted-foreground opacity-0 transition-opacity group-hover/recent:opacity-100 focus-visible:opacity-100`,"data-testid":u,children:d}),t[9]=s,t[10]=c,t[11]=l,t[12]=u,t[13]=f):f=t[13],f}function oy(e){let t=(0,$.c)(13),{path:n,onRemoveRecent:r,testIdPrefix:i,children:a}=e,o;t[0]===a?o=t[1]:(o=(0,Z.jsx)(Yv,{asChild:!0,children:a}),t[0]=a,t[1]=o);let s;t[2]!==r||t[3]!==n?(s=()=>r(n),t[2]=r,t[3]=n,t[4]=s):s=t[4];let c=`${i}-context-remove-${n}`,l,u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(fl,{"aria-hidden":`true`}),u=(0,Z.jsx)(q,{id:`Es-eZU`}),t[5]=l,t[6]=u):(l=t[5],u=t[6]);let d;t[7]!==s||t[8]!==c?(d=(0,Z.jsx)(Qv,{children:(0,Z.jsxs)($v,{onSelect:s,"data-testid":c,children:[l,u]})}),t[7]=s,t[8]=c,t[9]=d):d=t[9];let f;return t[10]!==o||t[11]!==d?(f=(0,Z.jsxs)(Jv,{children:[o,d]}),t[10]=o,t[11]=d,t[12]=f):f=t[12],f}var sy=3e3,cy=600,ly=20,uy=(e,t,n)=>Rv(e,t,n,`CommandPalette`);function dy(e){window.location.assign(hu(e))}function fy(e,t){return e?.kind===`folder`||e?.kind===`folder-index`?e.folderPath:Il(t)}function py(e){let t=(0,$.c)(27),{entry:n,query:r,onSelect:i,disabled:a}=e,o=r===void 0?``:r,s=a===void 0?!1:a,c;t[0]===n?c=t[1]:(c=`title`in n&&n.title?n.title:n.path.split(`/`).pop()??n.path,t[0]=n,t[1]=c);let l=c,u=`snippet`in n?n.snippet:void 0,d=`docExt`in n?n.docExt:void 0,f=`bodyIndexed`in n?n.bodyIndexed:void 0,p=`${n.kind} ${n.path}`,m=`command-palette-nav-${n.kind}-${n.path}`,h;t[2]!==f||t[3]!==d||t[4]!==n.kind||t[5]!==n.path?(h=(0,Z.jsx)(x,{bodyIndexed:f,className:`mt-0.5 size-4`,docExt:d,kind:n.kind,path:n.path}),t[2]=f,t[3]=d,t[4]=n.kind,t[5]=n.path,t[6]=h):h=t[6];let g;t[7]!==o||t[8]!==l?(g=(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:(0,Z.jsx)(hy,{query:o,text:l})}),t[7]=o,t[8]=l,t[9]=g):g=t[9];let _;t[10]!==n.path||t[11]!==o?(_=(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:(0,Z.jsx)(hy,{query:o,text:n.path})}),t[10]=n.path,t[11]=o,t[12]=_):_=t[12];let v;t[13]!==o||t[14]!==u?(v=u?(0,Z.jsx)(`span`,{className:`max-h-10 overflow-hidden text-muted-foreground text-xs leading-relaxed`,children:(0,Z.jsx)(hy,{query:o,text:u})}):null,t[13]=o,t[14]=u,t[15]=v):v=t[15];let y;t[16]!==g||t[17]!==_||t[18]!==v?(y=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[g,_,v]}),t[16]=g,t[17]=_,t[18]=v,t[19]=y):y=t[19];let b;return t[20]!==s||t[21]!==i||t[22]!==y||t[23]!==p||t[24]!==m||t[25]!==h?(b=(0,Z.jsxs)(j,{value:p,onSelect:i,disabled:s,"data-testid":m,className:`items-start`,children:[h,y]}),t[20]=s,t[21]=i,t[22]=y,t[23]=p,t[24]=m,t[25]=h,t[26]=b):b=t[26],b}function my(e){let t=(0,$.c)(5),{mode:n,inExclusiveMode:r,paletteModeKind:i}=e;if(r||i!==`normal`||n===`idle`||n===`content`)return null;let a=`command-palette-search-hint-${n}`,o;t[0]===n?o=t[1]:(o=n===`name-only`?(0,Z.jsx)(q,{id:`-wePNM`}):n===`truncated`?(0,Z.jsx)(q,{id:`-q4abP`}):(0,Z.jsx)(q,{id:`DbILZA`}),t[0]=n,t[1]=o);let s;return t[2]!==a||t[3]!==o?(s=(0,Z.jsx)(`div`,{"aria-live":`polite`,"data-testid":a,className:`border-t px-3 py-2 text-muted-foreground text-xs`,children:o}),t[2]=a,t[3]=o,t[4]=s):s=t[4],s}function hy(e){let t=(0,$.c)(5),{text:n,query:r}=e,i;t[0]!==r||t[1]!==n?(i=j_(n,r).map(gy),t[0]=r,t[1]=n,t[2]=i):i=t[2];let a;return t[3]===i?a=t[4]:(a=(0,Z.jsx)(Z.Fragment,{children:i}),t[3]=i,t[4]=a),a}function gy(e){let t=`${e.start}:${e.match?`match`:`plain`}`;return e.match?(0,Z.jsx)(`mark`,{className:`rounded-sm bg-primary/10 px-0.5 font-semibold text-primary`,children:e.text},t):(0,Z.jsx)(`span`,{children:e.text},t)}function _y({searchResults:e,fallbackSearchResults:t,searchStatus:n}){return e.length>0?e:n===`success`?[]:t}function vy(e){let t=(0,$.c)(138),{bridge:n,open:r,onOpenChange:i}=e,a=n===void 0?null:n,{_:o}=ht(),c=Uv(),[l,u]=(0,Q.useState)(``),d=(0,Q.useDeferredValue)(l),f=d.trim(),p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=[],t[0]=p):p=t[0];let[m,h]=(0,Q.useState)(p),[_,v]=(0,Q.useState)(`idle`),[y,b]=(0,Q.useState)(!1),[x,S]=(0,Q.useState)(!1),[C,w]=(0,Q.useState)(!1),T;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(T=[],t[1]=T):T=t[1];let[E,D]=(0,Q.useState)(T),[O,A]=(0,Q.useState)(null),[M,N]=(0,Q.useState)(`idle`),P;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(P=[],t[2]=P):P=t[2];let[I,L]=(0,Q.useState)(P),R;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(R=[],t[3]=R):R=t[3];let[z,B]=(0,Q.useState)(R),[V,H]=(0,Q.useState)(null),[U,W]=(0,Q.useState)(!1),[G,K]=(0,Q.useState)(!1),[ee,te]=(0,Q.useState)(!1),[ne,re]=(0,Q.useState)(!1),ie;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(ie=[],t[4]=ie):ie=t[4];let[ae,oe]=(0,Q.useState)(ie),[se,ce]=(0,Q.useState)(`idle`),le;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(le=[],t[5]=le):le=t[5];let[ue,de]=(0,Q.useState)(le),[fe,pe]=(0,Q.useState)(`idle`),me=(0,Q.useRef)(!1),he=(0,Q.useRef)(null),ge=(0,Q.useRef)(null),_e=(0,Q.useRef)(null),ve=(0,Q.useRef)(null),{activeDocName:ye,activeTarget:be}=Re(),{pages:xe,pageTitles:Se,pageMeta:Ce,folderPaths:we,filePaths:Te,loading:Ee}=Vo(),De=id(),{states:Oe,refresh:ke}=ts(),{dispatch:je}=Yo(),Ne;t[6]===r?Ne=t[7]:(Ne={enabled:r},t[6]=r,t[7]=Ne);let{status:Pe,refresh:Fe}=ks(Ne),Ie=(Pe?.enabled??!1)&&(Pe?.keyPresent??!1),Le=Pe?.embedded??0,ze=Pe?.total??0,Be=Ie&&ze>0&&Le<ze,Ve;t[8]!==C||t[9]!==r||t[10]!==Fe||t[11]!==Be?(Ve=()=>{if(!r||!C||!Be)return;let e=window.setInterval(()=>Fe(),2500);return()=>window.clearInterval(e)},t[8]=C,t[9]=r,t[10]=Fe,t[11]=Be,t[12]=Ve):Ve=t[12];let He;t[13]!==C||t[14]!==r||t[15]!==Be?(He=[r,C,Be],t[13]=C,t[14]=r,t[15]=Be,t[16]=He):He=t[16],(0,Q.useEffect)(Ve,He);let Ue=as({docName:ye,workspace:De}),We=w_(xe,we,Se,Ce,Te),Ge=g_(z,new Set(We.map(Sy))),Ke=a?.config.projectPath??null,qe=a?I.filter(e=>e.path!==Ke):[],Je=Fv(),Ye=a&&Je?Je.entries.filter(xy):[],Xe;t[17]!==ye||t[18]!==be?(Xe=fy(be,ye),t[17]=ye,t[18]=be,t[19]=Xe):Xe=t[19];let Ze=Xe,Qe=f===``?[]:k_(We,f,8),$e,et;t[20]!==i||t[21]!==r?($e=()=>{let e=function(e){xl(e,`command-palette`)&&(e.preventDefault(),i(!r))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},et=[i,r],t[20]=i,t[21]=r,t[22]=$e,t[23]=et):($e=t[22],et=t[23]),(0,Q.useEffect)($e,et);let tt,nt;t[24]!==o||t[25]!==a||t[26]!==r||t[27]!==ke?(tt=()=>{if(r){if(B(p_()),ke(),a){let e=!1;return uy(async()=>{let t=await a.project.listRecent();e||L(t)},o({id:`fYKgzG`})),()=>{e=!0}}return}u(``),oe([]),ce(`idle`),me.current=!1,de([]),pe(`idle`),w(!1),_e.current?.abort(),_e.current=null,ve.current!==null&&(window.clearTimeout(ve.current),ve.current=null),D([]),A(null),N(`idle`)},nt=[r,a,ke,o],t[24]=o,t[25]=a,t[26]=r,t[27]=ke,t[28]=tt,t[29]=nt):(tt=t[28],nt=t[29]),(0,Q.useEffect)(tt,nt);let rt;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(rt=()=>{he.current&&(he.current.scrollTop=0)},t[30]=rt):rt=t[30];let it;t[31]===l?it=t[32]:(it=[l],t[31]=l,t[32]=it),(0,Q.useEffect)(rt,it);let at=new Set(ae.map(by)),ot=C?{kind:`normal`,query:d}:R_(d,at),st=ot.kind!==`normal`,ct=st||C,lt=ot.kind===`tag-list`?ot.query:``,ut=ot.kind===`tag-docs`?ot.tagName:``,dt=l.trim(),ft=C?I_({query:dt,firedQuery:O,status:M,resultCount:E.length}):null,pt=ft?.submit?.query??``,mt=ft?.results.forQuery??``,gt,_t;t[33]!==st||t[34]!==r?(gt=()=>{if(!r||!st||me.current)return;me.current=!0,ce(`loading`);let e=!1;return B_().then(t=>{e||(oe(t),ce(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tags failed`,t),oe([]),ce(`error`))}),()=>{e=!0}},_t=[r,st],t[33]=st,t[34]=r,t[35]=gt,t[36]=_t):(gt=t[35],_t=t[36]),(0,Q.useEffect)(gt,_t);let vt=ot.kind===`tag-docs`?ot.tagName:null;(0,Q.useEffect)(()=>{if(!r||vt===null){de([]),pe(`idle`);return}pe(`loading`),de([]);let e=!1;return V_(vt).then(t=>{e||(de(t),pe(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tag docs failed`,t),de([]),pe(`error`))}),()=>{e=!0}},[r,vt]),(0,Q.useEffect)(()=>{if(!r||!f||ct||Ee){h([]),v(`idle`),b(!1),S(!1);return}let e=!1,t=!1,n=0,i=null,a,o;v(`loading`);let s=()=>e||n>=ly?!1:(n+=1,o=window.setTimeout(l,cy),!0),c=()=>{e||t&&s()||(h([]),v(`error`),b(!1),S(!1))};function l(){let n=new AbortController;i=n,a=window.setTimeout(()=>{n.abort(),c()},sy),N_(f,{signal:n.signal}).then(n=>{let{entries:r,truncated:i,ready:o}=n;if(window.clearTimeout(a),!e){if(!o){t||(t=!0,h([]),b(!1),S(!0),v(`success`)),s()||S(!1);return}h(r),b(i),S(!1),v(`success`)}}).catch(t=>{window.clearTimeout(a),!e&&(t instanceof Error&&t.name===`AbortError`||c())})}return l(),()=>{e=!0,window.clearTimeout(a),window.clearTimeout(o),i?.abort()}},[r,f,ct,Ee]);let yt;t[37]!==o||t[38]!==i?(yt=(e,t)=>{let n=t===void 0?o({id:`uuoHOU`}):t;i(!1),uy(async()=>{await e()},n)},t[37]=o,t[38]=i,t[39]=yt):yt=t[39];let bt=yt,xt;t[40]!==o||t[41]!==a?(xt=e=>{a&&uy(async()=>{await a.project.removeRecent(e),L(t=>t.filter(t=>t.path!==e))},o({id:`viwC-K`}))},t[40]=o,t[41]=a,t[42]=xt):xt=t[42];let St=xt,Ct;t[43]!==o||t[44]!==a||t[45]!==bt?(Ct=e=>{if(!a)return;let t=e.worktreePath;if(t!==null){bt(()=>a.project.open({path:t,target:`new-window`,entryPoint:`worktree`}),o({id:`LwMxXg`}));return}let n=e.branch;n!==null&&bt(async()=>{let e=await a.worktree.create({branch:n,createBranch:!1});if(!e.ok)throw Error(e.reason);td(),await a.project.open({path:e.path,target:`new-window`,entryPoint:`worktree`})},o({id:`LwMxXg`}))},t[43]=o,t[44]=a,t[45]=bt,t[46]=Ct):Ct=t[46];let wt=Ct,Tt;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(Tt=function(e){let t={kind:e.kind,path:e.path,lastOpenedAt:new Date().toISOString()},n=h_(p_(),t);m_(n),B(n)},t[47]=Tt):Tt=t[47];let Et=Tt,Dt;t[48]===i?Dt=t[49]:(Dt=function(e){i(!1),Et(e),dy(e.path)},t[48]=i,t[49]=Dt);let Ot=Dt,kt=!ct&&f===``&&Ge.length>0,At=_y({searchResults:m,fallbackSearchResults:Qe,searchStatus:_}),jt=!ct&&At.length>0,Mt=!ct&&f!==``&&(Ee||x)&&!jt,Nt=!ct&&f!==``&&_===`loading`&&!jt&&!Mt,Pt=!ct&&a!==null&&qe.length>0&&(f===``||qe.some(e=>P_(`${e.name} ${e.path}`,d,[`open recent project`]))),Ft=Ye.filter(e=>f===``||P_(e.branch??``,d,[`worktree branch`])),It=!ct&&a!==null&&Ft.length>0,Lt=Xs(),Rt=!ct&&!Lt&&Ue!==null&&(f===``||Xr.some(e=>{let t=e.displayName;return P_(o({id:`WqLq6M`,values:{displayName:t}}),d,[e.id,`agent handoff`,`open in`])})),zt=ot.kind===`tag-list`?z_(ae,ot.query):[],Bt=ot.kind===`tag-list`&&se!==`loading`&&zt.length===0,Vt=ot.kind===`tag-docs`&&fe===`success`&&ue.length===0,Ht=gc(),Ut;t[50]===i?Ut=t[51]:(Ut=e=>{i(!1),Gt(e)},t[50]=i,t[51]=Ut);let Wt=Ut,Kt;t[52]!==a||t[53]!==i?(Kt=e=>{i(!1),$u(e,a?{okDesktop:{shell:a.shell}}:{okDesktop:void 0})},t[52]=a,t[53]=i,t[54]=Kt):Kt=t[54];let qt=Kt,Jt;t[55]===i?Jt=t[56]:(Jt=()=>i(!1),t[55]=i,t[56]=Jt);let Yt;t[57]===H?Yt=t[58]:(Yt=e=>H(e),t[57]=H,t[58]=Yt);let Xt;t[59]===W?Xt=t[60]:(Xt=()=>W(!0),t[59]=W,t[60]=Xt);let Zt;t[61]===K?Zt=t[62]:(Zt=()=>K(!0),t[61]=K,t[62]=Zt);let Qt;t[63]===te?Qt=t[64]:(Qt=()=>te(!0),t[63]=te,t[64]=Qt);let Y;t[65]===re?Y=t[66]:(Y=()=>re(!0),t[65]=re,t[66]=Y);let $t={bridge:a,singleFile:c,activeDocName:ye,contextualTargetKind:$g(be),viewMenuState:Ht,emitMenuAction:Wt,runAction:bt,openExternalUrl:qt,closePalette:Jt,openNewItemDialog:Yt,openSeedDialog:Xt,openCreateProjectDialog:Zt,openReportBugDialog:Qt,openFeedbackDialog:Y},en=ct?[]:s_.flatMap(e=>{if(!e.available($t)||e.visibility===`search-only`&&f===``)return[];let t=e.label($t);return P_(t,d,e.keywords)?[{cmd:e,label:t}]:[]}),tn=en.length>0,nn;t[67]===o?nn=t[68]:(nn=e=>{switch(e){case`commands`:return o({id:`45MZFs`});case`project`:return o({id:`e0NrBM`});case`file`:return o({id:`J2eKUI`});case`view`:return o({id:`jpctdh`});case`terminal`:return o({id:`ALhMYW`});case`app`:return o({id:`IrC12v`})}},t[67]=o,t[68]=nn);let rn=nn,an=e=>{let t=en.filter(t=>t.cmd.group===e);return t.length===0?null:(0,Z.jsx)(Ae,{heading:rn(e),children:t.map(e=>{let{cmd:t,label:n}=e,r=t.shortcutId!==void 0&&(t.shortcutDesktopOnly!==!0||a!==null)?Ol(t.shortcutId):null;return(0,Z.jsxs)(j,{value:`${n} ${t.keywords.join(` `)}`,onSelect:()=>t.dispatch($t),"data-testid":`command-palette-${t.id}`,children:[(0,Z.jsx)(t.icon,{}),(0,Z.jsx)(`span`,{children:n}),t.checked?.($t)?(0,Z.jsx)(Fo,{className:`ml-auto text-muted-foreground`,"aria-hidden":`true`}):null,r?(0,Z.jsx)(g,{children:r}):null]},t.id)})},e)},on=ct||kt||jt||Nt||Mt||Pt||Rt||tn,sn;t[69]===Symbol.for(`react.memo_cache_sentinel`)?(sn=function(e){u(`${L_}${e}`)},t[69]=sn):sn=t[69];let cn=sn,ln;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(ln=function(){_e.current?.abort(),_e.current=null,ve.current!==null&&(window.clearTimeout(ve.current),ve.current=null),D([]),A(null),N(`idle`)},t[70]=ln):ln=t[70];let un=ln,dn;t[71]===l?dn=t[72]:(dn=function(){w(!0),l.startsWith(`tag:`)&&u(l.slice(L_.length)),un(),ge.current?.focus()},t[71]=l,t[72]=dn);let fn=dn,pn;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(pn=function(){w(!1),u(``),un(),ge.current?.focus()},t[73]=pn):pn=t[73];let mn=pn,hn=function(e){let t=e.trim();if(!t||Ee)return;_e.current?.abort(),ve.current!==null&&window.clearTimeout(ve.current);let n=new AbortController;_e.current=n,N(`loading`);let r=!1,i=window.setTimeout(()=>{r=!0,n.abort(),N(`error`)},sy);ve.current=i,N_(t,{signal:n.signal,semantic:!0,limit:30}).then(e=>{let{entries:r}=e;gn(i,n),D(r),A(t),N(`success`)}).catch(e=>{gn(i,n),!(e instanceof Error&&e.name===`AbortError`&&!r)&&(console.debug(`[semantic-search] fire failed`,{timedOut:r,error:e}),N(`error`))})};function gn(e,t){window.clearTimeout(e),ve.current===e&&(ve.current=null),_e.current===t&&(_e.current=null)}let _n=function(e){!C||e.key!==`Enter`||(ft?.submit?(e.preventDefault(),e.stopPropagation(),hn(ft.submit.query)):M===`loading`&&(e.preventDefault(),e.stopPropagation()))},vn;t[74]===C?vn=t[75]:(vn=function(e){C&&(e.preventDefault(),mn())},t[74]=C,t[75]=vn);let yn=vn,bn;t[76]===o?bn=t[77]:(bn=o({id:`1bDVu5`}),t[76]=o,t[77]=bn);let xn;t[78]===o?xn=t[79]:(xn=o({id:`5GRxoA`}),t[78]=o,t[79]=xn);let Sn;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(Sn={shouldFilter:!1,className:`[&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4`},t[80]=Sn):Sn=t[80];let Cn;t[81]!==o||t[82]!==C?(Cn=o(C?{id:`zXj1rA`}:{id:`ggs9f8`}),t[81]=o,t[82]=C,t[83]=Cn):Cn=t[83];let wn;t[84]!==C||t[85]!==st?(wn=()=>{C&&(w(!1),un()),u(st?``:L_),ge.current?.focus()},t[84]=C,t[85]=st,t[86]=wn):wn=t[86];let Tn=st?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`,En;t[87]===Tn?En=t[88]:(En=J(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,Tn),t[87]=Tn,t[88]=En);let Dn,On;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(Dn=(0,Z.jsx)(hc,{className:`size-3.5`}),On=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`0rwwOn`})}),t[89]=Dn,t[90]=On):(Dn=t[89],On=t[90]);let kn;t[91]!==st||t[92]!==wn||t[93]!==En?(kn=(0,Z.jsxs)(`button`,{type:`button`,onClick:wn,"data-testid":`command-palette-filter-tag`,"data-active":st,"aria-pressed":st,className:En,children:[Dn,On]}),t[91]=st,t[92]=wn,t[93]=En,t[94]=kn):kn=t[94];let An;t[95]!==fn||t[96]!==C||t[97]!==Ie?(An=Ie?(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>C?mn():fn(),"data-testid":`command-palette-filter-semantic`,"data-active":C,"aria-pressed":C,className:J(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,C?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:[(0,Z.jsx)(qs,{className:`size-3.5`}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`9tJX8r`})})]}):null,t[95]=fn,t[96]=C,t[97]=Ie,t[98]=An):An=t[98];let jn;t[99]!==kn||t[100]!==An?(jn=(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-1.5 border-b px-3 py-2`,children:[kn,An]}),t[99]=kn,t[100]=An,t[101]=jn):jn=t[101];let Mn;t[102]===Mt?Mn=t[103]:(Mn=Mt?(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-muted-foreground text-sm`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-search-preparing`,children:[(0,Z.jsx)(qc,{className:`size-4 animate-spin`}),(0,Z.jsx)(q,{id:`yIPXut`})]}):null,t[102]=Mt,t[103]=Mn);let Nn;t[104]!==jt||t[105]!==Nt?(Nn=Nt&&!jt?(0,Z.jsx)(s,{children:(0,Z.jsx)(q,{id:`WRNXKp`})}):null,t[104]=jt,t[105]=Nt,t[106]=Nn):Nn=t[106];let Pn=my,Fn=F_(f,At,{truncated:y}),In;t[107]!==Pn||t[108]!==ct||t[109]!==ot.kind||t[110]!==Fn?(In=(0,Z.jsx)(Pn,{mode:Fn,inExclusiveMode:ct,paletteModeKind:ot.kind}),t[107]=Pn,t[108]=ct,t[109]=ot.kind,t[110]=Fn,t[111]=In):In=t[111];let Ln=V===`file`,Rn;t[112]===H?Rn=t[113]:(Rn=e=>{e||H(null)},t[112]=H,t[113]=Rn);let zn;t[114]!==Ze||t[115]!==Ln||t[116]!==Rn?(zn=(0,Z.jsx)(ev,{open:Ln,onOpenChange:Rn,kind:`file`,initialDir:Ze}),t[114]=Ze,t[115]=Ln,t[116]=Rn,t[117]=zn):zn=t[117];let Bn=V===`folder`,Vn;t[118]===H?Vn=t[119]:(Vn=e=>{e||H(null)},t[118]=H,t[119]=Vn);let Hn;t[120]!==Ze||t[121]!==Bn||t[122]!==Vn?(Hn=(0,Z.jsx)(ev,{open:Bn,onOpenChange:Vn,kind:`folder`,initialDir:Ze}),t[120]=Ze,t[121]=Bn,t[122]=Vn,t[123]=Hn):Hn=t[123];let Un;t[124]!==U||t[125]!==W?(Un=(0,Z.jsx)(Ov,{open:U,onOpenChange:W}),t[124]=U,t[125]=W,t[126]=Un):Un=t[126];let Gn;t[127]!==a||t[128]!==G||t[129]!==K?(Gn=a?(0,Z.jsx)(Ig,{open:G,onOpenChange:K,bridge:a}):null,t[127]=a,t[128]=G,t[129]=K,t[130]=Gn):Gn=t[130];let Kn;t[131]!==a||t[132]!==ee||t[133]!==te?(Kn=a?(0,Z.jsx)(am,{open:ee,onOpenChange:te}):null,t[131]=a,t[132]=ee,t[133]=te,t[134]=Kn):Kn=t[134];let qn;return t[135]!==ne||t[136]!==re?(qn=(0,Z.jsx)(U_,{open:ne,onOpenChange:re,source:`command_palette`}),t[135]=ne,t[136]=re,t[137]=qn):qn=t[137],(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Me,{open:r,onOpenChange:i,title:bn,description:xn,className:`sm:max-w-2xl`,commandProps:Sn,onEscapeKeyDown:yn,children:[(0,Z.jsx)(k,{ref:ge,value:l,onValueChange:u,onKeyDown:_n,placeholder:Cn}),jn,(0,Z.jsxs)(F,{ref:he,className:`subtle-scrollbar`,children:[C&&ft?(0,Z.jsxs)(Z.Fragment,{children:[Be?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-semantic-indexing`,children:[(0,Z.jsx)(qc,{className:`size-3.5 animate-spin`}),(0,Z.jsx)(q,{id:`kCNU4q`,values:{semanticIndexedCount:Le,semanticTotalCount:ze}})]}):null,ft.submit?(0,Z.jsx)(Ae,{children:(0,Z.jsx)(j,{value:`semantic-submit`,onSelect:()=>hn(pt),"data-testid":`command-palette-semantic-submit`,children:ft.submit.kind===`retry`?(0,Z.jsxs)(`span`,{className:`flex items-center gap-2 text-amber-700 dark:text-amber-400`,children:[(0,Z.jsx)(qs,{}),(0,Z.jsx)(q,{id:`rBc32v`})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(qs,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:(0,Z.jsx)(q,{id:`FNTx6u`,values:{semanticSubmitQuery:pt}})}),(0,Z.jsx)(g,{children:`↵`})]})})}):null,ft.notice===`empty`?(0,Z.jsx)(s,{"data-testid":`command-palette-semantic-empty`,children:(0,Z.jsx)(q,{id:`Xw_maT`})}):null,ft.notice===`searching`?(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-muted-foreground text-sm`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-semantic-searching`,children:[(0,Z.jsx)(qc,{className:`size-4 animate-spin`}),(0,Z.jsx)(q,{id:`PBwmDJ`})]}):null,ft.notice===`no-results`?(0,Z.jsx)(s,{"data-testid":`command-palette-semantic-no-results`,children:(0,Z.jsx)(q,{id:`yFyZMJ`,values:{semanticQueryText:dt}})}):null,ft.results.show?(0,Z.jsx)(Ae,{heading:ft.results.dimmed?o({id:`QlxHAH`,values:{semanticResultsLabel:mt}}):o({id:`9tJX8r`}),children:(0,Z.jsx)(`div`,{"data-testid":`command-palette-semantic-results`,"data-dimmed":ft.results.dimmed,children:E.map(e=>(0,Z.jsx)(py,{entry:e,disabled:ft.results.dimmed,onSelect:()=>Ot(e)},f_(e.kind,e.path)))})}):null]}):null,Mn,Nn,on?null:(0,Z.jsx)(s,{children:_===`error`?(0,Z.jsx)(q,{id:`pkAft1`}):(0,Z.jsx)(q,{id:`i3f2kh`})}),ot.kind===`tag-list`?(0,Z.jsxs)(Ae,{heading:ot.query?o({id:`evs0iw`,values:{tagListQuery:lt}}):o({id:`2QM24L`}),children:[se===`loading`?(0,Z.jsx)(s,{children:(0,Z.jsx)(q,{id:`a_u4ck`})}):null,se===`error`?(0,Z.jsx)(s,{children:(0,Z.jsx)(q,{id:`MZoxVx`})}):null,Bt?(0,Z.jsx)(s,{children:ot.query?o({id:`X0ttSN`,values:{tagListQuery:lt}}):o({id:`JLUTgi`})}):null,zt.map(e=>(0,Z.jsxs)(j,{value:`tag ${e.name}`,onSelect:()=>cn(e.name),"data-testid":`command-palette-tag-${e.name}`,children:[(0,Z.jsx)(hc,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:e.name}),(0,Z.jsx)(`span`,{className:`ml-auto shrink-0 text-[11px] text-muted-foreground tabular-nums`,children:(0,Z.jsx)(q,{id:`fVcm9t`,values:{0:e.count}})})]},`tag:${e.name}`))]}):null,ot.kind===`tag-docs`?(0,Z.jsxs)(Ae,{heading:o({id:`hGmuTc`,values:{tagDocsName:ut}}),children:[fe===`loading`?(0,Z.jsx)(s,{children:(0,Z.jsx)(q,{id:`pWbsW6`})}):null,fe===`error`?(0,Z.jsx)(s,{children:(0,Z.jsx)(q,{id:`48uGTI`})}):null,Vt?(0,Z.jsx)(s,{children:o({id:`NIWAux`,values:{tagDocsName:ut}})}):null,ue.map(e=>{let t=e.title||e.docName.split(`/`).pop()||e.docName,n=e.matchingTags.filter(e=>e!==ot.tagName).map(yy).join(`, `);return(0,Z.jsxs)(j,{value:`tag-doc ${e.docName}`,onSelect:()=>{i(!1),dy(e.docName)},"data-testid":`command-palette-tag-doc-${e.docName}`,className:`items-start`,children:[(0,Z.jsx)(Wn,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:t}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.docName}),e.matchingTags.length>0&&e.matchingTags.some(e=>e!==ot.tagName)?(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-[11px]`,children:(0,Z.jsx)(q,{id:`CvsD6Y`,values:{viaTags:n}})}):null]})]},`tag-doc:${e.docName}`)})]}):null,kt?(0,Z.jsx)(Ae,{heading:o({id:`MmDDWK`}),children:Ge.map(e=>(0,Z.jsx)(py,{entry:e,onSelect:()=>Ot(e)},f_(e.kind,e.path)))}):null,an(`commands`),Rt?(0,Z.jsx)(Ae,{heading:o({id:`O7_W_a`}),children:Xr.filter(e=>{let t=e.displayName;return P_(o({id:`WqLq6M`,values:{displayName:t}}),d,[e.id,`agent handoff`,`open in`])}).map(e=>{let t=Oe[e.id],n=t.installed===!0&&Ue!==null,r=e.displayName,a=t.installed===null?o({id:`IA6JW2`}):t.installed===!1?o({id:`5SwVv1`}):null,s=o(a?{id:`1ZpfyB`,values:{displayName:r,hint:a}}:{id:`WqLq6M`,values:{displayName:r}});return(0,Z.jsxs)(j,{value:`send to ai ${e.displayName} ${e.id} agent open in`,disabled:!n,onSelect:()=>{!n||!Ue||(i(!1),je(e.id,Ue))},"data-testid":`command-palette-open-in-${e.id}`,"aria-label":s,children:[(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`WqLq6M`,values:{displayName:r}})}),a?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-auto text-muted-foreground text-xs`,children:a}):null]},e.id)})}):null,an(`project`),Pt&&a?(0,Z.jsx)(Ae,{heading:o({id:`3iyGWF`}),children:qe.filter(e=>P_(`${e.name} ${e.path}`,d,[`open recent project`])).slice(0,10).map(e=>{let t=e.isLinkedWorktree===!0,n=t?lo:Fh,r=t&&e.mainRoot!==void 0?Kv(e.mainRoot):null;return(0,Z.jsx)(oy,{path:e.path,onRemoveRecent:St,testIdPrefix:`command-palette-recent`,children:(0,Z.jsxs)(`div`,{className:`group/recent relative flex items-center`,children:[(0,Z.jsxs)(j,{value:`${e.name} ${e.path} recent project`,onSelect:()=>bt(()=>a.project.open({path:e.path,target:`new-window`,entryPoint:`recents`}),o({id:`SUOoXn`})),"data-testid":`command-palette-recent-${e.path}`,className:`flex-1 items-start pr-8`,children:[(0,Z.jsx)(n,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:e.name}),r===null?null:(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:(0,Z.jsx)(q,{id:`8Gzz2G`,values:{worktreeOf:r}})}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.path})]})]}),(0,Z.jsx)(ay,{path:e.path,name:e.name,onRemoveRecent:St,testIdPrefix:`command-palette-recent`})]})},e.path)})}):null,It&&a?(0,Z.jsx)(Ae,{heading:o({id:`sxjyRq`}),children:Ft.slice(0,10).map(e=>(0,Z.jsxs)(j,{value:`${e.branch} worktree branch`,onSelect:()=>wt(e),"data-testid":`command-palette-worktree-${e.branch}`,className:`items-start`,children:[(0,Z.jsx)(lo,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:e.branch}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.worktreePath??o({id:`iO8V-7`})})]})]},e.branch))}):null,[`file`,`view`,`terminal`,`app`].map(e=>an(e)),jt?(0,Z.jsx)(Ae,{heading:o({id:`A1taO8`}),children:At.map(e=>(0,Z.jsx)(py,{entry:e,query:f,onSelect:()=>Ot(e)},f_(e.kind,e.path)))}):null]}),In]}),zn,Hn,Un,Gn,Kn,qn]})}function yy(e){return`#${e}`}function by(e){return e.name}function xy(e){return e.branch!==null&&!e.isCurrent}function Sy(e){return f_(e.kind,e.path)}function Cy(e){return e===`eperm`?yl._({id:`XuQzrk`}):yl._({id:`BUyQnq`})}async function wy(e){let t=await e.restartServer(e.config.projectPath);return t.ok?{ok:!0}:{ok:!1,message:Cy(t.reason)}}var Ty=500;function Ey(e,t,n){return t?`terminal`:e===null&&n?`retrying`:`hidden`}function Dy(e){return e?.kind===`null-collab`}function Oy(e){if(e===null)return yl._({id:`Ua78MH`});if(e.kind===`null-collab`)return yl._({id:`TJnkyf`});if(e.code===`network`)return yl._({id:`aoa6xA`});if(e.code===`invalid-body`)return yl._({id:`FRYB1Q`});let t=e.code;return yl._({id:`4nj6n8`,values:{code:t}})}function ky(){let e=(0,$.c)(28),{collabUrl:t,collabTerminal:n,collabLastError:r,retryCollab:i}=Re(),[a,o]=(0,Q.useState)(!1),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(null),d=typeof window<`u`?window.okDesktop:void 0,f,p;e[0]!==n||e[1]!==t?(f=()=>{if(t!==null||n){o(!1);return}let e=setTimeout(()=>o(!0),Ty);return()=>clearTimeout(e)},p=[t,n],e[0]=n,e[1]=t,e[2]=f,e[3]=p):(f=e[2],p=e[3]),(0,Q.useEffect)(f,p);let m=Ey(t,n,a);if(m===`hidden`)return null;if(m===`terminal`){let t;e[4]===r?t=e[5]:(t=Dy(r),e[4]=r,e[5]=t);let n=t,a;e[6]===r?a=e[7]:(a=Oy(r),e[6]=r,e[7]=a);let o=a,f;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=async()=>{if(d){u(null),c(!0);try{let e=await wy(d);e.ok||(u(e.message),c(!1))}catch{c(!1)}}},e[8]=f):f=e[8];let p=f,m;e[9]!==o||e[10]!==n?(m=(0,Z.jsx)(`span`,{children:n?(0,Z.jsx)(q,{id:`AAlr5Y`,components:{0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})}}):(0,Z.jsx)(q,{id:`noH1JX`,values:{errorDetail:o},components:{0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`}),1:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})}})}),e[9]=o,e[10]=n,e[11]=m):m=e[11];let h;e[12]===i?h=e[13]:(h=()=>{u(null),i()},e[12]=i,e[13]=h);let g;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(q,{id:`6gRgw8`}),e[14]=g):g=e[14];let _;e[15]!==s||e[16]!==h?(_=(0,Z.jsx)(`button`,{type:`button`,onClick:h,disabled:s,className:`bg-red-950 text-red-50 px-2 py-0.5 rounded text-xs font-medium hover:bg-red-900 disabled:opacity-60`,children:g}),e[15]=s,e[16]=h,e[17]=_):_=e[17];let v;e[18]===s?v=e[19]:(v=d?(0,Z.jsx)(`button`,{type:`button`,onClick:p,disabled:s,className:`bg-red-950 text-red-50 px-2 py-0.5 rounded text-xs font-medium hover:bg-red-900 disabled:opacity-60`,children:s?(0,Z.jsx)(q,{id:`0Er6-M`}):(0,Z.jsx)(q,{id:`uaUc6t`})}):null,e[18]=s,e[19]=v);let y;e[20]===l?y=e[21]:(y=l===null?null:(0,Z.jsx)(`span`,{className:`w-full text-red-950 text-xs`,children:l}),e[20]=l,e[21]=y);let b;return e[22]!==y||e[23]!==m||e[24]!==_||e[25]!==v?(b=(0,Z.jsxs)(`div`,{role:`alert`,"aria-live":`assertive`,className:`fixed top-0 inset-x-0 z-50 bg-red-500/95 text-red-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md flex items-center justify-center gap-3 flex-wrap`,children:[m,_,v,y]}),e[22]=y,e[23]=m,e[24]=_,e[25]=v,e[26]=b):b=e[26],b}let h;return e[27]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`fixed top-0 inset-x-0 z-50 bg-amber-500/95 text-amber-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md`,children:(0,Z.jsx)(q,{id:`UYcGIW`})}),e[27]=h):h=e[27],h}function Ay(e){let t=(0,$.c)(5),{bridge:n}=e,[r,i]=(0,Q.useState)(!1),a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>Ht(e=>{e===`new-project`&&i(!0)}),o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o);let s;return t[2]!==n||t[3]!==r?(s=(0,Z.jsx)(Ig,{open:r,onOpenChange:i,bridge:n}),t[2]=n,t[3]=r,t[4]=s):s=t[4],s}var jy=`ok-acp-desktop-migration-v1`,My=[`ok-preferred-agent-v1`,`ok-ask-ai-agent-v2`,`ok-ask-ai-default-agent-v1`];function Ny(e){try{return localStorage.getItem(e)}catch{return null}}function Py(){try{localStorage.setItem(jy,`1`)}catch{}}function Fy(){return My.some(e=>Ny(e)!==null)}function Iy(e){return Xr.every(t=>e[t.id]?.installed!=null)?Xr.filter(t=>e[t.id]?.installed===!0).map(e=>e.id):null}function Ly(e){let t=(0,$.c)(3),n,r;t[0]===e?(n=t[1],r=t[2]):(n=()=>{if(Ny(jy)!==null)return;if(!Fy()){Py();return}let t=Iy(e);if(t!==null){for(let e of t)ni(Jr(e),!0);Py()}},r=[e],t[0]=e,t[1]=n,t[2]=r),(0,Q.useEffect)(n,r)}function Ry(){let{states:e}=ts();return Ly(e),null}async function zy(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok){let e=await t.json().catch(()=>null),n=t.status,r=t.statusText;throw Error(kl(e)??yl._({id:`lHwYMr`,values:{status:n,statusText:r}}))}return(await t.json()).docs??[]}function By(){let e=(0,$.c)(18),[t,n]=(0,Q.useState)(!1),[r,i]=(0,Q.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={kind:`idle`},e[0]=a):a=e[0];let[o,s]=(0,Q.useState)(a),c=(0,Q.useRef)(0),l,u;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>{let e=function(e){let t=e.detail;if(!t||typeof t.value!=`string`)return;let r=c.current+=1;i(t.value),n(!0),s({kind:`loading`}),zy(t.value).then(e=>{c.current===r&&s({kind:`ready`,docs:e})}).catch(e=>{c.current===r&&s({kind:`error`,message:e instanceof Error?e.message:String(e)})})};return document.addEventListener(Ce,e),()=>document.removeEventListener(Ce,e)},u=[],e[1]=l,e[2]=u):(l=e[1],u=e[2]),(0,Q.useEffect)(l,u);let d;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=function(e){n(!1),window.location.assign(hu(e))},e[3]=d):d=e[3];let f=d,p=r??``,m;e[4]===p?m=e[5]:(m={tagName:p},e[4]=p,e[5]=m);let h;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(h={0:(0,Z.jsx)(`span`,{className:`font-mono break-all`})},e[6]=h):h=e[6];let g;e[7]===m?g=e[8]:(g=(0,Z.jsx)(_n,{children:(0,Z.jsx)(pn,{children:(0,Z.jsx)(q,{id:`7H4UHD`,values:m,components:h})})}),e[7]=m,e[8]=g);let _=r??``,v;e[9]!==o||e[10]!==_?(v=(0,Z.jsx)(hn,{children:(0,Z.jsx)(Vy,{fetchState:o,tag:_,onSelectDoc:f})}),e[9]=o,e[10]=_,e[11]=v):v=e[11];let y;e[12]!==g||e[13]!==v?(y=(0,Z.jsxs)(mn,{children:[g,v]}),e[12]=g,e[13]=v,e[14]=y):y=e[14];let b;return e[15]!==t||e[16]!==y?(b=(0,Z.jsx)(vn,{open:t,onOpenChange:n,children:y}),e[15]=t,e[16]=y,e[17]=b):b=e[17],b}function Vy(e){let t=(0,$.c)(15),{fetchState:n,tag:r,onSelectDoc:i}=e;if(n.kind===`idle`||n.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-loading`,children:(0,Z.jsx)(q,{id:`yQE2r9`})}),t[0]=e):e=t[0],e}if(n.kind===`error`){let e;return t[1]===n.message?e=t[2]:(e=(0,Z.jsx)(`p`,{className:`text-destructive text-sm`,"data-testid":`tag-dialog-error`,children:n.message}),t[1]=n.message,t[2]=e),e}if(n.docs.length===0){let e;t[3]===r?e=t[4]:(e={tag:r},t[3]=r,t[4]=e);let n;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n={0:(0,Z.jsx)(`span`,{className:`font-mono`})},t[5]=n):n=t[5];let i;return t[6]===e?i=t[7]:(i=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-empty`,children:(0,Z.jsx)(q,{id:`lAiyU_`,values:e,components:n})}),t[6]=e,t[7]=i),i}let a;if(t[8]!==n.docs||t[9]!==i){let e;t[11]===i?e=t[12]:(e=e=>{let t=e.matchingTags??[];return(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`button`,{type:`button`,className:`w-full rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring`,onClick:()=>i(e.docName),"data-testid":`tag-dialog-row`,children:[(0,Z.jsx)(`span`,{className:`block truncate font-medium`,children:e.title}),e.docName===e.title?null:(0,Z.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:e.docName}),t.length>0?(0,Z.jsx)(`span`,{className:`mt-1 flex flex-wrap items-center gap-1`,"data-testid":`tag-dialog-row-matches`,children:t.map(Hy)}):null]})},e.docName)},t[11]=i,t[12]=e),a=n.docs.map(e),t[8]=n.docs,t[9]=i,t[10]=a}else a=t[10];let o;return t[13]===a?o=t[14]:(o=(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1`,"data-testid":`tag-dialog-list`,children:a}),t[13]=a,t[14]=o),o}function Hy(e){return(0,Z.jsxs)(`span`,{"data-testid":`tag-dialog-row-match`,"data-tag":e,className:`tag pointer-events-none text-xs`,children:[`#`,e]},e)}var Uy=`raw-mdx-nav`,Wy=`ok-editor-mode-v1`,Gy=[`wysiwyg`,`source`],Ky=`wysiwyg`;function qy(e){return Gy.includes(e)}function Jy(e=localStorage){try{let t=e.getItem(Wy);if(t===null)return Ky;if(qy(t))return t;console.warn(`[editor-mode] invalid persisted value, falling back to default`,{raw:t})}catch{}return Ky}function Yy(e=window,t=localStorage){let n=e.__OK_EDITOR_MODE__;return qy(n)?n:Jy(t)}function Xy(e,t=localStorage){try{return t.setItem(Wy,e),!0}catch(e){return console.warn(`[editor-mode] persist failed`,e),!1}}function Zy(){let e=(0,$.c)(3),[t,n]=(0,Q.useState)(Yy),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=function(e){n(e),Xy(e)},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a=[t,i],e[1]=t,e[2]=a),a}function Qy(e){let t=(0,$.c)(4),{_:n}=ht(),r=(0,Q.useRef)(!1),i,a;t[0]!==n||t[1]!==e?(i=()=>{e===`no-push-permission`&&!r.current&&(r.current=!0,X.info(n({id:`JkCD2u`})))},a=[e,n],t[0]=n,t[1]=e,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,Q.useEffect)(i,a)}function $y(e,t){return e===`follow`?(0,Z.jsx)(q,{id:`Sxx_Zz`,values:{project:t}}):e===`full`?(0,Z.jsx)(q,{id:`4zEZS5`,values:{project:t}}):(0,Z.jsx)(q,{id:`AaaESH`,values:{project:t}})}function eb(){let e=(0,$.c)(8),{projectLocalConfig:t,projectLocalSynced:n,projectLocalBinding:r}=Qu(),i=(0,Q.useRef)(!1),a;e[0]!==r||e[1]!==t?.autoSync||e[2]!==n?(a=()=>{if(!n||i.current||r===null)return;let e=t?.autoSync;if(e?.inheritedNoticePending!==!0)return;i.current=!0;let a=typeof e.inheritedFrom==`string`?e.inheritedFrom:``;X($y($i({mode:e.mode,enabled:e.enabled}),a)),r.patch({autoSync:{inheritedNoticePending:null}})},e[0]=r,e[1]=t?.autoSync,e[2]=n,e[3]=a):a=e[3];let o;e[4]!==r||e[5]!==t||e[6]!==n?(o=[n,t,r],e[4]=r,e[5]=t,e[6]=n,e[7]=o):o=e[7],(0,Q.useEffect)(a,o)}function tb(e,t){return Sc(e)||(co.find(e=>t[e]===!0)??`claude`)}var nb=`ok-terminal-dock-v1`,rb=`right`;function ib(e){return e===`bottom`?`bottom`:`right`}function ab(e){try{return ib((e??localStorage).getItem(nb))}catch{return rb}}function ob(e,t){try{(t??localStorage).setItem(nb,e)}catch{}}function sb(){try{return typeof localStorage>`u`?rb:ab()}catch{return rb}}function cb(e){let t=(0,$.c)(36),{open:n,variant:r,onResolved:i}=e,{_:a}=ht(),o=uo(),s;t[0]!==a||t[1]!==i||t[2]!==r||t[3]!==o?(s=function(e){if(o===null){X.error(a({id:`fiMNLl`}));return}let t=o(e?r===`follow`?`follow`:`full`:`off`);if(!t.ok){let n=t.error;X.error(a(e?{id:`FUMerq`,values:{detail:n}}:{id:`0t0bbC`,values:{detail:n}}));return}i()},t[0]=a,t[1]=i,t[2]=r,t[3]=o,t[4]=s):s=t[4];let c=s,l;t[5]===r?l=t[6]:(l=(0,Z.jsx)(_n,{children:(0,Z.jsx)(mo,{variant:r})}),t[5]=r,t[6]=l);let u;t[7]===r?u=t[8]:(u=(0,Z.jsx)(go,{variant:r}),t[7]=r,t[8]=u);let d;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(`p`,{className:`mt-3 text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`QYTOaN`,components:{0:(0,Z.jsx)(`span`,{className:`font-medium`})}})}),t[9]=d):d=t[9];let f;t[10]===u?f=t[11]:(f=(0,Z.jsxs)(hn,{children:[u,d]}),t[10]=u,t[11]=f);let p;t[12]===c?p=t[13]:(p=()=>c(!1),t[12]=c,t[13]=p);let m=o===null,h;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(q,{id:`IKoTAC`}),t[14]=h):h=t[14];let g;t[15]!==p||t[16]!==m?(g=(0,Z.jsx)(Y,{variant:`outline`,className:`uppercase font-mono`,onClick:p,disabled:m,children:h}),t[15]=p,t[16]=m,t[17]=g):g=t[17];let _;t[18]===c?_=t[19]:(_=()=>c(!0),t[18]=c,t[19]=_);let v=o===null,y;t[20]===r?y=t[21]:(y=r===`follow`?(0,Z.jsx)(q,{id:`U4nTfu`}):(0,Z.jsx)(q,{id:`XU0OXn`}),t[20]=r,t[21]=y);let b;t[22]!==_||t[23]!==v||t[24]!==y?(b=(0,Z.jsx)(Y,{onClick:_,disabled:v,children:y}),t[22]=_,t[23]=v,t[24]=y,t[25]=b):b=t[25];let x;t[26]!==b||t[27]!==g?(x=(0,Z.jsxs)(gn,{children:[g,b]}),t[26]=b,t[27]=g,t[28]=x):x=t[28];let S;t[29]!==x||t[30]!==l||t[31]!==f?(S=(0,Z.jsxs)(mn,{className:`sm:max-w-lg`,showCloseButton:!1,children:[l,f,x]}),t[29]=x,t[30]=l,t[31]=f,t[32]=S):S=t[32];let C;return t[33]!==n||t[34]!==S?(C=(0,Z.jsx)(vn,{open:n,onOpenChange:lb,children:S}),t[33]=n,t[34]=S,t[35]=C):C=t[35],C}function lb(){}function ub(e){if(!(!e.autoSyncOnboardingDismissed&&e.hasRemote===!0&&e.projectLocalSynced===!0&&e.projectSynced===!0&&e.projectLocalConfig!==null&&$i(e.projectLocalConfig.autoSync??void 0)===null&&mi(e.projectConfig?.autoSync?.default)===null))return null;switch(e.pushPermissionCheckStatus){case`allowed`:return`full`;case`denied`:return`follow`;default:return null}}var db=new Map(Xa.map(e=>[e.id,e.alias]));function fb(e,t,n){return oo({relativePath:Qs(e),source:t.source,code:t.code,ruleAlias:t.source===`markdownlint`?db.get(t.code):void 0,message:t.message,line:t.range.start.line+1,column:t.range.start.character+1,lineText:n})}var pb=5;async function mb(e){let t=await fetch(`/api/backlinks?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=ma.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new Dn(yl._({id:`XopE_I`,values:{status:r}}),{status:r})}let r=ga.safeParse(n);if(!r.success)throw new Dn(yl._({id:`lZAiSP`}),{status:t.status});return r.data.backlinks}async function hb(e){let t=await fetch(`/api/forward-links?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=ma.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new Dn(yl._({id:`GemPfn`,values:{status:r}}),{status:r})}let r=pi.safeParse(n);if(!r.success)throw new Dn(yl._({id:`2YZwPB`}),{status:t.status});return r.data.forwardLinks}function gb(e){let t=e.split(`/`);return t.length<=2?e:`…/${t.slice(-2).join(`/`)}`}function _b(e){window.location.hash=hu(e)}function vb(e){let t=(0,$.c)(9),{title:n,count:r,isLoading:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(Lo,{className:`size-3.5 text-muted-foreground transition-transform group-data-[state=closed]:-rotate-90`}),t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o=(0,Z.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[a,(0,Z.jsx)(Id,{children:n})]}),t[1]=n,t[2]=o);let s;t[3]!==r||t[4]!==i?(s=!i&&(0,Z.jsx)(Fd,{children:r}),t[3]=r,t[4]=i,t[5]=s):s=t[5];let c;return t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(un,{className:`group flex w-full cursor-pointer items-center justify-between px-5 py-3 text-left transition-colors hover:bg-muted/40`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function yb(e){let t=(0,$.c)(10),{total:n,expanded:r,onToggle:i}=e;if(n<=pb)return null;let a=n-pb,o;t[0]===r?o=t[1]:(o=r?(0,Z.jsx)(Lo,{className:`size-3`}):(0,Z.jsx)(Ro,{className:`size-3`}),t[0]=r,t[1]=o);let s;t[2]!==r||t[3]!==a?(s=r?(0,Z.jsx)(q,{id:`6fGjTz`}):(0,Z.jsx)(q,{id:`ZptNUh`,values:{hidden:a}}),t[2]=r,t[3]=a,t[4]=s):s=t[4];let c;return t[5]!==r||t[6]!==i||t[7]!==o||t[8]!==s?(c=(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,className:`mt-2 inline-flex cursor-pointer items-center gap-1 px-3 text-xs text-muted-foreground transition-colors hover:text-foreground`,onClick:i,children:[o,s]}),t[5]=r,t[6]=i,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function bb(e){let t=(0,$.c)(35),{icon:n,iconColorClass:r,rowTooltip:i,title:a,path:o,anchor:s,snippet:c,titleHover:l,ariaLabel:u,href:d,external:f,disabled:p,onClick:m}=e,h=o!==void 0&&o!==a,g=r??`text-muted-foreground`,_;t[0]===g?_=t[1]:(_=J(`mt-0.5 shrink-0`,g),t[0]=g,t[1]=_);let v;t[2]!==n||t[3]!==_?(v=(0,Z.jsx)(`span`,{className:_,children:n}),t[2]=n,t[3]=_,t[4]=v):v=t[4];let y=v,b;t[5]!==u||t[6]!==p||t[7]!==f||t[8]!==d||t[9]!==m||t[10]!==a||t[11]!==l?(b=d?(0,Z.jsxs)(`a`,{href:d,target:f?`_blank`:void 0,rel:f?`noopener noreferrer`:void 0,"aria-label":u,title:l,onClick:m,className:`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,children:[a,f?(0,Z.jsxs)(`span`,{className:`sr-only`,children:[` `,(0,Z.jsx)(q,{id:`dbtjJh`})]}):null]}):(0,Z.jsx)(`button`,{type:`button`,"aria-label":u,title:l,disabled:p,onClick:m,className:J(`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,`cursor-pointer bg-transparent p-0 disabled:cursor-not-allowed disabled:opacity-60`),children:a}),t[5]=u,t[6]=p,t[7]=f,t[8]=d,t[9]=m,t[10]=a,t[11]=l,t[12]=b):b=t[12];let x=b,S;t[13]===y?S=t[14]:(S=(0,Z.jsx)(`div`,{className:`mt-px flex items-center`,children:y}),t[13]=y,t[14]=S);let C;t[15]!==s||t[16]!==o||t[17]!==h?(C=h?(0,Z.jsxs)(`div`,{className:`truncate font-mono text-xs text-muted-foreground`,children:[o,s?(0,Z.jsxs)(`span`,{className:`ml-1`,children:[`· #`,s]}):null]}):null,t[15]=s,t[16]=o,t[17]=h,t[18]=C):C=t[18];let w;t[19]===c?w=t[20]:(w=c?(0,Z.jsx)(`p`,{className:`line-clamp-2 text-muted-foreground`,children:c}):null,t[19]=c,t[20]=w);let T;t[21]!==x||t[22]!==C||t[23]!==w?(T=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5 text-1sm`,children:[x,C,w]}),t[21]=x,t[22]=C,t[23]=w,t[24]=T):T=t[24];let E;t[25]!==S||t[26]!==T?(E=(0,Z.jsxs)(`div`,{className:`group relative flex items-start gap-2.5 rounded-md px-3 py-2.5 transition-colors hover:bg-muted/80`,children:[S,T]}),t[25]=S,t[26]=T,t[27]=E):E=t[27];let D=E;if(i){let e;t[28]===D?e=t[29]:(e=(0,Z.jsx)(an,{asChild:!0,children:D}),t[28]=D,t[29]=e);let n;t[30]===i?n=t[31]:(n=(0,Z.jsx)(on,{side:`top`,children:i}),t[30]=i,t[31]=n);let r;return t[32]!==e||t[33]!==n?(r=(0,Z.jsxs)(cn,{children:[e,n]}),t[32]=e,t[33]=n,t[34]=r):r=t[34],r}return D}function xb(e){let t=(0,$.c)(39),{docName:n}=e,{_:r}=ht(),{folderPaths:i,pages:a,pagesBySlug:o,pagesByBasename:s,loading:c}=Vo(),l,u;t[0]===n?(l=t[1],u=t[2]):(l=[`backlinks`,n],u=()=>mb(n),t[0]=n,t[1]=l,t[2]=u);let d;t[3]!==n||t[4]!==c||t[5]!==a?(d=!c&&(a.has(n)||ka(n)),t[3]=n,t[4]=c,t[5]=a,t[6]=d):d=t[6];let f;t[7]!==l||t[8]!==u||t[9]!==d?(f={queryKey:l,queryFn:u,enabled:d},t[7]=l,t[8]=u,t[9]=d,t[10]=f):f=t[10];let{data:p,isLoading:m,error:h}=Mt(f),g;t[11]===p?g=t[12]:(g=p===void 0?[]:p,t[11]=p,t[12]=g);let _=g,[v,y]=(0,Q.useState)(!1),[b,x]=(0,Q.useState)(n);b!==n&&(x(n),y(!1));let S;t[13]!==_||t[14]!==v?(S=v?_:_.slice(0,pb),t[13]=_,t[14]=v,t[15]=S):S=t[15];let C=S,w;t[16]===r?w=t[17]:(w=r({id:`9NJWgv`}),t[16]=r,t[17]=w);let T;t[18]!==_.length||t[19]!==m||t[20]!==w?(T=(0,Z.jsx)(vb,{title:w,count:_.length,isLoading:m}),t[18]=_.length,t[19]=m,t[20]=w,t[21]=T):T=t[21];let E;t[22]!==r||t[23]!==_.length||t[24]!==h||t[25]!==v||t[26]!==i||t[27]!==m||t[28]!==a||t[29]!==s||t[30]!==o||t[31]!==C?(E=h?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(jd,{children:h instanceof Error?h.message:r({id:`Xet9MX`})})}):_.length===0&&!m?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Md,{children:(0,Z.jsx)(q,{id:`rVxu1k`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:C.map((e,t)=>{let n=Rd(e.source,{pages:a,folderPaths:i,pagesBySlug:o,pagesByBasename:s});return(0,Z.jsx)(bb,{icon:(0,Z.jsx)(de,{className:`size-3.5`}),title:e.title,path:gb(e.source),titleHover:e.source,anchor:e.anchor,snippet:e.snippet,href:hu(n.hashDocName,e.anchor)},`${e.source}-${t}`)})}),(0,Z.jsx)(yb,{total:_.length,expanded:v,onToggle:()=>y(Sb)})]}),t[22]=r,t[23]=_.length,t[24]=h,t[25]=v,t[26]=i,t[27]=m,t[28]=a,t[29]=s,t[30]=o,t[31]=C,t[32]=E):E=t[32];let D;t[33]!==m||t[34]!==E?(D=(0,Z.jsx)(ln,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":m,children:E})}),t[33]=m,t[34]=E,t[35]=D):D=t[35];let O;return t[36]!==D||t[37]!==T?(O=(0,Z.jsxs)(dn,{defaultOpen:!0,children:[T,D]}),t[36]=D,t[37]=T,t[38]=O):O=t[38],O}function Sb(e){return!e}function Cb(e){let t=(0,$.c)(49),{docName:n}=e,{_:r}=ht(),{addPage:i,folderPaths:a,pages:o,pagesBySlug:s,pagesByBasename:c,loading:l}=Vo(),u,d;t[0]===n?(u=t[1],d=t[2]):(u=[`forward-links`,n],d=()=>hb(n),t[0]=n,t[1]=u,t[2]=d);let f;t[3]!==n||t[4]!==o||t[5]!==l?(f=!l&&(o.has(n)||ka(n)),t[3]=n,t[4]=o,t[5]=l,t[6]=f):f=t[6];let p;t[7]!==u||t[8]!==d||t[9]!==f?(p={queryKey:u,queryFn:d,enabled:f},t[7]=u,t[8]=d,t[9]=f,t[10]=p):p=t[10];let{data:m,isLoading:h,error:g}=Mt(p),_;t[11]===m?_=t[12]:(_=m===void 0?[]:m,t[11]=m,t[12]=_);let v=_,[y,b]=(0,Q.useState)(null),[x,S]=(0,Q.useState)(!1),[C,w]=(0,Q.useState)(n);C!==n&&(w(n),S(!1),b(null));let T;t[13]!==x||t[14]!==v?(T=x?v:v.slice(0,pb),t[13]=x,t[14]=v,t[15]=T):T=t[15];let E=T,D;t[16]!==r||t[17]!==i||t[18]!==y?(D=async function(e,t){if(!y){b(t);try{await B(e,{addPage:i,onCreated:_b}),b(null)}catch(e){let t=e;X.error(t instanceof Error?t.message:r({id:`tfi40B`})),b(null)}}},t[16]=r,t[17]=i,t[18]=y,t[19]=D):D=t[19];let O=D,k;t[20]!==r||t[21]!==y||t[22]!==a||t[23]!==O||t[24]!==o||t[25]!==c||t[26]!==s||t[27]!==l?(k=function(e){let{title:t}=e;if(e.kind===`external`){let t=e.title===e.url;return(0,Z.jsx)(bb,{icon:(0,Z.jsx)(_o,{className:`size-3.5`}),rowTooltip:r({id:`XDzAnp`}),title:e.title,path:t?void 0:e.url,titleHover:e.url,snippet:e.snippet,href:e.url,external:!0},`ext:${e.url}`)}let n=Sn(e.docName,{pages:o,folderPaths:a,pagesBySlug:s,pagesByBasename:c}),i=!l&&n.kind===`create`,u=!l&&n.kind===`navigate`&&n.displayState===`folder`,d=gb(e.docName),f=e.title===e.docName?d:e.title,p=`doc:${e.docName}:${e.anchor??``}`,m=n.kind===`navigate`?n.hashDocName:e.docName,h=n.kind===`navigate`&&n.hash?n.hash:hu(m,e.anchor);if(i&&n.kind===`create`){let i={initialDir:n.initialDir,suggestedName:n.suggestedName};return(0,Z.jsx)(bb,{icon:(0,Z.jsx)(sl,{className:`size-3.5`}),iconColorClass:`text-amber-600 dark:text-amber-400`,rowTooltip:r(y===p?{id:`kj9pAE`}:{id:`IQPyrD`}),ariaLabel:r(y===p?{id:`un8kBM`,values:{linkTitle:t}}:{id:`jEdF24`,values:{linkTitle:t}}),title:f,path:d,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,disabled:y!==null,onClick:()=>void O(i,p)},p)}return u&&n.kind===`navigate`?(0,Z.jsx)(bb,{icon:(0,Z.jsx)(Fh,{className:`size-3.5`}),iconColorClass:`text-sky-600 dark:text-sky-400`,ariaLabel:r({id:`P6lAT3`,values:{linkTitle:t}}),title:f,path:d,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:h},p):(0,Z.jsx)(bb,{icon:(0,Z.jsx)(de,{className:`size-3.5`}),title:f,path:d,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:h},p)},t[20]=r,t[21]=y,t[22]=a,t[23]=O,t[24]=o,t[25]=c,t[26]=s,t[27]=l,t[28]=k):k=t[28];let A=k,j;t[29]===r?j=t[30]:(j=r({id:`O0Z2Xr`}),t[29]=r,t[30]=j);let M;t[31]!==h||t[32]!==v.length||t[33]!==j?(M=(0,Z.jsx)(vb,{title:j,count:v.length,isLoading:h}),t[31]=h,t[32]=v.length,t[33]=j,t[34]=M):M=t[34];let N;t[35]!==r||t[36]!==g||t[37]!==x||t[38]!==h||t[39]!==v.length||t[40]!==A||t[41]!==E?(N=g?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(jd,{children:g instanceof Error?g.message:r({id:`pZAs1T`})})}):v.length===0&&!h?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Md,{children:(0,Z.jsx)(q,{id:`roiUQQ`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:E.map(A)}),(0,Z.jsx)(yb,{total:v.length,expanded:x,onToggle:()=>S(wb)})]}),t[35]=r,t[36]=g,t[37]=x,t[38]=h,t[39]=v.length,t[40]=A,t[41]=E,t[42]=N):N=t[42];let P;t[43]!==h||t[44]!==N?(P=(0,Z.jsx)(ln,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":h,children:N})}),t[43]=h,t[44]=N,t[45]=P):P=t[45];let F;return t[46]!==M||t[47]!==P?(F=(0,Z.jsxs)(dn,{defaultOpen:!0,children:[M,P]}),t[46]=M,t[47]=P,t[48]=F):F=t[48],F}function wb(e){return!e}function Tb(e){let t=(0,$.c)(11),{docName:n,className:r}=e,i=r===void 0?``:r,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(Cb,{docName:n}),t[0]=n,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(Br,{}),t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,Z.jsx)(xb,{docName:n}),t[3]=n,t[4]=s);let c;t[5]!==a||t[6]!==s?(c=(0,Z.jsxs)(Nd,{className:`px-0 py-0`,children:[a,o,s]}),t[5]=a,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==i||t[9]!==c?(l=(0,Z.jsx)(Ld,{className:i,children:c}),t[8]=i,t[9]=c,t[10]=l):l=t[10],l}function Eb(e){let t=e.setTimer??((e,t)=>setTimeout(e,t)),n=e.clearTimer??(e=>clearTimeout(e)),r=!1,i=!1,a=null,o=null,s=e.baseMs,c=!1,l=n=>{if(!r){if(e.isPaused()){c=!0;return}a=t(u,n)}};async function u(){if(a=null,c=!1,r)return;if(e.isPaused()){c=!0;return}o=new AbortController;let t=o.signal;try{let n=await e.poll(t);if(r)return;n===`ok`?(s=e.baseMs,l(e.baseMs)):(s=Math.min(s*2,e.maxBackoffMs),l(s))}catch{if(r||t.aborted)return;s=Math.min(s*2,e.maxBackoffMs),l(s)}}return{start(){r||i||(i=!0,u())},resume(){r||!e.isPaused()&&c&&a===null&&(c=!1,u())},stop(){r=!0,a!==null&&(n(a),a=null),o?.abort()}}}var Db=1e4,Ob=6e4;async function kb(e,t,n){try{let r=await fetch(`/api/history?docName=${encodeURIComponent(e)}&limit=100`,{signal:t});if(!r.ok)return n.setError(n.unavailableMessage),`error`;let i=await r.json();return n.setEntries((i.entries??[]).filter(e=>e.type!==`checkpoint`)),n.setError(null),`ok`}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)throw e;return n.setError(n.unavailableMessage),console.error(`[timeline]`,e),`error`}finally{t.aborted||n.setLoading(!1)}}function Ab(e){let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/1e3);if(r<60)return yl._({id:`xOTzt5`});if(r<3600){let e=Math.floor(r/60);return yl._({id:`UyROxs`,values:{mins:e}})}if(r<86400){let e=Math.floor(r/3600);return yl._({id:`wXO4Tg`,values:{hrs:e}})}if(r<86400*2)return yl._({id:`rQRrkB`});let i=Math.floor(r/86400);return i<7?yl._({id:`6u9LvN`,values:{days:i}}):t.toLocaleDateString()}function jb(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function Mb(e){if(e.type===`upstream`)return{kind:`upstream`};let t=e.message,n=/^rollback: .+ to ([0-9a-f]{7,40})$/.exec(t);if(n)return{kind:`restore`,targetSha7:n[1].slice(0,7)};let r=/^rename: (.+) -> (.+)$/.exec(t);return r?{kind:`rename`,from:r[1],to:r[2]}:t.startsWith(`reconcile: `)?{kind:`reconcile`}:t.startsWith(`import: `)?{kind:`upstream`}:{kind:`edit`}}function Nb(e){return e.split(`/`).pop()??e}function Pb(e){return e.type===`upstream`?yl._({id:`K_vT1F`}):e.contributors.length===1?e.contributors[0].name:e.contributors.length>1?e.contributors.map(e=>e.name).join(`, `):e.author===`openknowledge-server`||e.author===`server`?yl._({id:`B2DrPb`}):e.author}function Fb(e){let t=(0,$.c)(17),{entry:n,isDark:r}=e;if(n.type===`upstream`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(lo,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[0]=e):e=t[0],e}if(n.contributors.length>0){let e=n.contributors[0],i=e.colorSeed??e.name,a;t[1]===i?a=t[2]:(a=ua(i),t[1]=i,t[2]=a);let o=a,s=r?Ra[o]??Qa[o]:Qa[o],c;t[3]!==s||t[4]!==i?(c=s??Ha(i),t[3]=s,t[4]=i,t[5]=c):c=t[5];let l=c;if(o!==`bot`){let e;t[6]===l?e=t[7]:(e={color:l},t[6]=l,t[7]=e);let n;return t[8]!==o||t[9]!==e?(n=(0,Z.jsx)(Kd,{icon:o,width:14,height:14,className:`shrink-0`,style:e}),t[8]=o,t[9]=e,t[10]=n):n=t[10],n}if(e.name===`File System`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Lh,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[11]=e):e=t[11],e}if(e.name===`OpenKnowledge (service)`||e.name===`Git (upstream)`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(ho,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[12]=e):e=t[12],e}let u;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(Dg,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[13]=u):u=t[13],u}if(n.authorEmail.includes(`agent`)||n.author.includes(`agent`)||n.authorEmail.includes(`cursor`)||n.authorEmail.includes(`claude`)){let e;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(qs,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[14]=e):e=t[14],e}if(n.author===`openknowledge-server`||n.author===`server`){let e;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(ho,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[15]=e):e=t[15],e}let i;return t[16]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(Dg,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[16]=i):i=t[16],i}function Ib(e){let t=[];for(let n of e.contributors)if(n.summaries)for(let e of n.summaries)t.push(e);return t}function Lb(e){let t=(0,$.c)(21),{summaries:n}=e,[r,i]=(0,Q.useState)(!1),a=(0,Q.useId)();if(n.length===0)return null;let o,s;t[0]===n?(o=t[1],s=t[2]):([o,...s]=n,t[0]=n,t[1]=o,t[2]=s);let c=s.length,l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`• `}),t[3]=l):l=t[3];let u;t[4]===o?u=t[5]:(u=(0,Z.jsxs)(`li`,{className:`text-xs text-foreground/90`,children:[l,o]}),t[4]=o,t[5]=u);let d;t[6]!==r||t[7]!==s?(d=r&&s.map(zb),t[6]=r,t[7]=s,t[8]=d):d=t[8];let f;t[9]!==a||t[10]!==u||t[11]!==d?(f=(0,Z.jsxs)(`ul`,{id:a,className:`list-none`,children:[u,d]}),t[9]=a,t[10]=u,t[11]=d,t[12]=f):f=t[12];let p;t[13]!==r||t[14]!==c||t[15]!==a||t[16]!==s.length?(p=s.length>0&&(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,"aria-controls":a,className:`inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:e=>{e.stopPropagation(),i(Rb)},children:[r?(0,Z.jsx)(Lo,{className:`size-3`}):(0,Z.jsx)(Ro,{className:`size-3`}),r?(0,Z.jsx)(q,{id:`vLyv1R`}):(0,Z.jsx)(q,{id:`ZptNUh`,values:{hidden:c}})]}),t[13]=r,t[14]=c,t[15]=a,t[16]=s.length,t[17]=p):p=t[17];let m;return t[18]!==f||t[19]!==p?(m=(0,Z.jsxs)(`div`,{className:`mt-0.5`,children:[f,p]}),t[18]=f,t[19]=p,t[20]=m):m=t[20],m}function Rb(e){return!e}function zb(e,t){return(0,Z.jsxs)(`li`,{className:`text-xs text-foreground/90`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`• `}),e]},`${t}-${e}`)}function Bb(e){let t=(0,$.c)(36),{descriptor:n,allDocs:r,versionBySha7:i,onJumpToVersion:a}=e,{_:o}=ht();if(n.kind===`restore`){let e,r;t[0]!==o||t[1]!==n.targetSha7||t[2]!==i?(r=i.get(n.targetSha7),e=o(r?{id:`sICrVf`,values:{0:jb(r.timestamp)}}:{id:`i09An-`,values:{0:n.targetSha7}}),t[0]=o,t[1]=n.targetSha7,t[2]=i,t[3]=e,t[4]=r):(e=t[3],r=t[4]);let s=e,c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)($c,{className:`size-3 shrink-0`,"aria-hidden":!0}),t[5]=c):c=t[5];let l;return t[6]!==n.targetSha7||t[7]!==s||t[8]!==a||t[9]!==r?(l=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[c,r?(0,Z.jsx)(`button`,{type:`button`,className:`truncate text-left underline-offset-2 hover:text-foreground hover:underline`,title:s,onClick:e=>{e.stopPropagation(),a(n.targetSha7)},children:s}):(0,Z.jsx)(`span`,{className:`truncate`,title:s,children:s})]}),t[6]=n.targetSha7,t[7]=s,t[8]=a,t[9]=r,t[10]=l):l=t[10],l}if(n.kind===`rename`){let e=`${n.from} → ${n.to}`,r;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(fh,{className:`size-3 shrink-0`,"aria-hidden":!0}),t[11]=r):r=t[11];let i;t[12]!==o||t[13]!==n.from||t[14]!==n.to?(i=o({id:`GkYV_4`,values:{0:Nb(n.from),1:Nb(n.to)}}),t[12]=o,t[13]=n.from,t[14]=n.to,t[15]=i):i=t[15];let a;t[16]===i?a=t[17]:(a=(0,Z.jsx)(`span`,{className:`truncate`,children:i}),t[16]=i,t[17]=a);let s;return t[18]!==e||t[19]!==a?(s=(0,Z.jsxs)(`p`,{className:`flex items-center gap-1 truncate text-xs text-muted-foreground`,title:e,children:[r,a]}),t[18]=e,t[19]=a,t[20]=s):s=t[20],s}if(n.kind===`reconcile`){let e;t[21]===o?e=t[22]:(e=o({id:`0qyKG6`}),t[21]=o,t[22]=e);let n;return t[23]===e?n=t[24]:(n=(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:e}),t[23]=e,t[24]=n),n}if(r.length>0){let e;t[25]===r?e=t[26]:(e=r.join(`, `),t[25]=r,t[26]=e);let n;t[27]===r?n=t[28]:(n=r.join(`, `),t[27]=r,t[28]=n);let i;return t[29]!==e||t[30]!==n?(i=(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,title:e,children:n}),t[29]=e,t[30]=n,t[31]=i):i=t[31],i}if(n.kind===`upstream`)return null;let s;t[32]===o?s=t[33]:(s=o({id:`MRZxAn`}),t[32]=o,t[33]=s);let c;return t[34]===s?c=t[35]:(c=(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:s}),t[34]=s,t[35]=c),c}function Vb(e){let t=(0,$.c)(122),{entry:n,isDark:r,docName:i,laterEdits:a,onRestoreSuccess:o,versionBySha7:s,onJumpToVersion:c,registerRowRef:l,flashing:u}=e,{_:d}=ht(),f;t[0]===n.timestamp?f=t[1]:(f=Ab(n.timestamp),t[0]=n.timestamp,t[1]=f);let p=f,m;t[2]===n?m=t[3]:(m=Pb(n),t[2]=n,t[3]=m);let h=m,g;t[4]===n.timestamp?g=t[5]:(g=jb(n.timestamp),t[4]=n.timestamp,t[5]=g);let _=g,v;t[6]===n.contributors?v=t[7]:(v=n.contributors.flatMap(Hb),t[6]=n.contributors,t[7]=v);let y=v,b;t[8]===n?b=t[9]:(b=Ib(n),t[8]=n,t[9]=b);let x=b,S;t[10]===n?S=t[11]:(S=Mb(n),t[10]=n,t[11]=S);let C=S,[w,T]=(0,Q.useState)(!1),[E,D]=(0,Q.useState)(!1),O=(0,Q.useRef)(null),k=ul(),A=k?.docName===i&&k.sha===n.sha,j,M;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>()=>O.current?.abort(),M=[],t[12]=j,t[13]=M):(j=t[12],M=t[13]),(0,Q.useEffect)(j,M);let N;t[14]!==_||t[15]!==h||t[16]!==i||t[17]!==n.parentSha||t[18]!==n.sha||t[19]!==a||t[20]!==p?(N=()=>{qd(),ll({docName:i,sha:n.sha,parentSha:n.parentSha??null,laterEdits:a,authorName:h,relativeTime:p,absoluteTime:_})},t[14]=_,t[15]=h,t[16]=i,t[17]=n.parentSha,t[18]=n.sha,t[19]=a,t[20]=p,t[21]=N):N=t[21];let P=N,F;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(F=function(){O.current?.abort(),O.current=null,D(!1),T(!1)},t[22]=F):F=t[22];let I=F,L;t[23]!==d||t[24]!==i||t[25]!==n.sha||t[26]!==o?(L=async function(){D(!0);let e=new AbortController;O.current=e;let t=function(){e.signal.aborted||D(!1),O.current===e&&(O.current=null)},r;try{r=await fetch(`/api/rollback`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({docName:i,commitSha:n.sha}),signal:e.signal})}catch(r){let a=r;!e.signal.aborted&&!(a instanceof DOMException&&a.name===`AbortError`)&&(console.error(`[timeline] rollback fetch failed`,{docName:i,sha:n.sha,err:a}),X.error(d({id:`NkXEFS`}),{duration:4e3})),t();return}if(e.signal.aborted){t();return}if(r.ok)T(!1),o();else{let e=`HTTP ${r.status}`;try{let t=ma.safeParse(await r.json());t.success&&(e=t.data.title)}catch{}console.error(`[timeline] rollback failed`,{docName:i,sha:n.sha,status:r.status,detail:e}),X.error(d({id:`uM6jnS`}),{description:e,duration:6e3})}t()},t[23]=d,t[24]=i,t[25]=n.sha,t[26]=o,t[27]=L):L=t[27];let R=L,z;t[28]!==n||t[29]!==r?(z=(0,Z.jsx)(Fb,{entry:n,isDark:r}),t[28]=n,t[29]=r,t[30]=z):z=t[30];let B=z,V=u?`ring-2 ring-ring ring-offset-1 ring-offset-background`:``,H;t[31]===V?H=t[32]:(H=[`flex flex-col rounded-lg transition-shadow`,V],t[31]=V,t[32]=H);let U=H.join(` `),W=A?`bg-muted`:`hover:bg-muted/80`,G;t[33]===W?G=t[34]:(G=[`group flex w-full items-start gap-2.5 rounded-lg px-3 py-2.5 text-left transition-colors cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring`,W],t[33]=W,t[34]=G);let K=G.join(` `),ee;t[35]===P?ee=t[36]:(ee=e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),P())},t[35]=P,t[36]=ee);let te;t[37]===B?te=t[38]:(te=(0,Z.jsx)(`span`,{className:`mt-0.5 shrink-0`,children:B}),t[37]=B,t[38]=te);let ne;t[39]===h?ne=t[40]:(ne=(0,Z.jsx)(`span`,{className:`truncate text-xs text-foreground`,children:h}),t[39]=h,t[40]=ne);let re;t[41]!==n.timestamp||t[42]!==p?(re=(0,Z.jsx)(`time`,{className:`ml-auto shrink-0 text-xs text-muted-foreground/80`,dateTime:n.timestamp,title:n.timestamp,children:p}),t[41]=n.timestamp,t[42]=p,t[43]=re):re=t[43];let ie;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`h-3 w-px shrink-0 bg-border`}),t[44]=ie):ie=t[44];let ae;t[45]===d?ae=t[46]:(ae=d({id:`Yea-K5`}),t[45]=d,t[46]=ae);let oe;t[47]!==R||t[48]!==a?(oe=e=>{e.stopPropagation(),a>0?T(!0):R()},t[47]=R,t[48]=a,t[49]=oe):oe=t[49];let se;t[50]===E?se=t[51]:(se=E?(0,Z.jsx)(qc,{className:`size-3 animate-spin`}):(0,Z.jsx)(cl,{className:`size-3`}),t[50]=E,t[51]=se);let ce;t[52]!==E||t[53]!==ae||t[54]!==oe||t[55]!==se?(ce=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon`,className:`size-5 shrink-0 text-muted-foreground hover:text-destructive`,"data-testid":`timeline-entry-restore`,"aria-label":ae,disabled:E,onClick:oe,children:se})}),t[52]=E,t[53]=ae,t[54]=oe,t[55]=se,t[56]=ce):ce=t[56];let le;t[57]===d?le=t[58]:(le=d({id:`Yea-K5`}),t[57]=d,t[58]=le);let ue;t[59]===le?ue=t[60]:(ue=(0,Z.jsx)(on,{side:`top`,children:le}),t[59]=le,t[60]=ue);let de;t[61]!==ce||t[62]!==ue?(de=(0,Z.jsxs)(cn,{children:[ce,ue]}),t[61]=ce,t[62]=ue,t[63]=de):de=t[63];let fe;t[64]!==ne||t[65]!==re||t[66]!==de?(fe=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[ne,re,ie,de]}),t[64]=ne,t[65]=re,t[66]=de,t[67]=fe):fe=t[67];let pe;t[68]===x?pe=t[69]:(pe=x.length>0&&(0,Z.jsx)(Lb,{summaries:x}),t[68]=x,t[69]=pe);let me;t[70]!==y||t[71]!==C||t[72]!==c||t[73]!==s?(me=(0,Z.jsx)(Bb,{descriptor:C,allDocs:y,versionBySha7:s,onJumpToVersion:c}),t[70]=y,t[71]=C,t[72]=c,t[73]=s,t[74]=me):me=t[74];let he;t[75]!==fe||t[76]!==pe||t[77]!==me?(he=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[fe,pe,me]}),t[75]=fe,t[76]=pe,t[77]=me,t[78]=he):he=t[78];let ge;t[79]!==P||t[80]!==A||t[81]!==K||t[82]!==ee||t[83]!==te||t[84]!==he?(ge=(0,Z.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-pressed":A,"data-testid":`timeline-entry-open`,className:K,onClick:P,onKeyDown:ee,children:[te,he]}),t[79]=P,t[80]=A,t[81]=K,t[82]=ee,t[83]=te,t[84]=he,t[85]=ge):ge=t[85];let _e;t[86]!==l||t[87]!==U||t[88]!==ge?(_e=(0,Z.jsx)(`div`,{ref:l,className:U,children:ge}),t[86]=l,t[87]=U,t[88]=ge,t[89]=_e):_e=t[89];let ve;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(ve=e=>{e?T(!0):I()},t[90]=ve):ve=t[90];let ye;t[91]===d?ye=t[92]:(ye=d({id:`n3wx1q`}),t[91]=d,t[92]=ye);let be;t[93]===ye?be=t[94]:(be=(0,Z.jsx)(pn,{children:ye}),t[93]=ye,t[94]=be);let xe;t[95]===a?xe=t[96]:(xe=(0,Z.jsx)(q,{id:`nfPccR`,values:{laterEdits:a}}),t[95]=a,t[96]=xe);let Se;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,Z.jsx)(q,{id:`5ZbJFS`}),t[97]=Se):Se=t[97];let Ce;t[98]===xe?Ce=t[99]:(Ce=(0,Z.jsxs)(fn,{children:[xe,` `,Se]}),t[98]=xe,t[99]=Ce);let we;t[100]!==be||t[101]!==Ce?(we=(0,Z.jsxs)(_n,{children:[be,Ce]}),t[100]=be,t[101]=Ce,t[102]=we):we=t[102];let Te;t[103]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,Z.jsx)(Y,{variant:`outline`,"data-testid":`timeline-entry-restore-cancel`,onClick:I,children:(0,Z.jsx)(q,{id:`dEgA5A`})}),t[103]=Te):Te=t[103];let Ee;t[104]===R?Ee=t[105]:(Ee=()=>R(),t[104]=R,t[105]=Ee);let De;t[106]===E?De=t[107]:(De=E?(0,Z.jsx)(qc,{className:`mr-2 size-4 animate-spin`}):null,t[106]=E,t[107]=De);let Oe;t[108]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,Z.jsx)(q,{id:`yKu_3Y`}),t[108]=Oe):Oe=t[108];let ke;t[109]!==E||t[110]!==Ee||t[111]!==De?(ke=(0,Z.jsxs)(gn,{children:[Te,(0,Z.jsxs)(Y,{variant:`destructive`,"data-testid":`timeline-entry-restore-confirm`,disabled:E,onClick:Ee,children:[De,Oe]})]}),t[109]=E,t[110]=Ee,t[111]=De,t[112]=ke):ke=t[112];let Ae;t[113]!==we||t[114]!==ke?(Ae=(0,Z.jsxs)(mn,{children:[we,ke]}),t[113]=we,t[114]=ke,t[115]=Ae):Ae=t[115];let je;t[116]!==w||t[117]!==Ae?(je=(0,Z.jsx)(vn,{open:w,onOpenChange:ve,children:Ae}),t[116]=w,t[117]=Ae,t[118]=je):je=t[118];let Me;return t[119]!==_e||t[120]!==je?(Me=(0,Z.jsxs)(Z.Fragment,{children:[_e,je]}),t[119]=_e,t[120]=je,t[121]=Me):Me=t[121],Me}function Hb(e){return e.docs}function Ub(e){let t=(0,$.c)(27),{docName:n}=e,{_:r}=ht(),{resolvedTheme:i}=It(),a=i===`dark`,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[],t[0]=o):o=t[0];let[s,c]=(0,Q.useState)(o),[l,u]=(0,Q.useState)(!1),[d,f]=(0,Q.useState)(null),p=(0,Q.useRef)(new Map),[m,h]=(0,Q.useState)(null),g=(0,Q.useRef)(null),_=new Map;for(let e of s)_.set(e.sha.slice(0,7),e);let v,y;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>()=>clearTimeout(g.current??void 0),y=[],t[1]=v,t[2]=y):(v=t[1],y=t[2]),(0,Q.useEffect)(v,y);let b=function(e){let t=_.get(e);t&&(p.current.get(t.sha)?.scrollIntoView({behavior:`smooth`,block:`center`}),h(t.sha),clearTimeout(g.current??void 0),g.current=setTimeout(()=>h(null),1600))},x;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(x=function(){dl()},t[3]=x):x=t[3];let S=x,C,w;t[4]!==r||t[5]!==n?(C=()=>{if(!n){c([]);return}u(!0);let e=Eb({baseMs:Db,maxBackoffMs:Ob,isPaused:Gb,poll:e=>kb(n,e,{setEntries:c,setError:f,setLoading:u,unavailableMessage:r({id:`brCtGB`})})});e.start();let t=()=>e.resume();return typeof document<`u`&&document.addEventListener(`visibilitychange`,t),()=>{e.stop(),typeof document<`u`&&document.removeEventListener(`visibilitychange`,t)}},w=[n,r],t[4]=r,t[5]=n,t[6]=C,t[7]=w):(C=t[6],w=t[7]),(0,Q.useEffect)(C,w);let T;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Z.jsx)(Pd,{children:(0,Z.jsx)(Id,{children:(0,Z.jsx)(q,{id:`cklVjM`})})}),t[8]=T):T=t[8];let E;t[9]!==r||t[10]!==l?(E=l&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 p-2`,role:`status`,"aria-busy":`true`,"aria-label":r({id:`o49mDZ`}),children:[1,2,3].map(Wb)}),t[9]=r,t[10]=l,t[11]=E):E=t[11];let D;t[12]!==d||t[13]!==l?(D=!l&&d&&(0,Z.jsx)(`div`,{className:`px-4 py-3`,children:(0,Z.jsx)(`p`,{className:`text-xs text-destructive`,children:d})}),t[12]=d,t[13]=l,t[14]=D):D=t[14];let O;t[15]!==s||t[16]!==d||t[17]!==l?(O=!l&&!d&&s.length===0&&(0,Z.jsx)(`div`,{className:`px-4 py-8 text-center`,children:(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,Z.jsx)(q,{id:`Ta25TG`})})}),t[15]=s,t[16]=d,t[17]=l,t[18]=O):O=t[18];let k=!l&&!d&&s.length>0&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 p-2`,children:s.map((e,t)=>(0,Z.jsx)(Vb,{entry:e,isDark:a,docName:n,laterEdits:t,onRestoreSuccess:S,versionBySha7:_,onJumpToVersion:b,registerRowRef:t=>{t?p.current.set(e.sha,t):p.current.delete(e.sha)},flashing:m===e.sha},e.sha))}),A;t[19]!==E||t[20]!==D||t[21]!==O||t[22]!==k?(A=(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto subtle-scrollbar scroll-fade-mask`,children:[E,D,O,k]}),t[19]=E,t[20]=D,t[21]=O,t[22]=k,t[23]=A):A=t[23];let j;return t[24]!==A||t[25]!==T?(j=(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[T,A]}),t[24]=A,t[25]=T,t[26]=j):j=t[26],j}function Wb(e){return(0,Z.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-lg px-3 py-2.5`,children:[(0,Z.jsx)(Bd,{className:`size-3.5 rounded mt-0.5 shrink-0`}),(0,Z.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,Z.jsx)(Bd,{className:`h-3 w-28`}),(0,Z.jsx)(Bd,{className:`h-3 w-40`})]})]},e)}function Gb(){return typeof document<`u`&&document.visibilityState===`hidden`}var Kb=`open-knowledge:lint-source-fixed`,qb=Object.freeze({source:`local`,skipStoreHooks:!1,context:Object.freeze({origin:`lint-fix`})});function Jb(e,t){let n=e.split(`
|
|
10
|
+
`).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Pd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Pt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Pt(e,``+r);break;case`className`:vt(e,`class`,r);break;case`tabIndex`:vt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:vt(e,n,r);break;case`style`:Lt(e,r,o);break;case`data`:if(t!==`object`){vt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ht(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Pd(e,t,`name`,a.name,a,null),Pd(e,t,`formEncType`,a.formEncType,a,null),Pd(e,t,`formMethod`,a.formMethod,a,null),Pd(e,t,`formTarget`,a.formTarget,a,null)):(Pd(e,t,`encType`,a.encType,a,null),Pd(e,t,`method`,a.method,a,null),Pd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ht(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Ut);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Ht(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:bd(`beforetoggle`,e),bd(`toggle`,e),_t(e,`popover`,r);break;case`xlinkActuate`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:_t(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Bt.get(n)||n,_t(e,n,r))}}function Fd(e,t,n,r,a,o){switch(n){case`style`:Lt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Pt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Pt(e,``+r);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Ut);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ut.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[Xe]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):_t(e,n,r)}}}function Id(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:bd(`error`,e),bd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,o,s,n,null)}}a&&Pd(e,t,`srcSet`,n.srcSet,n,null),r&&Pd(e,t,`src`,n.src,n,null);return;case`input`:bd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Pd(e,t,r,d,n,null)}}kt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in bd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Pd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&jt(e,!!r,n,!0):jt(e,!!r,t,!1);return;case`textarea`:for(s in bd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Pd(e,t,s,c,n,null)}Nt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Pd(e,t,l,r,n,null)}return;case`dialog`:bd(`beforetoggle`,e),bd(`toggle`,e),bd(`cancel`,e),bd(`close`,e);break;case`iframe`:case`object`:bd(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)bd(_d[r],e);break;case`image`:bd(`error`,e),bd(`load`,e);break;case`details`:bd(`toggle`,e);break;case`embed`:case`source`:case`link`:bd(`error`,e),bd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,u,r,n,null)}return;default:if(zt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Fd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Pd(e,t,c,r,n,null))}function Ld(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Pd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Pd(e,t,p,m,r,f)}}Ot(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Pd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Pd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?jt(e,!!n,n?[]:``,!1):jt(e,!!n,t,!0)):jt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Pd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Pd(e,t,s,a,r,o)}Mt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Pd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Pd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Pd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Pd(e,t,u,p,r,m)}return;default:if(zt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Fd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Fd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Pd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Pd(e,t,f,p,r,m)}function Rd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function zd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Rd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Rd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Bd=null,Vd=null;function Hd(e){return e.nodeType===9?e:e.ownerDocument}function Ud(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Wd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Gd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Kd=null;function qd(){var e=window.event;return e&&e.type===`popstate`?e===Kd?!1:(Kd=e,!0):(Kd=null,!1)}var Jd=typeof setTimeout==`function`?setTimeout:void 0,Yd=typeof clearTimeout==`function`?clearTimeout:void 0,Xd=typeof Promise==`function`?Promise:void 0,Zd=typeof queueMicrotask==`function`?queueMicrotask:Xd===void 0?Jd:function(e){return Xd.resolve(null).then(e).catch(Qd)};function Qd(e){setTimeout(function(){throw e})}function $d(e){return e===`head`}function ef(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)hf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,hf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[nt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&hf(e.ownerDocument.body);n=i}while(n);Np(t)}function tf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function nf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nf(n),rt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[nt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=uf(e.nextSibling),e===null)break}return null}function af(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=uf(e.nextSibling),e===null))return null;return e}function of(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=uf(e.nextSibling),e===null))return null;return e}function sf(e){return e.data===`$?`||e.data===`$~`}function cf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function uf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var df=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return uf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function mf(e,t,n){switch(t=Hd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function hf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);rt(e)}var gf=new Map,_f=new Set;function vf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yf=P.d;P.d={f:bf,r:xf,D:wf,C:Tf,L:Ef,m:Df,X:kf,S:Of,M:Af};function bf(){var e=yf.f(),t=yu();return e||t}function xf(e){var t=at(e);t!==null&&t.tag===5&&t.type===`form`?ys(t):yf.r(e)}var Sf=typeof document>`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=Dt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),ct(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Dt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Dt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Dt(n.imageSizes)+`"]`)):i+=`[href="`+Dt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Id(t,`link`,e),ct(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Dt(r)+`"][href="`+Dt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Id(r,`link`,e),ct(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=st(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);ct(c),Id(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=st(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),ct(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=st(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),ct(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var a=(a=U.current)?vf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=st(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=st(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},gf.set(e,n),o||Ff(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=st(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Mf(e){return`href="`+Dt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Id(t,`link`,n),ct(t),e.head.appendChild(t))}function If(e){return`[src="`+Dt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Dt(n.href)+`"]`);if(r)return t.instance=r,ct(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ct(r),Id(r,`style`,a),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Mf(n.href);var o=e.querySelector(Nf(a));if(o)return t.state.loading|=4,t.instance=o,ct(o),o;r=Pf(n),(a=gf.get(a))&&Bf(r,a),o=(e.ownerDocument||e).createElement(`link`),ct(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(a=e.querySelector(Lf(o)))?(t.instance=a,ct(a),a):(r=n,(a=gf.get(o))&&(r=f({},n),Vf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ct(a),Id(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Hf=null;function Uf(e,t,n){if(Hf===null){var r=new Map,i=Hf=new Map;i.set(n,r)}else i=Hf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[nt]||a[Ye]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Wf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Gf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ct(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),ct(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Jf===0&&(Jf=62500*zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Xf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ep={$$typeof:b,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function tp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Re(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Re(0),this.hiddenUpdates=Re(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function np(e,t,n,r,i,a,o,s,c,l,u,d){return e=new tp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Xr(3,null,null,t),e.current=a,a.stateNode=e,t=Zi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Aa(a),e}function rp(e){return e?(e=Jr,e):Jr}function ip(e,t,n,r,i,a){i=rp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ma(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Na(e,r,t),n!==null&&(mu(n,e,t),Pa(n,e,t))}function ap(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function op(e,t){ap(e,t),(e=e.alternate)&&ap(e,t)}function sp(e){if(e.tag===13||e.tag===31){var t=Gr(e,67108864);t!==null&&mu(t,e,67108864),op(e,67108864)}}function cp(e){if(e.tag===13||e.tag===31){var t=fu();t=We(t);var n=Gr(e,t);n!==null&&mu(n,e,t),op(e,t)}}var lp=!0;function up(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,fp(e,t,n,r)}finally{P.p=a,N.T=i}}function dp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,fp(e,t,n,r)}finally{P.p=a,N.T=i}}function fp(e,t,n,r){if(lp){var i=pp(r);if(i===null)Td(e,t,r,mp,n),Z(e,r);else if(Ep(i,e,t,n,r))r.stopPropagation();else if(Z(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=at(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ne(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ee(o);s.entanglements[1]|=c,o&=~c}rd(a),!(Nl&6)&&(eu=me()+500,id(0,!1))}}break;case 31:case 13:s=Gr(a,2),s!==null&&mu(s,a,2),yu(),op(a,2)}if(a=pp(r),a===null&&Td(e,t,r,mp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function pp(e){return e=Gt(e),hp(e)}var mp=null;function hp(e){if(mp=null,e=it(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return mp=e,null}function gp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(he()){case ge:return 2;case _e:return 8;case ve:case ye:return 32;case be:return 268435456;default:return 32}default:return 32}}var _p=!1,vp=null,yp=null,bp=null,xp=new Map,Sp=new Map,wp=[],Tp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Z(e,t){switch(e){case`focusin`:case`focusout`:vp=null;break;case`dragenter`:case`dragleave`:yp=null;break;case`mouseover`:case`mouseout`:bp=null;break;case`pointerover`:case`pointerout`:xp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Sp.delete(t.pointerId)}}function Q(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=at(t),t!==null&&sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ep(e,t,n,r,i){switch(t){case`focusin`:return vp=Q(vp,e,t,n,r,i),!0;case`dragenter`:return yp=Q(yp,e,t,n,r,i),!0;case`mouseover`:return bp=Q(bp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return xp.set(a,Q(xp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Sp.set(a,Q(Sp.get(a)||null,e,t,n,r,i)),!0}return!1}function $(e){var t=it(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,qe(e.priority,function(){cp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,qe(e.priority,function(){cp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Wt=r,n.target.dispatchEvent(r),Wt=null}else return t=at(n),t!==null&&sp(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){_p=!1,vp!==null&&Dp(vp)&&(vp=null),yp!==null&&Dp(yp)&&(yp=null),bp!==null&&Dp(bp)&&(bp=null),xp.forEach(Op),Sp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,_p||(_p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(hp(r||n)===null)continue;break}var a=at(n);a!==null&&(e.splice(t,3),t-=3,_s(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}vp!==null&&Ap(vp,e),yp!==null&&Ap(yp,e),bp!==null&&Ap(bp,e),xp.forEach(t),Sp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)$(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Xe]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Xe]||null)s=o.formAction;else if(hp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ip(n,fu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ip(e.current,2,null,e,null,null),yu(),t[Ze]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ke();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&$(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(i(527,Lp,`19.2.5`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ce=zp.inject(Rp),we=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Bs,s=Vs,c=Hs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=np(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[Ze]=t.current,Cd(e),new Fp(t)}})),Tp=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=wp()})),Z=r(),Q=e(mt(),1),Ep=Tp(),$=zt(),Dp=3100,Op=3;function kp(e,t,n){let r=n?.windowMs??600,i=n?.maxLevel??Op;if(e===0||t>=r)return 1;let a=e+1;return a>i?i:a}var Ap={0:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},1:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},2:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},3:{count:16,startRadius:11,baseDistance:7,distanceVariance:3,sizeMin:.45,sizeMax:1.2,maxDelay:500,durationMin:1100,durationMax:2400}},jp=[`var(--color-azure-blue)`,`var(--color-sky-blue)`,`var(--color-violet-300)`,`var(--color-orange-light)`,`var(--color-crystal-blue)`,`var(--color-white-cream)`];function Mp(e,t={}){let n=t.rng??Math.random,r=t.colors??jp,i=Ap[e];if(i.count===0||r.length===0)return[];let a=[],o=Math.PI*2/i.count;for(let e=0;e<i.count;e++){let t=e*o+(n()-.5)*o*.7,s=i.baseDistance+(n()-.5)*2*i.distanceVariance,c=i.sizeMin+n()*(i.sizeMax-i.sizeMin),l=n()*i.maxDelay,u=i.durationMin+n()*(i.durationMax-i.durationMin),d=Math.floor(n()*r.length),f=Math.cos(t),p=Math.sin(t);a.push({id:e,dx:f*s,dy:p*s,originDx:f*i.startRadius,originDy:p*i.startRadius,size:c,color:r[d]??`currentColor`,delay:l,duration:u})}return a}var Np=1.8,Pp=90,Fp=16,Ip=380,Lp=.025,Rp=.1,zp=.18,Bp=400,Vp=9.2736,Hp=18.1799,Up=14.5244,Wp={1:{halfWidth:1.5,apexLift:2.2},2:{halfWidth:1.4,apexLift:2.6},3:{halfWidth:1.25,apexLift:3}};function Gp(e,t){let{halfWidth:n,apexLift:r}=Wp[t];return`M${e-n} ${Up+.3} Q${e} ${Up-r}, ${e+n} ${Up+.3}`}function Kp(e){let t=1.5,n=.3;return`M${e-t} ${Up-n} Q${e} ${Up+1.4}, ${e+t} ${Up-n}`}var qp=15,Jp=15;function Yp(e){return{fill:e.color,"--fx-tx":`${e.dx}px`,"--fx-ty":`${e.dy}px`,"--fx-delay":`${e.delay}ms`,"--fx-duration":`${e.duration}ms`}}function Xp(e){let t=(0,$.c)(71),{size:n,className:r,trackMouse:i,variant:a,celebrateSignal:o}=e,s=n===void 0?48:n,c=i===void 0?!0:i,l=a===void 0?`default`:a,u=o===void 0?0:o,d=(0,Q.useRef)(null),f=(0,Q.useRef)(null),p=(0,Q.useRef)(null),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={x:0,y:0},t[0]=m):m=t[0];let h=(0,Q.useRef)(m),[g,_]=(0,Q.useState)(0),[v,y]=(0,Q.useState)(0),b;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[1]=b):b=t[1];let[x,S]=(0,Q.useState)(b),C=(0,Q.useRef)(0),w=(0,Q.useRef)(void 0),T=l===`sleeping`,E;t[2]!==g||t[3]!==T?(E=function(){if(T)return;let e=typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),t=C.current===0?1/0:e-C.current;C.current=e;let n=kp(g,t);_(n),y(em),S(Mp(n)),clearTimeout(w.current),w.current=setTimeout(()=>{_(0),S([])},Dp)},t[2]=g,t[3]=T,t[4]=E):E=t[4];let D=E,O,k;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>()=>clearTimeout(w.current),k=[],t[5]=O,t[6]=k):(O=t[5],k=t[6]),(0,Q.useEffect)(O,k);let A,j;t[7]!==u||t[8]!==T?(A=()=>{u===0||T||(_(3),y($p),S(Mp(3)),clearTimeout(w.current),w.current=setTimeout(()=>{_(0),S([])},Dp))},j=[u,T],t[7]=u,t[8]=T,t[9]=A,t[10]=j):(A=t[9],j=t[10]),(0,Q.useEffect)(A,j);let M,N;t[11]!==T||t[12]!==c?(M=()=>{if(!c||T||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let e=0,t=0,n=!1,r=0,i=0,a=0,o=0,s=0,l=function(){s===0&&(s=requestAnimationFrame(m))},u=function(r){e=r.clientX,t=r.clientY,n=!0,l()};function m(){s=0;let c=f.current,u=d.current;if(!c||!u){l();return}let m=n;n=!1;let g=c.getBoundingClientRect(),_=g.left+g.width/2,v=g.top+g.height*.48,y=e-_,b=t-v,x=Math.hypot(y,b),S=Math.max(-1,Math.min(1,y/Ip)),C=-Math.max(-1,Math.min(1,b/Ip))*Fp,w=S*Fp,T=0,E=0;if(x>=1){let e=Math.min(x/Pp,1)*Np;T=y/x*e,E=b/x*e}let D=Math.abs(C-r)<.01&&Math.abs(w-i)<.01&&Math.abs(T-a)<.01&&Math.abs(E-o)<.01;if(!m&&D)return;l(),r+=(C-r)*Rp,i+=(w-i)*Rp,u.style.transform=`perspective(${Bp}px) rotateX(${r.toFixed(3)}deg) rotateY(${i.toFixed(3)}deg)`,a+=(T-a)*zp,o+=(E-o)*zp;let O=i*Lp,k=-r*Lp,A=a+O,j=o+k;h.current.x=A,h.current.y=j,p.current?.setAttribute(`transform`,`translate(${A.toFixed(3)} ${j.toFixed(3)})`)}return document.addEventListener(`mousemove`,u,{passive:!0}),l(),()=>{document.removeEventListener(`mousemove`,u),s!==0&&cancelAnimationFrame(s),s=0,d.current&&(d.current.style.transform=``),h.current={x:0,y:0},p.current?.removeAttribute(`transform`)}},N=[c,T],t[11]=T,t[12]=c,t[13]=M,t[14]=N):(M=t[13],N=t[14]),(0,Q.useEffect)(M,N);let P;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>{let e=p.current;if(!e)return;let{x:t,y:n}=h.current;e.setAttribute(`transform`,`translate(${t.toFixed(3)} ${n.toFixed(3)})`)},t[15]=P):P=t[15],(0,Q.useLayoutEffect)(P);let F=g>0,I=F?g:1,L=F?`ok-blob-clicked-${g}`:null,R;t[16]===r?R=t[17]:(R=J(`ok-blob-3d-wrapper`,r),t[16]=r,t[17]=R);let z=T?`cursor-default`:`cursor-pointer`,B=`body-${v}`,V=T&&`ok-blob-sleeping`,H;t[18]!==L||t[19]!==V?(H=J(`ok-blob-group`,V,L),t[18]=L,t[19]=V,t[20]=H):H=t[20];let U;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Z.jsx)(`path`,{d:`M25.2339 6.78134C25.5199 7.35734 25.8179 8.47234 26.0179 9.07834C26.0189 9.08234 26.0209 9.08634 26.0219 9.09134C26.0229 9.09534 26.0249 9.10034 26.0259 9.10434C26.0539 9.19734 26.0949 9.29533 26.1519 9.41633C26.2919 9.71133 26.5269 10.1173 27.1299 11.1683C27.3259 11.4643 27.5209 11.7693 27.7119 12.0903C29.9739 15.1623 29.3259 20.1913 27.0469 22.9153C26.7779 23.2953 26.4869 23.6043 26.1889 23.8863C26.1519 23.9253 26.1129 23.9643 26.0729 24.0033C25.3159 24.7543 24.2949 25.4673 23.6129 25.8323C22.7469 26.2983 22.1349 26.5483 21.6299 26.7463C20.3649 27.3063 19.0609 27.7733 17.6569 28.0423C15.9649 28.3513 14.1939 28.4433 12.4569 28.1373C11.4779 27.9663 10.5119 27.6663 9.60891 27.2493C8.77491 26.8663 7.99192 26.3853 7.26992 25.8403C6.83592 25.5393 6.43893 25.2343 6.08093 24.9383C5.57893 24.5223 5.15993 24.1263 4.83493 23.7793C4.04993 22.9443 3.31593 21.8893 2.80893 21.0953C2.72593 20.9663 2.64792 20.8433 2.57592 20.7293C2.56192 20.7093 2.54793 20.6893 2.53393 20.6703C2.08593 20.0263 1.71892 19.3293 1.43792 18.5993C1.42892 18.5453 1.42093 18.4903 1.41293 18.4353C1.32093 17.7443 1.08292 16.9423 1.01092 15.6333C0.984921 15.0653 0.998928 14.4013 1.12393 13.6353C1.20693 13.1413 1.31993 12.9023 1.40893 12.7113C1.43593 12.6543 1.46193 12.6023 1.48593 12.5483C1.56793 12.3653 1.59392 12.1563 1.63592 11.9083C1.68992 11.5883 1.76992 11.1943 2.04592 10.7553C2.94392 9.37934 3.36792 8.81934 3.66592 8.33934C3.75592 8.20334 3.84292 8.08134 3.94192 7.96634C4.21592 7.64634 4.67693 7.29534 5.10293 7.05734C5.16693 7.02234 5.23093 6.98834 5.29193 6.95534C5.62993 6.77834 6.22592 6.30135 6.66992 5.92035C6.83692 5.77635 7.08193 5.60735 7.37393 5.40935C7.67393 5.20535 8.02593 4.96934 8.39193 4.70234C9.32093 4.02634 9.84091 3.69134 10.2599 3.42334C10.3799 3.34734 10.4919 3.27734 10.6049 3.20834C10.9609 2.98834 11.4149 2.73034 11.8869 2.48634C12.4519 2.19334 13.0469 1.92133 13.5089 1.72233C14.7399 1.30233 16.0539 1.01333 17.4169 1.00033C18.1169 0.991333 18.7939 1.16534 19.2389 1.43034C19.6869 1.69534 19.8689 2.00335 19.8039 2.23935C19.7379 2.47835 19.4399 2.63634 19.0109 2.74734C18.5789 2.85634 18.0469 2.92035 17.4889 2.96135C16.3639 3.04235 15.2399 3.36435 14.1499 3.80835C12.8199 4.35135 11.5379 5.07133 10.2719 5.84733C9.38691 6.39133 8.51192 6.97334 7.63592 7.56834C7.54492 7.63034 7.45492 7.69135 7.36492 7.75235C6.97392 8.06635 6.58293 8.38134 6.22293 8.66334C5.97893 8.85734 5.76793 9.04834 5.59393 9.21434C5.26893 9.52334 5.02393 9.74334 4.81893 9.93934C4.67793 10.0753 4.55793 10.2013 4.45593 10.3443C4.40093 10.4213 4.32992 10.5273 4.24792 10.6593C3.90492 11.1933 3.44493 12.1693 3.15393 13.1173C3.01893 13.5363 2.87991 14.0343 2.79391 14.5253C2.66591 15.2253 2.65594 15.9053 2.71994 16.2373C2.82794 16.8193 2.95593 17.4833 3.14093 18.0553C3.31293 18.6003 3.52991 19.0583 3.70791 19.2823C3.81591 19.4183 3.90394 19.5473 3.99594 19.6913C4.09394 19.8413 4.19191 20.0073 4.31091 20.2033C4.47891 20.4803 4.68592 20.8163 5.00192 21.2493C5.36492 21.7463 5.61793 22.1043 5.83493 22.4023C6.14493 22.8243 6.38591 23.1343 6.83691 23.5033C7.33891 23.9113 7.86593 24.3113 8.26693 24.6393C8.44893 24.7883 8.66993 24.9443 8.90493 25.0963C9.21593 25.2963 9.55192 25.4893 9.85592 25.6703C10.1059 25.8203 10.3059 25.9633 10.4869 26.0863C10.5429 26.1243 10.5979 26.1603 10.6519 26.1943C10.8699 26.2803 11.0929 26.3593 11.3159 26.4283C11.3539 26.4323 11.3949 26.4353 11.4369 26.4393C11.6509 26.4573 11.9089 26.4733 12.2209 26.5133C12.7169 26.5753 13.1399 26.6603 13.6019 26.7243C13.9589 26.7733 14.3409 26.8083 14.7729 26.7893C15.0729 26.7753 15.4069 26.7353 15.7389 26.6813C16.2349 26.6023 16.7179 26.4943 17.0569 26.4473C17.1499 26.4343 17.2359 26.4343 17.3209 26.4373C17.3489 26.4393 17.3799 26.4413 17.4109 26.4433C17.4119 26.4433 17.4119 26.4433 17.4129 26.4433C17.4199 26.4433 17.4279 26.4443 17.4349 26.4443C18.2329 26.2413 19.0259 25.9433 19.7959 25.5983C19.8609 25.5633 19.9259 25.5273 19.9899 25.4913C20.3059 25.3173 20.6049 25.1383 20.7869 24.9943C20.9829 24.8393 21.5189 24.5373 22.0579 24.1853C22.4109 23.9553 22.7649 23.7053 23.0369 23.4833C23.1949 23.3553 23.3689 23.2693 23.5479 23.1773C23.7129 23.0923 23.8809 23.0013 24.0349 22.8653C24.1109 22.7983 24.1869 22.7173 24.2639 22.6303C24.3309 22.5563 24.4039 22.4723 24.4759 22.3923C24.5459 22.3153 24.7199 22.1723 24.9139 21.9793C25.0079 21.8863 25.1059 21.7783 25.1909 21.6713C25.2199 21.6323 25.2489 21.5943 25.2769 21.5553C25.5919 21.0403 25.8779 20.5003 26.1019 19.9653C26.1299 19.8403 26.1379 19.7293 26.1279 19.6373C26.1199 19.5703 26.1029 19.5113 26.0839 19.4503C26.0599 19.3643 26.0329 19.2773 26.0239 19.1723C26.0169 19.0893 26.0309 19.0043 26.0629 18.9543C26.0779 18.9323 26.0969 18.9143 26.1129 18.8993C26.1329 18.8823 26.1499 18.8673 26.1569 18.8443C26.1609 18.8273 26.1579 18.8073 26.1529 18.7833C26.1459 18.7443 26.1369 18.6943 26.1539 18.6293C26.2189 18.3853 26.2869 18.1103 26.3319 17.8383C26.3829 17.5393 26.4049 17.2433 26.3949 17.0123C26.3849 16.7493 26.3909 16.3823 26.3469 16.0003C26.3179 15.7343 26.2659 15.4663 26.1979 15.2383C26.1319 15.0143 26.0219 14.7913 25.9039 14.5783C25.7629 14.3223 25.6119 14.0783 25.5169 13.8453C25.4969 13.7983 25.4999 13.7263 25.4999 13.6323C25.5009 13.5673 25.4999 13.4913 25.4919 13.4083C25.3239 13.1243 25.1459 12.8423 24.9589 12.5483C24.9479 12.5413 24.9369 12.5333 24.9249 12.5263C24.6689 12.3503 24.3139 12.1173 24.0769 11.5503C24.0179 11.4063 24.0069 11.2983 23.9969 11.1993C23.9859 11.1013 23.9799 11.0183 23.9289 10.9093C23.8709 10.7853 23.7759 10.6583 23.6709 10.4993C23.5849 10.3703 23.4899 10.2133 23.4199 10.0423C23.3819 9.95134 23.3509 9.85734 23.3329 9.75934C23.3299 9.74334 23.3269 9.72534 23.3229 9.70634C23.2899 9.52734 23.2439 9.26534 23.2409 8.98634C23.0209 8.24434 22.8339 7.48833 22.6519 6.77633C22.3429 5.57133 22.0519 4.54234 21.3329 3.95434C20.9839 3.65334 20.5689 3.35433 20.2459 3.05433C19.9259 2.75633 19.7449 2.47534 19.8019 2.23834C19.8639 2.00634 20.1589 1.82934 20.6659 1.80534C21.1699 1.78334 21.8699 1.93235 22.5209 2.39235C23.6159 3.14235 24.2029 4.38334 24.5599 5.35734C24.5829 5.40834 24.6049 5.46034 24.6259 5.51234C24.7849 5.89434 24.9529 6.22834 25.1199 6.55534C25.1579 6.63034 25.1969 6.70834 25.2339 6.78134Z`,className:`ok-blob-body`}),t[21]=U):U=t[21];let W=(F||T)&&`ok-blob-eye-hidden`,G;t[22]===W?G=t[23]:(G=J(`ok-blob-eye`,W),t[22]=W,t[23]=G);let K;t[24]===G?K=t[25]:(K=(0,Z.jsx)(`ellipse`,{cx:Vp,cy:Up,rx:1.2722,ry:1.9083,className:G}),t[24]=G,t[25]=K);let ee=(F||T)&&`ok-blob-eye-hidden`,te;t[26]===ee?te=t[27]:(te=J(`ok-blob-eye ok-blob-eye-right`,ee),t[26]=ee,t[27]=te);let ne;t[28]===te?ne=t[29]:(ne=(0,Z.jsx)(`ellipse`,{cx:Hp,cy:Up,rx:1.2722,ry:1.9083,className:te}),t[28]=te,t[29]=ne);let re;t[30]===I?re=t[31]:(re=Gp(Vp,I),t[30]=I,t[31]=re);let ie=(!F||T)&&`ok-blob-eye-hidden`,ae;t[32]===ie?ae=t[33]:(ae=J(`ok-blob-happy-eye`,ie),t[32]=ie,t[33]=ae);let oe;t[34]!==re||t[35]!==ae?(oe=(0,Z.jsx)(`path`,{d:re,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:ae}),t[34]=re,t[35]=ae,t[36]=oe):oe=t[36];let se;t[37]===I?se=t[38]:(se=Gp(Hp,I),t[37]=I,t[38]=se);let ce=(!F||T)&&`ok-blob-eye-hidden`,le;t[39]===ce?le=t[40]:(le=J(`ok-blob-happy-eye`,ce),t[39]=ce,t[40]=le);let ue;t[41]!==se||t[42]!==le?(ue=(0,Z.jsx)(`path`,{d:se,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:le}),t[41]=se,t[42]=le,t[43]=ue):ue=t[43];let de;t[44]===T?de=t[45]:(de=T?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`path`,{d:Kp(Vp),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`}),(0,Z.jsx)(`path`,{d:Kp(Hp),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`})]}):null,t[44]=T,t[45]=de);let fe;t[46]!==K||t[47]!==ne||t[48]!==oe||t[49]!==ue||t[50]!==de?(fe=(0,Z.jsxs)(`g`,{ref:p,children:[K,ne,oe,ue,de]}),t[46]=K,t[47]=ne,t[48]=oe,t[49]=ue,t[50]=de,t[51]=fe):fe=t[51];let pe;t[52]!==B||t[53]!==H||t[54]!==fe?(pe=(0,Z.jsxs)(`g`,{className:H,children:[U,fe]},B),t[52]=B,t[53]=H,t[54]=fe,t[55]=pe):pe=t[55];let me;t[56]===T?me=t[57]:(me=T?(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`text`,{x:21,y:7,className:`ok-blob-z ok-blob-z-1`,children:`z`}),(0,Z.jsx)(`text`,{x:26,y:2,className:`ok-blob-z ok-blob-z-2`,children:`z`})]}):null,t[56]=T,t[57]=me);let he;t[58]!==v||t[59]!==x?(he=x.length>0&&(0,Z.jsx)(`g`,{children:x.map(Zp)},`firework-${v}`),t[58]=v,t[59]=x,t[60]=he):he=t[60];let ge;t[61]!==D||t[62]!==s||t[63]!==z||t[64]!==pe||t[65]!==me||t[66]!==he?(ge=(0,Z.jsxs)(`svg`,{ref:f,width:s,height:s,viewBox:`0 0 30 30`,fill:`none`,overflow:`visible`,xmlns:`http://www.w3.org/2000/svg`,className:z,"aria-hidden":`true`,onClick:D,onMouseDown:Qp,children:[pe,me,he]}),t[61]=D,t[62]=s,t[63]=z,t[64]=pe,t[65]=me,t[66]=he,t[67]=ge):ge=t[67];let _e;return t[68]!==R||t[69]!==ge?(_e=(0,Z.jsx)(`span`,{ref:d,className:R,children:ge}),t[68]=R,t[69]=ge,t[70]=_e):_e=t[70],_e}function Zp(e){return(0,Z.jsx)(`circle`,{cx:qp+e.originDx,cy:Jp+e.originDy,r:e.size,className:`ok-blob-firework`,style:Yp(e)},e.id)}function Qp(e){return e.preventDefault()}function $p(e){return e+1}function em(e){return e+1}var tm=(0,Q.lazy)(()=>n(()=>import(`./ReportBugDialogBody-BBAPrsS2.js`),__vite__mapDeps([5,1,6,2,3,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]),import.meta.url)),nm=1200,rm=`[cmdk-root],[data-radix-popper-content-wrapper]`,im=500;function am(e){let t=(0,$.c)(8),[n,r]=(0,Q.useState)(e.open),[i,a]=(0,Q.useState)(!1),[o,s]=(0,Q.useState)(null),c=(0,Q.useRef)(0);e.open&&!n&&r(!0);let l,u;if(t[0]!==e.crashInvite||t[1]!==e.open?(l=()=>{if(!e.open){a(!1);return}let t=c.current+=1,n=window.okDesktop?.bugReport?.captureScreenshot;if(typeof n!=`function`||e.crashInvite!==void 0){s(null),a(!0);return}s(null);let r=!1,i=e=>{r||c.current!==t||(r=!0,s(e),a(!0))},o=setTimeout(()=>i(null),nm),l=performance.now(),u=0,d=()=>{if(c.current!==t)return;let e=performance.now()-l>=im;if(document.querySelector(rm)!==null&&!e){u=requestAnimationFrame(d);return}u=requestAnimationFrame(()=>{c.current===t&&n().then(i).catch(()=>i(null))})};return u=requestAnimationFrame(d),()=>{c.current+=1,clearTimeout(o),cancelAnimationFrame(u)}},u=[e.open,e.crashInvite],t[0]=e.crashInvite,t[1]=e.open,t[2]=l,t[3]=u):(l=t[2],u=t[3]),(0,Q.useEffect)(l,u),!n)return null;let d=e.open&&i,f;return t[4]!==e||t[5]!==o||t[6]!==d?(f=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(tm,{...e,open:d,screenshot:o})}),t[4]=e,t[5]=o,t[6]=d,t[7]=f):f=t[7],f}var om=`ContextMenu`,[sm,cm]=rn(om,[or]),lm=or(),[um,dm]=sm(om),fm=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=Q.useState(!1),c=lm(t),l=nn(r),u=Q.useCallback(e=>{s(e),l(e)},[l]);return(0,Z.jsx)(um,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,Z.jsx)(ur,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};fm.displayName=om;var pm=`ContextMenuTrigger`,mm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=dm(pm,n),o=lm(n),s=Q.useRef({x:0,y:0}),c=Q.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=Q.useRef(0),u=Q.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return Q.useEffect(()=>u,[u]),Q.useEffect(()=>void(r&&u()),[r,u]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(xr,{...o,virtualRef:c}),(0,Z.jsx)(en.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:$t(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:$t(e.onPointerDown,Um(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:$t(e.onPointerMove,Um(u)),onPointerCancel:r?e.onPointerCancel:$t(e.onPointerCancel,Um(u)),onPointerUp:r?e.onPointerUp:$t(e.onPointerUp,Um(u))})]})});mm.displayName=pm;var hm=`ContextMenuPortal`,gm=e=>{let{__scopeContextMenu:t,...n}=e,r=lm(t);return(0,Z.jsx)(mr,{...r,...n})};gm.displayName=hm;var _m=`ContextMenuContent`,vm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=dm(_m,n),a=lm(n),o=Q.useRef(!1);return(0,Z.jsx)(pr,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});vm.displayName=_m;var ym=`ContextMenuGroup`,bm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(sr,{...i,...r,ref:t})});bm.displayName=ym;var xm=`ContextMenuLabel`,Sm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(cr,{...i,...r,ref:t})});Sm.displayName=xm;var Cm=`ContextMenuItem`,wm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(_r,{...i,...r,ref:t})});wm.displayName=Cm;var Tm=`ContextMenuCheckboxItem`,Em=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(yr,{...i,...r,ref:t})});Em.displayName=Tm;var Dm=`ContextMenuRadioGroup`,Om=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(Sr,{...i,...r,ref:t})});Om.displayName=Dm;var km=`ContextMenuRadioItem`,Am=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(lr,{...i,...r,ref:t})});Am.displayName=km;var jm=`ContextMenuItemIndicator`,Mm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(br,{...i,...r,ref:t})});Mm.displayName=jm;var Nm=`ContextMenuSeparator`,Pm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(vr,{...i,...r,ref:t})});Pm.displayName=Nm;var Fm=`ContextMenuArrow`,Im=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(gr,{...i,...r,ref:t})});Im.displayName=Fm;var Lm=`ContextMenuSub`,Rm=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=lm(t),[s,c]=tn({prop:i,defaultProp:a??!1,onChange:r,caller:Lm});return(0,Z.jsx)(hr,{...o,open:s,onOpenChange:c,children:n})};Rm.displayName=Lm;var zm=`ContextMenuSubTrigger`,Bm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(dr,{...i,...r,ref:t})});Bm.displayName=zm;var Vm=`ContextMenuSubContent`,Hm=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=lm(n);return(0,Z.jsx)(fr,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Hm.displayName=Vm;function Um(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Wm=fm,Gm=mm,Km=gm,qm=vm,Jm=bm,Ym=Sm,Xm=wm,Zm=Em,Qm=Mm,$m=Pm,eh=Rm,th=Bm,nh=Hm;function rh(e){let t=(0,$.c)(24),{error:n,resetErrorBoundary:r}=e,{_:i}=ht(),[a,o]=(0,Q.useState)(!1),s=(0,Q.useRef)(null),c=typeof window<`u`?window.okDesktop:void 0,l;t[0]!==i||t[1]!==n?(l=n instanceof Error&&n.message?n.message:i({id:`W5A0Ly`}),t[0]=i,t[1]=n,t[2]=l):l=t[2];let u=l,d,f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{s.current?.focus()},f=[],t[3]=d,t[4]=f):(d=t[3],f=t[4]),(0,Q.useEffect)(d,f);let p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(Xp,{size:80,variant:`sleeping`}),t[5]=p):p=t[5];let m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(`h1`,{id:`app-error-title`,className:`text-2xl font-light tracking-tighter text-balance`,children:(0,Z.jsx)(q,{id:`nwtY4N`})}),t[6]=m):m=t[6];let h;t[7]===u?h=t[8]:(h=(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[m,(0,Z.jsx)(`p`,{className:`max-w-sm text-sm break-words text-muted-foreground`,children:u})]}),t[7]=u,t[8]=h);let g;t[9]===r?g=t[10]:(g=()=>r(),t[9]=r,t[10]=g);let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(q,{id:`KDw4GX`}),t[11]=_):_=t[11];let v;t[12]===g?v=t[13]:(v=(0,Z.jsx)(Y,{ref:s,variant:`default`,onClick:g,children:_}),t[12]=g,t[13]=v);let y;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(y=c?(0,Z.jsx)(Y,{variant:`ghost`,className:`font-mono uppercase`,onClick:()=>o(!0),children:(0,Z.jsx)(q,{id:`ii5mVn`})}):null,t[14]=y):y=t[14];let b;t[15]===v?b=t[16]:(b=(0,Z.jsxs)(`div`,{className:`mt-1 flex gap-2`,children:[v,y]}),t[15]=v,t[16]=b);let x;t[17]!==n||t[18]!==a?(x=c?(0,Z.jsx)(oh,{children:(0,Z.jsx)(am,{open:a,onOpenChange:o,systemWide:c.config.mode===`navigator`,crashContext:{source:`app shell`,errorMessage:n instanceof Error&&n.message?n.message:String(n)}})}):null,t[17]=n,t[18]=a,t[19]=x):x=t[19];let S;return t[20]!==b||t[21]!==x||t[22]!==h?(S=(0,Z.jsxs)(`div`,{role:`alert`,"aria-labelledby":`app-error-title`,"data-slot":`app-error-boundary`,className:`flex h-screen flex-col items-center justify-center gap-8 p-8 text-center`,children:[p,h,b,x]}),t[20]=b,t[21]=x,t[22]=h,t[23]=S):S=t[23],S}function ih(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(Jt,{FallbackComponent:rh,onError:ah,children:n}),t[0]=n,t[1]=r),r}function ah(e){console.error(`[AppErrorBoundary] app-shell render crash`,e)}function oh(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(Jt,{fallback:null,onError:sh,children:n}),t[0]=n,t[1]=r),r}function sh(e){console.error(`[CrashReportingBoundary] crash-reporting UI render crash`,e)}function ch(){let e=(0,$.c)(5),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`acp-catalog`],queryFn:dh,staleTime:3e5},e[0]=t):t=e[0];let n=Mt(t),r;e[1]===n.data?.agents?r=e[2]:(r=()=>(ii(ci(n.data?.agents??[]).map(uh)),lh),e[1]=n.data?.agents,e[2]=r);let i;return e[3]===n.data?i=e[4]:(i=[n.data],e[3]=n.data,e[4]=i),(0,Q.useEffect)(r,i),null}function lh(){return ii([])}function uh(e){return{source:e.source,id:e.id,name:e.name,...e.iconUrl===void 0?{}:{iconUrl:e.iconUrl}}}function dh(e){let{signal:t}=e;return oi(t)}var fh=Xt(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),ph=Xt(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),mh=Xt(`bird`,[[`path`,{d:`M16 7h.01`,key:`1kdx03`}],[`path`,{d:`M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20`,key:`oj1oa8`}],[`path`,{d:`m20 7 2 .5-2 .5`,key:`12nv4d`}],[`path`,{d:`M10 18v3`,key:`1yea0a`}],[`path`,{d:`M14 17.75V21`,key:`1pymcb`}],[`path`,{d:`M7 18a6 6 0 0 0 3.84-10.61`,key:`1npnn0`}]]),hh=Xt(`blocks`,[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]),gh=Xt(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),_h=Xt(`book-marked`,[[`path`,{d:`M10 2v8l3-3 3 3V2`,key:`sqw3rj`}],[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),vh=Xt(`cat`,[[`path`,{d:`M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z`,key:`x6xyqk`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M11.25 16.25h1.5L12 17l-.75-.75Z`,key:`12kq1m`}]]),yh=Xt(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),bh=Xt(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),xh=Xt(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Sh=Xt(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),Ch=Xt(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),wh=Xt(`dog`,[[`path`,{d:`M11.25 16.25h1.5L12 17z`,key:`w7jh35`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309`,key:`u7s9ue`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5`,key:`v8hric`}]]),Th=Xt(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Eh=Xt(`file-check`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]),Dh=Xt(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),Oh=Xt(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),kh=Xt(`file-exclamation-point`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Ah=Xt(`file-key`,[[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M4 12v6`,key:`bg1pfk`}],[`path`,{d:`M4 14h2`,key:`1sf9f8`}],[`path`,{d:`M9.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v4`,key:`d56i0q`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),jh=Xt(`fish`,[[`path`,{d:`M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z`,key:`15baut`}],[`path`,{d:`M18 12v.5`,key:`18hhni`}],[`path`,{d:`M16 17.93a9.77 9.77 0 0 1 0-11.86`,key:`16dt7o`}],[`path`,{d:`M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33`,key:`l9di03`}],[`path`,{d:`M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4`,key:`1kjonw`}],[`path`,{d:`m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98`,key:`1zlm23`}]]),Mh=Xt(`fold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3-3-3 3`,key:`e37ymu`}],[`path`,{d:`m15 5-3 3-3-3`,key:`19d6lf`}]]),Nh=Xt(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),Ph=Xt(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Fh=Xt(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Ih=Xt(`grid-2x2-x`,[[`path`,{d:`M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3`,key:`11za1p`}],[`path`,{d:`m16 16 5 5`,key:`8tpb07`}],[`path`,{d:`m16 21 5-5`,key:`193jll`}]]),Lh=Xt(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),Rh=Xt(`hexagon`,[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}]]),zh=Xt(`highlighter`,[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]),Bh=Xt(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),Vh=Xt(`library`,[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]),Hh=Xt(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),Uh=Xt(`list-collapse`,[[`path`,{d:`M10 5h11`,key:`1hkqpe`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 19h11`,key:`14g2nv`}],[`path`,{d:`m3 10 3-3-3-3`,key:`i7pm08`}],[`path`,{d:`m3 20 3-3-3-3`,key:`20gx1n`}]]),Wh=Xt(`list-plus`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]),Gh=Xt(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),Kh=Xt(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),qh=Xt(`megaphone`,[[`path`,{d:`M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z`,key:`q8bfy3`}],[`path`,{d:`M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14`,key:`1853fq`}],[`path`,{d:`M8 6v8`,key:`15ugcq`}]]),Jh=Xt(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),Yh=Xt(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Xh=Xt(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`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`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Zh=Xt(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),Qh=Xt(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),$h=Xt(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),eg=Xt(`pilcrow`,[[`path`,{d:`M13 4v16`,key:`8vvj80`}],[`path`,{d:`M17 4v16`,key:`7dpous`}],[`path`,{d:`M19 4H9.5a4.5 4.5 0 0 0 0 9H13`,key:`sh4n9v`}]]),tg=Xt(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),ng=Xt(`rabbit`,[[`path`,{d:`M13 16a3 3 0 0 1 2.24 5`,key:`1epib5`}],[`path`,{d:`M18 12h.01`,key:`yjnet6`}],[`path`,{d:`M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3`,key:`ue9ozu`}],[`path`,{d:`M20 8.54V4a2 2 0 1 0-4 0v3`,key:`49iql8`}],[`path`,{d:`M7.612 12.524a3 3 0 1 0-1.6 4.3`,key:`1e33i0`}]]),rg=Xt(`rat`,[[`path`,{d:`M13 22H4a2 2 0 0 1 0-4h12`,key:`bt3f23`}],[`path`,{d:`M13.236 18a3 3 0 0 0-2.2-5`,key:`1tbvmo`}],[`path`,{d:`M16 9h.01`,key:`1bdo4e`}],[`path`,{d:`M16.82 3.94a3 3 0 1 1 3.237 4.868l1.815 2.587a1.5 1.5 0 0 1-1.5 2.1l-2.872-.453a3 3 0 0 0-3.5 3`,key:`9ch7kn`}],[`path`,{d:`M17 4.988a3 3 0 1 0-5.2 2.052A7 7 0 0 0 4 14.015 4 4 0 0 0 8 18`,key:`3s7e9i`}]]),ig=Xt(`replace-all`,[[`path`,{d:`M14 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`zg1ipl`}],[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M19 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`txt6k4`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),ag=Xt(`replace`,[[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),og=Xt(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),sg=Xt(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),cg=Xt(`shrimp`,[[`path`,{d:`M11 12h.01`,key:`1lr4k6`}],[`path`,{d:`M13 22c.5-.5 1.12-1 2.5-1-1.38 0-2-.5-2.5-1`,key:`fatpdi`}],[`path`,{d:`M14 2a3.28 3.28 0 0 1-3.227 1.798l-6.17-.561A2.387 2.387 0 1 0 4.387 8H15.5a1 1 0 0 1 0 13 1 1 0 0 0 0-5H12a7 7 0 0 1-7-7V8`,key:`kehrqe`}],[`path`,{d:`M14 8a8.5 8.5 0 0 1 0 8`,key:`1imjx2`}],[`path`,{d:`M16 16c2 0 4.5-4 4-6`,key:`z0nejz`}]]),lg=Xt(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),ug=Xt(`spell-check`,[[`path`,{d:`m6 16 6-12 6 12`,key:`1b4byz`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`m16 20 2 2 4-4`,key:`13tcca`}]]),dg=Xt(`square-code`,[[`path`,{d:`m10 9-3 3 3 3`,key:`1oro0q`}],[`path`,{d:`m14 15 3-3-3-3`,key:`bz13h7`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),fg=Xt(`squirrel`,[[`path`,{d:`M15.236 22a3 3 0 0 0-2.2-5`,key:`21bitc`}],[`path`,{d:`M16 20a3 3 0 0 1 3-3h1a2 2 0 0 0 2-2v-2a4 4 0 0 0-4-4V4`,key:`oh0fg0`}],[`path`,{d:`M18 13h.01`,key:`9veqaj`}],[`path`,{d:`M18 6a4 4 0 0 0-4 4 7 7 0 0 0-7 7c0-5 4-5 4-10.5a4.5 4.5 0 1 0-9 0 2.5 2.5 0 0 0 5 0C7 10 3 11 3 17c0 2.8 2.2 5 5 5h10`,key:`980v8a`}]]),pg=Xt(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),mg=Xt(`sticky-note`,[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]),hg=Xt(`strikethrough`,[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),gg=Xt(`table-properties`,[[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),_g=Xt(`telescope`,[[`path`,{d:`m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44`,key:`k4qptu`}],[`path`,{d:`m13.56 11.747 4.332-.924`,key:`19l80z`}],[`path`,{d:`m16 21-3.105-6.21`,key:`7oh9d`}],[`path`,{d:`M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z`,key:`m7xp4m`}],[`path`,{d:`m6.158 8.633 1.114 4.456`,key:`74o979`}],[`path`,{d:`m8 21 3.105-6.21`,key:`1fvxut`}],[`circle`,{cx:`12`,cy:`13`,r:`2`,key:`1c1ljs`}]]),vg=Xt(`text-align-center`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M17 12H7`,key:`16if0g`}],[`path`,{d:`M19 19H5`,key:`vjpgq2`}]]),yg=Xt(`text-align-end`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M21 19H7`,key:`4cu937`}]]),bg=Xt(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),xg=Xt(`text-quote`,[[`path`,{d:`M17 5H3`,key:`1cn7zz`}],[`path`,{d:`M21 12H8`,key:`scolzb`}],[`path`,{d:`M21 19H8`,key:`13qgcb`}],[`path`,{d:`M3 12v7`,key:`1ri8j3`}]]),Sg=Xt(`thumbs-down`,[[`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`,key:`m61m77`}],[`path`,{d:`M17 14V2`,key:`8ymqnk`}]]),Cg=Xt(`thumbs-up`,[[`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`,key:`emmmcr`}],[`path`,{d:`M7 10v12`,key:`1qc93n`}]]),wg=Xt(`turtle`,[[`path`,{d:`m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z`,key:`1lbbv7`}],[`path`,{d:`M4.82 7.9 8 10`,key:`m9wose`}],[`path`,{d:`M15.18 7.9 12 10`,key:`p8dp2u`}],[`path`,{d:`M16.93 10H20a2 2 0 0 1 0 4H2`,key:`12nsm7`}]]),Tg=Xt(`underline`,[[`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`,key:`9kb039`}],[`line`,{x1:`4`,x2:`20`,y1:`20`,y2:`20`,key:`nun2al`}]]),Eg=Xt(`unfold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m15 5-3-3-3 3`,key:`itvq4r`}]]),Dg=Xt(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Og=Xt(`whole-word`,[[`circle`,{cx:`7`,cy:`12`,r:`3`,key:`12clwm`}],[`path`,{d:`M10 9v6`,key:`17i7lo`}],[`circle`,{cx:`17`,cy:`12`,r:`3`,key:`gl7c2s`}],[`path`,{d:`M14 7v8`,key:`dl84cr`}],[`path`,{d:`M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1`,key:`lt2kga`}]]),kg=180,Ag=5e3;function jg(e,t){if(e===``||t===``)return``;let n=e.includes(`\\`)&&!e.includes(`/`)?`\\`:`/`;return`${e.replace(/[/\\]+$/,``)}${n}${t}`}function Mg(e){if(e===``)return``;let t=e.split(/[/\\]/).filter(Boolean);return t.length>0?t[t.length-1]??e:e}function Ng(e){let{parent:t,sanitizedName:n,enclosingProject:r,enclosingGit:i,targetState:a}=e;return t===``||n===``?{kind:`idle`}:r===null?i===null?a===`exists-nonempty`?{kind:`block-nonempty`}:{kind:`free`}:{kind:`confirm-git`,gitRoot:i.gitRoot}:{kind:`block-nested`,rootPath:r.rootPath}}function Pg(e){let t=e instanceof Error?e.message:String(e);for(let e of io)if(t.startsWith(`${e}:`)||t.includes(`${e}: `))return e===`nested-project`||e===`target-not-empty`?{reason:e}:{reason:e,message:t};return{reason:`unknown`,message:t}}function Fg(e){switch(e.reason){case`nested-project`:return{id:`ScwcF2`};case`target-not-empty`:return{id:`e8L17t`};case`invalid-args`:return{id:`6bTTAN`};case`mkdir-failed`:return{id:`gJR87V`};case`git-init-failed`:return{id:`4CfgPM`};case`init-failed`:return{id:`l17ab4`};case`discovery-failed`:return{id:`ThmUrC`};case`unknown`:return{id:`AddR83`}}}function Ig(e){let t=(0,$.c)(186),{open:n,onOpenChange:r,bridge:i,initialPackId:a,packs:o}=e,{_:s}=ht(),c=(0,Q.useId)(),l=(0,Q.useId)(),u=(0,Q.useId)(),d=(0,Q.useId)(),[f,p]=(0,Q.useState)(``),[m,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(Ug),[b,x]=(0,Q.useState)(`shared`),[S,C]=(0,Q.useState)(!1),w;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(w={kind:`idle`},t[0]=w):w=t[0];let[T,E]=(0,Q.useState)(w),[D,O]=(0,Q.useState)(`idle`),[k,A]=(0,Q.useState)(!1),[j,M]=(0,Q.useState)(null),N;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(N={kind:`idle`},t[1]=N):N=t[1];let[P,F]=(0,Q.useState)(N),[I,L]=(0,Q.useState)(0),R;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(R=new Set,t[2]=R):R=t[2];let z=(0,Q.useRef)(R),B=(0,Q.useRef)(null),V=(0,Q.useRef)(null),H=(0,Q.useRef)(null),U=(0,Q.useRef)(0),W,G;t[3]!==i||t[4]!==n?(W=()=>{if(!n)return;z.current.clear(),M(null),E({kind:`idle`}),O(`idle`),A(!1),_(``),y(new Set(Ja)),x(`shared`),C(!1),F({kind:`idle`}),U.current+=1;let e=!1;p(``),h(!0),i.fs.defaultProjectsRoot().then(t=>{e||p(t)}).catch(Hg).finally(()=>{e||h(!1)});let t=requestAnimationFrame(()=>{H.current?.focus()});return()=>{e=!0,cancelAnimationFrame(t)}},G=[n,i],t[3]=i,t[4]=n,t[5]=W,t[6]=G):(W=t[5],G=t[6]),(0,Q.useEffect)(W,G);let K;t[7]!==i||t[8]!==f||t[9]!==g||t[10]!==n?(K=()=>{if(!n)return;V.current!==null&&clearTimeout(V.current),B.current!==null&&B.current.abort();let e=Pi(g);if(f===``||e===``){E({kind:`idle`}),O(`idle`);return}let t=f,r=jg(t,e),a=new AbortController;return B.current=a,V.current=setTimeout(()=>{O(`in-flight`),Promise.all([i.fs.findEnclosingProjectRoot(t),i.fs.findEnclosingGitRoot(t),i.fs.folderState(r)]).then(n=>{let[r,i,o]=n;a.signal.aborted||(O(`idle`),E(Ng({parent:t,sanitizedName:e,enclosingProject:r,enclosingGit:i,targetState:o})))}).catch(e=>{a.signal.aborted||(console.warn(`[CreateProjectDialog] cascade probe failed:`,e),O(`idle`),E({kind:`free`}))})},kg),()=>{V.current!==null&&clearTimeout(V.current),a.abort()}},t[7]=i,t[8]=f,t[9]=g,t[10]=n,t[11]=K):K=t[11];let ee;t[12]!==i||t[13]!==f||t[14]!==g||t[15]!==n||t[16]!==I?(ee=[n,f,g,i,I],t[12]=i,t[13]=f,t[14]=g,t[15]=n,t[16]=I,t[17]=ee):ee=t[17],(0,Q.useEffect)(K,ee);let te,ne;t[18]===n?(te=t[19],ne=t[20]):(te=()=>{if(!n)return;let e=()=>L(Vg);return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},ne=[n],t[18]=n,t[19]=te,t[20]=ne),(0,Q.useEffect)(te,ne);let re=(0,Q.useRef)(`idle`),ie,ae;t[21]===D?(ie=t[22],ae=t[23]):(ie=()=>{re.current=D},ae=[D],t[21]=D,t[22]=ie,t[23]=ae),(0,Q.useEffect)(ie,ae);let oe,se;t[24]!==T.kind||t[25]!==n?(oe=()=>{if(!n||T.kind!==`confirm-git`)return;let e=setInterval(()=>{re.current!==`in-flight`&&L(Bg)},Ag);return()=>clearInterval(e)},se=[n,T.kind],t[24]=T.kind,t[25]=n,t[26]=oe,t[27]=se):(oe=t[26],se=t[27]),(0,Q.useEffect)(oe,se);let ce;t[28]!==T.gitRoot||t[29]!==T.kind||t[30]!==P.gitRoot||t[31]!==P.kind?(ce=()=>{if(T.kind!==`confirm-git`){P.kind!==`idle`&&(U.current+=1,F({kind:`idle`}));return}P.kind===`confirming`&&P.gitRoot!==T.gitRoot&&F({kind:`idle`}),P.kind===`pending`&&P.gitRoot!==T.gitRoot&&(U.current+=1,F({kind:`idle`}))},t[28]=T.gitRoot,t[29]=T.kind,t[30]=P.gitRoot,t[31]=P.kind,t[32]=ce):ce=t[32];let le;t[33]!==T||t[34]!==P?(le=[T,P],t[33]=T,t[34]=P,t[35]=le):le=t[35],(0,Q.useEffect)(ce,le);let ue;t[36]!==i||t[37]!==T.kind||t[38]!==n?(ue=()=>{if(!n)return;let e=null;T.kind===`block-nested`?e=`nested`:T.kind===`block-nonempty`?e=`nonempty`:T.kind===`confirm-git`&&(e=`git-confirm`),e!==null&&(z.current.has(e)||(z.current.add(e),i.project.recordCreateNewBannerShown(e).catch(zg)))},t[36]=i,t[37]=T.kind,t[38]=n,t[39]=ue):ue=t[39];let de;t[40]!==i||t[41]!==T||t[42]!==n?(de=[n,T,i],t[40]=i,t[41]=T,t[42]=n,t[43]=de):de=t[43],(0,Q.useEffect)(ue,de);let fe;t[44]!==a||t[45]!==o?(fe=o?.find(e=>e.id===a),t[44]=a,t[45]=o,t[46]=fe):fe=t[46];let pe=fe,me=g,he,ge,_e,ve,ye;t[47]!==T.kind||t[48]!==f||t[49]!==me?(ve=me===``?``:Pi(me),ge=me!==``&&ve!==me&&ve!==``,_e=me!==``&&ve===``,he=T.kind===`block-nonempty`,ye=f!==``&&ve!==``?jg(f,ve):``,t[47]=T.kind,t[48]=f,t[49]=me,t[50]=he,t[51]=ge,t[52]=_e,t[53]=ve,t[54]=ye):(he=t[50],ge=t[51],_e=t[52],ve=t[53],ye=t[54]);let be=ye,xe=!k&&f!==``&&me!==``&&ve!==``&&D===`idle`&&(T.kind===`free`||T.kind===`confirm-git`),Se=k||me!==``&&!xe,Ce;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=function(e){y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[55]=Ce):Ce=t[55];let we=Ce,Te;t[56]!==i||t[57]!==f?(Te=async function(){try{let e=await i.dialog.openFolder(f===``?void 0:{defaultPath:f});if(e===null)return;p(e),L(Rg),M(null)}catch(e){console.warn(`[CreateProjectDialog] dialog.openFolder failed:`,e)}},t[56]=i,t[57]=f,t[58]=Te):Te=t[58];let Ee=Te,De;t[59]!==s||t[60]!==i||t[61]!==k||t[62]!==xe||t[63]!==v||t[64]!==a||t[65]!==f||t[66]!==r||t[67]!==me||t[68]!==ve||t[69]!==b?(De=async function(e){if(e.preventDefault(),!k){if(me.trim()===``){X.error(s({id:`5OqaJi`})),H.current?.focus();return}if(xe){A(!0),M(null);try{await i.project.createNew({parent:f,name:ve,editors:Array.from(v),sharing:b,packId:a}),r(!1)}catch(e){M(Pg(e)),A(!1)}}}},t[59]=s,t[60]=i,t[61]=k,t[62]=xe,t[63]=v,t[64]=a,t[65]=f,t[66]=r,t[67]=me,t[68]=ve,t[69]=b,t[70]=De):De=t[70];let Oe=De,ke;t[71]!==k||t[72]!==r?(ke=function(e){k||r(e)},t[71]=k,t[72]=r,t[73]=ke):ke=t[73];let Ae=ke,je;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(je=async function(e){F({kind:`confirming`,gitRoot:e})},t[74]=je):je=t[74];let Me=je,Ne;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=async function(){F({kind:`idle`})},t[75]=Ne):Ne=t[75];let Pe=Ne,Fe;t[76]===i?Fe=t[77]:(Fe=async function(e){let t=U.current+1;U.current=t,F({kind:`pending`,gitRoot:e});try{if(await i.fs.removeGitFolder(e),U.current!==t)return;L(Lg),F({kind:`idle`})}catch(e){let n=e;if(U.current!==t)return;let r=n instanceof Error?n.message:String(n);console.error(`[CreateProjectDialog] bridge.fs.removeGitFolder failed:`,n),F({kind:`error`,message:r})}},t[76]=i,t[77]=Fe);let Ie=Fe,Le;t[78]!==i||t[79]!==r?(Le=async function(e){r(!1);try{await i.project.open({path:e,target:`new-window`,entryPoint:`create-new-nested-redirect`})}catch(e){console.warn(`[CreateProjectDialog] project.open failed:`,e)}},t[78]=i,t[79]=r,t[80]=Le):Le=t[80];let Re=Le,ze=_e||he||ge?`${u} ${d}`:u,Be;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,Z.jsx)(pn,{children:(0,Z.jsx)(q,{id:`wbv9xO`})}),t[81]=Be):Be=t[81];let Ve;t[82]===pe?Ve=t[83]:(Ve=(0,Z.jsxs)(_n,{children:[Be,(0,Z.jsx)(fn,{children:pe?(0,Z.jsx)(q,{id:`D2CwBE`,values:{0:pe.name,1:pe.entryCounts.folders},components:{0:(0,Z.jsx)(`strong`,{})}}):(0,Z.jsx)(q,{id:`O6yEPk`})})]}),t[82]=pe,t[83]=Ve);let He;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,Z.jsx)(q,{id:`OyIC0Q`}),t[84]=He):He=t[84];let Ue;t[85]===l?Ue=t[86]:(Ue=(0,Z.jsx)(Fr,{htmlFor:l,children:He}),t[85]=l,t[86]=Ue);let We;t[87]===s?We=t[88]:(We=s({id:`cV7LOw`}),t[87]=s,t[88]=We);let Ge;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=e=>_(e.target.value),t[89]=Ge):Ge=t[89];let Ke=_e||he,qe;t[90]!==k||t[91]!==g||t[92]!==ze||t[93]!==l||t[94]!==We||t[95]!==Ke?(qe=(0,Z.jsx)(vl,{id:l,ref:H,value:g,placeholder:We,onChange:Ge,disabled:k,autoComplete:`off`,"aria-invalid":Ke,"aria-describedby":ze,"data-testid":`create-name`}),t[90]=k,t[91]=g,t[92]=ze,t[93]=l,t[94]=We,t[95]=Ke,t[96]=qe):qe=t[96];let Je;t[97]!==d||t[98]!==he||t[99]!==ge||t[100]!==_e||t[101]!==ve?(Je=_e?(0,Z.jsx)(`p`,{id:d,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-name-error-erased`,children:(0,Z.jsx)(q,{id:`_PBJRl`})}):he?(0,Z.jsx)(`p`,{id:d,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-name-error-taken`,children:(0,Z.jsx)(q,{id:`7apDiJ`,values:{sanitized:ve},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):ge?(0,Z.jsx)(`p`,{id:d,role:`status`,"aria-live":`polite`,className:`text-1sm text-muted-foreground`,"data-testid":`create-name-hint-diverged`,children:(0,Z.jsx)(q,{id:`KnoB--`,values:{sanitized:ve},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):null,t[97]=d,t[98]=he,t[99]=ge,t[100]=_e,t[101]=ve,t[102]=Je):Je=t[102];let Ye;t[103]!==Ue||t[104]!==qe||t[105]!==Je?(Ye=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Ue,qe,Je]}),t[103]=Ue,t[104]=qe,t[105]=Je,t[106]=Ye):Ye=t[106];let Xe;t[107]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,Z.jsx)(Fr,{children:(0,Z.jsx)(q,{id:`wJijgU`})}),t[107]=Xe):Xe=t[107];let Ze;t[108]!==f||t[109]!==m?(Ze=f===``?m?(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(q,{id:`iHAJDj`})}):(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(q,{id:`8m8diM`})}):f,t[108]=f,t[109]=m,t[110]=Ze):Ze=t[110];let Qe;t[111]===Ze?Qe=t[112]:(Qe=(0,Z.jsx)(`div`,{className:`min-w-0 flex-1 rounded-md border border-input bg-muted/50 px-2.5 py-1 text-sm text-foreground wrap-break-word`,"data-testid":`create-location-display`,children:Ze}),t[111]=Ze,t[112]=Qe);let $e;t[113]===Ee?$e=t[114]:($e=()=>void Ee(),t[113]=Ee,t[114]=$e);let et;t[115]===Symbol.for(`react.memo_cache_sentinel`)?(et=(0,Z.jsx)(q,{id:`O2UpM1`}),t[115]=et):et=t[115];let tt;t[116]!==k||t[117]!==$e?(tt=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,className:`shrink-0`,disabled:k,onClick:$e,"data-testid":`create-browse`,children:et}),t[116]=k,t[117]=$e,t[118]=tt):tt=t[118];let nt;t[119]!==Qe||t[120]!==tt?(nt=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[Qe,tt]}),t[119]=Qe,t[120]=tt,t[121]=nt):nt=t[121];let rt;t[122]===be?rt=t[123]:(rt=be===``?null:(0,Z.jsx)(q,{id:`k_yIIc`,values:{targetPreview:be},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}}),t[122]=be,t[123]=rt);let it;t[124]!==u||t[125]!==rt?(it=(0,Z.jsx)(`p`,{id:u,className:`text-1sm text-muted-foreground wrap-break-word`,"aria-live":`polite`,"data-testid":`create-target-caption`,children:rt}),t[124]=u,t[125]=rt,t[126]=it):it=t[126];let at;t[127]!==nt||t[128]!==it?(at=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Xe,nt,it]}),t[127]=nt,t[128]=it,t[129]=at):at=t[129];let ot;t[130]!==T||t[131]!==Ie||t[132]!==Re||t[133]!==P?(ot=(0,Z.jsx)(Wg,{cascade:T,onOpenNested:Re,removeGitState:P,onRequestRemoveGit:Me,onCancelRemoveGit:Pe,onConfirmRemoveGit:Ie}),t[130]=T,t[131]=Ie,t[132]=Re,t[133]=P,t[134]=ot):ot=t[134];let st;t[135]===Symbol.for(`react.memo_cache_sentinel`)?(st=(0,Z.jsxs)(un,{className:`group flex w-full items-center justify-between gap-2 px-3 py-2 text-sm font-medium hover:bg-muted/50`,"data-testid":`create-advanced-trigger`,children:[(0,Z.jsx)(q,{id:`VNgKZz`}),(0,Z.jsx)(Ro,{className:`size-4 transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`,"aria-hidden":!0})]}),t[135]=st):st=t[135];let ct;t[136]===Symbol.for(`react.memo_cache_sentinel`)?(ct=(0,Z.jsx)(`legend`,{className:`text-sm font-medium`,children:(0,Z.jsx)(q,{id:`0YEbfk`})}),t[136]=ct):ct=t[136];let lt;t[137]===Symbol.for(`react.memo_cache_sentinel`)?(lt=(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`8IP5jY`})}),t[137]=lt):lt=t[137];let ut;t[138]!==k||t[139]!==v?(ut=Ja.map(e=>{let t=`create-editor-${e}`;return(0,Z.jsxs)(Fr,{htmlFor:t,className:`text-sm font-normal`,children:[(0,Z.jsx)(Yn,{id:t,checked:v.has(e),onCheckedChange:()=>we(e),disabled:k,"data-testid":`create-editor-${e}`}),(0,Z.jsx)(`span`,{children:Wi[e]})]},e)}),t[138]=k,t[139]=v,t[140]=ut):ut=t[140];let dt;t[141]===ut?dt=t[142]:(dt=(0,Z.jsxs)(`fieldset`,{className:`flex flex-col space-y-2 pb-2`,children:[ct,lt,ut]}),t[141]=ut,t[142]=dt);let ft;t[143]!==k||t[144]!==b?(ft=(0,Z.jsx)(ml,{idPrefix:`create`,testIdPrefix:`create-sharing`,value:b,onValueChange:x,disabled:k}),t[143]=k,t[144]=b,t[145]=ft):ft=t[145];let pt;t[146]!==dt||t[147]!==ft?(pt=(0,Z.jsxs)(ln,{className:`space-y-6 border-t border-border px-3 py-4`,children:[dt,ft]}),t[146]=dt,t[147]=ft,t[148]=pt):pt=t[148];let mt;t[149]!==S||t[150]!==pt?(mt=(0,Z.jsxs)(dn,{open:S,onOpenChange:C,className:`rounded-md border border-border`,"data-testid":`create-advanced`,children:[st,pt]}),t[149]=S,t[150]=pt,t[151]=mt):mt=t[151];let gt;t[152]!==s||t[153]!==j?(gt=j===null?null:(0,Z.jsx)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-submit-error`,children:s(Fg(j))}),t[152]=s,t[153]=j,t[154]=gt):gt=t[154];let _t;t[155]!==c||t[156]!==Oe||t[157]!==Ye||t[158]!==at||t[159]!==ot||t[160]!==mt||t[161]!==gt?(_t=(0,Z.jsx)(hn,{className:`space-y-6`,children:(0,Z.jsxs)(`form`,{id:c,onSubmit:Oe,"data-testid":`create-project-form`,className:`space-y-6`,children:[Ye,at,ot,mt,gt]})}),t[155]=c,t[156]=Oe,t[157]=Ye,t[158]=at,t[159]=ot,t[160]=mt,t[161]=gt,t[162]=_t):_t=t[162];let vt;t[163]===r?vt=t[164]:(vt=()=>r(!1),t[163]=r,t[164]=vt);let yt;t[165]===Symbol.for(`react.memo_cache_sentinel`)?(yt=(0,Z.jsx)(q,{id:`dEgA5A`}),t[165]=yt):yt=t[165];let bt;t[166]!==k||t[167]!==vt?(bt=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,className:`font-mono uppercase`,onClick:vt,disabled:k,"data-testid":`create-cancel`,children:yt}),t[166]=k,t[167]=vt,t[168]=bt):bt=t[168];let xt;t[169]===k?xt=t[170]:(xt=k?(0,Z.jsx)(q,{id:`E9bKSA`}):(0,Z.jsx)(q,{id:`hYgDIe`}),t[169]=k,t[170]=xt);let St;t[171]!==c||t[172]!==Se||t[173]!==xt?(St=(0,Z.jsx)(Y,{type:`submit`,form:c,disabled:Se,"data-testid":`create-submit`,children:xt}),t[171]=c,t[172]=Se,t[173]=xt,t[174]=St):St=t[174];let Ct;t[175]!==bt||t[176]!==St?(Ct=(0,Z.jsxs)(gn,{children:[bt,St]}),t[175]=bt,t[176]=St,t[177]=Ct):Ct=t[177];let wt;t[178]!==Ve||t[179]!==_t||t[180]!==Ct?(wt=(0,Z.jsxs)(mn,{className:`sm:max-w-lg`,"data-testid":`create-project-dialog`,children:[Ve,_t,Ct]}),t[178]=Ve,t[179]=_t,t[180]=Ct,t[181]=wt):wt=t[181];let Tt;return t[182]!==Ae||t[183]!==n||t[184]!==wt?(Tt=(0,Z.jsx)(vn,{open:n,onOpenChange:Ae,children:wt}),t[182]=Ae,t[183]=n,t[184]=wt,t[185]=Tt):Tt=t[185],Tt}function Lg(e){return e+1}function Rg(e){return e+1}function zg(){}function Bg(e){return e+1}function Vg(e){return e+1}function Hg(e){console.warn(`[CreateProjectDialog] defaultProjectsRoot probe failed:`,e)}function Ug(){return new Set(Ja)}function Wg(e){let t=(0,$.c)(37),{cascade:n,onOpenNested:r,removeGitState:i,onRequestRemoveGit:a,onCancelRemoveGit:o,onConfirmRemoveGit:s}=e;if(n.kind===`idle`||n.kind===`free`||n.kind===`block-nonempty`)return null;if(n.kind===`block-nested`){let{rootPath:e}=n,i;t[0]===e?i=t[1]:(i=Mg(e),t[0]=e,t[1]=i);let a=i,o;t[2]===e?o=t[3]:(o={rootPath:e},t[2]=e,t[3]=o);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})},t[4]=s):s=t[4];let c;t[5]===o?c=t[6]:(c=(0,Z.jsx)(`p`,{className:`mb-2`,children:(0,Z.jsx)(q,{id:`W7XJN4`,values:o,components:s})}),t[5]=o,t[6]=c);let l;t[7]!==r||t[8]!==e?(l=()=>r(e),t[7]=r,t[8]=e,t[9]=l):l=t[9];let u;t[10]===a?u=t[11]:(u=(0,Z.jsx)(q,{id:`1Ta7Fd`,values:{basename:a}}),t[10]=a,t[11]=u);let d;t[12]!==l||t[13]!==u?(d=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:l,"data-testid":`create-banner-nested-open`,children:u}),t[12]=l,t[13]=u,t[14]=d):d=t[14];let f;return t[15]!==c||t[16]!==d?(f=(0,Z.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-banner-nested`,children:[c,d]}),t[15]=c,t[16]=d,t[17]=f):f=t[17],f}if(n.kind===`confirm-git`){let{gitRoot:e}=n,r;if(t[18]!==e){let n;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(n=/\/+$/,t[20]=n):n=t[20],r=e.replace(n,``),t[18]=e,t[19]=r}else r=t[19];let c=`${r}/.git`,l=i.kind===`error`?i.message:null,u;t[21]===e?u=t[22]:(u={gitRoot:e},t[21]=e,t[22]=u);let d;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(d={0:(0,Z.jsx)(`code`,{}),1:(0,Z.jsx)(`code`,{})},t[23]=d):d=t[23];let f;t[24]===u?f=t[25]:(f=(0,Z.jsx)(`p`,{children:(0,Z.jsx)(q,{id:`FEK4oC`,values:u,components:d})}),t[24]=u,t[25]=f);let p;t[26]!==e||t[27]!==o||t[28]!==s||t[29]!==a||t[30]!==l||t[31]!==i.kind||t[32]!==c?(p=i.kind===`idle`||i.kind===`error`?(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-1`,children:[(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>a(e),"data-testid":`create-banner-git-remove`,children:(0,Z.jsx)(q,{id:`YTLmTM`,components:{0:(0,Z.jsx)(`code`,{})}})}),i.kind===`error`?(0,Z.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,"data-testid":`create-banner-git-remove-error`,children:(0,Z.jsx)(q,{id:`SkMZlS`,values:{targetGitPath:c,removeGitError:l},components:{0:(0,Z.jsx)(`code`,{})}})}):null]}):(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 rounded border border-blue-400/60 bg-white/40 p-2 dark:border-blue-600/60 dark:bg-black/20`,"data-testid":`create-banner-git-remove-confirm`,children:[(0,Z.jsx)(`p`,{className:`text-xs`,children:(0,Z.jsx)(q,{id:`WZ-vBy`,values:{targetGitPath:c},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Z.jsx)(Y,{type:`button`,variant:`destructive`,size:`sm`,disabled:i.kind===`pending`,onClick:()=>s(e),"data-testid":`create-banner-git-remove-confirm-button`,children:i.kind===`pending`?(0,Z.jsx)(q,{id:`0-31GV`}):(0,Z.jsx)(q,{id:`v-h2hx`,values:{targetGitPath:c}})}),(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`sm`,disabled:i.kind===`pending`,onClick:o,"data-testid":`create-banner-git-remove-cancel`,children:(0,Z.jsx)(q,{id:`dEgA5A`})})]})]}),t[26]=e,t[27]=o,t[28]=s,t[29]=a,t[30]=l,t[31]=i.kind,t[32]=c,t[33]=p):p=t[33];let m;return t[34]!==f||t[35]!==p?(m=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded-md border border-blue-300 bg-blue-50 px-3 py-2 text-sm text-blue-900 dark:border-blue-700 dark:bg-blue-950 dark:text-blue-200`,"data-testid":`create-banner-git-confirm`,children:[f,p]}),t[34]=f,t[35]=p,t[36]=m):m=t[36],m}return null}var Gg=`open-knowledge:doc-panel-tab`,Kg=null;function qg(){let e=Kg;return Kg=null,e}function Jg(e,t=typeof window>`u`?new EventTarget:window){Kg=e,t.dispatchEvent(new CustomEvent(Gg,{detail:{tab:e}}))}function Yg(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail?.tab:void 0;n&&e(n)};return t.addEventListener(Gg,n),()=>t.removeEventListener(Gg,n)}function Xg(e){let t=(0,$.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`GitHub`}),r=(0,Z.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,Z.jsxs)(`svg`,{role:`img`,fill:`currentColor`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}var Zg={messages:JSON.parse(`{"--T3kB":["Loading preview"],"-3Qbv7":[["count","plural",{"one":["matches ","#"," file"],"other":["matches ","#"," files"]}]],"-3ois8":["Hard break"],"-5jISU":[["0","plural",{"one":["#"," template"],"other":["#"," templates"]}]],"-7s4fw":["Search agents"],"-8PP0T":["Match case"],"-FeyRg":["Keep original file"],"-K0AvT":["Disconnect"],"-LHLx7":["edited template"],"-QCLWk":["Templates available"],"-Qw-1t":["GitHub authentication failed. Try signing in again."],"-WFFG2":["Default properties"],"-YV1Uo":["Pattern ",["patternNumber"]],"-bFGPF":["Next change"],"-dNlfM":["Undid the last edit on ",["docName"]],"-f2Ogn":["Keep this project in sync with your git remote. Follow fetches updates without pushing; full sync pushes your commits too. Turning sync on requires confirmation."],"-g6KIS":["Unrecognized link"],"-imiMK":["Follow — updates flow in from your remote; your edits stay on this computer."],"-kbIAr":["Links & images"],"-lCAuQ":["Loading graph"],"-o5XAG":["Sent privately to the OpenKnowledge team, along with your note and app version. Never posted publicly."],"-q4abP":["Results capped — this workspace has more files than search can index. A missing file may be a cap artifact, not a typo."],"-r_Kx7":["Create skill"],"-slrNR":["Toggle a task list."],"-uaQnI":["No matching worktrees or branches."],"-wePNM":["Search matches file names, paths, and folders. Open a file to search its body (⌘F)."],"-zA2E7":["Couldn't create the worktree. Try a different name."],"-zy2Nq":["Type"],"0-31GV":["Removing"],"00c7t0":["Ask AI about this code block"],"02P3hL":["Upload failed: ",["message"]],"03wKPg":["A report helps us find the cause. Nothing is sent until you review it."],"04RA0-":["Failed to enable sync — ",["detail"]],"04XyCH":["Adds a managed block to ",["0"]],"05n5wS":["Doc mention suggestions"],"06SZfb":["Template \\"",["trimmedTitle"],"\\" created"],"07eGJB":["Couldn't move skill: ",["0"]],"07gHun":["You don't have access to this private repo. Sign in with an account that does."],"07q4Qk":["File sidebar"],"09Tv5j":["Reconnecting…"],"0BB9ID":["No headings yet."],"0BfhAj":["Reset view"],"0E9DR6":["Type to find a doc"],"0Er6-M":["Restarting"],"0Gd0NU":["Shared"],"0LBDjY":["\\"",["0"],"\\" uninstalled — back to a draft"],"0NA4b3":["Keep my version"],"0NkNB5":[["0"],"mo ago"],"0QVrvp":["Maximum agents already running"],"0TnCvC":["Rename ",["0"]],"0YEbfk":["Connect to AI tools"],"0YUS3Q":["Subfolder under current folder"],"0_J12R":["New file from template \\"",["displayTitle"],"\\" (",["fileName"],") in ",["targetLabel"]],"0eHrMb":["Could not complete delete"],"0g7rCZ":["Duplicated to \\"",["0"],"\\""],"0inVGS":["Helps your coding agent recognize OpenKnowledge projects and route reads and writes through it."],"0jD-Gn":["A team knowledge base, a personal wiki, project docs..."],"0kTAXe":["Open source: ",["mirrorSrc"]],"0qyKG6":["Synced from disk"],"0rwwOn":["By tag"],"0s8-e8":["Select, enter, or leave block components and fallback source blocks from keyboard boundaries."],"0t0bbC":["Could not save sync preference: ",["detail"]],"0uTHCg":["Start a new OpenKnowledge project."],"0wswKc":["Horizontal rule that divides sections."],"0xnQ_X":["Updates flow in"],"0xnmlQ":["Repository name"],"0yL--g":["Review conflicts"],"0zAhu6":["every doc"],"10g8I_":["Turn off Only markdown files"],"12F9WL":["(no id)"],"151wvk":["Show sidebar"],"161NCV":["Stopping"],"16D5Zj":["Are you sure you want to delete ",["itemName"],"? This action cannot be undone."],"16eIWu":["Force stop"],"170Js2":["Hide panel"],"1AumWo":["Push failed — check the server logs for details."],"1CalO6":["Style"],"1DahsC":["Search settings"],"1EcCom":[["keyName"]," value"],"1FLarN":["Describe what you want to create to continue"],"1GhYxC":["of ",["totalPages"]],"1HBhDS":["Checking out files"],"1OKzC_":["Your report couldn't be sent. Try again or email it instead."],"1QfxQT":["Dismiss"],"1RluQD":["Show replace"],"1TNIig":["Open"],"1Ta7Fd":["Open ",["basename"]],"1XSMhZ":["Switching to <0>local-only</0> will refuse until they're untracked via<1> git rm --cached</1>."],"1YJ4Yg":["Update available",["0"]],"1ZpfyB":["Open with AI ",["displayName"],", ",["hint"]],"1a6ICf":["Following the agent's edits"],"1bDVu5":["Workspace Command Palette"],"1d1F11":["Select all files and folders"],"1di5fu":["Document not found"],"1hvhf0":["The folder on disk and the id agents use to invoke this skill."],"1njn7W":["Light"],"1nke1r":["Open ",["0"]," on GitHub (opens in a new tab)"],"1t_NnN":["Reject"],"1u-mAI":["Couldn't start the sync. Check your connection, then retry."],"2-CeZn":["Your report is saved on this Mac, so nothing was lost. You can email it to us instead."],"2277Tu":["Collapse graph"],"237hSL":["Ended"],"25Pw6a":["Cloning"],"27TLNq":["Enable ",["displayName"]," CLI"],"27XW26":["Clone happens in the Project Navigator. Reclick the share link there."],"28B21t":["Agent Skills"],"29VNqC":["Unknown error"],"29XZXN":["Set git identity"],"2AIVbm":["Review your report"],"2B6eYX":["What this checkbox changes"],"2BBAbc":["List"],"2CHoQv":["Force Reload"],"2FYpfJ":["More"],"2FnYUD":["App & system info, recent app logs, and project server logs: the essentials we need to reproduce the issue."],"2G-56b":["Failed to update markdownlint rules"],"2GT3Hf":["Global"],"2H43L8":["Secrets like API keys and tokens are redacted automatically."],"2IYGkU":["This doc has unpushed changes. Recipients will see the last pushed version."],"2QM24L":["All tags"],"2RBzMG":["Network error — check your connection and try again"],"2Snes1":["This sends the link's address off your machine"],"2XQ8Ww":["Open preview when agent edits"],"2YOwme":["Restarted — now running v",["appRuntime"],"."],"2YZwPB":["Forward-links response did not match expected shape."],"2bVHbB":["Available in every project on this computer."],"2hYmUH":["my@email.com"],"2hpdRq":["Hide panel (",["panelShortcutLabel"],")"],"2j1kfc":["Enter a valid URL (for example https://api.openai.com/v1)."],"2m_bmh":[["label"]," (",["0"],")"],"2myNzt":["We've filed it with the team and attached your logs."],"2n3oDU":["Project-level pages ordered by inbound link count, up to ",["FULLSCREEN_HUB_LIMIT"]," results."],"2ojpo0":["Dock sessions on the right"],"2pR7ad":["Embeddings API key"],"2q_Q7x":["Visibility"],"2rLM8r":["Couldn't start the agent thread — please try again."],"2ryd91":["Failed to rename property"],"2tgFCe":["Starting clone"],"2vIPtm":["Open link in new tab"],"2wxgft":["Rename"],"322lyb":["Highlight tips, warnings, and notes."],"34qyH5":["Could not reach server"],"36WXSC":["Couldn't delete template: ",["error"]],"36aWJD":["Join us on Discord"],"37P2BJ":["Search schemas"],"38foVZ":["Loading diff"],"3BLniE":["Configuration problems"],"3BnyYc":["This doc isn't on GitHub yet. The link won't work until it's pushed."],"3DJEEt":[["sizeText"]," · secrets redacted · ",["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]],"3DTatP":["Copy a prompt for your agent, start a blank file, or scaffold from a template."],"3FMvls":["A short line shown under the title in the template list."],"3Fcb0I":["Open graph"],"3HAPpl":["No schemas match your search."],"3HNlwb":["Hello, world!"],"3Ib6FN":["Move down"],"3Ijjy1":["Couldn't load this skill's files."],"3J7d2N":["Big section heading."],"3JYy1p":["Branch ",["0"]," no longer exists. Cloned to default branch."],"3LbBJn":["Attach images"],"3MnvrL":["Showing top ",["0"]," matches — keep typing to narrow"],"3Mwaly":["Could not initialize ",["0"],"."],"3SDfZl":["<0>Mirror — pick a source.</0> Set <1>src</1> + <2>anchor</2> via the property panel to point at a <3><MirrorSource></3> elsewhere."],"3SZrdj":["Check for updates…"],"3TSz9S":["Minimize"],"3VbwPp":["Open ",["keyName"]," in browser"],"3VsNTI":["Loading document"],"3YWddZ":["No content changes in this version"],"3YvS-c":["New tab"],"3_6U6f":["Connect to GitHub"],"3__SjS":["breadcrumb"],"3a_Bd7":["Open source doc: ",["mirrorSrc"]],"3aeN7X":["All files"],"3cOo2C":["Create a folder from the current document or folder context."],"3ePd3I":["What's new"],"3h5zMp":["Something went wrong loading the settings panel."],"3iyGWF":["Open recent project"],"3jod3l":["Connect GitHub"],"3l_cXP":["Take a look if you'd like. This exact file is what we receive."],"3m2GBo":["Searching docs"],"3mFsc3":["Restore with remote changes"],"3o3tur":["Starter content"],"3oEK1e":["Resuming the conversation"],"3oh0nQ":["Nested .okignore error in ",["path"]],"3pU8e-":["Pin tab"],"3wiBAs":["Where should it live?"],"3y6XTb":["Semantic search"],"3zyg_A":["Ignore patterns"],"438Fca":["Cloned successfully, but could not open the project."],"44DSl0":["Already have a git repository? Add it with <0>git remote add origin <url></0> in this project's folder. This page updates automatically once a remote is detected."],"45MZFs":["Commands"],"47EXvY":["This replaces the current skill content with the bundled version ",["0"]," (you have ",["1"],"). Any local edits will be replaced — your current version is saved to history first, so you can restore it."],"484LKL":["Remove link"],"48uGTI":["Failed to load docs. Press Escape and re-open to retry."],"494br3":["Shared with everyone on this project — committed to config.yml via git."],"4A3Yzu":["Code block"],"4BITzH":["Error:"],"4CfgPM":["Project folder created, but git init failed. Try again."],"4DcimZ":["Updated ",["lastSyncedRelative"]],"4E9jPa":["Create your first project"],"4EZrJN":["Rules"],"4Gz2wC":["Failed to upload file"],"4KmEoC":["Hotkeys"],"4NC2Ym":["Move to the next or previous table cell."],"4PYsOz":["Hide Files (",["sidebarShortcutLabel"],")"],"4Sxexw":["Source undo or redo"],"4TzU0n":["Initialize"],"4XL6N4":["Detected from the editors this project is set up for. Adjust to control where every skill installs."],"4buZWd":["Inherited from ",["path"]],"4cEClj":["Sessions"],"4c_a6S":["Nothing set yet."],"4g19V6":["Failed to update property"],"4h3e0H":["Couldn't update skills sharing — ",["detail"],"."],"4hJhzz":["Table"],"4ieVh2":["Pick “Custom” above to use this palette."],"4jDd0j":["Anyone can see"],"4mLBx9":["Subscriptions aren't available right now."],"4niEzY":["Sandboxed HTML embed — write HTML, see the rendered preview live."],"4nj6n8":["/api/config returned HTTP ",["code"]],"4rjwLG":["Create with ",["0"]," CLI"],"4sKwf6":["File already exists"],"4uNLmk":["Pulling"],"4v2Yyz":["Select every visible file-tree row when focus is in the Files sidebar."],"4xtLTl":["Hidden folder “",["basename"],"”"],"4zEZS5":["Auto-sync is on for this worktree, inherited from ",["project"],". Change it in Settings → Sync."],"4zGlN_":["Paste image URL or click upload"],"4z_1j2":["Rendered"],"5-FeN2":["Share URL"],"5-o4kO":["Only markdown files"],"50ORFs":["Reset ",["0"]," to default"],"54Y6Fg":["Could not load templates. Try again later."],"56WWtu":["Couldn't load starter packs: ",["error"]],"56xUL1":["Property name"],"57fiu8":["(read-only — edit in source mode for now)"],"5ALjdr":["Move through visual-editor find results from the find field."],"5Ajb15":["The formula <0>c = √(a² + b²)</0> renders inline."],"5AzM72":["This setting is per-machine and isn't shared with collaborators."],"5ClEAu":["Inline hashtag for cross-doc grouping."],"5D3Ior":["Hide folder"],"5F5HYj":[["ahead"]," ahead, ",["behind"]," behind"],"5GKMSz":["Indent or outdent the current list item."],"5GRxoA":["Search files, folders, and commands for the current workspace."],"5LXwX8":["This permanently removes ",["path"],". Agents that reference this template by name will fail until it's recreated or replaced by one in a parent folder."],"5OTgC7":["Open and focus the bottom Ask AI prompt composer."],"5OqaJi":["Enter a project name"],"5PHgV2":["You can also create one from a terminal with <0>ok bug-report</0>."],"5PrrYw":["Start ",["agentName"]],"5QGTaA":["Could not copy relative path"],"5SwVv1":["Not installed"],"5Szq6N":["This endpoint ignored the vector size you configured. Remove <0>search.semantic.dimensions</0> to use the model's own size."],"5Tk8Fb":["Loading files"],"5Umg9i":["Disable external link previews"],"5WDhAk":["Link to a page or external URL."],"5Y17qa":["Applies to (globs — leading ! excludes; empty means every doc)"],"5ZB7XC":["File drop zone"],"5ZbJFS":["Your current version is saved first, so this is reversible."],"5_8TCr":["Fix all (",["count"],")"],"5_j-DA":["Kill Terminal"],"5aahsI":["nothing (",["0"]," is not a valid pattern)"],"5e1Dri":["The menu label agents pick this template by (required)."],"5gr_ev":["Becomes the document's content when someone creates a doc from this template. Type <0>",["dateToken"],"</0> or <1>",["userToken"],"</1> to fill in today's date or the author's name automatically."],"5jEnaB":["Not available on this platform"],"5kWklo":["(some may already be hidden by other rules)"],"5lWFkC":["Sign in"],"5mksg0":["Failed to disable semantic search — ",["detail"]],"5qNxOe":[["count","plural",{"one":["#"," item could not be moved to the Trash. Do you want to permanently delete instead?"],"other":["#"," items could not be moved to the Trash. Do you want to permanently delete instead?"]}]],"5qQr1u":["Allowed values for ",["field"]],"5rnB76":["Your edits stay on this computer"],"5tcmwY":["Add value"],"5vYdh9":["New thread with ",["0"]],"5wV2qQ":["and more"],"5y_9lO":["Waiting for authorization"],"6-wLTJ":[["behind"]," behind origin"],"60vpJN":["What were you doing?"],"62Pc08":["Install for Claude Chat & Cowork (Desktop App)"],"62bOuM":["Latest edit"],"636K3K":["Delete adjacent chip"],"67f-3g":["Duplicate succeeded but the sidebar may be out of date — refresh to resync"],"6Aih4U":["Offline"],"6EKG_c":["What agents match on to decide when to use the skill."],"6HCOwA":["Failed to open."],"6KCH4m":["Hidden files"],"6LbUG7":["The repository is private and your GitHub account doesn't have access to it."],"6MnZEC":["Terminal failed to load"],"6O626z":["No headings match \\"",["trimmedAnchorQuery"],"\\""],"6Pxqwv":["No project templates yet. Create one to make it available everywhere in this project. Folder-scoped templates live on each folder's overview page."],"6Uau97":["Skip"],"6V3Ea3":["Copied"],"6VqW-1":["Remove ",["keyName"]],"6WdDG7":["Page"],"6YtxFj":["Name"],"6ZhdPI":["What the agent may read, write, and surface."],"6_ZOw4":["Copied full path"],"6bTTAN":["Invalid input — pick a different folder."],"6cR-PU":["Already open"],"6caB2T":["Connect an existing repository"],"6cuT_1":["Open date picker for ",["keyName"]],"6cyguR":["Connect GitHub to continue."],"6eniID":["Map the architecture"],"6fGjTz":["Show fewer"],"6g2jsp":["Update skill"],"6gRgw8":["Retry"],"6h4zVU":["What would you like to create?"],"6hYjww":["Create a token on ",["host"]],"6hfDJr":["Server error: ",["status"]],"6iDEWA":["Show panel"],"6ibbCg":["Create your first file"],"6ki7F2":[["0","plural",{"one":["#"," item"],"other":["#"," items"]}]],"6lGV3K":["Show less"],"6m_7We":["Open this settings dialog."],"6pe_G5":["Element type"],"6q0rnH":["writing"],"6qMe0o":["Draft a technical spec for my project. Start with an overview, then add cross-linked pages for the architecture, the key modules, and the open questions, all linked from a specs index."],"6s7LXO":["Heads up"],"6u9LvN":[["days","plural",{"one":["#"," day ago"],"other":["#"," days ago"]}]],"6vEr3W":["Link target"],"6zzhQL":["Send your report by email"],"72xhRD":["Diagram view mode"],"74-bX-":["A pull quote stands out from the surrounding text."],"74C2zx":["Edit schema ",["file"]],"74eHt-":["No file or folder selected"],"75Y1dk":["Horizontal pill strip + active panel below; click a pill to switch panels."],"77SdEP":["Delete ",["itemName"]],"78G7R3":["Validate document frontmatter against JSON Schema files, scoped to doc sets by glob."],"7FamGZ":["Go to line"],"7Fkcej":["+ Add ",["addChildName"]],"7H4UHD":["Documents tagged <0>#",["tagName"],"</0>"],"7IsvrP":["Checking for updates"],"7JtSLi":["Failed to delete path"],"7OhaRy":["Source search"],"7Ongq0":["Condense my AGENTS.md file to less than 40k characters"],"7OwvEL":["Show HTML preview"],"7PNNNs":["This sends content off your machine"],"7PXYaF":["<0>ok</0> won't run in external terminals until you add it later from the File menu. OpenKnowledge's built-in terminal and AI tools keep working."],"7PzzBU":["User"],"7YRrJ9":["Available in the OpenKnowledge desktop app. From a terminal, use<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."],"7_bFEL":["Drag ",["patternText"]," to reorder"],"7apDiJ":["A folder named <0>",["sanitized"],"</0> already has files here. Pick a different name."],"7cAW1G":["No API key is set for this endpoint. Add one above."],"7d1a0d":["Public"],"7hctf2":["Describe the project you want to create"],"7jIIFX":["You're all set up!"],"7kb4LU":["Approved"],"7l15X4":["failed"],"7qRHf0":["Install for Claude Chat & Cowork"],"7uBlRT":["Copy the focused file-tree item so Paste can duplicate it."],"7vQdBK":["Loading the conversation"],"80c4-P":["Code copied to clipboard"],"81H_23":["Add properties"],"881Uwh":["Delete selected table"],"89TtiD":["New file from template \\"",["displayTitle"],"\\" (",["fileName"],") in the project root"],"89y7ar":[["sizeText"]," · secrets redacted"],"8F1i42":["Page not found"],"8FqTCr":[["chunksRemaining","plural",{"one":["#"," unresolved hunk"],"other":["#"," unresolved hunks"]}]],"8Gzz2G":["worktree of ",["worktreeOf"]],"8IP5jY":["Each selected tool gets an OpenKnowledge MCP entry."],"8Jm2EP":["Toggle heading levels 1 through 6."],"8L0EPw":["or paste a token"],"8OGgNM":["Open or close visual-editor find."],"8OxKZy":["Move succeeded but the sidebar may be out of date — refresh to resync"],"8PifYj":["Mermaid diagram"],"8PmoQF":["Open the insert menu in an empty or active text position."],"8RtNI0":["Failed to load documents"],"8TvlHF":["Crash dump"],"8Vq20-":["Switch worktree"],"8Wav8y":["If an update arrives for something you are editing, you choose which version to keep, like a merge conflict."],"8XQRON":["Loading repositories"],"8_brI5":["Name is required"],"8cS0nH":["Config sharing unavailable: ",["0"],"."],"8cpOa8":["Couldn't disconnect — please try again."],"8cpeU3":["Shared repositories"],"8eW0WQ":["No matching repositories."],"8fRyLo":["Invalid patch payload"],"8fc_3j":["Protected branch — cannot push"],"8k6INX":["Paste a personal access token for <0>",["host"],"</0>."],"8lwQlE":[["0"]," added, ",["1"]," removed"],"8m8diM":["No location selected. Use Browse to choose a folder."],"8nWu1k":["Empty diagram"],"8ruqQi":["Broken internal links"],"8sMErm":["Enable Follow?"],"8t9CRE":["Starting ",["agentName"],"…"],"8tjQCz":["Explore"],"8uAWix":["This template lives in a parent folder — deleting it affects every folder beneath it that doesn't define its own version."],"8vCZcs":["Failed to open file."],"8vETh9":["Show"],"92rbk2":["Mirror loading <0>",["mirrorRef"],"</0>"],"96G6Re":["New folder"],"96w9hU":["Something went wrong opening this file (HTTP ",["status"],")."],"98FP1E":["This schema carries root-level advanced rules the editor does not show (",["0"],") — they still validate and survive every edit. Open the schema file to see them."],"99eR72":["Visual editor table selection"],"9Bd18D":["Failed to load hub pages"],"9KooKn":["Run a project audit from the Problems panel."],"9NJWgv":["Backlinks"],"9OIqw4":["You don't have write access to this repo."],"9PQysm":["Hide advanced"],"9R7pRC":["No tags match \\"",["trimmed"],"\\". Continue typing to create one."],"9UQ730":["Clone"],"9V0W-R":["Adds the OpenKnowledge skill to the <0>Claude Desktop App</0> so it's available in Chat and Cowork sessions."],"9Vh9Jf":["Reopen this window to sign in with your browser"],"9XIEYq":["Attach the file in an email to <0/>"],"9aVlF2":["Change provider"],"9bCiQ8":["No pages are missing incoming graph links."],"9bG48P":["Sending"],"9clcD5":["Open documents tagged #",["chip"]],"9dVehq":["More grant options"],"9dw5bW":["Create with ",["0"]],"9euN0m":[["count","plural",{"one":["#"," more cross-doc participant"],"other":["#"," more cross-doc participants"]}]],"9fhQRL":["Beta channel"],"9fvog2":["Preview unavailable: ",["errorDetail"]],"9i21pa":["Commits happen automatically"],"9jnjV0":["Embed an audio file with native player controls."],"9mEZeD":[["name"]," CLI"],"9nIrRp":["Nested fields"],"9npOH9":["Open file"],"9o1bIV":[["behind"]," behind"],"9oE4C3":["Browse your repos:"],"9sBe85":["Follow us on"],"9tJX8r":["By meaning"],"9uI_rE":["Undo"],"9xCnv8":["Hide Terminal"],"9zb2WA":["Connecting"],"A1taO8":["Search"],"A50vr3":["Use lowercase letters, digits, and <0>-</0> only."],"A5CYnd":["Broken link"],"A5hiCy":["Create template"],"A67Uwj":["Still loading"],"A6h5b-":["File duplicated"],"AAlr5Y":["No collab server for this worktree — run <0>ok start</0> here, or reopen the project."],"AB4qw9":["New terminal"],"AE7BY3":["The terminal session ended."],"AIVHDc":["Choose what a new session starts"],"AIn2Yv":[["displayName"]," CLI, ",["hint"]],"AItsE5":["Open it there"],"AKxFtn":[["openedWorktreeCount","plural",{"one":["worktree"],"other":["worktrees"]}]],"ALhMYW":["Terminal"],"APNlbk":["exit ",["0"]],"AQ-Lfg":["Couldn't load templates"],"AQGtjK":["Commands run with the full access of your macOS user account on this machine. Turn this off to disable the shell."],"ASqqsQ":["Maximum ",["MAX_ATTACHMENTS"]," attachments"],"ATGYL1":["Email address"],"AVW-K9":["Failed to load orphan pages"],"AWOSPo":["Zoom in"],"AaaESH":["Auto-sync is off for this worktree, inherited from ",["project"],". Change it in Settings → Sync."],"AcK_r0":["Claude CLI"],"AczYxH":["Custom open-knowledge entry — not managed by OpenKnowledge"],"AdcGcG":["Applying your change"],"AddR83":["Could not create project. Try again or pick a different location."],"AeHuzT":["# One pattern per line.\\n# Examples:\\n# drafts/\\n# *.draft.md\\n# !keep.md"],"AeXO77":["Account"],"AhoGwP":["Set up OpenKnowledge integrations"],"AiNMQ7":["This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."],"Aif3E7":["Enable semantic search"],"Am78jY":["Drag ",["keyName"]," to reorder"],"ApeA0n":["Undid ",["dropCount"]," edits on ",["docName"]],"Aq-O0x":["status"],"AqnqMJ":["API key set"],"AsqRE_":["Default location for new attachments"],"AtBdnD":["Couldn't delete skill: ",["error"]],"AwLCZA":["The endpoint answered, but not with an OpenAI-compatible embeddings response. Check the base URL."],"B11p-O":["Edit markdown link"],"B2DrPb":["Auto-save"],"B2Srgd":[["packName"]," skill installed."],"B3NAZC":["Open Navigator"],"B4_ipX":[["conflictCount","plural",{"one":["#"," file conflicted"],"other":["#"," files conflicted"]}]],"B6Lac2":["+",["overflowCount"]," more"],"BAH4qX":["Selected graph item"],"BBqGS9":["Desktop"],"BD0XSC":["Failed to load project templates"],"BEkF-P":[["userName"],", ",["tabCount","plural",{"one":["#"," concurrent tab"],"other":["#"," concurrent tabs"]}]],"BGHHtQ":["Single page"],"BH56dn":["Custom display text"],"BQKHuL":["Restart terminal"],"BQu9Pg":["Symlink"],"BUyQnq":["Couldn't restart the server. Try \`ok start\` in this folder."],"BY-g4_":["Add pattern"],"Ba4D2x":["Template imported"],"Bdha5y":["Publishing..."],"BeWTQy":["Loading starter packs"],"BgV29F":["Visual editor find input focused"],"Bh9671":["This project is local-only, so .ok/skills is hidden from git and these skills can't be committed or shared. Share just the skills folder — the rest of your OK config stays on this computer."],"BjitBo":["Download ",["0"]],"Bn9-El":["default"],"Bv5a9_":["Selection statistics"],"Bx4EXG":["Actions for ",["label"]],"By-7Pn":["Toggle a bullet list."],"BymzO4":["Document outline"],"C-mmmK":["The model id your endpoint serves. Its vector size is detected automatically — clear the field to go back to ",["DEFAULT_EMBEDDINGS_MODEL"],"."],"C-xgad":["or use a starter pack"],"C0hoX6":["Always included"],"C52RBg":["Validate document frontmatter against standard JSON Schema files (draft-07). Toggle a schema on to validate the docs its globs match; violations surface as warnings and never block a write. Use Edit to open the schema file."],"C62P6b":["Editor selection"],"C7XjNB":["Global Skill"],"C9TBvF":["No Outgoing"],"CBsdhe":["The agent isn't stopping. Force stop closes this thread and quits the agent."],"CCTop_":["Recent"],"CFnavk":["This project isn't a git repository, so worktrees aren't available."],"CKyk7Q":["Go back"],"COr1Y7":["Pick <0>openknowledge.skill</0> from your <1>Downloads</1> folder. It enables automatically."],"CPmYSG":["Checking for agents"],"CSL0l1":["Couldn't clear the key — please try again."],"CTJLpz":["\\"",["trimmed"],"\\" already exists here"],"CU3AiE":["Switching branches"],"CVRM5N":["Follow fetches updates from your remote git repository and fast-forwards your copy automatically. Your local edits stay on this computer and are never pushed."],"CWjM1r":["docs directly in ",["0"],"/"],"CWzc2T":["<0>~/.ok/bin</0> and <1>~/.ok/env.sh</1> stay either way — the app always maintains them."],"CXTwen":["Can't safely edit this project config"],"CXj9C-":["New property name"],"C_Lyvh":["Failed to save theme setting"],"C_WGy8":["This file is too large to open in the built-in text editor (1 MB limit). Use Open file below to open it in another app."],"C_cPoW":["Your GitHub session expired — sign in again to verify push access."],"ChAtFg":["You don't have permission to push to this repo"],"CifUuG":["Update available"],"Ck9XRt":["Couldn't save the key — please try again."],"CmeH9S":["Add property to ",["keyName"]],"CnOGgs":["Sync mode"],"CoHvYd":["Moved ",["0"]," to position ",["1"]," of ",["2"]],"CooKEf":["Dock sessions at the bottom"],"CvsD6Y":["via ",["viaTags"]],"CwOXMT":["Value for ",["keyName"]],"D-Oh1s":["How to set up ",["0"]," (opens in browser)"],"D-_B7l":["Connected — this endpoint returns ",["0"],"-dimension vectors."],"D12vtS":["(detached)"],"D2CwBE":["Create a new OpenKnowledge project from the <0>",["0"],"</0> starter pack (",["1","plural",{"one":["#"," folder"],"other":["#"," folders"]}]," and starter templates) in the folder of your choice."],"D2E7tr":["This permanently deletes ",["deleteTarget"]," from the project and removes its mapping from config.yml. Docs it validated keep their frontmatter; they just stop being checked."],"D2emTw":["Something went wrong sending your feedback. Please try again."],"D4H2N6":["Remove ",["tag"]],"D8JJwQ":["Feedback isn't available right now. Please try again later."],"D8OV7J":["Only collaborators"],"DDTdLl":["Code block settings"],"DELNQk":["Collaborators see your in-progress edits as soon as they sync."],"DEWDbv":["Show diagram"],"DF1MtZ":["Loading conflict for ",["filePath"]],"DFfRbX":["Sync status: ",["syncStateLabel"]," — git identity unset"],"DId6MT":["Project-level pages with no outgoing graph edges."],"DJd000":["Activate the previous editor tab."],"DKYW1G":["This setting is per-machine and isn't shared with collaborators. It needs an API key (set below) unless your endpoint is a local server that doesn't require one."],"DMeaxi":["Downloading ",["0"]," ",["1"],"…"],"DPfwMq":["Done"],"DTI-fp":["This ",["targetNoun"]," only exists on branch <0>",["shareBranch"],"</0>. You have uncommitted changes that prevent switching here — open it in a worktree to leave your changes untouched."],"DUWgfT":["Re-authenticate with GitHub Enterprise Server"],"DVh_Tb":["Failed to clean up after trash"],"DXd9LM":["New worktree"],"D_WKe_":["Click an agent's avatar in the presence bar to view their session."],"DbILZA":["No matches. Some files are excluded from search (hidden or ignored files)."],"DcLaew":["Custom theme"],"DeDYLr":["Unrecognized wiki link"],"DgcGrb":[["fileCount","plural",{"one":["file"],"other":["files"]}]],"DhK_hZ":["Moved \\"",["name"],"\\" to ",["0"]," (",["skipped"]," binary file(s) not copied)"],"DhLHEb":["Failed to load activity"],"DiFKSL":["Counting markdown files"],"Dnn2XG":["Automatic"],"DrYM2Z":["Sync disabled"],"DsDwR-":[["0","plural",{"one":["#"," error"],"other":["#"," errors"]}]],"DskIkK":["Sign-in stream ended without confirmation — please try again"],"Dub54T":["Preview browsers can't auto-copy. Use Cmd/Ctrl+C on the URL above, or open OK in the desktop app."],"Dvwa0U":["Create a worktree from this branch"],"Dw1T_W":["Rename ",["label"]],"Dz7fsq":["Zoom In"],"E1Da_b":["This permanently removes ",["0"],". Agents that invoke this skill by name will fail until it's recreated."],"E1_c72":["Task list"],"E1tG2u":["Get Claude Code"],"E2Mv-X":["Copy source"],"E4XYYH":["Enable terminal for this project"],"E5WeIy":["Reopen the most recently closed editor tab."],"E6lrpp":["Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."],"E7BhZn":["Blank note"],"E9bKSA":["Creating"],"E9gh86":["You can attach up to ",["MAX_ATTACHMENTS"]," images."],"EARn6h":["Couldn't share skills — ",["detail"],"."],"EBVbtP":["Could not duplicate item"],"EDl9kS":["Subscribe"],"EDm3wJ":["Loading diff renderer"],"EEYbdt":["Publish"],"EHu0x2":["Syncing"],"EJuO7B":["Connect a GitHub account to browse and sync your repositories."],"EKwNEe":["Cached embeddings belong to the endpoint and model that produced them, so this rebuilds the index from scratch."],"ELYtNJ":[".ok folders"],"EL_YRd":["Mirror of <0>api-spec</0>"],"ENpRJV":["External link previews"],"EO4Dt1":["Enable ",["file"]],"EOjU5V":["Inline Math Properties"],"EPwuTC":[["usedLabel"]," / ",["sizeLabel"]," tokens used"],"ETyvvg":["No language match."],"EWCJFu":["Created ",["target"]],"EWPtMO":["Code"],"EWX92Z":["Collapse Ask AI"],"EZVxVz":["Replace the active match from the replace field."],"E_BHoD":["Could not move \\"",["targetName"],"\\" to the Trash. Do you want to permanently delete instead?"],"E_tNGD":["Connected as @",["login"]],"Ea1prf":["Choose which editors every skill in this project installs into."],"EarrCe":["Search emoji"],"Eax_et":["Accent"],"EbMUlU":["Agent mode"],"EbZT7P":["Toggle the left file sidebar."],"EbjWsS":["Current commit"],"EcM3k7":["Failed to clean up pending ",["kind"]],"EdQY6l":["None"],"EeUucb":["Rule editing is available for the project's root markdownlint config"],"Ef7StM":["Unknown"],"EhDLBx":["You modified <0>",["filePath"],"</0> locally, but it was deleted upstream."],"Ehkru0":["Open, navigate, accept, or dismiss CodeMirror completion suggestions."],"EiVgl5":["You don't have permission to push to this repo."],"Eji13z":["Toggle highlight formatting."],"EkH9pt":["Update"],"EkUnmS":["any"],"El7NbA":["Heading 2"],"ElatXA":["Context window: ",["percent"],"% used, ",["usedLabel"]," of ",["sizeLabel"]," tokens"],"Emz5BG":["Embeddings are computed only when a search runs and are cached locally under <0>.ok/local</0>."],"EoaQyO":["Append-only log of what changed."],"EqrC_R":["Undo failed: ",["message"]],"EqtBXb":["Visual editor find open"],"ErRi6L":["Template \\"",["label"],"\\" deleted"],"Es-eZU":["Remove from recent projects"],"Ev2r9A":["No results"],"EvPX7f":["Opens a folder picker to choose where to clone the repository."],"Evq3lu":["Orphan mode"],"ExPiRQ":["Move to the next CodeMirror lint diagnostic."],"ExUzM4":["skill \\"",["0"],"\\""],"F-NRCj":["Add property"],"F-vBv0":["Ask"],"F0OA00":["Get ",["displayName"]],"F1T9y_":["Showing top matches — keep typing to narrow"],"F4IYWe":["Share doc"],"F4vEsL":["Sync status: ",["syncStateLabel"]],"F6pfE9":["Active"],"FBknns":["HTML"],"FCAcjR":["Run a real terminal docked inside OpenKnowledge, starting in this project's folder."],"FCKppt":["Endpoint"],"FCxvG5":["First item"],"FDBwmS":["Open folder…"],"FEK4oC":["OpenKnowledge will be initialized at <0>",["gitRoot"],"</0> — the parent of your new folder, because it contains a <1>.git</1> folder (one project per git repo)."],"FEqWFL":["Guides your AI agents on how to work here."],"FEr96N":["Theme"],"FF7V5K":["Actual Size"],"FNTx6u":["Search \\"",["semanticSubmitQuery"],"\\" by meaning"],"FOGD7m":["Create something great."],"FRYB1Q":["/api/config returned a malformed body"],"FRqZ9v":["Couldn't update skill: ",["0"]],"FTBN5g":["How validation findings surface across the project. These choices are committed to config.yml and shared with every collaborator via git."],"FTUGgh":["Enter a repository URL or owner/repo"],"FUMerq":["Could not enable sync: ",["detail"]],"FWQuPE":["This project is running a different, incompatible build of OpenKnowledge than this app (v",["0"],")."],"FXk_zY":["Adds a guided workflow for authoring new Agent Skills."],"FZtBeR":["Enable ",["0"]],"FgRAvd":["Logs & system info"],"FjkaiT":["Zoom out"],"FqGWeR":["Couldn't reach the agent registry."],"FqTpiN":["Bird wiki"],"Fqr8BP":["Multi-page PDF viewer with toolbar controls (thumbnails, page nav, zoom)."],"Fqx38P":["What got in the way?"],"Fsx78O":["Add the <0>ok</0> command to your terminal"],"FvMSms":["Renaming changes the file on disk and the id agents use to pick this template."],"FvpFSZ":["Reveal in Finder, ",["hint"]],"Fxf4jq":["Description (optional)"],"Fy4GgU":["Explain how your codebase works so teammates and AI agents can find their way around. Good for documenting the architecture, the main parts, and the questions new contributors always ask."],"FyW0WO":["Authorize in browser"],"G-JBA1":["Source mode requires a live connection — your edits are saved and will appear when you reconnect."],"G-h6qN":[["0","plural",{"one":["#"," option set"],"other":["#"," options set"]}]],"G0YZ-I":["Indent or outdent list item"],"G1Gw0v":["New template"],"G1XxbZ":["Checkbox"],"G4-bgo":["Ask AI (from selection)"],"G7-rf8":["Pattern syntax error: ",["message"]],"G7bn_N":["Start an agent"],"G7cMuO":["HTML preview"],"G8t9NN":["Add a property"],"GA-UkN":[["keyName"]," type: ",["typeLabel"],". Click to change."],"GDvlUT":["Role"],"GF51cw":["Give the AI tools you use access to read and update your projects. Pick what to set up below, and change it anytime."],"GGsM4y":["Selected in graph"],"GHsJb8":["Show .ok folders"],"GJH-AT":[["docName"]," is ",["0"],". OpenKnowledge currently opens files up to ",["1"],"."],"GK-IRZ":["Undo buttons are disabled — per-session state has been garbage-collected."],"GLxIKR":["How to push manually"],"GN6L5F":["Filename"],"GQDSBN":["Layout options"],"GSYWCm":["Hide document panel"],"GUYwCr":["Dismiss notice"],"GUqTzn":["Competitor research"],"GXf9hG":["Cloning ",["repoName"],"..."],"GZzDqc":["Details about the error you just hit are included. Secrets like API keys and tokens are redacted automatically."],"G_686w":["Task List"],"G_efLf":["Installed into"],"G_hVTP":["Enable Themes"],"G_mWXb":["Filter languages"],"GamjcN":["Template saved"],"GemPfn":["Failed to parse forward-links error response (HTTP ",["status"],")"],"Gfr4fu":["Server can't open documents"],"GhjUB_":["Reconnected"],"GkYV_4":["Renamed ",["0"]," → ",["1"]],"Gp_twO":["Local path"],"GsBUCk":["Loading settings"],"Gt4gOO":["This folder has unpushed changes. Recipients will see the last pushed version."],"GtJbUa":["Background"],"GuaJb-":["Open email draft"],"GubkSu":["Use a starter pack"],"GuqOb1":["Failed to load headings"],"Gx0VS1":["e.g. drafts/ or *.draft.md"],"GzPQ2f":["Stay in the loop"],"H-hzll":["Please choose Good or Not great."],"H-vDm3":["Relaunching to install the update…"],"H08D2X":["Open a single markdown file in a temporary session, without project setup."],"H0WlWQ":["Grid of rows and columns with a header row."],"H3oH0g":["Redo"],"H6nKok":["Show in File Manager"],"H86f9p":["Collapse"],"H9E1bE":["Reset to default (removes it from config.yml)"],"HAvRAI":[["skillCount","plural",{"one":["skill"],"other":["skills"]}]],"HCn0Ay":["Toggle strikethrough formatting."],"HGNCsl":["Connection lost — keep this tab open, your edits will sync when reconnected"],"HIb0vl":["Network error — please try again"],"HM56Bx":["Creating..."],"HPTPGr":["Create a new spec file for my user story"],"HSh8u_":["Folders"],"HTW0Zw":["One more step: run <0>claude</0> in this project and approve OpenKnowledge once."],"HdkSiO":["New file"],"HfI1dR":["I already have it locally →"],"HjNrT0":[["0","plural",{"one":["#"," backlink"],"other":["#"," backlinks"]}]],"Hl89Qd":["Loading templates"],"HlmZBk":["Documents response did not match expected shape."],"Hngy37":["No problems found — but no lint plugins are enabled, so only links are checked."],"Hnl9nT":["Set where pasted and dropped files are stored for this project."],"HoWElC":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy of branch <0>",["branch"],"</0>. Please commit your changes or enable auto-sync."],"Hp1l6f":["Current"],"Hp4rRh":["Custom endpoint"],"HpK_8d":["Reload"],"HptUxX":["Number"],"HqOPpj":["Git needs a helper tool (such as git-lfs) that isn't installed or couldn't be found. Install it, then try again."],"HqiZvw":["OpenKnowledge stores its configuration and internal files inside a newly created <0>.ok</0> directory in your project root folder."],"Hrz9NY":["Wiki link"],"HyvSqq":["Project Skill"],"HzVv6g":["Paste"],"I-xnra":[["0"]," hex value"],"I1gRhX":["Failed to rename"],"I5685_":["Try a prompt"],"I5AfhE":["Sync status unavailable — server unreachable."],"I7Exsw":["Follow us on X"],"IA1wNb":["The Claude Desktop App didn't open the file. Is it installed? (",["msg"],")"],"IA6JW2":["Detecting"],"ICoNYz":["You can also manage this in Settings."],"IFALcX":["Description for ",["field"]],"IFezUv":["The audit could not be completed. Try again."],"IInnZo":["Conflict"],"IKoTAC":["Keep disabled"],"IN4UX8":["Search (",["searchShortcut"],")"],"IQPyrD":["Missing page — click to create"],"IQgeSn":["Failed to save the schema field"],"IRv9cH":["Cloned ",["repoName"],"."],"IWGfGF":["Checking your GitHub connection"],"IX7-sq":["Something went wrong opening \\"",["docName"],"\\"."],"IX_uXB":["my-feature"],"IYciRC":["Thanks for the report!"],"IajAbS":["Add a starter pack"],"If0crP":["Open with AI ",["targetDisplayName"],", ",["hint"]],"IgTwLt":["Open this document in the editor and collapse the graph."],"Ik-gP0":["Heading H",["level"],": ",["text"]],"IlH15B":["Start a session with the + button, or launch an agent from a page."],"Iq8zdU":["Close terminal"],"IrB5AK":["Server-side cleanup failed for ",["failedCount","plural",{"one":["#"," item"],"other":["#"," items"]}]],"IrC12v":["Application"],"IreQBq":["Repository"],"It9ARY":["Toggle the right document panel."],"ItxGi3":["Attachments must total under 3 MB."],"Ix0K8o":["Hide external URL nodes"],"IxyZXD":["Screenshot"],"Izb10l":["Fix all ",["count"]," fixable problems"],"J2Mv98":["Name (e.g. ",["login"],")"],"J2_JuX":["nothing (",["0"]," cannot match a doc)"],"J2eKUI":["File"],"J3HzPL":["Collapse ",["keyName"]],"J6N5MX":["Couldn't construct the share URL. Try Done and re-share."],"J6mxC1":["A network problem or GitHub outage interrupted the clone."],"JCxGEX":["No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."],"JE21eh":["Symlink to ",["targetPath"]],"JG_8KT":["Couldn't pull from GitHub. Check your connection and sign-in, then retry."],"JHf6qZ":["you@company.com"],"JJcBCm":[["0"]," total"],"JK-Ave":["Hide thumbnails"],"JL3si7":["Updating"],"JLUTgi":["No tags yet — author \`#tagname\` in any doc to populate the index."],"JLzQi_":["Close ",["accessibleLabel"]],"JM_aq-":["Use an https:// URL — http:// is only allowed for localhost."],"JOcPqH":["Bring a remote repository onto this machine."],"JWsZlx":["Open a project to edit."],"JZ8cO6":["Light, dark, or follow the OS."],"J_bJiH":["Pick a built-in IDE color palette, or define your own."],"Jejur6":["Couldn't load document"],"JfPuv7":[["shareBranch"]," isn't a valid branch name."],"Jhj_lh":["Modify the link target, anchor, and display label."],"JkCD2u":["Sync paused — you don't have permission to push to this repo"],"JlFcis":["Send"],"JmfgFc":["(a worktree of ",["0"],")"],"Jqqevv":["System error"],"JsY1p5":["Denied"],"JtD-Br":["Page link"],"Jw6EC4":["Branch switch failed — try opening the ",["targetNoun"]," manually."],"K-a33w":["Start writing to create this page"],"K-h9cT":["Couldn't save the resolution for ",["filePath"],"."],"K0FgsP":[".ok/skills is committable so your team gets your skills; the rest of .ok/ stays on this computer."],"K0N7zS":["Config sharing status read failed"],"K1ckLX":["Failed to create folder"],"K2v7QF":["Couldn't share skills"],"K6MQQk":["Sync is failing. See the sync status for details."],"K6jjWB":[["packName"]," was already set up. Nothing to do."],"K6jxcj":["Add a key"],"K8-WWn":["Move between table cells"],"K9J00P":["Clone failed — connection error"],"KDuPiY":["Uploading ",["fileName"]],"KDw4GX":["Try again"],"KFdXwz":["Show panel (",["panelShortcut"],")"],"KH5bQi":["Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."],"KIIamL":["OpenKnowledge will create commits and push them to your remote automatically. If you do not want automatic commits in your git history, you should not enable auto-sync."],"KOZud0":["Build a competitor research knowledge base. Start with an overview page, then add cross-linked pages for each competitor, their products and pricing, and the sources behind every claim."],"KPW5WC":["moved template"],"KQGZuq":["Reused if it already exists, created if not."],"KRJ6xh":["No tags yet. Continue typing to create one."],"KUjOb9":["running"],"KWL_Ih":["Blog post"],"KX1MZR":["Your repositories"],"KYSocE":["Research the extinction of flightless birds"],"KYcZ6Y":["Above"],"KZLdgR":["See <0>#design-docs</0> for the latest specs."],"K_vT1F":["Upstream sync"],"KaFCD3":["Open this link in a new tab and collapse the graph."],"Kf7GG5":["Restarting the server…"],"Kgdbkt":["Switch to local-only refused"],"Kh1n4a":["<",["componentName"],"> isn't a known component. Copy the source to use it elsewhere, or delete the block."],"Khxcyu":["Terminal access isn't enabled for this project."],"Kiytqd":["Exception: skills are shared"],"KkEAud":["Create a file from the current document or folder context."],"KmydK6":["Bold"],"KnoB--":["Will be saved as <0>",["sanitized"],"</0>."],"KpOJFY":["Enable external link previews"],"Kr3VPS":["Codex will still ask until you run \\"ok init\\" in a terminal for this project."],"KsAPaB":["This branch is checked out in:"],"KszKI_":["Skill level"],"KtACeE":["Default: <0>",["0"],"</0>"],"KujtjC":["Find"],"L-rMC9":["Reset to default"],"L1BQTH":[["0"]," isn't installed yet — opening its download page."],"L1ZE3M":["Document statistics"],"L3CEC1":["this item"],"L4Cdd9":["or create a new file <0/>"],"L6Hhh6":["(root)"],"L8fKuc":["Run this in your terminal"],"L9Y9Om":["Top linked pages"],"LBwUR6":["Branch switch timed out — try opening the ",["targetNoun"]," manually."],"LCUy_N":["Session ended"],"LDuM35":["Replace current match from field"],"LE7t79":["Clone to a new folder"],"LKIPzv":[["laterEdits","plural",{"one":["Removes ","#"," newer edit on this file."],"other":["Removes ","#"," newer edits on this file."]}]],"LKOLNn":["No AI agents installed"],"LNum6A":[["minutes"]," min ago"],"LPAv9E":[["days"],"d ago"],"LQdLio":["New schema"],"LQsCPn":["Local commits are keeping this copy from updating"],"LRgZAt":[["owner"],"/",["name"]," already exists"],"LTeJuX":["Toggle Full Screen"],"LXdWeS":["Medium section heading."],"LXfNU-":["Navigation and suggestions"],"LYufDw":["Failed to enable semantic search — ",["detail"]],"LbmLyU":["Can't safely edit this tool's config"],"Lcehxn":["Save resolution"],"LdABLa":["Could not open ",["target"],". Try opening it manually."],"LdKIHS":["Draft a spec"],"LdyooL":["link"],"LeGeTf":["OpenKnowledge on GitHub"],"LhQlGR":["This project is running an older version of OpenKnowledge (v",["0"],") than this app (v",["1"],")."],"LhWYpm":["Other OK paths are tracked upstream:"],"LiAw2k":["What this changes"],"LlHqdU":["Initializing project"],"Llyqvo":["This usually means one of:"],"LpB85N":["Plain"],"LtI9AS":["Owner"],"LtSYdi":["Reveal in Finder"],"LtiJ5c":["Project skill"],"LuoJWu":[["truncatedShownCount","plural",{"one":["Showing the first item in one folder — the rest of that folder is hidden."],"other":["Showing the first ",["formattedCount"]," items in one folder — the rest of that folder is hidden."]}]],"LvdLef":["Thanks for the feedback!"],"LwMxXg":["Failed to open worktree."],"M-IF14":["Report reference"],"M1OfV9":["Next source diagnostic"],"M3ytY_":["This looks like a drive root (e.g., C:\\\\). Scaffolding here will scan an entire drive."],"M5_9s2":["Sending report"],"M5mfAe":["Add tag"],"M6mvVi":["Copy relative path"],"M9597s":["Preparing share URL..."],"MCjC9A":["Delete ",["deleteDescriptorLabel"]],"MDBJwN":["Hard to use"],"MDZSJe":["When the agent runs its scheduled work."],"MGBNwj":["Pause sync"],"MGb89P":["Insert, delete, move, copy, and indent source editor lines through CodeMirror's default keymap."],"MHrjPM":["Title"],"MJqRO6":["Your report is being sent."],"MJuO1q":["Context window:"],"MKEPCY":["Follow"],"MQIM_Y":["Couldn't copy. Select the URL above to copy it manually."],"MRZxAn":["Edited"],"MTs6g3":["Couldn't reconnect after server restart"],"MUBR8r":["Rename succeeded but the tabstrip may be out of date — refresh to resync"],"MUrVEo":["No recent projects."],"MV-Dkb":["Found ",["countDisplay"]," markdown files"],"MVxpbf":["Find and replace"],"MZSBsh":["No templates yet. Add one to give new docs in this folder a ready-made starting point."],"MZoxVx":["Failed to load tags. Press Escape and re-open to retry."],"Mb_20S":["Visual"],"Md709y":["Loading ",["fileName"]],"MdpSC1":["New skill"],"Mh_4hd":["Previous tab"],"Mj8R8K":["Couldn't install skill: ",["0"]],"MmDDWK":["Recently opened"],"MmqnGI":["No global skills yet."],"Mnavhe":[["propPanelDescriptorLabel"]," Properties"],"MqQoV-":["Describe what you want to build, start a blank file, or scaffold from a template."],"MqsbfN":["Turn on external link previews?"],"MrwYIK":["Toggle a source comment through CodeMirror."],"MsuXaI":["Hide panel (",["panelShortcut"],")"],"My0wYT":["When you hover an external link, its URL is sent to the destination site to fetch the page's preview metadata — one request per previewed link."],"My9uXI":["Updated \\"",["display"],"\\" to ",["0"]," — your previous version is in history if you need to restore it."],"MysZUL":["Connecting to ",["agentName"],"…"],"N-IonL":["How unresolved wiki-links are reported in the Problems panel, audits, and agent tools."],"N1KkEO":["Jump to last tab"],"N1YYa7":["Loading image"],"N1mdmS":["This file can't be opened in the text editor."],"N2FcBE":["Synced"],"N2S1rs":["Empty"],"N2eHWq":["Code Block"],"N3_ozB":["Hubs"],"N55YNr":["Choose whether this project's OpenKnowledge setup, including its AI-tool connections, is saved with the project so teammates get it too, or kept only on your computer."],"NEzPEh":["Create a new branch, or check out an existing one, in its own window."],"NF_Wcg":["Show skills section"],"NIWAux":["No docs registered under #",["tagDocsName"],"."],"NJyQi_":["Branch ",["shareBranch"]," no longer exists on the remote."],"NKkZXl":["Initialize and open"],"NNJsn7":["One more step: enable it in Cursor → Settings → Tools & MCP (Cursor leaves project servers off until you turn them on)."],"NOHyEE":["Retry push"],"NORKZU":["Pattern warnings: ",["summary"]],"NQ8llq":["Add item"],"NQXwDy":["Edit in config file"],"NRSLBe":[["diffMin"],"m ago"],"NSnIUP":["Two-page (even)"],"NUr4kz":["A reusable starting point for new documents in this folder."],"NYUhy5":["Subfolder name"],"NYn1cR":["Loading editor"],"NYu2Pt":["New project…"],"N_7kkF":["Read through this codebase and draft a technical spec for the most complex module: an overview, the architecture, key files, and open questions, all linked from a specs index page."],"Nay2Yr":["No agents match your search."],"NcurBF":["Pan down"],"NgZwB0":[["enabledCount"],"/",["0"]," on"],"NjrIak":["File: <0>",["fixedName"],".md</0>"],"NkXEFS":["Restore failed — document unchanged"],"NmPNJJ":["Copy code"],"Nn4GgW":["Will be created as <0>",["sanitizedName"],"</0>"],"NnQapF":["Open with AI ",["targetDisplayName"]],"NpC29w":["Create a new list item from the current list item."],"NrFwux":["Failed to save content rules — ",["0"]],"Nu4DdT":["Sync"],"Nu4oKW":["Description"],"NuH1jp":["Public repository"],"Nv3mUj":["Show advanced"],"NvOvTi":["Create in <0>",["dirDisplay"],"</0>"],"Nwbs0q":["Don't show"],"NxW-md":["Resize ",["handleKey"]],"NzFvyK":["Session ended — undo unavailable"],"NzluOx":["(optional)"],"O0Z2Xr":["Outgoing"],"O2UpM1":["Browse"],"O3oNi5":["Email"],"O4PnDd":["AI tool management is only available in the OpenKnowledge desktop app."],"O6yEPk":["Create a new OpenKnowledge project in the folder of your choice."],"O7_W_a":["Open with AI"],"O9oQJS":["Send report"],"OD0FCX":["Hidden “",["basename"],"”"],"ODGGlj":["Folder name: ",["detail"]],"OEEQKT":["Good"],"OETysD":["No hub pages yet. Hubs appear once pages accumulate inbound graph links."],"OEu_0l":["Failed to load skills: ",["0"]],"OFBmkg":["Search files, commands, projects, and AI handoff actions. With text selected in the visual editor, this chord adds a link instead."],"OJOA7Z":["⋯ ",["0"]," unchanged lines"],"OJTOUj":["Requires ",["brand"],"."],"OJeiSH":["Failed to add property"],"OLBz-_":["Mermaid diagram failed to render."],"OLIKgw":["Drag item ",["0"]," to reorder"],"ONPvOb":["Loading agent activity"],"ONgEZF":["Loading headings for ",["pageTarget"]],"OOIVJo":["Uninstalled \\"",["0"],"\\" from ",["1"]],"OPOiKn":["Content rules"],"OTF92M":["Label <0>(optional display text)</0>"],"OVjNeX":["Terminal ",["0"]],"OX2Neh":["Inline code"],"OXb_Df":["Settings content"],"OXdGnd":["Problems"],"OYnx7O":["Path cannot start with \\"/\\""],"OZJeTZ":["Skill"],"OZavHH":["everything under ",["0"],"/"],"Oawo4U":["The report service couldn't be reached."],"OcBurH":["Choose which agents appear in the agent selector. Turn one off to hide it everywhere."],"OdmsFg":["Failed to delete item"],"OeAl1e":["e.g. assets/uploads"],"OfhWJH":["Reset"],"OgyJSr":["Local only"],"OiHJdA":["Move through slash, wiki-link, tag, and path suggestions; accept or dismiss the active suggestion."],"Oj-JV8":["A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Use <0>Test connection</0> under Custom endpoint to see what went wrong."],"Okd2Xv":["Toggle underline formatting."],"OlAl5i":["Expand all"],"Oo_WWc":["No pages found"],"Oos8fo":["Copy command"],"OplnBG":["Managing AI tools is unavailable in this build."],"OuY8t9":["Open in current branch"],"OvEjsP":["Copying..."],"OxplNM":["Updated \\"",["0"],"\\": added ",["1"],", removed ",["2"]],"Oxyd5f":["Pick a name"],"OyIC0Q":["Project name"],"P-ye9o":["Could not open folder picker"],"P0HC30":["This ",["targetNoun"]," moved to <0>",["0"],"</0>. Open it there?"],"P3NS4G":["Pattern syntax error (line ",["lineNumber"],"): ",["message"]],"P3hnm0":["File too large to open"],"P47EWZ":["Could not update sidebar settings"],"P6gXB-":["Replace ",["keyName"]],"P6lAT3":["Folder target: ",["linkTitle"],". Click to open the overview."],"P8yDjG":["Name can’t be empty, \\".\\", \\"..\\", or contain / or \\\\"],"PB4upl":["Find previous match"],"PBwmDJ":["Searching by meaning"],"PBxg_E":["Not now"],"PCSkw2":["Skills"],"PGPGsL":["Add description"],"PIMM5l":["You're subscribed!"],"PKLY-1":["Opening..."],"PKjGhT":["Headings"],"PMyJ9C":["No edit session yet"],"PPFQ3o":["Installed \\"",["0"],"\\" into ",["1"]],"PQCdtv":["\\"",["docName"],"\\" doesn't exist."],"PR9FSv":["Move to the next visual-editor find result."],"PRnH8G":["of ",["0"]],"PTb1Nx":["Sync is paused. Turn it back on to resume."],"PVUn_c":["Open folder"],"PVggyD":["Frontmatter schemas"],"PYmp-0":["Import as template"],"PZtgO0":["Opening worktree"],"P_bX4O":["How to set up"],"Pck6eI":["Pick a built-in IDE palette. The dark IDE themes override the light/dark setting in Preferences."],"PdA9NZ":[["ahead"]," ahead"],"PdJZ5p":["No skills yet."],"Pgu10b":["Saved as <0>",["slug"],".md</0>"],"PgzIpb":["Move to the previous visual-editor find result."],"PhLu69":["That endpoint can't be used. Enter an https:// URL — http:// is only allowed for localhost."],"PiH3UR":["Copied!"],"PijLsG":["File name (created in .ok/schemas/)"],"PkeYXL":["Expanded graph mode"],"Pkw7J9":["This folder is empty."],"PlGC6r":["the git exclude file isn't writable"],"PpJy-V":["The endpoint didn't respond in time."],"PqYWiC":["Couldn't restart the server automatically. Try running \`ok stop all\` in a terminal, then reopen this project — or restart your computer if it persists."],"PrJYSN":["This folder isn't on GitHub yet. The link won't work until it's pushed."],"PrhzDE":["Pan up"],"Q1mtyd":["Hide sidebar"],"Q5fqMz":["Connection error — try again"],"Q6hhn8":["Preferences"],"Q7W-mC":["Same folder as current file"],"Q7cNKe":["Skills are now shared. Commit .ok/skills to share them with your team."],"Q7xfEj":["done"],"Q8A-U_":["Connected to"],"QAi7Q9":["Branch <0>",["trimmed"],"</0> already has a worktree — it'll open in its own window."],"QDZbvN":[["diffDays"],"d ago"],"QLgdT6":["any doc named ",["0"]],"QM3SBZ":["Plan (",["done"],"/",["0"],")"],"QOINDn":["empty"],"QQbwzK":["No agents available."],"QQghPu":["Install in Claude Desktop"],"QR5SP1":["created template"],"QTsvh1":["This agent needs you to sign in first — see the notice below."],"QYTOaN":["You can change this later in <0>Settings → Sync</0>."],"QYfQdv":[["displayName"]," CLI"],"QcpeeE":["Navigate to ",["docName"]],"QfFBdJ":["The template's filename (without \`.md\`)."],"Qj4RL5":["Completed:"],"QlAG4m":["Tell us more (optional)"],"QlxHAH":["Showing results for \\"",["semanticResultsLabel"],"\\""],"QqBQu1":["Label <0>(visible link text)</0>"],"Qvls7J":["Eng specs"],"Qw-7Ie":["A simple place to write, with one file per topic and a daily journal. Pick this if you just want to start writing and let the links between notes build up over time."],"QyioBP":["Move up"],"R0cyYB":[["0","plural",{"one":["#"," request blocked by the preview's security policy"],"other":["#"," requests blocked by the preview's security policy"]}]],"R0jJzV":["Paste URL, owner/repo, or search your repos"],"R3y75Z":["Edit source"],"R4OWFD":["Sections"],"R65q-K":["A real shell is off for this project. Turning it on runs commands with the full access of your macOS user account."],"R9IDFz":["Renames the folder on disk and the id agents use to invoke it."],"R9Khdg":["Auto"],"RDjuBN":["Setup"],"RDrXh4":["Configure user, project, and integration settings."],"RG4XHV":["Copy ",["0"]," prompt"],"RGCCrg":["Copy share link"],"RGkNeJ":["Initialize a starter pack"],"RJ3a8Z":["Looking for <0>",["lookingForUrl"],"</0>."],"RMQe3p":["Are you sure you want to convert this file into a template? The original file will be deleted. This action cannot be undone."],"RN62Q8":["We'll build <0>openknowledge.skill</0>, save it to <1>~/Downloads</1>, and open the Claude Desktop App for you."],"RO-yts":["Failed to disable link previews — ",["detail"]],"RSqaSd":["Project root"],"RVZJWQ":["Search projects..."],"RXEbZy":["In app"],"RXNu_r":["Shared via git with everyone working on this project."],"RY6Bq1":["Open shared ",["targetNoun"]],"R_U_A4":["Add file or folder pattern, e.g. guides/**/*"],"RaPMZv":["Keyboard shortcuts available in the editor and workspace."],"Rah7yq":["What should the AI do? (optional)"],"Rb1zMa":["No excerpt"],"RcrskJ":["Formatting looked wrong"],"RfHNf8":["Open activity panel for ",["tooltipName"]],"RfaEio":["Toggle source comment"],"RfilGt":["No rules match your filters."],"RgbKEe":["You don't have access to this repository."],"RhX_1U":["Sent to <0>",["endpointHost"],"</0> to embed your content. Stored on this machine only (in <1>~/.ok/secrets.yml</1>), never in the project."],"Rj01Fz":["Links"],"RlCInP":["Slash commands"],"RlLl3G":["Actions for ",["0"]],"RmBY0A":["No git remote"],"RnrnTe":["Already set up — ok is available in your terminal"],"RoafuO":["Send feedback"],"RobAKV":["Update the destination and optional section anchor."],"Rq1vFD":["Tree view options"],"RrAIZx":["What config sharing covers"],"Rsdhj9":["Configuration warnings"],"Rx5ReQ":["Rename ",["keyName"]],"RyIKxy":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy, and that change hasn't synced yet."],"S33tz3":["Not connected"],"S48xcO":["pending"],"S60KvX":["Delete this conversation?"],"S6l5dv":["Could not start creating a new item"],"S9Vnum":["Remove ",["patternText"]],"S9t1PI":["Fixing ",["0"],"/",["1"]],"SCoBBH":["Tag suggestions"],"SCzAbA":[["phase"]," — ",["pct"],"%"],"SF9qpO":["Share your email for followups"],"SFN6dN":["Heading 3"],"SItQRc":["How do you like OpenKnowledge?"],"SOPwPh":["Restore to this edit"],"SQWJ-i":["Restore sessions"],"STOrpI":["lint"],"STTOnz":[["keyName"]," type: complex value (nested; read-only)"],"SUOoXn":["Failed to open project."],"SVLPt5":[["formatted"]," GitHub stars"],"SXCSQd":["Copied path"],"SYfHmN":["Unpin tab"],"Sc1bKE":["Local collaboration data for \\"",["docName"],"\\" could not be cleared in time. Reload to retry."],"ScwcF2":["A project already exists at this location. Pick a different parent folder."],"SfxQX8":["Writes a project-MCP config for each selected tool."],"SgKLfA":["Not connected to GitHub."],"Sh3Qkg":["No matching branches."],"Si7mIR":["Create report"],"SiFgBx":["docs matching ",["0"]],"SiUUCS":["Next match"],"SkMZlS":["Couldn't remove <0>",["targetGitPath"],"</0>: ",["removeGitError"]],"Skr_7L":["Search worktrees"],"SlfejT":["Error"],"Sq8lf2":["Editors to install skills into"],"SrOuyg":["Document panels"],"SvBFYA":["No recent projects"],"Sxx_Zz":["Follow is on for this worktree, inherited from ",["project"],". Change it in Settings → Sync."],"T-654M":["Loading PDF"],"T0OVm7":["The default branch is protected — pushes need a pull request."],"T3Mld1":["Window"],"T3j-7o":["e.g. Switching projects while a sync was running"],"TEEPPF":["Will replace existing OpenKnowledge entry"],"TJnkyf":["ok ui responded but server.lock has no port yet"],"TKQ7K-":["Install"],"TLIO3j":["Toggle italic formatting."],"TMLAx2":["Required"],"TQJCR6":[["0","plural",{"one":["#"," result"],"other":["#"," results"]}]],"TTDXD8":["New worktree…"],"TUzThQ":["Share skills"],"T_R-Qz":["Primary"],"T_wG4n":["We couldn't check your GitHub connection."],"Ta25TG":["No history yet"],"TbjyhA":["Docs"],"TdfEV7":["Archived"],"TdlVEN":["This field carries additional schema keywords the editor does not show — they are preserved on save."],"Te6sK2":["Heads up: editing any rule or option here creates a <0>.markdownlint.json</0> file in your project to save your changes."],"ThmUrC":["Could not finalize project setup. Try again."],"Tjc1pH":["Section <0>(optional heading anchor)</0>"],"TsZmgr":["The file on disk, and the id agents use."],"TvY_XA":["Documentation"],"TwYboS":["Navigate CodeMirror source search results or dismiss the search panel."],"Tz0i8g":["Settings"],"Tz4dq-":["This request is no longer active."],"Tz9pJB":["Clone stream ended unexpectedly — check if the clone completed"],"U0QBh4":["Not great"],"U2Kx6T":["Close all unpinned"],"U2pMtf":["tag-name"],"U3IvM5":["Full guide"],"U4nTfu":["Enable Follow"],"U5Spo9":["Content directory must be inside the project"],"U6wmNc":["Sync paused"],"U7HJ4y":["Managed by OpenKnowledge (read-only)"],"U88xbi":["Failed to create the schema file"],"U8CD-l":["Copy full path, No workspace"],"U9tm58":["Hide problem indicators"],"UBv8UK":["Delete Permanently"],"UDFrWm":["Checking GitHub connection..."],"UGeJuP":["Allowed values (empty = any)"],"UL8A9w":["Tag"],"ULRb5t":["Adds telemetry, server state, and runtime info when available. Document names are anonymized."],"UMrOy2":["Skill \\"",["trimmedName"],"\\" created"],"UPjaXD":["Couldn't duplicate \\"",["0"],"\\": ",["1"]],"UQAp48":["Search templates"],"UQMMvx":["Moved \\"",["name"],"\\" to ",["0"]],"URmyfc":["Details"],"UTNVyS":["Select the full source document."],"UTZ97u":["Selection must be inside the project"],"UTgWxm":["Nothing was uploaded. The report stays on this Mac until you email it to us."],"UVDasf":["Sync is off — your edits stay on this computer until you commit and push manually."],"UVLlMV":["Couldn't reach GitHub. Try again?"],"UW2Fg3":["This project's running server doesn't support live editing. Restart OpenKnowledge to fix."],"UW93oq":["Replace key"],"UYcGIW":["Connecting — waiting for collab server"],"Ua78MH":["no response"],"UaDyeb":["Hide selection preview"],"Uay5NL":["This ",["targetNoun"]," was added to branch <0>",["shareBranch"],"</0> recently. Switch and update to open it."],"Uci-Ph":["Ordered List"],"Ud0Pj9":["<0>Mirror source removed.</0> The doc <1>",["src"],"</1> is no longer available."],"UfW9Kr":["Your search queries and the full text of matching pages are sent to your embeddings provider (OpenAI by default) to compute embeddings."],"UhpfxY":["Pan left"],"UkQGhd":["Hide replace"],"Up2_7p":["Copy full path"],"UpCz01":["This doc"],"UuYo7g":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy. Please commit your changes or enable auto-sync."],"Uuj_R4":["New from template"],"Uw6ERJ":["Couldn't copy: ",["detail"]],"UyROxs":[["mins","plural",{"one":["#"," min ago"],"other":["#"," min ago"]}]],"V2Gmie":["These rules come from your project's <0>",["configFile"],"</0> file, which fully governs linting for this project. Turn rules on or off and edit their options here; changes write back to the file."],"V48OUT":["You deleted <0>",["filePath"],"</0> locally, but it was modified upstream."],"V7QxyT":["Connection dropped"],"VAHWL_":["Connected as <0>@",["signedInLogin"],"</0>"],"VBE2dw":["Build and keep track of the world behind your story. A home for your characters, places, factions, and the lore that ties them together, so details stay consistent as you write."],"VFQXPl":["External link previews show a card with the site name, page title, and description when you hover a link."],"VITWk5":["Managed by OpenKnowledge"],"VIwCaD":["Entry"],"VM7H66":["This file is binary and can't be shown as text."],"VNgKZz":["Advanced settings"],"VTulZj":["Open in worktree"],"VUijjF":["Embed an image with optional alt text."],"VYd_YA":["Open an existing project folder from disk."],"VZGh8G":["Fold, unfold, fold all, or unfold all source ranges."],"VZSBXL":["Semantic ranking activates the first time an agent runs a search."],"V_6bJ4":["Terminal settings not loaded yet — try again in a moment."],"V_wltx":["Enter a title for this template."],"Va3xJe":["Add field"],"VbqhBI":["Already at ",["assetContentPath"]," — reusing."],"VcqWBy":["Upload may have succeeded but the sidebar is out of date — refresh to resync"],"VdXv4D":["Clone from GitHub"],"Vftef5":["Common markdown issues — hard tabs, heading increments, list markers, and more."],"Vlc75q":["Keep file deleted"],"VsaI0G":[["folderCount","plural",{"one":["folder"],"other":["folders"]}]],"VuxVSP":["Start source completion"],"VvS_k_":["Config sharing is now local-only."],"VxO6wR":["Delete selected files or folders"],"VzGJRl":["Add link"],"W-ntoW":["heading-slug"],"W0i24j":["Object"],"W1SI2K":[["0","plural",{"one":["#"," warning"],"other":["#"," warnings"]}]],"W1qRuM":["This document is already active in the editor. Use Open to collapse the graph."],"W5A0Ly":["An unexpected error occurred."],"W7XJN4":["Can't nest projects. An OpenKnowledge project already exists at <0>",["rootPath"],"</0>. Choose a location outside it, or open that project instead."],"W8vpBM":["starter pack"],"W9_Bub":["Local changes overlap with incoming sync"],"WFEbV1":["Flag common markdown issues in the editor. Powered by <0>markdownlint<1/></0>."],"WHPvOb":["All files are hidden by view filters."],"WJjviG":["What to include"],"WL6puM":["Path resolves outside project"],"WMCwmR":["Check for updates"],"WMIKXK":["Are you sure you want to delete ",["targetCount"]," selected items? Folders and all files inside them will be deleted. This action cannot be undone."],"WPwDin":["Open folder on disk"],"WR0y2O":["Share folder"],"WRNXKp":["Searching"],"WRdYfS":["Refresh audit"],"WWcqsG":["Start here: what this is and how it's organized."],"WZ-vBy":["Permanently deletes <0>",["targetGitPath"],"</0> and all its git history. Working files stay in place. If the parent git repo is intentional (e.g. you cloned it), cancel and pick a location outside it."],"Waiy-j":["The agent's persona, values, and voice."],"WamGNs":["Failed to load PDF: ",["error"]],"WcWS__":["Download file"],"Wcv-Zi":["Make this knowledge base available as a Claude Skill."],"We7h2I":["📝 or assets/icon.png"],"Weq9zb":["General"],"Wfy3rU":["Agent settings"],"Wgmlsw":["Fetching"],"Wh0im4":["editing [[",["realCurrentDoc"],"]]"],"WhOsNE":["Strikethrough"],"Wi-VWy":["Couldn't send the report"],"WkTLN7":["Show only markdown files"],"WmPbvm":["Get product updates in your inbox."],"Wq6Wcm":["Please enter a valid email address."],"WqLq6M":["Open with AI ",["displayName"]],"Wtw22s":["Installing"],"WuntOK":["Preview of the screenshot"],"WyQxwa":["Connect this project to GitHub to share."],"WyXG7w":["Close all"],"Wyxs0x":["Path cannot contain \\"..\\""],"X0ttSN":["No tags match \\"",["tagListQuery"],"\\"."],"X7u0xR":[["0"]," templates available"],"X8kjQX":["Re-authenticate with GitHub"],"X9VpsP":["Loading folder contents"],"XAyxsa":["Check out remote branch"],"XDzAnp":["Opens in a new tab"],"XH30C4":["document"],"XJOV1Y":["Activity"],"XNBGZw":["Message not sent: ",["0"]],"XPJ0sN":[["settingsDescriptorLabel"]," properties"],"XPqe3B":["Create new tag #",["tagValue"]],"XQkJlB":["No open conversations. Reopen a past one, or start a session with the + button."],"XRuL0i":["Create page"],"XT-L4j":["Turn on an agent to create with AI"],"XU0OXn":["Enable auto-sync"],"XU5AOg":["Input"],"XV5sC0":["Open worktree"],"XW18jo":["Page headings response did not match success schema"],"XYlJJT":["Setting up"],"XZkdtg":["Switch branch"],"XcGbim":["Show hidden files"],"Xet9MX":["Failed to load backlinks"],"Xewl6B":["Your local copy is behind. Pull the latest changes, then open the link again."],"XfzqjK":["template \\"",["name"],"\\""],"Xg-Ntj":["The token needs the repo and read:user scopes."],"Xisk4u":["Edited ",["editedAgo"]],"Xk0-VC":["Previews of links to other documents in this project are always on and read from the local index — nothing leaves your computer for those."],"XklovM":["Working…"],"Xl-UUg":["guides/install or https://example.com"],"XmJfZT":["name"],"XnlF3W":["Add the next matching source selection."],"XopE_I":["Failed to parse backlinks error response (HTTP ",["status"],")"],"Xp7Kq4":["Another sync operation is in progress. Try again in a moment."],"XpIZmv":["Fenced code block with monospace text."],"XqNHcm":["Couldn't update skill targets: ",["0"]],"XtRoxT":["Page ",["pageNumber"]],"XuQzrk":["Couldn't restart the server — another process owns it. Quit other OpenKnowledge windows for this project, then try again."],"Xv_ijG":["https://github.com/owner/repo or owner/repo"],"Xw_maT":["Type a query, then press ↵ to search your pages by meaning."],"Xwump4":["no git repository here"],"XyOUTJ":["Exit merge"],"Xzy0s0":["Remove ",["fullLabel"]," from context"],"Y-Urt2":["Block math equation rendered with KaTeX from a LaTeX source string."],"Y1QMlM":["Get set up"],"Y1kX2z":["OpenKnowledge initializes at <0>",["projectDir"],"</0> — the parent of <1>",["pickedRelative"],"</1> because it contains a <2>.git</2> folder (one .ok/ per git repo). <3>Content directory</3> defaults to <4>.</4> (the whole repo); type a sub-folder to narrow it."],"Y2tU6I":["Delete ",["0"]],"Y6PKd1":["Remove ",["name"]," from recent projects"],"Y6SK9K":["Show source"],"Y8ViJx":["A newer version may have been deployed since this tab opened."],"YBt9YP":["Beta"],"YC6_wP":["Edit ",["keyName"]],"YDL7N6":["Lint plugins — which rule families run and their per-rule settings — are configured on their own tab under This project → Plugins."],"YEIS9T":["Edits apply live. Light or dark is chosen from the background."],"YEP3X2":["Delete a table when the active table cell selection covers the full table."],"YGIi_c":["Reinstall"],"YGNRB5":["— except"],"YJ1BTp":["A skill with that name already exists."],"YJPN3F":["Too slow"],"YKLP_-":["Template renamed"],"YLMBSd":["e.g. The editor froze after I pasted a large table"],"YPFBfr":[["detail"]," - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"YRavYS":["A personal color-theme picker — not shared with your project. When on, it appears under Plugins in the sidebar."],"YSFv5w":["No git repository — config sharing does not apply here."],"YTLmTM":["Remove the parent <0>.git</0> folder"],"YW7Q86":["Search settings not yet loaded — try again in a moment"],"Y_GpJd":["The ",["0"]," download request timed out."],"Y_ZQ6l":["Installing ",["agentName"],"…"],"Y_kL7X":["Customize how the editor looks and behaves."],"YaeyFh":["Pulls may overwrite uncommitted edits in your local files."],"Yea-K5":["Restore to this point"],"Yi0VMG":["Upload ",["keyName"]],"YjMLg2":["Off — external links show only their URL. No requests leave this computer."],"YjhKI5":["Cloning..."],"YlDuro":["Fit height"],"YsEYYS":[["behind","plural",{"one":["#"," commit behind"],"other":["#"," commits behind"]}]],"YwPUUP":["This pack is already set up here."],"YyXtnN":["Underline"],"Z1LF1M":["Sharing a doc needs a GitHub repository. Create one for this project."],"Z2M5XM":["Reason: ",["reason"]," (",["osDetail"],")"],"Z3FXyt":["Loading..."],"Z5h97D":["Hide files and folders from your knowledge base. Hidden items don’t appear in the file tree, search, or AI tools. <0>Learn more about patterns</0>."],"Z6rrjc":["No <0>.markdownlint.*</0> file yet — every rule runs on the same defaults as the VS Code markdownlint extension: all on, except line length."],"Z79bnE":["View diff for edit ",["burstNumber"]," of ",["docName"]],"Z7x_Zh":["Git needs ",["tool"]," for this repository, but it isn't installed or couldn't be found. Install it, then try again."],"Z8KDox":["Enter a folder name (e.g. brain)."],"Z8lGw6":["Share"],"ZARuZJ":["Couldn't load files"],"ZBt4rI":["Instruction for the AI"],"ZBxvV3":["New Terminal"],"ZI8uvA":["No problems found."],"ZNK2Tq":["root"],"ZQJ1IV":["Activate the last editor tab."],"ZQLDTl":["created folder"],"ZU8VV_":["Remove failed: ",["error"]],"ZVOhXM":["Failed to update sync — ",["detail"]],"ZW3mlR":["Diff render mode"],"ZWgr0b":["In a subfolder"],"ZWolSV":["You picked the filesystem root (/). Scaffolding here will scan every file on this machine — make sure that's what you want."],"ZWwYwM":["Base branch"],"ZWxfrc":["cleared folder properties"],"ZWyHmq":["This project"],"ZYtq3m":["Connect the AI tools you use to this specific project. These files live in the project folder, so anyone who opens it gets the same setup."],"ZatAO_":["Failed to enable link previews — ",["detail"]],"Zf0w-R":["Take a piece of writing from a rough idea to a finished draft to something you're ready to share. Good for blog posts, essays, or anything you want to move through clear stages."],"ZgGuA4":[["0","plural",{"one":["File"],"other":["Files"]}]],"ZgJVnp":["Check spelling while typing"],"Zhe80e":["Restore to edit ",["burstNumber"]," of ",["docName"]],"ZhhOwV":["Quote"],"ZjtgI-":["Command palette"],"ZoOlzR":["App & system info and recent app logs. No project is open, so project logs aren't included."],"Zon_qG":["Mirror source <0>",["label"],"</0>"],"ZptNUh":["Show ",["hidden"]," more"],"ZsGpr_":["Paste link"],"Zue_jx":["Your GitHub token is missing required scopes. Try signing in again."],"Zul8Ry":["never"],"ZvzbDF":["Add it directly to this project."],"ZxXhLY":["Hide Files (",["sidebarShortcut"],")"],"Zz25kq":["Show Files (",["sidebarShortcut"],")"],"_0JUKX":["Bug reporting needs the OpenKnowledge desktop app."],"_5qBNl":["AI tools & CLI"],"_6FVBz":["Jump to tab 1-8"],"_7UQ7y":["Whole word"],"_8quCH":["From template"],"_902BE":["This ",["targetNoun"]," was shared from branch <0>",["shareBranch"],"</0>. You're currently on <1>",["currentLabel"],"</1>."],"_FLBbi":[["sizeText"]," · secrets redacted · crash dump not redacted"],"_GRWOJ":["Change the embeddings provider?"],"_IGfXZ":["OpenKnowledge quit unexpectedly last time."],"_IX_7x":["Other"],"_JOGC0":["Send feedback…"],"_LczaQ":["Denied — ",["optionName"]],"_NWEid":["Search schema files by path"],"_NX6gG":["Managing project AI tools is unavailable in this build."],"_PACVa":["Release notes"],"_PBJRl":["Add at least one letter or number."],"_Pmhxt":["… earlier output trimmed"],"_QwkMu":["No matching paths"],"_RcqUM":["You picked your home directory. OpenKnowledge will index everything in your home tree — large and may surface personal files."],"_SDGzH":["Continue in browser"],"_TDESN":["Network error - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"_TF8ep":["Failed to render PDF"],"_W-elG":["(inline)"],"_WPP7e":["Read-only copy of a MirrorSource block from another doc. Edit at the source and it updates live."],"_XWY2J":["Terminal disabled"],"_ayOfA":["A knowledge base that follows Google's Open Knowledge Format, a shared way of organizing what you know. Pick this if you want your notes to work well with other tools that understand the format."],"_azghp":["Previous change"],"_bth6g":["Claude Code is installed, but OpenKnowledge tools aren't connected to it yet."],"_eguJc":["Uploading"],"_gO_m8":["Waiting for your approval"],"_gkGSK":["deleted template"],"_hPpdX":["Skill renamed"],"_pY_Vq":["The repository was moved, renamed, or deleted."],"_qD6mn":["Pick the folder where you've cloned it."],"_rP3HI":[["minutes"],"m ago"],"_tekeB":["updated folder properties"],"_tjopj":["Paste duplicate"],"_yB-24":["everything under any ",["0"],"/ folder"],"a-cKXz":["Select all source"],"a3H_MR":["Open and focus the Ask AI composer for the current editor selection."],"a45f2c":["Glob patterns this schema applies to"],"a4FRQv":["Undo to this edit?"],"a5Gha5":["Local changes blocked the merge"],"a5W0q0":["Are you sure you want to delete ",["folderName"],"/ and all files inside? This action cannot be undone."],"a7P3nH":["Personal to this device — stored in your user config, not shared."],"a9OzSn":["No pages found for \\"",["trimmedQuery"],"\\""],"aBgwis":["Scope"],"aByJ8j":["How does sharing work?"],"aCoQfY":["New changes from your remote appear in your copy automatically."],"aE2_XM":["One pattern per line — appended to <0>.okignore</0>."],"aENGMB":["Semantic search adds meaning-based ranking to the search tool so conceptually-related pages surface even without shared keywords."],"aHPdYV":["Go to line ",["displayLine"]],"aM23Wr":["page-name"],"aOp3hw":["Couldn't move to Trash"],"aQD_86":["Failed to update the embeddings provider — ",["detail"]],"aRI3Om":["Close Window"],"aWlJai":["Starting sign-in flow"],"a_u4ck":["Loading tags"],"aaE55D":["Clear ",["keyName"]],"aaI6cN":["Couldn't connect to the agent service. Make sure the OpenKnowledge server is running and up to date (restart it if it was already running), then try again."],"aalx4E":["Editing broken MDX source: ",["reason"]],"abiHje":["Delete selected items"],"adsMWO":["Resolving deltas"],"aiArms":["We couldn't clone this repository."],"ajHi4O":["Auto-sync is paused — you don't have permission to push to this repo. Switch to Follow to keep receiving updates."],"ajz9F8":["Couldn't load conflict content for ",["filePath"],". Try reloading the page."],"ak4LLg":["Clear menu"],"anmUZq":["Missing a feature"],"aoa6xA":["network error (is \`ok ui\` running?)"],"arUUsK":["Product updates"],"ax9kie":["Link preview settings not yet loaded — try again in a moment"],"az8lvo":["Off"],"b18t0_":["Close diff"],"b3Thhd":["Upload failed"],"b4AQFK":["Open activity panel for ",["tooltipName"],", editing ",["realCurrentDoc"]],"b4VvP-":["Existing branch <0>",["trimmed"],"</0> will be checked out into its own window, under <1>.ok/worktrees/</1>."],"b4itZn":["Working"],"b5aNbi":["The ",["targetNoun"]," could not be opened — try navigating to it manually."],"b6Fgpe":["Each pack scaffolds your project with ready-made folders and templates."],"bBE5tC":["Detected on this machine"],"bBcFK_":["Open emoji picker for ",["keyName"]],"bD8I7O":["Complete"],"bF22t6":["Remove field ",["field"]],"bGa3Fk":["Uploading file"],"bH382I":["Edit this HTML — the preview updates live."],"bSD4im":["Search worktrees and branches"],"bS_boY":["Replace current match"],"bUUVED":["Asset"],"bV6DJA":["Who you are, so the agent has your context."],"bWLmRK":["Could not fetch branch. Check your connection."],"ba3vIW":[["templateCount","plural",{"one":["template"],"other":["templates"]}]],"bbJ-VR":["Zoom Out"],"bcDHUM":[["descriptorLabel"]," — render error, source editable below"],"bcjYUA":["Fold or unfold source"],"bkQRMh":["Paragraph"],"blFttG":["Search projects"],"bmC18N":["Clearing local collaboration data for \\"",["docName"],"\\" before reconnecting."],"brCtGB":["History unavailable"],"bultyE":["When enabled, the agent opens or refreshes the preview after each edit. Disable if you manage your own preview window (OK Desktop, a browser tab on another display, etc.)."],"bwil08":["Building <0>openknowledge.skill</0> and opening the Claude Desktop App"],"c1LZZH":["Link copied."],"c3XJ18":["Help"],"c3ZGrq":["the doc ",["0"]],"c4fVUV":["Fix"],"c5PTFE":["Dev instance: ",["label"]," (isolated from other worktrees)"],"c5f7sm":["Code block language: ",["currentLabel"],". Click to change."],"c5rF4v":["What is this knowledge base for?"],"c863eW":["Could not switch to ",["shareBranch"],". Try switching manually."],"c8iK2Y":["No templates found."],"c8jBgX":["Checking for updates on GitHub"],"cCd8Bs":["Cut"],"cD3aew":["Re-embedding happens as searches run, so coverage restarts at zero and refills."],"cEoyWz":["Add item to ",["keyName"]],"cF9DyA":["Reconnecting after server restart"],"cFCKYZ":["Deny"],"cGV6Mh":["Show a preview card when you hover an external link in the editor. This setting applies only to this computer."],"cHhH3i":["a required git tool"],"cIptmH":["In the Claude Desktop App"],"cKjLuT":["(project + user)"],"cN1Gcp":["A worktree folder for ",["shareBranch"]," already exists."],"cOJyVj":["Disable Themes"],"cOSAfL":["No repositories found on your GitHub account."],"cOrTMo":["Your share link is ready below."],"cRHuuI":["Couldn't copy path"],"cRm498":["No schema files in this project yet — create one to start validating."],"cSCbv3":["BETA"],"cUK8lW":[["conflictCount","plural",{"one":["#"," conflict"],"other":["#"," conflicts"]}]],"cUk6TF":["Sync failed — check the server logs for details."],"cV7LOw":["Team Wiki"],"cZGNlb":["Add another pattern"],"cZI5AL":["OK Desktop"],"cZ_8zB":["Stays on this computer."],"caw8gO":[["strandedCommitCount","plural",{"one":["You have 1 change you haven't shared. It will stay on this computer."],"other":["You have ","#"," changes you haven't shared. They will stay on this computer."]}]],"ccNps_":["Only modified"],"cd5EXh":["Report a bug"],"cdm00A":["No Incoming"],"cdmk8A":["Uncommitted changes"],"cgl-gn":["Connected to GitHub"],"chL5IG":["Community"],"cklVjM":["Timeline"],"cn1sLi":["Couldn't connect OpenKnowledge tools to Claude Code. Please try again."],"cnGeoo":["Delete"],"cqQyPB":["Folder name"],"crqzW5":["AI tools"],"cs4mps":["Config sharing"],"csDS2L":["Available"],"cstC0z":["Pattern (regex)"],"ct2kv5":["No headings in ",["pageTarget"]],"cuA8QW":["Organize specs"],"d1JjXo":["Your local copy of branch <0>",["branch"],"</0> is behind. Pull the latest changes, then open the link again."],"d2uTPx":["Server error (HTTP ",["status"],")"],"d5rK4X":[["chars","plural",{"one":["char"],"other":["chars"]}]],"dCIGNG":["Border"],"dD7NPy":["Outline"],"dDpCOp":["Rename succeeded but the sidebar may be out of date — refresh to resync"],"dEgA5A":["Cancel"],"dGAdpH":["New branch <0>",["trimmed"],"</0> will be created from <1>",["currentBaseLabel"],"</1>, in its own worktree under <2>.ok/worktrees/</2>."],"dIYSqk":["remote"],"dJw2_7":["Saved with the project for your team."],"dMsx3p":["Home page and navigation hub."],"dNM58w":["Claude Code (claude) isn't installed or on your PATH."],"dOHMA0":["Failed to move"],"dOxPd4":["Footnote"],"dPOFid":["Show or hide terminal"],"dQHSCs":["Convert (delete original)"],"dTaauv":["Reason: ",["reason"]],"dUCQo4":["Renamed to \\"",["trimmed"],"\\""],"dUQ7_J":["Add meaning-based ranking to search so conceptually-related pages surface even when they share no keywords. This setting applies only to this computer."],"dURmlQ":["\\"frontmatter\\" is a reserved property name"],"dVaXnv":["Content rules not yet loaded — try again in a moment"],"dXCi3J":["Something broke"],"dXOolp":["Syncing your changes"],"dXWMFn":["Removes this skill from your editors."],"dYCvMf":["Couldn't resume this conversation: ",["0"]],"darW93":[["pageCount","plural",{"one":["The full text of your 1 page will be sent to <0>",["host"],"</0> as it is re-embedded."],"other":["The full text of all ",["pageCount"]," pages will be sent to <1>",["host"],"</1> as they are re-embedded."]}]],"dbapvC":["Follow us on social media"],"dbhUX1":["Hide this file"],"dbtjJh":["(opens in new tab)"],"djc1l9":["More than ",["0"]," requests were blocked by the preview's security policy"],"djjdjr":[["deleteCount","plural",{"one":["Delete"],"other":["Delete ","#"," items"]}]],"dprWmL":["Anchor in this page"],"dr1vFs":["Replace all matches"],"dw_3cv":["Rename skill"],"dw_dUJ":["Failed to duplicate path"],"dx-TwN":["Running project audit"],"e0NrBM":["Project"],"e1Rn_k":["Open containing folder"],"e1hptq":["Embed a video with native player controls."],"e2zZ3E":["Test connection"],"e4FxjG":["See all ",["0"]," starter packs"],"e4GHWP":["Pull"],"e4PbgC":["Duplicate the file-tree item copied from the Files sidebar."],"e60wew":["Allowed element values for ",["field"]],"e8L17t":["A non-empty folder already exists at this path. Pick a different folder."],"e8zRrb":["Show Files"],"e8zYa8":["Could not open ",["shareBranch"]," in a worktree. Try again."],"e9sHSO":["Pick up where you left off"],"eBIT9h":["Paste failed.",["restoreSuffix"]],"eFJkVt":["Clone failed: ",["cloneError"]],"eG8Jsg":["Toggle source tab focus mode"],"eGUbmF":["Copy selected file or folder"],"eJitUk":["Upload from computer"],"eKThTQ":["Failed to reorder"],"eNQGRb":["Inline LaTeX math rendered with KaTeX."],"ePK91l":["Edit"],"eQkgKV":["Installed"],"eQxm13":["Failed to update attachment location — ",["detail"]],"eTL5y9":["Show selection preview"],"eTsJYJ":["description"],"eVPynQ":["Open <0><1>",["verificationUri"],"</1><2/></0> and enter this code:"],"el312q":["Install skills into"],"emgiet":["Authoritative content; mirrored verbatim everywhere it's referenced."],"enPTnx":["line ",["displayLine"]],"eneWvv":["Draft"],"epuNYK":["Mark a block as the source of truth. Mirrors elsewhere update live as you edit it."],"euc6Ns":["Duplicate"],"evHlIg":["Follow never pushes or commits your local changes. They stay only on this machine."],"evs0iw":["Tags matching \\"",["tagListQuery"],"\\""],"ezUmoU":["Allowed element values (empty = any)"],"f1XQyZ":["Move block"],"f3Nvg7":[["0"]," can't continue this conversation — the transcript is kept, but the agent session is gone."],"f65AOQ":["Start from"],"f8jU-L":[["0"],"/",["1"]," — ",["2"]],"f9lQNJ":["Adds a managed block to"],"fBHvBn":["There's no project folder for this window, so a terminal can't start here."],"fG0X0e":["Install ",["brand"]," →"],"fIgqfQ":["Reinstalling"],"fJ3EbT":["Themes"],"fJgQHX":["Failed to create file"],"fNr-MX":["Disable semantic search"],"fR-Kdc":["(project-level only)"],"fSRzLo":["Show document panel"],"fVcm9t":[["0","plural",{"one":["#"," doc"],"other":["#"," docs"]}]],"fWi7pn":["Initialize starter pack"],"fWsBTs":["Something went wrong. Please try again."],"fYKgzG":["Failed to load recent projects."],"fYjgXu":["Unordered list of items."],"fZj9em":["Fix ",["flatId"]],"f_PkYv":["Restarting closes this project's server. Connected agents (Claude Code, Codex, Cursor) will see their OpenKnowledge MCP connection close unexpectedly — you may need to restart the agent, or toggle its OpenKnowledge MCP server off and on, to reconnect."],"fbdLmk":["Toggle bold formatting."],"fbsiBw":["Something went wrong starting the terminal."],"fcgvCA":["Claude"],"fevEu0":["Pull latest changes"],"fiMNLl":["Sync settings not yet loaded — try again in a moment"],"fj5YiP":["Downloads a fresh copy from GitHub."],"fnlBN4":["Auto-approve settings not yet loaded — try again in a moment"],"fo0VXg":["Uninstall"],"fqSfXY":["Replace"],"fru3T7":["Could not fix ",["0"]," of ",["1"]," files."],"ft-BOm":["Report a bug…"],"fuJZKk":["Search branches"],"fwhX-N":["Indent or outdent source"],"fwrPh4":["Please enter a valid email."],"fxJk_6":["<0>Have more to add?</0> Write to <1/> and mention your reference."],"fxbCNQ":["Synced. The link is up to date."],"g2Tj8R":["Full"],"g3UF2V":["Accept"],"g4WlQK":["Project AI tool management is only available in the OpenKnowledge desktop app."],"g4XBm0":["Small section heading."],"g4e0hS":["Ask ",["agentName"]],"g58Kwy":["<",["descriptorLabel"],"> failed to render (likely a bad prop). Copy the source to see what went wrong, or delete the block."],"g85bAo":["Synced ",["lastSyncedRelative"]],"gBbxn_":["Checking sign-in status"],"gGVP4q":["Click <0>+</0> <1/> <2>Create skill</2> <3/> <4>Upload skill</4>."],"gHSAWT":["Create worktree <0>“<1>",["typedName"],"</1>”</0>"],"gITz7o":["Move the cursor or extend selection through CodeMirror's standard source-editor navigation keymap."],"gJR87V":["Could not create the project folder. Pick a different folder."],"gKi-a_":["New project"],"gOD68k":["Open a single markdown file — no project setup."],"gQV-9w":["Branch switched but the ",["targetNoun"]," could not be opened — try navigating to it manually."],"gUlRQj":["Orphans"],"gYz2ep":["Expires in ",["timeLabel"]],"gZElfU":["Fixing ",["0"]," of ",["1"]," files"],"gbHcbI":["Failed to delete property"],"geIbmI":["Reset ",["file"]," to default"],"gfdqcY":["Couldn't apply the change: ",["0"]],"gfohmY":["Connect tools"],"ggm6JX":["This page doesn't exist yet. Open it to create the page in the editor and collapse the graph."],"ggs9f8":["Search files, folders, or commands"],"gh27t1":["Link previews"],"gijbne":["Failed to rename path"],"gk_-qj":["Couldn't rename template: ",["0"]],"glG1TR":["Pulling the latest changes"],"gljvbT":[["words","plural",{"one":["word"],"other":["words"]}]],"glzsS_":["Pan right"],"gmJ0An":["Failed to open folder."],"goO4Ll":["Editor status bar"],"gp3I7-":["Before syncing, set your identity for git commits:"],"gtEbeW":["Highlight"],"gtGQ9S":["Start ",["agentName"],", ",["hint"]],"gvApb7":["Turn the things you read into clear, trusted articles. Save a source, figure out what it means, then keep the final version so you can rely on it later."],"gwEcOD":["Your local copy is behind."],"gwykHF":["This doc hasn't synced to GitHub yet. The link will work after the next sync."],"h-AdvS":["The folders and templates are already here, so there's nothing to add."],"h06R3C":["No pages are missing outgoing graph links."],"h16FyT":["Lists"],"h3QZcB":["A branch named ",["shareBranch"]," already exists. Open its worktree from the switcher instead."],"h7FzJC":["Link-graph response did not match expected shape."],"h9QFb9":["Skill \\"",["0"],"\\" deleted"],"hBMK4W":["Project templates"],"hCOLSd":["Keep a written record of how your product gets built. A home for proposing ideas, recording decisions, writing specs, and capturing what you learned after something broke."],"hDEaQu":["Connect OpenKnowledge to other tools you use."],"hDKtoF":[["diffHrs"],"h ago"],"hDoLrm":["Remove ",["projectName"]," from recent projects"],"hGmuTc":["Docs tagged #",["tagDocsName"]],"hHMv6l":["Delete block"],"hItdtk":["Browse folder"],"hLKfZe":["Use a token instead"],"hLod4_":["Convert to template"],"hLy8b1":["Updated to Version ",["version"]],"hQXiDc":["Search branches..."],"hSBIG-":["A title, description, tags — anything that describes this folder."],"hSySVc":["Install handoff failed: ",["msg"]],"hXUWyd":["Value is required"],"hXbSxc":["Asset: ",["title"]],"hY8pka":["Select next occurrence"],"hYDc6B":["Name cannot be empty"],"hYgDIe":["Create"],"hZoBHK":["Empty starting content"],"haHgQj":["Copied relative path"],"habOU_":["Failed to update the auto-approve setting — ",["detail"]],"he3ygx":["Copy"],"hgtsat":["Failed to delete ",["file"]],"hh4mVC":["Ask AI to fix ",["flatId"]],"hjO0Mq":["Add tab"],"hmYd9H":["Keep track of the people and companies you work with and the meetings you have with them. Good for remembering who someone is, how you know them, and what you last talked about."],"hnq8fP":["Remove ",["label"]," from context"],"hpDtUm":["External wiki link"],"hpzRlK":["Reopen closed tab"],"hvZwVx":["Convert"],"hwFOFD":["Settings failed to load"],"hxBHxQ":["A line with a footnote<0><1>[1]</1></0> and a definition shown below."],"hxEUVJ":["Initialize ",["selectedPackName"]],"hxYFzm":["Full sync — your commits push and remote changes pull automatically."],"hyCxJY":["Open that worktree instead"],"hynz2K":["Download started"],"i-ShMB":["Diagram"],"i09An-":["Restored an earlier version (",["0"],")"],"i1flq_":["Wiki link suggestions"],"i3f2kh":["No matching commands."],"i6ng22":["Switch to Follow"],"i92eAT":["We'll create a repository and start syncing — no terminal needed."],"i9OyGp":["Undo or redo"],"i9TPUi":["This ",["targetNoun"]," isn't on branch <0>",["branch"],"</0>. It may not have been pushed yet."],"i9toLO":["Agent configuration file"],"iAoh55":["Update \\"",["0"],"\\"?"],"iDZtvM":["Failed to load templates: ",["message"]],"iEQQyu":["Agent"],"iEYxO4":["Show thumbnails"],"iGCs04":["No templates available"],"iH8pgl":["Back"],"iHAJDj":["Resolving default location"],"iIaSUD":["Whitespace"],"iKSP5j":["Word wrap"],"iKZkk1":["Property value"],"iMYFJM":["This window can't store a token — open Settings from the main app window."],"iMkWoF":["Turn on"],"iO8V-7":["Create worktree"],"iOHg1t":["Open embedded URL in new tab"],"iRdfLr":["Dev instance: ",["label"]],"iSLIjg":["Connect"],"iSQTsg":["Ordered list"],"iSnkwB":["Failed to open cloned project."],"iTylMl":["Templates"],"iXTp5j":["Scope: "],"idD8Ev":["Saved"],"idni-S":["Values for ",["keyName"]],"ig5vUe":["Failed to load file"],"ii5mVn":["Report this error"],"iilQXA":["Folder duplicated"],"ijLc3m":["Bullet list"],"ilodsp":["Let agents use OpenKnowledge without asking"],"ioMn4Z":["New from Template…"],"ipn17C":["The <0>type</0> every document created from this template gets (e.g. <1>research-note</1>). Keeps new docs Open Knowledge Format–conformant."],"iqIDv4":["Sync status unavailable"],"iqugog":["Initialize failed: ",["errorDetail"]],"irFGwu":["Template list"],"irrm_E":["Remove selection"],"isRobC":["New"],"itxlnr":["Setup files include: <0>.ok/</0>, AI-tool MCP configs (<1>.mcp.json</1> and per-tool files), project skills.<2/><3>Shared</3> commits them to git, so anyone who clones the repo gets the same setup. <4/><5>Local only</5> keeps them out of git (via <6>.git/info/exclude</6>)."],"iuTKci":["No edits yet."],"iv452l":["Documentation for ",["0"]," (opens in browser)"],"iy64Li":["Full sync — your edits are committed and pushed to your remote automatically."],"iycx_A":["Pushing"],"j5CWO4":["Up to date"],"j9Vqvc":["inherited"],"j9tqwO":["Not in sidebar"],"jAMpHn":["What is a starter pack?"],"jBVUXo":["Couldn't open the terminal — please try again."],"jC8LSZ":["Reset view filters"],"jEZ6Lf":["provisional"],"jEdF24":["Missing page: ",["linkTitle"],". Click to create."],"jKd3AP":["Could not enable the terminal: ",["0"]],"jL3gox":["Select a value"],"jPUPvG":["Couldn't resolve the conflict for ",["filePath"],"."],"jRAGrQ":["Configure agents"],"jRHdCz":["Failed to load PDF"],"jSO1X5":["Inherited templates can't be renamed here — rename it in the folder that owns it."],"jSY41h":["\\"",["docName"],"\\" took too long. Check your connection."],"jTLWxh":["Embed an external page in an inline iframe (docs, demos, Figma, CodeSandbox)."],"jX0IPx":["A skill with this name already exists."],"jZ_E5M":["Fetch failed — check the server logs for details."],"j_Z6g7":["Shared default"],"jbSG8V":["Show Files (",["sidebarShortcutLabel"],")"],"jdGUeI":["Couldn't create template: ",["error"]],"jeJexw":["Couldn't finish installing ",["0"]," — see below."],"jerqF0":["Loading branch state"],"jhtG3I":[" Your selection has been restored."],"jjtmV_":["First file name"],"jnCROW":["A memory snapshot from the crash, and the artifact that helps us most. It can contain document content and can't be redacted, so uncheck it if you'd rather not share it."],"jol95m":["Failed to open Project Navigator."],"jpctdh":["View"],"jtg_8-":["Build a knowledge wiki about the different types of flightless birds. Start with an overview page, then add cross-linked pages for each major group (ratites like ostriches, emus, and kiwis; penguins; and flightless rails), the regions they live in, and a timeline of how flightlessness evolved."],"ju38ms":["This project has no git repository — sharing mode does not apply. Initialize a repo to enable the toggle."],"jwnpdM":["A template named <0>",["trimmedSlug"],"</0> already exists here. Saving creates a local copy that overrides it for this folder."],"jxtXZI":["Install the gh CLI"],"k0dL2I":["Reconnecting to the agent service…"],"k0vc0N":["New terminal tab"],"k2fEi7":["User plugins are personal to this device — turn them on or off here. The choice lives in your user config and is never committed to the project. Each enabled plugin gets its own page under Plugins in the settings sidebar."],"k4CuuV":["Ready-made folders and templates to get you started quickly. Select a pack to preview what gets created, then add it to your project."],"k7Hoig":["No content changes at this version."],"k8xtrB":["Not required for a localhost endpoint like <0>",["endpointHost"],"</0> — most local servers ignore it. Add one only if yours needs it."],"kCNU4q":["Indexing your pages — ",["semanticIndexedCount"]," of ",["semanticTotalCount"]," ready. Results may be incomplete."],"kCqCyf":["Open CodeMirror's lint diagnostics panel."],"kDwcbW":["Go to line ",["displayLine"]," in ",["0"]],"kFLlsI":["Insert a footnote reference + matching definition stub."],"kLv8d3":["Your copy of branch <0>",["shareBranch"],"</0> has changes that aren't on GitHub. The ",["targetNoun"]," will appear once the branch syncs."],"kNqMMd":["Folder"],"kRTXGw":["Point semantic search at any OpenAI-compatible embeddings endpoint — a self-hosted server or another provider. The API key above is for whichever endpoint you set here."],"kUn-CN":["Sync off"],"kV2YZv":["Don't see <0>Skills</0>? Enable <1>Settings <2/> Capabilities <3/> Code execution and file creation</1> first."],"kYL1lH":["Agent activity"],"k_Dqw1":[["0","plural",{"one":["No problems across ","#"," document."],"other":["No problems across ","#"," documents."]}]],"k_pade":["Config sharing is now shared. Commit the OK files to share with your team."],"k_yIIc":["Will be created at: <0>",["targetPreview"],"</0>"],"ka6Eke":["Open file on disk"],"kdzzOK":["Off — search ranks by keyword only. No content leaves this computer."],"keNFEd":["Set identity"],"khCa4M":["Teaches coding agents in this project to read and write through OpenKnowledge."],"kj9pAE":["Creating page"],"kknhfj":["No changes"],"klPS-L":["Original file — before this agent's edits."],"kmKqZg":["Clusters"],"knjOzA":["Tag value"],"ko386X":["A document has a conflict — resolve it to keep it up to date."],"kolRU1":["Do you want to permanently delete instead?"],"kooyLJ":["Failed to rename the field"],"kpqWwG":["This ",["targetNoun"]," was removed from branch <0>",["branch"],"</0>."],"ktspdq":["Tint and badge files that have lint or link problems, without opening them."],"ku0yLQ":["Pages are embedded the first time a search needs them."],"ky9Tuc":["Edit ",["0"]," source"],"l-4nnw":["Search rules"],"l17ab4":["Could not write project files. Try a different location."],"l1aQKz":["Visual editor table"],"l1l8sj":[["0"],"d ago"],"l3s5ri":["Import"],"l3zD7w":["Starting the agent…"],"l46MqT":["Next tab"],"l6kpzR":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy of branch <0>",["branch"],"</0>, and that change hasn't synced yet."],"l7Qq48":["This agent runs through ",["0"],", which isn't installed. Open Knowledge can download a private copy of ",["1"]," ",["2"]," (about ",["3"]," MB from ",["4"],") that won't touch the rest of your system."],"lAiyU_":["Only the current document uses <0>#",["tag"],"</0>."],"lCC_D5":["Subscribing..."],"lGs_bQ":["Page <0>*</0>"],"lHCR4I":["Clear the field to reset back to the default OpenAI endpoint."],"lHwYMr":["Server error: ",["status"]," ",["statusText"]],"lI0Td2":["Use letters, digits, <0>_</0> and <1>-</1> only."],"lKQnp-":["Installed ",["0"]," ",["1"]],"lPzyrU":["All hunks resolved"],"lVWEIL":["Indexed ",["embedded"]," of ",["total"]," pages."],"lWNpNB":["Add cursors or select matching occurrences through CodeMirror."],"lXKZGw":["Heading 1"],"lY27jj":[["0"],"y ago"],"lZAiSP":["Backlinks response did not match expected shape."],"l_FAT6":["Use letters, digits, <0>-</0> or <1>_</1> only."],"l_UFPv":["Properties"],"lb_UU4":["Sync now"],"lbkOif":["Undo or redo visual-editor changes through TipTap collaboration history."],"lhjq3G":["Reset ",["labelText"]," to default"],"ljFWEt":["No settings found"],"ljHjfg":["That branch is already open in another worktree."],"lkYioO":["Show or hide document panel"],"ll2yNl":["Content directory"],"lmBPt0":["Only external links trigger a request. Links to other documents in this project preview from the local index and never leave your computer."],"lond3p":["Shows above the code body. Round-trips as \`title=\\"...\\"\` in markdown."],"lrhetp":["+ ",["overflow"]," more"],"lyWa43":["Project-level disconnected pages"],"lzmtKp":["Failed to load folder properties: ",["message"]],"lzwo7p":["Could not open GitHub sign-in. Please try again."],"m16xKo":["Add"],"m2T1Xj":["Tag #",["tagValue"],", ",["uses"]],"m6YGpY":["Active panel content for the selected tab shows here."],"mAzs2H":["Disable ",["file"]],"mBltnd":["Path suggestions"],"mCB6Je":["Select All"],"mGaZwZ":["See the full install guide"],"mHVPm5":["Reconnect required"],"mHf8mp":["Delete schema file ",["file"]],"mLAjyL":["Give the AI tools you use access to read and update your projects. Checking a box sets it up right away; unchecking removes it."],"mPneVR":["Updated \\"",["display"],"\\" to ",["0"],"."],"mPy9lS":["Organize my existing specs into a linked index grouped by area, and flag any that have drifted out of sync with the current code."],"mToVM9":["Message ",["agentName"]],"mU3j1b":["Remove item ",["0"]],"mVFyH-":[["accessibleLabel"]," (conflict)"],"mWVJRX":["Collapsible section with a clickable summary."],"mY8U64":["Teach agents a repeatable task. You can edit the body after creating."],"mYGY3B":["Date"],"mYzDD_":["A worktree folder for that branch already exists."],"mZ1r4i":["Create a document from ",["label"]],"maDWIB":["Mirror source <0>api-spec</0>"],"makN88":["No patterns yet. Type a folder or file name below to start hiding files."],"mdKFEy":["You cancelled loading \\"",["docName"],"\\"."],"mdzKSV":[["nodeCount","plural",{"one":["#"," node"],"other":["#"," nodes"]}]],"mf37rL":["Retrying"],"mg0YGL":["Source multi-cursor and multi-select"],"mk2poV":["e.g. server.ts"],"mmpzAq":["Wrap long lines in the markdown source editor."],"mo22UP":["Toggle inline code formatting."],"mqSwZH":["<0>Mirror anchor not found.</0> No <1>",["mirrorSourceTag"],"</1> exists in <2>",["src"],"</2>."],"msOK6I":["Repositories you've already cloned may keep syncing through git's own saved credentials, even after you disconnect."],"msqUNq":["Ready-made folders and templates to get you started quickly."],"msuDyW":["Set the sync default for users opening this project for the first time. This setting is committed to your repository."],"mu1O0q":["Open Knowledge can manage ",["0"]," editor skill(s) for this project. Import moves them into .ok/skills and replaces the .claude, .codex, etc. copies with symlinks — one place to edit, in sync everywhere. If those folders are committed to git, review the change first; symlinks can behave differently on some editors and on Windows."],"mwMF9u":["Open CodeMirror search in source editor mode."],"mxGJVE":["Switch worktree…"],"mxY24F":["Duplicate the focused file-tree item when focus is in the Files sidebar."],"n2lRue":["Commit or stash changes to switch:"],"n3wx1q":["Restore to this version?"],"n5n_vi":["Private repository"],"n6hXUm":["Auto-sync periodically fetches, pulls, and pushes commits to your remote git repository so your edits stay in sync across machines."],"n7aopT":["Editor mode"],"n8DwqQ":["Connects automatically the next time you open this project in a trusted Codex session."],"nCzR-G":["Copy code ",["userCode"]],"nD7Fx9":["This replaces the current skill content with the bundled version ",["0"],". Any local edits will be replaced — your current version is saved to history first, so you can restore it."],"nDT8qt":["Initialized ",["0"]," but could not open it."],"nJq7et":["Couldn't uninstall skill: ",["0"]],"nMSYz5":["This path is on an external volume (/Volumes/...). OpenKnowledge will lose track of files when the drive ejects."],"nNYV3Y":["and ",["remaining"]," more"],"nOEDQs":["Failed to update sync mode — ",["detail"]],"nP-KFo":["New ",["0"]," chat"],"nP76lk":["Applies to all projects on this machine. Claude and Codex, started from the built-in terminal, auto-approve OpenKnowledge's read and write tools (Claude also auto-runs \\"ok open\\"). Deleting, moving, sharing, installing skills, other commands, and non-OpenKnowledge file edits still ask. Cursor, OpenCode, and Pi are unaffected. Best-effort per agent."],"nTwL53":["Open a doc to share its URL."],"nUNZL4":["Ask ",["0"]],"nWv1ja":["Manage hidden files in Settings → Ignore patterns."],"nYKerc":["(user-level only)"],"nYeBmY":[["hours"],"h ago"],"nbfdhU":["Integrations"],"nc-ipN":["Field editing is available for schema files mapped in the Frontmatter schemas plugin"],"ndeI89":["Use Cmd/Ctrl+C to copy the link below, or open OK in the desktop app."],"ndwmea":["unavailable on this platform"],"neRy3o":["Split list item"],"nfPccR":[["laterEdits","plural",{"one":["Rolls back ","#"," later edit."],"other":["Rolls back ","#"," later edits."]}]],"nfoduq":["create worktree"],"nft48x":["Stored at <0>.ok/templates/</0> in this project. Available in every folder (folder-scoped templates can override by filename)."],"ng2Ibo":["Branch name"],"njBeMm":["Both"],"njU86j":["Property \\"",["trimmed"],"\\" already exists"],"nmwqWS":["Not answered"],"noH1JX":["Couldn't reach collab server — ",["errorDetail"],". Try <0>ok status</0> or check <1>.ok/local/last-spawn-error.log</1>."],"np9pbC":["Show ",["inAppHiddenCount"]," more"],"npcziF":["Install on"],"nqV0Kk":["This folder hasn't synced to GitHub yet. The link will work after the next sync."],"nrGWJ7":["Git identity isn't set — commits use a default author. Set yours so teammates see your name."],"nrXDdR":["Field name"],"nskygk":["Choose agent"],"nwtY4N":["Something went wrong"],"nxlOpL":["OpenKnowledge is using this GitHub account."],"ny6vNn":["OpenKnowledge is using a GitHub account provided by the gh CLI. There's no separate OpenKnowledge credential to disconnect."],"nzHlj8":["Close ",["0"]],"nzaV6Q":["Page thumbnails"],"o2yoFu":["Reveal in Finder, No workspace"],"o49mDZ":["Loading timeline history"],"o4dcAf":["Reveal in File Explorer, ",["hint"]],"o9CrsQ":["research-note"],"oAFVKX":["Failed to update the project sync default — ",["detail"]],"oAGN8p":["Remote branch <0>",["remoteCheckoutRef"],"</0> will be checked out as a new local tracking branch <1>",["trimmed"],"</1>, in its own window under <2>.ok/worktrees/</2>."],"oBK5fD":["Overlapping edits"],"oBXkm2":["Delete code block"],"oCHfGC":["Level"],"oCNLN8":["Toggle the bottom terminal panel. With text selected, stage it in the terminal's AI input instead."],"oCZkaG":["Copy path"],"oJl7eO":["Unknown component: ",["componentName"]," — source editable below"],"oKBnk5":["More requests were blocked."],"oQA-cA":["Full path"],"oS1YpJ":["Open the Project Navigator."],"oWsZk8":["Create missing page ",["target"]],"oXKEsy":["Delete an adjacent wiki-link or tag chip."],"oXlLi4":["Project plugins are your project's authoring standard — turn them on or off here. The choice is committed to config.yml and shared with every collaborator via git. Each enabled plugin gets its own page under Plugins in the settings sidebar."],"oYepHb":["The terminal is turned off for this project. Turn it back on to run commands here."],"of3tF-":["You picked ~/Documents. OpenKnowledge will index every markdown file under it. If you only want to manage a sub-folder, choose a smaller scope."],"ogAuyr":["Back to document view"],"ohUJJM":["Plugins"],"oi4zaa":["Remember this for future agents"],"omXJcU":["Close others"],"onTlRk":["Couldn't update skills sharing"],"optX0N":[["0"],"h ago"],"oqB2ez":["Previous match"],"osRqlv":["Open delete confirmation for the selected file-tree items."],"ot5BRK":["Duplicate selected file or folder"],"otE4aj":["Show external URL nodes"],"ou1hFW":["Toggle an ordered list."],"outYNy":["Duplicate name \\"",["keyName"],"\\""],"ovIGrT":["Local collaboration data for \\"",["docName"],"\\" could not be cleared. Reload to retry."],"p0Iq25":["Insert link"],"p2LEhJ":["Personal access token"],"p8TjFD":["Collapse session dock"],"p98xmP":["Applies to"],"p9sdCy":["New ignore pattern"],"pAgkuZ":["Reopening \\"",["docName"],"\\" with a fresh local collaboration cache."],"pBROkv":["Thanks for subscribing. Watch your inbox for product updates."],"pEQFsW":["No matching projects."],"pFagOn":["Source editing"],"pHYP6v":["Open <0>Customize</0> in the sidebar <1/> <2>Skills</2>."],"pQf2Ux":[".ok/skills is back to local-only."],"pTPqMK":["Toggle a fenced code block."],"pUKV4K":["Auto-denied"],"pWT04I":["Checking..."],"pWbsW6":["Loading docs"],"pZAs1T":["Failed to load outgoing links"],"paCw0z":["everything under ",["0"],"/ folders inside ",["1"],"/"],"pajIrl":["Could not turn off the terminal: ",["0"]],"pbwTg6":[["seconds"],"s ago"],"pckX1A":[["0","plural",{"one":["#"," use"],"other":["#"," uses"]}]],"pcqlQu":[["0","plural",{"one":["Folder"],"other":["Folders"]}]],"pgDlbM":["Toggle Developer Tools"],"pgq_xf":[["0"],"/",["1"]," ",["2"]],"phM8Kh":["Found the repo but could not open the project. Please try again."],"pha01Y":["Project-level pages with no incoming graph edges."],"pkAft1":["Search failed."],"pmUArF":["Workspace"],"ppDgFi":["Restart with this app's version"],"psfGPX":["MCP connections"],"psl2Sj":["Your change is still being saved — run the test again in a moment."],"pvnfJD":["Dark"],"pzutoc":["Italic"],"q2kXMG":["Inline Math"],"q3TWG7":["Move to Trash"],"q4YJl_":["The terminal session ended (exit code ",["0"],")."],"q6-JVU":["Loading pages"],"q7F5am":["title"],"qAQVSD":["Page headings response was not JSON"],"qAhFeg":[["userName"]," · ",["tabCount","plural",{"one":["#"," tab"],"other":["#"," tabs"]}]],"qAx7xG":["Fixed folder in content root"],"qC7PwZ":["Failed to remove the field"],"qEEfPk":["Bug report ",["0"]],"qEIFZu":["Key ending in ",["keyHint"]],"qEue6Q":[" or "],"qFWMl-":["View as text"],"qIJIrD":["Testing"],"qNOgUu":["Edits at the source land here — no copy-paste drift."],"qRZh7J":["Let Tab leave the source editor instead of indenting."],"qSKu2v":["Source navigation and selection"],"qSxaOz":["Accept their deletion"],"qX-ABr":["Or to use browser sign-in instead:"],"qXN416":["Couldn't share skills: internal error. Please restart the app."],"qXg5W9":["File saves to <0>~/Downloads/openknowledge.skill</0>."],"qXsafh":["Publish to GitHub"],"qZv5ZR":["Config sharing toggle failed"],"q_9EcE":["Enable git auto-sync?"],"q_z77Z":["Heading levels"],"qaHyRJ":[["linkCount","plural",{"one":["#"," link"],"other":["#"," links"]}]],"qbfj1f":["Receiving objects"],"qdBUHP":["Couldn't load ",["fileName"]],"qi1F96":["Reveal in File Explorer"],"qiN9NB":["Surface"],"qiRoLb":["Summarize everything I changed this week"],"qioCwA":["Jump to page ",["pageNumber"]],"qjHMHf":["Failed to disable sync — ",["detail"]],"qmL1UG":["Uploading securely"],"qo4zCg":["Path cannot contain backslashes"],"qpQwGC":["Describe what you're working on and the agent sets it up for you."],"qribBG":["schema ",["deleteTarget"]],"qvWGzP":["Collapse all"],"qyLmWw":["Source editor search panel"],"r-OJYm":["Enter a valid branch name (no spaces, no leading dot, no \\"..\\")."],"r2eKE3":["Sign in to ",["agentName"]," first"],"r2huLx":["Undo, redo, or undo selection changes through CodeMirror history."],"r4R7AZ":["Network error during cleanup"],"r51jLC":["File saved & Claude Desktop App opened"],"r6ncaO":["Close tab"],"r6y-jM":["Warning"],"r871ed":["Your knowledge base is now on GitHub at <0>",["ownerLogin"],"/",["repoName"],"</0>."],"rBc32v":["Couldn't reach the embeddings provider — press ↵ to retry"],"rD-woT":["Tell us what went wrong and we'll gather the logs. Nothing leaves your Mac until you've reviewed it."],"rDOuNw":["Failed to import template"],"rFTdVq":["Show in Explorer"],"rFmBG3":["Color theme"],"rFw02Q":["Uploading ",["keyName"]],"rJVoVX":["Source find results"],"rNifQd":["Remove property"],"rQAQus":["Couldn't save template: ",["error"]],"rQRrkB":["yesterday"],"rSoi6g":[["displayName"]," (",["bin"],") isn't installed or on your PATH."],"rVJpLz":["On — hovering an external link sends its URL to the destination site to fetch a preview."],"rVxu1k":["No pages link here yet."],"rXz97P":["Numbered list of items."],"rZ9HZq":["To do"],"rZVMkf":["Visual editor replace input focused"],"rageVb":["Custom HTML with a live preview pane (sandboxed iframe)."],"rbrHTd":["Approved — ",["optionName"]],"rdU729":["Layout"],"rfFpcF":["Remove ",["chip"]],"rg7hNd":["Rate your experience"],"rgPqOw":["Convert the current block to a paragraph."],"ri6zS-":["The schema file does not exist or failed to load — adding a field creates it."],"riqekz":["Suggestion menu navigation"],"rlUzXK":["Could not validate folder. Please try again."],"rn7n0G":["Resume sync"],"rnX-1S":["Enable plugins"],"roAe2K":["Link URL"],"roiUQQ":["This page doesn't link to anything yet."],"rppgXF":["Disconnecting"],"rssK8c":["Ignore patterns (raw text)"],"rtdR4v":["Show or hide Files"],"rwrPbS":["Component boundary navigation"],"s-MGs7":["Resources"],"s-XOaI":["File name"],"s0-xF4":["Tell us how it's going"],"s061i4":["Relative path"],"s0IDhW":["This file could not be found."],"s0J_k9":[["0","plural",{"one":["#"," key"],"other":["#"," keys"]}]],"s0_GnA":["Opening ",["openingLabel"],"…"],"s1c0ja":["Bullet List"],"s3caR3":["Deleting"],"s7us1p":["Only PNG, JPEG, or WebP images are allowed."],"sE7R19":["Could not load templates: ",["templatesError"],". You can still create a blank note."],"sER-bs":["Files"],"sFhaTJ":["Disambiguates similarly-named templates in the menu."],"sHrqDx":["Couldn't rename skill: ",["0"]],"sICrVf":["Restored to the version from ",["0"]],"sIGbBZ":["Convert selection to footnote"],"sIxSSP":["Resolve conflict in your terminal"],"sJK6pq":["Permission denied"],"sJWhgo":["Unknown component: ",["unregisteredComponentName"]],"sNeKjP":["Failed to store the token — try again"],"sOxZaS":["Failed to load graph"],"sZ2IOu":["This ",["targetNoun"]," was shared from branch <0>",["shareBranch"],"</0>. It doesn't exist on your current branch (<1>",["currentLabel"],"</1>)."],"saIASg":["Second item"],"saYiIO":["Path cannot contain null bytes"],"scu3wk":["Model"],"seeS6l":["Setup OpenKnowledge in this folder?"],"sgmRY8":["Skipped downloading ",["0"],"."],"shNd9t":["Slash command menu"],"si3L24":["Open an additional terminal tab. With text selected, stage it in the new tab's AI input."],"skf5Ix":["Indent or outdent source editor lines."],"sn5BEU":[["sizeText"]," · secrets redacted · ",["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]," · crash dump not redacted"],"snrVQ7":["probe failed"],"ssuwjF":["Branch"],"stlgky":["On — your search queries and the text of matching pages are sent to your embeddings provider (OpenAI by default) to compute embeddings."],"sweBEk":["Model: <0>",["0"],"</0>"],"sxTdZI":["Loading paths…"],"sxjyRq":["Worktrees"],"sxkWRg":["Advanced"],"syi2ye":[["percent"],"% used (",["left"],"% left)"],"t-JXbf":["Notion-style inline row for a downloadable file. Drag-drop also works."],"t18QYR":["Unpin ",["accessibleLabel"]],"t2TkQ3":["Sync paused — resolve conflicts to resume."],"t422_7":["Uninstall everywhere"],"t4sFKC":["New branch <0>",["trimmed"],"</0> will be created from the current commit, in its own worktree under <1>.ok/worktrees/</1>."],"t6w1cq":["Open a blank editor tab."],"t9Qn8y":["No agents enabled"],"tAPZEx":["Below"],"tHKQ6j":["Renaming"],"tN5WTS":["The provider rejected the request. Check the API key and the model id."],"tP5DDk":["Apply link"],"tUvUfp":["Use a folder you already have."],"t_YqKh":["Remove"],"tcjTlU":["Starter packs"],"teD0H9":["Couldn't open a worktree for that branch."],"ten9en":["Recent project"],"tfDRzk":["Save"],"tfi40B":["Failed to create page"],"tgWuMB":["Modified"],"thnPBX":["Activate the next editor tab."],"ti6aF_":["Ask ",["0"]," CLI"],"tiWX6q":["Source editor"],"tjXez2":["blog-post"],"tnG-m6":["Auto-sync is paused — sign in to resume."],"toyw51":["Mermaid diagram controls"],"tsiTqO":["Paste your API key"],"tsyExA":["Connect your AI tools to OpenKnowledge"],"tzZ6ha":["Connect to GitHub Enterprise Server"],"u-9fWA":["See <0>Architecture</0> for the system overview."],"u3BOHd":[["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]],"u3YnKw":["Could not construct share URL."],"u3wRF-":["Published"],"u5Utjn":[["0"]," needs ",["1"]],"u5hSeG":["Share feedback"],"u6Hp4N":["Markdown"],"u7H-Wn":["Show panel (",["panelShortcutLabel"],")"],"u7U_Ij":["Link the selected text, or edit the link under the caret."],"uA_jXp":["Switch and update branch"],"uCaIdy":["GitHub sign-in is missing or expired. Reconnect to resume syncing."],"uDlyqd":["Document the architecture of this repo: create an overview page that links to a page per major module describing its responsibilities and entry points."],"uF9ruK":["Saving"],"uFOL2y":["No project skills yet. Author one to teach agents a repeatable task scoped to this knowledge base."],"uFQbYd":["Home page and entry point."],"uGaIIS":["Check out worktree"],"uH_S-u":[["loadErrorTitle"],": ",["message"]],"uKRYiW":["Sync status unavailable — server error."],"uL_Wx8":["The terminal stopped unexpectedly."],"uM6jnS":["Restore failed"],"uMHsvM":["A <0>Modified</0> badge marks schemas your config maps — on or off. Reset removes the mapping from config.yml."],"uNGmQn":["Couldn't run the test. Check that OpenKnowledge is still running."],"uO9WLl":["Push"],"uQNW00":["Detached HEAD — checkout a branch to resume"],"uQewpR":["Couldn't restart the server — it's running under a different account. Restart your computer to clear it, then reopen this project."],"uR2YT3":["Show problem indicators"],"uUiiyC":["You don't have permission to push to this repo. Follow can still keep your copy up to date."],"uVbUP8":["Settings…"],"uWtdQR":["No templates yet. Add one in this folder's Templates section, or in Settings → Templates."],"u_lS4C":["Clone complete — opening project"],"uaUc6t":["Restart server"],"ubMwcO":["The terminal session ended (signal ",["0"],")."],"ucXZ0k":["Loading agents…"],"ugoTXs":["folder"],"uhJEA2":[["count","plural",{"one":["#"," more participant"],"other":["#"," more participants"]}]],"uksqrP":["Repository not found. It may have been renamed, deleted, or moved."],"ul1Atu":["Converting..."],"un8kBM":["Creating page: ",["linkTitle"],"."],"ur2XSb":["Visual editor"],"uuoHOU":["Command failed."],"uynXup":[["tokens","plural",{"one":["token"],"other":["tokens"]}]],"v-h2hx":["Delete ",["targetGitPath"]],"v2ZW0K":["Enable terminal"],"v2a04T":["markdownlint rules"],"v41fCm":["File not found"],"v75Em9":[["uploadedCount","plural",{"one":["Uploaded one file"],"other":["Uploaded ",["uploadedCount"]," files"]}]],"v77jrg":["Visual editor selection"],"v7hK0U":["Use lowercase letters, digits, and hyphens only."],"v7lbnC":["Find next match"],"vAYoCZ":["Couldn't open the worktree. Try again."],"vDXqVv":["Insert a markdown hard break."],"vEJDlt":["The file is in your Trash; the file-watcher will reconcile."],"vF68cg":["Fields"],"vGeNNQ":["Copy a prompt and paste it into your agent to set up your project."],"vIxrEk":["Fit width"],"vLyv1R":["Hide"],"vPKX2i":["In app (beta)"],"vQIVHc":["Folder properties"],"vWc9a0":["Type to edit; <0>⌘ Enter</0> saves, <1>Esc</1> cancels."],"vYPvPB":["Switch project…"],"vZVeFG":["Upload failed — please try again"],"v_2_3v":["Deleted ",["file"]],"v_cQn_":["The provider rejected the request (HTTP ",["0"],"). Check the API key and the model id."],"vbK_ZG":["Files sidebar"],"ve8vEM":["Code expired — please try again"],"vfRlCI":["Could not copy full path"],"vfWA_g":["You picked ~/Desktop. OpenKnowledge will index everything on your desktop."],"vhAnzJ":["Turn on semantic search?"],"viwC-K":["Failed to remove project."],"vja0Dg":["Open session dock"],"vppAju":["Where newly added attachments are placed."],"vv7kpg":["Cancelled"],"vvWZnu":["Diff unavailable"],"w3tVpc":["No links yet. Add wiki links or markdown links to build a graph."],"w3vFfL":["Hide Files"],"w4hMYl":["Could not read branch state for this project. Close this dialog and open the share link again."],"w61W3L":["Remove ",["0"]],"w6sBjd":["Terminal settings not yet loaded — try again in a moment"],"w6sT-y":["Follow the agent's edits"],"w7SsvI":["That folder isn't an OpenKnowledge project yet. Initialize it and open?"],"w7nm4K":["Indented blockquote for citations."],"wDgmsr":["\\"",["0"],"\\" install refreshed (",["1"],")"],"wGSHzy":["Activate one of the first eight editor tabs."],"wJijgU":["Location"],"wJo9oS":["Close find"],"wQp1V3":["Mirror of <0>",["src"],"</0>"],"wT4iQr":["Open visual-editor find with replace controls expanded."],"wTcjov":["No workspace"],"wU8WyK":["Element fields"],"wVa83H":["Couldn't create the report"],"wXO4Tg":[["hrs"],"h ago"],"wXw19Y":["Removed \\"",["projectName"],"\\" from recent projects. Its folder no longer exists."],"w_Sphq":["Attachments"],"waFx9W":["Managed"],"wbv9xO":["Create new project"],"wdxz7K":["Source"],"weP6me":["Couldn't load docs — type @ again to retry"],"wlwXUk":["You picked ~/Downloads. Files there are usually transient — consider a stable folder instead."],"wn8EJi":["Skills teach agents repeatable tasks. Author them here; install a skill to project it into your editors' skill folders."],"wndeIl":["Project-level pages with neither incoming nor outgoing graph edges."],"ws5o1F":["Checked by: ",["0"]],"wtcxiD":["Share this setup with your team?"],"wvK7Ay":["Your local copy of branch <0>",["branch"],"</0> is behind."],"wvbc1r":["Couldn't open document"],"wzq9Rv":["A branch with that name already exists. Open its worktree from the switcher instead."],"x-5mJ1":["Install on all"],"x2fr_j":["Graph"],"x3-2ta":[["packName"]," initialized (",["projectEntries","plural",{"one":["#"," entry"],"other":["#"," entries"]}],")"],"x3kWeu":["Problem indicators in the file explorer"],"x4pGVR":["Semantic search is on, but no API key is set — search falls back to keyword matching. Add one below."],"x57cJf":["Open link"],"xCJdfg":["Clear"],"xCdTnb":["Close new tab"],"xDBki3":["Heading suggestions"],"xDEcka":["The provider is rate-limiting this key. Try again in a moment."],"xFQRu4":["I already have it locally"],"xG4tb6":["Lost connection to \\"",["docName"],"\\"."],"xHGM4U":["Hide HTML preview"],"xK291b":["Two-page (odd)"],"xNyj3h":["Reinstall for Claude Chat & Cowork"],"xOTzt5":["just now"],"xSVO3J":["What gets created"],"xV5sXw":[["0"],"w ago"],"xWEvuo":["Ask AI"],"xXo8FT":["Save failed: ",["error"]],"xYMPyY":["Paste was incomplete — ",["chunksCompleted"]," of ",["totalChunks"]," chunks landed.",["restoreSuffix"]],"xaDWAI":["Switch project"],"xbdtfY":["Markdown source"],"xc4g25":["Parse failed"],"xeXS4P":["Or use a starter pack"],"xeiujy":["Text"],"xhlFsx":["Inherited — set a value here to replace it."],"xi9KGG":["Show Terminal"],"xiv-dW":["No files yet."],"xlQpTE":["More refusal options"],"xloBjn":["Relative Path"],"xnP32l":["No description yet — add one so agents know when to use this skill."],"xrVr_k":["Couldn't create skill: ",["0"]],"xsZhu-":["Page number"],"xzAmL_":["Auto-approved"],"xzktOa":["Edit wiki link"],"y1t8bQ":["Settings sections"],"y3aU20":["Save changes"],"y46m5r":["The desktop app isn't responding. Refresh and try again."],"y5FUYi":["Suggestion menu open"],"y5UgU8":["Disable ",["0"]],"y8B54M":["Couldn't send your prompt — please try again."],"yCX4jp":[" Your selection could not be restored."],"yEJ-sl":["The preview blocks resources that don't meet its security rules (for example plain http:// URLs, or code that uses eval). The content above may render incompletely."],"yFr-5x":["Couldn't reach the endpoint. Check the URL and that the server is up."],"yFyZMJ":["No pages matched \\"",["semanticQueryText"],"\\" by meaning."],"yH7T4q":[["failedCount","plural",{"one":["1 file failed to upload"],"other":[["failedCount"]," files failed to upload"]}]],"yHikCO":["Open CodeMirror's go-to-line prompt."],"yIPXut":["Preparing search"],"yKu_3Y":["Restore"],"yLEyuq":["Product updates in your inbox."],"yLq4w4":["Separator"],"yMgL_E":["Find field navigation"],"yQE2r9":["Loading"],"yQyglE":["No matching docs"],"yR5LHI":["Enter a 6-digit hex like #1A2B3C"],"yUxR-Q":["Expand ",["keyName"]],"yWSvcf":["Content root"],"yWWThY":["Asset reference"],"yYR6za":["Display text"],"yZepkk":["Git sync"],"yZmvQ4":["This project's server (v",["0"],") is newer than this app (v",["1"],")."],"y_5CE8":["Item ",["0"]],"y_K0Dz":["What happened?"],"yaPGPa":["Open a project to manage its AI tool connections."],"ycIX5i":["You're signed out — sign in to resume syncing."],"ydzS9x":["Exit"],"yf5auF":["Search rules by id, alias, or name"],"yf5r22":[["keyName"]," type: ",["typeLabel"]," (inherited from folder properties; not editable here)"],"ygCKqB":["Stop"],"yhdqox":["Installed — ok is available in external terminals. Unchecking removes it; OpenKnowledge's built-in terminal and AI tools keep working."],"yitgD9":["Failed to load skill targets: ",["0"]],"yjExfe":["Branch <0>",["shareBranch"],"</0> is checked out in:"],"ylXj1N":["Selected"],"ymWJLd":["Show ",["0"]," more"],"ynIa4S":["Visual editor list item"],"ypw6My":["Showing top ",["0"]," headings — keep typing to narrow"],"ysxgu8":["project"],"yutJKi":["Checklist with checkboxes."],"yvG-l1":["Open source lint panel"],"yvHDYG":["Claude Desktop"],"yxF19Y":[["0","plural",{"one":["#"," plugin"],"other":["#"," plugins"]}]],"yz7wBu":["Close"],"yzF66j":["Link"],"yzGPkm":["Expand graph"],"yzYE4B":["A picture of the app from just before you opened this. It isn't redacted, so check the preview and uncheck it if anything shouldn't be shared."],"z-lawV":["worktree"],"z0a2EA":["Diagram from Mermaid source — flowchart, sequence, class, state, ER, gantt, pie."],"z1uNN0":["No emoji found."],"z2JdQ-":["Config sharing unchanged — see details below."],"z2funE":["Full Path"],"z5pqI8":["Cannot upload: no document is open"],"z60Lgn":["Saves the file to <0>~/Downloads/openknowledge.skill</0> and opens the Claude Desktop App. Requires Node.js or Bun on your PATH."],"zAJzIg":["Problems in ",["0"]],"zAsDLY":["Graph visualization of document links"],"zBUqvf":["Set up OpenKnowledge integrations…"],"zKxoPm":["Couldn't rename \\"",["0"],"\\": ",["1"]],"zL0LPh":["Global outside text fields"],"zLGXna":["No starter packs available."],"zLak8b":["Activate new tab"],"zQBg2C":["Move the current block up or down one position."],"zUhPuR":["Open containing folder, ",["hint"]],"zXj1rA":["Search by meaning"],"zYp8Sr":["A <0>Modified</0> badge marks rules your config sets explicitly — directly, or inherited through <1>extends</1>. Unmarked rules keep their default state."],"zZ_I5K":["Open project menu"],"zaXlhf":["The properties block at the top of this doc has a formatting error. Switch to source mode to fix it."],"zbymaY":[["0"],"m ago"],"zcmYx4":["git configuration is unavailable"],"zd00pH":["Copy Path"],"zgSFyG":["External link"],"zkz0Fg":["Set up syncing"],"zlErBl":["Page headings error response did not match RFC 9457"],"zo3Dl7":["Toggle thumbnails"],"zrP8HX":["Frontmatter every document created from this template starts with. Values are YAML — a list is <0>[a, b]</0>; <1>{",["date"],"}</1> fills in on create."],"ztKII6":["Failed to add item"],"zvjCD4":["Detailed diagnostics"],"zwBp5t":["Private"],"zyKa-I":["Star us on GitHub"],"zz_Wd_":["Mode"]}`)},Qg=`en`;yl.load(Qg,Zg.messages),yl.activate(Qg);function $g(e){if(e===null)return`none`;switch(e.kind){case`doc`:case`folder-index`:return`doc`;case`folder`:return`folder`;case`asset`:case`skill-file`:case`large-file`:return`asset`;case`missing`:return`none`}}var e_={newFile:{id:`HdkSiO`},newFolder:{id:`96G6Re`},openGraph:{id:`3Fcb0I`},initializeStarterPack:{id:`fWi7pn`},newProject:{id:`gKi-a_`},openFolderOnDisk:{id:`WPwDin`},openFileOnDisk:{id:`ka6Eke`},switchProject:{id:`xaDWAI`},settings:{id:`Tz0i8g`},installClaudeDesktop:{id:`62Pc08`},reportBug:{id:`cd5EXh`},sendFeedback:{id:`RoafuO`},newFromTemplate:{id:`Uuj_R4`},rename:{id:`2wxgft`},duplicate:{id:`euc6Ns`},moveToTrash:{id:`q3TWG7`},revealInFinder:{id:`LtSYdi`},copyFullPath:{id:`Up2_7p`},copyRelativePath:{id:`M6mvVi`},closeTab:{id:`r6ncaO`},newWorktree:{id:`DXd9LM`},switchWorktree:{id:`8Vq20-`},sidebarShow:{id:`151wvk`},sidebarHide:{id:`Q1mtyd`},docPanelShow:{id:`fSRzLo`},docPanelHide:{id:`GSYWCm`},terminalShow:{id:`xi9KGG`},terminalHide:{id:`9xCnv8`},showHiddenFiles:{id:`XcGbim`},showOkFolders:{id:`GHsJb8`},showOnlyMarkdownFiles:{id:`WkTLN7`},showSkillsSection:{id:`NF_Wcg`},expandAll:{id:`OlAl5i`},collapseAll:{id:`qvWGzP`},newTerminal:{id:`ZBxvV3`},killTerminal:{id:`5_j-DA`},checkForUpdates:{id:`WMCwmR`},setUpIntegrations:{id:`AhoGwP`},checkSpelling:{id:`ZgJVnp`},openOnGithub:{id:`LeGeTf`}},t_={"new-file":Pn,"new-folder":Ph,"open-graph":Yh,"initialize-starter-pack":Zh,"new-project":Ut,"open-folder":dc,"open-file":Wn,"switch-project":$e,settings:og,"install-claude-desktop":tc,"report-bug":nt,"send-feedback":Jh,"new-from-template":Pn,rename:$s,duplicate:ec,"move-to-trash":ol,"reveal-in-finder":dc,"copy-full-path":ec,"copy-relative-path":ec,"close-tab":fl,"new-worktree":lo,"switch-worktree":lo,"toggle-sidebar":oe,"toggle-doc-panel":bc,"toggle-terminal":jc,"toggle-show-hidden-files":rc,"toggle-show-ok-folders":Fh,"toggle-show-only-markdown-files":Wn,"toggle-show-skills-section":qs,"expand-all-tree":Eg,"collapse-all-tree":Mh,"new-terminal":jc,"kill-terminal":jc,"check-for-updates":Qc,"set-up-integrations":hh,"toggle-spell-check":ug,"open-github":Xg},n_={"new-file":e=>{e.closePalette(),e.openNewItemDialog(`file`)},"new-folder":e=>{e.closePalette(),e.openNewItemDialog(`folder`)},"open-graph":e=>{e.closePalette(),Jg(`graph`)},"initialize-starter-pack":e=>{e.closePalette(),e.openSeedDialog()},"new-project":e=>{e.closePalette(),e.openCreateProjectDialog()},"open-folder":e=>{let t=e.bridge;t&&e.runAction(async()=>{let e=await t.dialog.openFolder();e&&await t.project.open({path:e,target:`new-window`,entryPoint:`pick-existing`})})},"open-file":e=>{let t=e.bridge;t&&e.runAction(()=>t.project.openFile())},"switch-project":e=>{let t=e.bridge;t&&e.runAction(()=>t.navigator.open(),yl._({id:`jol95m`}))},settings:e=>{e.closePalette(),window.location.hash!==`#settings`&&(window.location.hash=Dl)},"install-claude-desktop":e=>{e.closePalette(),window.location.hash=`#install-claude-desktop`},"report-bug":e=>{e.closePalette(),e.openReportBugDialog()},"send-feedback":e=>{e.closePalette(),e.openFeedbackDialog()},"check-for-updates":e=>e.runAction(async()=>{await e.bridge?.update.checkNow()}),"set-up-integrations":e=>e.runAction(async()=>{await e.bridge?.mcpWiring.reconfigure()}),"toggle-spell-check":e=>e.runAction(async()=>{await e.bridge?.spellcheck.toggle()}),"open-github":e=>e.openExternalUrl(_a)};function r_(e){return{host:e.bridge===null?`web`:`desktop`,activeTargetKind:e.contextualTargetKind,singleFile:e.singleFile,terminalLive:e.viewMenuState.terminalLive===!0,canExpandAll:e.viewMenuState.canExpandAll!==!1,canCollapseAll:e.viewMenuState.canCollapseAll!==!1,hasActiveDoc:e.activeDocName!==null,showInstallSkill:!1}}function i_(e,t){if(e.stateToggle){let n=t.viewMenuState[e.stateToggle.stateField]===!0?e.stateToggle.hideKey:e.stateToggle.showKey;return yl._(e_[n])}return yl._(e_[e.labelKey])}function a_(e){let t=e.menuActionId;return e=>e.emitMenuAction(t)}function o_(e){let t=e.palette;if(!t)throw Error(`command ${e.id} has no palette presence`);let n=t_[e.id];if(!n)throw Error(`command ${e.id} has no palette icon`);let r=e.checkField;return{id:e.id,menuActionId:e.menuActionId,label:t=>i_(e,t),keywords:e.keywords,icon:n,group:t.group,visibility:t.visibility,shortcutId:e.shortcutId,shortcutDesktopOnly:e.shortcutDesktopOnly,checked:r?e=>e.viewMenuState[r]===!0:void 0,available:t=>Li(e.availability,r_(t)),dispatch:n_[e.id]??a_(e)}}var s_=Ta.flatMap(e=>e.palette?[o_(e)]:[]),c_=`ok-omnibar-recents-v1`,l_=10;function u_(e){return typeof e==`object`&&!!e&&(e.kind===`file`||e.kind===`folder`)&&typeof e.path==`string`&&typeof e.lastOpenedAt==`string`}function d_(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function f_(e,t){return`${e}:${t}`}function p_(e){let t=d_(e);if(!t)return[];try{let e=t.getItem(c_);if(!e)return[];let n=JSON.parse(e);return Array.isArray(n)?n.filter(u_).slice(0,l_):[]}catch{return[]}}function m_(e,t){let n=d_(t);if(n)try{n.setItem(c_,JSON.stringify(e.slice(0,l_)))}catch(e){console.warn(`[omnibar] Failed to save recent entries:`,e)}}function h_(e,t){return[t,...e.filter(e=>e.kind!==t.kind||e.path!==t.path)].slice(0,l_)}function g_(e,t){return e.filter(e=>t.has(f_(e.kind,e.path)))}var __=50,v_=50,y_=``,b_=null;function x_(e){return e.trim().toLowerCase()}function S_(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function C_(e){let t=e.trim();return t?[...new Set(t.split(/\s+/).filter(Boolean))].sort((e,t)=>t.length-e.length):[]}function w_(e,t,n=new Map,r=new Map,i=new Set){let a=[],o=new Set;for(let t of e){o.add(t);let e=r.get(t),i=e?.modified,s=n.get(t);a.push({kind:`file`,path:t,name:va(t),...s&&{title:s},...e?.docExt&&{docExt:e.docExt},...i&&{modifiedTs:Date.parse(i)}})}for(let e of i)o.has(e)||(o.add(e),a.push({kind:`file`,path:e,name:va(e),bodyIndexed:!1}));for(let e of t)a.push({kind:`folder`,path:e,name:va(e)});return a.sort((e,t)=>{let n=e.path.localeCompare(t.path);return n===0?e.kind===t.kind?0:e.kind===`folder`?-1:1:n}),a}function T_(e){return Hi({kind:e.kind===`folder`?`folder`:e.bodyIndexed===!1?`file`:`page`,path:e.path,title:e.title??e.name,modifiedTs:e.modifiedTs??0})}function E_(e){return{entries:e,byId:new Map(e.map(e=>[`${e.kind===`folder`?`folder`:e.bodyIndexed===!1?`file`:`page`}:${e.path}`,e])),corpus:yi(e.map(T_))}}function D_(e){return e.map(e=>`${e.kind}\u0000${e.path}\u0000${e.title??``}\u0000${e.docExt??``}\u0000${e.modifiedTs??0} ${e.bodyIndexed===!1?`0`:`1`}`).join(``)}function O_(e){let t=D_(e);return b_&&y_===t?b_:(y_=t,b_=E_(e),b_)}function k_(e,t,n=__){return A_(O_(e),t,n)}function A_(e,t,n=__){let r=x_(t);return r?Ka(e.corpus,r,{intent:`omnibar`,limit:n,scopes:[`page`,`folder`,`file`]}).map(t=>e.byId.get(t.document.id)).filter(e=>e!==void 0):e.entries.slice(0,20)}function j_(e,t){let n=C_(t);if(n.length===0||e.length===0)return[{text:e,match:!1,start:0}];let r=RegExp(`(${n.map(S_).join(`|`)})`,`gi`),i=[],a=0;for(let t of e.matchAll(r)){let n=t.index??0;n>a&&i.push({text:e.slice(a,n),match:!1,start:a}),i.push({text:t[0],match:!0,start:n}),a=n+t[0].length}return a<e.length&&i.push({text:e.slice(a),match:!1,start:a}),i.length>0?i:[{text:e,match:!1,start:0}]}function M_(e){if(e.kind!==`page`&&e.kind!==`folder`&&e.kind!==`file`||typeof e.path!=`string`)return null;let t=va(e.path);return{kind:e.kind===`folder`?`folder`:`file`,path:e.path,name:t,...e.kind===`file`&&{bodyIndexed:!1},...e.title&&{title:e.title},...e.snippet&&{snippet:e.snippet},...typeof e.score==`number`&&{score:e.score}}}async function N_(e,t={}){let n=e.trim();if(!n)return{entries:[],truncated:!1,ready:!0};let r=await fetch(`/api/search`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({query:n,intent:`full_text`,ranking:t.semantic?`relevance`:`navigation`,scopes:[`page`,`folder`,`content`,`file`],limit:t.limit??v_,source:`omnibar`,...t.semantic?{semantic:!0}:{}}),signal:t.signal});if(!r.ok){let e=await r.json().catch(()=>null);throw Error(kl(e)??`Search failed with status ${r.status}`)}let i=await r.json();return{entries:(i.results??[]).map(M_).filter(e=>!!e),truncated:i.truncated===!0,ready:i.ready!==!1}}function P_(e,t,n=[]){let r=x_(t);return r?x_([e,...n].join(` `)).includes(r):!0}function F_(e,t,n={}){if(e.trim()===``)return`idle`;if(t.length===0)return`empty`;if(n.truncated)return`truncated`;for(let e of t)if(`snippet`in e&&typeof e.snippet==`string`&&e.snippet.length>0)return`content`;return`name-only`}function I_(e){let{query:t,firedQuery:n,status:r,resultCount:i}=e,a=i>0,o=t!==``&&t!==n,s=a&&(r===`loading`||t!==n),c=null;r===`error`&&t!==``?c={kind:`retry`,query:t}:o&&r!==`loading`&&(c={kind:`search`,query:t});let l=null;return r===`loading`?l=`searching`:t===``&&!a?l=`empty`:r===`success`&&!o&&!a&&(l=`no-results`),{submit:c,results:{show:a,dimmed:s,forQuery:a?n:null},notice:l}}var L_=`tag:`;function R_(e,t){if(!e.toLowerCase().startsWith(`tag:`))return{kind:`normal`,query:e};let n=e.slice(4).replace(/^\s+/,``).trim();return n&&t.has(n)?{kind:`tag-docs`,tagName:n}:{kind:`tag-list`,query:n}}function z_(e,t){return G(e,t)}var B_=y;async function V_(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok)throw Error(`/api/tags/${e} responded with ${t.status}`);let n=await t.json();return Array.isArray(n.docs)?n.docs:[]}var H_=(0,Q.lazy)(()=>n(()=>import(`./FeedbackForm-CrwXjkZy.js`).then(e=>({default:e.FeedbackForm})),[],import.meta.url)),U_=e=>{let t=(0,$.c)(11),{open:n,onOpenChange:r,source:i,onSuccess:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(_n,{children:(0,Z.jsx)(pn,{children:(0,Z.jsx)(q,{id:`SItQRc`})})}),t[0]=o):o=t[0];let s;t[1]!==r||t[2]!==a?(s=()=>{r(!1),a?.()},t[1]=r,t[2]=a,t[3]=s):s=t[3];let c;t[4]!==i||t[5]!==s?(c=(0,Z.jsxs)(mn,{children:[o,(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(H_,{source:i,onSuccess:s})})]}),t[4]=i,t[5]=s,t[6]=c):c=t[6];let l;return t[7]!==r||t[8]!==n||t[9]!==c?(l=(0,Z.jsx)(vn,{open:n,onOpenChange:r,children:c}),t[7]=r,t[8]=n,t[9]=c,t[10]=l):l=t[10],l},W_=[`.md`,`.mdx`];function G_(e){let t=e.toLowerCase();for(let e of W_)if(t.endsWith(e))return e;return null}var K_={local:0,inherited:1};function q_(e){return[...e].sort((e,t)=>{let n=K_[e.scope]-K_[t.scope];if(n!==0)return n;let r=(e.title??e.name).toLowerCase(),i=(t.title??t.name).toLowerCase();return r.localeCompare(i)})}var J_=`__blank__`;function Y_(e){return e.trim()?e.includes(`..`)?`dotdot`:e.startsWith(`/`)?`leading-slash`:e.includes(`\\`)?`backslash`:e.includes(`\0`)?`null-byte`:null:`empty`}function X_(e){switch(e){case`empty`:return{id:`hYDc6B`};case`dotdot`:return{id:`Wyxs0x`};case`leading-slash`:return{id:`OYnx7O`};case`backslash`:return{id:`qo4zCg`};case`null-byte`:return{id:`saYiIO`}}}function Z_(e){let t=e.fileName.trim(),n=G_(t)?t:`${t}${e.fileExtension??`.md`}`;if(e.kind===`folder`){let t=(e.folderName??``).trim();return`${e.initialDir?`${e.initialDir}/${t}`:t}/${n}`}return e.initialDir?`${e.initialDir}/${n}`:n}function Q_(e,t){return Cl(e.target)?!1:xl(e,`new-item`,t)}function $_(e){let t=e.value.lastIndexOf(`.`);t>0?e.setSelectionRange(0,t):e.select()}function ev(e){let t=(0,$.c)(136),{open:n,onOpenChange:r,kind:i,initialDir:a,suggestedName:o,initialTemplate:s,defaultToTemplate:c,description:l,onCreated:u,folderConfig:d}=e,{_:f}=ht(),{addPage:p}=Vo(),h=Os(d?null:a),g=d??h,[_,v]=(0,Q.useState)(``),[y,b]=(0,Q.useState)(``),[x,S]=(0,Q.useState)(J_),[C,w]=(0,Q.useState)(!1),[T,E]=(0,Q.useState)(null),[D,O]=(0,Q.useState)(!1),[k,A]=(0,Q.useState)(null),j=(0,Q.useId)(),M=(0,Q.useId)(),N=(0,Q.useId)(),P=(0,Q.useId)(),F=(0,Q.useId)(),[I,L]=(0,Q.useState)(!1),R=(0,Q.useRef)(null),z=(0,Q.useRef)(null),B,V;t[0]!==s||t[1]!==i||t[2]!==n||t[3]!==o?(B=()=>{n&&(E(null),A(null),O(!1),b(``),S(i===`file`&&s?s:J_),w(!1),L(!1),v(i===`file`?o??`untitled`:`index`))},V=[n,i,o,s],t[0]=s,t[1]=i,t[2]=n,t[3]=o,t[4]=B,t[5]=V):(B=t[4],V=t[5]),(0,Q.useEffect)(B,V);let H;t[6]!==g.state.data||t[7]!==g.state.status?(H=g.state.status===`ready`?q_(g.state.data.folder.templates_available??[]):[],t[6]=g.state.data,t[7]=g.state.status,t[8]=H):H=t[8];let U=H,W;t[9]!==g.state.data||t[10]!==g.state.status||t[11]!==n||t[12]!==x?(W=()=>{n&&x!==J_&&g.state.status===`ready`&&((g.state.data.folder.templates_available??[]).some(e=>e.name===x)||S(J_))},t[9]=g.state.data,t[10]=g.state.status,t[11]=n,t[12]=x,t[13]=W):W=t[13];let G;t[14]!==g.state||t[15]!==n||t[16]!==x?(G=[n,x,g.state],t[14]=g.state,t[15]=n,t[16]=x,t[17]=G):G=t[17],(0,Q.useEffect)(W,G);let K;t[18]!==c||t[19]!==g.state.data||t[20]!==g.state.status||t[21]!==s||t[22]!==n||t[23]!==C?(K=()=>{if(!n||!c||s||C||g.state.status!==`ready`)return;let e=q_(g.state.data.folder.templates_available??[]);e.length>0&&S(e[0].name)},t[18]=c,t[19]=g.state.data,t[20]=g.state.status,t[21]=s,t[22]=n,t[23]=C,t[24]=K):K=t[24];let ee;t[25]!==c||t[26]!==g.state||t[27]!==s||t[28]!==n||t[29]!==C?(ee=[n,c,s,C,g.state],t[25]=c,t[26]=g.state,t[27]=s,t[28]=n,t[29]=C,t[30]=ee):ee=t[30],(0,Q.useEffect)(K,ee);let te=i===`file`,ne=g.state.status===`loading`||g.state.status===`idle`,re=g.state.status===`error`?g.state.message:null,ie;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ie=function(e){v(e),E(null)},t[31]=ie):ie=t[31];let ae=ie,oe;t[32]!==_||t[33]!==y||t[34]!==a||t[35]!==i?(oe=function(){return Z_({kind:i,initialDir:a,fileName:_,folderName:y})},t[32]=_,t[33]=y,t[34]=a,t[35]=i,t[36]=oe):oe=t[36];let se=oe,ce;t[37]!==f||t[38]!==_||t[39]!==y||t[40]!==i?(ce=function(){if(i===`folder`){let e=Y_(y.trim());if(e)return{message:f({id:`ODGGlj`,values:{detail:f(X_(e))}}),field:`folder`}}let e=Y_(_.trim());return e?{message:f(X_(e)),field:`file`}:null},t[37]=f,t[38]=_,t[39]=y,t[40]=i,t[41]=ce):ce=t[41];let le=ce,ue;t[42]!==D||t[43]!==_||t[44]!==y||t[45]!==i?(ue=D||!_.trim()||i===`folder`&&!y.trim(),t[42]=D,t[43]=_,t[44]=y,t[45]=i,t[46]=ue):ue=t[46];let de=ue,fe;t[47]!==f||t[48]!==p||t[49]!==se||t[50]!==le||t[51]!==i||t[52]!==u||t[53]!==r||t[54]!==x?(fe=async function(){let e=le();if(e){E(e.message),A(e.field);return}O(!0),E(null),A(null);let t=se(),n=i===`file`&&x!==J_?x:void 0,a={path:t};n!==void 0&&(a.template=n);try{let e=await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(a)}),t=e.status,n=await m(e,f({id:`d2uTPx`,values:{status:t}}));if(!n.ok){O(!1),E(n.title),A(`form`);return}let o=Zi.safeParse(n.body);if(O(!1),!o.success){E(f(i===`folder`?{id:`K1ckLX`}:{id:`fJgQHX`})),A(`form`);return}let s=o.data.docName;r(!1),window.location.hash=`#/${s}`,p(s),$l([`files`,`backlinks`,`graph`]),u?.(s)}catch(e){console.warn(`[NewItemDialog] create failed:`,e),O(!1),E(f({id:`HIb0vl`})),A(`form`)}},t[47]=f,t[48]=p,t[49]=se,t[50]=le,t[51]=i,t[52]=u,t[53]=r,t[54]=x,t[55]=fe):fe=t[55];let pe=fe,me;t[56]!==f||t[57]!==a?(me=a||f({id:`L6Hhh6`}),t[56]=f,t[57]=a,t[58]=me):me=t[58];let he=me,ge;t[59]===i?ge=t[60]:(ge=(0,Z.jsx)(pn,{children:i===`file`?(0,Z.jsx)(q,{id:`HdkSiO`}):(0,Z.jsx)(q,{id:`96G6Re`})}),t[59]=i,t[60]=ge);let _e;t[61]!==l||t[62]!==he?(_e=l??(0,Z.jsx)(q,{id:`NvOvTi`,values:{dirDisplay:he},components:{0:(0,Z.jsx)(`span`,{className:`font-medium text-foreground`})}}),t[61]=l,t[62]=he,t[63]=_e):_e=t[63];let ve;t[64]===_e?ve=t[65]:(ve=(0,Z.jsx)(fn,{children:_e}),t[64]=_e,t[65]=ve);let ye;t[66]!==ge||t[67]!==ve?(ye=(0,Z.jsxs)(_n,{children:[ge,ve]}),t[66]=ge,t[67]=ve,t[68]=ye):ye=t[68];let be;t[69]!==x||t[70]!==te||t[71]!==P||t[72]!==I||t[73]!==F||t[74]!==U||t[75]!==re||t[76]!==ne?(be=te&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`span`,{id:P,className:`text-sm font-medium`,children:(0,Z.jsx)(q,{id:`f65AOQ`})}),re?(0,Z.jsx)(`p`,{role:`alert`,className:`text-1sm text-destructive`,children:(0,Z.jsx)(q,{id:`sE7R19`,values:{templatesError:re}})}):null,(0,Z.jsx)(nv,{triggerId:F,labelledById:P,open:I,onOpenChange:L,value:x,onValueChange:e=>{S(e),w(!0)},templates:U,loading:ne}),!ne&&!re&&U.length===0?(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`uWtdQR`})}):null]}),t[69]=x,t[70]=te,t[71]=P,t[72]=I,t[73]=F,t[74]=U,t[75]=re,t[76]=ne,t[77]=be):be=t[77];let xe;t[78]!==f||t[79]!==T||t[80]!==k||t[81]!==j||t[82]!==M||t[83]!==y||t[84]!==i?(xe=i===`folder`&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:M,children:(0,Z.jsx)(q,{id:`cqQyPB`})}),(0,Z.jsx)(vl,{ref:z,id:M,value:y,onChange:e=>{b(e.target.value),E(null)},placeholder:`folder-name`,autoFocus:!0,"aria-describedby":T&&(k===`folder`||k===`form`)?j:void 0,"aria-invalid":T&&(k===`folder`||k===`form`)?!0:void 0,onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault();let t=Y_(y.trim());if(t){E(f({id:`ODGGlj`,values:{detail:f(X_(t))}})),A(`folder`);return}R.current?.focus()}}})]}),t[78]=f,t[79]=T,t[80]=k,t[81]=j,t[82]=M,t[83]=y,t[84]=i,t[85]=xe):xe=t[85];let Se;t[86]===i?Se=t[87]:(Se=i===`folder`?(0,Z.jsx)(q,{id:`jjtmV_`}):(0,Z.jsx)(q,{id:`s-XOaI`}),t[86]=i,t[87]=Se);let Ce;t[88]!==N||t[89]!==Se?(Ce=(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:N,children:Se}),t[88]=N,t[89]=Se,t[90]=Ce):Ce=t[90];let we;t[91]===Symbol.for(`react.memo_cache_sentinel`)?(we=e=>ae(e.target.value),t[91]=we):we=t[91];let Te=i===`file`,Ee=T&&(k===`file`||k===`form`)?j:void 0,De=T&&(k===`file`||k===`form`)?!0:void 0,Oe;t[92]!==pe||t[93]!==de?(Oe=e=>{e.key===`Enter`&&!de&&pe()},t[92]=pe,t[93]=de,t[94]=Oe):Oe=t[94];let ke;t[95]!==N||t[96]!==_||t[97]!==Te||t[98]!==Ee||t[99]!==De||t[100]!==Oe?(ke=(0,Z.jsx)(vl,{ref:R,id:N,value:_,onChange:we,placeholder:`my-note`,autoFocus:Te,"aria-describedby":Ee,"aria-invalid":De,onFocus:tv,onKeyDown:Oe}),t[95]=N,t[96]=_,t[97]=Te,t[98]=Ee,t[99]=De,t[100]=Oe,t[101]=ke):ke=t[101];let Ae;t[102]!==T||t[103]!==j?(Ae=T&&(0,Z.jsx)(`p`,{id:j,role:`alert`,className:`text-1sm text-destructive`,children:T}),t[102]=T,t[103]=j,t[104]=Ae):Ae=t[104];let je;t[105]!==Ce||t[106]!==ke||t[107]!==Ae?(je=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Ce,ke,Ae]}),t[105]=Ce,t[106]=ke,t[107]=Ae,t[108]=je):je=t[108];let Me;t[109]!==be||t[110]!==xe||t[111]!==je?(Me=(0,Z.jsxs)(hn,{className:`space-y-6 pb-1`,children:[be,xe,je]}),t[109]=be,t[110]=xe,t[111]=je,t[112]=Me):Me=t[112];let Ne;t[113]===r?Ne=t[114]:(Ne=()=>r(!1),t[113]=r,t[114]=Ne);let Pe;t[115]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,Z.jsx)(q,{id:`dEgA5A`}),t[115]=Pe):Pe=t[115];let Fe;t[116]!==D||t[117]!==Ne?(Fe=(0,Z.jsx)(Y,{variant:`outline`,className:`font-mono uppercase`,onClick:Ne,disabled:D,children:Pe}),t[116]=D,t[117]=Ne,t[118]=Fe):Fe=t[118];let Ie;t[119]===D?Ie=t[120]:(Ie=D?(0,Z.jsx)(q,{id:`E9bKSA`}):(0,Z.jsx)(q,{id:`hYgDIe`}),t[119]=D,t[120]=Ie);let Le;t[121]!==pe||t[122]!==de||t[123]!==Ie?(Le=(0,Z.jsx)(Y,{onClick:pe,disabled:de,children:Ie}),t[121]=pe,t[122]=de,t[123]=Ie,t[124]=Le):Le=t[124];let Re;t[125]!==Fe||t[126]!==Le?(Re=(0,Z.jsxs)(gn,{children:[Fe,Le]}),t[125]=Fe,t[126]=Le,t[127]=Re):Re=t[127];let ze;t[128]!==ye||t[129]!==Me||t[130]!==Re?(ze=(0,Z.jsxs)(mn,{className:`sm:max-w-md`,"data-ok-layer-spawned":``,children:[ye,Me,Re]}),t[128]=ye,t[129]=Me,t[130]=Re,t[131]=ze):ze=t[131];let Be;return t[132]!==r||t[133]!==n||t[134]!==ze?(Be=(0,Z.jsx)(vn,{open:n,onOpenChange:r,children:ze}),t[132]=r,t[133]=n,t[134]=ze,t[135]=Be):Be=t[135],Be}function tv(e){return $_(e.currentTarget)}function nv(e){let t=(0,$.c)(66),{triggerId:n,labelledById:r,open:i,onOpenChange:a,value:o,onValueChange:c,templates:l,loading:u}=e,{_:d}=ht(),f=(0,Q.useId)(),p;if(t[0]!==l||t[1]!==o){let e;t[3]===o?e=t[4]:(e=e=>e.name===o,t[3]=o,t[4]=e),p=l.find(e),t[0]=l,t[1]=o,t[2]=p}else p=t[2];let m=p,h=o===J_,g=i?f:void 0,_=`${r} ${n}`,v;t[5]!==h||t[6]!==u||t[7]!==m?.name||t[8]!==m?.title||t[9]!==o?(v=u?(0,Z.jsx)(q,{id:`Hl89Qd`}):h?(0,Z.jsx)(q,{id:`E7BhZn`}):m?.title??m?.name??o,t[5]=h,t[6]=u,t[7]=m?.name,t[8]=m?.title,t[9]=o,t[10]=v):v=t[10];let y;t[11]===v?y=t[12]:(y=(0,Z.jsx)(`span`,{className:`truncate`,children:v}),t[11]=v,t[12]=y);let b;t[13]!==h||t[14]!==u||t[15]!==m?(b=!u&&!h&&m?(0,Z.jsx)(ov,{entry:m}):null,t[13]=h,t[14]=u,t[15]=m,t[16]=b):b=t[16];let x;t[17]!==y||t[18]!==b?(x=(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[y,b]}),t[17]=y,t[18]=b,t[19]=x):x=t[19];let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(yh,{className:`ml-2 size-4 shrink-0 opacity-50`,"aria-hidden":`true`}),t[20]=S):S=t[20];let C;t[21]!==u||t[22]!==i||t[23]!==g||t[24]!==_||t[25]!==x||t[26]!==n?(C=(0,Z.jsx)(Vt,{asChild:!0,children:(0,Z.jsxs)(Y,{id:n,type:`button`,variant:`outline`,role:`combobox`,"aria-expanded":i,"aria-haspopup":`listbox`,"aria-controls":g,"aria-labelledby":_,disabled:u,className:`w-full justify-between font-normal`,children:[x,S]})}),t[21]=u,t[22]=i,t[23]=g,t[24]=_,t[25]=x,t[26]=n,t[27]=C):C=t[27];let w;t[28]===d?w=t[29]:(w=d({id:`UQAp48`}),t[28]=d,t[29]=w);let T;t[30]===w?T=t[31]:(T=(0,Z.jsx)(k,{placeholder:w}),t[30]=w,t[31]=T);let E;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsx)(s,{children:(0,Z.jsx)(q,{id:`c8iK2Y`})}),t[32]=E):E=t[32];let D;if(t[33]!==a||t[34]!==c||t[35]!==l||t[36]!==o){let e;t[38]!==a||t[39]!==c||t[40]!==o?(e=e=>{let t=e.title??e.name,n=e.title&&e.title!==e.name?e.name:void 0,r=`${e.scope}:${e.source_folder}:${e.name}`;return(0,Z.jsxs)(j,{value:r,keywords:[t,e.name,e.description??``,e.scope,e.source_folder??``],onSelect:()=>{c(e.name),a(!1)},className:`items-start gap-3`,children:[(0,Z.jsx)(Fo,{className:J(`mt-1 size-4 shrink-0`,o===e.name?`opacity-100`:`opacity-0`),"aria-hidden":`true`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`truncate text-sm font-medium`,children:t}),n?(0,Z.jsx)(`code`,{className:`font-mono text-2xs text-muted-foreground shrink-0`,children:n}):null,(0,Z.jsx)(ov,{entry:e,className:`ml-auto`})]}),e.description?(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:e.description}):null]})]},r)},t[38]=a,t[39]=c,t[40]=o,t[41]=e):e=t[41],D=l.map(e),t[33]=a,t[34]=c,t[35]=l,t[36]=o,t[37]=D}else D=t[37];let O;t[42]!==a||t[43]!==c?(O=()=>{c(J_),a(!1)},t[42]=a,t[43]=c,t[44]=O):O=t[44];let A=o===J_?`opacity-100`:`opacity-0`,M;t[45]===A?M=t[46]:(M=J(`mt-1 size-4 shrink-0`,A),t[45]=A,t[46]=M);let P;t[47]===M?P=t[48]:(P=(0,Z.jsx)(Fo,{className:M,"aria-hidden":`true`}),t[47]=M,t[48]=P);let I;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Z.jsx)(`span`,{className:`text-sm font-medium`,children:(0,Z.jsx)(q,{id:`E7BhZn`})}),t[49]=I):I=t[49];let L;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[I,(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:(0,Z.jsx)(q,{id:`hZoBHK`})})]}),t[50]=L):L=t[50];let R;t[51]!==O||t[52]!==P?(R=(0,Z.jsxs)(j,{value:`Blank note empty`,onSelect:O,className:`items-start gap-3`,children:[P,L]}),t[51]=O,t[52]=P,t[53]=R):R=t[53];let z;t[54]!==f||t[55]!==D||t[56]!==R?(z=(0,Z.jsxs)(F,{id:f,className:`subtle-scrollbar`,children:[E,D,R]}),t[54]=f,t[55]=D,t[56]=R,t[57]=z):z=t[57];let B;t[58]!==T||t[59]!==z?(B=(0,Z.jsx)(Kt,{className:`w-[var(--radix-popover-trigger-width)] p-0`,align:`start`,onOpenAutoFocus:av,onWheel:iv,onTouchMove:rv,children:(0,Z.jsxs)(N,{children:[T,z]})}),t[58]=T,t[59]=z,t[60]=B):B=t[60];let V;return t[61]!==a||t[62]!==i||t[63]!==B||t[64]!==C?(V=(0,Z.jsxs)(Bt,{open:i,onOpenChange:a,children:[C,B]}),t[61]=a,t[62]=i,t[63]=B,t[64]=C,t[65]=V):V=t[65],V}function rv(e){e.stopPropagation()}function iv(e){e.stopPropagation()}function av(e){e.preventDefault(),e.currentTarget.querySelector(`[cmdk-input]`)?.focus()}function ov(e){let t=(0,$.c)(7),{entry:n,className:r}=e;if(n.scope===`inherited`){let e;t[0]===r?e=t[1]:(e=J(`shrink-0 text-2xs`,r),t[0]=r,t[1]=e);let i;t[2]===n.source_folder?i=t[3]:(i=n.source_folder||(0,Z.jsx)(q,{id:`ZNK2Tq`}),t[2]=n.source_folder,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,Z.jsx)(vu,{variant:`gray`,className:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}return null}function sv(e){return e.split(`/`).pop()??e}function cv(e,t){let n=[];for(let r of t?.folders??[]){let t=`${r.path}/.ok/templates/`,i=e.created.filter(e=>e.kind===`file`&&(e.path.startsWith(t)||e.path.includes(`/${t}`))).map(e=>sv(e.path)),a=i.length,o=e.created.some(e=>e.kind===`folder`&&(e.path===r.path||e.path.endsWith(`/${r.path}`)));(a>0||o)&&n.push({path:r.path,summary:r.summary,templateCount:a,templates:i})}return n}function lv(e){return e.created.filter(e=>e.kind===`file`&&!e.path.split(`/`).includes(`.ok`)).map(e=>({path:e.path,name:sv(e.path)}))}function uv(e){let t=(0,$.c)(17),{plan:n,selectedPack:r}=e,{_:i}=ht(),a,o,s,c;if(t[0]!==i||t[1]!==n||t[2]!==r){let e=cv(n,r),l=lv(n),u=n.packSkill?.pending?n.packSkill:void 0,d=e.length,f=l.length,p=e.reduce(_v,0),m=+!!u,h={"log.md":i({id:`EoaQyO`}),"USER.md":i({id:`bV6DJA`}),"SOUL.md":i({id:`Waiy-j`}),"ACCESS_POLICY.md":i({id:`6ZhdPI`}),"HEARTBEAT.md":i({id:`MDZSJe`}),"OVERVIEW.md":i({id:`dMsx3p`}),"welcome.md":i({id:`WWcqsG`}),"index.md":i({id:`uFQbYd`})},g=[d>0?{key:`folders`,n:d,label:i({id:`VsaI0G`,values:{folderCount:d}})}:null,f>0?{key:`files`,n:f,label:i({id:`DgcGrb`,values:{fileCount:f}})}:null,p>0?{key:`templates`,n:p,label:i({id:`ba3vIW`,values:{templateCount:p}})}:null,m>0?{key:`skills`,n:m,label:i({id:`HAvRAI`,values:{skillCount:m}})}:null].filter(gv),_=e.map(e=>({key:`folder:${e.path}`,icon:Fh,name:`${sv(e.path)}/`,pill:e.templateCount>0?i({id:`-5jISU`,values:{0:e.templateCount}}):void 0,pillTooltip:e.templateCount>0?e.templates:void 0,description:e.summary||void 0})),v=l.map(e=>({key:`file:${e.path}`,icon:de,name:e.name,title:e.name,description:h[e.name]})),y=u?[{key:`skill:${u.name}`,icon:Rh,name:Ws(u.name),title:u.name,description:i({id:`FEqWFL`})}]:[],b=[{key:`folders`,label:i({id:`pcqlQu`,values:{0:_.length}}),rows:_},{key:`files`,label:i({id:`ZgGuA4`,values:{0:v.length}}),rows:v},{key:`skill`,label:i({id:`OZJeTZ`}),rows:y}].filter(hv);s=`space-y-5`;let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(`h3`,{className:`flex items-center gap-1.5 text-xs font-medium uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(q,{id:`xSVO3J`})}),t[7]=x):x=t[7];let S=g.length>0?(0,Z.jsx)(`div`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5 text-xs`,children:g.map(mv)}):null;t[8]===S?c=t[9]:(c=(0,Z.jsxs)(`div`,{className:`flex flex-wrap justify-between items-baseline gap-x-2 gap-y-0.5`,children:[x,S]}),t[8]=S,t[9]=c),a=`space-y-5`,o=b.map(dv),t[0]=i,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=c}else a=t[3],o=t[4],s=t[5],c=t[6];let l;t[10]!==a||t[11]!==o?(l=(0,Z.jsx)(`div`,{className:a,children:o}),t[10]=a,t[11]=o,t[12]=l):l=t[12];let u;return t[13]!==s||t[14]!==c||t[15]!==l?(u=(0,Z.jsxs)(`section`,{className:s,children:[c,l]}),t[13]=s,t[14]=c,t[15]=l,t[16]=u):u=t[16],u}function dv(e){return(0,Z.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,Z.jsxs)(`h4`,{className:`flex items-baseline gap-2 text-xs font-medium uppercase font-mono tracking-wider text-muted-foreground`,children:[(0,Z.jsx)(`span`,{children:e.label}),(0,Z.jsx)(`span`,{className:`text-muted-foreground/50`,children:e.rows.length})]}),(0,Z.jsx)(`ul`,{className:`space-y-4`,children:e.rows.map(fv)})]},e.key)}function fv(e){let t=e.icon;return(0,Z.jsxs)(`li`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{"aria-hidden":`true`,className:`flex size-8 shrink-0 items-center justify-center rounded-lg border border-border/60`,children:(0,Z.jsx)(t,{className:`size-4 text-muted-foreground`})}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 py-0.5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`code`,{className:`min-w-0 flex-1 truncate font-mono text-1sm text-foreground/90`,title:e.title,children:e.name}),e.pill?e.pillTooltip&&e.pillTooltip.length>0?(0,Z.jsxs)(cn,{children:[(0,Z.jsx)(an,{className:`shrink-0 cursor-help rounded bg-transparent p-0 font-mono text-2xs uppercase tracking-wide text-muted-foreground transition-colors hover:text-foreground/70 focus-visible:text-foreground/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,children:e.pill}),(0,Z.jsx)(on,{children:(0,Z.jsx)(`ul`,{className:`space-y-0.5 text-left font-mono`,children:e.pillTooltip.map(pv)})})]}):(0,Z.jsx)(`span`,{className:`shrink-0 font-mono text-2xs uppercase tracking-wide text-muted-foreground`,children:e.pill}):null]}),e.description?(0,Z.jsx)(`p`,{className:`mt-0.5 text-xs leading-relaxed text-muted-foreground`,children:e.description}):null]})]},e.key)}function pv(e){return(0,Z.jsx)(`li`,{children:e},e)}function mv(e,t){return(0,Z.jsxs)(Q.Fragment,{children:[t>0?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground/50`,children:`·`}):null,(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`span`,{className:`text-foreground/80`,children:e.n}),` `,(0,Z.jsx)(`span`,{className:`text-muted-foreground/80`,children:e.label})]})]},e.key)}function hv(e){return e.rows.length>0}function gv(e){return e!==null}function _v(e,t){return e+t.templateCount}async function vv(e){let t=await e.json().catch(()=>null),n=ma.safeParse(t);if(!n.success)return{kind:`internal`,message:`HTTP ${e.status}`};let r=n.data.detail??n.data.title,i=n.data.type;return i===`urn:ok:error:seed-prerequisite-missing`?{kind:`prerequisite-missing`,message:r}:i===`urn:ok:error:seed-invalid-root`?{kind:`invalid-root`,message:r}:i===`urn:ok:error:no-project-dir`?{kind:`no-project`,message:r}:{kind:`internal`,message:r}}function yv(){let e=typeof window<`u`?window.okDesktop:void 0;if(e?.seed){let t=e.seed.apply;return{plan:e.seed.plan,apply:async(e,n)=>{let r=await t(e,n);return r.ok&&Yl(),r},listPacks:e.seed.listPacks}}return{plan:async e=>{let t=new URLSearchParams;e?.rootDir&&t.set(`rootDir`,e.rootDir),e?.packId&&t.set(`packId`,e.packId);let n=t.toString(),r=await fetch(`/api/seed/plan${n?`?${n}`:``}`);if(!r.ok)return{ok:!1,error:await vv(r)};let i=await r.json().catch(()=>null);return i?.plan?{ok:!0,plan:i.plan}:{ok:!1,error:{kind:`internal`,message:`Malformed plan response`}}},apply:async(e,t)=>{let n=await fetch(`/api/seed/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({plan:e,packId:t?.packId})});if(!n.ok)return{ok:!1,error:await vv(n)};let r=await n.json().catch(()=>null);return r?.result?(Yl(),{ok:!0,result:r.result}):{ok:!1,error:{kind:`internal`,message:`Malformed apply response`}}},listPacks:async()=>{let e=await fetch(`/api/seed/packs`);if(!e.ok)return{ok:!1,error:{kind:`internal`,message:`HTTP ${e.status}`}};let t=await e.json().catch(()=>null);return!t||!Array.isArray(t.packs)?{ok:!1,error:{kind:`internal`,message:`Malformed listPacks response`}}:{ok:!0,packs:t.packs}}}}var bv={"knowledge-base":Vh,"software-lifecycle":lo,"codebase-wiki":_h,"plain-notes":mg,worldbuilding:Sh,"writing-pipeline":$h,"entity-vault":Yh,okf:Eh};function xv(e){return bv[e]??Vh}function Sv(e){let t=(0,$.c)(69),{onPackSelect:n,onCreateBlankFile:r,collapsedPackIds:i,className:a,packs:o}=e,{_:s}=ht(),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(null),[f,p]=(0,Q.useState)(!1),m=o===void 0,h,g;t[0]===m?(h=t[1],g=t[2]):(h=()=>{if(!m)return;let e=!1;return(async()=>{try{let t=await yv().listPacks();if(e)return;t.ok?l(t.packs):d(t.error.message)}catch(t){let n=t;if(e)return;d(n instanceof Error?n.message:String(n))}})(),()=>{e=!0}},g=[m],t[0]=m,t[1]=h,t[2]=g),(0,Q.useEffect)(h,g);let _=m?c:o;if(u!==null){let e;t[3]===a?e=t[4]:(e=J(`rounded-md bg-destructive/10 p-4 text-sm text-destructive`,a),t[3]=a,t[4]=e);let n;t[5]===u?n=t[6]:(n=(0,Z.jsx)(q,{id:`56WWtu`,values:{error:u}}),t[5]=u,t[6]=n);let r;return t[7]!==e||t[8]!==n?(r=(0,Z.jsx)(`div`,{role:`alert`,className:e,children:n}),t[7]=e,t[8]=n,t[9]=r):r=t[9],r}if(_===null){let e;t[10]===a?e=t[11]:(e=J(`@container/packgrid w-full max-w-5xl`,a),t[10]=a,t[11]=e);let n;t[12]===s?n=t[13]:(n=s({id:`BeWTQy`}),t[12]=s,t[13]=n);let r;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(`div`,{className:`grid gap-4 @sm/packgrid:grid-cols-2 @2xl/packgrid:grid-cols-3`,children:Array.from({length:Object.keys(bv).length},wv).map(Cv)}),t[14]=r):r=t[14];let i;return t[15]!==e||t[16]!==n||t[17]!==r?(i=(0,Z.jsx)(`div`,{role:`status`,className:e,"aria-busy":`true`,"aria-label":n,children:r}),t[15]=e,t[16]=n,t[17]=r,t[18]=i):i=t[18],i}if(_.length===0){let e;t[19]===a?e=t[20]:(e=J(`flex w-full max-w-5xl items-center justify-center rounded-2xl border border-dashed border-border/60 bg-muted/20 p-8 text-sm text-muted-foreground`,a),t[19]=a,t[20]=e);let n;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(q,{id:`zLGXna`}),t[21]=n):n=t[21];let r;return t[22]===e?r=t[23]:(r=(0,Z.jsx)(`div`,{role:`status`,className:e,children:n}),t[22]=e,t[23]=r),r}let v;t[24]===i?v=t[25]:(v=i??[],t[24]=i,t[25]=v);let y;t[26]===v?y=t[27]:(y=new Set(v),t[26]=v,t[27]=y);let b=y,x,S,C,w,T,E,D,O,k;if(t[28]!==a||t[29]!==b||t[30]!==f||t[31]!==r||t[32]!==n||t[33]!==_){let e;t[43]===b?e=t[44]:(e=e=>!b.has(e.id),t[43]=b,t[44]=e);let i=_.filter(e),o;t[45]===b?o=t[46]:(o=e=>b.has(e.id),t[45]=b,t[46]=o),C=_.filter(o),S=C.length>0,w=S||r!=null,t[47]===a?k=t[48]:(k=J(`@container/packgrid w-full max-w-5xl`,a),t[47]=a,t[48]=k),x=dn,T=f,E=p;let s;t[49]===n?s=t[50]:(s=e=>(0,Z.jsx)(Tv,{pack:e,onSelect:()=>n(e.id)},e.id),t[49]=n,t[50]=s);let c=i.map(s);t[51]===c?D=t[52]:(D=(0,Z.jsx)(`div`,{className:`grid gap-4 @sm/packgrid:grid-cols-2 @2xl/packgrid:grid-cols-3`,children:c}),t[51]=c,t[52]=D),O=S?(0,Z.jsx)(ln,{className:`-mx-1 -mb-1 overflow-hidden px-1 pb-1 data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,children:(0,Z.jsx)(`div`,{className:J(`grid gap-4 @sm/packgrid:grid-cols-2 @2xl/packgrid:grid-cols-3`,`pt-4`),children:C.map(e=>(0,Z.jsx)(Tv,{pack:e,onSelect:()=>n(e.id)},e.id))})}):null,t[28]=a,t[29]=b,t[30]=f,t[31]=r,t[32]=n,t[33]=_,t[34]=x,t[35]=S,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=D,t[41]=O,t[42]=k}else x=t[34],S=t[35],C=t[36],w=t[37],T=t[38],E=t[39],D=t[40],O=t[41],k=t[42];let A;t[53]!==f||t[54]!==S||t[55]!==C||t[56]!==r||t[57]!==w?(A=w?(0,Z.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center justify-between gap-2`,children:[S?(0,Z.jsx)(un,{asChild:!0,children:(0,Z.jsxs)(Y,{type:`button`,variant:`link-muted`,size:`sm`,children:[f?(0,Z.jsx)(q,{id:`6lGV3K`}):(0,Z.jsx)(q,{id:`ymWJLd`,values:{0:C.length}}),(0,Z.jsx)(Lo,{"aria-hidden":`true`,className:J(`size-3.5 transition-transform`,f&&`rotate-180`)})]})}):(0,Z.jsx)(`span`,{}),r?(0,Z.jsx)(Y,{type:`button`,variant:`link-muted`,size:`sm`,onClick:r,children:(0,Z.jsx)(q,{id:`L4Cdd9`,components:{0:(0,Z.jsx)(qn,{"aria-hidden":`true`,className:`size-3.5`})}})}):null]}):null,t[53]=f,t[54]=S,t[55]=C,t[56]=r,t[57]=w,t[58]=A):A=t[58];let j;t[59]!==x||t[60]!==A||t[61]!==T||t[62]!==E||t[63]!==D||t[64]!==O?(j=(0,Z.jsxs)(x,{open:T,onOpenChange:E,children:[D,O,A]}),t[59]=x,t[60]=A,t[61]=T,t[62]=E,t[63]=D,t[64]=O,t[65]=j):j=t[65];let M;return t[66]!==j||t[67]!==k?(M=(0,Z.jsx)(`div`,{className:k,children:j}),t[66]=j,t[67]=k,t[68]=M):M=t[68],M}function Cv(e){return(0,Z.jsx)(Ev,{},`skeleton-${e}`)}function wv(e,t){return t}function Tv(e){let t=(0,$.c)(17),{pack:n,onSelect:r}=e,i;t[0]===n.id?i=t[1]:(i=xv(n.id),t[0]=n.id,t[1]=i);let a=i,o;t[2]===a?o=t[3]:(o=(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`mt-0.5 shrink-0 text-muted-foreground`,children:(0,Z.jsx)(a,{className:`size-3.5`})}),t[2]=a,t[3]=o);let s;t[4]===n.name?s=t[5]:(s=(0,Z.jsx)(`h3`,{className:`min-w-0 wrap-break-word text-sm font-medium leading-tight`,children:n.name}),t[4]=n.name,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-row items-start gap-2`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;t[9]===n.description?l=t[10]:(l=(0,Z.jsx)(`p`,{className:`line-clamp-2 text-1sm leading-relaxed text-muted-foreground`,children:n.description}),t[9]=n.description,t[10]=l);let u;t[11]!==c||t[12]!==l?(u=(0,Z.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col gap-2`,children:[c,l]}),t[11]=c,t[12]=l,t[13]=u):u=t[13];let d;return t[14]!==r||t[15]!==u?(d=(0,Z.jsx)(`button`,{type:`button`,onClick:r,className:`group flex h-full min-w-0 flex-col items-start gap-4 rounded-2xl border border-border/60 bg-card p-5 text-left transition-[border-color,box-shadow,transform] hover:border-border hover:shadow-sm focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px`,children:u}),t[14]=r,t[15]=u,t[16]=d):d=t[16],d}function Ev(){let e=(0,$.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`span`,{className:`size-10 animate-pulse rounded-lg bg-muted`,"aria-hidden":`true`,children:(0,Z.jsx)(qc,{className:`size-5 animate-spin text-muted-foreground opacity-0`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex h-full min-h-[200px] flex-col items-start gap-4 rounded-xl border border-border/60 bg-card p-6`,children:[t,(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`h-4 w-1/2 animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-4/5 animate-pulse rounded bg-muted`})]}),(0,Z.jsx)(`div`,{className:`mt-auto h-3 w-20 animate-pulse rounded bg-muted`})]}),e[1]=n):n=e[1],n}var Dv=`knowledge-base`;function Ov(e){let t=(0,$.c)(94),{open:n,onOpenChange:r,onSeedApplied:i,initialPackId:a}=e,{_:o}=ht(),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={kind:`loading`},t[0]=s):s=t[0];let[c,l]=(0,Q.useState)(s),[u,d]=(0,Q.useState)(null),[f,p]=(0,Q.useState)(a??Dv),[m,h]=(0,Q.useState)(`project-root`),[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(a===void 0?`pick`:`configure`),b=(0,Q.useRef)(!0),x=u?.find(e=>e.id===f),S,C;t[1]!==n||t[2]!==u?(S=()=>{if(!n||u!==null)return;let e=!1;return(async()=>{try{let t=await yv().listPacks();if(e)return;t.ok?d(t.packs):(d([]),l({kind:`error`,message:t.error.message}))}catch(t){let n=t;if(e)return;d([]),l({kind:`error`,message:n instanceof Error?n.message:String(n)})}})(),()=>{e=!0}},C=[n,u],t[1]=n,t[2]=u,t[3]=S,t[4]=C):(S=t[3],C=t[4]),(0,Q.useEffect)(S,C);let w,T;t[5]!==a||t[6]!==n?(w=()=>{n&&(p(a??Dv),h(`project-root`),_(``),y(a===void 0?`pick`:`configure`),l({kind:`loading`}),b.current=!0)},T=[n,a],t[5]=a,t[6]=n,t[7]=w,t[8]=T):(w=t[7],T=t[8]),(0,Q.useEffect)(w,T),(0,Q.useEffect)(()=>{x&&_(x.defaultSubfolder??``)},[x]);let E;t[9]===g?E=t[10]:(E=g.trim(),t[9]=g,t[10]=E);let D=E,O=m===`subfolder`&&D===``,k,A;t[11]!==o||t[12]!==n||t[13]!==u||t[14]!==m||t[15]!==f||t[16]!==v||t[17]!==O||t[18]!==D?(k=()=>{if(!n||v!==`configure`||u===null)return;if(O){l({kind:`error`,message:o({id:`Z8KDox`})});return}let e=m===`project-root`?void 0:D,t=b.current?0:200;b.current=!1;let r=!1,i=setTimeout(()=>{r||(l(kv),yv().plan({rootDir:e,packId:f}).then(e=>{if(!r){if(!e.ok){l({kind:`error`,message:e.error.message});return}l(e.plan.created.length>0||e.plan.packSkill?.pending===!0?{kind:`plan`,plan:e.plan}:{kind:`already-seeded`,plan:e.plan})}}).catch(e=>{r||l({kind:`error`,message:e instanceof Error?e.message:String(e)})}))},t);return()=>{r=!0,clearTimeout(i)}},A=[n,v,u,f,m,D,O,o],t[11]=o,t[12]=n,t[13]=u,t[14]=m,t[15]=f,t[16]=v,t[17]=O,t[18]=D,t[19]=k,t[20]=A):(k=t[19],A=t[20]),(0,Q.useEffect)(k,A);let j=async function(){if(c.kind!==`plan`)return;let e=c.plan;l({kind:`applying`,plan:e});let t;try{t=await yv().apply(e,{packId:f})}catch(t){let n=t,r=n instanceof Error?n.message:String(n);X.error(o({id:`iqugog`,values:{errorDetail:r}})),l({kind:`plan`,plan:e});return}if(t.ok){let n=x?.name??o({id:`W8vpBM`}),a=t.result.applied,s=e.packSkill?.pending===!0,c=o(a>0?{id:`x3-2ta`,values:{packName:n,projectEntries:a}}:s?{id:`B2Srgd`,values:{packName:n}}:{id:`K6jjWB`,values:{packName:n}});X.success(c),i?.(),r(!1)}else{let n=t.error.message;X.error(o({id:`iqugog`,values:{errorDetail:n}})),l({kind:`plan`,plan:e})}},M=a!==void 0,N=x?.name,P=o(v===`configure`&&x?{id:`hxEUVJ`,values:{selectedPackName:N}}:{id:`RGkNeJ`}),F;t[21]===o?F=t[22]:(F=o({id:`gvApb7`}),t[21]=o,t[22]=F);let I;t[23]===o?I=t[24]:(I=o({id:`hCOLSd`}),t[23]=o,t[24]=I);let L;t[25]===o?L=t[26]:(L=o({id:`Fy4GgU`}),t[25]=o,t[26]=L);let R;t[27]===o?R=t[28]:(R=o({id:`Qw-7Ie`}),t[27]=o,t[28]=R);let z;t[29]===o?z=t[30]:(z=o({id:`_ayOfA`}),t[29]=o,t[30]=z);let B;t[31]===o?B=t[32]:(B=o({id:`Zf0w-R`}),t[31]=o,t[32]=B);let V;t[33]===o?V=t[34]:(V=o({id:`hmYd9H`}),t[33]=o,t[34]=V);let H;t[35]===o?H=t[36]:(H=o({id:`VBE2dw`}),t[35]=o,t[36]=H);let U;t[37]!==F||t[38]!==I||t[39]!==L||t[40]!==R||t[41]!==z||t[42]!==B||t[43]!==V||t[44]!==H?(U={"knowledge-base":F,"software-lifecycle":I,"codebase-wiki":L,"plain-notes":R,okf:z,"writing-pipeline":B,"entity-vault":V,worldbuilding:H},t[37]=F,t[38]=I,t[39]=L,t[40]=R,t[41]=z,t[42]=B,t[43]=V,t[44]=H,t[45]=U):U=t[45];let W=U,G;t[46]!==o||t[47]!==W||t[48]!==x||t[49]!==v?(G=v===`configure`&&x?W[x.id]??x.description:o({id:`msqUNq`}),t[46]=o,t[47]=W,t[48]=x,t[49]=v,t[50]=G):G=t[50];let K=G,ee;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ee=function(e){p(e),y(`configure`),b.current=!0},t[51]=ee):ee=t[51];let te=ee,ne;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(ne=function(){y(`pick`),l({kind:`loading`}),b.current=!0},t[52]=ne):ne=t[52];let re=ne,ie;t[53]===P?ie=t[54]:(ie=(0,Z.jsx)(pn,{children:P}),t[53]=P,t[54]=ie);let ae;t[55]===K?ae=t[56]:(ae=(0,Z.jsx)(fn,{children:K}),t[55]=K,t[56]=ae);let oe;t[57]!==ie||t[58]!==ae?(oe=(0,Z.jsxs)(_n,{children:[ie,ae]}),t[57]=ie,t[58]=ae,t[59]=oe):oe=t[59];let se;t[60]!==u||t[61]!==c||t[62]!==m||t[63]!==x||t[64]!==v||t[65]!==g?(se=v===`pick`?(0,Z.jsx)(hn,{children:(0,Z.jsx)(Sv,{packs:u,onPackSelect:te})}):(0,Z.jsxs)(hn,{className:`space-y-6`,children:[(0,Z.jsx)(Av,{choice:m,subfolder:g,placeholder:x?.defaultSubfolder??`subfolder`,onChoiceChange:h,onSubfolderChange:_}),(0,Z.jsx)(jv,{phase:c,selectedPack:x})]}),t[60]=u,t[61]=c,t[62]=m,t[63]=x,t[64]=v,t[65]=g,t[66]=se):se=t[66];let ce;t[67]!==M||t[68]!==v?(ce=v===`configure`&&!M?(0,Z.jsxs)(Y,{className:`mr-auto uppercase font-mono`,variant:`ghost`,onClick:re,children:[(0,Z.jsx)(Fn,{"aria-hidden":`true`,className:`h-4 w-4`}),(0,Z.jsx)(q,{id:`iH8pgl`})]}):null,t[67]=M,t[68]=v,t[69]=ce):ce=t[69];let le;t[70]===r?le=t[71]:(le=()=>r(!1),t[70]=r,t[71]=le);let ue;t[72]===c.kind?ue=t[73]:(ue=c.kind===`already-seeded`||c.kind===`error`?(0,Z.jsx)(q,{id:`yz7wBu`}):(0,Z.jsx)(q,{id:`dEgA5A`}),t[72]=c.kind,t[73]=ue);let de;t[74]!==le||t[75]!==ue?(de=(0,Z.jsx)(Y,{className:`uppercase font-mono`,variant:`outline`,onClick:le,children:ue}),t[74]=le,t[75]=ue,t[76]=de):de=t[76];let fe;t[77]!==j||t[78]!==c.kind||t[79]!==v||t[80]!==O?(fe=v===`configure`&&c.kind===`plan`?(0,Z.jsx)(Y,{onClick:j,disabled:O,children:(0,Z.jsx)(q,{id:`4TzU0n`})}):v===`configure`&&c.kind===`applying`?(0,Z.jsxs)(Y,{disabled:!0,children:[(0,Z.jsx)(qc,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),(0,Z.jsx)(q,{id:`XYlJJT`})]}):null,t[77]=j,t[78]=c.kind,t[79]=v,t[80]=O,t[81]=fe):fe=t[81];let pe;t[82]!==ce||t[83]!==de||t[84]!==fe?(pe=(0,Z.jsxs)(gn,{children:[ce,de,fe]}),t[82]=ce,t[83]=de,t[84]=fe,t[85]=pe):pe=t[85];let me;t[86]!==oe||t[87]!==se||t[88]!==pe?(me=(0,Z.jsxs)(mn,{className:`sm:max-w-4xl`,"data-ok-layer-spawned":``,children:[oe,se,pe]}),t[86]=oe,t[87]=se,t[88]=pe,t[89]=me):me=t[89];let he;return t[90]!==r||t[91]!==n||t[92]!==me?(he=(0,Z.jsx)(vn,{open:n,onOpenChange:r,children:me}),t[90]=r,t[91]=n,t[92]=me,t[93]=he):he=t[93],he}function kv(e){return e.kind===`plan`||e.kind===`already-seeded`?e:{kind:`loading`}}function Av(e){let t=(0,$.c)(22),{choice:n,subfolder:r,placeholder:i,onChoiceChange:a,onSubfolderChange:o}=e,{_:s}=ht(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`p`,{className:`text-sm font-medium`,children:(0,Z.jsx)(q,{id:`3wiBAs`})}),t[0]=c):c=t[0];let l;t[1]===a?l=t[2]:(l=e=>a(e),t[1]=a,t[2]=l);let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(rl,{children:(0,Z.jsx)(q,{id:`RSqaSd`})}),t[3]=u):u=t[3];let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(tl,{htmlFor:`seed-root-project-root`,children:(0,Z.jsxs)(il,{orientation:`horizontal`,children:[(0,Z.jsxs)(el,{children:[u,(0,Z.jsx)(nl,{className:`text-1sm`,children:(0,Z.jsx)(q,{id:`ZvzbDF`})})]}),(0,Z.jsx)(Rr,{value:`project-root`,id:`seed-root-project-root`})]})}),t[4]=d):d=t[4];let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(rl,{children:(0,Z.jsx)(q,{id:`ZWgr0b`})}),t[5]=f):f=t[5];let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(nl,{className:`nth-last-2:mt-0 text-1sm`,children:(0,Z.jsx)(q,{id:`KQGZuq`})}),t[6]=p):p=t[6];let m;t[7]!==s||t[8]!==n||t[9]!==o||t[10]!==i||t[11]!==r?(m=n===`subfolder`&&(0,Z.jsx)(vl,{value:r,onChange:e=>o(e.target.value),placeholder:i,"aria-label":s({id:`NYUhy5`}),spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,className:`mt-1.5 font-mono text-xs bg-background`}),t[7]=s,t[8]=n,t[9]=o,t[10]=i,t[11]=r,t[12]=m):m=t[12];let h;t[13]===m?h=t[14]:(h=(0,Z.jsxs)(el,{children:[f,p,m]}),t[13]=m,t[14]=h);let g;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(Rr,{value:`subfolder`,id:`seed-root-subfolder`}),t[15]=g):g=t[15];let _;t[16]===h?_=t[17]:(_=(0,Z.jsx)(tl,{htmlFor:`seed-root-subfolder`,children:(0,Z.jsxs)(il,{orientation:`horizontal`,children:[h,g]})}),t[16]=h,t[17]=_);let v;return t[18]!==n||t[19]!==_||t[20]!==l?(v=(0,Z.jsxs)(`div`,{className:`space-y-2 py-1`,children:[c,(0,Z.jsxs)(zr,{className:`sm:flex`,value:n,onValueChange:l,children:[d,_]})]}),t[18]=n,t[19]=_,t[20]=l,t[21]=v):v=t[21],v}function jv(e){let t=(0,$.c)(19),{phase:n,selectedPack:r}=e,{_:i}=ht();if(n.kind===`loading`){let e=r?.folders.length??6,n;t[0]===i?n=t[1]:(n=i({id:`--T3kB`}),t[0]=i,t[1]=n);let a;t[2]===e?a=t[3]:(a=(0,Z.jsx)(`ul`,{className:`space-y-2`,children:Array.from({length:e},Pv).map(Nv)}),t[2]=e,t[3]=a);let o;return t[4]!==n||t[5]!==a?(o=(0,Z.jsx)(`section`,{role:`status`,"aria-busy":`true`,"aria-label":n,children:a}),t[4]=n,t[5]=a,t[6]=o):o=t[6],o}if(n.kind===`error`){let e;return t[7]===n.message?e=t[8]:(e=(0,Z.jsx)(`div`,{className:`rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:n.message}),t[7]=n.message,t[8]=e),e}if(n.kind===`already-seeded`){let e;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`font-medium`,children:(0,Z.jsx)(q,{id:`YwPUUP`})}),t[9]=e):e=t[9];let n;return t[10]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`py-2 text-sm`,children:[e,(0,Z.jsx)(`p`,{className:`text-muted-foreground`,children:(0,Z.jsx)(q,{id:`h-AdvS`})})]}),t[10]=n):n=t[10],n}let a;t[11]!==n.plan||t[12]!==r?(a=n.plan.created.length>0||n.plan.packSkill?.pending?(0,Z.jsx)(uv,{plan:n.plan,selectedPack:r}):null,t[11]=n.plan,t[12]=r,t[13]=a):a=t[13];let o;t[14]===n.plan.warnings?o=t[15]:(o=n.plan.warnings.length>0?(0,Z.jsx)(`div`,{className:`rounded-md bg-warning/10 p-3 text-xs text-warning-foreground`,children:n.plan.warnings.map(Mv)}):null,t[14]=n.plan.warnings,t[15]=o);let s;return t[16]!==a||t[17]!==o?(s=(0,Z.jsxs)(`div`,{className:`space-y-6 py-1 text-sm`,children:[a,o]}),t[16]=a,t[17]=o,t[18]=s):s=t[18],s}function Mv(e){return(0,Z.jsx)(`p`,{children:e},e)}function Nv(e){return(0,Z.jsxs)(`li`,{"aria-hidden":`true`,className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`size-8 shrink-0 animate-pulse rounded-lg bg-muted`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 py-0.5`,children:[(0,Z.jsx)(`span`,{className:`block h-3.5 w-28 animate-pulse rounded bg-muted`}),(0,Z.jsx)(`span`,{className:`mt-2 block h-3 w-4/5 animate-pulse rounded bg-muted`})]})]},`seed-skeleton-${e}`)}function Pv(e,t){return t}function Fv(){return(0,Q.useSyncExternalStore)(nd,rd,rd)}function Iv(e,t){return e instanceof Error&&e.message?e.message:t}async function Lv(e,t,n,r=`action`){try{n(null),await e()}catch(e){console.error(`[${r}] action failed:`,e),n(Iv(e,t))}}async function Rv(e,t,n=X,r=`action`){await Lv(e,t,e=>{e!==null&&n.error(e)},r)}var zv=(0,Q.createContext)(!1);function Bv(e){let t=(0,$.c)(5),{children:n}=e,[r,i]=(0,Q.useState)(Hv),a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{if(window.okDesktop)return;let e=new AbortController;return Cu(e.signal).then(t=>{e.signal.aborted||t.status!==`ok`||i(t.config.singleFile)}).catch(Vv),()=>e.abort()},o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o);let s;return t[2]!==n||t[3]!==r?(s=(0,Z.jsx)(zv,{value:r,children:n}),t[2]=n,t[3]=r,t[4]=s):s=t[4],s}function Vv(){}function Hv(){return typeof window<`u`?window.okDesktop?.config.singleFile??!1:!1}function Uv(){return(0,Q.use)(zv)}function Wv(e,t,n){let r=[],i=new Set,a=new Set,o=t!==null&&t.mainRoot===e.project.mainRoot;e.projectSynthesized||(r.push({branch:e.project.branch??null,path:e.project.path,opened:!0,isMain:!0,isCurrent:e.project.path===n}),i.add(e.project.path),e.project.branch!=null&&a.add(e.project.branch));let s=[...e.worktrees].sort((e,t)=>t.lastOpenedAt.localeCompare(e.lastOpenedAt));for(let e of s)i.has(e.path)||(r.push({branch:e.branch??null,path:e.path,opened:!0,isMain:!1,isCurrent:e.path===n}),i.add(e.path),e.branch!=null&&a.add(e.branch));if(o){let e=t.entries.filter(e=>e.branch!==null&&!a.has(e.branch)&&(e.worktreePath===null||!i.has(e.worktreePath))).sort((e,t)=>(e.branch??``).localeCompare(t.branch??``));for(let t of e)r.push({branch:t.branch,path:t.worktreePath,opened:t.worktreePath!==null,isMain:t.isMain,isCurrent:t.isCurrent}),t.branch!=null&&a.add(t.branch),t.worktreePath!=null&&i.add(t.worktreePath)}return r.sort((e,t)=>Gv(e)-Gv(t))}function Gv(e){return e.isMain?0:e.opened?1:2}function Kv(e){let t=e.split(/[/\\]/).filter(e=>e.length>0);return t.length>0?t[t.length-1]??e:e}function qv(e){let t=[],n=new Map;for(let r of e){let e=r.gitCommonDir,i=r.mainRoot;if(e===void 0||i===void 0){t.push({project:r,mainRoot:r.path,worktrees:[]});continue}let a=n.get(e);a===void 0&&(a=t.length,n.set(e,a),t.push({project:null,mainRoot:i,worktrees:[]}));let o=t[a];o!==void 0&&(r.isLinkedWorktree?o.worktrees.push(r):o.project===null&&(o.project=r))}return t.map(e=>{let t=e.project===null;return{project:e.project??{path:e.mainRoot,name:Kv(e.mainRoot),lastOpenedAt:``},worktrees:e.worktrees,projectSynthesized:t}})}function Jv(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(Wm,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function Yv(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`select-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(Gm,{"data-slot":`context-menu-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Xv(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(Jm,{"data-slot":`context-menu-group`,...n}),t[2]=n,t[3]=r),r}function Zv(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(eh,{"data-slot":`context-menu-sub`,...n}),t[2]=n,t[3]=r),r}function Qv(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(Km,{children:(0,Z.jsx)(qm,{"data-slot":`context-menu-content`,className:i,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function $v(e){let t=(0,$.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=J(`group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,Z.jsx)(Xm,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function ey(e){let t=(0,$.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,inset:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=J(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(Ro,{className:`ml-auto`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,Z.jsxs)(th,{"data-slot":`context-menu-sub-trigger`,"data-inset":i,className:o,...a,children:[n,s]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function ty(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:overflow-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:duration-0 subtle-scrollbar`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(nh,{"data-slot":`context-menu-sub-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ny(e){let t=(0,$.c)(15),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:i,children:r,checked:n,inset:a,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s;t[6]===i?s=t[7]:(s=J(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),t[6]=i,t[7]=s);let c;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`span`,{className:`pointer-events-none absolute right-2`,children:(0,Z.jsx)(Qm,{children:(0,Z.jsx)(Fo,{})})}),t[8]=c):c=t[8];let l;return t[9]!==n||t[10]!==r||t[11]!==a||t[12]!==o||t[13]!==s?(l=(0,Z.jsxs)(Zm,{"data-slot":`context-menu-checkbox-item`,"data-inset":a,className:s,checked:n,...o,children:[c,r]}),t[9]=n,t[10]=r,t[11]=a,t[12]=o,t[13]=s,t[14]=l):l=t[14],l}function ry(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=J(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,Z.jsx)(Ym,{"data-slot":`context-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function iy(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`-mx-1 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)($m,{"data-slot":`context-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ay(e){let t=(0,$.c)(14),{path:n,name:r,onRemoveRecent:i,testIdPrefix:a}=e,{_:o}=ht(),s;t[0]!==o||t[1]!==r?(s=o({id:`Y6PKd1`,values:{name:r}}),t[0]=o,t[1]=r,t[2]=s):s=t[2];let c;t[3]===o?c=t[4]:(c=o({id:`Es-eZU`}),t[3]=o,t[4]=c);let l;t[5]!==i||t[6]!==n?(l=e=>{e.stopPropagation(),i(n)},t[5]=i,t[6]=n,t[7]=l):l=t[7];let u=`${a}-remove-${n}`,d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(fl,{"aria-hidden":`true`,className:`size-3.5`}),t[8]=d):d=t[8];let f;return t[9]!==s||t[10]!==c||t[11]!==l||t[12]!==u?(f=(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,tabIndex:-1,"aria-hidden":`true`,"aria-label":s,title:c,onClick:l,className:`absolute top-1/2 right-1 size-6 -translate-y-1/2 text-muted-foreground opacity-0 transition-opacity group-hover/recent:opacity-100 focus-visible:opacity-100`,"data-testid":u,children:d}),t[9]=s,t[10]=c,t[11]=l,t[12]=u,t[13]=f):f=t[13],f}function oy(e){let t=(0,$.c)(13),{path:n,onRemoveRecent:r,testIdPrefix:i,children:a}=e,o;t[0]===a?o=t[1]:(o=(0,Z.jsx)(Yv,{asChild:!0,children:a}),t[0]=a,t[1]=o);let s;t[2]!==r||t[3]!==n?(s=()=>r(n),t[2]=r,t[3]=n,t[4]=s):s=t[4];let c=`${i}-context-remove-${n}`,l,u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(fl,{"aria-hidden":`true`}),u=(0,Z.jsx)(q,{id:`Es-eZU`}),t[5]=l,t[6]=u):(l=t[5],u=t[6]);let d;t[7]!==s||t[8]!==c?(d=(0,Z.jsx)(Qv,{children:(0,Z.jsxs)($v,{onSelect:s,"data-testid":c,children:[l,u]})}),t[7]=s,t[8]=c,t[9]=d):d=t[9];let f;return t[10]!==o||t[11]!==d?(f=(0,Z.jsxs)(Jv,{children:[o,d]}),t[10]=o,t[11]=d,t[12]=f):f=t[12],f}var sy=3e3,cy=600,ly=20,uy=(e,t,n)=>Rv(e,t,n,`CommandPalette`);function dy(e){window.location.assign(hu(e))}function fy(e,t){return e?.kind===`folder`||e?.kind===`folder-index`?e.folderPath:Il(t)}function py(e){let t=(0,$.c)(27),{entry:n,query:r,onSelect:i,disabled:a}=e,o=r===void 0?``:r,s=a===void 0?!1:a,c;t[0]===n?c=t[1]:(c=`title`in n&&n.title?n.title:n.path.split(`/`).pop()??n.path,t[0]=n,t[1]=c);let l=c,u=`snippet`in n?n.snippet:void 0,d=`docExt`in n?n.docExt:void 0,f=`bodyIndexed`in n?n.bodyIndexed:void 0,p=`${n.kind} ${n.path}`,m=`command-palette-nav-${n.kind}-${n.path}`,h;t[2]!==f||t[3]!==d||t[4]!==n.kind||t[5]!==n.path?(h=(0,Z.jsx)(x,{bodyIndexed:f,className:`mt-0.5 size-4`,docExt:d,kind:n.kind,path:n.path}),t[2]=f,t[3]=d,t[4]=n.kind,t[5]=n.path,t[6]=h):h=t[6];let g;t[7]!==o||t[8]!==l?(g=(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:(0,Z.jsx)(hy,{query:o,text:l})}),t[7]=o,t[8]=l,t[9]=g):g=t[9];let _;t[10]!==n.path||t[11]!==o?(_=(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:(0,Z.jsx)(hy,{query:o,text:n.path})}),t[10]=n.path,t[11]=o,t[12]=_):_=t[12];let v;t[13]!==o||t[14]!==u?(v=u?(0,Z.jsx)(`span`,{className:`max-h-10 overflow-hidden text-muted-foreground text-xs leading-relaxed`,children:(0,Z.jsx)(hy,{query:o,text:u})}):null,t[13]=o,t[14]=u,t[15]=v):v=t[15];let y;t[16]!==g||t[17]!==_||t[18]!==v?(y=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[g,_,v]}),t[16]=g,t[17]=_,t[18]=v,t[19]=y):y=t[19];let b;return t[20]!==s||t[21]!==i||t[22]!==y||t[23]!==p||t[24]!==m||t[25]!==h?(b=(0,Z.jsxs)(j,{value:p,onSelect:i,disabled:s,"data-testid":m,className:`items-start`,children:[h,y]}),t[20]=s,t[21]=i,t[22]=y,t[23]=p,t[24]=m,t[25]=h,t[26]=b):b=t[26],b}function my(e){let t=(0,$.c)(5),{mode:n,inExclusiveMode:r,paletteModeKind:i}=e;if(r||i!==`normal`||n===`idle`||n===`content`)return null;let a=`command-palette-search-hint-${n}`,o;t[0]===n?o=t[1]:(o=n===`name-only`?(0,Z.jsx)(q,{id:`-wePNM`}):n===`truncated`?(0,Z.jsx)(q,{id:`-q4abP`}):(0,Z.jsx)(q,{id:`DbILZA`}),t[0]=n,t[1]=o);let s;return t[2]!==a||t[3]!==o?(s=(0,Z.jsx)(`div`,{"aria-live":`polite`,"data-testid":a,className:`border-t px-3 py-2 text-muted-foreground text-xs`,children:o}),t[2]=a,t[3]=o,t[4]=s):s=t[4],s}function hy(e){let t=(0,$.c)(5),{text:n,query:r}=e,i;t[0]!==r||t[1]!==n?(i=j_(n,r).map(gy),t[0]=r,t[1]=n,t[2]=i):i=t[2];let a;return t[3]===i?a=t[4]:(a=(0,Z.jsx)(Z.Fragment,{children:i}),t[3]=i,t[4]=a),a}function gy(e){let t=`${e.start}:${e.match?`match`:`plain`}`;return e.match?(0,Z.jsx)(`mark`,{className:`rounded-sm bg-primary/10 px-0.5 font-semibold text-primary`,children:e.text},t):(0,Z.jsx)(`span`,{children:e.text},t)}function _y({searchResults:e,fallbackSearchResults:t,searchStatus:n}){return e.length>0?e:n===`success`?[]:t}function vy(e){let t=(0,$.c)(138),{bridge:n,open:r,onOpenChange:i}=e,a=n===void 0?null:n,{_:o}=ht(),c=Uv(),[l,u]=(0,Q.useState)(``),d=(0,Q.useDeferredValue)(l),f=d.trim(),p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=[],t[0]=p):p=t[0];let[m,h]=(0,Q.useState)(p),[_,v]=(0,Q.useState)(`idle`),[y,b]=(0,Q.useState)(!1),[x,S]=(0,Q.useState)(!1),[C,w]=(0,Q.useState)(!1),T;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(T=[],t[1]=T):T=t[1];let[E,D]=(0,Q.useState)(T),[O,A]=(0,Q.useState)(null),[M,N]=(0,Q.useState)(`idle`),P;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(P=[],t[2]=P):P=t[2];let[I,L]=(0,Q.useState)(P),R;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(R=[],t[3]=R):R=t[3];let[z,B]=(0,Q.useState)(R),[V,H]=(0,Q.useState)(null),[U,W]=(0,Q.useState)(!1),[G,K]=(0,Q.useState)(!1),[ee,te]=(0,Q.useState)(!1),[ne,re]=(0,Q.useState)(!1),ie;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(ie=[],t[4]=ie):ie=t[4];let[ae,oe]=(0,Q.useState)(ie),[se,ce]=(0,Q.useState)(`idle`),le;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(le=[],t[5]=le):le=t[5];let[ue,de]=(0,Q.useState)(le),[fe,pe]=(0,Q.useState)(`idle`),me=(0,Q.useRef)(!1),he=(0,Q.useRef)(null),ge=(0,Q.useRef)(null),_e=(0,Q.useRef)(null),ve=(0,Q.useRef)(null),{activeDocName:ye,activeTarget:be}=Re(),{pages:xe,pageTitles:Se,pageMeta:Ce,folderPaths:we,filePaths:Te,loading:Ee}=Vo(),De=id(),{states:Oe,refresh:ke}=ts(),{dispatch:je}=Yo(),Ne;t[6]===r?Ne=t[7]:(Ne={enabled:r},t[6]=r,t[7]=Ne);let{status:Pe,refresh:Fe}=ks(Ne),Ie=(Pe?.enabled??!1)&&(Pe?.keyPresent??!1),Le=Pe?.embedded??0,ze=Pe?.total??0,Be=Ie&&ze>0&&Le<ze,Ve;t[8]!==C||t[9]!==r||t[10]!==Fe||t[11]!==Be?(Ve=()=>{if(!r||!C||!Be)return;let e=window.setInterval(()=>Fe(),2500);return()=>window.clearInterval(e)},t[8]=C,t[9]=r,t[10]=Fe,t[11]=Be,t[12]=Ve):Ve=t[12];let He;t[13]!==C||t[14]!==r||t[15]!==Be?(He=[r,C,Be],t[13]=C,t[14]=r,t[15]=Be,t[16]=He):He=t[16],(0,Q.useEffect)(Ve,He);let Ue=as({docName:ye,workspace:De}),We=w_(xe,we,Se,Ce,Te),Ge=g_(z,new Set(We.map(Sy))),Ke=a?.config.projectPath??null,qe=a?I.filter(e=>e.path!==Ke):[],Je=Fv(),Ye=a&&Je?Je.entries.filter(xy):[],Xe;t[17]!==ye||t[18]!==be?(Xe=fy(be,ye),t[17]=ye,t[18]=be,t[19]=Xe):Xe=t[19];let Ze=Xe,Qe=f===``?[]:k_(We,f,8),$e,et;t[20]!==i||t[21]!==r?($e=()=>{let e=function(e){xl(e,`command-palette`)&&(e.preventDefault(),i(!r))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},et=[i,r],t[20]=i,t[21]=r,t[22]=$e,t[23]=et):($e=t[22],et=t[23]),(0,Q.useEffect)($e,et);let tt,nt;t[24]!==o||t[25]!==a||t[26]!==r||t[27]!==ke?(tt=()=>{if(r){if(B(p_()),ke(),a){let e=!1;return uy(async()=>{let t=await a.project.listRecent();e||L(t)},o({id:`fYKgzG`})),()=>{e=!0}}return}u(``),oe([]),ce(`idle`),me.current=!1,de([]),pe(`idle`),w(!1),_e.current?.abort(),_e.current=null,ve.current!==null&&(window.clearTimeout(ve.current),ve.current=null),D([]),A(null),N(`idle`)},nt=[r,a,ke,o],t[24]=o,t[25]=a,t[26]=r,t[27]=ke,t[28]=tt,t[29]=nt):(tt=t[28],nt=t[29]),(0,Q.useEffect)(tt,nt);let rt;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(rt=()=>{he.current&&(he.current.scrollTop=0)},t[30]=rt):rt=t[30];let it;t[31]===l?it=t[32]:(it=[l],t[31]=l,t[32]=it),(0,Q.useEffect)(rt,it);let at=new Set(ae.map(by)),ot=C?{kind:`normal`,query:d}:R_(d,at),st=ot.kind!==`normal`,ct=st||C,lt=ot.kind===`tag-list`?ot.query:``,ut=ot.kind===`tag-docs`?ot.tagName:``,dt=l.trim(),ft=C?I_({query:dt,firedQuery:O,status:M,resultCount:E.length}):null,pt=ft?.submit?.query??``,mt=ft?.results.forQuery??``,gt,_t;t[33]!==st||t[34]!==r?(gt=()=>{if(!r||!st||me.current)return;me.current=!0,ce(`loading`);let e=!1;return B_().then(t=>{e||(oe(t),ce(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tags failed`,t),oe([]),ce(`error`))}),()=>{e=!0}},_t=[r,st],t[33]=st,t[34]=r,t[35]=gt,t[36]=_t):(gt=t[35],_t=t[36]),(0,Q.useEffect)(gt,_t);let vt=ot.kind===`tag-docs`?ot.tagName:null;(0,Q.useEffect)(()=>{if(!r||vt===null){de([]),pe(`idle`);return}pe(`loading`),de([]);let e=!1;return V_(vt).then(t=>{e||(de(t),pe(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tag docs failed`,t),de([]),pe(`error`))}),()=>{e=!0}},[r,vt]),(0,Q.useEffect)(()=>{if(!r||!f||ct||Ee){h([]),v(`idle`),b(!1),S(!1);return}let e=!1,t=!1,n=0,i=null,a,o;v(`loading`);let s=()=>e||n>=ly?!1:(n+=1,o=window.setTimeout(l,cy),!0),c=()=>{e||t&&s()||(h([]),v(`error`),b(!1),S(!1))};function l(){let n=new AbortController;i=n,a=window.setTimeout(()=>{n.abort(),c()},sy),N_(f,{signal:n.signal}).then(n=>{let{entries:r,truncated:i,ready:o}=n;if(window.clearTimeout(a),!e){if(!o){t||(t=!0,h([]),b(!1),S(!0),v(`success`)),s()||S(!1);return}h(r),b(i),S(!1),v(`success`)}}).catch(t=>{window.clearTimeout(a),!e&&(t instanceof Error&&t.name===`AbortError`||c())})}return l(),()=>{e=!0,window.clearTimeout(a),window.clearTimeout(o),i?.abort()}},[r,f,ct,Ee]);let yt;t[37]!==o||t[38]!==i?(yt=(e,t)=>{let n=t===void 0?o({id:`uuoHOU`}):t;i(!1),uy(async()=>{await e()},n)},t[37]=o,t[38]=i,t[39]=yt):yt=t[39];let bt=yt,xt;t[40]!==o||t[41]!==a?(xt=e=>{a&&uy(async()=>{await a.project.removeRecent(e),L(t=>t.filter(t=>t.path!==e))},o({id:`viwC-K`}))},t[40]=o,t[41]=a,t[42]=xt):xt=t[42];let St=xt,Ct;t[43]!==o||t[44]!==a||t[45]!==bt?(Ct=e=>{if(!a)return;let t=e.worktreePath;if(t!==null){bt(()=>a.project.open({path:t,target:`new-window`,entryPoint:`worktree`}),o({id:`LwMxXg`}));return}let n=e.branch;n!==null&&bt(async()=>{let e=await a.worktree.create({branch:n,createBranch:!1});if(!e.ok)throw Error(e.reason);td(),await a.project.open({path:e.path,target:`new-window`,entryPoint:`worktree`})},o({id:`LwMxXg`}))},t[43]=o,t[44]=a,t[45]=bt,t[46]=Ct):Ct=t[46];let wt=Ct,Tt;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(Tt=function(e){let t={kind:e.kind,path:e.path,lastOpenedAt:new Date().toISOString()},n=h_(p_(),t);m_(n),B(n)},t[47]=Tt):Tt=t[47];let Et=Tt,Dt;t[48]===i?Dt=t[49]:(Dt=function(e){i(!1),Et(e),dy(e.path)},t[48]=i,t[49]=Dt);let Ot=Dt,kt=!ct&&f===``&&Ge.length>0,At=_y({searchResults:m,fallbackSearchResults:Qe,searchStatus:_}),jt=!ct&&At.length>0,Mt=!ct&&f!==``&&(Ee||x)&&!jt,Nt=!ct&&f!==``&&_===`loading`&&!jt&&!Mt,Pt=!ct&&a!==null&&qe.length>0&&(f===``||qe.some(e=>P_(`${e.name} ${e.path}`,d,[`open recent project`]))),Ft=Ye.filter(e=>f===``||P_(e.branch??``,d,[`worktree branch`])),It=!ct&&a!==null&&Ft.length>0,Lt=Xs(),Rt=!ct&&!Lt&&Ue!==null&&(f===``||Xr.some(e=>{let t=e.displayName;return P_(o({id:`WqLq6M`,values:{displayName:t}}),d,[e.id,`agent handoff`,`open in`])})),zt=ot.kind===`tag-list`?z_(ae,ot.query):[],Bt=ot.kind===`tag-list`&&se!==`loading`&&zt.length===0,Vt=ot.kind===`tag-docs`&&fe===`success`&&ue.length===0,Ht=gc(),Ut;t[50]===i?Ut=t[51]:(Ut=e=>{i(!1),Gt(e)},t[50]=i,t[51]=Ut);let Wt=Ut,Kt;t[52]!==a||t[53]!==i?(Kt=e=>{i(!1),$u(e,a?{okDesktop:{shell:a.shell}}:{okDesktop:void 0})},t[52]=a,t[53]=i,t[54]=Kt):Kt=t[54];let qt=Kt,Jt;t[55]===i?Jt=t[56]:(Jt=()=>i(!1),t[55]=i,t[56]=Jt);let Yt;t[57]===H?Yt=t[58]:(Yt=e=>H(e),t[57]=H,t[58]=Yt);let Xt;t[59]===W?Xt=t[60]:(Xt=()=>W(!0),t[59]=W,t[60]=Xt);let Zt;t[61]===K?Zt=t[62]:(Zt=()=>K(!0),t[61]=K,t[62]=Zt);let Qt;t[63]===te?Qt=t[64]:(Qt=()=>te(!0),t[63]=te,t[64]=Qt);let Y;t[65]===re?Y=t[66]:(Y=()=>re(!0),t[65]=re,t[66]=Y);let $t={bridge:a,singleFile:c,activeDocName:ye,contextualTargetKind:$g(be),viewMenuState:Ht,emitMenuAction:Wt,runAction:bt,openExternalUrl:qt,closePalette:Jt,openNewItemDialog:Yt,openSeedDialog:Xt,openCreateProjectDialog:Zt,openReportBugDialog:Qt,openFeedbackDialog:Y},en=ct?[]:s_.flatMap(e=>{if(!e.available($t)||e.visibility===`search-only`&&f===``)return[];let t=e.label($t);return P_(t,d,e.keywords)?[{cmd:e,label:t}]:[]}),tn=en.length>0,nn;t[67]===o?nn=t[68]:(nn=e=>{switch(e){case`commands`:return o({id:`45MZFs`});case`project`:return o({id:`e0NrBM`});case`file`:return o({id:`J2eKUI`});case`view`:return o({id:`jpctdh`});case`terminal`:return o({id:`ALhMYW`});case`app`:return o({id:`IrC12v`})}},t[67]=o,t[68]=nn);let rn=nn,an=e=>{let t=en.filter(t=>t.cmd.group===e);return t.length===0?null:(0,Z.jsx)(Ae,{heading:rn(e),children:t.map(e=>{let{cmd:t,label:n}=e,r=t.shortcutId!==void 0&&(t.shortcutDesktopOnly!==!0||a!==null)?Ol(t.shortcutId):null;return(0,Z.jsxs)(j,{value:`${n} ${t.keywords.join(` `)}`,onSelect:()=>t.dispatch($t),"data-testid":`command-palette-${t.id}`,children:[(0,Z.jsx)(t.icon,{}),(0,Z.jsx)(`span`,{children:n}),t.checked?.($t)?(0,Z.jsx)(Fo,{className:`ml-auto text-muted-foreground`,"aria-hidden":`true`}):null,r?(0,Z.jsx)(g,{children:r}):null]},t.id)})},e)},on=ct||kt||jt||Nt||Mt||Pt||Rt||tn,sn;t[69]===Symbol.for(`react.memo_cache_sentinel`)?(sn=function(e){u(`${L_}${e}`)},t[69]=sn):sn=t[69];let cn=sn,ln;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(ln=function(){_e.current?.abort(),_e.current=null,ve.current!==null&&(window.clearTimeout(ve.current),ve.current=null),D([]),A(null),N(`idle`)},t[70]=ln):ln=t[70];let un=ln,dn;t[71]===l?dn=t[72]:(dn=function(){w(!0),l.startsWith(`tag:`)&&u(l.slice(L_.length)),un(),ge.current?.focus()},t[71]=l,t[72]=dn);let fn=dn,pn;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(pn=function(){w(!1),u(``),un(),ge.current?.focus()},t[73]=pn):pn=t[73];let mn=pn,hn=function(e){let t=e.trim();if(!t||Ee)return;_e.current?.abort(),ve.current!==null&&window.clearTimeout(ve.current);let n=new AbortController;_e.current=n,N(`loading`);let r=!1,i=window.setTimeout(()=>{r=!0,n.abort(),N(`error`)},sy);ve.current=i,N_(t,{signal:n.signal,semantic:!0,limit:30}).then(e=>{let{entries:r}=e;gn(i,n),D(r),A(t),N(`success`)}).catch(e=>{gn(i,n),!(e instanceof Error&&e.name===`AbortError`&&!r)&&(console.debug(`[semantic-search] fire failed`,{timedOut:r,error:e}),N(`error`))})};function gn(e,t){window.clearTimeout(e),ve.current===e&&(ve.current=null),_e.current===t&&(_e.current=null)}let _n=function(e){!C||e.key!==`Enter`||(ft?.submit?(e.preventDefault(),e.stopPropagation(),hn(ft.submit.query)):M===`loading`&&(e.preventDefault(),e.stopPropagation()))},vn;t[74]===C?vn=t[75]:(vn=function(e){C&&(e.preventDefault(),mn())},t[74]=C,t[75]=vn);let yn=vn,bn;t[76]===o?bn=t[77]:(bn=o({id:`1bDVu5`}),t[76]=o,t[77]=bn);let xn;t[78]===o?xn=t[79]:(xn=o({id:`5GRxoA`}),t[78]=o,t[79]=xn);let Sn;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(Sn={shouldFilter:!1,className:`[&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4`},t[80]=Sn):Sn=t[80];let Cn;t[81]!==o||t[82]!==C?(Cn=o(C?{id:`zXj1rA`}:{id:`ggs9f8`}),t[81]=o,t[82]=C,t[83]=Cn):Cn=t[83];let wn;t[84]!==C||t[85]!==st?(wn=()=>{C&&(w(!1),un()),u(st?``:L_),ge.current?.focus()},t[84]=C,t[85]=st,t[86]=wn):wn=t[86];let Tn=st?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`,En;t[87]===Tn?En=t[88]:(En=J(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,Tn),t[87]=Tn,t[88]=En);let Dn,On;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(Dn=(0,Z.jsx)(hc,{className:`size-3.5`}),On=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`0rwwOn`})}),t[89]=Dn,t[90]=On):(Dn=t[89],On=t[90]);let kn;t[91]!==st||t[92]!==wn||t[93]!==En?(kn=(0,Z.jsxs)(`button`,{type:`button`,onClick:wn,"data-testid":`command-palette-filter-tag`,"data-active":st,"aria-pressed":st,className:En,children:[Dn,On]}),t[91]=st,t[92]=wn,t[93]=En,t[94]=kn):kn=t[94];let An;t[95]!==fn||t[96]!==C||t[97]!==Ie?(An=Ie?(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>C?mn():fn(),"data-testid":`command-palette-filter-semantic`,"data-active":C,"aria-pressed":C,className:J(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,C?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:[(0,Z.jsx)(qs,{className:`size-3.5`}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`9tJX8r`})})]}):null,t[95]=fn,t[96]=C,t[97]=Ie,t[98]=An):An=t[98];let jn;t[99]!==kn||t[100]!==An?(jn=(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-1.5 border-b px-3 py-2`,children:[kn,An]}),t[99]=kn,t[100]=An,t[101]=jn):jn=t[101];let Mn;t[102]===Mt?Mn=t[103]:(Mn=Mt?(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-muted-foreground text-sm`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-search-preparing`,children:[(0,Z.jsx)(qc,{className:`size-4 animate-spin`}),(0,Z.jsx)(q,{id:`yIPXut`})]}):null,t[102]=Mt,t[103]=Mn);let Nn;t[104]!==jt||t[105]!==Nt?(Nn=Nt&&!jt?(0,Z.jsx)(s,{children:(0,Z.jsx)(q,{id:`WRNXKp`})}):null,t[104]=jt,t[105]=Nt,t[106]=Nn):Nn=t[106];let Pn=my,Fn=F_(f,At,{truncated:y}),In;t[107]!==Pn||t[108]!==ct||t[109]!==ot.kind||t[110]!==Fn?(In=(0,Z.jsx)(Pn,{mode:Fn,inExclusiveMode:ct,paletteModeKind:ot.kind}),t[107]=Pn,t[108]=ct,t[109]=ot.kind,t[110]=Fn,t[111]=In):In=t[111];let Ln=V===`file`,Rn;t[112]===H?Rn=t[113]:(Rn=e=>{e||H(null)},t[112]=H,t[113]=Rn);let zn;t[114]!==Ze||t[115]!==Ln||t[116]!==Rn?(zn=(0,Z.jsx)(ev,{open:Ln,onOpenChange:Rn,kind:`file`,initialDir:Ze}),t[114]=Ze,t[115]=Ln,t[116]=Rn,t[117]=zn):zn=t[117];let Bn=V===`folder`,Vn;t[118]===H?Vn=t[119]:(Vn=e=>{e||H(null)},t[118]=H,t[119]=Vn);let Hn;t[120]!==Ze||t[121]!==Bn||t[122]!==Vn?(Hn=(0,Z.jsx)(ev,{open:Bn,onOpenChange:Vn,kind:`folder`,initialDir:Ze}),t[120]=Ze,t[121]=Bn,t[122]=Vn,t[123]=Hn):Hn=t[123];let Un;t[124]!==U||t[125]!==W?(Un=(0,Z.jsx)(Ov,{open:U,onOpenChange:W}),t[124]=U,t[125]=W,t[126]=Un):Un=t[126];let Gn;t[127]!==a||t[128]!==G||t[129]!==K?(Gn=a?(0,Z.jsx)(Ig,{open:G,onOpenChange:K,bridge:a}):null,t[127]=a,t[128]=G,t[129]=K,t[130]=Gn):Gn=t[130];let Kn;t[131]!==a||t[132]!==ee||t[133]!==te?(Kn=a?(0,Z.jsx)(am,{open:ee,onOpenChange:te}):null,t[131]=a,t[132]=ee,t[133]=te,t[134]=Kn):Kn=t[134];let qn;return t[135]!==ne||t[136]!==re?(qn=(0,Z.jsx)(U_,{open:ne,onOpenChange:re,source:`command_palette`}),t[135]=ne,t[136]=re,t[137]=qn):qn=t[137],(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Me,{open:r,onOpenChange:i,title:bn,description:xn,className:`sm:max-w-2xl`,commandProps:Sn,onEscapeKeyDown:yn,children:[(0,Z.jsx)(k,{ref:ge,value:l,onValueChange:u,onKeyDown:_n,placeholder:Cn}),jn,(0,Z.jsxs)(F,{ref:he,className:`subtle-scrollbar`,children:[C&&ft?(0,Z.jsxs)(Z.Fragment,{children:[Be?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-semantic-indexing`,children:[(0,Z.jsx)(qc,{className:`size-3.5 animate-spin`}),(0,Z.jsx)(q,{id:`kCNU4q`,values:{semanticIndexedCount:Le,semanticTotalCount:ze}})]}):null,ft.submit?(0,Z.jsx)(Ae,{children:(0,Z.jsx)(j,{value:`semantic-submit`,onSelect:()=>hn(pt),"data-testid":`command-palette-semantic-submit`,children:ft.submit.kind===`retry`?(0,Z.jsxs)(`span`,{className:`flex items-center gap-2 text-amber-700 dark:text-amber-400`,children:[(0,Z.jsx)(qs,{}),(0,Z.jsx)(q,{id:`rBc32v`})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(qs,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:(0,Z.jsx)(q,{id:`FNTx6u`,values:{semanticSubmitQuery:pt}})}),(0,Z.jsx)(g,{children:`↵`})]})})}):null,ft.notice===`empty`?(0,Z.jsx)(s,{"data-testid":`command-palette-semantic-empty`,children:(0,Z.jsx)(q,{id:`Xw_maT`})}):null,ft.notice===`searching`?(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-muted-foreground text-sm`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-semantic-searching`,children:[(0,Z.jsx)(qc,{className:`size-4 animate-spin`}),(0,Z.jsx)(q,{id:`PBwmDJ`})]}):null,ft.notice===`no-results`?(0,Z.jsx)(s,{"data-testid":`command-palette-semantic-no-results`,children:(0,Z.jsx)(q,{id:`yFyZMJ`,values:{semanticQueryText:dt}})}):null,ft.results.show?(0,Z.jsx)(Ae,{heading:ft.results.dimmed?o({id:`QlxHAH`,values:{semanticResultsLabel:mt}}):o({id:`9tJX8r`}),children:(0,Z.jsx)(`div`,{"data-testid":`command-palette-semantic-results`,"data-dimmed":ft.results.dimmed,children:E.map(e=>(0,Z.jsx)(py,{entry:e,disabled:ft.results.dimmed,onSelect:()=>Ot(e)},f_(e.kind,e.path)))})}):null]}):null,Mn,Nn,on?null:(0,Z.jsx)(s,{children:_===`error`?(0,Z.jsx)(q,{id:`pkAft1`}):(0,Z.jsx)(q,{id:`i3f2kh`})}),ot.kind===`tag-list`?(0,Z.jsxs)(Ae,{heading:ot.query?o({id:`evs0iw`,values:{tagListQuery:lt}}):o({id:`2QM24L`}),children:[se===`loading`?(0,Z.jsx)(s,{children:(0,Z.jsx)(q,{id:`a_u4ck`})}):null,se===`error`?(0,Z.jsx)(s,{children:(0,Z.jsx)(q,{id:`MZoxVx`})}):null,Bt?(0,Z.jsx)(s,{children:ot.query?o({id:`X0ttSN`,values:{tagListQuery:lt}}):o({id:`JLUTgi`})}):null,zt.map(e=>(0,Z.jsxs)(j,{value:`tag ${e.name}`,onSelect:()=>cn(e.name),"data-testid":`command-palette-tag-${e.name}`,children:[(0,Z.jsx)(hc,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:e.name}),(0,Z.jsx)(`span`,{className:`ml-auto shrink-0 text-[11px] text-muted-foreground tabular-nums`,children:(0,Z.jsx)(q,{id:`fVcm9t`,values:{0:e.count}})})]},`tag:${e.name}`))]}):null,ot.kind===`tag-docs`?(0,Z.jsxs)(Ae,{heading:o({id:`hGmuTc`,values:{tagDocsName:ut}}),children:[fe===`loading`?(0,Z.jsx)(s,{children:(0,Z.jsx)(q,{id:`pWbsW6`})}):null,fe===`error`?(0,Z.jsx)(s,{children:(0,Z.jsx)(q,{id:`48uGTI`})}):null,Vt?(0,Z.jsx)(s,{children:o({id:`NIWAux`,values:{tagDocsName:ut}})}):null,ue.map(e=>{let t=e.title||e.docName.split(`/`).pop()||e.docName,n=e.matchingTags.filter(e=>e!==ot.tagName).map(yy).join(`, `);return(0,Z.jsxs)(j,{value:`tag-doc ${e.docName}`,onSelect:()=>{i(!1),dy(e.docName)},"data-testid":`command-palette-tag-doc-${e.docName}`,className:`items-start`,children:[(0,Z.jsx)(Wn,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:t}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.docName}),e.matchingTags.length>0&&e.matchingTags.some(e=>e!==ot.tagName)?(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-[11px]`,children:(0,Z.jsx)(q,{id:`CvsD6Y`,values:{viaTags:n}})}):null]})]},`tag-doc:${e.docName}`)})]}):null,kt?(0,Z.jsx)(Ae,{heading:o({id:`MmDDWK`}),children:Ge.map(e=>(0,Z.jsx)(py,{entry:e,onSelect:()=>Ot(e)},f_(e.kind,e.path)))}):null,an(`commands`),Rt?(0,Z.jsx)(Ae,{heading:o({id:`O7_W_a`}),children:Xr.filter(e=>{let t=e.displayName;return P_(o({id:`WqLq6M`,values:{displayName:t}}),d,[e.id,`agent handoff`,`open in`])}).map(e=>{let t=Oe[e.id],n=t.installed===!0&&Ue!==null,r=e.displayName,a=t.installed===null?o({id:`IA6JW2`}):t.installed===!1?o({id:`5SwVv1`}):null,s=o(a?{id:`1ZpfyB`,values:{displayName:r,hint:a}}:{id:`WqLq6M`,values:{displayName:r}});return(0,Z.jsxs)(j,{value:`send to ai ${e.displayName} ${e.id} agent open in`,disabled:!n,onSelect:()=>{!n||!Ue||(i(!1),je(e.id,Ue))},"data-testid":`command-palette-open-in-${e.id}`,"aria-label":s,children:[(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`WqLq6M`,values:{displayName:r}})}),a?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-auto text-muted-foreground text-xs`,children:a}):null]},e.id)})}):null,an(`project`),Pt&&a?(0,Z.jsx)(Ae,{heading:o({id:`3iyGWF`}),children:qe.filter(e=>P_(`${e.name} ${e.path}`,d,[`open recent project`])).slice(0,10).map(e=>{let t=e.isLinkedWorktree===!0,n=t?lo:Fh,r=t&&e.mainRoot!==void 0?Kv(e.mainRoot):null;return(0,Z.jsx)(oy,{path:e.path,onRemoveRecent:St,testIdPrefix:`command-palette-recent`,children:(0,Z.jsxs)(`div`,{className:`group/recent relative flex items-center`,children:[(0,Z.jsxs)(j,{value:`${e.name} ${e.path} recent project`,onSelect:()=>bt(()=>a.project.open({path:e.path,target:`new-window`,entryPoint:`recents`}),o({id:`SUOoXn`})),"data-testid":`command-palette-recent-${e.path}`,className:`flex-1 items-start pr-8`,children:[(0,Z.jsx)(n,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:e.name}),r===null?null:(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:(0,Z.jsx)(q,{id:`8Gzz2G`,values:{worktreeOf:r}})}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.path})]})]}),(0,Z.jsx)(ay,{path:e.path,name:e.name,onRemoveRecent:St,testIdPrefix:`command-palette-recent`})]})},e.path)})}):null,It&&a?(0,Z.jsx)(Ae,{heading:o({id:`sxjyRq`}),children:Ft.slice(0,10).map(e=>(0,Z.jsxs)(j,{value:`${e.branch} worktree branch`,onSelect:()=>wt(e),"data-testid":`command-palette-worktree-${e.branch}`,className:`items-start`,children:[(0,Z.jsx)(lo,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:e.branch}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.worktreePath??o({id:`iO8V-7`})})]})]},e.branch))}):null,[`file`,`view`,`terminal`,`app`].map(e=>an(e)),jt?(0,Z.jsx)(Ae,{heading:o({id:`A1taO8`}),children:At.map(e=>(0,Z.jsx)(py,{entry:e,query:f,onSelect:()=>Ot(e)},f_(e.kind,e.path)))}):null]}),In]}),zn,Hn,Un,Gn,Kn,qn]})}function yy(e){return`#${e}`}function by(e){return e.name}function xy(e){return e.branch!==null&&!e.isCurrent}function Sy(e){return f_(e.kind,e.path)}function Cy(e){return e===`eperm`?yl._({id:`XuQzrk`}):yl._({id:`BUyQnq`})}async function wy(e){let t=await e.restartServer(e.config.projectPath);return t.ok?{ok:!0}:{ok:!1,message:Cy(t.reason)}}var Ty=500;function Ey(e,t,n){return t?`terminal`:e===null&&n?`retrying`:`hidden`}function Dy(e){return e?.kind===`null-collab`}function Oy(e){if(e===null)return yl._({id:`Ua78MH`});if(e.kind===`null-collab`)return yl._({id:`TJnkyf`});if(e.code===`network`)return yl._({id:`aoa6xA`});if(e.code===`invalid-body`)return yl._({id:`FRYB1Q`});let t=e.code;return yl._({id:`4nj6n8`,values:{code:t}})}function ky(){let e=(0,$.c)(28),{collabUrl:t,collabTerminal:n,collabLastError:r,retryCollab:i}=Re(),[a,o]=(0,Q.useState)(!1),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(null),d=typeof window<`u`?window.okDesktop:void 0,f,p;e[0]!==n||e[1]!==t?(f=()=>{if(t!==null||n){o(!1);return}let e=setTimeout(()=>o(!0),Ty);return()=>clearTimeout(e)},p=[t,n],e[0]=n,e[1]=t,e[2]=f,e[3]=p):(f=e[2],p=e[3]),(0,Q.useEffect)(f,p);let m=Ey(t,n,a);if(m===`hidden`)return null;if(m===`terminal`){let t;e[4]===r?t=e[5]:(t=Dy(r),e[4]=r,e[5]=t);let n=t,a;e[6]===r?a=e[7]:(a=Oy(r),e[6]=r,e[7]=a);let o=a,f;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=async()=>{if(d){u(null),c(!0);try{let e=await wy(d);e.ok||(u(e.message),c(!1))}catch{c(!1)}}},e[8]=f):f=e[8];let p=f,m;e[9]!==o||e[10]!==n?(m=(0,Z.jsx)(`span`,{children:n?(0,Z.jsx)(q,{id:`AAlr5Y`,components:{0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})}}):(0,Z.jsx)(q,{id:`noH1JX`,values:{errorDetail:o},components:{0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`}),1:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})}})}),e[9]=o,e[10]=n,e[11]=m):m=e[11];let h;e[12]===i?h=e[13]:(h=()=>{u(null),i()},e[12]=i,e[13]=h);let g;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(q,{id:`6gRgw8`}),e[14]=g):g=e[14];let _;e[15]!==s||e[16]!==h?(_=(0,Z.jsx)(`button`,{type:`button`,onClick:h,disabled:s,className:`bg-red-950 text-red-50 px-2 py-0.5 rounded text-xs font-medium hover:bg-red-900 disabled:opacity-60`,children:g}),e[15]=s,e[16]=h,e[17]=_):_=e[17];let v;e[18]===s?v=e[19]:(v=d?(0,Z.jsx)(`button`,{type:`button`,onClick:p,disabled:s,className:`bg-red-950 text-red-50 px-2 py-0.5 rounded text-xs font-medium hover:bg-red-900 disabled:opacity-60`,children:s?(0,Z.jsx)(q,{id:`0Er6-M`}):(0,Z.jsx)(q,{id:`uaUc6t`})}):null,e[18]=s,e[19]=v);let y;e[20]===l?y=e[21]:(y=l===null?null:(0,Z.jsx)(`span`,{className:`w-full text-red-950 text-xs`,children:l}),e[20]=l,e[21]=y);let b;return e[22]!==y||e[23]!==m||e[24]!==_||e[25]!==v?(b=(0,Z.jsxs)(`div`,{role:`alert`,"aria-live":`assertive`,className:`fixed top-0 inset-x-0 z-50 bg-red-500/95 text-red-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md flex items-center justify-center gap-3 flex-wrap`,children:[m,_,v,y]}),e[22]=y,e[23]=m,e[24]=_,e[25]=v,e[26]=b):b=e[26],b}let h;return e[27]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`fixed top-0 inset-x-0 z-50 bg-amber-500/95 text-amber-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md`,children:(0,Z.jsx)(q,{id:`UYcGIW`})}),e[27]=h):h=e[27],h}function Ay(e){let t=(0,$.c)(5),{bridge:n}=e,[r,i]=(0,Q.useState)(!1),a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>Ht(e=>{e===`new-project`&&i(!0)}),o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o);let s;return t[2]!==n||t[3]!==r?(s=(0,Z.jsx)(Ig,{open:r,onOpenChange:i,bridge:n}),t[2]=n,t[3]=r,t[4]=s):s=t[4],s}var jy=`ok-acp-desktop-migration-v1`,My=[`ok-preferred-agent-v1`,`ok-ask-ai-agent-v2`,`ok-ask-ai-default-agent-v1`];function Ny(e){try{return localStorage.getItem(e)}catch{return null}}function Py(){try{localStorage.setItem(jy,`1`)}catch{}}function Fy(){return My.some(e=>Ny(e)!==null)}function Iy(e){return Xr.every(t=>e[t.id]?.installed!=null)?Xr.filter(t=>e[t.id]?.installed===!0).map(e=>e.id):null}function Ly(e){let t=(0,$.c)(3),n,r;t[0]===e?(n=t[1],r=t[2]):(n=()=>{if(Ny(jy)!==null)return;if(!Fy()){Py();return}let t=Iy(e);if(t!==null){for(let e of t)ni(Jr(e),!0);Py()}},r=[e],t[0]=e,t[1]=n,t[2]=r),(0,Q.useEffect)(n,r)}function Ry(){let{states:e}=ts();return Ly(e),null}async function zy(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok){let e=await t.json().catch(()=>null),n=t.status,r=t.statusText;throw Error(kl(e)??yl._({id:`lHwYMr`,values:{status:n,statusText:r}}))}return(await t.json()).docs??[]}function By(){let e=(0,$.c)(18),[t,n]=(0,Q.useState)(!1),[r,i]=(0,Q.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={kind:`idle`},e[0]=a):a=e[0];let[o,s]=(0,Q.useState)(a),c=(0,Q.useRef)(0),l,u;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>{let e=function(e){let t=e.detail;if(!t||typeof t.value!=`string`)return;let r=c.current+=1;i(t.value),n(!0),s({kind:`loading`}),zy(t.value).then(e=>{c.current===r&&s({kind:`ready`,docs:e})}).catch(e=>{c.current===r&&s({kind:`error`,message:e instanceof Error?e.message:String(e)})})};return document.addEventListener(Ce,e),()=>document.removeEventListener(Ce,e)},u=[],e[1]=l,e[2]=u):(l=e[1],u=e[2]),(0,Q.useEffect)(l,u);let d;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=function(e){n(!1),window.location.assign(hu(e))},e[3]=d):d=e[3];let f=d,p=r??``,m;e[4]===p?m=e[5]:(m={tagName:p},e[4]=p,e[5]=m);let h;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(h={0:(0,Z.jsx)(`span`,{className:`font-mono break-all`})},e[6]=h):h=e[6];let g;e[7]===m?g=e[8]:(g=(0,Z.jsx)(_n,{children:(0,Z.jsx)(pn,{children:(0,Z.jsx)(q,{id:`7H4UHD`,values:m,components:h})})}),e[7]=m,e[8]=g);let _=r??``,v;e[9]!==o||e[10]!==_?(v=(0,Z.jsx)(hn,{children:(0,Z.jsx)(Vy,{fetchState:o,tag:_,onSelectDoc:f})}),e[9]=o,e[10]=_,e[11]=v):v=e[11];let y;e[12]!==g||e[13]!==v?(y=(0,Z.jsxs)(mn,{children:[g,v]}),e[12]=g,e[13]=v,e[14]=y):y=e[14];let b;return e[15]!==t||e[16]!==y?(b=(0,Z.jsx)(vn,{open:t,onOpenChange:n,children:y}),e[15]=t,e[16]=y,e[17]=b):b=e[17],b}function Vy(e){let t=(0,$.c)(15),{fetchState:n,tag:r,onSelectDoc:i}=e;if(n.kind===`idle`||n.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-loading`,children:(0,Z.jsx)(q,{id:`yQE2r9`})}),t[0]=e):e=t[0],e}if(n.kind===`error`){let e;return t[1]===n.message?e=t[2]:(e=(0,Z.jsx)(`p`,{className:`text-destructive text-sm`,"data-testid":`tag-dialog-error`,children:n.message}),t[1]=n.message,t[2]=e),e}if(n.docs.length===0){let e;t[3]===r?e=t[4]:(e={tag:r},t[3]=r,t[4]=e);let n;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n={0:(0,Z.jsx)(`span`,{className:`font-mono`})},t[5]=n):n=t[5];let i;return t[6]===e?i=t[7]:(i=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-empty`,children:(0,Z.jsx)(q,{id:`lAiyU_`,values:e,components:n})}),t[6]=e,t[7]=i),i}let a;if(t[8]!==n.docs||t[9]!==i){let e;t[11]===i?e=t[12]:(e=e=>{let t=e.matchingTags??[];return(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`button`,{type:`button`,className:`w-full rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring`,onClick:()=>i(e.docName),"data-testid":`tag-dialog-row`,children:[(0,Z.jsx)(`span`,{className:`block truncate font-medium`,children:e.title}),e.docName===e.title?null:(0,Z.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:e.docName}),t.length>0?(0,Z.jsx)(`span`,{className:`mt-1 flex flex-wrap items-center gap-1`,"data-testid":`tag-dialog-row-matches`,children:t.map(Hy)}):null]})},e.docName)},t[11]=i,t[12]=e),a=n.docs.map(e),t[8]=n.docs,t[9]=i,t[10]=a}else a=t[10];let o;return t[13]===a?o=t[14]:(o=(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1`,"data-testid":`tag-dialog-list`,children:a}),t[13]=a,t[14]=o),o}function Hy(e){return(0,Z.jsxs)(`span`,{"data-testid":`tag-dialog-row-match`,"data-tag":e,className:`tag pointer-events-none text-xs`,children:[`#`,e]},e)}var Uy=`raw-mdx-nav`,Wy=`ok-editor-mode-v1`,Gy=[`wysiwyg`,`source`],Ky=`wysiwyg`;function qy(e){return Gy.includes(e)}function Jy(e=localStorage){try{let t=e.getItem(Wy);if(t===null)return Ky;if(qy(t))return t;console.warn(`[editor-mode] invalid persisted value, falling back to default`,{raw:t})}catch{}return Ky}function Yy(e=window,t=localStorage){let n=e.__OK_EDITOR_MODE__;return qy(n)?n:Jy(t)}function Xy(e,t=localStorage){try{return t.setItem(Wy,e),!0}catch(e){return console.warn(`[editor-mode] persist failed`,e),!1}}function Zy(){let e=(0,$.c)(3),[t,n]=(0,Q.useState)(Yy),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=function(e){n(e),Xy(e)},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a=[t,i],e[1]=t,e[2]=a),a}function Qy(e){let t=(0,$.c)(4),{_:n}=ht(),r=(0,Q.useRef)(!1),i,a;t[0]!==n||t[1]!==e?(i=()=>{e===`no-push-permission`&&!r.current&&(r.current=!0,X.info(n({id:`JkCD2u`})))},a=[e,n],t[0]=n,t[1]=e,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,Q.useEffect)(i,a)}function $y(e,t){return e===`follow`?(0,Z.jsx)(q,{id:`Sxx_Zz`,values:{project:t}}):e===`full`?(0,Z.jsx)(q,{id:`4zEZS5`,values:{project:t}}):(0,Z.jsx)(q,{id:`AaaESH`,values:{project:t}})}function eb(){let e=(0,$.c)(8),{projectLocalConfig:t,projectLocalSynced:n,projectLocalBinding:r}=Qu(),i=(0,Q.useRef)(!1),a;e[0]!==r||e[1]!==t?.autoSync||e[2]!==n?(a=()=>{if(!n||i.current||r===null)return;let e=t?.autoSync;if(e?.inheritedNoticePending!==!0)return;i.current=!0;let a=typeof e.inheritedFrom==`string`?e.inheritedFrom:``;X($y($i({mode:e.mode,enabled:e.enabled}),a)),r.patch({autoSync:{inheritedNoticePending:null}})},e[0]=r,e[1]=t?.autoSync,e[2]=n,e[3]=a):a=e[3];let o;e[4]!==r||e[5]!==t||e[6]!==n?(o=[n,t,r],e[4]=r,e[5]=t,e[6]=n,e[7]=o):o=e[7],(0,Q.useEffect)(a,o)}function tb(e,t){return Sc(e)||(co.find(e=>t[e]===!0)??`claude`)}var nb=`ok-terminal-dock-v1`,rb=`right`;function ib(e){return e===`bottom`?`bottom`:`right`}function ab(e){try{return ib((e??localStorage).getItem(nb))}catch{return rb}}function ob(e,t){try{(t??localStorage).setItem(nb,e)}catch{}}function sb(){try{return typeof localStorage>`u`?rb:ab()}catch{return rb}}function cb(e){let t=(0,$.c)(36),{open:n,variant:r,onResolved:i}=e,{_:a}=ht(),o=uo(),s;t[0]!==a||t[1]!==i||t[2]!==r||t[3]!==o?(s=function(e){if(o===null){X.error(a({id:`fiMNLl`}));return}let t=o(e?r===`follow`?`follow`:`full`:`off`);if(!t.ok){let n=t.error;X.error(a(e?{id:`FUMerq`,values:{detail:n}}:{id:`0t0bbC`,values:{detail:n}}));return}i()},t[0]=a,t[1]=i,t[2]=r,t[3]=o,t[4]=s):s=t[4];let c=s,l;t[5]===r?l=t[6]:(l=(0,Z.jsx)(_n,{children:(0,Z.jsx)(mo,{variant:r})}),t[5]=r,t[6]=l);let u;t[7]===r?u=t[8]:(u=(0,Z.jsx)(go,{variant:r}),t[7]=r,t[8]=u);let d;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(`p`,{className:`mt-3 text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`QYTOaN`,components:{0:(0,Z.jsx)(`span`,{className:`font-medium`})}})}),t[9]=d):d=t[9];let f;t[10]===u?f=t[11]:(f=(0,Z.jsxs)(hn,{children:[u,d]}),t[10]=u,t[11]=f);let p;t[12]===c?p=t[13]:(p=()=>c(!1),t[12]=c,t[13]=p);let m=o===null,h;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(q,{id:`IKoTAC`}),t[14]=h):h=t[14];let g;t[15]!==p||t[16]!==m?(g=(0,Z.jsx)(Y,{variant:`outline`,className:`uppercase font-mono`,onClick:p,disabled:m,children:h}),t[15]=p,t[16]=m,t[17]=g):g=t[17];let _;t[18]===c?_=t[19]:(_=()=>c(!0),t[18]=c,t[19]=_);let v=o===null,y;t[20]===r?y=t[21]:(y=r===`follow`?(0,Z.jsx)(q,{id:`U4nTfu`}):(0,Z.jsx)(q,{id:`XU0OXn`}),t[20]=r,t[21]=y);let b;t[22]!==_||t[23]!==v||t[24]!==y?(b=(0,Z.jsx)(Y,{onClick:_,disabled:v,children:y}),t[22]=_,t[23]=v,t[24]=y,t[25]=b):b=t[25];let x;t[26]!==b||t[27]!==g?(x=(0,Z.jsxs)(gn,{children:[g,b]}),t[26]=b,t[27]=g,t[28]=x):x=t[28];let S;t[29]!==x||t[30]!==l||t[31]!==f?(S=(0,Z.jsxs)(mn,{className:`sm:max-w-lg`,showCloseButton:!1,children:[l,f,x]}),t[29]=x,t[30]=l,t[31]=f,t[32]=S):S=t[32];let C;return t[33]!==n||t[34]!==S?(C=(0,Z.jsx)(vn,{open:n,onOpenChange:lb,children:S}),t[33]=n,t[34]=S,t[35]=C):C=t[35],C}function lb(){}function ub(e){if(!(!e.autoSyncOnboardingDismissed&&e.hasRemote===!0&&e.projectLocalSynced===!0&&e.projectSynced===!0&&e.projectLocalConfig!==null&&$i(e.projectLocalConfig.autoSync??void 0)===null&&mi(e.projectConfig?.autoSync?.default)===null))return null;switch(e.pushPermissionCheckStatus){case`allowed`:return`full`;case`denied`:return`follow`;default:return null}}var db=new Map(Xa.map(e=>[e.id,e.alias]));function fb(e,t,n){return oo({relativePath:Qs(e),source:t.source,code:t.code,ruleAlias:t.source===`markdownlint`?db.get(t.code):void 0,message:t.message,line:t.range.start.line+1,column:t.range.start.character+1,lineText:n})}var pb=5;async function mb(e){let t=await fetch(`/api/backlinks?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=ma.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new Dn(yl._({id:`XopE_I`,values:{status:r}}),{status:r})}let r=ga.safeParse(n);if(!r.success)throw new Dn(yl._({id:`lZAiSP`}),{status:t.status});return r.data.backlinks}async function hb(e){let t=await fetch(`/api/forward-links?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=ma.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new Dn(yl._({id:`GemPfn`,values:{status:r}}),{status:r})}let r=pi.safeParse(n);if(!r.success)throw new Dn(yl._({id:`2YZwPB`}),{status:t.status});return r.data.forwardLinks}function gb(e){let t=e.split(`/`);return t.length<=2?e:`…/${t.slice(-2).join(`/`)}`}function _b(e){window.location.hash=hu(e)}function vb(e){let t=(0,$.c)(9),{title:n,count:r,isLoading:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(Lo,{className:`size-3.5 text-muted-foreground transition-transform group-data-[state=closed]:-rotate-90`}),t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o=(0,Z.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[a,(0,Z.jsx)(Id,{children:n})]}),t[1]=n,t[2]=o);let s;t[3]!==r||t[4]!==i?(s=!i&&(0,Z.jsx)(Fd,{children:r}),t[3]=r,t[4]=i,t[5]=s):s=t[5];let c;return t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(un,{className:`group flex w-full cursor-pointer items-center justify-between px-5 py-3 text-left transition-colors hover:bg-muted/40`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function yb(e){let t=(0,$.c)(10),{total:n,expanded:r,onToggle:i}=e;if(n<=pb)return null;let a=n-pb,o;t[0]===r?o=t[1]:(o=r?(0,Z.jsx)(Lo,{className:`size-3`}):(0,Z.jsx)(Ro,{className:`size-3`}),t[0]=r,t[1]=o);let s;t[2]!==r||t[3]!==a?(s=r?(0,Z.jsx)(q,{id:`6fGjTz`}):(0,Z.jsx)(q,{id:`ZptNUh`,values:{hidden:a}}),t[2]=r,t[3]=a,t[4]=s):s=t[4];let c;return t[5]!==r||t[6]!==i||t[7]!==o||t[8]!==s?(c=(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,className:`mt-2 inline-flex cursor-pointer items-center gap-1 px-3 text-xs text-muted-foreground transition-colors hover:text-foreground`,onClick:i,children:[o,s]}),t[5]=r,t[6]=i,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function bb(e){let t=(0,$.c)(35),{icon:n,iconColorClass:r,rowTooltip:i,title:a,path:o,anchor:s,snippet:c,titleHover:l,ariaLabel:u,href:d,external:f,disabled:p,onClick:m}=e,h=o!==void 0&&o!==a,g=r??`text-muted-foreground`,_;t[0]===g?_=t[1]:(_=J(`mt-0.5 shrink-0`,g),t[0]=g,t[1]=_);let v;t[2]!==n||t[3]!==_?(v=(0,Z.jsx)(`span`,{className:_,children:n}),t[2]=n,t[3]=_,t[4]=v):v=t[4];let y=v,b;t[5]!==u||t[6]!==p||t[7]!==f||t[8]!==d||t[9]!==m||t[10]!==a||t[11]!==l?(b=d?(0,Z.jsxs)(`a`,{href:d,target:f?`_blank`:void 0,rel:f?`noopener noreferrer`:void 0,"aria-label":u,title:l,onClick:m,className:`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,children:[a,f?(0,Z.jsxs)(`span`,{className:`sr-only`,children:[` `,(0,Z.jsx)(q,{id:`dbtjJh`})]}):null]}):(0,Z.jsx)(`button`,{type:`button`,"aria-label":u,title:l,disabled:p,onClick:m,className:J(`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,`cursor-pointer bg-transparent p-0 disabled:cursor-not-allowed disabled:opacity-60`),children:a}),t[5]=u,t[6]=p,t[7]=f,t[8]=d,t[9]=m,t[10]=a,t[11]=l,t[12]=b):b=t[12];let x=b,S;t[13]===y?S=t[14]:(S=(0,Z.jsx)(`div`,{className:`mt-px flex items-center`,children:y}),t[13]=y,t[14]=S);let C;t[15]!==s||t[16]!==o||t[17]!==h?(C=h?(0,Z.jsxs)(`div`,{className:`truncate font-mono text-xs text-muted-foreground`,children:[o,s?(0,Z.jsxs)(`span`,{className:`ml-1`,children:[`· #`,s]}):null]}):null,t[15]=s,t[16]=o,t[17]=h,t[18]=C):C=t[18];let w;t[19]===c?w=t[20]:(w=c?(0,Z.jsx)(`p`,{className:`line-clamp-2 text-muted-foreground`,children:c}):null,t[19]=c,t[20]=w);let T;t[21]!==x||t[22]!==C||t[23]!==w?(T=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5 text-1sm`,children:[x,C,w]}),t[21]=x,t[22]=C,t[23]=w,t[24]=T):T=t[24];let E;t[25]!==S||t[26]!==T?(E=(0,Z.jsxs)(`div`,{className:`group relative flex items-start gap-2.5 rounded-md px-3 py-2.5 transition-colors hover:bg-muted/80`,children:[S,T]}),t[25]=S,t[26]=T,t[27]=E):E=t[27];let D=E;if(i){let e;t[28]===D?e=t[29]:(e=(0,Z.jsx)(an,{asChild:!0,children:D}),t[28]=D,t[29]=e);let n;t[30]===i?n=t[31]:(n=(0,Z.jsx)(on,{side:`top`,children:i}),t[30]=i,t[31]=n);let r;return t[32]!==e||t[33]!==n?(r=(0,Z.jsxs)(cn,{children:[e,n]}),t[32]=e,t[33]=n,t[34]=r):r=t[34],r}return D}function xb(e){let t=(0,$.c)(39),{docName:n}=e,{_:r}=ht(),{folderPaths:i,pages:a,pagesBySlug:o,pagesByBasename:s,loading:c}=Vo(),l,u;t[0]===n?(l=t[1],u=t[2]):(l=[`backlinks`,n],u=()=>mb(n),t[0]=n,t[1]=l,t[2]=u);let d;t[3]!==n||t[4]!==c||t[5]!==a?(d=!c&&(a.has(n)||ka(n)),t[3]=n,t[4]=c,t[5]=a,t[6]=d):d=t[6];let f;t[7]!==l||t[8]!==u||t[9]!==d?(f={queryKey:l,queryFn:u,enabled:d},t[7]=l,t[8]=u,t[9]=d,t[10]=f):f=t[10];let{data:p,isLoading:m,error:h}=Mt(f),g;t[11]===p?g=t[12]:(g=p===void 0?[]:p,t[11]=p,t[12]=g);let _=g,[v,y]=(0,Q.useState)(!1),[b,x]=(0,Q.useState)(n);b!==n&&(x(n),y(!1));let S;t[13]!==_||t[14]!==v?(S=v?_:_.slice(0,pb),t[13]=_,t[14]=v,t[15]=S):S=t[15];let C=S,w;t[16]===r?w=t[17]:(w=r({id:`9NJWgv`}),t[16]=r,t[17]=w);let T;t[18]!==_.length||t[19]!==m||t[20]!==w?(T=(0,Z.jsx)(vb,{title:w,count:_.length,isLoading:m}),t[18]=_.length,t[19]=m,t[20]=w,t[21]=T):T=t[21];let E;t[22]!==r||t[23]!==_.length||t[24]!==h||t[25]!==v||t[26]!==i||t[27]!==m||t[28]!==a||t[29]!==s||t[30]!==o||t[31]!==C?(E=h?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(jd,{children:h instanceof Error?h.message:r({id:`Xet9MX`})})}):_.length===0&&!m?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Md,{children:(0,Z.jsx)(q,{id:`rVxu1k`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:C.map((e,t)=>{let n=Rd(e.source,{pages:a,folderPaths:i,pagesBySlug:o,pagesByBasename:s});return(0,Z.jsx)(bb,{icon:(0,Z.jsx)(de,{className:`size-3.5`}),title:e.title,path:gb(e.source),titleHover:e.source,anchor:e.anchor,snippet:e.snippet,href:hu(n.hashDocName,e.anchor)},`${e.source}-${t}`)})}),(0,Z.jsx)(yb,{total:_.length,expanded:v,onToggle:()=>y(Sb)})]}),t[22]=r,t[23]=_.length,t[24]=h,t[25]=v,t[26]=i,t[27]=m,t[28]=a,t[29]=s,t[30]=o,t[31]=C,t[32]=E):E=t[32];let D;t[33]!==m||t[34]!==E?(D=(0,Z.jsx)(ln,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":m,children:E})}),t[33]=m,t[34]=E,t[35]=D):D=t[35];let O;return t[36]!==D||t[37]!==T?(O=(0,Z.jsxs)(dn,{defaultOpen:!0,children:[T,D]}),t[36]=D,t[37]=T,t[38]=O):O=t[38],O}function Sb(e){return!e}function Cb(e){let t=(0,$.c)(49),{docName:n}=e,{_:r}=ht(),{addPage:i,folderPaths:a,pages:o,pagesBySlug:s,pagesByBasename:c,loading:l}=Vo(),u,d;t[0]===n?(u=t[1],d=t[2]):(u=[`forward-links`,n],d=()=>hb(n),t[0]=n,t[1]=u,t[2]=d);let f;t[3]!==n||t[4]!==o||t[5]!==l?(f=!l&&(o.has(n)||ka(n)),t[3]=n,t[4]=o,t[5]=l,t[6]=f):f=t[6];let p;t[7]!==u||t[8]!==d||t[9]!==f?(p={queryKey:u,queryFn:d,enabled:f},t[7]=u,t[8]=d,t[9]=f,t[10]=p):p=t[10];let{data:m,isLoading:h,error:g}=Mt(p),_;t[11]===m?_=t[12]:(_=m===void 0?[]:m,t[11]=m,t[12]=_);let v=_,[y,b]=(0,Q.useState)(null),[x,S]=(0,Q.useState)(!1),[C,w]=(0,Q.useState)(n);C!==n&&(w(n),S(!1),b(null));let T;t[13]!==x||t[14]!==v?(T=x?v:v.slice(0,pb),t[13]=x,t[14]=v,t[15]=T):T=t[15];let E=T,D;t[16]!==r||t[17]!==i||t[18]!==y?(D=async function(e,t){if(!y){b(t);try{await B(e,{addPage:i,onCreated:_b}),b(null)}catch(e){let t=e;X.error(t instanceof Error?t.message:r({id:`tfi40B`})),b(null)}}},t[16]=r,t[17]=i,t[18]=y,t[19]=D):D=t[19];let O=D,k;t[20]!==r||t[21]!==y||t[22]!==a||t[23]!==O||t[24]!==o||t[25]!==c||t[26]!==s||t[27]!==l?(k=function(e){let{title:t}=e;if(e.kind===`external`){let t=e.title===e.url;return(0,Z.jsx)(bb,{icon:(0,Z.jsx)(_o,{className:`size-3.5`}),rowTooltip:r({id:`XDzAnp`}),title:e.title,path:t?void 0:e.url,titleHover:e.url,snippet:e.snippet,href:e.url,external:!0},`ext:${e.url}`)}let n=Sn(e.docName,{pages:o,folderPaths:a,pagesBySlug:s,pagesByBasename:c}),i=!l&&n.kind===`create`,u=!l&&n.kind===`navigate`&&n.displayState===`folder`,d=gb(e.docName),f=e.title===e.docName?d:e.title,p=`doc:${e.docName}:${e.anchor??``}`,m=n.kind===`navigate`?n.hashDocName:e.docName,h=n.kind===`navigate`&&n.hash?n.hash:hu(m,e.anchor);if(i&&n.kind===`create`){let i={initialDir:n.initialDir,suggestedName:n.suggestedName};return(0,Z.jsx)(bb,{icon:(0,Z.jsx)(sl,{className:`size-3.5`}),iconColorClass:`text-amber-600 dark:text-amber-400`,rowTooltip:r(y===p?{id:`kj9pAE`}:{id:`IQPyrD`}),ariaLabel:r(y===p?{id:`un8kBM`,values:{linkTitle:t}}:{id:`jEdF24`,values:{linkTitle:t}}),title:f,path:d,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,disabled:y!==null,onClick:()=>void O(i,p)},p)}return u&&n.kind===`navigate`?(0,Z.jsx)(bb,{icon:(0,Z.jsx)(Fh,{className:`size-3.5`}),iconColorClass:`text-sky-600 dark:text-sky-400`,ariaLabel:r({id:`P6lAT3`,values:{linkTitle:t}}),title:f,path:d,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:h},p):(0,Z.jsx)(bb,{icon:(0,Z.jsx)(de,{className:`size-3.5`}),title:f,path:d,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:h},p)},t[20]=r,t[21]=y,t[22]=a,t[23]=O,t[24]=o,t[25]=c,t[26]=s,t[27]=l,t[28]=k):k=t[28];let A=k,j;t[29]===r?j=t[30]:(j=r({id:`O0Z2Xr`}),t[29]=r,t[30]=j);let M;t[31]!==h||t[32]!==v.length||t[33]!==j?(M=(0,Z.jsx)(vb,{title:j,count:v.length,isLoading:h}),t[31]=h,t[32]=v.length,t[33]=j,t[34]=M):M=t[34];let N;t[35]!==r||t[36]!==g||t[37]!==x||t[38]!==h||t[39]!==v.length||t[40]!==A||t[41]!==E?(N=g?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(jd,{children:g instanceof Error?g.message:r({id:`pZAs1T`})})}):v.length===0&&!h?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Md,{children:(0,Z.jsx)(q,{id:`roiUQQ`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:E.map(A)}),(0,Z.jsx)(yb,{total:v.length,expanded:x,onToggle:()=>S(wb)})]}),t[35]=r,t[36]=g,t[37]=x,t[38]=h,t[39]=v.length,t[40]=A,t[41]=E,t[42]=N):N=t[42];let P;t[43]!==h||t[44]!==N?(P=(0,Z.jsx)(ln,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":h,children:N})}),t[43]=h,t[44]=N,t[45]=P):P=t[45];let F;return t[46]!==M||t[47]!==P?(F=(0,Z.jsxs)(dn,{defaultOpen:!0,children:[M,P]}),t[46]=M,t[47]=P,t[48]=F):F=t[48],F}function wb(e){return!e}function Tb(e){let t=(0,$.c)(11),{docName:n,className:r}=e,i=r===void 0?``:r,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(Cb,{docName:n}),t[0]=n,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(Br,{}),t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,Z.jsx)(xb,{docName:n}),t[3]=n,t[4]=s);let c;t[5]!==a||t[6]!==s?(c=(0,Z.jsxs)(Nd,{className:`px-0 py-0`,children:[a,o,s]}),t[5]=a,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==i||t[9]!==c?(l=(0,Z.jsx)(Ld,{className:i,children:c}),t[8]=i,t[9]=c,t[10]=l):l=t[10],l}function Eb(e){let t=e.setTimer??((e,t)=>setTimeout(e,t)),n=e.clearTimer??(e=>clearTimeout(e)),r=!1,i=!1,a=null,o=null,s=e.baseMs,c=!1,l=n=>{if(!r){if(e.isPaused()){c=!0;return}a=t(u,n)}};async function u(){if(a=null,c=!1,r)return;if(e.isPaused()){c=!0;return}o=new AbortController;let t=o.signal;try{let n=await e.poll(t);if(r)return;n===`ok`?(s=e.baseMs,l(e.baseMs)):(s=Math.min(s*2,e.maxBackoffMs),l(s))}catch{if(r||t.aborted)return;s=Math.min(s*2,e.maxBackoffMs),l(s)}}return{start(){r||i||(i=!0,u())},resume(){r||!e.isPaused()&&c&&a===null&&(c=!1,u())},stop(){r=!0,a!==null&&(n(a),a=null),o?.abort()}}}var Db=1e4,Ob=6e4;async function kb(e,t,n){try{let r=await fetch(`/api/history?docName=${encodeURIComponent(e)}&limit=100`,{signal:t});if(!r.ok)return n.setError(n.unavailableMessage),`error`;let i=await r.json();return n.setEntries((i.entries??[]).filter(e=>e.type!==`checkpoint`)),n.setError(null),`ok`}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)throw e;return n.setError(n.unavailableMessage),console.error(`[timeline]`,e),`error`}finally{t.aborted||n.setLoading(!1)}}function Ab(e){let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/1e3);if(r<60)return yl._({id:`xOTzt5`});if(r<3600){let e=Math.floor(r/60);return yl._({id:`UyROxs`,values:{mins:e}})}if(r<86400){let e=Math.floor(r/3600);return yl._({id:`wXO4Tg`,values:{hrs:e}})}if(r<86400*2)return yl._({id:`rQRrkB`});let i=Math.floor(r/86400);return i<7?yl._({id:`6u9LvN`,values:{days:i}}):t.toLocaleDateString()}function jb(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function Mb(e){if(e.type===`upstream`)return{kind:`upstream`};let t=e.message,n=/^rollback: .+ to ([0-9a-f]{7,40})$/.exec(t);if(n)return{kind:`restore`,targetSha7:n[1].slice(0,7)};let r=/^rename: (.+) -> (.+)$/.exec(t);return r?{kind:`rename`,from:r[1],to:r[2]}:t.startsWith(`reconcile: `)?{kind:`reconcile`}:t.startsWith(`import: `)?{kind:`upstream`}:{kind:`edit`}}function Nb(e){return e.split(`/`).pop()??e}function Pb(e){return e.type===`upstream`?yl._({id:`K_vT1F`}):e.contributors.length===1?e.contributors[0].name:e.contributors.length>1?e.contributors.map(e=>e.name).join(`, `):e.author===`openknowledge-server`||e.author===`server`?yl._({id:`B2DrPb`}):e.author}function Fb(e){let t=(0,$.c)(17),{entry:n,isDark:r}=e;if(n.type===`upstream`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(lo,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[0]=e):e=t[0],e}if(n.contributors.length>0){let e=n.contributors[0],i=e.colorSeed??e.name,a;t[1]===i?a=t[2]:(a=ua(i),t[1]=i,t[2]=a);let o=a,s=r?Ra[o]??Qa[o]:Qa[o],c;t[3]!==s||t[4]!==i?(c=s??Ha(i),t[3]=s,t[4]=i,t[5]=c):c=t[5];let l=c;if(o!==`bot`){let e;t[6]===l?e=t[7]:(e={color:l},t[6]=l,t[7]=e);let n;return t[8]!==o||t[9]!==e?(n=(0,Z.jsx)(Kd,{icon:o,width:14,height:14,className:`shrink-0`,style:e}),t[8]=o,t[9]=e,t[10]=n):n=t[10],n}if(e.name===`File System`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Lh,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[11]=e):e=t[11],e}if(e.name===`OpenKnowledge (service)`||e.name===`Git (upstream)`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(ho,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[12]=e):e=t[12],e}let u;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(Dg,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[13]=u):u=t[13],u}if(n.authorEmail.includes(`agent`)||n.author.includes(`agent`)||n.authorEmail.includes(`cursor`)||n.authorEmail.includes(`claude`)){let e;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(qs,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[14]=e):e=t[14],e}if(n.author===`openknowledge-server`||n.author===`server`){let e;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(ho,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[15]=e):e=t[15],e}let i;return t[16]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(Dg,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[16]=i):i=t[16],i}function Ib(e){let t=[];for(let n of e.contributors)if(n.summaries)for(let e of n.summaries)t.push(e);return t}function Lb(e){let t=(0,$.c)(21),{summaries:n}=e,[r,i]=(0,Q.useState)(!1),a=(0,Q.useId)();if(n.length===0)return null;let o,s;t[0]===n?(o=t[1],s=t[2]):([o,...s]=n,t[0]=n,t[1]=o,t[2]=s);let c=s.length,l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`• `}),t[3]=l):l=t[3];let u;t[4]===o?u=t[5]:(u=(0,Z.jsxs)(`li`,{className:`text-xs text-foreground/90`,children:[l,o]}),t[4]=o,t[5]=u);let d;t[6]!==r||t[7]!==s?(d=r&&s.map(zb),t[6]=r,t[7]=s,t[8]=d):d=t[8];let f;t[9]!==a||t[10]!==u||t[11]!==d?(f=(0,Z.jsxs)(`ul`,{id:a,className:`list-none`,children:[u,d]}),t[9]=a,t[10]=u,t[11]=d,t[12]=f):f=t[12];let p;t[13]!==r||t[14]!==c||t[15]!==a||t[16]!==s.length?(p=s.length>0&&(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,"aria-controls":a,className:`inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:e=>{e.stopPropagation(),i(Rb)},children:[r?(0,Z.jsx)(Lo,{className:`size-3`}):(0,Z.jsx)(Ro,{className:`size-3`}),r?(0,Z.jsx)(q,{id:`vLyv1R`}):(0,Z.jsx)(q,{id:`ZptNUh`,values:{hidden:c}})]}),t[13]=r,t[14]=c,t[15]=a,t[16]=s.length,t[17]=p):p=t[17];let m;return t[18]!==f||t[19]!==p?(m=(0,Z.jsxs)(`div`,{className:`mt-0.5`,children:[f,p]}),t[18]=f,t[19]=p,t[20]=m):m=t[20],m}function Rb(e){return!e}function zb(e,t){return(0,Z.jsxs)(`li`,{className:`text-xs text-foreground/90`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`• `}),e]},`${t}-${e}`)}function Bb(e){let t=(0,$.c)(36),{descriptor:n,allDocs:r,versionBySha7:i,onJumpToVersion:a}=e,{_:o}=ht();if(n.kind===`restore`){let e,r;t[0]!==o||t[1]!==n.targetSha7||t[2]!==i?(r=i.get(n.targetSha7),e=o(r?{id:`sICrVf`,values:{0:jb(r.timestamp)}}:{id:`i09An-`,values:{0:n.targetSha7}}),t[0]=o,t[1]=n.targetSha7,t[2]=i,t[3]=e,t[4]=r):(e=t[3],r=t[4]);let s=e,c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)($c,{className:`size-3 shrink-0`,"aria-hidden":!0}),t[5]=c):c=t[5];let l;return t[6]!==n.targetSha7||t[7]!==s||t[8]!==a||t[9]!==r?(l=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[c,r?(0,Z.jsx)(`button`,{type:`button`,className:`truncate text-left underline-offset-2 hover:text-foreground hover:underline`,title:s,onClick:e=>{e.stopPropagation(),a(n.targetSha7)},children:s}):(0,Z.jsx)(`span`,{className:`truncate`,title:s,children:s})]}),t[6]=n.targetSha7,t[7]=s,t[8]=a,t[9]=r,t[10]=l):l=t[10],l}if(n.kind===`rename`){let e=`${n.from} → ${n.to}`,r;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(fh,{className:`size-3 shrink-0`,"aria-hidden":!0}),t[11]=r):r=t[11];let i;t[12]!==o||t[13]!==n.from||t[14]!==n.to?(i=o({id:`GkYV_4`,values:{0:Nb(n.from),1:Nb(n.to)}}),t[12]=o,t[13]=n.from,t[14]=n.to,t[15]=i):i=t[15];let a;t[16]===i?a=t[17]:(a=(0,Z.jsx)(`span`,{className:`truncate`,children:i}),t[16]=i,t[17]=a);let s;return t[18]!==e||t[19]!==a?(s=(0,Z.jsxs)(`p`,{className:`flex items-center gap-1 truncate text-xs text-muted-foreground`,title:e,children:[r,a]}),t[18]=e,t[19]=a,t[20]=s):s=t[20],s}if(n.kind===`reconcile`){let e;t[21]===o?e=t[22]:(e=o({id:`0qyKG6`}),t[21]=o,t[22]=e);let n;return t[23]===e?n=t[24]:(n=(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:e}),t[23]=e,t[24]=n),n}if(r.length>0){let e;t[25]===r?e=t[26]:(e=r.join(`, `),t[25]=r,t[26]=e);let n;t[27]===r?n=t[28]:(n=r.join(`, `),t[27]=r,t[28]=n);let i;return t[29]!==e||t[30]!==n?(i=(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,title:e,children:n}),t[29]=e,t[30]=n,t[31]=i):i=t[31],i}if(n.kind===`upstream`)return null;let s;t[32]===o?s=t[33]:(s=o({id:`MRZxAn`}),t[32]=o,t[33]=s);let c;return t[34]===s?c=t[35]:(c=(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:s}),t[34]=s,t[35]=c),c}function Vb(e){let t=(0,$.c)(122),{entry:n,isDark:r,docName:i,laterEdits:a,onRestoreSuccess:o,versionBySha7:s,onJumpToVersion:c,registerRowRef:l,flashing:u}=e,{_:d}=ht(),f;t[0]===n.timestamp?f=t[1]:(f=Ab(n.timestamp),t[0]=n.timestamp,t[1]=f);let p=f,m;t[2]===n?m=t[3]:(m=Pb(n),t[2]=n,t[3]=m);let h=m,g;t[4]===n.timestamp?g=t[5]:(g=jb(n.timestamp),t[4]=n.timestamp,t[5]=g);let _=g,v;t[6]===n.contributors?v=t[7]:(v=n.contributors.flatMap(Hb),t[6]=n.contributors,t[7]=v);let y=v,b;t[8]===n?b=t[9]:(b=Ib(n),t[8]=n,t[9]=b);let x=b,S;t[10]===n?S=t[11]:(S=Mb(n),t[10]=n,t[11]=S);let C=S,[w,T]=(0,Q.useState)(!1),[E,D]=(0,Q.useState)(!1),O=(0,Q.useRef)(null),k=ul(),A=k?.docName===i&&k.sha===n.sha,j,M;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>()=>O.current?.abort(),M=[],t[12]=j,t[13]=M):(j=t[12],M=t[13]),(0,Q.useEffect)(j,M);let N;t[14]!==_||t[15]!==h||t[16]!==i||t[17]!==n.parentSha||t[18]!==n.sha||t[19]!==a||t[20]!==p?(N=()=>{qd(),ll({docName:i,sha:n.sha,parentSha:n.parentSha??null,laterEdits:a,authorName:h,relativeTime:p,absoluteTime:_})},t[14]=_,t[15]=h,t[16]=i,t[17]=n.parentSha,t[18]=n.sha,t[19]=a,t[20]=p,t[21]=N):N=t[21];let P=N,F;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(F=function(){O.current?.abort(),O.current=null,D(!1),T(!1)},t[22]=F):F=t[22];let I=F,L;t[23]!==d||t[24]!==i||t[25]!==n.sha||t[26]!==o?(L=async function(){D(!0);let e=new AbortController;O.current=e;let t=function(){e.signal.aborted||D(!1),O.current===e&&(O.current=null)},r;try{r=await fetch(`/api/rollback`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({docName:i,commitSha:n.sha}),signal:e.signal})}catch(r){let a=r;!e.signal.aborted&&!(a instanceof DOMException&&a.name===`AbortError`)&&(console.error(`[timeline] rollback fetch failed`,{docName:i,sha:n.sha,err:a}),X.error(d({id:`NkXEFS`}),{duration:4e3})),t();return}if(e.signal.aborted){t();return}if(r.ok)T(!1),o();else{let e=`HTTP ${r.status}`;try{let t=ma.safeParse(await r.json());t.success&&(e=t.data.title)}catch{}console.error(`[timeline] rollback failed`,{docName:i,sha:n.sha,status:r.status,detail:e}),X.error(d({id:`uM6jnS`}),{description:e,duration:6e3})}t()},t[23]=d,t[24]=i,t[25]=n.sha,t[26]=o,t[27]=L):L=t[27];let R=L,z;t[28]!==n||t[29]!==r?(z=(0,Z.jsx)(Fb,{entry:n,isDark:r}),t[28]=n,t[29]=r,t[30]=z):z=t[30];let B=z,V=u?`ring-2 ring-ring ring-offset-1 ring-offset-background`:``,H;t[31]===V?H=t[32]:(H=[`flex flex-col rounded-lg transition-shadow`,V],t[31]=V,t[32]=H);let U=H.join(` `),W=A?`bg-muted`:`hover:bg-muted/80`,G;t[33]===W?G=t[34]:(G=[`group flex w-full items-start gap-2.5 rounded-lg px-3 py-2.5 text-left transition-colors cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring`,W],t[33]=W,t[34]=G);let K=G.join(` `),ee;t[35]===P?ee=t[36]:(ee=e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),P())},t[35]=P,t[36]=ee);let te;t[37]===B?te=t[38]:(te=(0,Z.jsx)(`span`,{className:`mt-0.5 shrink-0`,children:B}),t[37]=B,t[38]=te);let ne;t[39]===h?ne=t[40]:(ne=(0,Z.jsx)(`span`,{className:`truncate text-xs text-foreground`,children:h}),t[39]=h,t[40]=ne);let re;t[41]!==n.timestamp||t[42]!==p?(re=(0,Z.jsx)(`time`,{className:`ml-auto shrink-0 text-xs text-muted-foreground/80`,dateTime:n.timestamp,title:n.timestamp,children:p}),t[41]=n.timestamp,t[42]=p,t[43]=re):re=t[43];let ie;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`h-3 w-px shrink-0 bg-border`}),t[44]=ie):ie=t[44];let ae;t[45]===d?ae=t[46]:(ae=d({id:`Yea-K5`}),t[45]=d,t[46]=ae);let oe;t[47]!==R||t[48]!==a?(oe=e=>{e.stopPropagation(),a>0?T(!0):R()},t[47]=R,t[48]=a,t[49]=oe):oe=t[49];let se;t[50]===E?se=t[51]:(se=E?(0,Z.jsx)(qc,{className:`size-3 animate-spin`}):(0,Z.jsx)(cl,{className:`size-3`}),t[50]=E,t[51]=se);let ce;t[52]!==E||t[53]!==ae||t[54]!==oe||t[55]!==se?(ce=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon`,className:`size-5 shrink-0 text-muted-foreground hover:text-destructive`,"data-testid":`timeline-entry-restore`,"aria-label":ae,disabled:E,onClick:oe,children:se})}),t[52]=E,t[53]=ae,t[54]=oe,t[55]=se,t[56]=ce):ce=t[56];let le;t[57]===d?le=t[58]:(le=d({id:`Yea-K5`}),t[57]=d,t[58]=le);let ue;t[59]===le?ue=t[60]:(ue=(0,Z.jsx)(on,{side:`top`,children:le}),t[59]=le,t[60]=ue);let de;t[61]!==ce||t[62]!==ue?(de=(0,Z.jsxs)(cn,{children:[ce,ue]}),t[61]=ce,t[62]=ue,t[63]=de):de=t[63];let fe;t[64]!==ne||t[65]!==re||t[66]!==de?(fe=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[ne,re,ie,de]}),t[64]=ne,t[65]=re,t[66]=de,t[67]=fe):fe=t[67];let pe;t[68]===x?pe=t[69]:(pe=x.length>0&&(0,Z.jsx)(Lb,{summaries:x}),t[68]=x,t[69]=pe);let me;t[70]!==y||t[71]!==C||t[72]!==c||t[73]!==s?(me=(0,Z.jsx)(Bb,{descriptor:C,allDocs:y,versionBySha7:s,onJumpToVersion:c}),t[70]=y,t[71]=C,t[72]=c,t[73]=s,t[74]=me):me=t[74];let he;t[75]!==fe||t[76]!==pe||t[77]!==me?(he=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[fe,pe,me]}),t[75]=fe,t[76]=pe,t[77]=me,t[78]=he):he=t[78];let ge;t[79]!==P||t[80]!==A||t[81]!==K||t[82]!==ee||t[83]!==te||t[84]!==he?(ge=(0,Z.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-pressed":A,"data-testid":`timeline-entry-open`,className:K,onClick:P,onKeyDown:ee,children:[te,he]}),t[79]=P,t[80]=A,t[81]=K,t[82]=ee,t[83]=te,t[84]=he,t[85]=ge):ge=t[85];let _e;t[86]!==l||t[87]!==U||t[88]!==ge?(_e=(0,Z.jsx)(`div`,{ref:l,className:U,children:ge}),t[86]=l,t[87]=U,t[88]=ge,t[89]=_e):_e=t[89];let ve;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(ve=e=>{e?T(!0):I()},t[90]=ve):ve=t[90];let ye;t[91]===d?ye=t[92]:(ye=d({id:`n3wx1q`}),t[91]=d,t[92]=ye);let be;t[93]===ye?be=t[94]:(be=(0,Z.jsx)(pn,{children:ye}),t[93]=ye,t[94]=be);let xe;t[95]===a?xe=t[96]:(xe=(0,Z.jsx)(q,{id:`nfPccR`,values:{laterEdits:a}}),t[95]=a,t[96]=xe);let Se;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,Z.jsx)(q,{id:`5ZbJFS`}),t[97]=Se):Se=t[97];let Ce;t[98]===xe?Ce=t[99]:(Ce=(0,Z.jsxs)(fn,{children:[xe,` `,Se]}),t[98]=xe,t[99]=Ce);let we;t[100]!==be||t[101]!==Ce?(we=(0,Z.jsxs)(_n,{children:[be,Ce]}),t[100]=be,t[101]=Ce,t[102]=we):we=t[102];let Te;t[103]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,Z.jsx)(Y,{variant:`outline`,"data-testid":`timeline-entry-restore-cancel`,onClick:I,children:(0,Z.jsx)(q,{id:`dEgA5A`})}),t[103]=Te):Te=t[103];let Ee;t[104]===R?Ee=t[105]:(Ee=()=>R(),t[104]=R,t[105]=Ee);let De;t[106]===E?De=t[107]:(De=E?(0,Z.jsx)(qc,{className:`mr-2 size-4 animate-spin`}):null,t[106]=E,t[107]=De);let Oe;t[108]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,Z.jsx)(q,{id:`yKu_3Y`}),t[108]=Oe):Oe=t[108];let ke;t[109]!==E||t[110]!==Ee||t[111]!==De?(ke=(0,Z.jsxs)(gn,{children:[Te,(0,Z.jsxs)(Y,{variant:`destructive`,"data-testid":`timeline-entry-restore-confirm`,disabled:E,onClick:Ee,children:[De,Oe]})]}),t[109]=E,t[110]=Ee,t[111]=De,t[112]=ke):ke=t[112];let Ae;t[113]!==we||t[114]!==ke?(Ae=(0,Z.jsxs)(mn,{children:[we,ke]}),t[113]=we,t[114]=ke,t[115]=Ae):Ae=t[115];let je;t[116]!==w||t[117]!==Ae?(je=(0,Z.jsx)(vn,{open:w,onOpenChange:ve,children:Ae}),t[116]=w,t[117]=Ae,t[118]=je):je=t[118];let Me;return t[119]!==_e||t[120]!==je?(Me=(0,Z.jsxs)(Z.Fragment,{children:[_e,je]}),t[119]=_e,t[120]=je,t[121]=Me):Me=t[121],Me}function Hb(e){return e.docs}function Ub(e){let t=(0,$.c)(27),{docName:n}=e,{_:r}=ht(),{resolvedTheme:i}=It(),a=i===`dark`,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[],t[0]=o):o=t[0];let[s,c]=(0,Q.useState)(o),[l,u]=(0,Q.useState)(!1),[d,f]=(0,Q.useState)(null),p=(0,Q.useRef)(new Map),[m,h]=(0,Q.useState)(null),g=(0,Q.useRef)(null),_=new Map;for(let e of s)_.set(e.sha.slice(0,7),e);let v,y;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>()=>clearTimeout(g.current??void 0),y=[],t[1]=v,t[2]=y):(v=t[1],y=t[2]),(0,Q.useEffect)(v,y);let b=function(e){let t=_.get(e);t&&(p.current.get(t.sha)?.scrollIntoView({behavior:`smooth`,block:`center`}),h(t.sha),clearTimeout(g.current??void 0),g.current=setTimeout(()=>h(null),1600))},x;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(x=function(){dl()},t[3]=x):x=t[3];let S=x,C,w;t[4]!==r||t[5]!==n?(C=()=>{if(!n){c([]);return}u(!0);let e=Eb({baseMs:Db,maxBackoffMs:Ob,isPaused:Gb,poll:e=>kb(n,e,{setEntries:c,setError:f,setLoading:u,unavailableMessage:r({id:`brCtGB`})})});e.start();let t=()=>e.resume();return typeof document<`u`&&document.addEventListener(`visibilitychange`,t),()=>{e.stop(),typeof document<`u`&&document.removeEventListener(`visibilitychange`,t)}},w=[n,r],t[4]=r,t[5]=n,t[6]=C,t[7]=w):(C=t[6],w=t[7]),(0,Q.useEffect)(C,w);let T;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Z.jsx)(Pd,{children:(0,Z.jsx)(Id,{children:(0,Z.jsx)(q,{id:`cklVjM`})})}),t[8]=T):T=t[8];let E;t[9]!==r||t[10]!==l?(E=l&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 p-2`,role:`status`,"aria-busy":`true`,"aria-label":r({id:`o49mDZ`}),children:[1,2,3].map(Wb)}),t[9]=r,t[10]=l,t[11]=E):E=t[11];let D;t[12]!==d||t[13]!==l?(D=!l&&d&&(0,Z.jsx)(`div`,{className:`px-4 py-3`,children:(0,Z.jsx)(`p`,{className:`text-xs text-destructive`,children:d})}),t[12]=d,t[13]=l,t[14]=D):D=t[14];let O;t[15]!==s||t[16]!==d||t[17]!==l?(O=!l&&!d&&s.length===0&&(0,Z.jsx)(`div`,{className:`px-4 py-8 text-center`,children:(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,Z.jsx)(q,{id:`Ta25TG`})})}),t[15]=s,t[16]=d,t[17]=l,t[18]=O):O=t[18];let k=!l&&!d&&s.length>0&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 p-2`,children:s.map((e,t)=>(0,Z.jsx)(Vb,{entry:e,isDark:a,docName:n,laterEdits:t,onRestoreSuccess:S,versionBySha7:_,onJumpToVersion:b,registerRowRef:t=>{t?p.current.set(e.sha,t):p.current.delete(e.sha)},flashing:m===e.sha},e.sha))}),A;t[19]!==E||t[20]!==D||t[21]!==O||t[22]!==k?(A=(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto subtle-scrollbar scroll-fade-mask`,children:[E,D,O,k]}),t[19]=E,t[20]=D,t[21]=O,t[22]=k,t[23]=A):A=t[23];let j;return t[24]!==A||t[25]!==T?(j=(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[T,A]}),t[24]=A,t[25]=T,t[26]=j):j=t[26],j}function Wb(e){return(0,Z.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-lg px-3 py-2.5`,children:[(0,Z.jsx)(Bd,{className:`size-3.5 rounded mt-0.5 shrink-0`}),(0,Z.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,Z.jsx)(Bd,{className:`h-3 w-28`}),(0,Z.jsx)(Bd,{className:`h-3 w-40`})]})]},e)}function Gb(){return typeof document<`u`&&document.visibilityState===`hidden`}var Kb=`open-knowledge:lint-source-fixed`,qb=Object.freeze({source:`local`,skipStoreHooks:!1,context:Object.freeze({origin:`lint-fix`})});function Jb(e,t){let n=e.split(`
|
|
11
11
|
`),r=0;for(let e=0;e<t.line&&e<n.length;e+=1)r+=n[e].length+1;let i=n[Math.min(t.line,n.length-1)]?.length??0;return r+Math.min(Math.max(t.character,0),i)}function Yb(e){return e.flatMap(e=>e.fixes??[])}function Xb(e,t){if(t.length===0)return!1;let n=e.document.getText(`source`),r=n.toString(),i=t.map(e=>({from:Jb(r,e.range.start),to:Jb(r,e.range.end),insert:e.newText})).sort((e,t)=>t.to-e.to||t.from-e.from||e.insert.localeCompare(t.insert));return e.document.transact(()=>{let e=1/0,t;for(let r of i){let i=t!==void 0&&r.from===t.from&&r.to===t.to&&r.insert===t.insert;t=r,!(i||r.to>e)&&(r.to>r.from&&n.delete(r.from,r.to-r.from),r.insert.length>0&&n.insert(r.from,r.insert),e=r.from)}},qb),typeof window<`u`&&window.dispatchEvent(new CustomEvent(Kb)),!0}var Zb=300;function Qb(e,t){let n=(0,$.c)(7),r;n[0]===t?r=n[1]:(r=t?.enabled?JSON.stringify(t):null,n[0]=t,n[1]=r);let i=r,a;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],n[2]=a):a=n[2];let[o,s]=(0,Q.useState)(a),c,l;return n[3]!==i||n[4]!==e?(c=()=>{if(!e||i===null){s($b);return}let t=JSON.parse(i),n=e.document.getText(`source`),r=null,a=!1,o=e.configuration.name,c=()=>void _i(n.toString(),t,o).then(e=>{a||s(e)}).catch(e=>{a||console.warn(`[lint] lintDocument failed`,e)}),l=()=>{r&&clearTimeout(r),r=setTimeout(c,Zb)};return c(),n.observe(l),()=>{a=!0,r&&clearTimeout(r),n.unobserve(l)}},l=[e,i],n[3]=i,n[4]=e,n[5]=c,n[6]=l):(c=n[5],l=n[6]),(0,Q.useEffect)(c,l),o}function $b(e){return e.length===0?e:[]}var ex=[{id:`outline`,icon:Gh},{id:`links`,icon:a},{id:`graph`,icon:Yh},{id:`timeline`,icon:bh},{id:`problems`,icon:sl}];function tx(e){let t=0,n=0;for(let r of e)r.severity===`error`?t+=1:n+=1;return{errorCount:t,warningCount:n}}function nx(e){return e===`outline`?yl._({id:`dD7NPy`}):e===`links`?yl._({id:`Rj01Fz`}):e===`graph`?yl._({id:`x2fr_j`}):e===`problems`?yl._({id:`OXdGnd`}):yl._({id:`cklVjM`})}function rx(){return n(()=>import(`./GraphPanel-9aikCCVz.js`),__vite__mapDeps([37,1,6,2,3,7,8,9,38,10,11,12,17,18,39,16,19,40,41,25,22,28,14,15,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,31,59,60,61,35]),import.meta.url)}var ix=(0,Q.lazy)(async()=>({default:(await rx()).GraphPanel})),ax=(0,Q.lazy)(async()=>({default:(await n(()=>import(`./ActivityModeContent-DPVvqOCP.js`),__vite__mapDeps([62,1,38,10,11,12,23,16,17,18,19,24,25,22,26,28,14,15,63,2,64,65,9,66,67,68,69,70,71,72,73,74,6,3,7,8,75,59,76,77,78,4,79,40,20,21,80,81,82,83,84,85,31,52,53,54,35,56,86,87,27,29,51,55,57,58,88,89,90,91,30,92,93,94,95,32,33,96,97,98,99,100,101,102,103,104]),import.meta.url)).ActivityModeContent}));function ox(e){let t=(0,$.c)(45),{docName:n,isSourceMode:r,activeTab:i,onActiveTabChange:a,mode:o}=e,{_:s}=ht(),{activeProvider:c,activeDocName:l}=Re(),{data:u}=Ud(n),d=l===n?c:null,f=Qb(d,u?.effective??null),p=vd(n),m;t[0]!==p||t[1]!==f?(m=[...f,...p],t[0]=p,t[1]=f,t[2]=m):m=t[2];let h=m,g,_;t[3]!==n||t[4]!==f||t[5]!==d?(g=()=>{d!==null&&gd(n,`lint`,tx(f))},_=[n,d,f],t[3]=n,t[4]=f,t[5]=d,t[6]=g,t[7]=_):(g=t[6],_=t[7]),(0,Q.useEffect)(g,_);let v,y;t[8]!==n||t[9]!==p||t[10]!==d?(v=()=>{d!==null&&gd(n,`links`,tx(p))},y=[n,d,p],t[8]=n,t[9]=p,t[10]=d,t[11]=v,t[12]=y):(v=t[11],y=t[12]),(0,Q.useEffect)(v,y);let b;t[13]===d?b=t[14]:(b=e=>{d!==null&&e.fixes&&e.fixes.length>0&&Xb(d,e.fixes)},t[13]=d,t[14]=b);let x=b,S;t[15]!==f||t[16]!==d?(S=()=>{d!==null&&Xb(d,Yb(f))},t[15]=f,t[16]=d,t[17]=S):S=t[17];let C=S,w=Xo(),T;t[18]!==n||t[19]!==d?(T=e=>{if(d===null)return;let t=d.document.getText(`source`).toString().split(`
|
|
12
12
|
`)[e.range.start.line];qt(fb(n,e,t))},t[18]=n,t[19]=d,t[20]=T):T=t[20];let E=T,D=Uv(),O,k,A;if(t[21]!==s||t[22]!==i||t[23]!==h||t[24]!==o||t[25]!==a||t[26]!==D){let e=D?ex.filter(sx):ex;O=e.some(e=>e.id===i)?i:`outline`,k=o===`doc`&&e.length>1,A=k?(0,Z.jsx)(`div`,{className:`flex flex-row items-center justify-center gap-3 p-2`,children:(0,Z.jsx)(Ur,{type:`single`,variant:`outline`,value:O,onValueChange:e=>{e&&a(e)},"aria-label":s({id:`SrOuyg`}),children:e.map(e=>{let{id:t,icon:n}=e,r=nx(t),i=t===`problems`&&h.length>0;return(0,Z.jsxs)(cn,{children:[(0,Z.jsx)(Vr,{value:t,role:`tab`,id:`tab-${t}`,"aria-controls":`panel-${t}`,"aria-label":i?s({id:`2m_bmh`,values:{0:h.length,label:r}}):r,asChild:!0,children:(0,Z.jsxs)(an,{className:`relative`,children:[(0,Z.jsx)(n,{}),i&&(0,Z.jsx)(vu,{variant:`destructive`,"aria-hidden":`true`,className:`absolute -right-1.5 -top-1.5 h-4 min-w-4 rounded-full px-1 text-[10px] leading-none`,children:h.length>99?`99+`:h.length})]})}),(0,Z.jsx)(on,{side:`bottom`,children:r})]},t)})})}):null,t[21]=s,t[22]=i,t[23]=h,t[24]=o,t[25]=a,t[26]=D,t[27]=O,t[28]=k,t[29]=A}else O=t[27],k=t[28],A=t[29];let j;t[30]!==h||t[31]!==n||t[32]!==O||t[33]!==E||t[34]!==x||t[35]!==C||t[36]!==r||t[37]!==d||t[38]!==o||t[39]!==k||t[40]!==w?(j=o===`doc`?(0,Z.jsxs)(`div`,{...k?{role:`tabpanel`,id:`panel-${O}`,"aria-labelledby":`tab-${O}`}:{},className:`min-h-0 flex-1`,children:[O===`outline`&&(0,Z.jsx)(dd,{docName:n,isSourceMode:r}),O===`links`&&(0,Z.jsx)(Tb,{docName:n}),O===`graph`&&(0,Z.jsx)(Q.Suspense,{fallback:(0,Z.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`-lCAuQ`})}),children:(0,Z.jsx)(ix,{activeDocName:n})}),O===`timeline`&&(0,Z.jsx)(Ub,{docName:n}),O===`problems`&&(0,Z.jsx)(bd,{docName:n,diagnostics:h,onFix:d===null?void 0:x,onFixAll:d===null?void 0:C,onAskAi:d!==null&&w!==null?E:void 0})]}):(0,Z.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,Z.jsx)(Q.Suspense,{fallback:(0,Z.jsx)(`div`,{role:`status`,"aria-busy":`true`,className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`ONPvOb`})}),children:(0,Z.jsx)(ax,{})})}),t[30]=h,t[31]=n,t[32]=O,t[33]=E,t[34]=x,t[35]=C,t[36]=r,t[37]=d,t[38]=o,t[39]=k,t[40]=w,t[41]=j):j=t[41];let M;return t[42]!==j||t[43]!==A?(M=(0,Z.jsxs)(Z.Fragment,{children:[A,j]}),t[42]=j,t[43]=A,t[44]=M):M=t[44],M}function sx(e){return e.id===`outline`||e.id===`problems`}function cx(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function lx(e,t){let n=getComputedStyle(e.ownerDocument.documentElement);return t*parseFloat(n.fontSize)}function ux(e){return e/100*window.innerHeight}function dx(e){return e/100*window.innerWidth}function fx(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function px({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=fx(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=lx(t,i);break;case`em`:r=cx(t,i);break;case`vh`:r=ux(i);break;case`vw`:r=dx(i);break}return r}function mx(e){return parseFloat(e.toFixed(3))}function hx({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function gx(e){let{panels:t}=e,n=hx({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=mx(px({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=mx(px({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=mx(px({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=mx(px({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,disabled:r.disabled,minSize:o,maxSize:s,panelId:e.id}})}function _x(e,t=`Assertion error`){if(!e)throw Error(t)}function vx(e,t){return Array.from(t).sort(e===`horizontal`?yx:bx)}function yx(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function bx(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function xx(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function Sx(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function Cx({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=Sx(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return _x(i,`No rect found`),i}var wx;function Tx(){return wx===void 0&&(wx=typeof matchMedia==`function`?!!matchMedia(`(pointer:coarse)`).matches:!1),wx}function Ex(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=vx(n,Array.from(t.children).filter(xx).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c=!1,l=-1,u=-1,d=0,f,p=[];{let e=-1;for(let t of a)t.hasAttribute(`data-panel`)&&(e++,t.hasAttribute(`data-disabled`)||(d++,l===-1&&(l=e),u=e))}if(d>1){let t=-1;for(let d of a)if(d.hasAttribute(`data-panel`)){t++;let i=r.find(e=>e.element===d);if(i){if(f){let r=f.element.getBoundingClientRect(),a=d.getBoundingClientRect(),m;if(c){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(p.length){case 0:m=[e,t];break;case 1:{let i=p[0];m=[i,Cx({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:m=p;break}}else m=p.length?p:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let n of m){let r=`width`in n?n:n.element.getBoundingClientRect(),a=Tx()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(r.width<a){let e=a-r.width;r=new DOMRect(r.x-e/2,r.y,r.width+e,r.height)}if(r.height<a){let e=a-r.height;r=new DOMRect(r.x,r.y-e/2,r.width,r.height+e)}!s&&!(t<=l||t>u)&&o.push({group:e,groupSize:hx({group:e}),panels:[f,i],separator:`width`in n?void 0:n,rect:r}),s=!1}}c=!1,f=i,p=[]}}else if(d.hasAttribute(`data-separator`)){d.ariaDisabled!==null&&(s=!0);let e=i.find(e=>e.element===d);e?p.push(e):(f=void 0,p=[])}else c=!0}return o}var Dx=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0)if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},Ox={cursorFlags:0,state:`inactive`},kx=new Dx;function Ax(){return Ox}function jx(e){return kx.addListener(`change`,e)}function Mx(e){let t=Ox,n={...Ox};n.cursorFlags=e,Ox=n,kx.emit(`change`,{prev:t,next:n})}function Nx(e){let t=Ox;Ox=e,kx.emit(`change`,{prev:t,next:e})}var Px=e=>e,Fx=()=>{},Ix=1,Lx=2,Rx=4,zx=8,Bx=3,Vx=12,Hx;function Ux(){return Hx===void 0&&(Hx=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Hx=!0)),Hx}function Wx({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++;break}})}if(!(r===0&&i===0)){switch(n){case`active`:if(e&&Ux()){let t=(e&Ix)!==0,n=(e&Lx)!==0,r=(e&Rx)!==0,i=(e&zx)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}break}return Ux()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var Gx=new WeakMap;function Kx(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Gx.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));let r=Ax();switch(r.state){case`active`:case`hover`:{let e=Wx({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}Gx.set(e,{prevStyle:t,styleSheet:n})}var qx=new Map,Jx=new Dx;function Yx(e){qx=new Map(qx),qx.delete(e)}function Xx(e,t){for(let[t]of qx)if(t.id===e)return t}function Zx(e,t){for(let[t,n]of qx)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Qx(){return qx}function $x(e,t){return Jx.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function eS(e,t,n){let r=qx.get(e);qx=new Map(qx),qx.set(e,t),Jx.emit(`groupChange`,{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:r,next:t})}function tS(e){let t=Ax(),n=!1;switch(t.state){case`active`:Nx({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(Kx(e),n=!0,t.hitRegions.forEach(e=>{let t=Zx(e.group.id,!0);eS(e.group,t,{isUserInteraction:!0})}))}return n}function nS(e){e.defaultPrevented||tS(e.currentTarget)}function rS(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=Sx(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t);break}}return r?{distance:i,hitRegion:r}:void 0}function iS(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function aS(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:dS(e),b:dS(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();_x(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:uS(lS(n.a)),b:uS(lS(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var oS=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function sS(e){let t=getComputedStyle(fS(e)??e).display;return t===`flex`||t===`inline-flex`}function cS(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||sS(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||oS.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function lS(e){let t=e.length;for(;t--;){let n=e[t];if(_x(n,`Missing node`),cS(n))return n}return null}function uS(e){return e&&Number(getComputedStyle(e).zIndex)||0}function dS(e){let t=[];for(;e;)t.push(e),e=fS(e);return t}function fS(e){let{parentNode:t}=e;return iS(t)?t.host:t}function pS(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function mS({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!xx(n)||n.contains(e)||e.contains(n))return!0;if(aS(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(pS(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function hS(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=Ex(r),a=rS(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&mS({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function gS(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function _S(e,t,n=0){return Math.abs(mx(e)-mx(t))<=n}function vS(e,t){return _S(e,t)?0:e>t?1:-1}function yS({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsible:a,disabled:o,maxSize:s=100,minSize:c=0}=t;if(o&&!e)return n;if(vS(r,c)<0)if(a){let e=(i+c)/2;r=vS(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=mx(r),r}function bS({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(_S(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;_x(u!=null,`Invalid first pivot index`),_x(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];_x(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(_x(n!=null,`Previous layout not found for panel index ${t}`),_S(n,i)){let t=o-n;vS(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];_x(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(_x(n!=null,`Previous layout not found for panel index ${t}`),_S(n,o)){let t=n-i;vS(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];_x(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&vS(i,c)<0)if(e>0){let t=c-o,n=t/2;vS(i+e,c)<0&&(e=vS(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;vS(i-e,c)<0&&(e=vS(100+e,n)>0?0:-t)}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];_x(e!=null,`Previous layout not found for panel index ${r}`);let a=yS({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];_x(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=yS({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!_S(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(gS(c,l))return i;{let t=e<0?d:u,r=s[t];_x(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=yS({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!_S(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];_x(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=yS({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(_S(i,s)||(t-=s-i,l[r]=s),_S(t,0))break;e>0?r--:r++}}}if(!_S(Object.values(l).reduce((e,t)=>t+e,0),100,.1))return i;let p=Object.keys(i);return l.reduce((e,t,n)=>(e[p[n]]=t,e),{})}function xS(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||vS(e[n],t[n])!==0)return!1;return!0}function SS({layout:e,panelConstraints:t}){let n=Object.values(e),r=[...n],i=r.reduce((e,t)=>e+t,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(e=>`${e}%`).join(`, `)}`);if(!_S(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];_x(t!=null,`No layout data found for index ${e}`),r[e]=100/i*t}let a=0;for(let e=0;e<t.length;e++){let i=n[e];_x(i!=null,`No layout data found for index ${e}`);let o=r[e];_x(o!=null,`No layout data found for index ${e}`);let s=yS({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!_S(a,0))for(let e=0;e<t.length;e++){let n=r[e];_x(n!=null,`No layout data found for index ${e}`);let i=n+a,o=yS({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,_S(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function CS({groupId:e,panelId:t}){let n=()=>{let t=Qx();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=({nextSize:e,panels:n,prevLayout:r,derivedPanelConstraints:i})=>{let o=a(),s=n.findIndex(e=>e.id===t),c=s===0,l=s===n.length-1;if(l&&e<o&&(c||n.slice(0,s).every((e,t)=>{let n=i[t];return n?.collapsible&&_S(n.collapsedSize,r[n.panelId])}))){let e=n.slice(0,s).reduce((e,t)=>e+r[t.id],0);return{...r,[t]:mx(100-e)}}return bS({delta:l?o-e:e-o,initialLayout:r,panelConstraints:i,pivotIndices:l?[s-1,s]:[s,s+1],prevLayout:r,trigger:`imperative-api`})},s=e=>{if(e===a())return;let{defaultLayoutDeferred:t,derivedPanelConstraints:r,group:i,groupSize:s,layout:c,separatorToPanels:l}=n(),u=SS({layout:o({nextSize:e,panels:i.panels,prevLayout:c,derivedPanelConstraints:r}),panelConstraints:r});xS(c,u)||eS(i,{defaultLayoutDeferred:t,derivedPanelConstraints:r,groupSize:s,layout:u,separatorToPanels:l})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),o=a();e&&o!==t&&(n.expandToSize=o,s(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:o}=i(),c=a();if(e&&c===t){let e=o.expandToSize??n;e===0&&(e=1),s(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&_S(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=hx({group:t});s(mx(px({groupSize:a,panelElement:r,styleProp:e})/a*100))}}}function wS(e){e.defaultPrevented||hS(e,Qx()).forEach(t=>{if(t.separator&&!t.separator.disableDoubleClick){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=CS({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function TS(e){let t=Qx();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function ES({groupId:e}){let t=()=>{let t=Qx();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=SS({layout:e,panelConstraints:r});return n?o:(xS(o,c)||eS(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function DS(e,t){let n=TS(e),r=Zx(n.id,!0),i=n.separators.find(t=>t.element===e);_x(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);_x(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=ES({groupId:n.id}).getLayout(),c=SS({layout:bS({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});xS(s,c)||eS(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels},{isUserInteraction:!0})}function OS(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=TS(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&DS(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&DS(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&DS(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&DS(t,-5);break;case`End`:e.preventDefault(),DS(t,100);break;case`Enter`:{e.preventDefault();let n=TS(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Zx(n.id,!0),o=n.separators.find(e=>e.element===t);_x(o,`Matching separator not found`);let s=a.get(o);_x(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(_x(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];DS(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=TS(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);_x(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),DS(t,-100);break}}function kS(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Qx(),n=hS(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({focusVisible:!1,preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),Nx({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}function AS({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a,prevCursorFlags:o}){let s=0;n.forEach(e=>{let{group:n,groupSize:o}=e,{orientation:c,panels:l}=n,{disableCursor:u}=n.mutableState,d=0;d=a?c===`horizontal`?(t.clientX-a.x)/o*100:(t.clientY-a.y)/o*100:c===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let f=r.get(n),p=i.get(n);if(!f||!p)return;let{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:_,separatorToPanels:v}=p;if(h&&_&&v){let t=bS({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(xS(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?Ix:Lx;break;case`vertical`:s|=d<0?Rx:zx;break}}else eS(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&Bx:c|=s&Bx,t.movementY===0?c|=o&Vx:c|=s&Vx,Mx(c),Kx(e)}function jS(e){let t=Qx(),n=Ax();switch(n.state){case`active`:AS({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function MS(e){if(e.defaultPrevented)return;let t=Ax(),n=Qx();switch(t.state){case`active`:if(e.buttons===0){Nx({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=Zx(e.group.id,!0);eS(e.group,t,{isUserInteraction:!0})});return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.hasPointerCapture?.(e.pointerId)||t.setPointerCapture?.(e.pointerId)}AS({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=hS(e,n);r.length===0?t.state!==`inactive`&&Nx({cursorFlags:0,state:`inactive`}):Nx({cursorFlags:0,hitRegions:r,state:`hover`}),Kx(e.currentTarget);break}}}function NS(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(Ax().state){case`hover`:Nx({cursorFlags:0,state:`inactive`})}}function PS(e){e.defaultPrevented||e.pointerType===`mouse`&&e.button>0||tS(e.currentTarget)&&e.preventDefault()}function FS(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=mx(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=mx((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function IS(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=hx({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:mx(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function LS(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function RS({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=mx(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e;break}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=mx((r[e]??0)/a*l);else{let e=mx(l/c.length);for(let t of c)u[t]=e}return u}function zS(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var BS=new Map;function VS(e){let t=!0;_x(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=hx({group:e});if(t===0)return;let n=Zx(e.id);if(!n)return;let r=gx(e),i=n.defaultLayoutDeferred?FS(r):n.layout,a=SS({layout:RS({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&xS(n.layout,a)&&LS(n.derivedPanelConstraints,r)&&n.groupSize===t)return;eS(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else IS(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{_x(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=hx({group:e}),s=gx(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(zS(e.panels,l)||(l=void 0));let u=SS({layout:e.mutableState.layouts[c]??l??FS(s),panelConstraints:s}),d=e.element.ownerDocument;BS.set(d,(BS.get(d)??0)+1);let f=new Map;return Ex(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),eS(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{_x(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,OS)}),BS.get(d)===1&&(d.addEventListener(`contextmenu`,nS,!0),d.addEventListener(`dblclick`,wS,!0),d.addEventListener(`pointerdown`,kS,!0),d.addEventListener(`pointerleave`,jS),d.addEventListener(`pointermove`,MS),d.addEventListener(`pointerout`,NS),d.addEventListener(`pointerup`,PS,!0)),function(){t=!1,BS.set(d,Math.max(0,(BS.get(d)??0)-1)),Yx(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,OS)}),BS.get(d)||(d.removeEventListener(`contextmenu`,nS,!0),d.removeEventListener(`dblclick`,wS,!0),d.removeEventListener(`pointerdown`,kS,!0),d.removeEventListener(`pointerleave`,jS),d.removeEventListener(`pointermove`,MS),d.removeEventListener(`pointerout`,NS),d.removeEventListener(`pointerup`,PS,!0)),a.disconnect()}}function HS(){let[e,t]=(0,Q.useState)({});return[e,(0,Q.useCallback)(()=>t({}),[])]}function US(e){let t=(0,Q.useId)();return`${e??t}`}var WS=typeof window<`u`?Q.useLayoutEffect:Q.useEffect;function GS(e){let t=(0,Q.useRef)(e);return WS(()=>{t.current=e},[e]),(0,Q.useCallback)((...e)=>t.current?.(...e),[t])}function KS(...e){return GS(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function qS(e){let t=(0,Q.useRef)({...e});return WS(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var JS=(0,Q.createContext)(null);function YS(e,t){let n=(0,Q.useRef)({getLayout:()=>({}),setLayout:Px});(0,Q.useImperativeHandle)(t,()=>n.current,[]),WS(()=>{Object.assign(n.current,ES({groupId:e}))})}function XS({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizeTargetMinimumSize:d={coarse:20,fine:10},style:f,...p}){let m=(0,Q.useRef)({onLayoutChange:{},onLayoutChanged:{}}),h=GS(e=>{xS(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=GS((e,t)=>{xS(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e,{isUserInteraction:t}))}),_=US(s),v=(0,Q.useRef)(null),[y,b]=HS(),x=(0,Q.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),S=KS(v,a);YS(_,o);let C=GS((e,t)=>{let r=Ax(),i=Xx(e),a=Zx(e);if(a){let e=!1;switch(r.state){case`active`:e=r.hitRegions.some(e=>e.group===i);break}return{flexGrow:a.layout[t]??1,pointerEvents:e?`none`:void 0}}if(n?.[t])return{flexGrow:n?.[t]}}),w=qS({defaultLayout:n,disableCursor:r}),T=(0,Q.useMemo)(()=>({get disableCursor(){return!!w.disableCursor},getPanelStyles:C,id:_,orientation:u,registerPanel:e=>{let t=x.current;return t.panels=vx(u,[...t.panels,e]),b(),()=>{t.panels=t.panels.filter(t=>t!==e),b()}},registerSeparator:e=>{let t=x.current;return t.separators=vx(u,[...t.separators,e]),b(),()=>{t.separators=t.separators.filter(t=>t!==e),b()}},updatePanelProps:(e,{disabled:t})=>{let n=x.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=Xx(_),i=Zx(_);r&&i&&eS(r,{...i,derivedPanelConstraints:gx(r)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{let r=x.current.separators.find(t=>t.id===e);r&&(r.disabled=t,r.disableDoubleClick=n)}}),[C,_,b,u,w]),E=(0,Q.useRef)(null);return WS(()=>{let e=v.current;if(e===null)return;let t=x.current,n;if(w.defaultLayout!==void 0&&Object.keys(w.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=w.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:_,mutableState:{defaultLayout:n,disableCursor:!!w.disableCursor,expandedPanelSizes:x.current.lastExpandedPanelSizes,layouts:x.current.layouts},orientation:u,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};E.current=r;let a=VS(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=Zx(r.id,!0);!o&&s.length>0&&(h(c),g(c,!1));let l=$x(_,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=_S(t.collapsedSize,i[t.panelId]),a=_S(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=Ax().state!==`active`;h(i),o&&g(i,e.isUserInteraction)});return()=>{E.current=null,a(),l()}},[i,_,g,h,u,y,w]),(0,Q.useEffect)(()=>{let e=E.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,Z.jsx)(JS.Provider,{value:T,children:(0,Z.jsx)(`div`,{...p,className:t,"data-group":!0,"data-testid":_,id:_,ref:S,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:e})})}XS.displayName=`Group`;function ZS(){return(0,Q.useRef)(null)}function QS(){let e=(0,Q.useContext)(JS);return _x(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function $S(e,t){let{id:n}=QS(),r=(0,Q.useRef)({collapse:Fx,expand:Fx,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Fx});(0,Q.useImperativeHandle)(t,()=>r.current,[]),WS(()=>{Object.assign(r.current,CS({groupId:n,panelId:e}))})}function eC({children:e,className:t,collapsedSize:n=`0%`,collapsible:r=!1,defaultSize:i,disabled:a,elementRef:o,groupResizeBehavior:s=`preserve-relative-size`,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=US(c),_=qS({disabled:a}),v=(0,Q.useRef)(null),y=KS(v,o),{getPanelStyles:b,id:x,orientation:S,registerPanel:C,updatePanelProps:w}=QS(),T=d!==null,E=GS((e,t,n)=>{d?.(e,c,n)});WS(()=>{let e=v.current;if(e!==null)return C({element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:T?E:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:r,defaultSize:i,disabled:_.disabled,maxSize:l,minSize:u}})},[s,n,r,i,T,g,h,l,u,E,C,_]),(0,Q.useEffect)(()=>{w(g,{disabled:a})},[a,g,w]),$S(g,f);let D=()=>{let e=b(x,g);if(e)return JSON.stringify(e)},O=(0,Q.useSyncExternalStore)(e=>$x(x,e),D,D),k;return k=O?JSON.parse(O):i===void 0?{flexGrow:1}:{flexGrow:void 0,flexShrink:void 0,flexBasis:i},(0,Z.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...tC,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...k},children:(0,Z.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:S===`horizontal`?`pan-y`:`pan-x`},children:e})})}eC.displayName=`Panel`;var tC={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function nC(){return(0,Q.useRef)(null)}function rC({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=SS({layout:bS({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=SS({layout:bS({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function iC({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,style:o,...s}){let c=US(a),l=qS({disabled:n,disableDoubleClick:r}),[u,d]=(0,Q.useState)({}),[f,p]=(0,Q.useState)(`inactive`),[m,h]=(0,Q.useState)(!1),g=(0,Q.useRef)(null),_=KS(g,i),{disableCursor:v,id:y,orientation:b,registerSeparator:x,updateSeparatorProps:S}=QS(),C=b===`horizontal`?`vertical`:`horizontal`;WS(()=>{let e=g.current;if(e!==null){let t={disabled:l.disabled,disableDoubleClick:l.disableDoubleClick,element:e,id:c},n=x(t),r=jx(e=>{p(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=$x(y,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=a.indexOf(e);d(rC({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[y,c,x,l]),(0,Q.useEffect)(()=>{S(c,{disabled:n,disableDoubleClick:r})},[n,r,c,S]);let w;n&&!v&&(w=`not-allowed`);let T;if(n)T=`disabled`;else switch(f){case`active`:T=`active`;break;default:T=m?`focus`:f}return(0,Z.jsx)(`div`,{...s,"aria-controls":u.valueControls,"aria-disabled":n||void 0,"aria-orientation":C,"aria-valuemax":u.valueMax,"aria-valuemin":u.valueMin,"aria-valuenow":u.valueNow,children:e,className:t,"data-separator":T,"data-testid":c,id:c,onBlur:()=>h(!1),onFocus:()=>h(!0),ref:_,role:`separator`,style:{flexBasis:`auto`,cursor:w,...o,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}iC.displayName=`Separator`;function aC(e){let t=(0,$.c)(50),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({fileName:r,extension:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{_:a}=ht(),[o,s]=(0,Q.useState)(`diagram`),c=Qd(i),l;t[4]===n?l=t[5]:(l={"data-mermaid-file-viewer-extension":n},t[4]=n,t[5]=l);let u=l;if(c.status===`loading`){let e;return t[6]!==u||t[7]!==r?(e=(0,Z.jsx)(Yd,{fileName:r,dataAttr:`data-mermaid-file-viewer`,extraAttrs:u}),t[6]=u,t[7]=r,t[8]=e):e=t[8],e}if(c.status===`error`){let e;return t[9]!==u||t[10]!==c.message||t[11]!==r||t[12]!==i.src?(e=(0,Z.jsx)(Xd,{fileName:r,dataAttr:`data-mermaid-file-viewer`,extraAttrs:u,message:c.message,openHref:i.src}),t[9]=u,t[10]=c.message,t[11]=r,t[12]=i.src,t[13]=e):e=t[13],e}let d=c.content,f;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{e&&s(e)},t[14]=f):f=t[14];let p;t[15]===a?p=t[16]:(p=a({id:`72xhRD`}),t[15]=a,t[16]=p);let m;t[17]===a?m=t[18]:(m=a({id:`DEWDbv`}),t[17]=a,t[18]=m);let h;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(an,{children:(0,Z.jsx)(ne,{className:`size-4`})}),t[19]=h):h=t[19];let g;t[20]===m?g=t[21]:(g=(0,Z.jsx)(Vr,{value:`diagram`,"aria-label":m,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,asChild:!0,children:h}),t[20]=m,t[21]=g);let _;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`i-ShMB`})}),t[22]=_):_=t[22];let v;t[23]===g?v=t[24]:(v=(0,Z.jsxs)(cn,{children:[g,_]}),t[23]=g,t[24]=v);let y;t[25]===a?y=t[26]:(y=a({id:`Y6SK9K`}),t[25]=a,t[26]=y);let b;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,Z.jsx)(an,{children:(0,Z.jsx)(Xe,{className:`size-4`})}),t[27]=b):b=t[27];let x;t[28]===y?x=t[29]:(x=(0,Z.jsx)(Vr,{value:`source`,"aria-label":y,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,asChild:!0,children:b}),t[28]=y,t[29]=x);let S;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`wdxz7K`})}),t[30]=S):S=t[30];let C;t[31]===x?C=t[32]:(C=(0,Z.jsxs)(cn,{children:[x,S]}),t[31]=x,t[32]=C);let w;t[33]!==o||t[34]!==C||t[35]!==p||t[36]!==v?(w=(0,Z.jsx)(`div`,{className:`flex shrink-0 items-center justify-center border-b bg-background py-2`,children:(0,Z.jsxs)(Ur,{type:`single`,value:o,onValueChange:f,"aria-label":p,variant:`segmented`,size:`sm`,spacing:1,className:`shrink-0 bg-muted p-0.5 data-[size=sm]:rounded-[10px]`,children:[v,C]})}),t[33]=o,t[34]=C,t[35]=p,t[36]=v,t[37]=w):w=t[37];let T;t[38]!==n||t[39]!==r||t[40]!==o||t[41]!==i||t[42]!==d?(T=(0,Z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:o===`diagram`?(0,Z.jsx)(`div`,{className:`flex h-full min-h-0 flex-col p-3 [&_.mermaid-error-source]:hidden`,children:(0,Z.jsx)(bn,{chart:d,className:`min-h-0 flex-1`})}):(0,Z.jsx)($d,{...i,fileName:r,extension:n})}),t[38]=n,t[39]=r,t[40]=o,t[41]=i,t[42]=d,t[43]=T):T=t[43];let E;return t[44]!==u||t[45]!==r||t[46]!==o||t[47]!==w||t[48]!==T?(E=(0,Z.jsxs)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":r,"data-mermaid-file-viewer":``,"data-mermaid-file-viewer-state":`loaded`,"data-mermaid-file-viewer-mode":o,...u,children:[w,T]}),t[44]=u,t[45]=r,t[46]=o,t[47]=w,t[48]=T,t[49]=E):E=t[49],E}function oC(e){return Ya(`/api/asset?path=${encodeURIComponent(e)}`)}function sC(e){return`/api/asset-text?path=${encodeURIComponent(e)}`}function cC(e){let t=(0,$.c)(8),{assetPath:n,mediaKind:r}=e,i;t[0]===n?i=t[1]:(i=(0,Z.jsx)(Zd,{entry:{kind:`asset`,path:n},className:`shrink-0 border-b bg-background px-3 py-1.5`}),t[0]=n,t[1]=i);let a;t[2]!==n||t[3]!==r?(a=(0,Z.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,Z.jsx)(lC,{assetPath:n,mediaKind:r})}),t[2]=n,t[3]=r,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o=(0,Z.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[i,a]}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function lC(e){let t=(0,$.c)(33),{assetPath:n,mediaKind:r}=e,[i,a]=(0,Q.useState)(!1),o;t[0]===n?o=t[1]:(o=oC(n),t[0]=n,t[1]=o);let s=o,c;t[2]===n?c=t[3]:(c=n.split(`/`).pop()??n,t[2]=n,t[3]=c);let l=c,u,d,f,p;if(t[4]!==n||t[5]!==l||t[6]!==i||t[7]!==r||t[8]!==s){p=Symbol.for(`react.early_return_sentinel`);bb0:{if(f=l.includes(`.`)?l.split(`.`).pop()??``:``,d=f.length>0?f.toUpperCase():`FILE`,u=i?`text`:r,u===`pdf`){let e;t[13]!==l||t[14]!==s?(e=(0,Z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,Z.jsx)(b,{src:s,title:l,fillContainer:!0})}),t[13]=l,t[14]=s,t[15]=e):e=t[15];let n;t[16]!==l||t[17]!==e?(n=(0,Z.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":l,children:e}),t[16]=l,t[17]=e,t[18]=n):n=t[18],p=n;break bb0}if(u===`text`){let e;t[19]===n?e=t[20]:(e=sC(n),t[19]=n,t[20]=e),p=(0,Z.jsx)($d,{src:e,fileName:l,extension:f.toLowerCase()},n);break bb0}if(u===`mermaid`){let e;t[21]===n?e=t[22]:(e=sC(n),t[21]=n,t[22]=e),p=(0,Z.jsx)(aC,{src:e,fileName:l,extension:f.toLowerCase()},n);break bb0}}t[4]=n,t[5]=l,t[6]=i,t[7]=r,t[8]=s,t[9]=u,t[10]=d,t[11]=f,t[12]=p}else u=t[9],d=t[10],f=t[11],p=t[12];if(p!==Symbol.for(`react.early_return_sentinel`))return p;let m;t[23]!==n||t[24]!==u||t[25]!==d||t[26]!==l||t[27]!==f||t[28]!==s?(m=(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto p-4`,children:u===`image`?(0,Z.jsx)(E,{src:s,alt:l,draggable:!1,slotClassName:`flex h-full w-full items-center justify-center`,className:`max-h-full max-w-full`}):u===`video`?(0,Z.jsx)(`video`,{src:s,controls:!0,className:`max-h-full max-w-full`}):u===`audio`?(0,Z.jsx)(`audio`,{src:s,controls:!0,className:`w-full max-w-md`}):(0,Z.jsxs)(`div`,{className:`flex max-w-sm flex-col items-center gap-8 text-center`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,Z.jsx)(`div`,{className:`flex items-center justify-center tracking-wide text-muted-foreground/80 text-2xs font-mono`,children:d}),(0,Z.jsx)(`div`,{className:`max-w-full text-balance break-words tracking-tight font-light text-2xl`,children:l})]}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[(0,Z.jsx)(Y,{variant:`default`,size:`sm`,onClick:()=>a(!0),"data-testid":`asset-preview-open-as-text`,className:`font-mono uppercase`,children:(0,Z.jsx)(q,{id:`qFWMl-`})}),(0,Z.jsx)(Y,{variant:`outline`,size:`sm`,className:`font-mono uppercase`,onClick:()=>{Nn({url:s,projectRelPath:n,ext:f.toLowerCase(),title:l,forceOsDelegation:!1})},children:(0,Z.jsx)(q,{id:`9npOH9`})})]})]})}),t[23]=n,t[24]=u,t[25]=d,t[26]=l,t[27]=f,t[28]=s,t[29]=m):m=t[29];let h;return t[30]!==l||t[31]!==m?(h=(0,Z.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":l,children:m}),t[30]=l,t[31]=m,t[32]=h):h=t[32],h}function uC(){let e=(0,$.c)(5),{_:t}=ht(),n;e[0]===t?n=e[1]:(n=t({id:`3VsNTI`}),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsx)(Bd,{className:`h-9 w-2/5 mt-6 mb-5`}),(0,Z.jsx)(Bd,{className:`h-4 w-full`}),(0,Z.jsx)(Bd,{className:`h-4 w-3/4`})]}),e[2]=r):r=e[2];let i;return e[3]===n?i=e[4]:(i=(0,Z.jsx)(`div`,{className:`tiptap-editor pt-10`,role:`status`,"aria-busy":`true`,"aria-label":n,children:r}),e[3]=n,e[4]=i),i}function dC(e){let{_:t}=ht();return e===`existing-repo`?[{id:`draft-spec`,icon:Dh,label:t({id:`LdKIHS`}),prompt:t({id:`N_7kkF`})},{id:`organize-specs`,icon:Gh,label:t({id:`cuA8QW`}),prompt:t({id:`mPy9lS`})},{id:`document-architecture`,icon:Yh,label:t({id:`6eniID`}),prompt:t({id:`uDlyqd`})}]:[{id:`competitor-research`,icon:_g,label:t({id:`GUqTzn`}),prompt:t({id:`KOZud0`})},{id:`eng-specs`,icon:Dh,label:t({id:`Qvls7J`}),prompt:t({id:`6qMe0o`})},{id:`bird-wiki`,icon:mh,label:t({id:`FqTpiN`}),prompt:t({id:`jtg_8-`})}]}function fC(e){let t=(0,$.c)(13),{scenario:n,className:r}=e,{_:i}=ht(),a=dC(n),[o,s]=(0,Q.useState)(null),c=(0,Q.useRef)(void 0),l,u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>()=>clearTimeout(c.current),u=[],t[0]=l,t[1]=u):(l=t[0],u=t[1]),(0,Q.useEffect)(l,u);let d,f;if(t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a){let e=function(e,t){tf(t).then(()=>{s(e),clearTimeout(c.current),c.current=setTimeout(()=>s(null),1600)}).catch(pC)};t[8]===r?d=t[9]:(d=J(`w-full divide-y divide-border/60 overflow-hidden rounded-2xl border border-border/60 bg-card`,r),t[8]=r,t[9]=d),f=a.map(t=>{let n=t.icon,r=o===t.id;return(0,Z.jsxs)(`li`,{className:`group flex items-start gap-3 p-3.5`,"data-testid":`copy-prompt-${t.id}`,children:[(0,Z.jsx)(n,{className:`mt-0.5 size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[(0,Z.jsx)(`span`,{className:`text-sm font-medium leading-tight text-foreground`,children:t.label}),(0,Z.jsx)(`span`,{className:`truncate text-1sm leading-relaxed text-muted-foreground`,children:t.prompt})]}),(0,Z.jsxs)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>e(t.id,t.prompt),"aria-label":i(r?{id:`6V3Ea3`}:{id:`RG4XHV`,values:{0:t.label}}),className:J(`shrink-0 gap-1.5 transition-opacity focus-visible:opacity-100 uppercase font-mono`,r?`opacity-100`:`opacity-0 group-hover:opacity-100`),"data-testid":`copy-prompt-button-${t.id}`,children:[r?(0,Z.jsx)(Fo,{className:`size-3.5`,"aria-hidden":`true`}):(0,Z.jsx)(ec,{className:`size-3.5`,"aria-hidden":`true`}),i(r?{id:`6V3Ea3`}:{id:`he3ygx`})]})]},t.id)}),t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=d,t[7]=f}else d=t[6],f=t[7];let p;return t[10]!==d||t[11]!==f?(p=(0,Z.jsx)(`ul`,{className:d,children:f}),t[10]=d,t[11]=f,t[12]=p):p=t[12],p}function pC(){}var mC=`ok-ask-ai-draft-v2`,hC={doc:null,dismissed:!1};function gC(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}var _C=null,vC=new Set;function yC(e){if(e===null)return!0;let t=e.content;return!Array.isArray(t)||t.length===0?!0:t.every(e=>{let t=e.content;return!Array.isArray(t)||t.length===0})}function bC(){let e=gC();if(!e)return hC;try{let t=e.getItem(mC);if(!t)return hC;let n=JSON.parse(t);return typeof n!=`object`||!n||Array.isArray(n)?hC:{doc:n,dismissed:!1}}catch(e){return console.warn(`failed to parse stored draft — clearing`,e),hC}}function xC(){return _C===null&&(_C=bC()),_C}function SC(e){let t=gC();if(t)try{e&&!yC(e)?t.setItem(mC,JSON.stringify(e)):t.removeItem(mC)}catch{}}function CC(){for(let e of vC)e()}function wC(){return xC()}function TC(e){let t=e&&!yC(e)?e:null;_C={...xC(),doc:t},SC(t),CC()}function EC(){TC(null)}var DC=Sa;function OC(e){let t=Ln(e).kind;return t===`folder`||t===`asset`?t:`page`}function kC(e){let t=(0,$.c)(14),{items:n,query:r,selectedIndex:i,onSelect:a,loading:o,error:s,hasMore:c}=e,l=o===void 0?!1:o,u=s===void 0?!1:s,d=c===void 0?!1:c,{_:f}=ht(),p=(0,Q.useId)(),m=(0,Q.useRef)(null),h,g;t[0]===i?(h=t[1],g=t[2]):(h=()=>{(m.current?.querySelectorAll(`[role="option"]`))?.item(i)?.scrollIntoView({block:`nearest`})},g=[i],t[0]=i,t[1]=h,t[2]=g),(0,Q.useEffect)(h,g);let _=i>=0&&i<n.length?n[i]:null,v;return t[3]!==f||t[4]!==u||t[5]!==d||t[6]!==n||t[7]!==p||t[8]!==l||t[9]!==a||t[10]!==r||t[11]!==i||t[12]!==_?(v=(0,Z.jsx)(`div`,{ref:m,className:`w-80 max-w-[min(28rem,90vw)] overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-md`,children:l?(0,Z.jsx)(`p`,{className:`px-2 py-1.5 text-sm text-muted-foreground`,"aria-live":`polite`,children:f({id:`3m2GBo`})}):u?(0,Z.jsx)(`p`,{className:`px-2 py-1.5 text-sm text-muted-foreground`,"aria-live":`assertive`,children:f({id:`weP6me`})}):n.length===0?(0,Z.jsx)(`p`,{className:`px-2 py-1.5 text-sm text-muted-foreground`,"aria-live":`polite`,children:r.trim()===``?f({id:`0E9DR6`}):f({id:`yQyglE`})}):(0,Z.jsxs)(`div`,{role:`listbox`,id:p,"aria-label":f({id:`05n5wS`}),tabIndex:-1,className:`max-h-64 overflow-y-auto subtle-scrollbar`,children:[(0,Z.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:_?_.title:``}),n.map((e,t)=>{let n=t===i,r=OC(e.path),o=r===`folder`,s=o?`${e.path}/`:e.path;return(0,Z.jsxs)(`button`,{id:`${p}-option-${t}`,type:`button`,role:`option`,"aria-selected":n,"data-active":n,"data-mention-kind":r,"data-testid":`composer-mention-option-${e.docName}`,className:`flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left ${n?`bg-accent text-accent-foreground`:``}`,onMouseDown:t=>{t.preventDefault(),a(e)},children:[(0,Z.jsx)(D,{path:e.path,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,Z.jsxs)(`span`,{className:`flex items-baseline gap-1.5`,children:[(0,Z.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.title}),o?(0,Z.jsx)(`span`,{className:`shrink-0 text-[10px] font-medium uppercase tracking-wide text-muted-foreground`,children:f({id:`kNqMMd`})}):null]}),(0,Z.jsx)(`span`,{className:`line-clamp-2 break-all text-xs text-muted-foreground`,children:s})]})]},e.docName)}),d?(0,Z.jsx)(`div`,{className:`px-2 py-1 text-xs text-muted-foreground`,"aria-hidden":!0,children:f({id:`F1T9y_`})}):null]})}),t[3]=f,t[4]=u,t[5]=d,t[6]=n,t[7]=p,t[8]=l,t[9]=a,t[10]=r,t[11]=i,t[12]=_,t[13]=v):v=t[13],v}var AC=8,jC=new ui(`composerMentionSuggestion`);function MC(e){return e.kind===`asset`?e.docName.replace(/^\//,``):e.kind===`folder`?e.docName:Qs(e.docName)}var NC=Qi.create({name:`doc`,topNode:!0,content:`paragraph+`}),PC=Qi.create({name:`paragraph`,group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML(){return[`p`,0]}}),FC=Qi.create({name:`text`,group:`inline`}),IC=Qi.create({name:`hardBreak`,group:`inline`,inline:!0,selectable:!1,parseHTML(){return[{tag:`br`}]},renderHTML(){return[`br`]},addKeyboardShortcuts(){return{"Shift-Enter":()=>this.editor.commands.insertContent({type:`hardBreak`})}}}),LC=Xi.create({name:`composerHistory`,addProseMirrorPlugins(){return[Va(),Ni({"Mod-z":Oa,"Mod-y":La,"Shift-Mod-z":La})]}}),RC=Qi.create({name:`composerMention`,group:`inline`,inline:!0,atom:!0,selectable:!0,addAttributes(){return{path:{default:``},label:{default:``}}},parseHTML(){return[{tag:`span[data-composer-mention]`}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.label||e.attrs.path);return[`span`,Ti(t,{"data-composer-mention":String(e.attrs.path??``),class:`composer-mention-chip`}),`@${n}`]},renderText({node:e}){return`@${e.attrs.path}`},addNodeView(){return({node:e,editor:t,getPos:n})=>{let r=String(e.attrs.path??``),i=String(e.attrs.label||e.attrs.path),a=document.createElement(`span`);a.className=`composer-mention-chip group/mention`,a.setAttribute(`data-composer-mention`,r),a.title=i;let o=document.createElement(`button`);o.type=`button`,o.className=`composer-mention-icon`,o.setAttribute(`aria-label`,yl._({id:`Xzy0s0`,values:{fullLabel:i}}));let s=document.createElement(`span`);s.className=`composer-mention-glyph composer-mention-glyph-icon`,s.setAttribute(`aria-hidden`,`true`),s.innerHTML=l(r),o.appendChild(s);let c=document.createElement(`span`);c.className=`composer-mention-glyph composer-mention-glyph-x`,c.setAttribute(`aria-hidden`,`true`),c.innerHTML=ee(fl),o.appendChild(c),o.addEventListener(`mousedown`,e=>e.preventDefault()),o.addEventListener(`click`,r=>{r.preventDefault();let i=typeof n==`function`?n():null;i!=null&&t.chain().focus().deleteRange({from:i,to:i+e.nodeSize}).run()}),a.appendChild(o);let u=document.createElement(`span`);return u.className=`composer-mention-label`,u.textContent=i,a.appendChild(u),{dom:a}}},addProseMirrorPlugins(){return[VC(this.editor)]}});function zC(e){return[NC,PC,FC,IC,LC,RC,...e?.placeholder?[DC.configure({placeholder:e.placeholder})]:[]]}function BC(e=Bn){let t=[],n=!1,r=null,i=!1;return{snapshot(){return{loaded:n,error:i}},async getItems(a){if(!n){r||=e();try{t=await r,n=!0,i=!1}catch(e){console.error(`[composer-mention] failed to fetch pages`,e),t=[],i=!0}finally{r=null}}return Kn(t,a).map(e=>({docName:e.docName,title:e.title,path:MC(e)})).filter(e=>e.path!==``)},reset(){t=[],n=!1,r=null,i=!1}}}function VC(e){let t=BC();return En({editor:e,pluginKey:jC,char:`@`,items:({query:e})=>t.getItems(e),command:({editor:e,range:t,props:n})=>{try{e.chain().focus().deleteRange(t).insertContent([{type:`composerMention`,attrs:{path:n.path,label:n.title}},{type:`text`,text:` `}]).run()}catch(e){console.error(`[composer-mention] insert failed`,{item:n,range:t},e)}},render:()=>{let e=null,n=null,r=0,i={popup:null,stopAutoUpdate:null},a=null,o=null,s=e=>{n?.command(e)},c=e=>{let n=e.items??[],{loaded:i,error:a}=t.snapshot();return{items:n,query:e.query??``,selectedIndex:r,onSelect:s,loading:!i&&!a,error:a,hasMore:n.length>=AC}},l=()=>{!e||!n||e.updateProps(c(n))};return{onBeforeStart(t){n=t,r=0;let s=Tn(()=>n,`composer-mention`);i.popup=s.popup,a=s.doPosition,o=s.reveal,e=new On(kC,{props:c(t),editor:t.editor}),s.popup.appendChild(e.element),i.stopAutoUpdate=s.startAutoUpdate()},onStart(e){n=e,r=0,l(),o?.()},onUpdate(e){n=e,r=Math.min(r,Math.max(0,e.items.length-1)),l(),a?.()},onKeyDown({event:e}){if(!n)return!1;let t=n.items;if(e.key===`ArrowDown`)return t.length===0?!1:(r=(r+1)%t.length,l(),!0);if(e.key===`ArrowUp`)return t.length===0?!1:(r=(r-1+t.length)%t.length,l(),!0);if(e.key===`Enter`||e.key===`Tab`){let e=t[r];return e?(n.command(e),!0):!1}return!1},onExit(){An(i),a=null,o=null,e?.destroy(),e=null,n=null,r=0,t.reset()}}}})}function HC(e){let t=[],n=new Set,r=[];return e.state.doc.forEach(e=>{let i=``;e.forEach(e=>{if(e.type.name===`composerMention`){let r=String(e.attrs.path??``);r!==``&&(i+=`@${r}`,n.has(r)||(n.add(r),t.push(r)))}else e.isText?i+=e.text??``:e.type.name===`hardBreak`&&(i+=`
|
|
13
13
|
`)}),r.push(i)}),{instruction:r.join(`
|
|
14
|
-
`).trim(),mentions:t}}function UC(e){let{instruction:t,mentions:n}=HC(e);return t===``&&n.length===0}function WC(e){let t=e?.content;return!Array.isArray(t)||t.length===0?!1:t.some(e=>Array.isArray(e.content)&&e.content.length>0)}function GC(e){let t=(0,$.c)(29),{ref:n,ariaLabel:r,onEmptyChange:i,onContentChange:a,onMentionsChange:o,onSubmit:s,className:c,placeholder:l,initialDoc:u}=e,d=(0,Q.useRef)(i),f=(0,Q.useRef)(a),p=(0,Q.useRef)(o),m=(0,Q.useRef)(s),h;t[0]!==a||t[1]!==i||t[2]!==o||t[3]!==s?(h=()=>{d.current=i,f.current=a,p.current=o,m.current=s},t[0]=a,t[1]=i,t[2]=o,t[3]=s,t[4]=h):h=t[4],(0,Q.useEffect)(h);let g;t[5]===l?g=t[6]:(g=zC({placeholder:l}),t[5]=l,t[6]=g);let _=u??void 0,v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=J(`composer-prosemirror py-1 outline-none`),t[7]=v):v=t[7];let y;t[8]===r?y=t[9]:(y={role:`textbox`,"aria-label":r,"aria-multiline":`true`,class:v},t[8]=r,t[9]=y);let b;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(b=(e,t)=>t.key===`Escape`?jC.getState(e.state)?.active?!1:(e.dom.blur(),!0):t.key===`Enter`&&!t.shiftKey&&!t.isComposing&&!e.composing?jC.getState(e.state)?.active?!1:(m.current(),!0):!1,t[10]=b):b=t[10];let x;t[11]===y?x=t[12]:(x={attributes:y,handleKeyDown:b},t[11]=y,t[12]=x);let S;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>{let{editor:t}=e;d.current(UC(t)),f.current?.(t.getJSON()),p.current?.(HC(t).mentions)},t[13]=S):S=t[13];let C;t[14]!==g||t[15]!==_||t[16]!==x?(C={extensions:g,content:_,immediatelyRender:!0,editorProps:x,onUpdate:S},t[14]=g,t[15]=_,t[16]=x,t[17]=C):C=t[17];let w=In(C),T;t[18]!==w||t[19]!==u?(T=()=>{w&&(UC(w)&&WC(u)&&(console.warn(`composer draft was incompatible with the current schema — clearing it`),EC()),d.current(UC(w)),p.current?.(HC(w).mentions))},t[18]=w,t[19]=u,t[20]=T):T=t[20];let E;t[21]===w?E=t[22]:(E=[w],t[21]=w,t[22]=E),(0,Q.useEffect)(T,E);let D,O;t[23]===w?(D=t[24],O=t[25]):(D=()=>({focus:()=>w?.commands.focus(),blur:()=>w?.commands.blur(),clear:()=>w?.commands.clearContent(!0),setText:e=>{w&&(w.commands.setContent(e),f.current?.(w.getJSON()),p.current?.(HC(w).mentions))},getContent:()=>w?HC(w):{instruction:``,mentions:[]}}),O=[w],t[23]=w,t[24]=D,t[25]=O),(0,Q.useImperativeHandle)(n,D,O);let k;return t[26]!==c||t[27]!==w?(k=(0,Z.jsx)(Un,{editor:w,className:c}),t[26]=c,t[27]=w,t[28]=k):k=t[28],k}function KC(e,t,n){return e.trim().length>0||t.length>0||n}new Set(Xr.map(e=>e.id));function qC(e,t){yc(e,t)}function JC(e){let t=(0,$.c)(2),{agentName:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(q,{id:`5PrrYw`,values:{agentName:n}}),t[0]=n,t[1]=r),r}function YC(e){let t=(0,$.c)(29),{scenario:n,className:r}=e,{_:i}=ht(),{states:a,refresh:o}=ts(),s=Yr(),{dispatch:c}=Yo(),l=id(),u=Xo(),[d,f]=(0,Q.useState)(ZC),p=Gr(),m=Wr(),h;t[0]===s?h=t[1]:(h=e=>Zr(s,e.source,e.id,!0,e.supported),t[0]=s,t[1]=h);let g=m.filter(h),_=ri(g,p),v;t[2]===u?.installedClis?v=t[3]:(v=u?.installedClis??{},t[2]=u?.installedClis,t[3]=v);let y=Gc({sticky:d,effectiveThreadAgent:_,enabledClis:u===null?[]:Hc(s,u.installedClis),enabledDesktopTargets:Cc(s),installedClis:v,terminalAvailable:u!==null,threadsAvailable:!0,desktopSelectable:!0}),b=y.kind===`thread`,x=y.kind===`cli`?y.cli:null,S=y.kind===`desktop`?y.target:null,C=x!==null,w=(0,Q.useRef)(null),[T]=(0,Q.useState)(XC),[E,D]=(0,Q.useState)(!0),[O,k]=(0,Q.useState)(!1),A;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(A=function(e){D(e),e||k(!1)},t[4]=A):A=t[4];let j=A,M=dC(n),N;t[5]===s?N=t[6]:(N=e=>ti(s,e.id),t[5]=s,t[6]=N);let P=Xr.filter(N),F=Xr.every(e=>a[e.id]?.installed!=null),I=u!==null&&Hc(s,u.installedClis).length>0,L=F&&P.length===0&&g.length===0&&!I,R;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(R=function(e){f(e),yc(e),qC(e)},t[7]=R):R=t[7];let z=R,B;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(B=function(e){f(vc(e)),yc(vc(e))},t[8]=B):B=t[8];let V=B,H;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(H=function(e){qr(e),f(_c),yc(_c)},t[9]=H):H=t[9];let U=H,W=function(){let{instruction:e,mentions:t}=w.current?.getContent()??{instruction:``,mentions:[]};if(!KC(e,t,!1)){k(!0);return}let r=Zo({workspace:l,description:e,scenario:n,mentions:t});r!==null&&(ds(r,_===null?void 0:{agent:{source:_.source,id:_.id}}),w.current?.clear(),EC())},G=function(){if(u===null||x===null)return;let{instruction:e,mentions:t}=w.current?.getContent()??{instruction:``,mentions:[]};if(!KC(e,t,!1)){k(!0);return}let r=Zo({workspace:l,description:e,scenario:n,mentions:t});r!==null&&(u.launchInTerminal(r,x),w.current?.clear(),EC())},K=function(e){let{instruction:t,mentions:r}=w.current?.getContent()??{instruction:``,mentions:[]};if(!KC(t,r,!1)){k(!0);return}if(qC(e),a[e]?.installed!==!0){let t=Xr.find(t=>t.id===e);t&&ls(t);return}let i=Zo({workspace:l,description:t,scenario:n,mentions:r});i!==null&&(c(e,i),w.current?.clear(),EC())},ee=function(){b?W():C?G():S!==null&&K(S)},te=function(e){w.current?.setText(e),w.current?.focus()};if(L){let e;t[10]===r?e=t[11]:(e=J(`flex w-full flex-wrap items-center justify-between gap-3 rounded-2xl border border-border/60 bg-card px-4 py-3`,r),t[10]=r,t[11]=e);let n;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(qs,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),t[12]=n):n=t[12];let i;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[n,(0,Z.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`XT-L4j`})})]}),t[13]=i):i=t[13];let a;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsxs)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:Sl,className:`gap-1.5`,"data-testid":`create-configure-agents`,children:[(0,Z.jsx)(al,{"aria-hidden":`true`,className:`size-3.5`}),(0,Z.jsx)(q,{id:`jRAGrQ`})]}),t[14]=a):a=t[14];let o;return t[15]===e?o=t[16]:(o=(0,Z.jsxs)(`div`,{className:e,"data-testid":`create-no-agents`,children:[i,a]}),t[15]=e,t[16]=o),o}let ne=u?Hc(s,u.installedClis):[],re=P.length>0,ie=ne.length>0,ae=g.length>0,oe=y.kind!==`none`,se;t[17]===r?se=t[18]:(se=J(`flex w-full flex-col gap-3`,r),t[17]=r,t[18]=se);let ce;t[19]===i?ce=t[20]:(ce=i({id:`7hctf2`}),t[19]=i,t[20]=ce);let le;t[21]===i?le=t[22]:(le=i({id:`0jD-Gn`}),t[21]=i,t[22]=le);let ue;t[23]!==E||t[24]!==O?(ue=O&&E?(0,Z.jsx)(`p`,{role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-input-required`,children:(0,Z.jsx)(q,{id:`1FLarN`})}):(0,Z.jsx)(`span`,{}),t[23]=E,t[24]=O,t[25]=ue):ue=t[25];let de=oe?(0,Z.jsxs)(nf,{children:[(0,Z.jsx)(Y,{type:`button`,onClick:()=>b?W():C?G():S===null?void 0:K(S),variant:`outline`,className:`gap-1.5`,"data-testid":`create-with-agent`,children:b&&_!==null?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(yo,{agentId:_.id,iconUrl:_.iconUrl,className:`size-3.5`}),(0,Z.jsx)(JC,{agentName:_.name})]}):C&&x!==null?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Qr,{id:Kr(x),"aria-hidden":`true`,className:`size-3.5`}),(0,Z.jsx)(q,{id:`4rjwLG`,values:{0:Yi[x].displayName}})]}):S===null?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Qr,{id:S,"aria-hidden":`true`,className:`size-3.5`}),(0,Z.jsx)(q,{id:`9dw5bW`,values:{0:qo(S)}})]})}),(0,Z.jsxs)(Nr,{onOpenChange:e=>{e&&o()},children:[(0,Z.jsx)(Dr,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,"aria-label":i({id:`nskygk`}),size:`icon`,variant:`outline`,"data-testid":`create-with-agent-menu`,children:(0,Z.jsx)(Lo,{"aria-hidden":`true`,className:`size-3.5`})})}),(0,Z.jsxs)(jr,{align:`end`,className:`max-h-80 min-w-[200px]`,children:[ae?(0,Z.jsxs)(Er,{"aria-label":i({id:`vPKX2i`}),children:[(0,Z.jsxs)(kr,{className:`flex items-center gap-1.5`,children:[(0,Z.jsx)(q,{id:`RXEbZy`}),(0,Z.jsx)(ei,{})]}),g.map(e=>(0,Z.jsxs)(Cr,{onSelect:()=>U(e),"data-testid":`create-agent-option-thread-${e.source}:${e.id}`,children:[(0,Z.jsx)(yo,{agentId:e.id,iconUrl:e.iconUrl,className:`size-4`}),(0,Z.jsx)(`span`,{className:`flex-1 truncate`,children:e.name}),b&&_!==null&&_.source===e.source&&_.id===e.id?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]},`${e.source}:${e.id}`))]}):null,ae&&(ie||re)?(0,Z.jsx)(Pr,{}):null,ie?(0,Z.jsxs)(Er,{"aria-label":i({id:`ALhMYW`}),children:[(0,Z.jsx)(kr,{children:(0,Z.jsx)(q,{id:`ALhMYW`})}),ne.map(e=>{let{displayName:t}=Yi[e];return(0,Z.jsxs)(Cr,{onSelect:()=>V(e),"data-testid":`create-with-cli-${e}`,"aria-label":i({id:`QYfQdv`,values:{displayName:t}}),children:[(0,Z.jsx)(Qr,{id:Kr(e),"aria-hidden":`true`,className:`size-4`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:t}),x===e?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]},e)})]}):null,re?(0,Z.jsxs)(Z.Fragment,{children:[ie?(0,Z.jsx)(Pr,{}):null,(0,Z.jsxs)(Er,{"aria-label":i({id:`BBqGS9`}),children:[(0,Z.jsx)(kr,{children:(0,Z.jsx)(q,{id:`BBqGS9`})}),P.map(e=>(0,Z.jsxs)(Cr,{onSelect:()=>z(e.id),"data-testid":`create-agent-option-${e.id}`,children:[(0,Z.jsx)(Qr,{id:e.id,"aria-hidden":`true`,className:`size-4`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:e.displayName}),!C&&e.id===S?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]},e.id))]})]}):null,(0,Z.jsx)(Pr,{}),(0,Z.jsxs)(Cr,{onSelect:Sl,"data-testid":`create-agent-option-settings`,children:[(0,Z.jsx)(al,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`jRAGrQ`})})]})]})]})]}):(0,Z.jsx)(Y,{type:`button`,variant:`outline`,disabled:!0,className:`gap-1.5`,"data-testid":`create-with-agent`,children:(0,Z.jsx)(q,{id:`hYgDIe`})}),fe;return t[26]!==ue||t[27]!==de?(fe=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 px-3 pb-3`,children:[ue,de]}),t[26]=ue,t[27]=de,t[28]=fe):fe=t[28],(0,Z.jsxs)(`div`,{className:se,children:[(0,Z.jsxs)(`div`,{onMouseDown:e=>af(e,w),className:`flex w-full cursor-text flex-col rounded-2xl border border-border/60 bg-card shadow-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50`,children:[(0,Z.jsx)(GC,{ref:w,ariaLabel:ce,placeholder:le,onEmptyChange:j,onContentChange:TC,onSubmit:ee,initialDoc:T,className:`max-h-96 overflow-y-auto px-4 py-3 text-sm leading-relaxed subtle-scrollbar [&_.ProseMirror]:min-h-16`}),fe]}),n!==`existing-repo`&&M.length>0?(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`I5685_`})}),M.map(e=>{let t=e.icon;return(0,Z.jsxs)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>te(e.prompt),className:`gap-1.5 rounded-md font-normal text-muted-foreground hover:text-foreground`,"data-testid":`create-suggestion-${e.id}`,children:[(0,Z.jsx)(t,{className:`size-3.5`,"aria-hidden":`true`}),e.label]},e.id)})]}):null]})}function XC(){return wC().doc??void 0}function ZC(){return Uc()}function QC(e){let t=(0,$.c)(12),{title:n,subtitle:r,celebrateSignal:i}=e,a;t[0]===i?a=t[1]:(a=(0,Z.jsx)(Xp,{size:64,celebrateSignal:i}),t[0]=i,t[1]=a);let o;t[2]===n?o=t[3]:(o=(0,Z.jsx)(`h2`,{className:`text-2xl font-light tracking-tighter text-balance`,children:n}),t[2]=n,t[3]=o);let s;t[4]===r?s=t[5]:(s=r?(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r}):null,t[4]=r,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,Z.jsxs)(`div`,{className:`flex flex-col items-start gap-3 @md/emptystate:flex-row @md/emptystate:items-center @md/emptystate:gap-4`,children:[a,c]}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}function $C({isOnboarding:e,isEmbedded:t}){return e?{title:{id:`6h4zVU`},subtitle:t?{id:`vGeNNQ`}:{id:`qpQwGC`}}:{title:{id:`FOGD7m`},subtitle:t?{id:`3DTatP`}:{id:`MqQoV-`}}}var ew=`open-knowledge:create-top-level-file`;function tw(e={}){window.dispatchEvent(new CustomEvent(ew,{detail:e}))}function nw(e){let t=t=>{let n=t.detail;e(n??{})};return window.addEventListener(ew,t),()=>window.removeEventListener(ew,t)}function rw(e){let t=(0,$.c)(28),{celebrateSignal:n,onAddStarterPack:r}=e,{_:i}=ht(),a=Xs(),{title:o,subtitle:s}=$C({isOnboarding:!1,isEmbedded:a}),c=_s(),l;t[0]!==c.data||t[1]!==c.status?(l=c.status===`ready`?c.data:[],t[0]=c.data,t[1]=c.status,t[2]=l):l=t[2];let u=l,d=c.status===`loading`||c.status===`idle`,f=c.status===`error`,p=QC,m=i(o),h=i(s),g;t[3]!==p||t[4]!==n||t[5]!==m||t[6]!==h?(g=(0,Z.jsx)(p,{title:m,subtitle:h,celebrateSignal:n}),t[3]=p,t[4]=n,t[5]=m,t[6]=h,t[7]=g):g=t[7];let _;t[8]===a?_=t[9]:(_=a?(0,Z.jsx)(fC,{scenario:`existing-repo`}):(0,Z.jsx)(YC,{scenario:`existing-repo`}),t[8]=a,t[9]=_);let v;t[10]!==u||t[11]!==f||t[12]!==d?(v=d||f||u.length>0?(0,Z.jsx)(ow,{templates:u,loading:d,error:f,onSelect:aw}):null,t[10]=u,t[11]=f,t[12]=d,t[13]=v):v=t[13];let y,b;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(Ut,{"aria-hidden":`true`,className:`size-3`}),b=(0,Z.jsx)(q,{id:`IajAbS`}),t[14]=y,t[15]=b):(y=t[14],b=t[15]);let x;t[16]===r?x=t[17]:(x=(0,Z.jsxs)(Y,{onClick:r,variant:`link-muted`,size:`xs`,className:`font-mono text-xs uppercase tracking-wider`,children:[y,b]}),t[16]=r,t[17]=x);let S;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(Y,{variant:`link-muted`,className:`justify-end`,size:`sm`,onClick:iw,children:(0,Z.jsx)(q,{id:`L4Cdd9`,components:{0:(0,Z.jsx)(qn,{"aria-hidden":`true`,className:`size-3`})}})}),t[18]=S):S=t[18];let C;t[19]===x?C=t[20]:(C=(0,Z.jsxs)(`div`,{className:`-mt-6 flex w-full items-center justify-between gap-4`,children:[x,S]}),t[19]=x,t[20]=C);let w;t[21]!==C||t[22]!==v?(w=(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-8`,children:[v,C]}),t[21]=C,t[22]=v,t[23]=w):w=t[23];let T;return t[24]!==w||t[25]!==g||t[26]!==_?(T=(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-8 py-12 max-w-5xl my-auto`,children:[g,_,w]}),t[24]=w,t[25]=g,t[26]=_,t[27]=T):T=t[27],T}function iw(){return tw({initialDir:``})}function aw(e,t){return tw({template:{folder:e,name:t}})}function ow(e){let t=(0,$.c)(25),{templates:n,loading:r,error:i,onSelect:a}=e,{_:o}=ht(),s;t[0]===o?s=t[1]:(s=o({id:`_8quCH`}),t[0]=o,t[1]=s);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`_8quCH`})}),t[2]=c):c=t[2];let l;t[3]!==o||t[4]!==i||t[5]!==r||t[6]!==n?(l=r||i?null:(0,Z.jsx)(vu,{className:`text-2xs`,variant:`gray`,"aria-label":o({id:`X7u0xR`,values:{0:n.length}}),children:n.length}),t[3]=o,t[4]=i,t[5]=r,t[6]=n,t[7]=l):l=t[7];let u;t[8]===l?u=t[9]:(u=(0,Z.jsxs)(`header`,{className:`flex items-center gap-2 font-mono text-2xs uppercase tracking-wider text-muted-foreground`,children:[c,l]}),t[8]=l,t[9]=u);let d;t[10]===o?d=t[11]:(d=o({id:`irFGwu`}),t[10]=o,t[11]=d);let f;t[12]!==i||t[13]!==r||t[14]!==a||t[15]!==n?(f=r?(0,Z.jsx)(`p`,{className:`p-4 text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`Hl89Qd`})}):i?(0,Z.jsx)(`p`,{role:`alert`,className:`p-4 text-1sm text-destructive`,children:(0,Z.jsx)(q,{id:`54Y6Fg`})}):n.map(e=>(0,Z.jsx)(sw,{template:e,targetLabel:e.source_folder===``?`/`:`${e.source_folder}/`,onClick:()=>a(e.source_folder,e.name)},`${e.source_folder}/${e.name}`)),t[12]=i,t[13]=r,t[14]=a,t[15]=n,t[16]=f):f=t[16];let p;t[17]!==r||t[18]!==d||t[19]!==f?(p=(0,Z.jsx)(`div`,{className:`w-full overflow-hidden rounded-xl border border-border/60 bg-card`,children:(0,Z.jsx)(`section`,{"aria-busy":r,"aria-label":d,tabIndex:0,className:`subtle-scrollbar scroll-fade-mask flex max-h-[260px] w-full flex-col overflow-y-auto overscroll-contain focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50`,children:f})}),t[17]=r,t[18]=d,t[19]=f,t[20]=p):p=t[20];let m;return t[21]!==s||t[22]!==u||t[23]!==p?(m=(0,Z.jsxs)(`section`,{"aria-label":s,className:`flex w-full flex-col gap-3`,children:[u,p]}),t[21]=s,t[22]=u,t[23]=p,t[24]=m):m=t[24],m}function sw(e){let t=(0,$.c)(24),{template:n,targetLabel:r,onClick:i}=e,{_:a}=ht(),o;t[0]!==n.name||t[1]!==n.title?(o=n.title?.trim()||n.name,t[0]=n.name,t[1]=n.title,t[2]=o):o=t[2];let s=o,c=`${n.name}.md`,l=n.source_folder===``,u;t[3]!==a||t[4]!==s||t[5]!==c||t[6]!==l||t[7]!==r?(u=a(l?{id:`89TtiD`,values:{displayTitle:s,fileName:c}}:{id:`0_J12R`,values:{displayTitle:s,fileName:c,targetLabel:r}}),t[3]=a,t[4]=s,t[5]=c,t[6]=l,t[7]=r,t[8]=u):u=t[8];let d=u,f;t[9]===s?f=t[10]:(f=(0,Z.jsx)(`span`,{className:`truncate text-sm font-medium leading-tight text-foreground/80`,children:s}),t[9]=s,t[10]=f);let p;t[11]===c?p=t[12]:(p=(0,Z.jsx)(`span`,{className:`truncate font-mono text-1sm font-normal text-muted-foreground`,children:c}),t[11]=c,t[12]=p);let m;t[13]!==f||t[14]!==p?(m=(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,children:[f,p]}),t[13]=f,t[14]=p,t[15]=m):m=t[15];let h=`shrink-0 font-mono text-1sm ${l?`text-muted-foreground/70`:`text-muted-foreground`}`,g;t[16]!==h||t[17]!==r?(g=(0,Z.jsx)(`span`,{className:h,children:r}),t[16]=h,t[17]=r,t[18]=g):g=t[18];let _;return t[19]!==d||t[20]!==i||t[21]!==m||t[22]!==g?(_=(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,onClick:i,"aria-label":d,className:`group flex h-auto w-full items-center justify-between gap-4 rounded-none p-4 text-left transition-colors hover:bg-muted/50 focus-visible:bg-muted/50`,children:[m,g]}),t[19]=d,t[20]=i,t[21]=m,t[22]=g,t[23]=_):_=t[23],_}function cw(e){let t=(0,$.c)(25),{terminalDock:n}=e,r=n===void 0?null:n,[i,a]=(0,Q.useState)(!1),[o,s]=(0,Q.useState)(void 0),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(0),f=(0,Q.useRef)(!1),p=(0,Q.useRef)(void 0),m,h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>{let e=!1,t=async function(){try{let{ok:t,body:n}=await nu();if(e)return;let r=t?Ma.safeParse(n):null;r?.success?(l(dw(r.data.documents)),f.current=!0):f.current||=(l(1),!0)}catch{!e&&!f.current&&(l(1),f.current=!0)}};t();let n=Jl(e=>{e.includes(`files`)&&t()});return()=>{e=!0,n(),clearTimeout(p.current)}},h=[],t[0]=m,t[1]=h):(m=t[0],h=t[1]),(0,Q.useEffect)(m,h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=function(){clearTimeout(p.current),p.current=setTimeout(()=>d(uw),500),nu().then(e=>{let{ok:t,body:n}=e;if(!t)return;let r=Ma.safeParse(n);r.success&&l(dw(r.data.documents))}).catch(lw)},t[2]=g):g=t[2];let _=g,v=c!==null,y=c===0,b;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(b=function(e){a(e),e||s(void 0)},t[3]=b):b=t[3];let x=b;if(r!==null){let e=r===`bottom`?`justify-end`:`justify-center`,n;t[4]===e?n=t[5]:(n=J(`@container/emptystate flex min-h-0 flex-1 flex-col items-center pb-8 pt-10`,e),t[4]=e,t[5]=n);let i;t[6]!==u||t[7]!==y||t[8]!==v?(i=v?(0,Z.jsx)(fw,{isOnboarding:y,celebrateSignal:u}):null,t[6]=u,t[7]=y,t[8]=v,t[9]=i):i=t[9];let a;t[10]===i?a=t[11]:(a=(0,Z.jsx)(`div`,{className:`flex w-full flex-col items-center px-4 @md/emptystate:px-10 @2xl/emptystate:px-16`,children:i}),t[10]=i,t[11]=a);let o;return t[12]!==n||t[13]!==a?(o=(0,Z.jsx)(`div`,{className:n,children:a}),t[12]=n,t[13]=a,t[14]=o):o=t[14],o}let S;t[15]!==u||t[16]!==y||t[17]!==v?(S=v?y?(0,Z.jsx)(pw,{celebrateSignal:u,onPackSelect:e=>{s(e),a(!0)}}):(0,Z.jsx)(rw,{celebrateSignal:u,onAddStarterPack:()=>{a(!0)}}):null,t[15]=u,t[16]=y,t[17]=v,t[18]=S):S=t[18];let C;t[19]!==o||t[20]!==i?(C=(0,Z.jsx)(Ov,{open:i,onOpenChange:x,onSeedApplied:_,initialPackId:o}),t[19]=o,t[20]=i,t[21]=C):C=t[21];let w;return t[22]!==S||t[23]!==C?(w=(0,Z.jsx)(`div`,{className:`@container/emptystate flex min-h-0 flex-1 flex-col items-center overflow-y-auto subtle-scrollbar`,children:(0,Z.jsxs)(`div`,{className:`flex w-full flex-1 flex-col items-center px-4 @md/emptystate:px-10 @2xl/emptystate:px-16`,children:[S,C]})}),t[22]=S,t[23]=C,t[24]=w):w=t[24],w}function lw(){}function uw(e){return e+1}function dw(e){return Nl(e).filter(e=>e.kind===`document`||e.kind===`folder`).length}function fw(e){let t=(0,$.c)(15),{isOnboarding:n,celebrateSignal:r}=e,{_:i}=ht(),a=Xs(),o,s,c,l;if(t[0]!==i||t[1]!==a||t[2]!==n){let{title:e,subtitle:r}=$C({isOnboarding:n,isEmbedded:a});l=`w-full max-w-5xl`,o=QC,s=i(e),c=i(r),t[0]=i,t[1]=a,t[2]=n,t[3]=o,t[4]=s,t[5]=c,t[6]=l}else o=t[3],s=t[4],c=t[5],l=t[6];let u;t[7]!==o||t[8]!==r||t[9]!==s||t[10]!==c?(u=(0,Z.jsx)(o,{title:s,subtitle:c,celebrateSignal:r}),t[7]=o,t[8]=r,t[9]=s,t[10]=c,t[11]=u):u=t[11];let d;return t[12]!==l||t[13]!==u?(d=(0,Z.jsx)(`div`,{className:l,children:u}),t[12]=l,t[13]=u,t[14]=d):d=t[14],d}function pw(e){let t=(0,$.c)(29),{celebrateSignal:n,onPackSelect:r}=e,{_:i}=ht(),a=Xs(),o,s,c,l;if(t[0]!==i||t[1]!==a){let{title:e,subtitle:n}=$C({isOnboarding:!0,isEmbedded:a});l=`flex w-full flex-col gap-10 py-12 max-w-5xl my-auto`,o=QC,s=i(e),c=i(n),t[0]=i,t[1]=a,t[2]=o,t[3]=s,t[4]=c,t[5]=l}else o=t[2],s=t[3],c=t[4],l=t[5];let u;t[6]!==o||t[7]!==n||t[8]!==s||t[9]!==c?(u=(0,Z.jsx)(o,{title:s,subtitle:c,celebrateSignal:n}),t[6]=o,t[7]=n,t[8]=s,t[9]=c,t[10]=u):u=t[10];let d;t[11]===a?d=t[12]:(d=a?(0,Z.jsx)(fC,{scenario:`new-project`}):(0,Z.jsx)(YC,{scenario:`new-project`}),t[11]=a,t[12]=d);let f;t[13]!==i||t[14]!==a?(f=i(a?{id:`GubkSu`}:{id:`xeXS4P`}),t[13]=i,t[14]=a,t[15]=f):f=t[15];let p;t[16]===f?p=t[17]:(p=(0,Z.jsx)(hw,{label:f}),t[16]=f,t[17]=p);let m;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(m=[`okf`,`entity-vault`],t[18]=m):m=t[18];let h;t[19]===r?h=t[20]:(h=(0,Z.jsx)(Sv,{onPackSelect:r,onCreateBlankFile:mw,collapsedPackIds:m}),t[19]=r,t[20]=h);let g;t[21]!==p||t[22]!==h?(g=(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-3`,children:[p,h]}),t[21]=p,t[22]=h,t[23]=g):g=t[23];let _;return t[24]!==g||t[25]!==l||t[26]!==u||t[27]!==d?(_=(0,Z.jsxs)(`div`,{className:l,children:[u,d,g]}),t[24]=g,t[25]=l,t[26]=u,t[27]=d,t[28]=_):_=t[28],_}function mw(){return tw()}function hw(e){let t=(0,$.c)(13),{label:n}=e,{_:r}=ht(),i;t[0]===n?i=t[1]:(i=(0,Z.jsx)(`span`,{className:`font-mono text-2xs uppercase tracking-wider text-muted-foreground whitespace-nowrap`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r({id:`jAMpHn`}),t[2]=r,t[3]=a);let o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(Kc,{className:`size-3.5`,"aria-hidden":!0}),t[4]=o):o=t[4];let s;t[5]===a?s=t[6]:(s=(0,Z.jsx)(an,{className:`text-muted-foreground transition-colors hover:text-foreground`,"aria-label":a,"data-testid":`starter-pack-info`,children:o}),t[5]=a,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(on,{className:`max-w-xs`,children:(0,Z.jsx)(`p`,{className:`leading-relaxed wrap-break-word`,children:(0,Z.jsx)(q,{id:`k4CuuV`})})}),t[7]=c):c=t[7];let l;t[8]===s?l=t[9]:(l=(0,Z.jsxs)(cn,{children:[s,c]}),t[8]=s,t[9]=l);let u;return t[10]!==i||t[11]!==l?(u=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[i,l]}),t[10]=i,t[11]=l,t[12]=u):u=t[12],u}function gw(e){return e===``?`.ok/frontmatter.yml`:`${e}/.ok/frontmatter.yml`}function _w(e){let t=(0,$.c)(70),{folderPath:n,state:r,onChange:i}=e,{_:a}=ht(),[o,s]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(null);if(r.status===`idle`||r.status===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsxs)(`section`,{className:`rounded-lg border bg-card p-4 space-y-3`,children:[(0,Z.jsx)(yw,{}),(0,Z.jsx)(Bd,{className:`h-7 w-full`}),(0,Z.jsx)(Bd,{className:`h-7 w-full`}),(0,Z.jsx)(Bd,{className:`h-7 w-full`})]}),t[0]=e):e=t[0],e}if(r.status===`error`){let{message:e}=r,n;return t[1]===e?n=t[2]:(n=(0,Z.jsx)(`section`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,role:`alert`,children:(0,Z.jsx)(q,{id:`lzmtKp`,values:{message:e}})}),t[1]=e,t[2]=n),n}let f;t[3]===r.data.frontmatterLocal?f=t[4]:(f=r.data.frontmatterLocal??{},t[3]=r.data.frontmatterLocal,t[4]=f);let p=f,m;t[5]===r.data.folder.path?m=t[6]:(m=gw(r.data.folder.path),t[5]=r.data.folder.path,t[6]=m);let h=m,g;t[7]===p?g=t[8]:(g=Object.keys(p),t[7]=p,t[8]=g);let _=g,v;t[9]!==a||t[10]!==n||t[11]!==i?(v=async function(e,t){let r=await pc(n,{[e]:t});if(!r.ok){let{error:e}=r;X.error(a({id:`xXo8FT`,values:{error:e}}));return}i()},t[9]=a,t[10]=n,t[11]=i,t[12]=v):v=t[12];let y=v,b;t[13]!==a||t[14]!==n||t[15]!==i?(b=async function(e){let t=await pc(n,{[e]:null});if(!t.ok){let{error:e}=t;X.error(a({id:`ZU8VV_`,values:{error:e}}));return}i()},t[13]=a,t[14]=n,t[15]=i,t[16]=b):b=t[16];let x=b,S;t[17]!==y||t[18]!==p?(S=function(e,t){let n=p[e];y(e,Co(n,t))},t[17]=y,t[18]=p,t[19]=S):S=t[19];let C=S,w;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(w=function(){l({name:``,type:`text`,value:``,error:null}),s(!1)},t[20]=w):w=t[20];let T=w,E;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(E=function(e){l(t=>{if(!t)return t;let n=e===`date`?new Date().toISOString().slice(0,10):No[e];return{...t,type:e,value:n,error:null}})},t[21]=E):E=t[21];let D=E,O;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(O=function(e){l(t=>t&&{...t,value:e})},t[22]=O):O=t[22];let k=O,A;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(A=function(e){l(t=>t&&{...t,name:e,error:null})},t[23]=A):A=t[23];let j=A,M;t[24]!==a||t[25]!==c||t[26]!==n||t[27]!==i||t[28]!==p?(M=async function(e){if(!c)return;let t=e??c.value,r=c.name.trim();if(!r){l({...c,value:t,error:a({id:`8_brI5`})});return}if(wa(t)){l({...c,value:t,error:a({id:`hXUWyd`})});return}if(Object.hasOwn(p,r)){l({...c,value:t,error:a({id:`CTJLpz`,values:{trimmed:r}})});return}let o=await pc(n,{[r]:t});if(!o.ok){l({...c,value:t,error:o.error});return}l(null),i()},t[24]=a,t[25]=c,t[26]=n,t[27]=i,t[28]=p,t[29]=M):M=t[29];let N=M,P;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(P=function(e){d({key:e,draft:e,error:null})},t[30]=P):P=t[30];let F=P,I;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(I=function(e){d(t=>t&&{...t,draft:e,error:null})},t[31]=I):I=t[31];let L=I,R;t[32]!==a||t[33]!==n||t[34]!==i||t[35]!==p||t[36]!==u?(R=async function(){if(!u)return;let e=u.draft.trim();if(!e){d({...u,error:a({id:`8_brI5`})});return}if(e===u.key){d(null);return}if(Object.hasOwn(p,e)){d({...u,error:a({id:`CTJLpz`,values:{trimmed:e}})});return}let t=p[u.key],r=await pc(n,{[u.key]:null,[e]:t});if(!r.ok){d({...u,error:r.error});return}d(null),i()},t[32]=a,t[33]=n,t[34]=i,t[35]=p,t[36]=u,t[37]=R):R=t[37];let z=R,B;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(B=function(){d(null)},t[38]=B):B=t[38];let V=B,H=!o,U;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(U=e=>s(!e),t[39]=U):U=t[39];let W=`size-3 transition-transform ${o?``:`rotate-90`}`,G;t[40]===W?G=t[41]:(G=(0,Z.jsx)(Ro,{className:W,"aria-hidden":!0}),t[40]=W,t[41]=G);let K;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`vQIVHc`})}),t[42]=K):K=t[42];let ee;t[43]===G?ee=t[44]:(ee=(0,Z.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:[G,K]}),t[43]=G,t[44]=ee);let te;t[45]===h?te=t[46]:(te=(0,Z.jsx)(`code`,{className:`text-xs text-muted-foreground font-mono cursor-text select-text`,onClick:vw,children:h}),t[45]=h,t[46]=te);let ne;t[47]!==ee||t[48]!==te?(ne=(0,Z.jsxs)(un,{className:`flex w-full cursor-pointer items-center justify-between gap-2 px-3 py-2.5 data-[state=open]:border-b border-border`,children:[ee,te]}),t[47]=ee,t[48]=te,t[49]=ne):ne=t[49];let re;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,Z.jsx)(`p`,{className:`px-1 pb-2 text-sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`hSBIG-`})}),t[50]=re):re=t[50];let ie;t[51]!==c||t[52]!==y||t[53]!==z||t[54]!==_||t[55]!==p||t[56]!==x||t[57]!==u||t[58]!==C?(ie=_.length===0&&!c?(0,Z.jsx)(`p`,{className:`px-1 py-1 text-sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`4c_a6S`})}):_.map(e=>{let t=p[e];return(0,Z.jsx)(jo,{keyName:e,value:t,declared:Eo(t,Za(t)),rename:{state:u?.key===e?u:null,onBegin:()=>F(e),onChangeDraft:L,onCommit:z,onCancel:V},badge:null,onCommit:t=>void y(e,t),onChangeType:t=>C(e,t),onRemove:()=>void x(e)},e)}),t[51]=c,t[52]=y,t[53]=z,t[54]=_,t[55]=p,t[56]=x,t[57]=u,t[58]=C,t[59]=ie):ie=t[59];let ae;t[60]!==c||t[61]!==N?(ae=c?(0,Z.jsx)(Oo,{draft:c,onChangeName:j,onChangeType:D,onChangeValue:k,onCommit:e=>void N(e),onCancel:()=>l(null)}):(0,Z.jsx)(`div`,{className:`mt-1 flex flex-wrap items-center gap-1`,children:(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`add-property-trigger`,onClick:()=>T(),className:`flex items-center gap-1.5 rounded px-2 py-1 font-medium text-sm hover:bg-muted/50 hover:text-foreground`,children:[(0,Z.jsx)(Ut,{className:`size-3.5`}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`G8t9NN`})})]})}),t[60]=c,t[61]=N,t[62]=ae):ae=t[62];let oe;t[63]!==ie||t[64]!==ae?(oe=(0,Z.jsx)(ln,{children:(0,Z.jsxs)(`div`,{className:`px-2 py-2`,children:[re,ie,ae]})}),t[63]=ie,t[64]=ae,t[65]=oe):oe=t[65];let se;return t[66]!==H||t[67]!==ne||t[68]!==oe?(se=(0,Z.jsx)(`section`,{className:`rounded-lg border bg-card`,children:(0,Z.jsxs)(dn,{open:H,onOpenChange:U,children:[ne,oe]})}),t[66]=H,t[67]=ne,t[68]=oe,t[69]=se):se=t[69],se}function vw(e){return e.stopPropagation()}function yw(){let e=(0,$.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Nh,{className:`size-4 text-muted-foreground`,"aria-hidden":!0}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t,(0,Z.jsx)(`h2`,{className:`text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(q,{id:`vQIVHc`})})]}),e[1]=n):n=e[1],n}function bw(e){let t=Math.floor((Date.now()-new Date(e).getTime())/1e3);return t<60?yl._({id:`xOTzt5`}):t<3600?yl._({id:`zbymaY`,values:{0:Math.floor(t/60)}}):t<86400?yl._({id:`optX0N`,values:{0:Math.floor(t/3600)}}):t<86400*7?yl._({id:`l1l8sj`,values:{0:Math.floor(t/86400)}}):new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function xw(e){return(e.split(`/`).pop()??e).replace(/\.md$/,``)}function Sw(e){let t=e.message,n=t.indexOf(`: `),r=n===-1?t:t.slice(0,n),i=n===-1?``:t.slice(n+2);switch(r){case`template-create`:return{Icon:As,label:yl._({id:`QR5SP1`}),detail:xw(i)};case`template-edit`:return{Icon:$s,label:yl._({id:`-LHLx7`}),detail:xw(i)};case`template-delete`:return{Icon:ol,label:yl._({id:`_gkGSK`}),detail:xw(i)};case`template-rename`:case`template-move`:{let[e,t]=i.split(` -> `);return{Icon:fh,label:yl._({id:`KPW5WC`}),detail:`${xw(e??``)} → ${xw(t??i)}`}}case`folder-frontmatter-edit`:return{Icon:Nh,label:yl._({id:`_tekeB`}),detail:``};case`folder-frontmatter-delete`:return{Icon:Nh,label:yl._({id:`ZWxfrc`}),detail:``};case`folder-create`:return{Icon:Nh,label:yl._({id:`ZQLDTl`}),detail:``};default:return{Icon:xc,label:r.replace(/-/g,` `),detail:xw(i)}}}function Cw(e){return e.contributors.length>0?e.contributors[0].name:e.author===`openknowledge-service`||e.author===`server`?yl._({id:`B2DrPb`}):e.author||yl._({id:`Ef7StM`})}function ww(e){let t=(0,$.c)(15),{folderPath:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],t[0]=r):r=t[0];let[i,a]=(0,Q.useState)(r),[o,s]=(0,Q.useState)(!0),[c,l]=(0,Q.useState)(!1),u,d;if(t[1]===n?(u=t[2],d=t[3]):(u=()=>{let e=!1,t=async function(){try{let t=await fetch(`/api/history?folder=${encodeURIComponent(n)}&limit=50`);if(e)return;if(!t.ok){l(!0),s(!1);return}let r=await t.json();if(e)return;a(r.entries??[]),l(!1),s(!1)}catch(t){e||(console.warn(`[FolderTimelineCard] failed to load folder timeline:`,t),l(!0),s(!1))}};s(!0),t();let r=tu(t);return()=>{e=!0,r()}},d=[n],t[1]=n,t[2]=u,t[3]=d),(0,Q.useEffect)(u,d),c||!o&&i.length===0)return null;let f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(`h2`,{className:`text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(q,{id:`XJOV1Y`})}),t[4]=f):f=t[4];let p;t[5]===i.length?p=t[6]:(p=i.length>0?(0,Z.jsx)(vu,{className:`text-xs`,variant:`secondary`,children:i.length}):null,t[5]=i.length,t[6]=p);let m;t[7]===p?m=t[8]:(m=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border px-3 py-1`,children:[f,p]}),t[7]=p,t[8]=m);let h;t[9]!==i||t[10]!==o?(h=(0,Z.jsx)(`div`,{className:`px-3 py-2.5`,children:o?(0,Z.jsxs)(`div`,{className:`space-y-2`,role:`status`,"aria-busy":`true`,children:[(0,Z.jsx)(Bd,{className:`h-8 w-full`}),(0,Z.jsx)(Bd,{className:`h-8 w-full`})]}):(0,Z.jsx)(`ul`,{className:`space-y-1`,children:i.map(Tw)})}),t[9]=i,t[10]=o,t[11]=h):h=t[11];let g;return t[12]!==m||t[13]!==h?(g=(0,Z.jsxs)(`section`,{className:`rounded-lg border bg-card`,"data-testid":`folder-timeline-card`,children:[m,h]}),t[12]=m,t[13]=h,t[14]=g):g=t[14],g}function Tw(e){let{Icon:t,label:n,detail:r}=Sw(e);return(0,Z.jsxs)(`li`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 text-sm`,children:[(0,Z.jsx)(t,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,Z.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[(0,Z.jsx)(`span`,{className:`text-foreground`,children:n}),r?(0,Z.jsx)(`code`,{className:`ml-1.5 font-mono text-xs text-muted-foreground`,children:r}):null]}),(0,Z.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-xs text-muted-foreground`,children:[(0,Z.jsx)(Dg,{className:`size-3`,"aria-hidden":!0}),Cw(e)]}),(0,Z.jsx)(`time`,{className:`shrink-0 text-xs text-muted-foreground/80`,dateTime:e.timestamp,title:new Date(e.timestamp).toLocaleString(),children:bw(e.timestamp)})]},e.sha)}function Ew(e){let t=e.split(`/`).pop();return t?`${e}/${t}`:null}function Dw(e,t){let n=t.get(`${e}/index`);if(n)return n;let r=Ew(e);if(r){let e=t.get(r);if(e)return e}return e.split(`/`).pop()??e}function Ow(e,t,n){let r=n.get(e);return r&&r!==e?r:t}function kw(e,t){let n=e===``?``:`${e}/`,r=[...t.folderPaths].filter(e=>e.startsWith(n)).map(e=>({path:e,rel:e.slice(n.length)})).filter(e=>e.rel.length>0&&!e.rel.includes(`/`)).map(({path:e,rel:n})=>({kind:`folder`,path:e,name:n,title:Dw(e,t.pageTitles)})),i=[...t.pages].filter(e=>e.startsWith(n)).map(e=>({docName:e,rel:e.slice(n.length)})).filter(e=>e.rel.length>0&&!e.rel.includes(`/`)).map(({docName:e,rel:n})=>{let r=t.pageMeta.get(e);return{kind:`file`,path:e,name:n,title:Ow(e,n,t.pageTitles),size:r?.size??0,modified:r?.modified??``}}),a=[...r,...i].sort((e,t)=>e.kind===t.kind?e.title.localeCompare(t.title)||e.name.localeCompare(t.name):e.kind===`folder`?-1:1);return{title:Dw(e,t.pageTitles),children:a}}function Aw(e){let t=(0,$.c)(41),{folderPath:n,state:r,onChange:i,folderConfigHandle:a}=e,[o,s]=(0,Q.useState)(null),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(!1);if(r.status===`idle`||r.status===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsxs)(`section`,{className:`rounded-lg border bg-card px-3 py-2.5 space-y-3`,children:[(0,Z.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,Z.jsx)(`h2`,{className:`text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(q,{id:`-QCLWk`})})}),(0,Z.jsx)(Bd,{className:`h-12 w-full`}),(0,Z.jsx)(Bd,{className:`h-12 w-full`})]}),t[0]=e):e=t[0],e}if(r.status===`error`){let{message:e}=r,n;return t[1]===e?n=t[2]:(n=(0,Z.jsx)(`section`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,role:`alert`,children:(0,Z.jsx)(q,{id:`iDZtvM`,values:{message:e}})}),t[1]=e,t[2]=n),n}let f;t[3]===r.data.folder.templates_available?f=t[4]:(f=r.data.folder.templates_available??[],t[3]=r.data.folder.templates_available,t[4]=f);let p=f,m;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(`h2`,{className:`text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(q,{id:`-QCLWk`})}),t[5]=m):m=t[5];let h;t[6]===p.length?h=t[7]:(h=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m,(0,Z.jsx)(vu,{className:`text-xs`,variant:`secondary`,children:p.length})]}),t[6]=p.length,t[7]=h);let g;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsxs)(Y,{variant:`ghost`,className:`font-mono uppercase`,size:`sm`,onClick:()=>d(!0),children:[(0,Z.jsx)(Ut,{className:`size-3.5`,"aria-hidden":!0}),(0,Z.jsx)(q,{id:`G1Gw0v`})]}),t[8]=g):g=t[8];let _;t[9]===h?_=t[10]:(_=(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-border px-3 py-1`,children:[h,g]}),t[9]=h,t[10]=_);let v;t[11]===p?v=t[12]:(v=(0,Z.jsx)(`div`,{className:`px-3 py-2.5`,children:p.length===0?(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`MZSBsh`})}):(0,Z.jsx)(`ul`,{className:`space-y-1`,children:p.map(e=>(0,Z.jsx)(Ss,{template:e,onCreate:()=>l(e.name),onEdit:()=>mc(et(e.source_folder,e.name)),onDelete:()=>s(e),badge:e.scope===`inherited`?(0,Z.jsx)(xo,{source:e.source_folder,target:`templates/${e.name}.md`}):void 0},e.path))})}),t[11]=p,t[12]=v);let y;t[13]!==_||t[14]!==v?(y=(0,Z.jsxs)(`section`,{className:`rounded-lg border bg-card`,children:[_,v]}),t[13]=_,t[14]=v,t[15]=y):y=t[15];let b;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>{e||s(null)},t[16]=b):b=t[16];let x;t[17]!==o||t[18]!==i?(x=(0,Z.jsx)(ws,{template:o,onOpenChange:b,onDeleted:i}),t[17]=o,t[18]=i,t[19]=x):x=t[19];let S;t[20]===p?S=t[21]:(S=new Set(p.map(jw)),t[20]=p,t[21]=S);let C;t[22]!==n||t[23]!==i?(C=e=>{i(),mc(et(n,e))},t[22]=n,t[23]=i,t[24]=C):C=t[24];let w;t[25]!==n||t[26]!==u||t[27]!==S||t[28]!==C?(w=(0,Z.jsx)(hs,{folderPath:n,existingNames:S,open:u,onOpenChange:d,onCreated:C}),t[25]=n,t[26]=u,t[27]=S,t[28]=C,t[29]=w):w=t[29];let T=c!==null,E;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{e||l(null)},t[30]=E):E=t[30];let D=c??void 0,O;t[31]!==a||t[32]!==n||t[33]!==T||t[34]!==D?(O=(0,Z.jsx)(ev,{open:T,onOpenChange:E,kind:`file`,initialDir:n,initialTemplate:D,folderConfig:a}),t[31]=a,t[32]=n,t[33]=T,t[34]=D,t[35]=O):O=t[35];let k;return t[36]!==w||t[37]!==O||t[38]!==y||t[39]!==x?(k=(0,Z.jsxs)(Z.Fragment,{children:[y,x,w,O]}),t[36]=w,t[37]=O,t[38]=y,t[39]=x,t[40]=k):k=t[40],k}function jw(e){return e.name}function Mw(e){let t=(0,$.c)(14),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,containerClassName:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=J(`relative w-full overflow-x-auto subtle-scrollbar`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=J(`w-full caption-bottom text-sm`,n),t[6]=n,t[7]=o);let s;t[8]!==i||t[9]!==o?(s=(0,Z.jsx)(`table`,{"data-slot":`table`,className:o,...i}),t[8]=i,t[9]=o,t[10]=s):s=t[10];let c;return t[11]!==a||t[12]!==s?(c=(0,Z.jsx)(`div`,{"data-slot":`table-container`,className:a,children:s}),t[11]=a,t[12]=s,t[13]=c):c=t[13],c}function Nw(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`[&_tr]:border-b`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`thead`,{"data-slot":`table-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pw(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`[&_tr:last-child]:border-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`tbody`,{"data-slot":`table-body`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Fw(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,noHover:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(i===void 0?!1:i)&&`hover:bg-transparent`,o;t[4]!==n||t[5]!==a?(o=J(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors`,a,n),t[4]=n,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o?(s=(0,Z.jsx)(`tr`,{"data-slot":`table-row`,className:o,...r}),t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function Iw(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,scope:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`col`:i,o;t[4]===n?o=t[5]:(o=J(`font-mono uppercase text-xs text-muted-foreground h-10 px-4 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,n),t[4]=n,t[5]=o);let s;return t[6]!==r||t[7]!==a||t[8]!==o?(s=(0,Z.jsx)(`th`,{"data-slot":`table-head`,scope:a,className:o,...r}),t[6]=r,t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function Lw(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`py-3 px-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`td`,{"data-slot":`table-cell`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Rw(e){if(!e)return`—`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return yl._({id:`xOTzt5`});if(r<60)return yl._({id:`NRSLBe`,values:{diffMin:r}});let i=Math.floor(r/60);if(i<24)return yl._({id:`hDKtoF`,values:{diffHrs:i}});let a=Math.floor(i/24);return a<30?yl._({id:`QDZbvN`,values:{diffDays:a}}):t.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}function zw(e,t,n){return[...e].sort((e,r)=>{if(e.kind!==r.kind)return e.kind===`folder`?-1:1;let i=0;switch(t){case`name`:i=e.title.localeCompare(r.title)||e.name.localeCompare(r.name);break;case`modified`:{let t=e.kind===`file`?e.modified:``,n=r.kind===`file`?r.modified:``;i=t.localeCompare(n);break}}return n===`asc`?i:-i})}function Bw(e){let t=(0,$.c)(10),{label:n,sortKey:r,activeKey:i,activeDir:a,onSort:o}=e,s=i===r,c;t[0]!==o||t[1]!==r?(c=()=>o(r),t[0]=o,t[1]=r,t[2]=c):c=t[2];let l;t[3]!==a||t[4]!==s?(l=s?a===`asc`?(0,Z.jsx)(Vn,{className:`ml-1 size-3`}):(0,Z.jsx)(Rn,{className:`ml-1 size-3`}):(0,Z.jsx)(ph,{className:`ml-1 size-3 text-muted-foreground/50`}),t[3]=a,t[4]=s,t[5]=l):l=t[5];let u;return t[6]!==n||t[7]!==c||t[8]!==l?(u=(0,Z.jsxs)(Y,{variant:`ghost`,size:`sm`,className:`-ml-3 h-8 uppercase font-mono`,onClick:c,children:[n,l]}),t[6]=n,t[7]=c,t[8]=l,t[9]=u):u=t[9],u}function Vw(e){let t=(0,$.c)(96),{folderPath:n}=e,{_:r}=ht(),{folderPaths:i,loading:a,pages:o,pageTitles:s,pageMeta:c}=Vo(),l=Os(n),{state:u,refresh:d}=l,[f,p]=(0,Q.useState)(!1),[m,h]=(0,Q.useState)(`name`),[g,_]=(0,Q.useState)(`asc`);if(a){let e;t[0]===r?e=t[1]:(e=r({id:`X9VpsP`}),t[0]=r,t[1]=e);let n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(Bd,{className:`size-5 rounded`}),(0,Z.jsx)(Bd,{className:`h-7 w-48`})]}),(0,Z.jsx)(Bd,{className:`h-9 w-20 rounded-md`})]}),t[2]=n):n=t[2];let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(Bd,{className:`h-4 w-16`}),t[3]=i):i=t[3];let a;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsxs)(`div`,{className:`mx-auto flex w-full max-w-4xl flex-col gap-6 px-6 py-8`,children:[n,(0,Z.jsxs)(`div`,{className:`rounded-lg border`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-4 border-b px-4 py-3`,children:[i,(0,Z.jsx)(`div`,{className:`ml-auto`,children:(0,Z.jsx)(Bd,{className:`h-4 w-20`})})]}),[`a`,`b`,`c`,`d`].map(Ww)]})]}),t[4]=a):a=t[4];let o;return t[5]===e?o=t[6]:(o=(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 items-start overflow-y-auto subtle-scrollbar`,role:`status`,"aria-busy":`true`,"aria-label":e,children:a}),t[5]=e,t[6]=o),o}let v,y,b,x,S,C,w,T,E,D,O;if(t[7]!==r||t[8]!==u||t[9]!==l||t[10]!==n||t[11]!==i||t[12]!==c||t[13]!==s||t[14]!==o||t[15]!==d||t[16]!==g||t[17]!==m){let e=kw(n,{pages:o,pageTitles:s,pageMeta:c,folderPaths:i}),a=zw(e.children,m,g),f=e.title||(n===``?r({id:`3aeN7X`}):e.title),k;t[29]===m?k=t[30]:(k=function(e){e===m?_(Uw):(h(e),_(`asc`))},t[29]=m,t[30]=k);let A=k;O=`flex min-h-0 flex-1 items-start overflow-y-auto subtle-scrollbar`,C=`mx-auto flex w-full max-w-4xl flex-col gap-6 px-6 py-8`;let j;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Z.jsx)(dc,{className:`size-5 text-muted-foreground`}),t[31]=j):j=t[31];let M=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[j,(0,Z.jsx)(`h1`,{className:`text-2xl font-light tracking-tight`,children:f})]}),N;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Z.jsxs)(Y,{onClick:()=>p(!0),children:[(0,Z.jsx)(Ut,{className:`size-4`}),(0,Z.jsx)(q,{id:`isRobC`})]}),t[32]=N):N=t[32],t[33]===M?w=t[34]:(w=(0,Z.jsx)(`div`,{className:`flex flex-col gap-6`,children:(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[M,N]})}),t[33]=M,t[34]=w),t[35]!==u||t[36]!==n||t[37]!==d?(T=(0,Z.jsx)(_w,{folderPath:n,state:u,onChange:d}),t[35]=u,t[36]=n,t[37]=d,t[38]=T):T=t[38],t[39]!==u||t[40]!==l||t[41]!==n||t[42]!==d?(E=(0,Z.jsx)(Aw,{folderPath:n,state:u,onChange:d,folderConfigHandle:l}),t[39]=u,t[40]=l,t[41]=n,t[42]=d,t[43]=E):E=t[43],t[44]===n?D=t[45]:(D=(0,Z.jsx)(ww,{folderPath:n}),t[44]=n,t[45]=D),S=`rounded-lg border`,y=Mw;let P=m===`name`?g===`asc`?`ascending`:`descending`:`none`,F;t[46]===r?F=t[47]:(F=r({id:`6YtxFj`}),t[46]=r,t[47]=F);let I;t[48]!==A||t[49]!==g||t[50]!==m||t[51]!==F?(I=(0,Z.jsx)(Bw,{label:F,sortKey:`name`,activeKey:m,activeDir:g,onSort:A}),t[48]=A,t[49]=g,t[50]=m,t[51]=F,t[52]=I):I=t[52];let L;t[53]!==P||t[54]!==I?(L=(0,Z.jsx)(Iw,{"aria-sort":P,children:I}),t[53]=P,t[54]=I,t[55]=L):L=t[55];let R=m===`modified`?g===`asc`?`ascending`:`descending`:`none`,z;t[56]===r?z=t[57]:(z=r({id:`tgWuMB`}),t[56]=r,t[57]=z);let B;t[58]!==A||t[59]!==g||t[60]!==m||t[61]!==z?(B=(0,Z.jsx)(Bw,{label:z,sortKey:`modified`,activeKey:m,activeDir:g,onSort:A}),t[58]=A,t[59]=g,t[60]=m,t[61]=z,t[62]=B):B=t[62];let V;t[63]!==R||t[64]!==B?(V=(0,Z.jsx)(Iw,{className:`w-32`,"aria-sort":R,children:B}),t[63]=R,t[64]=B,t[65]=V):V=t[65],t[66]!==L||t[67]!==V?(x=(0,Z.jsx)(Nw,{children:(0,Z.jsxs)(Fw,{children:[L,V]})}),t[66]=L,t[67]=V,t[68]=x):x=t[68],v=Pw,b=a.length?a.map(Hw):(0,Z.jsx)(Fw,{children:(0,Z.jsx)(Lw,{colSpan:2,className:`h-24 text-center text-muted-foreground`,children:(0,Z.jsx)(q,{id:`Pkw7J9`})})}),t[7]=r,t[8]=u,t[9]=l,t[10]=n,t[11]=i,t[12]=c,t[13]=s,t[14]=o,t[15]=d,t[16]=g,t[17]=m,t[18]=v,t[19]=y,t[20]=b,t[21]=x,t[22]=S,t[23]=C,t[24]=w,t[25]=T,t[26]=E,t[27]=D,t[28]=O}else v=t[18],y=t[19],b=t[20],x=t[21],S=t[22],C=t[23],w=t[24],T=t[25],E=t[26],D=t[27],O=t[28];let k;t[69]!==v||t[70]!==b?(k=(0,Z.jsx)(v,{children:b}),t[69]=v,t[70]=b,t[71]=k):k=t[71];let A;t[72]!==y||t[73]!==k||t[74]!==x?(A=(0,Z.jsxs)(y,{children:[x,k]}),t[72]=y,t[73]=k,t[74]=x,t[75]=A):A=t[75];let j;t[76]!==A||t[77]!==S?(j=(0,Z.jsx)(`div`,{className:S,children:A}),t[76]=A,t[77]=S,t[78]=j):j=t[78];let M;t[79]!==j||t[80]!==C||t[81]!==w||t[82]!==T||t[83]!==E||t[84]!==D?(M=(0,Z.jsxs)(`div`,{className:C,children:[w,T,E,D,j]}),t[79]=j,t[80]=C,t[81]=w,t[82]=T,t[83]=E,t[84]=D,t[85]=M):M=t[85];let N;t[86]!==M||t[87]!==O?(N=(0,Z.jsx)(`div`,{className:O,children:M}),t[86]=M,t[87]=O,t[88]=N):N=t[88];let P;t[89]!==f||t[90]!==l||t[91]!==n?(P=(0,Z.jsx)(ev,{open:f,onOpenChange:p,kind:`file`,initialDir:n,folderConfig:l,suggestedName:`index`}),t[89]=f,t[90]=l,t[91]=n,t[92]=P):P=t[92];let F;return t[93]!==N||t[94]!==P?(F=(0,Z.jsxs)(Z.Fragment,{children:[N,P]}),t[93]=N,t[94]=P,t[95]=F):F=t[95],F}function Hw(e){return(0,Z.jsxs)(Fw,{children:[(0,Z.jsx)(Lw,{children:(0,Z.jsxs)(`a`,{href:hu(e.path),className:`flex items-center gap-2 rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[e.kind===`folder`?(0,Z.jsx)(Fh,{className:`size-4 shrink-0 text-muted-foreground`}):(0,Z.jsx)(de,{className:`size-4 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.title})]})}),(0,Z.jsx)(Lw,{className:`text-muted-foreground`,children:e.kind===`file`?Rw(e.modified):`—`})]},e.path)}function Uw(e){return e===`asc`?`desc`:`asc`}function Ww(e){return(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 border-b px-4 py-3 last:border-b-0`,children:[(0,Z.jsx)(Bd,{className:`size-4 rounded`}),(0,Z.jsx)(Bd,{className:`h-4 w-40`}),(0,Z.jsx)(`div`,{className:`ml-auto`,children:(0,Z.jsx)(Bd,{className:`h-4 w-16`})})]},e)}function Gw(e){let t=(0,$.c)(24),{docName:n,size:r,limit:i,backNav:a}=e,o=a!==void 0,s=(0,Q.useRef)(null),c=(0,Q.useRef)(null),l,u;t[0]===o?(l=t[1],u=t[2]):(l=()=>{o?s.current?.focus():c.current?.focus()},u=[o],t[0]=o,t[1]=l,t[2]=u),(0,Q.useEffect)(l,u);let d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(`div`,{className:`flex size-16 items-center justify-center rounded-full border bg-muted/40 text-muted-foreground`,children:(0,Z.jsx)(kh,{className:`size-9`,"aria-hidden":`true`})}),t[3]=d):d=t[3];let f=o?void 0:-1,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(q,{id:`P3hnm0`}),t[4]=p):p=t[4];let m;t[5]===f?m=t[6]:(m=(0,Z.jsx)(`h2`,{ref:c,id:`large-file-title`,tabIndex:f,className:`text-2xl font-light text-balance outline-none`,children:p}),t[5]=f,t[6]=m);let h;t[7]===r?h=t[8]:(h=gi(r),t[7]=r,t[8]=h);let g;t[9]===i?g=t[10]:(g=gi(i),t[9]=i,t[10]=g);let _;t[11]!==n||t[12]!==h||t[13]!==g?(_=(0,Z.jsx)(`p`,{className:`max-w-md text-sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`GJH-AT`,values:{0:h,1:g,docName:n}})}),t[11]=n,t[12]=h,t[13]=g,t[14]=_):_=t[14];let v;t[15]!==m||t[16]!==_?(v=(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[m,_]}),t[15]=m,t[16]=_,t[17]=v):v=t[17];let y;t[18]!==a||t[19]!==o?(y=o?(0,Z.jsxs)(Y,{ref:s,variant:`default`,onClick:()=>a.onNavigateBack(a.previousDocName),children:[(0,Z.jsx)(Fn,{className:`size-4`,"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`CKyk7Q`})]}):null,t[18]=a,t[19]=o,t[20]=y):y=t[20];let b;return t[21]!==v||t[22]!==y?(b=(0,Z.jsxs)(`div`,{role:`status`,"aria-labelledby":`large-file-title`,"data-slot":`large-file-editor-state`,className:`flex h-full flex-col items-center justify-center gap-8 p-8 text-center`,children:[d,v,y]}),t[21]=v,t[22]=y,t[23]=b):b=t[23],b}function Kw(e){let t=(0,$.c)(8),{docName:n}=e,[r,i]=(0,Q.useState)(qw),a,o;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>Se(e=>{i(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})}),o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o),!r.has(n))return null;let s;t[2]===n?s=t[3]:(s=function(){Fe(n)?.abort(),i(e=>{if(!e.has(n))return e;let t=new Set(e);return t.delete(n),t})},t[2]=n,t[3]=s);let c=s,l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`A67Uwj`})}),t[4]=l):l=t[4];let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(q,{id:`dEgA5A`}),t[5]=u):u=t[5];let d;return t[6]===c?d=t[7]:(d=(0,Z.jsxs)(`div`,{className:`absolute inset-x-0 bottom-8 z-20 flex justify-center text-xs text-muted-foreground`,children:[l,(0,Z.jsx)(Y,{variant:`link`,size:`sm`,className:`h-auto px-2 py-0 text-xs`,onClick:c,children:u})]}),t[6]=c,t[7]=d),d}function qw(){return new Set}function Jw(e){let t=(0,$.c)(20),{nav:n}=e,{state:r,refetch:i}=ic(n),a=(0,Q.useRef)(null),o=n.branch,s,c;t[0]===r.phase?(s=t[1],c=t[2]):(s=()=>{r.phase===`resolved`&&a.current?.querySelector(`button`)?.focus()},c=[r.phase],t[0]=r.phase,t[1]=s,t[2]=c),(0,Q.useEffect)(s,c);let l;t[3]===n.path?l=t[4]:(l=function(){window.location.hash=su(ac(n.path))},t[3]=n.path,t[4]=l);let u=l,d;t[5]!==o||t[6]!==n.kind?(d=function(e){oc.arm({kind:n.kind,path:e,branch:o}),window.location.hash=n.kind===`folder`?su(e):hu(e)},t[5]=o,t[6]=n.kind,t[7]=d):d=t[7];let f=d,p=r.phase===`pending`?`polite`:void 0,m=r.phase===`resolved`?r.resolution.verdict:void 0,h=r.phase===`pending`?`flex h-full flex-col items-center justify-center gap-3 p-8 text-center text-sm text-muted-foreground`:`flex h-full flex-col items-center justify-center gap-6 p-8 text-center`,g;t[8]!==u||t[9]!==n||t[10]!==f||t[11]!==i||t[12]!==r?(g=(0,Z.jsx)(cc,{nav:n,state:r,onBrowseFolder:u,onOpenRenamed:f,onEnableAutoSync:u,onSyncCompleted:i}),t[8]=u,t[9]=n,t[10]=f,t[11]=i,t[12]=r,t[13]=g):g=t[13];let _;return t[14]!==r.phase||t[15]!==p||t[16]!==m||t[17]!==h||t[18]!==g?(_=(0,Z.jsx)(`div`,{ref:a,role:`status`,"aria-live":p,"data-testid":`share-receive-miss-panel`,"data-phase":r.phase,"data-verdict":m,className:h,children:g}),t[14]=r.phase,t[15]=p,t[16]=m,t[17]=h,t[18]=g,t[19]=_):_=t[19],_}var Yw=e(Rt(),1);function Xw(e){let t=(0,$.c)(9),{text:n}=e,r;t[0]===n?r=t[1]:(r=na(n),t[0]=n,t[1]=r);let{map:i}=r,a,o;if(t[2]!==i||t[3]!==n){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e=Ei(n),r=e.length>0?e:Object.keys(i);if(r.length===0){o=null;break bb0}let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(q,{id:`l_UFPv`}),t[6]=s):s=t[6];let c;t[7]===i?c=t[8]:(c=(e,t)=>{let n=i[e];return n===void 0?null:(0,Z.jsx)(Zw,{keyName:e,value:n},`${e}-${t}`)},t[7]=i,t[8]=c),a=(0,Z.jsx)(Ao,{title:s,count:r.length,testId:`readonly-property-panel`,className:`pt-4`,children:r.map(c)})}t[2]=i,t[3]=n,t[4]=a,t[5]=o}else a=t[4],o=t[5];return o===Symbol.for(`react.early_return_sentinel`)?a:o}function Zw(e){let t=(0,$.c)(12),{keyName:n,value:r}=e,i=So[Za(r)],a;t[0]===i?a=t[1]:(a=(0,Z.jsx)(`span`,{"aria-hidden":!0,className:`flex size-7 shrink-0 items-center justify-center rounded text-muted-foreground`,children:(0,Z.jsx)(i,{className:`size-3.5`})}),t[0]=i,t[1]=a);let o;t[2]===n?o=t[3]:(o=(0,Z.jsx)(`span`,{className:`flex h-7 w-32 shrink-0 items-center truncate px-2 text-sm text-muted-foreground`,children:n}),t[2]=n,t[3]=o);let s;t[4]!==n||t[5]!==r?(s=(0,Z.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,Z.jsx)(Qw,{keyName:n,value:r})}),t[4]=n,t[5]=r,t[6]=s):s=t[6];let c;return t[7]!==n||t[8]!==a||t[9]!==o||t[10]!==s?(c=(0,Z.jsxs)(`div`,{className:`group flex items-start gap-1 py-0.5`,"data-testid":`readonly-property-row`,"data-key":n,children:[a,o,s]}),t[7]=n,t[8]=a,t[9]=o,t[10]=s,t[11]=c):c=t[11],c}function Qw(e){let t=(0,$.c)(8),{keyName:n,value:r}=e;if(ko(r)){let e;return t[0]!==n||t[1]!==r?(e=(0,Z.jsx)(To,{keyName:n,value:r}),t[0]=n,t[1]=r,t[2]=e):e=t[2],e}let i;t[3]===r?i=t[4]:(i=Array.isArray(r)?r.filter($w).join(`, `):String(r),t[3]=r,t[4]=i);let a=i,o;return t[5]!==a||t[6]!==n?(o=(0,Z.jsx)(`div`,{className:`flex min-h-7 items-center px-2 py-1 text-sm break-words`,"data-testid":`readonly-property-value`,"data-key":n,children:a}),t[5]=a,t[6]=n,t[7]=o):o=t[7],o}function $w(e){return typeof e==`string`}function eT(e){let t=(0,$.c)(29),{fileName:n,text:r}=e,i,a,o,s;if(t[0]!==r){let e=ba(r).body;s=In,i=Ue,a=!1,o=zn().parseWithFallback(e),t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s}else i=t[1],a=t[2],o=t[3],s=t[4];let c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c={attributes:{class:`pt-4`}},t[5]=c):c=t[5];let l;t[6]!==i||t[7]!==a||t[8]!==o?(l={extensions:i,editable:a,content:o,editorProps:c},t[6]=i,t[7]=a,t[8]=o,t[9]=l):l=t[9];let u;t[10]===r?u=t[11]:(u=[r],t[10]=r,t[11]=u);let d=s(l,u),[f]=(0,Q.useState)(tT),p=(0,Q.useRef)(null),m,h;t[12]===f?(m=t[13],h=t[14]):(m=()=>{let e=p.current;if(e)return e.appendChild(f),()=>{f.parentNode===e&&e.removeChild(f)}},h=[f],t[12]=f,t[13]=m,t[14]=h),(0,Q.useLayoutEffect)(m,h);let g;t[15]===r?g=t[16]:(g=(0,Z.jsx)(Xw,{text:r}),t[15]=r,t[16]=g);let _;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(`div`,{className:`tiptap-editor`,children:(0,Z.jsx)(`div`,{ref:p,style:{display:`contents`}})}),t[17]=_):_=t[17];let v;t[18]===g?v=t[19]:(v=(0,Z.jsxs)(`div`,{className:`editor-doc-scroll min-h-0 flex-1 overflow-auto`,children:[g,_]}),t[18]=g,t[19]=v);let y;t[20]===d?y=t[21]:(y=(0,Z.jsx)(Un,{editor:d,className:`tiptap-editor-portal-content h-full`}),t[20]=d,t[21]=y);let b;t[22]!==f||t[23]!==y?(b=(0,Yw.createPortal)(y,f),t[22]=f,t[23]=y,t[24]=b):b=t[24];let x;return t[25]!==n||t[26]!==v||t[27]!==b?(x=(0,Z.jsxs)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":n,"data-skill-markdown-viewer":``,"data-skill-markdown-viewer-state":`loaded`,children:[v,b]}),t[25]=n,t[26]=v,t[27]=b,t[28]=x):x=t[28],x}function tT(){let e=document.createElement(`div`);return e.style.display=`contents`,e}var nT=`data-skill-markdown`;function rT(e){let t=(0,$.c)(12),{scope:n,name:r,path:i,fileName:a}=e,o;t[0]!==r||t[1]!==i||t[2]!==n?(o={loadText:e=>vf({scope:n,name:r,path:i},e)},t[0]=r,t[1]=i,t[2]=n,t[3]=o):o=t[3];let s=Qd(o);if(s.status===`loading`){let e;return t[4]===a?e=t[5]:(e=(0,Z.jsx)(Yd,{fileName:a,dataAttr:nT}),t[4]=a,t[5]=e),e}if(s.status===`error`){let e;return t[6]!==s.message||t[7]!==a?(e=(0,Z.jsx)(Xd,{fileName:a,dataAttr:nT,message:s.message}),t[6]=s.message,t[7]=a,t[8]=e):e=t[8],e}let c;return t[9]!==s.content||t[10]!==a?(c=(0,Z.jsx)(eT,{fileName:a,text:s.content}),t[9]=s.content,t[10]=a,t[11]=c):c=t[11],c}var iT=new Set([`md`,`mdx`]);function aT(e){let t=(0,$.c)(19),{scope:n,name:r,path:i}=e,a;t[0]===i?a=t[1]:(a=i.split(`/`).pop()??i,t[0]=i,t[1]=a);let o=a,s=o.lastIndexOf(`.`),c,l;if(t[2]!==s||t[3]!==o?(c=s>=0?o.slice(s+1).toLowerCase():``,l=iT.has(c),t[2]=s,t[3]=o,t[4]=c,t[5]=l):(c=t[4],l=t[5]),l){let e;return t[6]!==o||t[7]!==r||t[8]!==i||t[9]!==n?(e=(0,Z.jsx)(rT,{scope:n,name:r,path:i,fileName:o}),t[6]=o,t[7]=r,t[8]=i,t[9]=n,t[10]=e):e=t[10],e}let u;t[11]!==r||t[12]!==i||t[13]!==n?(u=e=>vf({scope:n,name:r,path:i},e),t[11]=r,t[12]=i,t[13]=n,t[14]=u):u=t[14];let d;return t[15]!==c||t[16]!==o||t[17]!==u?(d=(0,Z.jsx)($d,{fileName:o,extension:c,loadText:u}),t[15]=c,t[16]=o,t[17]=u,t[18]=d):d=t[18],d}function oT(e){let t=null,n=()=>(t===null&&(t=e(),t.catch(()=>{})),t),r=(0,Q.lazy)(n);return r.preload=n,r}var sT=oT(()=>n(()=>import(`./SettingsDialogBody-M8pN3I6T.js`).then(e=>({default:e.SettingsDialogBody})),__vite__mapDeps([105,1,106,19,12,6,2,3,7,8,9,75,59,22,11,76,77,78,10,79,14,15,16,17,18,40,24,28,20,21,80,13,81,23,25,26,107,108,41,87,109,82,110,91,111,39,42,63,64,65,66,67,68,69,70,71,72,73,74,38,4,83,84,85,31,52,53,54,35,56,86,27,29,51,55,57,58,88,89,90,30,92,93,94,95,32,33,96,97,112,50,113,100,114,115,116,101,117,36,118,119,120,121,122,123,34,124,125,126,127,128,129,130,131,132]),import.meta.url));function cT(e){let t=(0,$.c)(9),{error:n}=e,{_:r}=ht(),i;t[0]!==r||t[1]!==n?(i=n instanceof Error&&/dynamically imported module|Failed to fetch/i.test(n.message)?r({id:`Y8ViJx`}):r({id:`3h5zMp`}),t[0]=r,t[1]=n,t[2]=i):i=t[2];let a=i,o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(`h3`,{id:`settings-body-error-title`,className:`font-heading text-base leading-none font-medium`,children:(0,Z.jsx)(q,{id:`hwFOFD`})}),t[3]=o):o=t[3];let s;t[4]===a?s=t[5]:(s=(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[o,(0,Z.jsx)(`p`,{className:`max-w-xs text-sm text-muted-foreground`,children:a})]}),t[4]=a,t[5]=s);let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(Y,{variant:`default`,onClick:lT,children:(0,Z.jsx)(q,{id:`HpK_8d`})}),t[6]=c):c=t[6];let l;return t[7]===s?l=t[8]:(l=(0,Z.jsxs)(`div`,{role:`alert`,"aria-labelledby":`settings-body-error-title`,"data-slot":`settings-body-error-boundary`,className:`flex h-full flex-col items-center justify-center gap-5 p-8 text-center`,children:[s,c]}),t[7]=s,t[8]=l),l}function lT(){return window.location.reload()}function uT(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(Jt,{fallbackRender:fT,onError:dT,children:n}),t[0]=n,t[1]=r),r}function dT(e,t){console.error(`[SettingsDialogErrorBoundary] rendered fallback for Settings body`,e,t.componentStack)}function fT(e){return(0,Z.jsx)(cT,{...e})}function pT(e=typeof window>`u`?void 0:window.location){return e?.protocol===`file:`}function mT(e){let{groups:t,translate:n}=e,r=[],i=new Set;for(let e of t)if(e.enabled)for(let t of e.items)i.add(t.id),r.push({id:`section:${t.id}`,kind:`section`,sectionId:t.id,label:t.label,keywords:[e.label]});for(let e of Ps)if(i.has(e.sectionId))for(let t of e.fields){let i=t.path.join(`.`);r.push({id:`field:${e.sectionId}:${i}`,kind:`field`,sectionId:e.sectionId,label:n(t.label),keywords:t.description?[n(t.description)]:[],targetField:i})}if(i.has(`plugin:markdownlint`))for(let e of Xa)r.push({id:`rule:${e.id}`,kind:`rule`,sectionId:`plugin:markdownlint`,label:e.name,keywords:[e.id,e.alias,...e.aliases],ruleId:e.id});return r}function hT(e){return`https://github.com/inkeep/open-knowledge/releases/tag/v${encodeURIComponent(e)}`}function gT(e){let t=(0,$.c)(43),{open:n,initialSection:r,onOpenChange:i}=e,a=r===void 0?null:r,{_:o}=ht(),{collabUrl:s}=Re(),{userBinding:c,userSynced:l,okignoreBinding:u,okignoreSynced:d,projectConfig:f,merged:p}=Qu(),{desktopPresent:m}=xs(),[h,g]=(0,Q.useState)(a??`preferences`),[_,v]=(0,Q.useState)(``),[y,b]=(0,Q.useState)(null),[x,S]=(0,Q.useState)(null),C=(0,Q.useRef)(0),w=(0,Q.useRef)(null),T,E;t[0]!==a||t[1]!==n?(T=()=>{n&&(g(a??`preferences`),v(``))},E=[n,a],t[0]=a,t[1]=n,t[2]=T,t[3]=E):(T=t[2],E=t[3]),(0,Q.useEffect)(T,E);let D,O;t[4]===y?(D=t[5],O=t[6]):(D=()=>{if(!y)return;let e=w.current;if(!e)return;let t=null,n=null,r=null,i=null,a=()=>{let r=e.querySelector(`[data-field="${y.path}"]`);return r?(r.scrollIntoView({block:`center`}),r.classList.add(`animate-settings-nav-flash`),t=r,n=setTimeout(()=>r.classList.remove(`animate-settings-nav-flash`),750),!0):!1};return a()||(i=new MutationObserver(()=>{a()&&i?.disconnect()}),i.observe(e,{childList:!0,subtree:!0}),r=setTimeout(()=>i?.disconnect(),4e3)),()=>{i?.disconnect(),n&&clearTimeout(n),r&&clearTimeout(r),t?.classList.remove(`animate-settings-nav-flash`)}},O=[y],t[4]=y,t[5]=D,t[6]=O),(0,Q.useEffect)(D,O);let k=s!==null,A=typeof window<`u`&&window.okDesktop!=null,j=A&&window.okDesktop?.config.ptyAvailable===!0,M,N;if(t[7]!==o||t[8]!==m||t[9]!==k||t[10]!==p?.appearance?.colorThemeEnabled||t[11]!==f?.contentRules){let e;t[14]===f?.contentRules?e=t[15]:(e=e=>f?.contentRules?.[e.id]?.enabled===!0,t[14]=f?.contentRules,t[15]=e);let n=zd.filter(e).map(_T),r=p?.appearance?.colorThemeEnabled!==!1,i=pT();M=[{id:`user`,label:o({id:`7PzzBU`}),enabled:!0,items:[{id:`preferences`,label:o({id:`Q6hhn8`})},{id:`configure-agents`,label:o({id:`jRAGrQ`})},{id:`hotkeys`,label:o({id:`4KmEoC`})},{id:`account`,label:o({id:`AeXO77`})},{id:`user-plugins-manage`,label:o({id:`ohUJJM`})},...A?[{id:`ai-tools`,label:o({id:`_5qBNl`})}]:[]]},{id:`project`,label:o({id:`ZWyHmq`}),enabled:k,items:[{id:`sync`,label:o({id:`Nu4DdT`})},{id:`search`,label:o({id:`A1taO8`})},{id:`plugins-manage`,label:o({id:`ohUJJM`})},{id:`content-rules`,label:o({id:`OPOiKn`})},...i?[]:[{id:`link-previews`,label:o({id:`gh27t1`})}],...j?[{id:`terminal`,label:o({id:`ALhMYW`})}]:[],...A?[{id:`project-ai-tools`,label:o({id:`crqzW5`})}]:[],{id:`project-templates`,label:o({id:`iTylMl`})},{id:`skills`,label:o({id:`PCSkw2`})},{id:`okignore`,label:o({id:`3zyg_A`})},{id:`sharing`,label:o({id:`cs4mps`})}]},{id:`plugins`,label:o({id:`ohUJJM`}),enabled:!0,items:[...k?n:[],...r?[{id:`plugin:theme`,label:o({id:`fJ3EbT`})}]:[]]},{id:`integrations`,label:o({id:`nbfdhU`}),enabled:!0,items:[]}],N=mT({groups:M,translate:o}),t[7]=o,t[8]=m,t[9]=k,t[10]=p?.appearance?.colorThemeEnabled,t[11]=f?.contentRules,t[12]=M,t[13]=N}else M=t[12],N=t[13];let P=N,F;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(F=function(e){C.current+=1;let t=C.current;g(e.sectionId),e.kind===`field`&&e.targetField?b({path:e.targetField}):e.kind===`rule`&&e.ruleId&&S({query:e.ruleId,nonce:t}),v(``)},t[16]=F):F=t[16];let I=F,L;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsx)(pn,{className:`sr-only`,children:(0,Z.jsx)(q,{id:`Tz0i8g`})}),t[17]=L):L=t[17];let R;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Z.jsx)(fn,{className:`sr-only`,children:(0,Z.jsx)(q,{id:`RDrXh4`})}),t[18]=R):R=t[18];let z;t[19]!==h||t[20]!==M||t[21]!==P||t[22]!==_?(z=(0,Z.jsx)(vT,{groups:M,activeId:h,onSelect:g,entries:P,searchQuery:_,onSearchChange:v,onNavigate:I}),t[19]=h,t[20]=M,t[21]=P,t[22]=_,t[23]=z):z=t[23];let B;t[24]===o?B=t[25]:(B=o({id:`OXb_Df`}),t[24]=o,t[25]=B);let V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,Z.jsx)(ET,{}),t[26]=V):V=t[26];let H=l?c:null,U;t[27]!==h||t[28]!==u||t[29]!==d||t[30]!==x||t[31]!==H?(U=(0,Z.jsx)(uT,{children:(0,Z.jsx)(Q.Suspense,{fallback:V,children:(0,Z.jsx)(sT,{activeId:h,userBinding:H,okignoreBinding:u,okignoreSynced:d,markdownlintRuleQuery:x})})}),t[27]=h,t[28]=u,t[29]=d,t[30]=x,t[31]=H,t[32]=U):U=t[32];let W;t[33]!==B||t[34]!==U?(W=(0,Z.jsx)(`section`,{ref:w,"aria-label":B,className:`min-h-0 flex-1 overflow-y-auto overscroll-contain subtle-scrollbar p-6`,tabIndex:0,children:U}),t[33]=B,t[34]=U,t[35]=W):W=t[35];let G;t[36]!==z||t[37]!==W?(G=(0,Z.jsxs)(mn,{className:`flex h-[700px] max-h-[calc(100dvh-4rem)] w-[900px] max-w-[calc(100%-2rem)] flex-col gap-0 overflow-hidden p-0 sm:grid sm:grid-cols-[220px_1fr] sm:max-w-[min(900px,calc(100%-2rem))]`,"data-testid":`settings-dialog`,children:[L,R,z,W]}),t[36]=z,t[37]=W,t[38]=G):G=t[38];let K;return t[39]!==i||t[40]!==n||t[41]!==G?(K=(0,Z.jsx)(vn,{open:n,onOpenChange:i,children:G}),t[39]=i,t[40]=n,t[41]=G,t[42]=K):K=t[42],K}function _T(e){return{id:`plugin:${e.id}`,label:e.label}}function vT(e){let t=(0,$.c)(46),{groups:n,activeId:r,onSelect:i,entries:a,searchQuery:o,onSearchChange:c,onNavigate:l}=e,{_:u}=ht(),d,f,p,m,h,g,_,v,y,b;if(t[0]!==u||t[1]!==a||t[2]!==l||t[3]!==c||t[4]!==o){f=o.trim();let e=f===``?[]:a.filter(e=>P_(e.label,f,e.keywords)),n=e.filter(xT),r=e.filter(bT),i=e.filter(yT);t[15]===u?y=t[16]:(y=u({id:`y1t8bQ`}),t[15]=u,t[16]=y),b=`flex shrink-0 gap-x-3 overflow-x-auto overscroll-contain subtle-scrollbar scroll-fade-mask-x-max-sm border-b bg-muted/30 px-3 py-2 max-sm:pt-10 sm:h-full sm:min-h-0 sm:flex-col sm:gap-0 sm:overflow-x-visible sm:border-r sm:border-b-0 sm:py-4`,d=N,p=!1,m=`h-auto w-full shrink-0 bg-transparent sm:mb-3 [&_[data-slot=command-input-wrapper]]:h-9 [&_[data-slot=command-input-wrapper]]:rounded-lg [&_[data-slot=command-input-wrapper]]:border [&_[data-slot=command-input-wrapper]]:border-input`,h=`settings-search`;let x;t[17]===u?x=t[18]:(x=u({id:`1DahsC`}),t[17]=u,t[18]=x),t[19]!==c||t[20]!==o||t[21]!==x?(g=(0,Z.jsx)(k,{value:o,onValueChange:c,placeholder:x,className:`py-0`,"data-testid":`settings-search-input`}),t[19]=c,t[20]=o,t[21]=x,t[22]=g):g=t[22];let S=f===``?null:(0,Z.jsx)(q,{id:`TQJCR6`,values:{0:e.length}});t[23]===S?_=t[24]:(_=(0,Z.jsx)(`span`,{"aria-live":`polite`,className:`sr-only`,"data-testid":`settings-search-result-count`,children:S}),t[23]=S,t[24]=_),v=f===``?null:(0,Z.jsxs)(F,{"data-testid":`settings-search-results`,className:`mt-1.5`,children:[(0,Z.jsx)(s,{"data-testid":`settings-search-empty`,children:(0,Z.jsx)(q,{id:`ljFWEt`})}),n.length>0?(0,Z.jsx)(Ae,{heading:u({id:`R4OWFD`}),children:n.map(e=>(0,Z.jsx)(ST,{entry:e,query:f,onNavigate:l},e.id))}):null,r.length>0?(0,Z.jsx)(Ae,{heading:u({id:`Tz0i8g`}),children:r.map(e=>(0,Z.jsx)(ST,{entry:e,query:f,onNavigate:l},e.id))}):null,i.length>0?(0,Z.jsx)(Ae,{heading:u({id:`v2a04T`}),children:i.map(e=>(0,Z.jsx)(ST,{entry:e,query:f,onNavigate:l},e.id))}):null]}),t[0]=u,t[1]=a,t[2]=l,t[3]=c,t[4]=o,t[5]=d,t[6]=f,t[7]=p,t[8]=m,t[9]=h,t[10]=g,t[11]=_,t[12]=v,t[13]=y,t[14]=b}else d=t[5],f=t[6],p=t[7],m=t[8],h=t[9],g=t[10],_=t[11],v=t[12],y=t[13],b=t[14];let x;t[25]!==d||t[26]!==p||t[27]!==m||t[28]!==h||t[29]!==g||t[30]!==_||t[31]!==v?(x=(0,Z.jsxs)(d,{shouldFilter:p,className:m,"data-testid":h,children:[g,_,v]}),t[25]=d,t[26]=p,t[27]=m,t[28]=h,t[29]=g,t[30]=_,t[31]=v,t[32]=x):x=t[32];let S;t[33]!==r||t[34]!==n||t[35]!==i||t[36]!==f?(S=f===``?n.map(e=>(0,Z.jsx)(TT,{group:e,activeId:r,onSelect:i},e.id)):null,t[33]=r,t[34]=n,t[35]=i,t[36]=f,t[37]=S):S=t[37];let C;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(wT,{}),t[38]=C):C=t[38];let w;t[39]===S?w=t[40]:(w=(0,Z.jsxs)(`div`,{className:`contents subtle-scrollbar sm:flex sm:min-h-0 sm:flex-1 sm:flex-col sm:overflow-y-auto sm:overscroll-contain`,children:[S,C]}),t[39]=S,t[40]=w);let T;return t[41]!==w||t[42]!==y||t[43]!==b||t[44]!==x?(T=(0,Z.jsxs)(`nav`,{"aria-label":y,className:b,children:[x,w]}),t[41]=w,t[42]=y,t[43]=b,t[44]=x,t[45]=T):T=t[45],T}function yT(e){return e.kind===`rule`}function bT(e){return e.kind===`field`}function xT(e){return e.kind===`section`}function ST(e){let t=(0,$.c)(13),{entry:n,query:r,onNavigate:i}=e,a=n.id,o;t[0]!==n||t[1]!==i?(o=()=>i(n),t[0]=n,t[1]=i,t[2]=o):o=t[2];let s=`settings-search-result-${n.id}`,c;t[3]!==n.label||t[4]!==r?(c=j_(n.label,r).map(CT),t[3]=n.label,t[4]=r,t[5]=c):c=t[5];let l;t[6]===c?l=t[7]:(l=(0,Z.jsx)(`span`,{className:`truncate`,children:c}),t[6]=c,t[7]=l);let u;return t[8]!==n.id||t[9]!==o||t[10]!==s||t[11]!==l?(u=(0,Z.jsx)(j,{value:a,onSelect:o,"data-testid":s,children:l}),t[8]=n.id,t[9]=o,t[10]=s,t[11]=l,t[12]=u):u=t[12],u}function CT(e){return e.match?(0,Z.jsx)(`span`,{className:`font-semibold text-foreground`,children:e.text},e.start):(0,Z.jsx)(`span`,{children:e.text},e.start)}function wT(){let e=(0,$.c)(4),t=typeof window<`u`?window.okDesktop??null:null,n=t?.appVersion;if(!t||!n)return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=hT(n),e[0]=r):r=e[0];let i=r,a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsxs)(`p`,{className:`whitespace-nowrap font-mono text-xs text-muted-foreground/70`,"data-testid":`settings-sidebar-version`,children:[`v`,n]}),e[1]=a):a=e[1];let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{t.shell.openExternal(i)},e[2]=o):o=e[2];let s;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsxs)(`div`,{className:`ml-auto shrink-0 px-2 sm:ml-0 sm:mt-auto sm:pt-3`,children:[a,(0,Z.jsxs)(`button`,{type:`button`,onClick:o,"data-testid":`settings-sidebar-release-notes`,className:J(`mt-0.5 inline-flex items-center gap-1 whitespace-nowrap rounded text-xs text-muted-foreground transition-colors hover:text-foreground`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`),children:[(0,Z.jsx)(q,{id:`_PACVa`}),(0,Z.jsx)(_o,{className:`size-3`,"aria-hidden":`true`})]})]}),e[3]=s):s=e[3],s}function TT(e){let t=(0,$.c)(28),{group:n,activeId:r,onSelect:i}=e;if(n.items.length===0)return null;let a=`settings-group-${n.id}`,o=`${a}-caption`,s=n.enabled?void 0:o,c=n.enabled?`text-muted-foreground/80`:`text-muted-foreground/50`,l;t[0]===c?l=t[1]:(l=J(`shrink-0 whitespace-nowrap px-2 text-xs font-semibold uppercase tracking-wide font-mono sm:mb-1`,c),t[0]=c,t[1]=l);let u;t[2]!==n.label||t[3]!==a||t[4]!==s||t[5]!==l?(u=(0,Z.jsx)(`h3`,{id:a,"aria-describedby":s,className:l,children:n.label}),t[2]=n.label,t[3]=a,t[4]=s,t[5]=l,t[6]=u):u=t[6];let d;t[7]!==o||t[8]!==n.enabled?(d=n.enabled?null:(0,Z.jsx)(`p`,{id:o,className:`px-2 text-xs italic text-muted-foreground/60 sm:mb-1`,children:(0,Z.jsx)(q,{id:`JWsZlx`})}),t[7]=o,t[8]=n.enabled,t[9]=d):d=t[9];let f;if(t[10]!==r||t[11]!==o||t[12]!==n.enabled||t[13]!==n.items||t[14]!==i){let e;t[16]!==r||t[17]!==o||t[18]!==n.enabled||t[19]!==i?(e=e=>(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`button`,{type:`button`,"aria-current":r===e.id?`page`:void 0,"aria-disabled":n.enabled?void 0:!0,"aria-describedby":n.enabled?void 0:o,tabIndex:n.enabled?0:-1,disabled:!n.enabled,onClick:()=>n.enabled&&i(e.id),"data-testid":`settings-sidebar-item-${e.id}`,className:J(`w-auto whitespace-nowrap rounded px-2 py-1.5 text-left text-sm transition-colors sm:w-full`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,r===e.id&&n.enabled?`bg-accent text-accent-foreground`:`hover:bg-accent/50`),children:e.label})},e.id),t[16]=r,t[17]=o,t[18]=n.enabled,t[19]=i,t[20]=e):e=t[20],f=n.items.map(e),t[10]=r,t[11]=o,t[12]=n.enabled,t[13]=n.items,t[14]=i,t[15]=f}else f=t[15];let p;t[21]!==a||t[22]!==f?(p=(0,Z.jsx)(`ul`,{"aria-labelledby":a,className:`flex gap-1 sm:block sm:space-y-0.5`,children:f}),t[21]=a,t[22]=f,t[23]=p):p=t[23];let m;return t[24]!==u||t[25]!==d||t[26]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 sm:mb-4 sm:block`,children:[u,d,p]}),t[24]=u,t[25]=d,t[26]=p,t[27]=m):m=t[27],m}function ET(){let e=(0,$.c)(4),t,n,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(q,{id:`GsBUCk`})}),n=(0,Z.jsx)(Bd,{className:`h-5 w-32`}),r=(0,Z.jsx)(Bd,{className:`h-4 w-64`}),e[0]=t,e[1]=n,e[2]=r):(t=e[0],n=e[1],r=e[2]);let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`space-y-3`,"data-testid":`settings-content-skeleton`,children:[t,n,r,(0,Z.jsxs)(`div`,{className:`space-y-2`,children:[(0,Z.jsx)(Bd,{className:`h-9 w-full`}),(0,Z.jsx)(Bd,{className:`h-9 w-full`})]})]}),e[3]=i):i=e[3],i}function DT(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`flex h-full w-full aria-[orientation=vertical]:flex-col`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(XS,{"data-slot":`resizable-panel-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function OT(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(eC,{"data-slot":`resizable-panel`,...n}),t[2]=n,t[3]=r),r}function kT(e){let t=(0,$.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({withHandle:i,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=J(`relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90`,n),t[4]=n,t[5]=a);let o;t[6]===i?o=t[7]:(o=i&&(0,Z.jsx)(`div`,{className:`z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border`}),t[6]=i,t[7]=o);let s;return t[8]!==r||t[9]!==a||t[10]!==o?(s=(0,Z.jsx)(iC,{"data-slot":`resizable-handle`,className:a,...r,children:o}),t[8]=r,t[9]=a,t[10]=o,t[11]=s):s=t[11],s}function AT(e){let t=(0,$.c)(119),{findInputRef:n,query:r,replacement:i,replaceOpen:a,caseSensitive:o,wholeWord:s,current:c,total:l,onQueryChange:u,onReplacementChange:d,onReplaceOpenChange:f,onCaseSensitiveChange:p,onWholeWordChange:m,onNext:h,onPrevious:g,onReplaceCurrent:_,onReplaceAll:v,onClose:y}=e,{_:b}=ht(),x=r.length>0,S=l>0,C;t[0]!==b||t[1]!==c||t[2]!==S||t[3]!==x||t[4]!==l?(C=x?S?`${c} / ${l}`:b({id:`Ev2r9A`}):``,t[0]=b,t[1]=c,t[2]=S,t[3]=x,t[4]=l,t[5]=C):C=t[5];let w=C,T;t[6]!==y||t[7]!==h||t[8]!==g?(T=function(e){e.key===`Enter`?(e.preventDefault(),e.shiftKey?g():h()):e.key===`Escape`&&(e.preventDefault(),y())},t[6]=y,t[7]=h,t[8]=g,t[9]=T):T=t[9];let E=T,D;t[10]!==y||t[11]!==_?(D=function(e){e.key===`Enter`?(e.preventDefault(),_()):e.key===`Escape`&&(e.preventDefault(),y())},t[10]=y,t[11]=_,t[12]=D):D=t[12];let O=D,k;t[13]===b?k=t[14]:(k=b({id:`MVxpbf`}),t[13]=b,t[14]=k);let A;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Z.jsx)(`label`,{className:`sr-only`,htmlFor:`ok-find-input`,children:(0,Z.jsx)(q,{id:`KujtjC`})}),t[15]=A):A=t[15];let j;t[16]===u?j=t[17]:(j=e=>u(e.target.value),t[16]=u,t[17]=j);let M;t[18]===b?M=t[19]:(M=b({id:`KujtjC`}),t[18]=b,t[19]=M);let N;t[20]!==n||t[21]!==E||t[22]!==r||t[23]!==j||t[24]!==M?(N=(0,Z.jsx)(kc,{ref:n,id:`ok-find-input`,value:r,onChange:j,onKeyDown:E,placeholder:M,autoComplete:`off`,spellCheck:!1,className:`h-7 px-2 text-sm`}),t[20]=n,t[21]=E,t[22]=r,t[23]=j,t[24]=M,t[25]=N):N=t[25];let P;t[26]===b?P=t[27]:(P=b({id:`-8PP0T`}),t[26]=b,t[27]=P);let F;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Z.jsx)(Po,{"aria-hidden":`true`}),t[28]=F):F=t[28];let I;t[29]!==o||t[30]!==p||t[31]!==P?(I=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Hr,{type:`button`,variant:`segmented`,size:`sm`,"aria-label":P,pressed:o,onPressedChange:p,className:`size-6 min-w-6 px-0`,children:F})}),t[29]=o,t[30]=p,t[31]=P,t[32]=I):I=t[32];let L;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`-8PP0T`})}),t[33]=L):L=t[33];let R;t[34]===I?R=t[35]:(R=(0,Z.jsxs)(cn,{children:[I,L]}),t[34]=I,t[35]=R);let z;t[36]===b?z=t[37]:(z=b({id:`_7UQ7y`}),t[36]=b,t[37]=z);let B;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,Z.jsx)(Og,{"aria-hidden":`true`}),t[38]=B):B=t[38];let V;t[39]!==m||t[40]!==z||t[41]!==s?(V=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Hr,{type:`button`,variant:`segmented`,size:`sm`,"aria-label":z,pressed:s,onPressedChange:m,className:`size-6 min-w-6 px-0`,children:B})}),t[39]=m,t[40]=z,t[41]=s,t[42]=V):V=t[42];let H;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`_7UQ7y`})}),t[43]=H):H=t[43];let U;t[44]===V?U=t[45]:(U=(0,Z.jsxs)(cn,{children:[V,H]}),t[44]=V,t[45]=U);let W;t[46]!==R||t[47]!==U?(W=(0,Z.jsxs)(Pc,{align:`inline-end`,className:`gap-0.5`,children:[R,U]}),t[46]=R,t[47]=U,t[48]=W):W=t[48];let G;t[49]!==W||t[50]!==N?(G=(0,Z.jsxs)(Lc,{className:`h-7 w-56 rounded-[min(var(--radius-md),12px)]`,children:[N,W]}),t[49]=W,t[50]=N,t[51]=G):G=t[51];let K;t[52]===w?K=t[53]:(K=(0,Z.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`min-w-14 px-1 text-right text-muted-foreground text-xs tabular-nums shrink-0`,children:w}),t[52]=w,t[53]=K);let ee;t[54]===b?ee=t[55]:(ee=b({id:`oqB2ez`}),t[54]=b,t[55]=ee);let te=!S,ne;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,Z.jsx)(Ir,{"data-icon":`inline-start`,"aria-hidden":`true`}),t[56]=ne):ne=t[56];let re;t[57]!==g||t[58]!==ee||t[59]!==te?(re=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":ee,disabled:te,onClick:g,children:ne})}),t[57]=g,t[58]=ee,t[59]=te,t[60]=re):re=t[60];let ie;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`oqB2ez`})}),t[61]=ie):ie=t[61];let ae;t[62]===re?ae=t[63]:(ae=(0,Z.jsxs)(cn,{children:[re,ie]}),t[62]=re,t[63]=ae);let oe;t[64]===b?oe=t[65]:(oe=b({id:`SiUUCS`}),t[64]=b,t[65]=oe);let se=!S,ce;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,Z.jsx)(Lo,{"data-icon":`inline-start`,"aria-hidden":`true`}),t[66]=ce):ce=t[66];let le;t[67]!==h||t[68]!==oe||t[69]!==se?(le=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":oe,disabled:se,onClick:h,children:ce})}),t[67]=h,t[68]=oe,t[69]=se,t[70]=le):le=t[70];let ue;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`SiUUCS`})}),t[71]=ue):ue=t[71];let de;t[72]===le?de=t[73]:(de=(0,Z.jsxs)(cn,{children:[le,ue]}),t[72]=le,t[73]=de);let fe=a?`secondary`:`ghost`,pe;t[74]!==b||t[75]!==a?(pe=b(a?{id:`UkQGhd`}:{id:`1RluQD`}),t[74]=b,t[75]=a,t[76]=pe):pe=t[76];let me=a?`ok-replace-input`:void 0,he;t[77]!==f||t[78]!==a?(he=()=>f(!a),t[77]=f,t[78]=a,t[79]=he):he=t[79];let ge;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Z.jsx)(ag,{"data-icon":`inline-start`,"aria-hidden":`true`}),t[80]=ge):ge=t[80];let _e;t[81]!==a||t[82]!==fe||t[83]!==pe||t[84]!==me||t[85]!==he?(_e=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:fe,size:`icon-sm`,"aria-label":pe,"aria-expanded":a,"aria-controls":me,onClick:he,children:ge})}),t[81]=a,t[82]=fe,t[83]=pe,t[84]=me,t[85]=he,t[86]=_e):_e=t[86];let ve;t[87]===a?ve=t[88]:(ve=(0,Z.jsx)(on,{side:`bottom`,children:a?(0,Z.jsx)(q,{id:`UkQGhd`}):(0,Z.jsx)(q,{id:`1RluQD`})}),t[87]=a,t[88]=ve);let ye;t[89]!==_e||t[90]!==ve?(ye=(0,Z.jsxs)(cn,{children:[_e,ve]}),t[89]=_e,t[90]=ve,t[91]=ye):ye=t[91];let be;t[92]!==b||t[93]!==O||t[94]!==S||t[95]!==v||t[96]!==_||t[97]!==d||t[98]!==a||t[99]!==i?(be=a?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`label`,{className:`sr-only`,htmlFor:`ok-replace-input`,children:(0,Z.jsx)(q,{id:`fqSfXY`})}),(0,Z.jsx)(vl,{id:`ok-replace-input`,value:i,onChange:e=>d(e.target.value),onKeyDown:O,placeholder:b({id:`fqSfXY`}),autoComplete:`off`,spellCheck:!1,className:`h-7 w-48 rounded-[min(var(--radius-md),12px)] px-2 text-sm shadow-none focus-visible:ring-2`}),(0,Z.jsxs)(cn,{children:[(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":b({id:`bS_boY`}),disabled:!S,onClick:_,children:(0,Z.jsx)(ag,{"data-icon":`inline-start`,"aria-hidden":`true`})})}),(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`bS_boY`})})]}),(0,Z.jsxs)(cn,{children:[(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":b({id:`dr1vFs`}),disabled:!S,onClick:v,children:(0,Z.jsx)(ig,{"data-icon":`inline-start`,"aria-hidden":`true`})})}),(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`dr1vFs`})})]})]}):null,t[92]=b,t[93]=O,t[94]=S,t[95]=v,t[96]=_,t[97]=d,t[98]=a,t[99]=i,t[100]=be):be=t[100];let xe;t[101]===b?xe=t[102]:(xe=b({id:`wJo9oS`}),t[101]=b,t[102]=xe);let Se;t[103]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,Z.jsx)(fl,{"data-icon":`inline-start`,"aria-hidden":`true`}),t[103]=Se):Se=t[103];let Ce;t[104]!==y||t[105]!==xe?(Ce=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":xe,onClick:y,children:Se})}),t[104]=y,t[105]=xe,t[106]=Ce):Ce=t[106];let we;t[107]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`yz7wBu`})}),t[107]=we):we=t[107];let Te;t[108]===Ce?Te=t[109]:(Te=(0,Z.jsxs)(cn,{children:[Ce,we]}),t[108]=Ce,t[109]=Te);let Ee;return t[110]!==G||t[111]!==K||t[112]!==ae||t[113]!==de||t[114]!==k||t[115]!==ye||t[116]!==be||t[117]!==Te?(Ee=(0,Z.jsxs)(`search`,{"data-testid":`find-replace-bar`,"aria-label":k,className:`pointer-events-auto flex max-w-[min(calc(100vw-1rem),720px)] touch-manipulation items-center gap-1 rounded-[calc(var(--radius)+2px)] border border-input bg-popover/95 p-1 text-popover-foreground shadow-md shadow-black/10 backdrop-blur`,children:[A,G,K,ae,de,ye,be,Te]}),t[110]=G,t[111]=K,t[112]=ae,t[113]=de,t[114]=k,t[115]=ye,t[116]=be,t[117]=Te,t[118]=Ee):Ee=t[118],Ee}var jT={current:0,total:0},MT=120,NT=100;function PT(e){let t=(0,$.c)(2),n;return t[0]===e?n=t[1]:(n=()=>e?pe(e):null,t[0]=e,t[1]=n),(0,Q.useSyncExternalStore)(V,n,FT)}function FT(){return null}function IT(e){if(!e||e.isDestroyed)return null;let{from:t,to:n,empty:r}=e.state.selection;if(r)return null;let i=e.state.doc.textBetween(t,n,`
|
|
14
|
+
`).trim(),mentions:t}}function UC(e){let{instruction:t,mentions:n}=HC(e);return t===``&&n.length===0}function WC(e){let t=e?.content;return!Array.isArray(t)||t.length===0?!1:t.some(e=>Array.isArray(e.content)&&e.content.length>0)}function GC(e){let t=(0,$.c)(29),{ref:n,ariaLabel:r,onEmptyChange:i,onContentChange:a,onMentionsChange:o,onSubmit:s,className:c,placeholder:l,initialDoc:u}=e,d=(0,Q.useRef)(i),f=(0,Q.useRef)(a),p=(0,Q.useRef)(o),m=(0,Q.useRef)(s),h;t[0]!==a||t[1]!==i||t[2]!==o||t[3]!==s?(h=()=>{d.current=i,f.current=a,p.current=o,m.current=s},t[0]=a,t[1]=i,t[2]=o,t[3]=s,t[4]=h):h=t[4],(0,Q.useEffect)(h);let g;t[5]===l?g=t[6]:(g=zC({placeholder:l}),t[5]=l,t[6]=g);let _=u??void 0,v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=J(`composer-prosemirror py-1 outline-none`),t[7]=v):v=t[7];let y;t[8]===r?y=t[9]:(y={role:`textbox`,"aria-label":r,"aria-multiline":`true`,class:v},t[8]=r,t[9]=y);let b;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(b=(e,t)=>t.key===`Escape`?jC.getState(e.state)?.active?!1:(e.dom.blur(),!0):t.key===`Enter`&&!t.shiftKey&&!t.isComposing&&!e.composing?jC.getState(e.state)?.active?!1:(m.current(),!0):!1,t[10]=b):b=t[10];let x;t[11]===y?x=t[12]:(x={attributes:y,handleKeyDown:b},t[11]=y,t[12]=x);let S;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>{let{editor:t}=e;d.current(UC(t)),f.current?.(t.getJSON()),p.current?.(HC(t).mentions)},t[13]=S):S=t[13];let C;t[14]!==g||t[15]!==_||t[16]!==x?(C={extensions:g,content:_,immediatelyRender:!0,editorProps:x,onUpdate:S},t[14]=g,t[15]=_,t[16]=x,t[17]=C):C=t[17];let w=In(C),T;t[18]!==w||t[19]!==u?(T=()=>{w&&(UC(w)&&WC(u)&&(console.warn(`composer draft was incompatible with the current schema — clearing it`),EC()),d.current(UC(w)),p.current?.(HC(w).mentions))},t[18]=w,t[19]=u,t[20]=T):T=t[20];let E;t[21]===w?E=t[22]:(E=[w],t[21]=w,t[22]=E),(0,Q.useEffect)(T,E);let D,O;t[23]===w?(D=t[24],O=t[25]):(D=()=>({focus:()=>w?.commands.focus(),blur:()=>w?.commands.blur(),clear:()=>w?.commands.clearContent(!0),setText:e=>{w&&(w.commands.setContent(e),f.current?.(w.getJSON()),p.current?.(HC(w).mentions))},getContent:()=>w?HC(w):{instruction:``,mentions:[]}}),O=[w],t[23]=w,t[24]=D,t[25]=O),(0,Q.useImperativeHandle)(n,D,O);let k;return t[26]!==c||t[27]!==w?(k=(0,Z.jsx)(Un,{editor:w,className:c}),t[26]=c,t[27]=w,t[28]=k):k=t[28],k}function KC(e,t,n){return e.trim().length>0||t.length>0||n}new Set(Xr.map(e=>e.id));function qC(e,t){yc(e,t)}function JC(e){let t=(0,$.c)(2),{agentName:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(q,{id:`5PrrYw`,values:{agentName:n}}),t[0]=n,t[1]=r),r}function YC(e){let t=(0,$.c)(29),{scenario:n,className:r}=e,{_:i}=ht(),{states:a,refresh:o}=ts(),s=Yr(),{dispatch:c}=Yo(),l=id(),u=Xo(),[d,f]=(0,Q.useState)(ZC),p=Gr(),m=Wr(),h;t[0]===s?h=t[1]:(h=e=>Zr(s,e.source,e.id,!0,e.supported),t[0]=s,t[1]=h);let g=m.filter(h),_=ri(g,p),v;t[2]===u?.installedClis?v=t[3]:(v=u?.installedClis??{},t[2]=u?.installedClis,t[3]=v);let y=Gc({sticky:d,effectiveThreadAgent:_,enabledClis:u===null?[]:Hc(s,u.installedClis),enabledDesktopTargets:Cc(s),installedClis:v,terminalAvailable:u!==null,threadsAvailable:!0,desktopSelectable:!0}),b=y.kind===`thread`,x=y.kind===`cli`?y.cli:null,S=y.kind===`desktop`?y.target:null,C=x!==null,w=(0,Q.useRef)(null),[T]=(0,Q.useState)(XC),[E,D]=(0,Q.useState)(!0),[O,k]=(0,Q.useState)(!1),A;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(A=function(e){D(e),e||k(!1)},t[4]=A):A=t[4];let j=A,M=dC(n),N;t[5]===s?N=t[6]:(N=e=>ti(s,e.id),t[5]=s,t[6]=N);let P=Xr.filter(N),F=Xr.every(e=>a[e.id]?.installed!=null),I=u!==null&&Hc(s,u.installedClis).length>0,L=F&&P.length===0&&g.length===0&&!I,R;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(R=function(e){f(e),yc(e),qC(e)},t[7]=R):R=t[7];let z=R,B;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(B=function(e){f(vc(e)),yc(vc(e))},t[8]=B):B=t[8];let V=B,H;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(H=function(e){qr(e),f(_c),yc(_c)},t[9]=H):H=t[9];let U=H,W=function(){let{instruction:e,mentions:t}=w.current?.getContent()??{instruction:``,mentions:[]};if(!KC(e,t,!1)){k(!0);return}let r=Zo({workspace:l,description:e,scenario:n,mentions:t});r!==null&&(ds(r,_===null?void 0:{agent:{source:_.source,id:_.id}}),w.current?.clear(),EC())},G=function(){if(u===null||x===null)return;let{instruction:e,mentions:t}=w.current?.getContent()??{instruction:``,mentions:[]};if(!KC(e,t,!1)){k(!0);return}let r=Zo({workspace:l,description:e,scenario:n,mentions:t});r!==null&&(u.launchInTerminal(r,x),w.current?.clear(),EC())},K=function(e){let{instruction:t,mentions:r}=w.current?.getContent()??{instruction:``,mentions:[]};if(!KC(t,r,!1)){k(!0);return}if(qC(e),a[e]?.installed!==!0){let t=Xr.find(t=>t.id===e);t&&ls(t);return}let i=Zo({workspace:l,description:t,scenario:n,mentions:r});i!==null&&(c(e,i),w.current?.clear(),EC())},ee=function(){b?W():C?G():S!==null&&K(S)},te=function(e){w.current?.setText(e),w.current?.focus()};if(L){let e;t[10]===r?e=t[11]:(e=J(`flex w-full flex-wrap items-center justify-between gap-3 rounded-2xl border border-border/60 bg-card px-4 py-3`,r),t[10]=r,t[11]=e);let n;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(qs,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),t[12]=n):n=t[12];let i;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[n,(0,Z.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`XT-L4j`})})]}),t[13]=i):i=t[13];let a;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsxs)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:Sl,className:`gap-1.5`,"data-testid":`create-configure-agents`,children:[(0,Z.jsx)(al,{"aria-hidden":`true`,className:`size-3.5`}),(0,Z.jsx)(q,{id:`jRAGrQ`})]}),t[14]=a):a=t[14];let o;return t[15]===e?o=t[16]:(o=(0,Z.jsxs)(`div`,{className:e,"data-testid":`create-no-agents`,children:[i,a]}),t[15]=e,t[16]=o),o}let ne=u?Hc(s,u.installedClis):[],re=P.length>0,ie=ne.length>0,ae=g.length>0,oe=y.kind!==`none`,se;t[17]===r?se=t[18]:(se=J(`flex w-full flex-col gap-3`,r),t[17]=r,t[18]=se);let ce;t[19]===i?ce=t[20]:(ce=i({id:`7hctf2`}),t[19]=i,t[20]=ce);let le;t[21]===i?le=t[22]:(le=i({id:`0jD-Gn`}),t[21]=i,t[22]=le);let ue;t[23]!==E||t[24]!==O?(ue=O&&E?(0,Z.jsx)(`p`,{role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-input-required`,children:(0,Z.jsx)(q,{id:`1FLarN`})}):(0,Z.jsx)(`span`,{}),t[23]=E,t[24]=O,t[25]=ue):ue=t[25];let de=oe?(0,Z.jsxs)(nf,{children:[(0,Z.jsx)(Y,{type:`button`,onClick:()=>b?W():C?G():S===null?void 0:K(S),variant:`outline`,className:`gap-1.5`,"data-testid":`create-with-agent`,children:b&&_!==null?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(yo,{agentId:_.id,iconUrl:_.iconUrl,className:`size-3.5`}),(0,Z.jsx)(JC,{agentName:_.name})]}):C&&x!==null?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Qr,{id:Kr(x),"aria-hidden":`true`,className:`size-3.5`}),(0,Z.jsx)(q,{id:`4rjwLG`,values:{0:Yi[x].displayName}})]}):S===null?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Qr,{id:S,"aria-hidden":`true`,className:`size-3.5`}),(0,Z.jsx)(q,{id:`9dw5bW`,values:{0:qo(S)}})]})}),(0,Z.jsxs)(Nr,{onOpenChange:e=>{e&&o()},children:[(0,Z.jsx)(Dr,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,"aria-label":i({id:`nskygk`}),size:`icon`,variant:`outline`,"data-testid":`create-with-agent-menu`,children:(0,Z.jsx)(Lo,{"aria-hidden":`true`,className:`size-3.5`})})}),(0,Z.jsxs)(jr,{align:`end`,className:`max-h-80 min-w-[200px]`,children:[ae?(0,Z.jsxs)(Er,{"aria-label":i({id:`vPKX2i`}),children:[(0,Z.jsxs)(kr,{className:`flex items-center gap-1.5`,children:[(0,Z.jsx)(q,{id:`RXEbZy`}),(0,Z.jsx)(ei,{})]}),g.map(e=>(0,Z.jsxs)(Cr,{onSelect:()=>U(e),"data-testid":`create-agent-option-thread-${e.source}:${e.id}`,children:[(0,Z.jsx)(yo,{agentId:e.id,iconUrl:e.iconUrl,className:`size-4`}),(0,Z.jsx)(`span`,{className:`flex-1 truncate`,children:e.name}),b&&_!==null&&_.source===e.source&&_.id===e.id?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]},`${e.source}:${e.id}`))]}):null,ae&&(ie||re)?(0,Z.jsx)(Pr,{}):null,ie?(0,Z.jsxs)(Er,{"aria-label":i({id:`ALhMYW`}),children:[(0,Z.jsx)(kr,{children:(0,Z.jsx)(q,{id:`ALhMYW`})}),ne.map(e=>{let{displayName:t}=Yi[e];return(0,Z.jsxs)(Cr,{onSelect:()=>V(e),"data-testid":`create-with-cli-${e}`,"aria-label":i({id:`QYfQdv`,values:{displayName:t}}),children:[(0,Z.jsx)(Qr,{id:Kr(e),"aria-hidden":`true`,className:`size-4`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:t}),x===e?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]},e)})]}):null,re?(0,Z.jsxs)(Z.Fragment,{children:[ie?(0,Z.jsx)(Pr,{}):null,(0,Z.jsxs)(Er,{"aria-label":i({id:`BBqGS9`}),children:[(0,Z.jsx)(kr,{children:(0,Z.jsx)(q,{id:`BBqGS9`})}),P.map(e=>(0,Z.jsxs)(Cr,{onSelect:()=>z(e.id),"data-testid":`create-agent-option-${e.id}`,children:[(0,Z.jsx)(Qr,{id:e.id,"aria-hidden":`true`,className:`size-4`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:e.displayName}),!C&&e.id===S?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]},e.id))]})]}):null,(0,Z.jsx)(Pr,{}),(0,Z.jsxs)(Cr,{onSelect:Sl,"data-testid":`create-agent-option-settings`,children:[(0,Z.jsx)(al,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`jRAGrQ`})})]})]})]})]}):(0,Z.jsx)(Y,{type:`button`,variant:`outline`,disabled:!0,className:`gap-1.5`,"data-testid":`create-with-agent`,children:(0,Z.jsx)(q,{id:`hYgDIe`})}),fe;return t[26]!==ue||t[27]!==de?(fe=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 px-3 pb-3`,children:[ue,de]}),t[26]=ue,t[27]=de,t[28]=fe):fe=t[28],(0,Z.jsxs)(`div`,{className:se,children:[(0,Z.jsxs)(`div`,{onMouseDown:e=>af(e,w),className:`flex w-full cursor-text flex-col rounded-2xl border border-border/60 bg-card shadow-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50`,children:[(0,Z.jsx)(GC,{ref:w,ariaLabel:ce,placeholder:le,onEmptyChange:j,onContentChange:TC,onSubmit:ee,initialDoc:T,className:`max-h-96 overflow-y-auto px-4 py-3 text-sm leading-relaxed subtle-scrollbar [&_.ProseMirror]:min-h-16`}),fe]}),n!==`existing-repo`&&M.length>0?(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`I5685_`})}),M.map(e=>{let t=e.icon;return(0,Z.jsxs)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>te(e.prompt),className:`gap-1.5 rounded-md font-normal text-muted-foreground hover:text-foreground`,"data-testid":`create-suggestion-${e.id}`,children:[(0,Z.jsx)(t,{className:`size-3.5`,"aria-hidden":`true`}),e.label]},e.id)})]}):null]})}function XC(){return wC().doc??void 0}function ZC(){return Uc()}function QC(e){let t=(0,$.c)(12),{title:n,subtitle:r,celebrateSignal:i}=e,a;t[0]===i?a=t[1]:(a=(0,Z.jsx)(Xp,{size:64,celebrateSignal:i}),t[0]=i,t[1]=a);let o;t[2]===n?o=t[3]:(o=(0,Z.jsx)(`h2`,{className:`text-2xl font-light tracking-tighter text-balance`,children:n}),t[2]=n,t[3]=o);let s;t[4]===r?s=t[5]:(s=r?(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r}):null,t[4]=r,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,Z.jsxs)(`div`,{className:`flex flex-col items-start gap-3 @md/emptystate:flex-row @md/emptystate:items-center @md/emptystate:gap-4`,children:[a,c]}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}function $C({isOnboarding:e,isEmbedded:t}){return e?{title:{id:`6h4zVU`},subtitle:t?{id:`vGeNNQ`}:{id:`qpQwGC`}}:{title:{id:`FOGD7m`},subtitle:t?{id:`3DTatP`}:{id:`MqQoV-`}}}var ew=`open-knowledge:create-top-level-file`;function tw(e={}){window.dispatchEvent(new CustomEvent(ew,{detail:e}))}function nw(e){let t=t=>{let n=t.detail;e(n??{})};return window.addEventListener(ew,t),()=>window.removeEventListener(ew,t)}function rw(e){let t=(0,$.c)(28),{celebrateSignal:n,onAddStarterPack:r}=e,{_:i}=ht(),a=Xs(),{title:o,subtitle:s}=$C({isOnboarding:!1,isEmbedded:a}),c=_s(),l;t[0]!==c.data||t[1]!==c.status?(l=c.status===`ready`?c.data:[],t[0]=c.data,t[1]=c.status,t[2]=l):l=t[2];let u=l,d=c.status===`loading`||c.status===`idle`,f=c.status===`error`,p=QC,m=i(o),h=i(s),g;t[3]!==p||t[4]!==n||t[5]!==m||t[6]!==h?(g=(0,Z.jsx)(p,{title:m,subtitle:h,celebrateSignal:n}),t[3]=p,t[4]=n,t[5]=m,t[6]=h,t[7]=g):g=t[7];let _;t[8]===a?_=t[9]:(_=a?(0,Z.jsx)(fC,{scenario:`existing-repo`}):(0,Z.jsx)(YC,{scenario:`existing-repo`}),t[8]=a,t[9]=_);let v;t[10]!==u||t[11]!==f||t[12]!==d?(v=d||f||u.length>0?(0,Z.jsx)(ow,{templates:u,loading:d,error:f,onSelect:aw}):null,t[10]=u,t[11]=f,t[12]=d,t[13]=v):v=t[13];let y,b;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(Ut,{"aria-hidden":`true`,className:`size-3`}),b=(0,Z.jsx)(q,{id:`IajAbS`}),t[14]=y,t[15]=b):(y=t[14],b=t[15]);let x;t[16]===r?x=t[17]:(x=(0,Z.jsxs)(Y,{onClick:r,variant:`link-muted`,size:`xs`,className:`font-mono text-xs uppercase tracking-wider`,children:[y,b]}),t[16]=r,t[17]=x);let S;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(Y,{variant:`link-muted`,className:`justify-end`,size:`sm`,onClick:iw,children:(0,Z.jsx)(q,{id:`L4Cdd9`,components:{0:(0,Z.jsx)(qn,{"aria-hidden":`true`,className:`size-3`})}})}),t[18]=S):S=t[18];let C;t[19]===x?C=t[20]:(C=(0,Z.jsxs)(`div`,{className:`-mt-6 flex w-full items-center justify-between gap-4`,children:[x,S]}),t[19]=x,t[20]=C);let w;t[21]!==C||t[22]!==v?(w=(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-8`,children:[v,C]}),t[21]=C,t[22]=v,t[23]=w):w=t[23];let T;return t[24]!==w||t[25]!==g||t[26]!==_?(T=(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-8 py-12 max-w-5xl my-auto`,children:[g,_,w]}),t[24]=w,t[25]=g,t[26]=_,t[27]=T):T=t[27],T}function iw(){return tw({initialDir:``})}function aw(e,t){return tw({template:{folder:e,name:t}})}function ow(e){let t=(0,$.c)(25),{templates:n,loading:r,error:i,onSelect:a}=e,{_:o}=ht(),s;t[0]===o?s=t[1]:(s=o({id:`_8quCH`}),t[0]=o,t[1]=s);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`_8quCH`})}),t[2]=c):c=t[2];let l;t[3]!==o||t[4]!==i||t[5]!==r||t[6]!==n?(l=r||i?null:(0,Z.jsx)(vu,{className:`text-2xs`,variant:`gray`,"aria-label":o({id:`X7u0xR`,values:{0:n.length}}),children:n.length}),t[3]=o,t[4]=i,t[5]=r,t[6]=n,t[7]=l):l=t[7];let u;t[8]===l?u=t[9]:(u=(0,Z.jsxs)(`header`,{className:`flex items-center gap-2 font-mono text-2xs uppercase tracking-wider text-muted-foreground`,children:[c,l]}),t[8]=l,t[9]=u);let d;t[10]===o?d=t[11]:(d=o({id:`irFGwu`}),t[10]=o,t[11]=d);let f;t[12]!==i||t[13]!==r||t[14]!==a||t[15]!==n?(f=r?(0,Z.jsx)(`p`,{className:`p-4 text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`Hl89Qd`})}):i?(0,Z.jsx)(`p`,{role:`alert`,className:`p-4 text-1sm text-destructive`,children:(0,Z.jsx)(q,{id:`54Y6Fg`})}):n.map(e=>(0,Z.jsx)(sw,{template:e,targetLabel:e.source_folder===``?`/`:`${e.source_folder}/`,onClick:()=>a(e.source_folder,e.name)},`${e.source_folder}/${e.name}`)),t[12]=i,t[13]=r,t[14]=a,t[15]=n,t[16]=f):f=t[16];let p;t[17]!==r||t[18]!==d||t[19]!==f?(p=(0,Z.jsx)(`div`,{className:`w-full overflow-hidden rounded-xl border border-border/60 bg-card`,children:(0,Z.jsx)(`section`,{"aria-busy":r,"aria-label":d,tabIndex:0,className:`subtle-scrollbar scroll-fade-mask flex max-h-[260px] w-full flex-col overflow-y-auto overscroll-contain focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50`,children:f})}),t[17]=r,t[18]=d,t[19]=f,t[20]=p):p=t[20];let m;return t[21]!==s||t[22]!==u||t[23]!==p?(m=(0,Z.jsxs)(`section`,{"aria-label":s,className:`flex w-full flex-col gap-3`,children:[u,p]}),t[21]=s,t[22]=u,t[23]=p,t[24]=m):m=t[24],m}function sw(e){let t=(0,$.c)(24),{template:n,targetLabel:r,onClick:i}=e,{_:a}=ht(),o;t[0]!==n.name||t[1]!==n.title?(o=n.title?.trim()||n.name,t[0]=n.name,t[1]=n.title,t[2]=o):o=t[2];let s=o,c=`${n.name}.md`,l=n.source_folder===``,u;t[3]!==a||t[4]!==s||t[5]!==c||t[6]!==l||t[7]!==r?(u=a(l?{id:`89TtiD`,values:{displayTitle:s,fileName:c}}:{id:`0_J12R`,values:{displayTitle:s,fileName:c,targetLabel:r}}),t[3]=a,t[4]=s,t[5]=c,t[6]=l,t[7]=r,t[8]=u):u=t[8];let d=u,f;t[9]===s?f=t[10]:(f=(0,Z.jsx)(`span`,{className:`truncate text-sm font-medium leading-tight text-foreground/80`,children:s}),t[9]=s,t[10]=f);let p;t[11]===c?p=t[12]:(p=(0,Z.jsx)(`span`,{className:`truncate font-mono text-1sm font-normal text-muted-foreground`,children:c}),t[11]=c,t[12]=p);let m;t[13]!==f||t[14]!==p?(m=(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2`,children:[f,p]}),t[13]=f,t[14]=p,t[15]=m):m=t[15];let h=`shrink-0 font-mono text-1sm ${l?`text-muted-foreground/70`:`text-muted-foreground`}`,g;t[16]!==h||t[17]!==r?(g=(0,Z.jsx)(`span`,{className:h,children:r}),t[16]=h,t[17]=r,t[18]=g):g=t[18];let _;return t[19]!==d||t[20]!==i||t[21]!==m||t[22]!==g?(_=(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,onClick:i,"aria-label":d,className:`group flex h-auto w-full items-center justify-between gap-4 rounded-none p-4 text-left transition-colors hover:bg-muted/50 focus-visible:bg-muted/50`,children:[m,g]}),t[19]=d,t[20]=i,t[21]=m,t[22]=g,t[23]=_):_=t[23],_}function cw(e){let t=(0,$.c)(25),{terminalDock:n}=e,r=n===void 0?null:n,[i,a]=(0,Q.useState)(!1),[o,s]=(0,Q.useState)(void 0),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(0),f=(0,Q.useRef)(!1),p=(0,Q.useRef)(void 0),m,h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>{let e=!1,t=async function(){try{let{ok:t,body:n}=await nu();if(e)return;let r=t?Ma.safeParse(n):null;r?.success?(l(dw(r.data.documents)),f.current=!0):f.current||=(l(1),!0)}catch{!e&&!f.current&&(l(1),f.current=!0)}};t();let n=Jl(e=>{e.includes(`files`)&&t()});return()=>{e=!0,n(),clearTimeout(p.current)}},h=[],t[0]=m,t[1]=h):(m=t[0],h=t[1]),(0,Q.useEffect)(m,h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=function(){clearTimeout(p.current),p.current=setTimeout(()=>d(uw),500),nu().then(e=>{let{ok:t,body:n}=e;if(!t)return;let r=Ma.safeParse(n);r.success&&l(dw(r.data.documents))}).catch(lw)},t[2]=g):g=t[2];let _=g,v=c!==null,y=c===0,b;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(b=function(e){a(e),e||s(void 0)},t[3]=b):b=t[3];let x=b;if(r!==null){let e=r===`bottom`?`justify-end`:`justify-center`,n;t[4]===e?n=t[5]:(n=J(`@container/emptystate flex min-h-0 flex-1 flex-col items-center pb-8 pt-10`,e),t[4]=e,t[5]=n);let i;t[6]!==u||t[7]!==y||t[8]!==v?(i=v?(0,Z.jsx)(fw,{isOnboarding:y,celebrateSignal:u}):null,t[6]=u,t[7]=y,t[8]=v,t[9]=i):i=t[9];let a;t[10]===i?a=t[11]:(a=(0,Z.jsx)(`div`,{className:`flex w-full flex-col items-center px-4 @md/emptystate:px-10 @2xl/emptystate:px-16`,children:i}),t[10]=i,t[11]=a);let o;return t[12]!==n||t[13]!==a?(o=(0,Z.jsx)(`div`,{className:n,children:a}),t[12]=n,t[13]=a,t[14]=o):o=t[14],o}let S;t[15]!==u||t[16]!==y||t[17]!==v?(S=v?y?(0,Z.jsx)(pw,{celebrateSignal:u,onPackSelect:e=>{s(e),a(!0)}}):(0,Z.jsx)(rw,{celebrateSignal:u,onAddStarterPack:()=>{a(!0)}}):null,t[15]=u,t[16]=y,t[17]=v,t[18]=S):S=t[18];let C;t[19]!==o||t[20]!==i?(C=(0,Z.jsx)(Ov,{open:i,onOpenChange:x,onSeedApplied:_,initialPackId:o}),t[19]=o,t[20]=i,t[21]=C):C=t[21];let w;return t[22]!==S||t[23]!==C?(w=(0,Z.jsx)(`div`,{className:`@container/emptystate flex min-h-0 flex-1 flex-col items-center overflow-y-auto subtle-scrollbar`,children:(0,Z.jsxs)(`div`,{className:`flex w-full flex-1 flex-col items-center px-4 @md/emptystate:px-10 @2xl/emptystate:px-16`,children:[S,C]})}),t[22]=S,t[23]=C,t[24]=w):w=t[24],w}function lw(){}function uw(e){return e+1}function dw(e){return Nl(e).filter(e=>e.kind===`document`||e.kind===`folder`).length}function fw(e){let t=(0,$.c)(15),{isOnboarding:n,celebrateSignal:r}=e,{_:i}=ht(),a=Xs(),o,s,c,l;if(t[0]!==i||t[1]!==a||t[2]!==n){let{title:e,subtitle:r}=$C({isOnboarding:n,isEmbedded:a});l=`w-full max-w-5xl`,o=QC,s=i(e),c=i(r),t[0]=i,t[1]=a,t[2]=n,t[3]=o,t[4]=s,t[5]=c,t[6]=l}else o=t[3],s=t[4],c=t[5],l=t[6];let u;t[7]!==o||t[8]!==r||t[9]!==s||t[10]!==c?(u=(0,Z.jsx)(o,{title:s,subtitle:c,celebrateSignal:r}),t[7]=o,t[8]=r,t[9]=s,t[10]=c,t[11]=u):u=t[11];let d;return t[12]!==l||t[13]!==u?(d=(0,Z.jsx)(`div`,{className:l,children:u}),t[12]=l,t[13]=u,t[14]=d):d=t[14],d}function pw(e){let t=(0,$.c)(29),{celebrateSignal:n,onPackSelect:r}=e,{_:i}=ht(),a=Xs(),o,s,c,l;if(t[0]!==i||t[1]!==a){let{title:e,subtitle:n}=$C({isOnboarding:!0,isEmbedded:a});l=`flex w-full flex-col gap-10 py-12 max-w-5xl my-auto`,o=QC,s=i(e),c=i(n),t[0]=i,t[1]=a,t[2]=o,t[3]=s,t[4]=c,t[5]=l}else o=t[2],s=t[3],c=t[4],l=t[5];let u;t[6]!==o||t[7]!==n||t[8]!==s||t[9]!==c?(u=(0,Z.jsx)(o,{title:s,subtitle:c,celebrateSignal:n}),t[6]=o,t[7]=n,t[8]=s,t[9]=c,t[10]=u):u=t[10];let d;t[11]===a?d=t[12]:(d=a?(0,Z.jsx)(fC,{scenario:`new-project`}):(0,Z.jsx)(YC,{scenario:`new-project`}),t[11]=a,t[12]=d);let f;t[13]!==i||t[14]!==a?(f=i(a?{id:`GubkSu`}:{id:`xeXS4P`}),t[13]=i,t[14]=a,t[15]=f):f=t[15];let p;t[16]===f?p=t[17]:(p=(0,Z.jsx)(hw,{label:f}),t[16]=f,t[17]=p);let m;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(m=[`okf`,`entity-vault`],t[18]=m):m=t[18];let h;t[19]===r?h=t[20]:(h=(0,Z.jsx)(Sv,{onPackSelect:r,onCreateBlankFile:mw,collapsedPackIds:m}),t[19]=r,t[20]=h);let g;t[21]!==p||t[22]!==h?(g=(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-3`,children:[p,h]}),t[21]=p,t[22]=h,t[23]=g):g=t[23];let _;return t[24]!==g||t[25]!==l||t[26]!==u||t[27]!==d?(_=(0,Z.jsxs)(`div`,{className:l,children:[u,d,g]}),t[24]=g,t[25]=l,t[26]=u,t[27]=d,t[28]=_):_=t[28],_}function mw(){return tw()}function hw(e){let t=(0,$.c)(13),{label:n}=e,{_:r}=ht(),i;t[0]===n?i=t[1]:(i=(0,Z.jsx)(`span`,{className:`font-mono text-2xs uppercase tracking-wider text-muted-foreground whitespace-nowrap`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r({id:`jAMpHn`}),t[2]=r,t[3]=a);let o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(Kc,{className:`size-3.5`,"aria-hidden":!0}),t[4]=o):o=t[4];let s;t[5]===a?s=t[6]:(s=(0,Z.jsx)(an,{className:`text-muted-foreground transition-colors hover:text-foreground`,"aria-label":a,"data-testid":`starter-pack-info`,children:o}),t[5]=a,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(on,{className:`max-w-xs`,children:(0,Z.jsx)(`p`,{className:`leading-relaxed wrap-break-word`,children:(0,Z.jsx)(q,{id:`k4CuuV`})})}),t[7]=c):c=t[7];let l;t[8]===s?l=t[9]:(l=(0,Z.jsxs)(cn,{children:[s,c]}),t[8]=s,t[9]=l);let u;return t[10]!==i||t[11]!==l?(u=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[i,l]}),t[10]=i,t[11]=l,t[12]=u):u=t[12],u}function gw(e){return e===``?`.ok/frontmatter.yml`:`${e}/.ok/frontmatter.yml`}function _w(e){let t=(0,$.c)(70),{folderPath:n,state:r,onChange:i}=e,{_:a}=ht(),[o,s]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(null);if(r.status===`idle`||r.status===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsxs)(`section`,{className:`rounded-lg border bg-card p-4 space-y-3`,children:[(0,Z.jsx)(yw,{}),(0,Z.jsx)(Bd,{className:`h-7 w-full`}),(0,Z.jsx)(Bd,{className:`h-7 w-full`}),(0,Z.jsx)(Bd,{className:`h-7 w-full`})]}),t[0]=e):e=t[0],e}if(r.status===`error`){let{message:e}=r,n;return t[1]===e?n=t[2]:(n=(0,Z.jsx)(`section`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,role:`alert`,children:(0,Z.jsx)(q,{id:`lzmtKp`,values:{message:e}})}),t[1]=e,t[2]=n),n}let f;t[3]===r.data.frontmatterLocal?f=t[4]:(f=r.data.frontmatterLocal??{},t[3]=r.data.frontmatterLocal,t[4]=f);let p=f,m;t[5]===r.data.folder.path?m=t[6]:(m=gw(r.data.folder.path),t[5]=r.data.folder.path,t[6]=m);let h=m,g;t[7]===p?g=t[8]:(g=Object.keys(p),t[7]=p,t[8]=g);let _=g,v;t[9]!==a||t[10]!==n||t[11]!==i?(v=async function(e,t){let r=await pc(n,{[e]:t});if(!r.ok){let{error:e}=r;X.error(a({id:`xXo8FT`,values:{error:e}}));return}i()},t[9]=a,t[10]=n,t[11]=i,t[12]=v):v=t[12];let y=v,b;t[13]!==a||t[14]!==n||t[15]!==i?(b=async function(e){let t=await pc(n,{[e]:null});if(!t.ok){let{error:e}=t;X.error(a({id:`ZU8VV_`,values:{error:e}}));return}i()},t[13]=a,t[14]=n,t[15]=i,t[16]=b):b=t[16];let x=b,S;t[17]!==y||t[18]!==p?(S=function(e,t){let n=p[e];y(e,Co(n,t))},t[17]=y,t[18]=p,t[19]=S):S=t[19];let C=S,w;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(w=function(){l({name:``,type:`text`,value:``,error:null}),s(!1)},t[20]=w):w=t[20];let T=w,E;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(E=function(e){l(t=>{if(!t)return t;let n=e===`date`?new Date().toISOString().slice(0,10):No[e];return{...t,type:e,value:n,error:null}})},t[21]=E):E=t[21];let D=E,O;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(O=function(e){l(t=>t&&{...t,value:e})},t[22]=O):O=t[22];let k=O,A;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(A=function(e){l(t=>t&&{...t,name:e,error:null})},t[23]=A):A=t[23];let j=A,M;t[24]!==a||t[25]!==c||t[26]!==n||t[27]!==i||t[28]!==p?(M=async function(e){if(!c)return;let t=e??c.value,r=c.name.trim();if(!r){l({...c,value:t,error:a({id:`8_brI5`})});return}if(wa(t)){l({...c,value:t,error:a({id:`hXUWyd`})});return}if(Object.hasOwn(p,r)){l({...c,value:t,error:a({id:`CTJLpz`,values:{trimmed:r}})});return}let o=await pc(n,{[r]:t});if(!o.ok){l({...c,value:t,error:o.error});return}l(null),i()},t[24]=a,t[25]=c,t[26]=n,t[27]=i,t[28]=p,t[29]=M):M=t[29];let N=M,P;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(P=function(e){d({key:e,draft:e,error:null})},t[30]=P):P=t[30];let F=P,I;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(I=function(e){d(t=>t&&{...t,draft:e,error:null})},t[31]=I):I=t[31];let L=I,R;t[32]!==a||t[33]!==n||t[34]!==i||t[35]!==p||t[36]!==u?(R=async function(){if(!u)return;let e=u.draft.trim();if(!e){d({...u,error:a({id:`8_brI5`})});return}if(e===u.key){d(null);return}if(Object.hasOwn(p,e)){d({...u,error:a({id:`CTJLpz`,values:{trimmed:e}})});return}let t=p[u.key],r=await pc(n,{[u.key]:null,[e]:t});if(!r.ok){d({...u,error:r.error});return}d(null),i()},t[32]=a,t[33]=n,t[34]=i,t[35]=p,t[36]=u,t[37]=R):R=t[37];let z=R,B;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(B=function(){d(null)},t[38]=B):B=t[38];let V=B,H=!o,U;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(U=e=>s(!e),t[39]=U):U=t[39];let W=`size-3 transition-transform ${o?``:`rotate-90`}`,G;t[40]===W?G=t[41]:(G=(0,Z.jsx)(Ro,{className:W,"aria-hidden":!0}),t[40]=W,t[41]=G);let K;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`vQIVHc`})}),t[42]=K):K=t[42];let ee;t[43]===G?ee=t[44]:(ee=(0,Z.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:[G,K]}),t[43]=G,t[44]=ee);let te;t[45]===h?te=t[46]:(te=(0,Z.jsx)(`code`,{className:`text-xs text-muted-foreground font-mono cursor-text select-text`,onClick:vw,children:h}),t[45]=h,t[46]=te);let ne;t[47]!==ee||t[48]!==te?(ne=(0,Z.jsxs)(un,{className:`flex w-full cursor-pointer items-center justify-between gap-2 px-3 py-2.5 data-[state=open]:border-b border-border`,children:[ee,te]}),t[47]=ee,t[48]=te,t[49]=ne):ne=t[49];let re;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,Z.jsx)(`p`,{className:`px-1 pb-2 text-sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`hSBIG-`})}),t[50]=re):re=t[50];let ie;t[51]!==c||t[52]!==y||t[53]!==z||t[54]!==_||t[55]!==p||t[56]!==x||t[57]!==u||t[58]!==C?(ie=_.length===0&&!c?(0,Z.jsx)(`p`,{className:`px-1 py-1 text-sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`4c_a6S`})}):_.map(e=>{let t=p[e];return(0,Z.jsx)(jo,{keyName:e,value:t,declared:Eo(t,Za(t)),rename:{state:u?.key===e?u:null,onBegin:()=>F(e),onChangeDraft:L,onCommit:z,onCancel:V},badge:null,onCommit:t=>void y(e,t),onChangeType:t=>C(e,t),onRemove:()=>void x(e)},e)}),t[51]=c,t[52]=y,t[53]=z,t[54]=_,t[55]=p,t[56]=x,t[57]=u,t[58]=C,t[59]=ie):ie=t[59];let ae;t[60]!==c||t[61]!==N?(ae=c?(0,Z.jsx)(Oo,{draft:c,onChangeName:j,onChangeType:D,onChangeValue:k,onCommit:e=>void N(e),onCancel:()=>l(null)}):(0,Z.jsx)(`div`,{className:`mt-1 flex flex-wrap items-center gap-1`,children:(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`add-property-trigger`,onClick:()=>T(),className:`flex items-center gap-1.5 rounded px-2 py-1 font-medium text-sm hover:bg-muted/50 hover:text-foreground`,children:[(0,Z.jsx)(Ut,{className:`size-3.5`}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`G8t9NN`})})]})}),t[60]=c,t[61]=N,t[62]=ae):ae=t[62];let oe;t[63]!==ie||t[64]!==ae?(oe=(0,Z.jsx)(ln,{children:(0,Z.jsxs)(`div`,{className:`px-2 py-2`,children:[re,ie,ae]})}),t[63]=ie,t[64]=ae,t[65]=oe):oe=t[65];let se;return t[66]!==H||t[67]!==ne||t[68]!==oe?(se=(0,Z.jsx)(`section`,{className:`rounded-lg border bg-card`,children:(0,Z.jsxs)(dn,{open:H,onOpenChange:U,children:[ne,oe]})}),t[66]=H,t[67]=ne,t[68]=oe,t[69]=se):se=t[69],se}function vw(e){return e.stopPropagation()}function yw(){let e=(0,$.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Nh,{className:`size-4 text-muted-foreground`,"aria-hidden":!0}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t,(0,Z.jsx)(`h2`,{className:`text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(q,{id:`vQIVHc`})})]}),e[1]=n):n=e[1],n}function bw(e){let t=Math.floor((Date.now()-new Date(e).getTime())/1e3);return t<60?yl._({id:`xOTzt5`}):t<3600?yl._({id:`zbymaY`,values:{0:Math.floor(t/60)}}):t<86400?yl._({id:`optX0N`,values:{0:Math.floor(t/3600)}}):t<86400*7?yl._({id:`l1l8sj`,values:{0:Math.floor(t/86400)}}):new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function xw(e){return(e.split(`/`).pop()??e).replace(/\.md$/,``)}function Sw(e){let t=e.message,n=t.indexOf(`: `),r=n===-1?t:t.slice(0,n),i=n===-1?``:t.slice(n+2);switch(r){case`template-create`:return{Icon:As,label:yl._({id:`QR5SP1`}),detail:xw(i)};case`template-edit`:return{Icon:$s,label:yl._({id:`-LHLx7`}),detail:xw(i)};case`template-delete`:return{Icon:ol,label:yl._({id:`_gkGSK`}),detail:xw(i)};case`template-rename`:case`template-move`:{let[e,t]=i.split(` -> `);return{Icon:fh,label:yl._({id:`KPW5WC`}),detail:`${xw(e??``)} → ${xw(t??i)}`}}case`folder-frontmatter-edit`:return{Icon:Nh,label:yl._({id:`_tekeB`}),detail:``};case`folder-frontmatter-delete`:return{Icon:Nh,label:yl._({id:`ZWxfrc`}),detail:``};case`folder-create`:return{Icon:Nh,label:yl._({id:`ZQLDTl`}),detail:``};default:return{Icon:xc,label:r.replace(/-/g,` `),detail:xw(i)}}}function Cw(e){return e.contributors.length>0?e.contributors[0].name:e.author===`openknowledge-service`||e.author===`server`?yl._({id:`B2DrPb`}):e.author||yl._({id:`Ef7StM`})}function ww(e){let t=(0,$.c)(15),{folderPath:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],t[0]=r):r=t[0];let[i,a]=(0,Q.useState)(r),[o,s]=(0,Q.useState)(!0),[c,l]=(0,Q.useState)(!1),u,d;if(t[1]===n?(u=t[2],d=t[3]):(u=()=>{let e=!1,t=async function(){try{let t=await fetch(`/api/history?folder=${encodeURIComponent(n)}&limit=50`);if(e)return;if(!t.ok){l(!0),s(!1);return}let r=await t.json();if(e)return;a(r.entries??[]),l(!1),s(!1)}catch(t){e||(console.warn(`[FolderTimelineCard] failed to load folder timeline:`,t),l(!0),s(!1))}};s(!0),t();let r=tu(t);return()=>{e=!0,r()}},d=[n],t[1]=n,t[2]=u,t[3]=d),(0,Q.useEffect)(u,d),c||!o&&i.length===0)return null;let f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(`h2`,{className:`text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(q,{id:`XJOV1Y`})}),t[4]=f):f=t[4];let p;t[5]===i.length?p=t[6]:(p=i.length>0?(0,Z.jsx)(vu,{className:`text-xs`,variant:`secondary`,children:i.length}):null,t[5]=i.length,t[6]=p);let m;t[7]===p?m=t[8]:(m=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border px-3 py-1`,children:[f,p]}),t[7]=p,t[8]=m);let h;t[9]!==i||t[10]!==o?(h=(0,Z.jsx)(`div`,{className:`px-3 py-2.5`,children:o?(0,Z.jsxs)(`div`,{className:`space-y-2`,role:`status`,"aria-busy":`true`,children:[(0,Z.jsx)(Bd,{className:`h-8 w-full`}),(0,Z.jsx)(Bd,{className:`h-8 w-full`})]}):(0,Z.jsx)(`ul`,{className:`space-y-1`,children:i.map(Tw)})}),t[9]=i,t[10]=o,t[11]=h):h=t[11];let g;return t[12]!==m||t[13]!==h?(g=(0,Z.jsxs)(`section`,{className:`rounded-lg border bg-card`,"data-testid":`folder-timeline-card`,children:[m,h]}),t[12]=m,t[13]=h,t[14]=g):g=t[14],g}function Tw(e){let{Icon:t,label:n,detail:r}=Sw(e);return(0,Z.jsxs)(`li`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 text-sm`,children:[(0,Z.jsx)(t,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,Z.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[(0,Z.jsx)(`span`,{className:`text-foreground`,children:n}),r?(0,Z.jsx)(`code`,{className:`ml-1.5 font-mono text-xs text-muted-foreground`,children:r}):null]}),(0,Z.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-xs text-muted-foreground`,children:[(0,Z.jsx)(Dg,{className:`size-3`,"aria-hidden":!0}),Cw(e)]}),(0,Z.jsx)(`time`,{className:`shrink-0 text-xs text-muted-foreground/80`,dateTime:e.timestamp,title:new Date(e.timestamp).toLocaleString(),children:bw(e.timestamp)})]},e.sha)}function Ew(e){let t=e.split(`/`).pop();return t?`${e}/${t}`:null}function Dw(e,t){let n=t.get(`${e}/index`);if(n)return n;let r=Ew(e);if(r){let e=t.get(r);if(e)return e}return e.split(`/`).pop()??e}function Ow(e,t,n){let r=n.get(e);return r&&r!==e?r:t}function kw(e,t){let n=e===``?``:`${e}/`,r=[...t.folderPaths].filter(e=>e.startsWith(n)).map(e=>({path:e,rel:e.slice(n.length)})).filter(e=>e.rel.length>0&&!e.rel.includes(`/`)).map(({path:e,rel:n})=>({kind:`folder`,path:e,name:n,title:Dw(e,t.pageTitles)})),i=[...t.pages].filter(e=>e.startsWith(n)).map(e=>({docName:e,rel:e.slice(n.length)})).filter(e=>e.rel.length>0&&!e.rel.includes(`/`)).map(({docName:e,rel:n})=>{let r=t.pageMeta.get(e);return{kind:`file`,path:e,name:n,title:Ow(e,n,t.pageTitles),size:r?.size??0,modified:r?.modified??``}}),a=[...r,...i].sort((e,t)=>e.kind===t.kind?e.title.localeCompare(t.title)||e.name.localeCompare(t.name):e.kind===`folder`?-1:1);return{title:Dw(e,t.pageTitles),children:a}}function Aw(e){let t=(0,$.c)(41),{folderPath:n,state:r,onChange:i,folderConfigHandle:a}=e,[o,s]=(0,Q.useState)(null),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(!1);if(r.status===`idle`||r.status===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsxs)(`section`,{className:`rounded-lg border bg-card px-3 py-2.5 space-y-3`,children:[(0,Z.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,Z.jsx)(`h2`,{className:`text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(q,{id:`-QCLWk`})})}),(0,Z.jsx)(Bd,{className:`h-12 w-full`}),(0,Z.jsx)(Bd,{className:`h-12 w-full`})]}),t[0]=e):e=t[0],e}if(r.status===`error`){let{message:e}=r,n;return t[1]===e?n=t[2]:(n=(0,Z.jsx)(`section`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,role:`alert`,children:(0,Z.jsx)(q,{id:`iDZtvM`,values:{message:e}})}),t[1]=e,t[2]=n),n}let f;t[3]===r.data.folder.templates_available?f=t[4]:(f=r.data.folder.templates_available??[],t[3]=r.data.folder.templates_available,t[4]=f);let p=f,m;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(`h2`,{className:`text-xs font-semibold uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(q,{id:`-QCLWk`})}),t[5]=m):m=t[5];let h;t[6]===p.length?h=t[7]:(h=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m,(0,Z.jsx)(vu,{className:`text-xs`,variant:`secondary`,children:p.length})]}),t[6]=p.length,t[7]=h);let g;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsxs)(Y,{variant:`ghost`,className:`font-mono uppercase`,size:`sm`,onClick:()=>d(!0),children:[(0,Z.jsx)(Ut,{className:`size-3.5`,"aria-hidden":!0}),(0,Z.jsx)(q,{id:`G1Gw0v`})]}),t[8]=g):g=t[8];let _;t[9]===h?_=t[10]:(_=(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-border px-3 py-1`,children:[h,g]}),t[9]=h,t[10]=_);let v;t[11]===p?v=t[12]:(v=(0,Z.jsx)(`div`,{className:`px-3 py-2.5`,children:p.length===0?(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`MZSBsh`})}):(0,Z.jsx)(`ul`,{className:`space-y-1`,children:p.map(e=>(0,Z.jsx)(Ss,{template:e,onCreate:()=>l(e.name),onEdit:()=>mc(et(e.source_folder,e.name)),onDelete:()=>s(e),badge:e.scope===`inherited`?(0,Z.jsx)(xo,{source:e.source_folder,target:`templates/${e.name}.md`}):void 0},e.path))})}),t[11]=p,t[12]=v);let y;t[13]!==_||t[14]!==v?(y=(0,Z.jsxs)(`section`,{className:`rounded-lg border bg-card`,children:[_,v]}),t[13]=_,t[14]=v,t[15]=y):y=t[15];let b;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>{e||s(null)},t[16]=b):b=t[16];let x;t[17]!==o||t[18]!==i?(x=(0,Z.jsx)(ws,{template:o,onOpenChange:b,onDeleted:i}),t[17]=o,t[18]=i,t[19]=x):x=t[19];let S;t[20]===p?S=t[21]:(S=new Set(p.map(jw)),t[20]=p,t[21]=S);let C;t[22]!==n||t[23]!==i?(C=e=>{i(),mc(et(n,e))},t[22]=n,t[23]=i,t[24]=C):C=t[24];let w;t[25]!==n||t[26]!==u||t[27]!==S||t[28]!==C?(w=(0,Z.jsx)(hs,{folderPath:n,existingNames:S,open:u,onOpenChange:d,onCreated:C}),t[25]=n,t[26]=u,t[27]=S,t[28]=C,t[29]=w):w=t[29];let T=c!==null,E;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{e||l(null)},t[30]=E):E=t[30];let D=c??void 0,O;t[31]!==a||t[32]!==n||t[33]!==T||t[34]!==D?(O=(0,Z.jsx)(ev,{open:T,onOpenChange:E,kind:`file`,initialDir:n,initialTemplate:D,folderConfig:a}),t[31]=a,t[32]=n,t[33]=T,t[34]=D,t[35]=O):O=t[35];let k;return t[36]!==w||t[37]!==O||t[38]!==y||t[39]!==x?(k=(0,Z.jsxs)(Z.Fragment,{children:[y,x,w,O]}),t[36]=w,t[37]=O,t[38]=y,t[39]=x,t[40]=k):k=t[40],k}function jw(e){return e.name}function Mw(e){let t=(0,$.c)(14),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,containerClassName:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=J(`relative w-full overflow-x-auto subtle-scrollbar`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=J(`w-full caption-bottom text-sm`,n),t[6]=n,t[7]=o);let s;t[8]!==i||t[9]!==o?(s=(0,Z.jsx)(`table`,{"data-slot":`table`,className:o,...i}),t[8]=i,t[9]=o,t[10]=s):s=t[10];let c;return t[11]!==a||t[12]!==s?(c=(0,Z.jsx)(`div`,{"data-slot":`table-container`,className:a,children:s}),t[11]=a,t[12]=s,t[13]=c):c=t[13],c}function Nw(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`[&_tr]:border-b`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`thead`,{"data-slot":`table-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pw(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`[&_tr:last-child]:border-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`tbody`,{"data-slot":`table-body`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Fw(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,noHover:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(i===void 0?!1:i)&&`hover:bg-transparent`,o;t[4]!==n||t[5]!==a?(o=J(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors`,a,n),t[4]=n,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o?(s=(0,Z.jsx)(`tr`,{"data-slot":`table-row`,className:o,...r}),t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function Iw(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,scope:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`col`:i,o;t[4]===n?o=t[5]:(o=J(`font-mono uppercase text-xs text-muted-foreground h-10 px-4 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,n),t[4]=n,t[5]=o);let s;return t[6]!==r||t[7]!==a||t[8]!==o?(s=(0,Z.jsx)(`th`,{"data-slot":`table-head`,scope:a,className:o,...r}),t[6]=r,t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function Lw(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`py-3 px-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(`td`,{"data-slot":`table-cell`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Rw(e){if(!e)return`—`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return yl._({id:`xOTzt5`});if(r<60)return yl._({id:`NRSLBe`,values:{diffMin:r}});let i=Math.floor(r/60);if(i<24)return yl._({id:`hDKtoF`,values:{diffHrs:i}});let a=Math.floor(i/24);return a<30?yl._({id:`QDZbvN`,values:{diffDays:a}}):t.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}function zw(e,t,n){return[...e].sort((e,r)=>{if(e.kind!==r.kind)return e.kind===`folder`?-1:1;let i=0;switch(t){case`name`:i=e.title.localeCompare(r.title)||e.name.localeCompare(r.name);break;case`modified`:{let t=e.kind===`file`?e.modified:``,n=r.kind===`file`?r.modified:``;i=t.localeCompare(n);break}}return n===`asc`?i:-i})}function Bw(e){let t=(0,$.c)(10),{label:n,sortKey:r,activeKey:i,activeDir:a,onSort:o}=e,s=i===r,c;t[0]!==o||t[1]!==r?(c=()=>o(r),t[0]=o,t[1]=r,t[2]=c):c=t[2];let l;t[3]!==a||t[4]!==s?(l=s?a===`asc`?(0,Z.jsx)(Vn,{className:`ml-1 size-3`}):(0,Z.jsx)(Rn,{className:`ml-1 size-3`}):(0,Z.jsx)(ph,{className:`ml-1 size-3 text-muted-foreground/50`}),t[3]=a,t[4]=s,t[5]=l):l=t[5];let u;return t[6]!==n||t[7]!==c||t[8]!==l?(u=(0,Z.jsxs)(Y,{variant:`ghost`,size:`sm`,className:`-ml-3 h-8 uppercase font-mono`,onClick:c,children:[n,l]}),t[6]=n,t[7]=c,t[8]=l,t[9]=u):u=t[9],u}function Vw(e){let t=(0,$.c)(96),{folderPath:n}=e,{_:r}=ht(),{folderPaths:i,loading:a,pages:o,pageTitles:s,pageMeta:c}=Vo(),l=Os(n),{state:u,refresh:d}=l,[f,p]=(0,Q.useState)(!1),[m,h]=(0,Q.useState)(`name`),[g,_]=(0,Q.useState)(`asc`);if(a){let e;t[0]===r?e=t[1]:(e=r({id:`X9VpsP`}),t[0]=r,t[1]=e);let n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(Bd,{className:`size-5 rounded`}),(0,Z.jsx)(Bd,{className:`h-7 w-48`})]}),(0,Z.jsx)(Bd,{className:`h-9 w-20 rounded-md`})]}),t[2]=n):n=t[2];let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(Bd,{className:`h-4 w-16`}),t[3]=i):i=t[3];let a;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsxs)(`div`,{className:`mx-auto flex w-full max-w-4xl flex-col gap-6 px-6 py-8`,children:[n,(0,Z.jsxs)(`div`,{className:`rounded-lg border`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-4 border-b px-4 py-3`,children:[i,(0,Z.jsx)(`div`,{className:`ml-auto`,children:(0,Z.jsx)(Bd,{className:`h-4 w-20`})})]}),[`a`,`b`,`c`,`d`].map(Ww)]})]}),t[4]=a):a=t[4];let o;return t[5]===e?o=t[6]:(o=(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 items-start overflow-y-auto subtle-scrollbar`,role:`status`,"aria-busy":`true`,"aria-label":e,children:a}),t[5]=e,t[6]=o),o}let v,y,b,x,S,C,w,T,E,D,O;if(t[7]!==r||t[8]!==u||t[9]!==l||t[10]!==n||t[11]!==i||t[12]!==c||t[13]!==s||t[14]!==o||t[15]!==d||t[16]!==g||t[17]!==m){let e=kw(n,{pages:o,pageTitles:s,pageMeta:c,folderPaths:i}),a=zw(e.children,m,g),f=e.title||(n===``?r({id:`3aeN7X`}):e.title),k;t[29]===m?k=t[30]:(k=function(e){e===m?_(Uw):(h(e),_(`asc`))},t[29]=m,t[30]=k);let A=k;O=`flex min-h-0 flex-1 items-start overflow-y-auto subtle-scrollbar`,C=`mx-auto flex w-full max-w-4xl flex-col gap-6 px-6 py-8`;let j;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Z.jsx)(dc,{className:`size-5 text-muted-foreground`}),t[31]=j):j=t[31];let M=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[j,(0,Z.jsx)(`h1`,{className:`text-2xl font-light tracking-tight`,children:f})]}),N;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Z.jsxs)(Y,{onClick:()=>p(!0),children:[(0,Z.jsx)(Ut,{className:`size-4`}),(0,Z.jsx)(q,{id:`isRobC`})]}),t[32]=N):N=t[32],t[33]===M?w=t[34]:(w=(0,Z.jsx)(`div`,{className:`flex flex-col gap-6`,children:(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[M,N]})}),t[33]=M,t[34]=w),t[35]!==u||t[36]!==n||t[37]!==d?(T=(0,Z.jsx)(_w,{folderPath:n,state:u,onChange:d}),t[35]=u,t[36]=n,t[37]=d,t[38]=T):T=t[38],t[39]!==u||t[40]!==l||t[41]!==n||t[42]!==d?(E=(0,Z.jsx)(Aw,{folderPath:n,state:u,onChange:d,folderConfigHandle:l}),t[39]=u,t[40]=l,t[41]=n,t[42]=d,t[43]=E):E=t[43],t[44]===n?D=t[45]:(D=(0,Z.jsx)(ww,{folderPath:n}),t[44]=n,t[45]=D),S=`rounded-lg border`,y=Mw;let P=m===`name`?g===`asc`?`ascending`:`descending`:`none`,F;t[46]===r?F=t[47]:(F=r({id:`6YtxFj`}),t[46]=r,t[47]=F);let I;t[48]!==A||t[49]!==g||t[50]!==m||t[51]!==F?(I=(0,Z.jsx)(Bw,{label:F,sortKey:`name`,activeKey:m,activeDir:g,onSort:A}),t[48]=A,t[49]=g,t[50]=m,t[51]=F,t[52]=I):I=t[52];let L;t[53]!==P||t[54]!==I?(L=(0,Z.jsx)(Iw,{"aria-sort":P,children:I}),t[53]=P,t[54]=I,t[55]=L):L=t[55];let R=m===`modified`?g===`asc`?`ascending`:`descending`:`none`,z;t[56]===r?z=t[57]:(z=r({id:`tgWuMB`}),t[56]=r,t[57]=z);let B;t[58]!==A||t[59]!==g||t[60]!==m||t[61]!==z?(B=(0,Z.jsx)(Bw,{label:z,sortKey:`modified`,activeKey:m,activeDir:g,onSort:A}),t[58]=A,t[59]=g,t[60]=m,t[61]=z,t[62]=B):B=t[62];let V;t[63]!==R||t[64]!==B?(V=(0,Z.jsx)(Iw,{className:`w-32`,"aria-sort":R,children:B}),t[63]=R,t[64]=B,t[65]=V):V=t[65],t[66]!==L||t[67]!==V?(x=(0,Z.jsx)(Nw,{children:(0,Z.jsxs)(Fw,{children:[L,V]})}),t[66]=L,t[67]=V,t[68]=x):x=t[68],v=Pw,b=a.length?a.map(Hw):(0,Z.jsx)(Fw,{children:(0,Z.jsx)(Lw,{colSpan:2,className:`h-24 text-center text-muted-foreground`,children:(0,Z.jsx)(q,{id:`Pkw7J9`})})}),t[7]=r,t[8]=u,t[9]=l,t[10]=n,t[11]=i,t[12]=c,t[13]=s,t[14]=o,t[15]=d,t[16]=g,t[17]=m,t[18]=v,t[19]=y,t[20]=b,t[21]=x,t[22]=S,t[23]=C,t[24]=w,t[25]=T,t[26]=E,t[27]=D,t[28]=O}else v=t[18],y=t[19],b=t[20],x=t[21],S=t[22],C=t[23],w=t[24],T=t[25],E=t[26],D=t[27],O=t[28];let k;t[69]!==v||t[70]!==b?(k=(0,Z.jsx)(v,{children:b}),t[69]=v,t[70]=b,t[71]=k):k=t[71];let A;t[72]!==y||t[73]!==k||t[74]!==x?(A=(0,Z.jsxs)(y,{children:[x,k]}),t[72]=y,t[73]=k,t[74]=x,t[75]=A):A=t[75];let j;t[76]!==A||t[77]!==S?(j=(0,Z.jsx)(`div`,{className:S,children:A}),t[76]=A,t[77]=S,t[78]=j):j=t[78];let M;t[79]!==j||t[80]!==C||t[81]!==w||t[82]!==T||t[83]!==E||t[84]!==D?(M=(0,Z.jsxs)(`div`,{className:C,children:[w,T,E,D,j]}),t[79]=j,t[80]=C,t[81]=w,t[82]=T,t[83]=E,t[84]=D,t[85]=M):M=t[85];let N;t[86]!==M||t[87]!==O?(N=(0,Z.jsx)(`div`,{className:O,children:M}),t[86]=M,t[87]=O,t[88]=N):N=t[88];let P;t[89]!==f||t[90]!==l||t[91]!==n?(P=(0,Z.jsx)(ev,{open:f,onOpenChange:p,kind:`file`,initialDir:n,folderConfig:l,suggestedName:`index`}),t[89]=f,t[90]=l,t[91]=n,t[92]=P):P=t[92];let F;return t[93]!==N||t[94]!==P?(F=(0,Z.jsxs)(Z.Fragment,{children:[N,P]}),t[93]=N,t[94]=P,t[95]=F):F=t[95],F}function Hw(e){return(0,Z.jsxs)(Fw,{children:[(0,Z.jsx)(Lw,{children:(0,Z.jsxs)(`a`,{href:hu(e.path),className:`flex items-center gap-2 rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[e.kind===`folder`?(0,Z.jsx)(Fh,{className:`size-4 shrink-0 text-muted-foreground`}):(0,Z.jsx)(de,{className:`size-4 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.title})]})}),(0,Z.jsx)(Lw,{className:`text-muted-foreground`,children:e.kind===`file`?Rw(e.modified):`—`})]},e.path)}function Uw(e){return e===`asc`?`desc`:`asc`}function Ww(e){return(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 border-b px-4 py-3 last:border-b-0`,children:[(0,Z.jsx)(Bd,{className:`size-4 rounded`}),(0,Z.jsx)(Bd,{className:`h-4 w-40`}),(0,Z.jsx)(`div`,{className:`ml-auto`,children:(0,Z.jsx)(Bd,{className:`h-4 w-16`})})]},e)}function Gw(e){let t=(0,$.c)(24),{docName:n,size:r,limit:i,backNav:a}=e,o=a!==void 0,s=(0,Q.useRef)(null),c=(0,Q.useRef)(null),l,u;t[0]===o?(l=t[1],u=t[2]):(l=()=>{o?s.current?.focus():c.current?.focus()},u=[o],t[0]=o,t[1]=l,t[2]=u),(0,Q.useEffect)(l,u);let d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(`div`,{className:`flex size-16 items-center justify-center rounded-full border bg-muted/40 text-muted-foreground`,children:(0,Z.jsx)(kh,{className:`size-9`,"aria-hidden":`true`})}),t[3]=d):d=t[3];let f=o?void 0:-1,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(q,{id:`P3hnm0`}),t[4]=p):p=t[4];let m;t[5]===f?m=t[6]:(m=(0,Z.jsx)(`h2`,{ref:c,id:`large-file-title`,tabIndex:f,className:`text-2xl font-light text-balance outline-none`,children:p}),t[5]=f,t[6]=m);let h;t[7]===r?h=t[8]:(h=gi(r),t[7]=r,t[8]=h);let g;t[9]===i?g=t[10]:(g=gi(i),t[9]=i,t[10]=g);let _;t[11]!==n||t[12]!==h||t[13]!==g?(_=(0,Z.jsx)(`p`,{className:`max-w-md text-sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`GJH-AT`,values:{0:h,1:g,docName:n}})}),t[11]=n,t[12]=h,t[13]=g,t[14]=_):_=t[14];let v;t[15]!==m||t[16]!==_?(v=(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[m,_]}),t[15]=m,t[16]=_,t[17]=v):v=t[17];let y;t[18]!==a||t[19]!==o?(y=o?(0,Z.jsxs)(Y,{ref:s,variant:`default`,onClick:()=>a.onNavigateBack(a.previousDocName),children:[(0,Z.jsx)(Fn,{className:`size-4`,"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`CKyk7Q`})]}):null,t[18]=a,t[19]=o,t[20]=y):y=t[20];let b;return t[21]!==v||t[22]!==y?(b=(0,Z.jsxs)(`div`,{role:`status`,"aria-labelledby":`large-file-title`,"data-slot":`large-file-editor-state`,className:`flex h-full flex-col items-center justify-center gap-8 p-8 text-center`,children:[d,v,y]}),t[21]=v,t[22]=y,t[23]=b):b=t[23],b}function Kw(e){let t=(0,$.c)(8),{docName:n}=e,[r,i]=(0,Q.useState)(qw),a,o;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>Se(e=>{i(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})}),o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o),!r.has(n))return null;let s;t[2]===n?s=t[3]:(s=function(){Fe(n)?.abort(),i(e=>{if(!e.has(n))return e;let t=new Set(e);return t.delete(n),t})},t[2]=n,t[3]=s);let c=s,l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`A67Uwj`})}),t[4]=l):l=t[4];let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(q,{id:`dEgA5A`}),t[5]=u):u=t[5];let d;return t[6]===c?d=t[7]:(d=(0,Z.jsxs)(`div`,{className:`absolute inset-x-0 bottom-8 z-20 flex justify-center text-xs text-muted-foreground`,children:[l,(0,Z.jsx)(Y,{variant:`link`,size:`sm`,className:`h-auto px-2 py-0 text-xs`,onClick:c,children:u})]}),t[6]=c,t[7]=d),d}function qw(){return new Set}function Jw(e){let t=(0,$.c)(20),{nav:n}=e,{state:r,refetch:i}=ic(n),a=(0,Q.useRef)(null),o=n.branch,s,c;t[0]===r.phase?(s=t[1],c=t[2]):(s=()=>{r.phase===`resolved`&&a.current?.querySelector(`button`)?.focus()},c=[r.phase],t[0]=r.phase,t[1]=s,t[2]=c),(0,Q.useEffect)(s,c);let l;t[3]===n.path?l=t[4]:(l=function(){window.location.hash=su(ac(n.path))},t[3]=n.path,t[4]=l);let u=l,d;t[5]!==o||t[6]!==n.kind?(d=function(e){oc.arm({kind:n.kind,path:e,branch:o}),window.location.hash=n.kind===`folder`?su(e):hu(e)},t[5]=o,t[6]=n.kind,t[7]=d):d=t[7];let f=d,p=r.phase===`pending`?`polite`:void 0,m=r.phase===`resolved`?r.resolution.verdict:void 0,h=r.phase===`pending`?`flex h-full flex-col items-center justify-center gap-3 p-8 text-center text-sm text-muted-foreground`:`flex h-full flex-col items-center justify-center gap-6 p-8 text-center`,g;t[8]!==u||t[9]!==n||t[10]!==f||t[11]!==i||t[12]!==r?(g=(0,Z.jsx)(cc,{nav:n,state:r,onBrowseFolder:u,onOpenRenamed:f,onEnableAutoSync:u,onSyncCompleted:i,onPullApplied:i}),t[8]=u,t[9]=n,t[10]=f,t[11]=i,t[12]=r,t[13]=g):g=t[13];let _;return t[14]!==r.phase||t[15]!==p||t[16]!==m||t[17]!==h||t[18]!==g?(_=(0,Z.jsx)(`div`,{ref:a,role:`status`,"aria-live":p,"data-testid":`share-receive-miss-panel`,"data-phase":r.phase,"data-verdict":m,className:h,children:g}),t[14]=r.phase,t[15]=p,t[16]=m,t[17]=h,t[18]=g,t[19]=_):_=t[19],_}var Yw=e(Rt(),1);function Xw(e){let t=(0,$.c)(9),{text:n}=e,r;t[0]===n?r=t[1]:(r=na(n),t[0]=n,t[1]=r);let{map:i}=r,a,o;if(t[2]!==i||t[3]!==n){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e=Ei(n),r=e.length>0?e:Object.keys(i);if(r.length===0){o=null;break bb0}let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(q,{id:`l_UFPv`}),t[6]=s):s=t[6];let c;t[7]===i?c=t[8]:(c=(e,t)=>{let n=i[e];return n===void 0?null:(0,Z.jsx)(Zw,{keyName:e,value:n},`${e}-${t}`)},t[7]=i,t[8]=c),a=(0,Z.jsx)(Ao,{title:s,count:r.length,testId:`readonly-property-panel`,className:`pt-4`,children:r.map(c)})}t[2]=i,t[3]=n,t[4]=a,t[5]=o}else a=t[4],o=t[5];return o===Symbol.for(`react.early_return_sentinel`)?a:o}function Zw(e){let t=(0,$.c)(12),{keyName:n,value:r}=e,i=So[Za(r)],a;t[0]===i?a=t[1]:(a=(0,Z.jsx)(`span`,{"aria-hidden":!0,className:`flex size-7 shrink-0 items-center justify-center rounded text-muted-foreground`,children:(0,Z.jsx)(i,{className:`size-3.5`})}),t[0]=i,t[1]=a);let o;t[2]===n?o=t[3]:(o=(0,Z.jsx)(`span`,{className:`flex h-7 w-32 shrink-0 items-center truncate px-2 text-sm text-muted-foreground`,children:n}),t[2]=n,t[3]=o);let s;t[4]!==n||t[5]!==r?(s=(0,Z.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,Z.jsx)(Qw,{keyName:n,value:r})}),t[4]=n,t[5]=r,t[6]=s):s=t[6];let c;return t[7]!==n||t[8]!==a||t[9]!==o||t[10]!==s?(c=(0,Z.jsxs)(`div`,{className:`group flex items-start gap-1 py-0.5`,"data-testid":`readonly-property-row`,"data-key":n,children:[a,o,s]}),t[7]=n,t[8]=a,t[9]=o,t[10]=s,t[11]=c):c=t[11],c}function Qw(e){let t=(0,$.c)(8),{keyName:n,value:r}=e;if(ko(r)){let e;return t[0]!==n||t[1]!==r?(e=(0,Z.jsx)(To,{keyName:n,value:r}),t[0]=n,t[1]=r,t[2]=e):e=t[2],e}let i;t[3]===r?i=t[4]:(i=Array.isArray(r)?r.filter($w).join(`, `):String(r),t[3]=r,t[4]=i);let a=i,o;return t[5]!==a||t[6]!==n?(o=(0,Z.jsx)(`div`,{className:`flex min-h-7 items-center px-2 py-1 text-sm break-words`,"data-testid":`readonly-property-value`,"data-key":n,children:a}),t[5]=a,t[6]=n,t[7]=o):o=t[7],o}function $w(e){return typeof e==`string`}function eT(e){let t=(0,$.c)(29),{fileName:n,text:r}=e,i,a,o,s;if(t[0]!==r){let e=ba(r).body;s=In,i=Ue,a=!1,o=zn().parseWithFallback(e),t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s}else i=t[1],a=t[2],o=t[3],s=t[4];let c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c={attributes:{class:`pt-4`}},t[5]=c):c=t[5];let l;t[6]!==i||t[7]!==a||t[8]!==o?(l={extensions:i,editable:a,content:o,editorProps:c},t[6]=i,t[7]=a,t[8]=o,t[9]=l):l=t[9];let u;t[10]===r?u=t[11]:(u=[r],t[10]=r,t[11]=u);let d=s(l,u),[f]=(0,Q.useState)(tT),p=(0,Q.useRef)(null),m,h;t[12]===f?(m=t[13],h=t[14]):(m=()=>{let e=p.current;if(e)return e.appendChild(f),()=>{f.parentNode===e&&e.removeChild(f)}},h=[f],t[12]=f,t[13]=m,t[14]=h),(0,Q.useLayoutEffect)(m,h);let g;t[15]===r?g=t[16]:(g=(0,Z.jsx)(Xw,{text:r}),t[15]=r,t[16]=g);let _;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(`div`,{className:`tiptap-editor`,children:(0,Z.jsx)(`div`,{ref:p,style:{display:`contents`}})}),t[17]=_):_=t[17];let v;t[18]===g?v=t[19]:(v=(0,Z.jsxs)(`div`,{className:`editor-doc-scroll min-h-0 flex-1 overflow-auto`,children:[g,_]}),t[18]=g,t[19]=v);let y;t[20]===d?y=t[21]:(y=(0,Z.jsx)(Un,{editor:d,className:`tiptap-editor-portal-content h-full`}),t[20]=d,t[21]=y);let b;t[22]!==f||t[23]!==y?(b=(0,Yw.createPortal)(y,f),t[22]=f,t[23]=y,t[24]=b):b=t[24];let x;return t[25]!==n||t[26]!==v||t[27]!==b?(x=(0,Z.jsxs)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":n,"data-skill-markdown-viewer":``,"data-skill-markdown-viewer-state":`loaded`,children:[v,b]}),t[25]=n,t[26]=v,t[27]=b,t[28]=x):x=t[28],x}function tT(){let e=document.createElement(`div`);return e.style.display=`contents`,e}var nT=`data-skill-markdown`;function rT(e){let t=(0,$.c)(12),{scope:n,name:r,path:i,fileName:a}=e,o;t[0]!==r||t[1]!==i||t[2]!==n?(o={loadText:e=>vf({scope:n,name:r,path:i},e)},t[0]=r,t[1]=i,t[2]=n,t[3]=o):o=t[3];let s=Qd(o);if(s.status===`loading`){let e;return t[4]===a?e=t[5]:(e=(0,Z.jsx)(Yd,{fileName:a,dataAttr:nT}),t[4]=a,t[5]=e),e}if(s.status===`error`){let e;return t[6]!==s.message||t[7]!==a?(e=(0,Z.jsx)(Xd,{fileName:a,dataAttr:nT,message:s.message}),t[6]=s.message,t[7]=a,t[8]=e):e=t[8],e}let c;return t[9]!==s.content||t[10]!==a?(c=(0,Z.jsx)(eT,{fileName:a,text:s.content}),t[9]=s.content,t[10]=a,t[11]=c):c=t[11],c}var iT=new Set([`md`,`mdx`]);function aT(e){let t=(0,$.c)(19),{scope:n,name:r,path:i}=e,a;t[0]===i?a=t[1]:(a=i.split(`/`).pop()??i,t[0]=i,t[1]=a);let o=a,s=o.lastIndexOf(`.`),c,l;if(t[2]!==s||t[3]!==o?(c=s>=0?o.slice(s+1).toLowerCase():``,l=iT.has(c),t[2]=s,t[3]=o,t[4]=c,t[5]=l):(c=t[4],l=t[5]),l){let e;return t[6]!==o||t[7]!==r||t[8]!==i||t[9]!==n?(e=(0,Z.jsx)(rT,{scope:n,name:r,path:i,fileName:o}),t[6]=o,t[7]=r,t[8]=i,t[9]=n,t[10]=e):e=t[10],e}let u;t[11]!==r||t[12]!==i||t[13]!==n?(u=e=>vf({scope:n,name:r,path:i},e),t[11]=r,t[12]=i,t[13]=n,t[14]=u):u=t[14];let d;return t[15]!==c||t[16]!==o||t[17]!==u?(d=(0,Z.jsx)($d,{fileName:o,extension:c,loadText:u}),t[15]=c,t[16]=o,t[17]=u,t[18]=d):d=t[18],d}function oT(e){let t=null,n=()=>(t===null&&(t=e(),t.catch(()=>{})),t),r=(0,Q.lazy)(n);return r.preload=n,r}var sT=oT(()=>n(()=>import(`./SettingsDialogBody-BceO9KUZ.js`).then(e=>({default:e.SettingsDialogBody})),__vite__mapDeps([105,1,106,19,12,6,2,3,7,8,9,75,59,22,11,76,77,78,10,79,14,15,16,17,18,40,24,28,20,21,80,13,81,23,25,26,107,108,41,87,109,82,110,91,111,39,42,63,64,65,66,67,68,69,70,71,72,73,74,38,4,83,84,85,31,52,53,54,35,56,86,27,29,51,55,57,58,88,89,90,30,92,93,94,95,32,33,96,97,112,50,113,100,114,115,116,101,117,36,118,119,120,121,122,123,34,124,125,126,127,128,129,130,131,132]),import.meta.url));function cT(e){let t=(0,$.c)(9),{error:n}=e,{_:r}=ht(),i;t[0]!==r||t[1]!==n?(i=n instanceof Error&&/dynamically imported module|Failed to fetch/i.test(n.message)?r({id:`Y8ViJx`}):r({id:`3h5zMp`}),t[0]=r,t[1]=n,t[2]=i):i=t[2];let a=i,o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(`h3`,{id:`settings-body-error-title`,className:`font-heading text-base leading-none font-medium`,children:(0,Z.jsx)(q,{id:`hwFOFD`})}),t[3]=o):o=t[3];let s;t[4]===a?s=t[5]:(s=(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[o,(0,Z.jsx)(`p`,{className:`max-w-xs text-sm text-muted-foreground`,children:a})]}),t[4]=a,t[5]=s);let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(Y,{variant:`default`,onClick:lT,children:(0,Z.jsx)(q,{id:`HpK_8d`})}),t[6]=c):c=t[6];let l;return t[7]===s?l=t[8]:(l=(0,Z.jsxs)(`div`,{role:`alert`,"aria-labelledby":`settings-body-error-title`,"data-slot":`settings-body-error-boundary`,className:`flex h-full flex-col items-center justify-center gap-5 p-8 text-center`,children:[s,c]}),t[7]=s,t[8]=l),l}function lT(){return window.location.reload()}function uT(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(Jt,{fallbackRender:fT,onError:dT,children:n}),t[0]=n,t[1]=r),r}function dT(e,t){console.error(`[SettingsDialogErrorBoundary] rendered fallback for Settings body`,e,t.componentStack)}function fT(e){return(0,Z.jsx)(cT,{...e})}function pT(e=typeof window>`u`?void 0:window.location){return e?.protocol===`file:`}function mT(e){let{groups:t,translate:n}=e,r=[],i=new Set;for(let e of t)if(e.enabled)for(let t of e.items)i.add(t.id),r.push({id:`section:${t.id}`,kind:`section`,sectionId:t.id,label:t.label,keywords:[e.label]});for(let e of Ps)if(i.has(e.sectionId))for(let t of e.fields){let i=t.path.join(`.`);r.push({id:`field:${e.sectionId}:${i}`,kind:`field`,sectionId:e.sectionId,label:n(t.label),keywords:t.description?[n(t.description)]:[],targetField:i})}if(i.has(`plugin:markdownlint`))for(let e of Xa)r.push({id:`rule:${e.id}`,kind:`rule`,sectionId:`plugin:markdownlint`,label:e.name,keywords:[e.id,e.alias,...e.aliases],ruleId:e.id});return r}function hT(e){return`https://github.com/inkeep/open-knowledge/releases/tag/v${encodeURIComponent(e)}`}function gT(e){let t=(0,$.c)(43),{open:n,initialSection:r,onOpenChange:i}=e,a=r===void 0?null:r,{_:o}=ht(),{collabUrl:s}=Re(),{userBinding:c,userSynced:l,okignoreBinding:u,okignoreSynced:d,projectConfig:f,merged:p}=Qu(),{desktopPresent:m}=xs(),[h,g]=(0,Q.useState)(a??`preferences`),[_,v]=(0,Q.useState)(``),[y,b]=(0,Q.useState)(null),[x,S]=(0,Q.useState)(null),C=(0,Q.useRef)(0),w=(0,Q.useRef)(null),T,E;t[0]!==a||t[1]!==n?(T=()=>{n&&(g(a??`preferences`),v(``))},E=[n,a],t[0]=a,t[1]=n,t[2]=T,t[3]=E):(T=t[2],E=t[3]),(0,Q.useEffect)(T,E);let D,O;t[4]===y?(D=t[5],O=t[6]):(D=()=>{if(!y)return;let e=w.current;if(!e)return;let t=null,n=null,r=null,i=null,a=()=>{let r=e.querySelector(`[data-field="${y.path}"]`);return r?(r.scrollIntoView({block:`center`}),r.classList.add(`animate-settings-nav-flash`),t=r,n=setTimeout(()=>r.classList.remove(`animate-settings-nav-flash`),750),!0):!1};return a()||(i=new MutationObserver(()=>{a()&&i?.disconnect()}),i.observe(e,{childList:!0,subtree:!0}),r=setTimeout(()=>i?.disconnect(),4e3)),()=>{i?.disconnect(),n&&clearTimeout(n),r&&clearTimeout(r),t?.classList.remove(`animate-settings-nav-flash`)}},O=[y],t[4]=y,t[5]=D,t[6]=O),(0,Q.useEffect)(D,O);let k=s!==null,A=typeof window<`u`&&window.okDesktop!=null,j=A&&window.okDesktop?.config.ptyAvailable===!0,M,N;if(t[7]!==o||t[8]!==m||t[9]!==k||t[10]!==p?.appearance?.colorThemeEnabled||t[11]!==f?.contentRules){let e;t[14]===f?.contentRules?e=t[15]:(e=e=>f?.contentRules?.[e.id]?.enabled===!0,t[14]=f?.contentRules,t[15]=e);let n=zd.filter(e).map(_T),r=p?.appearance?.colorThemeEnabled!==!1,i=pT();M=[{id:`user`,label:o({id:`7PzzBU`}),enabled:!0,items:[{id:`preferences`,label:o({id:`Q6hhn8`})},{id:`configure-agents`,label:o({id:`jRAGrQ`})},{id:`hotkeys`,label:o({id:`4KmEoC`})},{id:`account`,label:o({id:`AeXO77`})},{id:`user-plugins-manage`,label:o({id:`ohUJJM`})},...A?[{id:`ai-tools`,label:o({id:`_5qBNl`})}]:[]]},{id:`project`,label:o({id:`ZWyHmq`}),enabled:k,items:[{id:`sync`,label:o({id:`Nu4DdT`})},{id:`search`,label:o({id:`A1taO8`})},{id:`plugins-manage`,label:o({id:`ohUJJM`})},{id:`content-rules`,label:o({id:`OPOiKn`})},...i?[]:[{id:`link-previews`,label:o({id:`gh27t1`})}],...j?[{id:`terminal`,label:o({id:`ALhMYW`})}]:[],...A?[{id:`project-ai-tools`,label:o({id:`crqzW5`})}]:[],{id:`project-templates`,label:o({id:`iTylMl`})},{id:`skills`,label:o({id:`PCSkw2`})},{id:`okignore`,label:o({id:`3zyg_A`})},{id:`sharing`,label:o({id:`cs4mps`})}]},{id:`plugins`,label:o({id:`ohUJJM`}),enabled:!0,items:[...k?n:[],...r?[{id:`plugin:theme`,label:o({id:`fJ3EbT`})}]:[]]},{id:`integrations`,label:o({id:`nbfdhU`}),enabled:!0,items:[]}],N=mT({groups:M,translate:o}),t[7]=o,t[8]=m,t[9]=k,t[10]=p?.appearance?.colorThemeEnabled,t[11]=f?.contentRules,t[12]=M,t[13]=N}else M=t[12],N=t[13];let P=N,F;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(F=function(e){C.current+=1;let t=C.current;g(e.sectionId),e.kind===`field`&&e.targetField?b({path:e.targetField}):e.kind===`rule`&&e.ruleId&&S({query:e.ruleId,nonce:t}),v(``)},t[16]=F):F=t[16];let I=F,L;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsx)(pn,{className:`sr-only`,children:(0,Z.jsx)(q,{id:`Tz0i8g`})}),t[17]=L):L=t[17];let R;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Z.jsx)(fn,{className:`sr-only`,children:(0,Z.jsx)(q,{id:`RDrXh4`})}),t[18]=R):R=t[18];let z;t[19]!==h||t[20]!==M||t[21]!==P||t[22]!==_?(z=(0,Z.jsx)(vT,{groups:M,activeId:h,onSelect:g,entries:P,searchQuery:_,onSearchChange:v,onNavigate:I}),t[19]=h,t[20]=M,t[21]=P,t[22]=_,t[23]=z):z=t[23];let B;t[24]===o?B=t[25]:(B=o({id:`OXb_Df`}),t[24]=o,t[25]=B);let V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,Z.jsx)(ET,{}),t[26]=V):V=t[26];let H=l?c:null,U;t[27]!==h||t[28]!==u||t[29]!==d||t[30]!==x||t[31]!==H?(U=(0,Z.jsx)(uT,{children:(0,Z.jsx)(Q.Suspense,{fallback:V,children:(0,Z.jsx)(sT,{activeId:h,userBinding:H,okignoreBinding:u,okignoreSynced:d,markdownlintRuleQuery:x})})}),t[27]=h,t[28]=u,t[29]=d,t[30]=x,t[31]=H,t[32]=U):U=t[32];let W;t[33]!==B||t[34]!==U?(W=(0,Z.jsx)(`section`,{ref:w,"aria-label":B,className:`min-h-0 flex-1 overflow-y-auto overscroll-contain subtle-scrollbar p-6`,tabIndex:0,children:U}),t[33]=B,t[34]=U,t[35]=W):W=t[35];let G;t[36]!==z||t[37]!==W?(G=(0,Z.jsxs)(mn,{className:`flex h-[700px] max-h-[calc(100dvh-4rem)] w-[900px] max-w-[calc(100%-2rem)] flex-col gap-0 overflow-hidden p-0 sm:grid sm:grid-cols-[220px_1fr] sm:max-w-[min(900px,calc(100%-2rem))]`,"data-testid":`settings-dialog`,children:[L,R,z,W]}),t[36]=z,t[37]=W,t[38]=G):G=t[38];let K;return t[39]!==i||t[40]!==n||t[41]!==G?(K=(0,Z.jsx)(vn,{open:n,onOpenChange:i,children:G}),t[39]=i,t[40]=n,t[41]=G,t[42]=K):K=t[42],K}function _T(e){return{id:`plugin:${e.id}`,label:e.label}}function vT(e){let t=(0,$.c)(46),{groups:n,activeId:r,onSelect:i,entries:a,searchQuery:o,onSearchChange:c,onNavigate:l}=e,{_:u}=ht(),d,f,p,m,h,g,_,v,y,b;if(t[0]!==u||t[1]!==a||t[2]!==l||t[3]!==c||t[4]!==o){f=o.trim();let e=f===``?[]:a.filter(e=>P_(e.label,f,e.keywords)),n=e.filter(xT),r=e.filter(bT),i=e.filter(yT);t[15]===u?y=t[16]:(y=u({id:`y1t8bQ`}),t[15]=u,t[16]=y),b=`flex shrink-0 gap-x-3 overflow-x-auto overscroll-contain subtle-scrollbar scroll-fade-mask-x-max-sm border-b bg-muted/30 px-3 py-2 max-sm:pt-10 sm:h-full sm:min-h-0 sm:flex-col sm:gap-0 sm:overflow-x-visible sm:border-r sm:border-b-0 sm:py-4`,d=N,p=!1,m=`h-auto w-full shrink-0 bg-transparent sm:mb-3 [&_[data-slot=command-input-wrapper]]:h-9 [&_[data-slot=command-input-wrapper]]:rounded-lg [&_[data-slot=command-input-wrapper]]:border [&_[data-slot=command-input-wrapper]]:border-input`,h=`settings-search`;let x;t[17]===u?x=t[18]:(x=u({id:`1DahsC`}),t[17]=u,t[18]=x),t[19]!==c||t[20]!==o||t[21]!==x?(g=(0,Z.jsx)(k,{value:o,onValueChange:c,placeholder:x,className:`py-0`,"data-testid":`settings-search-input`}),t[19]=c,t[20]=o,t[21]=x,t[22]=g):g=t[22];let S=f===``?null:(0,Z.jsx)(q,{id:`TQJCR6`,values:{0:e.length}});t[23]===S?_=t[24]:(_=(0,Z.jsx)(`span`,{"aria-live":`polite`,className:`sr-only`,"data-testid":`settings-search-result-count`,children:S}),t[23]=S,t[24]=_),v=f===``?null:(0,Z.jsxs)(F,{"data-testid":`settings-search-results`,className:`mt-1.5`,children:[(0,Z.jsx)(s,{"data-testid":`settings-search-empty`,children:(0,Z.jsx)(q,{id:`ljFWEt`})}),n.length>0?(0,Z.jsx)(Ae,{heading:u({id:`R4OWFD`}),children:n.map(e=>(0,Z.jsx)(ST,{entry:e,query:f,onNavigate:l},e.id))}):null,r.length>0?(0,Z.jsx)(Ae,{heading:u({id:`Tz0i8g`}),children:r.map(e=>(0,Z.jsx)(ST,{entry:e,query:f,onNavigate:l},e.id))}):null,i.length>0?(0,Z.jsx)(Ae,{heading:u({id:`v2a04T`}),children:i.map(e=>(0,Z.jsx)(ST,{entry:e,query:f,onNavigate:l},e.id))}):null]}),t[0]=u,t[1]=a,t[2]=l,t[3]=c,t[4]=o,t[5]=d,t[6]=f,t[7]=p,t[8]=m,t[9]=h,t[10]=g,t[11]=_,t[12]=v,t[13]=y,t[14]=b}else d=t[5],f=t[6],p=t[7],m=t[8],h=t[9],g=t[10],_=t[11],v=t[12],y=t[13],b=t[14];let x;t[25]!==d||t[26]!==p||t[27]!==m||t[28]!==h||t[29]!==g||t[30]!==_||t[31]!==v?(x=(0,Z.jsxs)(d,{shouldFilter:p,className:m,"data-testid":h,children:[g,_,v]}),t[25]=d,t[26]=p,t[27]=m,t[28]=h,t[29]=g,t[30]=_,t[31]=v,t[32]=x):x=t[32];let S;t[33]!==r||t[34]!==n||t[35]!==i||t[36]!==f?(S=f===``?n.map(e=>(0,Z.jsx)(TT,{group:e,activeId:r,onSelect:i},e.id)):null,t[33]=r,t[34]=n,t[35]=i,t[36]=f,t[37]=S):S=t[37];let C;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(wT,{}),t[38]=C):C=t[38];let w;t[39]===S?w=t[40]:(w=(0,Z.jsxs)(`div`,{className:`contents subtle-scrollbar sm:flex sm:min-h-0 sm:flex-1 sm:flex-col sm:overflow-y-auto sm:overscroll-contain`,children:[S,C]}),t[39]=S,t[40]=w);let T;return t[41]!==w||t[42]!==y||t[43]!==b||t[44]!==x?(T=(0,Z.jsxs)(`nav`,{"aria-label":y,className:b,children:[x,w]}),t[41]=w,t[42]=y,t[43]=b,t[44]=x,t[45]=T):T=t[45],T}function yT(e){return e.kind===`rule`}function bT(e){return e.kind===`field`}function xT(e){return e.kind===`section`}function ST(e){let t=(0,$.c)(13),{entry:n,query:r,onNavigate:i}=e,a=n.id,o;t[0]!==n||t[1]!==i?(o=()=>i(n),t[0]=n,t[1]=i,t[2]=o):o=t[2];let s=`settings-search-result-${n.id}`,c;t[3]!==n.label||t[4]!==r?(c=j_(n.label,r).map(CT),t[3]=n.label,t[4]=r,t[5]=c):c=t[5];let l;t[6]===c?l=t[7]:(l=(0,Z.jsx)(`span`,{className:`truncate`,children:c}),t[6]=c,t[7]=l);let u;return t[8]!==n.id||t[9]!==o||t[10]!==s||t[11]!==l?(u=(0,Z.jsx)(j,{value:a,onSelect:o,"data-testid":s,children:l}),t[8]=n.id,t[9]=o,t[10]=s,t[11]=l,t[12]=u):u=t[12],u}function CT(e){return e.match?(0,Z.jsx)(`span`,{className:`font-semibold text-foreground`,children:e.text},e.start):(0,Z.jsx)(`span`,{children:e.text},e.start)}function wT(){let e=(0,$.c)(4),t=typeof window<`u`?window.okDesktop??null:null,n=t?.appVersion;if(!t||!n)return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=hT(n),e[0]=r):r=e[0];let i=r,a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsxs)(`p`,{className:`whitespace-nowrap font-mono text-xs text-muted-foreground/70`,"data-testid":`settings-sidebar-version`,children:[`v`,n]}),e[1]=a):a=e[1];let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{t.shell.openExternal(i)},e[2]=o):o=e[2];let s;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsxs)(`div`,{className:`ml-auto shrink-0 px-2 sm:ml-0 sm:mt-auto sm:pt-3`,children:[a,(0,Z.jsxs)(`button`,{type:`button`,onClick:o,"data-testid":`settings-sidebar-release-notes`,className:J(`mt-0.5 inline-flex items-center gap-1 whitespace-nowrap rounded text-xs text-muted-foreground transition-colors hover:text-foreground`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`),children:[(0,Z.jsx)(q,{id:`_PACVa`}),(0,Z.jsx)(_o,{className:`size-3`,"aria-hidden":`true`})]})]}),e[3]=s):s=e[3],s}function TT(e){let t=(0,$.c)(28),{group:n,activeId:r,onSelect:i}=e;if(n.items.length===0)return null;let a=`settings-group-${n.id}`,o=`${a}-caption`,s=n.enabled?void 0:o,c=n.enabled?`text-muted-foreground/80`:`text-muted-foreground/50`,l;t[0]===c?l=t[1]:(l=J(`shrink-0 whitespace-nowrap px-2 text-xs font-semibold uppercase tracking-wide font-mono sm:mb-1`,c),t[0]=c,t[1]=l);let u;t[2]!==n.label||t[3]!==a||t[4]!==s||t[5]!==l?(u=(0,Z.jsx)(`h3`,{id:a,"aria-describedby":s,className:l,children:n.label}),t[2]=n.label,t[3]=a,t[4]=s,t[5]=l,t[6]=u):u=t[6];let d;t[7]!==o||t[8]!==n.enabled?(d=n.enabled?null:(0,Z.jsx)(`p`,{id:o,className:`px-2 text-xs italic text-muted-foreground/60 sm:mb-1`,children:(0,Z.jsx)(q,{id:`JWsZlx`})}),t[7]=o,t[8]=n.enabled,t[9]=d):d=t[9];let f;if(t[10]!==r||t[11]!==o||t[12]!==n.enabled||t[13]!==n.items||t[14]!==i){let e;t[16]!==r||t[17]!==o||t[18]!==n.enabled||t[19]!==i?(e=e=>(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`button`,{type:`button`,"aria-current":r===e.id?`page`:void 0,"aria-disabled":n.enabled?void 0:!0,"aria-describedby":n.enabled?void 0:o,tabIndex:n.enabled?0:-1,disabled:!n.enabled,onClick:()=>n.enabled&&i(e.id),"data-testid":`settings-sidebar-item-${e.id}`,className:J(`w-auto whitespace-nowrap rounded px-2 py-1.5 text-left text-sm transition-colors sm:w-full`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,r===e.id&&n.enabled?`bg-accent text-accent-foreground`:`hover:bg-accent/50`),children:e.label})},e.id),t[16]=r,t[17]=o,t[18]=n.enabled,t[19]=i,t[20]=e):e=t[20],f=n.items.map(e),t[10]=r,t[11]=o,t[12]=n.enabled,t[13]=n.items,t[14]=i,t[15]=f}else f=t[15];let p;t[21]!==a||t[22]!==f?(p=(0,Z.jsx)(`ul`,{"aria-labelledby":a,className:`flex gap-1 sm:block sm:space-y-0.5`,children:f}),t[21]=a,t[22]=f,t[23]=p):p=t[23];let m;return t[24]!==u||t[25]!==d||t[26]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 sm:mb-4 sm:block`,children:[u,d,p]}),t[24]=u,t[25]=d,t[26]=p,t[27]=m):m=t[27],m}function ET(){let e=(0,$.c)(4),t,n,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(q,{id:`GsBUCk`})}),n=(0,Z.jsx)(Bd,{className:`h-5 w-32`}),r=(0,Z.jsx)(Bd,{className:`h-4 w-64`}),e[0]=t,e[1]=n,e[2]=r):(t=e[0],n=e[1],r=e[2]);let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`space-y-3`,"data-testid":`settings-content-skeleton`,children:[t,n,r,(0,Z.jsxs)(`div`,{className:`space-y-2`,children:[(0,Z.jsx)(Bd,{className:`h-9 w-full`}),(0,Z.jsx)(Bd,{className:`h-9 w-full`})]})]}),e[3]=i):i=e[3],i}function DT(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=J(`flex h-full w-full aria-[orientation=vertical]:flex-col`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Z.jsx)(XS,{"data-slot":`resizable-panel-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function OT(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Z.jsx)(eC,{"data-slot":`resizable-panel`,...n}),t[2]=n,t[3]=r),r}function kT(e){let t=(0,$.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({withHandle:i,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=J(`relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90`,n),t[4]=n,t[5]=a);let o;t[6]===i?o=t[7]:(o=i&&(0,Z.jsx)(`div`,{className:`z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border`}),t[6]=i,t[7]=o);let s;return t[8]!==r||t[9]!==a||t[10]!==o?(s=(0,Z.jsx)(iC,{"data-slot":`resizable-handle`,className:a,...r,children:o}),t[8]=r,t[9]=a,t[10]=o,t[11]=s):s=t[11],s}function AT(e){let t=(0,$.c)(119),{findInputRef:n,query:r,replacement:i,replaceOpen:a,caseSensitive:o,wholeWord:s,current:c,total:l,onQueryChange:u,onReplacementChange:d,onReplaceOpenChange:f,onCaseSensitiveChange:p,onWholeWordChange:m,onNext:h,onPrevious:g,onReplaceCurrent:_,onReplaceAll:v,onClose:y}=e,{_:b}=ht(),x=r.length>0,S=l>0,C;t[0]!==b||t[1]!==c||t[2]!==S||t[3]!==x||t[4]!==l?(C=x?S?`${c} / ${l}`:b({id:`Ev2r9A`}):``,t[0]=b,t[1]=c,t[2]=S,t[3]=x,t[4]=l,t[5]=C):C=t[5];let w=C,T;t[6]!==y||t[7]!==h||t[8]!==g?(T=function(e){e.key===`Enter`?(e.preventDefault(),e.shiftKey?g():h()):e.key===`Escape`&&(e.preventDefault(),y())},t[6]=y,t[7]=h,t[8]=g,t[9]=T):T=t[9];let E=T,D;t[10]!==y||t[11]!==_?(D=function(e){e.key===`Enter`?(e.preventDefault(),_()):e.key===`Escape`&&(e.preventDefault(),y())},t[10]=y,t[11]=_,t[12]=D):D=t[12];let O=D,k;t[13]===b?k=t[14]:(k=b({id:`MVxpbf`}),t[13]=b,t[14]=k);let A;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Z.jsx)(`label`,{className:`sr-only`,htmlFor:`ok-find-input`,children:(0,Z.jsx)(q,{id:`KujtjC`})}),t[15]=A):A=t[15];let j;t[16]===u?j=t[17]:(j=e=>u(e.target.value),t[16]=u,t[17]=j);let M;t[18]===b?M=t[19]:(M=b({id:`KujtjC`}),t[18]=b,t[19]=M);let N;t[20]!==n||t[21]!==E||t[22]!==r||t[23]!==j||t[24]!==M?(N=(0,Z.jsx)(kc,{ref:n,id:`ok-find-input`,value:r,onChange:j,onKeyDown:E,placeholder:M,autoComplete:`off`,spellCheck:!1,className:`h-7 px-2 text-sm`}),t[20]=n,t[21]=E,t[22]=r,t[23]=j,t[24]=M,t[25]=N):N=t[25];let P;t[26]===b?P=t[27]:(P=b({id:`-8PP0T`}),t[26]=b,t[27]=P);let F;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Z.jsx)(Po,{"aria-hidden":`true`}),t[28]=F):F=t[28];let I;t[29]!==o||t[30]!==p||t[31]!==P?(I=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Hr,{type:`button`,variant:`segmented`,size:`sm`,"aria-label":P,pressed:o,onPressedChange:p,className:`size-6 min-w-6 px-0`,children:F})}),t[29]=o,t[30]=p,t[31]=P,t[32]=I):I=t[32];let L;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`-8PP0T`})}),t[33]=L):L=t[33];let R;t[34]===I?R=t[35]:(R=(0,Z.jsxs)(cn,{children:[I,L]}),t[34]=I,t[35]=R);let z;t[36]===b?z=t[37]:(z=b({id:`_7UQ7y`}),t[36]=b,t[37]=z);let B;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,Z.jsx)(Og,{"aria-hidden":`true`}),t[38]=B):B=t[38];let V;t[39]!==m||t[40]!==z||t[41]!==s?(V=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Hr,{type:`button`,variant:`segmented`,size:`sm`,"aria-label":z,pressed:s,onPressedChange:m,className:`size-6 min-w-6 px-0`,children:B})}),t[39]=m,t[40]=z,t[41]=s,t[42]=V):V=t[42];let H;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`_7UQ7y`})}),t[43]=H):H=t[43];let U;t[44]===V?U=t[45]:(U=(0,Z.jsxs)(cn,{children:[V,H]}),t[44]=V,t[45]=U);let W;t[46]!==R||t[47]!==U?(W=(0,Z.jsxs)(Pc,{align:`inline-end`,className:`gap-0.5`,children:[R,U]}),t[46]=R,t[47]=U,t[48]=W):W=t[48];let G;t[49]!==W||t[50]!==N?(G=(0,Z.jsxs)(Lc,{className:`h-7 w-56 rounded-[min(var(--radius-md),12px)]`,children:[N,W]}),t[49]=W,t[50]=N,t[51]=G):G=t[51];let K;t[52]===w?K=t[53]:(K=(0,Z.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`min-w-14 px-1 text-right text-muted-foreground text-xs tabular-nums shrink-0`,children:w}),t[52]=w,t[53]=K);let ee;t[54]===b?ee=t[55]:(ee=b({id:`oqB2ez`}),t[54]=b,t[55]=ee);let te=!S,ne;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,Z.jsx)(Ir,{"data-icon":`inline-start`,"aria-hidden":`true`}),t[56]=ne):ne=t[56];let re;t[57]!==g||t[58]!==ee||t[59]!==te?(re=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":ee,disabled:te,onClick:g,children:ne})}),t[57]=g,t[58]=ee,t[59]=te,t[60]=re):re=t[60];let ie;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`oqB2ez`})}),t[61]=ie):ie=t[61];let ae;t[62]===re?ae=t[63]:(ae=(0,Z.jsxs)(cn,{children:[re,ie]}),t[62]=re,t[63]=ae);let oe;t[64]===b?oe=t[65]:(oe=b({id:`SiUUCS`}),t[64]=b,t[65]=oe);let se=!S,ce;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,Z.jsx)(Lo,{"data-icon":`inline-start`,"aria-hidden":`true`}),t[66]=ce):ce=t[66];let le;t[67]!==h||t[68]!==oe||t[69]!==se?(le=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":oe,disabled:se,onClick:h,children:ce})}),t[67]=h,t[68]=oe,t[69]=se,t[70]=le):le=t[70];let ue;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`SiUUCS`})}),t[71]=ue):ue=t[71];let de;t[72]===le?de=t[73]:(de=(0,Z.jsxs)(cn,{children:[le,ue]}),t[72]=le,t[73]=de);let fe=a?`secondary`:`ghost`,pe;t[74]!==b||t[75]!==a?(pe=b(a?{id:`UkQGhd`}:{id:`1RluQD`}),t[74]=b,t[75]=a,t[76]=pe):pe=t[76];let me=a?`ok-replace-input`:void 0,he;t[77]!==f||t[78]!==a?(he=()=>f(!a),t[77]=f,t[78]=a,t[79]=he):he=t[79];let ge;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Z.jsx)(ag,{"data-icon":`inline-start`,"aria-hidden":`true`}),t[80]=ge):ge=t[80];let _e;t[81]!==a||t[82]!==fe||t[83]!==pe||t[84]!==me||t[85]!==he?(_e=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:fe,size:`icon-sm`,"aria-label":pe,"aria-expanded":a,"aria-controls":me,onClick:he,children:ge})}),t[81]=a,t[82]=fe,t[83]=pe,t[84]=me,t[85]=he,t[86]=_e):_e=t[86];let ve;t[87]===a?ve=t[88]:(ve=(0,Z.jsx)(on,{side:`bottom`,children:a?(0,Z.jsx)(q,{id:`UkQGhd`}):(0,Z.jsx)(q,{id:`1RluQD`})}),t[87]=a,t[88]=ve);let ye;t[89]!==_e||t[90]!==ve?(ye=(0,Z.jsxs)(cn,{children:[_e,ve]}),t[89]=_e,t[90]=ve,t[91]=ye):ye=t[91];let be;t[92]!==b||t[93]!==O||t[94]!==S||t[95]!==v||t[96]!==_||t[97]!==d||t[98]!==a||t[99]!==i?(be=a?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`label`,{className:`sr-only`,htmlFor:`ok-replace-input`,children:(0,Z.jsx)(q,{id:`fqSfXY`})}),(0,Z.jsx)(vl,{id:`ok-replace-input`,value:i,onChange:e=>d(e.target.value),onKeyDown:O,placeholder:b({id:`fqSfXY`}),autoComplete:`off`,spellCheck:!1,className:`h-7 w-48 rounded-[min(var(--radius-md),12px)] px-2 text-sm shadow-none focus-visible:ring-2`}),(0,Z.jsxs)(cn,{children:[(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":b({id:`bS_boY`}),disabled:!S,onClick:_,children:(0,Z.jsx)(ag,{"data-icon":`inline-start`,"aria-hidden":`true`})})}),(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`bS_boY`})})]}),(0,Z.jsxs)(cn,{children:[(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":b({id:`dr1vFs`}),disabled:!S,onClick:v,children:(0,Z.jsx)(ig,{"data-icon":`inline-start`,"aria-hidden":`true`})})}),(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`dr1vFs`})})]})]}):null,t[92]=b,t[93]=O,t[94]=S,t[95]=v,t[96]=_,t[97]=d,t[98]=a,t[99]=i,t[100]=be):be=t[100];let xe;t[101]===b?xe=t[102]:(xe=b({id:`wJo9oS`}),t[101]=b,t[102]=xe);let Se;t[103]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,Z.jsx)(fl,{"data-icon":`inline-start`,"aria-hidden":`true`}),t[103]=Se):Se=t[103];let Ce;t[104]!==y||t[105]!==xe?(Ce=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":xe,onClick:y,children:Se})}),t[104]=y,t[105]=xe,t[106]=Ce):Ce=t[106];let we;t[107]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,Z.jsx)(on,{side:`bottom`,children:(0,Z.jsx)(q,{id:`yz7wBu`})}),t[107]=we):we=t[107];let Te;t[108]===Ce?Te=t[109]:(Te=(0,Z.jsxs)(cn,{children:[Ce,we]}),t[108]=Ce,t[109]=Te);let Ee;return t[110]!==G||t[111]!==K||t[112]!==ae||t[113]!==de||t[114]!==k||t[115]!==ye||t[116]!==be||t[117]!==Te?(Ee=(0,Z.jsxs)(`search`,{"data-testid":`find-replace-bar`,"aria-label":k,className:`pointer-events-auto flex max-w-[min(calc(100vw-1rem),720px)] touch-manipulation items-center gap-1 rounded-[calc(var(--radius)+2px)] border border-input bg-popover/95 p-1 text-popover-foreground shadow-md shadow-black/10 backdrop-blur`,children:[A,G,K,ae,de,ye,be,Te]}),t[110]=G,t[111]=K,t[112]=ae,t[113]=de,t[114]=k,t[115]=ye,t[116]=be,t[117]=Te,t[118]=Ee):Ee=t[118],Ee}var jT={current:0,total:0},MT=120,NT=100;function PT(e){let t=(0,$.c)(2),n;return t[0]===e?n=t[1]:(n=()=>e?pe(e):null,t[0]=e,t[1]=n),(0,Q.useSyncExternalStore)(V,n,FT)}function FT(){return null}function IT(e){if(!e||e.isDestroyed)return null;let{from:t,to:n,empty:r}=e.state.selection;if(r)return null;let i=e.state.doc.textBetween(t,n,`
|
|
15
15
|
`,`
|
|
16
16
|
`).trim();return i.length===0||i.length>MT||i.includes(`
|
|
17
17
|
`)?null:i}function LT(e){let t=te(e.state);return{current:t.matches.length===0?0:t.activeIndex+1,total:t.matches.length}}function RT(e,t){return e.current===t.current&&e.total===t.total}function zT(e,t,n){e&&!e.isDestroyed&&(e.commands.clearFindMatches(),e.commands.focus()),t(e=>({...e,open:!1,activeIndex:0})),n(jT)}function BT(e){!e||e.isDestroyed||typeof window>`u`||window.requestAnimationFrame(()=>{if(e.isDestroyed)return;let t=kn(e);if(!t)return;let n=t.dom.querySelector(`.ok-find-match-active`);n instanceof HTMLElement&&n.scrollIntoView({block:`center`,inline:`nearest`,behavior:`auto`})})}function VT(e){let t=(0,$.c)(81),{activeDocName:n,isSourceMode:r}=e,i=PT(n),a=(0,Q.useRef)(null),o=(0,Q.useRef)(null),s=(0,Q.useRef)(n),c=(0,Q.useRef)(0),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={open:!1,replaceOpen:!1,query:``,replacement:``,caseSensitive:!1,wholeWord:!1,activeIndex:0},t[0]=l):l=t[0];let[u,d]=(0,Q.useState)(l),[f,p]=(0,Q.useState)(jT),m,h;t[1]===n?(m=t[2],h=t[3]):(m=()=>{s.current!==n&&(s.current=n,d(UT))},h=[n],t[1]=n,t[2]=m,t[3]=h),(0,Q.useEffect)(m,h);let g,_;t[4]===u.activeIndex?(g=t[5],_=t[6]):(g=()=>{c.current=u.activeIndex},_=[u.activeIndex],t[4]=u.activeIndex,t[5]=g,t[6]=_),(0,Q.useEffect)(g,_);let v,y;t[7]===i?(v=t[8],y=t[9]):(v=()=>{let e=o.current;e&&e!==i&&!e.isDestroyed&&e.commands.clearFindMatches(),o.current=i},y=[i],t[7]=i,t[8]=v,t[9]=y),(0,Q.useEffect)(v,y);let b,x;t[10]===u.open?(b=t[11],x=t[12]):(b=()=>{if(!u.open||!a.current)return;let e=requestAnimationFrame(()=>{a.current?.focus(),a.current?.select()});return()=>cancelAnimationFrame(e)},x=[u.open],t[10]=u.open,t[11]=b,t[12]=x),(0,Q.useEffect)(b,x);let S,C;t[13]!==u.open||t[14]!==r?(S=()=>{!u.open||!r||d(HT)},C=[u.open,r],t[13]=u.open,t[14]=r,t[15]=S,t[16]=C):(S=t[15],C=t[16]),(0,Q.useEffect)(S,C);let w,T;t[17]!==i||t[18]!==u.caseSensitive||t[19]!==u.open||t[20]!==u.query||t[21]!==u.wholeWord||t[22]!==r?(w=()=>{if(!i||i.isDestroyed){p(jT);return}if(!u.open||r){i.commands.clearFindMatches(),p(jT);return}let e=window.setTimeout(()=>{if(i.isDestroyed)return;i.commands.setFindQuery(u.query,{options:{caseSensitive:u.caseSensitive,wholeWord:u.wholeWord},activeIndex:c.current});let e=LT(i);p(t=>RT(t,e)?t:e)},NT);return()=>window.clearTimeout(e)},T=[i,u.open,u.query,u.caseSensitive,u.wholeWord,r],t[17]=i,t[18]=u.caseSensitive,t[19]=u.open,t[20]=u.query,t[21]=u.wholeWord,t[22]=r,t[23]=w,t[24]=T):(w=t[23],T=t[24]),(0,Q.useEffect)(w,T);let E,D;t[25]!==i||t[26]!==u.open||t[27]!==r?(E=()=>{if(!i||i.isDestroyed||!u.open||r)return;let e=()=>{let e=te(i.state),t=LT(i);p(e=>RT(e,t)?e:t),d(t=>t.activeIndex===e.activeIndex?t:{...t,activeIndex:e.activeIndex})};return i.on(`transaction`,e),()=>{i.off(`transaction`,e)}},D=[i,u.open,r],t[25]=i,t[26]=u.open,t[27]=r,t[28]=E,t[29]=D):(E=t[28],D=t[29]),(0,Q.useEffect)(E,D);let O,k;t[30]!==n||t[31]!==i||t[32]!==u.open||t[33]!==r?(O=()=>{let e=function(e){let t=IT(i);d(n=>({...n,open:!0,replaceOpen:e,query:t??n.query,activeIndex:0}))},t=function(t){if(!(!n||r||t.defaultPrevented)){if(xl(t,`find`)){t.preventDefault(),u.open?zT(i,d,p):e(!1);return}if(xl(t,`replace`)){t.preventDefault(),e(!0);return}if(u.open){let e=xl(t,`find-next`),n=xl(t,`find-previous`);if(e||n){t.preventDefault(),(n?i?.commands.selectPreviousFindMatch():i?.commands.selectNextFindMatch())&&BT(i);return}}t.key===`Escape`&&u.open&&(t.preventDefault(),zT(i,d,p))}};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},k=[n,i,u.open,r],t[30]=n,t[31]=i,t[32]=u.open,t[33]=r,t[34]=O,t[35]=k):(O=t[34],k=t[35]),(0,Q.useEffect)(O,k);let A;t[36]!==i||t[37]!==u.caseSensitive||t[38]!==u.query||t[39]!==u.wholeWord?(A=function(){return!i||i.isDestroyed?!1:(i.commands.setFindQuery(u.query,{options:{caseSensitive:u.caseSensitive,wholeWord:u.wholeWord},activeIndex:c.current}),!0)},t[36]=i,t[37]=u.caseSensitive,t[38]=u.query,t[39]=u.wholeWord,t[40]=A):A=t[40];let j=A,M;t[41]===i?M=t[42]:(M=function(){if(!i||i.isDestroyed)return;let e=te(i.state),t=LT(i);p(e=>RT(e,t)?e:t),d(t=>t.activeIndex===e.activeIndex?t:{...t,activeIndex:e.activeIndex})},t[41]=i,t[42]=M);let N=M,P;t[43]===i?P=t[44]:(P=function(){zT(i,d,p)},t[43]=i,t[44]=P);let F=P,I;t[45]!==j||t[46]!==i||t[47]!==N?(I=function(){!i||i.isDestroyed||(j(),i.commands.selectNextFindMatch()&&BT(i),N())},t[45]=j,t[46]=i,t[47]=N,t[48]=I):I=t[48];let L=I,R;t[49]!==j||t[50]!==i||t[51]!==N?(R=function(){!i||i.isDestroyed||(j(),i.commands.selectPreviousFindMatch()&&BT(i),N())},t[49]=j,t[50]=i,t[51]=N,t[52]=R):R=t[52];let z=R,B;t[53]!==j||t[54]!==i||t[55]!==u.replacement||t[56]!==N?(B=function(){!i||i.isDestroyed||(j(),i.commands.replaceCurrentFindMatch(u.replacement)&&BT(i),N())},t[53]=j,t[54]=i,t[55]=u.replacement,t[56]=N,t[57]=B):B=t[57];let V=B,H;t[58]!==j||t[59]!==i||t[60]!==u.replacement||t[61]!==N?(H=function(){!i||i.isDestroyed||(j(),i.commands.replaceAllFindMatches(u.replacement)&&BT(i),N())},t[58]=j,t[59]=i,t[60]=u.replacement,t[61]=N,t[62]=H):H=t[62];let U=H;if(!u.open||!n||r)return null;let W,G,K,ee,ne;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>d(t=>({...t,query:e,activeIndex:0})),G=e=>d(t=>({...t,replacement:e})),K=e=>d(t=>({...t,replaceOpen:e})),ee=e=>d(t=>({...t,caseSensitive:e})),ne=e=>d(t=>({...t,wholeWord:e})),t[63]=W,t[64]=G,t[65]=K,t[66]=ee,t[67]=ne):(W=t[63],G=t[64],K=t[65],ee=t[66],ne=t[67]);let re;return t[68]!==F||t[69]!==u.caseSensitive||t[70]!==u.query||t[71]!==u.replaceOpen||t[72]!==u.replacement||t[73]!==u.wholeWord||t[74]!==f.current||t[75]!==f.total||t[76]!==U||t[77]!==V||t[78]!==L||t[79]!==z?(re=(0,Z.jsx)(`div`,{className:`editor-content-aligned pointer-events-none absolute inset-x-0 top-2 z-30 px-2`,children:(0,Z.jsx)(`div`,{className:`flex justify-end`,children:(0,Z.jsx)(AT,{findInputRef:a,query:u.query,replacement:u.replacement,replaceOpen:u.replaceOpen,caseSensitive:u.caseSensitive,wholeWord:u.wholeWord,current:f.current,total:f.total,onQueryChange:W,onReplacementChange:G,onReplaceOpenChange:K,onCaseSensitiveChange:ee,onWholeWordChange:ne,onNext:L,onPrevious:z,onReplaceCurrent:V,onReplaceAll:U,onClose:F})})}),t[68]=F,t[69]=u.caseSensitive,t[70]=u.query,t[71]=u.replaceOpen,t[72]=u.replacement,t[73]=u.wholeWord,t[74]=f.current,t[75]=f.total,t[76]=U,t[77]=V,t[78]=L,t[79]=z,t[80]=re):re=t[80],re}function HT(e){return{...e,open:!1,activeIndex:0}}function UT(e){return{...e,activeIndex:0}}var WT=300;function GT(e,t){let n=(0,$.c)(4),[r,i]=(0,Q.useState)(Cd),a,o;return n[0]!==t||n[1]!==e?(a=()=>{if(!e||!t){i(Cd);return}let n=e.document.getText(`source`),r=!1,a=null,o=function(){r||i(Td(n.toString()))};o();let s=function(){a&&clearTimeout(a),a=setTimeout(o,WT)};return n.observe(s),()=>{r=!0,n.unobserve(s),a&&clearTimeout(a)}},o=[e,t],n[0]=t,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,Q.useEffect)(a,o),r}function KT(e){return e&&e.document.getMap(`lifecycle`).get(`status`)===`conflict`?`conflict`:null}function qT(e){let t=(0,$.c)(8),{poolEntries:n}=Re(),r;t[0]!==e||t[1]!==n?(r=e?n.find(t=>t.docName===e)??null:null,t[0]=e,t[1]=n,t[2]=r):r=t[2];let i=r?.provider??null,a;t[3]===i?a=t[4]:(a=()=>KT(i),t[3]=i,t[4]=a);let[o,s]=(0,Q.useState)(a),c,l;return t[5]===i?(c=t[6],l=t[7]):(c=()=>{if(!i){s(null);return}let e=i.document.getMap(`lifecycle`);s(KT(i));let t=()=>s(KT(i));return e.observe(t),()=>{e.unobserve(t)}},l=[i],t[5]=i,t[6]=c,t[7]=l),(0,Q.useEffect)(c,l),o}function JT(e,t){let n=(0,$.c)(3),r;return n[0]!==e||n[1]!==t?(r=()=>Ed(e,t),n[0]=e,n[1]=t,n[2]=r):r=n[2],(0,Q.useSyncExternalStore)(fd,r)}var YT=`ok-doc-panel-width-v1`;function XT(e){return Number.isFinite(e)?e<300?300:e>600?600:Math.round(e):320}function ZT(e){try{let t=(e??localStorage).getItem(YT);if(t==null)return 320;let n=Number.parseInt(t,10);return Number.isFinite(n)?XT(n):320}catch{return 320}}function QT(e,t){try{(t??localStorage).setItem(YT,String(XT(e)))}catch{}}function $T(){try{return typeof localStorage>`u`?320:ZT()}catch{return 320}}var eE=1024,tE=1280,nE={left:eE,right:tE};function rE(e,t,n){return e==null?t>=nE[n]?`above`:`below`:`embedded`}function iE(e){return e===`above`?`open`:`collapsed`}var aE=`ok-sidebar-pins-v2`;function oE(e){return e===`open`||e===`collapsed`}function sE(e){return e===`above`||e===`below`||e===`embedded`}function cE(e){if(typeof e!=`object`||!e)return!1;let t=e;for(let e of Object.keys(t))if(!sE(e)||!oE(t[e]))return!1;return!0}function lE(e){let t=JSON.parse(e);if(typeof t!=`object`||!t)return{};let n=t,r={};return cE(n.left)&&(r.left=n.left),cE(n.right)&&(r.right=n.right),r}function uE(e){try{let t=(e??localStorage).getItem(aE);return t==null?{}:lE(t)}catch{return{}}}function dE(e,t){try{t.setItem(aE,JSON.stringify(e))}catch{}}function fE(e,t,n){return n[e]?.[t]??iE(t)}function pE(e,t,n,r){let i=r??localStorage,a=uE(i);return a[e]={...a[e],[t]:n},dE(a,i),a}var mE=`ok-terminal-width-v1`;function hE(e){return Number.isFinite(e)?e<320?320:Math.round(e):480}function gE(e){try{let t=(e??localStorage).getItem(mE);if(t==null)return 480;let n=Number.parseInt(t,10);return Number.isFinite(n)?hE(n):480}catch{return 480}}function _E(e,t){try{(t??localStorage).setItem(mE,String(hE(e)))}catch{}}function vE(){try{return typeof localStorage>`u`?480:gE()}catch{return 480}}function yE(e){let t=(0,$.c)(3),[n,r]=(0,Q.useState)(`connecting`),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(!e){r(`connecting`);return}let t=e.configuration.websocketProvider.status;e.isSynced?r(`synced`):r(t===`connected`?`connected`:t===`disconnected`?`disconnected`:`connecting`);let n=e=>{let{status:t}=e;r(t===`connected`?bE:t===`disconnected`?`disconnected`:`connecting`)},i=e=>{let{state:t}=e;r(t?`synced`:`connected`)},a=()=>r(`disconnected`);return e.on(`status`,n),e.on(`synced`,i),e.on(`disconnect`,a),()=>{e.off(`status`,n),e.off(`synced`,i),e.off(`disconnect`,a)}},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,Q.useEffect)(i,a),n}function bE(e){return e===`synced`?`synced`:`connected`}function xE(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function SE(e){let t=(0,$.c)(21),{path:n,onRemove:r}=e,{_:i}=ht(),a,o;t[0]!==i||t[1]!==n?(a=xE(n),o=i({id:`hnq8fP`,values:{label:a}}),t[0]=i,t[1]=n,t[2]=a,t[3]=o):(a=t[2],o=t[3]);let s=o,c=`composer-context-chip-file-${n}`,l;t[4]===r?l=t[5]:(l=e=>{(e.key===`Backspace`||e.key===`Delete`)&&(e.preventDefault(),r())},t[4]=r,t[5]=l);let u;t[6]===n?u=t[7]:(u=(0,Z.jsx)(`span`,{className:`absolute top-1/2 left-1/2 inline-flex size-3 -translate-x-1/2 -translate-y-1/2 opacity-100 transition-opacity duration-150 ease-out group-hover/chip:opacity-0 group-focus-within/chip:opacity-0 motion-reduce:transition-none`,children:(0,Z.jsx)(D,{path:n,className:`size-3`,showExtensionBadge:!1})}),t[6]=n,t[7]=u);let d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(fl,{className:`absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2 opacity-0 transition-opacity duration-150 ease-out group-hover/chip:opacity-100 group-focus-within/chip:opacity-100 motion-reduce:transition-none`,"aria-hidden":!0}),t[8]=d):d=t[8];let f;t[9]!==r||t[10]!==s||t[11]!==l||t[12]!==u?(f=(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":s,onClick:r,onKeyDown:l,className:`group/remove relative size-3.5 shrink-0 rounded-sm text-muted-foreground/80 hover:text-foreground`,children:[u,d]}),t[9]=r,t[10]=s,t[11]=l,t[12]=u,t[13]=f):f=t[13];let p;t[14]===a?p=t[15]:(p=(0,Z.jsx)(`span`,{className:`min-w-0 truncate`,children:a}),t[14]=a,t[15]=p);let m;return t[16]!==n||t[17]!==c||t[18]!==f||t[19]!==p?(m=(0,Z.jsxs)(`span`,{"data-testid":c,title:n,className:`group/chip inline-flex max-w-[14rem] items-center gap-1 rounded-md border bg-muted/40 py-0.5 pr-1.5 pl-1 text-muted-foreground text-xs`,children:[f,p]}),t[16]=n,t[17]=c,t[18]=f,t[19]=p,t[20]=m):m=t[20],m}function CE(e){let t=(0,$.c)(11),{files:n,onRemoveFile:r,className:i,children:a}=e;if(n.length===0&&a==null)return null;let o;t[0]===i?o=t[1]:(o=J(`flex flex-wrap items-center gap-1`,i),t[0]=i,t[1]=o);let s;if(t[2]!==n||t[3]!==r){let e;t[5]===r?e=t[6]:(e=e=>(0,Z.jsx)(SE,{path:e,onRemove:()=>r(e)},e),t[5]=r,t[6]=e),s=n.map(e),t[2]=n,t[3]=r,t[4]=s}else s=t[4];let c;return t[7]!==a||t[8]!==o||t[9]!==s?(c=(0,Z.jsxs)(`div`,{className:o,"data-testid":`composer-context-chips`,children:[s,a]}),t[7]=a,t[8]=o,t[9]=s,t[10]=c):c=t[10],c}function wE(e){let t=(0,$.c)(52),{primary:n,onPrimary:r,primaryDisabled:i,installedTargets:a,selectedTargetId:o,onSelectTarget:s,threadAgents:c,onOpenSettings:l,terminal:u,terminals:d,menuEmptyState:f,onMenuOpenChange:p,menuAlign:m,triggerAriaLabel:h,testIds:g}=e,_=i===void 0?!1:i,v=m===void 0?`end`:m,{_:y}=ht(),b=a.length>0,x=d&&d.length>0?d:null,S=x!=null||u!=null,C=b||S,w=c!==void 0&&c.length>0,T;t[0]===g?T=t[1]:(T=e=>typeof g.terminal==`function`?g.terminal(e):g.terminal,t[0]=g,t[1]=T);let E=T,D;t[2]!==r||t[3]!==n||t[4]!==_||t[5]!==g.primary?(D=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,className:`gap-1.5`,disabled:_,onClick:r,"data-testid":g.primary,children:n}),t[2]=r,t[3]=n,t[4]=_,t[5]=g.primary,t[6]=D):D=t[6];let O;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Z.jsx)(Lo,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),t[7]=O):O=t[7];let k;t[8]!==g.trigger||t[9]!==h?(k=(0,Z.jsx)(Dr,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`icon`,"aria-label":h,"data-testid":g.trigger,children:O})}),t[8]=g.trigger,t[9]=h,t[10]=k):k=t[10];let A;t[11]!==y||t[12]!==C||t[13]!==w||t[14]!==g||t[15]!==c?(A=w?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Er,{"aria-label":y({id:`vPKX2i`}),children:[(0,Z.jsxs)(kr,{className:`flex items-center gap-1.5`,children:[(0,Z.jsx)(q,{id:`RXEbZy`}),(0,Z.jsx)(ei,{})]}),c?.map(e=>(0,Z.jsxs)(Cr,{onSelect:e.onSelect,"data-testid":g.threadAgent?.(e.key),children:[(0,Z.jsx)(yo,{agentId:e.id,iconUrl:e.iconUrl,className:`size-4`}),(0,Z.jsx)(`span`,{className:`flex-1 truncate`,children:e.name}),e.selected?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]},e.key))]}),C?(0,Z.jsx)(Pr,{}):null]}):null,t[11]=y,t[12]=C,t[13]=w,t[14]=g,t[15]=c,t[16]=A):A=t[16];let j;t[17]!==y||t[18]!==x||t[19]!==C||t[20]!==a||t[21]!==s||t[22]!==o||t[23]!==b||t[24]!==S||t[25]!==u||t[26]!==E||t[27]!==g?(j=C?(0,Z.jsxs)(Z.Fragment,{children:[S?(0,Z.jsxs)(Er,{"aria-label":y({id:`ALhMYW`}),children:[(0,Z.jsx)(kr,{children:(0,Z.jsx)(q,{id:`ALhMYW`})}),x?x.map(e=>(0,Z.jsxs)(Cr,{onSelect:e.onSelect,"data-testid":E(e.cli),"aria-label":e.ariaLabel,children:[(0,Z.jsx)(Qr,{id:Kr(e.cli),className:`size-4`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:e.label}),e.selected?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]},e.cli)):u?(0,Z.jsxs)(Cr,{onSelect:u.onSelect,"data-testid":E(`claude`),"aria-label":y({id:`AcK_r0`}),children:[(0,Z.jsx)(Qr,{id:Kr(`claude`),className:`size-4`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`fcgvCA`})}),u.selected?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]}):null]}):null,b?(0,Z.jsxs)(Z.Fragment,{children:[S?(0,Z.jsx)(Pr,{}):null,(0,Z.jsxs)(Er,{"aria-label":y({id:`BBqGS9`}),children:[(0,Z.jsx)(kr,{children:(0,Z.jsx)(q,{id:`BBqGS9`})}),a.map(e=>(0,Z.jsxs)(Cr,{onSelect:()=>s(e),"data-testid":g.option(e.id),children:[(0,Z.jsx)(Qr,{id:e.id,"aria-hidden":`true`,className:`size-4`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:e.displayName}),o===e.id?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):null]},e.id))]})]}):null]}):null,t[17]=y,t[18]=x,t[19]=C,t[20]=a,t[21]=s,t[22]=o,t[23]=b,t[24]=S,t[25]=u,t[26]=E,t[27]=g,t[28]=j):j=t[28];let M=!w&&!C?f:null,N;t[29]!==C||t[30]!==w?(N=w||C?(0,Z.jsx)(Pr,{}):null,t[29]=C,t[30]=w,t[31]=N):N=t[31];let P;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Z.jsx)(al,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),t[32]=P):P=t[32];let F;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`jRAGrQ`})}),t[33]=F):F=t[33];let I;t[34]!==l||t[35]!==g.settings?(I=(0,Z.jsxs)(Cr,{onSelect:l,"data-testid":g.settings,children:[P,F]}),t[34]=l,t[35]=g.settings,t[36]=I):I=t[36];let L;t[37]!==v||t[38]!==N||t[39]!==I||t[40]!==A||t[41]!==j||t[42]!==M||t[43]!==g.menu?(L=(0,Z.jsxs)(jr,{align:v,className:`max-h-80 min-w-[200px]`,"data-testid":g.menu,children:[A,j,M,N,I]}),t[37]=v,t[38]=N,t[39]=I,t[40]=A,t[41]=j,t[42]=M,t[43]=g.menu,t[44]=L):L=t[44];let R;t[45]!==p||t[46]!==L||t[47]!==k?(R=(0,Z.jsxs)(Nr,{modal:!1,onOpenChange:p,children:[k,L]}),t[45]=p,t[46]=L,t[47]=k,t[48]=R):R=t[48];let z;return t[49]!==R||t[50]!==D?(z=(0,Z.jsxs)(nf,{children:[D,R]}),t[49]=R,t[50]=D,t[51]=z):z=t[51],z}var TE=`ok-onboarding-card-v1`,EE={initialized:!1,steps:{file:!1,askedAi:!1},fileBaseline:0,dismissed:!1,completed:!1};function DE(e){return e===!0}function OE(e){if(typeof e!=`object`||!e)return EE;let t=e,n=typeof t.steps==`object`&&t.steps!==null?t.steps:{};return{initialized:DE(t.initialized),steps:{file:DE(n.file),askedAi:DE(n.askedAi)},fileBaseline:typeof t.fileBaseline==`number`&&Number.isFinite(t.fileBaseline)&&t.fileBaseline>=0?t.fileBaseline:0,dismissed:DE(t.dismissed),completed:DE(t.completed)}}function kE(e){try{let t=(e??localStorage).getItem(TE);return t==null?EE:OE(JSON.parse(t))}catch(e){return console.warn(`[onboarding-card-store] readPersistedState failed (corrupt/privacy/SSR)`,e),EE}}function AE(e,t){try{(t??localStorage).setItem(TE,JSON.stringify(e))}catch(e){console.warn(`[onboarding-card-store] writePersistedState failed (quota/privacy/SSR)`,e)}}function jE(e){let t=kE(e),n=new Set,r=!1;function i(){for(let e of n)e()}function a(n){t=n,AE(t,e),i()}return{getSnapshot(){return t},subscribe(e){return n.add(e),()=>{n.delete(e)}},activate(e=0){t.initialized||a({...t,initialized:!0,fileBaseline:e})},markStepComplete(e){t.steps[e]||a({...t,steps:{...t.steps,[e]:!0}})},dismiss(){t.dismissed||a({...t,dismissed:!0})},markCompleted(){t.completed||a({...t,completed:!0})},install(){r||(r=!0,t=kE(e),i())}}}var ME=jE();function NE(e){let t=e===void 0?ME:e;return(0,Q.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getSnapshot)}function PE(){ME.install()}function FE(e){return Nl(e).filter(e=>e.kind===`document`||e.kind===`folder`).length}async function IE(){let e=await fetch(`/api/documents`);if(!e.ok)throw Error(`documents request failed: ${e.status}`);let t=await e.json(),n=Ma.safeParse(t);if(!n.success)throw Error(`documents response did not match schema`,{cause:n.error});return FE(n.data.documents)}async function LE(e=ME){let t=e.getSnapshot();if(!(t.steps.file||!t.initialized))try{await IE()>t.fileBaseline&&e.markStepComplete(`file`)}catch(e){console.warn(`[onboarding-signals] file-step count read failed; leaving step incomplete`,e)}}function RE(e=ME){e.getSnapshot().initialized&&e.markStepComplete(`askedAi`)}var zE=5200,BE=500,VE=/\.(md|mdx)$/i;function HE(e,t){return VE.test(e)?e:t?`${e}${t}`:Qs(e)}function UE(e){return VE.test(e)?e.replace(VE,``):null}function WE(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName.toUpperCase();return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`}function GE(){let e=(0,$.c)(2),[t,n]=(0,Q.useState)(KE),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=window.matchMedia(`(prefers-reduced-motion: reduce)`);n(e.matches);let t=e=>n(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i),t}function KE(){return typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function qE(e,t){let n=(0,$.c)(9),[r,i]=(0,Q.useState)(0),[a,o]=(0,Q.useState)(!0),s,c;if(n[0]!==t||n[1]!==a?(s=()=>{if(!t)return;if(a){let e=setTimeout(()=>o(!1),zE);return()=>clearTimeout(e)}let e=setTimeout(()=>{i(JE),o(!0)},BE);return()=>clearTimeout(e)},c=[a,t],n[0]=t,n[1]=a,n[2]=s,n[3]=c):(s=n[2],c=n[3]),(0,Q.useEffect)(s,c),!t){let t=e[0]??``,r;return n[4]===t?r=n[5]:(r={text:t,visible:!0},n[4]=t,n[5]=r),r}let l=e[e.length>0?r%e.length:0]??``,u;return n[6]!==l||n[7]!==a?(u={text:l,visible:a},n[6]=l,n[7]=a,n[8]=u):u=n[8],u}function JE(e){return e+1}function YE(e){let t=(0,$.c)(2),{agentName:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(q,{id:`5PrrYw`,values:{agentName:n}}),t[0]=n,t[1]=r),r}function XE(e){let t=(0,$.c)(104),{docName:n,surface:r,folderPath:i,dismissed:a,onDismiss:o,onReopen:s}=e,c=a===void 0?!1:a,{_:l}=ht(),u=i!==void 0,d=u?null:n??null,f=r??`wysiwyg`,p=GE(),m=id(),{pageMeta:h}=Vo(),{states:g}=ts(),_=Yr(),{dispatch:v}=Yo(),y=Xo(),[b]=(0,Q.useState)(cD),[x,S]=(0,Q.useState)(null),[C,w]=(0,Q.useState)(!0),[T,E]=(0,Q.useState)(!1),D=(0,Q.useRef)(null),O=(0,Q.useRef)(null),[k]=(0,Q.useState)(sD),A,j;t[0]!==c||t[1]!==n||t[2]!==u||t[3]!==r?(A=()=>{if(u||n==null)return;let e=document.documentElement,t=aD,i=()=>{r===`wysiwyg`&&requestAnimationFrame(()=>{let e=pe(n),t=O.current;if(!(!e||e.isDestroyed||!t))try{let n=e.view,r=n.coordsAtPos(e.state.selection.head).bottom-(t.getBoundingClientRect().top-28);if(r<=0)return;let i=n.dom.closest(`.editor-doc-scroll`);i instanceof HTMLElement&&(i.scrollTop+=r)}catch{}})},a=O.current;if(c||!a){t(),e.style.removeProperty(`--ask-composer-height`);return}let o=()=>{t(),e.style.setProperty(`--ask-composer-height`,`${a.offsetHeight+56}px`)};o(),i();let s=new ResizeObserver(o);return s.observe(a),()=>{s.disconnect(),t(),e.style.removeProperty(`--ask-composer-height`)}},j=[c,r,n,u],t[0]=c,t[1]=n,t[2]=u,t[3]=r,t[4]=A,t[5]=j):(A=t[4],j=t[5]),(0,Q.useEffect)(A,j);let M=(0,Q.useRef)(c),N=(0,Q.useRef)(s),F;t[6]!==c||t[7]!==s?(F=()=>{M.current=c,N.current=s},t[6]=c,t[7]=s,t[8]=F):F=t[8],(0,Q.useEffect)(F);let I,L;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(I=()=>P(()=>{M.current?N.current?.():D.current?.focus()}),L=[],t[9]=I,t[10]=L):(I=t[9],L=t[10]),(0,Q.useEffect)(I,L);let R;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(R=[],t[11]=R):R=t[11],(0,Q.useEffect)(rD,R);let z=(0,Q.useRef)(c),B,V;t[12]===c?(B=t[13],V=t[14]):(B=()=>{let e=z.current;z.current=c,e&&!c&&D.current?.focus()},V=[c],t[12]=c,t[13]=B,t[14]=V),(0,Q.useEffect)(B,V);let H;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(H=[],t[15]=H):H=t[15];let[U,W]=(0,Q.useState)(H),[G,K]=(0,Q.useState)(nD),ee;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ee=[],t[16]=ee):ee=t[16];let[te,ne]=(0,Q.useState)(ee),re;t[17]!==n||t[18]!==u||t[19]!==h?(re=u||n==null?``:HE(n,h.get(n)?.docExt),t[17]=n,t[18]=u,t[19]=h,t[20]=re):re=t[20];let ie=re,ae,oe;t[21]!==ie||t[22]!==G||t[23]!==u||t[24]!==C?(ae=()=>{u||C||W(e=>{if(G.has(ie))return e;let t=UE(ie),n=t===null?e:e.filter(e=>e===ie||UE(e)!==t);return n.includes(ie)?n.length===e.length?e:n:[...n,ie]})},oe=[u,C,ie,G],t[21]=ie,t[22]=G,t[23]=u,t[24]=C,t[25]=ae,t[26]=oe):(ae=t[25],oe=t[26]),(0,Q.useEffect)(ae,oe);let se=u?i&&!G.has(i)&&!te.includes(i)?[i]:[]:U.filter(e=>!G.has(e)&&!te.includes(e)),ce=Do(d,f),le=Do(d,`frontmatter`),[ue,de]=(0,Q.useState)(null),[fe,me]=(0,Q.useState)(!1),he,ge;t[27]===ce?(he=t[28],ge=t[29]):(he=()=>{ce&&de(ce)},ge=[ce],t[27]=ce,t[28]=he,t[29]=ge),(0,Q.useEffect)(he,ge);let _e,ve;t[30]===le?(_e=t[31],ve=t[32]):(_e=()=>{le&&de(le)},ve=[le],t[30]=le,t[31]=_e,t[32]=ve),(0,Q.useEffect)(_e,ve);let ye=Gr(),be=Wr(),xe;t[33]===_?xe=t[34]:(xe=e=>Zr(_,e.source,e.id,!0,e.supported),t[33]=_,t[34]=xe);let Se=be.filter(xe),Ce=ri(Se,ye),we;t[35]===y?.installedClis?we=t[36]:(we=y?.installedClis??{},t[35]=y?.installedClis,t[36]=we);let Te=Gc({sticky:x??b,effectiveThreadAgent:Ce,enabledClis:y===null?[]:Hc(_,y.installedClis),enabledDesktopTargets:Cc(_),installedClis:we,terminalAvailable:y!==null,threadsAvailable:!0,desktopSelectable:!0}),Ee=Te.kind===`thread`,De=Te.kind===`cli`?Te.cli:null,Oe=De!==null,ke=Te.kind===`desktop`?Xr.find(e=>e.id===Te.target)??null:null,Ae=!T&&(!C||ue!==null)&&(Oe||ke!==null||Ee),je;t[37]===_?je=t[38]:(je=Xr.filter(e=>ti(_,e.id)),t[37]=_,t[38]=je);let Me=je,Ne;t[39]===g?Ne=t[40]:(Ne=Xr.some(e=>g[e.id]?.installed==null),t[39]=g,t[40]=Ne);let Pe=Ne,Fe=y===null?void 0:Hc(_,y.installedClis).map(e=>{let{displayName:t}=Yi[e];return{cli:e,label:t,ariaLabel:l({id:`QYfQdv`,values:{displayName:t}}),selected:De===e,onSelect:()=>We(e)}}),Ie;t[41]===l?Ie=t[42]:(Ie=l({id:`KYSocE`}),t[41]=l,t[42]=Ie);let Le;t[43]===l?Le=t[44]:(Le=l({id:`7Ongq0`}),t[43]=l,t[44]=Le);let Re;t[45]===l?Re=t[46]:(Re=l({id:`HPTPGr`}),t[45]=l,t[46]=Re);let ze;t[47]===l?ze=t[48]:(ze=l({id:`qiRoLb`}),t[47]=l,t[48]=ze);let Be;t[49]!==Ie||t[50]!==Le||t[51]!==Re||t[52]!==ze?(Be=[Ie,Le,Re,ze],t[49]=Ie,t[50]=Le,t[51]=Re,t[52]=ze,t[53]=Be):Be=t[53];let Ve=qE(Be,!p&&C&&!c),He;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(He=e=>{S(e.id),yc(e.id)},t[54]=He):He=t[54];let Ue=He,We=e=>{let t=vc(e);S(t),yc(t)},Ge;if(t[55]===Symbol.for(`react.memo_cache_sentinel`)){let e=()=>{S(_c),yc(_c)};Ge=t=>{qr(t),e()},t[55]=Ge}else Ge=t[55];let Ke=Ge,qe=()=>{D.current?.clear(),de(null),me(!1),W([]),K(new Set),EC()},Je=e=>{if(e===null){X.error(l({id:`y8B54M`}));return}if(Ee){ds(e,Ce===null?void 0:{agent:{source:Ce.source,id:Ce.id}}),RE(),qe();return}if(De!==null&&y!==null){try{y.launchInTerminal(e,De)}catch{X.error(l({id:`jBVUXo`}));return}RE(),qe();return}if(ke!==null){if(g[ke.id]?.installed!==!0){ls(ke),X.info(l({id:`L1BQTH`,values:{0:ke.displayName}})),qe();return}E(!0),v(ke.id,e).then(tD).finally(()=>{E(!1),qe()})}},Ye=()=>{let{instruction:e,mentions:t}=D.current?.getContent()??{instruction:``,mentions:[]};if(u)return cs({docName:null,folderRelativePath:i,workspace:m,instruction:e,mentions:[...new Set([...se,...t])].filter(e=>e!==i)});let r=ue?ad(ue):void 0,a=ue?.docName??null,o=ue?a:se.includes(ie)?n??null:null,s=o===null?null:HE(o,h.get(o)?.docExt),c=[...new Set([...se,...t])].filter(e=>e!==s);return cs({docName:o,...s===null?{}:{docRelativePath:s},workspace:m,instruction:e,mentions:c,selection:r})},Xe=()=>{Ae&&Je(Ye())};if(c)return null;let Ze=``,Qe=``;if(ue){let e;t[56]!==h||t[57]!==ue?(e=od(ue,HE(ue.docName,h.get(ue.docName)?.docExt).split(`/`).pop()??``),t[56]=h,t[57]=ue,t[58]=e):e=t[58],Ze=e;let n;t[59]===ue.markdown?n=t[60]:(n=sd(ue.markdown),t[59]=ue.markdown,t[60]=n),Qe=n}let $e;t[61]===Symbol.for(`react.memo_cache_sentinel`)?($e=e=>af(e,D),t[61]=$e):$e=t[61];let et;t[62]!==l||t[63]!==u||t[64]!==o?(et=u?null:(0,Z.jsx)(Y,{type:`button`,variant:`outline`,"aria-label":l({id:`EWX92Z`}),onClick:()=>o?.(),"data-testid":`ask-ai-collapse`,className:`-top-2.5 -translate-x-1/2 absolute left-1/2 z-10 h-5 w-10 rounded-md p-0 text-muted-foreground opacity-0 shadow-sm transition-opacity hover:text-foreground focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100`,children:(0,Z.jsx)(Lo,{className:`size-3.5`,"aria-hidden":!0})}),t[62]=l,t[63]=u,t[64]=o,t[65]=et):et=t[65];let tt;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(tt=e=>K(t=>{let n=new Set(t);return n.add(e),n}),t[66]=tt):tt=t[66];let nt;t[67]!==l||t[68]!==Ze||t[69]!==Qe||t[70]!==ue||t[71]!==fe?(nt=ue?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`span`,{"data-testid":`composer-selection-pill`,title:Ze,className:`group/chip inline-flex max-w-[16rem] items-center gap-1 rounded-md border bg-muted/40 py-0.5 pr-1.5 pl-1 text-muted-foreground text-xs`,children:[(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":l({id:`irrm_E`}),onClick:()=>{de(null),me(!1)},className:`group/remove relative size-3.5 shrink-0 rounded-sm text-muted-foreground/80 hover:text-foreground`,children:[(0,Z.jsx)(xg,{className:`absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2 opacity-100 transition-opacity duration-150 ease-out group-hover/chip:opacity-0 group-focus-within/chip:opacity-0 motion-reduce:transition-none`,"aria-hidden":!0}),(0,Z.jsx)(fl,{className:`absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2 opacity-0 transition-opacity duration-150 ease-out group-hover/chip:opacity-100 group-focus-within/chip:opacity-100 motion-reduce:transition-none`,"aria-hidden":!0})]}),(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,"aria-expanded":fe,"aria-label":l(fe?{id:`UaDyeb`}:{id:`eTL5y9`}),onClick:()=>me(eD),"data-testid":`composer-selection-peek`,className:`h-auto min-h-0 min-w-0 shrink justify-start px-0 py-0 text-left font-normal text-muted-foreground text-xs hover:bg-transparent hover:text-foreground`,children:(0,Z.jsx)(`span`,{className:`min-w-0 truncate`,children:Ze})})]}),fe&&Qe!==``?(0,Z.jsx)(`p`,{className:`max-h-24 w-full basis-full overflow-y-auto whitespace-pre-wrap text-2xs text-muted-foreground/80 subtle-scrollbar`,"data-testid":`composer-selection-preview`,children:Qe}):null]}):null,t[67]=l,t[68]=Ze,t[69]=Qe,t[70]=ue,t[71]=fe,t[72]=nt):nt=t[72];let rt;t[73]===l?rt=t[74]:(rt=l({id:`xWEvuo`}),t[73]=l,t[74]=rt);let it;t[75]!==C||t[76]!==p||t[77]!==Ve?(it=C?(0,Z.jsx)(`div`,{"aria-hidden":!0,className:J(`pointer-events-none absolute inset-0 truncate px-0 py-1 text-base text-muted-foreground/60 md:text-sm`,!p&&`transition-opacity duration-500 ease-in-out`,Ve.visible?`opacity-100`:`opacity-0`),children:Ve.text}):null,t[75]=C,t[76]=p,t[77]=Ve,t[78]=it):it=t[78];let at=wE,ot=Ee?(0,Z.jsx)(yo,{agentId:Ce?.id??``,iconUrl:Ce?.iconUrl,className:`size-4`}):De===null?ke?(0,Z.jsx)(Qr,{id:ke.id,className:`size-4`,"aria-hidden":!0}):null:(0,Z.jsx)(Qr,{id:Kr(De),className:`size-4`,"aria-hidden":!0}),st=Ee?Ce===null?(0,Z.jsx)(q,{id:`G7bn_N`}):(0,Z.jsx)(YE,{agentName:Ce.name}):De===null?ke?(0,Z.jsx)(q,{id:`nUNZL4`,values:{0:ke.displayName}}):(0,Z.jsx)(q,{id:`F-vBv0`}):(0,Z.jsx)(q,{id:`ti6aF_`,values:{0:Yi[De].displayName}}),ct;t[79]===st?ct=t[80]:(ct=(0,Z.jsx)(`span`,{children:st}),t[79]=st,t[80]=ct);let lt;t[81]===T?lt=t[82]:(lt=T?(0,Z.jsx)(qc,{className:`size-3.5 animate-spin`,"aria-hidden":!0}):null,t[81]=T,t[82]=lt);let ut;t[83]!==ot||t[84]!==ct||t[85]!==lt?(ut=(0,Z.jsxs)(Z.Fragment,{children:[ot,ct,lt]}),t[83]=ot,t[84]=ct,t[85]=lt,t[86]=ut):ut=t[86];let dt=!Ae,ft=Oe?null:ke?.id??null,pt=Se.map(e=>({key:`${e.source}:${e.id}`,id:e.id,name:e.name,...e.iconUrl===void 0?{}:{iconUrl:e.iconUrl},selected:Ee&&Ce!==null&&Ce.source===e.source&&Ce.id===e.id,onSelect:()=>Ke(e)})),mt;t[87]===Pe?mt=t[88]:(mt=(0,Z.jsx)(`p`,{className:`px-2 py-1.5 text-sm text-muted-foreground`,"aria-live":`polite`,children:Pe?(0,Z.jsx)(q,{id:`CPmYSG`}):(0,Z.jsx)(q,{id:`t9Qn8y`})}),t[87]=Pe,t[88]=mt);let gt;t[89]===l?gt=t[90]:(gt=l({id:`nskygk`}),t[89]=l,t[90]=gt);let _t;t[91]===Symbol.for(`react.memo_cache_sentinel`)?(_t={primary:`ask-ai-send`,trigger:`ask-ai-agent-trigger`,menu:`ask-ai-agent-menu`,option:$E,threadAgent:QE,settings:`ask-ai-agent-option-settings`,terminal:ZE},t[91]=_t):_t=t[91];let vt;t[92]!==at||t[93]!==Fe||t[94]!==Me||t[95]!==Ue||t[96]!==Xe||t[97]!==ut||t[98]!==dt||t[99]!==ft||t[100]!==pt||t[101]!==mt||t[102]!==gt?(vt=(0,Z.jsx)(at,{primary:ut,onPrimary:Xe,primaryDisabled:dt,installedTargets:Me,selectedTargetId:ft,onSelectTarget:Ue,threadAgents:pt,onOpenSettings:Sl,terminals:Fe,menuEmptyState:mt,triggerAriaLabel:gt,testIds:_t}),t[92]=at,t[93]=Fe,t[94]=Me,t[95]=Ue,t[96]=Xe,t[97]=ut,t[98]=dt,t[99]=ft,t[100]=pt,t[101]=mt,t[102]=gt,t[103]=vt):vt=t[103];let yt=(0,Z.jsxs)(`div`,{ref:O,onMouseDown:$e,className:`pointer-events-auto group relative flex cursor-text flex-col gap-1.5 rounded-2xl border border-border/60 bg-card px-3 py-2 shadow-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50`,children:[et,(0,Z.jsx)(CE,{files:se,onRemoveFile:tt,children:nt}),(0,Z.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Z.jsxs)(`div`,{className:`relative flex-1`,children:[(0,Z.jsx)(GC,{ref:D,ariaLabel:rt,onEmptyChange:w,onContentChange:TC,onMentionsChange:ne,onSubmit:Xe,initialDoc:k,className:`max-h-[200px] overflow-y-auto text-base md:text-sm`}),it]}),vt]})]});return u?(0,Z.jsx)(`div`,{className:`shrink-0 pt-2 pb-3`,"data-testid":`bottom-composer`,children:(0,Z.jsx)(`div`,{className:`mx-auto w-full max-w-4xl px-6`,children:yt})}):(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-[var(--conflict-footer-height,0px)] z-20 editor-content-aligned bg-gradient-to-t from-background from-65% via-background to-transparent pt-10 pb-2`,"data-testid":`bottom-composer`,children:yt})}function ZE(e){return e===`claude`?`ask-ai-agent-option-terminal`:`ask-ai-agent-option-terminal-${e}`}function QE(e){return`ask-ai-agent-option-thread-${e}`}function $E(e){return`ask-ai-agent-option-${e}`}function eD(e){return!e}function tD(e){e.ok&&RE()}function nD(){return new Set}function rD(){let e=iD;return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})}function iD(e){xl(e,`open-ask-ai`)&&(WE(e.target)||(e.preventDefault(),A()))}function aD(){let e=[...document.querySelectorAll(`.editor-doc-scroll`)].filter(oD);if(e.length===0)return;let t=!1,n=()=>{t=!0};window.addEventListener(`wheel`,n,{passive:!0}),window.addEventListener(`touchstart`,n,{passive:!0});let r=performance.now(),i=()=>{if(t||performance.now()-r>=300){window.removeEventListener(`wheel`,n),window.removeEventListener(`touchstart`,n);return}for(let t of e)t.scrollTop=t.scrollHeight-t.clientHeight;requestAnimationFrame(i)};requestAnimationFrame(i)}function oD(e){let t=e.scrollHeight-e.clientHeight;return t>0&&e.scrollTop>=t-40}function sD(){return wC().doc??void 0}function cD(){return Uc()}function lD(e){return!e.terminalVisible&&!e.isEmbedded&&e.activeDocName!==null}function uD(e){return!e.terminalVisible&&!e.isEmbedded}function dD(e,t={}){let n=h(e.componentName);return n.name===`*`?t.unregisteredSuffix?`${e.componentName} (unregistered)`:e.componentName:n.displayName??n.name}var fD=200,pD=`Outside any block`;function mD(e){let t=(0,$.c)(5),{editor:n}=e,r=ut(n),i=(0,Q.useRef)(null),a=(0,Q.useRef)(null),o=(0,Q.useRef)(!1),s,c;t[0]!==r||t[1]!==n?(s=()=>{if(a.current!==null&&(window.clearTimeout(a.current),a.current=null),!n||!i.current)return;let e=r!==null&&r.ancestorChain.length>0,t;return t=e?hD(n,r):o.current?pD:``,a.current=window.setTimeout(()=>{i.current&&(i.current.textContent=``,i.current.textContent=t),o.current=e,a.current=null},fD),()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null)}},c=[n,r],t[0]=r,t[1]=n,t[2]=s,t[3]=c):(s=t[2],c=t[3]),(0,Q.useEffect)(s,c);let l;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(`div`,{ref:i,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`sr-only`}),t[4]=l):l=t[4],l}function hD(e,t){if(!t||t.ancestorChain.length===0)return``;let n=t.ancestorChain,r=n[n.length-1],i=dD(r,{unregisteredSuffix:!0});if(n.length===1)return`Selected: ${i}`;let a=n[n.length-2],o=dD(a);try{let t=e.state.doc.resolve(r.pos),n=t.index(t.depth),a=t.parent.childCount;return`Selected: ${i}, ${n+1} of ${a} in ${o}`}catch{return`Selected: ${i} in ${o}`}}var gD=!1;function _D(e,t,n,r){let i=e[t];if(typeof i!=`function`){console.warn(`[cold-mount-instrumentation] target missing method "${t}"`);return}e[t]=function(...e){let t=performance.now(),a,o=!1;try{return a=i.apply(this,e),o=!0,a}finally{let e=performance.now()-t,i;if(o&&r)try{i=r(this,a,t,e)}catch(e){i={"instrumentation-error":e instanceof Error?e.message:String(e)}}try{ru(n,{durationMs:Math.round(e*1e3)/1e3,threw:!o,...i},{startTime:t,duration:e})}catch{}}}}function vD(e){return e?.doc?typeof e.doc.nodeSize==`number`?e.doc.nodeSize:e.doc.content&&typeof e.doc.content.size==`number`?e.doc.content.size:null:null}var yD=0,bD=0,xD=0,SD=0,CD=null,wD=[`linkResolutionDecoration$`],TD=new WeakSet,ED=new WeakSet;function DD(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}function OD(){return!1}function kD(){return!OD()}function AD(e,t){if(kD())return t;let n=`ok/cold/nodeview-factory-${DD(e)}`;return function(...r){let i=performance.now();try{return t(...r)}finally{let t=performance.now()-i;ru(n,{nodeType:e,durationMs:Math.round(t*1e3)/1e3},{startTime:i,duration:t})}}}function jD(e){if(kD())return;let t=e.state.plugins;for(let e of t){if(ED.has(e))continue;let t=e.spec?.key?.key;if(!t||!wD.some(e=>t.startsWith(e)))continue;let n=e.props,r=n.decorations;if(typeof r!=`function`){ED.add(e);continue}let i=`ok/cold/decoration-${DD(t.replace(/\$\d*$/,``))}`;n.decorations=function(...e){let n=performance.now();try{return r.apply(this,e)}finally{let e=performance.now()-n;ru(i,{pluginKey:t,durationMs:Math.round(e*1e3)/1e3},{startTime:n,duration:e})}},ED.add(e)}}function MD(e){if(kD())return;let t=e._props?.nodeViews;if(!(!t||typeof t!=`object`))for(let[e,n]of Object.entries(t)){if(typeof n!=`function`||n.__okWrapped===!0)continue;let r=AD(e,n);r.__okWrapped=!0,t[e]=r}}function ND(e){return kD()?e:e.map(e=>{let t=e.name??`unknown`,n=DD(t);return e.extend({onBeforeCreate(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;ru(`ok/cold/ext-${n}-on-before-create`,{ext:t,hook:`onBeforeCreate`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}},onCreate(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;ru(`ok/cold/ext-${n}-on-create`,{ext:t,hook:`onCreate`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}},onUpdate(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;ru(`ok/cold/ext-${n}-on-update`,{ext:t,hook:`onUpdate`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}},onDestroy(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;ru(`ok/cold/ext-${n}-on-destroy`,{ext:t,hook:`onDestroy`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}}})})}function PD(){if(!gD){gD=!0,_D(ao.prototype,`mount`,`ok/cold/editor-mount`,(e,t,n,r)=>{let i=e;return kD()||(CD=performance.now()),{elementDefault:i.options?.element?.nodeName??null,docSize:vD(i.editorState),durationMs:r}}),_D(ao.prototype,`createView`,`ok/cold/editor-create-view`,e=>{let t=e;return!kD()&&!TD.has(e)&&t.view&&(jD(t.view),MD(t.view),TD.add(e)),{docSize:vD(t.editorState)}}),_D(ao.prototype,`createNodeViews`,`ok/cold/create-node-views`,(e,t,n,r)=>{SD+=1;let i=e;return!kD()&&i.view&&MD(i.view),{docSize:vD(i.view),seq:SD,durationMs:r}}),_D(la.prototype,`updateState`,`ok/cold/pm-update-state`,(e,t,n,r)=>(bD+=1,{seq:bD,docSize:vD(e.state),durationMs:r})),_D(la.prototype,`setProps`,`ok/cold/pm-set-props`,(e,t,n,r)=>(xD+=1,{seq:xD,docSize:vD(e.state),durationMs:r})),_D(we.prototype,`_forceRerender`,`ok/cold/force-rerender`,(e,t,n,r)=>{yD+=1;let i=e,a=(()=>{try{return i.type?.toArray?i.type.toArray().length:null}catch{return null}})();return{seq:yD,topLevelYElements:a,durationMs:r}}),_D(jn.prototype,`init`,`ok/cold/ec-init`,e=>({editorPresent:!!e.props?.editor}));try{typeof PerformanceObserver<`u`&&new PerformanceObserver(e=>{for(let t of e.getEntries()){let e=t.name;if((e===`first-paint`||e===`first-contentful-paint`)&&(ru(e===`first-paint`?`ok/cold/paint-fp`:`ok/cold/paint-fcp`,{entryType:t.entryType,startTime:Math.round(t.startTime*1e3)/1e3},{startTime:t.startTime,duration:0}),!kD()&&e===`first-paint`&&CD!==null)){let e=CD,n=Math.max(0,t.startTime-e);ru(`ok/cold/append-to-paint`,{paintEntryType:t.entryType,durationMs:Math.round(n*1e3)/1e3,paintAt:Math.round(t.startTime*1e3)/1e3},{startTime:e,duration:n}),CD=null}}}).observe({type:`paint`,buffered:!0})}catch{}globalThis.__okColdMountInstrumented=!0}}function FD(){let[e]=(0,Q.useState)(Ci);return e}function ID({principal:e,identity:t}){return e&&e.source===`git-config`?{type:`human`,name:aa(e.display_name),color:Ha(e.id,wi),coeditor:t.coeditor,tabId:t.tabId,principalId:e.id}:e&&e.source===`synthesized`?{type:`human`,name:t.name,color:Ha(e.id,wi),coeditor:t.coeditor,tabId:t.tabId}:{type:`human`,name:t.name,color:t.color,coeditor:t.coeditor,tabId:t.tabId}}function LD(e,t){return e>t}function RD(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.isChangeOrigin===!0?!0:`snapshot`in t&&`prevSnapshot`in t&&t.snapshot===null&&t.prevSnapshot===null}var zD=3,BD=6e4;function VD(e,t){let n=0;for(let r of e)t-r<BD&&(n+=1);return n<zD}var HD=new Map;function UD(e,t){for(let n of e.changed.keys()){let e=n;for(;e!=null;){if(e===t)return!0;let n=e._item;e=n==null?null:n.parent}}return!1}function WD(e){let t=dt.getState(e);return t?.snapshot!=null||t?.prevSnapshot!=null}function GD(e){let{fragment:t,docName:n,onWedged:r}=e,i=0,a=0,o=!1,s=!1,c=!1,l=null,u=new WeakSet,d=e=>{let t=dt.getState(e)?.binding;if(!t)return;if(typeof t._prosemirrorChanged!=`function`){ru.count(`ok/editor/binding-guard-disarmed`,{docName:n,reason:`no-prosemirror-changed`}),console.warn(`[binding-staleness-guard] ySync binding on "${n}" exposes no _prosemirrorChanged — write-back gate disarmed (vendored y-tiptap contract change?)`);return}if(u.has(t))return;u.add(t);let r=t._prosemirrorChanged.bind(t);t._prosemirrorChanged=e=>{LD(i,a)||r(e)}},f=()=>{if(c=!1,!s||o||!LD(i,a)||l!==null&&WD(l.state))return;o=!0;let e=Date.now();for(let[t,n]of HD)n.every(t=>e-t>=BD)&&HD.delete(t);let t=(HD.get(n)??[]).filter(t=>e-t<BD);if(!VD(t,e)){HD.set(n,t),ru.count(`ok/editor/binding-wedge-rate-capped`,{docName:n}),console.warn(`[binding-staleness-guard] wedge on "${n}" rate-capped (externalSeq=${i}, appliedSeq=${a}) — publication gate stays closed, no further recycle`);return}t.push(e),HD.set(n,t),console.warn(`[binding-staleness-guard] wedged binding on "${n}" — Y→PM apply missing (externalSeq=${i}, appliedSeq=${a})`);try{r({externalSeq:i,appliedSeq:a})}catch(e){o=!1,ru.count(`ok/editor/binding-wedge-recovery-error`,{docName:n}),console.error(`[binding-staleness-guard] wedge recovery threw for "${n}":`,e)}},p=e=>{e.origin!==dt&&UD(e,t)&&(i+=1,c||(c=!0,queueMicrotask(f)))};return new Ki({state:{init:()=>null,apply:e=>(RD(e.getMeta(dt))&&(a=i,o&&ru.count(`ok/editor/binding-wedge-recovered`,{docName:n}),o=!1),null)},filterTransaction:(e,t)=>!LD(i,a)||WD(t)?!0:e.getMeta(dt)!==void 0,view:e=>{let r=t.doc;return r==null?(ru.count(`ok/editor/binding-guard-disarmed`,{docName:n,reason:`no-ydoc`}),console.error(`[binding-staleness-guard] fragment has no Y.Doc for "${n}" — staleness guard disarmed`),{}):(s=!0,l=e,d(e.state),r.off(`beforeObserverCalls`,p),r.on(`beforeObserverCalls`,p),{destroy:()=>{s=!1,l=null,r.off(`beforeObserverCalls`,p)}})}})}function KD(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),i=Math.min(e.left,t.left),a=Math.max(e.right,t.right)-i,o=r-n;return new DOMRect(i,n,a,o)}var qD=class{constructor({editor:e,element:t,view:n,pluginKey:r=`bubbleMenu`,updateDelay:i=250,resizeDelay:a=60,shouldShow:o,appendTo:s,getReferencedVirtualElement:c,options:l}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:`absolute`,placement:`top`,offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:e,state:t,from:n,to:r})=>{let{doc:i,selection:a}=t,{empty:o}=a,s=!i.textBetween(n,r).length&&ia(t.selection),c=this.element.contains(document.activeElement);return!(!(e.hasFocus()||c)||o||s||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}e?.relatedTarget&&this.element.parentNode?.contains(e.relatedTarget)||e?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(e,t)=>{let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);!n&&!r||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(e,n,r,t)},this.updateDelay))},this.updateHandler=(e,t,n,r)=>{let{composing:i}=e;if(!(i||!t&&!n)){if(!this.getShouldShow(r)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);t===`updatePosition`?this.updatePosition():t&&typeof t==`object`&&t.type===`updateOptions`?this.updateOptions(t.options):t===`hide`?this.hide():t===`show`&&(this.updatePosition(),this.show())},this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=a,this.appendTo=s,this.scrollTarget=l?.scrollTarget??window,this.getReferencedVirtualElement=c,this.floatingUIOptions={...this.floatingUIOptions,...l},this.element.tabIndex=0,o&&(this.shouldShow=o),this.element.addEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener(`dragstart`,this.dragstartHandler),this.editor.on(`focus`,this.focusHandler),this.editor.on(`blur`,this.blurHandler),this.editor.on(`transaction`,this.transactionHandler),window.addEventListener(`resize`,this.resizeHandler),this.scrollTarget.addEventListener(`scroll`,this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Xn(typeof this.floatingUIOptions.flip==`boolean`?void 0:this.floatingUIOptions.flip)),this.floatingUIOptions.shift&&e.push(ar(typeof this.floatingUIOptions.shift==`boolean`?void 0:this.floatingUIOptions.shift)),this.floatingUIOptions.offset&&e.push($n(typeof this.floatingUIOptions.offset==`boolean`?void 0:this.floatingUIOptions.offset)),this.floatingUIOptions.arrow&&e.push(ir(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Zn(typeof this.floatingUIOptions.size==`boolean`?void 0:this.floatingUIOptions.size)),this.floatingUIOptions.autoPlacement&&e.push(er(typeof this.floatingUIOptions.autoPlacement==`boolean`?void 0:this.floatingUIOptions.autoPlacement)),this.floatingUIOptions.hide&&e.push(tr(typeof this.floatingUIOptions.hide==`boolean`?void 0:this.floatingUIOptions.hide)),this.floatingUIOptions.inline&&e.push(rr(typeof this.floatingUIOptions.inline==`boolean`?void 0:this.floatingUIOptions.inline)),e}get virtualElement(){let{selection:e}=this.editor.state,t=this.getReferencedVirtualElement?.call(this);if(t)return t;if(!this.view?.dom?.parentNode)return;let n=ea(this.view,e.from,e.to),r={getBoundingClientRect:()=>n,getClientRects:()=>[n]};if(e instanceof fa){let t=this.view.nodeDOM(e.from),n=t.dataset.nodeViewWrapper?t:t.querySelector(`[data-node-view-wrapper]`);n&&(t=n),t&&(r={getBoundingClientRect:()=>t.getBoundingClientRect(),getClientRects:()=>[t.getBoundingClientRect()]})}if(e instanceof Ea){let{$anchorCell:t,$headCell:n}=e,i=t?t.pos:n.pos,a=n?n.pos:t.pos,o=this.view.nodeDOM(i),s=this.view.nodeDOM(a);if(!o||!s)return;let c=o===s?o.getBoundingClientRect():KD(o.getBoundingClientRect(),s.getBoundingClientRect());r={getBoundingClientRect:()=>c,getClientRects:()=>[c]}}return r}updatePosition(){if(!this.isVisible)return;let e=this.virtualElement;e&&Qn(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:n,middlewareData:r})=>{if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(r.hide?.referenceHidden||r.hide?.escaped){this.element.style.visibility=`hidden`;return}this.element.style.visibility=`visible`,this.element.style.width=`max-content`,this.element.style.position=n,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let i=!t?.selection.eq(e.state.selection),a=!t?.doc.eq(e.state.doc);this.updateHandler(e,i,a,t)}getShouldShow(e){let{state:t}=this.view,{selection:n}=t,{ranges:r}=n,i=Math.min(...r.map(e=>e.$from.pos)),a=Math.max(...r.map(e=>e.$to.pos));return this.shouldShow?.call(this,{editor:this.editor,element:this.element,view:this.view,state:t,oldState:e,from:i,to:a})||!1}show(){var e;this.isVisible||(this.element.style.visibility=`visible`,this.element.style.opacity=`1`,(e=(typeof this.appendTo==`function`?this.appendTo():this.appendTo)??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0)}hide(){this.isVisible&&=(this.element.style.visibility=`hidden`,this.element.style.opacity=`0`,this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),!1)}updateOptions(e){if(e.updateDelay!==void 0&&(this.updateDelay=e.updateDelay),e.resizeDelay!==void 0&&(this.resizeDelay=e.resizeDelay),e.appendTo!==void 0&&(this.appendTo=e.appendTo),e.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=e.getReferencedVirtualElement),e.shouldShow!==void 0&&e.shouldShow&&(this.shouldShow=e.shouldShow),e.options!==void 0){let t=e.options.scrollTarget??window;t!==this.scrollTarget&&(this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.scrollTarget=t,this.scrollTarget.addEventListener(`scroll`,this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}destroy(){this.hide(),this.element.removeEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener(`dragstart`,this.dragstartHandler),window.removeEventListener(`resize`,this.resizeHandler),this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.editor.off(`focus`,this.focusHandler),this.editor.off(`blur`,this.blurHandler),this.editor.off(`transaction`,this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},JD=e=>new Ki({key:typeof e.pluginKey==`string`?new ui(e.pluginKey):e.pluginKey,view:t=>new qD({view:t,...e})});Xi.create({name:`bubbleMenu`,addOptions(){return{element:null,pluginKey:`bubbleMenu`,updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[JD({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var YD=class{constructor({editor:e,element:t,view:n,pluginKey:r=`floatingMenu`,updateDelay:i=250,resizeDelay:a=60,options:o,appendTo:s,shouldShow:c}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:e,state:t})=>{let{selection:n}=t,{$anchor:r,empty:i}=n,a=r.depth===1,o=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent&&r.parent.childCount===0&&!this.getTextContent(r.parent);return!(!e.hasFocus()||!i||!a||!o||!this.editor.isEditable)},this.floatingUIOptions={strategy:`absolute`,placement:`right`,offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(e,t,n,r)=>{let{composing:i}=e;if(!(i||!t&&!n)){if(!this.getShouldShow(r)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{if(this.preventHide){this.preventHide=!1;return}e?.relatedTarget&&this.element.parentNode?.contains(e.relatedTarget)||e?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);t===`updatePosition`?this.updatePosition():t&&typeof t==`object`&&t.type===`updateOptions`?this.updateOptions(t.options):t===`hide`?this.hide():t===`show`&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=a,this.appendTo=s,this.scrollTarget=o?.scrollTarget??window,this.floatingUIOptions={...this.floatingUIOptions,...o},this.element.tabIndex=0,c&&(this.shouldShow=c),this.element.addEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.editor.on(`focus`,this.focusHandler),this.editor.on(`blur`,this.blurHandler),this.editor.on(`transaction`,this.transactionHandler),window.addEventListener(`resize`,this.resizeHandler),this.scrollTarget.addEventListener(`scroll`,this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return ki(e,{textSerializers:Fi(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push(Xn(typeof this.floatingUIOptions.flip==`boolean`?void 0:this.floatingUIOptions.flip)),this.floatingUIOptions.shift&&e.push(ar(typeof this.floatingUIOptions.shift==`boolean`?void 0:this.floatingUIOptions.shift)),this.floatingUIOptions.offset&&e.push($n(typeof this.floatingUIOptions.offset==`boolean`?void 0:this.floatingUIOptions.offset)),this.floatingUIOptions.arrow&&e.push(ir(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(Zn(typeof this.floatingUIOptions.size==`boolean`?void 0:this.floatingUIOptions.size)),this.floatingUIOptions.autoPlacement&&e.push(er(typeof this.floatingUIOptions.autoPlacement==`boolean`?void 0:this.floatingUIOptions.autoPlacement)),this.floatingUIOptions.hide&&e.push(tr(typeof this.floatingUIOptions.hide==`boolean`?void 0:this.floatingUIOptions.hide)),this.floatingUIOptions.inline&&e.push(rr(typeof this.floatingUIOptions.inline==`boolean`?void 0:this.floatingUIOptions.inline)),e}getShouldShow(e){let{state:t}=this.view,{selection:n}=t,{ranges:r}=n,i=Math.min(...r.map(e=>e.$from.pos)),a=Math.max(...r.map(e=>e.$to.pos));return this.shouldShow?.call(this,{editor:this.editor,view:this.view,state:t,oldState:e,from:i,to:a})}updateOptions(e){if(e.updateDelay!==void 0&&(this.updateDelay=e.updateDelay),e.resizeDelay!==void 0&&(this.resizeDelay=e.resizeDelay),e.appendTo!==void 0&&(this.appendTo=e.appendTo),e.shouldShow!==void 0&&e.shouldShow&&(this.shouldShow=e.shouldShow),e.options!==void 0){let t=e.options.scrollTarget??window;t!==this.scrollTarget&&(this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.scrollTarget=t,this.scrollTarget.addEventListener(`scroll`,this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}updatePosition(){let{selection:e}=this.editor.state,t=ea(this.view,e.from,e.to);Qn({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:n,middlewareData:r})=>{if(r.hide?.referenceHidden||r.hide?.escaped){this.element.style.visibility=`hidden`;return}this.element.style.visibility=`visible`,this.element.style.width=`max-content`,this.element.style.position=n,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;this.isVisible||(this.element.style.visibility=`visible`,this.element.style.opacity=`1`,(e=(typeof this.appendTo==`function`?this.appendTo():this.appendTo)??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0)}hide(){this.isVisible&&=(this.element.style.visibility=`hidden`,this.element.style.opacity=`0`,this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),!1)}destroy(){this.hide(),this.element.removeEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),window.removeEventListener(`resize`,this.resizeHandler),this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.editor.off(`focus`,this.focusHandler),this.editor.off(`blur`,this.blurHandler),this.editor.off(`transaction`,this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},XD=e=>new Ki({key:typeof e.pluginKey==`string`?new ui(e.pluginKey):e.pluginKey,view:t=>new YD({view:t,...e})});Xi.create({name:`floatingMenu`,addOptions(){return{element:null,options:{},pluginKey:`floatingMenu`,updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:e,dispatch:t})=>(t&&e.setMeta(this.options.pluginKey,`updatePosition`),!0)}},addProseMirrorPlugins(){return this.options.element?[XD({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function ZD(e,t){return e??new ui(t)}var QD=typeof window<`u`?Q.useLayoutEffect:Q.useEffect,$D=new Set([`left`,`opacity`,`position`,`top`,`visibility`,`width`]),eO=new Set(`animationIterationCount.aspectRatio.borderImageOutset.borderImageSlice.borderImageWidth.columnCount.columns.fillOpacity.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineClamp.lineHeight.opacity.order.orphans.scale.stopOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeOpacity.strokeWidth.tabSize.widows.zIndex.zoom`.split(`.`)),tO=new Set([`children`,`className`,`style`]),nO=new Set([`tabIndex`]),rO=new Set([`accessKey`,`autoCapitalize`,`contentEditable`,`contextMenu`,`dir`,`draggable`,`enterKeyHint`,`hidden`,`id`,`lang`,`nonce`,`role`,`slot`,`spellCheck`,`tabIndex`,`title`,`translate`]),iO={Blur:`focusout`,DoubleClick:`dblclick`,Focus:`focusin`,MouseEnter:`mouseenter`,MouseLeave:`mouseleave`};function aO(e,t){return/^on[A-Z]/.test(e)&&typeof t==`function`}function oO(e){return e.startsWith(`aria-`)||e.startsWith(`data-`),e}function sO(e){return e.startsWith(`aria-`)||e.startsWith(`data-`)||rO.has(e)}function cO(e){return e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function lO(e){let t=e.endsWith(`Capture`),n=(t?e.slice(0,-7):e).slice(2);return{eventName:iO[n]??n.toLowerCase(),options:t?{capture:!0}:void 0}}function uO(e,t){let n=t.defaultPrevented,r=!1,i=Object.create(t);return Object.defineProperties(i,{nativeEvent:{value:t},currentTarget:{value:e},target:{value:t.target},persist:{value:()=>void 0},isDefaultPrevented:{value:()=>n},isPropagationStopped:{value:()=>r},preventDefault:{value:()=>{n=!0,t.preventDefault()}},stopPropagation:{value:()=>{r=!0,t.stopPropagation()}}}),i}function dO(e){return nO.has(e)}function fO(e,t,n){if(t===`tabIndex`){e.tabIndex=Number(n);return}e[t]=n}function pO(e,t){if(t===`tabIndex`){e.removeAttribute(`tabindex`);return}let n=e[t];if(typeof n==`boolean`){e[t]=!1;return}if(typeof n==`number`){e[t]=0;return}e[t]=``}function mO(e,t){return typeof t!=`number`||t===0||e.startsWith(`--`)||eO.has(e)?String(t):`${t}px`}function hO(e,t){$D.has(t)||e.style.removeProperty(cO(t))}function gO(e,t,n){$D.has(t)||e.style.setProperty(cO(t),mO(t,n))}function _O(e,t,n){new Set([...Object.keys(t),...Object.keys(n)]).forEach(r=>{if(tO.has(r)||!sO(r)||aO(r,t[r])||aO(r,n[r]))return;let i=t[r],a=n[r];if(i===a)return;let o=oO(r);if(a==null||a===!1){dO(r)&&pO(e,r),e.removeAttribute(o);return}if(a===!0){dO(r)&&fO(e,r,!0),e.setAttribute(o,``);return}if(dO(r)){fO(e,r,a);return}e.setAttribute(o,String(a))})}function vO(e,t,n){if(t!==n){if(n){e.className=n;return}e.removeAttribute(`class`)}}function yO(e,t,n){let r=t??{},i=n??{};new Set([...Object.keys(r),...Object.keys(i)]).forEach(t=>{let n=r[t],a=i[t];if(n!==a){if(a==null){hO(e,t);return}gO(e,t,a)}})}function bO(e,t,n){t.forEach(({eventName:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)});let r=[];return Object.entries(n).forEach(([t,n])=>{if(!aO(t,n))return;let{eventName:i,options:a}=lO(t),o=t=>{n(uO(e,t))};e.addEventListener(i,o,a),r.push({eventName:i,listener:o,options:a})}),r}function xO(e,t){let n=(0,Q.useRef)({}),r=(0,Q.useRef)([]);QD(()=>{let i=n.current;return vO(e,i.className,t.className),yO(e,i.style,t.style),_O(e,i,t),r.current=bO(e,r.current,t),n.current=t,()=>{r.current.forEach(({eventName:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)}),r.current=[]}},[e,t])}var SO=Q.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:a=null,getReferencedVirtualElement:o,options:s,children:c,...l},u)=>{let d=(0,Q.useRef)(document.createElement(`div`)),f=(0,Q.useRef)(ZD(e,`bubbleMenu`)).current;xO(d.current,l),typeof u==`function`?u(d.current):u&&(u.current=d.current);let{editor:p}=yn(),m=t||p,h={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:f,shouldShow:a,getReferencedVirtualElement:o,options:s},g=(0,Q.useRef)(h);g.current=h;let[_,v]=(0,Q.useState)(!1),y=(0,Q.useRef)(!0);return(0,Q.useEffect)(()=>{if(m?.isDestroyed)return;if(!m){console.warn(`BubbleMenu component is not rendered inside of an editor component or does not have editor prop.`);return}let e=d.current;e.style.visibility=`hidden`,e.style.position=`absolute`;let t=JD({...g.current,editor:m,element:e});m.registerPlugin(t);let n=g.current.pluginKey;return y.current=!0,v(!0),()=>{v(!1),m.unregisterPlugin(n),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[m]),(0,Q.useEffect)(()=>{if(!(!_||!m||m.isDestroyed)){if(y.current){y.current=!1;return}m.view.dispatch(m.state.tr.setMeta(f,{type:`updateOptions`,options:g.current}))}},[_,m,n,r,a,s,i,o,f]),(0,Yw.createPortal)(c,d.current)});Q.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:a=null,options:o,children:s,...c},l)=>{let u=(0,Q.useRef)(document.createElement(`div`)),d=(0,Q.useRef)(ZD(e,`floatingMenu`)).current;xO(u.current,c),typeof l==`function`?l(u.current):l&&(l.current=u.current);let{editor:f}=yn(),p=t||f,m={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:d,shouldShow:a,options:o},h=(0,Q.useRef)(m);h.current=m;let[g,_]=(0,Q.useState)(!1),v=(0,Q.useRef)(!0);return(0,Q.useEffect)(()=>{if(p?.isDestroyed)return;if(!p){console.warn(`FloatingMenu component is not rendered inside of an editor component or does not have editor prop.`);return}let e=u.current;e.style.visibility=`hidden`,e.style.position=`absolute`;let t=XD({...h.current,editor:p,element:e});p.registerPlugin(t);let n=h.current.pluginKey;return v.current=!0,_(!0),()=>{_(!1),p.unregisterPlugin(n),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[p]),(0,Q.useEffect)(()=>{if(!(!g||!p||p.isDestroyed)){if(v.current){v.current=!1;return}p.view.dispatch(p.state.tr.setMeta(d,{type:`updateOptions`,options:h.current}))}},[g,p,n,r,a,o,i,d]),(0,Yw.createPortal)(s,u.current)});var CO=[{name:`paragraph`,label:`Text`,icon:eg,isActive:e=>e.isActive(`paragraph`)&&!e.isActive(`list`),command:e=>e.chain().focus().setParagraph().run()},{name:`heading1`,label:`Heading 1`,icon:Oe,isActive:e=>e.isActive(`heading`,{level:1}),command:e=>e.chain().focus().toggleHeading({level:1}).run()},{name:`heading2`,label:`Heading 2`,icon:Je,isActive:e=>e.isActive(`heading`,{level:2}),command:e=>e.chain().focus().toggleHeading({level:2}).run()},{name:`heading3`,label:`Heading 3`,icon:ze,isActive:e=>e.isActive(`heading`,{level:3}),command:e=>e.chain().focus().toggleHeading({level:3}).run()},{name:`bulletList`,label:`Bullet List`,icon:ie,isActive:e=>e.isActive(`list`,{ordered:!1})&&!e.isActive(`listItem`,{checked:!0})&&!e.isActive(`listItem`,{checked:!1}),command:e=>e.chain().focus().toggleBulletList().run()},{name:`orderedList`,label:`Ordered List`,icon:L,isActive:e=>e.isActive(`list`,{ordered:!0}),command:e=>e.chain().focus().toggleOrderedList().run()},{name:`taskList`,label:`Task List`,icon:ce,isActive:e=>e.isActive(`listItem`,{checked:!0})||e.isActive(`listItem`,{checked:!1}),command:e=>e.chain().focus().toggleTaskList().run()},{name:`blockquote`,label:`Quote`,icon:C,isActive:e=>e.isActive(`blockquote`),command:e=>e.chain().focus().toggleBlockquote().run()},{name:`codeBlock`,label:`Code Block`,icon:dg,isActive:e=>e.isActive(`codeBlock`),command:e=>e.chain().focus().toggleCodeBlock({language:`js`}).run()}];function wO(e){let t=(0,$.c)(18),{editor:n}=e,r;t[0]===n?r=t[1]:(r={editor:n,selector:TO},t[0]=n,t[1]=r);let{current:i,activeStates:a}=Gn(r),o=i.icon,s;t[2]===o?s=t[3]:(s=(0,Z.jsx)(o,{className:`size-3.5`}),t[2]=o,t[3]=s);let c;t[4]===i.label?c=t[5]:(c=(0,Z.jsx)(`span`,{children:i.label}),t[4]=i.label,t[5]=c);let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(Lo,{className:`size-3 opacity-50`}),t[6]=l):l=t[6];let u;t[7]!==s||t[8]!==c?(u=(0,Z.jsx)(Dr,{asChild:!0,children:(0,Z.jsxs)(Y,{variant:`ghost`,size:`sm`,className:`gap-1 px-2 text-sm font-medium text-accent-foreground/80`,children:[s,c,l]})}),t[7]=s,t[8]=c,t[9]=u):u=t[9];let d;t[10]!==a||t[11]!==n?(d=CO.map(e=>{let t=e.icon,r=a[e.name];return(0,Z.jsxs)(Cr,{className:r?`bg-accent text-accent-foreground`:``,onSelect:()=>{e.command(n)},children:[(0,Z.jsx)(t,{className:`size-4`}),(0,Z.jsx)(`span`,{children:e.label})]},e.name)}),t[10]=a,t[11]=n,t[12]=d):d=t[12];let f;t[13]===d?f=t[14]:(f=(0,Z.jsx)(jr,{align:`start`,sideOffset:8,className:`w-44 max-h-(--radix-dropdown-menu-content-available-height) overflow-y-auto subtle-scrollbar`,children:d}),t[13]=d,t[14]=f);let p;return t[15]!==u||t[16]!==f?(p=(0,Z.jsxs)(Nr,{children:[u,f]}),t[15]=u,t[16]=f,t[17]=p):p=t[17],p}function TO(e){let t=Object.fromEntries(CO.map(t=>[t.name,t.isActive(e.editor)]));return{current:CO.find(e=>t[e.name])??CO[0],activeStates:t}}var EO=`0 2px 4px rgba(0, 0, 0, 0.08)`,DO=150,OO=globalThis.ScrollTimeline;function kO(e,t,n,r,i){let a=r-i;if(a<=0)return null;let o=e+n-(t+56);return{startOffset:o,endOffset:o+a,maxShift:a}}var AO=new WeakMap;function jO(e){let t=AO.get(e);if(t){for(let e of t.animations)e.cancel();AO.delete(e)}}function MO(e){for(let t of Array.from(e.cells))jO(t)}var NO=e=>e.cellIndex===0?`3`:`2`;function PO(e,t){return FO(e,t,e=>({transform:`translateY(${e}px)`}))}function FO(e,t,n){if(!(t>0))return[{offset:0,...n(0)},{offset:1,...n(0)}];let r=t=>Math.max(0,Math.min(t-e.startOffset,e.maxShift));return Array.from(new Set([0,e.startOffset/t,e.endOffset/t,1].map(e=>Math.max(0,Math.min(e,1))))).sort((e,t)=>e-t).map(e=>({offset:e,...n(r(e*t))}))}function IO(e,t,n,r){if(!(t>0))return[{...n,offset:0},{...n,offset:1}];let i=e.startOffset/t;if(i<=0)return[{...r,offset:0},{...r,offset:1}];if(i>=1)return[{...n,offset:0},{...n,offset:1}];let a=Math.min(i+1/t,1);return[{...n,offset:0},{...n,offset:i},{...r,offset:a},{...r,offset:1}]}function LO(e,t,n){return IO(e,t,{zIndex:`auto`,boxShadow:`none`},{zIndex:n,boxShadow:EO})}function RO(e,t){return IO(e,t,{opacity:`0`},{opacity:`1`})}function zO(e,t,n,r){let i=NO(e),a=`sd|${n.startOffset}|${n.maxShift}|${r}|${i}`,o=AO.get(e);if(o?.key===a)return;if(o)for(let e of o.animations)e.cancel();let s={timeline:t,fill:`both`,easing:`linear`},c=e.animate(PO(n,r),s),l=e.animate(LO(n,r,i),s),u=e.animate(RO(n,r),{...s,pseudoElement:`::before`});AO.set(e,{key:a,animations:[c,l,u]})}function BO(e,t){let n=NO(e),r=`in|${t}|${n}`,i=AO.get(e);if(i?.key===r)return;if(i)for(let e of i.animations)e.cancel();let a=e.animate([{transform:`translateY(${t}px)`,zIndex:n,boxShadow:EO}],{duration:0,fill:`forwards`}),o=e.animate([{opacity:`1`}],{duration:0,fill:`forwards`,pseudoElement:`::before`});AO.set(e,{key:r,animations:[a,o]})}function VO(e,t,n,r){let i=e.getBoundingClientRect().top,a=e.scrollTop,o=e.scrollHeight-e.clientHeight,s=t.querySelectorAll(`.tableWrapper`);for(let e of s){r?.(e);let t=e.querySelector(`table`);if(!t)continue;let s=t.querySelector(`tbody`)?.rows[0];if(!s||!Array.from(s.cells).some(e=>e.tagName===`TH`))continue;let c=t.getBoundingClientRect(),l=s.getBoundingClientRect(),u=kO(a,i,c.top,c.height,l.height);if(!u){MO(s);continue}if(n){if(o<=0){MO(s);continue}for(let e of Array.from(s.cells))zO(e,n,u,o);continue}let d=Math.max(0,Math.min(a-u.startOffset,u.maxShift));if(d<=0||c.bottom<=i+56){MO(s);continue}for(let e of Array.from(s.cells))BO(e,d)}}var HO=Xi.create({name:`frozenTableHeaders`,addProseMirrorPlugins(){return[new Ki({key:new ui(`frozenTableHeaders`),view(e){let t=null,n=null,r=null,i=null,a=null,o=!1,s=new Set,c=()=>{o||!t||VO(t,e.dom,n,u)},l=()=>{r??=requestAnimationFrame(()=>{r=null,c()})};function u(e){s.has(e)||(s.add(e),e.addEventListener(`contentvisibilityautostatechange`,l))}let d=()=>{if(n){i??l(),i!=null&&clearTimeout(i),i=setTimeout(()=>{i=null,c()},DO);return}l()};return requestAnimationFrame(()=>{if(!o){if(t=e.dom.closest(`[data-testid="editor-scroll-container"]`),t&&OO)try{n=new OO({source:t,axis:`block`})}catch{n=null}t?.addEventListener(`scroll`,d,{passive:!0}),t&&typeof ResizeObserver<`u`&&(a=new ResizeObserver(l),a.observe(t),a.observe(e.dom)),c()}}),{update(e,t){t.doc.eq(e.state.doc)||c()},destroy(){o=!0,t?.removeEventListener(`scroll`,d),a?.disconnect(),r!=null&&cancelAnimationFrame(r),i!=null&&clearTimeout(i);for(let e of s)e.removeEventListener(`contentvisibilityautostatechange`,l);s.clear();for(let t of e.dom.querySelectorAll(`.tableWrapper > table > tbody > tr:first-child`))MO(t)}}}})]}});function UO(e){return()=>{let t=null;try{t=e.view.dom.closest(`.editor-doc-scroll`)}catch{}let n={top:56,bottom:WO(`--ask-composer-height`)+WO(`--conflict-footer-height`)};return t?{boundary:t,padding:n}:{padding:n}}}function WO(e){let t=Number.parseFloat(document.documentElement.style.getPropertyValue(e));return Number.isFinite(t)?t:0}function GO(e){let t=e.state.selection.node;if(!t||t.type.name!==`jsxComponent`)return null;let n=t.attrs.componentName;if(n!==`File`&&n!==`WikiEmbedFile`)return null;let r=(t.attrs.props??{}).src;return typeof r!=`string`||r.length===0?null:r}function KO(e){let t=e.state.selection.node;if(!t)return``;let n=t.attrs.props??{},r=typeof n.alias==`string`?n.alias:``;if(r.length>0)return r;let i=typeof n.name==`string`?n.name:``;return i.length>0?i:R(typeof n.src==`string`?n.src:``)}function qO(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,n.rel=`noopener noreferrer`,n.style.display=`none`,document.body.appendChild(n),n.click(),n.remove()}function JO(e){let t=(0,$.c)(13),{editor:n}=e,{_:r}=ht(),i;if(t[0]===n?i=t[1]:(i={editor:n,selector:YO},t[0]=n,t[1]=i),Gn(i)===null)return null;let a;t[2]===r?a=t[3]:(a=r({id:`WcWS__`}),t[2]=r,t[3]=a);let o;t[4]===n?o=t[5]:(o=e=>{e.preventDefault();let t=GO(n);t&&qO(t,KO(n))},t[4]=n,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(tc,{className:`size-3.5`}),t[6]=s):s=t[6];let c;t[7]!==a||t[8]!==o?(c=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-xs`,"aria-label":a,className:`text-accent-foreground`,onMouseDown:o,children:s})}),t[7]=a,t[8]=o,t[9]=c):c=t[9];let l;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(on,{side:`bottom`,sideOffset:8,children:(0,Z.jsx)(q,{id:`WcWS__`})}),t[10]=l):l=t[10];let u;return t[11]===c?u=t[12]:(u=(0,Z.jsx)(`div`,{className:`flex items-center gap-0.5`,children:(0,Z.jsxs)(cn,{children:[c,l]})}),t[11]=c,t[12]=u),u}function YO(e){return GO(e.editor)}function XO(e){return GO(e)!==null}var ZO=`img, .ok-embed, .ok-video`,QO=220,$O=`cubic-bezier(0.23, 1, 0.32, 1)`,ek=`ok-image-align-flip`,tk=.5;function nk(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function rk(){return typeof requestAnimationFrame==`function`}function ik(e){return e?e.querySelector(ZO):null}function ak(e,t){if(nk()||!rk()){t();return}let n=ik(e);if(!n){t();return}let r=n.getBoundingClientRect().left;t(),requestAnimationFrame(()=>{let t=ik(e);if(!t)return;for(let e of t.getAnimations())e.id===ek&&e.cancel();let n=r-t.getBoundingClientRect().left;if(Math.abs(n)<tk)return;let i=t.animate([{transform:`translateX(${n}px)`},{transform:`translateX(0)`}],{duration:QO,easing:$O,fill:`none`});i.id=ek})}var ok=[{value:`left`,label:`Align left`,icon:bg},{value:`center`,label:`Align center`,icon:vg},{value:`right`,label:`Align right`,icon:yg}];function sk(e){let t=e.state.selection.node;if(!t||t.type.name!==`jsxComponent`)return null;let n=t.attrs.componentName;if(!it.has(String(n)))return null;let r=(t.attrs.props??{}).align;return r===`left`||r===`right`||r===`center`?r:`center`}function ck(e){let t=(0,$.c)(7),{editor:n}=e,r;t[0]===n?r=t[1]:(r={editor:n,selector:lk},t[0]=n,t[1]=r);let i=Gn(r);if(i===null)return null;let a;t[2]!==i||t[3]!==n?(a=ok.map(e=>{let{value:t,label:r,icon:a}=e,o=i===t;return(0,Z.jsxs)(cn,{children:[(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-xs`,"aria-label":r,"aria-pressed":o,className:o?`bg-accent text-primary`:`text-accent-foreground`,onMouseDown:e=>{e.preventDefault();let r=n.state.selection,i=r.node;if(!i||i.type.name!==`jsxComponent`)return;let a=String(i.attrs.componentName??``);if(!it.has(a)||i.attrs.kind!==`element`)return;let o=a===`CommonMarkImage`,s=r.from,c={...i.attrs.props??{},align:t},l=o?{...i.attrs,componentName:`img`,props:c,sourceDirty:!0}:{...i.attrs,props:c,sourceDirty:!0},u=n.state.tr.setNodeMarkup(s,null,l);u.setSelection(fa.create(u.doc,s)),ak(n.view.nodeDOM(s),()=>{n.view.dispatch(u)})},children:(0,Z.jsx)(a,{className:`size-3.5`})})}),(0,Z.jsx)(on,{side:`bottom`,sideOffset:8,children:r})]},t)}),t[2]=i,t[3]=n,t[4]=a):a=t[4];let o;return t[5]===a?o=t[6]:(o=(0,Z.jsx)(`div`,{className:`flex items-center gap-0.5`,children:a}),t[5]=a,t[6]=o),o}function lk(e){return sk(e.editor)}function uk(e){return sk(e)!==null}function dk({editor:e}){if(te(e.state).query||e.isActive(`codeBlock`))return!1;if(uk(e)||XO(e))return!0;if(e.state.selection.empty)return!1;let{from:t,to:n}=e.state.selection;return!!e.state.doc.textBetween(t,n,` `).trim()}function fk(e){throw Error(`Unhandled AddLinkShortcutAction variant: ${JSON.stringify(e)}`)}function pk(e){let{selection:t}=e.state;if(t.empty){if(!e.isActive(`link`))return null;let n=K(e.state,t.from,`link`);return n===null?null:{kind:`edit-link`,markId:n}}return!dk({editor:e})||uk(e)||XO(e)?null:{kind:`open-popover`}}function mk(e,t){return ha({relativePath:Qs(e),instruction:``,selectionMarkdown:t,target:`claude-code`})}function hk(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName.toUpperCase();return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`}function gk(e){let t=(0,$.c)(3),{editor:n,shortcutEnabled:r}=e,i=r===void 0?!1:r;if(Xs())return null;let a;return t[0]!==n||t[1]!==i?(a=(0,Z.jsx)(_k,{editor:n,shortcutEnabled:i}),t[0]=n,t[1]=i,t[2]=a):a=t[2],a}function _k(e){let t=(0,$.c)(11),{editor:n,shortcutEnabled:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=hi(),t[0]=i):i=t[0];let a=i,o,s;t[1]===r?(o=t[2],s=t[3]):(o=()=>{if(!a)return;let e=e=>{r&&xl(e,`edit-with-ai`)&&(hk(e.target)||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),A()))};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},s=[r,a],t[1]=r,t[2]=o,t[3]=s),(0,Q.useEffect)(o,s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(Br,{orientation:`vertical`,className:`mx-0.5 h-5 data-vertical:self-center`}),t[4]=c):c=t[4];let l;t[5]===n?l=t[6]:(l=()=>{let e=Jn(n),t=ot(n);requestAnimationFrame(()=>{if(e===null||t.trim()===``){A();return}qt(mk(e,t))})},t[5]=n,t[6]=l);let u,d;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(qs,{className:`size-3.5`,"aria-hidden":`true`}),d=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`xWEvuo`})}),t[7]=u,t[8]=d):(u=t[7],d=t[8]);let f;return t[9]===l?f=t[10]:(f=(0,Z.jsxs)(Z.Fragment,{children:[c,(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`edit-with-ai-bubble-button`,className:`gap-1 px-2 text-sm font-medium text-accent-foreground/80`,onClick:l,children:[u,d]})]}),t[9]=l,t[10]=f),f}function vk(e){let t=e.schema.nodes;return!!(t.footnoteReference&&t.footnoteDefinition)}function yk(e){let{from:t,to:n}=e.state.selection,r=!1;return e.state.doc.nodesBetween(t,n,e=>e.type.name===`footnoteReference`?(r=!0,!1):!0),r}function bk(e){let{$from:t,$to:n}=e.state.selection;return!t.sameParent(n)}function xk(e){let t=(0,$.c)(21),{editor:n}=e,{_:r}=ht(),i;t[0]===n?i=t[1]:(i={editor:n,selector:Sk},t[0]=n,t[1]=i);let a=Gn(i),o;t[2]!==a||t[3]!==n?(o=()=>{if(a||!vk(n)||n.state.selection.empty||bk(n)||yk(n))return;let{from:e,to:t}=n.state.selection,r=n.state.doc.textBetween(e,t,` `);if(!r.trim())return;let i=Pa(Ca(n.state.doc)),o=Ji(n.state.doc)+1-(t-e);n.chain().focus().deleteSelection().insertFootnoteReference(i).insertContentAt(o,{type:`footnoteDefinition`,attrs:{identifier:i,label:i},content:[{type:`paragraph`,content:[{type:`text`,text:r}]}]}).run()},t[2]=a,t[3]=n,t[4]=o):o=t[4];let s=o,c;t[5]===r?c=t[6]:(c=r({id:`sIGbBZ`}),t[5]=r,t[6]=c);let l;t[7]===s?l=t[8]:(l=e=>{e.preventDefault(),s()},t[7]=s,t[8]=l);let u;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(T,{className:`size-3.5`,"aria-hidden":`true`}),t[9]=u):u=t[9];let d;t[10]!==a||t[11]!==c||t[12]!==l?(d=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-xs`,"data-testid":`footnote-bubble-button`,className:`text-accent-foreground/80`,"aria-label":c,onMouseDown:l,disabled:a,children:u})}),t[10]=a,t[11]=c,t[12]=l,t[13]=d):d=t[13];let f;t[14]===r?f=t[15]:(f=r({id:`sIGbBZ`}),t[14]=r,t[15]=f);let p;t[16]===f?p=t[17]:(p=(0,Z.jsx)(on,{side:`bottom`,sideOffset:8,children:f}),t[16]=f,t[17]=p);let m;return t[18]!==d||t[19]!==p?(m=(0,Z.jsxs)(cn,{children:[d,p]}),t[18]=d,t[19]=p,t[20]=m):m=t[20],m}function Sk(e){let t=e.editor;return!!(!vk(t)||t.state.selection.empty||bk(t)||yk(t))}var Ck=[{name:`bold`,icon:gh,command:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive(`strong`),shortcutId:`format-bold`},{name:`italic`,icon:Bh,command:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive(`emphasis`),shortcutId:`format-italic`},{name:`underline`,icon:Tg,command:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive(`underline`),shortcutId:`format-underline`},{name:`strikethrough`,icon:hg,command:e=>e.chain().focus().toggleStrike().run(),isActive:e=>e.isActive(`strike`),shortcutId:`format-strike`},{name:`code`,icon:Xe,command:e=>e.chain().focus().toggleCode().run(),isActive:e=>e.isActive(`code`),shortcutId:`format-inline-code`},{name:`highlight`,icon:zh,command:e=>e.chain().focus().toggleHighlight().run(),isActive:e=>e.isActive(`highlight`),shortcutId:`format-highlight`}];function wk(e){let t=(0,$.c)(7),{editor:n}=e,r;t[0]===n?r=t[1]:(r={editor:n,selector:Tk},t[0]=n,t[1]=r);let i=Gn(r),a;t[2]!==i||t[3]!==n?(a=Ck.map(e=>{let t=e.icon,r=i[e.name];return(0,Z.jsxs)(cn,{children:[(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-xs`,"aria-label":e.name,className:r?`bg-accent text-primary`:`text-accent-foreground`,onMouseDown:t=>{t.preventDefault(),e.command(n)},children:(0,Z.jsx)(t,{className:`size-3.5`})})}),(0,Z.jsxs)(on,{side:`bottom`,sideOffset:8,children:[(0,Z.jsx)(`span`,{className:`capitalize`,children:e.name}),(0,Z.jsx)(H,{"aria-label":bl(e.shortcutId),children:Ol(e.shortcutId)})]})]},e.name)}),t[2]=i,t[3]=n,t[4]=a):a=t[4];let o;return t[5]===a?o=t[6]:(o=(0,Z.jsx)(`div`,{className:`flex items-center gap-0.5`,children:a}),t[5]=a,t[6]=o),o}function Tk(e){return Object.fromEntries(Ck.map(t=>[t.name,t.isActive(e.editor)]))}var Ek=`open-knowledge:open-link-edit-popover`;function Dk(e=typeof window>`u`?new EventTarget:window){e.dispatchEvent(new CustomEvent(Ek))}function Ok(e,t=typeof window>`u`?new EventTarget:window){let n=()=>e();return t.addEventListener(Ek,n),()=>t.removeEventListener(Ek,n)}function kk(e){return e.state.selection.empty&&e.isActive(`link`)?e.getAttributes(`link`).href??``:``}async function Ak(e,t){let n;try{n=await navigator.clipboard.readText()}catch(e){e instanceof DOMException||console.warn(`[link-popover] clipboard pre-fill read failed unexpectedly`,e);return}let r=je(n);r!==null&&(t(e=>e===``?r:e),requestAnimationFrame(()=>{let t=e.current;t&&t.value===r&&t.select()}))}function jk(e,t,n,r){let i=kk(e);n(i),r(!0),i===``&&Ak(t,n)}function Mk(e){let t=(0,$.c)(72),{editor:n,shortcutEnabled:r}=e,i=r===void 0?!1:r,{_:a}=ht(),[o,s]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(``),u=(0,Q.useRef)(null),{folderPaths:d,loading:f,pages:p}=Vo(),m;t[0]===n?m=t[1]:(m=n.state.selection.empty&&n.isActive(`link`),t[0]=n,t[1]=m);let h=m,g;t[2]===n?g=t[3]:(g=n.getAttributes(`link`).href??``,t[2]=n,t[3]=g);let _=g,y,b;t[4]!==n||t[5]!==i?(y=()=>Ok(()=>{i&&jk(n,u,l,s)}),b=[i,n],t[4]=n,t[5]=i,t[6]=y,t[7]=b):(y=t[6],b=t[7]),(0,Q.useEffect)(y,b);let x,S;t[8]!==n||t[9]!==i?(x=()=>{let e=e=>{if(!i||!xl(e,`add-link`)||!n.editorView?.hasFocus())return;let t=pk(n);if(t!==null)switch(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),t.kind){case`open-popover`:Dk();return;case`edit-link`:{let{markId:e}=t;v(e),requestAnimationFrame(()=>{ft(n).setActiveNode(e)});return}default:fk(t)}};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},S=[i,n],t[8]=n,t[9]=i,t[10]=x,t[11]=S):(x=t[10],S=t[11]),(0,Q.useEffect)(x,S);let C,w;t[12]===n?(C=t[13],w=t[14]):(C=()=>{let e=function(){n.state.selection.empty&&s(!1)};return n.on(`selectionUpdate`,e),()=>{n.off(`selectionUpdate`,e)}},w=[n],t[12]=n,t[13]=C,t[14]=w),(0,Q.useEffect)(C,w);let T,E;t[15]===o?(T=t[16],E=t[17]):(T=()=>{if(!o)return;let e=!1,t=0,n=r=>{if(e)return;let i=u.current;i&&(i.focus(),document.activeElement===i)||(r<60?t=requestAnimationFrame(()=>n(r+1)):console.warn(`[link-popover] URL input never became focusable`))};return t=requestAnimationFrame(()=>n(0)),()=>{e=!0,cancelAnimationFrame(t)}},E=[o],t[15]=o,t[16]=T,t[17]=E),(0,Q.useEffect)(T,E);let D;t[18]!==n||t[19]!==h||t[20]!==c?(D=function(){c.trim()?n.chain().focus().setLink({href:c.trim()}).run():h&&n.chain().focus().unsetLink().run(),s(!1)},t[18]=n,t[19]=h,t[20]=c,t[21]=D):D=t[21];let O=D,k;t[22]===n?k=t[23]:(k=function(){n.chain().focus().unsetLink().run(),s(!1)},t[22]=n,t[23]=k);let A=k,j;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(j=function(e){l(Hn(e.path,null))},t[24]=j):j=t[24];let M=j,N;t[25]!==O||t[26]!==n?(N=function(e){e.key===`Enter`&&(e.preventDefault(),O()),e.key===`Escape`&&(e.preventDefault(),s(!1),n.chain().focus().run())},t[25]=O,t[26]=n,t[27]=N):N=t[27];let P=N;if(o){let e;t[28]===a?e=t[29]:(e=a({id:`ZsGpr_`}),t[28]=a,t[29]=e);let n;t[30]===a?n=t[31]:(n=a({id:`roAe2K`}),t[30]=a,t[31]=n);let r;t[32]!==d||t[33]!==P||t[34]!==f||t[35]!==p||t[36]!==e||t[37]!==n||t[38]!==c?(r=(0,Z.jsx)(ct,{ref:u,type:`text`,placeholder:e,value:c,pages:p,folderPaths:d,loading:f,onValueChange:l,onSuggestionSelect:M,onKeyDown:P,"aria-label":n,className:`h-5 w-44 rounded-none border-none bg-transparent px-0 py-0 text-sm placeholder:text-muted-foreground focus-visible:border-transparent focus-visible:ring-0 dark:bg-transparent`}),t[32]=d,t[33]=P,t[34]=f,t[35]=p,t[36]=e,t[37]=n,t[38]=c,t[39]=r):r=t[39];let i;t[40]===a?i=t[41]:(i=a({id:`tP5DDk`}),t[40]=a,t[41]=i);let o;t[42]===O?o=t[43]:(o=()=>{O()},t[42]=O,t[43]=o);let s;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(Ch,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[44]=s):s=t[44];let m;t[45]!==i||t[46]!==o?(m=(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-xs`,"aria-label":i,onClick:o,children:s}),t[45]=i,t[46]=o,t[47]=m):m=t[47];let g;t[48]!==r||t[49]!==m?(g=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-md border bg-background px-2 py-1 focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50`,children:[r,m]}),t[48]=r,t[49]=m,t[50]=g):g=t[50];let v;t[51]!==a||t[52]!==_||t[53]!==h||t[54]!==A?(v=h&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(cn,{children:[(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-xs`,"aria-label":a({id:`2vIPtm`}),onMouseDown:e=>{e.preventDefault(),Mn(_)},children:(0,Z.jsx)(_o,{className:`size-3.5`})})}),(0,Z.jsx)(on,{side:`bottom`,sideOffset:8,children:(0,Z.jsx)(q,{id:`2vIPtm`})})]}),(0,Z.jsxs)(cn,{children:[(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-xs`,"aria-label":a({id:`484LKL`}),onMouseDown:e=>{e.preventDefault(),A()},children:(0,Z.jsx)(ol,{className:`size-3.5`})})}),(0,Z.jsx)(on,{side:`bottom`,sideOffset:8,children:(0,Z.jsx)(q,{id:`484LKL`})})]})]}),t[51]=a,t[52]=_,t[53]=h,t[54]=A,t[55]=v):v=t[55];let y;return t[56]!==g||t[57]!==v?(y=(0,Z.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[g,v]}),t[56]=g,t[57]=v,t[58]=y):y=t[58],y}let F;t[59]===a?F=t[60]:(F=a({id:`p0Iq25`}),t[59]=a,t[60]=F);let I=h?`bg-accent text-primary`:`text-accent-foreground`,L;t[61]===n?L=t[62]:(L=e=>{e.preventDefault(),jk(n,u,l,s)},t[61]=n,t[62]=L);let R;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Z.jsx)(Hh,{className:`size-3.5`}),t[63]=R):R=t[63];let z;t[64]!==F||t[65]!==I||t[66]!==L?(z=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-xs`,"aria-label":F,className:I,onMouseDown:L,children:R})}),t[64]=F,t[65]=I,t[66]=L,t[67]=z):z=t[67];let B;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,Z.jsx)(q,{id:`yzF66j`}),t[68]=B):B=t[68];let V;t[69]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,Z.jsxs)(on,{side:`bottom`,sideOffset:8,children:[B,(0,Z.jsx)(H,{children:Ol(`add-link`)})]}),t[69]=V):V=t[69];let U;return t[70]===z?U=t[71]:(U=(0,Z.jsxs)(cn,{children:[z,V]}),t[70]=z,t[71]=U),U}function Nk(e){let t=(0,$.c)(30),{editor:n,shortcutEnabled:r}=e,i=r===void 0?!0:r,a=(0,Q.useRef)(null),[o,s]=(0,Q.useState)(0),c=(0,Q.useRef)(null),l;t[0]===n?l=t[1]:(l={editor:n,selector:Rk},t[0]=n,t[1]=l);let u=Gn(l),d;t[2]===n?d=t[3]:(d={editor:n,selector:Lk},t[2]=n,t[3]=d);let f=Gn(d),p;t[4]!==n.state||t[5]!==n.view?(p=()=>{try{let{from:e,to:t}=n.state.selection;return ea(n.view,e,t)}catch{return new DOMRect}},t[4]=n.state,t[5]=n.view,t[6]=p):p=t[6];let m;t[7]!==n.view.dom||t[8]!==p?(m={getBoundingClientRect:p,contextElement:n.view.dom},t[7]=n.view.dom,t[8]=p,t[9]=m):m=t[9];let h=m,g;t[10]===n?g=t[11]:(g=UO(n),t[10]=n,t[11]=g);let _=g,v;t[12]!==_||t[13]!==h?(v=()=>{let e=a.current;e&&(c.current?.(),c.current=nr(h,e,()=>{Qn(h,e,{placement:`top`,strategy:`fixed`,middleware:[$n(8),Xn(_),ar({padding:8}),tr(_)]}).then(t=>{let{x:n,y:r,middlewareData:i}=t;e.isConnected&&(e.style.position=`fixed`,e.style.left=`${n}px`,e.style.top=`${r}px`,e.style.visibility=i.hide?.referenceHidden?`hidden`:`visible`)}).catch(Ik)}))},t[12]=_,t[13]=h,t[14]=v):v=t[14];let y=v,b;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>{c.current?.(),c.current=null,s(Fk)},t[15]=b):b=t[15];let x=b,S;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(S={padding:8},t[16]=S):S=t[16];let C;t[17]!==_||t[18]!==y?(C={onShow:y,onHide:x,strategy:`fixed`,flip:_,shift:S,hide:_},t[17]=_,t[18]=y,t[19]=C):C=t[19];let w;t[20]!==n||t[21]!==f||t[22]!==u||t[23]!==i||t[24]!==o?(w=u?(0,Z.jsx)(ck,{editor:n},`${o}-img-align`):f?(0,Z.jsx)(JO,{editor:n},`${o}-file`):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(wO,{editor:n}),(0,Z.jsx)(Br,{orientation:`vertical`,className:`mx-0.5 h-5 data-vertical:self-center`}),(0,Z.jsx)(wk,{editor:n},o),(0,Z.jsx)(Br,{orientation:`vertical`,className:`mx-0.5 h-5 data-vertical:self-center`}),(0,Z.jsx)(Mk,{editor:n,shortcutEnabled:i},`${o}-link`),(0,Z.jsx)(xk,{editor:n},`${o}-footnote`),(0,Z.jsx)(gk,{editor:n,shortcutEnabled:i},`${o}-edit-ai`)]}),t[20]=n,t[21]=f,t[22]=u,t[23]=i,t[24]=o,t[25]=w):w=t[25];let T;return t[26]!==n||t[27]!==C||t[28]!==w?(T=(0,Z.jsx)(SO,{ref:a,editor:n,"data-testid":`bubble-menu-bar`,appendTo:Pk,shouldShow:dk,updateDelay:250,options:C,className:`z-50 flex items-center gap-0.5 rounded-lg border bg-background p-1 shadow-md`,children:w}),t[26]=n,t[27]=C,t[28]=w,t[29]=T):T=t[29],T}function Pk(){return document.body}function Fk(e){return e+1}function Ik(){}function Lk(e){return XO(e.editor)}function Rk(e){return uk(e.editor)}var zk=new ui(`markdownLintDecorations`),Bk=`ok-lint-block`,Vk=`ok-lint-block-error`,Hk=`ok-lint-block-atom`,Uk=400;function Wk(e,t){let{frontmatter:n,body:r}=ba(e),i=n===``?0:n.split(`
|
|
@@ -2018,5 +2018,5 @@ Error generating stack: `+e.message+`
|
|
|
2018
2018
|
:host([${rQ}]) [data-item-focused="true"] {
|
|
2019
2019
|
--trees-focus-ring-color: transparent;
|
|
2020
2020
|
}
|
|
2021
|
-
`}\n${VY}\n${HY}`;function aQ(e){return e===`darwin`?yl._({id:`LtSYdi`}):e===`win32`?yl._({id:`qi1F96`}):yl._({id:`e1Rn_k`})}function oQ(e){let t=(0,$.c)(18),{item:n,workspace:r,onClose:i}=e,{_:a}=ht(),o=typeof window<`u`?window.okDesktop:void 0;if(!o)return null;let s=o.platform,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=aQ(s),t[0]=c):c=t[0];let l=c,u,d;t[1]!==a||t[2]!==r?(u=r?null:a({id:`wTcjov`}),d=a(s===`darwin`?u?{id:`FvpFSZ`,values:{hint:u}}:{id:`LtSYdi`}:s===`win32`?u?{id:`o4dcAf`,values:{hint:u}}:{id:`qi1F96`}:u?{id:`zUhPuR`,values:{hint:u}}:{id:`e1Rn_k`}),t[1]=a,t[2]=r,t[3]=u,t[4]=d):(u=t[3],d=t[4]);let f=d,p=!r,m;t[5]!==n||t[6]!==i||t[7]!==r?(m=()=>{if(!r)return;i();let e=Js(r.contentDir,Df(n),r.pathSeparator);o.shell.showItemInFolder(e)},t[5]=n,t[6]=i,t[7]=r,t[8]=m):m=t[8];let h,g;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(dc,{"aria-hidden":`true`}),g=(0,Z.jsx)(`span`,{className:`flex-1`,children:l}),t[9]=h,t[10]=g):(h=t[9],g=t[10]);let _;t[11]===u?_=t[12]:(_=u?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:u}):null,t[11]=u,t[12]=_);let v;return t[13]!==f||t[14]!==p||t[15]!==m||t[16]!==_?(v=(0,Z.jsxs)(Cr,{disabled:p,onSelect:m,"aria-label":f,children:[h,g,_]}),t[13]=f,t[14]=p,t[15]=m,t[16]=_,t[17]=v):v=t[17],v}function sQ(e){let t=(0,$.c)(69),{item:n,context:r,anyActionBusy:i,workspace:a,handoff:o,model:s,okignoreBinding:c,onStartCreating:l,onCreateFromTemplate:u,onDuplicate:d,onImportTemplate:f,onDelete:p,onExpandSubtree:m,onCollapseSubtree:h,folderTreePaths:g,isAsset:_,documents:v}=e,{_:y}=ht(),b=Tf(n,v),x=n.kind===`directory`,S;t[0]===n.path?S=t[1]:(S=zl(n.path),t[0]=n.path,t[1]=S);let C=S,w=b.kind===`asset`?null:b,T=w!==null&&c!==null,E;t[2]!==y||t[3]!==x?(E=y(x?{id:`5D3Ior`}:{id:`dbhUX1`}),t[2]=y,t[3]=x,t[4]=E):E=t[4];let D=E,O;t[5]!==x||t[6]!==n.path?(O=x?Yf(n.path):null,t[5]=x,t[6]=n.path,t[7]=O):O=t[7];let k=Os(O),A=k.state.status===`ready`?(k.state.data.folder.templates_available?.length??0)>0:!0,j=s.getSelectedPaths(),M=j.includes(b.treePath)?SX(j,v):[],N=M.length>1?M:[b],P=N.length,F=yl._({id:`djjdjr`,values:{deleteCount:P}}),I;t[8]!==v||t[9]!==_||t[10]!==x||t[11]!==n||t[12]!==a?(I=_?null:x?Qo({folderRelativePath:Df(n),workspace:a}):as({docName:Jf(n.path,v),workspace:a}),t[8]=v,t[9]=_,t[10]=x,t[11]=n,t[12]=a,t[13]=I):I=t[13];let L=I,R;t[14]===r?R=t[15]:(R=()=>r.close({restoreFocus:!1}),t[14]=r,t[15]=R);let z=R,B;t[16]===r?B=t[17]:(B=()=>r.close(),t[16]=r,t[17]=B);let V=B,{status:H}=po(),U=H?.hasRemote===!0,W;t[18]!==v||t[19]!==_||t[20]!==x||t[21]!==n.path||t[22]!==b?(W=_||b.kind===`asset`?null:x?Ds(Yf(n.path)):Hs(Jf(n.path,v)),t[18]=v,t[19]=_,t[20]=x,t[21]=n.path,t[22]=b,t[23]=W):W=t[23];let G=W,K=U&&G!==null,ee;t[24]!==y||t[25]!==U||t[26]!==G?(ee=()=>{G&&ms({...G,hasRemote:U,onClickWhenNoRemote:()=>{X.error(y({id:`WyQxwa`}))}},{clipboardWrite:tf,toastSuccess:uQ,toastError:lQ,logEvent:cQ})},t[24]=y,t[25]=U,t[26]=G,t[27]=ee):ee=t[27];let te=ee,ne;t[28]!==K||t[29]!==V||t[30]!==te?(ne=K?(0,Z.jsxs)(Cr,{"data-testid":`file-tree-menu-share`,onSelect:()=>{V(),te()},children:[(0,Z.jsx)(sg,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`Z8lGw6`})]}):null,t[28]=K,t[29]=V,t[30]=te,t[31]=ne):ne=t[31];let re=ne,ie=0,ae=0;if(x){let e=Vf(n.path);for(let t of g)(t===e||t.startsWith(e))&&(ie++,fZ(s.getItem(t))?.isExpanded()&&ae++)}let oe=x&&ae<ie,se=x&&ae>0,ce;t[32]===V?ce=t[33]:(ce=e=>{e||V()},t[32]=V,t[33]=ce);let le;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,Z.jsx)(Dr,{asChild:!0,children:(0,Z.jsx)(`span`,{"aria-hidden":`true`,"data-file-tree-context-menu-root":`true`,className:`block size-px`})}),t[34]=le):le=t[34];let ue;t[35]!==y||t[36]!==i||t[37]!==T||t[38]!==V||t[39]!==z||t[40]!==F||t[41]!==N||t[42]!==A||t[43]!==o||t[44]!==L||t[45]!==D||t[46]!==_||t[47]!==x||t[48]!==C||t[49]!==n||t[50]!==s||t[51]!==c||t[52]!==w||t[53]!==h||t[54]!==u||t[55]!==p||t[56]!==d||t[57]!==m||t[58]!==f||t[59]!==l||t[60]!==re||t[61]!==se||t[62]!==oe||t[63]!==b||t[64]!==a?(ue=(0,Z.jsx)(jr,{sideOffset:0,align:`start`,"data-file-tree-context-menu-root":`true`,className:`min-w-52`,children:x?(0,Z.jsxs)(Z.Fragment,{children:[C?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Cr,{disabled:i,onSelect:()=>{z(),l(`file`,Yf(n.path))},children:[(0,Z.jsx)(nc,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`HdkSiO`})]}),A?(0,Z.jsxs)(wr,{children:[(0,Z.jsxs)(Ar,{disabled:i,children:[(0,Z.jsx)(As,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`Uuj_R4`})]}),(0,Z.jsx)(Tr,{children:(0,Z.jsx)(dZ,{parentDir:Yf(n.path),onSelectTemplate:e=>{z(),u(Yf(n.path),e)},ItemComponent:Cr})})]}):null,(0,Z.jsxs)(Cr,{disabled:i,onSelect:()=>{z(),l(`folder`,Yf(n.path))},children:[(0,Z.jsx)(Ph,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`96G6Re`})]}),(0,Z.jsx)(Pr,{})]}),(0,Z.jsx)(oQ,{item:n,workspace:a,onClose:V}),(0,Z.jsx)(Jo,{input:L,installStates:o.installStates,isElectronHost:o.isElectronHost,dispatch:o.dispatch,onBeforeLaunch:V}),re,(0,Z.jsxs)(wr,{children:[(0,Z.jsxs)(Ar,{children:[(0,Z.jsx)(ec,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`oCZkaG`})]}),(0,Z.jsxs)(Tr,{children:[(0,Z.jsx)(Cr,{disabled:!a,onSelect:()=>{a&&(V(),XZ(Js(a.contentDir,Df(n),a.pathSeparator),`full`))},children:(0,Z.jsx)(q,{id:`oQA-cA`})}),(0,Z.jsx)(Cr,{onSelect:()=>{V(),XZ(Df(n),`relative`)},children:(0,Z.jsx)(q,{id:`s061i4`})})]})]}),oe||se?(0,Z.jsx)(Pr,{}):null,oe?(0,Z.jsxs)(Cr,{onSelect:()=>{V(),m(n.path)},children:[(0,Z.jsx)(Eg,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`OlAl5i`})]}):null,se?(0,Z.jsxs)(Cr,{onSelect:()=>{V(),h(n.path)},children:[(0,Z.jsx)(Mh,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`qvWGzP`})]}):null,C?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Pr,{}),(0,Z.jsxs)(Cr,{disabled:i,onSelect:()=>{b.kind!==`asset`&&(V(),d(b))},children:[(0,Z.jsx)(Gs,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`euc6Ns`})]}),(0,Z.jsxs)(Cr,{disabled:i,onSelect:()=>{z(),s.startRenaming(n.path)},children:[(0,Z.jsx)($s,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`2wxgft`})]}),(0,Z.jsxs)(Cr,{"data-testid":`file-tree-menu-hide`,disabled:!T,onSelect:()=>{if(!c||!w)return;V();let e=fX(w),t=Is(c.current()),n=Bs(t,e);if(n===t)return;c.patch(js(n));let r=w.path.split(`/`).pop()||w.path;X.success(y({id:`4xtLTl`,values:{basename:r}}),{description:y({id:`nWv1ja`}),duration:5e3})},children:[(0,Z.jsx)(Lr,{"aria-hidden":`true`}),D]}),(0,Z.jsxs)(Cr,{variant:`destructive`,disabled:i,onSelect:()=>{V(),p(N)},children:[(0,Z.jsx)(ol,{"aria-hidden":`true`}),F]})]})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(oQ,{item:n,workspace:a,onClose:V}),!_&&(0,Z.jsx)(Jo,{input:L,installStates:o.installStates,isElectronHost:o.isElectronHost,dispatch:o.dispatch,onBeforeLaunch:V}),re,(0,Z.jsxs)(wr,{children:[(0,Z.jsxs)(Ar,{children:[(0,Z.jsx)(ec,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`oCZkaG`})]}),(0,Z.jsxs)(Tr,{children:[(0,Z.jsx)(Cr,{disabled:!a,onSelect:()=>{a&&(V(),XZ(Js(a.contentDir,Df(n),a.pathSeparator),`full`))},children:(0,Z.jsx)(q,{id:`oQA-cA`})}),(0,Z.jsx)(Cr,{onSelect:()=>{V(),XZ(Df(n),`relative`)},children:(0,Z.jsx)(q,{id:`s061i4`})})]})]}),C?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Pr,{}),_?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(wr,{children:[(0,Z.jsxs)(Ar,{disabled:i,children:[(0,Z.jsx)(Ah,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`PYmp-0`})]}),(0,Z.jsxs)(Tr,{children:[(0,Z.jsx)(Cr,{disabled:i,onSelect:()=>{V(),f(b,!1)},children:(0,Z.jsx)(q,{id:`-FeyRg`})}),(0,Z.jsx)(Cr,{disabled:i,onSelect:()=>{V(),f(b,!0)},children:(0,Z.jsx)(q,{id:`dQHSCs`})})]})]}),(0,Z.jsxs)(Cr,{disabled:i,onSelect:()=>{V(),d(b)},children:[(0,Z.jsx)(Gs,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`euc6Ns`})]})]}),(0,Z.jsxs)(Cr,{disabled:i,onSelect:()=>{z(),s.startRenaming(n.path)},children:[(0,Z.jsx)($s,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`2wxgft`})]}),w?(0,Z.jsxs)(Cr,{"data-testid":`file-tree-menu-hide`,disabled:!T,onSelect:()=>{if(!c)return;V();let e=fX(w),t=Is(c.current()),n=Bs(t,e);if(n===t)return;c.patch(js(n));let r=w.path.split(`/`).pop()||w.path;X.success(y({id:`OD0FCX`,values:{basename:r}}),{description:y({id:`nWv1ja`}),duration:5e3})},children:[(0,Z.jsx)(Lr,{"aria-hidden":`true`}),D]}):null,(0,Z.jsxs)(Cr,{variant:`destructive`,disabled:i,onSelect:()=>{V(),p(N)},children:[(0,Z.jsx)(ol,{"aria-hidden":`true`}),F]})]})]})}),t[35]=y,t[36]=i,t[37]=T,t[38]=V,t[39]=z,t[40]=F,t[41]=N,t[42]=A,t[43]=o,t[44]=L,t[45]=D,t[46]=_,t[47]=x,t[48]=C,t[49]=n,t[50]=s,t[51]=c,t[52]=w,t[53]=h,t[54]=u,t[55]=p,t[56]=d,t[57]=m,t[58]=f,t[59]=l,t[60]=re,t[61]=se,t[62]=oe,t[63]=b,t[64]=a,t[65]=ue):ue=t[65];let de;return t[66]!==ce||t[67]!==ue?(de=(0,Z.jsxs)(Nr,{open:!0,modal:!1,onOpenChange:ce,children:[le,ue]}),t[66]=ce,t[67]=ue,t[68]=de):de=t[68],de}function cQ(e){return console.log(e)}function lQ(e){return X.error(e)}function uQ(e){return X.success(e)}function dQ(e,t){return`/api/documents?showAll=true${t?`&showOk=true`:``}&dir=${encodeURIComponent(e)}&depth=1`}async function fQ(e,t,n,r,i){try{let a=await fetch(dQ(e,t),{signal:n,headers:TZ});if(EZ(a)){let e=await kZ(a);return{kind:`entries`,entries:Fl(e.entries),truncated:e.truncated}}let o=await m(a,r);if(!o.ok)return{kind:`http-error`,title:o.title};let s=Ma.safeParse(o.body);return s.success?{kind:`entries`,entries:Fl(s.data.documents),truncated:s.data.truncated===!0}:{kind:`http-error`,title:i}}catch(e){return e instanceof DZ?{kind:`http-error`,title:e.message}:{kind:`network-error`,cause:e}}}function pQ(e){let t=(0,$.c)(367),{ref:n,onContentHeightChange:r}=e,{_:i,i18n:a}=ht(),{activeDocName:o,activeTarget:s,closeTabs:c,closeDocument:l,isNewTabActive:u,openTarget:d,prewarm:f,reconcileLocalRemoval:h,reconcileLocalRename:g}=Re(),{notifySidebarFileSelected:_}=GN(),{resolvedTheme:v}=It(),{addPage:y,pageMeta:b,pages:x}=Vo(),C;t[0]===b?C=t[1]:(C=function(e,t){return Ul(e,t??b.get(e)?.size)??{kind:`doc`,target:e,docName:e}},t[0]=b,t[1]=C);let w=C,T;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(T=[],t[2]=T):T=t[2];let[E,D]=(0,Q.useState)(T),[O,k]=(0,Q.useState)(!0),[A,j]=(0,Q.useState)(null),[M,N]=(0,Q.useState)(!1),P=jF(),F=(0,Q.useRef)(null),[I,L]=(0,Q.useState)(null),[R,z]=(0,Q.useState)(0),[B,V]=(0,Q.useState)(null),[H,U]=(0,Q.useState)(null),[W,G]=(0,Q.useState)(null),[K,ee]=(0,Q.useState)(null),{conflicts:te}=Cs(),[ne,ie]=(0,Q.useState)(null),[ae,oe]=(0,Q.useState)(null),[se,ce]=(0,Q.useState)(!1),le=(0,Q.useRef)(se),ue;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(ue=new Set,t[3]=ue):ue=t[3];let de=(0,Q.useRef)(ue),fe=(0,Q.useRef)(E),pe=(0,Q.useRef)(b),me=(0,Q.useRef)(null),he;t[4]!==y||t[5]!==w||t[6]!==_||t[7]!==d?(he=function(e){if(e.kind===`doc`)e.registerPage&&y(e.docName),d(w(e.docName,e.size),{tabBehavior:`replace-active`}),cu(hu(e.docName));else if(e.kind===`folder`)d({kind:`folder`,target:e.folderPath,folderPath:e.folderPath},{tabBehavior:`replace-active`}),cu(su(e.folderPath));else{let t=(e.entries??fe.current).find(t=>Bl(t)&&t.path===e.assetPath);d({kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:t?.mediaKind??null},{tabBehavior:`replace-active`}),cu(pu(e.assetPath))}_()},t[4]=y,t[5]=w,t[6]=_,t[7]=d,t[8]=he):he=t[8];let ge=he,_e;t[9]!==E||t[10]!==ge||t[11]!==_||t[12]!==d||t[13]!==x?(_e=function(e,t){let n=t===void 0?E:t,r=QX(e,n);if(r.kind===`none`){console.debug(`[FileTree] Dropped selection for unknown docName:`,qf(e));return}if(r.kind===`asset`){d({kind:`asset`,target:r.path,assetPath:r.path,mediaKind:r.mediaKind},{tabBehavior:`replace-active`}),cu(r.hash),_();return}if(r.kind===`folder`){ge({kind:`folder`,folderPath:r.path});return}let i=n.find(e=>Pl(e)&&e.docName===r.path),a=Hl(r.path,{pages:x,docExt:i?.docExt});if(a?.kind===`asset`){d(a,{tabBehavior:`replace-active`}),cu(pu(a.assetPath)),_();return}if(a?.kind===`doc`){ge({kind:`doc`,docName:a.docName});return}ge({kind:`doc`,docName:r.path,size:i?.size,registerPage:Al(r.path)})},t[9]=E,t[10]=ge,t[11]=_,t[12]=d,t[13]=x,t[14]=_e):_e=t[14];let ve=_e,ye=(0,Q.useRef)(o),be;t[15]===E?be=t[16]:(be=new Set(E.filter(Bl).map(VQ)),t[15]=E,t[16]=be);let xe=be,Se=(0,Q.useRef)(xe),Ce;t[17]===E?Ce=t[18]:(Ce=jX(E),t[17]=E,t[18]=Ce);let we=Ce,Te=(0,Q.useRef)(we),Ee;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=[],t[19]=Ee):Ee=t[19];let De=(0,Q.useRef)(Ee),Oe=(0,Q.useRef)(null),ke=(0,Q.useRef)(BQ),Ae=(0,Q.useRef)(null),je=(0,Q.useRef)(null),Me=(0,Q.useRef)(!1),Ne=(0,Q.useRef)(!1),Pe=(0,Q.useRef)(null),Fe;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(Fe={row:null,root:null},t[20]=Fe):Fe=t[20];let Ie=(0,Q.useRef)(Fe),Le=(0,Q.useRef)(zQ),ze=(0,Q.useRef)(null),Be=(0,Q.useRef)(null),Ve;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=new Map,t[21]=Ve):Ve=t[21];let He=(0,Q.useRef)(Ve),Ue;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=new Set,t[22]=Ue):Ue=t[22];let We=(0,Q.useRef)(Ue),Ge;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=new Map,t[23]=Ge):Ge=t[23];let Ke=(0,Q.useRef)(Ge),qe=(0,Q.useRef)(0),Je;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(Je=new Set,t[24]=Je):Je=t[24];let Ye=(0,Q.useRef)(Je),Xe=(0,Q.useRef)(RQ),Ze=(0,Q.useRef)(LQ),Qe=(0,Q.useRef)(!1),$e=(0,Q.useRef)(!1),et=(0,Q.useRef)(!1),tt;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(tt=()=>({showHiddenFiles:Qe.current,showOnlyMarkdownFiles:$e.current,showOkFolders:et.current}),t[25]=tt):tt=t[25];let nt=tt,rt=(0,Q.useRef)(null),it=(0,Q.useRef)(null),at=(0,Q.useRef)(IQ),ot=(0,Q.useRef)(FQ),st=(0,Q.useRef)(PQ),ct=(0,Q.useRef)(NQ),lt=(0,Q.useRef)(s),[ut,dt]=(0,Q.useState)(!1),ft;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(ft=function(){F.current!==null&&(clearTimeout(F.current),F.current=null)},t[26]=ft):ft=t[26];let mt=ft,gt;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(gt=function(){mt(),N(!1)},t[27]=gt):gt=t[27];let _t=gt,vt;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(vt=function(e){_t(),j(e)},t[28]=vt):vt=t[28];let yt=vt,bt;t[29]===i?bt=t[30]:(bt=function(){if(mt(),DF()){j(null),N(!0),F.current=setTimeout(()=>{F.current=null,rt.current?.()},tQ);return}N(!1),j(i({id:`34qyH5`}))},t[29]=i,t[30]=bt);let xt=bt,St=(0,Q.useRef)(!0),Ct;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(Ct=()=>{if(St.current){St.current=!1;return}rt.current?.()},t[31]=Ct):Ct=t[31];let wt;t[32]===P?wt=t[33]:(wt=[P],t[32]=P,t[33]=wt),(0,Q.useEffect)(Ct,wt);let Tt,Et;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(Tt=()=>mt,Et=[],t[34]=Tt,t[35]=Et):(Tt=t[34],Et=t[35]),(0,Q.useEffect)(Tt,Et);let Dt,Ot;t[36]!==E.length||t[37]!==O?(Dt=()=>{if(O||E.length===0)return;let e=it.current?.querySelector(AB)?.shadowRoot;if(!e)return;let t=e,n=function(){Pe.current!==null&&clearTimeout(Pe.current),Pe.current=setTimeout(()=>{Ne.current=!1,Pe.current=null},0)},r=function(e){if(!(e instanceof DragEvent))return;let t=UQ(e),n=t?.dataset.itemPath;if(!n)return;let r=rZ(t.dataset.itemType===`folder`?Vf(n):n,fe.current,pe.current);r&&(Pe.current!==null&&(clearTimeout(Pe.current),Pe.current=null),Ne.current=!0,e.dataTransfer?.setData(Cf,If(r)))},i=function(e){if(!(e instanceof DragEvent)||!Rf(e))return;let t=GQ(e);if(!t){JZ(Ie);return}e.preventDefault(),e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.dropEffect=`copy`),YZ(Ie,t)},a=function(e){if(!(e instanceof DragEvent)||!Rf(e))return;let n=e.relatedTarget;n instanceof Node&&t.contains(n)||JZ(Ie)},o=function(e){if(!(e instanceof DragEvent)||!Rf(e))return;let t=GQ(e),n=Mf(e);if(!t||n.length===0){JZ(Ie);return}e.preventDefault(),e.stopPropagation(),JZ(Ie),Le.current(n,t.parentDir,t.busyPath)};return e.addEventListener(`dragstart`,r,{capture:!0}),e.addEventListener(`dragover`,i,{capture:!0}),e.addEventListener(`dragleave`,a,{capture:!0}),e.addEventListener(`drop`,o,{capture:!0}),e.addEventListener(`dragend`,n,{capture:!0}),window.addEventListener(`drop`,n,!0),window.addEventListener(`dragend`,n,!0),()=>{e.removeEventListener(`dragstart`,r,{capture:!0}),e.removeEventListener(`dragover`,i,{capture:!0}),e.removeEventListener(`dragleave`,a,{capture:!0}),e.removeEventListener(`drop`,o,{capture:!0}),e.removeEventListener(`dragend`,n,{capture:!0}),window.removeEventListener(`drop`,n,!0),window.removeEventListener(`dragend`,n,!0),JZ(Ie),Pe.current!==null&&(clearTimeout(Pe.current),Pe.current=null),Ne.current=!1}},Ot=[E.length,O],t[36]=E.length,t[37]=O,t[38]=Dt,t[39]=Ot):(Dt=t[38],Ot=t[39]),(0,Q.useEffect)(Dt,Ot);let{selectedFilePath:kt,selectedFolderPath:At,navigationPath:jt}=ZX(s,u?null:o),Mt=kt?Uf(kt,E.find(e=>Pl(e)&&e.docName===kt)?.docExt):At?Vf(At):s?.kind===`asset`?s.assetPath:null,Nt=se?null:Mt,Pt=ts().states,{dispatch:Ft}=Yo(),Lt;t[40]!==Ft||t[41]!==Pt?(Lt={installStates:Pt,isElectronHost:typeof window<`u`&&window.okDesktop!=null,dispatch:Ft},t[40]=Ft,t[41]=Pt,t[42]=Lt):Lt=t[42];let Rt=Lt,{okignoreBinding:zt,merged:Bt}=Qu(),Vt=Bt?.appearance?.sidebar?.showHiddenFiles??!1,Ht=Bt?.appearance?.sidebar?.showOnlyMarkdownFiles??!1,Ut=Bt?.appearance?.sidebar?.showOkFolders??!1,Wt;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(Wt=()=>ze.current===null,t[43]=Wt):Wt=t[43];let Gt=Wt,Kt;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(Kt=[],t[44]=Kt):Kt=t[44];let qt;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(qt={set:`complete`,spriteSheet:uX,byFileExtension:{md:{name:oX,viewBox:pt},mdx:{name:oX,viewBox:pt}}},t[45]=qt):qt=t[45];let Jt;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(Jt={contextMenu:{enabled:!0,triggerMode:`both`,buttonVisibility:`when-needed`}},t[46]=Jt):Jt=t[46];let Yt;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(Yt={canDrag:Gt,canDrop:Gt,onDropComplete:e=>ct.current(e),onDropError:MQ},t[47]=Yt):Yt=t[47];let Xt,Zt;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(Xt={canRename:Gt,onRename:e=>ot.current(e),onError:e=>st.current(e)},Zt=e=>at.current(e),t[48]=Xt,t[49]=Zt):(Xt=t[48],Zt=t[49]);let Qt;t[50]===i?Qt=t[51]:(Qt={paths:Kt,initialExpansion:`closed`,fileTreeSearchMode:`hide-non-matches`,initialVisibleRowCount:18,stickyFolders:!0,...zY,icons:qt,unsafeCSS:iQ,composition:Jt,dragAndDrop:Yt,renaming:Xt,onSelectionChange:Zt,renderRowDecoration:e=>{let{item:t}=e;if(t.kind===`file`){let e=Te.current.docsByTreePath.get(t.path);if(e?.isSymlink){let t=e.targetPath;return{icon:iX,title:i(t?{id:`JE21eh`,values:{targetPath:t}}:{id:`BQu9Pg`})}}return _X(t.path)?{icon:aX,title:i({id:`i9toLO`})}:null}let n=Te.current.foldersByTreeDirectoryPath.get(Vf(t.path));if(n?.isSymlink){let e=n.targetPath;return{icon:iX,title:i(e?{id:`JE21eh`,values:{targetPath:e}}:{id:`BQu9Pg`})}}return null}},t[50]=i,t[51]=Qt);let{model:$t}=LY(Qt),en;t[52]===$t?en=t[53]:(en=function(e){let t=$t.getItem(e)??$t.getItem(Vf(e));return t?.isDirectory()?Vf(Yf(t.getPath())):e},t[52]=$t,t[53]=en);let tn=en,nn,rn;t[54]===E?(nn=t[55],rn=t[56]):(rn=Af(E),nn=xf(rn),t[54]=E,t[55]=nn,t[56]=rn);let an=nn,on=(0,Q.useRef)(rn),sn;t[57]!==E||t[58]!==Ut?(sn=zf(E,{includeOkFolders:Ut}),t[57]=E,t[58]=Ut,t[59]=sn):sn=t[59];let cn=sn,ln=(0,Q.useRef)(cn),un=At?Hf(Vf(At)).slice(0,-1):Hf(Nt??jt),dn=un.join(`\0`),fn;t[60]===$t?fn=t[61]:(fn=()=>{let e=new Set;for(let t of ln.current)fZ($t.getItem(t))?.isExpanded()&&e.add(t);return e},t[60]=$t,t[61]=fn);let pn=fn,mn;t[62]===pn?mn=t[63]:(mn=e=>{let t=new Set(zf(e??fe.current,{includeOkFolders:et.current})),n=pn();for(let e of De.current)n.add(e);return[...n].filter(e=>t.has(e))},t[62]=pn,t[63]=mn);let hn=mn,gn;t[64]!==hn||t[65]!==$t?(gn=e=>{let t=Af(e??fe.current);$t.resetPaths(t,{initialExpandedPaths:hn(e)})},t[64]=hn,t[65]=$t,t[66]=gn):gn=t[66];let _n=gn,yn;t[67]!==i||t[68]!==xt?(yn=async function(e){let t=qe.current,n=new AbortController;Ke.current.set(e,n);let r=await fQ(Yf(e),et.current,n.signal,i({id:`8RtNI0`}),i({id:`HlmZBk`}));if(Ke.current.get(e)===n&&Ke.current.delete(e),n.signal.aborted||t!==qe.current)return;if(r.kind===`network-error`){xt(),console.warn(`[FileTree] lazy folder children fetch failed:`,e,r.cause);return}if(r.kind===`http-error`){console.warn(`[FileTree] lazy folder children http error:`,e,r.title),yt(r.title);return}let a=Nl(r.entries,nt());We.current.add(e),D(t=>MZ(t,e,a,He.current)),j(null),_t(),r.truncated&&L(r.entries.length)},t[67]=i,t[68]=xt,t[69]=yn):yn=t[69];let bn=yn,xn;t[70]!==pn||t[71]!==bn?(xn=()=>{let e=pn(),t=Ye.current;Ye.current=e;for(let n of e){if(t.has(n)||We.current.has(n)||Ke.current.has(n))continue;let e=Yf(n);fe.current.find(t=>Ll(t)&&t.path===e)?.hasChildren!==!1&&bn(n)}},t[70]=pn,t[71]=bn,t[72]=xn):xn=t[72];let Sn=xn,Cn;t[73]!==pn||t[74]!==bn?(Cn=()=>{for(let e of pn())We.current.has(e)||Ke.current.has(e)||bn(e)},t[73]=pn,t[74]=bn,t[75]=Cn):Cn=t[75];let wn=Cn,Tn;t[76]!==$t||t[77]!==_n?(Tn=(e,t,n,r)=>{let i=r===void 0?[]:r,a=0,o=null;for(let{fromDocName:r,toDocName:i}of n){let n=e.find(e=>Pl(e)&&e.docName===r);if(n==null||$t.getItem(i)==null)continue;let s=Uf(i,t.find(e=>Pl(e)&&e.docName===i)?.docExt??n.docExt);$t.move(i,s),o=s,a+=1}for(let{toPath:e}of i){let t=Ml(e);if(t===``)continue;let n=e.slice(0,-t.length);$t.getItem(n)!=null&&($t.getItem(e)??$t.move(n,e),o=e,a+=1)}a!==0&&(_n(t),o!=null&&$t.focusPath(o))},t[76]=$t,t[77]=_n,t[78]=Tn):Tn=t[78];let En=Tn,Dn;t[79]===Symbol.for(`react.memo_cache_sentinel`)?(Dn=e=>{Ae.current=Lf(e)},t[79]=Dn):Dn=t[79];let On=Dn,kn;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(kn=e=>Se.current.has(e),t[80]=kn):kn=t[80];let An=kn,jn;t[81]!==i||t[82]!==y||t[83]!==ge||t[84]!==_n?(jn=async function(e){if(e.kind===`asset`||ze.current!==null)return;let t=()=>{V(null),ze.current=null};ze.current=e.path,V(e.path),j(null);try{let n=await m(await fetch(`/api/duplicate-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e.kind,path:e.path})}),i({id:`dw_dUJ`}));if(!n.ok){X.error(n.title),_n(),t();return}let r=p(Ri,n.body,`duplicate-path`,null);if(r===null){let e=i({id:`67f-3g`});X.error(e),j(e),$l([`files`,`backlinks`,`graph`]),_n(),t();return}for(let e of r.duplicatedDocNames)y(e);D(t=>{let n=rI(t,e,r);return _n(n),On(n),n}),$l([`files`,`backlinks`,`graph`]),r.path!==e.path&&(r.kind===`folder`?ge({kind:`folder`,folderPath:r.path}):ge({kind:`doc`,docName:r.path})),X.success(r.kind===`folder`?i({id:`iilQXA`}):i({id:`A6h5b-`}),{description:r.path}),t()}catch(e){let n=e,r=n instanceof Error?n.message:String(n);console.warn(`[FileTree] duplicate failed:`,n),X.error(i({id:`EBVbtP`}),{description:r}),_n(),t()}},t[81]=i,t[82]=y,t[83]=ge,t[84]=_n,t[85]=jn):jn=t[85];let Mn=jn,Nn=(0,Q.useRef)(Mn),Pn;t[86]===Mn?Pn=t[87]:(Pn=()=>{Nn.current=Mn},t[86]=Mn,t[87]=Pn),(0,Q.useEffect)(Pn);let Fn=async function(e,t){if(e.kind===`file`){if(t){G(e);return}await In(e,!1)}};async function In(e,t){if(ze.current!==null)return;let n=()=>{V(null),ze.current=null,G(null)};ze.current=e.path,V(e.path),j(null);let r=e.path,a=r.lastIndexOf(`/`),o=a===-1?``:r.slice(0,a),s=await fc({sourcePath:e.path,targetFolder:o,deleteSource:t});if(!s.ok){X.error(i({id:`rDOuNw`}),{description:s.error}),n();return}t&&(await Yr([e],[e.path],[]),D(t=>{let n=t.filter(t=>!(Pl(t)&&t.docName===e.path));return _n(n),On(n),n}),$l([`files`,`backlinks`,`graph`])),X.success(i({id:`Ba4D2x`}),{description:s.path}),n()}let Ln=function(e){let t=mX(e);if(!t||hX(t))return!1;let n=$t.getFocusedPath()??$t.getSelectedPaths()[0]??null;if(!n||n.endsWith(`/`)||An(n))return!1;let r=hX(n);if(!r)return!1;let i=Vf(t);if(!ln.current.includes(i))return!1;let a=`${t}${r}`;return on.current.includes(a)?!1:(hr({sourcePath:n,destinationPath:a,isFolder:!1}),$t.move(n,a),!0)},Rn;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(Rn=e=>{let t=e??Oe.current;!t||Oe.current!==t||(t.disposeCommitListener(),Oe.current=null)},t[88]=Rn):Rn=t[88];let zn=Rn,Bn;t[89]!==i||t[90]!==zn||t[91]!==l||t[92]!==c||t[93]!==_n?(Bn=async function(e,t){let n=t===void 0?{}:t,r=n.updateUi??!0,a=n.restoreLocation??r;zn(e),r&&V(e.renamePath);try{let t=await fetch(`/api/delete-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e.kind,path:e.createdPath})});if(!t.ok&&t.status!==404){let n=e.kind,a=e.createdPath,o=await m(t,i({id:`EcM3k7`,values:{kind:n}}));if(o.ok)return;let s=o.title,c=i({id:`YPFBfr`,values:{detail:s,kind:n,createdPath:a}});r?X.error(c):console.warn(`[FileTree] cleanup pending create failed: ${c}`),r&&(V(null),_n());return}}catch(t){if(console.warn(`[FileTree] cleanup pending create failed:`,t),r){let t=e.kind,n=e.createdPath;X.error(i({id:`_TDESN`,values:{kind:t,createdPath:n}}))}r&&(V(null),_n());return}r&&(e.kind===`file`?l(e.createdPath):c([S(e.createdPath)],{force:!0})),r&&D(t=>{let n=tI(t,e.kind===`file`?[e.createdPath]:[],e.kind===`folder`?e.createdPath:void 0);return On(n),n}),$l([`files`,`backlinks`,`graph`]),a&&(window.location.hash=e.previousHash),r&&V(null)},t[89]=i,t[90]=zn,t[91]=l,t[92]=c,t[93]=_n,t[94]=Bn):Bn=t[94];let Vn=Bn,Hn,Un;t[95]===Symbol.for(`react.memo_cache_sentinel`)?(Hn=()=>()=>{let e=Oe.current;e&&ke.current(e,{restoreLocation:!1,updateUi:!1}).catch(jQ)},Un=[],t[95]=Hn,t[96]=Un):(Hn=t[95],Un=t[96]),(0,Q.useEffect)(Hn,Un);let Wn;t[97]!==i||t[98]!==xt?(Wn=()=>{let e=!0,t=null,n=Bo(async function(){t?.abort();let n=new AbortController;t=n,qe.current+=1;for(let e of Ke.current.values())e.abort();Ke.current.clear(),We.current.clear();try{let t=await fetch(dQ(``,et.current),{signal:n.signal,headers:TZ});if(EZ(t)){let r=nt(),i=!1,{entries:a,truncated:o}=await kZ(t,{onBatch:t=>{if(!e||n.signal.aborted)return;let a=Nl(Fl(t),r);a.length!==0&&(D(e=>jZ(e,a)),i||(i=!0,j(null),_t(),k(!1)))}});if(!e)return;let s=Fl(a),c=Nl(s,r);D(e=>MZ(e,``,c,He.current)),j(null),_t(),L(o?a.length:null),z(s.length),Ze.current()}else{let n=await m(t,i({id:`8RtNI0`}));if(!e)return;if(!n.ok)yt(n.title),L(null);else{let e=Ma.safeParse(n.body);if(!e.success)yt(i({id:`HlmZBk`})),L(null);else{let t=Fl(e.data.documents),n=Nl(t,nt());D(e=>MZ(e,``,n,He.current)),j(null),_t(),L(e.data.truncated===!0?e.data.documents.length:null),z(t.length),Ze.current()}}}}catch(t){let r=t;if(n.signal.aborted)return;e&&(r instanceof DZ?yt(r.message):xt()),console.warn(`[FileTree] fetch failed:`,r)}e&&k(!1)},()=>t?.abort());rt.current=()=>n.request(),n.request();let r=()=>{document.visibilityState===`visible`&&n.request()};window.addEventListener(`focus`,r),window.addEventListener(`visibilitychange`,r);let a=Jl(e=>{e.includes(`files`)&&n.request()});return()=>{e=!1,rt.current=null,n.dispose();for(let e of Ke.current.values())e.abort();Ke.current.clear(),window.removeEventListener(`focus`,r),window.removeEventListener(`visibilitychange`,r),a()}},t[97]=i,t[98]=xt,t[99]=Wn):Wn=t[99];let Gn;t[100]===i?Gn=t[101]:(Gn=[i],t[100]=i,t[101]=Gn),(0,Q.useEffect)(Wn,Gn);let Kn=(0,Q.useRef)(!0),qn;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(qn=()=>{if(Kn.current){Kn.current=!1;return}rt.current?.()},t[102]=qn):qn=t[102];let Jn;t[103]!==Vt||t[104]!==Ut||t[105]!==Ht?(Jn=[Vt,Ht,Ut],t[103]=Vt,t[104]=Ut,t[105]=Ht,t[106]=Jn):Jn=t[106],(0,Q.useEffect)(qn,Jn);let Yn,Xn;t[107]===Symbol.for(`react.memo_cache_sentinel`)?(Yn=()=>{let e=!0;return fetch(`/api/workspace`).then(async t=>{let n=await t.json();if(!e||!t.ok)return;let r=p(qa,n,`workspace`,null);r&&oe({contentDir:r.contentDir,pathSeparator:r.pathSeparator})}).catch(AQ),()=>{e=!1}},Xn=[],t[107]=Yn,t[108]=Xn):(Yn=t[107],Xn=t[108]),(0,Q.useEffect)(Yn,Xn);let Zn;t[109]!==hn||t[110]!==$t||t[111]!==an?(Zn=()=>{if(Ae.current===an){Ae.current=null;return}$t.resetPaths(on.current,{initialExpandedPaths:hn()})},t[109]=hn,t[110]=$t,t[111]=an,t[112]=Zn):Zn=t[112];let Qn;t[113]!==$t||t[114]!==an?(Qn=[$t,an],t[113]=$t,t[114]=an,t[115]=Qn):Qn=t[115],(0,Q.useEffect)(Zn,Qn),hZ($t,Nt,dn,Me,an);let $n,er;t[116]!==$t||t[117]!==r?($n=()=>{if(!r)return;let e=0,t=0,n=()=>it.current?.querySelector(`file-tree-container`)?.shadowRoot?.querySelector(`[data-file-tree-virtualized-list]`)??null,i=()=>{let e=n();if(!e)return;let t=Number.parseFloat(e.style.height);Number.isFinite(t)&&r(t)},a=()=>{cancelAnimationFrame(e),e=requestAnimationFrame(i)},o=new MutationObserver(i),s=()=>{let e=n();e?(o.observe(e,{attributes:!0,attributeFilter:[`style`]}),i()):t=requestAnimationFrame(s)};s();let c=$t.subscribe(a);return window.addEventListener(`resize`,a),()=>{cancelAnimationFrame(e),cancelAnimationFrame(t),o.disconnect(),c(),window.removeEventListener(`resize`,a)}},er=[r,$t],t[116]=$t,t[117]=r,t[118]=$n,t[119]=er):($n=t[118],er=t[119]),(0,Q.useEffect)($n,er);let tr;t[120]===Symbol.for(`react.memo_cache_sentinel`)?(tr=()=>{ce(!1)},t[120]=tr):tr=t[120];let nr;t[121]===Mt?nr=t[122]:(nr=[Mt],t[121]=Mt,t[122]=nr),(0,Q.useEffect)(tr,nr);let rr,ir;t[123]===se?(rr=t[124],ir=t[125]):(rr=()=>{le.current=se;for(let e of de.current)e()},ir=[se],t[123]=se,t[124]=rr,t[125]=ir),(0,Q.useEffect)(rr,ir);let ar;t[126]!==Nt||t[127]!==O||t[128]!==$t?(ar=()=>{O||!Nt||YX($t,Nt)},t[126]=Nt,t[127]=O,t[128]=$t,t[129]=ar):ar=t[129];let or;t[130]!==dn||t[131]!==Nt||t[132]!==O||t[133]!==$t||t[134]!==an?(or=[Nt,dn,an,O,$t],t[130]=dn,t[131]=Nt,t[132]=O,t[133]=$t,t[134]=an,t[135]=or):or=t[135],(0,Q.useEffect)(ar,or);let sr,cr;t[136]===$t?(sr=t[137],cr=t[138]):(sr=()=>$t.subscribe(()=>{if(!$t.isSearchOpen())for(let e of De.current){let t=fZ($t.getItem(e));t&&!t.isExpanded()&&t.expand()}}),cr=[$t],t[136]=$t,t[137]=sr,t[138]=cr),(0,Q.useEffect)(sr,cr);let lr,ur;t[139]===$t?(lr=t[140],ur=t[141]):(lr=()=>$t.subscribe(()=>Xe.current()),ur=[$t],t[139]=$t,t[140]=lr,t[141]=ur),(0,Q.useEffect)(lr,ur);let dr,fr;t[142]===$t?(dr=t[143],fr=t[144]):(dr=()=>$t.onMutation(`remove`,e=>{let t=Oe.current;!t||e.path!==t.renamePath||ke.current(t)}),fr=[$t],t[142]=$t,t[143]=dr,t[144]=fr),(0,Q.useEffect)(dr,fr);let pr;t[145]!==y||t[146]!==ge||t[147]!==g||t[148]!==En?(pr=async(e,t,n,r,i)=>{let a=t===void 0?[]:t,o=n===void 0?[]:n,s=i===void 0?[]:i,c=r?.docName??ye.current,l=new Map,u=new Map;for(let e of fe.current){if(Pl(e)){let t=o.find(t=>t.fromPath===Uf(e.docName,e.docExt))?.toPath;t&&l.set(e.docName,t);continue}if(Bl(e)){let t=o.find(t=>t.fromPath===e.path)?.toPath;t&&Al(t)&&u.set(e.path,kf(t))}}let d=c?l.get(c)??null:null,f=r?.folderPath??(lt.current?.kind===`folder`?lt.current.folderPath:null),p=f?re(f,a):null,m=r?.assetPath??(lt.current?.kind===`asset`?lt.current.assetPath:null),h=m?u.get(m)??null:null,_=d?null:h??iI(c,e),v=d??(m?h?null:o.find(e=>e.fromPath===m)?.toPath??re(m,a):null);await g({renamed:e,renamedFolders:a,renamedAssets:o,additionalRemovedDocNames:[...l.keys()]});for(let t of e)y(t.toDocName);for(let e of u.values())y(e);let b=null;D(t=>{let n=eI(t,e,a,o,s);return b=n,En(t,n,e,o),On(n),n}),f&&p&&p!==f?ge({kind:`folder`,folderPath:p}):_&&_!==c?(ge({kind:`doc`,docName:_}),qZ(_)):v&&(d||v!==m)&&ge({kind:`asset`,assetPath:v,entries:b??fe.current}),$l([`files`,`backlinks`,`graph`])},t[145]=y,t[146]=ge,t[147]=g,t[148]=En,t[149]=pr):pr=t[149];let mr=pr;async function hr(e){let t=!e.isFolder&&An(e.sourcePath),n=t?e.sourcePath:Pf(e.sourcePath,e.isFolder);V(n),j(null);try{let r=jl(e.sourcePath,e.destinationPath,e.isFolder),a=!e.isFolder&&!t&&!Al(r.destinationPath),o=t||a?r.destinationPath:Pf(r.destinationPath,e.isFolder),s=e.isFolder?{kind:`folder`,fromPath:Yf(n),toPath:Yf(o)}:t||a?{kind:`asset`,fromPath:n,toPath:o}:{kind:`file`,fromPath:Jf(n,fe.current),toPath:o},c={docName:ye.current,folderPath:lt.current?.kind===`folder`?lt.current.folderPath:null,assetPath:lt.current?.kind===`asset`?lt.current.assetPath:null},l=await m(await fetch(`/api/rename-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(s)}),i({id:`gijbne`}));if(!l.ok){X.error(l.title),_n();let e=Oe.current;e&&e.renamePath===n?await Vn(e):zn(),V(null);return}let u=p(vi,l.body,`rename-path`,{renamed:[],renamedAssets:[]});try{await mr(u.renamed,e.isFolder?[{fromPath:Yf(n),toPath:Yf(o)}]:[],u.renamedAssets,c,!e.isFolder&&!t&&!a?u.renamed.flatMap(e=>{let t=Ml(o);return t?[{toDocName:e.toDocName,docExt:t}]:[]}):[])}catch(e){console.warn(`[FileTree] post-rename reconciliation failed`,{err:e,sourceTreePath:n,destinationTreePath:o,renamedCount:u.renamed.length,renamedAssetCount:u.renamedAssets.length}),X.error(i({id:`dDpCOp`}))}zn(),V(null)}catch(e){console.warn(`[FileTree] rename failed:`,e);let t=i({id:`HIb0vl`});X.error(t),j(t),_n();let r=Oe.current;r&&r.renamePath===n?await Vn(r):zn(),V(null)}}let gr;t[150]!==i||t[151]!==mr||t[152]!==_n?(gr=async function(e){let t=e.draggedPaths.map(t=>{let n=Ff(t,e.target);return t===n?null:{sourcePath:t,destinationTreePath:n}}).filter(kQ);if(t.length!==0){V(t[0]?.sourcePath??null),j(null);try{let e=[],n=[],r=[],a={docName:ye.current,folderPath:lt.current?.kind===`folder`?lt.current.folderPath:null,assetPath:lt.current?.kind===`asset`?lt.current.assetPath:null};for(let a of t){let t=a.sourcePath.endsWith(`/`),o=!t&&An(a.sourcePath),s=o?null:Jf(a.sourcePath,fe.current),c=t?{kind:`folder`,fromPath:Yf(a.sourcePath),toPath:Yf(a.destinationTreePath)}:o?{kind:`asset`,fromPath:a.sourcePath,toPath:a.destinationTreePath}:{kind:`file`,fromPath:s??kf(a.sourcePath),toPath:s&&Al(s)?a.destinationTreePath:kf(a.destinationTreePath)},l=await m(await fetch(`/api/rename-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(c)}),i({id:`dOHMA0`}));if(!l.ok){X.error(l.title),_n(),V(null);return}let u=p(vi,l.body,`rename-path:drop`,{renamed:[],renamedAssets:[]});e=e.concat(u.renamed),n=n.concat(u.renamedAssets),t&&r.push({fromPath:Yf(a.sourcePath),toPath:Yf(a.destinationTreePath)})}try{await mr(e,r,n,a)}catch(r){console.warn(`[FileTree] post-move reconciliation failed`,{err:r,operationCount:t.length,renamedCount:e.length,renamedAssetCount:n.length}),X.error(i({id:`8OxKZy`}))}V(null)}catch(e){console.warn(`[FileTree] move failed:`,e),X.error(i({id:`HIb0vl`})),_n(),V(null)}}},t[150]=i,t[151]=mr,t[152]=_n,t[153]=gr):gr=t[153];let _r=gr,vr;t[154]!==i||t[155]!==y||t[156]!==_n?(vr=async function(e,t,n){if(e.length===0||ze.current!==null)return;let r=()=>{ze.current=null,V(null)};ze.current=n,V(n),j(null);let a=[],o=0,s=0;for(let n of e){let e=new FormData;e.append(`file`,n),Wf(e,t,n.name||`upload`);try{let r=await m(await fetch(`/api/upload`,{method:`POST`,body:e}),i({id:`4Gz2wC`}));if(!r.ok){s+=1,X.error(r.title,{description:n.name});continue}let c=p(ra,r.body,`upload:drop`,null);if(c===null){s+=1,X.error(i({id:`4Gz2wC`}),{description:n.name});continue}let l=Ef(t,c);if(c.deduped===!0){s+=1,X.error(i({id:`4sKwf6`}),{description:l});continue}o+=1;let u=Gf(l,n);u&&a.push(u)}catch(e){let t=e;s+=1,console.warn(`[FileTree] external file upload failed:`,t),X.error(t instanceof TypeError?i({id:`HIb0vl`}):i({id:`4Gz2wC`}),{description:n.name})}}try{if(a.length>0){for(let e of a)Pl(e)&&y(e.docName);D(e=>{let t=new Set(e.map(jf)),n=!1,r=[...e];for(let e of a){let i=jf(e);He.current.set(i,Date.now()),!t.has(i)&&(t.add(i),r.push(e),n=!0)}return n?(_n(r),On(r),r):e})}o>0&&($l([`files`,`backlinks`,`graph`]),rt.current?.(),X.success(yl._({id:`v75Em9`,values:{uploadedCount:o}}),{description:t||i({id:`RSqaSd`})})),s>0&&j(o>0?yl._({id:`yH7T4q`,values:{failedCount:s}}):i({id:`4Gz2wC`})),r()}catch(e){let t=e,n=i({id:`VcqWBy`});console.warn(`[FileTree] upload post-upload reconciliation failed:`,t),X.error(n),j(n),r()}},t[154]=i,t[155]=y,t[156]=_n,t[157]=vr):vr=t[157];let yr=vr,br;t[158]===Symbol.for(`react.memo_cache_sentinel`)?(br=function(e){ie({parentDir:e})},t[158]=br):br=t[158];let xr=br,Sr;t[159]!==i||t[160]!==y||t[161]!==Vn||t[162]!==zn||t[163]!==$t||t[164]!==ge||t[165]!==_n||t[166]!==rn?(Sr=async function(e,t,n){if(ze.current)return;let r=Oe.current;r&&zn(r);try{let r=Bf(e,t,[...rn,...ln.current]);V(r.renamePath),ze.current=r.renamePath;let a=window.location.hash,o;if(e===`file`){let e=Of(`file`,r.addPath),t={path:e};n?.template&&(t.template=n.template);let a=await m(await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),i({id:`fJgQHX`}));if(!a.ok){X.error(a.title),V(null),ze.current=null;return}let s=kf(e),c=p(Zi,a.body,`create-page`,{docName:s}).docName;o=c;let l={kind:`document`,docName:c,docExt:e.toLowerCase().endsWith(`.mdx`)?`.mdx`:`.md`,modified:new Date().toISOString(),size:0};y(c),D(e=>{if(e.some(e=>Pl(e)&&e.docName===c))return e;let t=[...e,l];return On(t),He.current.set(jf(l),Date.now()),t}),$l([`files`,`backlinks`,`graph`]),ge({kind:`doc`,docName:c})}else{let e=Yf(r.addPath),t=await m(await fetch(`/api/create-folder`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e})}),i({id:`K1ckLX`}));if(!t.ok){X.error(t.title),V(null),ze.current=null;return}o=p(no,t.body,`create-folder`,{path:e}).path;let n={kind:`folder`,path:o,modified:new Date().toISOString(),size:0};D(e=>{if(e.some(e=>Ll(e)&&e.path===o))return e;let t=[...e,n];return On(t),He.current.set(jf(n),Date.now()),t}),$l([`files`]),ge({kind:`folder`,folderPath:o})}let s=!1,c=e=>{if(e.key!==`Enter`)return;let t=Oe.current;!t||t.renamePath!==r.renamePath||queueMicrotask(()=>zn(t))};document.addEventListener(`keydown`,c,!0),Oe.current={kind:e,renamePath:r.renamePath,createdPath:o,previousHash:a,disposeCommitListener:()=>{s||(s=!0,document.removeEventListener(`keydown`,c,!0))}},V(null),ze.current=null,$t.add(r.addPath),$t.startRenaming(r.renamePath,{removeIfCanceled:!0})}catch(e){console.warn(`[FileTree] create placeholder failed:`,e),X.error(i({id:`S6l5dv`}));let t=Oe.current;t?await Vn(t):zn(),V(null),ze.current=null,_n()}},t[159]=i,t[160]=y,t[161]=Vn,t[162]=zn,t[163]=$t,t[164]=ge,t[165]=_n,t[166]=rn,t[167]=Sr):Sr=t[167];let Cr=Sr,wr;t[168]===$t?wr=t[169]:(wr=function(e){let t=Vf(e);(0,Q.startTransition)(()=>{for(let e of ln.current)if(e===t||e.startsWith(t)){let t=fZ($t.getItem(e));t&&t.expand()}})},t[168]=$t,t[169]=wr);let Tr=wr,Er;t[170]===$t?Er=t[171]:(Er=function(e){let t=Vf(e),n=new Set(De.current);(0,Q.startTransition)(()=>{for(let e of[...ln.current].reverse())if((e===t||e.startsWith(t))&&!n.has(e)){let t=fZ($t.getItem(e));t&&t.collapse()}})},t[170]=$t,t[171]=Er);let Dr=Er,Or;t[172]===Symbol.for(`react.memo_cache_sentinel`)?(Or=function(){return((it.current?.querySelector(`file-tree-container`)?.shadowRoot)?.querySelector(`[aria-selected="true"][data-item-path]`))?.dataset.itemPath??null},t[172]=Or):Or=t[172];let kr=Or,Ar;t[173]!==ve||t[174]!==un||t[175]!==o||t[176]!==s||t[177]!==xe||t[178]!==B||t[179]!==Vn||t[180]!==Sn||t[181]!==E||t[182]!==cn||t[183]!==_r||t[184]!==hr||t[185]!==tn||t[186]!==b||t[187]!==Ln||t[188]!==wn||t[189]!==we||t[190]!==Vt||t[191]!==Ut||t[192]!==Ht||t[193]!==rn||t[194]!==yr?(Ar=()=>{fe.current=E,Te.current=we,pe.current=b,ye.current=o,lt.current=s,Se.current=xe,ze.current=B,Qe.current=Vt,$e.current=Ht,et.current=Ut,on.current=rn,ln.current=cn,De.current=un,Xe.current=Sn,Ze.current=wn,ke.current=Vn,Le.current=(e,t,n)=>{yr(e,t,n)},at.current=e=>{if(Me.current||Ne.current||e.length!==1)return;let t=e[0];if(t){ce(!1);let e=tn(t),n=me.current,r=n!==null&&kf(n)===kf(e),i=r?n:e;me.current=null,queueMicrotask(()=>{ve(tn((r?null:kr())??i),fe.current)})}},st.current=e=>{Ln(e)||X.error(e)},ot.current=hr,ct.current=_r},t[173]=ve,t[174]=un,t[175]=o,t[176]=s,t[177]=xe,t[178]=B,t[179]=Vn,t[180]=Sn,t[181]=E,t[182]=cn,t[183]=_r,t[184]=hr,t[185]=tn,t[186]=b,t[187]=Ln,t[188]=wn,t[189]=we,t[190]=Vt,t[191]=Ut,t[192]=Ht,t[193]=rn,t[194]=yr,t[195]=Ar):Ar=t[195],(0,Q.useLayoutEffect)(Ar);let jr,Mr;t[196]===$t?(jr=t[197],Mr=t[198]):(jr=()=>{let e=e=>{let t=(e.metaKey||e.ctrlKey)&&!e.altKey,n=e.key.toLowerCase(),r=t&&n===`a`,i=t&&!e.shiftKey&&n===`d`,a=t&&!e.shiftKey&&n===`c`,o=t&&!e.shiftKey&&n===`v`,s=!e.altKey&&!e.shiftKey&&(e.metaKey&&!e.ctrlKey&&n===`backspace`||!e.metaKey&&!e.ctrlKey&&n===`delete`);if(!r&&!i&&!a&&!o&&!s||OX(e.target))return;let c=it.current,l=e.target,u=document.activeElement,d=l instanceof Node&&c?.contains(l),f=u instanceof Node&&c?.contains(u);if(!d&&!f)return;if(a){let t=TX($t,fe.current,Se.current);if(!t)return;Be.current=t,e.preventDefault(),e.stopPropagation();return}if(o){let t=Be.current;if(!t)return;Nn.current(t),e.preventDefault(),e.stopPropagation();return}if(i){let t=TX($t,fe.current,Se.current);if(!t)return;Nn.current(t),e.preventDefault(),e.stopPropagation();return}if(s){if(ze.current!==null)return;let t=EX($t,fe.current);if(t.length===0)return;U({targets:t}),e.preventDefault(),e.stopPropagation();return}let p=new Set([...ln.current,...on.current]);Me.current=!0;for(let e of p)e&&$t.getItem(e)?.select();queueMicrotask(()=>{Me.current=!1}),e.preventDefault(),e.stopPropagation()};return document.addEventListener(`keydown`,e,!0),()=>document.removeEventListener(`keydown`,e,!0)},Mr=[$t],t[196]=$t,t[197]=jr,t[198]=Mr),(0,Q.useEffect)(jr,Mr);let Nr,Pr;t[199]!==E.length||t[200]!==O?(Nr=()=>{if(O||E.length===0)return;let e=it.current?.querySelector(AB)?.shadowRoot;if(!e)return;let t=OQ,n=()=>{for(let n of e.querySelectorAll(`[data-item-path]`)){let e=n.dataset.itemPath;if(!e)continue;let r=t(e);n.title!==r&&(n.title=r)}let n=e.querySelector(`[data-type="context-menu-anchor"]`);if(n){let r=e.querySelector(`[data-item-context-hover="true"][data-item-path]`)?.dataset.itemPath,i=r?t(r):``;n.title!==i&&(n.title=i)}};n();let r=new MutationObserver(n);return r.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-item-path`,`data-item-context-hover`]}),()=>r.disconnect()},Pr=[O,E.length],t[199]=E.length,t[200]=O,t[201]=Nr,t[202]=Pr):(Nr=t[201],Pr=t[202]),(0,Q.useEffect)(Nr,Pr);let Fr,Ir;t[203]!==E.length||t[204]!==O?(Fr=()=>{if(O||E.length===0)return;let e=it.current?.querySelector(AB)?.shadowRoot;if(!e)return;let t=()=>JY(e);t();let n=new MutationObserver(t);return n.observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:[`data-item-path`]}),()=>n.disconnect()},Ir=[O,E.length],t[203]=E.length,t[204]=O,t[205]=Fr,t[206]=Ir):(Fr=t[205],Ir=t[206]),(0,Q.useEffect)(Fr,Ir);let Lr=Bt?.validation?.fileTreeIndicators!==!1,Rr,zr;t[207]!==E.length||t[208]!==O||t[209]!==Lr?(Rr=()=>{if(O||E.length===0)return;let e=it.current?.querySelector(AB)?.shadowRoot;if(!e)return;if(!Lr){FX(e,new Map);return}let t=()=>FX(e,Dd());t();let n=new MutationObserver(t);n.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-item-path`]});let r=wd(t);return()=>{n.disconnect(),r()}},zr=[O,E.length,Lr],t[207]=E.length,t[208]=O,t[209]=Lr,t[210]=Rr,t[211]=zr):(Rr=t[210],zr=t[211]),(0,Q.useEffect)(Rr,zr);let Br,Vr;t[212]!==E.length||t[213]!==O?(Br=()=>{if(O||E.length===0)return;let e=it.current?.querySelector(AB)?.shadowRoot;if(!e)return;let t=()=>WX(e);t();let n=new MutationObserver(t);return n.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-item-path`]}),()=>n.disconnect()},Vr=[O,E.length],t[212]=E.length,t[213]=O,t[214]=Br,t[215]=Vr):(Br=t[214],Vr=t[215]),(0,Q.useEffect)(Br,Vr);let Hr;t[216]===Symbol.for(`react.memo_cache_sentinel`)?(Hr={folderCount:0,expandedCount:0},t[216]=Hr):Hr=t[216];let Ur=(0,Q.useRef)(Hr),Wr=(0,Q.useRef)(Cr),Gr=(0,Q.useRef)(xr),Kr;t[217]===Cr?Kr=t[218]:(Kr=()=>{Wr.current=Cr,Gr.current=xr},t[217]=Cr,t[218]=Kr),(0,Q.useEffect)(Kr);let qr,Jr;t[219]===$t?(qr=t[220],Jr=t[221]):(qr=()=>({startCreating(e,t){Wr.current(e,t)},startCreatingFromTemplate(e){Gr.current(e)},createFromTemplate(e,t){Wr.current(`file`,e,{template:t})},expandAll(){(0,Q.startTransition)(()=>{for(let e of ln.current){let t=fZ($t.getItem(e));t&&t.expand()}})},collapseAll(){let e=new Set(De.current);(0,Q.startTransition)(()=>{for(let t of[...ln.current].reverse()){if(e.has(t))continue;let n=fZ($t.getItem(t));n&&n.collapse()}})},getFolderState(){let e=ln.current,t=0;for(let n of e)fZ($t.getItem(n))?.isExpanded()&&t++;let n=e.length,r=Ur.current;if(r.folderCount===n&&r.expandedCount===t)return r;let i={folderCount:n,expandedCount:t};return Ur.current=i,i},isCreationTargetCleared(){return le.current},clearCreationTarget(){ce(!0)},subscribe(e){de.current.add(e);let t=$t.subscribe(e);return()=>{de.current.delete(e),t()}}}),Jr=[$t],t[219]=$t,t[220]=qr,t[221]=Jr),(0,Q.useImperativeHandle)(n,qr,Jr);async function Yr(e,t,n){let r=kX(e,fe.current,ln.current),i=Oe.current;i&&e.some(e=>AX(e,i))&&(i.kind===`file`?r.docNames.add(i.createdPath):r.folderPaths.add(i.createdPath),zn(i));let a=new Set([...r.docNames,...t]),o=new Set([...r.folderPaths,...n]),s=new Set([...r.assetPaths,...e.filter(DQ).map(EQ)]);await h({tabIdsToClose:[...[...a].map(TQ),...[...o].map(wQ),...[...s].map(CQ)],docNamesToClear:[...a]});for(let t of e){let e=t.kind===`folder`?Vf(t.path):t.kind===`asset`?t.path:Uf(t.path,t.docExt);$t.getItem(e)&&$t.remove(e,t.kind===`folder`?{recursive:!0}:void 0)}D(e=>{let t=tI(e,[...a],void 0,[...s]);for(let e of o)t=tI(t,[],e);return On(t),t}),$l([`files`,`backlinks`,`graph`])}let Xr;t[222]!==i||t[223]!==Yr?(Xr=async function(e){let t=[],n=[],r=[];for(let a of e){let e=a.kind;V(a.path);let o=await m(await fetch(`/api/delete-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e,path:a.path})}),i({id:`7JtSLi`}));if(!o.ok)return r.length>0&&await Yr(r,t,n),X.error(o.title),!1;let s=p(Vi,o.body,`delete-path`,{deletedDocNames:[]});t.push(...s.deletedDocNames),e===`folder`&&n.push(a.path),r.push(a)}return await Yr(r,t,n),!0},t[222]=i,t[223]=Yr,t[224]=Xr):Xr=t[224];let Zr=Xr,Qr;t[225]===Symbol.for(`react.memo_cache_sentinel`)?(Qr=async function(e,t,n){let r=[],i=[];for(let a of e){V(a.path);let e=aI(a,n),o=await t.shell.trashItem(e);o.ok?r.push(a):i.push({kind:a.kind,path:a.path,name:a.name,reason:aZ(o.reason),detail:o.detail})}return{trashed:r,failed:i}},t[225]=Qr):Qr=t[225];let $r=Qr,ei;t[226]===i?ei=t[227]:(ei=async function(e){let t=[],n=[],r=[];for(let a of e){let e=a.kind;try{let o=await m(await fetch(`/api/trash/cleanup`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e,path:a.path})}),i({id:`DVh_Tb`}));if(!o.ok){console.warn(`[FileTree] trash-cleanup failed`,{target:`${a.kind}:${a.path}`,reason:o.title}),r.push({target:a,reason:o.title});continue}let s=p(Di,o.body,`trash-cleanup`,{deletedDocNames:[]});t.push(...s.deletedDocNames),e===`folder`&&n.push(a.path)}catch(e){let t=e;console.warn(`[FileTree] trash-cleanup threw`,{target:`${a.kind}:${a.path}`,err:t}),r.push({target:a,reason:i({id:`r4R7AZ`})})}}if(r.length>0){let e=r.length;X.error(i({id:`IrB5AK`,values:{failedCount:e}}),{description:i({id:`vEJDlt`})})}return r.length===e.length&&e.length>0?null:{deletedDocNames:t,deletedFolderPaths:n}},t[226]=i,t[227]=ei);let ti=ei,ni;t[228]!==i||t[229]!==te||t[230]!==Yr||t[231]!==Zr||t[232]!==ti||t[233]!==_n||t[234]!==ae?(ni=async function(e){let t=e.filter(SQ).map(e=>nI(e,fe.current)),n=t[0];if(!n)return;let r=te.filter(e=>t.some(t=>{if(t.kind===`file`){let n=`${t.path}${t.docExt??`.md`}`;return e.file===n}return t.kind===`folder`?e.file.startsWith(`${t.path}/`):!1}));if(r.length>0){let e=r.slice(0,3).map(xQ),t=r.length>e.length?`, +${r.length-e.length} more`:``;X.error(`Cannot delete files with unresolved conflicts`,{description:`Resolve the conflict on ${e.join(`, `)}${t} before deleting.`});return}V(n.path),U(null);let a=typeof window<`u`?window.okDesktop:void 0;try{if(a&&ae){let{trashed:e,failed:n}=await $r(t,a,ae);if(e.length>0){let t=await ti(e);t?await Yr(e,t.deletedDocNames,t.deletedFolderPaths):await Yr(e,e.filter(bQ).map(yQ),e.filter(vQ).map(_Q))}n.length>0&&ee({failed:n,originalTargets:[...t]}),V(null)}else{let e=await Zr(t);V(null),e||_n()}}catch(e){let t=e,n=t instanceof Error?t.message:String(t);console.warn(`[FileTree] delete failed:`,t),X.error(i({id:`0eHrMb`}),{description:n}),V(null),_n()}},t[228]=i,t[229]=te,t[230]=Yr,t[231]=Zr,t[232]=ti,t[233]=_n,t[234]=ae,t[235]=ni):ni=t[235];let ri=ni,ii;t[236]!==i||t[237]!==Zr||t[238]!==_n||t[239]!==K?(ii=async function(){if(!K)return;let e=new Set(K.failed.map(gQ)),t=K.originalTargets.filter(t=>e.has(`${t.kind}:${t.path}`));if(ee(null),t.length!==0){V(t[0]?.path??null);try{let e=await Zr(t);V(null),e||_n()}catch(e){let t=e,n=t instanceof Error?t.message:String(t);console.warn(`[FileTree] hard-delete fallback failed:`,t),X.error(i({id:`0eHrMb`}),{description:n}),V(null),_n()}}},t[236]=i,t[237]=Zr,t[238]=_n,t[239]=K,t[240]=ii):ii=t[240];let ai=ii,oi;t[241]!==ri||t[242]!==K?(oi=async function(){if(!K)return;let e=new Set(K.failed.map(hQ)),t=K.originalTargets.filter(t=>e.has(`${t.kind}:${t.path}`));ee(null),await ri(t)},t[241]=ri,t[242]=K,t[243]=oi):oi=t[243];let si=oi,ci=(0,Q.useRef)(ri),li;t[244]===ri?li=t[245]:(li=()=>{ci.current=ri},t[244]=ri,t[245]=li),(0,Q.useEffect)(li);let ui,di;t[246]===Symbol.for(`react.memo_cache_sentinel`)?(ui=()=>bZ(e=>{if(e.kind===`doc`||e.kind===`folder-index`){let t=e.docName,n=fe.current.find(e=>Pl(e)&&e.docName===t);ci.current([{kind:`file`,path:t,name:t.split(`/`).pop()??t,docExt:n?.docExt}]);return}if(e.kind===`folder`){ci.current([{kind:`folder`,path:e.folderPath,name:e.folderPath.split(`/`).pop()??e.folderPath}]);return}if(e.kind===`asset`){ci.current([{kind:`asset`,path:e.assetPath,name:e.assetPath.split(`/`).pop()??e.assetPath}]);return}console.warn(JSON.stringify({event:`file-tree-menu-action-delete-unsupported-kind`,kind:e.kind}))}),di=[],t[246]=ui,t[247]=di):(ui=t[246],di=t[247]),(0,Q.useEffect)(ui,di);let fi,pi;t[248]===Symbol.for(`react.memo_cache_sentinel`)?(fi=()=>wZ(e=>{if(e.kind===`doc`||e.kind===`folder-index`){let t=e.docName,n=fe.current.find(e=>Pl(e)&&e.docName===t);Nn.current({kind:`file`,path:t,name:t.split(`/`).pop()??t,docExt:n?.docExt});return}if(e.kind===`folder`){Nn.current({kind:`folder`,path:e.folderPath,name:e.folderPath.split(`/`).pop()??e.folderPath});return}console.warn(JSON.stringify({event:`file-tree-menu-action-duplicate-unsupported-kind`,kind:e.kind}))}),pi=[],t[248]=fi,t[249]=pi):(fi=t[248],pi=t[249]),(0,Q.useEffect)(fi,pi);let mi,hi;t[250]===$t?(mi=t[251],hi=t[252]):(mi=()=>SZ(e=>{if(e.kind===`doc`||e.kind===`folder-index`){let t=e.docName,n=Uf(t,fe.current.find(e=>Pl(e)&&e.docName===t)?.docExt);$t.startRenaming(n);return}if(e.kind===`folder`){$t.startRenaming(e.folderPath);return}if(e.kind===`asset`){$t.startRenaming(e.assetPath);return}console.warn(JSON.stringify({event:`file-tree-menu-action-rename-unsupported-kind`,kind:e.kind}))}),hi=[$t],t[250]=$t,t[251]=mi,t[252]=hi),(0,Q.useEffect)(mi,hi);let gi;t[253]===Symbol.for(`react.memo_cache_sentinel`)?(gi=function(){let e=je.current;e&&KZ(e),je.current=null},t[253]=gi):gi=t[253];let _i=gi,yi;t[254]===Symbol.for(`react.memo_cache_sentinel`)?(yi=function(e){let t=yX(e);if(!t)return!1;let n=it.current?.querySelector(AB)?.shadowRoot;if(!n)return!1;for(let e of n.querySelectorAll(`[data-item-path]`))if(e.dataset.itemPath===t)return!0;return!1},t[254]=yi):yi=t[254];let bi=yi,xi;t[255]===f?xi=t[256]:(xi=function(e){let t=HQ(e.nativeEvent);if(!t||t.endsWith(`/`)){_i();return}let n=fe.current.find(e=>jf(e)===t);if(n&&Bl(n)){_i();return}let r=n&&Pl(n)?n.docName:Jf(t,fe.current);if(n&&Pl(n)&&Ia(n.size)){_i();return}je.current!==r&&(_i(),je.current=r,GZ(r,e=>f(e)))},t[255]=f,t[256]=xi);let Si=xi,Ci;t[257]!==ve||t[258]!==$t||t[259]!==ge?(Ci=function(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=UQ(e.nativeEvent);if(!t){KQ(e.nativeEvent)&&ce(!0);return}let n=t.getAttribute(`aria-selected`)===`true`,r=t.dataset.itemPath;if(!r)return;let i=t.dataset.itemType===`folder`?Vf(r):r;if(t.dataset.itemType===`folder`){let t=Yf(i),r=fZ($t.getItem(i));if(!n){e.preventDefault(),e.stopPropagation(),r&&!r.isExpanded()&&r.expand(),queueMicrotask(()=>ge({kind:`folder`,folderPath:t}));return}if($t.getSelectedPaths().length!==1||window.location.hash===su(t))return;e.preventDefault(),e.stopPropagation(),r&&!r.isExpanded()&&r.expand(),queueMicrotask(()=>ge({kind:`folder`,folderPath:t}));return}if(!n){if(bX(i,on.current)||bi(i)){me.current=i,setTimeout(()=>ge({kind:`doc`,docName:i,registerPage:!0}),0);return}queueMicrotask(()=>ve(i));return}let a=Jf(i,fe.current);$t.getSelectedPaths().length===1&&window.location.hash!==hu(a)&&queueMicrotask(()=>ve(i))},t[257]=ve,t[258]=$t,t[259]=ge,t[260]=Ci):Ci=t[260];let wi=Ci,Ti;t[261]===Symbol.for(`react.memo_cache_sentinel`)?(Ti=function(e){Rf(e.nativeEvent)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`copy`,dt(!0))},t[261]=Ti):Ti=t[261];let Ei=Ti,Oi;t[262]===Symbol.for(`react.memo_cache_sentinel`)?(Oi=function(e){let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||dt(!1)},t[262]=Oi):Oi=t[262];let ki=Oi,Ai;t[263]===yr?Ai=t[264]:(Ai=function(e){if(!Rf(e.nativeEvent))return;let t=Mf(e.nativeEvent);t.length!==0&&(e.preventDefault(),e.stopPropagation(),dt(!1),yr(t,``,eQ))},t[263]=yr,t[264]=Ai);let ji=Ai;if(O){let e;return t[265]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(JQ,{}),t[265]=e):e=t[265],e}let Mi;t[266]!==i||t[267]!==M||t[268]!==P?(Mi=M?i(P?{id:`H-vDm3`}:{id:`09Tv5j`}):null,t[266]=i,t[267]=M,t[268]=P,t[269]=Mi):Mi=t[269];let Ni=Mi;if(E.length===0){if(Ni!==null){let e;return t[270]===Ni?e=t[271]:(e=(0,Z.jsx)(`div`,{className:`flex flex-1 items-center justify-center py-8`,children:(0,Z.jsx)(`span`,{role:`status`,className:`select-none text-sidebar-foreground/50 text-sm`,children:Ni})}),t[270]=Ni,t[271]=e),e}if(A){let e;return t[272]===A?e=t[273]:(e=(0,Z.jsx)(`div`,{className:`flex flex-1 items-center justify-center py-8`,children:(0,Z.jsx)(`span`,{role:`alert`,className:`select-none text-sidebar-foreground/50 text-sm`,children:A})}),t[272]=A,t[273]=e),e}if(Rl({visibility:{showHiddenFiles:Vt,showOnlyMarkdownFiles:Ht},unfilteredRootEntryCount:R,knownPageCount:x.size})===`filtered-to-zero`){let e;return t[274]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(RY,{}),t[274]=e):e=t[274],e}let e;t[275]===i?e=t[276]:(e=i({id:`5ZB7XC`}),t[275]=i,t[276]=e);let n=ut&&`bg-primary/5 ring-2 ring-primary/70 ring-inset`,r;t[277]===n?r=t[278]:(r=J(`flex flex-1 flex-col items-center justify-center gap-3 rounded-md py-8`,n),t[277]=n,t[278]=r);let a;t[279]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(`span`,{className:`select-none text-sidebar-foreground/30 text-sm`,children:(0,Z.jsx)(q,{id:`xiv-dW`})}),t[279]=a):a=t[279];let o;t[280]===Cr?o=t[281]:(o=()=>Cr(`file`,``),t[280]=Cr,t[281]=o);let s;t[282]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(q,{id:`6ibbCg`}),t[282]=s):s=t[282];let c;t[283]===o?c=t[284]:(c=(0,Z.jsx)(Y,{variant:`link`,size:`sm`,className:`font-mono uppercase`,onClick:o,children:s}),t[283]=o,t[284]=c);let l;return t[285]!==ji||t[286]!==e||t[287]!==r||t[288]!==c?(l=(0,Z.jsxs)(`section`,{"aria-label":e,className:r,onDragOver:Ei,onDragLeave:ki,onDrop:ji,children:[a,c]}),t[285]=ji,t[286]=e,t[287]=r,t[288]=c,t[289]=l):l=t[289],l}let Pi=B!==null,Fi=H?.targets[0]??null,Ii=null;if(I!==null){let e;if(t[290]!==a.locale||t[291]!==I){let n=new Intl.NumberFormat(a.locale).format(I);e=yl._({id:`LuoJWu`,values:{truncatedShownCount:I,formattedCount:n}}),t[290]=a.locale,t[291]=I,t[292]=e}else e=t[292];Ii=e}let Li;t[293]!==A||t[294]!==Ni||t[295]!==Ii?(Li=(A||Ni!==null||Ii!==null)&&(0,Z.jsxs)(Z.Fragment,{children:[Ni===null?A&&(0,Z.jsx)(XQ,{kind:`error`,children:A}):(0,Z.jsx)(XQ,{kind:`reconnecting`,children:Ni}),Ii!==null&&(0,Z.jsx)(XQ,{kind:`info`,children:Ii})]}),t[293]=A,t[294]=Ni,t[295]=Ii,t[296]=Li):Li=t[296];let zi;t[297]===v?zi=t[298]:(zi=UY(v),t[297]=v,t[298]=zi);let Bi=se?``:void 0,Hi;t[299]===Bi?Hi=t[300]:(Hi={[rQ]:Bi},t[299]=Bi,t[300]=Hi);let Ui;t[301]!==Pi||t[302]!==xe||t[303]!==Dr||t[304]!==E||t[305]!==Tr||t[306]!==cn||t[307]!==Mn||t[308]!==Fn||t[309]!==Rt||t[310]!==$t||t[311]!==zt||t[312]!==Cr||t[313]!==ae?(Ui=(e,t)=>(0,Z.jsx)(sQ,{item:e,context:t,anyActionBusy:Pi,workspace:ae,handoff:Rt,model:$t,okignoreBinding:zt,onStartCreating:Cr,onCreateFromTemplate:(e,t)=>Cr(`file`,e,{template:t}),onDuplicate:Mn,onImportTemplate:Fn,onDelete:e=>U({targets:e}),onExpandSubtree:Tr,onCollapseSubtree:Dr,folderTreePaths:cn,isAsset:xe.has(e.path),documents:E}),t[301]=Pi,t[302]=xe,t[303]=Dr,t[304]=E,t[305]=Tr,t[306]=cn,t[307]=Mn,t[308]=Fn,t[309]=Rt,t[310]=$t,t[311]=zt,t[312]=Cr,t[313]=ae,t[314]=Ui):Ui=t[314];let Wi;t[315]!==wi||t[316]!==Si||t[317]!==$t||t[318]!==Li||t[319]!==zi||t[320]!==Hi||t[321]!==Ui?(Wi=(0,Z.jsx)(`div`,{ref:it,className:`flex min-h-0 flex-1 flex-col`,children:(0,Z.jsx)(IY,{header:Li,model:$t,style:zi,...Hi,onClickCapture:wi,onMouseMove:Si,onMouseLeave:_i,renderContextMenu:Ui})}),t[315]=wi,t[316]=Si,t[317]=$t,t[318]=Li,t[319]=zi,t[320]=Hi,t[321]=Ui,t[322]=Wi):Wi=t[322];let Gi=!!H,Ki;t[323]===B?Ki=t[324]:(Ki=e=>{!e&&!B&&U(null)},t[323]=B,t[324]=Ki);let qi;t[325]!==i||t[326]!==B||t[327]!==H||t[328]!==ri||t[329]!==Fi?(qi=H&&Fi&&(0,Z.jsx)(is,{...(()=>{let e=tZ(typeof window<`u`&&window.okDesktop!=null?`electron`:`web`,H.targets);if(e)return{customTitle:e.title,customDescription:``,customDetail:e.detail,customConfirmLabel:e.confirmLabel,customConfirmLabelBusy:e.confirmLabelBusy,children:e.listedTargets?(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1 font-mono text-foreground text-xs`,children:e.listedTargets.map(mQ)}):null};let t=H.targets.length,n=Fi.name;return{itemName:t===1?Fi.kind===`folder`?`${Fi.name}/`:Fi.kind===`file`?`${Fi.name}${Fi.docExt??`.md`}`:Fi.name:void 0,customTitle:t>1?i({id:`abiHje`}):void 0,customDescription:t>1?i({id:`WMIKXK`,values:{targetCount:t}}):Fi.kind===`folder`?i({id:`a5W0q0`,values:{folderName:n}}):void 0}})(),isSubmitting:B!==null,onDelete:()=>ri(H.targets)}),t[325]=i,t[326]=B,t[327]=H,t[328]=ri,t[329]=Fi,t[330]=qi):qi=t[330];let Ji;t[331]!==Gi||t[332]!==Ki||t[333]!==qi?(Ji=(0,Z.jsx)(vn,{open:Gi,onOpenChange:Ki,children:qi}),t[331]=Gi,t[332]=Ki,t[333]=qi,t[334]=Ji):Ji=t[334];let Yi=!!W,Xi;t[335]===B?Xi=t[336]:(Xi=e=>{!e&&!B&&G(null)},t[335]=B,t[336]=Xi);let Qi;t[337]!==i||t[338]!==B||t[339]!==In||t[340]!==W?(Qi=W&&(0,Z.jsx)(is,{itemName:W.name+(W.kind===`file`?W.docExt??`.md`:`.md`),customTitle:i({id:`hLod4_`}),customDescription:i({id:`RMQe3p`}),customConfirmLabel:i({id:`hvZwVx`}),customConfirmLabelBusy:i({id:`ul1Atu`}),isSubmitting:B!==null,onDelete:()=>In(W,!0)}),t[337]=i,t[338]=B,t[339]=In,t[340]=W,t[341]=Qi):Qi=t[341];let $i;t[342]!==Yi||t[343]!==Xi||t[344]!==Qi?($i=(0,Z.jsx)(vn,{open:Yi,onOpenChange:Xi,children:Qi}),t[342]=Yi,t[343]=Xi,t[344]=Qi,t[345]=$i):$i=t[345];let ea=!!K,ta;t[346]===B?ta=t[347]:(ta=e=>{!e&&!B&&ee(null)},t[346]=B,t[347]=ta);let na;t[348]!==B||t[349]!==ai||t[350]!==si||t[351]!==K?(na=K&&(0,Z.jsx)(lZ,{failedTargets:K.failed,isSubmitting:B!==null,onDeletePermanently:ai,onRetry:si,onCancel:()=>ee(null)}),t[348]=B,t[349]=ai,t[350]=si,t[351]=K,t[352]=na):na=t[352];let ia;t[353]!==ea||t[354]!==ta||t[355]!==na?(ia=(0,Z.jsx)(vn,{open:ea,onOpenChange:ta,children:na}),t[353]=ea,t[354]=ta,t[355]=na,t[356]=ia):ia=t[356];let aa=ne!==null,oa;t[357]===Symbol.for(`react.memo_cache_sentinel`)?(oa=e=>{e||ie(null)},t[357]=oa):oa=t[357];let sa=ne?.parentDir??``,ca;t[358]!==aa||t[359]!==sa?(ca=(0,Z.jsx)(ev,{open:aa,onOpenChange:oa,kind:`file`,initialDir:sa,defaultToTemplate:!0}),t[358]=aa,t[359]=sa,t[360]=ca):ca=t[360];let la;return t[361]!==Wi||t[362]!==Ji||t[363]!==$i||t[364]!==ia||t[365]!==ca?(la=(0,Z.jsxs)(Z.Fragment,{children:[Wi,Ji,$i,ia,ca]}),t[361]=Wi,t[362]=Ji,t[363]=$i,t[364]=ia,t[365]=ca,t[366]=la):la=t[366],la}function mQ(e){return(0,Z.jsx)(`li`,{"data-testid":`delete-target-row`,children:nZ(e)},`${e.kind}:${e.path}`)}function hQ(e){return`${e.kind}:${e.path}`}function gQ(e){return`${e.kind}:${e.path}`}function _Q(e){return e.path}function vQ(e){return e.kind===`folder`}function yQ(e){return e.path}function bQ(e){return e.kind===`file`}function xQ(e){return e.file}function SQ(e){return!zl(e.path)}function CQ(e){return _(e)}function wQ(e){return S(e)}function TQ(e){return w(e)}function EQ(e){return e.path}function DQ(e){return e.kind===`asset`}function OQ(e){return e.endsWith(`/`)?e.slice(0,-1):e}function kQ(e){return!!e}function AQ(e){console.warn(`[FileTree] /api/workspace fetch failed:`,e)}function jQ(e){console.warn(`[FileTree] unmount cleanup failed:`,e)}function MQ(e){X.error(e)}function NQ(){}function PQ(e){return X.error(e)}function FQ(){}function IQ(){}function LQ(){}function RQ(){}function zQ(){}async function BQ(){}function VQ(e){return jf(e)}function HQ(e){return UQ(e)?.dataset.itemPath??null}function UQ(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.dataset.itemPath)return t;return null}function WQ(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.matches(`[data-file-tree-virtualized-root]`))return t;return null}function GQ(e){let t=UQ(e);if(t){let e=t.dataset.itemPath;if(!e)return null;let n=t.dataset.itemType===`folder`,r=Nf(e,n);return{parentDir:r,row:t,root:null,busyPath:n?Vf(r):e}}return KQ(e)?{parentDir:``,row:null,root:WQ(e),busyPath:eQ}:null}function KQ(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.matches(`[data-file-tree-virtualized-scroll]`))return!0;return!1}var qQ=[`w-3/4`,`w-2/3`,`w-4/5`,`w-1/2`,`w-3/5`,`w-2/3`];function JQ(){let e=(0,$.c)(5),{_:t}=ht(),n;e[0]===t?n=e[1]:(n=t({id:`5Tk8Fb`}),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=qQ.map(YQ),e[2]=r):r=e[2];let i;return e[3]===n?i=e[4]:(i=(0,Z.jsx)(`div`,{className:`flex flex-1 flex-col gap-1 px-2 py-2`,role:`status`,"aria-busy":`true`,"aria-label":n,children:r}),e[3]=n,e[4]=i),i}function YQ(e,t){return(0,Z.jsxs)(`div`,{className:`flex h-6 items-center gap-2`,children:[(0,Z.jsx)(Bd,{className:`h-3 w-3 shrink-0 rounded-sm`}),(0,Z.jsx)(Bd,{className:`h-3 ${e}`})]},t)}function XQ(e){let t=(0,$.c)(14),{kind:n,children:r}=e,i=n===`error`?sl:n===`reconnecting`?Qc:Kc,a=n===`error`?`alert`:`status`,o=n===`error`?`text-destructive`:`text-muted-foreground`,s;t[0]===o?s=t[1]:(s=J(`mx-2 mb-1 flex items-start gap-1.5 rounded-md bg-muted/50 px-2 py-1.5 text-xs leading-snug`,o),t[0]=o,t[1]=s);let c=n===`reconnecting`&&`animate-spin motion-reduce:animate-none`,l;t[2]===c?l=t[3]:(l=J(`mt-0.5 size-3.5 shrink-0`,c),t[2]=c,t[3]=l);let u;t[4]!==i||t[5]!==l?(u=(0,Z.jsx)(i,{"aria-hidden":`true`,className:l}),t[4]=i,t[5]=l,t[6]=u):u=t[6];let d;t[7]===r?d=t[8]:(d=(0,Z.jsx)(`span`,{className:`min-w-0`,children:r}),t[7]=r,t[8]=d);let f;return t[9]!==a||t[10]!==s||t[11]!==u||t[12]!==d?(f=(0,Z.jsxs)(`span`,{role:a,className:s,children:[u,d]}),t[9]=a,t[10]=s,t[11]=u,t[12]=d,t[13]=f):f=t[13],f}function ZQ(e){return e?yl._({id:`wTcjov`}):null}function QQ(e){let t=(0,$.c)(46),{_:n}=ht(),r=Xs(),i=Xo(),a=Wr(),o=Yr();if(r)return null;let{input:s,installStates:c,dispatch:l}=e,u=s===null,d,f,p,m,h,g,_,v,y,b,x;if(t[0]!==n||t[1]!==l||t[2]!==s||t[3]!==u||t[4]!==c||t[5]!==o||t[6]!==a||t[7]!==i){let e=ZQ(u),r;t[19]===o?r=t[20]:(r=e=>ti(o,e.id),t[19]=o,t[20]=r);let S=Xr.filter(r),C;t[21]===o?C=t[22]:(C=e=>Zr(o,e.source,e.id,!0,e.supported),t[21]=o,t[22]=C);let w=a.filter(C),T=i?co.filter(e=>$r(o,e,i.installedClis)):[];p=S.length>0,m=i!==null&&T.length>0,h=w.length>0,f=Zv,t[23]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsxs)(ey,{children:[(0,Z.jsx)(qs,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`O7_W_a`})]}),t[23]=x):x=t[23],d=ty,g=`max-h-80`,_=h?(0,Z.jsxs)(Xv,{"aria-label":n({id:`vPKX2i`}),children:[(0,Z.jsxs)(ry,{className:`flex items-center gap-1.5`,children:[(0,Z.jsx)(q,{id:`RXEbZy`}),(0,Z.jsx)(ei,{})]}),w.map(t=>{let r=t.name;return(0,Z.jsxs)($v,{onSelect:()=>{s!==null&&ds(s,{agent:{source:t.source,id:t.id}})},disabled:u,"data-testid":`empty-space-open-in-thread-${t.id}`,"aria-label":e?n({id:`gtGQ9S`,values:{agentName:r,hint:e}}):void 0,children:[(0,Z.jsx)(yo,{agentId:t.id,iconUrl:t.iconUrl,className:`size-4`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`5PrrYw`,values:{agentName:r}})}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},`${t.source}:${t.id}`)})]}):null,t[24]!==p||t[25]!==m||t[26]!==h?(v=h&&(m||p)?(0,Z.jsx)(iy,{}):null,t[24]=p,t[25]=m,t[26]=h,t[27]=v):v=t[27],y=m?(0,Z.jsxs)(Xv,{"aria-label":n({id:`ALhMYW`}),children:[(0,Z.jsx)(ry,{children:(0,Z.jsx)(q,{id:`ALhMYW`})}),T.map(t=>{let{displayName:r}=Yi[t];return(0,Z.jsxs)($v,{onSelect:()=>{s!==null&&i.launchInTerminal(s,t)},disabled:u,"data-testid":`empty-space-open-in-terminal-${t}`,"aria-label":n(e?{id:`AIn2Yv`,values:{displayName:r,hint:e}}:{id:`QYfQdv`,values:{displayName:r}}),children:[(0,Z.jsx)(Qr,{id:Kr(t),"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:r}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,b=p?(0,Z.jsxs)(Z.Fragment,{children:[m?(0,Z.jsx)(iy,{}):null,(0,Z.jsxs)(Xv,{"aria-label":n({id:`BBqGS9`}),children:[(0,Z.jsx)(ry,{children:(0,Z.jsx)(q,{id:`BBqGS9`})}),S.map(t=>{let r=!u,{displayName:i}=t,a=n(e?{id:`1ZpfyB`,values:{displayName:i,hint:e}}:{id:`WqLq6M`,values:{displayName:i}});return(0,Z.jsxs)($v,{disabled:!r,onSelect:()=>{if(s){if(c[t.id]?.installed!==!0){ls(t);return}l(t.id,s)}},"data-testid":`empty-space-open-in-${t.id}`,"aria-label":a,children:[(0,Z.jsx)(Qr,{id:t.id,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=n,t[1]=l,t[2]=s,t[3]=u,t[4]=c,t[5]=o,t[6]=a,t[7]=i,t[8]=d,t[9]=f,t[10]=p,t[11]=m,t[12]=h,t[13]=g,t[14]=_,t[15]=v,t[16]=y,t[17]=b,t[18]=x}else d=t[8],f=t[9],p=t[10],m=t[11],h=t[12],g=t[13],_=t[14],v=t[15],y=t[16],b=t[17],x=t[18];let S;t[28]!==p||t[29]!==m||t[30]!==h?(S=h||m||p?(0,Z.jsx)(iy,{}):null,t[28]=p,t[29]=m,t[30]=h,t[31]=S):S=t[31];let C;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(al,{"aria-hidden":`true`}),t[32]=C):C=t[32];let w;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsxs)($v,{onSelect:Sl,"data-testid":`empty-space-open-in-settings`,children:[C,(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`jRAGrQ`})})]}),t[33]=w):w=t[33];let T;t[34]!==d||t[35]!==g||t[36]!==_||t[37]!==v||t[38]!==y||t[39]!==b||t[40]!==S?(T=(0,Z.jsxs)(d,{className:g,children:[_,v,y,b,S,w]}),t[34]=d,t[35]=g,t[36]=_,t[37]=v,t[38]=y,t[39]=b,t[40]=S,t[41]=T):T=t[41];let E;return t[42]!==f||t[43]!==x||t[44]!==T?(E=(0,Z.jsxs)(f,{children:[x,T]}),t[42]=f,t[43]=x,t[44]=T,t[45]=E):E=t[45],E}async function $Q(e){try{let t=await e.project.listRecent(),n=e.config.projectPath;if(t.some(e=>e.path!==n))return null;let r=await IE();return e.config.freshlyCreated?r:r===0?0:null}catch(e){return console.warn(`[onboarding-card-visible] fresh-project probe failed; suppressing card`,e),null}}function e$(e){let t=(0,$.c)(4),n=e===void 0?ME:e,{initialized:r,dismissed:i,completed:a}=(0,Q.useSyncExternalStore)(n.subscribe,n.getSnapshot,n.getSnapshot),o=i||a,s=!r&&!o,c,l;return t[0]!==s||t[1]!==n?(c=()=>{if(!s)return;let e=window.okDesktop;if(e==null)return;let t=!1;return $Q(e).then(e=>{!t&&e!==null&&n.activate(e)}),()=>{t=!0}},l=[s,n],t[0]=s,t[1]=n,t[2]=c,t[3]=l):(c=t[2],l=t[3]),(0,Q.useEffect)(c,l),r&&!o}function t$(e){let t=(0,$.c)(3),n=e===void 0?ME:e,r,i;t[0]===n?(r=t[1],i=t[2]):(r=()=>{if(n.getSnapshot().steps.file)return;let e=Jl(e=>{e.includes(`files`)&&LE(n)});return LE(n),e},i=[n],t[0]=n,t[1]=r,t[2]=i),(0,Q.useEffect)(r,i)}var n$=3,r$=5200,i$=1500,a$=220;function o$(e){let t=(0,$.c)(14),{complete:n,label:r,shortcutId:i}=e,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(Yn,{checked:n,disabled:!0,"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none opacity-100 disabled:opacity-100`}),t[0]=n,t[1]=a);let o=n?`flex-1 text-muted-foreground/60`:`flex-1`,s;t[2]===n?s=t[3]:(s=n?(0,Z.jsxs)(`span`,{className:`sr-only`,children:[(0,Z.jsx)(q,{id:`Qj4RL5`}),` `]}):null,t[2]=n,t[3]=s);let c;t[4]!==r||t[5]!==o||t[6]!==s?(c=(0,Z.jsxs)(`span`,{className:o,children:[s,r]}),t[4]=r,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;t[8]===i?l=t[9]:(l=i?(0,Z.jsx)(H,{children:Ol(i)}):null,t[8]=i,t[9]=l);let u;return t[10]!==a||t[11]!==c||t[12]!==l?(u=(0,Z.jsxs)(`li`,{className:`flex items-center gap-2 py-0.5 text-sm`,children:[a,c,l]}),t[10]=a,t[11]=c,t[12]=l,t[13]=u):u=t[13],u}function s$(e){let t=(0,$.c)(24),{store:n,lingerMs:r}=e,i=n===void 0?ME:n,a=r===void 0?r$:r,{_:o}=ht(),{steps:s}=NE(i);t$(i);let[c,l]=(0,Q.useState)(0),[u,d]=(0,Q.useState)(!1),f=1+ +!!s.file+ +!!s.askedAi,p=f===n$,m,h;t[0]!==p||t[1]!==a?(m=()=>{if(!p)return;l(l$);let e=setInterval(()=>l(c$),i$),t=setTimeout(()=>{clearInterval(e),d(!0)},a);return()=>{clearInterval(e),clearTimeout(t)}},h=[p,a],t[0]=p,t[1]=a,t[2]=m,t[3]=h):(m=t[2],h=t[3]),(0,Q.useEffect)(m,h);let g,_;t[4]!==u||t[5]!==i?(g=()=>{if(!u)return;let e=setTimeout(()=>i.markCompleted(),a$);return()=>clearTimeout(e)},_=[u,i],t[4]=u,t[5]=i,t[6]=g,t[7]=_):(g=t[6],_=t[7]),(0,Q.useEffect)(g,_);let v;t[8]!==o||t[9]!==p?(v=p?o({id:`7jIIFX`}):``,t[8]=o,t[9]=p,t[10]=v):v=t[10];let y;t[11]===v?y=t[12]:(y=(0,Z.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,children:v}),t[11]=v,t[12]=y);let b;t[13]!==p||t[14]!==c||t[15]!==f||t[16]!==u||t[17]!==s.askedAi||t[18]!==s.file||t[19]!==i?(b=p?(0,Z.jsxs)(`section`,{"aria-hidden":!0,className:J(`mx-2 mb-1 flex items-center gap-3 rounded-lg border bg-card px-4 py-3 text-card-foreground`,`motion-reduce:animate-none motion-reduce:duration-0`,u?`animate-out fade-out-0 zoom-out-95 fill-mode-forwards duration-200`:`animate-in fade-in-0 zoom-in-95 duration-300`),children:[(0,Z.jsx)(Xp,{size:36,celebrateSignal:c}),(0,Z.jsx)(`span`,{className:`font-medium text-sm`,children:(0,Z.jsx)(q,{id:`7jIIFX`})})]}):(0,Z.jsxs)(`section`,{"aria-labelledby":`onboarding-card-heading`,className:`mx-2 mb-1 rounded-lg border bg-card px-4 py-3 text-card-foreground`,children:[(0,Z.jsxs)(`header`,{className:`mb-3 flex items-center justify-between`,children:[(0,Z.jsx)(`h2`,{id:`onboarding-card-heading`,className:`font-medium text-sm`,children:(0,Z.jsx)(q,{id:`Y1QMlM`})}),(0,Z.jsx)(`span`,{className:`text-muted-foreground/60 text-xs tabular-nums`,children:`${f} / ${n$}`})]}),(0,Z.jsxs)(`ul`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(o$,{complete:!0,label:(0,Z.jsx)(q,{id:`4E9jPa`})}),(0,Z.jsx)(o$,{complete:s.file,label:(0,Z.jsx)(q,{id:`6ibbCg`}),shortcutId:`new-item`}),(0,Z.jsx)(o$,{complete:s.askedAi,label:(0,Z.jsx)(q,{id:`xWEvuo`}),shortcutId:`open-ask-ai`})]}),(0,Z.jsx)(`footer`,{className:`-mb-1 mt-2 flex justify-end`,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`sm`,className:`h-auto px-2 py-1 text-muted-foreground text-xs`,onClick:()=>i.dismiss(),children:(0,Z.jsx)(q,{id:`1QfxQT`})})})]}),t[13]=p,t[14]=c,t[15]=f,t[16]=u,t[17]=s.askedAi,t[18]=s.file,t[19]=i,t[20]=b):b=t[20];let x;return t[21]!==y||t[22]!==b?(x=(0,Z.jsxs)(Z.Fragment,{children:[y,b]}),t[21]=y,t[22]=b,t[23]=x):x=t[23],x}function c$(e){return e+1}function l$(e){return e+1}function u$(){let e=(0,$.c)(1);if(!e$())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(s$,{}),e[0]=t):t=e[0],t}function d$(e){return e===null?null:e.kind===`local`?e.name:e.ref}function f$(e,t){if(e.length===0)return null;let n=`origin/${e}`;return t.includes(n)?n:t.find(t=>$a(t)===e)??null}function p$(e){switch(e){case`branch-exists`:return{id:`wzq9Rv`};case`already-checked-out`:return{id:`ljHjfg`};case`path-exists`:return{id:`mYzDD_`};case`invalid-branch`:return{id:`r-OJYm`};case`no-git`:return{id:`CFnavk`};case`helper-not-found`:return{id:`HqOPpj`};default:return{id:`-zA2E7`}}}function m$(e){let t=(0,$.c)(71),{open:n,onOpenChange:r,bridge:i,currentBranch:a,branches:o,existingWorktreeBranches:s,remoteBranches:c,behindByBranch:l,initialBranchName:u}=e,d=o===void 0?[]:o,f=c===void 0?[]:c,p=u===void 0?``:u,{_:m}=ht(),h=(0,Q.useId)(),g=(0,Q.useId)(),_=(0,Q.useId)(),v=(0,Q.useId)(),y=(0,Q.useId)(),b=(0,Q.useId)(),[x,S]=(0,Q.useState)(``),C;t[0]===a?C=t[1]:(C=a===null?null:{kind:`local`,name:a},t[0]=a,t[1]=C);let[w,T]=(0,Q.useState)(C),[E,D]=(0,Q.useState)(!1),[O,k]=(0,Q.useState)(``),[A,j]=(0,Q.useState)(!1),[M,N]=(0,Q.useState)(null),P=(0,Q.useRef)(null),F=(0,Q.useRef)(null),I,L;t[2]!==a||t[3]!==p||t[4]!==n?(I=()=>{if(!n)return;S(p),T(a===null?null:{kind:`local`,name:a}),D(!1),k(``),j(!1),N(null);let e=requestAnimationFrame(()=>P.current?.focus());return()=>cancelAnimationFrame(e)},L=[n,a,p],t[2]=a,t[3]=p,t[4]=n,t[5]=I,t[6]=L):(I=t[5],L=t[6]),(0,Q.useEffect)(I,L);let R=x.trim(),z=!A&&R.length>0,B=R.length>0&&d.includes(R),V=B?null:f$(R,f),H=V!==null,U=B||H,W=B&&(s?.has(R)??!1),G=d.filter(e=>e.toLowerCase().startsWith(R.toLowerCase())),K=!A&&G.length>0&&!U,ee=(a!==null&&!d.includes(a)?[a,...d]:d).map(y$),te=f.map(v$),ne=d$(w),re=O.trim().toLowerCase(),ie=re===``?ee:ee.filter(e=>e.name.toLowerCase().includes(re)),ae=re===``?te:te.filter(e=>e.ref.toLowerCase().includes(re)),oe=re!==``&&ie.length===0&&ae.length===0,se=async function(e){if(e.preventDefault(),z){j(!0),N(null);try{let e=H?{branch:R,createBranch:!0,remoteRef:V}:B?{branch:R,createBranch:!1}:{branch:R,createBranch:!0,baseBranch:w?.kind===`local`?w.name:void 0,baseRef:w?.kind===`remote`?w.ref:void 0},t=await i.worktree.create(e);if(!t.ok){N(p$(t.reason)),j(!1);return}td(),r(!1),await i.project.open({path:t.path,target:`new-window`,entryPoint:`worktree`})}catch(e){console.warn(`[NewWorktreeDialog] worktree create/open failed:`,e),X.error(m({id:`vAYoCZ`})),j(!1)}}},ce=vn,le;t[7]!==A||t[8]!==r?(le=e=>{A||r(e)},t[7]=A,t[8]=r,t[9]=le):le=t[9];let ue=mn,de;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,Z.jsx)(pn,{children:(0,Z.jsx)(q,{id:`DXd9LM`})}),t[10]=de):de=t[10];let fe;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,Z.jsxs)(_n,{children:[de,(0,Z.jsx)(fn,{children:(0,Z.jsx)(q,{id:`NEzPEh`})})]}),t[11]=fe):fe=t[11];let pe=hn,me;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,Z.jsx)(q,{id:`ng2Ibo`}),t[12]=me):me=t[12];let he;t[13]===g?he=t[14]:(he=(0,Z.jsx)(Fr,{htmlFor:g,children:me}),t[13]=g,t[14]=he);let ge;t[15]===m?ge=t[16]:(ge=m({id:`IX_uXB`}),t[15]=m,t[16]=ge);let _e;t[17]===M?_e=t[18]:(_e=e=>{S(e.target.value),M!==null&&N(null)},t[17]=M,t[18]=_e);let ve=M!==null,ye=M===null?y:`${y} ${b}`,be;t[19]!==x||t[20]!==A||t[21]!==g||t[22]!==ge||t[23]!==_e||t[24]!==ve||t[25]!==ye?(be=(0,Z.jsx)(vl,{id:g,ref:P,value:x,placeholder:ge,onChange:_e,disabled:A,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-invalid":ve,"aria-describedby":ye,"data-testid":`new-worktree-branch`}),t[19]=x,t[20]=A,t[21]=g,t[22]=ge,t[23]=_e,t[24]=ve,t[25]=ye,t[26]=be):be=t[26];let xe=R.length>0?(0,Z.jsxs)(`p`,{id:y,className:`flex items-start gap-1.5 text-1sm text-muted-foreground`,"data-testid":W?`new-worktree-mode-existing-worktree`:H?`new-worktree-mode-remote-checkout`:B?`new-worktree-mode-checkout`:`new-worktree-mode-create`,children:[W?(0,Z.jsx)(dc,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-amber-600 dark:text-amber-400`}):H?(0,Z.jsx)(ys,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-violet-600 dark:text-violet-400`}):B?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-blue-600 dark:text-blue-400`}):(0,Z.jsx)(Ut,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-green-600 dark:text-green-400`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1`,children:W?(0,Z.jsx)(q,{id:`QAi7Q9`,values:{trimmed:R},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`})}}):H?(0,Z.jsx)(q,{id:`oAGN8p`,values:{remoteCheckoutRef:V,trimmed:R},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),1:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),2:(0,Z.jsx)(`code`,{className:`font-mono`})}}):B?(0,Z.jsx)(q,{id:`b4VvP-`,values:{trimmed:R},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),1:(0,Z.jsx)(`code`,{className:`font-mono`})}}):ne===null?(0,Z.jsx)(q,{id:`t4sFKC`,values:{trimmed:R},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),1:(0,Z.jsx)(`code`,{className:`font-mono`})}}):(0,Z.jsx)(q,{id:`dGAdpH`,values:{trimmed:R,currentBaseLabel:ne},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),1:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),2:(0,Z.jsx)(`code`,{className:`font-mono`})}})})]}):null,Se=K?(0,Z.jsx)(`div`,{className:`max-h-40 overflow-y-auto rounded-md border bg-popover p-1 shadow-xs`,"data-testid":`new-worktree-branch-list`,children:G.map(e=>(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,size:`sm`,tabIndex:-1,onClick:()=>{S(e),M!==null&&N(null),P.current?.focus()},"data-testid":`new-worktree-branch-option-${e}`,className:`h-8 w-full justify-start gap-2 font-normal`,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:e})]},e))}):null,Ce=U?null:(0,Z.jsxs)(`div`,{className:`mt-1 flex flex-col gap-2`,children:[(0,Z.jsx)(Fr,{id:v,htmlFor:_,children:(0,Z.jsx)(q,{id:`ZWwYwM`})}),(0,Z.jsxs)(Bt,{open:E,onOpenChange:e=>{D(e),e||k(``)},children:[(0,Z.jsx)(Vt,{asChild:!0,children:(0,Z.jsxs)(Y,{id:_,type:`button`,variant:`outline`,role:`combobox`,"aria-expanded":E,"aria-haspopup":`listbox`,"aria-labelledby":`${v} ${_}`,"aria-label":m({id:`ZWwYwM`}),disabled:A,"data-testid":`new-worktree-base-trigger`,className:`w-full justify-between font-normal`,children:[(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[w?.kind===`remote`?(0,Z.jsx)(ys,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}):(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`min-w-0 truncate text-left`,children:ne===null?(0,Z.jsx)(q,{id:`EbjWsS`}):ne})]}),(0,Z.jsx)(yh,{"aria-hidden":`true`,className:`ml-2 size-4 shrink-0 opacity-50`})]})}),(0,Z.jsxs)(Kt,{align:`start`,className:`w-[var(--radix-popover-trigger-width)] p-1`,onWheel:_$,onTouchMove:g$,onOpenAutoFocus:e=>{e.preventDefault(),F.current?.focus()},children:[(0,Z.jsxs)(Lc,{className:`mb-1 h-8`,children:[(0,Z.jsx)(kc,{ref:F,"aria-label":m({id:`fuJZKk`}),placeholder:m({id:`hQXiDc`}),value:O,onChange:e=>k(e.target.value),onKeyDown:h$,"data-testid":`new-worktree-base-search`}),(0,Z.jsx)(Pc,{children:(0,Z.jsx)(Ke,{"aria-hidden":`true`})})]}),(0,Z.jsxs)(`div`,{role:`listbox`,"aria-label":m({id:`ZWwYwM`}),className:`max-h-56 overflow-y-auto`,"data-testid":`new-worktree-base-list`,children:[oe?(0,Z.jsx)(`p`,{className:`px-2 py-1.5 text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`Sh3Qkg`})}):null,ie.map(e=>{let t=e.name,n=l?.get(t);return(0,Z.jsxs)(Y,{type:`button`,role:`option`,"aria-selected":w?.kind===`local`&&w.name===t,variant:`ghost`,size:`sm`,onClick:()=>{T(e),D(!1),k(``)},"data-testid":`new-worktree-base-option-${t}`,className:`h-8 w-full justify-start gap-2 font-normal`,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:t}),n!==void 0&&n>0?(0,Z.jsx)(`span`,{className:`shrink-0 text-xs text-amber-600 dark:text-amber-400`,"data-testid":`new-worktree-base-behind-${t}`,children:(0,Z.jsx)(q,{id:`6-wLTJ`,values:{behind:n}})}):null]},`local:${t}`)}),ae.map(e=>{let t=e.ref;return(0,Z.jsxs)(Y,{type:`button`,role:`option`,"aria-selected":w?.kind===`remote`&&w.ref===t,variant:`ghost`,size:`sm`,onClick:()=>{T(e),D(!1),k(``)},"data-testid":`new-worktree-base-option-${t}`,className:`h-8 w-full justify-start gap-2 font-normal`,children:[(0,Z.jsx)(ys,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:t}),(0,Z.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:(0,Z.jsx)(q,{id:`dIYSqk`})})]},`remote:${t}`)})]})]})]})]}),we;t[27]!==m||t[28]!==M||t[29]!==b?(we=M===null?null:(0,Z.jsx)(`p`,{id:b,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`new-worktree-error`,children:m(M)}),t[27]=m,t[28]=M,t[29]=b,t[30]=we):we=t[30];let Te;t[31]!==h||t[32]!==se||t[33]!==he||t[34]!==be||t[35]!==xe||t[36]!==Se||t[37]!==Ce||t[38]!==we?(Te=(0,Z.jsxs)(`form`,{id:h,onSubmit:se,className:`flex flex-col gap-2`,children:[he,be,xe,Se,Ce,we]}),t[31]=h,t[32]=se,t[33]=he,t[34]=be,t[35]=xe,t[36]=Se,t[37]=Ce,t[38]=we,t[39]=Te):Te=t[39];let Ee;t[40]!==pe||t[41]!==Te?(Ee=(0,Z.jsx)(pe,{children:Te}),t[40]=pe,t[41]=Te,t[42]=Ee):Ee=t[42];let De;t[43]===r?De=t[44]:(De=()=>r(!1),t[43]=r,t[44]=De);let Oe;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,Z.jsx)(q,{id:`dEgA5A`}),t[45]=Oe):Oe=t[45];let ke;t[46]!==A||t[47]!==De?(ke=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,onClick:De,disabled:A,"data-testid":`new-worktree-cancel`,children:Oe}),t[46]=A,t[47]=De,t[48]=ke):ke=t[48];let Ae=!z,je;t[49]!==A||t[50]!==W||t[51]!==B||t[52]!==H?(je=A?(0,Z.jsx)(q,{id:`b4itZn`}):W?(0,Z.jsx)(q,{id:`XV5sC0`}):H?(0,Z.jsx)(q,{id:`XAyxsa`}):B?(0,Z.jsx)(q,{id:`uGaIIS`}):(0,Z.jsx)(q,{id:`iO8V-7`}),t[49]=A,t[50]=W,t[51]=B,t[52]=H,t[53]=je):je=t[53];let Me;t[54]!==h||t[55]!==Ae||t[56]!==je?(Me=(0,Z.jsx)(Y,{type:`submit`,form:h,disabled:Ae,"data-testid":`new-worktree-create`,children:je}),t[54]=h,t[55]=Ae,t[56]=je,t[57]=Me):Me=t[57];let Ne;t[58]!==ke||t[59]!==Me?(Ne=(0,Z.jsxs)(gn,{children:[ke,Me]}),t[58]=ke,t[59]=Me,t[60]=Ne):Ne=t[60];let Pe;t[61]!==ue||t[62]!==fe||t[63]!==Ee||t[64]!==Ne?(Pe=(0,Z.jsxs)(ue,{className:`sm:max-w-md`,"data-testid":`new-worktree-dialog`,children:[fe,Ee,Ne]}),t[61]=ue,t[62]=fe,t[63]=Ee,t[64]=Ne,t[65]=Pe):Pe=t[65];let Fe;return t[66]!==ce||t[67]!==n||t[68]!==Pe||t[69]!==le?(Fe=(0,Z.jsx)(ce,{open:n,onOpenChange:le,children:Pe}),t[66]=ce,t[67]=n,t[68]=Pe,t[69]=le,t[70]=Fe):Fe=t[70],Fe}function h$(e){return e.stopPropagation()}function g$(e){e.stopPropagation()}function _$(e){e.stopPropagation()}function v$(e){return{kind:`remote`,ref:e}}function y$(e){return{kind:`local`,name:e}}function b$(e){let t=(0,$.c)(54),{bridge:n,recents:r,currentPath:i,query:a,worktreeModel:o,closeMenu:s,guardStaleSelect:c,onRemoveRecent:l,flyoutPath:u,setFlyoutPath:d,openNewWorktreeWith:f}=e,{_:p}=ht(),m;t[0]!==p||t[1]!==n.project||t[2]!==s?(m=function(e,t){s(),n.project.open({path:e,target:`new-window`,entryPoint:t}).catch(e=>{console.warn(`[RecentProjectsMenu] project.open failed:`,e),X.error(p({id:`6HCOwA`}))})},t[0]=p,t[1]=n.project,t[2]=s,t[3]=m):m=t[3];let h=m,g;t[4]!==p||t[5]!==n.project||t[6]!==n.worktree?(g=async function(e){try{let t=await n.worktree.create({branch:e,createBranch:!1});if(!t.ok){X.error(p({id:`teD0H9`}));return}td(),await n.project.open({path:t.path,target:`new-window`,entryPoint:`worktree`})}catch(e){console.warn(`[RecentProjectsMenu] create/open branch failed:`,e),X.error(p({id:`LwMxXg`}))}},t[4]=p,t[5]=n.project,t[6]=n.worktree,t[7]=g):g=t[7];let _=g,v;t[8]!==s||t[9]!==i||t[10]!==h?(v=function(e){if(e.path===i){s();return}h(e.path,e.isLinkedWorktree?`worktree`:`recents`)},t[8]=s,t[9]=i,t[10]=h,t[11]=v):v=t[11];let y=v,b;t[12]!==s||t[13]!==_||t[14]!==i||t[15]!==h?(b=function(e){if(e.path!==null){if(e.path===i){s();return}h(e.path,e.isMain?`recents`:`worktree`);return}e.branch!==null&&(s(),_(e.branch))},t[12]=s,t[13]=_,t[14]=i,t[15]=h,t[16]=b):b=t[16];let x=b;if(a!==``){let e;t[17]!==s||t[18]!==_?(e=e=>{s(),_(e)},t[17]=s,t[18]=_,t[19]=e):e=t[19];let n;return t[20]!==i||t[21]!==c||t[22]!==y||t[23]!==l||t[24]!==a||t[25]!==r||t[26]!==e||t[27]!==o?(n=(0,Z.jsx)(T$,{recents:r,currentPath:i,query:a,worktreeModel:o,onPickEntry:y,onPickBranch:e,guardStaleSelect:c,onRemoveRecent:l}),t[20]=i,t[21]=c,t[22]=y,t[23]=l,t[24]=a,t[25]=r,t[26]=e,t[27]=o,t[28]=n):n=t[28],n}let S;if(t[29]!==s||t[30]!==i||t[31]!==u||t[32]!==c||t[33]!==x||t[34]!==l||t[35]!==f||t[36]!==h||t[37]!==r||t[38]!==d||t[39]!==o){let e=qv(r),n;t[41]!==s||t[42]!==i||t[43]!==u||t[44]!==c||t[45]!==x||t[46]!==l||t[47]!==f||t[48]!==h||t[49]!==d||t[50]!==o?(n=e=>(0,Z.jsx)(x$,{group:e,currentPath:i,worktreeModel:o,flyoutOpen:u===e.project.path,setFlyoutOpen:t=>d(n=>t?e.project.path:n===e.project.path?null:n),onPickProject:()=>{if(e.project.path===i){s();return}h(e.project.path,`recents`)},onPickFlyoutEntry:x,guardStaleSelect:c,onRemoveRecent:l,openNewWorktreeWith:f},e.project.path),t[41]=s,t[42]=i,t[43]=u,t[44]=c,t[45]=x,t[46]=l,t[47]=f,t[48]=h,t[49]=d,t[50]=o,t[51]=n):n=t[51],S=e.map(n),t[29]=s,t[30]=i,t[31]=u,t[32]=c,t[33]=x,t[34]=l,t[35]=f,t[36]=h,t[37]=r,t[38]=d,t[39]=o,t[40]=S}else S=t[40];let C;return t[52]===S?C=t[53]:(C=(0,Z.jsx)(Z.Fragment,{children:S}),t[52]=S,t[53]=C),C}function x$(e){let t=(0,$.c)(45),{group:n,currentPath:r,worktreeModel:i,flyoutOpen:a,setFlyoutOpen:o,onPickProject:s,onPickFlyoutEntry:c,guardStaleSelect:l,onRemoveRecent:u,openNewWorktreeWith:d}=e,f=n.project.path===r,p,m;t[0]!==r||t[1]!==n||t[2]!==i?(p=Wv(n,i,r),m=p.filter(S$),t[0]=r,t[1]=n,t[2]=i,t[3]=p,t[4]=m):(p=t[3],m=t[4]);let h=m.length;if(h===0){let e;t[5]!==l||t[6]!==s?(e=e=>{l(e)||s()},t[5]=l,t[6]=s,t[7]=e):e=t[7];let r=`project-switcher-recent-${n.project.path}`,i=f?`true`:void 0,a;t[8]!==n.project.name||t[9]!==n.project.path||t[10]!==f?(a=(0,Z.jsx)(O$,{name:n.project.name,path:n.project.path,current:f}),t[8]=n.project.name,t[9]=n.project.path,t[10]=f,t[11]=a):a=t[11];let o;t[12]!==e||t[13]!==r||t[14]!==i||t[15]!==a?(o=(0,Z.jsx)(Cr,{onSelect:e,className:`flex w-full min-w-0 flex-col items-start gap-0.5 pr-8`,"data-testid":r,"data-current":i,children:a}),t[12]=e,t[13]=r,t[14]=i,t[15]=a,t[16]=o):o=t[16];let c;t[17]!==n.project.name||t[18]!==n.project.path||t[19]!==u?(c=(0,Z.jsx)(ay,{path:n.project.path,name:n.project.name,onRemoveRecent:u,testIdPrefix:`project-switcher-recent`}),t[17]=n.project.name,t[18]=n.project.path,t[19]=u,t[20]=c):c=t[20];let d;t[21]!==o||t[22]!==c?(d=(0,Z.jsxs)(`div`,{className:`group/recent relative flex items-center`,children:[o,c]}),t[21]=o,t[22]=c,t[23]=d):d=t[23];let p;return t[24]!==n.project.path||t[25]!==u||t[26]!==d?(p=(0,Z.jsx)(oy,{path:n.project.path,onRemoveRecent:u,testIdPrefix:`project-switcher-recent`,children:d}),t[24]=n.project.path,t[25]=u,t[26]=d,t[27]=p):p=t[27],p}let g;t[28]!==r||t[29]!==n.worktrees||t[30]!==f?(g=f||n.worktrees.some(e=>e.path===r),t[28]=r,t[29]=n.worktrees,t[30]=f,t[31]=g):g=t[31];let _=g,v;return t[32]!==_||t[33]!==r||t[34]!==p||t[35]!==a||t[36]!==n||t[37]!==l||t[38]!==c||t[39]!==s||t[40]!==d||t[41]!==h||t[42]!==o||t[43]!==i?(v=(0,Z.jsx)(C$,{group:n,currentPath:r,containsCurrent:_,worktreeModel:i,flyoutEntries:p,openedWorktreeCount:h,flyoutOpen:a,setFlyoutOpen:o,onPickProject:s,onPickFlyoutEntry:c,guardStaleSelect:l,openNewWorktreeWith:d}),t[32]=_,t[33]=r,t[34]=p,t[35]=a,t[36]=n,t[37]=l,t[38]=c,t[39]=s,t[40]=d,t[41]=h,t[42]=o,t[43]=i,t[44]=v):v=t[44],v}function S$(e){return e.opened&&!e.isMain}function C$(e){let t=(0,$.c)(46),{group:n,currentPath:r,containsCurrent:i,worktreeModel:a,flyoutEntries:o,openedWorktreeCount:s,flyoutOpen:c,setFlyoutOpen:l,onPickProject:u,onPickFlyoutEntry:d,guardStaleSelect:f,openNewWorktreeWith:p}=e,{_:m}=ht(),h=n.project.path===r,g;t[0]!==f||t[1]!==u?(g=e=>{f(e)||u()},t[0]=f,t[1]=u,t[2]=g):g=t[2];let _=g,v,y;t[3]===_?(v=t[4],y=t[5]):(v=e=>{e.target.closest(`[data-project-open]`)!==null&&(e.preventDefault(),_(e.nativeEvent))},y=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),_(e.nativeEvent))},t[3]=_,t[4]=v,t[5]=y);let b=`project-switcher-group-${n.project.path}`,x=c?`true`:void 0,S=i?`true`:void 0,C;t[6]===n.project.name?C=t[7]:(C=(0,Z.jsx)(`span`,{className:`truncate font-medium text-sm`,"data-project-open":``,title:n.project.name,children:n.project.name}),t[6]=n.project.name,t[7]=C);let w;t[8]===n.project.path?w=t[9]:(w=(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,title:n.project.path,children:n.project.path}),t[8]=n.project.path,t[9]=w);let T;t[10]!==C||t[11]!==w?(T=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[C,w]}),t[10]=C,t[11]=w,t[12]=T):T=t[12];let E;t[13]!==m||t[14]!==h?(E=h?(0,Z.jsx)(Fo,{"aria-label":m({id:`Hp1l6f`}),className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}):null,t[13]=m,t[14]=h,t[15]=E):E=t[15];let D=`project-switcher-toggle-${n.project.path}`,O;t[16]===s?O=t[17]:(O=(0,Z.jsx)(`span`,{className:`tabular-nums`,children:s}),t[16]=s,t[17]=O);let k;t[18]===s?k=t[19]:(k=(0,Z.jsx)(q,{id:`AKxFtn`,values:{openedWorktreeCount:s}}),t[18]=s,t[19]=k);let A;t[20]!==D||t[21]!==O||t[22]!==k?(A=(0,Z.jsxs)(`span`,{className:`mt-0.5 shrink-0 text-muted-foreground text-xs`,"data-testid":D,children:[O,` `,k]}),t[20]=D,t[21]=O,t[22]=k,t[23]=A):A=t[23];let j;t[24]!==E||t[25]!==A||t[26]!==v||t[27]!==y||t[28]!==b||t[29]!==x||t[30]!==S||t[31]!==T?(j=(0,Z.jsxs)(Ar,{onClick:v,onKeyDown:y,className:`flex w-full min-w-0 items-start gap-2`,"data-testid":b,"data-flyout-open":x,"data-current":S,children:[T,E,A]}),t[24]=E,t[25]=A,t[26]=v,t[27]=y,t[28]=b,t[29]=x,t[30]=S,t[31]=T,t[32]=j):j=t[32];let M;t[33]!==o||t[34]!==c||t[35]!==n||t[36]!==f||t[37]!==d||t[38]!==p||t[39]!==a?(M=(0,Z.jsx)(w$,{group:n,open:c,worktreeModel:a,entries:o,onPickFlyoutEntry:d,guardStaleSelect:f,openNewWorktreeWith:p}),t[33]=o,t[34]=c,t[35]=n,t[36]=f,t[37]=d,t[38]=p,t[39]=a,t[40]=M):M=t[40];let N;return t[41]!==c||t[42]!==l||t[43]!==j||t[44]!==M?(N=(0,Z.jsxs)(wr,{open:c,onOpenChange:l,children:[j,M]}),t[41]=c,t[42]=l,t[43]=j,t[44]=M,t[45]=N):N=t[45],N}function w$(e){let t=(0,$.c)(15),{group:n,open:r,worktreeModel:i,entries:a,onPickFlyoutEntry:o,guardStaleSelect:s,openNewWorktreeWith:c}=e,{_:l}=ht(),[u,d]=(0,Q.useState)(``),f=(0,Q.useRef)(null),p=(0,Q.useRef)(null),m,h;t[0]===r?(m=t[1],h=t[2]):(m=()=>{r&&f.current?.focus({preventScroll:!0})},h=[r],t[0]=r,t[1]=m,t[2]=h),(0,Q.useEffect)(m,h);let g=function(){let e=p.current;return e===null?[]:[...e.querySelectorAll(`[role="menuitem"]`)]},_=function(e){g()[e]?.focus()},v=function(e,t){if(e.key===`ArrowDown`){e.preventDefault(),e.stopPropagation();let t=g(),n=t.indexOf(e.currentTarget);_(Math.min(n+1,t.length-1))}else if(e.key===`ArrowUp`){e.preventDefault(),e.stopPropagation();let t=g().indexOf(e.currentTarget);t<=0?f.current?.focus():_(t-1)}else e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),t())},y;if(t[3]!==a||t[4]!==u){let e=u.trim().toLowerCase();y=e===``?a:a.filter(t=>(t.branch??``).toLowerCase().includes(e)),t[3]=a,t[4]=u,t[5]=y}else y=t[5];let b=y,x=i!==null&&i.mainRoot===n.project.mainRoot,S=u.trim(),C=x&&S.length>0,w;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsx)(Pc,{align:`inline-start`,children:(0,Z.jsx)(Ke,{"aria-hidden":`true`})}),t[6]=w):w=t[6];let T;t[7]===l?T=t[8]:(T=l({id:`bSD4im`}),t[7]=l,t[8]=T);let E;t[9]===l?E=t[10]:(E=l({id:`Skr_7L`}),t[9]=l,t[10]=E);let D;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>d(e.target.value),t[11]=D):D=t[11];let O=b.length===0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(kr,{className:`font-normal text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,children:l({id:`-uaQnI`})}),C?(0,Z.jsxs)(Cr,{onSelect:e=>{s(e)||c(S)},onKeyDown:e=>v(e,()=>c(S)),className:`flex items-center gap-2`,"data-testid":`project-switcher-flyout-create`,children:[(0,Z.jsx)(Ut,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,title:S,children:(0,Z.jsx)(q,{id:`gHSAWT`,values:{typedName:S},components:{0:(0,Z.jsx)(`span`,{className:`font-medium`}),1:(0,Z.jsx)(`span`,{className:`font-mono`})}})})]}):null]}):b.map(e=>{let t=e.path??`branch:${e.branch}`,n=e.branch??l({id:`D12vtS`});return(0,Z.jsxs)(Cr,{onSelect:t=>{s(t)||o(e)},onKeyDown:t=>v(t,()=>o(e)),className:`flex items-center gap-2`,"data-testid":`project-switcher-flyout-entry-${t}`,"data-current":e.isCurrent?`true`:void 0,children:[(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,title:n,children:n}),e.isMain?(0,Z.jsx)(`span`,{className:`shrink-0 text-muted-foreground text-xs`,children:l({id:`Bn9-El`})}):e.opened?null:(0,Z.jsx)(`span`,{className:`shrink-0 text-muted-foreground text-xs`,title:l({id:`Dvwa0U`}),children:l({id:`nfoduq`})}),e.isCurrent?(0,Z.jsx)(k$,{}):null]},t)}),k;return t[12]!==p||t[13]!==O?(k=(0,Z.jsx)(`div`,{ref:p,className:`min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain subtle-scrollbar`,children:O}),t[12]=p,t[13]=O,t[14]=k):k=t[14],(0,Z.jsx)(Mr,{children:(0,Z.jsxs)(Tr,{avoidCollisions:!1,sideOffset:-8,className:`flex max-h-80 w-96 flex-col gap-1 overflow-hidden p-1`,"data-testid":`project-switcher-flyout-${n.project.path}`,children:[(0,Z.jsxs)(Lc,{className:`mb-1 h-8 shrink-0`,children:[w,(0,Z.jsx)(kc,{ref:f,"aria-label":T,placeholder:E,value:u,onChange:D,onKeyDown:e=>{e.key===`ArrowDown`&&(e.preventDefault(),_(0)),e.stopPropagation()},"data-testid":`project-switcher-flyout-search-${n.project.path}`})]}),k]})})}function T$(e){let t=(0,$.c)(43),{recents:n,currentPath:r,query:i,worktreeModel:a,onPickEntry:o,onPickBranch:s,guardStaleSelect:c,onRemoveRecent:l}=e,{_:u}=ht(),d;t[0]===i?d=t[1]:(d=e=>e.toLowerCase().includes(i),t[0]=i,t[1]=d);let f=d,p,m,h,g;if(t[2]!==u||t[3]!==r||t[4]!==c||t[5]!==f||t[6]!==s||t[7]!==o||t[8]!==l||t[9]!==n||t[10]!==a){g=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[15]===f?e=t[16]:(e=e=>!e.isLinkedWorktree&&(f(e.name)||f(e.path)),t[15]=f,t[16]=e);let i=n.filter(e),d;t[17]===f?d=t[18]:(d=e=>e.isLinkedWorktree===!0&&(f(e.branch??``)||f(e.path)),t[17]=f,t[18]=d);let _=n.filter(d),v=new Set(_.map(E$)),y;t[19]===a?.entries?y=t[20]:(y=a?.entries??[],t[19]=a?.entries,t[20]=y);let b=y.filter(e=>e.branch!==null&&f(e.branch)&&(e.worktreePath===null||!v.has(e.worktreePath))&&e.worktreePath!==r);if(i.length===0&&_.length===0&&b.length===0){let e;t[21]===u?e=t[22]:(e=u({id:`pEQFsW`}),t[21]=u,t[22]=e);let n;t[23]===e?n=t[24]:(n=(0,Z.jsx)(kr,{className:`font-normal text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,children:e}),t[23]=e,t[24]=n),g=n;break bb0}let x;t[25]!==r||t[26]!==c||t[27]!==o||t[28]!==l?(x=e=>(0,Z.jsx)(oy,{path:e.path,onRemoveRecent:l,testIdPrefix:`project-switcher-recent`,children:(0,Z.jsxs)(`div`,{className:`group/recent relative flex items-center`,children:[(0,Z.jsx)(Cr,{onSelect:t=>{c(t)||o(e)},className:`flex w-full min-w-0 flex-col items-start gap-0.5 pr-8`,"data-testid":`project-switcher-recent-${e.path}`,children:(0,Z.jsx)(O$,{name:e.name,path:e.path,current:e.path===r})}),(0,Z.jsx)(ay,{path:e.path,name:e.name,onRemoveRecent:l,testIdPrefix:`project-switcher-recent`})]})},e.path),t[25]=r,t[26]=c,t[27]=o,t[28]=l,t[29]=x):x=t[29],p=i.map(x);let S;t[30]!==r||t[31]!==c||t[32]!==o?(S=e=>(0,Z.jsxs)(Cr,{onSelect:t=>{c(t)||o(e)},className:`flex items-start gap-2`,"data-testid":`project-switcher-worktree-${e.path}`,"data-current":e.path===r?`true`:void 0,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0`}),(0,Z.jsx)(D$,{branch:e.branch??e.name,project:e.mainRoot===void 0?null:Kv(e.mainRoot)})]},e.path),t[30]=r,t[31]=c,t[32]=o,t[33]=S):S=t[33],m=_.map(S);let C;t[34]!==u||t[35]!==c||t[36]!==s||t[37]!==a?(C=e=>(0,Z.jsxs)(Cr,{onSelect:t=>{c(t)||e.branch!==null&&s(e.branch)},className:`flex items-start gap-2`,"data-testid":`project-switcher-branch-${e.branch}`,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 opacity-40`}),(0,Z.jsx)(D$,{branch:e.branch??``,project:a===null?null:Kv(a.mainRoot),hint:u({id:`nfoduq`})})]},`branch:${e.branch}`),t[34]=u,t[35]=c,t[36]=s,t[37]=a,t[38]=C):C=t[38],h=b.map(C)}t[2]=u,t[3]=r,t[4]=c,t[5]=f,t[6]=s,t[7]=o,t[8]=l,t[9]=n,t[10]=a,t[11]=p,t[12]=m,t[13]=h,t[14]=g}else p=t[11],m=t[12],h=t[13],g=t[14];if(g!==Symbol.for(`react.early_return_sentinel`))return g;let _;return t[39]!==p||t[40]!==m||t[41]!==h?(_=(0,Z.jsxs)(Z.Fragment,{children:[p,m,h]}),t[39]=p,t[40]=m,t[41]=h,t[42]=_):_=t[42],_}function E$(e){return e.path}function D$(e){let t=(0,$.c)(12),{branch:n,project:r,hint:i}=e,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:n}),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=i===void 0?null:(0,Z.jsx)(`span`,{className:`shrink-0 text-muted-foreground text-xs`,children:i}),t[2]=i,t[3]=o);let s;t[4]!==a||t[5]!==o?(s=(0,Z.jsxs)(`span`,{className:`flex w-full min-w-0 items-center gap-1.5`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6];let c;t[7]===r?c=t[8]:(c=r===null?null:(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,title:r,children:r}),t[7]=r,t[8]=c);let l;return t[9]!==s||t[10]!==c?(l=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[s,c]}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function O$(e){let t=(0,$.c)(15),{name:n,path:r,current:i}=e,a=i&&`font-medium`,o;t[0]===a?o=t[1]:(o=J(`flex w-full items-center gap-1.5`,a),t[0]=a,t[1]=o);let s;t[2]===n?s=t[3]:(s=(0,Z.jsx)(`span`,{className:`truncate font-medium text-sm`,title:n,children:n}),t[2]=n,t[3]=s);let c;t[4]===i?c=t[5]:(c=i?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}):null,t[4]=i,t[5]=c);let l;t[6]!==o||t[7]!==s||t[8]!==c?(l=(0,Z.jsxs)(`span`,{className:o,children:[s,c]}),t[6]=o,t[7]=s,t[8]=c,t[9]=l):l=t[9];let u;t[10]===r?u=t[11]:(u=(0,Z.jsx)(`span`,{className:`w-full truncate text-muted-foreground text-xs`,title:r,children:r}),t[10]=r,t[11]=u);let d;return t[12]!==l||t[13]!==u?(d=(0,Z.jsxs)(`span`,{className:`flex w-full min-w-0 flex-col gap-0.5`,children:[l,u]}),t[12]=l,t[13]=u,t[14]=d):d=t[14],d}function k$(){let e=(0,$.c)(4),{_:t}=ht(),n;e[0]===t?n=e[1]:(n=t({id:`Hp1l6f`}),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,Z.jsx)(Fo,{"aria-label":n,className:`size-3.5 shrink-0 text-muted-foreground`}),e[2]=n,e[3]=r),r}var A$=(e,t,n)=>Rv(e,t,n,`ProjectSwitcher`),j$=350;function M$(e){let t=(0,$.c)(121),{bridge:n}=e,{_:r}=ht(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(``),[u,d]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(!1),[m,h]=(0,Q.useState)(``),[g,_]=(0,Q.useState)(null),v=yP(),y=Fv(),b=typeof window<`u`&&window.okDesktop!=null,x=(0,Q.useRef)(!1),S=(0,Q.useRef)(!1),C=(0,Q.useRef)(null),w;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{e&&(S.current=!0,C.current!==null&&clearTimeout(C.current),C.current=setTimeout(()=>{S.current=!1},j$)),s(e),e||(l(``),_(null))},t[0]=w):w=t[0];let T=w,E;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>!b||!S.current?!1:(e.preventDefault(),!0),t[1]=E):E=t[1];let D=E,O;t[2]!==r||t[3]!==n.project||t[4]!==o?(O=()=>{if(!o)return;let e=!1;return A$(async()=>{let t=await n.project.listRecent();e||a(t)},r({id:`fYKgzG`})),()=>{e=!0}},t[2]=r,t[3]=n.project,t[4]=o,t[5]=O):O=t[5];let k;t[6]!==r||t[7]!==n||t[8]!==o?(k=[o,n,r],t[6]=r,t[7]=n,t[8]=o,t[9]=k):k=t[9],(0,Q.useEffect)(O,k);let A,j;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>Ht(e=>{e===`new-worktree`?(s(!1),_(null),h(``),p(!0)):e===`switch-worktree`&&s(!0)}),j=[],t[10]=A,t[11]=j):(A=t[10],j=t[11]),(0,Q.useEffect)(A,j);let M;t[12]!==r||t[13]!==n.dialog||t[14]!==n.project?(M=()=>{T(!1),A$(async()=>{let e=await n.dialog.openFolder();e&&await n.project.open({path:e,target:`new-window`,entryPoint:`pick-existing`})},r({id:`gmJ0An`}))},t[12]=r,t[13]=n.dialog,t[14]=n.project,t[15]=M):M=t[15];let N=M,P;t[16]!==r||t[17]!==n.project?(P=()=>{T(!1),A$(()=>n.project.openFile(),r({id:`8vCZcs`}))},t[16]=r,t[17]=n.project,t[18]=P):P=t[18];let F=P,I;t[19]!==r||t[20]!==n.navigator?(I=()=>{T(!1),A$(()=>n.navigator.open(),r({id:`jol95m`}))},t[19]=r,t[20]=n.navigator,t[21]=I):I=t[21];let L=I,R;t[22]!==r||t[23]!==n.project?(R=e=>A$(async()=>{await n.project.removeRecent(e),a(t=>t===null?t:t.filter(t=>t.path!==e))},r({id:`viwC-K`})),t[22]=r,t[23]=n.project,t[24]=R):R=t[24];let z=R,B;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(B=()=>{T(!1),d(!0)},t[25]=B):B=t[25];let V=B,H;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>{T(!1),h(e),p(!0)},t[26]=H):H=t[26];let U=H,W=n.config.projectPath,G;t[27]===c?G=t[28]:(G=c.trim().toLowerCase(),t[27]=c,t[28]=G);let K=G,ee=K!==``,te;t[29]===i?te=t[30]:(te=i??[],t[29]=i,t[30]=te);let ne=te,re;t[31]!==ee||t[32]!==ne?(re=ee?ne.filter(B$):ne,t[31]=ee,t[32]=ne,t[33]=re):re=t[33];let ie=re,ae=ee?null:y,oe=v!==null&&`h-auto py-1.5`,se;t[34]===oe?se=t[35]:(se=J(`justify-between text-sidebar-foreground/70 hover:text-sidebar-foreground! data-open:hover:text-sidebar-foreground!`,oe),t[34]=oe,t[35]=se);let ce;t[36]===r?ce=t[37]:(ce=r({id:`zZ_I5K`}),t[36]=r,t[37]=ce);let le;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(le=b?()=>{x.current=!0}:void 0,t[38]=le):le=t[38];let ue;t[39]===o?ue=t[40]:(ue=b?()=>{if(x.current){x.current=!1;return}T(!o)}:void 0,t[39]=o,t[40]=ue);let de;t[41]===n.config.projectName?de=t[42]:(de=(0,Z.jsx)(`span`,{className:`truncate`,children:n.config.projectName}),t[41]=n.config.projectName,t[42]=de);let fe;t[43]===v?fe=t[44]:(fe=v===null?null:(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-xs text-sidebar-foreground/50 group-hover/menu-button:text-sidebar-foreground`,"data-testid":`project-switcher-branch`,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`size-3! shrink-0`}),(0,Z.jsx)(`span`,{className:`truncate`,children:v})]}),t[43]=v,t[44]=fe);let pe;t[45]!==de||t[46]!==fe?(pe=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[de,fe]}),t[45]=de,t[46]=fe,t[47]=pe):pe=t[47];let me;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,Z.jsx)(yh,{"aria-hidden":`true`,className:`opacity-60`}),t[48]=me):me=t[48];let he;t[49]!==n.config.projectPath||t[50]!==se||t[51]!==ce||t[52]!==ue||t[53]!==pe?(he=(0,Z.jsx)(Dr,{asChild:!0,children:(0,Z.jsxs)(lP,{className:se,"data-testid":`project-switcher-trigger`,"aria-label":ce,title:n.config.projectPath,onPointerDown:le,onClick:ue,children:[pe,me]})}),t[49]=n.config.projectPath,t[50]=se,t[51]=ce,t[52]=ue,t[53]=pe,t[54]=he):he=t[54];let ge;t[55]!==r||t[56]!==n||t[57]!==W||t[58]!==g||t[59]!==ie||t[60]!==ae||t[61]!==z||t[62]!==K||t[63]!==i||t[64]!==c?(ge=i===null?null:i.length===0?(0,Z.jsx)(kr,{className:`font-normal text-muted-foreground text-xs`,children:(0,Z.jsx)(q,{id:`MUrVEo`})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Lc,{className:`mb-1 h-8 border-0 shadow-none has-[[data-slot=input-group-control]:focus-visible]:ring-0`,children:[(0,Z.jsx)(kc,{"aria-label":r({id:`blFttG`}),placeholder:r({id:`RVZJWQ`}),value:c,onChange:e=>{e.target.value!==``&&_(null),l(e.target.value)},onKeyDown:z$,"data-testid":`project-switcher-search`}),(0,Z.jsx)(Pc,{children:(0,Z.jsx)(Ke,{"aria-hidden":`true`})})]}),(0,Z.jsx)(Pr,{}),(0,Z.jsx)(`div`,{className:`max-h-64 overflow-x-hidden overflow-y-auto overscroll-contain subtle-scrollbar scroll-fade-mask`,"data-testid":`project-switcher-scroll`,onScroll:()=>{g!==null&&_(null)},children:(0,Z.jsx)(b$,{bridge:n,recents:ie,currentPath:W,query:K,worktreeModel:ae,closeMenu:()=>T(!1),guardStaleSelect:D,onRemoveRecent:z,flyoutPath:g,setFlyoutPath:_,openNewWorktreeWith:U})})]}),t[55]=r,t[56]=n,t[57]=W,t[58]=g,t[59]=ie,t[60]=ae,t[61]=z,t[62]=K,t[63]=i,t[64]=c,t[65]=ge):ge=t[65];let _e;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,Z.jsx)(Pr,{}),t[66]=_e):_e=t[66];let ve;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(ve=e=>{D(e)||V()},t[67]=ve):ve=t[67];let ye;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,Z.jsxs)(Cr,{onSelect:ve,"data-testid":`project-switcher-new-project`,children:[(0,Z.jsx)(Ut,{"aria-hidden":`true`,className:`text-muted-foreground`}),(0,Z.jsx)(q,{id:`gKi-a_`})]}),t[68]=ye):ye=t[68];let be;t[69]===L?be=t[70]:(be=e=>{D(e)||L()},t[69]=L,t[70]=be);let xe,Se;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,Z.jsx)($e,{"aria-hidden":`true`,className:`text-muted-foreground`}),Se=(0,Z.jsx)(q,{id:`xaDWAI`}),t[71]=xe,t[72]=Se):(xe=t[71],Se=t[72]);let Ce;t[73]===be?Ce=t[74]:(Ce=(0,Z.jsxs)(Cr,{onSelect:be,"data-testid":`project-switcher-switch-project`,children:[xe,Se]}),t[73]=be,t[74]=Ce);let we;t[75]===N?we=t[76]:(we=e=>{D(e)||N()},t[75]=N,t[76]=we);let Te,Ee;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,Z.jsx)(dc,{"aria-hidden":`true`,className:`text-muted-foreground`}),Ee=(0,Z.jsx)(q,{id:`PVUn_c`}),t[77]=Te,t[78]=Ee):(Te=t[77],Ee=t[78]);let De;t[79]===we?De=t[80]:(De=(0,Z.jsxs)(Cr,{onSelect:we,"data-testid":`project-switcher-open-folder`,children:[Te,Ee]}),t[79]=we,t[80]=De);let Oe;t[81]===F?Oe=t[82]:(Oe=e=>{D(e)||F()},t[81]=F,t[82]=Oe);let ke,Ae;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,Z.jsx)(Wn,{"aria-hidden":`true`,className:`text-muted-foreground`}),Ae=(0,Z.jsx)(q,{id:`9npOH9`}),t[83]=ke,t[84]=Ae):(ke=t[83],Ae=t[84]);let je;t[85]===Oe?je=t[86]:(je=(0,Z.jsxs)(Cr,{onSelect:Oe,"data-testid":`project-switcher-open-file`,children:[ke,Ae]}),t[85]=Oe,t[86]=je);let Me;t[87]===v?Me=t[88]:(Me=v===null?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Pr,{}),(0,Z.jsxs)(Cr,{onSelect:e=>{D(e)||(T(!1),h(``),p(!0))},"data-testid":`project-switcher-new-worktree`,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`text-muted-foreground`}),(0,Z.jsx)(q,{id:`DXd9LM`})]})]}),t[87]=v,t[88]=Me);let Ne;t[89]!==ge||t[90]!==Ce||t[91]!==De||t[92]!==je||t[93]!==Me?(Ne=(0,Z.jsxs)(jr,{align:`start`,side:`top`,className:`min-w-[260px]`,"data-testid":`project-switcher-menu`,children:[ge,_e,ye,Ce,De,je,Me]}),t[89]=ge,t[90]=Ce,t[91]=De,t[92]=je,t[93]=Me,t[94]=Ne):Ne=t[94];let Pe;t[95]!==o||t[96]!==he||t[97]!==Ne?(Pe=(0,Z.jsxs)(Nr,{open:o,onOpenChange:T,modal:!1,children:[he,Ne]}),t[95]=o,t[96]=he,t[97]=Ne,t[98]=Pe):Pe=t[98];let Fe;t[99]!==n||t[100]!==u?(Fe=(0,Z.jsx)(Ig,{open:u,onOpenChange:d,bridge:n}),t[99]=n,t[100]=u,t[101]=Fe):Fe=t[101];let Ie;t[102]===y?.entries?Ie=t[103]:(Ie=y?.entries.map(R$).filter(L$),t[102]=y?.entries,t[103]=Ie);let Le;t[104]===y?.entries?Le=t[105]:(Le=new Set(y?.entries.filter(I$).map(F$)),t[104]=y?.entries,t[105]=Le);let Re=y?.remoteBranches,ze;t[106]===y?.entries?ze=t[107]:(ze=new Map(y?.entries.filter(P$).map(N$)),t[106]=y?.entries,t[107]=ze);let Be;t[108]!==v||t[109]!==n||t[110]!==m||t[111]!==f||t[112]!==Ie||t[113]!==Le||t[114]!==Re||t[115]!==ze?(Be=(0,Z.jsx)(m$,{open:f,onOpenChange:p,bridge:n,currentBranch:v,initialBranchName:m,branches:Ie,existingWorktreeBranches:Le,remoteBranches:Re,behindByBranch:ze}),t[108]=v,t[109]=n,t[110]=m,t[111]=f,t[112]=Ie,t[113]=Le,t[114]=Re,t[115]=ze,t[116]=Be):Be=t[116];let Ve;return t[117]!==Pe||t[118]!==Fe||t[119]!==Be?(Ve=(0,Z.jsxs)(Z.Fragment,{children:[Pe,Fe,Be]}),t[117]=Pe,t[118]=Fe,t[119]=Be,t[120]=Ve):Ve=t[120],Ve}function N$(e){return[e.branch,e.behind]}function P$(e){return e.branch!==null&&e.behind!==void 0}function F$(e){return e.branch}function I$(e){return e.branch!==null&&e.worktreePath!==null}function L$(e){return e!==null}function R$(e){return e.branch}function z$(e){return e.stopPropagation()}function B$(e){return!e.isLinkedWorktree}function V$(e,t){let n=e instanceof Error?e:Error(String(e));console.warn(JSON.stringify({event:`jsx-render-failure`,component:`sidebarSearchPill`,rawComponentName:`sidebarSearchPill`,error:String(n),stack:t.componentStack})),Aa(`sidebarSearchPill`)}function H$(e){let t=(0,$.c)(8),{onClick:n,className:r}=e,i;t[0]===r?i=t[1]:(i=J(`rounded-lg h-9 w-full justify-start gap-2 px-3 font-normal text-muted-foreground`,r),t[0]=r,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(Ke,{"aria-hidden":`true`}),t[2]=a):a=t[2];let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(`span`,{className:`flex-1 text-left text-sm`,children:(0,Z.jsx)(q,{id:`A1taO8`})}),t[3]=o):o=t[3];let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(H,{className:`text-foreground/70`,children:Ol(`command-palette`)}),t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==i?(c=(0,Z.jsxs)(Y,{variant:`outline`,onClick:n,"data-telemetry-event":`ok.sidebar.search_pill.click`,className:i,children:[a,o,s]}),t[5]=n,t[6]=i,t[7]=c):c=t[7],c}function U$(){let e=(0,$.c)(36),{_:t}=ht(),n=es(),{activeDocName:r}=Re(),[i,a]=(0,Q.useState)(!1),o=os(),s;e[0]!==n.data||e[1]!==n.status?(s=n.status===`ready`?n.data:[],e[0]=n.data,e[1]=n.status,e[2]=s):s=e[2];let c=s,l;e[3]===c?l=e[4]:(l=Ys(c),e[3]=c,e[4]=l);let u=l,d=Zs(),f;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(f={},e[5]=f):f=e[5];let[p,m]=(0,Q.useState)(f),h;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(rP,{asChild:!0,children:(0,Z.jsxs)(un,{className:`flex w-full items-center gap-1.5`,children:[(0,Z.jsx)(Rh,{className:`size-3.5 shrink-0`}),(0,Z.jsx)(q,{id:`PCSkw2`}),(0,Z.jsx)(Ro,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-[state=open]/skills:rotate-90`})]})}),e[6]=h):h=e[6];let g;e[7]===t?g=e[8]:(g=t({id:`MdpSC1`}),e[7]=t,e[8]=g);let _,v;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>a(!0),v=(0,Z.jsx)(Ut,{}),e[9]=_,e[10]=v):(_=e[9],v=e[10]);let y;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(q,{id:`MdpSC1`})}),e[11]=y):y=e[11];let b;e[12]===g?b=e[13]:(b=(0,Z.jsxs)(iP,{title:g,onClick:_,children:[v,y]}),e[12]=g,e[13]=b);let x;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)($$,{}),e[14]=x):x=e[14];let S;e[15]===c?S=e[16]:(S=c.some(G$),e[15]=c,e[16]=S);let C;e[17]===S?C=e[18]:(C=(0,Z.jsx)(Z$,{hasProjectSkills:S}),e[17]=S,e[18]=C);let w;e[19]!==o||e[20]!==r||e[21]!==u||e[22]!==p||e[23]!==d||e[24]!==c?(w=c.length===0?(0,Z.jsx)(`p`,{className:`px-2 py-1 text-xs text-muted-foreground`,children:(0,Z.jsx)(q,{id:`PdJZ5p`})}):Ks.filter(e=>c.some(t=>t.scope===e)).map(e=>(0,Z.jsxs)(dn,{className:`group/scope`,open:c.some(t=>t.scope===e&&qi(t.scope,t.name)===r)||(p[e]??!1),onOpenChange:t=>m(n=>({...n,[e]:t})),children:[(0,Z.jsxs)(un,{className:`flex w-full items-center gap-1 px-2 pt-1 pb-0.5 text-[11px] text-muted-foreground/70 hover:text-muted-foreground`,children:[(0,Z.jsx)(Ro,{className:`size-3 shrink-0 transition-transform group-data-[state=open]/scope:rotate-90`}),(0,Z.jsx)(`span`,{className:`truncate`,children:d[e]})]}),(0,Z.jsx)(ln,{children:(0,Z.jsx)(oP,{className:`pl-2`,children:c.filter(t=>t.scope===e).map(e=>(0,Z.jsx)(K$,{skill:e,activeDocName:r,actions:o,existingNames:u[e.scope]},`${e.scope}::${e.name}`))})})]},e)),e[19]=o,e[20]=r,e[21]=u,e[22]=p,e[23]=d,e[24]=c,e[25]=w):w=e[25];let T;e[26]!==C||e[27]!==w?(T=(0,Z.jsx)(ln,{children:(0,Z.jsxs)(aP,{children:[x,C,w]})}),e[26]=C,e[27]=w,e[28]=T):T=e[28];let E;e[29]===i?E=e[30]:(E=(0,Z.jsx)(Fs,{defaultScope:`project`,open:i,onOpenChange:a,onCreated:W$}),e[29]=i,e[30]=E);let D;return e[31]!==o.dialogs||e[32]!==T||e[33]!==E||e[34]!==b?(D=(0,Z.jsx)(dn,{className:`group/skills shrink-0`,children:(0,Z.jsxs)(nP,{className:`px-0`,children:[h,b,T,o.dialogs,E]})}),e[31]=o.dialogs,e[32]=T,e[33]=E,e[34]=b,e[35]=D):D=e[35],D}function W$(e){let{scope:t,name:n}=e;return mc(qi(t,n))}function G$(e){return e.scope===`project`&&!e.managed}function K$(e){let t=(0,$.c)(52),{skill:n,activeDocName:r,actions:i,existingNames:a}=e,{_:o}=ht(),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(!1),d;t[0]!==n.name||t[1]!==n.scope?(d=qi(n.scope,n.name),t[0]=n.name,t[1]=n.scope,t[2]=d):d=t[2];let f=r===d,p,m,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>{e.preventDefault(),u(!0)},m=(0,Z.jsx)(Ro,{className:`size-3 shrink-0 text-muted-foreground transition-transform group-data-[state=open]/skill:rotate-90`}),h=(0,Z.jsx)(Rh,{className:`size-3 shrink-0 text-muted-foreground`}),t[3]=p,t[4]=m,t[5]=h):(p=t[3],m=t[4],h=t[5]);let g=n.name,_;t[6]===n.name?_=t[7]:(_=Ws(n.name),t[6]=n.name,t[7]=_);let v;t[8]!==n.name||t[9]!==_?(v=(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:g,children:_}),t[8]=n.name,t[9]=_,t[10]=v):v=t[10];let y;t[11]!==o||t[12]!==n.bundledVersion||t[13]!==n.updateAvailable?(y=n.updateAvailable?(0,Z.jsx)(`span`,{title:o({id:`1YJ4Yg`,values:{0:n.bundledVersion?` (${n.bundledVersion})`:``}}),className:`flex items-center`,children:(0,Z.jsx)(Qc,{className:`size-3 text-primary`,"aria-label":o({id:`CifUuG`})})}):null,t[11]=o,t[12]=n.bundledVersion,t[13]=n.updateAvailable,t[14]=y):y=t[14];let b;t[15]!==o||t[16]!==n.installed||t[17]!==n.managed?(b=n.managed?(0,Z.jsx)(`span`,{title:o({id:`U7HJ4y`}),className:`flex items-center`,children:(0,Z.jsx)(Ko,{className:`size-3 text-muted-foreground`,"aria-label":o({id:`U7HJ4y`})})}):(0,Z.jsx)(Ns,{installed:n.installed,subtle:!0,className:`shrink-0`}),t[15]=o,t[16]=n.installed,t[17]=n.managed,t[18]=b):b=t[18];let x;t[19]!==y||t[20]!==b?(x=(0,Z.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[y,b]}),t[19]=y,t[20]=b,t[21]=x):x=t[21];let S;t[22]!==f||t[23]!==x||t[24]!==v?(S=(0,Z.jsx)(un,{asChild:!0,children:(0,Z.jsxs)(lP,{size:`sm`,isActive:f,className:`h-6 text-[11px]`,onContextMenu:p,children:[m,h,v,x]})}),t[22]=f,t[23]=x,t[24]=v,t[25]=S):S=t[25];let C;t[26]!==o||t[27]!==n.name?(C=o({id:`RlLl3G`,values:{0:n.name}}),t[26]=o,t[27]=n.name,t[28]=C):C=t[28];let w;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsx)(Th,{}),t[29]=w):w=t[29];let T;t[30]===C?T=t[31]:(T=(0,Z.jsx)(Dr,{asChild:!0,children:(0,Z.jsx)(uP,{showOnHover:!0,"aria-label":C,children:w})}),t[30]=C,t[31]=T);let E;t[32]!==i||t[33]!==a||t[34]!==n?(E=(0,Z.jsx)(jr,{side:`right`,align:`start`,className:`min-w-52`,children:(0,Z.jsx)(rs,{skill:n,actions:i,existingNames:a})}),t[32]=i,t[33]=a,t[34]=n,t[35]=E):E=t[35];let D;t[36]!==l||t[37]!==T||t[38]!==E?(D=(0,Z.jsxs)(Nr,{open:l,onOpenChange:u,children:[T,E]}),t[36]=l,t[37]=T,t[38]=E,t[39]=D):D=t[39];let O;t[40]!==s||t[41]!==n?(O=s?(0,Z.jsx)(Y$,{skill:n}):null,t[40]=s,t[41]=n,t[42]=O):O=t[42];let k;t[43]===O?k=t[44]:(k=(0,Z.jsx)(ln,{children:O}),t[43]=O,t[44]=k);let A;t[45]!==S||t[46]!==D||t[47]!==k?(A=(0,Z.jsxs)(sP,{children:[S,D,k]}),t[45]=S,t[46]=D,t[47]=k,t[48]=A):A=t[48];let j;return t[49]!==s||t[50]!==A?(j=(0,Z.jsx)(dn,{open:s,onOpenChange:c,className:`group/skill`,children:A}),t[49]=s,t[50]=A,t[51]=j):j=t[51],j}function q$(e){let t=[];for(let n of e){let e=n.path.split(`/`),r=t;e.forEach((t,i)=>{let a=i===e.length-1,o=r.find(e=>e.name===t);o||(o=a?{name:t,path:n.path,text:n.text}:{name:t,path:e.slice(0,i+1).join(`/`),children:[]},r.push(o)),!a&&o.children&&(r=o.children)})}return J$(t),t}function J$(e){e.sort((e,t)=>{let n=+!e.children,r=+!t.children;return n===r?e.name.localeCompare(t.name):n-r});for(let t of e)t.children&&J$(t.children)}function Y$(e){let t=(0,$.c)(36),{skill:n}=e,{_:r}=ht(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(!1),{openTarget:c}=Re(),l;t[0]===c?l=t[1]:(l=function(e){c({kind:`doc`,target:e,docName:e},{tabBehavior:`append`}),cu(hu(e))},t[0]=c,t[1]=l);let u=l,d;t[2]!==c||t[3]!==n.name||t[4]!==n.scope?(d=function(e){c({kind:`skill-file`,target:`${n.scope}/${n.name}/${e}`,scope:n.scope,name:n.name,path:e},{tabBehavior:`replace-active`}),cu(du({scope:n.scope,name:n.name,path:e}))},t[2]=c,t[3]=n.name,t[4]=n.scope,t[5]=d):d=t[5];let f=d,p;t[6]!==u||t[7]!==f||t[8]!==n.managed||t[9]!==n.name||t[10]!==n.scope?(p=function(e){if(n.managed){f(e);return}let t=e.lastIndexOf(`.`),r=t>=0?e.slice(t+1).toLowerCase():``;if(n.scope===`project`&&(r===`md`||r===`mdx`)){u(be(n.name,e.replace(/\.mdx?$/i,``)));return}f(e)},t[6]=u,t[7]=f,t[8]=n.managed,t[9]=n.name,t[10]=n.scope,t[11]=p):p=t[11];let m=p,h,g;t[12]!==n.name||t[13]!==n.scope?(h=()=>{let e=!0,t=()=>{yf(n.scope,n.name).then(t=>{e&&(t.ok?(a(t.files),s(!1)):(a([]),s(!0)))})};t();let r=Xl(t);return()=>{e=!1,r()}},g=[n.scope,n.name],t[12]=n.name,t[13]=n.scope,t[14]=h,t[15]=g):(h=t[14],g=t[15]),(0,Q.useEffect)(h,g);let _;if(t[16]!==r||t[17]!==i||t[18]!==o||t[19]!==m||t[20]!==u||t[21]!==f||t[22]!==n.managed||t[23]!==n.name||t[24]!==n.scope){let e=i?q$(i):[],a;t[26]!==u||t[27]!==f||t[28]!==n.managed||t[29]!==n.name||t[30]!==n.scope?(a=()=>n.managed?f(`SKILL.md`):n.scope===`project`?u(oa(n.name)):mc(qi(n.scope,n.name)),t[26]=u,t[27]=f,t[28]=n.managed,t[29]=n.name,t[30]=n.scope,t[31]=a):a=t[31];let s,c;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(Wn,{className:`size-3 shrink-0 text-muted-foreground`}),c=(0,Z.jsx)(`span`,{className:`truncate`,children:`SKILL.md`}),t[32]=s,t[33]=c):(s=t[32],c=t[33]);let l;t[34]===a?l=t[35]:(l=(0,Z.jsx)(fP,{children:(0,Z.jsxs)(pP,{size:`sm`,onClick:a,className:`text-[11px]`,children:[s,c]})}),t[34]=a,t[35]=l),_=(0,Z.jsxs)(dP,{className:`mr-0 pr-0`,children:[l,i===null?(0,Z.jsx)(fP,{children:(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-[11px] text-muted-foreground/70`,children:(0,Z.jsx)(q,{id:`yQE2r9`})})}):o?(0,Z.jsx)(fP,{children:(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-[11px] text-muted-foreground/70`,title:r({id:`3Ijjy1`}),children:(0,Z.jsx)(q,{id:`ZARuZJ`})})}):e.map(e=>(0,Z.jsx)(X$,{node:e,depth:0,onOpenFile:m},e.path))]}),t[16]=r,t[17]=i,t[18]=o,t[19]=m,t[20]=u,t[21]=f,t[22]=n.managed,t[23]=n.name,t[24]=n.scope,t[25]=_}else _=t[25];return _}function X$(e){let t=(0,$.c)(34),{node:n,depth:r,onOpenFile:i}=e,[a,o]=(0,Q.useState)(!1),s=`${r*.6}rem`,c;t[0]===s?c=t[1]:(c={paddingLeft:s},t[0]=s,t[1]=c);let l=c;if(n.children){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Ro,{className:`size-3 shrink-0 text-muted-foreground transition-transform group-data-[state=open]/dir:rotate-90`}),t[2]=e):e=t[2];let s;t[3]===n.name?s=t[4]:(s=(0,Z.jsxs)(`span`,{className:`truncate`,children:[n.name,`/`]}),t[3]=n.name,t[4]=s);let c;t[5]!==l||t[6]!==s?(c=(0,Z.jsx)(un,{asChild:!0,children:(0,Z.jsxs)(pP,{size:`sm`,className:`text-[11px]`,style:l,children:[e,s]})}),t[5]=l,t[6]=s,t[7]=c):c=t[7];let u;if(t[8]!==r||t[9]!==n.children||t[10]!==i){let e;t[12]!==r||t[13]!==i?(e=e=>(0,Z.jsx)(X$,{node:e,depth:r+1,onOpenFile:i},e.path),t[12]=r,t[13]=i,t[14]=e):e=t[14],u=n.children.map(e),t[8]=r,t[9]=n.children,t[10]=i,t[11]=u}else u=t[11];let d;t[15]===u?d=t[16]:(d=(0,Z.jsx)(ln,{children:u}),t[15]=u,t[16]=d);let f;t[17]!==c||t[18]!==d?(f=(0,Z.jsxs)(fP,{children:[c,d]}),t[17]=c,t[18]=d,t[19]=f):f=t[19];let p;return t[20]!==a||t[21]!==f?(p=(0,Z.jsx)(dn,{open:a,onOpenChange:o,className:`group/dir`,children:f}),t[20]=a,t[21]=f,t[22]=p):p=t[22],p}let u=`skill-file-${n.path}`,d;t[23]!==n.path||t[24]!==i?(d=()=>i(n.path),t[23]=n.path,t[24]=i,t[25]=d):d=t[25];let f;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(Oh,{className:`size-3 shrink-0 text-muted-foreground`}),t[26]=f):f=t[26];let p;t[27]===n.name?p=t[28]:(p=(0,Z.jsx)(`span`,{className:`truncate`,children:n.name}),t[27]=n.name,t[28]=p);let m;return t[29]!==l||t[30]!==u||t[31]!==d||t[32]!==p?(m=(0,Z.jsx)(fP,{children:(0,Z.jsxs)(pP,{size:`sm`,className:`text-[11px]`,style:l,"data-testid":u,onClick:d,children:[f,p]})}),t[29]=l,t[30]=u,t[31]=d,t[32]=p,t[33]=m):m=t[33],m}function Z$(e){let t=(0,$.c)(12),{hasProjectSkills:n}=e,{_:r}=ht(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(!1),c,l;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=window.okDesktop?.sharing;if(!e)return;let t=!1,n=()=>{e.status().then(e=>{t||a(e.mode===`local-only`&&!e.skillsShared)}).catch(Q$)};return n(),window.addEventListener(`focus`,n),()=>{t=!0,window.removeEventListener(`focus`,n)}},l=[],t[0]=c,t[1]=l):(c=t[0],l=t[1]),(0,Q.useEffect)(c,l),!n||i!==!0)return null;let u;t[2]!==r||t[3]!==o?(u=async()=>{let e=window.okDesktop?.sharing;if(!e||o)return;s(!0);let t=null,n=null;try{t=await e.setSkillsShared(!0)}catch(e){n=e}if(s(!1),n!==null){let e=n instanceof Error?n.message:``;X.error(e.startsWith(`ok:sharing:dispatch:`)?r({id:`qXN416`}):e||r({id:`K2v7QF`}));return}if(t!==null){if(t.kind===`applied`)X.success(r({id:`Q7cNKe`})),a(!1);else if(t.kind===`no-exclude`){let e=t.reason===`no-git`?r({id:`Xwump4`}):t.reason===`inaccessible`?r({id:`PlGC6r`}):r({id:`zcmYx4`});X.warning(r({id:`EARn6h`,values:{detail:e}}))}}},t[2]=r,t[3]=o,t[4]=u):u=t[4];let d=u,f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(`p`,{className:`mb-2 text-amber-900 dark:text-amber-200`,children:(0,Z.jsx)(q,{id:`Bh9671`})}),t[5]=f):f=t[5];let p;t[6]===d?p=t[7]:(p=()=>void d(),t[6]=d,t[7]=p);let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(q,{id:`TUzThQ`}),t[8]=m):m=t[8];let h;return t[9]!==o||t[10]!==p?(h=(0,Z.jsxs)(`div`,{className:`mx-2 mb-1 rounded-md border border-amber-300 bg-amber-50 p-2 text-xs dark:border-amber-700 dark:bg-amber-950`,children:[f,(0,Z.jsx)(Y,{size:`sm`,className:`h-6 px-2 text-xs`,disabled:o,onClick:p,children:m})]}),t[9]=o,t[10]=p,t[11]=h):h=t[11],h}function Q$(e){console.warn(JSON.stringify({event:`skills-share-status-read-failed`,error:e instanceof Error?e.message:String(e)}))}function $$(){let e=(0,$.c)(19),[t,n]=(0,Q.useState)(null),[r,i]=(0,Q.useState)(!1),a,o;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{let e=!1;return _f().then(t=>{e||n(t)}),()=>{e=!0}},o=[],e[0]=a,e[1]=o):(a=e[0],o=e[1]),(0,Q.useEffect)(a,o),!t||t.managed!==null||t.importable===0)return null;let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=async e=>{if(i(!0),!await bf(e)){i(!1);return}n({managed:e,importable:0})},e[2]=s):s=e[2];let c=s,l;e[3]===t.importable?l=e[4]:(l=(0,Z.jsx)(`p`,{className:`mb-2 text-muted-foreground`,children:(0,Z.jsx)(q,{id:`mu1O0q`,values:{0:t.importable}})}),e[3]=t.importable,e[4]=l);let u,d;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>c(!0),d=(0,Z.jsx)(q,{id:`l3s5ri`}),e[5]=u,e[6]=d):(u=e[5],d=e[6]);let f;e[7]===r?f=e[8]:(f=(0,Z.jsx)(Y,{size:`sm`,className:`h-6 px-2 text-xs`,disabled:r,onClick:u,children:d}),e[7]=r,e[8]=f);let p,m;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>c(!1),m=(0,Z.jsx)(q,{id:`PBxg_E`}),e[9]=p,e[10]=m):(p=e[9],m=e[10]);let h;e[11]===r?h=e[12]:(h=(0,Z.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-6 px-2 text-xs`,disabled:r,onClick:p,children:m}),e[11]=r,e[12]=h);let g;e[13]!==f||e[14]!==h?(g=(0,Z.jsxs)(`div`,{className:`flex gap-1.5`,children:[f,h]}),e[13]=f,e[14]=h,e[15]=g):g=e[15];let _;return e[16]!==g||e[17]!==l?(_=(0,Z.jsxs)(`div`,{className:`mx-2 mb-1 rounded-md border border-border/60 bg-muted/40 p-2 text-xs`,children:[l,g]}),e[16]=g,e[17]=l,e[18]=_):_=e[18],_}var e1=6e4,t1=e=>{let t=(0,$.c)(11),{href:n,label:r,icon:i}=e,a,o;t[0]===n?(a=t[1],o=t[2]):(a=e=>ed(e,n),o=e=>ed(e,n),t[0]=n,t[1]=a,t[2]=o);let s;t[3]===i?s=t[4]:(s=(0,Z.jsx)(i,{"aria-hidden":`true`,className:`size-3.5`}),t[3]=i,t[4]=s);let c;return t[5]!==n||t[6]!==r||t[7]!==a||t[8]!==o||t[9]!==s?(c=(0,Z.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,onClick:a,onAuxClick:o,"aria-label":r,className:`rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:s}),t[5]=n,t[6]=r,t[7]=a,t[8]=o,t[9]=s,t[10]=c):c=t[10],c};function n1(e){let t=(0,$.c)(34),{version:n,onOpenReleaseNotes:r,onClose:i,store:a,autoDismissMs:o}=e,s=a===void 0?hL:a,c=o===void 0?e1:o,{_:l}=ht(),[u,d]=(0,Q.useState)(!1),f,p;t[0]!==c||t[1]!==i||t[2]!==u?(f=()=>{if(!u)return;let e=setTimeout(i,c);return()=>clearTimeout(e)},p=[u,i,c],t[0]=c,t[1]=i,t[2]=u,t[3]=f,t[4]=p):(f=t[3],p=t[4]),(0,Q.useEffect)(f,p);let m;t[5]===l?m=t[6]:(m=l({id:`GzPQ2f`}),t[5]=l,t[6]=m);let h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(q,{id:`yLEyuq`}),t[7]=h):h=t[7];let g;t[8]===s?g=t[9]:(g=()=>{s.markSubscribed(),d(!0)},t[8]=s,t[9]=g);let _;t[10]!==i||t[11]!==s?(_=()=>{s.dismiss(),i()},t[10]=i,t[11]=s,t[12]=_):_=t[12];let v;t[13]!==g||t[14]!==_?(v=(0,Z.jsx)(WI,{source:`post_update_card`,compactSubmit:!0,description:h,onSuccess:g,onDismiss:_}),t[13]=g,t[14]=_,t[15]=v):v=t[15];let y;t[16]!==l||t[17]!==u?(y=u?null:(0,Z.jsxs)(`nav`,{"aria-label":l({id:`dbapvC`}),className:`mt-3 flex items-center gap-1.5 text-muted-foreground text-xs`,children:[(0,Z.jsx)(`span`,{className:`mr-0.5`,children:(0,Z.jsx)(q,{id:`9sBe85`})}),(0,Z.jsx)(t1,{href:aL,label:l({id:`I7Exsw`}),icon:vL}),(0,Z.jsx)(t1,{href:rL,label:l({id:`zyKa-I`}),icon:Xg}),(0,Z.jsx)(t1,{href:iL,label:l({id:`36aWJD`}),icon:_L})]}),t[16]=l,t[17]=u,t[18]=y):y=t[18];let b;t[19]!==y||t[20]!==v?(b=(0,Z.jsxs)(`div`,{className:`px-3 py-2.5`,children:[v,y]}),t[19]=y,t[20]=v,t[21]=b):b=t[21];let x;t[22]===n?x=t[23]:(x=(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:(0,Z.jsx)(q,{id:`hLy8b1`,values:{version:n}})}),t[22]=n,t[23]=x);let S;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(q,{id:`_PACVa`}),t[24]=S):S=t[24];let C;t[25]===r?C=t[26]:(C=(0,Z.jsx)(Y,{variant:`link`,size:`sm`,className:`h-auto p-0 text-muted-foreground text-xs hover:text-foreground`,onClick:r,children:S}),t[25]=r,t[26]=C);let w;t[27]!==x||t[28]!==C?(w=(0,Z.jsxs)(`div`,{className:`flex items-center justify-between border-t bg-muted/30 px-3 py-2.5 space-x-2`,children:[x,C]}),t[27]=x,t[28]=C,t[29]=w):w=t[29];let T;return t[30]!==b||t[31]!==w||t[32]!==m?(T=(0,Z.jsxs)(`section`,{"aria-label":m,className:`mx-1 mb-1 overflow-hidden rounded-lg border bg-card text-card-foreground`,children:[b,w]}),t[30]=b,t[31]=w,t[32]=m,t[33]=T):T=t[33],T}function r1(e){let t=(0,$.c)(37),{notice:n,onDismiss:r}=e,{_:i}=ht(),a=n.variant===`error`?`border-destructive/60 bg-sidebar-accent/30 text-muted-foreground`:n.variant===`success`?`border-emerald-500/40 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400`:`border-sidebar-border bg-sidebar-accent/30 text-muted-foreground`,o;t[0]!==i||t[1]!==n.dismissible||t[2]!==r?(o=n.dismissible===!1?null:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon`,className:`size-5 shrink-0 text-muted-foreground hover:text-sidebar-foreground`,"aria-label":i({id:`GUYwCr`}),onClick:r,children:(0,Z.jsx)(fl,{"aria-hidden":`true`,className:`size-3`})}),t[0]=i,t[1]=n.dismissible,t[2]=r,t[3]=o):o=t[3];let s=o,c=`shrink-0 text-xs font-medium underline underline-offset-2 ${n.variant===`success`?`decoration-emerald-500/40`:`decoration-muted-foreground/40`} hover:text-sidebar-foreground hover:decoration-sidebar-foreground`;if(n.secondaryAction){let e=`update-notice-${n.id}`,r=`flex flex-col gap-2 rounded-md border px-2 py-2 text-xs ${a}`,i;t[4]===n.body?i=t[5]:(i=(0,Z.jsx)(`span`,{className:`flex-1 leading-snug`,children:n.body}),t[4]=n.body,t[5]=i);let o;t[6]!==s||t[7]!==i?(o=(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[i,s]}),t[6]=s,t[7]=i,t[8]=o):o=t[8];let l;t[9]!==c||t[10]!==n.action?(l=n.action?(0,Z.jsx)(`button`,{type:`button`,className:c,onClick:()=>{n.action?.onClick()},children:n.action.label}):null,t[9]=c,t[10]=n.action,t[11]=l):l=t[11];let u;t[12]===n.secondaryAction?u=t[13]:(u=()=>{n.secondaryAction?.onClick()},t[12]=n.secondaryAction,t[13]=u);let d;t[14]!==c||t[15]!==n.secondaryAction.label||t[16]!==u?(d=(0,Z.jsx)(`button`,{type:`button`,className:c,onClick:u,children:n.secondaryAction.label}),t[14]=c,t[15]=n.secondaryAction.label,t[16]=u,t[17]=d):d=t[17];let f;t[18]!==l||t[19]!==d?(f=(0,Z.jsxs)(`div`,{className:`flex gap-3 pl-1`,children:[l,d]}),t[18]=l,t[19]=d,t[20]=f):f=t[20];let p;return t[21]!==e||t[22]!==r||t[23]!==o||t[24]!==f?(p=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"data-testid":e,className:r,children:[o,f]}),t[21]=e,t[22]=r,t[23]=o,t[24]=f,t[25]=p):p=t[25],p}let l=`update-notice-${n.id}`,u=`flex items-center gap-2 rounded-md border px-2 py-1.5 text-xs ${a}`,d;t[26]===n.body?d=t[27]:(d=(0,Z.jsx)(`span`,{className:`flex-1 leading-snug`,children:n.body}),t[26]=n.body,t[27]=d);let f;t[28]!==c||t[29]!==n.action?(f=n.action?(0,Z.jsx)(`button`,{type:`button`,className:c,onClick:()=>{n.action?.onClick()},children:n.action.label}):null,t[28]=c,t[29]=n.action,t[30]=f):f=t[30];let p;return t[31]!==s||t[32]!==l||t[33]!==u||t[34]!==d||t[35]!==f?(p=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"data-testid":l,className:u,children:[d,f,s]}),t[31]=s,t[32]=l,t[33]=u,t[34]=d,t[35]=f,t[36]=p):p=t[36],p}function i1(e){if(e.length===0)return null;let t=e[0];if(!t)return null;for(let n=1;n<e.length;n++){let r=e[n];r&&r.priority<t.priority&&(t=r)}return t}function a1(){let e=(0,$.c)(15),t=(0,Q.useSyncExternalStore)(FR,PR,PR),n;e[0]===t?n=e[1]:(n=i1(t),e[0]=t,e[1]=n);let r=n;if(!r)return null;if(r.combinedSubscribe&&r.whatsNew){let t;e[2]===r.action?t=e[3]:(t=()=>r.action?.onClick(),e[2]=r.action,e[3]=t);let n;e[4]===r.id?n=e[5]:(n=()=>NR(r.id),e[4]=r.id,e[5]=n);let i;return e[6]!==r.whatsNew.version||e[7]!==t||e[8]!==n?(i=(0,Z.jsx)(`div`,{"data-testid":`update-notices-list`,children:(0,Z.jsx)(n1,{version:r.whatsNew.version,onOpenReleaseNotes:t,onClose:n})}),e[6]=r.whatsNew.version,e[7]=t,e[8]=n,e[9]=i):i=e[9],i}let i;e[10]===r?i=e[11]:(i=()=>{r.onDismiss?.(),NR(r.id)},e[10]=r,e[11]=i);let a;return e[12]!==r||e[13]!==i?(a=(0,Z.jsx)(`div`,{"data-testid":`update-notices-list`,children:(0,Z.jsx)(r1,{notice:r,onDismiss:i})}),e[12]=r,e[13]=i,e[14]=a):a=e[14],a}function o1(e,t){return e?.kind===`doc`||e?.kind===`folder-index`?Js(t.contentDir,Qs(e.docName),t.pathSeparator):e?.kind===`folder`?Js(t.contentDir,e.folderPath,t.pathSeparator):e?.kind===`asset`?Js(t.contentDir,e.assetPath,t.pathSeparator):t.contentDir}function s1(e){return e?.kind===`doc`||e?.kind===`folder-index`?Qs(e.docName):e?.kind===`folder`?e.folderPath:e?.kind===`asset`?e.assetPath:``}function c1(e,t){return e===null?ns({workspace:t}):e.kind===`folder`?t?Qo({folderRelativePath:e.folderPath,workspace:t}):null:e.kind===`doc`||e.kind===`folder-index`?as({docName:e.docName,workspace:t}):null}var l1={folderCount:0,expandedCount:0},u1=`button, [role="button"], [role="menuitem"], input, textarea, select, a[href]`;function d1(e){return typeof Element>`u`||!(e instanceof Element)?!1:e.closest(u1)!==null}function f1(e){let t=(0,$.c)(2),{onOpenSearch:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(iu,{name:`file-sidebar`,children:(0,Z.jsx)(h1,{onOpenSearch:n})}),t[0]=n,t[1]=r),r}var p1=e=>{let t=(0,$.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({icon:n,label:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=(0,Z.jsx)(n,{"aria-hidden":`true`}),t[4]=n,t[5]=a);let o;t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,"aria-label":r,...i,children:a})}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9];let s;t[10]===r?s=t[11]:(s=(0,Z.jsx)(on,{children:r}),t[10]=r,t[11]=s);let c;return t[12]!==o||t[13]!==s?(c=(0,Z.jsxs)(cn,{children:[o,s]}),t[12]=o,t[13]=s,t[14]=c):c=t[14],c},m1=e=>{let t=(0,$.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({icon:n,label:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=(0,Z.jsx)(n,{"aria-hidden":`true`}),t[4]=n,t[5]=a);let o;t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Dr,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,"aria-label":r,...i,children:a})})}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9];let s;t[10]===r?s=t[11]:(s=(0,Z.jsx)(on,{children:r}),t[10]=r,t[11]=s);let c;return t[12]!==o||t[13]!==s?(c=(0,Z.jsxs)(cn,{children:[o,s]}),t[12]=o,t[13]=s,t[14]=c):c=t[14],c};function h1(e){let t=(0,$.c)(309),{onOpenSearch:n}=e,{_:r}=ht(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(null),{activeDocName:c,activeTarget:l}=Re(),u;t[0]!==c||t[1]!==l?(u=l?.kind===`folder`||l?.kind===`folder-index`?l.folderPath:Il(c),t[0]=c,t[1]=l,t[2]=u):u=t[2];let d=u,f;t[3]===d?f=t[4]:(f=zl(d)?``:d,t[3]=d,t[4]=f);let p=f,[m,h]=(0,Q.useState)(!1),g=m?``:p,_=typeof window<`u`&&window.okDesktop!=null,{state:v,toggleSidebar:y}=GN(),b=Xs(),x=v===`expanded`,S=_&&v===`collapsed`,[C,w]=(0,Q.useState)(l1),T,E;t[5]===i?(T=t[6],E=t[7]):(T=()=>{if(i===null)return;let e=()=>{w(i.getFolderState()),h(i.isCreationTargetCleared())};return e(),i.subscribe(e)},E=[i],t[5]=i,t[6]=T,t[7]=E),(0,Q.useEffect)(T,E);let D,O;t[8]===i?(D=t[9],O=t[10]):(D=()=>{if(i!==null)return nw(e=>{let t=e.initialDir??``;if(e.template){i.createFromTemplate(e.template.folder,e.template.name);return}i.startCreating(`file`,t)})},O=[i],t[8]=i,t[9]=D,t[10]=O),(0,Q.useEffect)(D,O);let k=C.folderCount>0,A=k&&C.expandedCount===C.folderCount,j=C.expandedCount===0,M=Os(``),N=Os(g===``?null:g),P=g===``?M:N,F=M.state.status===`ready`?(M.state.data.folder.templates_available?.length??0)>0:!0,I=P.state.status===`ready`?(P.state.data.folder.templates_available?.length??0)>0:!0,L=typeof window<`u`?window.okDesktop:void 0,R=id(),{status:z}=po(),B=z?.hasRemote===!0,V;t[11]!==r||t[12]!==R?.contentDir?(V=L?.config?.projectName||R?.contentDir.split(`/`).filter(Boolean).pop()||r({id:`sER-bs`}),t[11]=r,t[12]=R?.contentDir,t[13]=V):V=t[13];let H=V,U=ts().states,{dispatch:W}=Yo(),G;t[14]===R?G=t[15]:(G=ns({workspace:R}),t[14]=R,t[15]=G);let K=G,{projectLocalBinding:ee,merged:te}=Qu(),ne=te?.appearance?.sidebar?.showHiddenFiles??!1,re=te?.appearance?.sidebar?.showOkFolders??!1,ie=te?.appearance?.sidebar?.showOnlyMarkdownFiles??!1,ae=te?.appearance?.sidebar?.showSkillsSection??!0,oe=k&&!A,se=k&&!j,ce=oe||se,le=(0,Q.useRef)(!1),ue;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ue=e=>{le.current&&(le.current=!1,e.preventDefault())},t[16]=ue):ue=t[16];let de=ue,fe=b1,pe;t[17]!==i||t[18]!==R?(pe=()=>{R&&(le.current=!0,i?.startCreating(`file`,``))},t[17]=i,t[18]=R,t[19]=pe):pe=t[19];let me=pe,he;t[20]!==i||t[21]!==R?(he=e=>{R&&(le.current=!0,i?.createFromTemplate(``,e))},t[20]=i,t[21]=R,t[22]=he):he=t[22];let ge=he,_e;t[23]!==i||t[24]!==R?(_e=()=>{R&&(le.current=!0,i?.startCreating(`folder`,``))},t[23]=i,t[24]=R,t[25]=_e):_e=t[25];let ve=_e,ye;t[26]===R?ye=t[27]:(ye=()=>{!R||!L||L.shell.showItemInFolder(R.contentDir)},t[26]=R,t[27]=ye);let be=ye,xe;t[28]!==r||t[29]!==R?(xe=async()=>{if(R)try{await navigator.clipboard.writeText(R.contentDir),X.success(r({id:`6_ZOw4`}),{description:R.contentDir})}catch(e){console.warn(`[FileSidebar] clipboard write failed:`,e),X.error(r({id:`vfRlCI`}))}},t[28]=r,t[29]=R,t[30]=xe):xe=t[30];let Se=xe,Ce;t[31]!==r||t[32]!==B?(Ce=()=>{ms({...Ds(``),hasRemote:B,onClickWhenNoRemote:()=>{X.error(r({id:`WyQxwa`}))}},{clipboardWrite:tf,toastSuccess:y1,toastError:v1,logEvent:_1})},t[31]=r,t[32]=B,t[33]=Ce):Ce=t[33];let we=Ce,Te;t[34]!==r||t[35]!==ee?(Te=e=>{if(ee===null)return;let t=ee.patch({appearance:{sidebar:e}});t.ok||(console.warn(`[FileSidebar] sidebar visibility toggle rejected:`,zi(t.error)),X.error(r({id:`P47EWZ`}),{description:zi(t.error)}))},t[34]=r,t[35]=ee,t[36]=Te):Te=t[36];let Ee=Te,De;t[37]===i?De=t[38]:(De=()=>{i?.expandAll()},t[37]=i,t[38]=De);let Oe=De,ke;t[39]===i?ke=t[40]:(ke=()=>{i?.collapseAll()},t[39]=i,t[40]=ke);let Ae=ke,je,Me;t[41]!==se||t[42]!==oe||t[43]!==ne||t[44]!==re||t[45]!==ie||t[46]!==ae||t[47]!==v?(je=()=>{let e={showHiddenFiles:ne,showOkFolders:re,showOnlyMarkdownFiles:ie,showSkillsSection:ae,canExpandAll:oe,canCollapseAll:se,sidebarVisible:v===`expanded`};Mc(e),L&&L.editor.notifyViewMenuStateChanged(e)},Me=[L,ne,re,ie,ae,oe,se,v],t[41]=se,t[42]=oe,t[43]=ne,t[44]=re,t[45]=ie,t[46]=ae,t[47]=v,t[48]=je,t[49]=Me):(je=t[48],Me=t[49]),(0,Q.useEffect)(je,Me);let Ne;t[50]!==r||t[51]!==l||t[52]!==W||t[53]!==U||t[54]!==g||t[55]!==Ee||t[56]!==ne||t[57]!==re||t[58]!==ie||t[59]!==ae||t[60]!==y||t[61]!==i||t[62]!==R?(Ne=()=>Ht(e=>{let t=l!==null&&zl(s1(l));switch(e){case`new-doc`:if(!R||!i)return;i.startCreating(`file`,g);return;case`new-folder`:if(!R||!i)return;i.startCreating(`folder`,g);return;case`new-from-template`:if(!R||!i)return;i.startCreatingFromTemplate(g);return;case`rename`:if(!l||t)return;xZ(l);return;case`duplicate`:if(!l||t)return;CZ(l);return;case`move-to-trash`:if(!l||t)return;yZ(l);return;case`reveal-in-finder`:{if(!L||!R)return;let e=o1(l,R);L.shell.showItemInFolder(e);return}case`send-to-ai`:{let e=Xr.filter(e=>U[e.id]?.installed===!0);if(e.length===0){X.error(r({id:`LKOLNn`}));return}let t=c1(l,R);if(!t)return;let[n]=e;if(!n)return;W(n.id,t);return}case`copy-full-path`:{if(!R)return;let e=o1(l,R);navigator.clipboard.writeText(e).then(()=>X.success(r({id:`6_ZOw4`}),{description:e})).catch(e=>{console.warn(`[FileSidebar] clipboard write failed:`,e),X.error(r({id:`vfRlCI`}))});return}case`copy-relative-path`:{let e=s1(l);if(e===``){X.error(r({id:`74eHt-`}));return}navigator.clipboard.writeText(e).then(()=>X.success(r({id:`haHgQj`}),{description:e})).catch(e=>{console.warn(`[FileSidebar] clipboard write failed:`,e),X.error(r({id:`5QGTaA`}))});return}case`toggle-show-ok-folders`:Ee({showOkFolders:!re});return;case`toggle-show-hidden-files`:Ee({showHiddenFiles:!ne});return;case`toggle-show-only-markdown-files`:Ee({showOnlyMarkdownFiles:!ie});return;case`toggle-show-skills-section`:Ee({showSkillsSection:!ae});return;case`expand-all-tree`:i?.expandAll();return;case`collapse-all-tree`:i?.collapseAll();return;case`toggle-sidebar`:y();return;case`delete`:case`toggle-source`:case`save-version`:case`version-history`:case`focus-search`:case`focus-command-palette`:case`close-active-tab-or-window`:case`toggle-doc-panel`:return}}),t[50]=r,t[51]=l,t[52]=W,t[53]=U,t[54]=g,t[55]=Ee,t[56]=ne,t[57]=re,t[58]=ie,t[59]=ae,t[60]=y,t[61]=i,t[62]=R,t[63]=Ne):Ne=t[63];let Pe;t[64]!==r||t[65]!==l||t[66]!==W||t[67]!==U||t[68]!==g||t[69]!==ee||t[70]!==ne||t[71]!==re||t[72]!==ie||t[73]!==ae||t[74]!==y||t[75]!==i||t[76]!==R?(Pe=[L,i,R,l,g,ee,ne,re,ie,ae,U,W,y,r],t[64]=r,t[65]=l,t[66]=W,t[67]=U,t[68]=g,t[69]=ee,t[70]=ne,t[71]=re,t[72]=ie,t[73]=ae,t[74]=y,t[75]=i,t[76]=R,t[77]=Pe):Pe=t[77],(0,Q.useEffect)(Ne,Pe);let Fe=_&&x&&`motion-safe:delay-100`,Ie=S&&`opacity-0`,Le;t[78]!==Fe||t[79]!==Ie?(Le=J(`flex-row h-12 items-center py-0 px-3`,`justify-between`,_&&`overflow-x-clip`,_&&`motion-safe:transition-opacity motion-safe:duration-100 motion-safe:ease-out`,Fe,Ie,_&&`[-webkit-app-region:drag]`),t[78]=Fe,t[79]=Ie,t[80]=Le):Le=t[80];let ze;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(ze=_?(0,Z.jsx)(`div`,{"aria-hidden":`true`,"data-testid":`sidebar-traffic-light-reserve`,className:`w-[var(--ok-titlebar-reserve-left,0px)] shrink-0 self-stretch`}):null,t[81]=ze):ze=t[81];let Be;t[82]===x?Be=t[83]:(Be=x&&!_?(0,Z.jsx)(`span`,{className:`shrink-0 font-mono text-sm uppercase tracking-wider text-sidebar-foreground/50`,children:(0,Z.jsx)(q,{id:`sER-bs`})}):null,t[82]=x,t[83]=Be);let Ve;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=J(`flex items-center gap-1`,_&&`[&>*]:[-webkit-app-region:no-drag]`),t[84]=Ve):Ve=t[84];let He;t[85]===r?He=t[86]:(He=r({id:`Rq1vFD`}),t[85]=r,t[86]=He);let Ue;t[87]===He?Ue=t[88]:(Ue=(0,Z.jsx)(m1,{icon:Uh,label:He}),t[87]=He,t[88]=Ue);let We;t[89]!==oe||t[90]!==i?(We=oe?(0,Z.jsxs)(Cr,{onSelect:()=>i?.expandAll(),children:[(0,Z.jsx)(Eg,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`OlAl5i`})]}):null,t[89]=oe,t[90]=i,t[91]=We):We=t[91];let Ge;t[92]!==se||t[93]!==i?(Ge=se?(0,Z.jsxs)(Cr,{onSelect:()=>i?.collapseAll(),children:[(0,Z.jsx)(Mh,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`qvWGzP`})]}):null,t[92]=se,t[93]=i,t[94]=Ge):Ge=t[94];let Ke;t[95]===ce?Ke=t[96]:(Ke=ce?(0,Z.jsx)(Pr,{}):null,t[95]=ce,t[96]=Ke);let qe;t[97]===r?qe=t[98]:(qe=r({id:`8vETh9`}),t[97]=r,t[98]=qe);let Je;t[99]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,Z.jsx)(kr,{children:(0,Z.jsx)(q,{id:`8vETh9`})}),t[99]=Je):Je=t[99];let Ye;t[100]===Ee?Ye=t[101]:(Ye=e=>Ee({showHiddenFiles:e}),t[100]=Ee,t[101]=Ye);let Xe=ee===null,Ze;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(Ze=(0,Z.jsx)(q,{id:`6KCH4m`}),t[102]=Ze):Ze=t[102];let Qe;t[103]!==ne||t[104]!==Ye||t[105]!==Xe?(Qe=(0,Z.jsx)(Or,{checked:ne,onCheckedChange:Ye,disabled:Xe,"data-testid":`tree-options-show-hidden-files`,children:Ze}),t[103]=ne,t[104]=Ye,t[105]=Xe,t[106]=Qe):Qe=t[106];let $e;t[107]===Ee?$e=t[108]:($e=e=>Ee({showOkFolders:e}),t[107]=Ee,t[108]=$e);let et=ee===null,tt;t[109]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,Z.jsx)(q,{id:`ELYtNJ`}),t[109]=tt):tt=t[109];let nt;t[110]!==re||t[111]!==$e||t[112]!==et?(nt=(0,Z.jsx)(Or,{checked:re,onCheckedChange:$e,disabled:et,"data-testid":`tree-options-show-ok-folders`,children:tt}),t[110]=re,t[111]=$e,t[112]=et,t[113]=nt):nt=t[113];let rt;t[114]===Ee?rt=t[115]:(rt=e=>Ee({showOnlyMarkdownFiles:e}),t[114]=Ee,t[115]=rt);let it=ee===null,at;t[116]===Symbol.for(`react.memo_cache_sentinel`)?(at=(0,Z.jsx)(q,{id:`5-o4kO`}),t[116]=at):at=t[116];let ot;t[117]!==ie||t[118]!==rt||t[119]!==it?(ot=(0,Z.jsx)(Or,{checked:ie,onCheckedChange:rt,disabled:it,"data-testid":`tree-options-show-only-markdown-files`,children:at}),t[117]=ie,t[118]=rt,t[119]=it,t[120]=ot):ot=t[120];let st;t[121]===Ee?st=t[122]:(st=e=>Ee({showSkillsSection:e}),t[121]=Ee,t[122]=st);let ct=ee===null,lt;t[123]===Symbol.for(`react.memo_cache_sentinel`)?(lt=(0,Z.jsx)(q,{id:`PCSkw2`}),t[123]=lt):lt=t[123];let ut;t[124]!==ae||t[125]!==st||t[126]!==ct?(ut=(0,Z.jsx)(Or,{checked:ae,onCheckedChange:st,disabled:ct,"data-testid":`tree-options-show-skills`,children:lt}),t[124]=ae,t[125]=st,t[126]=ct,t[127]=ut):ut=t[127];let dt;t[128]!==qe||t[129]!==Qe||t[130]!==nt||t[131]!==ot||t[132]!==ut?(dt=(0,Z.jsxs)(Er,{"aria-label":qe,children:[Je,Qe,nt,ot,ut]}),t[128]=qe,t[129]=Qe,t[130]=nt,t[131]=ot,t[132]=ut,t[133]=dt):dt=t[133];let ft;t[134]!==We||t[135]!==Ge||t[136]!==Ke||t[137]!==dt?(ft=(0,Z.jsxs)(jr,{align:`end`,className:`min-w-52`,"data-testid":`tree-options-menu`,children:[We,Ge,Ke,dt]}),t[134]=We,t[135]=Ge,t[136]=Ke,t[137]=dt,t[138]=ft):ft=t[138];let pt;t[139]!==Ue||t[140]!==ft?(pt=(0,Z.jsxs)(Nr,{children:[Ue,ft]}),t[139]=Ue,t[140]=ft,t[141]=pt):pt=t[141];let mt;t[142]===r?mt=t[143]:(mt=r({id:`HdkSiO`}),t[142]=r,t[143]=mt);let gt;t[144]!==g||t[145]!==i?(gt=()=>i?.startCreating(`file`,g),t[144]=g,t[145]=i,t[146]=gt):gt=t[146];let _t;t[147]!==mt||t[148]!==gt?(_t=(0,Z.jsx)(p1,{icon:nc,label:mt,onClick:gt}),t[147]=mt,t[148]=gt,t[149]=_t):_t=t[149];let vt;t[150]!==r||t[151]!==I||t[152]!==g||t[153]!==i?(vt=I?(0,Z.jsxs)(Nr,{children:[(0,Z.jsx)(m1,{icon:As,label:r({id:`Uuj_R4`})}),(0,Z.jsx)(jr,{align:`end`,className:`min-w-52`,onCloseAutoFocus:de,children:(0,Z.jsx)(dZ,{parentDir:g,onSelectTemplate:e=>{le.current=!0,i?.createFromTemplate(g,e)},ItemComponent:Cr})})]}):null,t[150]=r,t[151]=I,t[152]=g,t[153]=i,t[154]=vt):vt=t[154];let yt;t[155]===r?yt=t[156]:(yt=r({id:`96G6Re`}),t[155]=r,t[156]=yt);let bt;t[157]!==g||t[158]!==i?(bt=()=>i?.startCreating(`folder`,g),t[157]=g,t[158]=i,t[159]=bt):bt=t[159];let xt;t[160]!==yt||t[161]!==bt?(xt=(0,Z.jsx)(p1,{icon:Ph,label:yt,onClick:bt}),t[160]=yt,t[161]=bt,t[162]=xt):xt=t[162];let St;t[163]!==pt||t[164]!==_t||t[165]!==vt||t[166]!==xt?(St=(0,Z.jsxs)(`div`,{"data-testid":`sidebar-toolbar`,className:Ve,children:[pt,_t,vt,xt]}),t[163]=pt,t[164]=_t,t[165]=vt,t[166]=xt,t[167]=St):St=t[167];let Ct;t[168]!==Le||t[169]!==Be||t[170]!==St?(Ct=(0,Z.jsxs)($N,{"data-electron-drag":_?``:void 0,className:Le,children:[ze,Be,St]}),t[168]=Le,t[169]=Be,t[170]=St,t[171]=Ct):Ct=t[171];let wt=_&&x&&`motion-safe:delay-100`,Tt=S&&`opacity-0`,Et;t[172]!==wt||t[173]!==Tt?(Et=J(`px-2 pb-2`,_&&`[-webkit-app-region:no-drag]`,_&&`motion-safe:transition-opacity motion-safe:duration-100 motion-safe:ease-out`,wt,Tt),t[172]=wt,t[173]=Tt,t[174]=Et):Et=t[174];let Dt;t[175]===v?Dt=t[176]:(Dt=[v],t[175]=v,t[176]=Dt);let Ot;t[177]===n?Ot=t[178]:(Ot=(0,Z.jsx)(H$,{onClick:n}),t[177]=n,t[178]=Ot);let kt;t[179]!==Dt||t[180]!==Ot?(kt=(0,Z.jsx)(Jt,{fallbackRender:g1,onError:V$,resetKeys:Dt,children:Ot}),t[179]=Dt,t[180]=Ot,t[181]=kt):kt=t[181];let At;t[182]!==Et||t[183]!==kt?(At=(0,Z.jsx)(`div`,{className:Et,children:kt}),t[182]=Et,t[183]=kt,t[184]=At):At=t[184];let jt;t[185]===Symbol.for(`react.memo_cache_sentinel`)?(jt=(0,Z.jsx)($L,{}),t[185]=jt):jt=t[185];let Mt;t[186]===Symbol.for(`react.memo_cache_sentinel`)?(Mt=(0,Z.jsx)(dc,{className:`size-3.5 shrink-0`}),t[186]=Mt):Mt=t[186];let Nt;t[187]===H?Nt=t[188]:(Nt=(0,Z.jsx)(`span`,{className:`truncate`,children:H}),t[187]=H,t[188]=Nt);let Pt;t[189]===Symbol.for(`react.memo_cache_sentinel`)?(Pt=(0,Z.jsx)(Ro,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-[state=open]/files:rotate-90`}),t[189]=Pt):Pt=t[189];let Ft;t[190]===Nt?Ft=t[191]:(Ft=(0,Z.jsx)(rP,{asChild:!0,className:`shrink-0`,children:(0,Z.jsxs)(un,{"data-sidebar-root-context":!0,className:`flex w-full items-center gap-1.5`,children:[Mt,Nt,Pt]})}),t[190]=Nt,t[191]=Ft);let It=o==null?`50vh`:`${o}px`,Lt;t[192]===It?Lt=t[193]:(Lt={height:It},t[192]=It,t[193]=Lt);let Rt;t[194]===Symbol.for(`react.memo_cache_sentinel`)?(Rt=(0,Z.jsx)(pQ,{ref:a,onContentHeightChange:s}),t[194]=Rt):Rt=t[194];let zt;t[195]===Lt?zt=t[196]:(zt=(0,Z.jsx)(ln,{className:`flex max-h-[70vh] flex-col overflow-hidden`,style:Lt,children:Rt}),t[195]=Lt,t[196]=zt);let Bt;t[197]!==Ft||t[198]!==zt?(Bt=(0,Z.jsx)(dn,{defaultOpen:!0,className:`group/files flex shrink-0 flex-col`,children:(0,Z.jsxs)(nP,{className:`min-h-0 px-0`,children:[Ft,zt]})}),t[197]=Ft,t[198]=zt,t[199]=Bt):Bt=t[199];let Vt;t[200]===ae?Vt=t[201]:(Vt=ae?(0,Z.jsx)(U$,{}):null,t[200]=ae,t[201]=Vt);let Ut;t[202]===i?Ut=t[203]:(Ut=(0,Z.jsx)(`div`,{"aria-hidden":!0,"data-sidebar-empty-deselect":!0,className:`min-h-8 flex-1 cursor-default`,onClick:()=>i?.clearCreationTarget()}),t[202]=i,t[203]=Ut);let Wt;t[204]!==Bt||t[205]!==Vt||t[206]!==Ut?(Wt=(0,Z.jsxs)(tP,{children:[jt,Bt,Vt,Ut]}),t[204]=Bt,t[205]=Vt,t[206]=Ut,t[207]=Wt):Wt=t[207];let Gt;t[208]===Symbol.for(`react.memo_cache_sentinel`)?(Gt=(0,Z.jsxs)(eP,{className:`px-0`,children:[(0,Z.jsx)(u$,{}),(0,Z.jsx)(a1,{}),(0,Z.jsx)(hz,{}),typeof window<`u`&&window.okDesktop?(0,Z.jsx)(oP,{children:(0,Z.jsx)(sP,{children:(0,Z.jsx)(M$,{bridge:window.okDesktop})})}):null]}),t[208]=Gt):Gt=t[208];let Kt=!(b&&v===`collapsed`),qt;t[209]===Kt?qt=t[210]:(qt=(0,Z.jsx)(ZN,{enableToggle:!1,enableDrag:Kt}),t[209]=Kt,t[210]=qt);let Yt;t[211]!==Ct||t[212]!==At||t[213]!==Wt||t[214]!==qt?(Yt=(0,Z.jsx)(Yv,{asChild:!0,children:(0,Z.jsxs)(`div`,{className:`contents`,onContextMenu:fe,children:[Ct,At,Wt,Gt,qt]})}),t[211]=Ct,t[212]=At,t[213]=Wt,t[214]=qt,t[215]=Yt):Yt=t[215];let Xt=!R,Zt,Qt;t[216]===Symbol.for(`react.memo_cache_sentinel`)?(Zt=(0,Z.jsx)(nc,{"aria-hidden":`true`}),Qt=(0,Z.jsx)(q,{id:`HdkSiO`}),t[216]=Zt,t[217]=Qt):(Zt=t[216],Qt=t[217]);let Y;t[218]!==me||t[219]!==Xt?(Y=(0,Z.jsxs)($v,{disabled:Xt,onSelect:me,"data-testid":`empty-space-menu-new-file`,children:[Zt,Qt]}),t[218]=me,t[219]=Xt,t[220]=Y):Y=t[220];let $t;t[221]!==ge||t[222]!==F||t[223]!==R?($t=F?(0,Z.jsxs)(Zv,{children:[(0,Z.jsxs)(ey,{disabled:!R,"data-testid":`empty-space-menu-new-from-template`,children:[(0,Z.jsx)(As,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`Uuj_R4`})]}),(0,Z.jsx)(ty,{children:(0,Z.jsx)(dZ,{parentDir:``,onSelectTemplate:ge,ItemComponent:$v})})]}):null,t[221]=ge,t[222]=F,t[223]=R,t[224]=$t):$t=t[224];let en=!R,tn,nn;t[225]===Symbol.for(`react.memo_cache_sentinel`)?(tn=(0,Z.jsx)(Ph,{"aria-hidden":`true`}),nn=(0,Z.jsx)(q,{id:`96G6Re`}),t[225]=tn,t[226]=nn):(tn=t[225],nn=t[226]);let rn;t[227]!==ve||t[228]!==en?(rn=(0,Z.jsxs)($v,{disabled:en,onSelect:ve,"data-testid":`empty-space-menu-new-folder`,children:[tn,nn]}),t[227]=ve,t[228]=en,t[229]=rn):rn=t[229];let an;t[230]===Symbol.for(`react.memo_cache_sentinel`)?(an=(0,Z.jsx)(iy,{}),t[230]=an):an=t[230];let on;t[231]!==r||t[232]!==be||t[233]!==R?(on=L?(0,Z.jsxs)($v,{disabled:!R,onSelect:be,"data-testid":`empty-space-menu-reveal-in-finder`,"aria-label":r(R?{id:`LtSYdi`}:{id:`o2yoFu`}),children:[(0,Z.jsx)(dc,{"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`LtSYdi`})}),R?null:(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:(0,Z.jsx)(q,{id:`wTcjov`})})]}):null,t[231]=r,t[232]=be,t[233]=R,t[234]=on):on=t[234];let sn;t[235]!==W||t[236]!==K||t[237]!==U?(sn=(0,Z.jsx)(QQ,{input:K,installStates:U,dispatch:W}),t[235]=W,t[236]=K,t[237]=U,t[238]=sn):sn=t[238];let cn;t[239]!==we||t[240]!==B?(cn=B?(0,Z.jsxs)($v,{onSelect:we,"data-testid":`empty-space-menu-share`,children:[(0,Z.jsx)(sg,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`Z8lGw6`})]}):null,t[239]=we,t[240]=B,t[241]=cn):cn=t[241];let fn=!R,pn;t[242]!==r||t[243]!==R?(pn=r(R?{id:`Up2_7p`}:{id:`U8CD-l`}),t[242]=r,t[243]=R,t[244]=pn):pn=t[244];let mn;t[245]===Symbol.for(`react.memo_cache_sentinel`)?(mn=(0,Z.jsx)(ec,{"aria-hidden":`true`}),t[245]=mn):mn=t[245];let hn;t[246]===Symbol.for(`react.memo_cache_sentinel`)?(hn=(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`Up2_7p`})}),t[246]=hn):hn=t[246];let gn;t[247]===R?gn=t[248]:(gn=R?null:(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:(0,Z.jsx)(q,{id:`wTcjov`})}),t[247]=R,t[248]=gn);let _n;t[249]!==Se||t[250]!==fn||t[251]!==pn||t[252]!==gn?(_n=(0,Z.jsxs)($v,{disabled:fn,onSelect:Se,"data-testid":`empty-space-menu-copy-full-path`,"aria-label":pn,children:[mn,hn,gn]}),t[249]=Se,t[250]=fn,t[251]=pn,t[252]=gn,t[253]=_n):_n=t[253];let vn;t[254]===Symbol.for(`react.memo_cache_sentinel`)?(vn=(0,Z.jsx)(iy,{}),t[254]=vn):vn=t[254];let yn;t[255]===Ee?yn=t[256]:(yn=e=>Ee({showHiddenFiles:e}),t[255]=Ee,t[256]=yn);let bn=ee===null,xn;t[257]===Symbol.for(`react.memo_cache_sentinel`)?(xn=(0,Z.jsx)(q,{id:`XcGbim`}),t[257]=xn):xn=t[257];let Sn;t[258]!==ne||t[259]!==yn||t[260]!==bn?(Sn=(0,Z.jsx)(ny,{checked:ne,onCheckedChange:yn,disabled:bn,"data-testid":`empty-space-menu-show-hidden-files`,children:xn}),t[258]=ne,t[259]=yn,t[260]=bn,t[261]=Sn):Sn=t[261];let Cn;t[262]===Ee?Cn=t[263]:(Cn=e=>Ee({showOkFolders:e}),t[262]=Ee,t[263]=Cn);let wn=ee===null,Tn;t[264]===Symbol.for(`react.memo_cache_sentinel`)?(Tn=(0,Z.jsx)(q,{id:`GHsJb8`}),t[264]=Tn):Tn=t[264];let En;t[265]!==re||t[266]!==Cn||t[267]!==wn?(En=(0,Z.jsx)(ny,{checked:re,onCheckedChange:Cn,disabled:wn,"data-testid":`empty-space-menu-show-ok-folders`,children:Tn}),t[265]=re,t[266]=Cn,t[267]=wn,t[268]=En):En=t[268];let Dn;t[269]===Ee?Dn=t[270]:(Dn=e=>Ee({showOnlyMarkdownFiles:e}),t[269]=Ee,t[270]=Dn);let On=ee===null,kn;t[271]===Symbol.for(`react.memo_cache_sentinel`)?(kn=(0,Z.jsx)(q,{id:`WkTLN7`}),t[271]=kn):kn=t[271];let An;t[272]!==ie||t[273]!==Dn||t[274]!==On?(An=(0,Z.jsx)(ny,{checked:ie,onCheckedChange:Dn,disabled:On,"data-testid":`empty-space-menu-show-only-markdown-files`,children:kn}),t[272]=ie,t[273]=Dn,t[274]=On,t[275]=An):An=t[275];let jn;t[276]===Ee?jn=t[277]:(jn=e=>Ee({showSkillsSection:e}),t[276]=Ee,t[277]=jn);let Mn=ee===null,Nn;t[278]===Symbol.for(`react.memo_cache_sentinel`)?(Nn=(0,Z.jsx)(q,{id:`NF_Wcg`}),t[278]=Nn):Nn=t[278];let Pn;t[279]!==ae||t[280]!==jn||t[281]!==Mn?(Pn=(0,Z.jsx)(ny,{checked:ae,onCheckedChange:jn,disabled:Mn,"data-testid":`empty-space-menu-show-skills-section`,children:Nn}),t[279]=ae,t[280]=jn,t[281]=Mn,t[282]=Pn):Pn=t[282];let Fn;t[283]===ce?Fn=t[284]:(Fn=ce?(0,Z.jsx)(iy,{}):null,t[283]=ce,t[284]=Fn);let In;t[285]!==Oe||t[286]!==oe?(In=oe?(0,Z.jsxs)($v,{onSelect:Oe,"data-testid":`empty-space-menu-expand-all`,children:[(0,Z.jsx)(Eg,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`OlAl5i`})]}):null,t[285]=Oe,t[286]=oe,t[287]=In):In=t[287];let Ln;t[288]!==Ae||t[289]!==se?(Ln=se?(0,Z.jsxs)($v,{onSelect:Ae,"data-testid":`empty-space-menu-collapse-all`,children:[(0,Z.jsx)(Mh,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`qvWGzP`})]}):null,t[288]=Ae,t[289]=se,t[290]=Ln):Ln=t[290];let Rn;t[291]!==cn||t[292]!==_n||t[293]!==Sn||t[294]!==En||t[295]!==An||t[296]!==Pn||t[297]!==Fn||t[298]!==In||t[299]!==Ln||t[300]!==Y||t[301]!==$t||t[302]!==rn||t[303]!==on||t[304]!==sn?(Rn=(0,Z.jsxs)(Qv,{className:`min-w-52`,onCloseAutoFocus:de,children:[Y,$t,rn,an,on,sn,cn,_n,vn,Sn,En,An,Pn,Fn,In,Ln]}),t[291]=cn,t[292]=_n,t[293]=Sn,t[294]=En,t[295]=An,t[296]=Pn,t[297]=Fn,t[298]=In,t[299]=Ln,t[300]=Y,t[301]=$t,t[302]=rn,t[303]=on,t[304]=sn,t[305]=Rn):Rn=t[305];let zn;return t[306]!==Rn||t[307]!==Yt?(zn=(0,Z.jsx)(YN,{variant:`inset`,children:(0,Z.jsxs)(Jv,{children:[Yt,Rn]})}),t[306]=Rn,t[307]=Yt,t[308]=zn):zn=t[308],zn}function g1(){return null}function _1(e){return console.log(e)}function v1(e){return X.error(e)}function y1(e){return X.success(e)}function b1(e){e.target instanceof Element&&e.target.closest(`[data-sidebar-root-context]`)||d1(e.target)&&(e.preventDefault(),e.stopPropagation())}var x1=(0,Q.lazy)(()=>n(()=>import(`./McpConsentDialogBody-CMu1TYud.js`),__vite__mapDeps([160,1,6,2,3,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,109,28,50,91,94,35,161]),import.meta.url));function S1(){let e=(0,$.c)(1);if(!(0,Q.useSyncExternalStore)(dp.subscribe,w1,C1))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(x1,{})}),e[0]=t):t=e[0],t}function C1(){return!1}function w1(){return dp.getSnapshot()!==null}function T1(){let e=(0,$.c)(4),[t,n]=(0,Q.useState)(!1),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>Ht(e=>{e===`report-bug`&&n(!0)}),i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a=(0,Z.jsx)(am,{open:t,onOpenChange:n}),e[2]=t,e[3]=a),a}function E1(){let e=(0,$.c)(17),t=At(),{collabUrl:n,setSystemProvider:r,updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c}=Re(),l;e[0]!==o||e[1]!==s||e[2]!==a||e[3]!==c||e[4]!==i?(l={updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c},e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=i,e[5]=l):l=e[5];let u=(0,Q.useRef)(l),d;e[6]!==o||e[7]!==s||e[8]!==a||e[9]!==c||e[10]!==i?(d=()=>{u.current={updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c}},e[6]=o,e[7]=s,e[8]=a,e[9]=c,e[10]=i,e[11]=d):d=e[11],(0,Q.useEffect)(d);let f,p;return e[12]!==n||e[13]!==t||e[14]!==r?(f=()=>{if(n===null)return;let e=new yu,i=new bu({url:n,name:Ui,document:e,onStateless:e=>{let{payload:t}=e;wu(t,{onServerInfo:e=>{u.current.updateServerInstanceId(e.serverInstanceId),e.currentBranch!==void 0&&u.current.observeBranch(e.currentBranch)},onBranchSwitched:e=>{u.current.onBranchSwitched(e.branch)},onDiskAck:e=>{u.current.observeDiskAck(e.docName,e.sv),Zl(e.docName)},onDerivedView:M1,onConfigValidationRejected:j1,onConfigIgnoreNestedError:A1,onUnknown:k1})},onClose:O1,onDisconnect:D1}),a=Jl(e=>{(e.includes(`files`)||e.includes(`backlinks`))&&(t.invalidateQueries({queryKey:[`backlinks`]}),t.invalidateQueries({queryKey:[`forward-links`]})),(e.includes(`files`)||e.includes(`graph`))&&(t.invalidateQueries({queryKey:[`orphans`]}),t.invalidateQueries({queryKey:[`hubs`]})),e.includes(`lint-config`)&&Wd()}),o=st(()=>{u.current.refreshServerInfo()});i.on(`synced`,()=>{$l([`files`,`backlinks`,`graph`]),o()});let s=new Set,c=()=>{if(i.awareness)for(let[e,t]of i.awareness.getStates().entries())s.has(e)||t.user?.type===`agent`&&(s.add(e),console.warn(`[agent-presence] observed stale AwarenessUser.type === 'agent' from clientID ${e} — probably a stale bundled client`))};return i.awareness?.on(`change`,c),r(i),()=>{a(),i.awareness?.off(`change`,c),r(null),i.destroy(),e.destroy()}},p=[t,n,r],e[12]=n,e[13]=t,e[14]=r,e[15]=f,e[16]=p):(f=e[15],p=e[16]),(0,Q.useEffect)(f,p),null}function D1(){console.warn(`[CC1] __system__ disconnected - derived views may be stale`)}function O1(e){let{event:t}=e;console.warn(`[CC1] __system__ connection closed:`,t.code,t.reason)}function k1(e){console.warn(`[CC1] Unparseable stateless payload, skipping:`,e.slice(0,100))}function A1(e){Ms(e)}function j1(e){Rs(e)}function M1(e){$l([e.ch])}var N1=500;function P1(e){return!e.startsWith(`__`)&&!/\.(mmd|mermaid)$/i.test(e)}function F1(){let e=(0,$.c)(3),{merged:t}=Qu(),n=t?.validation?.fileTreeIndicators!==!1,r,i;return e[0]===n?(r=e[1],i=e[2]):(r=()=>{if(!n)return;let e=new Map,t=!1,r=e=>{xd({kind:`doc`,docName:e}).then(n=>{t||n===null||hd(e,n.files.filter(t=>ou(t.file)===e).flatMap(I1))})},i=eu(t=>{if(!P1(t))return;let n=e.get(t);n!==void 0&&clearTimeout(n),e.set(t,setTimeout(()=>{e.delete(t),r(t)},N1))});return()=>{t=!0,i();for(let t of e.values())clearTimeout(t);e.clear()}},i=[n],e[0]=n,e[1]=r,e[2]=i),(0,Q.useEffect)(r,i),null}function I1(e){return e.diagnostics}function L1(e){let t=i(e);if(t)return{scope:`project`,name:t};let n=xi(e);return n?.kind===`skill`?{scope:n.scope,name:n.name}:null}function R1(e,t){let n=new Set(t.map(e=>`${e.scope}\u0000${e.name}`)),r=[];for(let t of e){let e=L1(t);if(!e||n.has(`${e.scope}\u0000${e.name}`))continue;let i=e.scope===`project`?`global`:`project`;n.has(`${i}\u0000${e.name}`)?r.push({kind:`retarget`,fromDocName:t,toDocName:qi(i,e.name)}):r.push({kind:`close`,docName:t})}return r}function z1(){let e=(0,$.c)(13),{openTabs:t,closeDocument:n}=Re(),r;e[0]===t?r=e[1]:(r=t.some(V1),e[0]=t,e[1]=r);let i=r,a;e[2]===i?a=e[3]:(a={enabled:i},e[2]=i,e[3]=a);let o=es(a),s=(0,Q.useRef)(null),c;e[4]!==n||e[5]!==t||e[6]!==o.data||e[7]!==o.status?(c=()=>{if(o.status!==`ready`)return;let e=o.data,r=`${t.join(``)}\u0002${e.map(B1).sort().join(``)}`;if(s.current===r)return;s.current=r;let i=R1(t,e);for(let e of i)e.kind===`retarget`?(mc(e.toDocName),n(e.fromDocName)):n(e.docName)},e[4]=n,e[5]=t,e[6]=o.data,e[7]=o.status,e[8]=c):c=e[8];let l;e[9]!==n||e[10]!==t||e[11]!==o?(l=[o,t,n],e[9]=n,e[10]=t,e[11]=o,e[12]=l):l=e[12],(0,Q.useEffect)(c,l)}function B1(e){return`${e.scope}\u0000${e.name}`}function V1(e){return L1(e)!==null}var H1=1e3,U1=3e4;function W1(e){let t=e.scheduler??{setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e)},n=e.initialBackoffMs??H1,r=e.maxBackoffMs??U1,i=e.rng??Math.random,a=e.createWebSocket??(e=>new WebSocket(e)),o=e.logger??null,s=e.log,c=null,l=null,u=!1,d=n;function f(e,t,n){try{o?o[e](t,n):s?.(t)}catch{}}function p(){if(u)return;l!==null&&t.clearTimeout(l);let e=d;d=Math.min(d*2,r);let n=i(),a=Math.max(1,Math.floor(e*(1-n/2)));f(`debug`,`scheduling reconnect`,{backoffMs:a,ceilMs:e}),l=t.setTimeout(()=>{l=null,m().catch(e=>f(`warn`,`reconnect failed`,{error:String(e)}))},a)}async function m(){if(u)return;let t;try{t=await e.resolveWsUrl()}catch(e){f(`warn`,`resolveWsUrl threw`,{error:String(e)}),p();return}if(!t){p();return}let r=[];e.pid!==void 0&&r.push(`pid=${encodeURIComponent(String(e.pid))}`),e.connectionId&&r.push(`connectionId=${encodeURIComponent(e.connectionId)}`),e.connectionId&&e.displayName!==void 0&&e.clientName!==void 0&&e.colorSeed!==void 0&&(r.push(`displayName=${encodeURIComponent(e.displayName)}`),r.push(`clientName=${encodeURIComponent(e.clientName)}`),r.push(`colorSeed=${encodeURIComponent(e.colorSeed)}`));let i=r.length>0?`?${r.join(`&`)}`:``,o=`${t}/collab/keepalive${i}`;try{c=a(o)}catch(e){f(`warn`,`WebSocket constructor failed`,{url:o,error:String(e)}),c=null,p();return}c.addEventListener(`open`,()=>{f(`info`,`connected`,{url:t}),d=n}),c.addEventListener(`close`,()=>{u||(f(`info`,`disconnected`,{url:t}),c=null,p())}),c.addEventListener(`error`,()=>{f(`debug`,`websocket error observed`,{url:t,readyState:c?.readyState,reason:`error-event`})})}return queueMicrotask(()=>{m().catch(e=>f(`warn`,`initial connect failed`,{error:String(e)}))}),{close:()=>{if(!u&&(u=!0,l!==null&&(t.clearTimeout(l),l=null),c)){try{c.close()}catch{}c=null}},isConnected:()=>c!==null&&c.readyState===1}}function G1(e){if(e)return e.replace(/\/collab\/?$/,``)}function K1(){return Tu(window)!==null}function q1(e,t){let n=(0,$.c)(5),r=(0,Q.useRef)(e),i=(0,Q.useRef)(t),a,o;n[0]===e?(a=n[1],o=n[2]):(a=()=>{r.current=e},o=[e],n[0]=e,n[1]=a,n[2]=o),(0,Q.useEffect)(a,o);let s,c;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=i.current?.startKeepalive??W1;if((i.current?.isElectronHost??K1)())return;let t=e({resolveWsUrl:async()=>G1(r.current)});return()=>t.close()},c=[],n[3]=s,n[4]=c):(s=n[3],c=n[4]),(0,Q.useEffect)(s,c)}var J1=(0,Q.lazy)(()=>n(()=>import(`./ShareBranchSwitchDialog-0huPygyG.js`).then(e=>({default:e.ShareBranchSwitchDialog})),__vite__mapDeps([162,1,10,11,12,23,16,17,18,19,24,25,22,26,86,30,163,94,164,165,166,6,2,3,7,8,9,167]),import.meta.url)),Y1=(0,Q.lazy)(()=>n(()=>import(`./ShareReceiveMissDialog-DDyIoxqn.js`).then(e=>({default:e.ShareReceiveMissDialog})),__vite__mapDeps([168,1,23,10,11,12,16,17,18,19,24,25,22,26,169,112,6,2,3,7,8,9,75,59,76,77,78,89,94,55,50,21,84,91,30,163,115,31,35,54]),import.meta.url)),X1=`#install-claude-desktop`,Z1=/\.(md|mdx)$/i;function Q1(e){return wl(e)||e===X1}function $1(e,t){if(!Z1.test(e))return null;for(let n of t){let t=ae(n);if(t.kind===`doc`&&t.docName===e)return{kind:`doc`,target:e,docName:e}}return null}function e0(e,t,n,r){return[e,t,n,r].map(e=>[...e].sort().join(`\0`)).join(``)}function t0(){let e=(0,$.c)(26),{clearTarget:t,openTabs:n,syncOpenTabsWithKnownTargets:r,tabSessionLoaded:i}=Re(),{openTargetTransition:a}=qe();z1();let{assetPaths:o,filePaths:s,folderPaths:c,loading:l,pageMeta:u,pages:d,pagesBySlug:f,pagesByBasename:p}=Vo(),m=(0,Q.useRef)(null),h;e[0]!==o||e[1]!==s||e[2]!==c||e[3]!==d?(h=e0(d,c,o,s),e[0]=o,e[1]=s,e[2]=c,e[3]=d,e[4]=h):h=e[4];let g=h,_,v;e[5]!==o||e[6]!==s||e[7]!==c||e[8]!==l||e[9]!==d||e[10]!==r||e[11]!==i||e[12]!==g?(_=()=>{l||!i||m.current===g||(m.current=g,r({pages:d,folderPaths:c,assetPaths:o,filePaths:s}))},v=[o,s,c,l,d,r,i,g],e[5]=o,e[6]=s,e[7]=c,e[8]=l,e[9]=d,e[10]=r,e[11]=i,e[12]=g,e[13]=_,e[14]=v):(_=e[13],v=e[14]),(0,Q.useEffect)(_,v);let y,b;return e[15]!==t||e[16]!==c||e[17]!==l||e[18]!==n||e[19]!==a||e[20]!==u||e[21]!==d||e[22]!==p||e[23]!==f?(y=()=>{e();function e(){if(Q1(window.location.hash))return;let e=fu(window.location.hash);if(e){let t=so(e.split(`.`).pop()??``);ru(`ok/nav/hash-change`,{docName:null,kind:`asset`}),a({kind:`asset`,target:e,assetPath:e,mediaKind:t});return}let r=lu(window.location.hash);if(r){ru(`ok/nav/hash-change`,{docName:null,kind:`skill-file`}),a({kind:`skill-file`,target:`${r.scope}/${r.name}/${r.path}`,scope:r.scope,name:r.name,path:r.path});return}if(_u(window.location.hash)){ru(`ok/nav/hash-change`,{docName:null,kind:`folder`}),a({kind:`folder`,target:``,folderPath:``});return}let i=mu(window.location.hash);if(!i){ru(`ok/nav/hash-change`,{docName:null,kind:`clear`}),t();return}if(l){ru(`ok/nav/hash-change`,{docName:i,kind:`deferred-loading`});return}let o=$1(i,n)??Gl(i,{pages:d,folderPaths:c,pagesBySlug:f,pagesByBasename:p});if(o.kind===`missing`&&/\/+$/.test(i.trim())){ru(`ok/nav/hash-change`,{docName:i,kind:`deferred-missing-folder`});return}let s=ql(Kl(o),u);ru(`ok/nav/hash-change`,{docName:i,kind:s.kind}),a(s)}return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},b=[t,c,l,a,n,u,d,f,p],e[15]=t,e[16]=c,e[17]=l,e[18]=n,e[19]=a,e[20]=u,e[21]=d,e[22]=p,e[23]=f,e[24]=y,e[25]=b):(y=e[24],b=e[25]),(0,Q.useEffect)(y,b),null}function n0(){let e=(0,$.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,Q.useEffect)(r0,t),null}function r0(){let e=function(e){let t=e.target;El({target:t,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,key:e.key})&&(e.preventDefault(),window.location.hash!==`#settings`&&(window.location.hash=Dl))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)}function i0(){let e=(0,$.c)(4),{activeTarget:t}=Re(),n=typeof window<`u`?window.okDesktop??null:null,r=t?.kind===`doc`||t?.kind===`folder`||t?.kind===`asset`?t.kind:null,i=t?.kind===`doc`?t.docName:t?.kind===`folder`?t.folderPath:t?.kind===`asset`?t.assetPath:null,a,o;return e[0]!==i||e[1]!==r?(a=()=>{if(n){if(r===null){n.editor.notifyActiveTargetChanged({kind:null});return}i!==null&&n.editor.notifyActiveTargetChanged({kind:r,identifier:i})}},o=[n,r,i],e[0]=i,e[1]=r,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,Q.useEffect)(a,o),null}function a0(){let e=(0,$.c)(8),{activeDocName:t,activeTarget:n}=Re(),[r,i]=(0,Q.useState)(!1),a;e[0]!==t||e[1]!==n?(a=n?.kind===`folder`?n.folderPath:Il(t),e[0]=t,e[1]=n,e[2]=a):a=e[2];let o=a,s,c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=function(e){let t=e.target;Q_({target:t,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,key:e.key})&&(e.preventDefault(),i(!0))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},c=[],e[3]=s,e[4]=c):(s=e[3],c=e[4]),(0,Q.useEffect)(s,c);let l;return e[5]!==r||e[6]!==o?(l=(0,Z.jsx)(ev,{open:r,onOpenChange:i,kind:`file`,initialDir:o}),e[5]=r,e[6]=o,e[7]=l):l=e[7],l}function o0(e){let t=(0,$.c)(3),{children:n}=e,{collabUrl:r}=Re();q1(r);let i;return t[0]!==n||t[1]!==r?(i=(0,Z.jsx)(Su,{collabUrl:r,children:n}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function s0(){let e=(0,$.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(iu,{name:`app`,children:(0,Z.jsx)(Qe,{children:(0,Z.jsx)(o0,{children:(0,Z.jsx)(Bv,{children:(0,Z.jsx)(c0,{})})})})}),e[0]=t):t=e[0],t}function c0(){let e=(0,$.c)(32),t=typeof window<`u`?window.okDesktop??null:null,n=typeof window<`u`&&window.okDesktop!=null,[r,i]=(0,Q.useState)(!1),a=Uv(),o=Ad(),s;e[0]===o?s=e[1]:(s=t&&t.config.ptyAvailable===!0?{launchInTerminal:l0,installedClis:o}:null,e[0]=o,e[1]=s);let c=s,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(ky,{}),e[2]=l):l=e[2];let u,d,f,p,m;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(E1,{}),d=(0,Z.jsx)(F1,{}),f=(0,Z.jsx)(t0,{}),p=(0,Z.jsx)(i0,{}),m=(0,Z.jsx)(a0,{}),e[3]=u,e[4]=d,e[5]=f,e[6]=p,e[7]=m):(u=e[3],d=e[4],f=e[5],p=e[6],m=e[7]);let h;e[8]===a?h=e[9]:(h=!a&&(0,Z.jsx)(n0,{}),e[8]=a,e[9]=h);let g,_,v,y,b,x,S;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(x=!1,S=t?(0,Z.jsx)(Ay,{bridge:t}):null,g=t?(0,Z.jsx)(Ry,{}):null,_=t?(0,Z.jsx)(T1,{}):null,v=t?(0,Z.jsx)(ZL,{}):null,y=(0,Z.jsx)(S1,{}),b=t?(0,Z.jsxs)(Q.Suspense,{fallback:null,children:[(0,Z.jsx)(J1,{bridge:t}),(0,Z.jsx)(Y1,{})]}):null,e[10]=g,e[11]=_,e[12]=v,e[13]=y,e[14]=b,e[15]=x,e[16]=S):(g=e[10],_=e[11],v=e[12],y=e[13],b=e[14],x=e[15],S=e[16]);let C;e[17]===r?C=e[18]:(C=(0,Z.jsx)(vy,{bridge:t,open:r,onOpenChange:i}),e[17]=r,e[18]=C);let w;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(w=n&&(0,Z.jsx)(`div`,{"aria-hidden":`true`,"data-testid":`editor-window-chrome-drag-strip`,"data-electron-drag":``,className:`pointer-events-none fixed inset-x-0 top-0 z-50 h-2 [-webkit-app-region:drag]`}),e[19]=w):w=e[19];let T;e[20]===a?T=e[21]:(T=!a&&(0,Z.jsx)(f1,{onOpenSearch:()=>i(!0)}),e[20]=a,e[21]=T);let E;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsx)(QN,{className:`overflow-hidden h-[calc(100vh-var(--layout-inset-offset))]`,children:(0,Z.jsx)(qL,{onOpenSearch:()=>i(!0)})}),e[22]=E):E=e[22];let D;e[23]===T?D=e[24]:(D=(0,Z.jsxs)(KN,{className:`h-screen overflow-hidden`,children:[T,E]}),e[23]=T,e[24]=D);let O;e[25]!==D||e[26]!==c?(O=(0,Z.jsx)(ss,{value:c,children:D}),e[25]=D,e[26]=c,e[27]=O):O=e[27];let k;return e[28]!==C||e[29]!==O||e[30]!==h?(k=(0,Z.jsxs)(Z.Fragment,{children:[l,(0,Z.jsxs)(Ho,{children:[u,d,f,p,m,h,x,S,g,_,v,y,b,C,w,O]})]}),e[28]=C,e[29]=O,e[30]=h,e[31]=k):k=e[31],k}function l0(e,t){Bc($o(e,t),t)}function u0(e){let t=/\/([^/]+?)(?:\.git)?\/?$/.exec(e);return t?t[1]:`repo`}function d0(e){return{async getAuthStatus(t){return e.authQueryTransport.status(t?{host:t}:void 0)},async startSignIn(){return e.openSignIn()},async runClone({url:t,branch:n}){let r=await e.bridge.dialog.openFolder();if(!r)return{kind:`cancelled`};let i=u0(t),a=`${r.replace(/\/$/,``)}/${i}`,o=X.loading(yl._({id:`GXf9hG`,values:{repoName:i}}),{duration:1/0}),s=typeof n==`string`&&n.length>0?n:null;try{let n=e.cloneTransport.start({url:t,dir:a,branch:s});for await(let e of n.events){if(e.type===`progress`){let t=e.phase,n=Math.round(e.pct);X.loading(yl._({id:`GXf9hG`,values:{repoName:i}}),{id:o,description:yl._({id:`SCzAbA`,values:{phase:t,pct:n}}),duration:1/0});continue}if(e.type===`branch-fallback`){console.log(pp({branch_action:`fallback`,branch:e.branch})),X.info(yl._({id:`3JYy1p`,values:{0:e.branch}}),{duration:8e3});continue}if(e.type===`complete`)return X.success(yl._({id:`IRv9cH`,values:{repoName:i}}),{id:o,duration:4e3}),{kind:`ok`,dir:e.dir};if(e.type===`error`)return X.dismiss(o),{kind:`error`,detail:e.message}}return X.dismiss(o),{kind:`error`,detail:`Clone ended unexpectedly.`}}catch(e){console.warn(`[clone-controller] clone transport threw`,e);let t=e instanceof Error?e.message:`Unknown error`;return X.dismiss(o),{kind:`error`,detail:t}}}}}function f0(){return{start(e){return Ts((t,n)=>{(async()=>{try{let r=await fetch(`/api/local-op/clone`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e.url,dir:e.dir||void 0,branch:typeof e.branch==`string`&&e.branch.length>0?e.branch:void 0}),signal:n});if(!r.ok){let e=`Clone failed — check the URL and try again (${r.status})`;try{let t=await r.json(),n=ma.safeParse(t);n.success&&(e=`Clone failed: ${n.data.title}`)}catch{}t({type:`error`,message:e});return}if(!r.body){t({type:`error`,message:`Clone failed — empty response body`});return}let i=r.body.getReader(),a=new TextDecoder,o=``;for(;;){let{done:e,value:r}=await i.read();if(e)break;o+=a.decode(r,{stream:!0});let s=o.split(`
|
|
2021
|
+
`}\n${VY}\n${HY}`;function aQ(e){return e===`darwin`?yl._({id:`LtSYdi`}):e===`win32`?yl._({id:`qi1F96`}):yl._({id:`e1Rn_k`})}function oQ(e){let t=(0,$.c)(18),{item:n,workspace:r,onClose:i}=e,{_:a}=ht(),o=typeof window<`u`?window.okDesktop:void 0;if(!o)return null;let s=o.platform,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=aQ(s),t[0]=c):c=t[0];let l=c,u,d;t[1]!==a||t[2]!==r?(u=r?null:a({id:`wTcjov`}),d=a(s===`darwin`?u?{id:`FvpFSZ`,values:{hint:u}}:{id:`LtSYdi`}:s===`win32`?u?{id:`o4dcAf`,values:{hint:u}}:{id:`qi1F96`}:u?{id:`zUhPuR`,values:{hint:u}}:{id:`e1Rn_k`}),t[1]=a,t[2]=r,t[3]=u,t[4]=d):(u=t[3],d=t[4]);let f=d,p=!r,m;t[5]!==n||t[6]!==i||t[7]!==r?(m=()=>{if(!r)return;i();let e=Js(r.contentDir,Df(n),r.pathSeparator);o.shell.showItemInFolder(e)},t[5]=n,t[6]=i,t[7]=r,t[8]=m):m=t[8];let h,g;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(dc,{"aria-hidden":`true`}),g=(0,Z.jsx)(`span`,{className:`flex-1`,children:l}),t[9]=h,t[10]=g):(h=t[9],g=t[10]);let _;t[11]===u?_=t[12]:(_=u?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:u}):null,t[11]=u,t[12]=_);let v;return t[13]!==f||t[14]!==p||t[15]!==m||t[16]!==_?(v=(0,Z.jsxs)(Cr,{disabled:p,onSelect:m,"aria-label":f,children:[h,g,_]}),t[13]=f,t[14]=p,t[15]=m,t[16]=_,t[17]=v):v=t[17],v}function sQ(e){let t=(0,$.c)(69),{item:n,context:r,anyActionBusy:i,workspace:a,handoff:o,model:s,okignoreBinding:c,onStartCreating:l,onCreateFromTemplate:u,onDuplicate:d,onImportTemplate:f,onDelete:p,onExpandSubtree:m,onCollapseSubtree:h,folderTreePaths:g,isAsset:_,documents:v}=e,{_:y}=ht(),b=Tf(n,v),x=n.kind===`directory`,S;t[0]===n.path?S=t[1]:(S=zl(n.path),t[0]=n.path,t[1]=S);let C=S,w=b.kind===`asset`?null:b,T=w!==null&&c!==null,E;t[2]!==y||t[3]!==x?(E=y(x?{id:`5D3Ior`}:{id:`dbhUX1`}),t[2]=y,t[3]=x,t[4]=E):E=t[4];let D=E,O;t[5]!==x||t[6]!==n.path?(O=x?Yf(n.path):null,t[5]=x,t[6]=n.path,t[7]=O):O=t[7];let k=Os(O),A=k.state.status===`ready`?(k.state.data.folder.templates_available?.length??0)>0:!0,j=s.getSelectedPaths(),M=j.includes(b.treePath)?SX(j,v):[],N=M.length>1?M:[b],P=N.length,F=yl._({id:`djjdjr`,values:{deleteCount:P}}),I;t[8]!==v||t[9]!==_||t[10]!==x||t[11]!==n||t[12]!==a?(I=_?null:x?Qo({folderRelativePath:Df(n),workspace:a}):as({docName:Jf(n.path,v),workspace:a}),t[8]=v,t[9]=_,t[10]=x,t[11]=n,t[12]=a,t[13]=I):I=t[13];let L=I,R;t[14]===r?R=t[15]:(R=()=>r.close({restoreFocus:!1}),t[14]=r,t[15]=R);let z=R,B;t[16]===r?B=t[17]:(B=()=>r.close(),t[16]=r,t[17]=B);let V=B,{status:H}=po(),U=H?.hasRemote===!0,W;t[18]!==v||t[19]!==_||t[20]!==x||t[21]!==n.path||t[22]!==b?(W=_||b.kind===`asset`?null:x?Ds(Yf(n.path)):Hs(Jf(n.path,v)),t[18]=v,t[19]=_,t[20]=x,t[21]=n.path,t[22]=b,t[23]=W):W=t[23];let G=W,K=U&&G!==null,ee;t[24]!==y||t[25]!==U||t[26]!==G?(ee=()=>{G&&ms({...G,hasRemote:U,onClickWhenNoRemote:()=>{X.error(y({id:`WyQxwa`}))}},{clipboardWrite:tf,toastSuccess:uQ,toastError:lQ,logEvent:cQ})},t[24]=y,t[25]=U,t[26]=G,t[27]=ee):ee=t[27];let te=ee,ne;t[28]!==K||t[29]!==V||t[30]!==te?(ne=K?(0,Z.jsxs)(Cr,{"data-testid":`file-tree-menu-share`,onSelect:()=>{V(),te()},children:[(0,Z.jsx)(sg,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`Z8lGw6`})]}):null,t[28]=K,t[29]=V,t[30]=te,t[31]=ne):ne=t[31];let re=ne,ie=0,ae=0;if(x){let e=Vf(n.path);for(let t of g)(t===e||t.startsWith(e))&&(ie++,fZ(s.getItem(t))?.isExpanded()&&ae++)}let oe=x&&ae<ie,se=x&&ae>0,ce;t[32]===V?ce=t[33]:(ce=e=>{e||V()},t[32]=V,t[33]=ce);let le;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,Z.jsx)(Dr,{asChild:!0,children:(0,Z.jsx)(`span`,{"aria-hidden":`true`,"data-file-tree-context-menu-root":`true`,className:`block size-px`})}),t[34]=le):le=t[34];let ue;t[35]!==y||t[36]!==i||t[37]!==T||t[38]!==V||t[39]!==z||t[40]!==F||t[41]!==N||t[42]!==A||t[43]!==o||t[44]!==L||t[45]!==D||t[46]!==_||t[47]!==x||t[48]!==C||t[49]!==n||t[50]!==s||t[51]!==c||t[52]!==w||t[53]!==h||t[54]!==u||t[55]!==p||t[56]!==d||t[57]!==m||t[58]!==f||t[59]!==l||t[60]!==re||t[61]!==se||t[62]!==oe||t[63]!==b||t[64]!==a?(ue=(0,Z.jsx)(jr,{sideOffset:0,align:`start`,"data-file-tree-context-menu-root":`true`,className:`min-w-52`,children:x?(0,Z.jsxs)(Z.Fragment,{children:[C?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Cr,{disabled:i,onSelect:()=>{z(),l(`file`,Yf(n.path))},children:[(0,Z.jsx)(nc,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`HdkSiO`})]}),A?(0,Z.jsxs)(wr,{children:[(0,Z.jsxs)(Ar,{disabled:i,children:[(0,Z.jsx)(As,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`Uuj_R4`})]}),(0,Z.jsx)(Tr,{children:(0,Z.jsx)(dZ,{parentDir:Yf(n.path),onSelectTemplate:e=>{z(),u(Yf(n.path),e)},ItemComponent:Cr})})]}):null,(0,Z.jsxs)(Cr,{disabled:i,onSelect:()=>{z(),l(`folder`,Yf(n.path))},children:[(0,Z.jsx)(Ph,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`96G6Re`})]}),(0,Z.jsx)(Pr,{})]}),(0,Z.jsx)(oQ,{item:n,workspace:a,onClose:V}),(0,Z.jsx)(Jo,{input:L,installStates:o.installStates,isElectronHost:o.isElectronHost,dispatch:o.dispatch,onBeforeLaunch:V}),re,(0,Z.jsxs)(wr,{children:[(0,Z.jsxs)(Ar,{children:[(0,Z.jsx)(ec,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`oCZkaG`})]}),(0,Z.jsxs)(Tr,{children:[(0,Z.jsx)(Cr,{disabled:!a,onSelect:()=>{a&&(V(),XZ(Js(a.contentDir,Df(n),a.pathSeparator),`full`))},children:(0,Z.jsx)(q,{id:`oQA-cA`})}),(0,Z.jsx)(Cr,{onSelect:()=>{V(),XZ(Df(n),`relative`)},children:(0,Z.jsx)(q,{id:`s061i4`})})]})]}),oe||se?(0,Z.jsx)(Pr,{}):null,oe?(0,Z.jsxs)(Cr,{onSelect:()=>{V(),m(n.path)},children:[(0,Z.jsx)(Eg,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`OlAl5i`})]}):null,se?(0,Z.jsxs)(Cr,{onSelect:()=>{V(),h(n.path)},children:[(0,Z.jsx)(Mh,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`qvWGzP`})]}):null,C?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Pr,{}),(0,Z.jsxs)(Cr,{disabled:i,onSelect:()=>{b.kind!==`asset`&&(V(),d(b))},children:[(0,Z.jsx)(Gs,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`euc6Ns`})]}),(0,Z.jsxs)(Cr,{disabled:i,onSelect:()=>{z(),s.startRenaming(n.path)},children:[(0,Z.jsx)($s,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`2wxgft`})]}),(0,Z.jsxs)(Cr,{"data-testid":`file-tree-menu-hide`,disabled:!T,onSelect:()=>{if(!c||!w)return;V();let e=fX(w),t=Is(c.current()),n=Bs(t,e);if(n===t)return;c.patch(js(n));let r=w.path.split(`/`).pop()||w.path;X.success(y({id:`4xtLTl`,values:{basename:r}}),{description:y({id:`nWv1ja`}),duration:5e3})},children:[(0,Z.jsx)(Lr,{"aria-hidden":`true`}),D]}),(0,Z.jsxs)(Cr,{variant:`destructive`,disabled:i,onSelect:()=>{V(),p(N)},children:[(0,Z.jsx)(ol,{"aria-hidden":`true`}),F]})]})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(oQ,{item:n,workspace:a,onClose:V}),!_&&(0,Z.jsx)(Jo,{input:L,installStates:o.installStates,isElectronHost:o.isElectronHost,dispatch:o.dispatch,onBeforeLaunch:V}),re,(0,Z.jsxs)(wr,{children:[(0,Z.jsxs)(Ar,{children:[(0,Z.jsx)(ec,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`oCZkaG`})]}),(0,Z.jsxs)(Tr,{children:[(0,Z.jsx)(Cr,{disabled:!a,onSelect:()=>{a&&(V(),XZ(Js(a.contentDir,Df(n),a.pathSeparator),`full`))},children:(0,Z.jsx)(q,{id:`oQA-cA`})}),(0,Z.jsx)(Cr,{onSelect:()=>{V(),XZ(Df(n),`relative`)},children:(0,Z.jsx)(q,{id:`s061i4`})})]})]}),C?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Pr,{}),_?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(wr,{children:[(0,Z.jsxs)(Ar,{disabled:i,children:[(0,Z.jsx)(Ah,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`PYmp-0`})]}),(0,Z.jsxs)(Tr,{children:[(0,Z.jsx)(Cr,{disabled:i,onSelect:()=>{V(),f(b,!1)},children:(0,Z.jsx)(q,{id:`-FeyRg`})}),(0,Z.jsx)(Cr,{disabled:i,onSelect:()=>{V(),f(b,!0)},children:(0,Z.jsx)(q,{id:`dQHSCs`})})]})]}),(0,Z.jsxs)(Cr,{disabled:i,onSelect:()=>{V(),d(b)},children:[(0,Z.jsx)(Gs,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`euc6Ns`})]})]}),(0,Z.jsxs)(Cr,{disabled:i,onSelect:()=>{z(),s.startRenaming(n.path)},children:[(0,Z.jsx)($s,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`2wxgft`})]}),w?(0,Z.jsxs)(Cr,{"data-testid":`file-tree-menu-hide`,disabled:!T,onSelect:()=>{if(!c)return;V();let e=fX(w),t=Is(c.current()),n=Bs(t,e);if(n===t)return;c.patch(js(n));let r=w.path.split(`/`).pop()||w.path;X.success(y({id:`OD0FCX`,values:{basename:r}}),{description:y({id:`nWv1ja`}),duration:5e3})},children:[(0,Z.jsx)(Lr,{"aria-hidden":`true`}),D]}):null,(0,Z.jsxs)(Cr,{variant:`destructive`,disabled:i,onSelect:()=>{V(),p(N)},children:[(0,Z.jsx)(ol,{"aria-hidden":`true`}),F]})]})]})}),t[35]=y,t[36]=i,t[37]=T,t[38]=V,t[39]=z,t[40]=F,t[41]=N,t[42]=A,t[43]=o,t[44]=L,t[45]=D,t[46]=_,t[47]=x,t[48]=C,t[49]=n,t[50]=s,t[51]=c,t[52]=w,t[53]=h,t[54]=u,t[55]=p,t[56]=d,t[57]=m,t[58]=f,t[59]=l,t[60]=re,t[61]=se,t[62]=oe,t[63]=b,t[64]=a,t[65]=ue):ue=t[65];let de;return t[66]!==ce||t[67]!==ue?(de=(0,Z.jsxs)(Nr,{open:!0,modal:!1,onOpenChange:ce,children:[le,ue]}),t[66]=ce,t[67]=ue,t[68]=de):de=t[68],de}function cQ(e){return console.log(e)}function lQ(e){return X.error(e)}function uQ(e){return X.success(e)}function dQ(e,t){return`/api/documents?showAll=true${t?`&showOk=true`:``}&dir=${encodeURIComponent(e)}&depth=1`}async function fQ(e,t,n,r,i){try{let a=await fetch(dQ(e,t),{signal:n,headers:TZ});if(EZ(a)){let e=await kZ(a);return{kind:`entries`,entries:Fl(e.entries),truncated:e.truncated}}let o=await m(a,r);if(!o.ok)return{kind:`http-error`,title:o.title};let s=Ma.safeParse(o.body);return s.success?{kind:`entries`,entries:Fl(s.data.documents),truncated:s.data.truncated===!0}:{kind:`http-error`,title:i}}catch(e){return e instanceof DZ?{kind:`http-error`,title:e.message}:{kind:`network-error`,cause:e}}}function pQ(e){let t=(0,$.c)(367),{ref:n,onContentHeightChange:r}=e,{_:i,i18n:a}=ht(),{activeDocName:o,activeTarget:s,closeTabs:c,closeDocument:l,isNewTabActive:u,openTarget:d,prewarm:f,reconcileLocalRemoval:h,reconcileLocalRename:g}=Re(),{notifySidebarFileSelected:_}=GN(),{resolvedTheme:v}=It(),{addPage:y,pageMeta:b,pages:x}=Vo(),C;t[0]===b?C=t[1]:(C=function(e,t){return Ul(e,t??b.get(e)?.size)??{kind:`doc`,target:e,docName:e}},t[0]=b,t[1]=C);let w=C,T;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(T=[],t[2]=T):T=t[2];let[E,D]=(0,Q.useState)(T),[O,k]=(0,Q.useState)(!0),[A,j]=(0,Q.useState)(null),[M,N]=(0,Q.useState)(!1),P=jF(),F=(0,Q.useRef)(null),[I,L]=(0,Q.useState)(null),[R,z]=(0,Q.useState)(0),[B,V]=(0,Q.useState)(null),[H,U]=(0,Q.useState)(null),[W,G]=(0,Q.useState)(null),[K,ee]=(0,Q.useState)(null),{conflicts:te}=Cs(),[ne,ie]=(0,Q.useState)(null),[ae,oe]=(0,Q.useState)(null),[se,ce]=(0,Q.useState)(!1),le=(0,Q.useRef)(se),ue;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(ue=new Set,t[3]=ue):ue=t[3];let de=(0,Q.useRef)(ue),fe=(0,Q.useRef)(E),pe=(0,Q.useRef)(b),me=(0,Q.useRef)(null),he;t[4]!==y||t[5]!==w||t[6]!==_||t[7]!==d?(he=function(e){if(e.kind===`doc`)e.registerPage&&y(e.docName),d(w(e.docName,e.size),{tabBehavior:`replace-active`}),cu(hu(e.docName));else if(e.kind===`folder`)d({kind:`folder`,target:e.folderPath,folderPath:e.folderPath},{tabBehavior:`replace-active`}),cu(su(e.folderPath));else{let t=(e.entries??fe.current).find(t=>Bl(t)&&t.path===e.assetPath);d({kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:t?.mediaKind??null},{tabBehavior:`replace-active`}),cu(pu(e.assetPath))}_()},t[4]=y,t[5]=w,t[6]=_,t[7]=d,t[8]=he):he=t[8];let ge=he,_e;t[9]!==E||t[10]!==ge||t[11]!==_||t[12]!==d||t[13]!==x?(_e=function(e,t){let n=t===void 0?E:t,r=QX(e,n);if(r.kind===`none`){console.debug(`[FileTree] Dropped selection for unknown docName:`,qf(e));return}if(r.kind===`asset`){d({kind:`asset`,target:r.path,assetPath:r.path,mediaKind:r.mediaKind},{tabBehavior:`replace-active`}),cu(r.hash),_();return}if(r.kind===`folder`){ge({kind:`folder`,folderPath:r.path});return}let i=n.find(e=>Pl(e)&&e.docName===r.path),a=Hl(r.path,{pages:x,docExt:i?.docExt});if(a?.kind===`asset`){d(a,{tabBehavior:`replace-active`}),cu(pu(a.assetPath)),_();return}if(a?.kind===`doc`){ge({kind:`doc`,docName:a.docName});return}ge({kind:`doc`,docName:r.path,size:i?.size,registerPage:Al(r.path)})},t[9]=E,t[10]=ge,t[11]=_,t[12]=d,t[13]=x,t[14]=_e):_e=t[14];let ve=_e,ye=(0,Q.useRef)(o),be;t[15]===E?be=t[16]:(be=new Set(E.filter(Bl).map(VQ)),t[15]=E,t[16]=be);let xe=be,Se=(0,Q.useRef)(xe),Ce;t[17]===E?Ce=t[18]:(Ce=jX(E),t[17]=E,t[18]=Ce);let we=Ce,Te=(0,Q.useRef)(we),Ee;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=[],t[19]=Ee):Ee=t[19];let De=(0,Q.useRef)(Ee),Oe=(0,Q.useRef)(null),ke=(0,Q.useRef)(BQ),Ae=(0,Q.useRef)(null),je=(0,Q.useRef)(null),Me=(0,Q.useRef)(!1),Ne=(0,Q.useRef)(!1),Pe=(0,Q.useRef)(null),Fe;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(Fe={row:null,root:null},t[20]=Fe):Fe=t[20];let Ie=(0,Q.useRef)(Fe),Le=(0,Q.useRef)(zQ),ze=(0,Q.useRef)(null),Be=(0,Q.useRef)(null),Ve;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=new Map,t[21]=Ve):Ve=t[21];let He=(0,Q.useRef)(Ve),Ue;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=new Set,t[22]=Ue):Ue=t[22];let We=(0,Q.useRef)(Ue),Ge;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=new Map,t[23]=Ge):Ge=t[23];let Ke=(0,Q.useRef)(Ge),qe=(0,Q.useRef)(0),Je;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(Je=new Set,t[24]=Je):Je=t[24];let Ye=(0,Q.useRef)(Je),Xe=(0,Q.useRef)(RQ),Ze=(0,Q.useRef)(LQ),Qe=(0,Q.useRef)(!1),$e=(0,Q.useRef)(!1),et=(0,Q.useRef)(!1),tt;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(tt=()=>({showHiddenFiles:Qe.current,showOnlyMarkdownFiles:$e.current,showOkFolders:et.current}),t[25]=tt):tt=t[25];let nt=tt,rt=(0,Q.useRef)(null),it=(0,Q.useRef)(null),at=(0,Q.useRef)(IQ),ot=(0,Q.useRef)(FQ),st=(0,Q.useRef)(PQ),ct=(0,Q.useRef)(NQ),lt=(0,Q.useRef)(s),[ut,dt]=(0,Q.useState)(!1),ft;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(ft=function(){F.current!==null&&(clearTimeout(F.current),F.current=null)},t[26]=ft):ft=t[26];let mt=ft,gt;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(gt=function(){mt(),N(!1)},t[27]=gt):gt=t[27];let _t=gt,vt;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(vt=function(e){_t(),j(e)},t[28]=vt):vt=t[28];let yt=vt,bt;t[29]===i?bt=t[30]:(bt=function(){if(mt(),DF()){j(null),N(!0),F.current=setTimeout(()=>{F.current=null,rt.current?.()},tQ);return}N(!1),j(i({id:`34qyH5`}))},t[29]=i,t[30]=bt);let xt=bt,St=(0,Q.useRef)(!0),Ct;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(Ct=()=>{if(St.current){St.current=!1;return}rt.current?.()},t[31]=Ct):Ct=t[31];let wt;t[32]===P?wt=t[33]:(wt=[P],t[32]=P,t[33]=wt),(0,Q.useEffect)(Ct,wt);let Tt,Et;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(Tt=()=>mt,Et=[],t[34]=Tt,t[35]=Et):(Tt=t[34],Et=t[35]),(0,Q.useEffect)(Tt,Et);let Dt,Ot;t[36]!==E.length||t[37]!==O?(Dt=()=>{if(O||E.length===0)return;let e=it.current?.querySelector(AB)?.shadowRoot;if(!e)return;let t=e,n=function(){Pe.current!==null&&clearTimeout(Pe.current),Pe.current=setTimeout(()=>{Ne.current=!1,Pe.current=null},0)},r=function(e){if(!(e instanceof DragEvent))return;let t=UQ(e),n=t?.dataset.itemPath;if(!n)return;let r=rZ(t.dataset.itemType===`folder`?Vf(n):n,fe.current,pe.current);r&&(Pe.current!==null&&(clearTimeout(Pe.current),Pe.current=null),Ne.current=!0,e.dataTransfer?.setData(Cf,If(r)))},i=function(e){if(!(e instanceof DragEvent)||!Rf(e))return;let t=GQ(e);if(!t){JZ(Ie);return}e.preventDefault(),e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.dropEffect=`copy`),YZ(Ie,t)},a=function(e){if(!(e instanceof DragEvent)||!Rf(e))return;let n=e.relatedTarget;n instanceof Node&&t.contains(n)||JZ(Ie)},o=function(e){if(!(e instanceof DragEvent)||!Rf(e))return;let t=GQ(e),n=Mf(e);if(!t||n.length===0){JZ(Ie);return}e.preventDefault(),e.stopPropagation(),JZ(Ie),Le.current(n,t.parentDir,t.busyPath)};return e.addEventListener(`dragstart`,r,{capture:!0}),e.addEventListener(`dragover`,i,{capture:!0}),e.addEventListener(`dragleave`,a,{capture:!0}),e.addEventListener(`drop`,o,{capture:!0}),e.addEventListener(`dragend`,n,{capture:!0}),window.addEventListener(`drop`,n,!0),window.addEventListener(`dragend`,n,!0),()=>{e.removeEventListener(`dragstart`,r,{capture:!0}),e.removeEventListener(`dragover`,i,{capture:!0}),e.removeEventListener(`dragleave`,a,{capture:!0}),e.removeEventListener(`drop`,o,{capture:!0}),e.removeEventListener(`dragend`,n,{capture:!0}),window.removeEventListener(`drop`,n,!0),window.removeEventListener(`dragend`,n,!0),JZ(Ie),Pe.current!==null&&(clearTimeout(Pe.current),Pe.current=null),Ne.current=!1}},Ot=[E.length,O],t[36]=E.length,t[37]=O,t[38]=Dt,t[39]=Ot):(Dt=t[38],Ot=t[39]),(0,Q.useEffect)(Dt,Ot);let{selectedFilePath:kt,selectedFolderPath:At,navigationPath:jt}=ZX(s,u?null:o),Mt=kt?Uf(kt,E.find(e=>Pl(e)&&e.docName===kt)?.docExt):At?Vf(At):s?.kind===`asset`?s.assetPath:null,Nt=se?null:Mt,Pt=ts().states,{dispatch:Ft}=Yo(),Lt;t[40]!==Ft||t[41]!==Pt?(Lt={installStates:Pt,isElectronHost:typeof window<`u`&&window.okDesktop!=null,dispatch:Ft},t[40]=Ft,t[41]=Pt,t[42]=Lt):Lt=t[42];let Rt=Lt,{okignoreBinding:zt,merged:Bt}=Qu(),Vt=Bt?.appearance?.sidebar?.showHiddenFiles??!1,Ht=Bt?.appearance?.sidebar?.showOnlyMarkdownFiles??!1,Ut=Bt?.appearance?.sidebar?.showOkFolders??!1,Wt;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(Wt=()=>ze.current===null,t[43]=Wt):Wt=t[43];let Gt=Wt,Kt;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(Kt=[],t[44]=Kt):Kt=t[44];let qt;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(qt={set:`complete`,spriteSheet:uX,byFileExtension:{md:{name:oX,viewBox:pt},mdx:{name:oX,viewBox:pt}}},t[45]=qt):qt=t[45];let Jt;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(Jt={contextMenu:{enabled:!0,triggerMode:`both`,buttonVisibility:`when-needed`}},t[46]=Jt):Jt=t[46];let Yt;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(Yt={canDrag:Gt,canDrop:Gt,onDropComplete:e=>ct.current(e),onDropError:MQ},t[47]=Yt):Yt=t[47];let Xt,Zt;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(Xt={canRename:Gt,onRename:e=>ot.current(e),onError:e=>st.current(e)},Zt=e=>at.current(e),t[48]=Xt,t[49]=Zt):(Xt=t[48],Zt=t[49]);let Qt;t[50]===i?Qt=t[51]:(Qt={paths:Kt,initialExpansion:`closed`,fileTreeSearchMode:`hide-non-matches`,initialVisibleRowCount:18,stickyFolders:!0,...zY,icons:qt,unsafeCSS:iQ,composition:Jt,dragAndDrop:Yt,renaming:Xt,onSelectionChange:Zt,renderRowDecoration:e=>{let{item:t}=e;if(t.kind===`file`){let e=Te.current.docsByTreePath.get(t.path);if(e?.isSymlink){let t=e.targetPath;return{icon:iX,title:i(t?{id:`JE21eh`,values:{targetPath:t}}:{id:`BQu9Pg`})}}return _X(t.path)?{icon:aX,title:i({id:`i9toLO`})}:null}let n=Te.current.foldersByTreeDirectoryPath.get(Vf(t.path));if(n?.isSymlink){let e=n.targetPath;return{icon:iX,title:i(e?{id:`JE21eh`,values:{targetPath:e}}:{id:`BQu9Pg`})}}return null}},t[50]=i,t[51]=Qt);let{model:$t}=LY(Qt),en;t[52]===$t?en=t[53]:(en=function(e){let t=$t.getItem(e)??$t.getItem(Vf(e));return t?.isDirectory()?Vf(Yf(t.getPath())):e},t[52]=$t,t[53]=en);let tn=en,nn,rn;t[54]===E?(nn=t[55],rn=t[56]):(rn=Af(E),nn=xf(rn),t[54]=E,t[55]=nn,t[56]=rn);let an=nn,on=(0,Q.useRef)(rn),sn;t[57]!==E||t[58]!==Ut?(sn=zf(E,{includeOkFolders:Ut}),t[57]=E,t[58]=Ut,t[59]=sn):sn=t[59];let cn=sn,ln=(0,Q.useRef)(cn),un=At?Hf(Vf(At)).slice(0,-1):Hf(Nt??jt),dn=un.join(`\0`),fn;t[60]===$t?fn=t[61]:(fn=()=>{let e=new Set;for(let t of ln.current)fZ($t.getItem(t))?.isExpanded()&&e.add(t);return e},t[60]=$t,t[61]=fn);let pn=fn,mn;t[62]===pn?mn=t[63]:(mn=e=>{let t=new Set(zf(e??fe.current,{includeOkFolders:et.current})),n=pn();for(let e of De.current)n.add(e);return[...n].filter(e=>t.has(e))},t[62]=pn,t[63]=mn);let hn=mn,gn;t[64]!==hn||t[65]!==$t?(gn=e=>{let t=Af(e??fe.current);$t.resetPaths(t,{initialExpandedPaths:hn(e)})},t[64]=hn,t[65]=$t,t[66]=gn):gn=t[66];let _n=gn,yn;t[67]!==i||t[68]!==xt?(yn=async function(e){let t=qe.current,n=new AbortController;Ke.current.set(e,n);let r=await fQ(Yf(e),et.current,n.signal,i({id:`8RtNI0`}),i({id:`HlmZBk`}));if(Ke.current.get(e)===n&&Ke.current.delete(e),n.signal.aborted||t!==qe.current)return;if(r.kind===`network-error`){xt(),console.warn(`[FileTree] lazy folder children fetch failed:`,e,r.cause);return}if(r.kind===`http-error`){console.warn(`[FileTree] lazy folder children http error:`,e,r.title),yt(r.title);return}let a=Nl(r.entries,nt());We.current.add(e),D(t=>MZ(t,e,a,He.current)),j(null),_t(),r.truncated&&L(r.entries.length)},t[67]=i,t[68]=xt,t[69]=yn):yn=t[69];let bn=yn,xn;t[70]!==pn||t[71]!==bn?(xn=()=>{let e=pn(),t=Ye.current;Ye.current=e;for(let n of e){if(t.has(n)||We.current.has(n)||Ke.current.has(n))continue;let e=Yf(n);fe.current.find(t=>Ll(t)&&t.path===e)?.hasChildren!==!1&&bn(n)}},t[70]=pn,t[71]=bn,t[72]=xn):xn=t[72];let Sn=xn,Cn;t[73]!==pn||t[74]!==bn?(Cn=()=>{for(let e of pn())We.current.has(e)||Ke.current.has(e)||bn(e)},t[73]=pn,t[74]=bn,t[75]=Cn):Cn=t[75];let wn=Cn,Tn;t[76]!==$t||t[77]!==_n?(Tn=(e,t,n,r)=>{let i=r===void 0?[]:r,a=0,o=null;for(let{fromDocName:r,toDocName:i}of n){let n=e.find(e=>Pl(e)&&e.docName===r);if(n==null||$t.getItem(i)==null)continue;let s=Uf(i,t.find(e=>Pl(e)&&e.docName===i)?.docExt??n.docExt);$t.move(i,s),o=s,a+=1}for(let{toPath:e}of i){let t=Ml(e);if(t===``)continue;let n=e.slice(0,-t.length);$t.getItem(n)!=null&&($t.getItem(e)??$t.move(n,e),o=e,a+=1)}a!==0&&(_n(t),o!=null&&$t.focusPath(o))},t[76]=$t,t[77]=_n,t[78]=Tn):Tn=t[78];let En=Tn,Dn;t[79]===Symbol.for(`react.memo_cache_sentinel`)?(Dn=e=>{Ae.current=Lf(e)},t[79]=Dn):Dn=t[79];let On=Dn,kn;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(kn=e=>Se.current.has(e),t[80]=kn):kn=t[80];let An=kn,jn;t[81]!==i||t[82]!==y||t[83]!==ge||t[84]!==_n?(jn=async function(e){if(e.kind===`asset`||ze.current!==null)return;let t=()=>{V(null),ze.current=null};ze.current=e.path,V(e.path),j(null);try{let n=await m(await fetch(`/api/duplicate-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e.kind,path:e.path})}),i({id:`dw_dUJ`}));if(!n.ok){X.error(n.title),_n(),t();return}let r=p(Ri,n.body,`duplicate-path`,null);if(r===null){let e=i({id:`67f-3g`});X.error(e),j(e),$l([`files`,`backlinks`,`graph`]),_n(),t();return}for(let e of r.duplicatedDocNames)y(e);D(t=>{let n=rI(t,e,r);return _n(n),On(n),n}),$l([`files`,`backlinks`,`graph`]),r.path!==e.path&&(r.kind===`folder`?ge({kind:`folder`,folderPath:r.path}):ge({kind:`doc`,docName:r.path})),X.success(r.kind===`folder`?i({id:`iilQXA`}):i({id:`A6h5b-`}),{description:r.path}),t()}catch(e){let n=e,r=n instanceof Error?n.message:String(n);console.warn(`[FileTree] duplicate failed:`,n),X.error(i({id:`EBVbtP`}),{description:r}),_n(),t()}},t[81]=i,t[82]=y,t[83]=ge,t[84]=_n,t[85]=jn):jn=t[85];let Mn=jn,Nn=(0,Q.useRef)(Mn),Pn;t[86]===Mn?Pn=t[87]:(Pn=()=>{Nn.current=Mn},t[86]=Mn,t[87]=Pn),(0,Q.useEffect)(Pn);let Fn=async function(e,t){if(e.kind===`file`){if(t){G(e);return}await In(e,!1)}};async function In(e,t){if(ze.current!==null)return;let n=()=>{V(null),ze.current=null,G(null)};ze.current=e.path,V(e.path),j(null);let r=e.path,a=r.lastIndexOf(`/`),o=a===-1?``:r.slice(0,a),s=await fc({sourcePath:e.path,targetFolder:o,deleteSource:t});if(!s.ok){X.error(i({id:`rDOuNw`}),{description:s.error}),n();return}t&&(await Yr([e],[e.path],[]),D(t=>{let n=t.filter(t=>!(Pl(t)&&t.docName===e.path));return _n(n),On(n),n}),$l([`files`,`backlinks`,`graph`])),X.success(i({id:`Ba4D2x`}),{description:s.path}),n()}let Ln=function(e){let t=mX(e);if(!t||hX(t))return!1;let n=$t.getFocusedPath()??$t.getSelectedPaths()[0]??null;if(!n||n.endsWith(`/`)||An(n))return!1;let r=hX(n);if(!r)return!1;let i=Vf(t);if(!ln.current.includes(i))return!1;let a=`${t}${r}`;return on.current.includes(a)?!1:(hr({sourcePath:n,destinationPath:a,isFolder:!1}),$t.move(n,a),!0)},Rn;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(Rn=e=>{let t=e??Oe.current;!t||Oe.current!==t||(t.disposeCommitListener(),Oe.current=null)},t[88]=Rn):Rn=t[88];let zn=Rn,Bn;t[89]!==i||t[90]!==zn||t[91]!==l||t[92]!==c||t[93]!==_n?(Bn=async function(e,t){let n=t===void 0?{}:t,r=n.updateUi??!0,a=n.restoreLocation??r;zn(e),r&&V(e.renamePath);try{let t=await fetch(`/api/delete-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e.kind,path:e.createdPath})});if(!t.ok&&t.status!==404){let n=e.kind,a=e.createdPath,o=await m(t,i({id:`EcM3k7`,values:{kind:n}}));if(o.ok)return;let s=o.title,c=i({id:`YPFBfr`,values:{detail:s,kind:n,createdPath:a}});r?X.error(c):console.warn(`[FileTree] cleanup pending create failed: ${c}`),r&&(V(null),_n());return}}catch(t){if(console.warn(`[FileTree] cleanup pending create failed:`,t),r){let t=e.kind,n=e.createdPath;X.error(i({id:`_TDESN`,values:{kind:t,createdPath:n}}))}r&&(V(null),_n());return}r&&(e.kind===`file`?l(e.createdPath):c([S(e.createdPath)],{force:!0})),r&&D(t=>{let n=tI(t,e.kind===`file`?[e.createdPath]:[],e.kind===`folder`?e.createdPath:void 0);return On(n),n}),$l([`files`,`backlinks`,`graph`]),a&&(window.location.hash=e.previousHash),r&&V(null)},t[89]=i,t[90]=zn,t[91]=l,t[92]=c,t[93]=_n,t[94]=Bn):Bn=t[94];let Vn=Bn,Hn,Un;t[95]===Symbol.for(`react.memo_cache_sentinel`)?(Hn=()=>()=>{let e=Oe.current;e&&ke.current(e,{restoreLocation:!1,updateUi:!1}).catch(jQ)},Un=[],t[95]=Hn,t[96]=Un):(Hn=t[95],Un=t[96]),(0,Q.useEffect)(Hn,Un);let Wn;t[97]!==i||t[98]!==xt?(Wn=()=>{let e=!0,t=null,n=Bo(async function(){t?.abort();let n=new AbortController;t=n,qe.current+=1;for(let e of Ke.current.values())e.abort();Ke.current.clear(),We.current.clear();try{let t=await fetch(dQ(``,et.current),{signal:n.signal,headers:TZ});if(EZ(t)){let r=nt(),i=!1,{entries:a,truncated:o}=await kZ(t,{onBatch:t=>{if(!e||n.signal.aborted)return;let a=Nl(Fl(t),r);a.length!==0&&(D(e=>jZ(e,a)),i||(i=!0,j(null),_t(),k(!1)))}});if(!e)return;let s=Fl(a),c=Nl(s,r);D(e=>MZ(e,``,c,He.current)),j(null),_t(),L(o?a.length:null),z(s.length),Ze.current()}else{let n=await m(t,i({id:`8RtNI0`}));if(!e)return;if(!n.ok)yt(n.title),L(null);else{let e=Ma.safeParse(n.body);if(!e.success)yt(i({id:`HlmZBk`})),L(null);else{let t=Fl(e.data.documents),n=Nl(t,nt());D(e=>MZ(e,``,n,He.current)),j(null),_t(),L(e.data.truncated===!0?e.data.documents.length:null),z(t.length),Ze.current()}}}}catch(t){let r=t;if(n.signal.aborted)return;e&&(r instanceof DZ?yt(r.message):xt()),console.warn(`[FileTree] fetch failed:`,r)}e&&k(!1)},()=>t?.abort());rt.current=()=>n.request(),n.request();let r=()=>{document.visibilityState===`visible`&&n.request()};window.addEventListener(`focus`,r),window.addEventListener(`visibilitychange`,r);let a=Jl(e=>{e.includes(`files`)&&n.request()});return()=>{e=!1,rt.current=null,n.dispose();for(let e of Ke.current.values())e.abort();Ke.current.clear(),window.removeEventListener(`focus`,r),window.removeEventListener(`visibilitychange`,r),a()}},t[97]=i,t[98]=xt,t[99]=Wn):Wn=t[99];let Gn;t[100]===i?Gn=t[101]:(Gn=[i],t[100]=i,t[101]=Gn),(0,Q.useEffect)(Wn,Gn);let Kn=(0,Q.useRef)(!0),qn;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(qn=()=>{if(Kn.current){Kn.current=!1;return}rt.current?.()},t[102]=qn):qn=t[102];let Jn;t[103]!==Vt||t[104]!==Ut||t[105]!==Ht?(Jn=[Vt,Ht,Ut],t[103]=Vt,t[104]=Ut,t[105]=Ht,t[106]=Jn):Jn=t[106],(0,Q.useEffect)(qn,Jn);let Yn,Xn;t[107]===Symbol.for(`react.memo_cache_sentinel`)?(Yn=()=>{let e=!0;return fetch(`/api/workspace`).then(async t=>{let n=await t.json();if(!e||!t.ok)return;let r=p(qa,n,`workspace`,null);r&&oe({contentDir:r.contentDir,pathSeparator:r.pathSeparator})}).catch(AQ),()=>{e=!1}},Xn=[],t[107]=Yn,t[108]=Xn):(Yn=t[107],Xn=t[108]),(0,Q.useEffect)(Yn,Xn);let Zn;t[109]!==hn||t[110]!==$t||t[111]!==an?(Zn=()=>{if(Ae.current===an){Ae.current=null;return}$t.resetPaths(on.current,{initialExpandedPaths:hn()})},t[109]=hn,t[110]=$t,t[111]=an,t[112]=Zn):Zn=t[112];let Qn;t[113]!==$t||t[114]!==an?(Qn=[$t,an],t[113]=$t,t[114]=an,t[115]=Qn):Qn=t[115],(0,Q.useEffect)(Zn,Qn),hZ($t,Nt,dn,Me,an);let $n,er;t[116]!==$t||t[117]!==r?($n=()=>{if(!r)return;let e=0,t=0,n=()=>it.current?.querySelector(`file-tree-container`)?.shadowRoot?.querySelector(`[data-file-tree-virtualized-list]`)??null,i=()=>{let e=n();if(!e)return;let t=Number.parseFloat(e.style.height);Number.isFinite(t)&&r(t)},a=()=>{cancelAnimationFrame(e),e=requestAnimationFrame(i)},o=new MutationObserver(i),s=()=>{let e=n();e?(o.observe(e,{attributes:!0,attributeFilter:[`style`]}),i()):t=requestAnimationFrame(s)};s();let c=$t.subscribe(a);return window.addEventListener(`resize`,a),()=>{cancelAnimationFrame(e),cancelAnimationFrame(t),o.disconnect(),c(),window.removeEventListener(`resize`,a)}},er=[r,$t],t[116]=$t,t[117]=r,t[118]=$n,t[119]=er):($n=t[118],er=t[119]),(0,Q.useEffect)($n,er);let tr;t[120]===Symbol.for(`react.memo_cache_sentinel`)?(tr=()=>{ce(!1)},t[120]=tr):tr=t[120];let nr;t[121]===Mt?nr=t[122]:(nr=[Mt],t[121]=Mt,t[122]=nr),(0,Q.useEffect)(tr,nr);let rr,ir;t[123]===se?(rr=t[124],ir=t[125]):(rr=()=>{le.current=se;for(let e of de.current)e()},ir=[se],t[123]=se,t[124]=rr,t[125]=ir),(0,Q.useEffect)(rr,ir);let ar;t[126]!==Nt||t[127]!==O||t[128]!==$t?(ar=()=>{O||!Nt||YX($t,Nt)},t[126]=Nt,t[127]=O,t[128]=$t,t[129]=ar):ar=t[129];let or;t[130]!==dn||t[131]!==Nt||t[132]!==O||t[133]!==$t||t[134]!==an?(or=[Nt,dn,an,O,$t],t[130]=dn,t[131]=Nt,t[132]=O,t[133]=$t,t[134]=an,t[135]=or):or=t[135],(0,Q.useEffect)(ar,or);let sr,cr;t[136]===$t?(sr=t[137],cr=t[138]):(sr=()=>$t.subscribe(()=>{if(!$t.isSearchOpen())for(let e of De.current){let t=fZ($t.getItem(e));t&&!t.isExpanded()&&t.expand()}}),cr=[$t],t[136]=$t,t[137]=sr,t[138]=cr),(0,Q.useEffect)(sr,cr);let lr,ur;t[139]===$t?(lr=t[140],ur=t[141]):(lr=()=>$t.subscribe(()=>Xe.current()),ur=[$t],t[139]=$t,t[140]=lr,t[141]=ur),(0,Q.useEffect)(lr,ur);let dr,fr;t[142]===$t?(dr=t[143],fr=t[144]):(dr=()=>$t.onMutation(`remove`,e=>{let t=Oe.current;!t||e.path!==t.renamePath||ke.current(t)}),fr=[$t],t[142]=$t,t[143]=dr,t[144]=fr),(0,Q.useEffect)(dr,fr);let pr;t[145]!==y||t[146]!==ge||t[147]!==g||t[148]!==En?(pr=async(e,t,n,r,i)=>{let a=t===void 0?[]:t,o=n===void 0?[]:n,s=i===void 0?[]:i,c=r?.docName??ye.current,l=new Map,u=new Map;for(let e of fe.current){if(Pl(e)){let t=o.find(t=>t.fromPath===Uf(e.docName,e.docExt))?.toPath;t&&l.set(e.docName,t);continue}if(Bl(e)){let t=o.find(t=>t.fromPath===e.path)?.toPath;t&&Al(t)&&u.set(e.path,kf(t))}}let d=c?l.get(c)??null:null,f=r?.folderPath??(lt.current?.kind===`folder`?lt.current.folderPath:null),p=f?re(f,a):null,m=r?.assetPath??(lt.current?.kind===`asset`?lt.current.assetPath:null),h=m?u.get(m)??null:null,_=d?null:h??iI(c,e),v=d??(m?h?null:o.find(e=>e.fromPath===m)?.toPath??re(m,a):null);await g({renamed:e,renamedFolders:a,renamedAssets:o,additionalRemovedDocNames:[...l.keys()]});for(let t of e)y(t.toDocName);for(let e of u.values())y(e);let b=null;D(t=>{let n=eI(t,e,a,o,s);return b=n,En(t,n,e,o),On(n),n}),f&&p&&p!==f?ge({kind:`folder`,folderPath:p}):_&&_!==c?(ge({kind:`doc`,docName:_}),qZ(_)):v&&(d||v!==m)&&ge({kind:`asset`,assetPath:v,entries:b??fe.current}),$l([`files`,`backlinks`,`graph`])},t[145]=y,t[146]=ge,t[147]=g,t[148]=En,t[149]=pr):pr=t[149];let mr=pr;async function hr(e){let t=!e.isFolder&&An(e.sourcePath),n=t?e.sourcePath:Pf(e.sourcePath,e.isFolder);V(n),j(null);try{let r=jl(e.sourcePath,e.destinationPath,e.isFolder),a=!e.isFolder&&!t&&!Al(r.destinationPath),o=t||a?r.destinationPath:Pf(r.destinationPath,e.isFolder),s=e.isFolder?{kind:`folder`,fromPath:Yf(n),toPath:Yf(o)}:t||a?{kind:`asset`,fromPath:n,toPath:o}:{kind:`file`,fromPath:Jf(n,fe.current),toPath:o},c={docName:ye.current,folderPath:lt.current?.kind===`folder`?lt.current.folderPath:null,assetPath:lt.current?.kind===`asset`?lt.current.assetPath:null},l=await m(await fetch(`/api/rename-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(s)}),i({id:`gijbne`}));if(!l.ok){X.error(l.title),_n();let e=Oe.current;e&&e.renamePath===n?await Vn(e):zn(),V(null);return}let u=p(vi,l.body,`rename-path`,{renamed:[],renamedAssets:[]});try{await mr(u.renamed,e.isFolder?[{fromPath:Yf(n),toPath:Yf(o)}]:[],u.renamedAssets,c,!e.isFolder&&!t&&!a?u.renamed.flatMap(e=>{let t=Ml(o);return t?[{toDocName:e.toDocName,docExt:t}]:[]}):[])}catch(e){console.warn(`[FileTree] post-rename reconciliation failed`,{err:e,sourceTreePath:n,destinationTreePath:o,renamedCount:u.renamed.length,renamedAssetCount:u.renamedAssets.length}),X.error(i({id:`dDpCOp`}))}zn(),V(null)}catch(e){console.warn(`[FileTree] rename failed:`,e);let t=i({id:`HIb0vl`});X.error(t),j(t),_n();let r=Oe.current;r&&r.renamePath===n?await Vn(r):zn(),V(null)}}let gr;t[150]!==i||t[151]!==mr||t[152]!==_n?(gr=async function(e){let t=e.draggedPaths.map(t=>{let n=Ff(t,e.target);return t===n?null:{sourcePath:t,destinationTreePath:n}}).filter(kQ);if(t.length!==0){V(t[0]?.sourcePath??null),j(null);try{let e=[],n=[],r=[],a={docName:ye.current,folderPath:lt.current?.kind===`folder`?lt.current.folderPath:null,assetPath:lt.current?.kind===`asset`?lt.current.assetPath:null};for(let a of t){let t=a.sourcePath.endsWith(`/`),o=!t&&An(a.sourcePath),s=o?null:Jf(a.sourcePath,fe.current),c=t?{kind:`folder`,fromPath:Yf(a.sourcePath),toPath:Yf(a.destinationTreePath)}:o?{kind:`asset`,fromPath:a.sourcePath,toPath:a.destinationTreePath}:{kind:`file`,fromPath:s??kf(a.sourcePath),toPath:s&&Al(s)?a.destinationTreePath:kf(a.destinationTreePath)},l=await m(await fetch(`/api/rename-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(c)}),i({id:`dOHMA0`}));if(!l.ok){X.error(l.title),_n(),V(null);return}let u=p(vi,l.body,`rename-path:drop`,{renamed:[],renamedAssets:[]});e=e.concat(u.renamed),n=n.concat(u.renamedAssets),t&&r.push({fromPath:Yf(a.sourcePath),toPath:Yf(a.destinationTreePath)})}try{await mr(e,r,n,a)}catch(r){console.warn(`[FileTree] post-move reconciliation failed`,{err:r,operationCount:t.length,renamedCount:e.length,renamedAssetCount:n.length}),X.error(i({id:`8OxKZy`}))}V(null)}catch(e){console.warn(`[FileTree] move failed:`,e),X.error(i({id:`HIb0vl`})),_n(),V(null)}}},t[150]=i,t[151]=mr,t[152]=_n,t[153]=gr):gr=t[153];let _r=gr,vr;t[154]!==i||t[155]!==y||t[156]!==_n?(vr=async function(e,t,n){if(e.length===0||ze.current!==null)return;let r=()=>{ze.current=null,V(null)};ze.current=n,V(n),j(null);let a=[],o=0,s=0;for(let n of e){let e=new FormData;e.append(`file`,n),Wf(e,t,n.name||`upload`);try{let r=await m(await fetch(`/api/upload`,{method:`POST`,body:e}),i({id:`4Gz2wC`}));if(!r.ok){s+=1,X.error(r.title,{description:n.name});continue}let c=p(ra,r.body,`upload:drop`,null);if(c===null){s+=1,X.error(i({id:`4Gz2wC`}),{description:n.name});continue}let l=Ef(t,c);if(c.deduped===!0){s+=1,X.error(i({id:`4sKwf6`}),{description:l});continue}o+=1;let u=Gf(l,n);u&&a.push(u)}catch(e){let t=e;s+=1,console.warn(`[FileTree] external file upload failed:`,t),X.error(t instanceof TypeError?i({id:`HIb0vl`}):i({id:`4Gz2wC`}),{description:n.name})}}try{if(a.length>0){for(let e of a)Pl(e)&&y(e.docName);D(e=>{let t=new Set(e.map(jf)),n=!1,r=[...e];for(let e of a){let i=jf(e);He.current.set(i,Date.now()),!t.has(i)&&(t.add(i),r.push(e),n=!0)}return n?(_n(r),On(r),r):e})}o>0&&($l([`files`,`backlinks`,`graph`]),rt.current?.(),X.success(yl._({id:`v75Em9`,values:{uploadedCount:o}}),{description:t||i({id:`RSqaSd`})})),s>0&&j(o>0?yl._({id:`yH7T4q`,values:{failedCount:s}}):i({id:`4Gz2wC`})),r()}catch(e){let t=e,n=i({id:`VcqWBy`});console.warn(`[FileTree] upload post-upload reconciliation failed:`,t),X.error(n),j(n),r()}},t[154]=i,t[155]=y,t[156]=_n,t[157]=vr):vr=t[157];let yr=vr,br;t[158]===Symbol.for(`react.memo_cache_sentinel`)?(br=function(e){ie({parentDir:e})},t[158]=br):br=t[158];let xr=br,Sr;t[159]!==i||t[160]!==y||t[161]!==Vn||t[162]!==zn||t[163]!==$t||t[164]!==ge||t[165]!==_n||t[166]!==rn?(Sr=async function(e,t,n){if(ze.current)return;let r=Oe.current;r&&zn(r);try{let r=Bf(e,t,[...rn,...ln.current]);V(r.renamePath),ze.current=r.renamePath;let a=window.location.hash,o;if(e===`file`){let e=Of(`file`,r.addPath),t={path:e};n?.template&&(t.template=n.template);let a=await m(await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),i({id:`fJgQHX`}));if(!a.ok){X.error(a.title),V(null),ze.current=null;return}let s=kf(e),c=p(Zi,a.body,`create-page`,{docName:s}).docName;o=c;let l={kind:`document`,docName:c,docExt:e.toLowerCase().endsWith(`.mdx`)?`.mdx`:`.md`,modified:new Date().toISOString(),size:0};y(c),D(e=>{if(e.some(e=>Pl(e)&&e.docName===c))return e;let t=[...e,l];return On(t),He.current.set(jf(l),Date.now()),t}),$l([`files`,`backlinks`,`graph`]),ge({kind:`doc`,docName:c})}else{let e=Yf(r.addPath),t=await m(await fetch(`/api/create-folder`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e})}),i({id:`K1ckLX`}));if(!t.ok){X.error(t.title),V(null),ze.current=null;return}o=p(no,t.body,`create-folder`,{path:e}).path;let n={kind:`folder`,path:o,modified:new Date().toISOString(),size:0};D(e=>{if(e.some(e=>Ll(e)&&e.path===o))return e;let t=[...e,n];return On(t),He.current.set(jf(n),Date.now()),t}),$l([`files`]),ge({kind:`folder`,folderPath:o})}let s=!1,c=e=>{if(e.key!==`Enter`)return;let t=Oe.current;!t||t.renamePath!==r.renamePath||queueMicrotask(()=>zn(t))};document.addEventListener(`keydown`,c,!0),Oe.current={kind:e,renamePath:r.renamePath,createdPath:o,previousHash:a,disposeCommitListener:()=>{s||(s=!0,document.removeEventListener(`keydown`,c,!0))}},V(null),ze.current=null,$t.add(r.addPath),$t.startRenaming(r.renamePath,{removeIfCanceled:!0})}catch(e){console.warn(`[FileTree] create placeholder failed:`,e),X.error(i({id:`S6l5dv`}));let t=Oe.current;t?await Vn(t):zn(),V(null),ze.current=null,_n()}},t[159]=i,t[160]=y,t[161]=Vn,t[162]=zn,t[163]=$t,t[164]=ge,t[165]=_n,t[166]=rn,t[167]=Sr):Sr=t[167];let Cr=Sr,wr;t[168]===$t?wr=t[169]:(wr=function(e){let t=Vf(e);(0,Q.startTransition)(()=>{for(let e of ln.current)if(e===t||e.startsWith(t)){let t=fZ($t.getItem(e));t&&t.expand()}})},t[168]=$t,t[169]=wr);let Tr=wr,Er;t[170]===$t?Er=t[171]:(Er=function(e){let t=Vf(e),n=new Set(De.current);(0,Q.startTransition)(()=>{for(let e of[...ln.current].reverse())if((e===t||e.startsWith(t))&&!n.has(e)){let t=fZ($t.getItem(e));t&&t.collapse()}})},t[170]=$t,t[171]=Er);let Dr=Er,Or;t[172]===Symbol.for(`react.memo_cache_sentinel`)?(Or=function(){return((it.current?.querySelector(`file-tree-container`)?.shadowRoot)?.querySelector(`[aria-selected="true"][data-item-path]`))?.dataset.itemPath??null},t[172]=Or):Or=t[172];let kr=Or,Ar;t[173]!==ve||t[174]!==un||t[175]!==o||t[176]!==s||t[177]!==xe||t[178]!==B||t[179]!==Vn||t[180]!==Sn||t[181]!==E||t[182]!==cn||t[183]!==_r||t[184]!==hr||t[185]!==tn||t[186]!==b||t[187]!==Ln||t[188]!==wn||t[189]!==we||t[190]!==Vt||t[191]!==Ut||t[192]!==Ht||t[193]!==rn||t[194]!==yr?(Ar=()=>{fe.current=E,Te.current=we,pe.current=b,ye.current=o,lt.current=s,Se.current=xe,ze.current=B,Qe.current=Vt,$e.current=Ht,et.current=Ut,on.current=rn,ln.current=cn,De.current=un,Xe.current=Sn,Ze.current=wn,ke.current=Vn,Le.current=(e,t,n)=>{yr(e,t,n)},at.current=e=>{if(Me.current||Ne.current||e.length!==1)return;let t=e[0];if(t){ce(!1);let e=tn(t),n=me.current,r=n!==null&&kf(n)===kf(e),i=r?n:e;me.current=null,queueMicrotask(()=>{ve(tn((r?null:kr())??i),fe.current)})}},st.current=e=>{Ln(e)||X.error(e)},ot.current=hr,ct.current=_r},t[173]=ve,t[174]=un,t[175]=o,t[176]=s,t[177]=xe,t[178]=B,t[179]=Vn,t[180]=Sn,t[181]=E,t[182]=cn,t[183]=_r,t[184]=hr,t[185]=tn,t[186]=b,t[187]=Ln,t[188]=wn,t[189]=we,t[190]=Vt,t[191]=Ut,t[192]=Ht,t[193]=rn,t[194]=yr,t[195]=Ar):Ar=t[195],(0,Q.useLayoutEffect)(Ar);let jr,Mr;t[196]===$t?(jr=t[197],Mr=t[198]):(jr=()=>{let e=e=>{let t=(e.metaKey||e.ctrlKey)&&!e.altKey,n=e.key.toLowerCase(),r=t&&n===`a`,i=t&&!e.shiftKey&&n===`d`,a=t&&!e.shiftKey&&n===`c`,o=t&&!e.shiftKey&&n===`v`,s=!e.altKey&&!e.shiftKey&&(e.metaKey&&!e.ctrlKey&&n===`backspace`||!e.metaKey&&!e.ctrlKey&&n===`delete`);if(!r&&!i&&!a&&!o&&!s||OX(e.target))return;let c=it.current,l=e.target,u=document.activeElement,d=l instanceof Node&&c?.contains(l),f=u instanceof Node&&c?.contains(u);if(!d&&!f)return;if(a){let t=TX($t,fe.current,Se.current);if(!t)return;Be.current=t,e.preventDefault(),e.stopPropagation();return}if(o){let t=Be.current;if(!t)return;Nn.current(t),e.preventDefault(),e.stopPropagation();return}if(i){let t=TX($t,fe.current,Se.current);if(!t)return;Nn.current(t),e.preventDefault(),e.stopPropagation();return}if(s){if(ze.current!==null)return;let t=EX($t,fe.current);if(t.length===0)return;U({targets:t}),e.preventDefault(),e.stopPropagation();return}let p=new Set([...ln.current,...on.current]);Me.current=!0;for(let e of p)e&&$t.getItem(e)?.select();queueMicrotask(()=>{Me.current=!1}),e.preventDefault(),e.stopPropagation()};return document.addEventListener(`keydown`,e,!0),()=>document.removeEventListener(`keydown`,e,!0)},Mr=[$t],t[196]=$t,t[197]=jr,t[198]=Mr),(0,Q.useEffect)(jr,Mr);let Nr,Pr;t[199]!==E.length||t[200]!==O?(Nr=()=>{if(O||E.length===0)return;let e=it.current?.querySelector(AB)?.shadowRoot;if(!e)return;let t=OQ,n=()=>{for(let n of e.querySelectorAll(`[data-item-path]`)){let e=n.dataset.itemPath;if(!e)continue;let r=t(e);n.title!==r&&(n.title=r)}let n=e.querySelector(`[data-type="context-menu-anchor"]`);if(n){let r=e.querySelector(`[data-item-context-hover="true"][data-item-path]`)?.dataset.itemPath,i=r?t(r):``;n.title!==i&&(n.title=i)}};n();let r=new MutationObserver(n);return r.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-item-path`,`data-item-context-hover`]}),()=>r.disconnect()},Pr=[O,E.length],t[199]=E.length,t[200]=O,t[201]=Nr,t[202]=Pr):(Nr=t[201],Pr=t[202]),(0,Q.useEffect)(Nr,Pr);let Fr,Ir;t[203]!==E.length||t[204]!==O?(Fr=()=>{if(O||E.length===0)return;let e=it.current?.querySelector(AB)?.shadowRoot;if(!e)return;let t=()=>JY(e);t();let n=new MutationObserver(t);return n.observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:[`data-item-path`]}),()=>n.disconnect()},Ir=[O,E.length],t[203]=E.length,t[204]=O,t[205]=Fr,t[206]=Ir):(Fr=t[205],Ir=t[206]),(0,Q.useEffect)(Fr,Ir);let Lr=Bt?.validation?.fileTreeIndicators!==!1,Rr,zr;t[207]!==E.length||t[208]!==O||t[209]!==Lr?(Rr=()=>{if(O||E.length===0)return;let e=it.current?.querySelector(AB)?.shadowRoot;if(!e)return;if(!Lr){FX(e,new Map);return}let t=()=>FX(e,Dd());t();let n=new MutationObserver(t);n.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-item-path`]});let r=wd(t);return()=>{n.disconnect(),r()}},zr=[O,E.length,Lr],t[207]=E.length,t[208]=O,t[209]=Lr,t[210]=Rr,t[211]=zr):(Rr=t[210],zr=t[211]),(0,Q.useEffect)(Rr,zr);let Br,Vr;t[212]!==E.length||t[213]!==O?(Br=()=>{if(O||E.length===0)return;let e=it.current?.querySelector(AB)?.shadowRoot;if(!e)return;let t=()=>WX(e);t();let n=new MutationObserver(t);return n.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-item-path`]}),()=>n.disconnect()},Vr=[O,E.length],t[212]=E.length,t[213]=O,t[214]=Br,t[215]=Vr):(Br=t[214],Vr=t[215]),(0,Q.useEffect)(Br,Vr);let Hr;t[216]===Symbol.for(`react.memo_cache_sentinel`)?(Hr={folderCount:0,expandedCount:0},t[216]=Hr):Hr=t[216];let Ur=(0,Q.useRef)(Hr),Wr=(0,Q.useRef)(Cr),Gr=(0,Q.useRef)(xr),Kr;t[217]===Cr?Kr=t[218]:(Kr=()=>{Wr.current=Cr,Gr.current=xr},t[217]=Cr,t[218]=Kr),(0,Q.useEffect)(Kr);let qr,Jr;t[219]===$t?(qr=t[220],Jr=t[221]):(qr=()=>({startCreating(e,t){Wr.current(e,t)},startCreatingFromTemplate(e){Gr.current(e)},createFromTemplate(e,t){Wr.current(`file`,e,{template:t})},expandAll(){(0,Q.startTransition)(()=>{for(let e of ln.current){let t=fZ($t.getItem(e));t&&t.expand()}})},collapseAll(){let e=new Set(De.current);(0,Q.startTransition)(()=>{for(let t of[...ln.current].reverse()){if(e.has(t))continue;let n=fZ($t.getItem(t));n&&n.collapse()}})},getFolderState(){let e=ln.current,t=0;for(let n of e)fZ($t.getItem(n))?.isExpanded()&&t++;let n=e.length,r=Ur.current;if(r.folderCount===n&&r.expandedCount===t)return r;let i={folderCount:n,expandedCount:t};return Ur.current=i,i},isCreationTargetCleared(){return le.current},clearCreationTarget(){ce(!0)},subscribe(e){de.current.add(e);let t=$t.subscribe(e);return()=>{de.current.delete(e),t()}}}),Jr=[$t],t[219]=$t,t[220]=qr,t[221]=Jr),(0,Q.useImperativeHandle)(n,qr,Jr);async function Yr(e,t,n){let r=kX(e,fe.current,ln.current),i=Oe.current;i&&e.some(e=>AX(e,i))&&(i.kind===`file`?r.docNames.add(i.createdPath):r.folderPaths.add(i.createdPath),zn(i));let a=new Set([...r.docNames,...t]),o=new Set([...r.folderPaths,...n]),s=new Set([...r.assetPaths,...e.filter(DQ).map(EQ)]);await h({tabIdsToClose:[...[...a].map(TQ),...[...o].map(wQ),...[...s].map(CQ)],docNamesToClear:[...a]});for(let t of e){let e=t.kind===`folder`?Vf(t.path):t.kind===`asset`?t.path:Uf(t.path,t.docExt);$t.getItem(e)&&$t.remove(e,t.kind===`folder`?{recursive:!0}:void 0)}D(e=>{let t=tI(e,[...a],void 0,[...s]);for(let e of o)t=tI(t,[],e);return On(t),t}),$l([`files`,`backlinks`,`graph`])}let Xr;t[222]!==i||t[223]!==Yr?(Xr=async function(e){let t=[],n=[],r=[];for(let a of e){let e=a.kind;V(a.path);let o=await m(await fetch(`/api/delete-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e,path:a.path})}),i({id:`7JtSLi`}));if(!o.ok)return r.length>0&&await Yr(r,t,n),X.error(o.title),!1;let s=p(Vi,o.body,`delete-path`,{deletedDocNames:[]});t.push(...s.deletedDocNames),e===`folder`&&n.push(a.path),r.push(a)}return await Yr(r,t,n),!0},t[222]=i,t[223]=Yr,t[224]=Xr):Xr=t[224];let Zr=Xr,Qr;t[225]===Symbol.for(`react.memo_cache_sentinel`)?(Qr=async function(e,t,n){let r=[],i=[];for(let a of e){V(a.path);let e=aI(a,n),o=await t.shell.trashItem(e);o.ok?r.push(a):i.push({kind:a.kind,path:a.path,name:a.name,reason:aZ(o.reason),detail:o.detail})}return{trashed:r,failed:i}},t[225]=Qr):Qr=t[225];let $r=Qr,ei;t[226]===i?ei=t[227]:(ei=async function(e){let t=[],n=[],r=[];for(let a of e){let e=a.kind;try{let o=await m(await fetch(`/api/trash/cleanup`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e,path:a.path})}),i({id:`DVh_Tb`}));if(!o.ok){console.warn(`[FileTree] trash-cleanup failed`,{target:`${a.kind}:${a.path}`,reason:o.title}),r.push({target:a,reason:o.title});continue}let s=p(Di,o.body,`trash-cleanup`,{deletedDocNames:[]});t.push(...s.deletedDocNames),e===`folder`&&n.push(a.path)}catch(e){let t=e;console.warn(`[FileTree] trash-cleanup threw`,{target:`${a.kind}:${a.path}`,err:t}),r.push({target:a,reason:i({id:`r4R7AZ`})})}}if(r.length>0){let e=r.length;X.error(i({id:`IrB5AK`,values:{failedCount:e}}),{description:i({id:`vEJDlt`})})}return r.length===e.length&&e.length>0?null:{deletedDocNames:t,deletedFolderPaths:n}},t[226]=i,t[227]=ei);let ti=ei,ni;t[228]!==i||t[229]!==te||t[230]!==Yr||t[231]!==Zr||t[232]!==ti||t[233]!==_n||t[234]!==ae?(ni=async function(e){let t=e.filter(SQ).map(e=>nI(e,fe.current)),n=t[0];if(!n)return;let r=te.filter(e=>t.some(t=>{if(t.kind===`file`){let n=`${t.path}${t.docExt??`.md`}`;return e.file===n}return t.kind===`folder`?e.file.startsWith(`${t.path}/`):!1}));if(r.length>0){let e=r.slice(0,3).map(xQ),t=r.length>e.length?`, +${r.length-e.length} more`:``;X.error(`Cannot delete files with unresolved conflicts`,{description:`Resolve the conflict on ${e.join(`, `)}${t} before deleting.`});return}V(n.path),U(null);let a=typeof window<`u`?window.okDesktop:void 0;try{if(a&&ae){let{trashed:e,failed:n}=await $r(t,a,ae);if(e.length>0){let t=await ti(e);t?await Yr(e,t.deletedDocNames,t.deletedFolderPaths):await Yr(e,e.filter(bQ).map(yQ),e.filter(vQ).map(_Q))}n.length>0&&ee({failed:n,originalTargets:[...t]}),V(null)}else{let e=await Zr(t);V(null),e||_n()}}catch(e){let t=e,n=t instanceof Error?t.message:String(t);console.warn(`[FileTree] delete failed:`,t),X.error(i({id:`0eHrMb`}),{description:n}),V(null),_n()}},t[228]=i,t[229]=te,t[230]=Yr,t[231]=Zr,t[232]=ti,t[233]=_n,t[234]=ae,t[235]=ni):ni=t[235];let ri=ni,ii;t[236]!==i||t[237]!==Zr||t[238]!==_n||t[239]!==K?(ii=async function(){if(!K)return;let e=new Set(K.failed.map(gQ)),t=K.originalTargets.filter(t=>e.has(`${t.kind}:${t.path}`));if(ee(null),t.length!==0){V(t[0]?.path??null);try{let e=await Zr(t);V(null),e||_n()}catch(e){let t=e,n=t instanceof Error?t.message:String(t);console.warn(`[FileTree] hard-delete fallback failed:`,t),X.error(i({id:`0eHrMb`}),{description:n}),V(null),_n()}}},t[236]=i,t[237]=Zr,t[238]=_n,t[239]=K,t[240]=ii):ii=t[240];let ai=ii,oi;t[241]!==ri||t[242]!==K?(oi=async function(){if(!K)return;let e=new Set(K.failed.map(hQ)),t=K.originalTargets.filter(t=>e.has(`${t.kind}:${t.path}`));ee(null),await ri(t)},t[241]=ri,t[242]=K,t[243]=oi):oi=t[243];let si=oi,ci=(0,Q.useRef)(ri),li;t[244]===ri?li=t[245]:(li=()=>{ci.current=ri},t[244]=ri,t[245]=li),(0,Q.useEffect)(li);let ui,di;t[246]===Symbol.for(`react.memo_cache_sentinel`)?(ui=()=>bZ(e=>{if(e.kind===`doc`||e.kind===`folder-index`){let t=e.docName,n=fe.current.find(e=>Pl(e)&&e.docName===t);ci.current([{kind:`file`,path:t,name:t.split(`/`).pop()??t,docExt:n?.docExt}]);return}if(e.kind===`folder`){ci.current([{kind:`folder`,path:e.folderPath,name:e.folderPath.split(`/`).pop()??e.folderPath}]);return}if(e.kind===`asset`){ci.current([{kind:`asset`,path:e.assetPath,name:e.assetPath.split(`/`).pop()??e.assetPath}]);return}console.warn(JSON.stringify({event:`file-tree-menu-action-delete-unsupported-kind`,kind:e.kind}))}),di=[],t[246]=ui,t[247]=di):(ui=t[246],di=t[247]),(0,Q.useEffect)(ui,di);let fi,pi;t[248]===Symbol.for(`react.memo_cache_sentinel`)?(fi=()=>wZ(e=>{if(e.kind===`doc`||e.kind===`folder-index`){let t=e.docName,n=fe.current.find(e=>Pl(e)&&e.docName===t);Nn.current({kind:`file`,path:t,name:t.split(`/`).pop()??t,docExt:n?.docExt});return}if(e.kind===`folder`){Nn.current({kind:`folder`,path:e.folderPath,name:e.folderPath.split(`/`).pop()??e.folderPath});return}console.warn(JSON.stringify({event:`file-tree-menu-action-duplicate-unsupported-kind`,kind:e.kind}))}),pi=[],t[248]=fi,t[249]=pi):(fi=t[248],pi=t[249]),(0,Q.useEffect)(fi,pi);let mi,hi;t[250]===$t?(mi=t[251],hi=t[252]):(mi=()=>SZ(e=>{if(e.kind===`doc`||e.kind===`folder-index`){let t=e.docName,n=Uf(t,fe.current.find(e=>Pl(e)&&e.docName===t)?.docExt);$t.startRenaming(n);return}if(e.kind===`folder`){$t.startRenaming(e.folderPath);return}if(e.kind===`asset`){$t.startRenaming(e.assetPath);return}console.warn(JSON.stringify({event:`file-tree-menu-action-rename-unsupported-kind`,kind:e.kind}))}),hi=[$t],t[250]=$t,t[251]=mi,t[252]=hi),(0,Q.useEffect)(mi,hi);let gi;t[253]===Symbol.for(`react.memo_cache_sentinel`)?(gi=function(){let e=je.current;e&&KZ(e),je.current=null},t[253]=gi):gi=t[253];let _i=gi,yi;t[254]===Symbol.for(`react.memo_cache_sentinel`)?(yi=function(e){let t=yX(e);if(!t)return!1;let n=it.current?.querySelector(AB)?.shadowRoot;if(!n)return!1;for(let e of n.querySelectorAll(`[data-item-path]`))if(e.dataset.itemPath===t)return!0;return!1},t[254]=yi):yi=t[254];let bi=yi,xi;t[255]===f?xi=t[256]:(xi=function(e){let t=HQ(e.nativeEvent);if(!t||t.endsWith(`/`)){_i();return}let n=fe.current.find(e=>jf(e)===t);if(n&&Bl(n)){_i();return}let r=n&&Pl(n)?n.docName:Jf(t,fe.current);if(n&&Pl(n)&&Ia(n.size)){_i();return}je.current!==r&&(_i(),je.current=r,GZ(r,e=>f(e)))},t[255]=f,t[256]=xi);let Si=xi,Ci;t[257]!==ve||t[258]!==$t||t[259]!==ge?(Ci=function(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=UQ(e.nativeEvent);if(!t){KQ(e.nativeEvent)&&ce(!0);return}let n=t.getAttribute(`aria-selected`)===`true`,r=t.dataset.itemPath;if(!r)return;let i=t.dataset.itemType===`folder`?Vf(r):r;if(t.dataset.itemType===`folder`){let t=Yf(i),r=fZ($t.getItem(i));if(!n){e.preventDefault(),e.stopPropagation(),r&&!r.isExpanded()&&r.expand(),queueMicrotask(()=>ge({kind:`folder`,folderPath:t}));return}if($t.getSelectedPaths().length!==1||window.location.hash===su(t))return;e.preventDefault(),e.stopPropagation(),r&&!r.isExpanded()&&r.expand(),queueMicrotask(()=>ge({kind:`folder`,folderPath:t}));return}if(!n){if(bX(i,on.current)||bi(i)){me.current=i,setTimeout(()=>ge({kind:`doc`,docName:i,registerPage:!0}),0);return}queueMicrotask(()=>ve(i));return}let a=Jf(i,fe.current);$t.getSelectedPaths().length===1&&window.location.hash!==hu(a)&&queueMicrotask(()=>ve(i))},t[257]=ve,t[258]=$t,t[259]=ge,t[260]=Ci):Ci=t[260];let wi=Ci,Ti;t[261]===Symbol.for(`react.memo_cache_sentinel`)?(Ti=function(e){Rf(e.nativeEvent)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`copy`,dt(!0))},t[261]=Ti):Ti=t[261];let Ei=Ti,Oi;t[262]===Symbol.for(`react.memo_cache_sentinel`)?(Oi=function(e){let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||dt(!1)},t[262]=Oi):Oi=t[262];let ki=Oi,Ai;t[263]===yr?Ai=t[264]:(Ai=function(e){if(!Rf(e.nativeEvent))return;let t=Mf(e.nativeEvent);t.length!==0&&(e.preventDefault(),e.stopPropagation(),dt(!1),yr(t,``,eQ))},t[263]=yr,t[264]=Ai);let ji=Ai;if(O){let e;return t[265]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(JQ,{}),t[265]=e):e=t[265],e}let Mi;t[266]!==i||t[267]!==M||t[268]!==P?(Mi=M?i(P?{id:`H-vDm3`}:{id:`09Tv5j`}):null,t[266]=i,t[267]=M,t[268]=P,t[269]=Mi):Mi=t[269];let Ni=Mi;if(E.length===0){if(Ni!==null){let e;return t[270]===Ni?e=t[271]:(e=(0,Z.jsx)(`div`,{className:`flex flex-1 items-center justify-center py-8`,children:(0,Z.jsx)(`span`,{role:`status`,className:`select-none text-sidebar-foreground/50 text-sm`,children:Ni})}),t[270]=Ni,t[271]=e),e}if(A){let e;return t[272]===A?e=t[273]:(e=(0,Z.jsx)(`div`,{className:`flex flex-1 items-center justify-center py-8`,children:(0,Z.jsx)(`span`,{role:`alert`,className:`select-none text-sidebar-foreground/50 text-sm`,children:A})}),t[272]=A,t[273]=e),e}if(Rl({visibility:{showHiddenFiles:Vt,showOnlyMarkdownFiles:Ht},unfilteredRootEntryCount:R,knownPageCount:x.size})===`filtered-to-zero`){let e;return t[274]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(RY,{}),t[274]=e):e=t[274],e}let e;t[275]===i?e=t[276]:(e=i({id:`5ZB7XC`}),t[275]=i,t[276]=e);let n=ut&&`bg-primary/5 ring-2 ring-primary/70 ring-inset`,r;t[277]===n?r=t[278]:(r=J(`flex flex-1 flex-col items-center justify-center gap-3 rounded-md py-8`,n),t[277]=n,t[278]=r);let a;t[279]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(`span`,{className:`select-none text-sidebar-foreground/30 text-sm`,children:(0,Z.jsx)(q,{id:`xiv-dW`})}),t[279]=a):a=t[279];let o;t[280]===Cr?o=t[281]:(o=()=>Cr(`file`,``),t[280]=Cr,t[281]=o);let s;t[282]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(q,{id:`6ibbCg`}),t[282]=s):s=t[282];let c;t[283]===o?c=t[284]:(c=(0,Z.jsx)(Y,{variant:`link`,size:`sm`,className:`font-mono uppercase`,onClick:o,children:s}),t[283]=o,t[284]=c);let l;return t[285]!==ji||t[286]!==e||t[287]!==r||t[288]!==c?(l=(0,Z.jsxs)(`section`,{"aria-label":e,className:r,onDragOver:Ei,onDragLeave:ki,onDrop:ji,children:[a,c]}),t[285]=ji,t[286]=e,t[287]=r,t[288]=c,t[289]=l):l=t[289],l}let Pi=B!==null,Fi=H?.targets[0]??null,Ii=null;if(I!==null){let e;if(t[290]!==a.locale||t[291]!==I){let n=new Intl.NumberFormat(a.locale).format(I);e=yl._({id:`LuoJWu`,values:{truncatedShownCount:I,formattedCount:n}}),t[290]=a.locale,t[291]=I,t[292]=e}else e=t[292];Ii=e}let Li;t[293]!==A||t[294]!==Ni||t[295]!==Ii?(Li=(A||Ni!==null||Ii!==null)&&(0,Z.jsxs)(Z.Fragment,{children:[Ni===null?A&&(0,Z.jsx)(XQ,{kind:`error`,children:A}):(0,Z.jsx)(XQ,{kind:`reconnecting`,children:Ni}),Ii!==null&&(0,Z.jsx)(XQ,{kind:`info`,children:Ii})]}),t[293]=A,t[294]=Ni,t[295]=Ii,t[296]=Li):Li=t[296];let zi;t[297]===v?zi=t[298]:(zi=UY(v),t[297]=v,t[298]=zi);let Bi=se?``:void 0,Hi;t[299]===Bi?Hi=t[300]:(Hi={[rQ]:Bi},t[299]=Bi,t[300]=Hi);let Ui;t[301]!==Pi||t[302]!==xe||t[303]!==Dr||t[304]!==E||t[305]!==Tr||t[306]!==cn||t[307]!==Mn||t[308]!==Fn||t[309]!==Rt||t[310]!==$t||t[311]!==zt||t[312]!==Cr||t[313]!==ae?(Ui=(e,t)=>(0,Z.jsx)(sQ,{item:e,context:t,anyActionBusy:Pi,workspace:ae,handoff:Rt,model:$t,okignoreBinding:zt,onStartCreating:Cr,onCreateFromTemplate:(e,t)=>Cr(`file`,e,{template:t}),onDuplicate:Mn,onImportTemplate:Fn,onDelete:e=>U({targets:e}),onExpandSubtree:Tr,onCollapseSubtree:Dr,folderTreePaths:cn,isAsset:xe.has(e.path),documents:E}),t[301]=Pi,t[302]=xe,t[303]=Dr,t[304]=E,t[305]=Tr,t[306]=cn,t[307]=Mn,t[308]=Fn,t[309]=Rt,t[310]=$t,t[311]=zt,t[312]=Cr,t[313]=ae,t[314]=Ui):Ui=t[314];let Wi;t[315]!==wi||t[316]!==Si||t[317]!==$t||t[318]!==Li||t[319]!==zi||t[320]!==Hi||t[321]!==Ui?(Wi=(0,Z.jsx)(`div`,{ref:it,className:`flex min-h-0 flex-1 flex-col`,children:(0,Z.jsx)(IY,{header:Li,model:$t,style:zi,...Hi,onClickCapture:wi,onMouseMove:Si,onMouseLeave:_i,renderContextMenu:Ui})}),t[315]=wi,t[316]=Si,t[317]=$t,t[318]=Li,t[319]=zi,t[320]=Hi,t[321]=Ui,t[322]=Wi):Wi=t[322];let Gi=!!H,Ki;t[323]===B?Ki=t[324]:(Ki=e=>{!e&&!B&&U(null)},t[323]=B,t[324]=Ki);let qi;t[325]!==i||t[326]!==B||t[327]!==H||t[328]!==ri||t[329]!==Fi?(qi=H&&Fi&&(0,Z.jsx)(is,{...(()=>{let e=tZ(typeof window<`u`&&window.okDesktop!=null?`electron`:`web`,H.targets);if(e)return{customTitle:e.title,customDescription:``,customDetail:e.detail,customConfirmLabel:e.confirmLabel,customConfirmLabelBusy:e.confirmLabelBusy,children:e.listedTargets?(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1 font-mono text-foreground text-xs`,children:e.listedTargets.map(mQ)}):null};let t=H.targets.length,n=Fi.name;return{itemName:t===1?Fi.kind===`folder`?`${Fi.name}/`:Fi.kind===`file`?`${Fi.name}${Fi.docExt??`.md`}`:Fi.name:void 0,customTitle:t>1?i({id:`abiHje`}):void 0,customDescription:t>1?i({id:`WMIKXK`,values:{targetCount:t}}):Fi.kind===`folder`?i({id:`a5W0q0`,values:{folderName:n}}):void 0}})(),isSubmitting:B!==null,onDelete:()=>ri(H.targets)}),t[325]=i,t[326]=B,t[327]=H,t[328]=ri,t[329]=Fi,t[330]=qi):qi=t[330];let Ji;t[331]!==Gi||t[332]!==Ki||t[333]!==qi?(Ji=(0,Z.jsx)(vn,{open:Gi,onOpenChange:Ki,children:qi}),t[331]=Gi,t[332]=Ki,t[333]=qi,t[334]=Ji):Ji=t[334];let Yi=!!W,Xi;t[335]===B?Xi=t[336]:(Xi=e=>{!e&&!B&&G(null)},t[335]=B,t[336]=Xi);let Qi;t[337]!==i||t[338]!==B||t[339]!==In||t[340]!==W?(Qi=W&&(0,Z.jsx)(is,{itemName:W.name+(W.kind===`file`?W.docExt??`.md`:`.md`),customTitle:i({id:`hLod4_`}),customDescription:i({id:`RMQe3p`}),customConfirmLabel:i({id:`hvZwVx`}),customConfirmLabelBusy:i({id:`ul1Atu`}),isSubmitting:B!==null,onDelete:()=>In(W,!0)}),t[337]=i,t[338]=B,t[339]=In,t[340]=W,t[341]=Qi):Qi=t[341];let $i;t[342]!==Yi||t[343]!==Xi||t[344]!==Qi?($i=(0,Z.jsx)(vn,{open:Yi,onOpenChange:Xi,children:Qi}),t[342]=Yi,t[343]=Xi,t[344]=Qi,t[345]=$i):$i=t[345];let ea=!!K,ta;t[346]===B?ta=t[347]:(ta=e=>{!e&&!B&&ee(null)},t[346]=B,t[347]=ta);let na;t[348]!==B||t[349]!==ai||t[350]!==si||t[351]!==K?(na=K&&(0,Z.jsx)(lZ,{failedTargets:K.failed,isSubmitting:B!==null,onDeletePermanently:ai,onRetry:si,onCancel:()=>ee(null)}),t[348]=B,t[349]=ai,t[350]=si,t[351]=K,t[352]=na):na=t[352];let ia;t[353]!==ea||t[354]!==ta||t[355]!==na?(ia=(0,Z.jsx)(vn,{open:ea,onOpenChange:ta,children:na}),t[353]=ea,t[354]=ta,t[355]=na,t[356]=ia):ia=t[356];let aa=ne!==null,oa;t[357]===Symbol.for(`react.memo_cache_sentinel`)?(oa=e=>{e||ie(null)},t[357]=oa):oa=t[357];let sa=ne?.parentDir??``,ca;t[358]!==aa||t[359]!==sa?(ca=(0,Z.jsx)(ev,{open:aa,onOpenChange:oa,kind:`file`,initialDir:sa,defaultToTemplate:!0}),t[358]=aa,t[359]=sa,t[360]=ca):ca=t[360];let la;return t[361]!==Wi||t[362]!==Ji||t[363]!==$i||t[364]!==ia||t[365]!==ca?(la=(0,Z.jsxs)(Z.Fragment,{children:[Wi,Ji,$i,ia,ca]}),t[361]=Wi,t[362]=Ji,t[363]=$i,t[364]=ia,t[365]=ca,t[366]=la):la=t[366],la}function mQ(e){return(0,Z.jsx)(`li`,{"data-testid":`delete-target-row`,children:nZ(e)},`${e.kind}:${e.path}`)}function hQ(e){return`${e.kind}:${e.path}`}function gQ(e){return`${e.kind}:${e.path}`}function _Q(e){return e.path}function vQ(e){return e.kind===`folder`}function yQ(e){return e.path}function bQ(e){return e.kind===`file`}function xQ(e){return e.file}function SQ(e){return!zl(e.path)}function CQ(e){return _(e)}function wQ(e){return S(e)}function TQ(e){return w(e)}function EQ(e){return e.path}function DQ(e){return e.kind===`asset`}function OQ(e){return e.endsWith(`/`)?e.slice(0,-1):e}function kQ(e){return!!e}function AQ(e){console.warn(`[FileTree] /api/workspace fetch failed:`,e)}function jQ(e){console.warn(`[FileTree] unmount cleanup failed:`,e)}function MQ(e){X.error(e)}function NQ(){}function PQ(e){return X.error(e)}function FQ(){}function IQ(){}function LQ(){}function RQ(){}function zQ(){}async function BQ(){}function VQ(e){return jf(e)}function HQ(e){return UQ(e)?.dataset.itemPath??null}function UQ(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.dataset.itemPath)return t;return null}function WQ(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.matches(`[data-file-tree-virtualized-root]`))return t;return null}function GQ(e){let t=UQ(e);if(t){let e=t.dataset.itemPath;if(!e)return null;let n=t.dataset.itemType===`folder`,r=Nf(e,n);return{parentDir:r,row:t,root:null,busyPath:n?Vf(r):e}}return KQ(e)?{parentDir:``,row:null,root:WQ(e),busyPath:eQ}:null}function KQ(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.matches(`[data-file-tree-virtualized-scroll]`))return!0;return!1}var qQ=[`w-3/4`,`w-2/3`,`w-4/5`,`w-1/2`,`w-3/5`,`w-2/3`];function JQ(){let e=(0,$.c)(5),{_:t}=ht(),n;e[0]===t?n=e[1]:(n=t({id:`5Tk8Fb`}),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=qQ.map(YQ),e[2]=r):r=e[2];let i;return e[3]===n?i=e[4]:(i=(0,Z.jsx)(`div`,{className:`flex flex-1 flex-col gap-1 px-2 py-2`,role:`status`,"aria-busy":`true`,"aria-label":n,children:r}),e[3]=n,e[4]=i),i}function YQ(e,t){return(0,Z.jsxs)(`div`,{className:`flex h-6 items-center gap-2`,children:[(0,Z.jsx)(Bd,{className:`h-3 w-3 shrink-0 rounded-sm`}),(0,Z.jsx)(Bd,{className:`h-3 ${e}`})]},t)}function XQ(e){let t=(0,$.c)(14),{kind:n,children:r}=e,i=n===`error`?sl:n===`reconnecting`?Qc:Kc,a=n===`error`?`alert`:`status`,o=n===`error`?`text-destructive`:`text-muted-foreground`,s;t[0]===o?s=t[1]:(s=J(`mx-2 mb-1 flex items-start gap-1.5 rounded-md bg-muted/50 px-2 py-1.5 text-xs leading-snug`,o),t[0]=o,t[1]=s);let c=n===`reconnecting`&&`animate-spin motion-reduce:animate-none`,l;t[2]===c?l=t[3]:(l=J(`mt-0.5 size-3.5 shrink-0`,c),t[2]=c,t[3]=l);let u;t[4]!==i||t[5]!==l?(u=(0,Z.jsx)(i,{"aria-hidden":`true`,className:l}),t[4]=i,t[5]=l,t[6]=u):u=t[6];let d;t[7]===r?d=t[8]:(d=(0,Z.jsx)(`span`,{className:`min-w-0`,children:r}),t[7]=r,t[8]=d);let f;return t[9]!==a||t[10]!==s||t[11]!==u||t[12]!==d?(f=(0,Z.jsxs)(`span`,{role:a,className:s,children:[u,d]}),t[9]=a,t[10]=s,t[11]=u,t[12]=d,t[13]=f):f=t[13],f}function ZQ(e){return e?yl._({id:`wTcjov`}):null}function QQ(e){let t=(0,$.c)(46),{_:n}=ht(),r=Xs(),i=Xo(),a=Wr(),o=Yr();if(r)return null;let{input:s,installStates:c,dispatch:l}=e,u=s===null,d,f,p,m,h,g,_,v,y,b,x;if(t[0]!==n||t[1]!==l||t[2]!==s||t[3]!==u||t[4]!==c||t[5]!==o||t[6]!==a||t[7]!==i){let e=ZQ(u),r;t[19]===o?r=t[20]:(r=e=>ti(o,e.id),t[19]=o,t[20]=r);let S=Xr.filter(r),C;t[21]===o?C=t[22]:(C=e=>Zr(o,e.source,e.id,!0,e.supported),t[21]=o,t[22]=C);let w=a.filter(C),T=i?co.filter(e=>$r(o,e,i.installedClis)):[];p=S.length>0,m=i!==null&&T.length>0,h=w.length>0,f=Zv,t[23]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsxs)(ey,{children:[(0,Z.jsx)(qs,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`O7_W_a`})]}),t[23]=x):x=t[23],d=ty,g=`max-h-80`,_=h?(0,Z.jsxs)(Xv,{"aria-label":n({id:`vPKX2i`}),children:[(0,Z.jsxs)(ry,{className:`flex items-center gap-1.5`,children:[(0,Z.jsx)(q,{id:`RXEbZy`}),(0,Z.jsx)(ei,{})]}),w.map(t=>{let r=t.name;return(0,Z.jsxs)($v,{onSelect:()=>{s!==null&&ds(s,{agent:{source:t.source,id:t.id}})},disabled:u,"data-testid":`empty-space-open-in-thread-${t.id}`,"aria-label":e?n({id:`gtGQ9S`,values:{agentName:r,hint:e}}):void 0,children:[(0,Z.jsx)(yo,{agentId:t.id,iconUrl:t.iconUrl,className:`size-4`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`5PrrYw`,values:{agentName:r}})}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},`${t.source}:${t.id}`)})]}):null,t[24]!==p||t[25]!==m||t[26]!==h?(v=h&&(m||p)?(0,Z.jsx)(iy,{}):null,t[24]=p,t[25]=m,t[26]=h,t[27]=v):v=t[27],y=m?(0,Z.jsxs)(Xv,{"aria-label":n({id:`ALhMYW`}),children:[(0,Z.jsx)(ry,{children:(0,Z.jsx)(q,{id:`ALhMYW`})}),T.map(t=>{let{displayName:r}=Yi[t];return(0,Z.jsxs)($v,{onSelect:()=>{s!==null&&i.launchInTerminal(s,t)},disabled:u,"data-testid":`empty-space-open-in-terminal-${t}`,"aria-label":n(e?{id:`AIn2Yv`,values:{displayName:r,hint:e}}:{id:`QYfQdv`,values:{displayName:r}}),children:[(0,Z.jsx)(Qr,{id:Kr(t),"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:r}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,b=p?(0,Z.jsxs)(Z.Fragment,{children:[m?(0,Z.jsx)(iy,{}):null,(0,Z.jsxs)(Xv,{"aria-label":n({id:`BBqGS9`}),children:[(0,Z.jsx)(ry,{children:(0,Z.jsx)(q,{id:`BBqGS9`})}),S.map(t=>{let r=!u,{displayName:i}=t,a=n(e?{id:`1ZpfyB`,values:{displayName:i,hint:e}}:{id:`WqLq6M`,values:{displayName:i}});return(0,Z.jsxs)($v,{disabled:!r,onSelect:()=>{if(s){if(c[t.id]?.installed!==!0){ls(t);return}l(t.id,s)}},"data-testid":`empty-space-open-in-${t.id}`,"aria-label":a,children:[(0,Z.jsx)(Qr,{id:t.id,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=n,t[1]=l,t[2]=s,t[3]=u,t[4]=c,t[5]=o,t[6]=a,t[7]=i,t[8]=d,t[9]=f,t[10]=p,t[11]=m,t[12]=h,t[13]=g,t[14]=_,t[15]=v,t[16]=y,t[17]=b,t[18]=x}else d=t[8],f=t[9],p=t[10],m=t[11],h=t[12],g=t[13],_=t[14],v=t[15],y=t[16],b=t[17],x=t[18];let S;t[28]!==p||t[29]!==m||t[30]!==h?(S=h||m||p?(0,Z.jsx)(iy,{}):null,t[28]=p,t[29]=m,t[30]=h,t[31]=S):S=t[31];let C;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(al,{"aria-hidden":`true`}),t[32]=C):C=t[32];let w;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsxs)($v,{onSelect:Sl,"data-testid":`empty-space-open-in-settings`,children:[C,(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`jRAGrQ`})})]}),t[33]=w):w=t[33];let T;t[34]!==d||t[35]!==g||t[36]!==_||t[37]!==v||t[38]!==y||t[39]!==b||t[40]!==S?(T=(0,Z.jsxs)(d,{className:g,children:[_,v,y,b,S,w]}),t[34]=d,t[35]=g,t[36]=_,t[37]=v,t[38]=y,t[39]=b,t[40]=S,t[41]=T):T=t[41];let E;return t[42]!==f||t[43]!==x||t[44]!==T?(E=(0,Z.jsxs)(f,{children:[x,T]}),t[42]=f,t[43]=x,t[44]=T,t[45]=E):E=t[45],E}async function $Q(e){try{let t=await e.project.listRecent(),n=e.config.projectPath;if(t.some(e=>e.path!==n))return null;let r=await IE();return e.config.freshlyCreated?r:r===0?0:null}catch(e){return console.warn(`[onboarding-card-visible] fresh-project probe failed; suppressing card`,e),null}}function e$(e){let t=(0,$.c)(4),n=e===void 0?ME:e,{initialized:r,dismissed:i,completed:a}=(0,Q.useSyncExternalStore)(n.subscribe,n.getSnapshot,n.getSnapshot),o=i||a,s=!r&&!o,c,l;return t[0]!==s||t[1]!==n?(c=()=>{if(!s)return;let e=window.okDesktop;if(e==null)return;let t=!1;return $Q(e).then(e=>{!t&&e!==null&&n.activate(e)}),()=>{t=!0}},l=[s,n],t[0]=s,t[1]=n,t[2]=c,t[3]=l):(c=t[2],l=t[3]),(0,Q.useEffect)(c,l),r&&!o}function t$(e){let t=(0,$.c)(3),n=e===void 0?ME:e,r,i;t[0]===n?(r=t[1],i=t[2]):(r=()=>{if(n.getSnapshot().steps.file)return;let e=Jl(e=>{e.includes(`files`)&&LE(n)});return LE(n),e},i=[n],t[0]=n,t[1]=r,t[2]=i),(0,Q.useEffect)(r,i)}var n$=3,r$=5200,i$=1500,a$=220;function o$(e){let t=(0,$.c)(14),{complete:n,label:r,shortcutId:i}=e,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(Yn,{checked:n,disabled:!0,"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none opacity-100 disabled:opacity-100`}),t[0]=n,t[1]=a);let o=n?`flex-1 text-muted-foreground/60`:`flex-1`,s;t[2]===n?s=t[3]:(s=n?(0,Z.jsxs)(`span`,{className:`sr-only`,children:[(0,Z.jsx)(q,{id:`Qj4RL5`}),` `]}):null,t[2]=n,t[3]=s);let c;t[4]!==r||t[5]!==o||t[6]!==s?(c=(0,Z.jsxs)(`span`,{className:o,children:[s,r]}),t[4]=r,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;t[8]===i?l=t[9]:(l=i?(0,Z.jsx)(H,{children:Ol(i)}):null,t[8]=i,t[9]=l);let u;return t[10]!==a||t[11]!==c||t[12]!==l?(u=(0,Z.jsxs)(`li`,{className:`flex items-center gap-2 py-0.5 text-sm`,children:[a,c,l]}),t[10]=a,t[11]=c,t[12]=l,t[13]=u):u=t[13],u}function s$(e){let t=(0,$.c)(24),{store:n,lingerMs:r}=e,i=n===void 0?ME:n,a=r===void 0?r$:r,{_:o}=ht(),{steps:s}=NE(i);t$(i);let[c,l]=(0,Q.useState)(0),[u,d]=(0,Q.useState)(!1),f=1+ +!!s.file+ +!!s.askedAi,p=f===n$,m,h;t[0]!==p||t[1]!==a?(m=()=>{if(!p)return;l(l$);let e=setInterval(()=>l(c$),i$),t=setTimeout(()=>{clearInterval(e),d(!0)},a);return()=>{clearInterval(e),clearTimeout(t)}},h=[p,a],t[0]=p,t[1]=a,t[2]=m,t[3]=h):(m=t[2],h=t[3]),(0,Q.useEffect)(m,h);let g,_;t[4]!==u||t[5]!==i?(g=()=>{if(!u)return;let e=setTimeout(()=>i.markCompleted(),a$);return()=>clearTimeout(e)},_=[u,i],t[4]=u,t[5]=i,t[6]=g,t[7]=_):(g=t[6],_=t[7]),(0,Q.useEffect)(g,_);let v;t[8]!==o||t[9]!==p?(v=p?o({id:`7jIIFX`}):``,t[8]=o,t[9]=p,t[10]=v):v=t[10];let y;t[11]===v?y=t[12]:(y=(0,Z.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,children:v}),t[11]=v,t[12]=y);let b;t[13]!==p||t[14]!==c||t[15]!==f||t[16]!==u||t[17]!==s.askedAi||t[18]!==s.file||t[19]!==i?(b=p?(0,Z.jsxs)(`section`,{"aria-hidden":!0,className:J(`mx-2 mb-1 flex items-center gap-3 rounded-lg border bg-card px-4 py-3 text-card-foreground`,`motion-reduce:animate-none motion-reduce:duration-0`,u?`animate-out fade-out-0 zoom-out-95 fill-mode-forwards duration-200`:`animate-in fade-in-0 zoom-in-95 duration-300`),children:[(0,Z.jsx)(Xp,{size:36,celebrateSignal:c}),(0,Z.jsx)(`span`,{className:`font-medium text-sm`,children:(0,Z.jsx)(q,{id:`7jIIFX`})})]}):(0,Z.jsxs)(`section`,{"aria-labelledby":`onboarding-card-heading`,className:`mx-2 mb-1 rounded-lg border bg-card px-4 py-3 text-card-foreground`,children:[(0,Z.jsxs)(`header`,{className:`mb-3 flex items-center justify-between`,children:[(0,Z.jsx)(`h2`,{id:`onboarding-card-heading`,className:`font-medium text-sm`,children:(0,Z.jsx)(q,{id:`Y1QMlM`})}),(0,Z.jsx)(`span`,{className:`text-muted-foreground/60 text-xs tabular-nums`,children:`${f} / ${n$}`})]}),(0,Z.jsxs)(`ul`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(o$,{complete:!0,label:(0,Z.jsx)(q,{id:`4E9jPa`})}),(0,Z.jsx)(o$,{complete:s.file,label:(0,Z.jsx)(q,{id:`6ibbCg`}),shortcutId:`new-item`}),(0,Z.jsx)(o$,{complete:s.askedAi,label:(0,Z.jsx)(q,{id:`xWEvuo`}),shortcutId:`open-ask-ai`})]}),(0,Z.jsx)(`footer`,{className:`-mb-1 mt-2 flex justify-end`,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`sm`,className:`h-auto px-2 py-1 text-muted-foreground text-xs`,onClick:()=>i.dismiss(),children:(0,Z.jsx)(q,{id:`1QfxQT`})})})]}),t[13]=p,t[14]=c,t[15]=f,t[16]=u,t[17]=s.askedAi,t[18]=s.file,t[19]=i,t[20]=b):b=t[20];let x;return t[21]!==y||t[22]!==b?(x=(0,Z.jsxs)(Z.Fragment,{children:[y,b]}),t[21]=y,t[22]=b,t[23]=x):x=t[23],x}function c$(e){return e+1}function l$(e){return e+1}function u$(){let e=(0,$.c)(1);if(!e$())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(s$,{}),e[0]=t):t=e[0],t}function d$(e){return e===null?null:e.kind===`local`?e.name:e.ref}function f$(e,t){if(e.length===0)return null;let n=`origin/${e}`;return t.includes(n)?n:t.find(t=>$a(t)===e)??null}function p$(e){switch(e){case`branch-exists`:return{id:`wzq9Rv`};case`already-checked-out`:return{id:`ljHjfg`};case`path-exists`:return{id:`mYzDD_`};case`invalid-branch`:return{id:`r-OJYm`};case`no-git`:return{id:`CFnavk`};case`helper-not-found`:return{id:`HqOPpj`};default:return{id:`-zA2E7`}}}function m$(e){let t=(0,$.c)(71),{open:n,onOpenChange:r,bridge:i,currentBranch:a,branches:o,existingWorktreeBranches:s,remoteBranches:c,behindByBranch:l,initialBranchName:u}=e,d=o===void 0?[]:o,f=c===void 0?[]:c,p=u===void 0?``:u,{_:m}=ht(),h=(0,Q.useId)(),g=(0,Q.useId)(),_=(0,Q.useId)(),v=(0,Q.useId)(),y=(0,Q.useId)(),b=(0,Q.useId)(),[x,S]=(0,Q.useState)(``),C;t[0]===a?C=t[1]:(C=a===null?null:{kind:`local`,name:a},t[0]=a,t[1]=C);let[w,T]=(0,Q.useState)(C),[E,D]=(0,Q.useState)(!1),[O,k]=(0,Q.useState)(``),[A,j]=(0,Q.useState)(!1),[M,N]=(0,Q.useState)(null),P=(0,Q.useRef)(null),F=(0,Q.useRef)(null),I,L;t[2]!==a||t[3]!==p||t[4]!==n?(I=()=>{if(!n)return;S(p),T(a===null?null:{kind:`local`,name:a}),D(!1),k(``),j(!1),N(null);let e=requestAnimationFrame(()=>P.current?.focus());return()=>cancelAnimationFrame(e)},L=[n,a,p],t[2]=a,t[3]=p,t[4]=n,t[5]=I,t[6]=L):(I=t[5],L=t[6]),(0,Q.useEffect)(I,L);let R=x.trim(),z=!A&&R.length>0,B=R.length>0&&d.includes(R),V=B?null:f$(R,f),H=V!==null,U=B||H,W=B&&(s?.has(R)??!1),G=d.filter(e=>e.toLowerCase().startsWith(R.toLowerCase())),K=!A&&G.length>0&&!U,ee=(a!==null&&!d.includes(a)?[a,...d]:d).map(y$),te=f.map(v$),ne=d$(w),re=O.trim().toLowerCase(),ie=re===``?ee:ee.filter(e=>e.name.toLowerCase().includes(re)),ae=re===``?te:te.filter(e=>e.ref.toLowerCase().includes(re)),oe=re!==``&&ie.length===0&&ae.length===0,se=async function(e){if(e.preventDefault(),z){j(!0),N(null);try{let e=H?{branch:R,createBranch:!0,remoteRef:V}:B?{branch:R,createBranch:!1}:{branch:R,createBranch:!0,baseBranch:w?.kind===`local`?w.name:void 0,baseRef:w?.kind===`remote`?w.ref:void 0},t=await i.worktree.create(e);if(!t.ok){N(p$(t.reason)),j(!1);return}td(),r(!1),await i.project.open({path:t.path,target:`new-window`,entryPoint:`worktree`})}catch(e){console.warn(`[NewWorktreeDialog] worktree create/open failed:`,e),X.error(m({id:`vAYoCZ`})),j(!1)}}},ce=vn,le;t[7]!==A||t[8]!==r?(le=e=>{A||r(e)},t[7]=A,t[8]=r,t[9]=le):le=t[9];let ue=mn,de;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,Z.jsx)(pn,{children:(0,Z.jsx)(q,{id:`DXd9LM`})}),t[10]=de):de=t[10];let fe;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,Z.jsxs)(_n,{children:[de,(0,Z.jsx)(fn,{children:(0,Z.jsx)(q,{id:`NEzPEh`})})]}),t[11]=fe):fe=t[11];let pe=hn,me;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,Z.jsx)(q,{id:`ng2Ibo`}),t[12]=me):me=t[12];let he;t[13]===g?he=t[14]:(he=(0,Z.jsx)(Fr,{htmlFor:g,children:me}),t[13]=g,t[14]=he);let ge;t[15]===m?ge=t[16]:(ge=m({id:`IX_uXB`}),t[15]=m,t[16]=ge);let _e;t[17]===M?_e=t[18]:(_e=e=>{S(e.target.value),M!==null&&N(null)},t[17]=M,t[18]=_e);let ve=M!==null,ye=M===null?y:`${y} ${b}`,be;t[19]!==x||t[20]!==A||t[21]!==g||t[22]!==ge||t[23]!==_e||t[24]!==ve||t[25]!==ye?(be=(0,Z.jsx)(vl,{id:g,ref:P,value:x,placeholder:ge,onChange:_e,disabled:A,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-invalid":ve,"aria-describedby":ye,"data-testid":`new-worktree-branch`}),t[19]=x,t[20]=A,t[21]=g,t[22]=ge,t[23]=_e,t[24]=ve,t[25]=ye,t[26]=be):be=t[26];let xe=R.length>0?(0,Z.jsxs)(`p`,{id:y,className:`flex items-start gap-1.5 text-1sm text-muted-foreground`,"data-testid":W?`new-worktree-mode-existing-worktree`:H?`new-worktree-mode-remote-checkout`:B?`new-worktree-mode-checkout`:`new-worktree-mode-create`,children:[W?(0,Z.jsx)(dc,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-amber-600 dark:text-amber-400`}):H?(0,Z.jsx)(ys,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-violet-600 dark:text-violet-400`}):B?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-blue-600 dark:text-blue-400`}):(0,Z.jsx)(Ut,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-green-600 dark:text-green-400`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1`,children:W?(0,Z.jsx)(q,{id:`QAi7Q9`,values:{trimmed:R},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`})}}):H?(0,Z.jsx)(q,{id:`oAGN8p`,values:{remoteCheckoutRef:V,trimmed:R},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),1:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),2:(0,Z.jsx)(`code`,{className:`font-mono`})}}):B?(0,Z.jsx)(q,{id:`b4VvP-`,values:{trimmed:R},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),1:(0,Z.jsx)(`code`,{className:`font-mono`})}}):ne===null?(0,Z.jsx)(q,{id:`t4sFKC`,values:{trimmed:R},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),1:(0,Z.jsx)(`code`,{className:`font-mono`})}}):(0,Z.jsx)(q,{id:`dGAdpH`,values:{trimmed:R,currentBaseLabel:ne},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),1:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),2:(0,Z.jsx)(`code`,{className:`font-mono`})}})})]}):null,Se=K?(0,Z.jsx)(`div`,{className:`max-h-40 overflow-y-auto rounded-md border bg-popover p-1 shadow-xs`,"data-testid":`new-worktree-branch-list`,children:G.map(e=>(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,size:`sm`,tabIndex:-1,onClick:()=>{S(e),M!==null&&N(null),P.current?.focus()},"data-testid":`new-worktree-branch-option-${e}`,className:`h-8 w-full justify-start gap-2 font-normal`,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:e})]},e))}):null,Ce=U?null:(0,Z.jsxs)(`div`,{className:`mt-1 flex flex-col gap-2`,children:[(0,Z.jsx)(Fr,{id:v,htmlFor:_,children:(0,Z.jsx)(q,{id:`ZWwYwM`})}),(0,Z.jsxs)(Bt,{open:E,onOpenChange:e=>{D(e),e||k(``)},children:[(0,Z.jsx)(Vt,{asChild:!0,children:(0,Z.jsxs)(Y,{id:_,type:`button`,variant:`outline`,role:`combobox`,"aria-expanded":E,"aria-haspopup":`listbox`,"aria-labelledby":`${v} ${_}`,"aria-label":m({id:`ZWwYwM`}),disabled:A,"data-testid":`new-worktree-base-trigger`,className:`w-full justify-between font-normal`,children:[(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[w?.kind===`remote`?(0,Z.jsx)(ys,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}):(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`min-w-0 truncate text-left`,children:ne===null?(0,Z.jsx)(q,{id:`EbjWsS`}):ne})]}),(0,Z.jsx)(yh,{"aria-hidden":`true`,className:`ml-2 size-4 shrink-0 opacity-50`})]})}),(0,Z.jsxs)(Kt,{align:`start`,className:`w-[var(--radix-popover-trigger-width)] p-1`,onWheel:_$,onTouchMove:g$,onOpenAutoFocus:e=>{e.preventDefault(),F.current?.focus()},children:[(0,Z.jsxs)(Lc,{className:`mb-1 h-8`,children:[(0,Z.jsx)(kc,{ref:F,"aria-label":m({id:`fuJZKk`}),placeholder:m({id:`hQXiDc`}),value:O,onChange:e=>k(e.target.value),onKeyDown:h$,"data-testid":`new-worktree-base-search`}),(0,Z.jsx)(Pc,{children:(0,Z.jsx)(Ke,{"aria-hidden":`true`})})]}),(0,Z.jsxs)(`div`,{role:`listbox`,"aria-label":m({id:`ZWwYwM`}),className:`max-h-56 overflow-y-auto`,"data-testid":`new-worktree-base-list`,children:[oe?(0,Z.jsx)(`p`,{className:`px-2 py-1.5 text-1sm text-muted-foreground`,children:(0,Z.jsx)(q,{id:`Sh3Qkg`})}):null,ie.map(e=>{let t=e.name,n=l?.get(t);return(0,Z.jsxs)(Y,{type:`button`,role:`option`,"aria-selected":w?.kind===`local`&&w.name===t,variant:`ghost`,size:`sm`,onClick:()=>{T(e),D(!1),k(``)},"data-testid":`new-worktree-base-option-${t}`,className:`h-8 w-full justify-start gap-2 font-normal`,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:t}),n!==void 0&&n>0?(0,Z.jsx)(`span`,{className:`shrink-0 text-xs text-amber-600 dark:text-amber-400`,"data-testid":`new-worktree-base-behind-${t}`,children:(0,Z.jsx)(q,{id:`6-wLTJ`,values:{behind:n}})}):null]},`local:${t}`)}),ae.map(e=>{let t=e.ref;return(0,Z.jsxs)(Y,{type:`button`,role:`option`,"aria-selected":w?.kind===`remote`&&w.ref===t,variant:`ghost`,size:`sm`,onClick:()=>{T(e),D(!1),k(``)},"data-testid":`new-worktree-base-option-${t}`,className:`h-8 w-full justify-start gap-2 font-normal`,children:[(0,Z.jsx)(ys,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:t}),(0,Z.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:(0,Z.jsx)(q,{id:`dIYSqk`})})]},`remote:${t}`)})]})]})]})]}),we;t[27]!==m||t[28]!==M||t[29]!==b?(we=M===null?null:(0,Z.jsx)(`p`,{id:b,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`new-worktree-error`,children:m(M)}),t[27]=m,t[28]=M,t[29]=b,t[30]=we):we=t[30];let Te;t[31]!==h||t[32]!==se||t[33]!==he||t[34]!==be||t[35]!==xe||t[36]!==Se||t[37]!==Ce||t[38]!==we?(Te=(0,Z.jsxs)(`form`,{id:h,onSubmit:se,className:`flex flex-col gap-2`,children:[he,be,xe,Se,Ce,we]}),t[31]=h,t[32]=se,t[33]=he,t[34]=be,t[35]=xe,t[36]=Se,t[37]=Ce,t[38]=we,t[39]=Te):Te=t[39];let Ee;t[40]!==pe||t[41]!==Te?(Ee=(0,Z.jsx)(pe,{children:Te}),t[40]=pe,t[41]=Te,t[42]=Ee):Ee=t[42];let De;t[43]===r?De=t[44]:(De=()=>r(!1),t[43]=r,t[44]=De);let Oe;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,Z.jsx)(q,{id:`dEgA5A`}),t[45]=Oe):Oe=t[45];let ke;t[46]!==A||t[47]!==De?(ke=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,onClick:De,disabled:A,"data-testid":`new-worktree-cancel`,children:Oe}),t[46]=A,t[47]=De,t[48]=ke):ke=t[48];let Ae=!z,je;t[49]!==A||t[50]!==W||t[51]!==B||t[52]!==H?(je=A?(0,Z.jsx)(q,{id:`b4itZn`}):W?(0,Z.jsx)(q,{id:`XV5sC0`}):H?(0,Z.jsx)(q,{id:`XAyxsa`}):B?(0,Z.jsx)(q,{id:`uGaIIS`}):(0,Z.jsx)(q,{id:`iO8V-7`}),t[49]=A,t[50]=W,t[51]=B,t[52]=H,t[53]=je):je=t[53];let Me;t[54]!==h||t[55]!==Ae||t[56]!==je?(Me=(0,Z.jsx)(Y,{type:`submit`,form:h,disabled:Ae,"data-testid":`new-worktree-create`,children:je}),t[54]=h,t[55]=Ae,t[56]=je,t[57]=Me):Me=t[57];let Ne;t[58]!==ke||t[59]!==Me?(Ne=(0,Z.jsxs)(gn,{children:[ke,Me]}),t[58]=ke,t[59]=Me,t[60]=Ne):Ne=t[60];let Pe;t[61]!==ue||t[62]!==fe||t[63]!==Ee||t[64]!==Ne?(Pe=(0,Z.jsxs)(ue,{className:`sm:max-w-md`,"data-testid":`new-worktree-dialog`,children:[fe,Ee,Ne]}),t[61]=ue,t[62]=fe,t[63]=Ee,t[64]=Ne,t[65]=Pe):Pe=t[65];let Fe;return t[66]!==ce||t[67]!==n||t[68]!==Pe||t[69]!==le?(Fe=(0,Z.jsx)(ce,{open:n,onOpenChange:le,children:Pe}),t[66]=ce,t[67]=n,t[68]=Pe,t[69]=le,t[70]=Fe):Fe=t[70],Fe}function h$(e){return e.stopPropagation()}function g$(e){e.stopPropagation()}function _$(e){e.stopPropagation()}function v$(e){return{kind:`remote`,ref:e}}function y$(e){return{kind:`local`,name:e}}function b$(e){let t=(0,$.c)(54),{bridge:n,recents:r,currentPath:i,query:a,worktreeModel:o,closeMenu:s,guardStaleSelect:c,onRemoveRecent:l,flyoutPath:u,setFlyoutPath:d,openNewWorktreeWith:f}=e,{_:p}=ht(),m;t[0]!==p||t[1]!==n.project||t[2]!==s?(m=function(e,t){s(),n.project.open({path:e,target:`new-window`,entryPoint:t}).catch(e=>{console.warn(`[RecentProjectsMenu] project.open failed:`,e),X.error(p({id:`6HCOwA`}))})},t[0]=p,t[1]=n.project,t[2]=s,t[3]=m):m=t[3];let h=m,g;t[4]!==p||t[5]!==n.project||t[6]!==n.worktree?(g=async function(e){try{let t=await n.worktree.create({branch:e,createBranch:!1});if(!t.ok){X.error(p({id:`teD0H9`}));return}td(),await n.project.open({path:t.path,target:`new-window`,entryPoint:`worktree`})}catch(e){console.warn(`[RecentProjectsMenu] create/open branch failed:`,e),X.error(p({id:`LwMxXg`}))}},t[4]=p,t[5]=n.project,t[6]=n.worktree,t[7]=g):g=t[7];let _=g,v;t[8]!==s||t[9]!==i||t[10]!==h?(v=function(e){if(e.path===i){s();return}h(e.path,e.isLinkedWorktree?`worktree`:`recents`)},t[8]=s,t[9]=i,t[10]=h,t[11]=v):v=t[11];let y=v,b;t[12]!==s||t[13]!==_||t[14]!==i||t[15]!==h?(b=function(e){if(e.path!==null){if(e.path===i){s();return}h(e.path,e.isMain?`recents`:`worktree`);return}e.branch!==null&&(s(),_(e.branch))},t[12]=s,t[13]=_,t[14]=i,t[15]=h,t[16]=b):b=t[16];let x=b;if(a!==``){let e;t[17]!==s||t[18]!==_?(e=e=>{s(),_(e)},t[17]=s,t[18]=_,t[19]=e):e=t[19];let n;return t[20]!==i||t[21]!==c||t[22]!==y||t[23]!==l||t[24]!==a||t[25]!==r||t[26]!==e||t[27]!==o?(n=(0,Z.jsx)(T$,{recents:r,currentPath:i,query:a,worktreeModel:o,onPickEntry:y,onPickBranch:e,guardStaleSelect:c,onRemoveRecent:l}),t[20]=i,t[21]=c,t[22]=y,t[23]=l,t[24]=a,t[25]=r,t[26]=e,t[27]=o,t[28]=n):n=t[28],n}let S;if(t[29]!==s||t[30]!==i||t[31]!==u||t[32]!==c||t[33]!==x||t[34]!==l||t[35]!==f||t[36]!==h||t[37]!==r||t[38]!==d||t[39]!==o){let e=qv(r),n;t[41]!==s||t[42]!==i||t[43]!==u||t[44]!==c||t[45]!==x||t[46]!==l||t[47]!==f||t[48]!==h||t[49]!==d||t[50]!==o?(n=e=>(0,Z.jsx)(x$,{group:e,currentPath:i,worktreeModel:o,flyoutOpen:u===e.project.path,setFlyoutOpen:t=>d(n=>t?e.project.path:n===e.project.path?null:n),onPickProject:()=>{if(e.project.path===i){s();return}h(e.project.path,`recents`)},onPickFlyoutEntry:x,guardStaleSelect:c,onRemoveRecent:l,openNewWorktreeWith:f},e.project.path),t[41]=s,t[42]=i,t[43]=u,t[44]=c,t[45]=x,t[46]=l,t[47]=f,t[48]=h,t[49]=d,t[50]=o,t[51]=n):n=t[51],S=e.map(n),t[29]=s,t[30]=i,t[31]=u,t[32]=c,t[33]=x,t[34]=l,t[35]=f,t[36]=h,t[37]=r,t[38]=d,t[39]=o,t[40]=S}else S=t[40];let C;return t[52]===S?C=t[53]:(C=(0,Z.jsx)(Z.Fragment,{children:S}),t[52]=S,t[53]=C),C}function x$(e){let t=(0,$.c)(45),{group:n,currentPath:r,worktreeModel:i,flyoutOpen:a,setFlyoutOpen:o,onPickProject:s,onPickFlyoutEntry:c,guardStaleSelect:l,onRemoveRecent:u,openNewWorktreeWith:d}=e,f=n.project.path===r,p,m;t[0]!==r||t[1]!==n||t[2]!==i?(p=Wv(n,i,r),m=p.filter(S$),t[0]=r,t[1]=n,t[2]=i,t[3]=p,t[4]=m):(p=t[3],m=t[4]);let h=m.length;if(h===0){let e;t[5]!==l||t[6]!==s?(e=e=>{l(e)||s()},t[5]=l,t[6]=s,t[7]=e):e=t[7];let r=`project-switcher-recent-${n.project.path}`,i=f?`true`:void 0,a;t[8]!==n.project.name||t[9]!==n.project.path||t[10]!==f?(a=(0,Z.jsx)(O$,{name:n.project.name,path:n.project.path,current:f}),t[8]=n.project.name,t[9]=n.project.path,t[10]=f,t[11]=a):a=t[11];let o;t[12]!==e||t[13]!==r||t[14]!==i||t[15]!==a?(o=(0,Z.jsx)(Cr,{onSelect:e,className:`flex w-full min-w-0 flex-col items-start gap-0.5 pr-8`,"data-testid":r,"data-current":i,children:a}),t[12]=e,t[13]=r,t[14]=i,t[15]=a,t[16]=o):o=t[16];let c;t[17]!==n.project.name||t[18]!==n.project.path||t[19]!==u?(c=(0,Z.jsx)(ay,{path:n.project.path,name:n.project.name,onRemoveRecent:u,testIdPrefix:`project-switcher-recent`}),t[17]=n.project.name,t[18]=n.project.path,t[19]=u,t[20]=c):c=t[20];let d;t[21]!==o||t[22]!==c?(d=(0,Z.jsxs)(`div`,{className:`group/recent relative flex items-center`,children:[o,c]}),t[21]=o,t[22]=c,t[23]=d):d=t[23];let p;return t[24]!==n.project.path||t[25]!==u||t[26]!==d?(p=(0,Z.jsx)(oy,{path:n.project.path,onRemoveRecent:u,testIdPrefix:`project-switcher-recent`,children:d}),t[24]=n.project.path,t[25]=u,t[26]=d,t[27]=p):p=t[27],p}let g;t[28]!==r||t[29]!==n.worktrees||t[30]!==f?(g=f||n.worktrees.some(e=>e.path===r),t[28]=r,t[29]=n.worktrees,t[30]=f,t[31]=g):g=t[31];let _=g,v;return t[32]!==_||t[33]!==r||t[34]!==p||t[35]!==a||t[36]!==n||t[37]!==l||t[38]!==c||t[39]!==s||t[40]!==d||t[41]!==h||t[42]!==o||t[43]!==i?(v=(0,Z.jsx)(C$,{group:n,currentPath:r,containsCurrent:_,worktreeModel:i,flyoutEntries:p,openedWorktreeCount:h,flyoutOpen:a,setFlyoutOpen:o,onPickProject:s,onPickFlyoutEntry:c,guardStaleSelect:l,openNewWorktreeWith:d}),t[32]=_,t[33]=r,t[34]=p,t[35]=a,t[36]=n,t[37]=l,t[38]=c,t[39]=s,t[40]=d,t[41]=h,t[42]=o,t[43]=i,t[44]=v):v=t[44],v}function S$(e){return e.opened&&!e.isMain}function C$(e){let t=(0,$.c)(46),{group:n,currentPath:r,containsCurrent:i,worktreeModel:a,flyoutEntries:o,openedWorktreeCount:s,flyoutOpen:c,setFlyoutOpen:l,onPickProject:u,onPickFlyoutEntry:d,guardStaleSelect:f,openNewWorktreeWith:p}=e,{_:m}=ht(),h=n.project.path===r,g;t[0]!==f||t[1]!==u?(g=e=>{f(e)||u()},t[0]=f,t[1]=u,t[2]=g):g=t[2];let _=g,v,y;t[3]===_?(v=t[4],y=t[5]):(v=e=>{e.target.closest(`[data-project-open]`)!==null&&(e.preventDefault(),_(e.nativeEvent))},y=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),_(e.nativeEvent))},t[3]=_,t[4]=v,t[5]=y);let b=`project-switcher-group-${n.project.path}`,x=c?`true`:void 0,S=i?`true`:void 0,C;t[6]===n.project.name?C=t[7]:(C=(0,Z.jsx)(`span`,{className:`truncate font-medium text-sm`,"data-project-open":``,title:n.project.name,children:n.project.name}),t[6]=n.project.name,t[7]=C);let w;t[8]===n.project.path?w=t[9]:(w=(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,title:n.project.path,children:n.project.path}),t[8]=n.project.path,t[9]=w);let T;t[10]!==C||t[11]!==w?(T=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[C,w]}),t[10]=C,t[11]=w,t[12]=T):T=t[12];let E;t[13]!==m||t[14]!==h?(E=h?(0,Z.jsx)(Fo,{"aria-label":m({id:`Hp1l6f`}),className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}):null,t[13]=m,t[14]=h,t[15]=E):E=t[15];let D=`project-switcher-toggle-${n.project.path}`,O;t[16]===s?O=t[17]:(O=(0,Z.jsx)(`span`,{className:`tabular-nums`,children:s}),t[16]=s,t[17]=O);let k;t[18]===s?k=t[19]:(k=(0,Z.jsx)(q,{id:`AKxFtn`,values:{openedWorktreeCount:s}}),t[18]=s,t[19]=k);let A;t[20]!==D||t[21]!==O||t[22]!==k?(A=(0,Z.jsxs)(`span`,{className:`mt-0.5 shrink-0 text-muted-foreground text-xs`,"data-testid":D,children:[O,` `,k]}),t[20]=D,t[21]=O,t[22]=k,t[23]=A):A=t[23];let j;t[24]!==E||t[25]!==A||t[26]!==v||t[27]!==y||t[28]!==b||t[29]!==x||t[30]!==S||t[31]!==T?(j=(0,Z.jsxs)(Ar,{onClick:v,onKeyDown:y,className:`flex w-full min-w-0 items-start gap-2`,"data-testid":b,"data-flyout-open":x,"data-current":S,children:[T,E,A]}),t[24]=E,t[25]=A,t[26]=v,t[27]=y,t[28]=b,t[29]=x,t[30]=S,t[31]=T,t[32]=j):j=t[32];let M;t[33]!==o||t[34]!==c||t[35]!==n||t[36]!==f||t[37]!==d||t[38]!==p||t[39]!==a?(M=(0,Z.jsx)(w$,{group:n,open:c,worktreeModel:a,entries:o,onPickFlyoutEntry:d,guardStaleSelect:f,openNewWorktreeWith:p}),t[33]=o,t[34]=c,t[35]=n,t[36]=f,t[37]=d,t[38]=p,t[39]=a,t[40]=M):M=t[40];let N;return t[41]!==c||t[42]!==l||t[43]!==j||t[44]!==M?(N=(0,Z.jsxs)(wr,{open:c,onOpenChange:l,children:[j,M]}),t[41]=c,t[42]=l,t[43]=j,t[44]=M,t[45]=N):N=t[45],N}function w$(e){let t=(0,$.c)(15),{group:n,open:r,worktreeModel:i,entries:a,onPickFlyoutEntry:o,guardStaleSelect:s,openNewWorktreeWith:c}=e,{_:l}=ht(),[u,d]=(0,Q.useState)(``),f=(0,Q.useRef)(null),p=(0,Q.useRef)(null),m,h;t[0]===r?(m=t[1],h=t[2]):(m=()=>{r&&f.current?.focus({preventScroll:!0})},h=[r],t[0]=r,t[1]=m,t[2]=h),(0,Q.useEffect)(m,h);let g=function(){let e=p.current;return e===null?[]:[...e.querySelectorAll(`[role="menuitem"]`)]},_=function(e){g()[e]?.focus()},v=function(e,t){if(e.key===`ArrowDown`){e.preventDefault(),e.stopPropagation();let t=g(),n=t.indexOf(e.currentTarget);_(Math.min(n+1,t.length-1))}else if(e.key===`ArrowUp`){e.preventDefault(),e.stopPropagation();let t=g().indexOf(e.currentTarget);t<=0?f.current?.focus():_(t-1)}else e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),t())},y;if(t[3]!==a||t[4]!==u){let e=u.trim().toLowerCase();y=e===``?a:a.filter(t=>(t.branch??``).toLowerCase().includes(e)),t[3]=a,t[4]=u,t[5]=y}else y=t[5];let b=y,x=i!==null&&i.mainRoot===n.project.mainRoot,S=u.trim(),C=x&&S.length>0,w;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsx)(Pc,{align:`inline-start`,children:(0,Z.jsx)(Ke,{"aria-hidden":`true`})}),t[6]=w):w=t[6];let T;t[7]===l?T=t[8]:(T=l({id:`bSD4im`}),t[7]=l,t[8]=T);let E;t[9]===l?E=t[10]:(E=l({id:`Skr_7L`}),t[9]=l,t[10]=E);let D;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>d(e.target.value),t[11]=D):D=t[11];let O=b.length===0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(kr,{className:`font-normal text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,children:l({id:`-uaQnI`})}),C?(0,Z.jsxs)(Cr,{onSelect:e=>{s(e)||c(S)},onKeyDown:e=>v(e,()=>c(S)),className:`flex items-center gap-2`,"data-testid":`project-switcher-flyout-create`,children:[(0,Z.jsx)(Ut,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,title:S,children:(0,Z.jsx)(q,{id:`gHSAWT`,values:{typedName:S},components:{0:(0,Z.jsx)(`span`,{className:`font-medium`}),1:(0,Z.jsx)(`span`,{className:`font-mono`})}})})]}):null]}):b.map(e=>{let t=e.path??`branch:${e.branch}`,n=e.branch??l({id:`D12vtS`});return(0,Z.jsxs)(Cr,{onSelect:t=>{s(t)||o(e)},onKeyDown:t=>v(t,()=>o(e)),className:`flex items-center gap-2`,"data-testid":`project-switcher-flyout-entry-${t}`,"data-current":e.isCurrent?`true`:void 0,children:[(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,title:n,children:n}),e.isMain?(0,Z.jsx)(`span`,{className:`shrink-0 text-muted-foreground text-xs`,children:l({id:`Bn9-El`})}):e.opened?null:(0,Z.jsx)(`span`,{className:`shrink-0 text-muted-foreground text-xs`,title:l({id:`Dvwa0U`}),children:l({id:`nfoduq`})}),e.isCurrent?(0,Z.jsx)(k$,{}):null]},t)}),k;return t[12]!==p||t[13]!==O?(k=(0,Z.jsx)(`div`,{ref:p,className:`min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain subtle-scrollbar`,children:O}),t[12]=p,t[13]=O,t[14]=k):k=t[14],(0,Z.jsx)(Mr,{children:(0,Z.jsxs)(Tr,{avoidCollisions:!1,sideOffset:-8,className:`flex max-h-80 w-96 flex-col gap-1 overflow-hidden p-1`,"data-testid":`project-switcher-flyout-${n.project.path}`,children:[(0,Z.jsxs)(Lc,{className:`mb-1 h-8 shrink-0`,children:[w,(0,Z.jsx)(kc,{ref:f,"aria-label":T,placeholder:E,value:u,onChange:D,onKeyDown:e=>{e.key===`ArrowDown`&&(e.preventDefault(),_(0)),e.stopPropagation()},"data-testid":`project-switcher-flyout-search-${n.project.path}`})]}),k]})})}function T$(e){let t=(0,$.c)(43),{recents:n,currentPath:r,query:i,worktreeModel:a,onPickEntry:o,onPickBranch:s,guardStaleSelect:c,onRemoveRecent:l}=e,{_:u}=ht(),d;t[0]===i?d=t[1]:(d=e=>e.toLowerCase().includes(i),t[0]=i,t[1]=d);let f=d,p,m,h,g;if(t[2]!==u||t[3]!==r||t[4]!==c||t[5]!==f||t[6]!==s||t[7]!==o||t[8]!==l||t[9]!==n||t[10]!==a){g=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[15]===f?e=t[16]:(e=e=>!e.isLinkedWorktree&&(f(e.name)||f(e.path)),t[15]=f,t[16]=e);let i=n.filter(e),d;t[17]===f?d=t[18]:(d=e=>e.isLinkedWorktree===!0&&(f(e.branch??``)||f(e.path)),t[17]=f,t[18]=d);let _=n.filter(d),v=new Set(_.map(E$)),y;t[19]===a?.entries?y=t[20]:(y=a?.entries??[],t[19]=a?.entries,t[20]=y);let b=y.filter(e=>e.branch!==null&&f(e.branch)&&(e.worktreePath===null||!v.has(e.worktreePath))&&e.worktreePath!==r);if(i.length===0&&_.length===0&&b.length===0){let e;t[21]===u?e=t[22]:(e=u({id:`pEQFsW`}),t[21]=u,t[22]=e);let n;t[23]===e?n=t[24]:(n=(0,Z.jsx)(kr,{className:`font-normal text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,children:e}),t[23]=e,t[24]=n),g=n;break bb0}let x;t[25]!==r||t[26]!==c||t[27]!==o||t[28]!==l?(x=e=>(0,Z.jsx)(oy,{path:e.path,onRemoveRecent:l,testIdPrefix:`project-switcher-recent`,children:(0,Z.jsxs)(`div`,{className:`group/recent relative flex items-center`,children:[(0,Z.jsx)(Cr,{onSelect:t=>{c(t)||o(e)},className:`flex w-full min-w-0 flex-col items-start gap-0.5 pr-8`,"data-testid":`project-switcher-recent-${e.path}`,children:(0,Z.jsx)(O$,{name:e.name,path:e.path,current:e.path===r})}),(0,Z.jsx)(ay,{path:e.path,name:e.name,onRemoveRecent:l,testIdPrefix:`project-switcher-recent`})]})},e.path),t[25]=r,t[26]=c,t[27]=o,t[28]=l,t[29]=x):x=t[29],p=i.map(x);let S;t[30]!==r||t[31]!==c||t[32]!==o?(S=e=>(0,Z.jsxs)(Cr,{onSelect:t=>{c(t)||o(e)},className:`flex items-start gap-2`,"data-testid":`project-switcher-worktree-${e.path}`,"data-current":e.path===r?`true`:void 0,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0`}),(0,Z.jsx)(D$,{branch:e.branch??e.name,project:e.mainRoot===void 0?null:Kv(e.mainRoot)})]},e.path),t[30]=r,t[31]=c,t[32]=o,t[33]=S):S=t[33],m=_.map(S);let C;t[34]!==u||t[35]!==c||t[36]!==s||t[37]!==a?(C=e=>(0,Z.jsxs)(Cr,{onSelect:t=>{c(t)||e.branch!==null&&s(e.branch)},className:`flex items-start gap-2`,"data-testid":`project-switcher-branch-${e.branch}`,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 opacity-40`}),(0,Z.jsx)(D$,{branch:e.branch??``,project:a===null?null:Kv(a.mainRoot),hint:u({id:`nfoduq`})})]},`branch:${e.branch}`),t[34]=u,t[35]=c,t[36]=s,t[37]=a,t[38]=C):C=t[38],h=b.map(C)}t[2]=u,t[3]=r,t[4]=c,t[5]=f,t[6]=s,t[7]=o,t[8]=l,t[9]=n,t[10]=a,t[11]=p,t[12]=m,t[13]=h,t[14]=g}else p=t[11],m=t[12],h=t[13],g=t[14];if(g!==Symbol.for(`react.early_return_sentinel`))return g;let _;return t[39]!==p||t[40]!==m||t[41]!==h?(_=(0,Z.jsxs)(Z.Fragment,{children:[p,m,h]}),t[39]=p,t[40]=m,t[41]=h,t[42]=_):_=t[42],_}function E$(e){return e.path}function D$(e){let t=(0,$.c)(12),{branch:n,project:r,hint:i}=e,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:n}),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=i===void 0?null:(0,Z.jsx)(`span`,{className:`shrink-0 text-muted-foreground text-xs`,children:i}),t[2]=i,t[3]=o);let s;t[4]!==a||t[5]!==o?(s=(0,Z.jsxs)(`span`,{className:`flex w-full min-w-0 items-center gap-1.5`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6];let c;t[7]===r?c=t[8]:(c=r===null?null:(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,title:r,children:r}),t[7]=r,t[8]=c);let l;return t[9]!==s||t[10]!==c?(l=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[s,c]}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function O$(e){let t=(0,$.c)(15),{name:n,path:r,current:i}=e,a=i&&`font-medium`,o;t[0]===a?o=t[1]:(o=J(`flex w-full items-center gap-1.5`,a),t[0]=a,t[1]=o);let s;t[2]===n?s=t[3]:(s=(0,Z.jsx)(`span`,{className:`truncate font-medium text-sm`,title:n,children:n}),t[2]=n,t[3]=s);let c;t[4]===i?c=t[5]:(c=i?(0,Z.jsx)(Fo,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}):null,t[4]=i,t[5]=c);let l;t[6]!==o||t[7]!==s||t[8]!==c?(l=(0,Z.jsxs)(`span`,{className:o,children:[s,c]}),t[6]=o,t[7]=s,t[8]=c,t[9]=l):l=t[9];let u;t[10]===r?u=t[11]:(u=(0,Z.jsx)(`span`,{className:`w-full truncate text-muted-foreground text-xs`,title:r,children:r}),t[10]=r,t[11]=u);let d;return t[12]!==l||t[13]!==u?(d=(0,Z.jsxs)(`span`,{className:`flex w-full min-w-0 flex-col gap-0.5`,children:[l,u]}),t[12]=l,t[13]=u,t[14]=d):d=t[14],d}function k$(){let e=(0,$.c)(4),{_:t}=ht(),n;e[0]===t?n=e[1]:(n=t({id:`Hp1l6f`}),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,Z.jsx)(Fo,{"aria-label":n,className:`size-3.5 shrink-0 text-muted-foreground`}),e[2]=n,e[3]=r),r}var A$=(e,t,n)=>Rv(e,t,n,`ProjectSwitcher`),j$=350;function M$(e){let t=(0,$.c)(121),{bridge:n}=e,{_:r}=ht(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(``),[u,d]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(!1),[m,h]=(0,Q.useState)(``),[g,_]=(0,Q.useState)(null),v=yP(),y=Fv(),b=typeof window<`u`&&window.okDesktop!=null,x=(0,Q.useRef)(!1),S=(0,Q.useRef)(!1),C=(0,Q.useRef)(null),w;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{e&&(S.current=!0,C.current!==null&&clearTimeout(C.current),C.current=setTimeout(()=>{S.current=!1},j$)),s(e),e||(l(``),_(null))},t[0]=w):w=t[0];let T=w,E;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>!b||!S.current?!1:(e.preventDefault(),!0),t[1]=E):E=t[1];let D=E,O;t[2]!==r||t[3]!==n.project||t[4]!==o?(O=()=>{if(!o)return;let e=!1;return A$(async()=>{let t=await n.project.listRecent();e||a(t)},r({id:`fYKgzG`})),()=>{e=!0}},t[2]=r,t[3]=n.project,t[4]=o,t[5]=O):O=t[5];let k;t[6]!==r||t[7]!==n||t[8]!==o?(k=[o,n,r],t[6]=r,t[7]=n,t[8]=o,t[9]=k):k=t[9],(0,Q.useEffect)(O,k);let A,j;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>Ht(e=>{e===`new-worktree`?(s(!1),_(null),h(``),p(!0)):e===`switch-worktree`&&s(!0)}),j=[],t[10]=A,t[11]=j):(A=t[10],j=t[11]),(0,Q.useEffect)(A,j);let M;t[12]!==r||t[13]!==n.dialog||t[14]!==n.project?(M=()=>{T(!1),A$(async()=>{let e=await n.dialog.openFolder();e&&await n.project.open({path:e,target:`new-window`,entryPoint:`pick-existing`})},r({id:`gmJ0An`}))},t[12]=r,t[13]=n.dialog,t[14]=n.project,t[15]=M):M=t[15];let N=M,P;t[16]!==r||t[17]!==n.project?(P=()=>{T(!1),A$(()=>n.project.openFile(),r({id:`8vCZcs`}))},t[16]=r,t[17]=n.project,t[18]=P):P=t[18];let F=P,I;t[19]!==r||t[20]!==n.navigator?(I=()=>{T(!1),A$(()=>n.navigator.open(),r({id:`jol95m`}))},t[19]=r,t[20]=n.navigator,t[21]=I):I=t[21];let L=I,R;t[22]!==r||t[23]!==n.project?(R=e=>A$(async()=>{await n.project.removeRecent(e),a(t=>t===null?t:t.filter(t=>t.path!==e))},r({id:`viwC-K`})),t[22]=r,t[23]=n.project,t[24]=R):R=t[24];let z=R,B;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(B=()=>{T(!1),d(!0)},t[25]=B):B=t[25];let V=B,H;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>{T(!1),h(e),p(!0)},t[26]=H):H=t[26];let U=H,W=n.config.projectPath,G;t[27]===c?G=t[28]:(G=c.trim().toLowerCase(),t[27]=c,t[28]=G);let K=G,ee=K!==``,te;t[29]===i?te=t[30]:(te=i??[],t[29]=i,t[30]=te);let ne=te,re;t[31]!==ee||t[32]!==ne?(re=ee?ne.filter(B$):ne,t[31]=ee,t[32]=ne,t[33]=re):re=t[33];let ie=re,ae=ee?null:y,oe=v!==null&&`h-auto py-1.5`,se;t[34]===oe?se=t[35]:(se=J(`justify-between text-sidebar-foreground/70 hover:text-sidebar-foreground! data-open:hover:text-sidebar-foreground!`,oe),t[34]=oe,t[35]=se);let ce;t[36]===r?ce=t[37]:(ce=r({id:`zZ_I5K`}),t[36]=r,t[37]=ce);let le;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(le=b?()=>{x.current=!0}:void 0,t[38]=le):le=t[38];let ue;t[39]===o?ue=t[40]:(ue=b?()=>{if(x.current){x.current=!1;return}T(!o)}:void 0,t[39]=o,t[40]=ue);let de;t[41]===n.config.projectName?de=t[42]:(de=(0,Z.jsx)(`span`,{className:`truncate`,children:n.config.projectName}),t[41]=n.config.projectName,t[42]=de);let fe;t[43]===v?fe=t[44]:(fe=v===null?null:(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-xs text-sidebar-foreground/50 group-hover/menu-button:text-sidebar-foreground`,"data-testid":`project-switcher-branch`,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`size-3! shrink-0`}),(0,Z.jsx)(`span`,{className:`truncate`,children:v})]}),t[43]=v,t[44]=fe);let pe;t[45]!==de||t[46]!==fe?(pe=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[de,fe]}),t[45]=de,t[46]=fe,t[47]=pe):pe=t[47];let me;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,Z.jsx)(yh,{"aria-hidden":`true`,className:`opacity-60`}),t[48]=me):me=t[48];let he;t[49]!==n.config.projectPath||t[50]!==se||t[51]!==ce||t[52]!==ue||t[53]!==pe?(he=(0,Z.jsx)(Dr,{asChild:!0,children:(0,Z.jsxs)(lP,{className:se,"data-testid":`project-switcher-trigger`,"aria-label":ce,title:n.config.projectPath,onPointerDown:le,onClick:ue,children:[pe,me]})}),t[49]=n.config.projectPath,t[50]=se,t[51]=ce,t[52]=ue,t[53]=pe,t[54]=he):he=t[54];let ge;t[55]!==r||t[56]!==n||t[57]!==W||t[58]!==g||t[59]!==ie||t[60]!==ae||t[61]!==z||t[62]!==K||t[63]!==i||t[64]!==c?(ge=i===null?null:i.length===0?(0,Z.jsx)(kr,{className:`font-normal text-muted-foreground text-xs`,children:(0,Z.jsx)(q,{id:`MUrVEo`})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Lc,{className:`mb-1 h-8 border-0 shadow-none has-[[data-slot=input-group-control]:focus-visible]:ring-0`,children:[(0,Z.jsx)(kc,{"aria-label":r({id:`blFttG`}),placeholder:r({id:`RVZJWQ`}),value:c,onChange:e=>{e.target.value!==``&&_(null),l(e.target.value)},onKeyDown:z$,"data-testid":`project-switcher-search`}),(0,Z.jsx)(Pc,{children:(0,Z.jsx)(Ke,{"aria-hidden":`true`})})]}),(0,Z.jsx)(Pr,{}),(0,Z.jsx)(`div`,{className:`max-h-64 overflow-x-hidden overflow-y-auto overscroll-contain subtle-scrollbar scroll-fade-mask`,"data-testid":`project-switcher-scroll`,onScroll:()=>{g!==null&&_(null)},children:(0,Z.jsx)(b$,{bridge:n,recents:ie,currentPath:W,query:K,worktreeModel:ae,closeMenu:()=>T(!1),guardStaleSelect:D,onRemoveRecent:z,flyoutPath:g,setFlyoutPath:_,openNewWorktreeWith:U})})]}),t[55]=r,t[56]=n,t[57]=W,t[58]=g,t[59]=ie,t[60]=ae,t[61]=z,t[62]=K,t[63]=i,t[64]=c,t[65]=ge):ge=t[65];let _e;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,Z.jsx)(Pr,{}),t[66]=_e):_e=t[66];let ve;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(ve=e=>{D(e)||V()},t[67]=ve):ve=t[67];let ye;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,Z.jsxs)(Cr,{onSelect:ve,"data-testid":`project-switcher-new-project`,children:[(0,Z.jsx)(Ut,{"aria-hidden":`true`,className:`text-muted-foreground`}),(0,Z.jsx)(q,{id:`gKi-a_`})]}),t[68]=ye):ye=t[68];let be;t[69]===L?be=t[70]:(be=e=>{D(e)||L()},t[69]=L,t[70]=be);let xe,Se;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,Z.jsx)($e,{"aria-hidden":`true`,className:`text-muted-foreground`}),Se=(0,Z.jsx)(q,{id:`xaDWAI`}),t[71]=xe,t[72]=Se):(xe=t[71],Se=t[72]);let Ce;t[73]===be?Ce=t[74]:(Ce=(0,Z.jsxs)(Cr,{onSelect:be,"data-testid":`project-switcher-switch-project`,children:[xe,Se]}),t[73]=be,t[74]=Ce);let we;t[75]===N?we=t[76]:(we=e=>{D(e)||N()},t[75]=N,t[76]=we);let Te,Ee;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,Z.jsx)(dc,{"aria-hidden":`true`,className:`text-muted-foreground`}),Ee=(0,Z.jsx)(q,{id:`PVUn_c`}),t[77]=Te,t[78]=Ee):(Te=t[77],Ee=t[78]);let De;t[79]===we?De=t[80]:(De=(0,Z.jsxs)(Cr,{onSelect:we,"data-testid":`project-switcher-open-folder`,children:[Te,Ee]}),t[79]=we,t[80]=De);let Oe;t[81]===F?Oe=t[82]:(Oe=e=>{D(e)||F()},t[81]=F,t[82]=Oe);let ke,Ae;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,Z.jsx)(Wn,{"aria-hidden":`true`,className:`text-muted-foreground`}),Ae=(0,Z.jsx)(q,{id:`9npOH9`}),t[83]=ke,t[84]=Ae):(ke=t[83],Ae=t[84]);let je;t[85]===Oe?je=t[86]:(je=(0,Z.jsxs)(Cr,{onSelect:Oe,"data-testid":`project-switcher-open-file`,children:[ke,Ae]}),t[85]=Oe,t[86]=je);let Me;t[87]===v?Me=t[88]:(Me=v===null?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Pr,{}),(0,Z.jsxs)(Cr,{onSelect:e=>{D(e)||(T(!1),h(``),p(!0))},"data-testid":`project-switcher-new-worktree`,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`text-muted-foreground`}),(0,Z.jsx)(q,{id:`DXd9LM`})]})]}),t[87]=v,t[88]=Me);let Ne;t[89]!==ge||t[90]!==Ce||t[91]!==De||t[92]!==je||t[93]!==Me?(Ne=(0,Z.jsxs)(jr,{align:`start`,side:`top`,className:`min-w-[260px]`,"data-testid":`project-switcher-menu`,children:[ge,_e,ye,Ce,De,je,Me]}),t[89]=ge,t[90]=Ce,t[91]=De,t[92]=je,t[93]=Me,t[94]=Ne):Ne=t[94];let Pe;t[95]!==o||t[96]!==he||t[97]!==Ne?(Pe=(0,Z.jsxs)(Nr,{open:o,onOpenChange:T,modal:!1,children:[he,Ne]}),t[95]=o,t[96]=he,t[97]=Ne,t[98]=Pe):Pe=t[98];let Fe;t[99]!==n||t[100]!==u?(Fe=(0,Z.jsx)(Ig,{open:u,onOpenChange:d,bridge:n}),t[99]=n,t[100]=u,t[101]=Fe):Fe=t[101];let Ie;t[102]===y?.entries?Ie=t[103]:(Ie=y?.entries.map(R$).filter(L$),t[102]=y?.entries,t[103]=Ie);let Le;t[104]===y?.entries?Le=t[105]:(Le=new Set(y?.entries.filter(I$).map(F$)),t[104]=y?.entries,t[105]=Le);let Re=y?.remoteBranches,ze;t[106]===y?.entries?ze=t[107]:(ze=new Map(y?.entries.filter(P$).map(N$)),t[106]=y?.entries,t[107]=ze);let Be;t[108]!==v||t[109]!==n||t[110]!==m||t[111]!==f||t[112]!==Ie||t[113]!==Le||t[114]!==Re||t[115]!==ze?(Be=(0,Z.jsx)(m$,{open:f,onOpenChange:p,bridge:n,currentBranch:v,initialBranchName:m,branches:Ie,existingWorktreeBranches:Le,remoteBranches:Re,behindByBranch:ze}),t[108]=v,t[109]=n,t[110]=m,t[111]=f,t[112]=Ie,t[113]=Le,t[114]=Re,t[115]=ze,t[116]=Be):Be=t[116];let Ve;return t[117]!==Pe||t[118]!==Fe||t[119]!==Be?(Ve=(0,Z.jsxs)(Z.Fragment,{children:[Pe,Fe,Be]}),t[117]=Pe,t[118]=Fe,t[119]=Be,t[120]=Ve):Ve=t[120],Ve}function N$(e){return[e.branch,e.behind]}function P$(e){return e.branch!==null&&e.behind!==void 0}function F$(e){return e.branch}function I$(e){return e.branch!==null&&e.worktreePath!==null}function L$(e){return e!==null}function R$(e){return e.branch}function z$(e){return e.stopPropagation()}function B$(e){return!e.isLinkedWorktree}function V$(e,t){let n=e instanceof Error?e:Error(String(e));console.warn(JSON.stringify({event:`jsx-render-failure`,component:`sidebarSearchPill`,rawComponentName:`sidebarSearchPill`,error:String(n),stack:t.componentStack})),Aa(`sidebarSearchPill`)}function H$(e){let t=(0,$.c)(8),{onClick:n,className:r}=e,i;t[0]===r?i=t[1]:(i=J(`rounded-lg h-9 w-full justify-start gap-2 px-3 font-normal text-muted-foreground`,r),t[0]=r,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(Ke,{"aria-hidden":`true`}),t[2]=a):a=t[2];let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(`span`,{className:`flex-1 text-left text-sm`,children:(0,Z.jsx)(q,{id:`A1taO8`})}),t[3]=o):o=t[3];let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(H,{className:`text-foreground/70`,children:Ol(`command-palette`)}),t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==i?(c=(0,Z.jsxs)(Y,{variant:`outline`,onClick:n,"data-telemetry-event":`ok.sidebar.search_pill.click`,className:i,children:[a,o,s]}),t[5]=n,t[6]=i,t[7]=c):c=t[7],c}function U$(){let e=(0,$.c)(36),{_:t}=ht(),n=es(),{activeDocName:r}=Re(),[i,a]=(0,Q.useState)(!1),o=os(),s;e[0]!==n.data||e[1]!==n.status?(s=n.status===`ready`?n.data:[],e[0]=n.data,e[1]=n.status,e[2]=s):s=e[2];let c=s,l;e[3]===c?l=e[4]:(l=Ys(c),e[3]=c,e[4]=l);let u=l,d=Zs(),f;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(f={},e[5]=f):f=e[5];let[p,m]=(0,Q.useState)(f),h;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(rP,{asChild:!0,children:(0,Z.jsxs)(un,{className:`flex w-full items-center gap-1.5`,children:[(0,Z.jsx)(Rh,{className:`size-3.5 shrink-0`}),(0,Z.jsx)(q,{id:`PCSkw2`}),(0,Z.jsx)(Ro,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-[state=open]/skills:rotate-90`})]})}),e[6]=h):h=e[6];let g;e[7]===t?g=e[8]:(g=t({id:`MdpSC1`}),e[7]=t,e[8]=g);let _,v;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>a(!0),v=(0,Z.jsx)(Ut,{}),e[9]=_,e[10]=v):(_=e[9],v=e[10]);let y;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(q,{id:`MdpSC1`})}),e[11]=y):y=e[11];let b;e[12]===g?b=e[13]:(b=(0,Z.jsxs)(iP,{title:g,onClick:_,children:[v,y]}),e[12]=g,e[13]=b);let x;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)($$,{}),e[14]=x):x=e[14];let S;e[15]===c?S=e[16]:(S=c.some(G$),e[15]=c,e[16]=S);let C;e[17]===S?C=e[18]:(C=(0,Z.jsx)(Z$,{hasProjectSkills:S}),e[17]=S,e[18]=C);let w;e[19]!==o||e[20]!==r||e[21]!==u||e[22]!==p||e[23]!==d||e[24]!==c?(w=c.length===0?(0,Z.jsx)(`p`,{className:`px-2 py-1 text-xs text-muted-foreground`,children:(0,Z.jsx)(q,{id:`PdJZ5p`})}):Ks.filter(e=>c.some(t=>t.scope===e)).map(e=>(0,Z.jsxs)(dn,{className:`group/scope`,open:c.some(t=>t.scope===e&&qi(t.scope,t.name)===r)||(p[e]??!1),onOpenChange:t=>m(n=>({...n,[e]:t})),children:[(0,Z.jsxs)(un,{className:`flex w-full items-center gap-1 px-2 pt-1 pb-0.5 text-[11px] text-muted-foreground/70 hover:text-muted-foreground`,children:[(0,Z.jsx)(Ro,{className:`size-3 shrink-0 transition-transform group-data-[state=open]/scope:rotate-90`}),(0,Z.jsx)(`span`,{className:`truncate`,children:d[e]})]}),(0,Z.jsx)(ln,{children:(0,Z.jsx)(oP,{className:`pl-2`,children:c.filter(t=>t.scope===e).map(e=>(0,Z.jsx)(K$,{skill:e,activeDocName:r,actions:o,existingNames:u[e.scope]},`${e.scope}::${e.name}`))})})]},e)),e[19]=o,e[20]=r,e[21]=u,e[22]=p,e[23]=d,e[24]=c,e[25]=w):w=e[25];let T;e[26]!==C||e[27]!==w?(T=(0,Z.jsx)(ln,{children:(0,Z.jsxs)(aP,{children:[x,C,w]})}),e[26]=C,e[27]=w,e[28]=T):T=e[28];let E;e[29]===i?E=e[30]:(E=(0,Z.jsx)(Fs,{defaultScope:`project`,open:i,onOpenChange:a,onCreated:W$}),e[29]=i,e[30]=E);let D;return e[31]!==o.dialogs||e[32]!==T||e[33]!==E||e[34]!==b?(D=(0,Z.jsx)(dn,{className:`group/skills shrink-0`,children:(0,Z.jsxs)(nP,{className:`px-0`,children:[h,b,T,o.dialogs,E]})}),e[31]=o.dialogs,e[32]=T,e[33]=E,e[34]=b,e[35]=D):D=e[35],D}function W$(e){let{scope:t,name:n}=e;return mc(qi(t,n))}function G$(e){return e.scope===`project`&&!e.managed}function K$(e){let t=(0,$.c)(52),{skill:n,activeDocName:r,actions:i,existingNames:a}=e,{_:o}=ht(),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(!1),d;t[0]!==n.name||t[1]!==n.scope?(d=qi(n.scope,n.name),t[0]=n.name,t[1]=n.scope,t[2]=d):d=t[2];let f=r===d,p,m,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>{e.preventDefault(),u(!0)},m=(0,Z.jsx)(Ro,{className:`size-3 shrink-0 text-muted-foreground transition-transform group-data-[state=open]/skill:rotate-90`}),h=(0,Z.jsx)(Rh,{className:`size-3 shrink-0 text-muted-foreground`}),t[3]=p,t[4]=m,t[5]=h):(p=t[3],m=t[4],h=t[5]);let g=n.name,_;t[6]===n.name?_=t[7]:(_=Ws(n.name),t[6]=n.name,t[7]=_);let v;t[8]!==n.name||t[9]!==_?(v=(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:g,children:_}),t[8]=n.name,t[9]=_,t[10]=v):v=t[10];let y;t[11]!==o||t[12]!==n.bundledVersion||t[13]!==n.updateAvailable?(y=n.updateAvailable?(0,Z.jsx)(`span`,{title:o({id:`1YJ4Yg`,values:{0:n.bundledVersion?` (${n.bundledVersion})`:``}}),className:`flex items-center`,children:(0,Z.jsx)(Qc,{className:`size-3 text-primary`,"aria-label":o({id:`CifUuG`})})}):null,t[11]=o,t[12]=n.bundledVersion,t[13]=n.updateAvailable,t[14]=y):y=t[14];let b;t[15]!==o||t[16]!==n.installed||t[17]!==n.managed?(b=n.managed?(0,Z.jsx)(`span`,{title:o({id:`U7HJ4y`}),className:`flex items-center`,children:(0,Z.jsx)(Ko,{className:`size-3 text-muted-foreground`,"aria-label":o({id:`U7HJ4y`})})}):(0,Z.jsx)(Ns,{installed:n.installed,subtle:!0,className:`shrink-0`}),t[15]=o,t[16]=n.installed,t[17]=n.managed,t[18]=b):b=t[18];let x;t[19]!==y||t[20]!==b?(x=(0,Z.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[y,b]}),t[19]=y,t[20]=b,t[21]=x):x=t[21];let S;t[22]!==f||t[23]!==x||t[24]!==v?(S=(0,Z.jsx)(un,{asChild:!0,children:(0,Z.jsxs)(lP,{size:`sm`,isActive:f,className:`h-6 text-[11px]`,onContextMenu:p,children:[m,h,v,x]})}),t[22]=f,t[23]=x,t[24]=v,t[25]=S):S=t[25];let C;t[26]!==o||t[27]!==n.name?(C=o({id:`RlLl3G`,values:{0:n.name}}),t[26]=o,t[27]=n.name,t[28]=C):C=t[28];let w;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsx)(Th,{}),t[29]=w):w=t[29];let T;t[30]===C?T=t[31]:(T=(0,Z.jsx)(Dr,{asChild:!0,children:(0,Z.jsx)(uP,{showOnHover:!0,"aria-label":C,children:w})}),t[30]=C,t[31]=T);let E;t[32]!==i||t[33]!==a||t[34]!==n?(E=(0,Z.jsx)(jr,{side:`right`,align:`start`,className:`min-w-52`,children:(0,Z.jsx)(rs,{skill:n,actions:i,existingNames:a})}),t[32]=i,t[33]=a,t[34]=n,t[35]=E):E=t[35];let D;t[36]!==l||t[37]!==T||t[38]!==E?(D=(0,Z.jsxs)(Nr,{open:l,onOpenChange:u,children:[T,E]}),t[36]=l,t[37]=T,t[38]=E,t[39]=D):D=t[39];let O;t[40]!==s||t[41]!==n?(O=s?(0,Z.jsx)(Y$,{skill:n}):null,t[40]=s,t[41]=n,t[42]=O):O=t[42];let k;t[43]===O?k=t[44]:(k=(0,Z.jsx)(ln,{children:O}),t[43]=O,t[44]=k);let A;t[45]!==S||t[46]!==D||t[47]!==k?(A=(0,Z.jsxs)(sP,{children:[S,D,k]}),t[45]=S,t[46]=D,t[47]=k,t[48]=A):A=t[48];let j;return t[49]!==s||t[50]!==A?(j=(0,Z.jsx)(dn,{open:s,onOpenChange:c,className:`group/skill`,children:A}),t[49]=s,t[50]=A,t[51]=j):j=t[51],j}function q$(e){let t=[];for(let n of e){let e=n.path.split(`/`),r=t;e.forEach((t,i)=>{let a=i===e.length-1,o=r.find(e=>e.name===t);o||(o=a?{name:t,path:n.path,text:n.text}:{name:t,path:e.slice(0,i+1).join(`/`),children:[]},r.push(o)),!a&&o.children&&(r=o.children)})}return J$(t),t}function J$(e){e.sort((e,t)=>{let n=+!e.children,r=+!t.children;return n===r?e.name.localeCompare(t.name):n-r});for(let t of e)t.children&&J$(t.children)}function Y$(e){let t=(0,$.c)(36),{skill:n}=e,{_:r}=ht(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(!1),{openTarget:c}=Re(),l;t[0]===c?l=t[1]:(l=function(e){c({kind:`doc`,target:e,docName:e},{tabBehavior:`append`}),cu(hu(e))},t[0]=c,t[1]=l);let u=l,d;t[2]!==c||t[3]!==n.name||t[4]!==n.scope?(d=function(e){c({kind:`skill-file`,target:`${n.scope}/${n.name}/${e}`,scope:n.scope,name:n.name,path:e},{tabBehavior:`replace-active`}),cu(du({scope:n.scope,name:n.name,path:e}))},t[2]=c,t[3]=n.name,t[4]=n.scope,t[5]=d):d=t[5];let f=d,p;t[6]!==u||t[7]!==f||t[8]!==n.managed||t[9]!==n.name||t[10]!==n.scope?(p=function(e){if(n.managed){f(e);return}let t=e.lastIndexOf(`.`),r=t>=0?e.slice(t+1).toLowerCase():``;if(n.scope===`project`&&(r===`md`||r===`mdx`)){u(be(n.name,e.replace(/\.mdx?$/i,``)));return}f(e)},t[6]=u,t[7]=f,t[8]=n.managed,t[9]=n.name,t[10]=n.scope,t[11]=p):p=t[11];let m=p,h,g;t[12]!==n.name||t[13]!==n.scope?(h=()=>{let e=!0,t=()=>{yf(n.scope,n.name).then(t=>{e&&(t.ok?(a(t.files),s(!1)):(a([]),s(!0)))})};t();let r=Xl(t);return()=>{e=!1,r()}},g=[n.scope,n.name],t[12]=n.name,t[13]=n.scope,t[14]=h,t[15]=g):(h=t[14],g=t[15]),(0,Q.useEffect)(h,g);let _;if(t[16]!==r||t[17]!==i||t[18]!==o||t[19]!==m||t[20]!==u||t[21]!==f||t[22]!==n.managed||t[23]!==n.name||t[24]!==n.scope){let e=i?q$(i):[],a;t[26]!==u||t[27]!==f||t[28]!==n.managed||t[29]!==n.name||t[30]!==n.scope?(a=()=>n.managed?f(`SKILL.md`):n.scope===`project`?u(oa(n.name)):mc(qi(n.scope,n.name)),t[26]=u,t[27]=f,t[28]=n.managed,t[29]=n.name,t[30]=n.scope,t[31]=a):a=t[31];let s,c;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(Wn,{className:`size-3 shrink-0 text-muted-foreground`}),c=(0,Z.jsx)(`span`,{className:`truncate`,children:`SKILL.md`}),t[32]=s,t[33]=c):(s=t[32],c=t[33]);let l;t[34]===a?l=t[35]:(l=(0,Z.jsx)(fP,{children:(0,Z.jsxs)(pP,{size:`sm`,onClick:a,className:`text-[11px]`,children:[s,c]})}),t[34]=a,t[35]=l),_=(0,Z.jsxs)(dP,{className:`mr-0 pr-0`,children:[l,i===null?(0,Z.jsx)(fP,{children:(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-[11px] text-muted-foreground/70`,children:(0,Z.jsx)(q,{id:`yQE2r9`})})}):o?(0,Z.jsx)(fP,{children:(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-[11px] text-muted-foreground/70`,title:r({id:`3Ijjy1`}),children:(0,Z.jsx)(q,{id:`ZARuZJ`})})}):e.map(e=>(0,Z.jsx)(X$,{node:e,depth:0,onOpenFile:m},e.path))]}),t[16]=r,t[17]=i,t[18]=o,t[19]=m,t[20]=u,t[21]=f,t[22]=n.managed,t[23]=n.name,t[24]=n.scope,t[25]=_}else _=t[25];return _}function X$(e){let t=(0,$.c)(34),{node:n,depth:r,onOpenFile:i}=e,[a,o]=(0,Q.useState)(!1),s=`${r*.6}rem`,c;t[0]===s?c=t[1]:(c={paddingLeft:s},t[0]=s,t[1]=c);let l=c;if(n.children){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Ro,{className:`size-3 shrink-0 text-muted-foreground transition-transform group-data-[state=open]/dir:rotate-90`}),t[2]=e):e=t[2];let s;t[3]===n.name?s=t[4]:(s=(0,Z.jsxs)(`span`,{className:`truncate`,children:[n.name,`/`]}),t[3]=n.name,t[4]=s);let c;t[5]!==l||t[6]!==s?(c=(0,Z.jsx)(un,{asChild:!0,children:(0,Z.jsxs)(pP,{size:`sm`,className:`text-[11px]`,style:l,children:[e,s]})}),t[5]=l,t[6]=s,t[7]=c):c=t[7];let u;if(t[8]!==r||t[9]!==n.children||t[10]!==i){let e;t[12]!==r||t[13]!==i?(e=e=>(0,Z.jsx)(X$,{node:e,depth:r+1,onOpenFile:i},e.path),t[12]=r,t[13]=i,t[14]=e):e=t[14],u=n.children.map(e),t[8]=r,t[9]=n.children,t[10]=i,t[11]=u}else u=t[11];let d;t[15]===u?d=t[16]:(d=(0,Z.jsx)(ln,{children:u}),t[15]=u,t[16]=d);let f;t[17]!==c||t[18]!==d?(f=(0,Z.jsxs)(fP,{children:[c,d]}),t[17]=c,t[18]=d,t[19]=f):f=t[19];let p;return t[20]!==a||t[21]!==f?(p=(0,Z.jsx)(dn,{open:a,onOpenChange:o,className:`group/dir`,children:f}),t[20]=a,t[21]=f,t[22]=p):p=t[22],p}let u=`skill-file-${n.path}`,d;t[23]!==n.path||t[24]!==i?(d=()=>i(n.path),t[23]=n.path,t[24]=i,t[25]=d):d=t[25];let f;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(Oh,{className:`size-3 shrink-0 text-muted-foreground`}),t[26]=f):f=t[26];let p;t[27]===n.name?p=t[28]:(p=(0,Z.jsx)(`span`,{className:`truncate`,children:n.name}),t[27]=n.name,t[28]=p);let m;return t[29]!==l||t[30]!==u||t[31]!==d||t[32]!==p?(m=(0,Z.jsx)(fP,{children:(0,Z.jsxs)(pP,{size:`sm`,className:`text-[11px]`,style:l,"data-testid":u,onClick:d,children:[f,p]})}),t[29]=l,t[30]=u,t[31]=d,t[32]=p,t[33]=m):m=t[33],m}function Z$(e){let t=(0,$.c)(12),{hasProjectSkills:n}=e,{_:r}=ht(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(!1),c,l;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=window.okDesktop?.sharing;if(!e)return;let t=!1,n=()=>{e.status().then(e=>{t||a(e.mode===`local-only`&&!e.skillsShared)}).catch(Q$)};return n(),window.addEventListener(`focus`,n),()=>{t=!0,window.removeEventListener(`focus`,n)}},l=[],t[0]=c,t[1]=l):(c=t[0],l=t[1]),(0,Q.useEffect)(c,l),!n||i!==!0)return null;let u;t[2]!==r||t[3]!==o?(u=async()=>{let e=window.okDesktop?.sharing;if(!e||o)return;s(!0);let t=null,n=null;try{t=await e.setSkillsShared(!0)}catch(e){n=e}if(s(!1),n!==null){let e=n instanceof Error?n.message:``;X.error(e.startsWith(`ok:sharing:dispatch:`)?r({id:`qXN416`}):e||r({id:`K2v7QF`}));return}if(t!==null){if(t.kind===`applied`)X.success(r({id:`Q7cNKe`})),a(!1);else if(t.kind===`no-exclude`){let e=t.reason===`no-git`?r({id:`Xwump4`}):t.reason===`inaccessible`?r({id:`PlGC6r`}):r({id:`zcmYx4`});X.warning(r({id:`EARn6h`,values:{detail:e}}))}}},t[2]=r,t[3]=o,t[4]=u):u=t[4];let d=u,f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(`p`,{className:`mb-2 text-amber-900 dark:text-amber-200`,children:(0,Z.jsx)(q,{id:`Bh9671`})}),t[5]=f):f=t[5];let p;t[6]===d?p=t[7]:(p=()=>void d(),t[6]=d,t[7]=p);let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(q,{id:`TUzThQ`}),t[8]=m):m=t[8];let h;return t[9]!==o||t[10]!==p?(h=(0,Z.jsxs)(`div`,{className:`mx-2 mb-1 rounded-md border border-amber-300 bg-amber-50 p-2 text-xs dark:border-amber-700 dark:bg-amber-950`,children:[f,(0,Z.jsx)(Y,{size:`sm`,className:`h-6 px-2 text-xs`,disabled:o,onClick:p,children:m})]}),t[9]=o,t[10]=p,t[11]=h):h=t[11],h}function Q$(e){console.warn(JSON.stringify({event:`skills-share-status-read-failed`,error:e instanceof Error?e.message:String(e)}))}function $$(){let e=(0,$.c)(19),[t,n]=(0,Q.useState)(null),[r,i]=(0,Q.useState)(!1),a,o;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{let e=!1;return _f().then(t=>{e||n(t)}),()=>{e=!0}},o=[],e[0]=a,e[1]=o):(a=e[0],o=e[1]),(0,Q.useEffect)(a,o),!t||t.managed!==null||t.importable===0)return null;let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=async e=>{if(i(!0),!await bf(e)){i(!1);return}n({managed:e,importable:0})},e[2]=s):s=e[2];let c=s,l;e[3]===t.importable?l=e[4]:(l=(0,Z.jsx)(`p`,{className:`mb-2 text-muted-foreground`,children:(0,Z.jsx)(q,{id:`mu1O0q`,values:{0:t.importable}})}),e[3]=t.importable,e[4]=l);let u,d;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>c(!0),d=(0,Z.jsx)(q,{id:`l3s5ri`}),e[5]=u,e[6]=d):(u=e[5],d=e[6]);let f;e[7]===r?f=e[8]:(f=(0,Z.jsx)(Y,{size:`sm`,className:`h-6 px-2 text-xs`,disabled:r,onClick:u,children:d}),e[7]=r,e[8]=f);let p,m;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>c(!1),m=(0,Z.jsx)(q,{id:`PBxg_E`}),e[9]=p,e[10]=m):(p=e[9],m=e[10]);let h;e[11]===r?h=e[12]:(h=(0,Z.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-6 px-2 text-xs`,disabled:r,onClick:p,children:m}),e[11]=r,e[12]=h);let g;e[13]!==f||e[14]!==h?(g=(0,Z.jsxs)(`div`,{className:`flex gap-1.5`,children:[f,h]}),e[13]=f,e[14]=h,e[15]=g):g=e[15];let _;return e[16]!==g||e[17]!==l?(_=(0,Z.jsxs)(`div`,{className:`mx-2 mb-1 rounded-md border border-border/60 bg-muted/40 p-2 text-xs`,children:[l,g]}),e[16]=g,e[17]=l,e[18]=_):_=e[18],_}var e1=6e4,t1=e=>{let t=(0,$.c)(11),{href:n,label:r,icon:i}=e,a,o;t[0]===n?(a=t[1],o=t[2]):(a=e=>ed(e,n),o=e=>ed(e,n),t[0]=n,t[1]=a,t[2]=o);let s;t[3]===i?s=t[4]:(s=(0,Z.jsx)(i,{"aria-hidden":`true`,className:`size-3.5`}),t[3]=i,t[4]=s);let c;return t[5]!==n||t[6]!==r||t[7]!==a||t[8]!==o||t[9]!==s?(c=(0,Z.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,onClick:a,onAuxClick:o,"aria-label":r,className:`rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:s}),t[5]=n,t[6]=r,t[7]=a,t[8]=o,t[9]=s,t[10]=c):c=t[10],c};function n1(e){let t=(0,$.c)(34),{version:n,onOpenReleaseNotes:r,onClose:i,store:a,autoDismissMs:o}=e,s=a===void 0?hL:a,c=o===void 0?e1:o,{_:l}=ht(),[u,d]=(0,Q.useState)(!1),f,p;t[0]!==c||t[1]!==i||t[2]!==u?(f=()=>{if(!u)return;let e=setTimeout(i,c);return()=>clearTimeout(e)},p=[u,i,c],t[0]=c,t[1]=i,t[2]=u,t[3]=f,t[4]=p):(f=t[3],p=t[4]),(0,Q.useEffect)(f,p);let m;t[5]===l?m=t[6]:(m=l({id:`GzPQ2f`}),t[5]=l,t[6]=m);let h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(q,{id:`yLEyuq`}),t[7]=h):h=t[7];let g;t[8]===s?g=t[9]:(g=()=>{s.markSubscribed(),d(!0)},t[8]=s,t[9]=g);let _;t[10]!==i||t[11]!==s?(_=()=>{s.dismiss(),i()},t[10]=i,t[11]=s,t[12]=_):_=t[12];let v;t[13]!==g||t[14]!==_?(v=(0,Z.jsx)(WI,{source:`post_update_card`,compactSubmit:!0,description:h,onSuccess:g,onDismiss:_}),t[13]=g,t[14]=_,t[15]=v):v=t[15];let y;t[16]!==l||t[17]!==u?(y=u?null:(0,Z.jsxs)(`nav`,{"aria-label":l({id:`dbapvC`}),className:`mt-3 flex items-center gap-1.5 text-muted-foreground text-xs`,children:[(0,Z.jsx)(`span`,{className:`mr-0.5`,children:(0,Z.jsx)(q,{id:`9sBe85`})}),(0,Z.jsx)(t1,{href:aL,label:l({id:`I7Exsw`}),icon:vL}),(0,Z.jsx)(t1,{href:rL,label:l({id:`zyKa-I`}),icon:Xg}),(0,Z.jsx)(t1,{href:iL,label:l({id:`36aWJD`}),icon:_L})]}),t[16]=l,t[17]=u,t[18]=y):y=t[18];let b;t[19]!==y||t[20]!==v?(b=(0,Z.jsxs)(`div`,{className:`px-3 py-2.5`,children:[v,y]}),t[19]=y,t[20]=v,t[21]=b):b=t[21];let x;t[22]===n?x=t[23]:(x=(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:(0,Z.jsx)(q,{id:`hLy8b1`,values:{version:n}})}),t[22]=n,t[23]=x);let S;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(q,{id:`_PACVa`}),t[24]=S):S=t[24];let C;t[25]===r?C=t[26]:(C=(0,Z.jsx)(Y,{variant:`link`,size:`sm`,className:`h-auto p-0 text-muted-foreground text-xs hover:text-foreground`,onClick:r,children:S}),t[25]=r,t[26]=C);let w;t[27]!==x||t[28]!==C?(w=(0,Z.jsxs)(`div`,{className:`flex items-center justify-between border-t bg-muted/30 px-3 py-2.5 space-x-2`,children:[x,C]}),t[27]=x,t[28]=C,t[29]=w):w=t[29];let T;return t[30]!==b||t[31]!==w||t[32]!==m?(T=(0,Z.jsxs)(`section`,{"aria-label":m,className:`mx-1 mb-1 overflow-hidden rounded-lg border bg-card text-card-foreground`,children:[b,w]}),t[30]=b,t[31]=w,t[32]=m,t[33]=T):T=t[33],T}function r1(e){let t=(0,$.c)(37),{notice:n,onDismiss:r}=e,{_:i}=ht(),a=n.variant===`error`?`border-destructive/60 bg-sidebar-accent/30 text-muted-foreground`:n.variant===`success`?`border-emerald-500/40 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400`:`border-sidebar-border bg-sidebar-accent/30 text-muted-foreground`,o;t[0]!==i||t[1]!==n.dismissible||t[2]!==r?(o=n.dismissible===!1?null:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon`,className:`size-5 shrink-0 text-muted-foreground hover:text-sidebar-foreground`,"aria-label":i({id:`GUYwCr`}),onClick:r,children:(0,Z.jsx)(fl,{"aria-hidden":`true`,className:`size-3`})}),t[0]=i,t[1]=n.dismissible,t[2]=r,t[3]=o):o=t[3];let s=o,c=`shrink-0 text-xs font-medium underline underline-offset-2 ${n.variant===`success`?`decoration-emerald-500/40`:`decoration-muted-foreground/40`} hover:text-sidebar-foreground hover:decoration-sidebar-foreground`;if(n.secondaryAction){let e=`update-notice-${n.id}`,r=`flex flex-col gap-2 rounded-md border px-2 py-2 text-xs ${a}`,i;t[4]===n.body?i=t[5]:(i=(0,Z.jsx)(`span`,{className:`flex-1 leading-snug`,children:n.body}),t[4]=n.body,t[5]=i);let o;t[6]!==s||t[7]!==i?(o=(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[i,s]}),t[6]=s,t[7]=i,t[8]=o):o=t[8];let l;t[9]!==c||t[10]!==n.action?(l=n.action?(0,Z.jsx)(`button`,{type:`button`,className:c,onClick:()=>{n.action?.onClick()},children:n.action.label}):null,t[9]=c,t[10]=n.action,t[11]=l):l=t[11];let u;t[12]===n.secondaryAction?u=t[13]:(u=()=>{n.secondaryAction?.onClick()},t[12]=n.secondaryAction,t[13]=u);let d;t[14]!==c||t[15]!==n.secondaryAction.label||t[16]!==u?(d=(0,Z.jsx)(`button`,{type:`button`,className:c,onClick:u,children:n.secondaryAction.label}),t[14]=c,t[15]=n.secondaryAction.label,t[16]=u,t[17]=d):d=t[17];let f;t[18]!==l||t[19]!==d?(f=(0,Z.jsxs)(`div`,{className:`flex gap-3 pl-1`,children:[l,d]}),t[18]=l,t[19]=d,t[20]=f):f=t[20];let p;return t[21]!==e||t[22]!==r||t[23]!==o||t[24]!==f?(p=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"data-testid":e,className:r,children:[o,f]}),t[21]=e,t[22]=r,t[23]=o,t[24]=f,t[25]=p):p=t[25],p}let l=`update-notice-${n.id}`,u=`flex items-center gap-2 rounded-md border px-2 py-1.5 text-xs ${a}`,d;t[26]===n.body?d=t[27]:(d=(0,Z.jsx)(`span`,{className:`flex-1 leading-snug`,children:n.body}),t[26]=n.body,t[27]=d);let f;t[28]!==c||t[29]!==n.action?(f=n.action?(0,Z.jsx)(`button`,{type:`button`,className:c,onClick:()=>{n.action?.onClick()},children:n.action.label}):null,t[28]=c,t[29]=n.action,t[30]=f):f=t[30];let p;return t[31]!==s||t[32]!==l||t[33]!==u||t[34]!==d||t[35]!==f?(p=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"data-testid":l,className:u,children:[d,f,s]}),t[31]=s,t[32]=l,t[33]=u,t[34]=d,t[35]=f,t[36]=p):p=t[36],p}function i1(e){if(e.length===0)return null;let t=e[0];if(!t)return null;for(let n=1;n<e.length;n++){let r=e[n];r&&r.priority<t.priority&&(t=r)}return t}function a1(){let e=(0,$.c)(15),t=(0,Q.useSyncExternalStore)(FR,PR,PR),n;e[0]===t?n=e[1]:(n=i1(t),e[0]=t,e[1]=n);let r=n;if(!r)return null;if(r.combinedSubscribe&&r.whatsNew){let t;e[2]===r.action?t=e[3]:(t=()=>r.action?.onClick(),e[2]=r.action,e[3]=t);let n;e[4]===r.id?n=e[5]:(n=()=>NR(r.id),e[4]=r.id,e[5]=n);let i;return e[6]!==r.whatsNew.version||e[7]!==t||e[8]!==n?(i=(0,Z.jsx)(`div`,{"data-testid":`update-notices-list`,children:(0,Z.jsx)(n1,{version:r.whatsNew.version,onOpenReleaseNotes:t,onClose:n})}),e[6]=r.whatsNew.version,e[7]=t,e[8]=n,e[9]=i):i=e[9],i}let i;e[10]===r?i=e[11]:(i=()=>{r.onDismiss?.(),NR(r.id)},e[10]=r,e[11]=i);let a;return e[12]!==r||e[13]!==i?(a=(0,Z.jsx)(`div`,{"data-testid":`update-notices-list`,children:(0,Z.jsx)(r1,{notice:r,onDismiss:i})}),e[12]=r,e[13]=i,e[14]=a):a=e[14],a}function o1(e,t){return e?.kind===`doc`||e?.kind===`folder-index`?Js(t.contentDir,Qs(e.docName),t.pathSeparator):e?.kind===`folder`?Js(t.contentDir,e.folderPath,t.pathSeparator):e?.kind===`asset`?Js(t.contentDir,e.assetPath,t.pathSeparator):t.contentDir}function s1(e){return e?.kind===`doc`||e?.kind===`folder-index`?Qs(e.docName):e?.kind===`folder`?e.folderPath:e?.kind===`asset`?e.assetPath:``}function c1(e,t){return e===null?ns({workspace:t}):e.kind===`folder`?t?Qo({folderRelativePath:e.folderPath,workspace:t}):null:e.kind===`doc`||e.kind===`folder-index`?as({docName:e.docName,workspace:t}):null}var l1={folderCount:0,expandedCount:0},u1=`button, [role="button"], [role="menuitem"], input, textarea, select, a[href]`;function d1(e){return typeof Element>`u`||!(e instanceof Element)?!1:e.closest(u1)!==null}function f1(e){let t=(0,$.c)(2),{onOpenSearch:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(iu,{name:`file-sidebar`,children:(0,Z.jsx)(h1,{onOpenSearch:n})}),t[0]=n,t[1]=r),r}var p1=e=>{let t=(0,$.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({icon:n,label:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=(0,Z.jsx)(n,{"aria-hidden":`true`}),t[4]=n,t[5]=a);let o;t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,"aria-label":r,...i,children:a})}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9];let s;t[10]===r?s=t[11]:(s=(0,Z.jsx)(on,{children:r}),t[10]=r,t[11]=s);let c;return t[12]!==o||t[13]!==s?(c=(0,Z.jsxs)(cn,{children:[o,s]}),t[12]=o,t[13]=s,t[14]=c):c=t[14],c},m1=e=>{let t=(0,$.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({icon:n,label:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=(0,Z.jsx)(n,{"aria-hidden":`true`}),t[4]=n,t[5]=a);let o;t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,Z.jsx)(an,{asChild:!0,children:(0,Z.jsx)(Dr,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,"aria-label":r,...i,children:a})})}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9];let s;t[10]===r?s=t[11]:(s=(0,Z.jsx)(on,{children:r}),t[10]=r,t[11]=s);let c;return t[12]!==o||t[13]!==s?(c=(0,Z.jsxs)(cn,{children:[o,s]}),t[12]=o,t[13]=s,t[14]=c):c=t[14],c};function h1(e){let t=(0,$.c)(309),{onOpenSearch:n}=e,{_:r}=ht(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(null),{activeDocName:c,activeTarget:l}=Re(),u;t[0]!==c||t[1]!==l?(u=l?.kind===`folder`||l?.kind===`folder-index`?l.folderPath:Il(c),t[0]=c,t[1]=l,t[2]=u):u=t[2];let d=u,f;t[3]===d?f=t[4]:(f=zl(d)?``:d,t[3]=d,t[4]=f);let p=f,[m,h]=(0,Q.useState)(!1),g=m?``:p,_=typeof window<`u`&&window.okDesktop!=null,{state:v,toggleSidebar:y}=GN(),b=Xs(),x=v===`expanded`,S=_&&v===`collapsed`,[C,w]=(0,Q.useState)(l1),T,E;t[5]===i?(T=t[6],E=t[7]):(T=()=>{if(i===null)return;let e=()=>{w(i.getFolderState()),h(i.isCreationTargetCleared())};return e(),i.subscribe(e)},E=[i],t[5]=i,t[6]=T,t[7]=E),(0,Q.useEffect)(T,E);let D,O;t[8]===i?(D=t[9],O=t[10]):(D=()=>{if(i!==null)return nw(e=>{let t=e.initialDir??``;if(e.template){i.createFromTemplate(e.template.folder,e.template.name);return}i.startCreating(`file`,t)})},O=[i],t[8]=i,t[9]=D,t[10]=O),(0,Q.useEffect)(D,O);let k=C.folderCount>0,A=k&&C.expandedCount===C.folderCount,j=C.expandedCount===0,M=Os(``),N=Os(g===``?null:g),P=g===``?M:N,F=M.state.status===`ready`?(M.state.data.folder.templates_available?.length??0)>0:!0,I=P.state.status===`ready`?(P.state.data.folder.templates_available?.length??0)>0:!0,L=typeof window<`u`?window.okDesktop:void 0,R=id(),{status:z}=po(),B=z?.hasRemote===!0,V;t[11]!==r||t[12]!==R?.contentDir?(V=L?.config?.projectName||R?.contentDir.split(`/`).filter(Boolean).pop()||r({id:`sER-bs`}),t[11]=r,t[12]=R?.contentDir,t[13]=V):V=t[13];let H=V,U=ts().states,{dispatch:W}=Yo(),G;t[14]===R?G=t[15]:(G=ns({workspace:R}),t[14]=R,t[15]=G);let K=G,{projectLocalBinding:ee,merged:te}=Qu(),ne=te?.appearance?.sidebar?.showHiddenFiles??!1,re=te?.appearance?.sidebar?.showOkFolders??!1,ie=te?.appearance?.sidebar?.showOnlyMarkdownFiles??!1,ae=te?.appearance?.sidebar?.showSkillsSection??!0,oe=k&&!A,se=k&&!j,ce=oe||se,le=(0,Q.useRef)(!1),ue;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ue=e=>{le.current&&(le.current=!1,e.preventDefault())},t[16]=ue):ue=t[16];let de=ue,fe=b1,pe;t[17]!==i||t[18]!==R?(pe=()=>{R&&(le.current=!0,i?.startCreating(`file`,``))},t[17]=i,t[18]=R,t[19]=pe):pe=t[19];let me=pe,he;t[20]!==i||t[21]!==R?(he=e=>{R&&(le.current=!0,i?.createFromTemplate(``,e))},t[20]=i,t[21]=R,t[22]=he):he=t[22];let ge=he,_e;t[23]!==i||t[24]!==R?(_e=()=>{R&&(le.current=!0,i?.startCreating(`folder`,``))},t[23]=i,t[24]=R,t[25]=_e):_e=t[25];let ve=_e,ye;t[26]===R?ye=t[27]:(ye=()=>{!R||!L||L.shell.showItemInFolder(R.contentDir)},t[26]=R,t[27]=ye);let be=ye,xe;t[28]!==r||t[29]!==R?(xe=async()=>{if(R)try{await navigator.clipboard.writeText(R.contentDir),X.success(r({id:`6_ZOw4`}),{description:R.contentDir})}catch(e){console.warn(`[FileSidebar] clipboard write failed:`,e),X.error(r({id:`vfRlCI`}))}},t[28]=r,t[29]=R,t[30]=xe):xe=t[30];let Se=xe,Ce;t[31]!==r||t[32]!==B?(Ce=()=>{ms({...Ds(``),hasRemote:B,onClickWhenNoRemote:()=>{X.error(r({id:`WyQxwa`}))}},{clipboardWrite:tf,toastSuccess:y1,toastError:v1,logEvent:_1})},t[31]=r,t[32]=B,t[33]=Ce):Ce=t[33];let we=Ce,Te;t[34]!==r||t[35]!==ee?(Te=e=>{if(ee===null)return;let t=ee.patch({appearance:{sidebar:e}});t.ok||(console.warn(`[FileSidebar] sidebar visibility toggle rejected:`,zi(t.error)),X.error(r({id:`P47EWZ`}),{description:zi(t.error)}))},t[34]=r,t[35]=ee,t[36]=Te):Te=t[36];let Ee=Te,De;t[37]===i?De=t[38]:(De=()=>{i?.expandAll()},t[37]=i,t[38]=De);let Oe=De,ke;t[39]===i?ke=t[40]:(ke=()=>{i?.collapseAll()},t[39]=i,t[40]=ke);let Ae=ke,je,Me;t[41]!==se||t[42]!==oe||t[43]!==ne||t[44]!==re||t[45]!==ie||t[46]!==ae||t[47]!==v?(je=()=>{let e={showHiddenFiles:ne,showOkFolders:re,showOnlyMarkdownFiles:ie,showSkillsSection:ae,canExpandAll:oe,canCollapseAll:se,sidebarVisible:v===`expanded`};Mc(e),L&&L.editor.notifyViewMenuStateChanged(e)},Me=[L,ne,re,ie,ae,oe,se,v],t[41]=se,t[42]=oe,t[43]=ne,t[44]=re,t[45]=ie,t[46]=ae,t[47]=v,t[48]=je,t[49]=Me):(je=t[48],Me=t[49]),(0,Q.useEffect)(je,Me);let Ne;t[50]!==r||t[51]!==l||t[52]!==W||t[53]!==U||t[54]!==g||t[55]!==Ee||t[56]!==ne||t[57]!==re||t[58]!==ie||t[59]!==ae||t[60]!==y||t[61]!==i||t[62]!==R?(Ne=()=>Ht(e=>{let t=l!==null&&zl(s1(l));switch(e){case`new-doc`:if(!R||!i)return;i.startCreating(`file`,g);return;case`new-folder`:if(!R||!i)return;i.startCreating(`folder`,g);return;case`new-from-template`:if(!R||!i)return;i.startCreatingFromTemplate(g);return;case`rename`:if(!l||t)return;xZ(l);return;case`duplicate`:if(!l||t)return;CZ(l);return;case`move-to-trash`:if(!l||t)return;yZ(l);return;case`reveal-in-finder`:{if(!L||!R)return;let e=o1(l,R);L.shell.showItemInFolder(e);return}case`send-to-ai`:{let e=Xr.filter(e=>U[e.id]?.installed===!0);if(e.length===0){X.error(r({id:`LKOLNn`}));return}let t=c1(l,R);if(!t)return;let[n]=e;if(!n)return;W(n.id,t);return}case`copy-full-path`:{if(!R)return;let e=o1(l,R);navigator.clipboard.writeText(e).then(()=>X.success(r({id:`6_ZOw4`}),{description:e})).catch(e=>{console.warn(`[FileSidebar] clipboard write failed:`,e),X.error(r({id:`vfRlCI`}))});return}case`copy-relative-path`:{let e=s1(l);if(e===``){X.error(r({id:`74eHt-`}));return}navigator.clipboard.writeText(e).then(()=>X.success(r({id:`haHgQj`}),{description:e})).catch(e=>{console.warn(`[FileSidebar] clipboard write failed:`,e),X.error(r({id:`5QGTaA`}))});return}case`toggle-show-ok-folders`:Ee({showOkFolders:!re});return;case`toggle-show-hidden-files`:Ee({showHiddenFiles:!ne});return;case`toggle-show-only-markdown-files`:Ee({showOnlyMarkdownFiles:!ie});return;case`toggle-show-skills-section`:Ee({showSkillsSection:!ae});return;case`expand-all-tree`:i?.expandAll();return;case`collapse-all-tree`:i?.collapseAll();return;case`toggle-sidebar`:y();return;case`delete`:case`toggle-source`:case`save-version`:case`version-history`:case`focus-search`:case`focus-command-palette`:case`close-active-tab-or-window`:case`toggle-doc-panel`:return}}),t[50]=r,t[51]=l,t[52]=W,t[53]=U,t[54]=g,t[55]=Ee,t[56]=ne,t[57]=re,t[58]=ie,t[59]=ae,t[60]=y,t[61]=i,t[62]=R,t[63]=Ne):Ne=t[63];let Pe;t[64]!==r||t[65]!==l||t[66]!==W||t[67]!==U||t[68]!==g||t[69]!==ee||t[70]!==ne||t[71]!==re||t[72]!==ie||t[73]!==ae||t[74]!==y||t[75]!==i||t[76]!==R?(Pe=[L,i,R,l,g,ee,ne,re,ie,ae,U,W,y,r],t[64]=r,t[65]=l,t[66]=W,t[67]=U,t[68]=g,t[69]=ee,t[70]=ne,t[71]=re,t[72]=ie,t[73]=ae,t[74]=y,t[75]=i,t[76]=R,t[77]=Pe):Pe=t[77],(0,Q.useEffect)(Ne,Pe);let Fe=_&&x&&`motion-safe:delay-100`,Ie=S&&`opacity-0`,Le;t[78]!==Fe||t[79]!==Ie?(Le=J(`flex-row h-12 items-center py-0 px-3`,`justify-between`,_&&`overflow-x-clip`,_&&`motion-safe:transition-opacity motion-safe:duration-100 motion-safe:ease-out`,Fe,Ie,_&&`[-webkit-app-region:drag]`),t[78]=Fe,t[79]=Ie,t[80]=Le):Le=t[80];let ze;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(ze=_?(0,Z.jsx)(`div`,{"aria-hidden":`true`,"data-testid":`sidebar-traffic-light-reserve`,className:`w-[var(--ok-titlebar-reserve-left,0px)] shrink-0 self-stretch`}):null,t[81]=ze):ze=t[81];let Be;t[82]===x?Be=t[83]:(Be=x&&!_?(0,Z.jsx)(`span`,{className:`shrink-0 font-mono text-sm uppercase tracking-wider text-sidebar-foreground/50`,children:(0,Z.jsx)(q,{id:`sER-bs`})}):null,t[82]=x,t[83]=Be);let Ve;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=J(`flex items-center gap-1`,_&&`[&>*]:[-webkit-app-region:no-drag]`),t[84]=Ve):Ve=t[84];let He;t[85]===r?He=t[86]:(He=r({id:`Rq1vFD`}),t[85]=r,t[86]=He);let Ue;t[87]===He?Ue=t[88]:(Ue=(0,Z.jsx)(m1,{icon:Uh,label:He}),t[87]=He,t[88]=Ue);let We;t[89]!==oe||t[90]!==i?(We=oe?(0,Z.jsxs)(Cr,{onSelect:()=>i?.expandAll(),children:[(0,Z.jsx)(Eg,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`OlAl5i`})]}):null,t[89]=oe,t[90]=i,t[91]=We):We=t[91];let Ge;t[92]!==se||t[93]!==i?(Ge=se?(0,Z.jsxs)(Cr,{onSelect:()=>i?.collapseAll(),children:[(0,Z.jsx)(Mh,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`qvWGzP`})]}):null,t[92]=se,t[93]=i,t[94]=Ge):Ge=t[94];let Ke;t[95]===ce?Ke=t[96]:(Ke=ce?(0,Z.jsx)(Pr,{}):null,t[95]=ce,t[96]=Ke);let qe;t[97]===r?qe=t[98]:(qe=r({id:`8vETh9`}),t[97]=r,t[98]=qe);let Je;t[99]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,Z.jsx)(kr,{children:(0,Z.jsx)(q,{id:`8vETh9`})}),t[99]=Je):Je=t[99];let Ye;t[100]===Ee?Ye=t[101]:(Ye=e=>Ee({showHiddenFiles:e}),t[100]=Ee,t[101]=Ye);let Xe=ee===null,Ze;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(Ze=(0,Z.jsx)(q,{id:`6KCH4m`}),t[102]=Ze):Ze=t[102];let Qe;t[103]!==ne||t[104]!==Ye||t[105]!==Xe?(Qe=(0,Z.jsx)(Or,{checked:ne,onCheckedChange:Ye,disabled:Xe,"data-testid":`tree-options-show-hidden-files`,children:Ze}),t[103]=ne,t[104]=Ye,t[105]=Xe,t[106]=Qe):Qe=t[106];let $e;t[107]===Ee?$e=t[108]:($e=e=>Ee({showOkFolders:e}),t[107]=Ee,t[108]=$e);let et=ee===null,tt;t[109]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,Z.jsx)(q,{id:`ELYtNJ`}),t[109]=tt):tt=t[109];let nt;t[110]!==re||t[111]!==$e||t[112]!==et?(nt=(0,Z.jsx)(Or,{checked:re,onCheckedChange:$e,disabled:et,"data-testid":`tree-options-show-ok-folders`,children:tt}),t[110]=re,t[111]=$e,t[112]=et,t[113]=nt):nt=t[113];let rt;t[114]===Ee?rt=t[115]:(rt=e=>Ee({showOnlyMarkdownFiles:e}),t[114]=Ee,t[115]=rt);let it=ee===null,at;t[116]===Symbol.for(`react.memo_cache_sentinel`)?(at=(0,Z.jsx)(q,{id:`5-o4kO`}),t[116]=at):at=t[116];let ot;t[117]!==ie||t[118]!==rt||t[119]!==it?(ot=(0,Z.jsx)(Or,{checked:ie,onCheckedChange:rt,disabled:it,"data-testid":`tree-options-show-only-markdown-files`,children:at}),t[117]=ie,t[118]=rt,t[119]=it,t[120]=ot):ot=t[120];let st;t[121]===Ee?st=t[122]:(st=e=>Ee({showSkillsSection:e}),t[121]=Ee,t[122]=st);let ct=ee===null,lt;t[123]===Symbol.for(`react.memo_cache_sentinel`)?(lt=(0,Z.jsx)(q,{id:`PCSkw2`}),t[123]=lt):lt=t[123];let ut;t[124]!==ae||t[125]!==st||t[126]!==ct?(ut=(0,Z.jsx)(Or,{checked:ae,onCheckedChange:st,disabled:ct,"data-testid":`tree-options-show-skills`,children:lt}),t[124]=ae,t[125]=st,t[126]=ct,t[127]=ut):ut=t[127];let dt;t[128]!==qe||t[129]!==Qe||t[130]!==nt||t[131]!==ot||t[132]!==ut?(dt=(0,Z.jsxs)(Er,{"aria-label":qe,children:[Je,Qe,nt,ot,ut]}),t[128]=qe,t[129]=Qe,t[130]=nt,t[131]=ot,t[132]=ut,t[133]=dt):dt=t[133];let ft;t[134]!==We||t[135]!==Ge||t[136]!==Ke||t[137]!==dt?(ft=(0,Z.jsxs)(jr,{align:`end`,className:`min-w-52`,"data-testid":`tree-options-menu`,children:[We,Ge,Ke,dt]}),t[134]=We,t[135]=Ge,t[136]=Ke,t[137]=dt,t[138]=ft):ft=t[138];let pt;t[139]!==Ue||t[140]!==ft?(pt=(0,Z.jsxs)(Nr,{children:[Ue,ft]}),t[139]=Ue,t[140]=ft,t[141]=pt):pt=t[141];let mt;t[142]===r?mt=t[143]:(mt=r({id:`HdkSiO`}),t[142]=r,t[143]=mt);let gt;t[144]!==g||t[145]!==i?(gt=()=>i?.startCreating(`file`,g),t[144]=g,t[145]=i,t[146]=gt):gt=t[146];let _t;t[147]!==mt||t[148]!==gt?(_t=(0,Z.jsx)(p1,{icon:nc,label:mt,onClick:gt}),t[147]=mt,t[148]=gt,t[149]=_t):_t=t[149];let vt;t[150]!==r||t[151]!==I||t[152]!==g||t[153]!==i?(vt=I?(0,Z.jsxs)(Nr,{children:[(0,Z.jsx)(m1,{icon:As,label:r({id:`Uuj_R4`})}),(0,Z.jsx)(jr,{align:`end`,className:`min-w-52`,onCloseAutoFocus:de,children:(0,Z.jsx)(dZ,{parentDir:g,onSelectTemplate:e=>{le.current=!0,i?.createFromTemplate(g,e)},ItemComponent:Cr})})]}):null,t[150]=r,t[151]=I,t[152]=g,t[153]=i,t[154]=vt):vt=t[154];let yt;t[155]===r?yt=t[156]:(yt=r({id:`96G6Re`}),t[155]=r,t[156]=yt);let bt;t[157]!==g||t[158]!==i?(bt=()=>i?.startCreating(`folder`,g),t[157]=g,t[158]=i,t[159]=bt):bt=t[159];let xt;t[160]!==yt||t[161]!==bt?(xt=(0,Z.jsx)(p1,{icon:Ph,label:yt,onClick:bt}),t[160]=yt,t[161]=bt,t[162]=xt):xt=t[162];let St;t[163]!==pt||t[164]!==_t||t[165]!==vt||t[166]!==xt?(St=(0,Z.jsxs)(`div`,{"data-testid":`sidebar-toolbar`,className:Ve,children:[pt,_t,vt,xt]}),t[163]=pt,t[164]=_t,t[165]=vt,t[166]=xt,t[167]=St):St=t[167];let Ct;t[168]!==Le||t[169]!==Be||t[170]!==St?(Ct=(0,Z.jsxs)($N,{"data-electron-drag":_?``:void 0,className:Le,children:[ze,Be,St]}),t[168]=Le,t[169]=Be,t[170]=St,t[171]=Ct):Ct=t[171];let wt=_&&x&&`motion-safe:delay-100`,Tt=S&&`opacity-0`,Et;t[172]!==wt||t[173]!==Tt?(Et=J(`px-2 pb-2`,_&&`[-webkit-app-region:no-drag]`,_&&`motion-safe:transition-opacity motion-safe:duration-100 motion-safe:ease-out`,wt,Tt),t[172]=wt,t[173]=Tt,t[174]=Et):Et=t[174];let Dt;t[175]===v?Dt=t[176]:(Dt=[v],t[175]=v,t[176]=Dt);let Ot;t[177]===n?Ot=t[178]:(Ot=(0,Z.jsx)(H$,{onClick:n}),t[177]=n,t[178]=Ot);let kt;t[179]!==Dt||t[180]!==Ot?(kt=(0,Z.jsx)(Jt,{fallbackRender:g1,onError:V$,resetKeys:Dt,children:Ot}),t[179]=Dt,t[180]=Ot,t[181]=kt):kt=t[181];let At;t[182]!==Et||t[183]!==kt?(At=(0,Z.jsx)(`div`,{className:Et,children:kt}),t[182]=Et,t[183]=kt,t[184]=At):At=t[184];let jt;t[185]===Symbol.for(`react.memo_cache_sentinel`)?(jt=(0,Z.jsx)($L,{}),t[185]=jt):jt=t[185];let Mt;t[186]===Symbol.for(`react.memo_cache_sentinel`)?(Mt=(0,Z.jsx)(dc,{className:`size-3.5 shrink-0`}),t[186]=Mt):Mt=t[186];let Nt;t[187]===H?Nt=t[188]:(Nt=(0,Z.jsx)(`span`,{className:`truncate`,children:H}),t[187]=H,t[188]=Nt);let Pt;t[189]===Symbol.for(`react.memo_cache_sentinel`)?(Pt=(0,Z.jsx)(Ro,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-[state=open]/files:rotate-90`}),t[189]=Pt):Pt=t[189];let Ft;t[190]===Nt?Ft=t[191]:(Ft=(0,Z.jsx)(rP,{asChild:!0,className:`shrink-0`,children:(0,Z.jsxs)(un,{"data-sidebar-root-context":!0,className:`flex w-full items-center gap-1.5`,children:[Mt,Nt,Pt]})}),t[190]=Nt,t[191]=Ft);let It=o==null?`50vh`:`${o}px`,Lt;t[192]===It?Lt=t[193]:(Lt={height:It},t[192]=It,t[193]=Lt);let Rt;t[194]===Symbol.for(`react.memo_cache_sentinel`)?(Rt=(0,Z.jsx)(pQ,{ref:a,onContentHeightChange:s}),t[194]=Rt):Rt=t[194];let zt;t[195]===Lt?zt=t[196]:(zt=(0,Z.jsx)(ln,{className:`flex max-h-[70vh] flex-col overflow-hidden`,style:Lt,children:Rt}),t[195]=Lt,t[196]=zt);let Bt;t[197]!==Ft||t[198]!==zt?(Bt=(0,Z.jsx)(dn,{defaultOpen:!0,className:`group/files flex shrink-0 flex-col`,children:(0,Z.jsxs)(nP,{className:`min-h-0 px-0`,children:[Ft,zt]})}),t[197]=Ft,t[198]=zt,t[199]=Bt):Bt=t[199];let Vt;t[200]===ae?Vt=t[201]:(Vt=ae?(0,Z.jsx)(U$,{}):null,t[200]=ae,t[201]=Vt);let Ut;t[202]===i?Ut=t[203]:(Ut=(0,Z.jsx)(`div`,{"aria-hidden":!0,"data-sidebar-empty-deselect":!0,className:`min-h-8 flex-1 cursor-default`,onClick:()=>i?.clearCreationTarget()}),t[202]=i,t[203]=Ut);let Wt;t[204]!==Bt||t[205]!==Vt||t[206]!==Ut?(Wt=(0,Z.jsxs)(tP,{children:[jt,Bt,Vt,Ut]}),t[204]=Bt,t[205]=Vt,t[206]=Ut,t[207]=Wt):Wt=t[207];let Gt;t[208]===Symbol.for(`react.memo_cache_sentinel`)?(Gt=(0,Z.jsxs)(eP,{className:`px-0`,children:[(0,Z.jsx)(u$,{}),(0,Z.jsx)(a1,{}),(0,Z.jsx)(hz,{}),typeof window<`u`&&window.okDesktop?(0,Z.jsx)(oP,{children:(0,Z.jsx)(sP,{children:(0,Z.jsx)(M$,{bridge:window.okDesktop})})}):null]}),t[208]=Gt):Gt=t[208];let Kt=!(b&&v===`collapsed`),qt;t[209]===Kt?qt=t[210]:(qt=(0,Z.jsx)(ZN,{enableToggle:!1,enableDrag:Kt}),t[209]=Kt,t[210]=qt);let Yt;t[211]!==Ct||t[212]!==At||t[213]!==Wt||t[214]!==qt?(Yt=(0,Z.jsx)(Yv,{asChild:!0,children:(0,Z.jsxs)(`div`,{className:`contents`,onContextMenu:fe,children:[Ct,At,Wt,Gt,qt]})}),t[211]=Ct,t[212]=At,t[213]=Wt,t[214]=qt,t[215]=Yt):Yt=t[215];let Xt=!R,Zt,Qt;t[216]===Symbol.for(`react.memo_cache_sentinel`)?(Zt=(0,Z.jsx)(nc,{"aria-hidden":`true`}),Qt=(0,Z.jsx)(q,{id:`HdkSiO`}),t[216]=Zt,t[217]=Qt):(Zt=t[216],Qt=t[217]);let Y;t[218]!==me||t[219]!==Xt?(Y=(0,Z.jsxs)($v,{disabled:Xt,onSelect:me,"data-testid":`empty-space-menu-new-file`,children:[Zt,Qt]}),t[218]=me,t[219]=Xt,t[220]=Y):Y=t[220];let $t;t[221]!==ge||t[222]!==F||t[223]!==R?($t=F?(0,Z.jsxs)(Zv,{children:[(0,Z.jsxs)(ey,{disabled:!R,"data-testid":`empty-space-menu-new-from-template`,children:[(0,Z.jsx)(As,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`Uuj_R4`})]}),(0,Z.jsx)(ty,{children:(0,Z.jsx)(dZ,{parentDir:``,onSelectTemplate:ge,ItemComponent:$v})})]}):null,t[221]=ge,t[222]=F,t[223]=R,t[224]=$t):$t=t[224];let en=!R,tn,nn;t[225]===Symbol.for(`react.memo_cache_sentinel`)?(tn=(0,Z.jsx)(Ph,{"aria-hidden":`true`}),nn=(0,Z.jsx)(q,{id:`96G6Re`}),t[225]=tn,t[226]=nn):(tn=t[225],nn=t[226]);let rn;t[227]!==ve||t[228]!==en?(rn=(0,Z.jsxs)($v,{disabled:en,onSelect:ve,"data-testid":`empty-space-menu-new-folder`,children:[tn,nn]}),t[227]=ve,t[228]=en,t[229]=rn):rn=t[229];let an;t[230]===Symbol.for(`react.memo_cache_sentinel`)?(an=(0,Z.jsx)(iy,{}),t[230]=an):an=t[230];let on;t[231]!==r||t[232]!==be||t[233]!==R?(on=L?(0,Z.jsxs)($v,{disabled:!R,onSelect:be,"data-testid":`empty-space-menu-reveal-in-finder`,"aria-label":r(R?{id:`LtSYdi`}:{id:`o2yoFu`}),children:[(0,Z.jsx)(dc,{"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`LtSYdi`})}),R?null:(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:(0,Z.jsx)(q,{id:`wTcjov`})})]}):null,t[231]=r,t[232]=be,t[233]=R,t[234]=on):on=t[234];let sn;t[235]!==W||t[236]!==K||t[237]!==U?(sn=(0,Z.jsx)(QQ,{input:K,installStates:U,dispatch:W}),t[235]=W,t[236]=K,t[237]=U,t[238]=sn):sn=t[238];let cn;t[239]!==we||t[240]!==B?(cn=B?(0,Z.jsxs)($v,{onSelect:we,"data-testid":`empty-space-menu-share`,children:[(0,Z.jsx)(sg,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`Z8lGw6`})]}):null,t[239]=we,t[240]=B,t[241]=cn):cn=t[241];let fn=!R,pn;t[242]!==r||t[243]!==R?(pn=r(R?{id:`Up2_7p`}:{id:`U8CD-l`}),t[242]=r,t[243]=R,t[244]=pn):pn=t[244];let mn;t[245]===Symbol.for(`react.memo_cache_sentinel`)?(mn=(0,Z.jsx)(ec,{"aria-hidden":`true`}),t[245]=mn):mn=t[245];let hn;t[246]===Symbol.for(`react.memo_cache_sentinel`)?(hn=(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(q,{id:`Up2_7p`})}),t[246]=hn):hn=t[246];let gn;t[247]===R?gn=t[248]:(gn=R?null:(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:(0,Z.jsx)(q,{id:`wTcjov`})}),t[247]=R,t[248]=gn);let _n;t[249]!==Se||t[250]!==fn||t[251]!==pn||t[252]!==gn?(_n=(0,Z.jsxs)($v,{disabled:fn,onSelect:Se,"data-testid":`empty-space-menu-copy-full-path`,"aria-label":pn,children:[mn,hn,gn]}),t[249]=Se,t[250]=fn,t[251]=pn,t[252]=gn,t[253]=_n):_n=t[253];let vn;t[254]===Symbol.for(`react.memo_cache_sentinel`)?(vn=(0,Z.jsx)(iy,{}),t[254]=vn):vn=t[254];let yn;t[255]===Ee?yn=t[256]:(yn=e=>Ee({showHiddenFiles:e}),t[255]=Ee,t[256]=yn);let bn=ee===null,xn;t[257]===Symbol.for(`react.memo_cache_sentinel`)?(xn=(0,Z.jsx)(q,{id:`XcGbim`}),t[257]=xn):xn=t[257];let Sn;t[258]!==ne||t[259]!==yn||t[260]!==bn?(Sn=(0,Z.jsx)(ny,{checked:ne,onCheckedChange:yn,disabled:bn,"data-testid":`empty-space-menu-show-hidden-files`,children:xn}),t[258]=ne,t[259]=yn,t[260]=bn,t[261]=Sn):Sn=t[261];let Cn;t[262]===Ee?Cn=t[263]:(Cn=e=>Ee({showOkFolders:e}),t[262]=Ee,t[263]=Cn);let wn=ee===null,Tn;t[264]===Symbol.for(`react.memo_cache_sentinel`)?(Tn=(0,Z.jsx)(q,{id:`GHsJb8`}),t[264]=Tn):Tn=t[264];let En;t[265]!==re||t[266]!==Cn||t[267]!==wn?(En=(0,Z.jsx)(ny,{checked:re,onCheckedChange:Cn,disabled:wn,"data-testid":`empty-space-menu-show-ok-folders`,children:Tn}),t[265]=re,t[266]=Cn,t[267]=wn,t[268]=En):En=t[268];let Dn;t[269]===Ee?Dn=t[270]:(Dn=e=>Ee({showOnlyMarkdownFiles:e}),t[269]=Ee,t[270]=Dn);let On=ee===null,kn;t[271]===Symbol.for(`react.memo_cache_sentinel`)?(kn=(0,Z.jsx)(q,{id:`WkTLN7`}),t[271]=kn):kn=t[271];let An;t[272]!==ie||t[273]!==Dn||t[274]!==On?(An=(0,Z.jsx)(ny,{checked:ie,onCheckedChange:Dn,disabled:On,"data-testid":`empty-space-menu-show-only-markdown-files`,children:kn}),t[272]=ie,t[273]=Dn,t[274]=On,t[275]=An):An=t[275];let jn;t[276]===Ee?jn=t[277]:(jn=e=>Ee({showSkillsSection:e}),t[276]=Ee,t[277]=jn);let Mn=ee===null,Nn;t[278]===Symbol.for(`react.memo_cache_sentinel`)?(Nn=(0,Z.jsx)(q,{id:`NF_Wcg`}),t[278]=Nn):Nn=t[278];let Pn;t[279]!==ae||t[280]!==jn||t[281]!==Mn?(Pn=(0,Z.jsx)(ny,{checked:ae,onCheckedChange:jn,disabled:Mn,"data-testid":`empty-space-menu-show-skills-section`,children:Nn}),t[279]=ae,t[280]=jn,t[281]=Mn,t[282]=Pn):Pn=t[282];let Fn;t[283]===ce?Fn=t[284]:(Fn=ce?(0,Z.jsx)(iy,{}):null,t[283]=ce,t[284]=Fn);let In;t[285]!==Oe||t[286]!==oe?(In=oe?(0,Z.jsxs)($v,{onSelect:Oe,"data-testid":`empty-space-menu-expand-all`,children:[(0,Z.jsx)(Eg,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`OlAl5i`})]}):null,t[285]=Oe,t[286]=oe,t[287]=In):In=t[287];let Ln;t[288]!==Ae||t[289]!==se?(Ln=se?(0,Z.jsxs)($v,{onSelect:Ae,"data-testid":`empty-space-menu-collapse-all`,children:[(0,Z.jsx)(Mh,{"aria-hidden":`true`}),(0,Z.jsx)(q,{id:`qvWGzP`})]}):null,t[288]=Ae,t[289]=se,t[290]=Ln):Ln=t[290];let Rn;t[291]!==cn||t[292]!==_n||t[293]!==Sn||t[294]!==En||t[295]!==An||t[296]!==Pn||t[297]!==Fn||t[298]!==In||t[299]!==Ln||t[300]!==Y||t[301]!==$t||t[302]!==rn||t[303]!==on||t[304]!==sn?(Rn=(0,Z.jsxs)(Qv,{className:`min-w-52`,onCloseAutoFocus:de,children:[Y,$t,rn,an,on,sn,cn,_n,vn,Sn,En,An,Pn,Fn,In,Ln]}),t[291]=cn,t[292]=_n,t[293]=Sn,t[294]=En,t[295]=An,t[296]=Pn,t[297]=Fn,t[298]=In,t[299]=Ln,t[300]=Y,t[301]=$t,t[302]=rn,t[303]=on,t[304]=sn,t[305]=Rn):Rn=t[305];let zn;return t[306]!==Rn||t[307]!==Yt?(zn=(0,Z.jsx)(YN,{variant:`inset`,children:(0,Z.jsxs)(Jv,{children:[Yt,Rn]})}),t[306]=Rn,t[307]=Yt,t[308]=zn):zn=t[308],zn}function g1(){return null}function _1(e){return console.log(e)}function v1(e){return X.error(e)}function y1(e){return X.success(e)}function b1(e){e.target instanceof Element&&e.target.closest(`[data-sidebar-root-context]`)||d1(e.target)&&(e.preventDefault(),e.stopPropagation())}var x1=(0,Q.lazy)(()=>n(()=>import(`./McpConsentDialogBody-CMu1TYud.js`),__vite__mapDeps([160,1,6,2,3,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,109,28,50,91,94,35,161]),import.meta.url));function S1(){let e=(0,$.c)(1);if(!(0,Q.useSyncExternalStore)(dp.subscribe,w1,C1))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(x1,{})}),e[0]=t):t=e[0],t}function C1(){return!1}function w1(){return dp.getSnapshot()!==null}function T1(){let e=(0,$.c)(4),[t,n]=(0,Q.useState)(!1),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>Ht(e=>{e===`report-bug`&&n(!0)}),i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a=(0,Z.jsx)(am,{open:t,onOpenChange:n}),e[2]=t,e[3]=a),a}function E1(){let e=(0,$.c)(17),t=At(),{collabUrl:n,setSystemProvider:r,updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c}=Re(),l;e[0]!==o||e[1]!==s||e[2]!==a||e[3]!==c||e[4]!==i?(l={updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c},e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=i,e[5]=l):l=e[5];let u=(0,Q.useRef)(l),d;e[6]!==o||e[7]!==s||e[8]!==a||e[9]!==c||e[10]!==i?(d=()=>{u.current={updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c}},e[6]=o,e[7]=s,e[8]=a,e[9]=c,e[10]=i,e[11]=d):d=e[11],(0,Q.useEffect)(d);let f,p;return e[12]!==n||e[13]!==t||e[14]!==r?(f=()=>{if(n===null)return;let e=new yu,i=new bu({url:n,name:Ui,document:e,onStateless:e=>{let{payload:t}=e;wu(t,{onServerInfo:e=>{u.current.updateServerInstanceId(e.serverInstanceId),e.currentBranch!==void 0&&u.current.observeBranch(e.currentBranch)},onBranchSwitched:e=>{u.current.onBranchSwitched(e.branch)},onDiskAck:e=>{u.current.observeDiskAck(e.docName,e.sv),Zl(e.docName)},onDerivedView:M1,onConfigValidationRejected:j1,onConfigIgnoreNestedError:A1,onUnknown:k1})},onClose:O1,onDisconnect:D1}),a=Jl(e=>{(e.includes(`files`)||e.includes(`backlinks`))&&(t.invalidateQueries({queryKey:[`backlinks`]}),t.invalidateQueries({queryKey:[`forward-links`]})),(e.includes(`files`)||e.includes(`graph`))&&(t.invalidateQueries({queryKey:[`orphans`]}),t.invalidateQueries({queryKey:[`hubs`]})),e.includes(`lint-config`)&&Wd()}),o=st(()=>{u.current.refreshServerInfo()});i.on(`synced`,()=>{$l([`files`,`backlinks`,`graph`]),o()});let s=new Set,c=()=>{if(i.awareness)for(let[e,t]of i.awareness.getStates().entries())s.has(e)||t.user?.type===`agent`&&(s.add(e),console.warn(`[agent-presence] observed stale AwarenessUser.type === 'agent' from clientID ${e} — probably a stale bundled client`))};return i.awareness?.on(`change`,c),r(i),()=>{a(),i.awareness?.off(`change`,c),r(null),i.destroy(),e.destroy()}},p=[t,n,r],e[12]=n,e[13]=t,e[14]=r,e[15]=f,e[16]=p):(f=e[15],p=e[16]),(0,Q.useEffect)(f,p),null}function D1(){console.warn(`[CC1] __system__ disconnected - derived views may be stale`)}function O1(e){let{event:t}=e;console.warn(`[CC1] __system__ connection closed:`,t.code,t.reason)}function k1(e){console.warn(`[CC1] Unparseable stateless payload, skipping:`,e.slice(0,100))}function A1(e){Ms(e)}function j1(e){Rs(e)}function M1(e){$l([e.ch])}var N1=500;function P1(e){return!e.startsWith(`__`)&&!/\.(mmd|mermaid)$/i.test(e)}function F1(){let e=(0,$.c)(3),{merged:t}=Qu(),n=t?.validation?.fileTreeIndicators!==!1,r,i;return e[0]===n?(r=e[1],i=e[2]):(r=()=>{if(!n)return;let e=new Map,t=!1,r=e=>{xd({kind:`doc`,docName:e}).then(n=>{t||n===null||hd(e,n.files.filter(t=>ou(t.file)===e).flatMap(I1))})},i=eu(t=>{if(!P1(t))return;let n=e.get(t);n!==void 0&&clearTimeout(n),e.set(t,setTimeout(()=>{e.delete(t),r(t)},N1))});return()=>{t=!0,i();for(let t of e.values())clearTimeout(t);e.clear()}},i=[n],e[0]=n,e[1]=r,e[2]=i),(0,Q.useEffect)(r,i),null}function I1(e){return e.diagnostics}function L1(e){let t=i(e);if(t)return{scope:`project`,name:t};let n=xi(e);return n?.kind===`skill`?{scope:n.scope,name:n.name}:null}function R1(e,t){let n=new Set(t.map(e=>`${e.scope}\u0000${e.name}`)),r=[];for(let t of e){let e=L1(t);if(!e||n.has(`${e.scope}\u0000${e.name}`))continue;let i=e.scope===`project`?`global`:`project`;n.has(`${i}\u0000${e.name}`)?r.push({kind:`retarget`,fromDocName:t,toDocName:qi(i,e.name)}):r.push({kind:`close`,docName:t})}return r}function z1(){let e=(0,$.c)(13),{openTabs:t,closeDocument:n}=Re(),r;e[0]===t?r=e[1]:(r=t.some(V1),e[0]=t,e[1]=r);let i=r,a;e[2]===i?a=e[3]:(a={enabled:i},e[2]=i,e[3]=a);let o=es(a),s=(0,Q.useRef)(null),c;e[4]!==n||e[5]!==t||e[6]!==o.data||e[7]!==o.status?(c=()=>{if(o.status!==`ready`)return;let e=o.data,r=`${t.join(``)}\u0002${e.map(B1).sort().join(``)}`;if(s.current===r)return;s.current=r;let i=R1(t,e);for(let e of i)e.kind===`retarget`?(mc(e.toDocName),n(e.fromDocName)):n(e.docName)},e[4]=n,e[5]=t,e[6]=o.data,e[7]=o.status,e[8]=c):c=e[8];let l;e[9]!==n||e[10]!==t||e[11]!==o?(l=[o,t,n],e[9]=n,e[10]=t,e[11]=o,e[12]=l):l=e[12],(0,Q.useEffect)(c,l)}function B1(e){return`${e.scope}\u0000${e.name}`}function V1(e){return L1(e)!==null}var H1=1e3,U1=3e4;function W1(e){let t=e.scheduler??{setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e)},n=e.initialBackoffMs??H1,r=e.maxBackoffMs??U1,i=e.rng??Math.random,a=e.createWebSocket??(e=>new WebSocket(e)),o=e.logger??null,s=e.log,c=null,l=null,u=!1,d=n;function f(e,t,n){try{o?o[e](t,n):s?.(t)}catch{}}function p(){if(u)return;l!==null&&t.clearTimeout(l);let e=d;d=Math.min(d*2,r);let n=i(),a=Math.max(1,Math.floor(e*(1-n/2)));f(`debug`,`scheduling reconnect`,{backoffMs:a,ceilMs:e}),l=t.setTimeout(()=>{l=null,m().catch(e=>f(`warn`,`reconnect failed`,{error:String(e)}))},a)}async function m(){if(u)return;let t;try{t=await e.resolveWsUrl()}catch(e){f(`warn`,`resolveWsUrl threw`,{error:String(e)}),p();return}if(!t){p();return}let r=[];e.pid!==void 0&&r.push(`pid=${encodeURIComponent(String(e.pid))}`),e.connectionId&&r.push(`connectionId=${encodeURIComponent(e.connectionId)}`),e.connectionId&&e.displayName!==void 0&&e.clientName!==void 0&&e.colorSeed!==void 0&&(r.push(`displayName=${encodeURIComponent(e.displayName)}`),r.push(`clientName=${encodeURIComponent(e.clientName)}`),r.push(`colorSeed=${encodeURIComponent(e.colorSeed)}`));let i=r.length>0?`?${r.join(`&`)}`:``,o=`${t}/collab/keepalive${i}`;try{c=a(o)}catch(e){f(`warn`,`WebSocket constructor failed`,{url:o,error:String(e)}),c=null,p();return}c.addEventListener(`open`,()=>{f(`info`,`connected`,{url:t}),d=n}),c.addEventListener(`close`,()=>{u||(f(`info`,`disconnected`,{url:t}),c=null,p())}),c.addEventListener(`error`,()=>{f(`debug`,`websocket error observed`,{url:t,readyState:c?.readyState,reason:`error-event`})})}return queueMicrotask(()=>{m().catch(e=>f(`warn`,`initial connect failed`,{error:String(e)}))}),{close:()=>{if(!u&&(u=!0,l!==null&&(t.clearTimeout(l),l=null),c)){try{c.close()}catch{}c=null}},isConnected:()=>c!==null&&c.readyState===1}}function G1(e){if(e)return e.replace(/\/collab\/?$/,``)}function K1(){return Tu(window)!==null}function q1(e,t){let n=(0,$.c)(5),r=(0,Q.useRef)(e),i=(0,Q.useRef)(t),a,o;n[0]===e?(a=n[1],o=n[2]):(a=()=>{r.current=e},o=[e],n[0]=e,n[1]=a,n[2]=o),(0,Q.useEffect)(a,o);let s,c;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=i.current?.startKeepalive??W1;if((i.current?.isElectronHost??K1)())return;let t=e({resolveWsUrl:async()=>G1(r.current)});return()=>t.close()},c=[],n[3]=s,n[4]=c):(s=n[3],c=n[4]),(0,Q.useEffect)(s,c)}var J1=(0,Q.lazy)(()=>n(()=>import(`./ShareBranchSwitchDialog-0huPygyG.js`).then(e=>({default:e.ShareBranchSwitchDialog})),__vite__mapDeps([162,1,10,11,12,23,16,17,18,19,24,25,22,26,86,30,163,94,164,165,166,6,2,3,7,8,9,167]),import.meta.url)),Y1=(0,Q.lazy)(()=>n(()=>import(`./ShareReceiveMissDialog--OvJvh_h.js`).then(e=>({default:e.ShareReceiveMissDialog})),__vite__mapDeps([168,1,23,10,11,12,16,17,18,19,24,25,22,26,169,112,6,2,3,7,8,9,75,59,76,77,78,89,94,55,50,21,84,91,30,163,115,31,35,54]),import.meta.url)),X1=`#install-claude-desktop`,Z1=/\.(md|mdx)$/i;function Q1(e){return wl(e)||e===X1}function $1(e,t){if(!Z1.test(e))return null;for(let n of t){let t=ae(n);if(t.kind===`doc`&&t.docName===e)return{kind:`doc`,target:e,docName:e}}return null}function e0(e,t,n,r){return[e,t,n,r].map(e=>[...e].sort().join(`\0`)).join(``)}function t0(){let e=(0,$.c)(26),{clearTarget:t,openTabs:n,syncOpenTabsWithKnownTargets:r,tabSessionLoaded:i}=Re(),{openTargetTransition:a}=qe();z1();let{assetPaths:o,filePaths:s,folderPaths:c,loading:l,pageMeta:u,pages:d,pagesBySlug:f,pagesByBasename:p}=Vo(),m=(0,Q.useRef)(null),h;e[0]!==o||e[1]!==s||e[2]!==c||e[3]!==d?(h=e0(d,c,o,s),e[0]=o,e[1]=s,e[2]=c,e[3]=d,e[4]=h):h=e[4];let g=h,_,v;e[5]!==o||e[6]!==s||e[7]!==c||e[8]!==l||e[9]!==d||e[10]!==r||e[11]!==i||e[12]!==g?(_=()=>{l||!i||m.current===g||(m.current=g,r({pages:d,folderPaths:c,assetPaths:o,filePaths:s}))},v=[o,s,c,l,d,r,i,g],e[5]=o,e[6]=s,e[7]=c,e[8]=l,e[9]=d,e[10]=r,e[11]=i,e[12]=g,e[13]=_,e[14]=v):(_=e[13],v=e[14]),(0,Q.useEffect)(_,v);let y,b;return e[15]!==t||e[16]!==c||e[17]!==l||e[18]!==n||e[19]!==a||e[20]!==u||e[21]!==d||e[22]!==p||e[23]!==f?(y=()=>{e();function e(){if(Q1(window.location.hash))return;let e=fu(window.location.hash);if(e){let t=so(e.split(`.`).pop()??``);ru(`ok/nav/hash-change`,{docName:null,kind:`asset`}),a({kind:`asset`,target:e,assetPath:e,mediaKind:t});return}let r=lu(window.location.hash);if(r){ru(`ok/nav/hash-change`,{docName:null,kind:`skill-file`}),a({kind:`skill-file`,target:`${r.scope}/${r.name}/${r.path}`,scope:r.scope,name:r.name,path:r.path});return}if(_u(window.location.hash)){ru(`ok/nav/hash-change`,{docName:null,kind:`folder`}),a({kind:`folder`,target:``,folderPath:``});return}let i=mu(window.location.hash);if(!i){ru(`ok/nav/hash-change`,{docName:null,kind:`clear`}),t();return}if(l){ru(`ok/nav/hash-change`,{docName:i,kind:`deferred-loading`});return}let o=$1(i,n)??Gl(i,{pages:d,folderPaths:c,pagesBySlug:f,pagesByBasename:p});if(o.kind===`missing`&&/\/+$/.test(i.trim())){ru(`ok/nav/hash-change`,{docName:i,kind:`deferred-missing-folder`});return}let s=ql(Kl(o),u);ru(`ok/nav/hash-change`,{docName:i,kind:s.kind}),a(s)}return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},b=[t,c,l,a,n,u,d,f,p],e[15]=t,e[16]=c,e[17]=l,e[18]=n,e[19]=a,e[20]=u,e[21]=d,e[22]=p,e[23]=f,e[24]=y,e[25]=b):(y=e[24],b=e[25]),(0,Q.useEffect)(y,b),null}function n0(){let e=(0,$.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,Q.useEffect)(r0,t),null}function r0(){let e=function(e){let t=e.target;El({target:t,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,key:e.key})&&(e.preventDefault(),window.location.hash!==`#settings`&&(window.location.hash=Dl))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)}function i0(){let e=(0,$.c)(4),{activeTarget:t}=Re(),n=typeof window<`u`?window.okDesktop??null:null,r=t?.kind===`doc`||t?.kind===`folder`||t?.kind===`asset`?t.kind:null,i=t?.kind===`doc`?t.docName:t?.kind===`folder`?t.folderPath:t?.kind===`asset`?t.assetPath:null,a,o;return e[0]!==i||e[1]!==r?(a=()=>{if(n){if(r===null){n.editor.notifyActiveTargetChanged({kind:null});return}i!==null&&n.editor.notifyActiveTargetChanged({kind:r,identifier:i})}},o=[n,r,i],e[0]=i,e[1]=r,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,Q.useEffect)(a,o),null}function a0(){let e=(0,$.c)(8),{activeDocName:t,activeTarget:n}=Re(),[r,i]=(0,Q.useState)(!1),a;e[0]!==t||e[1]!==n?(a=n?.kind===`folder`?n.folderPath:Il(t),e[0]=t,e[1]=n,e[2]=a):a=e[2];let o=a,s,c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=function(e){let t=e.target;Q_({target:t,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,key:e.key})&&(e.preventDefault(),i(!0))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},c=[],e[3]=s,e[4]=c):(s=e[3],c=e[4]),(0,Q.useEffect)(s,c);let l;return e[5]!==r||e[6]!==o?(l=(0,Z.jsx)(ev,{open:r,onOpenChange:i,kind:`file`,initialDir:o}),e[5]=r,e[6]=o,e[7]=l):l=e[7],l}function o0(e){let t=(0,$.c)(3),{children:n}=e,{collabUrl:r}=Re();q1(r);let i;return t[0]!==n||t[1]!==r?(i=(0,Z.jsx)(Su,{collabUrl:r,children:n}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function s0(){let e=(0,$.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(iu,{name:`app`,children:(0,Z.jsx)(Qe,{children:(0,Z.jsx)(o0,{children:(0,Z.jsx)(Bv,{children:(0,Z.jsx)(c0,{})})})})}),e[0]=t):t=e[0],t}function c0(){let e=(0,$.c)(32),t=typeof window<`u`?window.okDesktop??null:null,n=typeof window<`u`&&window.okDesktop!=null,[r,i]=(0,Q.useState)(!1),a=Uv(),o=Ad(),s;e[0]===o?s=e[1]:(s=t&&t.config.ptyAvailable===!0?{launchInTerminal:l0,installedClis:o}:null,e[0]=o,e[1]=s);let c=s,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(ky,{}),e[2]=l):l=e[2];let u,d,f,p,m;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(E1,{}),d=(0,Z.jsx)(F1,{}),f=(0,Z.jsx)(t0,{}),p=(0,Z.jsx)(i0,{}),m=(0,Z.jsx)(a0,{}),e[3]=u,e[4]=d,e[5]=f,e[6]=p,e[7]=m):(u=e[3],d=e[4],f=e[5],p=e[6],m=e[7]);let h;e[8]===a?h=e[9]:(h=!a&&(0,Z.jsx)(n0,{}),e[8]=a,e[9]=h);let g,_,v,y,b,x,S;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(x=!1,S=t?(0,Z.jsx)(Ay,{bridge:t}):null,g=t?(0,Z.jsx)(Ry,{}):null,_=t?(0,Z.jsx)(T1,{}):null,v=t?(0,Z.jsx)(ZL,{}):null,y=(0,Z.jsx)(S1,{}),b=t?(0,Z.jsxs)(Q.Suspense,{fallback:null,children:[(0,Z.jsx)(J1,{bridge:t}),(0,Z.jsx)(Y1,{})]}):null,e[10]=g,e[11]=_,e[12]=v,e[13]=y,e[14]=b,e[15]=x,e[16]=S):(g=e[10],_=e[11],v=e[12],y=e[13],b=e[14],x=e[15],S=e[16]);let C;e[17]===r?C=e[18]:(C=(0,Z.jsx)(vy,{bridge:t,open:r,onOpenChange:i}),e[17]=r,e[18]=C);let w;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(w=n&&(0,Z.jsx)(`div`,{"aria-hidden":`true`,"data-testid":`editor-window-chrome-drag-strip`,"data-electron-drag":``,className:`pointer-events-none fixed inset-x-0 top-0 z-50 h-2 [-webkit-app-region:drag]`}),e[19]=w):w=e[19];let T;e[20]===a?T=e[21]:(T=!a&&(0,Z.jsx)(f1,{onOpenSearch:()=>i(!0)}),e[20]=a,e[21]=T);let E;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsx)(QN,{className:`overflow-hidden h-[calc(100vh-var(--layout-inset-offset))]`,children:(0,Z.jsx)(qL,{onOpenSearch:()=>i(!0)})}),e[22]=E):E=e[22];let D;e[23]===T?D=e[24]:(D=(0,Z.jsxs)(KN,{className:`h-screen overflow-hidden`,children:[T,E]}),e[23]=T,e[24]=D);let O;e[25]!==D||e[26]!==c?(O=(0,Z.jsx)(ss,{value:c,children:D}),e[25]=D,e[26]=c,e[27]=O):O=e[27];let k;return e[28]!==C||e[29]!==O||e[30]!==h?(k=(0,Z.jsxs)(Z.Fragment,{children:[l,(0,Z.jsxs)(Ho,{children:[u,d,f,p,m,h,x,S,g,_,v,y,b,C,w,O]})]}),e[28]=C,e[29]=O,e[30]=h,e[31]=k):k=e[31],k}function l0(e,t){Bc($o(e,t),t)}function u0(e){let t=/\/([^/]+?)(?:\.git)?\/?$/.exec(e);return t?t[1]:`repo`}function d0(e){return{async getAuthStatus(t){return e.authQueryTransport.status(t?{host:t}:void 0)},async startSignIn(){return e.openSignIn()},async runClone({url:t,branch:n}){let r=await e.bridge.dialog.openFolder();if(!r)return{kind:`cancelled`};let i=u0(t),a=`${r.replace(/\/$/,``)}/${i}`,o=X.loading(yl._({id:`GXf9hG`,values:{repoName:i}}),{duration:1/0}),s=typeof n==`string`&&n.length>0?n:null;try{let n=e.cloneTransport.start({url:t,dir:a,branch:s});for await(let e of n.events){if(e.type===`progress`){let t=e.phase,n=Math.round(e.pct);X.loading(yl._({id:`GXf9hG`,values:{repoName:i}}),{id:o,description:yl._({id:`SCzAbA`,values:{phase:t,pct:n}}),duration:1/0});continue}if(e.type===`branch-fallback`){console.log(pp({branch_action:`fallback`,branch:e.branch})),X.info(yl._({id:`3JYy1p`,values:{0:e.branch}}),{duration:8e3});continue}if(e.type===`complete`)return X.success(yl._({id:`IRv9cH`,values:{repoName:i}}),{id:o,duration:4e3}),{kind:`ok`,dir:e.dir};if(e.type===`error`)return X.dismiss(o),{kind:`error`,detail:e.message}}return X.dismiss(o),{kind:`error`,detail:`Clone ended unexpectedly.`}}catch(e){console.warn(`[clone-controller] clone transport threw`,e);let t=e instanceof Error?e.message:`Unknown error`;return X.dismiss(o),{kind:`error`,detail:t}}}}}function f0(){return{start(e){return Ts((t,n)=>{(async()=>{try{let r=await fetch(`/api/local-op/clone`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e.url,dir:e.dir||void 0,branch:typeof e.branch==`string`&&e.branch.length>0?e.branch:void 0}),signal:n});if(!r.ok){let e=`Clone failed — check the URL and try again (${r.status})`;try{let t=await r.json(),n=ma.safeParse(t);n.success&&(e=`Clone failed: ${n.data.title}`)}catch{}t({type:`error`,message:e});return}if(!r.body){t({type:`error`,message:`Clone failed — empty response body`});return}let i=r.body.getReader(),a=new TextDecoder,o=``;for(;;){let{done:e,value:r}=await i.read();if(e)break;o+=a.decode(r,{stream:!0});let s=o.split(`
|
|
2022
2022
|
`);o=s.pop()??``;for(let e of s){if(!e.trim())continue;let n;try{n=JSON.parse(e)}catch{console.warn(`[clone-transport] Dropped unparseable NDJSON line:`,e.slice(0,100));continue}if(n&&typeof n==`object`&&n.type===`error`&&`problem`in n){let e=n.problem;t({type:`error`,message:e?.detail||e?.title||`Unknown error`});break}t(n)}if(n.aborted)break}n.aborted||t({type:`error`,message:`Clone stream ended unexpectedly — check if the clone completed`})}catch(e){if(e instanceof Error&&e.name===`AbortError`)return;t({type:`error`,message:`Clone failed — connection error`})}})()})}}}function p0(e){return{start(t){let n=typeof t.branch==`string`&&t.branch.length>0?t.branch:null;return e.localOp.clone.start({url:t.url,dir:t.dir,branch:n})}}}function m0(e){switch(e){case`receiving`:return{id:`qbfj1f`};case`resolving`:return{id:`adsMWO`};case`checking`:return{id:`1HBhDS`};case`init`:return{id:`LlHqdU`};case`done`:return{id:`bD8I7O`};default:return{id:`25Pw6a`}}}function h0(e){let t=e.trim();if(/^[\w.-]+\/[\w.-]+$/.test(t))return t.split(`/`)[1];try{return new URL(t.replace(/^git@([^:]+):/,`https://$1/`)).pathname.replace(/\.git$/,``).split(`/`).pop()??`repo`}catch{return t.split(`/`).pop()?.replace(/\.git$/,``)??`repo`}}function g0(e){let t=(0,$.c)(100),{open:n,onOpenChange:r,onSignIn:i,onCloneComplete:a,transport:o,authQueryTransport:s,pickParentFolder:c,initialUrl:l}=e,{_:u}=ht(),d;t[0]===o?d=t[1]:(d=o??f0(),t[0]=o,t[1]=d);let f=d,p;t[2]===s?p=t[3]:(p=s??Us(),t[2]=s,t[3]=p);let m=p,h=c!==void 0,[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(null),[S,C]=(0,Q.useState)(!1),w;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(w=zs(),t[4]=w):w=t[4];let[T,E]=(0,Q.useState)(w),[D,O]=(0,Q.useState)(!1),[k,A]=(0,Q.useState)(!1),[j,M]=(0,Q.useState)(-1),N=(0,Q.useRef)(null),P=(0,Q.useRef)(null),F=(0,Q.useRef)(null),I=(0,Q.useId)(),L;t[5]!==n||t[6]!==m?(L=()=>{if(!n)return;let e=!1;return m.status().then(t=>{Ls(t.authenticated),e||E(t.authenticated)}).catch(()=>{e||E(!1)}),()=>{e=!0}},t[5]=n,t[6]=m,t[7]=L):L=t[7];let R;t[8]===n?R=t[9]:(R=[n],t[8]=n,t[9]=R),(0,Q.useEffect)(L,R);let z;t[10]!==T||t[11]!==n||t[12]!==m?(z=()=>{if(!T||!n)return;let e=!1;return C(!0),m.repos().then(t=>{e||(x(t.ok?t.repos:[]),C(!1))}).catch(()=>{e||(x([]),C(!1))}),()=>{e=!0}},t[10]=T,t[11]=n,t[12]=m,t[13]=z):z=t[13];let B;t[14]!==T||t[15]!==n?(B=[T,n],t[14]=T,t[15]=n,t[16]=B):B=t[16],(0,Q.useEffect)(z,B);let V,H;t[17]!==l||t[18]!==n||t[19]!==h?(V=()=>{if(!n||!l||(_(l),h))return;let e=h0(l);e&&y(`~/Documents/${e}`)},H=[n,l,h],t[17]=l,t[18]=n,t[19]=h,t[20]=V,t[21]=H):(V=t[20],H=t[21]),(0,Q.useEffect)(V,H);let U,W;t[22]!==j||t[23]!==I?(U=()=>{j<0||document.getElementById(`${I}-opt-${j}`)?.scrollIntoView({block:`nearest`})},W=[j,I],t[22]=j,t[23]=I,t[24]=U,t[25]=W):(U=t[24],W=t[25]),(0,Q.useEffect)(U,W);let G;t[26]===h?G=t[27]:(G=function(e){if(_(e),A(!0),M(-1),h)return;let t=h0(e);t&&y(`~/Documents/${t}`)},t[26]=h,t[27]=G);let K=G,ee;t[28]===h?ee=t[29]:(ee=function(e){if(_(e.clone_url),h)return;let t=e.full_name.split(`/`)[1];y(`~/Documents/${t}`)},t[28]=h,t[29]=ee);let te=ee,ne;t[30]!==u||t[31]!==v||t[32]!==a||t[33]!==r||t[34]!==c||t[35]!==f||t[36]!==g?(ne=async function(){let e=g.trim();if(!e){X.error(u({id:`FTUGgh`}));return}let t=v||``;if(c){O(!0);let n=await c();if(!n){O(!1);return}let r=h0(e);t=`${n.replace(/\/$/,``)}/${r}`}else O(!0);let n=X.loading(u({id:`2tgFCe`}),{duration:1/0});P.current=n;let i=f.start({url:e,dir:t});N.current=i.cancel;try{let e=i.events[Symbol.asyncIterator](),t=await e.next();for(;!t.done;){let i=t.value;if(i.type===`progress`){let e=u(m0(i.phase));X.loading(`${e} — ${i.pct}%`,{id:n})}else if(i.type===`complete`){X.success(u({id:`u_lS4C`}),{id:n}),r(!1),O(!1),N.current=null;let e=`port`in i?i.port:void 0;a?a({port:e,dir:i.dir}):e!==void 0&&(window.location.href=`http://localhost:${e}`);return}else if(i.type===`error`){let e=i.message;X.error(u({id:`eFJkVt`,values:{cloneError:e}}),{id:n}),O(!1),N.current=null;return}t=await e.next()}X.error(u({id:`Tz9pJB`}),{id:n}),O(!1),N.current=null}catch(e){console.error(`[CloneDialog] clone iteration failed:`,e),X.error(u({id:`K9J00P`}),{id:n}),O(!1),N.current=null}},t[30]=u,t[31]=v,t[32]=a,t[33]=r,t[34]=c,t[35]=f,t[36]=g,t[37]=ne):ne=t[37];let re=ne,ie;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(ie=function(){N.current?.(),N.current=null,O(!1),X.dismiss(P.current??void 0)},t[38]=ie):ie=t[38];let ae=ie,oe;t[39]!==D||t[40]!==r||t[41]!==h?(oe=function(e){D||(r(e),e||(_(``),h||y(``),A(!1),M(-1)))},t[39]=D,t[40]=r,t[41]=h,t[42]=oe):oe=t[42];let se=oe,ce;t[43]===te?ce=t[44]:(ce=function(e){te(e),A(!1),M(-1),F.current?.focus()},t[43]=te,t[44]=ce);let le=ce,ue=T===null||S&&b===null,de;if(t[45]!==b||t[46]!==g){let e=g.trim().toLowerCase(),n;t[48]===b?n=t[49]:(n=b??[],t[48]=b,t[49]=n),de=n.filter(t=>`${t.full_name} ${t.clone_url}`.toLowerCase().includes(e)),t[45]=b,t[46]=g,t[47]=de}else de=t[47];let fe=de,pe;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(pe=/:\/\/|^git@|\.git$/i,t[50]=pe):pe=t[50];let me;t[51]===g?me=t[52]:(me=pe.test(g.trim()),t[51]=g,t[52]=me);let he=me,ge=T===!0&&b!==null&&fe.length===0&&!he,_e=k&&T!==!1&&!D&&(ue||fe.length>0||ge),ve=fe.length,ye=`${I}-loading`,be,xe;t[53]===ve?(be=t[54],xe=t[55]):(be=()=>{M(e=>e>=ve?ve-1:e)},xe=[ve],t[53]=ve,t[54]=be,t[55]=xe),(0,Q.useEffect)(be,xe);let Se;t[56]!==j||t[57]!==D||t[58]!==_e||t[59]!==le||t[60]!==fe?(Se=function(e){if(!D)if(e.key===`ArrowDown`){if(e.preventDefault(),!_e){A(!0);return}M(e=>Math.min(e+1,fe.length-1))}else e.key===`ArrowUp`?(e.preventDefault(),M(S0)):e.key===`Enter`?_e&&j>=0&&j<fe.length&&(e.preventDefault(),le(fe[j])):e.key===`Escape`&&_e&&(e.preventDefault(),e.stopPropagation(),A(!1),M(-1))},t[56]=j,t[57]=D,t[58]=_e,t[59]=le,t[60]=fe,t[61]=Se):Se=t[61];let Ce=Se,we;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,Z.jsx)(_n,{children:(0,Z.jsx)(pn,{children:(0,Z.jsx)(q,{id:`VdXv4D`})})}),t[62]=we):we=t[62];let Te;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,Z.jsx)(`label`,{htmlFor:`clone-source`,className:`text-sm font-medium`,children:(0,Z.jsx)(q,{id:`IreQBq`})}),t[63]=Te):Te=t[63];let Ee;t[64]!==u||t[65]!==j||t[66]!==D||t[67]!==Ce||t[68]!==K||t[69]!==T||t[70]!==I||t[71]!==ye||t[72]!==i||t[73]!==_e||t[74]!==ue||t[75]!==b||t[76]!==le||t[77]!==fe||t[78]!==g?(Ee=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Te,T===!1?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(vl,{id:`clone-source`,placeholder:u({id:`Xv_ijG`}),value:g,onChange:e=>K(e.target.value),disabled:D}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-1sm text-muted-foreground`,children:[(0,Z.jsx)(`span`,{children:(0,Z.jsx)(q,{id:`9oE4C3`})}),(0,Z.jsx)(Y,{variant:`link`,className:`h-auto p-0`,onClick:()=>i?.(),disabled:D,children:(0,Z.jsx)(q,{id:`3jod3l`})})]})]}):(0,Z.jsxs)(Bt,{open:_e,onOpenChange:A,children:[(0,Z.jsx)(Wt,{asChild:!0,children:(0,Z.jsx)(vl,{id:`clone-source`,ref:F,role:`combobox`,"aria-expanded":_e,"aria-controls":_e?ue?ye:I:void 0,"aria-activedescendant":j>=0?`${I}-opt-${j}`:void 0,"aria-autocomplete":`list`,autoComplete:`off`,placeholder:u({id:`R0jJzV`}),value:g,onChange:e=>K(e.target.value),onFocus:()=>A(!0),onKeyDown:Ce,disabled:D})}),(0,Z.jsx)(Kt,{align:`start`,sideOffset:4,className:`w-(--radix-popover-trigger-width) max-h-56 overflow-y-auto overscroll-y-contain subtle-scrollbar p-0`,onOpenAutoFocus:x0,onCloseAutoFocus:b0,onInteractOutside:e=>{F.current?.contains(e.target)&&e.preventDefault()},onWheel:y0,onTouchMove:v0,children:ue?(0,Z.jsxs)(`output`,{id:ye,className:`flex flex-col gap-1.5 px-3 py-2`,"aria-label":u({id:`8XQRON`}),children:[(0,Z.jsx)(Bd,{className:`h-4 w-2/3`}),(0,Z.jsx)(Bd,{className:`h-4 w-1/2`}),(0,Z.jsx)(Bd,{className:`h-4 w-3/4`}),(0,Z.jsx)(Bd,{className:`h-4 w-2/5`})]}):(0,Z.jsx)(`div`,{id:I,role:`listbox`,"aria-label":u({id:`KX1MZR`}),className:`py-1`,children:fe.length===0?(0,Z.jsx)(`div`,{role:`presentation`,className:`px-3 py-2 text-xs text-muted-foreground`,children:b&&b.length===0?(0,Z.jsx)(q,{id:`cOSAfL`}):(0,Z.jsx)(q,{id:`8eW0WQ`})}):fe.map((e,t)=>(0,Z.jsxs)(`div`,{id:`${I}-opt-${t}`,role:`option`,tabIndex:-1,"aria-selected":t===j,onMouseDown:_0,onMouseEnter:()=>M(t),onClick:()=>le(e),className:J(`flex cursor-default items-center gap-2 px-3 py-1.5 text-sm`,t===j&&`bg-accent text-accent-foreground`),children:[e.private?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ko,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(q,{id:`n5n_vi`})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Uo,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(q,{id:`NuH1jp`})})]}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.full_name})]},e.full_name))})})]})]}),t[64]=u,t[65]=j,t[66]=D,t[67]=Ce,t[68]=K,t[69]=T,t[70]=I,t[71]=ye,t[72]=i,t[73]=_e,t[74]=ue,t[75]=b,t[76]=le,t[77]=fe,t[78]=g,t[79]=Ee):Ee=t[79];let De;t[80]!==D||t[81]!==v||t[82]!==h?(De=!h&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{htmlFor:`clone-path`,className:`text-sm font-medium`,children:(0,Z.jsx)(q,{id:`Gp_twO`})}),(0,Z.jsx)(vl,{id:`clone-path`,placeholder:`~/Documents/repo-name`,value:v,onChange:e=>y(e.target.value),disabled:D})]}),t[80]=D,t[81]=v,t[82]=h,t[83]=De):De=t[83];let Oe;t[84]!==Ee||t[85]!==De?(Oe=(0,Z.jsx)(hn,{children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[Ee,De]})}),t[84]=Ee,t[85]=De,t[86]=Oe):Oe=t[86];let ke;t[87]!==D||t[88]!==re||t[89]!==se||t[90]!==g||t[91]!==h?(ke=(0,Z.jsx)(gn,{children:D?(0,Z.jsx)(Y,{variant:`outline`,className:`font-mono uppercase`,onClick:ae,children:(0,Z.jsx)(q,{id:`dEgA5A`})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Y,{variant:`outline`,className:`font-mono uppercase`,onClick:()=>se(!1),children:(0,Z.jsx)(q,{id:`dEgA5A`})}),(0,Z.jsx)(Y,{onClick:()=>void re(),disabled:!g.trim(),"aria-describedby":h?`clone-picker-hint`:void 0,children:(0,Z.jsx)(q,{id:`9UQ730`})}),h&&(0,Z.jsx)(`span`,{id:`clone-picker-hint`,className:`sr-only`,children:(0,Z.jsx)(q,{id:`EvPX7f`})})]})}),t[87]=D,t[88]=re,t[89]=se,t[90]=g,t[91]=h,t[92]=ke):ke=t[92];let Ae;t[93]!==Oe||t[94]!==ke?(Ae=(0,Z.jsxs)(mn,{className:`sm:max-w-lg`,children:[we,Oe,ke]}),t[93]=Oe,t[94]=ke,t[95]=Ae):Ae=t[95];let je;return t[96]!==se||t[97]!==n||t[98]!==Ae?(je=(0,Z.jsx)(vn,{open:n,onOpenChange:se,children:Ae}),t[96]=se,t[97]=n,t[98]=Ae,t[99]=je):je=t[99],je}function _0(e){return e.preventDefault()}function v0(e){return e.stopPropagation()}function y0(e){return e.stopPropagation()}function b0(e){return e.preventDefault()}function x0(e){return e.preventDefault()}function S0(e){return Math.max(e-1,-1)}var C0=(0,Q.lazy)(()=>n(()=>import(`./ConsentDialogBody-Cdr00Adv.js`),__vite__mapDeps([170,1,10,11,12,13,14,15,16,17,18,19,20,21,22,81,23,24,25,26,87,94,171,109,110,40,41,28,91,33,34]),import.meta.url));function w0(){let e=(0,$.c)(1);if(!(0,Q.useSyncExternalStore)(_l.subscribe,E0,T0))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(C0,{})}),e[0]=t):t=e[0],t}function T0(){return!1}function E0(){return _l.getSnapshot()!==null}function D0(e){let t=(0,$.c)(5),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`OpenKnowledge icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsxs)(`g`,{filter:`url(#filter0_d_ok)`,children:[(0,Z.jsx)(`path`,{d:`M66.8902 16.1017C58.2694 3.86669 46.1739 -0.690239 29.9182 2.17749C21.3995 3.67813 13.4602 9.555 8.67934 17.9009C3.93974 26.1701 2.98514 35.6533 6.05714 43.9166C9.31574 52.6868 16.7168 58.4752 24.2299 63.4231C25.7973 64.4562 26.1351 65.7172 26.3551 68.9896C26.5221 71.4625 26.799 75.6011 30.6842 77.7204C31.8176 78.3372 33.0648 78.6515 34.3946 78.6515C37.0796 78.6515 39.4033 77.3649 40.5189 76.7482C47.1049 73.1046 68.8878 59.7147 72.6453 40.4027C74.3444 31.6679 70.9797 21.9019 66.8922 16.1017H66.8902Z`,fill:`white`}),(0,Z.jsx)(`path`,{d:`M37.4214 71.154C28.7888 75.929 36.787 64.0397 27.7458 58.0843C21.6372 54.0616 14.788 49.0568 12.0499 41.6911C6.74463 27.4192 17.5438 10.8473 31.028 8.47262C45.1977 5.97613 54.6946 9.8947 61.6635 19.7844C65.2089 24.8167 67.6013 32.8365 66.3658 39.1828C63.6906 52.9341 49.073 64.7075 37.4214 71.154Z`,fill:`#69A3FF`}),(0,Z.jsx)(`path`,{d:`M52.7244 29.2638C53.4665 28.5217 54.6697 28.5217 55.4119 29.2638V29.2638C56.154 30.0059 56.154 31.2091 55.4119 31.9513L49.2589 38.1042L46.5715 35.4167L52.7244 29.2638Z`,fill:`#D5E5FF`}),(0,Z.jsx)(`path`,{d:`M55.4119 38.8821C56.154 39.6242 56.154 40.8274 55.4119 41.5696V41.5696C54.6698 42.3117 53.4665 42.3117 52.7244 41.5696L46.5715 35.4166L49.259 32.7292L55.4119 38.8821Z`,fill:`#D5E5FF`})]}),t[1]=r):r=t[1];let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(`defs`,{children:(0,Z.jsxs)(`filter`,{id:`filter0_d_ok`,x:`-9.53674e-07`,y:`-0.0799994`,width:`77.3817`,height:`85.8743`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,Z.jsx)(`feFlood`,{floodOpacity:`0`,result:`BackgroundImageFix`}),(0,Z.jsx)(`feColorMatrix`,{in:`SourceAlpha`,type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0`,result:`hardAlpha`}),(0,Z.jsx)(`feOffset`,{dy:`2.85714`}),(0,Z.jsx)(`feGaussianBlur`,{stdDeviation:`2.14286`}),(0,Z.jsx)(`feComposite`,{in2:`hardAlpha`,operator:`out`}),(0,Z.jsx)(`feColorMatrix`,{type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0`}),(0,Z.jsx)(`feBlend`,{mode:`normal`,in2:`BackgroundImageFix`,result:`effect1_dropShadow_ok`}),(0,Z.jsx)(`feBlend`,{mode:`normal`,in:`SourceGraphic`,in2:`effect1_dropShadow_ok`,result:`shape`})]})}),t[2]=i):i=t[2];let a;return t[3]===e?a=t[4]:(a=(0,Z.jsxs)(`svg`,{role:`img`,"aria-label":`OpenKnowledge icon`,fill:`none`,height:24,width:24,viewBox:`0 0 78 80`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var O0=(0,Q.lazy)(()=>n(()=>import(`./ShareReceiveDialog-hM8VMNZj.js`).then(e=>({default:e.ShareReceiveDialog})),__vite__mapDeps([172,1,6,2,3,7,8,9,10,11,12,23,16,17,18,19,24,25,22,26,30,94,164,165,166]),import.meta.url)),k0=(0,Q.lazy)(()=>n(()=>import(`./AppMenubar-CqSGRAc3.js`).then(e=>({default:e.AppMenubar})),__vite__mapDeps([155,1,10,11,12,16,17,18,19,40,108,14,15,24,41,21,87,22]),import.meta.url)),A0=(e,t,n)=>Lv(e,t,n,`NavigatorApp`);function j0(e,t){return e.filter(e=>e.path!==t)}function M0(e){let t=(0,$.c)(153),{bridge:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],t[0]=r):r=t[0];let[i,a]=(0,Q.useState)(r),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=new Map,t[1]=o):o=t[1];let[s,c]=(0,Q.useState)(o),[l,u]=(0,Q.useState)(!0),[d,f]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)(null),[h,g]=(0,Q.useState)(null),[_,v]=(0,Q.useState)(!1),[y,b]=(0,Q.useState)(!1),[x,S]=(0,Q.useState)(!1),[C,w]=(0,Q.useState)(!1),[T,E]=(0,Q.useState)(void 0),[D,O]=(0,Q.useState)(void 0),[k,A]=(0,Q.useState)(!1),[j,M]=(0,Q.useState)(!1),[N,P]=(0,Q.useState)(null),F=typeof window<`u`&&window.okDesktop!=null,[I,L]=(0,Q.useState)(`auth`),{theme:R}=It(),{_:z}=ht();xu(n,R??`system`);let B;t[2]!==z||t[3]!==n.project?(B=()=>{let e=!1;return n.project.listRecent().then(async t=>{if(e)return;a(t);let r=t.filter(N0),i=await Promise.all(r.map(async e=>{try{let{currentBranch:t}=await n.project.readHeadBranch(e.path);return[e.path,t]}catch{return[e.path,null]}}));e||c(e=>{let t=new Map(e);for(let[e,n]of i)t.set(e,n);return t})}).catch(t=>{console.error(`[NavigatorApp] listRecent failed:`,t),e||(m(t instanceof Error?t.message:z({id:`fYKgzG`})),f(!0))}).finally(()=>{e||u(!1)}),()=>{e=!0}},t[2]=z,t[3]=n.project,t[4]=B):B=t[4];let V;t[5]!==z||t[6]!==n?(V=[n,z],t[5]=z,t[6]=n,t[7]=V):V=t[7],(0,Q.useEffect)(B,V);let H,U;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(H=()=>Ht(e=>{e===`new-project`&&b(!0),e===`report-bug`&&S(!0),e===`send-feedback`&&w(!0),e===`close-active-tab-or-window`&&window.close()}),U=[],t[8]=H,t[9]=U):(H=t[8],U=t[9]),(0,Q.useEffect)(H,U);let W,G;t[10]===n?(W=t[11],G=t[12]):(W=()=>n.onRecentRemovedMissing(e=>{let{path:t}=e;a(e=>j0(e,t)),c(e=>{if(!e.has(t))return e;let n=new Map(e);return n.delete(t),n})}),G=[n],t[10]=n,t[11]=W,t[12]=G),(0,Q.useEffect)(W,G);let K;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(K=(e,t)=>A0(e,t,m),t[13]=K):K=t[13];let ee=K,te;t[14]!==z||t[15]!==n?(te=(e,t,r)=>ee(()=>(g(r),R0(n,e,t).finally(()=>g(null))),z({id:`SUOoXn`})),t[14]=z,t[15]=n,t[16]=te):te=t[16];let ne=te,re;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(re=()=>v(!0),t[17]=re):re=t[17];let ie=re,ae;t[18]!==z||t[19]!==n?(ae=()=>ee(async()=>{let e=await n.dialog.openFolder();e&&(g(z0(e)),await R0(n,e,`pick-existing`).finally(()=>g(null)))},z({id:`gmJ0An`})),t[18]=z,t[19]=n,t[20]=ae):ae=t[20];let oe=ae,se;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(se=()=>b(!0),t[21]=se):se=t[21];let ce=se,le;t[22]!==z||t[23]!==n.project?(le=()=>ee(()=>n.project.openFile(),z({id:`8vCZcs`})),t[22]=z,t[23]=n.project,t[24]=le):le=t[24];let ue=le,de;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(de=(e,t)=>{E(e),O(t),b(!0)},t[25]=de):de=t[25];let fe=de,pe;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(pe=e=>{b(e),e||(E(void 0),O(void 0))},t[26]=pe):pe=t[26];let me=pe,he;t[27]===ne?he=t[28]:(he=e=>ne(e,`recents`,z0(e)),t[27]=ne,t[28]=he);let ge=he,_e;t[29]!==z||t[30]!==n.project?(_e=e=>ee(async()=>{await n.project.removeRecent(e),a(t=>j0(t,e)),c(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},z({id:`viwC-K`})),t[29]=z,t[30]=n.project,t[31]=_e):_e=t[31];let ve=_e,ye;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 top-0 z-10 h-9 ${F?`[-webkit-app-region:drag]`:``}`,"data-electron-drag":F?``:void 0,"data-testid":`nav-chrome-row`,children:mF()&&(0,Z.jsx)(`div`,{className:`pointer-events-auto flex h-full items-center px-2`,children:(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(k0,{})})})}),t[32]=ye):ye=t[32];let be;t[33]!==z||t[34]!==h?(be=h===null?null:(0,Z.jsxs)(`div`,{className:`absolute inset-0 z-20 flex flex-col items-center justify-center gap-3 bg-primary-foreground/85 dark:bg-background/85 backdrop-blur-sm`,"data-testid":`nav-opening-overlay`,role:`status`,"aria-live":`polite`,children:[(0,Z.jsx)(qc,{className:`size-6 animate-spin text-muted-foreground`}),(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:z({id:`s0_GnA`,values:{openingLabel:h}})})]}),t[33]=z,t[34]=h,t[35]=be):be=t[35];let xe;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,Z.jsx)(D0,{className:`size-12 shrink-0`}),t[36]=xe):xe=t[36];let Se;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`h1`,{className:`font-medium text-xl tracking-tight`,children:`OpenKnowledge`}),(0,Z.jsx)(XF,{})]}),t[37]=Se):Se=t[37];let Ce;t[38]===n.appVersion?Ce=t[39]:(Ce=(0,Z.jsxs)(`header`,{className:`shrink-0 flex-wrap flex items-center gap-2.5`,children:[xe,(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[Se,(0,Z.jsxs)(`p`,{className:`text-muted-foreground text-xs font-mono`,children:[`v`,n.appVersion]})]})]}),t[38]=n.appVersion,t[39]=Ce);let we;t[40]===z?we=t[41]:(we=z({id:`wbv9xO`}),t[40]=z,t[41]=we);let Te;t[42]===z?Te=t[43]:(Te=z({id:`0uTHCg`}),t[42]=z,t[43]=Te);let Ee;t[44]!==we||t[45]!==Te?(Ee=(0,Z.jsx)(P0,{title:we,description:Te,onClick:ce,dataTestId:`nav-create-new`,Icon:Ut}),t[44]=we,t[45]=Te,t[46]=Ee):Ee=t[46];let De;t[47]===z?De=t[48]:(De=z({id:`WPwDin`}),t[47]=z,t[48]=De);let Oe;t[49]===z?Oe=t[50]:(Oe=z({id:`tUvUfp`}),t[49]=z,t[50]=Oe);let ke;t[51]!==oe||t[52]!==De||t[53]!==Oe?(ke=(0,Z.jsx)(P0,{title:De,description:Oe,onClick:oe,dataTestId:`nav-open`,Icon:dc}),t[51]=oe,t[52]=De,t[53]=Oe,t[54]=ke):ke=t[54];let Ae;t[55]===z?Ae=t[56]:(Ae=z({id:`ka6Eke`}),t[55]=z,t[56]=Ae);let je;t[57]===z?je=t[58]:(je=z({id:`gOD68k`}),t[57]=z,t[58]=je);let Me;t[59]!==ue||t[60]!==Ae||t[61]!==je?(Me=(0,Z.jsx)(P0,{title:Ae,description:je,onClick:ue,dataTestId:`nav-open-file`,Icon:Wn}),t[59]=ue,t[60]=Ae,t[61]=je,t[62]=Me):Me=t[62];let Ne;t[63]===z?Ne=t[64]:(Ne=z({id:`VdXv4D`}),t[63]=z,t[64]=Ne);let Pe;t[65]===z?Pe=t[66]:(Pe=z({id:`JOcPqH`}),t[65]=z,t[66]=Pe);let Fe;t[67]!==Ne||t[68]!==Pe?(Fe=(0,Z.jsx)(P0,{title:Ne,description:Pe,onClick:ie,dataTestId:`nav-clone`,Icon:Xg}),t[67]=Ne,t[68]=Pe,t[69]=Fe):Fe=t[69];let Ie;t[70]!==Ee||t[71]!==ke||t[72]!==Me||t[73]!==Fe?(Ie=(0,Z.jsxs)(`section`,{className:`grid sm:grid-cols-2 gap-3`,children:[Ee,ke,Me,Fe]}),t[70]=Ee,t[71]=ke,t[72]=Me,t[73]=Fe,t[74]=Ie):Ie=t[74];let Le;t[75]!==l||t[76]!==i||t[77]!==d?(Le=!l&&!d&&i.length===0?(0,Z.jsx)(I0,{onPackSelect:fe}):null,t[75]=l,t[76]=i,t[77]=d,t[78]=Le):Le=t[78];let Re;t[79]!==Ie||t[80]!==Le?(Re=(0,Z.jsxs)(`div`,{className:`shrink-0 space-y-6`,children:[Ie,Le]}),t[79]=Ie,t[80]=Le,t[81]=Re):Re=t[81];let ze;t[82]===p?ze=t[83]:(ze=p===null?null:(0,Z.jsxs)(`div`,{className:`flex shrink-0 items-start justify-between gap-3 rounded-md border border-red-500/30 bg-red-500/10 px-3 py-2`,"data-testid":`nav-error-banner`,role:`alert`,children:[(0,Z.jsx)(`span`,{className:`text-red-700 text-xs dark:text-red-300`,children:p}),(0,Z.jsx)(Y,{type:`button`,variant:`link`,size:`sm`,onClick:()=>m(null),className:`h-auto p-0 text-red-700 text-xs dark:text-red-300`,"data-testid":`nav-error-dismiss`,children:(0,Z.jsx)(q,{id:`1QfxQT`})})]}),t[82]=p,t[83]=ze);let Be;t[84]!==l||t[85]!==ge||t[86]!==ve||t[87]!==s||t[88]!==i?(Be=l?(0,Z.jsx)(`section`,{className:`flex shrink-0 flex-col items-center`,children:(0,Z.jsx)(qc,{className:`size-4 animate-spin text-muted-foreground/60`})}):i.length>0?(0,Z.jsxs)(`section`,{className:`flex min-h-0 flex-col`,children:[(0,Z.jsx)(`h2`,{className:`mb-2 shrink-0 font-medium text-muted-foreground font-mono text-xs uppercase tracking-wide`,children:(0,Z.jsx)(q,{id:`CCTop_`})}),(0,Z.jsx)(`ul`,{className:`min-h-0 max-h-48 subtle-scrollbar scroll-fade-mask overflow-y-auto space-y-0.5 -mx-4`,"data-testid":`nav-recent-list`,children:i.map(e=>(0,Z.jsx)(L0,{project:e,branch:s.get(e.path)??null,onOpen:()=>ge(e.path),onRemove:()=>ve(e.path)},e.path))})]}):null,t[84]=l,t[85]=ge,t[86]=ve,t[87]=s,t[88]=i,t[89]=Be):Be=t[89];let Ve;t[90]!==Ce||t[91]!==Re||t[92]!==ze||t[93]!==Be?(Ve=(0,Z.jsx)(`div`,{className:`mx-auto flex h-full w-full max-w-5xl flex-col overflow-hidden px-12 py-12`,children:(0,Z.jsxs)(`div`,{className:`my-auto flex min-h-0 flex-col space-y-10`,children:[Ce,Re,ze,Be]})}),t[90]=Ce,t[91]=Re,t[92]=ze,t[93]=Be,t[94]=Ve):Ve=t[94];let He,Ue;t[95]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,Z.jsx)(S1,{}),Ue=(0,Z.jsx)(w0,{}),t[95]=He,t[96]=Ue):(He=t[95],Ue=t[96]);let We;t[97]!==n||t[98]!==y||t[99]!==T||t[100]!==D?(We=(0,Z.jsx)(Ig,{open:y,onOpenChange:me,bridge:n,initialPackId:T,packs:D}),t[97]=n,t[98]=y,t[99]=T,t[100]=D,t[101]=We):We=t[101];let Ge;t[102]===x?Ge=t[103]:(Ge=(0,Z.jsx)(am,{open:x,onOpenChange:S,systemWide:!0}),t[102]=x,t[103]=Ge);let Ke;t[104]===C?Ke=t[105]:(Ke=(0,Z.jsx)(U_,{open:C,onOpenChange:w,source:`help_menu`}),t[104]=C,t[105]=Ke);let qe;t[106]===N?qe=t[107]:(qe=e=>{A(e),e||(M(!1),N&&(N(null),P(null)))},t[106]=N,t[107]=qe);let Je;t[108]===n?Je=t[109]:(Je=bs(n),t[108]=n,t[109]=Je);let Ye;t[110]===n?Ye=t[111]:(Ye=fs(n),t[110]=n,t[111]=Ye);let Xe=I===`identity`,Ze;t[112]!==j||t[113]!==N?(Ze=e=>{A(!1),j&&(M(!1),v(!0)),N&&(N({authenticated:!0,host:`github.com`,login:e.login}),P(null))},t[112]=j,t[113]=N,t[114]=Ze):Ze=t[114];let Qe;t[115]!==k||t[116]!==qe||t[117]!==Je||t[118]!==Ye||t[119]!==Xe||t[120]!==Ze?(Qe=(0,Z.jsx)(vs,{open:k,onOpenChange:qe,transport:Je,queryTransport:Ye,identityPrompt:Xe,onSuccess:Ze}),t[115]=k,t[116]=qe,t[117]=Je,t[118]=Ye,t[119]=Xe,t[120]=Ze,t[121]=Qe):Qe=t[121];let $e;t[122]===n?$e=t[123]:($e=p0(n),t[122]=n,t[123]=$e);let et;t[124]===n?et=t[125]:(et=fs(n),t[124]=n,t[125]=et);let tt;t[126]===n.dialog?tt=t[127]:(tt=()=>n.dialog.openFolder(),t[126]=n.dialog,t[127]=tt);let nt;t[128]===Symbol.for(`react.memo_cache_sentinel`)?(nt=()=>{v(!1),L(`auth`),M(!0),A(!0)},t[128]=nt):nt=t[128];let rt;t[129]!==z||t[130]!==n?(rt=e=>{let{dir:t}=e;ee(()=>(g(z0(t)),R0(n,t,`pick-existing`).finally(()=>g(null))),z({id:`iSnkwB`}))},t[129]=z,t[130]=n,t[131]=rt):rt=t[131];let it;t[132]!==_||t[133]!==$e||t[134]!==et||t[135]!==tt||t[136]!==rt?(it=(0,Z.jsx)(g0,{open:_,onOpenChange:v,transport:$e,authQueryTransport:et,pickParentFolder:tt,onSignIn:nt,onCloneComplete:rt}),t[132]=_,t[133]=$e,t[134]=et,t[135]=tt,t[136]=rt,t[137]=it):it=t[137];let at;if(t[138]!==n){let e;t[140]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>new Promise(e=>{P(()=>e),A(!0)}),t[140]=e):e=t[140],at=d0({bridge:n,authQueryTransport:fs(n),cloneTransport:p0(n),openSignIn:e}),t[138]=n,t[139]=at}else at=t[139];let ot;t[141]!==n||t[142]!==at?(ot=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(O0,{bridge:n,cloneController:at})}),t[141]=n,t[142]=at,t[143]=ot):ot=t[143];let st;return t[144]!==be||t[145]!==Ve||t[146]!==We||t[147]!==Ge||t[148]!==Ke||t[149]!==Qe||t[150]!==it||t[151]!==ot?(st=(0,Z.jsxs)(`div`,{className:`relative flex h-screen w-screen flex-col overflow-hidden bg-primary-foreground dark:bg-background text-foreground`,children:[ye,be,Ve,He,Ue,We,Ge,Ke,Qe,it,ot]}),t[144]=be,t[145]=Ve,t[146]=We,t[147]=Ge,t[148]=Ke,t[149]=Qe,t[150]=it,t[151]=ot,t[152]=st):st=t[152],st}function N0(e){return!e.missing}function P0(e){let t=(0,$.c)(14),{title:n,description:r,onClick:i,dataTestId:a,Icon:o}=e,s;t[0]===o?s=t[1]:(s=o?(0,Z.jsx)(o,{className:`size-4 shrink-0 text-muted-foreground`}):null,t[0]=o,t[1]=s);let c;t[2]===n?c=t[3]:(c=(0,Z.jsx)(`span`,{className:`font-medium text-foreground text-sm`,children:n}),t[2]=n,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=(0,Z.jsx)(`span`,{className:`line-clamp-2 text-muted-foreground text-xs leading-snug`,children:r}),t[7]=r,t[8]=u);let d;return t[9]!==a||t[10]!==i||t[11]!==l||t[12]!==u?(d=(0,Z.jsxs)(Y,{type:`button`,variant:`outline`,onClick:i,"data-testid":a,className:`h-auto flex-col items-start justify-start gap-1.5 whitespace-normal bg-card px-4 py-3.5 text-left`,children:[l,u]}),t[9]=a,t[10]=i,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}var F0=3;function I0(e){let t=(0,$.c)(36),{onPackSelect:n}=e,{_:r}=ht(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(!1),c,l;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=!1;return(async()=>{try{let t=await yv().listPacks();if(e)return;t.ok?a(t.packs):(console.error(`[NavigatorApp] listPacks returned error:`,t),a([]))}catch(t){let n=t;if(e)return;console.error(`[NavigatorApp] listPacks failed:`,n),a([])}})(),()=>{e=!0}},l=[],t[0]=c,t[1]=l):(c=t[0],l=t[1]),(0,Q.useEffect)(c,l),i===null||i.length===0)return null;let u,d,f,p,m,h,g;if(t[2]!==n||t[3]!==i){let e=i.slice(0,F0);u=i.length-e.length,d=e=>{s(!1),n(e,i)},m=`flex flex-wrap items-center gap-x-3 gap-y-2`,h=`nav-starter-packs`,t[11]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:(0,Z.jsx)(q,{id:`C-xgad`})}),t[11]=g):g=t[11],f=`flex flex-wrap items-center gap-2`;let r;t[12]===d?r=t[13]:(r=e=>{let t=xv(e.id);return(0,Z.jsxs)(Y,{type:`button`,variant:`outline`,size:`sm`,className:`rounded-full`,onClick:()=>d(e.id),"data-testid":`nav-pack-pill-${e.id}`,children:[(0,Z.jsx)(t,{className:`size-3.5 text-muted-foreground`}),e.name]},e.id)},t[12]=d,t[13]=r),p=e.map(r),t[2]=n,t[3]=i,t[4]=u,t[5]=d,t[6]=f,t[7]=p,t[8]=m,t[9]=h,t[10]=g}else u=t[4],d=t[5],f=t[6],p=t[7],m=t[8],h=t[9],g=t[10];let _;t[14]!==r||t[15]!==u||t[16]!==i.length?(_=u>0?(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`sm`,className:`rounded-full`,onClick:()=>s(!0),"aria-label":r({id:`e4FxjG`,values:{0:i.length}}),"data-testid":`nav-pack-more`,children:(0,Z.jsx)(q,{id:`B6Lac2`,values:{overflowCount:u}})}):null,t[14]=r,t[15]=u,t[16]=i.length,t[17]=_):_=t[17];let v;t[18]!==f||t[19]!==p||t[20]!==_?(v=(0,Z.jsxs)(`div`,{className:f,children:[p,_]}),t[18]=f,t[19]=p,t[20]=_,t[21]=v):v=t[21];let y;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(pn,{children:(0,Z.jsx)(q,{id:`tcjTlU`})}),t[22]=y):y=t[22];let b;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,Z.jsxs)(_n,{children:[y,(0,Z.jsx)(fn,{children:(0,Z.jsx)(q,{id:`b6Fgpe`})})]}),t[23]=b):b=t[23];let x;t[24]!==i||t[25]!==d?(x=(0,Z.jsxs)(mn,{className:`sm:max-w-3xl`,"data-testid":`nav-pack-picker`,children:[b,(0,Z.jsx)(hn,{children:(0,Z.jsx)(Sv,{packs:i,onPackSelect:d})})]}),t[24]=i,t[25]=d,t[26]=x):x=t[26];let S;t[27]!==o||t[28]!==x?(S=(0,Z.jsx)(vn,{open:o,onOpenChange:s,children:x}),t[27]=o,t[28]=x,t[29]=S):S=t[29];let C;return t[30]!==S||t[31]!==m||t[32]!==h||t[33]!==g||t[34]!==v?(C=(0,Z.jsxs)(`section`,{className:m,"data-testid":h,children:[g,v,S]}),t[30]=S,t[31]=m,t[32]=h,t[33]=g,t[34]=v,t[35]=C):C=t[35],C}function L0(e){let t=(0,$.c)(43),{project:n,branch:r,onOpen:i,onRemove:a}=e,{_:o}=ht(),{name:s}=n,c=n.isLinkedWorktree===!0,l=c?n.branch??r:r,u=n.path,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(Fh,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-muted-foreground`}),t[0]=d):d=t[0];let f;t[1]===n.name?f=t[2]:(f=(0,Z.jsx)(`span`,{className:`truncate font-medium text-sm text-gray-700 dark:text-foreground`,children:n.name}),t[1]=n.name,t[2]=f);let p;t[3]===c?p=t[4]:(p=c?(0,Z.jsxs)(vu,{variant:`secondary`,className:`shrink-0 gap-1 rounded-full border-transparent bg-green-600/10 px-2 py-0 font-medium text-2xs text-green-800 dark:bg-green-400/10 dark:text-green-400`,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`size-2.5`}),(0,Z.jsx)(q,{id:`z-lawV`})]}):null,t[3]=c,t[4]=p);let m;t[5]!==f||t[6]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[f,p]}),t[5]=f,t[6]=p,t[7]=m):m=t[7];let h=c?n.mainRoot??``:n.path,g;t[8]!==c||t[9]!==n.mainRoot||t[10]!==n.path?(g=c?(0,Z.jsx)(q,{id:`PRnH8G`,values:{0:Kv(n.mainRoot??``)}}):n.path,t[8]=c,t[9]=n.mainRoot,t[10]=n.path,t[11]=g):g=t[11];let _;t[12]!==h||t[13]!==g?(_=(0,Z.jsx)(`span`,{className:`truncate w-full text-muted-foreground text-xs`,title:h,children:g}),t[12]=h,t[13]=g,t[14]=_):_=t[14];let v;t[15]!==m||t[16]!==_?(v=(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[d,(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 truncate`,children:[m,_]})]}),t[15]=m,t[16]=_,t[17]=v):v=t[17];let y;t[18]!==n.path||t[19]!==l?(y=l==null?null:(0,Z.jsxs)(`span`,{className:`flex max-w-[40%] items-center gap-1 text-muted-foreground text-xs`,"data-testid":`nav-recent-branch-${n.path}`,children:[(0,Z.jsx)(lo,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,Z.jsx)(`span`,{className:`truncate font-mono`,children:l})]}),t[18]=n.path,t[19]=l,t[20]=y):y=t[20];let b;t[21]!==i||t[22]!==y||t[23]!==v?(b=(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,onClick:i,className:`h-auto min-w-0 flex-1 justify-between gap-3 py-3.5 pl-4 pr-2 text-left hover:bg-transparent`,children:[v,y]}),t[21]=i,t[22]=y,t[23]=v,t[24]=b):b=t[24];let x;t[25]!==o||t[26]!==s?(x=o({id:`hDoLrm`,values:{projectName:s}}),t[25]=o,t[26]=s,t[27]=x):x=t[27];let S;t[28]===o?S=t[29]:(S=o({id:`Es-eZU`}),t[28]=o,t[29]=S);let C=`nav-recent-remove-${n.path}`,w;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsx)(fl,{"aria-hidden":`true`}),t[30]=w):w=t[30];let T;t[31]!==a||t[32]!==x||t[33]!==S||t[34]!==C?(T=(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:a,"aria-label":x,title:S,className:`pointer-events-none mr-2 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 focus-visible:pointer-events-auto focus-visible:opacity-100`,"data-testid":C,children:w}),t[31]=a,t[32]=x,t[33]=S,t[34]=C,t[35]=T):T=t[35];let E;t[36]!==b||t[37]!==T?(E=(0,Z.jsxs)(`li`,{className:`group flex items-center justify-between rounded-lg hover:bg-accent`,children:[b,T]}),t[36]=b,t[37]=T,t[38]=E):E=t[38];let D;return t[39]!==a||t[40]!==n.path||t[41]!==E?(D=(0,Z.jsx)(oy,{path:u,onRemoveRecent:a,testIdPrefix:`nav-recent`,children:E}),t[39]=a,t[40]=n.path,t[41]=E,t[42]=D):D=t[42],D}async function R0(e,t,n){await e.project.open({path:t,target:`new-window`,entryPoint:n})}function z0(e){let t=e.split(/[/\\]/).filter(Boolean);return t.length>0?t[t.length-1]??e:e}var B0=(0,Q.lazy)(()=>n(()=>import(`./TerminalWindowApp-D1MufP7s.js`).then(e=>({default:e.TerminalWindowApp})),__vite__mapDeps([173,1,75,6,2,3,7,8,9,59,12,22,11,76,77,78,158,106,19,38,10,16,17,18,40,107,108,14,15,24,41,21,87,82,28,42,25,113,100,80,159,116,101,32,33,34,30,93,85,26,94,131,132,157,117,174,175]),import.meta.url));function V0(e){return e?.config.mode===`terminal`?(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(B0,{bridge:e})}):e?.config.mode===`navigator`?(0,Z.jsx)(M0,{bridge:e}):(0,Z.jsx)(s0,{})}function H0(){let e=null,t=new Set,n=!1,r=null;function i(){for(let e of t)e()}function a(){e!==null&&(e=null,i())}return{install({bridge:t}){let o=t?.bugReport?.onCrashDetected;if(typeof o==`function`)return n?r??void 0:(n=!0,r=o(t=>{e=t,i()}),()=>{r?.(),r=null,n=!1,a()})},getSnapshot(){return e},subscribe(e){return t.add(e),()=>{t.delete(e)}},dismiss(){a()}}}var U0=H0();function W0(e){return U0.install(e)}function G0(e){let t=(0,$.c)(7),{bridge:n}=e,r=(0,Q.useSyncExternalStore)(U0.subscribe,U0.getSnapshot);if(r===null)return null;let i;t[0]!==n.bugReport||t[1]!==r?(i=e=>{e||(n.bugReport.crashAck({eventId:r.eventId}),U0.dismiss())},t[0]=n.bugReport,t[1]=r,t[2]=i):i=t[2];let a=n.config.mode===`navigator`,o;return t[3]!==r||t[4]!==i||t[5]!==a?(o=(0,Z.jsx)(am,{open:!0,onOpenChange:i,systemWide:a,crashInvite:r}),t[3]=r,t[4]=i,t[5]=a,t[6]=o):o=t[6],o}var K0=e=>{let t=(0,$.c)(8),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let{theme:r}=It(),i=r===void 0?`system`:r,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={success:(0,Z.jsx)(Go,{className:`size-4`}),info:(0,Z.jsx)(Kc,{className:`size-4`}),warning:(0,Z.jsx)(sl,{className:`size-4`}),error:(0,Z.jsx)(Xh,{className:`size-4`}),loading:(0,Z.jsx)(qc,{className:`size-4 animate-spin`})},o={"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},t[2]=a,t[3]=o):(a=t[2],o=t[3]);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={classNames:{toast:`cn-toast`}},t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==i?(c=(0,Z.jsx)(pl,{theme:i,className:`toaster group`,icons:a,style:o,toastOptions:s,...n}),t[5]=n,t[6]=i,t[7]=c):c=t[7],c},q0=Symbol.for(`ok.client.fetchWrapper`);function J0(e={}){if(typeof window>`u`)return;let t=e.apiOrigin&&e.apiOrigin.length>0?e.apiOrigin:void 0;if(window.fetch[q0])return;let n=window.fetch.bind(window),r=Eu(),i=((e,i)=>{let a=X0(e,t);if(!a.isApi)return n(e,i);if(e instanceof Request){let t=Y0(e.headers,r);return n(new Request(a.url,e),{headers:t})}let o=Y0(i?.headers,r);return n(a.url,{...i,headers:o})});i[q0]=!0,window.fetch=i}function Y0(e,t){let n=new Headers(e);for(let[e,r]of Object.entries(t))n.set(e,r);return n}function X0(e,t){if(typeof e==`string`){if(e.startsWith(`/api/`))return{isApi:!0,url:t?t+e:e};let n=Z0(e);return n&&Q0(n,t)?{isApi:!0,url:e}:{isApi:!1,url:e}}let n=e instanceof URL?e:Z0(e.url,window.location.origin);if(n&&Q0(n,t)){let r=e instanceof URL?e.href:e.url;return t&&(n.origin===window.location.origin||n.protocol===`file:`)?{isApi:!0,url:t+n.pathname+n.search+n.hash}:{isApi:!0,url:r}}return{isApi:!1,url:e instanceof URL?e.href:e.url}}function Z0(e,t){try{return new URL(e,t)}catch{return null}}function Q0(e,t){if(!e.pathname.startsWith(`/api/`))return!1;if(e.origin===window.location.origin||e.protocol===`file:`)return!0;if(t){let n=Z0(t);if(n&&e.origin===n.origin)return!0}return!1}var $0=Symbol.for(`ok.client.logForwarder`),e2=2e3,t2=[`log`,`info`,`warn`,`error`],n2={log:`info`,info:`info`,warn:`warn`,error:`error`};function r2(e){if(typeof e==`string`)return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function i2(e){let t=e.message.length+80;if(e.event&&(t+=e.event.length),e.fields)try{t+=JSON.stringify(e.fields).length}catch{}return t}function a2(e={}){let t=e.windowObj??(typeof window<`u`?window:void 0);if(!t||t.okDesktop)return;let n=t;if(n[$0])return;n[$0]=!0;let r=e.consoleObj??console,i=e.documentObj===void 0?typeof document<`u`?document:null:e.documentObj,a=e.flushIntervalMs??e2,o=e.fetchImpl??n.fetch.bind(n),s=e.now??Date.now,c=[],l=0,u=null,d=!1,f=0,p={log:r.log.bind(r),info:r.info.bind(r),warn:r.warn.bind(r),error:r.error.bind(r)};function m(){if(u!==null&&(clearTimeout(u),u=null),c.length===0)return;let e=c.splice(0,100);l=0;let t=f;d=!0;try{o(`/api/client-logs`,{method:`POST`,headers:{"content-type":`application/json`},keepalive:!0,body:JSON.stringify(t>0?{entries:e,droppedSinceLastFlush:t}:{entries:e})}).then(n=>{n.ok?f=Math.max(0,f-t):f+=e.length},()=>{f+=e.length})}catch{f+=e.length}finally{d=!1}}function h(e){if(c.push(e),l+=i2(e),c.length>100){let e=c.shift();e&&(l-=i2(e),f+=1)}if(c.length>=100||l>=32768){m();return}u===null&&(u=setTimeout(m,a))}function g(e,t){if(!d)try{let n=Ba(t.map(r2).join(` `)),r=t[0],i=typeof r==`string`&&r.length<=32768?r:void 0,a=i?Ii(i):null,o=a?.fields;if(o)try{JSON.stringify(o).length>8192&&(o=void 0)}catch{o=void 0}h({level:e,message:n,ts:s(),...a?.event?{event:a.event}:{},...o?{fields:o}:{}})}catch{}}for(let e of t2)r[e]=(...t)=>{p[e](...t),g(n2[e],t)};let _=e=>{if(d)return;let t=e;g(`error`,[`uncaught error: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`])},v=e=>{d||g(`error`,[`unhandledrejection: ${r2(e.reason)}`])},y=()=>m(),b=()=>{i&&i.visibilityState===`hidden`&&m()};n.addEventListener(`error`,_),n.addEventListener(`unhandledrejection`,v),n.addEventListener(`pagehide`,y),i&&i.addEventListener(`visibilitychange`,b);function x(){for(let e of t2)r[e]=p[e];n.removeEventListener(`error`,_),n.removeEventListener(`unhandledrejection`,v),n.removeEventListener(`pagehide`,y),i&&i.removeEventListener(`visibilitychange`,b),u!==null&&(clearTimeout(u),u=null),c.length=0,delete n[$0]}return{flushNow:m,uninstall:x}}function o2(e,t){return e.branch===void 0||e.branch===null||e.branch===``||t===``||e.multiCandidate!==!0?null:{message:`Opened on branch ${e.branch}`,description:t}}function s2(e){let t=e.bridge;if(!t)return;let n=e.setHash??(e=>{window.location.hash=e}),r=e.emitToast??((e,t)=>{X(e,t)});return t.onDeepLink(e=>{let i=e.kind??`doc`,a={kind:i,path:e.doc,branch:e.branch??null};if(e.targetMissing===!0){Jc.arm(a);return}oc.arm(a),n(uu(i,e.doc,i===`doc`?e.branch:void 0));let o=o2(e,t.config.projectPath);o!==null&&r(o.message,{description:o.description,duration:3e3})})}var c2=4e3,l2=1440*60*1e3;function u2(e){let t=e.bridge;if(t&&t.onboarding)return t.onboarding.onToast(e=>{if(e.kind===`ancestor-promote`){X.success(`Opened existing OpenKnowledge project at ${e.ancestorPath}`,{duration:c2});return}if(e.kind===`startup-reclaim`){let t=[];if(e.mcp.status===`repaired`){let n=e.mcp.editors.map(e=>Wi[e]??e).join(`, `);t.push(`repaired ${n} MCP integration`)}else e.mcp.status===`failed`&&t.push(`MCP auto-repair failed`);e.path.status===`installed`&&t.push(e.path.summary),e.path.status===`failed`&&t.push(`PATH install failed: ${e.path.summary}`);let n=t.length>0?t.join(`; `):`OpenKnowledge integrations checked.`,r=e.mcp.status===`failed`||e.path.status===`failed`,i=e.path.status!==`none`;X[r?`error`:`success`](n,{duration:r||i?l2:c2,position:`bottom-left`});return}if(e.kind===`sharing-refused-tracked`){X.error(`Config sharing unchanged: ${e.tracked.length} OK file(s) tracked upstream — see message below.`,{duration:l2,description:e.remediation});return}if(e.kind===`sharing-no-git`){X.warning(`Local-only requested but no git repository was created. Switch later via Settings → Config sharing once the project is in a git repo.`,{duration:c2});return}let t=gl(e.gitRoot,e.pickedPath)??e.pickedPath;X.success(`Initialized OpenKnowledge at ${e.gitRoot} — opened parent of ${t} because it contains a .git folder`,{duration:c2})})}function d2(e){return yl._({id:`wXw19Y`,values:{projectName:e}})}function f2(e){let t=e.bridge;if(t)return t.onRecentRemovedMissing(({projectName:e})=>{X(d2(e))})}function p2(e){let t=(0,$.c)(18),{body:n,warning:r,restartLabel:i,cancelLabel:a,onRestart:o,onDismiss:s}=e,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(sl,{className:`mt-0.5 size-4 shrink-0 text-amber-500`}),t[0]=c):c=t[0];let l;t[1]===n?l=t[2]:(l=(0,Z.jsx)(`p`,{className:`font-medium text-sm`,children:n}),t[1]=n,t[2]=l);let u;t[3]===r?u=t[4]:(u=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:r}),t[3]=r,t[4]=u);let d;t[5]!==o||t[6]!==i?(d=(0,Z.jsx)(Y,{size:`sm`,onClick:o,children:i}),t[5]=o,t[6]=i,t[7]=d):d=t[7];let f;t[8]!==a||t[9]!==s?(f=(0,Z.jsx)(Y,{size:`sm`,variant:`ghost`,onClick:s,children:a}),t[8]=a,t[9]=s,t[10]=f):f=t[10];let p;t[11]!==d||t[12]!==f?(p=(0,Z.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-2`,children:[d,f]}),t[11]=d,t[12]=f,t[13]=p):p=t[13];let m;return t[14]!==l||t[15]!==u||t[16]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex w-full gap-3 rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg`,children:[c,(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[l,u,p]})]}),t[14]=l,t[15]=u,t[16]=p,t[17]=m):m=t[17],m}function m2(){return yl._({id:`f_PkYv`})}function h2(e){return e.serverRuntime===e.appRuntime?yl._({id:`FWQuPE`,values:{0:e.appRuntime}}):e.relation===`older`?yl._({id:`LhQlGR`,values:{0:e.serverRuntime,1:e.appRuntime}}):yl._({id:`yZmvQ4`,values:{0:e.serverRuntime,1:e.appRuntime}})}function g2(e){return yl._({id:`2YOwme`,values:{appRuntime:e}})}function _2(e){return e===`eperm`?yl._({id:`uQewpR`}):yl._({id:`PqYWiC`})}async function v2(e){let t=X.loading(yl._({id:`Kf7GG5`}),{duration:1/0}),n;try{n=await e.restartServer(e.config.projectPath)}catch{return}X.dismiss(t),n.ok===!1&&X.error(_2(n.reason),{duration:1/0})}function y2(e){let t=e.bridge;if(!t)return;let n=t.onServerVersionDrift(e=>{X.custom(n=>(0,Q.createElement)(p2,{body:h2(e),warning:m2(),restartLabel:yl._({id:`ppDgFi`}),cancelLabel:yl._({id:`PBxg_E`}),onRestart:()=>{X.dismiss(n),v2(t)},onDismiss:()=>X.dismiss(n)}),{duration:1/0})}),r=t.onServerRestarted(e=>{X.success(g2(e.appRuntime))});return()=>{n(),r()}}function b2(e){let{initialDoc:t}=e;if(!t)return;let n=e.getHash();n!==``&&n!==`#`&&n!==`#/`||e.setHash(hu(t))}function x2(){typeof window>`u`||!window.okDesktop||b2({initialDoc:window.okDesktop.config.initialDoc,getHash:()=>window.location.hash,setHash:e=>{window.location.hash=e}})}hp(),n(()=>import(`./telemetry-startup-DukOvXUN.js`).then(e=>e.initStartupTrace()),__vite__mapDeps([176,0,1,2,3,4,58,22,12,11]),import.meta.url),J0({apiOrigin:typeof window<`u`?window.okDesktop?.config.apiOrigin:void 0}),a2(),OD()&&PD(),IR(),PE(),gL(),nL(),AF(),typeof window<`u`&&s2({bridge:window.okDesktop}),typeof window<`u`&&y2({bridge:window.okDesktop}),typeof window<`u`&&f2({bridge:window.okDesktop}),typeof window<`u`&&fp({bridge:window.okDesktop}),typeof window<`u`&&hl({bridge:window.okDesktop}),typeof window<`u`&&u2({bridge:window.okDesktop}),typeof window<`u`&&mp({bridge:window.okDesktop}),typeof window<`u`&&W0({bridge:window.okDesktop}),x2();var S2=new xp({defaultOptions:{queries:{retry:1,staleTime:1e4}}}),C2=document.getElementById(`root`);if(!C2)throw Error(`Root element not found`);var w2=typeof window>`u`?void 0:window.okDesktop;function T2(){return ai(),null}(0,Ep.createRoot)(C2).render((0,Z.jsx)(Q.StrictMode,{children:(0,Z.jsx)(gt,{i18n:yl,children:(0,Z.jsxs)(Dt,{client:S2,children:[(0,Z.jsx)(ch,{}),(0,Z.jsxs)(Lt,{attribute:`class`,defaultTheme:`system`,enableSystem:!0,disableTransitionOnChange:!0,storageKey:`ok-theme-v1`,children:[(0,Z.jsx)(T2,{}),(0,Z.jsxs)(sn,{children:[(0,Z.jsx)(ih,{children:V0(w2)}),w2!==void 0&&(0,Z.jsx)(oh,{children:(0,Z.jsx)(G0,{bridge:w2})})]}),(0,Z.jsx)(K0,{richColors:!0,closeButton:!0})]})]})})}));export{sz as t};
|