wherever-dev 0.24.0 → 0.25.0
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/CHANGELOG.md +17 -0
- package/dist/assistant-channels.d.ts +32 -1
- package/dist/assistant-channels.d.ts.map +1 -1
- package/dist/assistant-channels.js +57 -1
- package/dist/assistant-channels.js.map +1 -1
- package/dist/assistant-controller.d.ts +14 -0
- package/dist/assistant-controller.d.ts.map +1 -1
- package/dist/assistant-controller.js +21 -0
- package/dist/assistant-controller.js.map +1 -1
- package/dist/assistant-schedule.d.ts +42 -3
- package/dist/assistant-schedule.d.ts.map +1 -1
- package/dist/assistant-schedule.js +113 -2
- package/dist/assistant-schedule.js.map +1 -1
- package/dist/assistant-scheduler.d.ts +28 -6
- package/dist/assistant-scheduler.d.ts.map +1 -1
- package/dist/assistant-scheduler.js +59 -12
- package/dist/assistant-scheduler.js.map +1 -1
- package/dist/assistant-tools.d.ts +47 -13
- package/dist/assistant-tools.d.ts.map +1 -1
- package/dist/assistant-tools.js +37 -5
- package/dist/assistant-tools.js.map +1 -1
- package/dist/commands/config.d.ts +28 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +128 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +2 -0
- package/dist/commands/install.js.map +1 -1
- package/dist/config-dir.d.ts +13 -0
- package/dist/config-dir.d.ts.map +1 -1
- package/dist/config-dir.js +13 -0
- package/dist/config-dir.js.map +1 -1
- package/dist/index.js +167 -37
- package/dist/index.js.map +1 -1
- package/dist/protocol.d.ts +7 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/session-pool.d.ts +23 -5
- package/dist/session-pool.d.ts.map +1 -1
- package/dist/session-pool.js +36 -35
- package/dist/session-pool.js.map +1 -1
- package/package.json +1 -1
- package/public/_app/immutable/chunks/{jBzVXpuo.js → CRvF0-wF.js} +2 -2
- package/public/_app/immutable/chunks/{jBzVXpuo.js.map → CRvF0-wF.js.map} +1 -1
- package/public/_app/immutable/chunks/{Ba0iJyN2.js → ClUQt0nO.js} +2 -2
- package/public/_app/immutable/chunks/{Ba0iJyN2.js.map → ClUQt0nO.js.map} +1 -1
- package/public/_app/immutable/chunks/XW0SPyOK.js +2 -0
- package/public/_app/immutable/chunks/{BfCwf84t.js.map → XW0SPyOK.js.map} +1 -1
- package/public/_app/immutable/entry/{app.CePvTLA2.js → app.D1EX_9pb.js} +3 -3
- package/public/_app/immutable/entry/{app.CePvTLA2.js.map → app.D1EX_9pb.js.map} +1 -1
- package/public/_app/immutable/entry/start.ga0QZFSJ.js +2 -0
- package/public/_app/immutable/entry/start.ga0QZFSJ.js.map +1 -0
- package/public/_app/immutable/nodes/{0.ydSaxbgZ.js → 0.DsJW22vw.js} +2 -2
- package/public/_app/immutable/nodes/{0.ydSaxbgZ.js.map → 0.DsJW22vw.js.map} +1 -1
- package/public/_app/immutable/nodes/{1.T9BouUHS.js → 1.BsL25UTD.js} +2 -2
- package/public/_app/immutable/nodes/{1.T9BouUHS.js.map → 1.BsL25UTD.js.map} +1 -1
- package/public/_app/immutable/nodes/2.DO5lRCyx.js +124 -0
- package/public/_app/immutable/nodes/2.DO5lRCyx.js.map +1 -0
- package/public/_app/version.json +1 -1
- package/public/index.html +10 -10
- package/public/service-worker.js +1 -1
- package/public/_app/immutable/chunks/BfCwf84t.js +0 -2
- package/public/_app/immutable/entry/start.MB6ZjVGe.js +0 -2
- package/public/_app/immutable/entry/start.MB6ZjVGe.js.map +0 -1
- package/public/_app/immutable/nodes/2.D_6BVhWL.js +0 -123
- package/public/_app/immutable/nodes/2.D_6BVhWL.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as e,p as r}from"./
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{c as e,p as r}from"./XW0SPyOK.js";const t={get error(){return r.error},get status(){return r.status},get url(){return r.url}};e.updated.check;const a=t;export{a as p};
|
|
2
|
+
//# sourceMappingURL=ClUQt0nO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"ClUQt0nO.js","sources":["../../../../../../../node_modules/.pnpm/@sveltejs+kit@2.60.1_@opentelemetry+api@1.9.0_@sveltejs+vite-plugin-svelte@6.2.4_svelte_92561c5307f67095f16bb8153283369b/node_modules/@sveltejs/kit/src/runtime/app/state/client.js","../../../../../../../node_modules/.pnpm/@sveltejs+kit@2.60.1_@opentelemetry+api@1.9.0_@sveltejs+vite-plugin-svelte@6.2.4_svelte_92561c5307f67095f16bb8153283369b/node_modules/@sveltejs/kit/src/runtime/app/state/index.js"],"sourcesContent":["import {\n\tpage as _page,\n\tnavigating as _navigating,\n\tupdated as _updated\n} from '../../client/state.svelte.js';\nimport { stores } from '../../client/client.js';\n\nexport const page = {\n\tget data() {\n\t\treturn _page.data;\n\t},\n\tget error() {\n\t\treturn _page.error;\n\t},\n\tget form() {\n\t\treturn _page.form;\n\t},\n\tget params() {\n\t\treturn _page.params;\n\t},\n\tget route() {\n\t\treturn _page.route;\n\t},\n\tget state() {\n\t\treturn _page.state;\n\t},\n\tget status() {\n\t\treturn _page.status;\n\t},\n\tget url() {\n\t\treturn _page.url;\n\t}\n};\n\nexport const navigating = {\n\tget from() {\n\t\treturn _navigating.current ? _navigating.current.from : null;\n\t},\n\tget to() {\n\t\treturn _navigating.current ? _navigating.current.to : null;\n\t},\n\tget type() {\n\t\treturn _navigating.current ? _navigating.current.type : null;\n\t},\n\tget willUnload() {\n\t\treturn _navigating.current ? _navigating.current.willUnload : null;\n\t},\n\tget delta() {\n\t\treturn _navigating.current ? _navigating.current.delta : null;\n\t},\n\tget complete() {\n\t\treturn _navigating.current ? _navigating.current.complete : null;\n\t}\n};\n\nObject.defineProperty(navigating, 'current', {\n\tget() {\n\t\t// between 2.12.0 and 2.12.1 `navigating.current` existed\n\t\tthrow new Error('Replace navigating.current.<prop> with navigating.<prop>');\n\t}\n});\n\nexport const updated = {\n\tget current() {\n\t\treturn _updated.current;\n\t},\n\tcheck: stores.updated.check\n};\n","import {\n\tpage as client_page,\n\tnavigating as client_navigating,\n\tupdated as client_updated\n} from './client.js';\nimport {\n\tpage as server_page,\n\tnavigating as server_navigating,\n\tupdated as server_updated\n} from './server.js';\nimport { BROWSER } from 'esm-env';\n\n/**\n * A read-only reactive object with information about the current page, serving several use cases:\n * - retrieving the combined `data` of all pages/layouts anywhere in your component tree (also see [loading data](https://svelte.dev/docs/kit/load))\n * - retrieving the current value of the `form` prop anywhere in your component tree (also see [form actions](https://svelte.dev/docs/kit/form-actions))\n * - retrieving the page state that was set through `goto`, `pushState` or `replaceState` (also see [goto](https://svelte.dev/docs/kit/$app-navigation#goto) and [shallow routing](https://svelte.dev/docs/kit/shallow-routing))\n * - retrieving metadata such as the URL you're on, the current route and its parameters, and whether or not there was an error\n *\n * ```svelte\n * <!--- file: +layout.svelte --->\n * <script>\n * \timport { page } from '$app/state';\n * </script>\n *\n * <p>Currently at {page.url.pathname}</p>\n *\n * {#if page.error}\n * \t<span class=\"red\">Problem detected</span>\n * {:else}\n * \t<span class=\"small\">All systems operational</span>\n * {/if}\n * ```\n *\n * Changes to `page` are available exclusively with runes. (The legacy reactivity syntax will not reflect any changes)\n *\n * ```svelte\n * <!--- file: +page.svelte --->\n * <script>\n * \timport { page } from '$app/state';\n * \tconst id = $derived(page.params.id); // This will correctly update id for usage on this page\n * \t$: badId = page.params.id; // Do not use; will never update after initial load\n * </script>\n * ```\n *\n * On the server, values can only be read during rendering (in other words _not_ in e.g. `load` functions). In the browser, the values can be read at any time.\n *\n * @type {import('@sveltejs/kit').Page}\n */\nexport const page = BROWSER ? client_page : server_page;\n\n/**\n * A read-only object representing an in-progress navigation, with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties.\n * Values are `null` when no navigation is occurring, or during server rendering.\n * @type {import('@sveltejs/kit').Navigation | { from: null, to: null, type: null, willUnload: null, delta: null, complete: null }}\n */\n// @ts-expect-error\nexport const navigating = BROWSER ? client_navigating : server_navigating;\n\n/**\n * A read-only reactive value that's initially `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update `current` to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling.\n * @type {{ get current(): boolean; check(): Promise<boolean>; }}\n */\nexport const updated = BROWSER ? client_updated : server_updated;\n"],"names":["page","_page","stores","client_page"],"mappings":"yCAOO,MAAMA,EAAO,CAInB,IAAI,OAAQ,CACX,OAAOC,EAAM,KACd,EAaA,IAAI,QAAS,CACZ,OAAOA,EAAM,MACd,EACA,IAAI,KAAM,CACT,OAAOA,EAAM,GACd,CACD,EAkCQC,EAAO,QAAQ,MCjBX,MAACF,EAAiBG","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{be as Re,aD as Ve,b1 as A,af as U,aT as T,b7 as re,b3 as wt,aX as yt}from"./CAL8yDNt.js";class xe{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 Le{constructor(t,n){try{new Headers({location:n})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(n)}: this string contains characters that cannot be used in HTTP headers`)}this.status=t,this.location=n}}class Ae extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function bt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function kt(e){return e.split("%25").map(decodeURI).join("%25")}function Et(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function O(){}function St(...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;function Rt(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 xt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&H.delete(Ue(e)),xt(e,t));const H=new Map;function Lt(e,t){const n=Ue(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&H.set(n,{body:a,init:i,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=Rt(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function At(e,t,n){if(H.size>0){const r=Ue(e,n),a=H.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);H.delete(r)}}return window.fetch(t,n)}function Ue(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="${St(...a)}"]`}return r}const Ut=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Tt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Je(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 o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return ve(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return ve(String.fromCharCode(...l.slice(2).split("-").map(g=>parseInt(g,16))));const f=Ut.exec(l),[,p,v,d,u]=f;return t.push({name:d,matcher:u,optional:!!p,rest:!!v,chained:v?c===1&&o[0]==="":!1}),v?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return ve(l)}).join("")}).join("")}/?$`),params:t}}function $t(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Je(e){return e.slice(1).split("/").filter($t)}function It(e,t,n){const r={},a=e.slice(1),i=a.filter(s=>s!==void 0);let o=0;for(let s=0;s<t.length;s+=1){const l=t[s];let c=a[s-o];if(l.chained&&l.rest&&o&&(c=a.slice(s-o,s+1).filter(f=>f).join("/"),o=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const f=t[s+1],p=a[s+1];f&&!f.rest&&f.optional&&p&&l.chained&&(o=0),!f&&!p&&Object.keys(r).length===i.length&&(o=0);continue}if(l.optional&&l.chained){o++;continue}return}if(!o)return r}function ve(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}const Pt=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function hn(e,t){const n=Je(e),r=e!="/"&&e.endsWith("/");return"/"+n.map(a=>a.replace(Pt,(i,o,s,l)=>{const c=t[l];if(!c){if(o||s&&c!==void 0)return"";throw new Error(`Missing parameter '${l}' in route ${e}`)}if(c.startsWith("/")||c.endsWith("/"))throw new Error(`Parameter '${l}' in route ${e} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return c})).filter(Boolean).join("/")+(r?"/":"")}function jt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([s,[l,c,f]])=>{const{pattern:p,params:v}=Tt(s),d={id:s,exec:u=>{const g=p.exec(u);if(g)return It(g,v,r)},errors:[1,...f||[]].map(u=>e[u]),layouts:[0,...c||[]].map(o),leaf:i(l)};return d.errors.length=d.layouts.length=Math.max(d.errors.length,d.layouts.length),d});function i(s){const l=s<0;return l&&(s=~s),[l,e[s]]}function o(s){return s===void 0?s:[a.has(s),e[s]]}}function Ye(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Me(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const L=globalThis.__sveltekit_1ji2zod?.base??"",Ot=globalThis.__sveltekit_1ji2zod?.assets??L??"",Ct="25c96b1",Xe="sveltekit:snapshot",Qe="sveltekit:scroll",Ze="sveltekit:states",Nt="sveltekit:pageurl",M="sveltekit:history",J="sveltekit:navigation",q={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Te=location.origin;function et(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 ze={...q,"":q.hover};function tt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function nt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=tt(e)}}function be(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 s=location.hash.split("#")[1]||"/";r.hash=`#${s}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||he(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=r?.origin===Te&&e.hasAttribute("download");return{url:r,external:i,target:a,download:o}}function ae(e){let t=null,n=null,r=null,a=null,i=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=V(s,"preload-code")),a===null&&(a=V(s,"preload-data")),t===null&&(t=V(s,"keepfocus")),n===null&&(n=V(s,"noscroll")),i===null&&(i=V(s,"reload")),o===null&&(o=V(s,"replacestate")),s=tt(s);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:ze[r??"off"],preload_data:ze[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(o)}}function Be(e){const t=Re(e);let n=!0;function r(){n=!0,t.update(o=>o)}function a(o){n=!1,t.set(o)}function i(o){let s;return t.subscribe(l=>{(s===void 0||n&&l!==s)&&o(s=l)})}return{notify:r,set:a,subscribe:i}}const rt={v:O};function qt(){const{set:e,subscribe:t}=Re(!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 o=(await a.json()).version!==Ct;return o&&(e(!0),rt.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:r}}function he(e,t,n){return e.origin!==Te||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function pn(e){}const at=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...at];const Dt=new Set([...at]);[...Dt];function Vt(e){return e.filter(t=>t!=null)}function te(e,t){return e+"/"+t}function $e(e){return e instanceof xe||e instanceof Ae?e.status:500}function Mt(e){return e instanceof Ae?e.text:"Internal Error"}let S,Y,we;const zt=Ve.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ve.toString()),We="a:";zt?(S={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(We)},Y={current:null},we={current:!1}):(S=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(We));get url(){return U(this.#i)}set url(t){T(this.#i,t)}},Y=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},we=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},rt.v=()=>we.current=!0);function ot(e){Object.assign(S,e)}const{onMount:Bt}=wt,Wt=new Set(["icon","shortcut icon","apple-touch-icon"]);let F=null;const N=Ye(Qe)??{},X=Ye(Xe)??{},C={url:Be({}),page:Be({}),navigating:Re(null),updated:qt()};function Ie(e){N[e]=D()}function Kt(e,t){let n=e+1;for(;N[n];)delete N[n],n+=1;for(n=t+1;X[n];)delete X[n],n+=1}function Q(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(O)}async function st(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}let Pe,ke,oe,$,Ee,y;const se=[],ie=[];let R=null;function le(){R?.fork?.then(e=>e?.discard()),R=null}const ne=new Map,it=new Set,Ft=new Set,z=new Set;let m={branch:[],error:null,url:null},lt=!1,ce=!1,Ke=!0,Z=!1,G=!1,ct=!1,je=!1,ut,w,x,j;const ue=new Set,Fe=new Map,Ge=new Map;async function vn(e,t,n){globalThis.__sveltekit_1ji2zod&&(globalThis.__sveltekit_1ji2zod.query,globalThis.__sveltekit_1ji2zod.prerender),document.URL!==location.href&&(location.href=location.href),y=e,await e.hooks.init?.(),Pe=jt(e),$=document.documentElement,Ee=t,ke=e.nodes[0],oe=e.nodes[1],ke(),oe(),w=history.state?.[M],x=history.state?.[J],w||(w=x=Date.now(),history.replaceState({...history.state,[M]:w,[J]:x},""));const r=N[w];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await ln(Ee,n)):(await B({type:"enter",url:et(y.hash?fn(new URL(location.href)):location.href),replace_state:!0}),a()),sn()}function Gt(){se.length=0,je=!1}function ft(e){ie.some(t=>t?.snapshot)&&(X[e]=ie.map(t=>t?.snapshot?.capture()))}function dt(e){X[e]?.forEach((t,n)=>{ie[n]?.snapshot?.restore(t)})}function He(){Ie(w),Me(Qe,N),ft(x),Me(Xe,X)}async function Ht(e,t,n,r){let a,i;t.invalidateAll&&le(),await B({type:"goto",url:et(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{if(t.invalidateAll){je=!0,a=new Set;for(const[o,s]of Fe)for(const l of s.keys())a.add(te(o,l));i=new Set;for(const[o,s]of Ge)for(const l of s.keys())i.add(te(o,l))}t.invalidate&&t.invalidate.forEach(on)}}),t.invalidateAll&&re().then(re).then(()=>{for(const[o,s]of Fe)for(const[l,{resource:c}]of s)a?.has(te(o,l))&&c.refresh();for(const[o,s]of Ge)for(const[l,{resource:c}]of s)i?.has(te(o,l))&&c.reconnect()})}async function Jt(e){if(e.id!==R?.id){le();const t={};ue.add(t),R={id:e.id,token:t,promise:pt({...e,preload:t}).then(n=>(ue.delete(t),n.type==="loaded"&&n.state.error&&le(),n)),fork:null}}return R.promise}async function ye(e){const t=(await pe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function ht(e,t,n){const r={params:m.params,route:{id:m.route?.id??null},url:new URL(location.href)};m={...e.state,nav:r};const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),ot(e.props.page),ut=new y.root({target:t,props:{...e.props,stores:C,components:ie},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),dt(x),n){const i={from:null,to:{...r,scroll:N[w]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};z.forEach(o=>o(i))}ce=!0}async function fe({url:e,params:t,branch:n,errors:r,status:a,error:i,route:o,form:s}){let l="never";if(L&&(e.pathname===L||e.pathname===L+"/"))l="always";else for(const u of n)u?.slash!==void 0&&(l=u.slash);e.pathname=bt(e.pathname,l),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:i,route:o},props:{constructors:Vt(n).map(u=>u.node.component),page:De(S)}};s!==void 0&&(c.props.form=s);let f={},p=!S,v=0;for(let u=0;u<Math.max(n.length,m.branch.length);u+=1){const g=n[u],_=m.branch[u];g?.data!==_?.data&&(p=!0),g&&(f={...f,...g.data},p&&(c.props[`data_${v}`]=f),v+=1)}return(!m.url||e.href!==m.url.href||m.error!==i||s!==void 0&&s!==S.form||p)&&(c.props.page={error:i,params:t,route:{id:o?.id??null},state:{},status:a,url:new URL(e),form:s??null,data:p?f:S.data}),c}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let o=null;const s={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();return{node:l,loader:e,server:i,universal:l.universal?.load?{type:"data",data:o,uses:s}:null,data:o??i?.data??null,slash:l.universal?.trailingSlash??i?.slash}}function Yt(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=ce?At(r,a.href,t):Lt(r,t);return{resolved:a,promise:i}}function Xt(e,t,n,r,a,i){if(je)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(i[o]!==m.params[o])return!0;for(const o of a.dependencies)if(se.some(s=>s(new URL(o))))return!0;return!1}function Ce(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Qt(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(o=>i.includes(o))&&i.every(o=>a.includes(o))&&n.delete(r)}return n}function Zt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:De(S),constructors:[]}}}async function pt({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(R?.id===e)return ue.delete(R.token),R.promise;const{errors:o,layouts:s,leaf:l}=a,c=[...s,l];o.forEach(_=>_?.().catch(O)),c.forEach(_=>_?.[1]().catch(O));const f=m.url?e!==de(m.url):!1,p=m.route?a.id!==m.route.id:!1,v=Qt(m.url,n);let d=!1;const u=c.map(async(_,h)=>{if(!_)return;const b=m.branch[h];return _[1]===b?.loader&&!Xt(d,p,f,v,b.universal?.uses,r)?b:(d=!0,Oe({loader:_[1],url:n,params:r,route:a,parent:async()=>{const I={};for(let P=0;P<h;P+=1)Object.assign(I,(await u[P])?.data);return I},server_data_node:Ce(_[0]?{type:"skip"}:null,_[0]?b?.server:void 0)}))});for(const _ of u)_.catch(O);const g=[];for(let _=0;_<c.length;_+=1)if(c[_])try{g.push(await u[_])}catch(h){if(h instanceof Le)return{type:"redirect",location:h.location};if(ue.has(i))return Zt({error:await ee(h,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=$e(h),E;if(h instanceof xe)E=h.body;else{if(await C.updated.check())return await st(),await Q(n);E=await ee(h,{params:r,url:n,route:{id:a.id}})}const I=await en(_,g,o);return I?fe({url:n,params:r,branch:g.slice(0,I.idx).concat(I.node),errors:o,status:b,error:E,route:a}):await gt(n,{id:a.id},E,b)}else g.push(void 0);return fe({url:n,params:r,branch:g,errors:o,status:200,error:null,route:a,form:t?void 0:null})}async function en(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 Ne({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const o=await Oe({loader:ke,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ce(i)}),s={node:await oe(),loader:oe,universal:null,server:null,data:null};return fe({url:n,params:a,branch:[o,s],status:e,error:t,errors:[],route:null})}catch(o){if(o instanceof Le)return Ht(new URL(o.location,location.href),{},0);throw o}}async function tn(e){const t=e.href;if(ne.has(t))return ne.get(t);let n;try{const r=(async()=>{let a=await y.hooks.reroute({url:new URL(e),fetch:async(i,o)=>Yt(i,o,e).promise})??e;if(typeof a=="string"){const i=new URL(e);y.hash?i.hash=a:i.pathname=a,a=i}return a})();ne.set(t,r),n=await r}catch{ne.delete(t);return}return n}async function pe(e,t){if(e&&!he(e,L,y.hash)){const n=await tn(e);if(!n)return;const r=nn(n);for(const a of Pe){const i=a.exec(r);if(i)return{id:de(e),invalidating:t,route:a,params:Et(i),url:e}}}}function nn(e){return kt(y.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function de(e){return(y.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function _t({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let o=!1;const s=qe(m,n,e,t,i??null);r!==void 0&&(s.navigation.delta=r),a!==void 0&&(s.navigation.event=a);const l={...s.navigation,cancel:()=>{o=!0,s.reject(new Error("navigation cancelled"))}};return Z||it.forEach(c=>c(l)),o?null:s}async function B({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:o={},redirect_count:s=0,nav_token:l={},accept:c=O,block:f=O,event:p}){const v=j;j=l;const d=await pe(t,!1),u=e==="enter"?qe(m,d,t,e):_t({url:t,type:e,delta:n?.delta,intent:d,scroll:n?.scroll,event:p});if(!u){f(),j===l&&(j=v);return}const g=w,_=x;c(),Z=!0,ce&&u.navigation.type!=="enter"&&C.navigating.set(Y.current=u.navigation);let h=d&&await pt(d);if(!h){if(he(t,L,y.hash))return await Q(t,i);h=await gt(t,{id:null},await ee(new Ae(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=d?.url||t,j!==l)return u.reject(new Error("navigation aborted")),!1;if(h.type==="redirect"){if(s<20){await B({type:e,url:new URL(h.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:o,redirect_count:s+1,nav_token:l}),u.fulfil(void 0);return}h=await Ne({status:500,error:await ee(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else h.props.page.status>=400&&await C.updated.check()&&(await st(),await Q(t,i));if(Gt(),Ie(g),ft(_),h.props.page.url.pathname!==t.pathname&&(t.pathname=h.props.page.url.pathname),o=n?n.state:o,!n){const k=i?0:1,W={[M]:w+=k,[J]:x+=k,[Ze]:o};(i?history.replaceState:history.pushState).call(history,W,"",t),i||Kt(w,x)}const b=d&&R?.id===d.id?R.fork:null;R?.fork&&!b&&le(),R=null,h.props.page.state=o;let E;if(ce){const k=(await Promise.all(Array.from(Ft,K=>K(u.navigation)))).filter(K=>typeof K=="function");if(k.length>0){let K=function(){k.forEach(ge=>{z.delete(ge)})};k.push(K),k.forEach(ge=>{z.add(ge)})}const W=u.navigation.to;m={...h.state,nav:{params:W.params,route:W.route,url:W.url}},h.props.page&&(h.props.page.url=t);const _e=b&&await b;_e?E=_e.commit():(F=null,ut.$set(h.props),F&&Object.assign(h.props.page,F),ot(h.props.page),E=yt?.()),ct=!0}else await ht(h,Ee,!1);const{activeElement:I}=document;if(await E,await re(),await re(),j!==l)return u.reject(new Error("navigation aborted")),!1;h.props.page&&F&&Object.assign(h.props.page,F);let P=null;if(Ke){const k=n?n.scroll:a?D():null;k?scrollTo(k.x,k.y):(P=t.hash&&document.getElementById(mt(t)))?P.scrollIntoView():scrollTo(0,0)}const vt=document.activeElement!==I&&document.activeElement!==document.body;!r&&!vt&&un(t,!P),Ke=!0,Z=!1,e==="popstate"&&dt(x),u.fulfil(void 0),u.navigation.to&&(u.navigation.to.scroll=D()),z.forEach(k=>k(u.navigation)),C.navigating.set(Y.current=null)}async function gt(e,t,n,r,a){return e.origin===Te&&e.pathname===location.pathname&&!lt?await Ne({status:r,error:n,url:e,route:t}):await Q(e,a)}function rn(){let e,t={element:void 0,href:void 0},n;$.addEventListener("mousemove",s=>{const l=s.target;clearTimeout(e),e=setTimeout(()=>{i(l,q.hover)},20)});function r(s){s.defaultPrevented||i(s.composedPath()[0],q.tap)}$.addEventListener("mousedown",r),$.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(s=>{for(const l of s)l.isIntersecting&&(ye(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(s,l){const c=nt(s,$),f=c===t.element&&c?.href===t.href&&l>=n;if(!c||f)return;const{url:p,external:v,download:d}=be(c,L,y.hash);if(v||d)return;const u=ae(c),g=p&&de(m.url)===de(p);if(!(u.reload||g))if(l<=u.preload_data){t={element:c,href:c.href},n=q.tap;const _=await pe(p,!1);if(!_)return;Jt(_)}else l<=u.preload_code&&(t={element:c,href:c.href},n=l,ye(p))}function o(){a.disconnect();for(const s of $.querySelectorAll("a")){const{url:l,external:c,download:f}=be(s,L,y.hash);if(c||f)continue;const p=ae(s);p.reload||(p.preload_code===q.viewport&&a.observe(s),p.preload_code===q.eager&&ye(l))}}z.add(o),o()}function ee(e,t){if(e instanceof xe)return e.body;const n=$e(e),r=Mt(e);return y.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function an(e,t){Bt(()=>(e.add(t),()=>{e.delete(t)}))}function wn(e){an(z,e)}function on(e){if(typeof e=="function")se.push(e);else{const{href:t}=new URL(e,location.href);se.push(n=>n.href===t)}}function sn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(He(),!Z){const r=qe(m,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};it.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&He()}),navigator.connection?.saveData||rn(),$.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=nt(t.composedPath()[0],$);if(!n)return;const{url:r,external:a,target:i,download:o}=be(n,L,y.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const s=ae(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[c,f]=(y.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===me(location);if(a||s.reload&&(!p||!f)){_t({url:r,type:"link",event:t})?Z=!0:t.preventDefault();return}if(f!==void 0&&p){const[,v]=m.url.href.split("#");if(v===f){if(t.preventDefault(),f===""||f==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const d=n.ownerDocument.getElementById(decodeURIComponent(f));d&&(d.scrollIntoView(),d.focus())}return}if(G=!0,Ie(w),e(r),!s.replace_state)return;G=!1}t.preventDefault(),await new Promise(v=>{requestAnimationFrame(()=>{setTimeout(v,0)}),setTimeout(v,100)}),await B({type:"link",url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),$.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 o=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(he(o,L,!1))return;const s=t.target,l=ae(s);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(s,r);o.search=new URLSearchParams(c).toString(),B({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Se){if(t.state?.[M]){const n=t.state[M];if(j={},n===w)return;const r=N[n],a=t.state[Ze]??{},i=new URL(t.state[Nt]??location.href),o=t.state[J],s=m.url?me(location)===me(m.url):!1;if(o===x&&(ct||s)){a!==S.state&&(S.state=a),e(i),N[w]=D(),r&&scrollTo(r.x,r.y),w=n;return}const c=n-w;await B({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{w=n,x=o},block:()=>{history.go(-c)},nav_token:j,event:t})}else if(!G){const n=new URL(location.href);e(n),y.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[M]:++w,[J]:x},"",location.href))});for(const t of document.querySelectorAll("link"))Wt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&C.navigating.set(Y.current=null)});function e(t){m.url=S.url=t,C.page.set(De(S)),C.page.notify()}}async function ln(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:o,data:s,form:l}){lt=!0;const c=new URL(location.href);let f;({params:a={},route:i={id:null}}=await pe(c,!1)||{}),f=Pe.find(({id:d})=>d===i.id);let p,v=!0;try{const d=r.map(async(g,_)=>{const h=s[_];return h?.uses&&(h.uses=cn(h.uses)),Oe({loader:y.nodes[g],url:c,params:a,route:i,parent:async()=>{const b={};for(let E=0;E<_;E+=1)Object.assign(b,(await d[E]).data);return b},server_data_node:Ce(h)})}),u=await Promise.all(d);if(f){const g=f.layouts;for(let _=0;_<g.length;_++)g[_]||u.splice(_,0,void 0)}p=await fe({url:c,params:a,branch:u,status:t,error:n,errors:f?.errors,form:l,route:f??null})}catch(d){if(d instanceof Le){await Q(new URL(d.location,location.href));return}p=await Ne({status:$e(d),error:await ee(d,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",v=!1}p.props.page&&(p.props.page.state={}),await ht(p,e,v)}function cn(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 Se=!1;function un(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=mt(e);if(r&&document.getElementById(r)){const{x:i,y:o}=D();setTimeout(()=>{const s=history.state;Se=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(s,"",e),t&&scrollTo(i,o),Se=!1})}else{const i=document.body,o=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),o!==null?i.setAttribute("tabindex",o):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let o=0;o<a.rangeCount;o+=1)i.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===i.length){for(let o=0;o<a.rangeCount;o+=1){const s=i[o],l=a.getRangeAt(o);if(s.commonAncestorContainer!==l.commonAncestorContainer||s.startContainer!==l.startContainer||s.endContainer!==l.endContainer||s.startOffset!==l.startOffset||s.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function qe(e,t,n,r,a=null){let i,o;const s=new Promise((c,f)=>{i=c,o=f});return s.catch(O),{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:s},fulfil:i,reject:o}}function De(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 fn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(y.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{wn as a,L as b,C as c,pn as l,S as p,hn as r,vn as s,Ct as v};
|
|
2
|
+
//# sourceMappingURL=XW0SPyOK.js.map
|