signetai 0.35.3 → 0.35.4

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.
@@ -1 +1 @@
1
- import{ba as be,o as Ne,s as A,g as U,b as T,$ as ee,bb as pt}from"./il3IN2es.js";class ke{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 Ee{constructor(t,n){this.status=t,this.location=n}}class Se extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function gt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function mt(e){return e.split("%25").map(decodeURI).join("%25")}function _t(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function de({href:e}){return e.split("#")[0]}function vt(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 wt(...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 yt(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 bt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Re(e)),bt(e,t));const G=new Map;function kt(e,t){const n=Re(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&&G.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=yt(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function Et(e,t,n){if(G.size>0){const r=Re(e,n),a=G.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);G.delete(r)}}return window.fetch(t,n)}function Re(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="${wt(...a)}"]`}return r}const St=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Rt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Lt(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 he(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return he(String.fromCharCode(...l.slice(2).split("-").map(v=>parseInt(v,16))));const d=St.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 he(l)}).join("")}).join("")}/?$`),params:t}}function xt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Lt(e){return e.slice(1).split("/").filter(xt)}function At(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 he(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ut({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}=Rt(o),u={id:o,exec:h=>{const v=p.exec(h);if(v)return At(v,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 Me(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function je(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_lfp112?.base??"",Tt=globalThis.__sveltekit_lfp112?.assets??x??"",Pt="1772577254413",He="sveltekit:snapshot",We="sveltekit:scroll",Je="sveltekit:states",It="sveltekit:pageurl",K="sveltekit:history",H="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},xe=location.origin;function Ye(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 D(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const De={...N,"":N.hover};function ze(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Xe(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=ze(e)}}function me(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||ce(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===xe&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function te(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=ze(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:De[r??"off"],preload_data:De[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function qe(e){const t=be(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 Qe={v:()=>{}};function Ot(){const{set:e,subscribe:t}=be(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Tt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==Pt;return s&&(e(!0),Qe.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function ce(e,t,n){return e.origin!==xe||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function sn(e){}const Ze=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Ze];const $t=new Set([...Ze]);[...$t];function Ct(e){return e.filter(t=>t!=null)}function Le(e){return e instanceof ke||e instanceof Se?e.status:500}function Nt(e){return e instanceof Se?e.text:"Internal Error"}let k,W,pe;const jt=Ne.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ne.toString());jt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},pe={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)}},W=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},pe=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},Qe.v=()=>pe.current=!0);function Dt(e){Object.assign(k,e)}const Ve={spanContext(){return qt},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}},qt={traceId:"",spanId:"",traceFlags:0},Vt=new Set(["icon","shortcut icon","apple-touch-icon"]),C=Me(We)??{},J=Me(He)??{},$={url:qe({}),page:qe({}),navigating:be(null),updated:Ot()};function Ae(e){C[e]=D()}function Kt(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 et(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Ke(){}let Ue,_e,ne,P,ve,w;const re=[],ae=[];let L=null;function we(){L?.fork?.then(e=>e?.discard()),L=null}const Z=new Map,tt=new Set,Bt=new Set,M=new Set;let _={branch:[],error:null,url:null},nt=!1,oe=!1,Be=!0,z=!1,F=!1,rt=!1,Te=!1,at,y,R,j;const se=new Set,Fe=new Map;async function fn(e,t,n){globalThis.__sveltekit_lfp112?.data&&globalThis.__sveltekit_lfp112.data,document.URL!==location.href&&(location.href=location.href),w=e,await e.hooks.init?.(),Ue=Ut(e),P=document.documentElement,ve=t,_e=e.nodes[0],ne=e.nodes[1],_e(),ne(),y=history.state?.[K],R=history.state?.[H],y||(y=R=Date.now(),history.replaceState({...history.state,[K]:y,[H]:R},""));const r=C[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await tn(ve,n)):(await B({type:"enter",url:Ye(w.hash?an(new URL(location.href)):location.href),replace_state:!0}),a()),en()}function Ft(){re.length=0,Te=!1}function ot(e){ae.some(t=>t?.snapshot)&&(J[e]=ae.map(t=>t?.snapshot?.capture()))}function st(e){J[e]?.forEach((t,n)=>{ae[n]?.snapshot?.restore(t)})}function Ge(){Ae(y),je(We,C),ot(R),je(He,J)}async function Gt(e,t,n,r){let a;t.invalidateAll&&we(),await B({type:"goto",url:Ye(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Te=!0,a=[...Fe.keys()]),t.invalidate&&t.invalidate.forEach(Zt)}}),t.invalidateAll&&ee().then(ee).then(()=>{Fe.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Mt(e){if(e.id!==L?.id){we();const t={};se.add(t),L={id:e.id,token:t,promise:ct({...e,preload:t}).then(n=>(se.delete(t),n.type==="loaded"&&n.state.error&&we(),n)),fork:null}}return L.promise}async function ge(e){const t=(await ue(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function it(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),at=new w.root({target:t,props:{...e.props,stores:$,components:ae},hydrate:n,sync:!1}),await Promise.resolve(),st(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:C[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a))}oe=!0}function ie({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=gt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:Ct(n).map(u=>u.node.component),page:Ce(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],v=_.branch[u];h?.data!==v?.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 Pe({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:Ve,current:Ve},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:vt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},w.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:v}=lt(f,u,n);return o&&d(h.href),v},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 lt(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=oe?Et(r,a.href,t):kt(r,t);return{resolved:a,promise:i}}function Ht(e,t,n,r,a,i){if(Te)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(re.some(o=>o(new URL(s))))return!0;return!1}function Ie(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Wt(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 Jt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ce(k),constructors:[]}}}async function ct({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return se.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!==le(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Wt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const E=_.branch[g];return m[1]===E?.loader&&!Ht(u,p,d,f,E.universal?.uses,r)?E:(u=!0,Pe({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:Ie(m[0]?{type:"skip"}:null,m[0]?E?.server:void 0)}))});for(const m of h)m.catch(()=>{});const v=[];for(let m=0;m<c.length;m+=1)if(c[m])try{v.push(await h[m])}catch(g){if(g instanceof Ee)return{type:"redirect",location:g.location};if(se.has(i))return Jt({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Le(g),S;if(g instanceof ke)S=g.body;else{if(await $.updated.check())return await et(),await Y(n);S=await X(g,{params:r,url:n,route:{id:a.id}})}const I=await Yt(m,v,s);return I?ie({url:n,params:r,branch:v.slice(0,I.idx).concat(I.node),status:E,error:S,route:a}):await ft(n,{id:a.id},S,E)}else v.push(void 0);return ie({url:n,params:r,branch:v,status:200,error:null,route:a,form:t?void 0:null})}async function Yt(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 Oe({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await Pe({loader:_e,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ie(i)}),o={node:await ne(),loader:ne,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Ee)return Gt(new URL(s.location,location.href),{},0);throw s}}async function zt(e){const t=e.href;if(Z.has(t))return Z.get(t);let n;try{const r=(async()=>{let a=await w.hooks.reroute({url:new URL(e),fetch:async(i,s)=>lt(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);w.hash?i.hash=a:i.pathname=a,a=i}return a})();Z.set(t,r),n=await r}catch{Z.delete(t);return}return n}async function ue(e,t){if(e&&!ce(e,x,w.hash)){const n=await zt(e);if(!n)return;const r=Xt(n);for(const a of Ue){const i=a.exec(r);if(i)return{id:le(e),invalidating:t,route:a,params:_t(i),url:e}}}}function Xt(e){return mt(w.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function le(e){return(w.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ut({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=$e(_,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 z||tt.forEach(c=>c(l)),s?null:o}async function B({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=Ke,block:d=Ke,event:p}){const f=j;j=l;const u=await ue(t,!1),h=e==="enter"?$e(_,u,t,e):ut({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),j===l&&(j=f);return}const v=y,m=R;c(),z=!0,oe&&h.navigation.type!=="enter"&&$.navigating.set(W.current=h.navigation);let g=u&&await ct(u);if(!g){if(ce(t,x,w.hash))return await Y(t,i);g=await ft(t,{id:null},await X(new Se(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 B({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 Oe({status:500,error:await X(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 et(),await Y(t,i));if(Ft(),Ae(v),ot(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,Q={[K]:y+=b,[H]:R+=b,[Je]:s};(i?history.replaceState:history.pushState).call(history,Q,"",t),i||Kt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let S;if(oe){const b=(await Promise.all(Array.from(Bt,q=>q(h.navigation)))).filter(q=>typeof q=="function");if(b.length>0){let q=function(){b.forEach(fe=>{M.delete(fe)})};b.push(q),b.forEach(fe=>{M.add(fe)})}_=g.state,g.props.page&&(g.props.page.url=t);const Q=E&&await E;Q?S=Q.commit():(at.$set(g.props),Dt(g.props.page),S=pt?.()),rt=!0}else await it(g,ve,!1);const{activeElement:I}=document;await S,await ee(),await ee();let O=null;if(Be){const b=n?n.scroll:a?D():null;b?scrollTo(b.x,b.y):(O=t.hash&&document.getElementById(dt(t)))?O.scrollIntoView():scrollTo(0,0)}const ht=document.activeElement!==I&&document.activeElement!==document.body;!r&&!ht&&rn(t,!O),Be=!0,g.props.page&&Object.assign(k,g.props.page),z=!1,e==="popstate"&&st(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=D()),M.forEach(b=>b(h.navigation)),$.navigating.set(W.current=null)}async function ft(e,t,n,r,a){return e.origin===xe&&e.pathname===location.pathname&&!nt?await Oe({status:r,error:n,url:e,route:t}):await Y(e,a)}function Qt(){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&&(ge(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=Xe(o,P),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=me(c,x,w.hash);if(f||u)return;const h=te(c),v=p&&le(_.url)===le(p);if(!(h.reload||v))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await ue(p,!1);if(!m)return;Mt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,ge(p))}function s(){a.disconnect();for(const o of P.querySelectorAll("a")){const{url:l,external:c,download:d}=me(o,x,w.hash);if(c||d)continue;const p=te(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&ge(l))}}M.add(s),s()}function X(e,t){if(e instanceof ke)return e.body;const n=Le(e),r=Nt(e);return w.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Zt(e){if(typeof e=="function")re.push(e);else{const{href:t}=new URL(e,location.href);re.push(n=>n.href===t)}}function en(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Ge(),!z){const r=$e(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};tt.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ge()}),navigator.connection?.saveData||Qt(),P.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Xe(t.composedPath()[0],P);if(!n)return;const{url:r,external:a,target:i,download:s}=me(n,x,w.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=te(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(w.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===de(location);if(a||o.reload&&(!p||!d)){ut({url:r,type:"link",event:t})?z=!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(F=!0,Ae(y),e(r),!o.replace_state)return;F=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await B({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(ce(s,x,!1))return;const o=t.target,l=te(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),B({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(!ye){if(t.state?.[K]){const n=t.state[K];if(j={},n===y)return;const r=C[n],a=t.state[Je]??{},i=new URL(t.state[It]??location.href),s=t.state[H],o=_.url?de(location)===de(_.url):!1;if(s===R&&(rt||o)){a!==k.state&&(k.state=a),e(i),C[y]=D(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await B({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(!F){const n=new URL(location.href);e(n),w.hash&&location.reload()}}}),addEventListener("hashchange",()=>{F&&(F=!1,history.replaceState({...history.state,[K]:++y,[H]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Vt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(W.current=null)});function e(t){_.url=k.url=t,$.page.set(Ce(k)),$.page.notify()}}async function tn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){nt=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await ue(c,!1)||{}),d=Ue.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(v,m)=>{const g=o[m];return g?.uses&&(g.uses=nn(g.uses)),Pe({loader:w.nodes[v],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<m;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:Ie(g)})}),h=await Promise.all(u);if(d){const v=d.layouts;for(let m=0;m<v.length;m++)v[m]||h.splice(m,0,void 0)}p=ie({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Ee){await Y(new URL(u.location,location.href));return}p=await Oe({status:Le(u),error:await X(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await it(p,e,f)}function nn(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 ye=!1;function rn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=dt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;ye=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),ye=!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 $e(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:D()},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 Ce(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 an(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function dt(e){let t;if(w.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{fn as a,sn as l,k as p,$ as s};
1
+ import{ba as be,o as Ne,s as A,g as U,b as T,$ as ee,bb as pt}from"./il3IN2es.js";class ke{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 Ee{constructor(t,n){this.status=t,this.location=n}}class Se extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function gt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function mt(e){return e.split("%25").map(decodeURI).join("%25")}function _t(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function de({href:e}){return e.split("#")[0]}function vt(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 wt(...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 yt(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 bt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Re(e)),bt(e,t));const G=new Map;function kt(e,t){const n=Re(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&&G.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=yt(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function Et(e,t,n){if(G.size>0){const r=Re(e,n),a=G.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);G.delete(r)}}return window.fetch(t,n)}function Re(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="${wt(...a)}"]`}return r}const St=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Rt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Lt(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 he(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return he(String.fromCharCode(...l.slice(2).split("-").map(v=>parseInt(v,16))));const d=St.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 he(l)}).join("")}).join("")}/?$`),params:t}}function xt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Lt(e){return e.slice(1).split("/").filter(xt)}function At(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 he(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ut({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}=Rt(o),u={id:o,exec:h=>{const v=p.exec(h);if(v)return At(v,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 Me(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function je(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_gku30e?.base??"",Tt=globalThis.__sveltekit_gku30e?.assets??x??"",Pt="1772577392522",He="sveltekit:snapshot",We="sveltekit:scroll",Je="sveltekit:states",It="sveltekit:pageurl",K="sveltekit:history",H="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},xe=location.origin;function Ye(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 D(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const De={...N,"":N.hover};function ze(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Xe(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=ze(e)}}function me(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||ce(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===xe&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function te(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=ze(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:De[r??"off"],preload_data:De[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function qe(e){const t=be(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 Qe={v:()=>{}};function Ot(){const{set:e,subscribe:t}=be(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Tt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==Pt;return s&&(e(!0),Qe.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function ce(e,t,n){return e.origin!==xe||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function sn(e){}const Ze=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Ze];const $t=new Set([...Ze]);[...$t];function Ct(e){return e.filter(t=>t!=null)}function Le(e){return e instanceof ke||e instanceof Se?e.status:500}function Nt(e){return e instanceof Se?e.text:"Internal Error"}let k,W,pe;const jt=Ne.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ne.toString());jt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},pe={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)}},W=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},pe=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},Qe.v=()=>pe.current=!0);function Dt(e){Object.assign(k,e)}const Ve={spanContext(){return qt},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}},qt={traceId:"",spanId:"",traceFlags:0},Vt=new Set(["icon","shortcut icon","apple-touch-icon"]),C=Me(We)??{},J=Me(He)??{},$={url:qe({}),page:qe({}),navigating:be(null),updated:Ot()};function Ae(e){C[e]=D()}function Kt(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 et(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Ke(){}let Ue,_e,ne,P,ve,w;const re=[],ae=[];let L=null;function we(){L?.fork?.then(e=>e?.discard()),L=null}const Z=new Map,tt=new Set,Bt=new Set,M=new Set;let _={branch:[],error:null,url:null},nt=!1,oe=!1,Be=!0,z=!1,F=!1,rt=!1,Te=!1,at,y,R,j;const se=new Set,Fe=new Map;async function fn(e,t,n){globalThis.__sveltekit_gku30e?.data&&globalThis.__sveltekit_gku30e.data,document.URL!==location.href&&(location.href=location.href),w=e,await e.hooks.init?.(),Ue=Ut(e),P=document.documentElement,ve=t,_e=e.nodes[0],ne=e.nodes[1],_e(),ne(),y=history.state?.[K],R=history.state?.[H],y||(y=R=Date.now(),history.replaceState({...history.state,[K]:y,[H]:R},""));const r=C[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await tn(ve,n)):(await B({type:"enter",url:Ye(w.hash?an(new URL(location.href)):location.href),replace_state:!0}),a()),en()}function Ft(){re.length=0,Te=!1}function ot(e){ae.some(t=>t?.snapshot)&&(J[e]=ae.map(t=>t?.snapshot?.capture()))}function st(e){J[e]?.forEach((t,n)=>{ae[n]?.snapshot?.restore(t)})}function Ge(){Ae(y),je(We,C),ot(R),je(He,J)}async function Gt(e,t,n,r){let a;t.invalidateAll&&we(),await B({type:"goto",url:Ye(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Te=!0,a=[...Fe.keys()]),t.invalidate&&t.invalidate.forEach(Zt)}}),t.invalidateAll&&ee().then(ee).then(()=>{Fe.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Mt(e){if(e.id!==L?.id){we();const t={};se.add(t),L={id:e.id,token:t,promise:ct({...e,preload:t}).then(n=>(se.delete(t),n.type==="loaded"&&n.state.error&&we(),n)),fork:null}}return L.promise}async function ge(e){const t=(await ue(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function it(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),at=new w.root({target:t,props:{...e.props,stores:$,components:ae},hydrate:n,sync:!1}),await Promise.resolve(),st(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:C[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a))}oe=!0}function ie({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=gt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:Ct(n).map(u=>u.node.component),page:Ce(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],v=_.branch[u];h?.data!==v?.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 Pe({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:Ve,current:Ve},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:vt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},w.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:v}=lt(f,u,n);return o&&d(h.href),v},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 lt(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=oe?Et(r,a.href,t):kt(r,t);return{resolved:a,promise:i}}function Ht(e,t,n,r,a,i){if(Te)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(re.some(o=>o(new URL(s))))return!0;return!1}function Ie(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Wt(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 Jt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ce(k),constructors:[]}}}async function ct({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return se.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!==le(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Wt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const E=_.branch[g];return m[1]===E?.loader&&!Ht(u,p,d,f,E.universal?.uses,r)?E:(u=!0,Pe({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:Ie(m[0]?{type:"skip"}:null,m[0]?E?.server:void 0)}))});for(const m of h)m.catch(()=>{});const v=[];for(let m=0;m<c.length;m+=1)if(c[m])try{v.push(await h[m])}catch(g){if(g instanceof Ee)return{type:"redirect",location:g.location};if(se.has(i))return Jt({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Le(g),S;if(g instanceof ke)S=g.body;else{if(await $.updated.check())return await et(),await Y(n);S=await X(g,{params:r,url:n,route:{id:a.id}})}const I=await Yt(m,v,s);return I?ie({url:n,params:r,branch:v.slice(0,I.idx).concat(I.node),status:E,error:S,route:a}):await ft(n,{id:a.id},S,E)}else v.push(void 0);return ie({url:n,params:r,branch:v,status:200,error:null,route:a,form:t?void 0:null})}async function Yt(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 Oe({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await Pe({loader:_e,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ie(i)}),o={node:await ne(),loader:ne,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Ee)return Gt(new URL(s.location,location.href),{},0);throw s}}async function zt(e){const t=e.href;if(Z.has(t))return Z.get(t);let n;try{const r=(async()=>{let a=await w.hooks.reroute({url:new URL(e),fetch:async(i,s)=>lt(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);w.hash?i.hash=a:i.pathname=a,a=i}return a})();Z.set(t,r),n=await r}catch{Z.delete(t);return}return n}async function ue(e,t){if(e&&!ce(e,x,w.hash)){const n=await zt(e);if(!n)return;const r=Xt(n);for(const a of Ue){const i=a.exec(r);if(i)return{id:le(e),invalidating:t,route:a,params:_t(i),url:e}}}}function Xt(e){return mt(w.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function le(e){return(w.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ut({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=$e(_,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 z||tt.forEach(c=>c(l)),s?null:o}async function B({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=Ke,block:d=Ke,event:p}){const f=j;j=l;const u=await ue(t,!1),h=e==="enter"?$e(_,u,t,e):ut({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),j===l&&(j=f);return}const v=y,m=R;c(),z=!0,oe&&h.navigation.type!=="enter"&&$.navigating.set(W.current=h.navigation);let g=u&&await ct(u);if(!g){if(ce(t,x,w.hash))return await Y(t,i);g=await ft(t,{id:null},await X(new Se(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 B({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 Oe({status:500,error:await X(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 et(),await Y(t,i));if(Ft(),Ae(v),ot(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,Q={[K]:y+=b,[H]:R+=b,[Je]:s};(i?history.replaceState:history.pushState).call(history,Q,"",t),i||Kt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let S;if(oe){const b=(await Promise.all(Array.from(Bt,q=>q(h.navigation)))).filter(q=>typeof q=="function");if(b.length>0){let q=function(){b.forEach(fe=>{M.delete(fe)})};b.push(q),b.forEach(fe=>{M.add(fe)})}_=g.state,g.props.page&&(g.props.page.url=t);const Q=E&&await E;Q?S=Q.commit():(at.$set(g.props),Dt(g.props.page),S=pt?.()),rt=!0}else await it(g,ve,!1);const{activeElement:I}=document;await S,await ee(),await ee();let O=null;if(Be){const b=n?n.scroll:a?D():null;b?scrollTo(b.x,b.y):(O=t.hash&&document.getElementById(dt(t)))?O.scrollIntoView():scrollTo(0,0)}const ht=document.activeElement!==I&&document.activeElement!==document.body;!r&&!ht&&rn(t,!O),Be=!0,g.props.page&&Object.assign(k,g.props.page),z=!1,e==="popstate"&&st(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=D()),M.forEach(b=>b(h.navigation)),$.navigating.set(W.current=null)}async function ft(e,t,n,r,a){return e.origin===xe&&e.pathname===location.pathname&&!nt?await Oe({status:r,error:n,url:e,route:t}):await Y(e,a)}function Qt(){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&&(ge(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=Xe(o,P),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=me(c,x,w.hash);if(f||u)return;const h=te(c),v=p&&le(_.url)===le(p);if(!(h.reload||v))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await ue(p,!1);if(!m)return;Mt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,ge(p))}function s(){a.disconnect();for(const o of P.querySelectorAll("a")){const{url:l,external:c,download:d}=me(o,x,w.hash);if(c||d)continue;const p=te(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&ge(l))}}M.add(s),s()}function X(e,t){if(e instanceof ke)return e.body;const n=Le(e),r=Nt(e);return w.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Zt(e){if(typeof e=="function")re.push(e);else{const{href:t}=new URL(e,location.href);re.push(n=>n.href===t)}}function en(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Ge(),!z){const r=$e(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};tt.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ge()}),navigator.connection?.saveData||Qt(),P.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Xe(t.composedPath()[0],P);if(!n)return;const{url:r,external:a,target:i,download:s}=me(n,x,w.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=te(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(w.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===de(location);if(a||o.reload&&(!p||!d)){ut({url:r,type:"link",event:t})?z=!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(F=!0,Ae(y),e(r),!o.replace_state)return;F=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await B({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(ce(s,x,!1))return;const o=t.target,l=te(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),B({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(!ye){if(t.state?.[K]){const n=t.state[K];if(j={},n===y)return;const r=C[n],a=t.state[Je]??{},i=new URL(t.state[It]??location.href),s=t.state[H],o=_.url?de(location)===de(_.url):!1;if(s===R&&(rt||o)){a!==k.state&&(k.state=a),e(i),C[y]=D(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await B({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(!F){const n=new URL(location.href);e(n),w.hash&&location.reload()}}}),addEventListener("hashchange",()=>{F&&(F=!1,history.replaceState({...history.state,[K]:++y,[H]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Vt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(W.current=null)});function e(t){_.url=k.url=t,$.page.set(Ce(k)),$.page.notify()}}async function tn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){nt=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await ue(c,!1)||{}),d=Ue.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(v,m)=>{const g=o[m];return g?.uses&&(g.uses=nn(g.uses)),Pe({loader:w.nodes[v],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<m;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:Ie(g)})}),h=await Promise.all(u);if(d){const v=d.layouts;for(let m=0;m<v.length;m++)v[m]||h.splice(m,0,void 0)}p=ie({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Ee){await Y(new URL(u.location,location.href));return}p=await Oe({status:Le(u),error:await X(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await it(p,e,f)}function nn(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 ye=!1;function rn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=dt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;ye=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),ye=!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 $e(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:D()},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 Ce(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 an(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function dt(e){let t;if(w.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{fn as a,sn 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.B-qdmHEt.js","../chunks/il3IN2es.js","../assets/vendor-ui.BHIBfuhK.css","../assets/0.CZXVdVdl.css","../nodes/1.BekQuE06.js","../chunks/CSx3YifJ.js","../nodes/2.C5clk0G6.js","../chunks/CU0Jgv40.js","../chunks/PPVm8Dsz.js"])))=>i.map(i=>d[i]);
2
- import{_ as v}from"../chunks/PPVm8Dsz.js";import{a as F,B as g,_ as G,P as H,o as K,g as i,b as h,$ as N,q as _,i as b,d as Q,h as d,l as S,s as p,m as E,C as P,J as O,c as U,r as W,z as C,u as x,t as X,e as Y,f as Z,a0 as $}from"../chunks/il3IN2es.js";const it={};var tt=C('<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>'),et=C("<!> <!>",1);function at(a,t){F(t,!0);let r=g(t,"components",23,()=>[]),l=g(t,"data_0",3,null),y=g(t,"data_1",3,null);G(()=>t.stores.page.set(t.page)),H(()=>{t.stores,t.page,t.constructors,r(),t.form,l(),y(),t.stores.page.notify()});let f=p(!1),j=p(!1),w=p(null);K(()=>{const e=t.stores.page.subscribe(()=>{i(f)&&(h(j,!0),N().then(()=>{h(w,document.title||"untitled page",!0)}))});return h(f,!0),e});const I=x(()=>t.constructors[1]);var R=et(),k=_(R);{var L=e=>{const s=x(()=>t.constructors[0]);var o=E(),m=_(o);P(m,()=>i(s),(n,c)=>{O(c(n,{get data(){return l()},get form(){return t.form},get params(){return t.page.params},children:(u,st)=>{var A=E(),z=_(A);P(z,()=>i(I),(B,J)=>{O(J(B,{get data(){return y()},get form(){return t.form},get params(){return t.page.params}}),M=>r()[1]=M,()=>r()?.[1])}),d(u,A)},$$slots:{default:!0}}),u=>r()[0]=u,()=>r()?.[0])}),d(e,o)},T=e=>{const s=x(()=>t.constructors[0]);var o=E(),m=_(o);P(m,()=>i(s),(n,c)=>{O(c(n,{get data(){return l()},get form(){return t.form},get params(){return t.page.params}}),u=>r()[0]=u,()=>r()?.[0])}),d(e,o)};b(k,e=>{t.constructors[1]?e(L):e(T,!1)})}var V=Q(k,2);{var q=e=>{var s=tt(),o=U(s);{var m=n=>{var c=X();Y(()=>Z(c,i(w))),d(n,c)};b(o,n=>{i(j)&&n(m)})}W(s),d(e,s)};b(V,e=>{i(f)&&e(q)})}d(a,R),S()}const ct=$(at),dt=[()=>v(()=>import("../nodes/0.B-qdmHEt.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>v(()=>import("../nodes/1.BekQuE06.js"),__vite__mapDeps([4,1,2,5]),import.meta.url),()=>v(()=>import("../nodes/2.C5clk0G6.js"),__vite__mapDeps([6,7,8,1,2]),import.meta.url)],mt=[],ut={"/":[2]},D={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},rt=Object.fromEntries(Object.entries(D.transport).map(([a,t])=>[a,t.decode])),_t=Object.fromEntries(Object.entries(D.transport).map(([a,t])=>[a,t.encode])),lt=!1,ft=(a,t)=>rt[a](t);export{ft as decode,rt as decoders,ut as dictionary,_t as encoders,lt as hash,D as hooks,it as matchers,dt as nodes,ct as root,mt as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.B-qdmHEt.js","../chunks/il3IN2es.js","../assets/vendor-ui.BHIBfuhK.css","../assets/0.CZXVdVdl.css","../nodes/1.AKbE62bH.js","../chunks/CnkUlV5I.js","../nodes/2.C5clk0G6.js","../chunks/CU0Jgv40.js","../chunks/PPVm8Dsz.js"])))=>i.map(i=>d[i]);
2
+ import{_ as v}from"../chunks/PPVm8Dsz.js";import{a as F,B as g,_ as G,P as H,o as K,g as i,b as h,$ as N,q as _,i as b,d as Q,h as d,l as S,s as p,m as E,C as P,J as O,c as U,r as W,z as C,u as x,t as X,e as Y,f as Z,a0 as $}from"../chunks/il3IN2es.js";const it={};var tt=C('<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>'),et=C("<!> <!>",1);function at(a,t){F(t,!0);let r=g(t,"components",23,()=>[]),l=g(t,"data_0",3,null),y=g(t,"data_1",3,null);G(()=>t.stores.page.set(t.page)),H(()=>{t.stores,t.page,t.constructors,r(),t.form,l(),y(),t.stores.page.notify()});let f=p(!1),j=p(!1),w=p(null);K(()=>{const e=t.stores.page.subscribe(()=>{i(f)&&(h(j,!0),N().then(()=>{h(w,document.title||"untitled page",!0)}))});return h(f,!0),e});const I=x(()=>t.constructors[1]);var R=et(),k=_(R);{var L=e=>{const s=x(()=>t.constructors[0]);var o=E(),m=_(o);P(m,()=>i(s),(n,c)=>{O(c(n,{get data(){return l()},get form(){return t.form},get params(){return t.page.params},children:(u,st)=>{var A=E(),z=_(A);P(z,()=>i(I),(B,J)=>{O(J(B,{get data(){return y()},get form(){return t.form},get params(){return t.page.params}}),M=>r()[1]=M,()=>r()?.[1])}),d(u,A)},$$slots:{default:!0}}),u=>r()[0]=u,()=>r()?.[0])}),d(e,o)},T=e=>{const s=x(()=>t.constructors[0]);var o=E(),m=_(o);P(m,()=>i(s),(n,c)=>{O(c(n,{get data(){return l()},get form(){return t.form},get params(){return t.page.params}}),u=>r()[0]=u,()=>r()?.[0])}),d(e,o)};b(k,e=>{t.constructors[1]?e(L):e(T,!1)})}var V=Q(k,2);{var q=e=>{var s=tt(),o=U(s);{var m=n=>{var c=X();Y(()=>Z(c,i(w))),d(n,c)};b(o,n=>{i(j)&&n(m)})}W(s),d(e,s)};b(V,e=>{i(f)&&e(q)})}d(a,R),S()}const ct=$(at),dt=[()=>v(()=>import("../nodes/0.B-qdmHEt.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>v(()=>import("../nodes/1.AKbE62bH.js"),__vite__mapDeps([4,1,2,5]),import.meta.url),()=>v(()=>import("../nodes/2.C5clk0G6.js"),__vite__mapDeps([6,7,8,1,2]),import.meta.url)],mt=[],ut={"/":[2]},D={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},rt=Object.fromEntries(Object.entries(D.transport).map(([a,t])=>[a,t.decode])),_t=Object.fromEntries(Object.entries(D.transport).map(([a,t])=>[a,t.encode])),lt=!1,ft=(a,t)=>rt[a](t);export{ft as decode,rt as decoders,ut as dictionary,_t as encoders,lt as hash,D as hooks,it as matchers,dt as nodes,ct as root,mt as server_loads};
@@ -0,0 +1 @@
1
+ import{l as o,a as r}from"../chunks/CnkUlV5I.js";export{o as load_css,r as start};
@@ -1 +1 @@
1
- import{a as m,Z as u,q as g,e as l,h as d,l as v,z as _,c as a,r as s,d as x,f as o}from"../chunks/il3IN2es.js";import{s as $,p}from"../chunks/CSx3YifJ.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const c=k;var b=_("<h1> </h1> <p> </p>",1);function E(n,f){m(f,!1),u();var r=b(),t=g(r),h=a(t,!0);s(t);var e=x(t,2),i=a(e,!0);s(e),l(()=>{o(h,c.status),o(i,c.error?.message)}),d(n,r),v()}export{E as component};
1
+ import{a as m,Z as u,q as g,e as l,h as d,l as v,z as _,c as a,r as s,d as x,f as o}from"../chunks/il3IN2es.js";import{s as $,p}from"../chunks/CnkUlV5I.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const c=k;var b=_("<h1> </h1> <p> </p>",1);function E(n,f){m(f,!1),u();var r=b(),t=g(r),h=a(t,!0);s(t);var e=x(t,2),i=a(e,!0);s(e),l(()=>{o(h,c.status),o(i,c.error?.message)}),d(n,r),v()}export{E as component};
@@ -1 +1 @@
1
- {"version":"1772577254413"}
1
+ {"version":"1772577392522"}
@@ -17,10 +17,10 @@
17
17
  document.documentElement.dataset.theme = t;
18
18
  })();
19
19
  </script>
20
- <link href="/_app/immutable/entry/start.BNFrtR48.js" rel="modulepreload">
21
- <link href="/_app/immutable/chunks/CSx3YifJ.js" rel="modulepreload">
20
+ <link href="/_app/immutable/entry/start.Ax7qKXI6.js" rel="modulepreload">
21
+ <link href="/_app/immutable/chunks/CnkUlV5I.js" rel="modulepreload">
22
22
  <link href="/_app/immutable/chunks/il3IN2es.js" rel="modulepreload">
23
- <link href="/_app/immutable/entry/app.CJBBc1cd.js" rel="modulepreload">
23
+ <link href="/_app/immutable/entry/app.Bwhg6qwg.js" rel="modulepreload">
24
24
  <link href="/_app/immutable/chunks/PPVm8Dsz.js" rel="modulepreload">
25
25
 
26
26
  <link href="/_app/immutable/assets/vendor-ui.BHIBfuhK.css" rel="stylesheet">
@@ -29,15 +29,15 @@
29
29
  <div style="display: contents">
30
30
  <script>
31
31
  {
32
- __sveltekit_lfp112 = {
32
+ __sveltekit_gku30e = {
33
33
  base: ""
34
34
  };
35
35
 
36
36
  const element = document.currentScript.parentElement;
37
37
 
38
38
  Promise.all([
39
- import("/_app/immutable/entry/start.BNFrtR48.js"),
40
- import("/_app/immutable/entry/app.CJBBc1cd.js")
39
+ import("/_app/immutable/entry/start.Ax7qKXI6.js"),
40
+ import("/_app/immutable/entry/app.Bwhg6qwg.js")
41
41
  ]).then(([kit, app]) => {
42
42
  kit.start(app, element);
43
43
  });
package/dist/daemon.js CHANGED
@@ -36861,12 +36861,6 @@ function loadMemoryConfig(agentsDir) {
36861
36861
  if (typeof srch.rehearsal_half_life_days === "number") {
36862
36862
  defaults.search.rehearsal_half_life_days = Math.max(1, srch.rehearsal_half_life_days);
36863
36863
  }
36864
- if (defaults.embedding.provider === "ollama" && (defaults.embedding.model === "nomic-embed-text" || defaults.embedding.model === "nomic-embed-text-v1.5" || defaults.embedding.model.startsWith("nomic-embed-text:"))) {
36865
- defaults.embedding.provider = "native";
36866
- defaults.embedding.model = "nomic-embed-text-v1.5";
36867
- defaults.embedding.base_url = "";
36868
- console.info("[signet] Using native embedding provider (runtime override for ollama+nomic config)");
36869
- }
36870
36864
  defaults.pipelineV2 = loadPipelineConfig(yaml);
36871
36865
  defaults.auth = parseAuthConfig(yaml.auth, agentsDir);
36872
36866
  break;
@@ -77683,28 +77677,51 @@ function getDaemonVersion() {
77683
77677
  }
77684
77678
  var CURRENT_VERSION = getDaemonVersion();
77685
77679
  var cachedNativeEmbed = null;
77680
+ async function fetchOllamaEmbedding(text, baseUrl, model) {
77681
+ const res = await fetch(`${baseUrl.replace(/\/$/, "")}/api/embeddings`, {
77682
+ method: "POST",
77683
+ headers: { "Content-Type": "application/json" },
77684
+ body: JSON.stringify({ model, prompt: text }),
77685
+ signal: AbortSignal.timeout(30000)
77686
+ });
77687
+ if (!res.ok)
77688
+ return null;
77689
+ const data = await res.json();
77690
+ return data.embedding ?? null;
77691
+ }
77692
+ var nativeFallbackToOllama = false;
77686
77693
  async function fetchEmbedding(text, cfg) {
77687
77694
  if (cfg.provider === "none")
77688
77695
  return null;
77689
77696
  try {
77690
77697
  if (cfg.provider === "native") {
77691
- if (!cachedNativeEmbed) {
77692
- const mod = await Promise.resolve().then(() => (init_native_embedding(), exports_native_embedding));
77693
- cachedNativeEmbed = mod.nativeEmbed;
77698
+ if (nativeFallbackToOllama) {
77699
+ return await fetchOllamaEmbedding(text, "http://localhost:11434", "nomic-embed-text");
77700
+ }
77701
+ try {
77702
+ if (!cachedNativeEmbed) {
77703
+ const mod = await Promise.resolve().then(() => (init_native_embedding(), exports_native_embedding));
77704
+ cachedNativeEmbed = mod.nativeEmbed;
77705
+ }
77706
+ return await cachedNativeEmbed(text);
77707
+ } catch (nativeErr) {
77708
+ logger.warn("embedding", `Native embedding failed, attempting ollama fallback: ${nativeErr instanceof Error ? nativeErr.message : String(nativeErr)}`);
77709
+ try {
77710
+ const result = await fetchOllamaEmbedding(text, "http://localhost:11434", "nomic-embed-text");
77711
+ if (result !== null) {
77712
+ nativeFallbackToOllama = true;
77713
+ logger.info("embedding", "Ollama fallback succeeded \u2014 will use ollama for remaining embeddings this session");
77714
+ return result;
77715
+ }
77716
+ logger.warn("embedding", "Ollama fallback also failed");
77717
+ } catch {
77718
+ logger.warn("embedding", "Ollama fallback not reachable");
77719
+ }
77720
+ return null;
77694
77721
  }
77695
- return await cachedNativeEmbed(text);
77696
77722
  }
77697
77723
  if (cfg.provider === "ollama") {
77698
- const res = await fetch(`${cfg.base_url.replace(/\/$/, "")}/api/embeddings`, {
77699
- method: "POST",
77700
- headers: { "Content-Type": "application/json" },
77701
- body: JSON.stringify({ model: cfg.model, prompt: text }),
77702
- signal: AbortSignal.timeout(30000)
77703
- });
77704
- if (!res.ok)
77705
- return null;
77706
- const data = await res.json();
77707
- return data.embedding ?? null;
77724
+ return await fetchOllamaEmbedding(text, cfg.base_url, cfg.model);
77708
77725
  } else {
77709
77726
  const apiKey = cfg.api_key ?? process.env.OPENAI_API_KEY ?? "";
77710
77727
  const res = await fetch(`${cfg.base_url.replace(/\/$/, "")}/embeddings`, {
@@ -77984,10 +78001,35 @@ async function checkEmbeddingProvider(cfg) {
77984
78001
  if (cfg.provider === "native") {
77985
78002
  const mod = await Promise.resolve().then(() => (init_native_embedding(), exports_native_embedding));
77986
78003
  const nativeStatus = await mod.checkNativeProvider();
77987
- status.available = nativeStatus.available;
77988
- status.dimensions = nativeStatus.dimensions;
77989
- if (!nativeStatus.available) {
77990
- status.error = nativeStatus.error ?? "Native embedding provider not ready";
78004
+ if (nativeStatus.available) {
78005
+ status.available = true;
78006
+ status.dimensions = nativeStatus.dimensions;
78007
+ } else {
78008
+ logger.warn("embedding", `Native provider unavailable: ${nativeStatus.error ?? "unknown"}`);
78009
+ try {
78010
+ const ollamaRes = await fetch("http://localhost:11434/api/tags", {
78011
+ method: "GET",
78012
+ signal: AbortSignal.timeout(3000)
78013
+ });
78014
+ if (ollamaRes.ok) {
78015
+ const ollamaData = await ollamaRes.json();
78016
+ const models = ollamaData.models ?? [];
78017
+ const hasNomic = models.some((m2) => m2.name.startsWith("nomic-embed-text"));
78018
+ if (hasNomic) {
78019
+ status.available = true;
78020
+ status.dimensions = 768;
78021
+ status.error = "Native unavailable \u2014 using ollama fallback";
78022
+ nativeFallbackToOllama = true;
78023
+ logger.info("embedding", "Ollama fallback available \u2014 will use ollama for embeddings");
78024
+ } else {
78025
+ status.error = `Native: ${nativeStatus.error ?? "not ready"}. Ollama available but nomic-embed-text not found.`;
78026
+ }
78027
+ } else {
78028
+ status.error = `Native: ${nativeStatus.error ?? "not ready"}. Ollama not available.`;
78029
+ }
78030
+ } catch {
78031
+ status.error = `Native: ${nativeStatus.error ?? "not ready"}. Ollama not reachable.`;
78032
+ }
77991
78033
  }
77992
78034
  } else if (cfg.provider === "ollama") {
77993
78035
  const res = await fetch(`${cfg.base_url.replace(/\/$/, "")}/api/tags`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signetai",
3
- "version": "0.35.3",
3
+ "version": "0.35.4",
4
4
  "description": "Portable AI agent identity - own your agent, bring it anywhere",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1 +0,0 @@
1
- import{l as o,a as r}from"../chunks/CSx3YifJ.js";export{o as load_css,r as start};