1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,243729,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(618566);let i={theme:"system",ttsVoice:"coral",ttsSpeed:1,librarySort:"newest",librarySourceType:"all",libraryTab:"all",libraryPageSize:12,sidebarOpen:!0,chatDrawerWidth:480,productTourCompleted:!1,analyticsOptOut:!1,strictGrounding:!1,defaultPersona:null,chatScope:{landing:"all",dock:"note",thread:"all"},chatMode:{landing:"mixed",dock:"mixed",thread:"mixed"},chatModel:"fast",chatDensity:"normal",chatLandingRibbonDismissed:!1,chatShowReasoning:!1,editorOptedIn:!1,dockPrefs:{},dockPosition:"right",composerRailEnabled:!1,composerRailCollapsedDefault:!0,vaultTreeWidth:280,aiCardActionsAlwaysVisible:!1,shortcutMigrationSeen:{},exportRedactAiCardsDefault:!1,vaultTreeCollapsed:!1,activePersonaId:null,captureStructureWithAiDefault:!1};var a=e.i(993077),o=e.i(788737),s=e.i(722909);let c=(0,r.createContext)(null),l="xeso:ui-prefs";function u(e){try{let t=window.localStorage.getItem(e);if(!t)return{};let r=JSON.parse(t);return r&&"object"==typeof r?r:{}}catch{return{}}}function d(e,t){if(e)try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function h(){let e=(0,r.useContext)(c);return e||{prefs:{...i},hydrated:!1,setPreference:()=>{},updatePreferences:()=>{},flush:async()=>{}}}e.s(["PreferencesProvider",0,function({initial:e,actor:h,children:f}){let p=h?`${l}:${h}`:null,[m,g]=(0,r.useState)(()=>({...i,...e??{}})),[y,x]=(0,r.useState)(!1),w=(0,r.useRef)({}),b=(0,r.useRef)(null),v=(0,r.useRef)(!1),C=(0,n.useRouter)(),S=(0,r.useCallback)(()=>{},[]);(0,r.useEffect)(()=>{let e=new AbortController,t=p?u(p):{};return Object.keys(t).length>0&&queueMicrotask(()=>{e.signal.aborted||g(e=>({...e,...t}))}),fetch("/api/user/preferences",{signal:e.signal,credentials:"include"}).then(async e=>401===e.status?(v.current=!0,null):e.ok?await e.json():null).then(e=>{if(!e){if(p&&0===Object.keys(t).length){let e=u(l);Object.keys(e).length>0&&g(t=>({...t,...e}))}return}g(()=>{let t=p?u(p):{},r={...i,...e,...t};return d(p,r),r})}).catch(()=>{}).finally(()=>x(!0)),()=>e.abort()},[p]);let k=(0,r.useCallback)(async()=>{if(v.current){w.current={},b.current&&(clearTimeout(b.current),b.current=null);return}let e=w.current;if(w.current={},b.current&&(clearTimeout(b.current),b.current=null),0!==Object.keys(e).length)try{let t=await (0,a.appMutate)("/api/user/preferences",{method:"PATCH",json:e});if(401===t.status){v.current=!0,(0,s.handleSessionExpired)(t,S,C,{context:"loading data"});return}t.ok||(w.current={...e,...w.current})}catch(t){if((0,o.isProxyCsrfStaleClientError)(t))return;w.current={...e,...w.current}}},[S,C]),E=(0,r.useCallback)(()=>{b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{k()},350)},[k]),P=(0,r.useCallback)(e=>{g(t=>{let r={...t,...e};return d(p,r),r}),w.current={...w.current,...e},E()},[p,E]),R=(0,r.useCallback)((e,t)=>{P({[e]:t})},[P]);(0,r.useEffect)(()=>{let e=m.theme;try{window.localStorage.setItem("data-theme",e)}catch{}"system"!==e&&document.documentElement.setAttribute("data-theme",e)},[m.theme]),(0,r.useEffect)(()=>{function e(){if(v.current)return;let e=w.current;0!==Object.keys(e).length&&((0,a.appMutate)("/api/user/preferences",{method:"PATCH",keepalive:!0,json:e}).catch(()=>{}),w.current={})}let t=()=>{"hidden"===document.visibilityState&&e()};return document.addEventListener("visibilitychange",t),window.addEventListener("pagehide",e),()=>{document.removeEventListener("visibilitychange",t),window.removeEventListener("pagehide",e)}},[]);let T=(0,r.useMemo)(()=>({prefs:m,hydrated:y,setPreference:R,updatePreferences:P,flush:k}),[m,y,R,P,k]);return(0,t.jsx)(c.Provider,{value:T,children:f})},"usePreferences",0,h,"useTtsPreferences",0,function(){let{prefs:e,setPreference:t}=h();return{voice:e.ttsVoice,speed:e.ttsSpeed,setVoice:e=>t("ttsVoice",e),setSpeed:e=>t("ttsSpeed",e)}}],243729)},62474,385014,e=>{"use strict";var t=e.i(843476),r=e.i(271645);e.i(431215);var n=e.i(141118),i=e.i(746645),a=e.i(243729);let o="xeso-theme-vt";function s(e,t){if("u"<typeof document)return void e();let r=document,n=r.startViewTransition?.bind(r);if("function"!=typeof n||"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return void e();let i=r.documentElement,a=t?.x??window.innerWidth-28,s=t?.y??28;i.classList.add(o);let c=n(()=>{e()});c.ready.then(()=>{let e=Math.hypot(Math.max(a,window.innerWidth-a),Math.max(s,window.innerHeight-s));i.animate({clipPath:[`circle(0px at ${a}px ${s}px)`,`circle(${e}px at ${a}px ${s}px)`]},{duration:380,easing:"cubic-bezier(0.22, 0.9, 0.16, 1)",pseudoElement:"::view-transition-new(root)"})}).catch(()=>{}),c.finished.catch(()=>{}).finally(()=>{i.classList.remove(o)})}function c(e){if(!e||"function"!=typeof e.getBoundingClientRect)return null;let t=e.getBoundingClientRect();return 0===t.width&&0===t.height?null:{x:t.left+t.width/2,y:t.top+t.height/2}}e.s(["originFromElement",0,c,"runThemeReveal",0,s],385014);let l={s:36,m:40,l:44},u={light:"Light",dark:"Dark"},d={light:"sun",dark:"moon"};function h(e,t,r){t(e);let n="system"===e?window.matchMedia?.("(prefers-color-scheme: dark)")?.matches?"dar
1k":"light":e;document.documentElement.setAttribute("data-theme",n);try{localStorage.setItem("data-theme",e)}catch{}r("theme",e)}e.s(["ThemeToggle",0,function({size:e="s",variant:o="tertiary",className:f}){let{resolvedTheme:p,setTheme:m}=(0,i.useTheme)(),{setPreference:g}=(0,a.usePreferences)(),[y,x]=(0,r.useState)(!1);(0,r.useEffect)(()=>{x(!0)},[]);let w="dark"===p?"dark":"light",b="dark"===w?"light":"dark",v=(0,r.useRef)(null),C=(0,r.useCallback)(()=>{s(()=>h(b,m,g),c(v.current))},[b,m,g]),S=l[e]??36,k=y?d[w]:null,E=y?`Theme: ${u[w]} â switch to ${u[b]}`:"Toggle theme";return(0,t.jsx)("button",{ref:v,type:"button",className:["xeso-theme-toggle","xeso-motion-bg-color",f].filter(Boolean).join(" "),"data-variant":o,onClick:C,"aria-label":E,title:E,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:S,height:S,borderRadius:8,cursor:"pointer",padding:0,WebkitTapHighlightColor:"transparent"},children:k?(0,t.jsx)(n.Icon,{name:k,size:"s","aria-hidden":"true"}):(0,t.jsx)("span",{"aria-hidden":"true",style:{width:16,height:16,display:"inline-block"}})})},"applyThemeChoice",0,h],62474)},845352,e=>{"use strict";var t=e.i(843476);e.i(431215);var r=e.i(273323),n=e.i(62474),i=e.i(162724);e.s(["AuthFlowShell",0,function({children:e,contentMaxWidth:a=480}){return(0,t.jsxs)(r.Column,{as:"main",id:"main-content",fillWidth:!0,horizontal:"center",vertical:"center",className:"xeso-onboarding-page xeso-onboarding-shell xeso-full-height",style:{flex:1,position:"relative",minWidth:0,width:"100%",minHeight:"100dvh",padding:"clamp(16px, 4vw, 32px)",paddingTop:"clamp(56px, 10vw, 72px)",boxSizing:"border-box"},children:[(0,t.jsx)("div",{className:"xeso-onboarding-ambient","aria-hidden":!0,style:{position:"absolute",inset:0,overflow:"hidden",pointerEvents:"none",zIndex:i.Z.base}}),(0,t.jsx)("div",{style:{position:"absolute",top:"clamp(12px, 3vw, 20px)",right:"clamp(12px, 3vw, 24px)",zIndex:i.Z.sticky},children:(0,t.jsx)(n.ThemeToggle,{size:"m",variant:"secondary"})}),(0,t.jsx)("div",{style:{position:"relative",zIndex:i.Z.content,width:"100%",maxWidth:a,marginInline:"auto"},children:e})]})}])},993077,788737,615593,e=>{"use strict";var t=e.i(235155),r=e.i(767432),n=e.i(786698),i=e.i(171139);let a="proxy_csrf_stale_client";class o extends Error{kind=a;reloading;constructor(e=!1){super(a),this.name="ProxyCsrfStaleClientError",this.reloading=e}}async function s(e,t={}){let r=await (0,n.readMutationErrorPayload)(e);if(403===e.status&&(0,n.isProxyCsrfForbiddenPayload)(r,e.status))throw new o(!0===t.recoverStaleClient&&await (0,i.recoverStaleClientHard)({force:!0}));return r}e.s(["ProxyCsrfStaleClientError",0,o,"assertMutationNotProxyCsrf",0,s,"errorMessageFromPayload",0,function(e,t){return e&&"object"==typeof e&&"error"in e&&"string"==typeof e.error?String(e.error):t},"isProxyCsrfStaleClientError",0,function(e){return e instanceof o},"toastMessageForProxyCsrfStaleClient",0,function(e=!1){return e?(0,n.messageForProxyCsrf403)():"That change was blocked. Try again in a moment."},"userMessageForMutationStatus",0,function(e,t,r={}){return 429===e?r.rateLimit??"You're making changes quickly. Pause, then try again.":403===e?(0,n.isProxyCsrfForbiddenPayload)(t,e)?r.proxyCsrf??(0,n.messageForProxyCsrf403)():t&&"object"==typeof t&&"error"in t&&"string"==typeof t.error?String(t.error):r.forbidden??"You don't have permission to do that.":r.fallback??"That change didn't go through. Try again."}],788737);var c=e.i(62433);let l="xeso:segments-changed";function u(){window.dispatchEvent(new Event(l))}function d(e){if(!e.has(r.WORKSPACE_HEADER)){let t=(0,r.getActiveWorkspaceId)();t&&e.set(r.WORKSPACE_HEADER,t)}return e}function h(e){let{json:n,body:i,headers:a,credentials:o,workspaceHint:s,...c}=e??{},l=(0,t.withAppCsrfHeaders)(a);void 0===s?d(l):s?l.set(r.WORKSPACE_HEADER,s):l.set(r.WORKSPACE_HEADER,r.PE
1RSONAL_WORKSPACE_HINT);let u=i??(void 0!==n?JSON.stringify(n):void 0);return void 0===u||l.has("content-type")||"string"!=typeof u||l.set("Content-Type","application/json"),{...c,credentials:o??"include",headers:l,...void 0!==u?{body:u}:{}}}async function f(e,t){let r="string"==typeof t.body?t.body:null,n="string"==typeof e?e:e instanceof URL?e.href:e instanceof Request?e.url:"";throw(0,c.stashPendingMutationFromFetch)(e,t,{successMessage:function(e,t){if(e.includes("/api/ingest")){try{let e=t?JSON.parse(t):{};if(!0===e.structureWithAi)return"Structured and saved. Opening your note."}catch{}return"Saved to your library. Opening your note."}return(0,c.successMessageForBulkReplay)(t)}(n,r)}),new o(await (0,i.recoverStaleClientHard)({force:!0}))}function p(e){let t="string"==typeof e?e:e instanceof URL?e.pathname:e.url??"";return/\/api\/segments(\/|\?|$)/.test(t)}async function m(e,t){let r=h(t),a=await fetch(e,r);return await (0,n.isProxyCsrfForbiddenResponse)(a)&&(await (0,i.recoverStaleClientSoft)(),a=await fetch(e,h(t)),await (0,n.isProxyCsrfForbiddenResponse)(a))?f(e,r):(a.ok&&p(e)&&u(),a)}e.s(["SEGMENTS_CHANGED_EVENT",0,l,"notifySegmentsChanged",0,u],615593),e.s(["appGet",0,function(e,t){return fetch(e,{...t,method:"GET",credentials:t?.credentials??"include",headers:d(new Headers(t?.headers))})},"appMutate",0,m],993077)},767432,e=>{"use strict";let t,r="xeso_ws";function n(){if("u"<typeof document)return null;let e=document.cookie.match(/(?:^|;\s*)xeso_ws=([^;]+)/);return e?decodeURIComponent(e[1]):null}e.s(["PERSONAL_WORKSPACE_HINT",0,"personal","WORKSPACE_BROADCAST",0,"xeso-workspace","WORKSPACE_HEADER",0,"x-xeso-workspace","WORKSPACE_QUERY_PARAM",0,"ws","getActiveWorkspaceId",0,function(){return void 0!==t?t:n()},"readWorkspaceCookie",0,n,"resolveInitialWorkspaceId",0,function(e,t){var r;let i;return r={query:function(){try{return new URL(window.location.href).searchParams.get("ws")}catch{return null}}(),cookie:n(),fallback:t},i=new Set(e),r.query&&i.has(r.query)?r.query:r.cookie&&i.has(r.cookie)?r.cookie:r.fallback&&i.has(r.fallback)?r.fallback:null},"setActiveWorkspaceId",0,function(e){t=e},"writeWorkspaceCookie",0,function(e){"u">typeof document&&(e?document.cookie=`${r}=${encodeURIComponent(e)}; path=/; max-age=31536000; SameSite=Lax`:document.cookie=`${r}=; path=/; max-age=0; SameSite=Lax`)}])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.