signetai 0.1.92 → 0.1.93
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/dashboard/_app/immutable/chunks/D_34Vvm-.js +1 -0
- package/dashboard/_app/immutable/entry/{app.DcZHNOQT.js → app.DNt_xNvN.js} +2 -2
- package/dashboard/_app/immutable/entry/start.COvYh0H-.js +1 -0
- package/dashboard/_app/immutable/nodes/{1.NyPPGUfZ.js → 1.BdD1A1o5.js} +1 -1
- package/dashboard/_app/version.json +1 -1
- package/dashboard/index.html +6 -6
- package/dist/daemon.js +144 -103
- package/package.json +1 -1
- package/dashboard/_app/immutable/chunks/C_f-im0O.js +0 -1
- package/dashboard/_app/immutable/entry/start.T-tzpwSL.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bm as he,bt as mt,X as A,q as U,P as T,W as te,bu as _t}from"./pKcKaM5A.js";import{o as qe}from"./DXDZTf9R.js";const V=[];function Se(e,t=he){let n=null;const r=new Set;function a(o){if(mt(e,o)&&(e=o,n)){const l=!V.length;for(const c of r)c[1](),V.push(c,e);if(l){for(let c=0;c<V.length;c+=2)V[c][0](V[c+1]);V.length=0}}}function i(o){a(o(e))}function s(o,l=he){const c=[o,l];return r.add(c),r.size===1&&(n=t(a,i)||he),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:a,update:i,subscribe:s}}class Ee{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Re{constructor(t,n){this.status=t,this.location=n}}class xe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function yt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function pe({href:e}){return e.split("#")[0]}function bt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...d)=>(n(c),s[o](c,...d));t();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];r&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return t(),e[s]},enumerable:!0,configurable:!0});return a}function kt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Et=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&M.delete(Le(e)),Et(e,t));const M=new Map;function Rt(e,t){const n=Le(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&M.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function xt(e,t,n){if(M.size>0){const r=Le(e,n),a=M.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);M.delete(r)}}return window.fetch(t,n)}function Le(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${kt(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function At(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return ge(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return ge(String.fromCharCode(...l.slice(2).split("-").map(w=>parseInt(w,16))));const d=Lt.exec(l),[,p,f,u,h]=d;return t.push({name:u,matcher:h,optional:!!p,rest:!!f,chained:f?c===1&&s[0]==="":!1}),f?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return ge(l)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Ut)}function Pt(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=a[o-s];if(l.chained&&l.rest&&s&&(c=a.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&l.chained&&(s=0),!d&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function ge(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function It({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:p,params:f}=At(o),u={id:o,exec:h=>{const w=p.exec(h);if(w)return Pt(w,f,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...c||[]].map(s),leaf:i(l)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function ze(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function De(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_hmbdei?.base??"",Ot=globalThis.__sveltekit_hmbdei?.assets??x??"",$t="1771852873387",He="sveltekit:snapshot",Je="sveltekit:scroll",Ye="sveltekit:states",Ct="sveltekit:pageurl",B="sveltekit:history",z="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Ae=location.origin;function Xe(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function q(){return{x:pageXOffset,y:pageYOffset}}function K(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...N,"":N.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ze(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function we(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===Ae&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function ne(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=K(o,"preload-code")),a===null&&(a=K(o,"preload-data")),t===null&&(t=K(o,"keepfocus")),n===null&&(n=K(o,"noscroll")),i===null&&(i=K(o,"reload")),s===null&&(s=K(o,"replacestate")),o=Qe(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function Ke(e){const t=Se(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:r,set:a,subscribe:i}}const et={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Se(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ot}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==$t;return s&&(e(!0),et.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==Ae||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function fn(e){}const tt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...tt];const jt=new Set([...tt]);[...jt];function qt(e){return e.filter(t=>t!=null)}function Ue(e){return e instanceof Ee||e instanceof xe?e.status:500}function Dt(e){return e instanceof xe?e.text:"Internal Error"}let k,H,me;const Vt=qe.toString().includes("$$")||/function \w+\(\) \{\}/.test(qe.toString());Vt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},H={current:null},me={current:!1}):(k=new class{#e=A({});get data(){return U(this.#e)}set data(t){T(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){T(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){T(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){T(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){T(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){T(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){T(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){T(this.#i,t)}},H=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},me=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},et.v=()=>me.current=!0);function Kt(e){Object.assign(k,e)}const Be={spanContext(){return Bt},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Bt={traceId:"",spanId:"",traceFlags:0},Ft=new Set(["icon","shortcut icon","apple-touch-icon"]),C=ze(Je)??{},J=ze(He)??{},$={url:Ke({}),page:Ke({}),navigating:Se(null),updated:Nt()};function Te(e){C[e]=q()}function Gt(e,t){let n=e+1;for(;C[n];)delete C[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function Y(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function nt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Fe(){}let Pe,ve,re,P,ye,v;const ae=[],oe=[];let L=null;function be(){L?.fork?.then(e=>e?.discard()),L=null}const ee=new Map,rt=new Set,Mt=new Set,W=new Set;let _={branch:[],error:null,url:null},at=!1,se=!1,Ge=!0,X=!1,G=!1,ot=!1,Ie=!1,st,y,R,j;const ie=new Set,Me=new Map;async function gn(e,t,n){globalThis.__sveltekit_hmbdei?.data&&globalThis.__sveltekit_hmbdei.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Pe=It(e),P=document.documentElement,ye=t,ve=e.nodes[0],re=e.nodes[1],ve(),re(),y=history.state?.[B],R=history.state?.[z],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[z]:R},""));const r=C[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await an(ye,n)):(await F({type:"enter",url:Xe(v.hash?ln(new URL(location.href)):location.href),replace_state:!0}),a()),rn()}function Wt(){ae.length=0,Ie=!1}function it(e){oe.some(t=>t?.snapshot)&&(J[e]=oe.map(t=>t?.snapshot?.capture()))}function lt(e){J[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function We(){Te(y),De(Je,C),it(R),De(He,J)}async function zt(e,t,n,r){let a;t.invalidateAll&&be(),await F({type:"goto",url:Xe(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ie=!0,a=[...Me.keys()]),t.invalidate&&t.invalidate.forEach(nn)}}),t.invalidateAll&&te().then(te).then(()=>{Me.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Ht(e){if(e.id!==L?.id){be();const t={};ie.add(t),L={id:e.id,token:t,promise:ft({...e,preload:t}).then(n=>(ie.delete(t),n.type==="loaded"&&n.state.error&&be(),n)),fork:null}}return L.promise}async function _e(e){const t=(await fe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function ct(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),st=new v.root({target:t,props:{...e.props,stores:$,components:oe},hydrate:n,sync:!1}),await Promise.resolve(),lt(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:C[y]??q()},willUnload:!1,type:"enter",complete:Promise.resolve()};W.forEach(i=>i(a))}se=!0}function le({url:e,params:t,branch:n,status:r,error:a,route:i,form:s}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const u of n)u?.slash!==void 0&&(o=u.slash);e.pathname=wt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:qt(n).map(u=>u.node.component),page:je(k)}};s!==void 0&&(l.props.form=s);let c={},d=!k,p=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const h=n[u],w=_.branch[u];h?.data!==w?.data&&(d=!0),h&&(c={...c,...h.data},d&&(l.props[`data_${p}`]=c),p+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||s!==void 0&&s!==k.form||d)&&(l.props.page={error:a,params:t,route:{id:i?.id??null},state:{},status:r,url:new URL(e),form:s??null,data:d?c:k.data}),l}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();if(c.universal?.load){let d=function(...f){for(const u of f){const{href:h}=new URL(u,n);l.dependencies.add(h)}};const p={tracing:{enabled:!1,root:Be,current:Be},route:new Proxy(a,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:i?.data??null,url:bt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},v.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:h,promise:w}=ut(f,u,n);return o&&d(h.href),w},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};s=await c.universal.load.call(null,p)??null}return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function ut(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=se?xt(r,a.href,t):Rt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Ie)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(ae.some(o=>o(new URL(s))))return!0;return!1}function $e(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Yt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function Xt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:je(k),constructors:[]}}}async function ft({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ie.delete(L.token),L.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(m=>m?.().catch(()=>{})),c.forEach(m=>m?.[1]().catch(()=>{}));const d=_.url?e!==ce(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Yt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const S=_.branch[g];return m[1]===S?.loader&&!Jt(u,p,d,f,S.universal?.uses,r)?S:(u=!0,Oe({loader:m[1],url:n,params:r,route:a,parent:async()=>{const I={};for(let O=0;O<g;O+=1)Object.assign(I,(await h[O])?.data);return I},server_data_node:$e(m[0]?{type:"skip"}:null,m[0]?S?.server:void 0)}))});for(const m of h)m.catch(()=>{});const w=[];for(let m=0;m<c.length;m+=1)if(c[m])try{w.push(await h[m])}catch(g){if(g instanceof Re)return{type:"redirect",location:g.location};if(ie.has(i))return Xt({error:await Q(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let S=Ue(g),E;if(g instanceof Ee)E=g.body;else{if(await $.updated.check())return await nt(),await Y(n);E=await Q(g,{params:r,url:n,route:{id:a.id}})}const I=await Qt(m,w,s);return I?le({url:n,params:r,branch:w.slice(0,I.idx).concat(I.node),status:S,error:E,route:a}):await ht(n,{id:a.id},E,S)}else w.push(void 0);return le({url:n,params:r,branch:w,status:200,error:null,route:a,form:t?void 0:null})}async function Qt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Ce({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await Oe({loader:ve,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:$e(i)}),o={node:await re(),loader:re,universal:null,server:null,data:null};return le({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Re)return zt(new URL(s.location,location.href),{},0);throw s}}async function Zt(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ut(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);v.hash?i.hash=a:i.pathname=a,a=i}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function fe(e,t){if(e&&!ue(e,x,v.hash)){const n=await Zt(e);if(!n)return;const r=en(n);for(const a of Pe){const i=a.exec(r);if(i)return{id:ce(e),invalidating:t,route:a,params:yt(i),url:e}}}}function en(e){return vt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Ne(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return X||rt.forEach(c=>c(l)),s?null:o}async function F({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=Fe,block:d=Fe,event:p}){const f=j;j=l;const u=await fe(t,!1),h=e==="enter"?Ne(_,u,t,e):dt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),j===l&&(j=f);return}const w=y,m=R;c(),X=!0,se&&h.navigation.type!=="enter"&&$.navigating.set(H.current=h.navigation);let g=u&&await ft(u);if(!g){if(ue(t,x,v.hash))return await Y(t,i);g=await ht(t,{id:null},await Q(new xe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,j!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await F({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),h.fulfil(void 0);return}g=await Ce({status:500,error:await Q(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await nt(),await Y(t,i));if(Wt(),Te(w),it(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const b=i?0:1,Z={[B]:y+=b,[z]:R+=b,[Ye]:s};(i?history.replaceState:history.pushState).call(history,Z,"",t),i||Gt(y,R)}const S=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let E;if(se){const b=(await Promise.all(Array.from(Mt,D=>D(h.navigation)))).filter(D=>typeof D=="function");if(b.length>0){let D=function(){b.forEach(de=>{W.delete(de)})};b.push(D),b.forEach(de=>{W.add(de)})}_=g.state,g.props.page&&(g.props.page.url=t);const Z=S&&await S;Z?E=Z.commit():(st.$set(g.props),Kt(g.props.page),E=_t?.()),ot=!0}else await ct(g,ye,!1);const{activeElement:I}=document;await E,await te(),await te();let O=null;if(Ge){const b=n?n.scroll:a?q():null;b?scrollTo(b.x,b.y):(O=t.hash&&document.getElementById(pt(t)))?O.scrollIntoView():scrollTo(0,0)}const gt=document.activeElement!==I&&document.activeElement!==document.body;!r&&!gt&&sn(t,!O),Ge=!0,g.props.page&&Object.assign(k,g.props.page),X=!1,e==="popstate"&<(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=q()),W.forEach(b=>b(h.navigation)),$.navigating.set(H.current=null)}async function ht(e,t,n,r,a){return e.origin===Ae&&e.pathname===location.pathname&&!at?await Ce({status:r,error:n,url:e,route:t}):await Y(e,a)}function tn(){let e,t={element:void 0,href:void 0},n;P.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,N.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],N.tap)}P.addEventListener("mousedown",r),P.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(_e(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=Ze(o,P),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=we(c,x,v.hash);if(f||u)return;const h=ne(c),w=p&&ce(_.url)===ce(p);if(!(h.reload||w))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await fe(p,!1);if(!m)return;Ht(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,_e(p))}function s(){a.disconnect();for(const o of P.querySelectorAll("a")){const{url:l,external:c,download:d}=we(o,x,v.hash);if(c||d)continue;const p=ne(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&_e(l))}}W.add(s),s()}function Q(e,t){if(e instanceof Ee)return e.body;const n=Ue(e),r=Dt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function nn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function rn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(We(),!X){const r=Ne(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};rt.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&We()}),navigator.connection?.saveData||tn(),P.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Ze(t.composedPath()[0],P);if(!n)return;const{url:r,external:a,target:i,download:s}=we(n,x,v.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=ne(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===pe(location);if(a||o.reload&&(!p||!d)){dt({url:r,type:"link",event:t})?X=!0:t.preventDefault();return}if(d!==void 0&&p){const[,f]=_.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(d));u&&(u.scrollIntoView(),u.focus())}return}if(G=!0,Te(y),e(r),!o.replace_state)return;G=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await F({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),P.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(s,x,!1))return;const o=t.target,l=ne(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),F({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!ke){if(t.state?.[B]){const n=t.state[B];if(j={},n===y)return;const r=C[n],a=t.state[Ye]??{},i=new URL(t.state[Ct]??location.href),s=t.state[z],o=_.url?pe(location)===pe(_.url):!1;if(s===R&&(ot||o)){a!==k.state&&(k.state=a),e(i),C[y]=q(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await F({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:j,event:t})}else if(!G){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[B]:++y,[z]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Ft.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(H.current=null)});function e(t){_.url=k.url=t,$.page.set(je(k)),$.page.notify()}}async function an(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){at=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await fe(c,!1)||{}),d=Pe.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(w,m)=>{const g=o[m];return g?.uses&&(g.uses=on(g.uses)),Oe({loader:v.nodes[w],url:c,params:a,route:i,parent:async()=>{const S={};for(let E=0;E<m;E+=1)Object.assign(S,(await u[E]).data);return S},server_data_node:$e(g)})}),h=await Promise.all(u);if(d){const w=d.layouts;for(let m=0;m<w.length;m++)w[m]||h.splice(m,0,void 0)}p=le({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Re){await Y(new URL(u.location,location.href));return}p=await Ce({status:Ue(u),error:await Q(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await ct(p,e,f)}function on(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let ke=!1;function sn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=pt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=q();setTimeout(()=>{const o=history.state;ke=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),ke=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],l=a.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Ne(e,t,n,r,a=null){let i,s;const o=new Promise((c,d)=>{i=c,s=d});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:q()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function je(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function ln(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function pt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{gn as a,fn as l,k as p,$ as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BHKfpJtW.js","../chunks/C6Mp7esv.js","../chunks/pKcKaM5A.js","../chunks/CyFK1ul6.js","../chunks/DbwmJ-jL.js","../assets/0.CbeMxaEY.css","../nodes/1.
|
|
2
|
-
import{p as b,i as P,c as x,b as E,_ as O}from"../chunks/DSyuFPPB.js";import{P as y,Q as B,q as u,S as G,U as Q,V as U,y as W,n as X,u as F,W as H,k as v,D as J,A as K,X as R,B as N,C as Z,Y as j,z as $}from"../chunks/pKcKaM5A.js";import{h as tt,m as et,u as rt,s as st}from"../chunks/CVSH1X_J.js";import{a as _,c as k,f as D,t as at}from"../chunks/C6Mp7esv.js";import{o as nt}from"../chunks/DXDZTf9R.js";function ot(a){return class extends ct{constructor(t){super({component:a,...t})}}}class ct{#e;#t;constructor(t){var s=new Map,o=(e,r)=>{var i=U(r,!1,!1);return s.set(e,i),i};const c=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(s.get(r)??o(r,Reflect.get(e,r)))},has(e,r){return r===B?!0:(u(s.get(r)??o(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return y(s.get(r)??o(r,i),i),Reflect.set(e,r,i)}});this.#t=(t.hydrate?tt:et)(t.component,{target:t.target,anchor:t.anchor,props:c,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&G(),this.#e=c.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||Q(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(c,e)},this.#t.$destroy=()=>{rt(this.#t)}}$set(t){this.#t.$set(t)}$on(t,s){this.#e[t]=this.#e[t]||[];const o=(...c)=>s.call(this,...c);return this.#e[t].push(o),()=>{this.#e[t]=this.#e[t].filter(c=>c!==o)}}$destroy(){this.#t.$destroy()}}const yt={};var it=D('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),ut=D("<!> <!>",1);function mt(a,t){W(t,!0);let s=b(t,"components",23,()=>[]),o=b(t,"data_0",3,null),c=b(t,"data_1",3,null);X(()=>t.stores.page.set(t.page)),F(()=>{t.stores,t.page,t.constructors,s(),t.form,o(),c(),t.stores.page.notify()});let e=R(!1),r=R(!1),i=R(null);nt(()=>{const n=t.stores.page.subscribe(()=>{u(e)&&(y(r,!0),H().then(()=>{y(i,document.title||"untitled page",!0)}))});return y(e,!0),n});const S=j(()=>t.constructors[1]);var w=ut(),A=v(w);{var V=n=>{const m=j(()=>t.constructors[0]);var d=k(),h=v(d);x(h,()=>u(m),(l,f)=>{E(f(l,{get data(){return o()},get form(){return t.form},get params(){return t.page.params},children:(g,lt)=>{var C=k(),M=v(C);x(M,()=>u(S),(Y,q)=>{E(q(Y,{get data(){return c()},get form(){return t.form},get params(){return t.page.params}}),z=>s()[1]=z,()=>s()?.[1])}),_(g,C)},$$slots:{default:!0}}),g=>s()[0]=g,()=>s()?.[0])}),_(n,d)},I=n=>{const m=j(()=>t.constructors[0]);var d=k(),h=v(d);x(h,()=>u(m),(l,f)=>{E(f(l,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),g=>s()[0]=g,()=>s()?.[0])}),_(n,d)};P(A,n=>{t.constructors[1]?n(V):n(I,!1)})}var T=J(A,2);{var p=n=>{var m=it(),d=N(m);{var h=l=>{var f=at();$(()=>st(f,u(i))),_(l,f)};P(d,l=>{u(r)&&l(h)})}Z(m),_(n,m)};P(T,n=>{u(e)&&n(p)})}_(a,w),K()}const bt=ot(mt),Pt=[()=>O(()=>import("../nodes/0.BHKfpJtW.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>O(()=>import("../nodes/1.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BHKfpJtW.js","../chunks/C6Mp7esv.js","../chunks/pKcKaM5A.js","../chunks/CyFK1ul6.js","../chunks/DbwmJ-jL.js","../assets/0.CbeMxaEY.css","../nodes/1.BdD1A1o5.js","../chunks/Caoo5mVF.js","../chunks/CVSH1X_J.js","../chunks/D_34Vvm-.js","../chunks/DXDZTf9R.js","../nodes/2.zOwUPUUu.js","../chunks/BzVZYeEA.js","../chunks/DSyuFPPB.js","../assets/2.BAvQw7w8.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{p as b,i as P,c as x,b as E,_ as O}from"../chunks/DSyuFPPB.js";import{P as y,Q as B,q as u,S as G,U as Q,V as U,y as W,n as X,u as F,W as H,k as v,D as J,A as K,X as R,B as N,C as Z,Y as j,z as $}from"../chunks/pKcKaM5A.js";import{h as tt,m as et,u as rt,s as st}from"../chunks/CVSH1X_J.js";import{a as _,c as k,f as D,t as at}from"../chunks/C6Mp7esv.js";import{o as nt}from"../chunks/DXDZTf9R.js";function ot(a){return class extends ct{constructor(t){super({component:a,...t})}}}class ct{#e;#t;constructor(t){var s=new Map,o=(e,r)=>{var i=U(r,!1,!1);return s.set(e,i),i};const c=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(s.get(r)??o(r,Reflect.get(e,r)))},has(e,r){return r===B?!0:(u(s.get(r)??o(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return y(s.get(r)??o(r,i),i),Reflect.set(e,r,i)}});this.#t=(t.hydrate?tt:et)(t.component,{target:t.target,anchor:t.anchor,props:c,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&G(),this.#e=c.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||Q(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(c,e)},this.#t.$destroy=()=>{rt(this.#t)}}$set(t){this.#t.$set(t)}$on(t,s){this.#e[t]=this.#e[t]||[];const o=(...c)=>s.call(this,...c);return this.#e[t].push(o),()=>{this.#e[t]=this.#e[t].filter(c=>c!==o)}}$destroy(){this.#t.$destroy()}}const yt={};var it=D('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),ut=D("<!> <!>",1);function mt(a,t){W(t,!0);let s=b(t,"components",23,()=>[]),o=b(t,"data_0",3,null),c=b(t,"data_1",3,null);X(()=>t.stores.page.set(t.page)),F(()=>{t.stores,t.page,t.constructors,s(),t.form,o(),c(),t.stores.page.notify()});let e=R(!1),r=R(!1),i=R(null);nt(()=>{const n=t.stores.page.subscribe(()=>{u(e)&&(y(r,!0),H().then(()=>{y(i,document.title||"untitled page",!0)}))});return y(e,!0),n});const S=j(()=>t.constructors[1]);var w=ut(),A=v(w);{var V=n=>{const m=j(()=>t.constructors[0]);var d=k(),h=v(d);x(h,()=>u(m),(l,f)=>{E(f(l,{get data(){return o()},get form(){return t.form},get params(){return t.page.params},children:(g,lt)=>{var C=k(),M=v(C);x(M,()=>u(S),(Y,q)=>{E(q(Y,{get data(){return c()},get form(){return t.form},get params(){return t.page.params}}),z=>s()[1]=z,()=>s()?.[1])}),_(g,C)},$$slots:{default:!0}}),g=>s()[0]=g,()=>s()?.[0])}),_(n,d)},I=n=>{const m=j(()=>t.constructors[0]);var d=k(),h=v(d);x(h,()=>u(m),(l,f)=>{E(f(l,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),g=>s()[0]=g,()=>s()?.[0])}),_(n,d)};P(A,n=>{t.constructors[1]?n(V):n(I,!1)})}var T=J(A,2);{var p=n=>{var m=it(),d=N(m);{var h=l=>{var f=at();$(()=>st(f,u(i))),_(l,f)};P(d,l=>{u(r)&&l(h)})}Z(m),_(n,m)};P(T,n=>{u(e)&&n(p)})}_(a,w),K()}const bt=ot(mt),Pt=[()=>O(()=>import("../nodes/0.BHKfpJtW.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>O(()=>import("../nodes/1.BdD1A1o5.js"),__vite__mapDeps([6,1,2,7,8,9,10]),import.meta.url),()=>O(()=>import("../nodes/2.zOwUPUUu.js"),__vite__mapDeps([11,12,1,2,10,8,13,4,3,7,14]),import.meta.url)],xt=[],Et={"/":[2]},L={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},dt=Object.fromEntries(Object.entries(L.transport).map(([a,t])=>[a,t.decode])),Ot=Object.fromEntries(Object.entries(L.transport).map(([a,t])=>[a,t.encode])),Rt=!1,jt=(a,t)=>dt[a](t);export{jt as decode,dt as decoders,Et as dictionary,Ot as encoders,Rt as hash,L as hooks,yt as matchers,Pt as nodes,bt as root,xt as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,a as r}from"../chunks/D_34Vvm-.js";export{o as load_css,r as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u,f as h}from"../chunks/C6Mp7esv.js";import{i as g}from"../chunks/Caoo5mVF.js";import{y as l,k as v,z as d,A as _,B as a,C as e,D as x}from"../chunks/pKcKaM5A.js";import{s as o}from"../chunks/CVSH1X_J.js";import{s as k,p}from"../chunks/
|
|
1
|
+
import{a as u,f as h}from"../chunks/C6Mp7esv.js";import{i as g}from"../chunks/Caoo5mVF.js";import{y as l,k as v,z as d,A as _,B as a,C as e,D as x}from"../chunks/pKcKaM5A.js";import{s as o}from"../chunks/CVSH1X_J.js";import{s as k,p}from"../chunks/D_34Vvm-.js";const $={get error(){return p.error},get status(){return p.status}};k.updated.check;const m=$;var b=h("<h1> </h1> <p> </p>",1);function D(i,f){l(f,!1),g();var t=b(),r=v(t),n=a(r,!0);e(r);var s=x(r,2),c=a(s,!0);e(s),d(()=>{o(n,m.status),o(c,m.error?.message)}),u(i,t),_()}export{D as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1771852873387"}
|
package/dashboard/index.html
CHANGED
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
document.documentElement.dataset.theme = t;
|
|
18
18
|
})();
|
|
19
19
|
</script>
|
|
20
|
-
<link href="/_app/immutable/entry/start.
|
|
21
|
-
<link href="/_app/immutable/chunks/
|
|
20
|
+
<link href="/_app/immutable/entry/start.COvYh0H-.js" rel="modulepreload">
|
|
21
|
+
<link href="/_app/immutable/chunks/D_34Vvm-.js" rel="modulepreload">
|
|
22
22
|
<link href="/_app/immutable/chunks/pKcKaM5A.js" rel="modulepreload">
|
|
23
23
|
<link href="/_app/immutable/chunks/DXDZTf9R.js" rel="modulepreload">
|
|
24
|
-
<link href="/_app/immutable/entry/app.
|
|
24
|
+
<link href="/_app/immutable/entry/app.DNt_xNvN.js" rel="modulepreload">
|
|
25
25
|
<link href="/_app/immutable/chunks/DSyuFPPB.js" rel="modulepreload">
|
|
26
26
|
<link href="/_app/immutable/chunks/DbwmJ-jL.js" rel="modulepreload">
|
|
27
27
|
<link href="/_app/immutable/chunks/CVSH1X_J.js" rel="modulepreload">
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
<div style="display: contents">
|
|
33
33
|
<script>
|
|
34
34
|
{
|
|
35
|
-
|
|
35
|
+
__sveltekit_hmbdei = {
|
|
36
36
|
base: ""
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
const element = document.currentScript.parentElement;
|
|
40
40
|
|
|
41
41
|
Promise.all([
|
|
42
|
-
import("/_app/immutable/entry/start.
|
|
43
|
-
import("/_app/immutable/entry/app.
|
|
42
|
+
import("/_app/immutable/entry/start.COvYh0H-.js"),
|
|
43
|
+
import("/_app/immutable/entry/app.DNt_xNvN.js")
|
|
44
44
|
]).then(([kit, app]) => {
|
|
45
45
|
kit.start(app, element);
|
|
46
46
|
});
|
package/dist/daemon.js
CHANGED
|
@@ -19894,34 +19894,48 @@ function parseAuthConfig(raw2, agentsDir) {
|
|
|
19894
19894
|
var DEFAULT_PIPELINE_V2 = {
|
|
19895
19895
|
enabled: false,
|
|
19896
19896
|
shadowMode: false,
|
|
19897
|
-
allowUpdateDelete: false,
|
|
19898
|
-
graphEnabled: false,
|
|
19899
|
-
autonomousEnabled: false,
|
|
19900
19897
|
mutationsFrozen: false,
|
|
19901
|
-
|
|
19902
|
-
|
|
19903
|
-
|
|
19904
|
-
|
|
19905
|
-
|
|
19906
|
-
|
|
19907
|
-
|
|
19908
|
-
|
|
19909
|
-
|
|
19910
|
-
|
|
19911
|
-
|
|
19912
|
-
|
|
19913
|
-
|
|
19914
|
-
|
|
19915
|
-
|
|
19916
|
-
|
|
19917
|
-
|
|
19918
|
-
|
|
19919
|
-
|
|
19920
|
-
|
|
19921
|
-
|
|
19922
|
-
|
|
19923
|
-
|
|
19924
|
-
|
|
19898
|
+
extraction: {
|
|
19899
|
+
provider: "claude-code",
|
|
19900
|
+
model: "haiku",
|
|
19901
|
+
timeout: 45000,
|
|
19902
|
+
minConfidence: 0.7
|
|
19903
|
+
},
|
|
19904
|
+
worker: {
|
|
19905
|
+
pollMs: 2000,
|
|
19906
|
+
maxRetries: 3,
|
|
19907
|
+
leaseTimeoutMs: 300000
|
|
19908
|
+
},
|
|
19909
|
+
graph: {
|
|
19910
|
+
enabled: false,
|
|
19911
|
+
boostWeight: 0.15,
|
|
19912
|
+
boostTimeoutMs: 500
|
|
19913
|
+
},
|
|
19914
|
+
reranker: {
|
|
19915
|
+
enabled: false,
|
|
19916
|
+
model: "",
|
|
19917
|
+
topN: 20,
|
|
19918
|
+
timeoutMs: 2000
|
|
19919
|
+
},
|
|
19920
|
+
autonomous: {
|
|
19921
|
+
enabled: false,
|
|
19922
|
+
frozen: false,
|
|
19923
|
+
allowUpdateDelete: false,
|
|
19924
|
+
maintenanceIntervalMs: 30 * 60 * 1000,
|
|
19925
|
+
maintenanceMode: "observe"
|
|
19926
|
+
},
|
|
19927
|
+
repair: {
|
|
19928
|
+
reembedCooldownMs: 300000,
|
|
19929
|
+
reembedHourlyBudget: 10,
|
|
19930
|
+
requeueCooldownMs: 60000,
|
|
19931
|
+
requeueHourlyBudget: 50
|
|
19932
|
+
},
|
|
19933
|
+
documents: {
|
|
19934
|
+
workerIntervalMs: 1e4,
|
|
19935
|
+
chunkSize: 2000,
|
|
19936
|
+
chunkOverlap: 200,
|
|
19937
|
+
maxContentBytes: 10 * 1024 * 1024
|
|
19938
|
+
}
|
|
19925
19939
|
};
|
|
19926
19940
|
function clampPositive(raw2, min, max, fallback) {
|
|
19927
19941
|
if (typeof raw2 !== "number" || !Number.isFinite(raw2))
|
|
@@ -19938,37 +19952,63 @@ function loadPipelineConfig(yaml) {
|
|
|
19938
19952
|
const raw2 = mem?.pipelineV2;
|
|
19939
19953
|
if (!raw2)
|
|
19940
19954
|
return { ...DEFAULT_PIPELINE_V2 };
|
|
19955
|
+
const extractionRaw = raw2.extraction;
|
|
19956
|
+
const workerRaw = raw2.worker;
|
|
19957
|
+
const graphRaw = raw2.graph;
|
|
19958
|
+
const rerankerRaw = raw2.reranker;
|
|
19959
|
+
const autonomousRaw = raw2.autonomous;
|
|
19960
|
+
const repairRaw = raw2.repair;
|
|
19961
|
+
const documentsRaw = raw2.documents;
|
|
19962
|
+
const d = DEFAULT_PIPELINE_V2;
|
|
19963
|
+
const nestedProvider = extractionRaw?.provider;
|
|
19964
|
+
const flatProvider = raw2.extractionProvider;
|
|
19965
|
+
const flatModel = raw2.extractionModel;
|
|
19966
|
+
const resolvedProvider = nestedProvider === "claude-code" || flatProvider === "claude-code" ? "claude-code" : nestedProvider === "ollama" || flatProvider === "ollama" ? "ollama" : typeof (extractionRaw?.model ?? flatModel) === "string" && nestedProvider === undefined && flatProvider === undefined ? "ollama" : d.extraction.provider;
|
|
19941
19967
|
return {
|
|
19942
19968
|
enabled: raw2.enabled === true,
|
|
19943
19969
|
shadowMode: raw2.shadowMode === true,
|
|
19944
|
-
allowUpdateDelete: raw2.allowUpdateDelete === true,
|
|
19945
|
-
graphEnabled: raw2.graphEnabled === true,
|
|
19946
|
-
autonomousEnabled: raw2.autonomousEnabled === true,
|
|
19947
19970
|
mutationsFrozen: raw2.mutationsFrozen === true,
|
|
19948
|
-
|
|
19949
|
-
|
|
19950
|
-
|
|
19951
|
-
|
|
19952
|
-
|
|
19953
|
-
|
|
19954
|
-
|
|
19955
|
-
|
|
19956
|
-
|
|
19957
|
-
|
|
19958
|
-
|
|
19959
|
-
|
|
19960
|
-
|
|
19961
|
-
|
|
19962
|
-
|
|
19963
|
-
|
|
19964
|
-
|
|
19965
|
-
|
|
19966
|
-
|
|
19967
|
-
|
|
19968
|
-
|
|
19969
|
-
|
|
19970
|
-
|
|
19971
|
-
|
|
19971
|
+
extraction: {
|
|
19972
|
+
provider: resolvedProvider,
|
|
19973
|
+
model: typeof extractionRaw?.model === "string" ? extractionRaw.model : typeof flatModel === "string" ? flatModel : d.extraction.model,
|
|
19974
|
+
timeout: clampPositive(extractionRaw?.timeout ?? raw2.extractionTimeout, 5000, 300000, d.extraction.timeout),
|
|
19975
|
+
minConfidence: clampFraction(extractionRaw?.minConfidence ?? raw2.minFactConfidenceForWrite, d.extraction.minConfidence)
|
|
19976
|
+
},
|
|
19977
|
+
worker: {
|
|
19978
|
+
pollMs: clampPositive(workerRaw?.pollMs ?? raw2.workerPollMs, 100, 60000, d.worker.pollMs),
|
|
19979
|
+
maxRetries: clampPositive(workerRaw?.maxRetries ?? raw2.workerMaxRetries, 1, 10, d.worker.maxRetries),
|
|
19980
|
+
leaseTimeoutMs: clampPositive(workerRaw?.leaseTimeoutMs ?? raw2.leaseTimeoutMs, 1e4, 600000, d.worker.leaseTimeoutMs)
|
|
19981
|
+
},
|
|
19982
|
+
graph: {
|
|
19983
|
+
enabled: graphRaw?.enabled === true || raw2.graphEnabled === true,
|
|
19984
|
+
boostWeight: clampFraction(graphRaw?.boostWeight ?? raw2.graphBoostWeight, d.graph.boostWeight),
|
|
19985
|
+
boostTimeoutMs: clampPositive(graphRaw?.boostTimeoutMs ?? raw2.graphBoostTimeoutMs, 50, 5000, d.graph.boostTimeoutMs)
|
|
19986
|
+
},
|
|
19987
|
+
reranker: {
|
|
19988
|
+
enabled: rerankerRaw?.enabled === true || raw2.rerankerEnabled === true,
|
|
19989
|
+
model: typeof rerankerRaw?.model === "string" ? rerankerRaw.model : typeof raw2.rerankerModel === "string" ? raw2.rerankerModel : d.reranker.model,
|
|
19990
|
+
topN: clampPositive(rerankerRaw?.topN ?? raw2.rerankerTopN, 1, 100, d.reranker.topN),
|
|
19991
|
+
timeoutMs: clampPositive(rerankerRaw?.timeoutMs ?? raw2.rerankerTimeoutMs, 100, 30000, d.reranker.timeoutMs)
|
|
19992
|
+
},
|
|
19993
|
+
autonomous: {
|
|
19994
|
+
enabled: autonomousRaw?.enabled === true || raw2.autonomousEnabled === true,
|
|
19995
|
+
frozen: autonomousRaw?.frozen === true || raw2.autonomousFrozen === true,
|
|
19996
|
+
allowUpdateDelete: autonomousRaw?.allowUpdateDelete === true || raw2.allowUpdateDelete === true,
|
|
19997
|
+
maintenanceIntervalMs: clampPositive(autonomousRaw?.maintenanceIntervalMs ?? raw2.maintenanceIntervalMs, 60000, 86400000, d.autonomous.maintenanceIntervalMs),
|
|
19998
|
+
maintenanceMode: (autonomousRaw?.maintenanceMode ?? raw2.maintenanceMode) === "execute" ? "execute" : d.autonomous.maintenanceMode
|
|
19999
|
+
},
|
|
20000
|
+
repair: {
|
|
20001
|
+
reembedCooldownMs: clampPositive(repairRaw?.reembedCooldownMs ?? raw2.repairReembedCooldownMs, 1e4, 3600000, d.repair.reembedCooldownMs),
|
|
20002
|
+
reembedHourlyBudget: clampPositive(repairRaw?.reembedHourlyBudget ?? raw2.repairReembedHourlyBudget, 1, 1000, d.repair.reembedHourlyBudget),
|
|
20003
|
+
requeueCooldownMs: clampPositive(repairRaw?.requeueCooldownMs ?? raw2.repairRequeueCooldownMs, 5000, 3600000, d.repair.requeueCooldownMs),
|
|
20004
|
+
requeueHourlyBudget: clampPositive(repairRaw?.requeueHourlyBudget ?? raw2.repairRequeueHourlyBudget, 1, 1000, d.repair.requeueHourlyBudget)
|
|
20005
|
+
},
|
|
20006
|
+
documents: {
|
|
20007
|
+
workerIntervalMs: clampPositive(documentsRaw?.workerIntervalMs ?? raw2.documentWorkerIntervalMs, 1000, 300000, d.documents.workerIntervalMs),
|
|
20008
|
+
chunkSize: clampPositive(documentsRaw?.chunkSize ?? raw2.documentChunkSize, 200, 50000, d.documents.chunkSize),
|
|
20009
|
+
chunkOverlap: clampPositive(documentsRaw?.chunkOverlap ?? raw2.documentChunkOverlap, 0, 1e4, d.documents.chunkOverlap),
|
|
20010
|
+
maxContentBytes: clampPositive(documentsRaw?.maxContentBytes ?? raw2.documentMaxContentBytes, 1024, 100 * 1024 * 1024, d.documents.maxContentBytes)
|
|
20011
|
+
}
|
|
19972
20012
|
};
|
|
19973
20013
|
}
|
|
19974
20014
|
function loadMemoryConfig(agentsDir) {
|
|
@@ -28921,15 +28961,16 @@ function startWorker(accessor2, provider2, pipelineCfg, decisionCfg, analytics)
|
|
|
28921
28961
|
const extraction = await extractFactsAndEntities(row.content, provider2);
|
|
28922
28962
|
const decisions = extraction.facts.length > 0 ? await runShadowDecisions(extraction.facts, accessor2, provider2, decisionCfg) : { proposals: [], warnings: [] };
|
|
28923
28963
|
const controlledWritesEnabled = pipelineCfg.enabled && !pipelineCfg.shadowMode && !pipelineCfg.mutationsFrozen;
|
|
28964
|
+
const { extraction: extractionCfg, autonomous: autonomousCfg } = pipelineCfg;
|
|
28924
28965
|
const embeddingByHash = new Map;
|
|
28925
28966
|
const prefetchWarnings = [];
|
|
28926
28967
|
if (controlledWritesEnabled) {
|
|
28927
28968
|
for (const proposal of decisions.proposals) {
|
|
28928
28969
|
if (proposal.action !== "add" && proposal.action !== "update")
|
|
28929
28970
|
continue;
|
|
28930
|
-
if (proposal.action === "update" && !
|
|
28971
|
+
if (proposal.action === "update" && !autonomousCfg.allowUpdateDelete)
|
|
28931
28972
|
continue;
|
|
28932
|
-
if (proposal.fact.confidence <
|
|
28973
|
+
if (proposal.fact.confidence < extractionCfg.minConfidence) {
|
|
28933
28974
|
continue;
|
|
28934
28975
|
}
|
|
28935
28976
|
const normalized = normalizeAndHashContent(proposal.fact.content);
|
|
@@ -28960,18 +29001,18 @@ function startWorker(accessor2, provider2, pipelineCfg, decisionCfg, analytics)
|
|
|
28960
29001
|
accessor2.withWriteTx((db) => {
|
|
28961
29002
|
if (controlledWritesEnabled) {
|
|
28962
29003
|
writeStats = applyPhaseCWrites(db, job.memory_id, decisions.proposals, {
|
|
28963
|
-
extractionModel:
|
|
29004
|
+
extractionModel: extractionCfg.model,
|
|
28964
29005
|
embeddingModel: decisionCfg.embedding.model,
|
|
28965
29006
|
factCount: extraction.facts.length,
|
|
28966
29007
|
entityCount: extraction.entities.length,
|
|
28967
|
-
minFactConfidenceForWrite:
|
|
28968
|
-
allowUpdateDelete:
|
|
29008
|
+
minFactConfidenceForWrite: extractionCfg.minConfidence,
|
|
29009
|
+
allowUpdateDelete: autonomousCfg.allowUpdateDelete
|
|
28969
29010
|
}, embeddingByHash);
|
|
28970
29011
|
} else {
|
|
28971
29012
|
for (const proposal of decisions.proposals) {
|
|
28972
29013
|
recordDecisionHistory(db, job.memory_id, proposal, {
|
|
28973
29014
|
shadow: true,
|
|
28974
|
-
extractionModel:
|
|
29015
|
+
extractionModel: extractionCfg.model,
|
|
28975
29016
|
factCount: extraction.facts.length,
|
|
28976
29017
|
entityCount: extraction.entities.length
|
|
28977
29018
|
});
|
|
@@ -28990,10 +29031,10 @@ function startWorker(accessor2, provider2, pipelineCfg, decisionCfg, analytics)
|
|
|
28990
29031
|
]
|
|
28991
29032
|
});
|
|
28992
29033
|
completeJob(db, job.id, resultPayload);
|
|
28993
|
-
updateExtractionStatus(db, job.memory_id, "completed",
|
|
29034
|
+
updateExtractionStatus(db, job.memory_id, "completed", extractionCfg.model);
|
|
28994
29035
|
});
|
|
28995
29036
|
let graphStats = { entitiesInserted: 0, entitiesUpdated: 0, relationsInserted: 0, relationsUpdated: 0, mentionsLinked: 0 };
|
|
28996
|
-
if (pipelineCfg.
|
|
29037
|
+
if (pipelineCfg.graph.enabled && extraction.entities.length > 0) {
|
|
28997
29038
|
try {
|
|
28998
29039
|
graphStats = accessor2.withWriteTx((db) => txPersistEntities(db, {
|
|
28999
29040
|
entities: extraction.entities,
|
|
@@ -29031,7 +29072,7 @@ function startWorker(accessor2, provider2, pipelineCfg, decisionCfg, analytics)
|
|
|
29031
29072
|
if (!running)
|
|
29032
29073
|
return;
|
|
29033
29074
|
try {
|
|
29034
|
-
const job = accessor2.withWriteTx((db) => leaseJob(db, "extract", pipelineCfg.
|
|
29075
|
+
const job = accessor2.withWriteTx((db) => leaseJob(db, "extract", pipelineCfg.worker.maxRetries));
|
|
29035
29076
|
if (!job)
|
|
29036
29077
|
return;
|
|
29037
29078
|
const jobStart = Date.now();
|
|
@@ -29057,7 +29098,7 @@ function startWorker(accessor2, provider2, pipelineCfg, decisionCfg, analytics)
|
|
|
29057
29098
|
accessor2.withWriteTx((db) => {
|
|
29058
29099
|
failJob(db, job.id, msg, job.attempts, job.max_attempts);
|
|
29059
29100
|
if (job.attempts >= job.max_attempts) {
|
|
29060
|
-
updateExtractionStatus(db, job.memory_id, "failed", pipelineCfg.
|
|
29101
|
+
updateExtractionStatus(db, job.memory_id, "failed", pipelineCfg.extraction.model);
|
|
29061
29102
|
}
|
|
29062
29103
|
});
|
|
29063
29104
|
consecutiveFailures++;
|
|
@@ -29069,7 +29110,7 @@ function startWorker(accessor2, provider2, pipelineCfg, decisionCfg, analytics)
|
|
|
29069
29110
|
}
|
|
29070
29111
|
function getBackoffDelay() {
|
|
29071
29112
|
if (consecutiveFailures === 0)
|
|
29072
|
-
return pipelineCfg.
|
|
29113
|
+
return pipelineCfg.worker.pollMs;
|
|
29073
29114
|
const exp = Math.min(BASE_DELAY * 2 ** consecutiveFailures, MAX_DELAY);
|
|
29074
29115
|
return exp + Math.random() * JITTER;
|
|
29075
29116
|
}
|
|
@@ -29088,7 +29129,7 @@ function startWorker(accessor2, provider2, pipelineCfg, decisionCfg, analytics)
|
|
|
29088
29129
|
if (!running)
|
|
29089
29130
|
return;
|
|
29090
29131
|
try {
|
|
29091
|
-
const reaped = reapStaleLeases(accessor2, pipelineCfg.leaseTimeoutMs);
|
|
29132
|
+
const reaped = reapStaleLeases(accessor2, pipelineCfg.worker.leaseTimeoutMs);
|
|
29092
29133
|
if (reaped > 0) {
|
|
29093
29134
|
logger.info("pipeline", "Reaped stale leases", { count: reaped });
|
|
29094
29135
|
}
|
|
@@ -29100,9 +29141,9 @@ function startWorker(accessor2, provider2, pipelineCfg, decisionCfg, analytics)
|
|
|
29100
29141
|
}, 60000);
|
|
29101
29142
|
scheduleTick();
|
|
29102
29143
|
logger.info("pipeline", "Worker started", {
|
|
29103
|
-
pollMs: pipelineCfg.
|
|
29104
|
-
maxRetries: pipelineCfg.
|
|
29105
|
-
model: pipelineCfg.
|
|
29144
|
+
pollMs: pipelineCfg.worker.pollMs,
|
|
29145
|
+
maxRetries: pipelineCfg.worker.maxRetries,
|
|
29146
|
+
model: pipelineCfg.extraction.model,
|
|
29106
29147
|
mode: pipelineCfg.enabled && !pipelineCfg.shadowMode && !pipelineCfg.mutationsFrozen ? "controlled-write" : "shadow"
|
|
29107
29148
|
});
|
|
29108
29149
|
return {
|
|
@@ -29586,13 +29627,13 @@ function createRateLimiter() {
|
|
|
29586
29627
|
};
|
|
29587
29628
|
}
|
|
29588
29629
|
function checkRepairGate(cfg, ctx, limiter, action, cooldownMs, hourlyBudget) {
|
|
29589
|
-
if (cfg.
|
|
29590
|
-
return { allowed: false, reason: "
|
|
29630
|
+
if (cfg.autonomous.frozen) {
|
|
29631
|
+
return { allowed: false, reason: "autonomous.frozen is set" };
|
|
29591
29632
|
}
|
|
29592
|
-
if (ctx.actorType === "agent" && !cfg.
|
|
29633
|
+
if (ctx.actorType === "agent" && !cfg.autonomous.enabled) {
|
|
29593
29634
|
return {
|
|
29594
29635
|
allowed: false,
|
|
29595
|
-
reason: "
|
|
29636
|
+
reason: "autonomous.enabled is false; agents cannot trigger repairs"
|
|
29596
29637
|
};
|
|
29597
29638
|
}
|
|
29598
29639
|
return limiter.check(action, cooldownMs, hourlyBudget);
|
|
@@ -29615,7 +29656,7 @@ var DEFAULT_REQUEUE_BATCH = 50;
|
|
|
29615
29656
|
var FTS_HOURLY_BUDGET = 5;
|
|
29616
29657
|
function requeueDeadJobs(accessor2, cfg, ctx, limiter, maxBatch = DEFAULT_REQUEUE_BATCH) {
|
|
29617
29658
|
const action = "requeueDeadJobs";
|
|
29618
|
-
const gate = checkRepairGate(cfg, ctx, limiter, action, cfg.
|
|
29659
|
+
const gate = checkRepairGate(cfg, ctx, limiter, action, cfg.repair.requeueCooldownMs, cfg.repair.requeueHourlyBudget);
|
|
29619
29660
|
if (!gate.allowed) {
|
|
29620
29661
|
return {
|
|
29621
29662
|
action,
|
|
@@ -29654,7 +29695,7 @@ function requeueDeadJobs(accessor2, cfg, ctx, limiter, maxBatch = DEFAULT_REQUEU
|
|
|
29654
29695
|
}
|
|
29655
29696
|
function releaseStaleLeases(accessor2, cfg, ctx, limiter) {
|
|
29656
29697
|
const action = "releaseStaleLeases";
|
|
29657
|
-
const gate = checkRepairGate(cfg, ctx, limiter, action, cfg.
|
|
29698
|
+
const gate = checkRepairGate(cfg, ctx, limiter, action, cfg.repair.requeueCooldownMs, cfg.repair.requeueHourlyBudget);
|
|
29658
29699
|
if (!gate.allowed) {
|
|
29659
29700
|
return {
|
|
29660
29701
|
action,
|
|
@@ -29663,7 +29704,7 @@ function releaseStaleLeases(accessor2, cfg, ctx, limiter) {
|
|
|
29663
29704
|
message: gate.reason ?? "denied by policy gate"
|
|
29664
29705
|
};
|
|
29665
29706
|
}
|
|
29666
|
-
const cutoff = new Date(Date.now() - cfg.leaseTimeoutMs).toISOString();
|
|
29707
|
+
const cutoff = new Date(Date.now() - cfg.worker.leaseTimeoutMs).toISOString();
|
|
29667
29708
|
const affected = accessor2.withWriteTx((db) => {
|
|
29668
29709
|
const now = new Date().toISOString();
|
|
29669
29710
|
const result = db.prepare(`UPDATE memory_jobs
|
|
@@ -29690,7 +29731,7 @@ function releaseStaleLeases(accessor2, cfg, ctx, limiter) {
|
|
|
29690
29731
|
}
|
|
29691
29732
|
function checkFtsConsistency(accessor2, cfg, ctx, limiter, repair = false) {
|
|
29692
29733
|
const action = "checkFtsConsistency";
|
|
29693
|
-
const gate = checkRepairGate(cfg, ctx, limiter, action, cfg.
|
|
29734
|
+
const gate = checkRepairGate(cfg, ctx, limiter, action, cfg.repair.reembedCooldownMs, FTS_HOURLY_BUDGET);
|
|
29694
29735
|
if (!gate.allowed) {
|
|
29695
29736
|
return {
|
|
29696
29737
|
action,
|
|
@@ -29729,7 +29770,7 @@ function checkFtsConsistency(accessor2, cfg, ctx, limiter, repair = false) {
|
|
|
29729
29770
|
}
|
|
29730
29771
|
function triggerRetentionSweep(cfg, ctx, limiter, retentionHandle) {
|
|
29731
29772
|
const action = "triggerRetentionSweep";
|
|
29732
|
-
const gate = checkRepairGate(cfg, ctx, limiter, action, cfg.
|
|
29773
|
+
const gate = checkRepairGate(cfg, ctx, limiter, action, cfg.repair.requeueCooldownMs, cfg.repair.requeueHourlyBudget);
|
|
29733
29774
|
if (!gate.allowed) {
|
|
29734
29775
|
return {
|
|
29735
29776
|
action,
|
|
@@ -29771,7 +29812,7 @@ function getEmbeddingGapStats(accessor2) {
|
|
|
29771
29812
|
var DEFAULT_REEMBED_BATCH = 50;
|
|
29772
29813
|
async function reembedMissingMemories(accessor2, cfg, ctx, limiter, embeddingFn, embeddingCfg, batchSize = DEFAULT_REEMBED_BATCH, dryRun = false) {
|
|
29773
29814
|
const action = "reembedMissingMemories";
|
|
29774
|
-
const gate = checkRepairGate(cfg, ctx, limiter, action, cfg.
|
|
29815
|
+
const gate = checkRepairGate(cfg, ctx, limiter, action, cfg.repair.reembedCooldownMs, cfg.repair.reembedHourlyBudget);
|
|
29775
29816
|
if (!gate.allowed) {
|
|
29776
29817
|
return {
|
|
29777
29818
|
action,
|
|
@@ -29964,7 +30005,7 @@ function startMaintenanceWorker(accessor2, cfg, tracker, retentionHandle) {
|
|
|
29964
30005
|
haltTracker.reset();
|
|
29965
30006
|
return { report, recommendations, executed };
|
|
29966
30007
|
}
|
|
29967
|
-
if (cfg.maintenanceMode === "observe") {
|
|
30008
|
+
if (cfg.autonomous.maintenanceMode === "observe") {
|
|
29968
30009
|
logger.info("maintenance", "Recommendations (observe-only)", {
|
|
29969
30010
|
composite: report.composite.score.toFixed(2),
|
|
29970
30011
|
recommendations: recommendations.map((r2) => r2.action)
|
|
@@ -30004,7 +30045,7 @@ function startMaintenanceWorker(accessor2, cfg, tracker, retentionHandle) {
|
|
|
30004
30045
|
}
|
|
30005
30046
|
return { report, recommendations, executed };
|
|
30006
30047
|
}
|
|
30007
|
-
if (cfg.
|
|
30048
|
+
if (cfg.autonomous.enabled && !cfg.autonomous.frozen) {
|
|
30008
30049
|
timer = setInterval(() => {
|
|
30009
30050
|
if (!running)
|
|
30010
30051
|
return;
|
|
@@ -30015,10 +30056,10 @@ function startMaintenanceWorker(accessor2, cfg, tracker, retentionHandle) {
|
|
|
30015
30056
|
error: e instanceof Error ? e.message : String(e)
|
|
30016
30057
|
});
|
|
30017
30058
|
}
|
|
30018
|
-
}, cfg.maintenanceIntervalMs);
|
|
30059
|
+
}, cfg.autonomous.maintenanceIntervalMs);
|
|
30019
30060
|
logger.info("maintenance", "Worker started", {
|
|
30020
|
-
mode: cfg.maintenanceMode,
|
|
30021
|
-
intervalMs: cfg.maintenanceIntervalMs
|
|
30061
|
+
mode: cfg.autonomous.maintenanceMode,
|
|
30062
|
+
intervalMs: cfg.autonomous.maintenanceIntervalMs
|
|
30022
30063
|
});
|
|
30023
30064
|
} else {
|
|
30024
30065
|
logger.info("maintenance", "Worker skipped (disabled or frozen)");
|
|
@@ -30227,7 +30268,7 @@ async function processDocument(deps, job) {
|
|
|
30227
30268
|
let title = doc.title;
|
|
30228
30269
|
if (doc.source_type === "url" && doc.source_url) {
|
|
30229
30270
|
const result = await fetchUrlContent(doc.source_url, {
|
|
30230
|
-
maxBytes: pipelineCfg.
|
|
30271
|
+
maxBytes: pipelineCfg.documents.maxContentBytes
|
|
30231
30272
|
});
|
|
30232
30273
|
content = result.content;
|
|
30233
30274
|
if (result.title && !title)
|
|
@@ -30248,7 +30289,7 @@ async function processDocument(deps, job) {
|
|
|
30248
30289
|
});
|
|
30249
30290
|
}
|
|
30250
30291
|
accessor2.withWriteTx((db) => updateDocumentStatus(db, docId, "chunking"));
|
|
30251
|
-
const chunks = chunkText(content, pipelineCfg.
|
|
30292
|
+
const chunks = chunkText(content, pipelineCfg.documents.chunkSize, pipelineCfg.documents.chunkOverlap);
|
|
30252
30293
|
accessor2.withWriteTx((db) => {
|
|
30253
30294
|
db.prepare("UPDATE documents SET chunk_count = ?, updated_at = ? WHERE id = ?").run(chunks.length, new Date().toISOString(), docId);
|
|
30254
30295
|
});
|
|
@@ -30329,7 +30370,7 @@ function startDocumentWorker(deps) {
|
|
|
30329
30370
|
async function tick() {
|
|
30330
30371
|
if (!running)
|
|
30331
30372
|
return;
|
|
30332
|
-
const job = deps.accessor.withWriteTx((db) => leaseDocumentJob(db, deps.pipelineCfg.
|
|
30373
|
+
const job = deps.accessor.withWriteTx((db) => leaseDocumentJob(db, deps.pipelineCfg.worker.maxRetries));
|
|
30333
30374
|
if (!job)
|
|
30334
30375
|
return;
|
|
30335
30376
|
try {
|
|
@@ -30357,10 +30398,10 @@ function startDocumentWorker(deps) {
|
|
|
30357
30398
|
error: String(e)
|
|
30358
30399
|
});
|
|
30359
30400
|
});
|
|
30360
|
-
}, deps.pipelineCfg.
|
|
30401
|
+
}, deps.pipelineCfg.documents.workerIntervalMs);
|
|
30361
30402
|
logger.info("document-worker", "Worker started", {
|
|
30362
|
-
intervalMs: deps.pipelineCfg.
|
|
30363
|
-
chunkSize: deps.pipelineCfg.
|
|
30403
|
+
intervalMs: deps.pipelineCfg.documents.workerIntervalMs,
|
|
30404
|
+
chunkSize: deps.pipelineCfg.documents.chunkSize
|
|
30364
30405
|
});
|
|
30365
30406
|
return {
|
|
30366
30407
|
async stop() {
|
|
@@ -34559,11 +34600,11 @@ app.post("/api/memory/recall", async (c2) => {
|
|
|
34559
34600
|
scored.push({ id, score, source });
|
|
34560
34601
|
}
|
|
34561
34602
|
scored.sort((a2, b2) => b2.score - a2.score);
|
|
34562
|
-
if (cfg.pipelineV2.
|
|
34603
|
+
if (cfg.pipelineV2.graph.enabled && cfg.pipelineV2.graph.boostWeight > 0) {
|
|
34563
34604
|
try {
|
|
34564
|
-
const graphResult = getDbAccessor().withReadDb((db) => getGraphBoostIds(query, db, cfg.pipelineV2.
|
|
34605
|
+
const graphResult = getDbAccessor().withReadDb((db) => getGraphBoostIds(query, db, cfg.pipelineV2.graph.boostTimeoutMs));
|
|
34565
34606
|
if (graphResult.graphLinkedIds.size > 0) {
|
|
34566
|
-
const gw = cfg.pipelineV2.
|
|
34607
|
+
const gw = cfg.pipelineV2.graph.boostWeight;
|
|
34567
34608
|
for (const s2 of scored) {
|
|
34568
34609
|
if (graphResult.graphLinkedIds.has(s2.id)) {
|
|
34569
34610
|
s2.score = (1 - gw) * s2.score + gw;
|
|
@@ -34577,9 +34618,9 @@ app.post("/api/memory/recall", async (c2) => {
|
|
|
34577
34618
|
});
|
|
34578
34619
|
}
|
|
34579
34620
|
}
|
|
34580
|
-
if (cfg.pipelineV2.
|
|
34621
|
+
if (cfg.pipelineV2.reranker.enabled && cfg.pipelineV2.reranker.model) {
|
|
34581
34622
|
try {
|
|
34582
|
-
const topForRerank = scored.slice(0, cfg.pipelineV2.
|
|
34623
|
+
const topForRerank = scored.slice(0, cfg.pipelineV2.reranker.topN);
|
|
34583
34624
|
const rerankIds = topForRerank.map((s2) => s2.id);
|
|
34584
34625
|
const rerankPlaceholders = rerankIds.map(() => "?").join(", ");
|
|
34585
34626
|
const contentRows = getDbAccessor().withReadDb((db) => db.prepare(`SELECT id, content FROM memories
|
|
@@ -34591,9 +34632,9 @@ app.post("/api/memory/recall", async (c2) => {
|
|
|
34591
34632
|
score: s2.score
|
|
34592
34633
|
}));
|
|
34593
34634
|
const reranked = await rerank(query, candidates, noopReranker, {
|
|
34594
|
-
topN: cfg.pipelineV2.
|
|
34595
|
-
timeoutMs: cfg.pipelineV2.
|
|
34596
|
-
model: cfg.pipelineV2.
|
|
34635
|
+
topN: cfg.pipelineV2.reranker.topN,
|
|
34636
|
+
timeoutMs: cfg.pipelineV2.reranker.timeoutMs,
|
|
34637
|
+
model: cfg.pipelineV2.reranker.model
|
|
34597
34638
|
});
|
|
34598
34639
|
const rerankedMap = new Map(reranked.map((r2, i3) => [r2.id, i3]));
|
|
34599
34640
|
for (const s2 of scored) {
|
|
@@ -37074,12 +37115,12 @@ async function main() {
|
|
|
37074
37115
|
authBatchForgetLimiter = new AuthRateLimiter(rl.batchForget.windowMs, rl.batchForget.max);
|
|
37075
37116
|
if (rl.admin)
|
|
37076
37117
|
authAdminLimiter = new AuthRateLimiter(rl.admin.windowMs, rl.admin.max);
|
|
37077
|
-
const llmProvider = memoryCfg.pipelineV2.
|
|
37078
|
-
model: memoryCfg.pipelineV2.
|
|
37079
|
-
defaultTimeoutMs: memoryCfg.pipelineV2.
|
|
37118
|
+
const llmProvider = memoryCfg.pipelineV2.extraction.provider === "claude-code" ? createClaudeCodeProvider({
|
|
37119
|
+
model: memoryCfg.pipelineV2.extraction.model || "haiku",
|
|
37120
|
+
defaultTimeoutMs: memoryCfg.pipelineV2.extraction.timeout || 60000
|
|
37080
37121
|
}) : createOllamaProvider({
|
|
37081
|
-
model: memoryCfg.pipelineV2.
|
|
37082
|
-
defaultTimeoutMs: memoryCfg.pipelineV2.
|
|
37122
|
+
model: memoryCfg.pipelineV2.extraction.model || "qwen3:4b",
|
|
37123
|
+
defaultTimeoutMs: memoryCfg.pipelineV2.extraction.timeout || 90000
|
|
37083
37124
|
});
|
|
37084
37125
|
initLlmProvider(llmProvider);
|
|
37085
37126
|
if (memoryCfg.pipelineV2.enabled || memoryCfg.pipelineV2.shadowMode) {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bm as he,bt as mt,X as A,q as U,P as T,W as te,bu as _t}from"./pKcKaM5A.js";import{o as qe}from"./DXDZTf9R.js";const V=[];function Se(e,t=he){let n=null;const r=new Set;function a(o){if(mt(e,o)&&(e=o,n)){const l=!V.length;for(const c of r)c[1](),V.push(c,e);if(l){for(let c=0;c<V.length;c+=2)V[c][0](V[c+1]);V.length=0}}}function i(o){a(o(e))}function s(o,l=he){const c=[o,l];return r.add(c),r.size===1&&(n=t(a,i)||he),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:a,update:i,subscribe:s}}class Ee{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Re{constructor(t,n){this.status=t,this.location=n}}class xe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function yt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function pe({href:e}){return e.split("#")[0]}function bt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...d)=>(n(c),s[o](c,...d));t();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];r&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return t(),e[s]},enumerable:!0,configurable:!0});return a}function kt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Et=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&M.delete(Le(e)),Et(e,t));const M=new Map;function Rt(e,t){const n=Le(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&M.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function xt(e,t,n){if(M.size>0){const r=Le(e,n),a=M.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);M.delete(r)}}return window.fetch(t,n)}function Le(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${kt(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function At(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return ge(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return ge(String.fromCharCode(...l.slice(2).split("-").map(w=>parseInt(w,16))));const d=Lt.exec(l),[,p,f,u,h]=d;return t.push({name:u,matcher:h,optional:!!p,rest:!!f,chained:f?c===1&&s[0]==="":!1}),f?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return ge(l)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Ut)}function Pt(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=a[o-s];if(l.chained&&l.rest&&s&&(c=a.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&l.chained&&(s=0),!d&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function ge(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function It({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:p,params:f}=At(o),u={id:o,exec:h=>{const w=p.exec(h);if(w)return Pt(w,f,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...c||[]].map(s),leaf:i(l)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function ze(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function De(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_1m4j932?.base??"",Ot=globalThis.__sveltekit_1m4j932?.assets??x??"",$t="1771852013879",He="sveltekit:snapshot",Je="sveltekit:scroll",Ye="sveltekit:states",Ct="sveltekit:pageurl",B="sveltekit:history",z="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Ae=location.origin;function Xe(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function q(){return{x:pageXOffset,y:pageYOffset}}function K(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...j,"":j.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ze(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function we(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===Ae&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function ne(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=K(o,"preload-code")),a===null&&(a=K(o,"preload-data")),t===null&&(t=K(o,"keepfocus")),n===null&&(n=K(o,"noscroll")),i===null&&(i=K(o,"reload")),s===null&&(s=K(o,"replacestate")),o=Qe(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function Ke(e){const t=Se(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:r,set:a,subscribe:i}}const et={v:()=>{}};function jt(){const{set:e,subscribe:t}=Se(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ot}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==$t;return s&&(e(!0),et.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==Ae||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function fn(e){}const tt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...tt];const Nt=new Set([...tt]);[...Nt];function qt(e){return e.filter(t=>t!=null)}function Ue(e){return e instanceof Ee||e instanceof xe?e.status:500}function Dt(e){return e instanceof xe?e.text:"Internal Error"}let k,H,me;const Vt=qe.toString().includes("$$")||/function \w+\(\) \{\}/.test(qe.toString());Vt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},H={current:null},me={current:!1}):(k=new class{#e=A({});get data(){return U(this.#e)}set data(t){T(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){T(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){T(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){T(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){T(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){T(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){T(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){T(this.#i,t)}},H=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},me=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},et.v=()=>me.current=!0);function Kt(e){Object.assign(k,e)}const Be={spanContext(){return Bt},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Bt={traceId:"",spanId:"",traceFlags:0},Ft=new Set(["icon","shortcut icon","apple-touch-icon"]),C=ze(Je)??{},J=ze(He)??{},$={url:Ke({}),page:Ke({}),navigating:Se(null),updated:jt()};function Te(e){C[e]=q()}function Gt(e,t){let n=e+1;for(;C[n];)delete C[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function Y(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function nt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Fe(){}let Pe,ve,re,P,ye,v;const ae=[],oe=[];let L=null;function be(){L?.fork?.then(e=>e?.discard()),L=null}const ee=new Map,rt=new Set,Mt=new Set,W=new Set;let _={branch:[],error:null,url:null},at=!1,se=!1,Ge=!0,X=!1,G=!1,ot=!1,Ie=!1,st,y,R,N;const ie=new Set,Me=new Map;async function gn(e,t,n){globalThis.__sveltekit_1m4j932?.data&&globalThis.__sveltekit_1m4j932.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Pe=It(e),P=document.documentElement,ye=t,ve=e.nodes[0],re=e.nodes[1],ve(),re(),y=history.state?.[B],R=history.state?.[z],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[z]:R},""));const r=C[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await an(ye,n)):(await F({type:"enter",url:Xe(v.hash?ln(new URL(location.href)):location.href),replace_state:!0}),a()),rn()}function Wt(){ae.length=0,Ie=!1}function it(e){oe.some(t=>t?.snapshot)&&(J[e]=oe.map(t=>t?.snapshot?.capture()))}function lt(e){J[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function We(){Te(y),De(Je,C),it(R),De(He,J)}async function zt(e,t,n,r){let a;t.invalidateAll&&be(),await F({type:"goto",url:Xe(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ie=!0,a=[...Me.keys()]),t.invalidate&&t.invalidate.forEach(nn)}}),t.invalidateAll&&te().then(te).then(()=>{Me.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Ht(e){if(e.id!==L?.id){be();const t={};ie.add(t),L={id:e.id,token:t,promise:ft({...e,preload:t}).then(n=>(ie.delete(t),n.type==="loaded"&&n.state.error&&be(),n)),fork:null}}return L.promise}async function _e(e){const t=(await fe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function ct(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),st=new v.root({target:t,props:{...e.props,stores:$,components:oe},hydrate:n,sync:!1}),await Promise.resolve(),lt(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:C[y]??q()},willUnload:!1,type:"enter",complete:Promise.resolve()};W.forEach(i=>i(a))}se=!0}function le({url:e,params:t,branch:n,status:r,error:a,route:i,form:s}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const u of n)u?.slash!==void 0&&(o=u.slash);e.pathname=wt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:qt(n).map(u=>u.node.component),page:Ne(k)}};s!==void 0&&(l.props.form=s);let c={},d=!k,p=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const h=n[u],w=_.branch[u];h?.data!==w?.data&&(d=!0),h&&(c={...c,...h.data},d&&(l.props[`data_${p}`]=c),p+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||s!==void 0&&s!==k.form||d)&&(l.props.page={error:a,params:t,route:{id:i?.id??null},state:{},status:r,url:new URL(e),form:s??null,data:d?c:k.data}),l}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();if(c.universal?.load){let d=function(...f){for(const u of f){const{href:h}=new URL(u,n);l.dependencies.add(h)}};const p={tracing:{enabled:!1,root:Be,current:Be},route:new Proxy(a,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:i?.data??null,url:bt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},v.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:h,promise:w}=ut(f,u,n);return o&&d(h.href),w},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};s=await c.universal.load.call(null,p)??null}return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function ut(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=se?xt(r,a.href,t):Rt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Ie)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(ae.some(o=>o(new URL(s))))return!0;return!1}function $e(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Yt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function Xt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ne(k),constructors:[]}}}async function ft({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ie.delete(L.token),L.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(m=>m?.().catch(()=>{})),c.forEach(m=>m?.[1]().catch(()=>{}));const d=_.url?e!==ce(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Yt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const S=_.branch[g];return m[1]===S?.loader&&!Jt(u,p,d,f,S.universal?.uses,r)?S:(u=!0,Oe({loader:m[1],url:n,params:r,route:a,parent:async()=>{const I={};for(let O=0;O<g;O+=1)Object.assign(I,(await h[O])?.data);return I},server_data_node:$e(m[0]?{type:"skip"}:null,m[0]?S?.server:void 0)}))});for(const m of h)m.catch(()=>{});const w=[];for(let m=0;m<c.length;m+=1)if(c[m])try{w.push(await h[m])}catch(g){if(g instanceof Re)return{type:"redirect",location:g.location};if(ie.has(i))return Xt({error:await Q(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let S=Ue(g),E;if(g instanceof Ee)E=g.body;else{if(await $.updated.check())return await nt(),await Y(n);E=await Q(g,{params:r,url:n,route:{id:a.id}})}const I=await Qt(m,w,s);return I?le({url:n,params:r,branch:w.slice(0,I.idx).concat(I.node),status:S,error:E,route:a}):await ht(n,{id:a.id},E,S)}else w.push(void 0);return le({url:n,params:r,branch:w,status:200,error:null,route:a,form:t?void 0:null})}async function Qt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Ce({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await Oe({loader:ve,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:$e(i)}),o={node:await re(),loader:re,universal:null,server:null,data:null};return le({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Re)return zt(new URL(s.location,location.href),{},0);throw s}}async function Zt(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ut(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);v.hash?i.hash=a:i.pathname=a,a=i}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function fe(e,t){if(e&&!ue(e,x,v.hash)){const n=await Zt(e);if(!n)return;const r=en(n);for(const a of Pe){const i=a.exec(r);if(i)return{id:ce(e),invalidating:t,route:a,params:yt(i),url:e}}}}function en(e){return vt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=je(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return X||rt.forEach(c=>c(l)),s?null:o}async function F({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=Fe,block:d=Fe,event:p}){const f=N;N=l;const u=await fe(t,!1),h=e==="enter"?je(_,u,t,e):dt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),N===l&&(N=f);return}const w=y,m=R;c(),X=!0,se&&h.navigation.type!=="enter"&&$.navigating.set(H.current=h.navigation);let g=u&&await ft(u);if(!g){if(ue(t,x,v.hash))return await Y(t,i);g=await ht(t,{id:null},await Q(new xe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,N!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await F({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),h.fulfil(void 0);return}g=await Ce({status:500,error:await Q(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await nt(),await Y(t,i));if(Wt(),Te(w),it(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const b=i?0:1,Z={[B]:y+=b,[z]:R+=b,[Ye]:s};(i?history.replaceState:history.pushState).call(history,Z,"",t),i||Gt(y,R)}const S=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let E;if(se){const b=(await Promise.all(Array.from(Mt,D=>D(h.navigation)))).filter(D=>typeof D=="function");if(b.length>0){let D=function(){b.forEach(de=>{W.delete(de)})};b.push(D),b.forEach(de=>{W.add(de)})}_=g.state,g.props.page&&(g.props.page.url=t);const Z=S&&await S;Z?E=Z.commit():(st.$set(g.props),Kt(g.props.page),E=_t?.()),ot=!0}else await ct(g,ye,!1);const{activeElement:I}=document;await E,await te(),await te();let O=null;if(Ge){const b=n?n.scroll:a?q():null;b?scrollTo(b.x,b.y):(O=t.hash&&document.getElementById(pt(t)))?O.scrollIntoView():scrollTo(0,0)}const gt=document.activeElement!==I&&document.activeElement!==document.body;!r&&!gt&&sn(t,!O),Ge=!0,g.props.page&&Object.assign(k,g.props.page),X=!1,e==="popstate"&<(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=q()),W.forEach(b=>b(h.navigation)),$.navigating.set(H.current=null)}async function ht(e,t,n,r,a){return e.origin===Ae&&e.pathname===location.pathname&&!at?await Ce({status:r,error:n,url:e,route:t}):await Y(e,a)}function tn(){let e,t={element:void 0,href:void 0},n;P.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,j.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],j.tap)}P.addEventListener("mousedown",r),P.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(_e(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=Ze(o,P),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=we(c,x,v.hash);if(f||u)return;const h=ne(c),w=p&&ce(_.url)===ce(p);if(!(h.reload||w))if(l<=h.preload_data){t={element:c,href:c.href},n=j.tap;const m=await fe(p,!1);if(!m)return;Ht(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,_e(p))}function s(){a.disconnect();for(const o of P.querySelectorAll("a")){const{url:l,external:c,download:d}=we(o,x,v.hash);if(c||d)continue;const p=ne(o);p.reload||(p.preload_code===j.viewport&&a.observe(o),p.preload_code===j.eager&&_e(l))}}W.add(s),s()}function Q(e,t){if(e instanceof Ee)return e.body;const n=Ue(e),r=Dt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function nn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function rn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(We(),!X){const r=je(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};rt.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&We()}),navigator.connection?.saveData||tn(),P.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Ze(t.composedPath()[0],P);if(!n)return;const{url:r,external:a,target:i,download:s}=we(n,x,v.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=ne(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===pe(location);if(a||o.reload&&(!p||!d)){dt({url:r,type:"link",event:t})?X=!0:t.preventDefault();return}if(d!==void 0&&p){const[,f]=_.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(d));u&&(u.scrollIntoView(),u.focus())}return}if(G=!0,Te(y),e(r),!o.replace_state)return;G=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await F({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),P.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(s,x,!1))return;const o=t.target,l=ne(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),F({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!ke){if(t.state?.[B]){const n=t.state[B];if(N={},n===y)return;const r=C[n],a=t.state[Ye]??{},i=new URL(t.state[Ct]??location.href),s=t.state[z],o=_.url?pe(location)===pe(_.url):!1;if(s===R&&(ot||o)){a!==k.state&&(k.state=a),e(i),C[y]=q(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await F({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:N,event:t})}else if(!G){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[B]:++y,[z]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Ft.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(H.current=null)});function e(t){_.url=k.url=t,$.page.set(Ne(k)),$.page.notify()}}async function an(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){at=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await fe(c,!1)||{}),d=Pe.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(w,m)=>{const g=o[m];return g?.uses&&(g.uses=on(g.uses)),Oe({loader:v.nodes[w],url:c,params:a,route:i,parent:async()=>{const S={};for(let E=0;E<m;E+=1)Object.assign(S,(await u[E]).data);return S},server_data_node:$e(g)})}),h=await Promise.all(u);if(d){const w=d.layouts;for(let m=0;m<w.length;m++)w[m]||h.splice(m,0,void 0)}p=le({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Re){await Y(new URL(u.location,location.href));return}p=await Ce({status:Ue(u),error:await Q(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await ct(p,e,f)}function on(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let ke=!1;function sn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=pt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=q();setTimeout(()=>{const o=history.state;ke=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),ke=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],l=a.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function je(e,t,n,r,a=null){let i,s;const o=new Promise((c,d)=>{i=c,s=d});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:q()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function Ne(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function ln(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function pt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{gn as a,fn as l,k as p,$ as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o,a as r}from"../chunks/C_f-im0O.js";export{o as load_css,r as start};
|