@space-lens/cli 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{serve-entry-DESAwchC.js → serve-entry-gys9dRwU.js} +88 -7
- package/dist/cli.mjs +2 -2
- package/dist/web/200.html +6 -6
- package/dist/web/_app/immutable/chunks/{BjAaj2_R.js → DXxXg_nY.js} +1 -1
- package/dist/web/_app/immutable/chunks/rDsjs1c3.js +1 -0
- package/dist/web/_app/immutable/entry/{app.6tYYuHtv.js → app.DmhhKB0C.js} +2 -2
- package/dist/web/_app/immutable/entry/start.UvdeekY8.js +1 -0
- package/dist/web/_app/immutable/nodes/{1.DocSAEhb.js → 1.aOMFgZ6r.js} +1 -1
- package/dist/web/_app/immutable/nodes/{2.c02Tt4_b.js → 2.CxkPY10S.js} +2 -2
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +7 -7
- package/dist/web/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/web/_app/immutable/chunks/CEhA94eo.js +0 -1
- package/dist/web/_app/immutable/entry/start.B7_bvdWx.js +0 -1
|
@@ -12694,13 +12694,17 @@ function run(command, args, timeoutMs = 3e4) {
|
|
|
12694
12694
|
return new Promise((resolve) => {
|
|
12695
12695
|
const child = spawn(command, args, { stdio: [
|
|
12696
12696
|
"ignore",
|
|
12697
|
-
"
|
|
12697
|
+
"pipe",
|
|
12698
12698
|
"pipe"
|
|
12699
12699
|
] });
|
|
12700
|
+
let stdout = "";
|
|
12700
12701
|
let stderr = "";
|
|
12701
12702
|
const timer = setTimeout(() => {
|
|
12702
12703
|
child.kill("SIGKILL");
|
|
12703
12704
|
}, timeoutMs);
|
|
12705
|
+
child.stdout?.on("data", (chunk) => {
|
|
12706
|
+
stdout = `${stdout}${chunk.toString()}`.slice(-8192);
|
|
12707
|
+
});
|
|
12704
12708
|
child.stderr?.on("data", (chunk) => {
|
|
12705
12709
|
stderr = `${stderr}${chunk.toString()}`.slice(-2e3);
|
|
12706
12710
|
});
|
|
@@ -12708,6 +12712,7 @@ function run(command, args, timeoutMs = 3e4) {
|
|
|
12708
12712
|
clearTimeout(timer);
|
|
12709
12713
|
resolve({
|
|
12710
12714
|
ok: false,
|
|
12715
|
+
stdout,
|
|
12711
12716
|
stderr: String(error)
|
|
12712
12717
|
});
|
|
12713
12718
|
});
|
|
@@ -12715,6 +12720,7 @@ function run(command, args, timeoutMs = 3e4) {
|
|
|
12715
12720
|
clearTimeout(timer);
|
|
12716
12721
|
resolve({
|
|
12717
12722
|
ok: code === 0,
|
|
12723
|
+
stdout,
|
|
12718
12724
|
stderr
|
|
12719
12725
|
});
|
|
12720
12726
|
});
|
|
@@ -12808,9 +12814,79 @@ function uniqueTrashedName(filesDir, name) {
|
|
|
12808
12814
|
function trashInfo(originalPath, deletedAt = /* @__PURE__ */ new Date()) {
|
|
12809
12815
|
return `[Trash Info]\nPath=${encodeURIComponent(originalPath).replaceAll("%2F", "/")}\nDeletionDate=${deletedAt.toISOString().slice(0, 19)}\n`;
|
|
12810
12816
|
}
|
|
12817
|
+
function pwshString(value) {
|
|
12818
|
+
return `'${value.replace(/'/g, "''")}'`;
|
|
12819
|
+
}
|
|
12820
|
+
/**
|
|
12821
|
+
* Lists how many Recycle Bin entries currently display a given name.
|
|
12822
|
+
* Windows renames duplicates to "name (2)", so callers compare counts rather
|
|
12823
|
+
* than names when proving a delete landed in the bin.
|
|
12824
|
+
*/
|
|
12825
|
+
/**
|
|
12826
|
+
* The `-like` pattern that also matches Windows' duplicate rename
|
|
12827
|
+
* ("node_modules (2)"). Brackets are character classes in `-like`, so a name
|
|
12828
|
+
* containing them is escaped rather than silently matching other entries.
|
|
12829
|
+
*/
|
|
12830
|
+
function recycleBinNamePattern(name) {
|
|
12831
|
+
return `${name.replace(/[[\]]/g, (character) => `\`${character}`)} (*`;
|
|
12832
|
+
}
|
|
12833
|
+
async function recycleBinCount(name) {
|
|
12834
|
+
const pattern = recycleBinNamePattern(name);
|
|
12835
|
+
const outcome = await run("powershell", [
|
|
12836
|
+
"-NoProfile",
|
|
12837
|
+
"-Command",
|
|
12838
|
+
`Add-Type -AssemblyName Microsoft.VisualBasic; \$shell = New-Object -ComObject Shell.Application; $hits = @($shell.Namespace(10).Items()) | Where-Object { $_.Name -eq ${pwshString(name)} -or $_.Name -like ${pwshString(pattern)} }; $hits = @($hits); Write-Output ("COUNT=" + $hits.Count)`
|
|
12839
|
+
]);
|
|
12840
|
+
if (!outcome.ok) return null;
|
|
12841
|
+
const match = /COUNT=(\d+)/.exec(outcome.stdout);
|
|
12842
|
+
return match ? Number(match[1]) : null;
|
|
12843
|
+
}
|
|
12844
|
+
/**
|
|
12845
|
+
* Recycle one path and prove it landed in the bin. Returns null on success or
|
|
12846
|
+
* an honest failure message; a permanent delete can never be reported as a
|
|
12847
|
+
* success this way, which is the whole point (see `windowsTrash`).
|
|
12848
|
+
*/
|
|
12849
|
+
async function recycleOne(path, isDirectory) {
|
|
12850
|
+
const name = basename(path);
|
|
12851
|
+
const before = await recycleBinCount(name);
|
|
12852
|
+
if (before === null) return "could not read the Recycle Bin to verify the move; refusing to delete";
|
|
12853
|
+
const outcome = await run("powershell", [
|
|
12854
|
+
"-NoProfile",
|
|
12855
|
+
"-Command",
|
|
12856
|
+
`Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.FileIO.FileSystem]::${isDirectory ? "DeleteDirectory" : "DeleteFile"}(${pwshString(path)}, 'OnlyErrorDialogs', 'SendToRecycleBin')`
|
|
12857
|
+
]);
|
|
12858
|
+
if (!outcome.ok) return `recycle failed: ${outcome.stderr.trim() || "unknown error"}`;
|
|
12859
|
+
const after = await recycleBinCount(name);
|
|
12860
|
+
if (after === null) return "the delete returned success but the Recycle Bin could not be read to confirm it";
|
|
12861
|
+
if (after <= before) return "the file was not found in the Recycle Bin afterwards, so it was deleted permanently";
|
|
12862
|
+
return null;
|
|
12863
|
+
}
|
|
12864
|
+
/**
|
|
12865
|
+
* A zero-byte probe proves the Recycle Bin works on a volume before user data
|
|
12866
|
+
* is touched. It is written beside the planned item's parent folder (same
|
|
12867
|
+
* volume, and a folder this user already owns), recycled, and checked.
|
|
12868
|
+
*/
|
|
12869
|
+
async function recycleBinWorksOn(probeDir) {
|
|
12870
|
+
const probe = join(probeDir, `.space-lens-trash-probe-${process.pid}-${Date.now()}`);
|
|
12871
|
+
try {
|
|
12872
|
+
writeFileSync(probe, "");
|
|
12873
|
+
} catch {
|
|
12874
|
+
return false;
|
|
12875
|
+
}
|
|
12876
|
+
if (await recycleOne(probe, false) === null) return true;
|
|
12877
|
+
try {
|
|
12878
|
+
rmSync(probe, { force: true });
|
|
12879
|
+
} catch {}
|
|
12880
|
+
return false;
|
|
12881
|
+
}
|
|
12811
12882
|
function windowsTrash() {
|
|
12883
|
+
const probed = /* @__PURE__ */ new Map();
|
|
12812
12884
|
return { async trash(paths) {
|
|
12813
12885
|
const results = /* @__PURE__ */ new Map();
|
|
12886
|
+
const volumeOf = (path) => {
|
|
12887
|
+
const match = /^([A-Za-z]:)[\\/]/.exec(path);
|
|
12888
|
+
return match ? `${match[1].toUpperCase()}\\` : "\\";
|
|
12889
|
+
};
|
|
12814
12890
|
for (const path of paths) {
|
|
12815
12891
|
let isDirectory = false;
|
|
12816
12892
|
try {
|
|
@@ -12819,12 +12895,17 @@ function windowsTrash() {
|
|
|
12819
12895
|
results.set(path, "path vanished before it could be trashed");
|
|
12820
12896
|
continue;
|
|
12821
12897
|
}
|
|
12822
|
-
const
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12898
|
+
const volume = volumeOf(path);
|
|
12899
|
+
let works = probed.get(volume);
|
|
12900
|
+
if (works === void 0) {
|
|
12901
|
+
works = await recycleBinWorksOn(dirname(path));
|
|
12902
|
+
probed.set(volume, works);
|
|
12903
|
+
}
|
|
12904
|
+
if (!works) {
|
|
12905
|
+
results.set(path, `the Recycle Bin cannot recycle on ${volume} in this session; refusing to delete permanently`);
|
|
12906
|
+
continue;
|
|
12907
|
+
}
|
|
12908
|
+
results.set(path, await recycleOne(path, isDirectory));
|
|
12828
12909
|
}
|
|
12829
12910
|
return results;
|
|
12830
12911
|
} };
|
package/dist/cli.mjs
CHANGED
|
@@ -63241,9 +63241,9 @@ function runCli(argv = process.argv) {
|
|
|
63241
63241
|
if (argv[2] === "serve") {
|
|
63242
63242
|
(async () => {
|
|
63243
63243
|
try {
|
|
63244
|
-
await (await import("./assets/serve-entry-
|
|
63244
|
+
await (await import("./assets/serve-entry-gys9dRwU.js")).runServe(argv.slice(3));
|
|
63245
63245
|
} catch (error) {
|
|
63246
|
-
const { reportServeError } = await import("./assets/serve-entry-
|
|
63246
|
+
const { reportServeError } = await import("./assets/serve-entry-gys9dRwU.js");
|
|
63247
63247
|
reportServeError(error);
|
|
63248
63248
|
}
|
|
63249
63249
|
})();
|
package/dist/web/200.html
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
8
|
<meta name="color-scheme" content="light dark" />
|
|
9
9
|
<title>Space Lens</title>
|
|
10
|
-
<link href="/_app/immutable/entry/start.
|
|
11
|
-
<link href="/_app/immutable/chunks/
|
|
10
|
+
<link href="/_app/immutable/entry/start.UvdeekY8.js" rel="modulepreload">
|
|
11
|
+
<link href="/_app/immutable/chunks/DXxXg_nY.js" rel="modulepreload">
|
|
12
12
|
<link href="/_app/immutable/chunks/D_inIiOK.js" rel="modulepreload">
|
|
13
|
-
<link href="/_app/immutable/entry/app.
|
|
13
|
+
<link href="/_app/immutable/entry/app.DmhhKB0C.js" rel="modulepreload">
|
|
14
14
|
<link href="/_app/immutable/chunks/uBIymjUX.js" rel="modulepreload">
|
|
15
15
|
<link href="/_app/immutable/chunks/xihTtKlq.js" rel="modulepreload">
|
|
16
16
|
<link href="/_app/immutable/nodes/0.BfNK78ja.js" rel="modulepreload">
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
<div style="display: contents">
|
|
23
23
|
<script>
|
|
24
24
|
{
|
|
25
|
-
|
|
25
|
+
__sveltekit_oetqib = {
|
|
26
26
|
base: ""
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const element = document.currentScript.parentElement;
|
|
30
30
|
|
|
31
31
|
Promise.all([
|
|
32
|
-
import("/_app/immutable/entry/start.
|
|
33
|
-
import("/_app/immutable/entry/app.
|
|
32
|
+
import("/_app/immutable/entry/start.UvdeekY8.js"),
|
|
33
|
+
import("/_app/immutable/entry/app.DmhhKB0C.js")
|
|
34
34
|
]).then(([kit, app]) => {
|
|
35
35
|
kit.start(app, element);
|
|
36
36
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,_t as t,c as n,et as r,ht as i,r as a,t as o,tt as s}from"./D_inIiOK.js";var c=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var v=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&y.delete(x(e)),v(e,t));var y=new Map;function ee(e,t){let n=x(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&y.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function b(e,t,n){if(y.size>0){let t=x(e,n),r=y.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);y.delete(t)}}return window.fetch(t,n)}function x(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var te=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,ne=/^\/\((?:[^)]+)\)$/;function re(e){let t=[];return{pattern:e===`/`||ne.test(e)?/^\/$/:RegExp(`^${ae(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return se(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return se(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=te.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return se(e)}).join(``)}).join(``)}/?$`),params:t}}function ie(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function ae(e){return e.slice(1).split(`/`).filter(ie)}function oe(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0){if(s.rest)c=``;else continue}if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function se(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function ce({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=re(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return oe(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function le(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ue(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var S=globalThis.__sveltekit_q930bj?.base??``,de=globalThis.__sveltekit_q930bj?.assets??S??``,fe=`1795228214861`,pe=`sveltekit:snapshot`,me=`sveltekit:scroll`,he=`sveltekit:states`,C=`sveltekit:history`,w=`sveltekit:navigation`,T={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ge=location.origin;function _e(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function E(){return{x:pageXOffset,y:pageYOffset}}function D(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var ve={...T,"":T.hover};function ye(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function be(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=ye(e)}}function xe(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||k(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===ge&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function O(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=D(s,`preload-code`)),i===null&&(i=D(s,`preload-data`)),t===null&&(t=D(s,`keepfocus`)),n===null&&(n=D(s,`noscroll`)),a===null&&(a=D(s,`reload`)),o===null&&(o=D(s,`replacestate`)),s=ye(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:ve[r??`off`],preload_data:ve[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Se(e){let t=n(e),r=!0;function i(){r=!0,t.update(e=>e)}function a(e){r=!1,t.set(e)}function o(e){let n;return t.subscribe(t=>{(n===void 0||r&&t!==n)&&e(n=t)})}return{notify:i,set:a,subscribe:o}}var Ce={v:h};function we(){let{set:e,subscribe:t}=n(!1),r;async function i(){clearTimeout(r);try{let t=await fetch(`${de}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let n=(await t.json()).version!==fe;return n&&(e(!0),Ce.v(),clearTimeout(r)),n}catch{return!1}}return{subscribe:t,check:i}}function k(e,t,n){return e.origin!==ge||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Te(e){}var Ee=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...Ee],[...new Set([...Ee])];function De(e){return e.filter(e=>e!=null)}function A(e,t){return e+`/`+t}function Oe(e){return e instanceof c||e instanceof u?e.status:500}function ke(e){return e instanceof u?e.text:`Internal Error`}var j,M,Ae,je=a.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(a.toString()),Me=`a:`;je?(j={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Me)},M={current:null},Ae={current:!1}):(j=new class{#e=t({});get data(){return e(this.#e)}set data(e){i(this.#e,e)}#t=t(null);get form(){return e(this.#t)}set form(e){i(this.#t,e)}#n=t(null);get error(){return e(this.#n)}set error(e){i(this.#n,e)}#r=t({});get params(){return e(this.#r)}set params(e){i(this.#r,e)}#i=t({id:null});get route(){return e(this.#i)}set route(e){i(this.#i,e)}#a=t({});get state(){return e(this.#a)}set state(e){i(this.#a,e)}#o=t(-1);get status(){return e(this.#o)}set status(e){i(this.#o,e)}#s=t(new URL(Me));get url(){return e(this.#s)}set url(e){i(this.#s,e)}},M=new class{#e=t(null);get current(){return e(this.#e)}set current(e){i(this.#e,e)}},Ae=new class{#e=t(!1);get current(){return e(this.#e)}set current(e){i(this.#e,e)}},Ce.v=()=>Ae.current=!0);function Ne(e){Object.assign(j,e)}var{onMount:Pe,tick:Fe}=o,Ie=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),N=null,P=le(`sveltekit:scroll`)??{},F=le(`sveltekit:snapshot`)??{},I={url:Se({}),page:Se({}),navigating:n(null),updated:we()};function Le(e){P[e]=E()}function Re(e,t){let n=e+1;for(;P[n];)delete P[n],n+=1;for(n=t+1;F[n];)delete F[n],n+=1}function L(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function ze(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(S||`/`);e&&await e.update()}}var Be,Ve,R,z,He,B,Ue={},We={},V=[],H=[],U=null;function Ge(){U?.fork?.then(e=>e?.discard()),U=null,Q={element:void 0,href:void 0}}var Ke=new Map,qe=new Set,Je=new Set,W=new Set,G={branch:[],error:null,url:null,nav:null},Ye=!1,Xe=!1,Ze=!0,K=!1,q=!1,Qe=!1,$e=!1,et,J,Y,X,tt=new Set,nt=new Map,rt=new Map;async function it(e,t,n){if(globalThis.__sveltekit_q930bj.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_q930bj.data;for(let t in e)Ue[t]=e[t];for(let e in n)Ue[e]=n[e];for(let e in r)Ue[e]=r[e];for(let e in t)We[e]=t[e]}document.URL!==location.href&&(location.href=location.href),B=e,await e.hooks.init?.(),Be=ce(e),z=document.documentElement,He=t,Ve=e.nodes[0],R=e.nodes[1],Ve(),R(),J=history.state?.[C],Y=history.state?.[w],J||(J=Y=Date.now(),history.replaceState({...history.state,[C]:J,[w]:Y},``));let r=P[J];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Mt(He,n)):(await Z({type:`enter`,url:_e(B.hash?Rt(new URL(location.href)):location.href),replace_state:!0}),i()),jt()}function at(){V.length=0,$e=!1}function ot(e){H.some(e=>e?.snapshot)&&(F[e]=H.map(e=>e?.snapshot?.capture()))}function st(e){F[e]?.forEach((e,t)=>{H[t]?.snapshot?.restore(e)})}function ct(){Le(J),ue(me,P),ot(Y),ue(pe,F)}async function lt(e,t,n,r){let i,a;t.invalidateAll&&Ge(),await Z({type:`goto`,url:_e(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{if(t.invalidateAll){$e=!0,i=new Set;for(let[e,t]of nt)for(let[n,r]of t)r.resource?.reset(),i.add(A(e,n));a=new Set;for(let[e,t]of rt)for(let n of t.keys())a.add(A(e,n))}t.invalidate&&t.invalidate.forEach(At)}}),t.invalidateAll&&s().then(s).then(()=>{for(let[e,t]of nt)for(let[n,{resource:r}]of t)i?.has(A(e,n))&&r.start();for(let[e,t]of rt)for(let[n,{resource:r}]of t)a?.has(A(e,n))&&r.reconnect()})}async function ut(e){if(e.id!==U?.id){Ge();let t={};tt.add(t),U={id:e.id,token:t,promise:bt({...e,preload:t}).then(e=>(tt.delete(t),e.type===`loaded`&&e.state.error&&Ge(),e)),fork:null}}return U.promise}async function dt(e){let t=(await wt(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function ft(e,t,n){let r={params:G.params,route:{id:G.route?.id??null},url:new URL(location.href)};if(G={...e.state,nav:r},Ne(e.props.page),et=new B.root({target:t,props:{...e.props,stores:I,components:H},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:P[J]??E()},willUnload:!1,type:`enter`,complete:Promise.resolve()};W.forEach(t=>t(e))}st(Y),Xe=!0}async function pt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(S&&(e.pathname===S||e.pathname===S+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:De(n).map(e=>e.node.component),page:Lt(j)}};s!==void 0&&(l.props.form=s);let u={},f=!j,p=0;for(let e=0;e<Math.max(n.length,G.branch.length);e+=1){let t=n[e],r=G.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!G.url||e.href!==G.url.href||G.error!==a||s!==void 0&&s!==j.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:j.data}),l}async function mt({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},s=await e();return{node:s,loader:e,server:a,universal:s.universal?.load?{type:`data`,data:null,uses:o}:null,data:a?.data??null,slash:s.universal?.trailingSlash??a?.slash}}function ht(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:Xe?b(r,i.href,t):ee(r,t)}}function gt(e,t,n,r,i,a){if($e)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==G.params[e])return!0;for(let e of i.dependencies)if(V.some(t=>t(new URL(e))))return!0;return!1}function _t(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function vt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function yt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Lt(j),constructors:[]}}}async function bt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(U?.id===e)return tt.delete(U.token),U.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=G.url?e!==Et(G.url):!1,p=G.route?i.id!==G.route.id:!1,m=vt(G.url,n),g=!1,_=d.map(async(e,t)=>{if(!e)return;let a=G.branch[t];return e[1]===a?.loader&&!gt(g,p,f,m,a.universal?.uses,r)?a:(g=!0,mt({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await _[n])?.data);return e},server_data_node:_t(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of _)e.catch(h);let v=[];for(let e=0;e<d.length;e+=1)if(d[e])try{v.push(await _[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(a&&tt.has(a))return yt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=Oe(t),u;if(t instanceof c)u=t.body;else{if(await I.updated.check())return await ze(),await L(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await xt(e,v,o);return d?pt({url:n,params:r,branch:v.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await Ot(n,{id:i.id},u,s)}else v.push(void 0);return pt({url:n,params:r,branch:v,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function xt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function St({status:e,error:t,url:n,route:r}){let i={};try{return pt({url:n,params:i,branch:[await mt({loader:Ve,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:_t(null)}),{node:await R(),loader:R,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof l){await lt(new URL(t.location,location.href),{},0);return}let a=await B.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function Ct(e){let t=e.href;if(Ke.has(t))return Ke.get(t);let n;try{let r=(async()=>{let t=await B.hooks.reroute({url:new URL(e),fetch:async(t,n)=>ht(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);B.hash?n.hash=t:n.pathname=t,t=n}return t})();Ke.set(t,r),n=await r}catch{Ke.delete(t);return}return n}async function wt(e,t){if(e&&!k(e,S,B.hash)){let n=await Ct(e);if(!n)return;let r=Tt(n);for(let n of Be){let i=n.exec(r);if(i)return{id:Et(e),invalidating:t,route:n,params:p(i),url:e}}}}function Tt(e){return f(B.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(S.length))||`/`}function Et(e){return(B.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Dt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=It(G,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return K||qe.forEach(e=>e(c)),o?null:s}async function Z({type:e,url:t,popped:n,keepfocus:i,noscroll:a,replace_state:o,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let g=X;X=d;let _=await wt(t,!1),v=e===`enter`?It(G,_,t,e):Dt({url:t,type:e,delta:n?.delta,intent:_,scroll:n?.scroll,event:m});if(!v){p(),X===d&&(X=g);return}let y=J,ee=Y;f(),K=!0,Xe&&v.navigation.type!==`enter`&&I.navigating.set(M.current=v.navigation);let b=_&&await bt(_);if(!b){if(k(t,S,B.hash))return await L(t,o);b=await Ot(t,{id:null},await $(new u(404,`Not Found`,`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,o)}if(t=_?.url||t,X!==d){v.reject(Error(`navigation aborted`));return}if(!b)return;if(b.type===`redirect`){if(l<20){await Z({type:e,url:new URL(b.location,t),popped:n,keepfocus:i,noscroll:a,replace_state:o,state:c,redirect_count:l+1,nav_token:d}),v.fulfil(void 0);return}if(b=await St({status:500,error:await $(Error(`Redirect loop`),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}}),!b)return}else if(b.props.page.status>=400&&await I.updated.check())return await ze(),await L(t,o);if(at(),Le(y),ot(ee),b.props.page.url.pathname!==t.pathname&&(t.pathname=b.props.page.url.pathname),c=n?n.state:c,!n){let e=+!o,n={[C]:J+=e,[w]:Y+=e,[he]:c};(o?history.replaceState:history.pushState).call(history,n,``,t),o||Re(J,Y)}let x=_&&U?.id===_.id?U.fork:null;U?.fork&&!x?Ge():(U=null,Q={element:void 0,href:void 0}),b.props.page.state=c;let te;if(Xe){let e=(await Promise.all(Array.from(Je,e=>e(v.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{W.delete(e)})}e.push(t),e.forEach(e=>{W.add(e)})}let n=v.navigation.to;G={...b.state,nav:{params:n.params,route:n.route,url:n.url}},b.props.page&&(b.props.page.url=t),!i&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let a=x&&await x;a?te=a.commit():(N=null,et.$set(b.props),N&&Object.assign(b.props.page,N),Ne(b.props.page),te=r?.()),Qe=!0}else await ft(b,He,!1);let{activeElement:ne}=document;if(await te,await s(),await s(),X!==d){v.reject(Error(`navigation aborted`));return}b.props.page&&N&&Object.assign(b.props.page,N);let re=null;if(Ze){let e=n?n.scroll:a?E():null;e?scrollTo(e.x,e.y):(re=t.hash&&document.getElementById(zt(t)))?re.scrollIntoView():scrollTo(0,0)}let ie=document.activeElement!==ne&&document.activeElement!==document.body;!i&&!ie&&Ft(t,!re),Ze=!0,K=!1,v.fulfil(void 0),v.navigation.to&&(v.navigation.to.scroll=E()),W.forEach(e=>e(v.navigation)),e===`popstate`&&st(Y),I.navigating.set(M.current=null)}async function Ot(e,t,n,r,i){return e.origin===ge&&e.pathname===location.pathname&&!Ye?await St({status:r,error:n,url:e,route:t}):await L(e,i)}var Q={element:void 0,href:void 0};function kt(){let e,t;z.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,T.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],T.tap)}z.addEventListener(`mousedown`,n),z.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(dt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=be(e,z),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=xe(r,S,B.hash);if(o||s)return;let c=O(r),l=a&&Et(G.url)===Et(a);if(!(c.reload||l)){if(n<=c.preload_data){Q={element:r,href:r.href},t=T.tap;let e=await wt(a,!1);if(!e)return;ut(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,dt(a))}}function a(){r.disconnect();for(let e of z.querySelectorAll(`a`)){let{url:t,external:n,download:i}=xe(e,S,B.hash);if(n||i)continue;let a=O(e);a.reload||(a.preload_code===T.viewport&&r.observe(e),a.preload_code===T.eager&&dt(t))}}W.add(a),a()}function $(e,t){if(e instanceof c)return e.body;let n=Oe(e),r=ke(e);return B.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function At(e){if(typeof e==`function`)V.push(e);else{let{href:t}=new URL(e,location.href);V.push(e=>e.href===t)}}function jt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(ct(),!K){let e=It(G,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};qe.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&ct()}),navigator.connection?.saveData||kt(),z.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=be(t.composedPath()[0],z);if(!n)return;let{url:r,external:i,target:a,download:o}=xe(n,S,B.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=O(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(B.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Dt({url:r,type:`link`,event:t})?K=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=G.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(q=!0,Le(J),e(r),!s.replace_state)return;q=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),z.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(k(r,S,!1))return;let i=e.target,a=O(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Pt){if(t.state?.[`sveltekit:history`]){let n=t.state[C];if(X={},n===J)return;let r=P[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[w],s=G.url?m(location)===m(G.url):!1;if(o===Y&&(Qe||s)){i!==j.state&&(j.state=i),e(a),P[J]=E(),r&&scrollTo(r.x,r.y),J=n;return}let c=n-J;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{J=n,Y=o},block:()=>{history.go(-c)},nav_token:X,event:t})}else q||(e(new URL(location.href)),B.hash&&location.reload())}}),addEventListener(`hashchange`,()=>{q&&(q=!1,history.replaceState({...history.state,[C]:++J,[w]:Y},``,location.href))});for(let e of document.querySelectorAll(`link`))Ie.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&I.navigating.set(M.current=null)});function e(e){G.url=j.url=e,I.page.set(Lt(j)),I.page.notify()}}async function Mt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){Ye=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await wt(u,!1)||{}),d=Be.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Nt(r.uses)),mt({loader:B.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:_t(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await pt({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l)return await L(new URL(t.location,location.href));f=await St({status:Oe(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f&&(f.props.page&&(f.props.page.state={}),await ft(f,e,p))}function Nt(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??[])}}var Pt=!1;function Ft(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=zt(e);if(n&&document.getElementById(n)){let{x:r,y:i}=E();setTimeout(()=>{let a=history.state;Pt=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Pt=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function It(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:E()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Lt(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 Rt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function zt(e){let t;if(B.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{S as a,Te as i,M as n,j as r,it as t};
|
|
1
|
+
import{$ as e,_t as t,c as n,et as r,ht as i,r as a,t as o,tt as s}from"./D_inIiOK.js";var c=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var v=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&y.delete(x(e)),v(e,t));var y=new Map;function ee(e,t){let n=x(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&y.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function b(e,t,n){if(y.size>0){let t=x(e,n),r=y.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);y.delete(t)}}return window.fetch(t,n)}function x(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var te=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,ne=/^\/\((?:[^)]+)\)$/;function re(e){let t=[];return{pattern:e===`/`||ne.test(e)?/^\/$/:RegExp(`^${ae(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return se(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return se(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=te.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return se(e)}).join(``)}).join(``)}/?$`),params:t}}function ie(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function ae(e){return e.slice(1).split(`/`).filter(ie)}function oe(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0){if(s.rest)c=``;else continue}if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function se(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function ce({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=re(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return oe(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function le(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ue(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var S=globalThis.__sveltekit_oetqib?.base??``,de=globalThis.__sveltekit_oetqib?.assets??S??``,fe=`1795229550243`,pe=`sveltekit:snapshot`,me=`sveltekit:scroll`,he=`sveltekit:states`,C=`sveltekit:history`,w=`sveltekit:navigation`,T={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ge=location.origin;function _e(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function E(){return{x:pageXOffset,y:pageYOffset}}function D(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var ve={...T,"":T.hover};function ye(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function be(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=ye(e)}}function xe(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||k(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===ge&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function O(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=D(s,`preload-code`)),i===null&&(i=D(s,`preload-data`)),t===null&&(t=D(s,`keepfocus`)),n===null&&(n=D(s,`noscroll`)),a===null&&(a=D(s,`reload`)),o===null&&(o=D(s,`replacestate`)),s=ye(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:ve[r??`off`],preload_data:ve[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Se(e){let t=n(e),r=!0;function i(){r=!0,t.update(e=>e)}function a(e){r=!1,t.set(e)}function o(e){let n;return t.subscribe(t=>{(n===void 0||r&&t!==n)&&e(n=t)})}return{notify:i,set:a,subscribe:o}}var Ce={v:h};function we(){let{set:e,subscribe:t}=n(!1),r;async function i(){clearTimeout(r);try{let t=await fetch(`${de}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let n=(await t.json()).version!==fe;return n&&(e(!0),Ce.v(),clearTimeout(r)),n}catch{return!1}}return{subscribe:t,check:i}}function k(e,t,n){return e.origin!==ge||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Te(e){}var Ee=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...Ee],[...new Set([...Ee])];function De(e){return e.filter(e=>e!=null)}function A(e,t){return e+`/`+t}function Oe(e){return e instanceof c||e instanceof u?e.status:500}function ke(e){return e instanceof u?e.text:`Internal Error`}var j,M,Ae,je=a.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(a.toString()),Me=`a:`;je?(j={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Me)},M={current:null},Ae={current:!1}):(j=new class{#e=t({});get data(){return e(this.#e)}set data(e){i(this.#e,e)}#t=t(null);get form(){return e(this.#t)}set form(e){i(this.#t,e)}#n=t(null);get error(){return e(this.#n)}set error(e){i(this.#n,e)}#r=t({});get params(){return e(this.#r)}set params(e){i(this.#r,e)}#i=t({id:null});get route(){return e(this.#i)}set route(e){i(this.#i,e)}#a=t({});get state(){return e(this.#a)}set state(e){i(this.#a,e)}#o=t(-1);get status(){return e(this.#o)}set status(e){i(this.#o,e)}#s=t(new URL(Me));get url(){return e(this.#s)}set url(e){i(this.#s,e)}},M=new class{#e=t(null);get current(){return e(this.#e)}set current(e){i(this.#e,e)}},Ae=new class{#e=t(!1);get current(){return e(this.#e)}set current(e){i(this.#e,e)}},Ce.v=()=>Ae.current=!0);function Ne(e){Object.assign(j,e)}var{onMount:Pe,tick:Fe}=o,Ie=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),N=null,P=le(`sveltekit:scroll`)??{},F=le(`sveltekit:snapshot`)??{},I={url:Se({}),page:Se({}),navigating:n(null),updated:we()};function Le(e){P[e]=E()}function Re(e,t){let n=e+1;for(;P[n];)delete P[n],n+=1;for(n=t+1;F[n];)delete F[n],n+=1}function L(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function ze(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(S||`/`);e&&await e.update()}}var Be,Ve,R,z,He,B,Ue={},We={},V=[],H=[],U=null;function Ge(){U?.fork?.then(e=>e?.discard()),U=null,Q={element:void 0,href:void 0}}var Ke=new Map,qe=new Set,Je=new Set,W=new Set,G={branch:[],error:null,url:null,nav:null},Ye=!1,Xe=!1,Ze=!0,K=!1,q=!1,Qe=!1,$e=!1,et,J,Y,X,tt=new Set,nt=new Map,rt=new Map;async function it(e,t,n){if(globalThis.__sveltekit_oetqib.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_oetqib.data;for(let t in e)Ue[t]=e[t];for(let e in n)Ue[e]=n[e];for(let e in r)Ue[e]=r[e];for(let e in t)We[e]=t[e]}document.URL!==location.href&&(location.href=location.href),B=e,await e.hooks.init?.(),Be=ce(e),z=document.documentElement,He=t,Ve=e.nodes[0],R=e.nodes[1],Ve(),R(),J=history.state?.[C],Y=history.state?.[w],J||(J=Y=Date.now(),history.replaceState({...history.state,[C]:J,[w]:Y},``));let r=P[J];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Mt(He,n)):(await Z({type:`enter`,url:_e(B.hash?Rt(new URL(location.href)):location.href),replace_state:!0}),i()),jt()}function at(){V.length=0,$e=!1}function ot(e){H.some(e=>e?.snapshot)&&(F[e]=H.map(e=>e?.snapshot?.capture()))}function st(e){F[e]?.forEach((e,t)=>{H[t]?.snapshot?.restore(e)})}function ct(){Le(J),ue(me,P),ot(Y),ue(pe,F)}async function lt(e,t,n,r){let i,a;t.invalidateAll&&Ge(),await Z({type:`goto`,url:_e(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{if(t.invalidateAll){$e=!0,i=new Set;for(let[e,t]of nt)for(let[n,r]of t)r.resource?.reset(),i.add(A(e,n));a=new Set;for(let[e,t]of rt)for(let n of t.keys())a.add(A(e,n))}t.invalidate&&t.invalidate.forEach(At)}}),t.invalidateAll&&s().then(s).then(()=>{for(let[e,t]of nt)for(let[n,{resource:r}]of t)i?.has(A(e,n))&&r.start();for(let[e,t]of rt)for(let[n,{resource:r}]of t)a?.has(A(e,n))&&r.reconnect()})}async function ut(e){if(e.id!==U?.id){Ge();let t={};tt.add(t),U={id:e.id,token:t,promise:bt({...e,preload:t}).then(e=>(tt.delete(t),e.type===`loaded`&&e.state.error&&Ge(),e)),fork:null}}return U.promise}async function dt(e){let t=(await wt(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function ft(e,t,n){let r={params:G.params,route:{id:G.route?.id??null},url:new URL(location.href)};if(G={...e.state,nav:r},Ne(e.props.page),et=new B.root({target:t,props:{...e.props,stores:I,components:H},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:P[J]??E()},willUnload:!1,type:`enter`,complete:Promise.resolve()};W.forEach(t=>t(e))}st(Y),Xe=!0}async function pt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(S&&(e.pathname===S||e.pathname===S+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:De(n).map(e=>e.node.component),page:Lt(j)}};s!==void 0&&(l.props.form=s);let u={},f=!j,p=0;for(let e=0;e<Math.max(n.length,G.branch.length);e+=1){let t=n[e],r=G.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!G.url||e.href!==G.url.href||G.error!==a||s!==void 0&&s!==j.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:j.data}),l}async function mt({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},s=await e();return{node:s,loader:e,server:a,universal:s.universal?.load?{type:`data`,data:null,uses:o}:null,data:a?.data??null,slash:s.universal?.trailingSlash??a?.slash}}function ht(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:Xe?b(r,i.href,t):ee(r,t)}}function gt(e,t,n,r,i,a){if($e)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==G.params[e])return!0;for(let e of i.dependencies)if(V.some(t=>t(new URL(e))))return!0;return!1}function _t(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function vt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function yt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Lt(j),constructors:[]}}}async function bt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(U?.id===e)return tt.delete(U.token),U.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=G.url?e!==Et(G.url):!1,p=G.route?i.id!==G.route.id:!1,m=vt(G.url,n),g=!1,_=d.map(async(e,t)=>{if(!e)return;let a=G.branch[t];return e[1]===a?.loader&&!gt(g,p,f,m,a.universal?.uses,r)?a:(g=!0,mt({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await _[n])?.data);return e},server_data_node:_t(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of _)e.catch(h);let v=[];for(let e=0;e<d.length;e+=1)if(d[e])try{v.push(await _[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(a&&tt.has(a))return yt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=Oe(t),u;if(t instanceof c)u=t.body;else{if(await I.updated.check())return await ze(),await L(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await xt(e,v,o);return d?pt({url:n,params:r,branch:v.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await Ot(n,{id:i.id},u,s)}else v.push(void 0);return pt({url:n,params:r,branch:v,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function xt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function St({status:e,error:t,url:n,route:r}){let i={};try{return pt({url:n,params:i,branch:[await mt({loader:Ve,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:_t(null)}),{node:await R(),loader:R,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof l){await lt(new URL(t.location,location.href),{},0);return}let a=await B.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function Ct(e){let t=e.href;if(Ke.has(t))return Ke.get(t);let n;try{let r=(async()=>{let t=await B.hooks.reroute({url:new URL(e),fetch:async(t,n)=>ht(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);B.hash?n.hash=t:n.pathname=t,t=n}return t})();Ke.set(t,r),n=await r}catch{Ke.delete(t);return}return n}async function wt(e,t){if(e&&!k(e,S,B.hash)){let n=await Ct(e);if(!n)return;let r=Tt(n);for(let n of Be){let i=n.exec(r);if(i)return{id:Et(e),invalidating:t,route:n,params:p(i),url:e}}}}function Tt(e){return f(B.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(S.length))||`/`}function Et(e){return(B.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Dt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=It(G,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return K||qe.forEach(e=>e(c)),o?null:s}async function Z({type:e,url:t,popped:n,keepfocus:i,noscroll:a,replace_state:o,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let g=X;X=d;let _=await wt(t,!1),v=e===`enter`?It(G,_,t,e):Dt({url:t,type:e,delta:n?.delta,intent:_,scroll:n?.scroll,event:m});if(!v){p(),X===d&&(X=g);return}let y=J,ee=Y;f(),K=!0,Xe&&v.navigation.type!==`enter`&&I.navigating.set(M.current=v.navigation);let b=_&&await bt(_);if(!b){if(k(t,S,B.hash))return await L(t,o);b=await Ot(t,{id:null},await $(new u(404,`Not Found`,`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,o)}if(t=_?.url||t,X!==d){v.reject(Error(`navigation aborted`));return}if(!b)return;if(b.type===`redirect`){if(l<20){await Z({type:e,url:new URL(b.location,t),popped:n,keepfocus:i,noscroll:a,replace_state:o,state:c,redirect_count:l+1,nav_token:d}),v.fulfil(void 0);return}if(b=await St({status:500,error:await $(Error(`Redirect loop`),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}}),!b)return}else if(b.props.page.status>=400&&await I.updated.check())return await ze(),await L(t,o);if(at(),Le(y),ot(ee),b.props.page.url.pathname!==t.pathname&&(t.pathname=b.props.page.url.pathname),c=n?n.state:c,!n){let e=+!o,n={[C]:J+=e,[w]:Y+=e,[he]:c};(o?history.replaceState:history.pushState).call(history,n,``,t),o||Re(J,Y)}let x=_&&U?.id===_.id?U.fork:null;U?.fork&&!x?Ge():(U=null,Q={element:void 0,href:void 0}),b.props.page.state=c;let te;if(Xe){let e=(await Promise.all(Array.from(Je,e=>e(v.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{W.delete(e)})}e.push(t),e.forEach(e=>{W.add(e)})}let n=v.navigation.to;G={...b.state,nav:{params:n.params,route:n.route,url:n.url}},b.props.page&&(b.props.page.url=t),!i&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let a=x&&await x;a?te=a.commit():(N=null,et.$set(b.props),N&&Object.assign(b.props.page,N),Ne(b.props.page),te=r?.()),Qe=!0}else await ft(b,He,!1);let{activeElement:ne}=document;if(await te,await s(),await s(),X!==d){v.reject(Error(`navigation aborted`));return}b.props.page&&N&&Object.assign(b.props.page,N);let re=null;if(Ze){let e=n?n.scroll:a?E():null;e?scrollTo(e.x,e.y):(re=t.hash&&document.getElementById(zt(t)))?re.scrollIntoView():scrollTo(0,0)}let ie=document.activeElement!==ne&&document.activeElement!==document.body;!i&&!ie&&Ft(t,!re),Ze=!0,K=!1,v.fulfil(void 0),v.navigation.to&&(v.navigation.to.scroll=E()),W.forEach(e=>e(v.navigation)),e===`popstate`&&st(Y),I.navigating.set(M.current=null)}async function Ot(e,t,n,r,i){return e.origin===ge&&e.pathname===location.pathname&&!Ye?await St({status:r,error:n,url:e,route:t}):await L(e,i)}var Q={element:void 0,href:void 0};function kt(){let e,t;z.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,T.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],T.tap)}z.addEventListener(`mousedown`,n),z.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(dt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=be(e,z),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=xe(r,S,B.hash);if(o||s)return;let c=O(r),l=a&&Et(G.url)===Et(a);if(!(c.reload||l)){if(n<=c.preload_data){Q={element:r,href:r.href},t=T.tap;let e=await wt(a,!1);if(!e)return;ut(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,dt(a))}}function a(){r.disconnect();for(let e of z.querySelectorAll(`a`)){let{url:t,external:n,download:i}=xe(e,S,B.hash);if(n||i)continue;let a=O(e);a.reload||(a.preload_code===T.viewport&&r.observe(e),a.preload_code===T.eager&&dt(t))}}W.add(a),a()}function $(e,t){if(e instanceof c)return e.body;let n=Oe(e),r=ke(e);return B.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function At(e){if(typeof e==`function`)V.push(e);else{let{href:t}=new URL(e,location.href);V.push(e=>e.href===t)}}function jt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(ct(),!K){let e=It(G,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};qe.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&ct()}),navigator.connection?.saveData||kt(),z.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=be(t.composedPath()[0],z);if(!n)return;let{url:r,external:i,target:a,download:o}=xe(n,S,B.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=O(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(B.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Dt({url:r,type:`link`,event:t})?K=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=G.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(q=!0,Le(J),e(r),!s.replace_state)return;q=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),z.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(k(r,S,!1))return;let i=e.target,a=O(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Pt){if(t.state?.[`sveltekit:history`]){let n=t.state[C];if(X={},n===J)return;let r=P[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[w],s=G.url?m(location)===m(G.url):!1;if(o===Y&&(Qe||s)){i!==j.state&&(j.state=i),e(a),P[J]=E(),r&&scrollTo(r.x,r.y),J=n;return}let c=n-J;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{J=n,Y=o},block:()=>{history.go(-c)},nav_token:X,event:t})}else q||(e(new URL(location.href)),B.hash&&location.reload())}}),addEventListener(`hashchange`,()=>{q&&(q=!1,history.replaceState({...history.state,[C]:++J,[w]:Y},``,location.href))});for(let e of document.querySelectorAll(`link`))Ie.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&I.navigating.set(M.current=null)});function e(e){G.url=j.url=e,I.page.set(Lt(j)),I.page.notify()}}async function Mt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){Ye=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await wt(u,!1)||{}),d=Be.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Nt(r.uses)),mt({loader:B.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:_t(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await pt({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l)return await L(new URL(t.location,location.href));f=await St({status:Oe(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f&&(f.props.page&&(f.props.page.state={}),await ft(f,e,p))}function Nt(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??[])}}var Pt=!1;function Ft(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=zt(e);if(n&&document.getElementById(n)){let{x:r,y:i}=E();setTimeout(()=>{let a=history.state;Pt=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Pt=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function It(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:E()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Lt(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 Rt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function zt(e){let t;if(B.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{S as a,Te as i,M as n,j as r,it as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,n,o as r,r as i,t as a}from"../nodes/2.CxkPY10S.js";export{e as ServiceError,a as TauriProblemError,t as connectEventStream,r as createHttpService,n as createTauriRemotes,i as createTauriService};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BfNK78ja.js","../chunks/D_inIiOK.js","../chunks/xihTtKlq.js","../chunks/Czmuk0Xq.js","../assets/0.DaFvPEiH.css","../nodes/1.
|
|
2
|
-
import{$ as e,A as t,Ct as n,H as r,L as i,U as a,W as o,_t as s,a as c,at as l,ft as u,ht as d,i as f,jt as p,lt as m,ot as h,q as g,r as _,st as v,tt as y,u as b,ut as x,vt as S,wt as C,z as w}from"../chunks/D_inIiOK.js";import{t as T}from"../chunks/uBIymjUX.js";import"../chunks/xihTtKlq.js";var E={},D=o(`<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>`),O=o(`<!> <!>`,1);function k(o,f){C(f,!0);let T=c(f,`components`,23,()=>[]),E=c(f,`data_0`,3,null),k=c(f,`data_1`,3,null);v(()=>f.stores.page.set(f.page)),h(()=>{f.stores,f.page,f.constructors,T(),f.form,E(),k(),f.stores.page.notify()});let A=s(!1),j=s(!1),M=s(null);_(()=>{let t=f.stores.page.subscribe(()=>{e(A)&&(d(j,!0),y().then(()=>{d(M,document.title||`untitled page`,!0)}))});return d(A,!0),t});let N=S(()=>f.constructors[1]);var P=O(),F=x(P),I=n=>{let i=S(()=>f.constructors[0]);var o=a(),s=x(o);t(s,()=>e(i),(n,i)=>{b(i(n,{get data(){return E()},get form(){return f.form},get params(){return f.page.params},children:(n,i)=>{var o=a(),s=x(o);t(s,()=>e(N),(e,t)=>{b(t(e,{get data(){return k()},get form(){return f.form},get params(){return f.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),r(n,o)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),r(n,o)},L=n=>{let i=S(()=>f.constructors[0]);var o=a(),s=x(o);t(s,()=>e(i),(e,t)=>{b(t(e,{get data(){return E()},get form(){return f.form},get params(){return f.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),r(n,o)};i(F,e=>{f.constructors[1]?e(I):e(L,-1)});var R=u(F,2),z=t=>{var n=D(),a=m(n),o=t=>{var n=g();l(()=>w(n,e(M))),r(t,n)};i(a,t=>{e(j)&&t(o)}),p(n),r(t,n)};i(R,t=>{e(A)&&t(z)}),r(o,P),n()}var A=f(k),j=[()=>T(()=>import(`../nodes/0.BfNK78ja.js`),__vite__mapDeps([0,1,2,3,4]),import.meta.url),()=>T(()=>import(`../nodes/1.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BfNK78ja.js","../chunks/D_inIiOK.js","../chunks/xihTtKlq.js","../chunks/Czmuk0Xq.js","../assets/0.DaFvPEiH.css","../nodes/1.aOMFgZ6r.js","../chunks/DXxXg_nY.js","../nodes/2.CxkPY10S.js","../chunks/uBIymjUX.js","../assets/2.Rwbdhuvh.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,A as t,Ct as n,H as r,L as i,U as a,W as o,_t as s,a as c,at as l,ft as u,ht as d,i as f,jt as p,lt as m,ot as h,q as g,r as _,st as v,tt as y,u as b,ut as x,vt as S,wt as C,z as w}from"../chunks/D_inIiOK.js";import{t as T}from"../chunks/uBIymjUX.js";import"../chunks/xihTtKlq.js";var E={},D=o(`<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>`),O=o(`<!> <!>`,1);function k(o,f){C(f,!0);let T=c(f,`components`,23,()=>[]),E=c(f,`data_0`,3,null),k=c(f,`data_1`,3,null);v(()=>f.stores.page.set(f.page)),h(()=>{f.stores,f.page,f.constructors,T(),f.form,E(),k(),f.stores.page.notify()});let A=s(!1),j=s(!1),M=s(null);_(()=>{let t=f.stores.page.subscribe(()=>{e(A)&&(d(j,!0),y().then(()=>{d(M,document.title||`untitled page`,!0)}))});return d(A,!0),t});let N=S(()=>f.constructors[1]);var P=O(),F=x(P),I=n=>{let i=S(()=>f.constructors[0]);var o=a(),s=x(o);t(s,()=>e(i),(n,i)=>{b(i(n,{get data(){return E()},get form(){return f.form},get params(){return f.page.params},children:(n,i)=>{var o=a(),s=x(o);t(s,()=>e(N),(e,t)=>{b(t(e,{get data(){return k()},get form(){return f.form},get params(){return f.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),r(n,o)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),r(n,o)},L=n=>{let i=S(()=>f.constructors[0]);var o=a(),s=x(o);t(s,()=>e(i),(e,t)=>{b(t(e,{get data(){return E()},get form(){return f.form},get params(){return f.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),r(n,o)};i(F,e=>{f.constructors[1]?e(I):e(L,-1)});var R=u(F,2),z=t=>{var n=D(),a=m(n),o=t=>{var n=g();l(()=>w(n,e(M))),r(t,n)};i(a,t=>{e(j)&&t(o)}),p(n),r(t,n)};i(R,t=>{e(A)&&t(z)}),r(o,P),n()}var A=f(k),j=[()=>T(()=>import(`../nodes/0.BfNK78ja.js`),__vite__mapDeps([0,1,2,3,4]),import.meta.url),()=>T(()=>import(`../nodes/1.aOMFgZ6r.js`),__vite__mapDeps([5,1,6,2]),import.meta.url),()=>T(()=>import(`../nodes/2.CxkPY10S.js`),__vite__mapDeps([7,1,6,8,2,3,9]),import.meta.url)],M=[],N={"/":[2]},P={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},F=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.decode])),I=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.encode])),L=!1,R=(e,t)=>F[e](t),z=()=>T(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{R as decode,F as decoders,N as dictionary,I as encoders,z as get_error_template,L as hash,P as hooks,E as matchers,j as nodes,A as root,M as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,t}from"../chunks/DXxXg_nY.js";export{e as load_css,t as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ct as e,H as t,W as n,at as r,dt as i,ft as a,ut as o,wt as s,z as c}from"../chunks/D_inIiOK.js";import{r as l}from"../chunks/
|
|
1
|
+
import{Ct as e,H as t,W as n,at as r,dt as i,ft as a,ut as o,wt as s,z as c}from"../chunks/D_inIiOK.js";import{r as l}from"../chunks/DXxXg_nY.js";import"../chunks/xihTtKlq.js";var u={get data(){return l.data},get error(){return l.error},get form(){return l.form},get params(){return l.params},get route(){return l.route},get state(){return l.state},get status(){return l.status},get url(){return l.url}},d=n(`<h1> </h1> <p> </p>`,1);function f(n,l){s(l,!0);var f=d(),p=o(f),m=i(p,!0),h=a(p,2),g=i(h,!0);r(()=>{c(m,u.status),c(g,u.error?.message)}),t(n,f),e()}export{f as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,A as t,At as n,B as r,C as i,Ct as a,D as o,E as s,F as c,Ft as l,G as u,H as d,I as f,J as p,K as m,L as h,M as g,Mt as _,N as v,Nt as y,Ot as b,P as x,Pt as S,Q as C,R as w,S as T,St as E,T as D,Tt as O,U as k,V as ee,W as A,X as te,Y as j,Z as M,_ as N,_t as P,a as F,at as I,b as ne,bt as re,ct as ie,d as ae,dt as L,f as oe,ft as R,g as se,h as ce,ht as z,it as le,j as B,jt as V,k as ue,kt as de,l as fe,lt as H,m as pe,n as me,nt as he,o as U,ot as ge,p as _e,pt as ve,q as W,r as ye,s as G,st as be,tt as xe,u as Se,ut as K,v as Ce,vt as q,w as we,wt as J,x as Te,xt as Ee,y as Y,yt as De,z as X}from"../chunks/D_inIiOK.js";import{a as Oe}from"../chunks/
|
|
1
|
+
import{$ as e,A as t,At as n,B as r,C as i,Ct as a,D as o,E as s,F as c,Ft as l,G as u,H as d,I as f,J as p,K as m,L as h,M as g,Mt as _,N as v,Nt as y,Ot as b,P as x,Pt as S,Q as C,R as w,S as T,St as E,T as D,Tt as O,U as k,V as ee,W as A,X as te,Y as j,Z as M,_ as N,_t as P,a as F,at as I,b as ne,bt as re,ct as ie,d as ae,dt as L,f as oe,ft as R,g as se,h as ce,ht as z,it as le,j as B,jt as V,k as ue,kt as de,l as fe,lt as H,m as pe,n as me,nt as he,o as U,ot as ge,p as _e,pt as ve,q as W,r as ye,s as G,st as be,tt as xe,u as Se,ut as K,v as Ce,vt as q,w as we,wt as J,x as Te,xt as Ee,y as Y,yt as De,z as X}from"../chunks/D_inIiOK.js";import{a as Oe}from"../chunks/DXxXg_nY.js";import{t as ke}from"../chunks/uBIymjUX.js";import"../chunks/xihTtKlq.js";import{a as Ae,i as je,n as Me,r as Ne}from"../chunks/Czmuk0Xq.js";var Pe=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Fe=/\n/g,Ie=/^\s*/,Le=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Re=/^:\s*/,ze=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Be=/^[;\s]*/,Ve=/^\s+|\s+$/g,He=`
|
|
2
2
|
`,Ue=`/`,We=`*`,Ge=``,Ke=`comment`,qe=`declaration`;function Je(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(Fe);t&&(n+=t.length);var i=e.lastIndexOf(He);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(Ie)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(Ue==e.charAt(0)&&We==e.charAt(1)){for(var n=2;Ge!=e.charAt(n)&&(We!=e.charAt(n)||Ue!=e.charAt(n+1));)++n;if(n+=2,Ge===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Ke,comment:o})}}function f(){var e=a(),t=c(Le);if(t){if(d(),!c(Re))return s(`property missing ':'`);var n=c(ze),r=e({type:qe,property:Ye(t[0].replace(Pe,Ge)),value:n?Ye(n[0].replace(Pe,Ge)):Ge});return c(Be),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function Ye(e){return e?e.replace(Ve,Ge):Ge}function Xe(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Je(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n||={},n[r]=a)}),n}var Ze=new je(`(prefers-reduced-motion: reduce)`),Qe=function(e,t){return Qe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Qe(e,t)};function $e(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Qe(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var et=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),tt=new(function(){function e(){this.browser=new et,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(tt.wxa=!0,tt.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?tt.worker=!0:!tt.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(tt.node=!0,tt.svgSupported=!0):nt(navigator.userAgent,tt);function nt(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var rt=`12px sans-serif`,it=20,at=100,ot=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function st(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-it)/at}return t}var ct=st(ot),lt={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=lt.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=ct[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}},ut=Ft([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),dt=Ft([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),ft=Object.prototype.toString,pt=Array.prototype,mt=pt.forEach,ht=pt.filter,gt=pt.slice,_t=pt.map,vt=function(){}.constructor,yt=vt?vt.prototype:null,bt=`__proto__`,xt=2311,St=2**53-1;function Ct(){return xt>=St&&(xt=0),xt++}function wt(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function Tt(e){if(typeof e!=`object`||!e)return e;var t=e,n=ft.call(e);if(n===`[object Array]`){if(!sn(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=Tt(e[r])}}else if(dt[n]){if(!sn(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!ut[n]&&!sn(e)&&!Yt(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==bt&&(t[o]=Tt(e[o]));return t}function Et(e,t,n){if(!Kt(t)||!Kt(e))return n?Tt(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==bt){var i=e[r],a=t[r];Kt(a)&&Kt(i)&&!Vt(a)&&!Vt(i)&&!Yt(a)&&!Yt(i)&&!qt(a)&&!qt(i)&&!sn(a)&&!sn(i)?Et(i,a,n):(n||!(r in e))&&(e[r]=Tt(t[r]))}return e}function Dt(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==bt&&(e[n]=t[n]);return e}function Ot(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function kt(e,t,n){for(var r=Lt(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}lt.createCanvas;function At(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function jt(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function Mt(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else kt(e,t,n)}function Nt(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function Z(e,t,n){if(e&&t){if(e.forEach&&e.forEach===mt)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function Pt(e,t,n){if(!e)return[];if(!t)return en(e);if(e.map&&e.map===_t)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function Ft(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function It(e,t,n){if(!e)return[];if(!t)return en(e);if(e.filter&&e.filter===ht)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function Lt(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function Rt(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(gt.call(arguments)))}}var zt=yt&&Ht(yt.bind)?yt.call.bind(yt.bind):Rt;function Bt(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(gt.call(arguments)))}}function Vt(e){return Array.isArray?Array.isArray(e):ft.call(e)===`[object Array]`}function Ht(e){return typeof e==`function`}function Ut(e){return typeof e==`string`}function Wt(e){return ft.call(e)===`[object String]`}function Gt(e){return typeof e==`number`}function Kt(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function qt(e){return!!ut[ft.call(e)]}function Jt(e){return!!dt[ft.call(e)]}function Yt(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function Xt(e){return e.colorStops!=null}function Zt(e){return e!==e}function Qt(e,t){return e??t}function $t(e,t,n){return e??t??n}function en(e){var t=[...arguments].slice(1);return gt.apply(e,t)}function tn(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function nn(e,t){if(!e)throw Error(t)}function rn(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var an=`__ec_primitive__`;function on(e){e[an]=!0}function sn(e){return e[an]}var cn=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return Lt(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),ln=typeof Map==`function`;function un(){return ln?new Map:new cn}var dn=function(){function e(t){var n=Vt(t);this.data=un();var r=this;t instanceof e?t.each(i):t&&Z(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return ln?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function fn(e){return new dn(e)}function pn(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function mn(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&Dt(n,t),n}function hn(e,t){return e.hasOwnProperty(t)}function gn(){}var _n=180/Math.PI,vn=function(e,t){return vn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},vn(e,t)};function yn(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);vn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function bn(e,t){return e??=0,t??=0,[e,t]}function xn(e,t){return e[0]=t[0],e[1]=t[1],e}function Sn(e){return[e[0],e[1]]}function Cn(e,t,n){return e[0]=t,e[1]=n,e}function wn(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Tn(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function En(e){return Math.sqrt(Dn(e))}function Dn(e){return e[0]*e[0]+e[1]*e[1]}function On(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function kn(e,t){var n=En(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function An(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var jn=An;function Mn(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Nn=Mn;function Pn(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function Fn(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function In(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Ln(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Rn=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),zn=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Rn(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new Rn(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new Rn(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new Rn(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Rn(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new Rn(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Bn=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t)}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1))}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),Vn=Math.log(2);function Hn(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/Vn);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*Hn(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function Un(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=Hn(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*Hn(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}var Wn=`___zrEVENTSAVED`;function Gn(e,t,n,r,i){if(t.getBoundingClientRect&&tt.domSupported&&!Jn(t)){var a=t[Wn]||(t[Wn]={}),o=qn(Kn(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function Kn(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){Z(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function qn(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Un(s,o):Un(o,s))}function Jn(e){return e.nodeName.toUpperCase()===`CANVAS`}var eee=/([&<>"'])/g,Yn={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Xn(e){return e==null?``:(e+``).replace(eee,function(e,t){return Yn[t]})}var Zn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Qn=[],tee=tt.browser.firefox&&+tt.browser.version.split(`.`)[0]<39;function $n(e,t,n,r){return n||={},r?er(e,t,n):tee&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?er(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function er(e,t,n){if(tt.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Jn(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Gn(Qn,e,r,i)){n.zrX=Qn[0],n.zrY=Qn[1];return}}n.zrX=n.zrY=0}function tr(e){return e||window.event}function nr(e,t,n){if(t=tr(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&$n(e,i,t,n)}else{$n(e,t,t,n);var a=nee(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Zn.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function nee(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function ree(e,t,n,r){e.addEventListener(t,n,r)}function iee(e,t,n,r){e.removeEventListener(t,n,r)}var rr=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function ir(e){return e.which===2||e.which===3}var ar=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=$n(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in cr)if(cr.hasOwnProperty(t)){var n=cr[t](this._track,e);if(n)return n}},e}();function or(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function sr(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var cr={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=or(r)/or(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=sr(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function lr(){return[1,0,0,1,0,0]}function ur(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function dr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function fr(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function pr(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function mr(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function hr(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function gr(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}var _r=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),vr=Math.min,yr=Math.max,br=Math.abs,xr=[`x`,`y`],aee=[`width`,`height`],Sr=new _r,Cr=new _r,wr=new _r,Tr=new _r,Er=Ir(),Dr=Er.minTv,Or=Er.maxTv,kr=[0,0],Ar=function(){function e(e,t,n,r){Mr(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=vr(e.x,this.x),n=vr(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?yr(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?yr(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return oee(lr(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&_r.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=Mr(lee,t.x,t.y,t.width,t.height)),n instanceof e||(n=Mr(uee,n.x,n.y,n.width,n.height));var s=!!r;Er.reset(i,s);var c=Er.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(kr[0]=1/0,kr[1]=0,Fr(l,u,p,m,0,s,a,o),Fr(d,f,h,g,1,s,a,o),s&&_r.copy(r,_?Er.useDir?Er.dirMinTv:Dr:Or)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){Nr(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&Nr(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Sr.x=wr.x=t.x,Sr.y=Tr.y=t.y,Cr.x=Tr.x=t.x+t.width,Cr.y=wr.y=t.y+t.height,Sr.transform(n),Tr.transform(n),Cr.transform(n),wr.transform(n),e.x=vr(Sr.x,Cr.x,wr.x,Tr.x),e.y=vr(Sr.y,Cr.y,wr.y,Tr.y);var s=yr(Sr.x,Cr.x,wr.x,Tr.x),c=yr(Sr.y,Cr.y,wr.y,Tr.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=ur(e||[]),pr(e,e,Cn(Pr,-t.x,-t.y)),hr(e,e,Cn(Pr,r,i)),pr(e,e,Cn(Pr,n.x,n.y)),e},e}(),jr=Ar.create,Mr=Ar.set,Nr=Ar.copy,oee=Ar.calculateTransform,see=Ar.applyTransform,cee=Ar.contain,lee=new Ar(0,0,0,0),uee=new Ar(0,0,0,0),Pr=[];function Fr(e,t,n,r,i,a,o,s){var c=br(t-n),l=br(r-e),u=vr(c,l),d=xr[i],f=xr[1-i],p=aee[i];t<n||r<e?c<l?(a&&(Or[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(Or[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=yr(e,n),o[p]=vr(t,r)-o[d]),a&&(u<kr[0]||Er.useDir)&&(kr[0]=vr(u,kr[0]),(c<l||!Er.bidirectional)&&(Dr[d]=c,Dr[f]=0,Er.useDir&&Er.calcDirMTV()),(c>=l||!Er.bidirectional)&&(Dr[d]=-l,Dr[f]=0,Er.useDir&&Er.calcDirMTV())))}function Ir(){var e=0,t=new _r,n=new _r,r={minTv:new _r,maxTv:new _r,useDir:!1,dirMinTv:new _r,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=yr(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n)}};function i(e){return br(e)<1e-10}return r}var Lr=`silent`;function Rr(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:zr}}function zr(){rr(this.event)}var Br=function(e){yn(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Bn),Vr=function(){function e(e,t){this.x=e,this.y=t}return e}(),dee=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],Hr=new Ar(0,0,0,0),Ur=function(e){yn(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new Vr(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new Br,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new zn(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(Z(dee,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=Gr(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new Vr(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new Vr(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=Rr(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new Vr(e,t);if(Wr(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Ar(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(Hr.copy(u.getBoundingRect()),u.transform&&Hr.applyTransform(u.transform),Hr.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(Wr(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new ar;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new Vr;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Bn);Z([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){Ur.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=Gr(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||jn(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function fee(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||Lr}return!1}function Wr(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=fee(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Lr)){t.target=o;break}}}function Gr(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var Kr=32,qr=7;function pee(e){for(var t=0;e>=Kr;)t|=e&1,e>>=1;return e+t}function Jr(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;mee(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function mee(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Yr(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function Xr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Zr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function hee(e,t){var n=qr,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=Zr(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Xr(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0){for(c=0;c<i;c++)e[d+c]=o[l+c];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=Zr(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=Xr(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=qr||m>=qr);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0){for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];return}if(s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-Zr(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-Xr(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=qr||g>=qr);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c]}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function Qr(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<Kr){a=Jr(e,n,r,t),Yr(e,n,r,n+a,t);return}var o=hee(e,t),s=pee(i);do{if(a=Jr(e,n,r,t),a<s){var c=i;c>s&&(c=s),Yr(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var $r=!1;function ei(){$r||($r=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function ti(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var ni=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=ti}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Qr(n,ti)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(ei(),p.z=0),isNaN(p.z2)&&(ei(),p.z2=0),isNaN(p.zlevel)&&(ei(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=At(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),ri=tt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},ii={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-ii.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?ii.bounceIn(e*2)*.5:ii.bounceOut(e*2-1)*.5+.5}},ai=Math.pow,oi=Math.sqrt,si=1e-8,ci=1e-4,li=oi(3),ui=1/3,di=bn(),fi=bn(),pi=bn();function mi(e){return e>-si&&e<si}function hi(e){return e>si||e<-si}function gi(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function _i(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function vi(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(mi(u)&&mi(d)){if(mi(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(mi(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=oi(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-ai(-y,ui):ai(y,ui),b=b<0?-ai(-b,ui):ai(b,ui);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*oi(u*u*u)),S=Math.acos(x)/3,C=oi(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+li*Math.sin(S)))/(3*o),T=(-s+C*(w-li*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function yi(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(mi(o)){if(hi(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(mi(u))i[0]=-a/(2*o);else if(u>0){var d=oi(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function bi(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function xi(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;di[0]=c,di[1]=l;for(var v=0;v<1;v+=.05)fi[0]=gi(e,n,i,o,v),fi[1]=gi(t,r,a,s,v),g=Nn(di,fi),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<ci);y++)m=d-f,h=d+f,fi[0]=gi(e,n,i,o,m),fi[1]=gi(t,r,a,s,m),g=Nn(fi,di),m>=0&&g<p?(d=m,p=g):(pi[0]=gi(e,n,i,o,h),pi[1]=gi(t,r,a,s,h),_=Nn(pi,di),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=gi(e,n,i,o,d),u[1]=gi(t,r,a,s,d)),oi(p)}function gee(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=gi(e,n,i,o,m),g=gi(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function Si(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function Ci(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function wi(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(mi(a)){if(hi(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(mi(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=oi(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Ti(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Ei(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Di(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;di[0]=o,di[1]=s;for(var f=0;f<1;f+=.05){fi[0]=Si(e,n,i,f),fi[1]=Si(t,r,a,f);var p=Nn(di,fi);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<ci);m++){var h=l-u,g=l+u;fi[0]=Si(e,n,i,h),fi[1]=Si(t,r,a,h);var p=Nn(fi,di);if(h>=0&&p<d)l=h,d=p;else{pi[0]=Si(e,n,i,g),pi[1]=Si(t,r,a,g);var _=Nn(pi,di);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=Si(e,n,i,l),c[1]=Si(t,r,a,l)),oi(d)}function Oi(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=Si(e,n,i,f),m=Si(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var ki=/cubic-bezier\(([0-9,\.e ]+)\)/;function Ai(e){var t=e&&ki.exec(e);if(t){var n=t[1].split(`,`),r=+rn(n[0]),i=+rn(n[1]),a=+rn(n[2]),o=+rn(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:vi(0,r,a,1,e,s)&&gi(0,i,o,1,s[0])}}}var ji=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||gn,this.ondestroy=e.ondestroy||gn,this.onrestart=e.onrestart||gn,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Ht(e)?e:ii[e]||Ai(e)},e}(),Mi=function(){function e(e){this.value=e}return e}(),Ni=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Mi(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Pi=function(){function e(e){this._list=new Ni,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Mi(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Fi={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ii(e){return e=Math.round(e),e<0?0:e>255?255:e}function Li(e){return e=Math.round(e),e<0?0:e>360?360:e}function Ri(e){return e<0?0:e>1?1:e}function zi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ii(parseFloat(t)/100*255):Ii(parseInt(t,10))}function Bi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ri(parseFloat(t)/100):Ri(parseFloat(t))}function Vi(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Hi(e,t,n){return e+(t-e)*n}function Ui(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Wi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Gi=new Pi(20),Ki=null;function qi(e,t){Ki&&Wi(Ki,t),Ki=Gi.put(e,Ki||t.slice())}function Ji(e,t){if(e){t||=[];var n=Gi.get(e);if(n)return Wi(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Fi)return Wi(t,Fi[r]),qi(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Ui(t,0,0,0,1);return}return Ui(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),qi(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Ui(t,0,0,0,1);return}return Ui(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),qi(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Ui(t,+l[0],+l[1],+l[2],1):Ui(t,0,0,0,1);u=Bi(l.pop());case`rgb`:if(l.length>=3)return Ui(t,zi(l[0]),zi(l[1]),zi(l[2]),l.length===3?u:Bi(l[3])),qi(e,t),t;Ui(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Ui(t,0,0,0,1);return}return l[3]=Bi(l[3]),Yi(l,t),qi(e,t),t;case`hsl`:if(l.length!==3){Ui(t,0,0,0,1);return}return Yi(l,t),qi(e,t),t;default:return}}Ui(t,0,0,0,1)}}function Yi(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Bi(e[1]),i=Bi(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Ui(t,Ii(Vi(o,a,n+1/3)*255),Ii(Vi(o,a,n)*255),Ii(Vi(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function _ee(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Xi(e,t){var n=Ji(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return ea(n,n.length===4?`rgba`:`rgb`)}}function Zi(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Ii(Hi(o[0],s[0],c)),n[1]=Ii(Hi(o[1],s[1],c)),n[2]=Ii(Hi(o[2],s[2],c)),n[3]=Ri(Hi(o[3],s[3],c)),n}}function Qi(e,t,n,r){var i=Ji(e);if(e)return i=_ee(i),t!=null&&(i[0]=Li(Ht(t)?t(i[0]):t)),n!=null&&(i[1]=Bi(Ht(n)?n(i[1]):n)),r!=null&&(i[2]=Bi(Ht(r)?r(i[2]):r)),ea(Yi(i),`rgba`)}function $i(e,t){var n=Ji(e);if(n&&t!=null)return n[3]=Ri(t),ea(n,`rgba`)}function ea(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function ta(e,t){var n=Ji(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var na=new Pi(100);function ra(e){if(Ut(e)){var t=na.get(e);return t||(t=Xi(e,-.1),na.put(e,t)),t}if(Xt(e)){var n=Dt({},e);return n.colorStops=Pt(e.colorStops,function(e){return{offset:e.offset,color:Xi(e.color,-.1)}}),n}return e}var ia=Math.round;function aa(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Ji(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var oa=1e-4;function sa(e){return e<oa&&e>-oa}function ca(e){return ia(e*1e3)/1e3}function la(e){return ia(e*1e4)/1e4}function ua(e){return`matrix(`+ca(e[0])+`,`+ca(e[1])+`,`+ca(e[2])+`,`+ca(e[3])+`,`+la(e[4])+`,`+la(e[5])+`)`}var da={left:`start`,right:`end`,center:`middle`,middle:`middle`};function fa(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function pa(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function ma(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function ha(e){return e&&!!e.image}function ga(e){return e&&!!e.svgElement}function _a(e){return ha(e)||ga(e)}function va(e){return e.type===`linear`}function ya(e){return e.type===`radial`}function ba(e){return e&&(e.type===`linear`||e.type===`radial`)}function xa(e){return`url(#`+e+`)`}function Sa(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Ca(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*_n,i=Qt(e.scaleX,1),a=Qt(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+ia(o*_n)+`deg, `+ia(s*_n)+`deg)`),c.join(` `)}var vee=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),wa=Array.prototype.slice;function Ta(e,t,n){return(t-e)*n+e}function Ea(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Ta(t[a],n[a],r);return e}function yee(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=Ta(t[o][s],n[o][s],r)}return e}function Da(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function Oa(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function bee(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function xee(e,t,n){var r=e,i=t;if(r.push&&i.push){var a=r.length,o=i.length;if(a!==o){if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:wa.call(i[s]))}for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function ka(e){if(Nt(e)){var t=e.length;if(Nt(e[0])){for(var n=[],r=0;r<t;r++)n.push(wa.call(e[r]));return n}return wa.call(e)}return e}function Aa(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function See(e){return Nt(e&&e[0])?2:1}var ja=0,Ma=1,Na=2,Pa=3,Fa=4,Ia=5,La=6;function Ra(e){return e===Fa||e===Ia}function za(e){return e===Ma||e===Na}var Ba=[0,0,0,0],Cee=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=La,s=t;if(Nt(t)){var c=See(t);o=c,(c===1&&!Gt(t[0])||c===2&&!Gt(t[0][0]))&&(a=!0)}else if(Gt(t)&&!Zt(t))o=ja;else if(Ut(t)){if(!isNaN(+t))o=ja;else{var l=Ji(t);l&&(s=l,o=Pa)}}else if(Xt(t)){var u=Dt({},s);u.colorStops=Pt(t.colorStops,function(e){return{offset:e.offset,color:Ji(e.color)}}),va(t)?o=Fa:ya(t)&&(o=Ia),s=u}i===0?this.valType=o:(o!==this.valType||o===La)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Ht(n)?n:ii[n]||Ai(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=za(r),c=Ra(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?xee(d,f,r):c&&bee(d.colorStops,f.colorStops))}if(!o&&r!==Ia&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===ja?n[l].additiveValue=n[l].value-p:r===Pa?n[l].additiveValue=Da([],n[l].value,p,-1):za(r)&&(n[l].additiveValue=r===Ma?Da([],n[l].value,p,-1):Oa([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===Pa,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Ba:e[s];if((za(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(za(i))i===Ma?Ea(g,f[r],p[r],h):yee(g,f[r],p[r],h);else if(Ra(i)){var _=f[r],v=p[r],y=i===Fa;e[s]={type:y?`linear`:`radial`,x:Ta(_.x,v.x,h),y:Ta(_.y,v.y,h),colorStops:Pt(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Ta(e.offset,n.offset,h),color:Aa(Ea([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Ta(_.x2,v.x2,h),e[s].y2=Ta(_.y2,v.y2,h)):e[s].r=Ta(_.r,v.r,h)}else if(c)Ea(g,f[r],p[r],h),n||(e[s]=Aa(g));else{var b=Ta(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===ja?e[n]=e[n]+r:t===Pa?(Ji(e[n],Ba),Da(Ba,Ba,r,1),e[n]=Aa(Ba)):t===Ma?Da(e[n],e[n],r,1):t===Na&&Oa(e[n],e[n],r,1)},e}(),Va=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){wt(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Lt(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new Cee(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===Pa&&c&&(c=Aa(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,ka(c),r),this._trackKeys.push(o)}s.addKeyframe(e,ka(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate()){if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}}if(n.length||this._force){var d=new ji({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return Pt(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(a&&!a.isFinished()){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=ka(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=Lt(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function Ha(){return new Date().getTime()}var Ua=function(e){yn(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=Ha()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(ri(t),!e._paused&&e.update())}ri(t)},t.prototype.start=function(){this._running||(this._time=Ha(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=Ha(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=Ha()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Va(e,t.loop);return this.addAnimator(n),n},t}(Bn),Wa=300,Ga=tt.domSupported,Ka=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:Pt(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),qa={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Ja=!1;function Ya(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Xa(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Za(e){e&&(e.zrByTouch=!0)}function Qa(e,t){return nr(e.dom,new eo(e,t),!0)}function $a(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var eo=function(){function e(e,t){this.stopPropagation=gn,this.stopImmediatePropagation=gn,this.preventDefault=gn,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),to={mousedown:function(e){e=nr(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=nr(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=nr(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=nr(this.dom,e);var t=e.toElement||e.relatedTarget;$a(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Ja=!0,e=nr(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Ja||(e=nr(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=nr(this.dom,e),Za(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),to.mousemove.call(this,e),to.mousedown.call(this,e)},touchmove:function(e){e=nr(this.dom,e),Za(e),this.handler.processGesture(e,`change`),to.mousemove.call(this,e)},touchend:function(e){e=nr(this.dom,e),Za(e),this.handler.processGesture(e,`end`),to.mouseup.call(this,e),+new Date-this.__lastTouchMoment<Wa&&to.click.call(this,e)},pointerdown:function(e){to.mousedown.call(this,e)},pointermove:function(e){Ya(e)||to.mousemove.call(this,e)},pointerup:function(e){to.mouseup.call(this,e)},pointerout:function(e){Ya(e)||to.mouseout.call(this,e)}};Z([`click`,`dblclick`,`contextmenu`],function(e){to[e]=function(t){t=nr(this.dom,t),this.trigger(e,t)}});var no={pointermove:function(e){Ya(e)||no.mousemove.call(this,e)},pointerup:function(e){no.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function ro(e,t){var n=t.domHandlers;tt.pointerEventsSupported?Z(Ka.pointer,function(r){ao(t,r,function(t){n[r].call(e,t)})}):(tt.touchEventsSupported&&Z(Ka.touch,function(r){ao(t,r,function(i){n[r].call(e,i),Xa(t)})}),Z(Ka.mouse,function(r){ao(t,r,function(i){i=tr(i),t.touching||n[r].call(e,i)})}))}function io(e,t){tt.pointerEventsSupported?Z(qa.pointer,n):tt.touchEventsSupported||Z(qa.mouse,n);function n(n){function r(r){r=tr(r),$a(e,r.target)||(r=Qa(e,r),t.domHandlers[n].call(e,r))}ao(t,n,r,{capture:!0})}}function ao(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,ree(e.domTarget,t,n,r)}function oo(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&iee(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var so=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),co=function(e){yn(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new so(t,to),Ga&&(r._globalHandlerScope=new so(document,no)),ro(r,r._localHandlerScope),r}return t.prototype.dispose=function(){oo(this._localHandlerScope),Ga&&oo(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Ga&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?io(this,t):oo(t)}},t}(Bn),lo=1;tt.hasGlobalWindow&&(lo=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var uo=lo,fo=.4,po=`#333`,mo=`#ccc`,ho=`#eee`,go=ur,_o=5e-5;function vo(e){return e>_o||e<-_o}var yo=[],bo=[],xo=lr(),So=Math.abs,Co=function(){function e(){}return e.prototype.getLocalTransform=function(e){return wo(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return vo(this.rotation)||vo(this.x)||vo(this.y)||vo(this.scaleX-1)||vo(this.scaleY-1)||vo(this.skewX)||vo(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(go(n),this.invTransform=null);return}n||=lr(),t?this.getLocalTransform(n):go(n),e&&(t?fr(n,e,n):dr(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||lr(),gr(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(yo);var n=yo[0]<0?-1:1,r=yo[1]<0?-1:1,i=((yo[0]-n)*t+n)/yo[0]||0,a=((yo[1]-r)*t+r)/yo[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||lr(),fr(bo,e.invTransform,t),t=bo);var n=this.originX,r=this.originY;(n||r)&&(xo[4]=n,xo[5]=r,fr(bo,t,xo),bo[4]-=n,bo[5]-=r,t=bo),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Fn(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Fn(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&So(e[0]-1)>1e-10&&So(e[3]-1)>1e-10?Math.sqrt(So(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Do(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&mr(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),wo=Co.getLocalTransform;function To(){return new Co}var Eo=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Do(e,t){return Ot(e,t,Eo)}function Oo(e){ko||=new Pi(100),e||=`12px sans-serif`;var t=ko.get(e);return t||(t={font:e,strWidthCache:new Pi(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:lt.measureText(`国`,e).width,asciiCharWidth:lt.measureText(`a`,e).width},ko.put(e,t)),t}var ko;function wee(e){if(!(Ao>=jo)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=lt.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?Ao=jo:i>2&&Ao++,t}}var Ao=0,jo=5;function Mo(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=wee(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function No(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=lt.measureText(t,e.font).width,n.put(t,r)),r}function Po(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function Fo(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function Io(e){return Oo(e).stWideCharWidth}function Lo(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function Ro(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=Lo(r[0],n.width),l+=Lo(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var zo=`__zr_normal__`,Bo=Eo.concat([`ignore`]),Tee=Ft(Eo,function(e,t){return e[t]=!0,e},{ignore:!1}),Vo={},Ho=new Ar(0,0,0,0),Uo=[],Wo=function(){function e(e){this.id=Ct(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=Ho,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(Vo,n,d):Ro(Vo,n,d),i.x=Vo.x,i.y=Vo.y,a=Vo.align,o=Vo.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=Lo(f[0],d.width),m=Lo(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new Ar(0,0,0,0);i.getLocalTransform(Uo),gr(Uo,Uo),Ar.copy(_,d),_.applyTransform(Uo)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?mo:po},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Ji(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,ea(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},Dt(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(Kt(e))for(var n=Lt(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Bo)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(zo,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===zo;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(At(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){wt(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=Qo(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,es(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=this._textContent,f=Qo(this,d,u,n);f&&!this.__inHover&&(this.__inHover=f);var p=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(`,`),p,this._normalState,!1,es(this,t,m),m);var h=this._textGuide;d&&d.useStates(e,t,!!f),h&&h.useStates(e,t,!!f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=At(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=At(r,e),a=At(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];Dt(t,i),i.textConfig&&(n||={},Dt(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){if(this.__inHover!==1){var o=!(t&&r);t&&t.textConfig?(this.textConfig=Dt({},r?this.textConfig:n.textConfig),Dt(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Bo.length;l++){var u=Bo[l],d=i&&Tee[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)}},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Co,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},Dt(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=new Va(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=At(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){Go(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){Go(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=Go(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=0,t.__dirty=1;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){if(!this[n]){var e=this[n]=[];a(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(n(`position`,`_legacyPos`,`x`,`y`),n(`scale`,`_legacyScale`,`scaleX`,`scaleY`),n(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();Mt(Wo,Bn),Mt(Wo,Co);function Go(e,t,n,r,i){n||={};var a=[];Zo(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function Ko(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function qo(e){return Nt(e[0])}function Jo(e,t,n){if(Nt(t[n])){if(Nt(e[n])||(e[n]=[]),Jt(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),Ko(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(qo(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?Ko(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else Ko(a,i,o);a.length=i.length}}else e[n]=t[n]}function Yo(e,t){return e===t||Nt(e)&&Nt(t)&&Xo(e,t)}function Xo(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Zo(e,t,n,r,i,a,o,s){for(var c=Lt(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!Kt(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_])){if(Kt(v)&&!Nt(v)&&!Xt(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}Zo(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_)}else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=At(m,x);m.splice(S,1)}}if(i.force||(h=It(h,function(e){return!Yo(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=ka(n[_]),Jo(n,r,_)}}var x=new Va(n,!1,!1,d?It(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}function Qo(e,t,n,r){return!(n&&n.hoverLayer||r)||$o(e)||t&&$o(t)?0:1}function $o(e){return e.type===`text`||e.type===`tspan`}function es(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var ts=function(e){yn(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=At(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=At(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new Ar(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(Ar.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(Wo);ts.prototype.type=`group`;var ns={},rs={};function is(e){delete rs[e]}function as(e){if(!e)return!1;if(typeof e==`string`)return ta(e,1)<fo;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=ta(t[i].color,1);return n/=r,n<fo}return!1}var os=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new ni,a=n.renderer||`canvas`;ns[a]||(a=Lt(ns)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new ns[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!tt.node&&!tt.worker&&!s?new co(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?tt.touchEventsSupported:!!l,d=44,f;u&&(f=Qt(n.pointerSize,d)),this.handler=new Ur(i,o,c,o.root,f),this.animation=new Ua({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=as(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=Ha(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=Ha();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof ts&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,is(this.id))},e}();function ss(e,t){var n=new os(Ct(),e,t);return rs[n.id]=n,n}function cs(e,t){ns[e]=t}var ls;function us(e){if(typeof ls==`function`)return ls(e)}function ds(e){ls=e}var fs=1e-4,ps=20;function ms(e){return e.replace(/^\s+|\s+$/g,``)}var hs=Math.min,gs=Math.max,_s=Math.abs,vs=Math.round,ys=Math.pow,bs=Math.random;function xs(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var Ss=Cs;function Cs(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return ws(e,t,n)}function ws(e,t,n){return Ut(e)?Ts(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Ts(e){return!!ms(e).match(/%$/)}function Es(e,t,n){return isNaN(t)?n?``+e:+e:(t=hs(gs(0,t),ps),e=(+e).toFixed(t),n?e:+e)}function Ds(e){return e.sort(function(e,t){return e-t}),e}function Os(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(vs(e*t)/t===e)return n}return ks(e)}function ks(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return gs(0,(a<0?0:i-1-a)-r)}function As(e,t){var n=gs(Os(e),Os(t)),r=e+t;return n>ps?r:Es(r,n)}var js=ys(2,53)-1;function Ms(e){return e>-fs&&e<fs}var Ns=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ps(e){if(e instanceof Date)return e;if(Ut(e)){var t=Ns.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return e==null?new Date(NaN):new Date(vs(e))}function Fs(e){var t=parseFloat(e);return t==e&&(t!==0||!Ut(e)||e.indexOf(`x`)<=0)?t:NaN}function Is(){return vs(bs()*9)}function Ls(e,t){return t===0?e:Ls(t,e%t)}function Rs(e,t){return e==null?t:t==null?e:e*t/Ls(e,t)}function zs(e){return e!=null&&isFinite(e)}var Eee=`[ECharts] `,Bs={},Dee=typeof console<`u`&&console.warn&&console.log;function Oee(e,t,n){if(Dee){if(n){if(Bs[t])return;Bs[t]=!0}console[e](Eee+t)}}function Vs(e,t){Oee(`error`,e,t)}function Hs(e){throw Error(e)}function Us(e,t,n){return(t-e)*n+e}var Ws=`series\0`,kee=`\0_ec_\0`;function Gs(e){return e instanceof Array?e:e==null?[]:[e]}function Ks(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var qs=`fontStyle.fontWeight.fontSize.fontFamily.rich.tag.color.textBorderColor.textBorderWidth.width.height.lineHeight.align.verticalAlign.baseline.shadowColor.shadowBlur.shadowOffsetX.shadowOffsetY.textShadowColor.textShadowBlur.textShadowOffsetX.textShadowOffsetY.backgroundColor.borderColor.borderWidth.borderRadius.padding`.split(`.`);function Js(e){return Kt(e)&&!Vt(e)&&!(e instanceof Date)?e.value:e}function Aee(e){return Kt(e)&&!(e instanceof Array)}function jee(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=fn();Z(t,function(e,n){if(!Kt(e)){t[n]=null;return}});var s=Mee(e,o,n);return(r||i)&&Nee(s,e,o,t),r&&Pee(s,t),r||i?Fee(s,t,i):a&&Iee(s,t),Lee(s),s}function Mee(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||$s(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function Nee(e,t,n,r){Z(r,function(i,a){if(i&&i.id!=null){var o=Xs(i.id),s=n.get(o);if(s!=null){var c=e[s];nn(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function Pee(e,t){Z(t,function(n,r){if(n&&n.name!=null)for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!$s(n)&&!$s(a)&&Ys(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function Fee(e,t,n){Z(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||$s(r.existing)||r.existing&&t.id!=null&&!Ys(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function Iee(e,t){Z(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function Lee(e){var t=fn();Z(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),Z(e,function(e){var n=e.newOption;nn(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),Z(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(Kt(i)){if(a.name=i.name==null?r?r.name:Ws+n:Xs(i.name),r)a.id=Xs(r.id);else if(i.id!=null)a.id=Xs(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+o++;while(t.get(a.id))}t.set(a.id,e)}})}function Ys(e,t,n){var r=Zs(t[e],null),i=Zs(n[e],null);return r!=null&&i!=null&&r===i}function Xs(e){return Zs(e,``)}function Zs(e,t){return e==null?t:Ut(e)?e:Gt(e)||Wt(e)?e+``:t}function Qs(e){var t=e.name;return!!(t&&t.indexOf(Ws))}function $s(e){return e&&e.id!=null&&Xs(e.id).indexOf(kee)===0}function Ree(e,t,n){Z(e,function(e){var r=e.newOption;Kt(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=zee(t,r,e.existing,n))})}function zee(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function ec(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return Vt(t.dataIndex)?Pt(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return Vt(t.name)?Pt(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function tc(){var e=`__ec_inner_`+Bee++;return function(t){return t[e]||(t[e]={})}}var Bee=Is();function nc(e,t,n){var r=rc(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=ac(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function rc(e,t){var n;if(Ut(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=fn(),a={},o=!1;return Z(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`){a[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&At(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var ic={useDefault:!0,enableAll:!1,enableNone:!1};function ac(e,t,n,r){r||=ic;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;i=-1}return i===`all`&&(i=r.enableAll?a=o=null:-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function Vee(e,t,n){var r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];var i={mainType:t,query:r};return n&&(i.subType=n),i}function oc(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Hee(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function Uee(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(Gt(r)){var o=Us(n||0,r,i);return Es(o,a?Math.max(Os(n||0),Os(r)):t)}if(Ut(r))return i<1?n:r;for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=Us(p,m,i);s[d]=Es(o,a?Math.max(Os(p),Os(m)):t)}}return s}(function(){function e(){}return e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r||=1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function sc(){return[1/0,-1/0]}function cc(){var e=`__ec_once_`+Wee++;return function(t,n){hn(t,e)||(t[e]=1,n())}}var Wee=Is();function Gee(e,t,n){var r=fn(),i=0;Z(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Kee(e,t){return Qt(t,!0)?e.seriesIndex+2:0}function qee(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function lc(e,t){return{seriesType:e,overallReset:t}}function uc(e){return{overallReset:e}}var dc=`.`,fc=`___EC__COMPONENT__CONTAINER___`,pc=`___EC__EXTENDED_CLASS___`;function mc(e){var t={main:``,sub:``};if(e){var n=e.split(dc);t.main=n[0]||``,t.sub=n[1]||``}return t}function hc(e){nn(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function gc(e){return!!(e&&e[pc])}function _c(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return vc(t)?n=function(e){$e(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},jt(n,this)),Dt(n.prototype,e),n[pc]=!0,n.extend=this.extend,n.superCall=Sc,n.superApply=Cc,n.superClass=t,n}}function vc(e){return Ht(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function yc(e,t){e.extend=t.extend}var bc=Math.round(Math.random()*10);function xc(e){var t=[`__\0is_clz`,bc++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Sc(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function Cc(e,t,n){return this.superClass.prototype[t].apply(e,n)}function wc(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){hc(r),e.prototype.type=r;var i=mc(r);if(!i.sub)t[i.main]=e;else if(i.sub!==fc){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[fc]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=mc(e),r=[],i=t[n.main];return i&&i[fc]?Z(i,function(e,t){t!==fc&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[mc(e).main]},e.getAllClassMainTypes=function(){var e=[];return Z(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[mc(e).main];return n&&n[fc]};function n(e){var n=t[e.main];return(!n||!n[fc])&&(n=t[e.main]={},n[fc]=!0),n}}function Tc(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&At(r,s)>=0||i&&At(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Ec=Tc([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Dc=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Ec(this,e,t)},e}(),Oc=new Pi(50);function kc(e){if(typeof e==`string`){var t=Oc.get(e);return t&&t.image}return e}function Ac(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=Oc.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Mc(t)&&a.pending.push(o)):(t=lt.loadImage(e,jc,jc),t.__zrImageSrc=e,Oc.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function jc(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function Mc(e){return e&&e.width&&e.height}var Nc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Pc(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
|
|
3
3
|
`);a=Fc(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)Ic(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
|
|
4
4
|
`),e.isTruncated=s}function Fc(e,t,n,r){r||={};var i=Dt({},r);n=Qt(n,`...`),i.maxIterations=Qt(r.maxIterations,2);var a=i.minChar=Qt(r.minChar,0),o=i.fontMeasureInfo=Oo(t),s=o.asciiCharWidth;i.placeholder=Qt(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=No(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function Ic(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=No(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?Lc(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=No(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Lc(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=Mo(n,e.charCodeAt(i));return i}function Rc(e,t,n,r){var i=Zc(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,c=o?o[0]+o[2]:0,l=t.font,u=a===`truncate`,d=Io(l),f=Qt(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);var g=t.height;g==null&&r!=null&&(g=r-c);var _=h!=null&&(a===`break`||a===`breakAll`)?i?qc(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
|
|
@@ -159,5 +159,5 @@ Rules you must follow:
|
|
|
159
159
|
you confirm.`)),d(t,i)},$$slots:{default:!0}})}),V(E);var A=R(E,2),M=H(A);{let r=q(()=>e(C).length===0&&e(w)===null);t(M,()=>pN,(t,i)=>{i(t,{variant:`ghost`,size:`sm`,get disabled(){return e(r)},onclick:Pe,title:`Start a new conversation`,children:(e,t)=>{n();var r=W(`New chat`);d(e,r)},$$slots:{default:!0}})})}var P=R(M,2);{let n=q(()=>e(G)?`Narrow the drawer`:`Widen the drawer`),r=q(()=>e(G)?`Narrow the drawer`:`Widen the drawer`);t(P,()=>pN,(t,i)=>{i(t,{variant:`ghost`,size:`icon-sm`,onclick:Qe,get title(){return e(n)},get"aria-label"(){return e(r)},children:(t,n)=>{var r=k(),i=K(r),a=e=>{I9(e,()=>`<path d="m14 10 7-7"/><path d="M20 10h-6V4"/><path d="m3 21 7-7"/><path d="M4 14h6v6"/>`)},o=e=>{I9(e,()=>`<path d="M15 3h6v6"/><path d="m21 3-7 7"/><path d="m3 21 7-7"/><path d="M9 21H3v-6"/>`)};h(i,t=>{e(G)?t(a):t(o,-1)}),d(t,r)},$$slots:{default:!0}})})}var F=R(P,2);{let n=q(()=>e(b)?`secondary`:`ghost`);t(F,()=>pN,(t,r)=>{r(t,{get variant(){return e(n)},size:`icon-sm`,onclick:()=>z(b,!e(b)),title:`Model settings`,"aria-label":`Model settings`,get"aria-expanded"(){return e(b)},children:(e,t)=>{I9(e,()=>`<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>`)},$$slots:{default:!0}})})}var ne=R(F,2);t(ne,()=>pN,(e,t)=>{t(e,{variant:`ghost`,size:`icon-sm`,get onclick(){return i.onClose},title:`Close`,"aria-label":`Close the AI advisor`,children:(e,t)=>{I9(e,()=>`<path d="M18 6 6 18"/><path d="m6 6 12 12"/>`)},$$slots:{default:!0}})}),V(A),V(T);var re=R(T,2),B=t=>{var n=Gwe(),r=R(H(n),2),i=L(r,!0),a=R(r,2),o=t=>{var n=Wwe(),r=L(n,!0);I(e=>X(r,e),[()=>e(N)?`Use ${rt(e(be).path)}`:`Use whole scan`]),j(`click`,n,()=>z(N,!e(N))),d(t,n)};h(a,t=>{e(be)!==null&&t(o)}),V(n),I(t=>{Y(r,`title`,e(Te)?.path??`The whole scan`),X(i,t)},[()=>e(Te)===null?`the whole scan`:rt(e(Te).path)]),d(t,n)},he=e=>{var t=Kwe();d(e,t)};h(re,e=>{i.memory===void 0?e(B):e(he,-1)}),V(l);var ge=R(l,2),ve=r=>{var i=Qwe(),a=H(i),o=R(H(a),2),s=e=>{var t=qwe();d(e,t)};h(o,t=>{e(U)&&!e(b)&&t(s)}),V(a);var c=R(a,2),l=t=>{var n=Jwe(),r=R(K(n),2),i=R(H(r),2),a=L(i,!0),o=R(i,4),s=L(o,!0),c=R(o,4),l=L(c,!0),p=R(c,4),h=L(p,!0);V(r),I(()=>{Y(i,`title`,e(u)||`not set`),X(a,e(u)||`not set`),X(s,e(f)||`not set`),we(c,1,D(e(fe)?`text-emerald-600 dark:text-emerald-400`:`text-muted-foreground`),`svelte-196g7hs`),X(l,e(fe)?`configured on the host`:`no key on the host`),X(h,e(m)?`disabled`:`enabled`)}),d(t,n)},g=r=>{var i=Xwe(),a=K(i),o=H(a),s=R(H(o));t(s,()=>NG,(t,n)=>{n(t,{placeholder:`https://api.example.com/v1`,get disabled(){return e(_)},get value(){return e(u)},set value(e){z(u,e,!0)}})}),V(o);var c=R(o,2),l=R(H(c));t(l,()=>NG,(t,n)=>{n(t,{placeholder:`model-name`,get disabled(){return e(_)},get value(){return e(f)},set value(e){z(f,e,!0)}})}),V(c);var g=R(c,2),v=R(H(g));{let n=q(()=>e(fe)?`key saved — leave empty to keep`:`sk-…`);t(v,()=>NG,(t,r)=>{r(t,{type:`password`,get placeholder(){return e(n)},get disabled(){return e(_)},autocomplete:`off`,get value(){return e(p)},set value(e){z(p,e,!0)}})})}V(g),V(a);var y=R(a,2),b=H(y);Ce(b),n(2),V(y);var x=R(y,2),S=H(x),C=H(S),w=e=>{var t=Ywe();d(e,t)},T=e=>{var t=W(`No key stored`);d(e,t)};h(C,t=>{e(fe)?t(w):t(T,-1)}),V(S);var E=R(S,2);t(E,()=>pN,(t,r)=>{r(t,{size:`sm`,variant:`outline`,get disabled(){return e(_)},onclick:()=>void Me(),children:(t,r)=>{n();var i=W();I(()=>X(i,e(_)?`Saving…`:`Save`)),d(t,i)},$$slots:{default:!0}})}),V(x),I(()=>b.disabled=e(_)),oe(b,()=>e(m),e=>z(m,e)),d(r,i)};h(c,t=>{e(me)?t(l):t(g,-1)});var v=R(c,2),x=t=>{var n=Zwe(),r=L(n,!0);I(()=>X(r,e(y))),d(t,n)};h(v,t=>{e(y)&&t(x)}),V(i),d(r,i)};h(ge,t=>{(e(b)||e(U))&&t(ve)});var xe=R(ge,2),J=H(xe),ke=H(J),Ae=t=>{var n=eTe(),r=H(n),a=H(r),s=e=>{var t=W(`Run a scan first, then ask what is taking the space.`);d(e,t)},c=t=>{var n=W();I(e=>X(n,`Ask anything about ${e??``}, or start from one of
|
|
160
160
|
these. Proposals are staged for review — nothing is deleted until you press Clean.`),[()=>e(Te)===null?`this scan`:rt(e(Te).path)]),d(t,n)},l=e=>{var t=W(`Ask anything about what is using memory, or start from one of these.`);d(e,t)};h(a,t=>{i.memory===void 0&&!e(de)?t(s):i.memory===void 0?t(c,1):t(l,-1)}),V(r);var u=R(r,2);v(u,21,o,e=>e.id,(t,n)=>{var r=$we(),i=L(r,!0);I(()=>{r.disabled=!e(de)||e(ue)||e(U),X(i,e(n).title)}),j(`click`,r,()=>void ze(e(n).prompt)),d(t,r)}),V(u),V(n),I(()=>we(u,1,`grid gap-2 ${e(ye)>=640?`grid-cols-2`:``}`,`svelte-196g7hs`)),d(t,n)};h(ke,t=>{e(C).length===0&&t(Ae)});var je=R(ke,2);v(je,21,()=>e(C),e=>e.id,(t,n)=>{var r=sTe(),i=H(r),a=H(i),o=L(a,!0),s=R(a,2),c=t=>{var r=tTe(),i=L(r);I(t=>{Y(r,`title`,e(n).scope),X(i,`in ${t??``}`)},[()=>rt(e(n).scope)]),d(t,r)};h(s,t=>{e(n).scope!==null&&t(c)}),V(i);var l=R(i,2);v(l,17,()=>tt(e(n).blocks),x,(t,n)=>{var r=k(),i=K(r),a=t=>{var r=L9();g(r,()=>j9(e(n).text),!0),V(r),d(t,r)},o=t=>{var r=rTe(),i=H(r),a=R(H(i));V(i);var o=R(i,2);v(o,21,()=>e(n).items,x,(t,n)=>{var r=nTe(),i=H(r),a=H(i),o=L(a,!0),s=R(a,2),c=L(s,!0);V(i),V(r),I(t=>{X(o,t),X(c,e(n).content)},[()=>et(e(n).name)]),d(t,r)}),V(o),V(r),I(e=>X(a,` ${e??``}`),[()=>nt(e(n).items)]),d(t,r)};h(i,t=>{e(n).kind===`text`?t(a):t(o,-1)}),d(t,r)});var u=R(l,2),f=t=>{var r=L9();g(r,()=>j9(e(n).live),!0),V(r),d(t,r)};h(u,t=>{e(n).live!==``&&t(f)});var p=R(u,2),m=t=>{var r=iTe(),i=R(H(r));V(r),I(()=>X(i,` ${e(n).live===``?e(n).blocks.length===0?`Reading the scan…`:`Working…`:`Writing…`}`)),d(t,r)};h(p,t=>{e(n).status===`running`&&t(m)});var _=R(p,2),y=t=>{var r=aTe(),i=L(r,!0);I(()=>{we(r,1,`rounded-md border border-dashed px-2.5 py-1.5 text-xs ${e(n).status===`error`?`border-destructive/50 text-destructive`:`text-muted-foreground`}`,`svelte-196g7hs`),Y(r,`role`,e(n).status===`error`?`alert`:void 0),X(i,e(n).notice)}),d(t,r)};h(_,t=>{e(n).notice!==null&&t(y)});var b=R(_,2),S=t=>{var r=oTe(),i=L(r,!0);I(e=>X(i,e),[()=>at(e(n).stats)]),d(t,r)};h(b,t=>{e(n).stats!==null&&t(S)}),V(r),I(()=>X(o,e(n).prompt)),d(t,r)}),V(je);var Ne=R(je,2),Fe=t=>{var n=cTe(),r=L(n,!0);I(()=>X(r,e(w))),d(t,n)};h(Ne,t=>{e(w)&&t(Fe)}),V(J),Se(J,e=>z(ie,e),()=>e(ie));var Ie=R(J,2),Le=e=>{var t=lTe();j(`click`,t,qe),d(e,t)};h(Ie,t=>{!e(se)&&e(C).length>0&&t(Le)}),V(xe);var Re=R(xe,2),Ge=r=>{var a=pTe(),o=H(a),s=H(o),c=H(s),l=R(c,4),u=L(l);V(s);var f=R(s,2),p=e=>{var r=k(),a=K(r);t(a,()=>pN,(e,t)=>{t(e,{variant:`outline`,size:`sm`,get onclick(){return i.onOpenCollector},children:(e,t)=>{n();var r=W(`Review & clean`);d(e,r)},$$slots:{default:!0}})}),d(e,r)};h(f,e=>{i.onOpenCollector&&e(p)}),V(o);var m=R(o,2),g=t=>{var n=fTe();v(n,21,()=>e(Ee),e=>e.id,(t,n)=>{var r=dTe(),i=H(r),a=L(i,!0),o=R(i,2),s=H(o),c=L(s,!0),l=R(s,2),u=t=>{var r=uTe(),i=L(r);I(()=>X(i,`— ${e(n).reason??``}`)),d(t,r)};h(l,t=>{e(n).reason&&t(u)}),V(o);var f=R(o,2),p=L(f,!0),m=R(f,2);V(r),I((t,o)=>{Y(r,`title`,e(n).path),we(i,1,`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium uppercase ${t??``}`,`svelte-196g7hs`),X(a,e(n).risk??`yours`),X(c,e(n).name),X(p,o),Y(m,`aria-label`,`Remove ${e(n).name} from the selection`)},[()=>ot(e(n).risk),()=>hk(e(n).size)]),j(`click`,m,()=>We(e(n).id)),d(t,r)}),V(n),d(t,n)};h(m,t=>{e(ce)&&t(g)}),V(a),I(t=>{Y(s,`aria-expanded`,e(ce)),we(c,1,`inline-block text-xs text-muted-foreground transition-transform ${e(ce)?`rotate-90`:``}`,`svelte-196g7hs`),X(u,`${e(Ee).length??``} · ${t??``}`)},[()=>hk(e(Oe))]),j(`click`,s,()=>z(ce,!e(ce))),d(r,a)};h(Re,t=>{e(Ee).length>0&&t(Ge)});var $e=R(Re,2),it=H($e),lt=t=>{var n=hTe();v(n,21,o,e=>e.id,(t,n)=>{var r=mTe(),i=L(r,!0);I(()=>{r.disabled=!e(de)||e(ue),X(i,e(n).title)}),j(`click`,r,()=>void ze(e(n).prompt)),d(t,r)}),V(n),d(t,n)};h(it,t=>{e(C).length>0&&t(lt)});var ut=R(it,2),dt=H(ut);De(dt),Se(dt,e=>z(ae,e),()=>e(ae));var ft=R(dt,2),pt=e=>{var r=k(),i=K(r);t(i,()=>pN,(e,t)=>{t(e,{type:`button`,variant:`outline`,size:`sm`,onclick:Be,children:(e,t)=>{n();var r=W(`Stop`);d(e,r)},$$slots:{default:!0}})}),d(e,r)},mt=r=>{var i=k(),a=K(i);{let r=q(()=>!e(de)||e(U)||e(S).trim()===``);t(a,()=>pN,(t,i)=>{i(t,{type:`submit`,size:`sm`,get disabled(){return e(r)},children:(e,t)=>{n();var r=W(`Send`);d(e,r)},$$slots:{default:!0}})})}d(r,i)};h(ft,t=>{e(ue)?t(pt):t(mt,-1)}),V(ut),n(2),V($e),I(()=>{Y(c,`aria-valuenow`,e(ye)),Y(c,`aria-valuemax`,e(_e)),Y(c,`data-dragging`,e(le)!==null),Y(dt,`placeholder`,e(ct)),dt.disabled=!e(de)||e(U),Y(dt,`aria-label`,i.memory===void 0?`Ask the AI about this scan`:`Ask the AI about memory`)}),j(`pointerdown`,c,Je),j(`pointermove`,c,Ye),j(`pointerup`,c,Xe),te(`pointercancel`,c,Xe),j(`dblclick`,c,Qe),j(`keydown`,c,Ze),te(`scroll`,J,Ke),te(`submit`,ut,e=>{e.preventDefault(),Ve()}),j(`input`,dt,Ue),j(`keydown`,dt,He),pe(dt,()=>e(S),e=>z(S,e)),d(r,s)},$$slots:{default:!0}})})}d(r,s)},$$slots:{default:!0}})}),d(r,a)};h(ut,e=>{i.available&&e(dt)}),d(r,lt),a()}p([`pointerdown`,`pointermove`,`pointerup`,`dblclick`,`keydown`,`click`,`input`]);function z9(e){return{async chat(t){let n=e.aiChat;if(n===void 0)throw Error(`The AI advisor is not available over this host`);let r={messages:t.messages,...t.tools===void 0?{}:{tools:t.tools}},i=e.aiChatStream;return i===void 0?Mwe(await n(r)):Hwe(e=>i(r,e,t.signal),t.onText)},async getConfig(){let t=e.aiConfig;if(t===void 0)throw Error(`The AI advisor is not available over this host`);return{...Nwe(await t()),managed:!0}},async setConfig(){throw Error(`The AI model and key are configured on the host`)}}}function B9(e,t){let n=[...e.filter(e=>e.key!==t.key),t];return n.length>20?n.slice(n.length-20):n}var _Te=10;function vTe(e,t,n){let r=null,i=null,a=()=>t();function o(){let e=a();if(e===null)throw Error(`the memory view has no snapshot yet`);return e}function s(){let e=o();if(i!==null&&i.sequence===e.sequence)return{value:i.value,names:i.names};let t=new Map;for(let n of e.groups)t.set(n.groupId,n.name);let n=sde(e);return i={sequence:e.sequence,value:n,names:t},{value:n,names:t}}async function c(){let t=a();if(t===null)return null;let n=e.memoryCandidates;if(n===void 0)return null;if(r!==null&&r.sequence===t.sequence)return r.value;try{let i=await n.call(e,{exclude:[]});return r={sequence:t.sequence,value:i},i}catch{return null}}function l(e,t){let n=e.processes.filter(e=>e.groupId===t.groupId),{value:r,names:i}=s(),a=r.parentOf.get(t.groupId)??null;return{groupId:t.groupId,name:t.name,kind:t.kind,footprintBytes:t.footprintBytes,cpuPercent:t.cpuPercent,processCount:t.pids.length,frontmost:t.frontmost,protected:t.protection!==null||n.some(e=>e.protection!==null),self:n.some(e=>e.protection===`selfOrAncestor`||e.protection===`selfChild`),restricted:n.some(e=>e.restricted),parentName:a===null?null:i.get(a)??null}}function u(e,t){return e.processes.filter(e=>e.groupId===t).map(e=>({name:e.name,footprintBytes:e.footprintBytes,cpuPercent:e.cpuPercent}))}function d(e,t){let n=[...e];return t===`cpu`?n.sort((e,t)=>(t.cpuPercent??-1)-(e.cpuPercent??-1)):n.sort((e,t)=>t.footprintBytes-e.footprintBytes),n}return{async summary(){let e=o(),t=await c();return{pressure:t?.pressure??e.pressure,breakdown:e.breakdown,observedMinutes:t?.observedMinutes??0,top:d(e.groups,`footprint`).slice(0,_Te).map(t=>l(e,t))}},async groups(e,t,n){let r=o(),i=d(r.groups,e);return{rows:i.slice(n,n+t).map(e=>l(r,e)),total:i.length}},async group(e){let t=a();if(t===null)return null;let n=t.groups.find(t=>t.groupId===e);if(n===void 0)return null;let r=await c();return{group:l(t,n),members:u(t,e),candidate:r?.candidates.find(t=>t.groupId===e)??null}},async children(e){let t=a();if(t===null)return{rows:[],total:0};let{value:n}=s(),r=n.childrenOf.get(e)??[],i=[];for(let e of r){let n=t.groups.find(t=>t.groupId===e);n!==void 0&&i.push(l(t,n))}return{rows:i,total:i.length}},async ancestry(e){let t=a();if(t===null)return null;let{value:n}=s(),r=[];for(let i of cde(n,e)){let e=t.groups.find(e=>e.groupId===i);e!==void 0&&r.push(l(t,e))}return r.length===0?null:{chain:r}},async stageQuit(e){let t=a(),r=[],i=[],o=new Date().toISOString(),s=[...n.entries()];for(let n of e){let e=t?.groups.find(e=>e.groupId===n.groupId);if(e===void 0){i.push({groupId:n.groupId,reason:`no longer running`});continue}s=B9(s,{key:`group:${e.groupId}`,groupId:e.groupId,name:e.name,origin:`advisor`,reason:n.reason,stagedAt:o}),r.push(e.groupId)}return n.replace(s),{staged:r,rejected:i}}}}var V9=[1e3,2e3,5e3,1e4];function yTe(e,t){let n=t.intervalMs,r=!1,i=null,a=-1,o=-1,s=!1,c=null,l=0;function u(){i!==null&&(e.clearTimer(i),i=null)}function d(t){r&&(i=e.setTimer(()=>{i=null,f()},Math.max(0,Math.round(t))))}async function f(){if(!r||s||e.isHidden())return;let i=l;s=!0;let c=e.now();try{let s=await e.fetch();if(i!==l||!r)return;let u=e.now()-c;s.sequence>a&&(a=s.sequence,t.onSnapshot(s)),o=-1,e.isHidden()||d(n-u)}catch(n){if(i!==l||!r)return;t.onError(n),o=Math.min(o+1,V9.length-1),e.isHidden()||d(V9[o]??V9[V9.length-1])}finally{i===l&&(s=!1)}}function p(){if(r){if(e.isHidden()){u();return}i===null&&!s&&f()}}return{start(){r||(r=!0,l+=1,s=!1,c=e.onVisibilityChange(p),e.isHidden()||f())},stop(){r&&(r=!1,l+=1,s=!1,u(),c?.(),c=null)},setInterval(e){n=e}}}function H9(e,t){let n=`${e?.name??``} ${e?.command??``}`.toLowerCase();return n.includes(`context7`)?`Context7`:n.includes(`codegraph`)?`CodeGraph`:n.includes(`gk-alpha`)?`gk-alpha`:/^(node|npm|npx)$/i.test(t)?`${t} · PID ${e?.pid??`?`}`:t}function bTe(e,t,n,r){let i=S2(e),a=new Map(e.processes.map(e=>[e.pid,e])),o=t===null?null:i.byPid.get(t)??null,s=180,c=(e,t)=>{let i=new Map;for(let t of e){let e=H9(a.get(t.pid),t.name),n=r?e:`${e}:${t.pid}`,o=i.get(n)??[];o.push(t),i.set(n,o)}let o=[...i.values()].sort((e,t)=>U9(t)-U9(e)),l=[],u=0,d=0,f=[];for(let e of o){let r=U9(e);if(r<=0)continue;if(l.length>=12||s<=0){u+=r,d+=e.length,f.push(...e.map(e=>e.pid));continue}s--;let i=e[0],o=H9(a.get(i.pid),i.name),p=t<n?c(e.flatMap(e=>e.children),t+1):[],m=e.reduce((e,t)=>e+(t.footprintBytes??t.residentBytes??0),0);p.length>0&&m>0&&p.unshift({id:`self:${e.map(e=>e.pid).join(`:`)}`,name:`Self`,bytes:m,ownBytes:i.footprintBytes,pids:e.map(e=>e.pid),children:[],kind:`self`}),l.push({id:e.map(e=>e.pid).join(`:`),name:o,bytes:r,ownBytes:e.length===1?i.footprintBytes:null,pids:e.map(e=>e.pid),children:p,kind:e.length===1?`process`:`group`})}return u>0&&l.push({id:`other:${t}:${e[0]?.pid??0}`,name:`Other`,bytes:u,ownBytes:null,pids:f,children:[],kind:`other`,omitted:d}),l};if(o){let e=c(o.children,1),t=o.footprintBytes??o.residentBytes??0;return t>0&&e.unshift({id:`self:${o.pid}`,name:`Self`,bytes:t,ownBytes:t,pids:[o.pid],children:[],kind:`self`}),{branches:e,total:o.subtreeBytes,focus:o}}let l=new Map,u=new Map(e.groups.map(e=>[e.groupId,e]));for(let t of e.processes){let e=u.get(t.groupId),n=H9(t,e?.name??t.name),i=r?n:t.groupId,a=l.get(i)??{name:n,bytes:0,pids:[],mainPids:new Set};a.bytes+=t.footprintBytes??t.residentBytes??0,a.pids.push(t.pid),a.mainPids.add(n===(e?.name??t.name)?e?.mainPid??t.pid:t.pid),l.set(i,a)}let d=[...l.values()].filter(e=>e.bytes>0).sort((e,t)=>t.bytes-e.bytes),f=d.slice(0,30).map(e=>{let t=new Set(e.pids),r=new Map;for(let t of e.pids){let e=i.byPid.get(t);e&&r.set(t,{...e,children:[],subtreeBytes:e.footprintBytes??e.residentBytes??0})}let a=[];for(let e of r.values()){let t=e.ppid===null?void 0:r.get(e.ppid),n=e.ppid===null?void 0:i.byPid.get(e.ppid);t&&n?.children.some(t=>t.pid===e.pid)?t.children.push(e):a.push(e)}let o=e=>{for(let t of e.children)e.subtreeBytes+=o(t);return e.subtreeBytes};for(let e of a)o(e);let s=[];if(n>1){if(a.length===1){let e=a[0];s=c(e.children,2);let t=e.footprintBytes??e.residentBytes??0;s.length&&t>0&&s.unshift({id:`self:${e.pid}`,name:`Self`,bytes:t,ownBytes:e.footprintBytes,pids:[e.pid],children:[],kind:`self`})}else s=c(a,2)}return{id:`group:${e.name}:${[...e.mainPids][0]}`,name:e.name,bytes:e.bytes,ownBytes:null,pids:[...e.mainPids].filter(e=>t.has(e)),children:s,kind:`group`,omitted:e.pids.length}}),p=d.slice(30);return p.length&&f.push({id:`other:root`,name:`Other`,bytes:p.reduce((e,t)=>e+t.bytes,0),ownBytes:null,pids:p.flatMap(e=>[...e.mainPids]),children:[],kind:`other`,omitted:p.length}),{branches:f,total:d.reduce((e,t)=>e+t.bytes,0),focus:null}}function U9(e){return e.reduce((e,t)=>e+t.subtreeBytes,0)}var xTe=A(`<button class="rounded-md border px-2 py-1 text-xs hover:bg-muted"> </button><button class="rounded-md border px-2 py-1 text-xs hover:bg-muted">All</button>`,1),STe=A(`<button class="rounded-md p-1 hover:bg-muted"><!></button>`),CTe=A(`<p class="mt-2 text-xs text-muted-foreground">Leaf process · no child processes in this snapshot.</p>`),wTe=A(`<p class="mt-3 rounded border p-3 text-xs text-muted-foreground">This process is no longer in the snapshot. Choose All to continue.</p>`),TTe=u(`<path role="button"><title> </title></path>`),ETe=A(`<div class="min-w-0 rounded-lg border bg-background/50 p-2"><div class="px-1 text-xs font-medium text-muted-foreground"> </div> <svg viewBox="0 0 300 300" class="mx-auto block w-full svelte-1vgnoxm" role="group"><!><text x="150" y="147" text-anchor="middle" fill="currentColor" font-size="14" pointer-events="none"> </text><text x="150" y="164" text-anchor="middle" fill="currentColor" opacity="0.6" font-size="9" pointer-events="none">footprint</text></svg></div>`),W9=A(`<p class="mt-1 break-all font-mono text-muted-foreground"> </p>`),DTe=A(`<p class="mt-1 text-muted-foreground"> </p><!>`,1),OTe=A(`<div class="flex justify-between gap-2"><strong class="truncate text-sm"> </strong><strong class="shrink-0 tabular-nums"> </strong></div> <p class="mt-1 text-muted-foreground"> </p> <!> <p class="mt-1 text-muted-foreground"> </p>`,1),kTe=A(`<div class="flex justify-between gap-2"><strong> </strong><strong> </strong></div><p class="mt-1 text-muted-foreground"> </p> <p class="mt-1 text-muted-foreground"> </p> <!> <button class="mt-2 rounded border px-2 py-1 hover:bg-muted">Process details</button>`,1),ATe=A(`<strong>Explore memory</strong><p class="mt-1 text-muted-foreground">Hover a segment to inspect it. Click to keep a selection. Double-click to explore child processes.</p>`,1),jTe=A(`<p class="px-1 text-xs text-muted-foreground"> </p>`),MTe=A(`<button class="flex w-full items-center justify-between rounded px-2 py-1.5 text-left text-xs hover:bg-muted"><span> </span><span> </span></button>`),NTe=A(`<div class="mt-3 rounded-md border p-2"><div class="flex items-center justify-between px-1 text-xs font-medium"><span> </span><button aria-label="Close process choices">✕</button></div> <!><div class="mt-1 max-h-40 overflow-auto"></div></div>`),PTe=A(`<button class="flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs hover:bg-muted disabled:cursor-default"><span class="h-2.5 w-2.5 shrink-0 rounded-sm"></span><span class="min-w-0 flex-1 truncate"> </span><span class="text-muted-foreground"> </span><span class="w-20 text-right tabular-nums"> </span><span class="text-muted-foreground">›</span></button>`),FTe=A(`<div class="distribution-plots mt-3 svelte-1vgnoxm"></div> <div class="mt-3 rounded-md border bg-muted/30 p-3 text-xs" aria-live="polite"><!></div> <!> <div class="mt-3 max-h-64 overflow-auto" aria-label="Memory distribution items"></div>`,1),ITe=A(`<p class="py-10 text-center text-sm text-muted-foreground">No footprint data available.</p>`),LTe=A(`<section class="rounded-lg border bg-card p-4 shadow-sm svelte-1vgnoxm" aria-label="Memory distribution"><div class="flex flex-wrap items-start gap-2"><div class="mr-auto min-w-0"><h2 class="text-sm font-semibold">Memory explorer</h2><p class="mt-1 text-xs text-muted-foreground"> </p></div> <!> <!></div> <div class="mt-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground"><label class="flex items-center gap-1.5">Depth <select class="rounded border bg-background px-2 py-1 text-foreground"><option>1 level</option><option>2 levels</option><option>3 levels</option></select></label> <label class="flex items-center gap-1.5"><input type="checkbox"/> Merge similar siblings</label> <span>Click to select · double-click to explore</span></div> <!> <!></section>`);function RTe(t,r){J(r,!0);let o=F(r,`focusPid`,3,null),s=F(r,`selectedPid`,3,null),c=F(r,`depth`,15,2),l=F(r,`expanded`,3,!1),u=P(!0),f=P(null),p=P(null),m=[`#e452ba`,`#aa65ef`,`#8277f4`,`#4d9bea`,`#31bdc3`,`#38b994`,`#d3a052`,`#df797b`,`#9b87c7`,`#6ba7b8`,`#c8759d`,`#94b670`],g=q(()=>bTe(r.snapshot,o(),c(),e(u))),_=q(()=>new Map(r.snapshot.processes.map(e=>[e.pid,e]))),y=q(()=>o()===null?null:e(_).get(o())??null),b=q(()=>e(y)?.ppid==null?null:e(_).get(e(y).ppid)??null),S=P(null),C=null;ge(()=>{s()!==C&&(C=s(),e(S)?.pids.includes(s())||z(S,null))});let w=q(()=>s()===null?null:e(_).get(s())??null),E=q(()=>e(f)??e(S)??(e(w)?{id:String(e(w).pid),name:H9(e(w),e(w).name),bytes:e(w).footprintBytes??e(w).residentBytes??0,ownBytes:e(w).footprintBytes,pids:[e(w).pid],children:[],kind:`process`}:null)),D=q(()=>e(E)?.pids.length===1?e(_).get(e(E).pids[0])??null:null);function O(e,t){return[150+e*Math.cos(t-Math.PI/2),150+e*Math.sin(t-Math.PI/2)]}function ee(e,t,n,r){t=Math.min(t,e+Math.PI*2-1e-5);let[i,a]=O(r,e),[o,s]=O(r,t),[c,l]=O(n,t),[u,d]=O(n,e);return`M ${i} ${a} A ${r} ${r} 0 ${+(t-e>Math.PI)} 1 ${o} ${s} L ${c} ${l} A ${n} ${n} 0 ${+(t-e>Math.PI)} 0 ${u} ${d} Z`}function A(t,n){let r=[];if(!e(g).total)return r;let i=(e,t,a,o,s)=>{let c=e.reduce((e,t)=>e+t.bytes,0),l=t;for(let[t,u]of e.entries()){let e=l+a*u.bytes/c,d=s??m[t%m.length];e-l>.001&&r.push({branch:u,color:d,level:o,path:ee(l,e,43+(o-1)*96/n,43+o*96/n-1)}),o<n&&u.children.length&&i(u.children,l,e-l,o+1,d),l=e}};return i(t,0,Math.PI*2,1),r}function M(e){return e.reduce((e,t)=>Math.max(e,1+(t.children.length?M(t.children):0)),1)}let N=q(()=>A(e(g).branches,Math.min(c(),M(e(g).branches)))),ne=q(()=>A(e(g).branches,1));function re(e){z(S,e,!0),e.pids.length>0&&r.onSelect(e.pids[0]),e.pids.length>1&&z(p,e,!0)}function ie(e){e.kind!==`self`&&e.pids.length!==0&&(z(f,null),e.pids.length===1?(z(p,null),r.onFocus(e.pids[0])):z(p,e,!0))}function ae(e){return e?.command?.match(/^(.+?\/Contents\/MacOS\/\S+|\S+)/)?.[1]??null}function se(e){return e?`PID ${e.pid} · ${e.kind} · ${e.state} · CPU ${e.cpuPercent===null?`—`:`${e.cpuPercent.toFixed(1)}%`}`:`Select a segment to explore its processes.`}var ce=LTe(),le=H(ce),B=H(le),ue=R(H(B)),de=L(ue);V(B);var fe=R(B,2),pe=t=>{var n=xTe(),i=K(n),a=L(i),o=R(i);I(()=>X(a,`← ${e(b)?`Parent`:`All processes`}`)),j(`click`,i,()=>{z(p,null),r.onFocus(e(b)?.pid??null)}),j(`click`,o,()=>{z(p,null),r.onFocus(null)}),d(t,n)};h(fe,e=>{o()!==null&&e(pe)});var me=R(fe,2),he=e=>{var t=STe(),n=H(t),i=e=>{DA(e,{class:`size-3.5`})},a=e=>{EA(e,{class:`size-3.5`})};h(n,e=>{l()?e(i):e(a,-1)}),V(t),I(()=>Y(t,`aria-label`,l()?`Restore the explorer size`:`Expand the explorer to fill the view`)),j(`click`,t,function(...e){r.onToggleExpand?.apply(this,e)}),d(e,t)};h(me,e=>{r.onToggleExpand&&e(he)}),V(le);var U=R(le,2),_e=H(U),ve=R(H(_e)),W=H(ve);W.value=W.__value=1;var ye=R(W);ye.value=ye.__value=2;var G=R(ye);G.value=G.__value=3,V(ve),T(ve),V(_e);var be=R(_e,2),xe=H(be);Ce(xe),n(),V(be),n(2),V(U);var Se=R(U,2),Ee=e=>{var t=CTe();d(e,t)},De=q(()=>e(y)&&e(g).branches.every(e=>e.kind===`self`));h(Se,t=>{e(De)&&t(Ee)});var Oe=R(Se,2),ke=e=>{var t=wTe();d(e,t)},Ae=t=>{var a=FTe(),o=K(a);v(o,21,()=>[{name:`Sunburst`,parts:e(N)},{name:`Pie`,parts:e(ne)}],x,(t,r)=>{var i=ETe(),a=H(i),o=L(a,!0),c=R(a,2),l=H(c);v(l,17,()=>e(r).parts,x,(t,n)=>{var r=TTe();let i;var a=H(r),o=L(a);V(r),I((t,a,s,c)=>{Y(r,`tabindex`,e(n).branch.kind===`self`?-1:0),Y(r,`aria-label`,t),Y(r,`d`,e(n).path),Y(r,`fill`,e(n).color),Y(r,`opacity`,e(f)&&e(f).id!==e(n).branch.id?.48:e(n).level>1?.78:1),Y(r,`stroke`,a),Y(r,`stroke-width`,s),i=we(r,0,`svelte-1vgnoxm`,null,i,{"cursor-pointer":e(n).branch.kind!==`self`}),X(o,`${e(n).branch.name??``}: ${c??``}`)},[()=>`${e(n).branch.name}: ${L2(e(n).branch.bytes)}`,()=>s()!==null&&e(n).branch.pids.includes(s())?`var(--foreground)`:`var(--background)`,()=>s()!==null&&e(n).branch.pids.includes(s())?2:1,()=>L2(e(n).branch.bytes)]),te(`focus`,r,()=>z(f,e(n).branch,!0)),te(`blur`,r,()=>z(f,null)),j(`keydown`,r,t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),ie(e(n).branch))}),te(`mouseenter`,r,()=>z(f,e(n).branch,!0)),te(`mouseleave`,r,()=>z(f,null)),j(`click`,r,()=>re(e(n).branch)),j(`dblclick`,r,()=>ie(e(n).branch)),d(t,r)});var u=R(l),p=L(u,!0);n(),V(c),V(i),I(t=>{X(o,e(r).name),Y(c,`aria-label`,`${e(r).name} memory distribution`),X(p,t)},[()=>L2(e(g).total)]),d(t,i)}),V(o);var c=R(o,2),l=H(c),u=t=>{var n=OTe(),r=K(n),i=H(r),a=L(i,!0),o=R(i),s=L(o,!0);V(r);var c=R(r,2),l=L(c),u=R(c,2),f=t=>{var n=DTe(),r=K(n),i=L(r),a=R(r),o=t=>{var n=W9(),r=L(n,!0);I(e=>X(r,e),[()=>ae(e(D))]),d(t,n)},s=q(()=>ae(e(D)));h(a,t=>{e(s)&&t(o)}),I(()=>X(i,`User ${e(D).user??`unknown`??``} · Threads ${e(D).threads??`—`??``} · Parent PID ${e(D).ppid??`—`??``}`)),d(t,n)};h(u,t=>{e(D)&&t(f)});var p=R(u,2),m=L(p,!0);I((t,n,r)=>{X(a,e(E).name),X(s,t),X(l,`${n??``}% of current view · ${r??``}`),X(m,e(E).kind===`other`?`${e(E).omitted} smaller items combined · click to browse`:e(E).kind===`self`?`Memory of this process alone`:e(E).pids.length>1?`Click to choose an instance`:`Selected process · double-click to explore`)},[()=>L2(e(E).bytes),()=>(e(E).bytes/e(g).total*100).toFixed(1),()=>e(E).pids.length>1?`${e(E).pids.length} processes`:se(e(D))]),d(t,n)},b=t=>{var n=kTe(),i=K(n),a=H(i),o=L(a,!0),s=R(a),c=L(s,!0);V(i);var l=R(i),u=L(l),f=R(l,2),p=L(f),m=R(f,2),_=t=>{var n=W9(),r=L(n,!0);I(e=>X(r,e),[()=>ae(e(y))]),d(t,n)},v=q(()=>ae(e(y)));h(m,t=>{e(v)&&t(_)});var b=R(m,2);I((t,n,r,i)=>{X(o,t),X(c,n),X(u,`${r??``} · self ${i??``}`),X(p,`User ${e(y).user??`unknown`??``} · Threads ${e(y).threads??`—`??``} · Parent PID ${e(y).ppid??`—`??``}`)},[()=>H9(e(y),e(y).name),()=>L2(e(g).total),()=>se(e(y)),()=>e(y).footprintBytes===null?`unavailable`:L2(e(y).footprintBytes)]),j(`click`,b,()=>r.onDetails(e(y))),d(t,n)},S=e=>{var t=ATe();n(),d(e,t)};h(l,t=>{e(E)?t(u):e(y)?t(b,1):t(S,-1)}),V(c);var C=R(c,2),w=t=>{var n=NTe(),i=H(n),a=H(i),o=L(a),s=R(a);V(i);var c=R(i,2),l=t=>{var n=jTe(),r=L(n);I(()=>X(r,`Showing 200 of ${e(p).pids.length??``} processes.`)),d(t,n)};h(c,t=>{e(p).pids.length>200&&t(l)});var u=R(c);v(u,21,()=>e(p).pids.slice(0,200),x,(t,n)=>{var i=k(),a=K(i),o=t=>{let i=q(()=>e(_).get(e(n)));var a=MTe(),o=H(a),s=L(o),c=R(o),l=L(c,!0);V(a),I(t=>{X(s,`PID ${e(n)??``} · ${e(i).name??``}`),X(l,t)},[()=>e(i).footprintBytes===null?`—`:L2(e(i).footprintBytes)]),j(`click`,a,()=>{z(p,null),r.onSelect(e(n))}),j(`dblclick`,a,()=>r.onFocus(e(n))),d(t,a)},s=q(()=>e(_).get(e(n)));h(a,t=>{e(s)&&t(o)}),d(t,i)}),V(u),V(n),I(()=>X(o,`${e(p).name??``} · choose a process`)),j(`click`,s,()=>z(p,null)),d(t,n)};h(C,t=>{e(p)&&t(w)});var T=R(C,2);v(T,21,()=>e(g).branches,x,(t,r,a)=>{var o=PTe(),s=H(o);let c;var l=R(s),u=L(l,!0),p=R(l),h=L(p,!0),g=R(p),_=L(g,!0);n(),V(o),I(t=>{o.disabled=e(r).kind===`self`||e(r).pids.length===0,c=i(s,``,c,{background:m[a%m.length]}),X(u,e(r).name),X(h,e(r).pids.length>1?`${e(r).pids.length} processes`:``),X(_,t)},[()=>L2(e(r).bytes)]),te(`mouseenter`,o,()=>z(f,e(r),!0)),te(`mouseleave`,o,()=>z(f,null)),te(`focus`,o,()=>z(f,e(r),!0)),te(`blur`,o,()=>z(f,null)),j(`click`,o,()=>re(e(r))),j(`dblclick`,o,()=>ie(e(r))),d(t,o)}),V(T),d(t,a)},je=e=>{var t=ITe();d(e,t)};h(Oe,t=>{o()!==null&&!e(y)?t(ke):e(g).total>0?t(Ae,1):t(je,-1)}),V(ce),I(e=>X(de,`${e??``} · footprint, or resident if unavailable`),[()=>e(y)?`${H9(e(y),e(y).name)} · PID ${e(y).pid}`:`All processes`]),Te(ve,c),oe(xe,()=>e(u),e=>z(u,e)),d(t,ce),a()}p([`click`,`keydown`,`dblclick`]);var G9=A(`<!> <!>`,1),zTe=A(`<p class="text-sm text-muted-foreground">Reading memory…</p>`),BTe=A(`<section class="flex h-full min-h-0 flex-col items-center justify-center gap-4 bg-background p-6 text-foreground"><!></section>`),VTe=A(`<p class="text-xs text-muted-foreground">This host does not allow process control.</p>`),HTe=A(`<span class="text-xs text-muted-foreground">Paused</span>`),UTe=A(`<div class="flex flex-wrap items-center gap-3 rounded-md border border-amber-500/30 bg-amber-500/5 px-3 py-2" role="status"><!> <p class="min-w-0 flex-1 text-sm"><strong> </strong> </p> <!></div>`),WTe=A(`<button type="button" class="text-xs text-muted-foreground underline-offset-4 hover:text-foreground hover:underline">All processes</button>`),GTe=A(`<li><button type="button" class="flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-muted/50"><!> <span class="min-w-0 flex-1 truncate text-sm"> </span> <span class="hidden h-1.5 w-28 overflow-hidden rounded-full bg-muted sm:block"><span class="block h-full rounded-full bg-primary"></span></span> <span class="w-20 shrink-0 text-right text-xs tabular-nums text-muted-foreground"> </span></button></li>`),KTe=A(`<li class="px-3 py-4 text-sm text-muted-foreground">No applications are using memory right now.</li>`),qTe=A(`<div class="grid items-stretch gap-3 lg:grid-cols-[minmax(18rem,0.9fr)_minmax(0,1.5fr)]"><!> <!></div> <!> <section class="overflow-hidden rounded-md border"><div class="flex items-center justify-between gap-2 border-b bg-muted/30 px-3 py-2"><h2 class="text-xs font-semibold tracking-wide text-muted-foreground uppercase">Top memory users</h2> <!></div> <ul role="list" class="divide-y"></ul></section>`,1),JTe=A(`<div id="memory-flow"><!></div>`),YTe=A(`<span> </span> <!> <!>`,1),XTe=A(`<span class="text-xs text-muted-foreground"> </span>`),ZTe=A(`<div class="flex flex-wrap items-center gap-3 rounded-md border bg-muted/40 px-3 py-2 text-sm" role="status" aria-live="polite"><!> <!></div>`),QTe=A(`<div class="memory-table-panel flex min-w-0 flex-col gap-3"><div class="flex items-center gap-1" role="group" aria-label="Table or process tree"><!> <!> <!></div> <!></div>`),K9=A(`<p class="text-xs text-muted-foreground" role="status">This host lists processes read-only. Quitting runs in the desktop app or a host started
|
|
161
161
|
with process control enabled.</p>`),$Te=A(`<!> <div class="grid gap-3 md:grid-cols-2 xl:grid-cols-3"></div> <!> <div><!> <!> <!></div> <!>`,1),eEe=A(`<main class="memory-page flex min-h-0 flex-1 flex-col gap-3 overflow-auto bg-background p-4 text-foreground"><div class="flex flex-wrap items-center gap-2"><!> <!> <!></div> <!> <!></main> <!> <!> <!> <!> <!> <!>`,1);function tEe(r,o){J(o,!0);function s(e){let t=e[0]?.origin??`manual`;return e.every(e=>e.origin===t)?t:`manual`}function c(e){let t=new Set,n=[];for(let r of e)if(r.key.startsWith(`proc:`)){let[,e,i]=r.key.split(`:`),a=Number.parseInt(e??``,10),o=Number.parseInt(i??``,10),s=`${a}:${o}`;if(Number.isNaN(a)||Number.isNaN(o)||t.has(s))continue;t.add(s),n.push({kind:`process`,pid:a,startTimeUs:o})}else{if(t.has(r.groupId))continue;t.add(r.groupId),n.push({kind:`group`,groupId:r.groupId})}return n.slice(0,20)}let l=F(o,`section`,3,`overview`),u=F(o,`snapshot`,15,null),f=`spacelens.memory.neverSuggest`;function p(){try{let e=window.localStorage.getItem(f);if(e===null)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}catch{return[]}}function m(e){try{window.localStorage.setItem(f,JSON.stringify(e.slice(0,200)))}catch{}}let g=P(null),_=P(null),y=P(!1),b=1e3,x=P(b),S=P(ve({sort:`footprint`,desc:!0,filter:`all`,search:``})),C=P(ve(new Set)),w=P(`table`),T=P(null);function E(t){if(e(T)===null)return t;let n=e(T),r=j2.find(e=>e.id===n.presetId);return r===void 0?t:dde(t,r,n.ruleId)}let D=P(`mine`),O=P(null),ee=P(2),A=P(null),te=t=>z(A,e(A)===t?null:t,!0),M=P(null);function N(e){z(O,e,!0),z(M,e,!0)}let ne=P(null),re=P(null),ie=q(()=>u()===null||e(re)===null?null:u().processes.find(t=>t.pid===e(re)?.pid&&t.startTimeUs===e(re)?.startTimeUs)??null),ae=P(ve([])),oe=P(!1),se=P(!1),ce=P(!1),le=P(null),B=P(!1),ue=P(null),de=P(null),fe=P(null),pe=P(!1),me=P(!1),he=P(null),U=P(null),ge=P(null),_e=P(ve([])),G=P(null),be=P(null),xe=P(null),Se=0,Ce=!1,Te=!1,Ee=0,De=q(()=>HCe({capabilities:o.capabilities,service:o.service})),Oe=q(()=>!!o.capabilities?.memory?.reopen),ke=q(()=>o.service===null?null:z9(o.service)),Ae=q(()=>o.service===null||o.service.memoryCandidates===void 0?null:vTe(o.service,()=>u(),{entries:()=>e(ae),replace:e=>{z(ae,e,!0)}})),je=q(()=>e(Ae)!==null&&!!(o.capabilities?.ai&&o.service?.aiChat));async function Me(t=!1){let n=o.service?.memoryHistory?.bind(o.service);if(n===void 0||Te)return;let r=Date.now();if(!(!t&&r-Ee<4e3)){Te=!0,Ee=r;try{let t=e(ne)===null?[]:[e(ne).groupId];z(g,await n({groupIds:t}),!0)}catch{}finally{Te=!1}}}async function Ne(){let e=o.service?.memoryAudit?.bind(o.service);if(e!==void 0)try{z(he,await e(),!0),z(U,null)}catch(e){z(U,v7(e),!0)}}function Pe(){let e=o.service?.memorySnapshot;return e===void 0?Promise.reject(Error(`Memory sampling is not available on this host`)):e.call(o.service)}let Fe=yTe({fetch:Pe,setTimer:(e,t)=>window.setTimeout(e,t),clearTimer:e=>window.clearTimeout(e),now:()=>Date.now(),isHidden:()=>document.hidden,onVisibilityChange:e=>(document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e))},{intervalMs:b,onSnapshot:e=>{u(e),z(_,null),Ce&&=(z(be,e.breakdown.usedBytes,!0),z(xe,Math.max(0,Math.round((Date.now()-Se)/1e3)),!0),!1),Me()},onError:e=>{z(_,v7(e),!0)}});ye(()=>(z(_e,p(),!0),Fe.start(),Ne(),()=>Fe.stop()));function Ie(){z(y,!e(y)),e(y)?Fe.stop():Fe.start()}function Le(e){z(x,e,!0),Fe.setInterval(e)}function Re(t){z(Ge,0);let n=new Set(e(C));n.has(t)?n.delete(t):n.add(t),z(C,n,!0)}function ze(e){z(ne,e,!0),Me(!0)}function Be(e){z(re,{pid:e.pid,startTimeUs:e.startTimeUs},!0)}function Ve(e,t){z(re,null),Xe(`manual`,[{kind:`process`,pid:e.pid,startTimeUs:e.startTimeUs}],t)}let He=q(()=>[...u()?.groups??[]].sort((e,t)=>t.footprintBytes-e.footprintBytes).slice(0,6)),Ue=q(()=>u()===null?[]:O5(u()));function We(t,n){let r={key:t,groupId:n.groupId,name:n.name,origin:`manual`,reason:null,stagedAt:new Date().toISOString()};z(ae,B9(e(ae),r),!0)}let Ge=P(0);function Ke(){if(u()===null)return;let t=0;for(let n of e(C))if(n.startsWith(`group:`)){let e=u().groups.find(e=>`group:${e.groupId}`===n);if(e===void 0)continue;if(e.protection!==null){t+=1;continue}We(n,{kind:`group`,groupId:e.groupId,name:e.name,footprintBytes:e.footprintBytes})}else if(n.startsWith(`proc:`)){let e=u().processes.find(e=>`proc:${e.pid}:${e.startTimeUs}`===n);if(e===void 0)continue;if(e.protection!==null){t+=1;continue}We(n,{kind:`process`,pid:e.pid,startTimeUs:e.startTimeUs,name:e.name,groupId:e.groupId,footprintBytes:e.footprintBytes})}z(Ge,t,!0),z(C,new Set,!0)}function qe(t){z(ae,e(ae).filter(e=>e.key!==t),!0)}function Je(t){e(_e).includes(t)||(z(_e,[...e(_e),t],!0),m(e(_e)))}async function Ye(){z(ce,!0),z(le,null),z(B,!0);let t=o.service?.memoryCandidates?.bind(o.service);if(t===void 0){z(B,!1);return}try{z(le,await t({exclude:e(_e)}),!0)}catch(e){z(_,v7(e),!0),z(ce,!1)}finally{z(B,!1)}}async function Xe(e,t,n){let r=o.service?.memoryTerminatePlan?.bind(o.service);if(r===void 0||t.length===0)return;z(pe,!0),z(fe,null),z(de,null),z(G,null),z(be,null),z(xe,null);let i={targets:[...t],mode:n,origin:e};try{z(ue,await r(i),!0)}catch(e){z(fe,v7(e),!0),z(ue,null)}finally{z(pe,!1)}}function Ze(){z(oe,!1),Xe(s(e(ae)),c(e(ae)),`graceful`)}function Qe(e){z(ce,!1),Xe(`freeUp`,e.slice(0,20).map(e=>({kind:`group`,groupId:e})),`graceful`)}function $e(e,t){z(ne,null),Xe(`manual`,[{kind:`group`,groupId:e.groupId}],t)}function et(e){z(de,null),z(ue,null),Xe(`manual`,[{kind:`process`,pid:e.pid,startTimeUs:e.startTimeUs}],`force`)}async function tt(e){let t=o.service?.memoryTerminateExecute?.bind(o.service);if(t!==void 0){z(me,!0),z(fe,null),z(G,u()?.breakdown.usedBytes??null,!0),z(be,null),z(xe,null),Se=Date.now(),Ce=!0;try{z(de,await t({planId:e.planId,confirm:!0}),!0),Ne()}catch(e){z(fe,v7(e),!0),z(ue,null),Ce=!1}finally{z(me,!1)}}}async function nt(e){let t=o.service?.reopenApp?.bind(o.service);if(t!==void 0){z(ge,e,!0);try{await t({auditId:e})}catch(e){z(U,v7(e),!0)}finally{z(ge,null)}}}var rt=k(),it=K(rt),at=r=>{var i=BTe(),a=H(i),o=r=>{var i=G9(),a=K(i);J2(a,{state:`error`,title:`Could not read memory`,get detail(){return e(_)}});var o=R(a,2);t(o,()=>pN,(e,t)=>{t(e,{variant:`secondary`,size:`sm`,onclick:()=>{Fe.stop(),Fe.start()},children:(e,t)=>{n();var r=W(`Retry`);d(e,r)},$$slots:{default:!0}})}),d(r,i)},s=e=>{var t=zTe();d(e,t)};h(a,t=>{e(_)?t(o):t(s,-1)}),V(i),d(r,i)},ot=r=>{var a=eEe(),s=K(a),c=H(s),f=H(c),p=r=>{var i=G9(),a=K(i);t(a,()=>pN,(e,t)=>{t(e,{onclick:()=>void Ye(),children:(e,t)=>{n();var r=W(`Free up memory…`);d(e,r)},$$slots:{default:!0}})});var o=R(a,2);t(o,()=>pN,(t,r)=>{r(t,{variant:`outline`,onclick:()=>z(oe,!0),children:(t,r)=>{n();var i=W();I(()=>X(i,`Quit list (${e(ae).length??``})`)),d(t,i)},$$slots:{default:!0}})}),d(r,i)},m=e=>{var t=VTe();d(e,t)};h(f,t=>{e(De)?t(p):t(m,-1)});var b=R(f,2),P=e=>{var r=k(),i=K(r);t(i,()=>pN,(e,t)=>{t(e,{variant:`outline`,onclick:()=>z(se,!0),children:(e,t)=>{n();var r=W(`AI advisor`);d(e,r)},$$slots:{default:!0}})}),d(e,r)};h(b,t=>{e(je)&&t(P)});var F=R(b,2),_e=e=>{var t=HTe();d(e,t)};h(F,t=>{e(y)&&t(_e)}),V(c);var ve=R(c,2),ye=t=>{{let n=q(()=>`${e(_)} — last reading ${new Date(u().sampledAt).toLocaleTimeString()}`);J2(t,{state:`error`,title:`Memory sampling failed`,get detail(){return e(n)}})}};h(ve,t=>{e(_)&&t(ye)});var Se=R(ve,2),Ce=r=>{var a=qTe(),s=K(a),c=H(s);Rfe(c,{get snapshot(){return u()},get history(){return e(g)}}),Ufe(R(c,2),{get breakdown(){return u().breakdown}}),V(s);var l=R(s,2),f=r=>{var i=UTe(),a=H(i);pA(a,{class:`size-4 shrink-0 text-amber-500`});var s=R(a,2),c=H(s),l=L(c,!0),u=R(c);V(s);var f=R(s,2),p=e=>{var r=k(),i=K(r);t(i,()=>pN,(e,t)=>{t(e,{variant:`outline`,size:`sm`,onclick:()=>o.onSection?.(`stale`),children:(e,t)=>{n();var r=W(`Review stale`);d(e,r)},$$slots:{default:!0}})}),d(e,r)};h(f,e=>{o.onSection&&e(p)}),V(i),I(()=>{X(l,e(Ue).length),X(u,` ${e(Ue).length===1?`process looks`:`processes look`} left behind — orphaned
|
|
162
|
-
runtimes, stopped processes, or long-idle leftovers.`)}),d(r,i)};h(l,t=>{e(Ue).length>0&&t(f)});var p=R(l,2),m=H(p),_=R(H(m),2),y=e=>{var t=WTe();j(`click`,t,()=>o.onSection?.(`processes`)),d(e,t)};h(_,e=>{o.onSection&&e(y)}),V(m);var b=R(m,2);v(b,21,()=>e(He),e=>e.groupId,(t,n)=>{let r=q(()=>u().breakdown.usedBytes<=0?0:Math.min(100,e(n).footprintBytes/u().breakdown.usedBytes*100));var a=GTe(),o=H(a),s=H(o);e4(s,{get kind(){return e(n).kind}});var c=R(s,2),l=L(c,!0),f=R(c,2),p=L(f),m=R(f,2),h=L(m,!0);V(o),V(a),I(t=>{Y(o,`title`,`Open ${e(n).name}`),X(l,e(n).name),i(p,`width: ${e(r)}%`),X(h,t)},[()=>hk(e(n).footprintBytes)]),j(`click`,o,()=>ze(e(n))),d(t,a)},e=>{var t=KTe();d(e,t)}),V(b),V(p),d(r,a)},J=r=>{let i=t=>{var n=JTe(),r=H(n),i=t=>{{let n=q(()=>e(M)??e(O)??u().processes.find(e=>e.pid===1)?.pid??u().processes[0].pid),r=q(()=>e(M)===null?void 0:()=>N(null)),i=q(()=>e(A)===`flow`),a=q(()=>e(A)===`flow`?`w-full min-h-[28rem] flex-1`:`w-full`);Wbe(t,{get snapshot(){return u()},get pid(){return e(n)},get maxDepth(){return e(ee)},onFocus:e=>z(M,e,!0),onEnter:N,get onClose(){return e(r)},get expanded(){return e(i)},onToggleExpand:()=>te(`flow`),get class(){return e(a)}})}};h(r,e=>{u()&&u().processes.length>0&&e(i)}),V(n),I(()=>we(n,1,`min-w-0 ${e(A)===`flow`?`flex min-h-0 flex-1 flex-col`:``}`,`svelte-mh5rar`)),d(t,n)},a=q(()=>E(u()));var o=$Te(),s=K(o);Xfe(s,{get groups(){return u().groups},get usedBytes(){return u().breakdown.usedBytes},get selection(){return e(C)},onSelect:Re});var c=R(s,2);v(c,21,()=>j2,e=>e.id,(t,n)=>{{let r=q(()=>ude(u(),e(n))),i=q(()=>e(T)?.presetId===e(n).id?e(T).ruleId:null);ife(t,{get label(){return e(n).label},get description(){return e(n).description},get summary(){return e(r)},get usedBytes(){return u().breakdown.usedBytes},get selected(){return e(i)},onSelect:t=>z(T,t===null?null:{presetId:e(n).id,ruleId:t},!0)})}}),V(c);var l=R(c,2),f=r=>{var i=ZTe(),a=H(i),o=r=>{var i=YTe(),a=K(i),o=L(a),s=R(a,2);t(s,()=>pN,(e,t)=>{t(e,{size:`sm`,onclick:Ke,children:(e,t)=>{n();var r=W(`Add to Quit list`);d(e,r)},$$slots:{default:!0}})});var c=R(s,2);t(c,()=>pN,(e,t)=>{t(e,{size:`sm`,variant:`ghost`,onclick:()=>z(C,new Set,!0),children:(e,t)=>{n();var r=W(`Clear selection`);d(e,r)},$$slots:{default:!0}})}),I(()=>X(o,`${e(C).size??``} selected`)),d(r,i)};h(a,t=>{e(C).size>0&&t(o)});var s=R(a,2),c=t=>{var n=XTe(),r=L(n);I(()=>X(r,`${e(Ge)??``} protected ${e(Ge)===1?`item was`:`items were`} not added.`)),d(t,n)};h(s,t=>{e(Ge)>0&&t(c)}),V(i),d(r,i)};h(l,t=>{e(De)&&(e(C).size>0||e(Ge)>0)&&t(f)});var p=R(l,2),m=H(p),g=r=>{var i=QTe(),o=H(i),s=H(o);{let r=q(()=>e(w)===`table`?`secondary`:`ghost`);t(s,()=>pN,(t,i)=>{i(t,{size:`sm`,get variant(){return e(r)},onclick:()=>z(w,`table`),children:(e,t)=>{n();var r=W(`By size`);d(e,r)},$$slots:{default:!0}})})}var c=R(s,2);{let r=q(()=>e(w)===`tree`?`secondary`:`ghost`);t(c,()=>pN,(t,i)=>{i(t,{size:`sm`,get variant(){return e(r)},onclick:()=>z(w,`tree`),children:(e,t)=>{n();var r=W(`Process tree`);d(e,r)},$$slots:{default:!0}})})}var l=R(c,2);{let n=q(()=>e(A)===`table`?`Restore the table size`:`Expand the table to fill the view`);t(l,()=>pN,(t,r)=>{r(t,{size:`sm`,variant:`ghost`,class:`ml-auto`,get"aria-label"(){return e(n)},onclick:()=>te(`table`),children:(t,n)=>{var r=k(),i=K(r),a=e=>{DA(e,{class:`size-3.5`})},o=e=>{EA(e,{class:`size-3.5`})};h(i,t=>{e(A)===`table`?t(a):t(o,-1)}),d(t,r)},$$slots:{default:!0}})})}V(o);var u=R(o,2),f=t=>{{let n=q(()=>e(De)?We:void 0),r=q(()=>e(De)?e=>e.kind===`group`?$e(e.group,`graceful`):Ve(e.process,`graceful`):void 0),i=q(()=>e(De)?e=>e.kind===`group`?$e(e.group,`force`):Ve(e.process,`force`):void 0);Wpe(t,{get snapshot(){return e(a)},get query(){return e(S)},get selection(){return e(C)},get selectedPid(){return e(M)},onFocus:N,onSelect:Re,onOpen:ze,onOpenProcess:Be,get onStage(){return e(n)},get onQuit(){return e(r)},get onForceQuit(){return e(i)},onQueryChange:e=>z(S,e,!0),get intervalMs(){return e(x)},onIntervalChange:Le,get paused(){return e(y)},onTogglePause:Ie})}},p=t=>{{let n=q(()=>e(De)?We:void 0);$pe(t,{get snapshot(){return e(a)},get search(){return e(S).search},onSearchChange:t=>z(S,{...e(S),search:t},!0),get selection(){return e(C)},onSelect:Re,onOpen:ze,onOpenProcess:Be,onFocus:N,get focusPid(){return e(M)},get onStage(){return e(n)},get scope(){return e(D)},onScopeChange:e=>z(D,e,!0)})}};h(u,t=>{e(w)===`table`?t(f):t(p,-1)}),V(i),d(r,i)};h(m,t=>{(e(A)===null||e(A)===`table`)&&t(g)});var _=R(m,2),b=t=>{{let n=q(()=>e(A)===`explorer`);RTe(t,{get snapshot(){return e(a)},get focusPid(){return e(O)},get selectedPid(){return e(M)},get expanded(){return e(n)},onToggleExpand:()=>te(`explorer`),onSelect:e=>z(M,e,!0),onFocus:N,onDetails:Be,get depth(){return e(ee)},set depth(e){z(ee,e,!0)}})}};h(_,t=>{(e(A)===null||e(A)===`explorer`)&&t(b)});var j=R(_,2),P=e=>{i(e)};h(j,t=>{(e(A)===null||e(A)===`flow`)&&t(P)}),V(p);var F=R(p,2),ne=e=>{var t=K9();d(e,t)};h(F,t=>{e(De)||t(ne)}),I(()=>we(p,1,`memory-panels ${e(A)===null?``:`flex-1`}`,`svelte-mh5rar`)),d(r,o)},Te=t=>{axe(t,{get processes(){return e(Ue)},get terminateAvailable(){return e(De)},onOpenProcess:Be,onQuit:e=>Ve(e,`graceful`)})},Ee=t=>{var n=G9(),r=K(n);{let t=q(()=>e(Oe)&&e(De));dSe(r,{get log(){return e(he)},get reopenAvailable(){return e(t)},onReopen:e=>void nt(e),get reopenBusyId(){return e(ge)},get error(){return e(U)}})}var i=R(r,2),a=e=>{var t=K9();d(e,t)};h(i,t=>{e(De)||t(a)}),d(t,n)};h(Se,e=>{l()===`overview`?e(Ce):l()===`processes`?e(J,1):l()===`stale`?e(Te,2):l()===`activity`&&e(Ee,3)}),V(s);var Me=R(s,2);{let t=q(()=>e(De)?We:void 0);vxe(Me,{get snapshot(){return u()},get group(){return e(ne)},get history(){return e(g)},onClose:()=>z(ne,null),onQuit:e=>$e(e,`graceful`),onForceQuit:e=>$e(e,`force`),get onStage(){return e(t)},onOpenProcess:e=>{z(ne,null),z(re,{pid:e.pid,startTimeUs:e.startTimeUs},!0)}})}var Ne=R(Me,2);{let t=q(()=>e(De)?We:void 0);eCe(Ne,{get snapshot(){return u()},get process(){return e(ie)},get terminateAvailable(){return e(De)},onClose:()=>z(re,null),get onStage(){return e(t)},onQuit:e=>Ve(e,`graceful`),onForceQuit:e=>Ve(e,`force`),onOpenProcess:e=>z(re,{pid:e.pid,startTimeUs:e.startTimeUs},!0),onOpenGroup:e=>{z(re,null),ze(e)}})}var Pe=R(Ne,2);Uxe(Pe,{get open(){return e(oe)},get entries(){return e(ae)},onClose:()=>z(oe,!1),onRemove:qe,onReview:Ze,onClear:()=>z(ae,[],!0),get planning(){return e(pe)},get terminateAvailable(){return e(De)}});var Fe=R(Pe,2);{let t=q(()=>e(Ae)??void 0);R9(Fe,{get open(){return e(se)},get available(){return e(je)},get port(){return e(ke)},get memory(){return e(t)},get presets(){return WCe},onClose:()=>z(se,!1)})}var Xe=R(Fe,2);{let t=q(()=>e(pe)||e(B));nSe(Xe,{get open(){return e(ce)},get candidates(){return e(le)},onReview:Qe,onClose:()=>z(ce,!1),onNeverSuggest:Je,get planning(){return e(t)}})}Fxe(R(Xe,2),{get plan(){return e(ue)},get outcome(){return e(de)},get error(){return e(fe)},get executing(){return e(me)},onConfirm:e=>void tt(e),onForceQuit:et,onClose:()=>{z(ue,null),z(de,null),z(fe,null)},get measuredBeforeBytes(){return e(G)},get measuredAfterBytes(){return e(be)},get measuredSeconds(){return e(xe)}}),d(r,a)};h(it,e=>{u()===null?e(at):e(ot,-1)}),d(r,rt),a()}p([`click`]),p([`click`]);function nEe(e){return e.request===e.sequence&&e.view===`apps`}var q9=`spacelens.recentAppScans`,J9=5;function rEe(){try{let e=window.localStorage.getItem(q9);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function iEe(e){if(typeof e!=`object`||!e)return null;let t=e,n=Mle.safeParse({appId:t.appId,appName:t.appName,auditId:t.auditId,lastScannedAt:t.lastScannedAt});if(!n.success)return null;let r={...n.data};return typeof t.generatedAt==`string`&&(r.generatedAt=t.generatedAt),t.stale===!0&&(r.stale=!0),r}function Y9(){return rEe().map(iEe).filter(e=>e!==null).slice(0,J9)}function aEe(e){let t=[{appId:e.appId,appName:e.appName,auditId:e.auditId,lastScannedAt:new Date().toISOString(),...e.generatedAt?{generatedAt:e.generatedAt}:{}},...Y9().filter(t=>t.appId!==e.appId)].slice(0,J9);window.localStorage.setItem(q9,JSON.stringify(t))}function oEe(e){let t=Y9().map(t=>t.appId===e?{...t,stale:!0}:t);window.localStorage.setItem(q9,JSON.stringify(t))}function sEe(e){let t=Y9().filter(t=>t.appId!==e);window.localStorage.setItem(q9,JSON.stringify(t))}function X9(e,t){return!!(e.stale===!0||t&&e.auditId!==t)}var Z9=(e,t,n,r,i,a)=>({path:e,label:t,classification:n,purgeable:i,comment:a??null,size:r,source:`catalog`}),Q9=1024**3,$9=1024**2,cEe={platform:`macos`,generatedAt:new Date().toISOString(),auditId:`audit_fixture0000000000000000`,apps:[{id:`codex-cli`,name:`Codex CLI`,kind:`cli`,source:`catalog`,bundleId:null,appPath:null,installedSize:0,totalSize:24*Q9+500*$9,locations:[Z9(`/Users/demo/.codex/worktrees`,`Agent worktrees`,`user-data`,11.2*Q9,!0,`Git worktrees created by agent runs. May contain uncommitted work — review before deleting.`),Z9(`/Users/demo/.codex/sessions`,`Chat session logs`,`user-data`,9.05*Q9,!0,`One JSONL per conversation. Months of sessions can reach tens of GB — back up first.`),Z9(`/Users/demo/.codex`,`Codex data root`,`support`,3.67*Q9,!1,`Config, auth and history databases; the itemized subfolders above are the big movers.`),Z9(`/Users/demo/.codex/packages/standalone/releases`,`Historical CLI releases`,`versions`,634*$9,!0,`Every release the updater ever kept (~250 MB each). Only the current one is used.`)]},{id:`claude-desktop`,name:`Claude`,kind:`app`,source:`catalog`,bundleId:`com.anthropic.claudefordesktop`,appPath:`/Applications/Claude.app`,installedSize:812*$9,totalSize:1.11*Q9,locations:[Z9(`/Users/demo/Library/Application Support/Claude/claude-code-vm`,`Sandbox VM images`,`re-downloadable`,296*$9,!0,`Linux VM images used for sandboxed code execution. Re-downloaded on next use.`),Z9(`/Users/demo/Library/Application Support/Claude`,`Claude data root`,`support`,40*$9,!1)]},{id:`com.apple.Xcode`,name:`Xcode`,kind:`app`,source:`heuristic`,bundleId:`com.apple.dt.Xcode`,appPath:`/Applications/Xcode.app`,installedSize:3.6*Q9,totalSize:3.62*Q9,locations:[Z9(`/Users/demo/Library/Developer/Xcode/DerivedData`,`Derived data`,`cache`,20*$9,!1)]},{id:`npm-cache`,name:`npm cache`,kind:`cli`,source:`catalog`,bundleId:null,appPath:null,installedSize:0,totalSize:1.47*Q9,locations:[Z9(`/Users/demo/.npm/_cacache`,`Package download cache`,`cache`,1.47*Q9,!0,`Safe to clear (npm cache clean --force); contents re-download on demand.`)]},{id:`pnpm-store`,name:`pnpm store`,kind:`cli`,source:`catalog`,bundleId:null,appPath:null,installedSize:0,totalSize:6.4*Q9,locations:[Z9(`/Users/demo/Library/pnpm`,`pnpm store and global bin`,`support`,6.4*Q9,!1,`Content-addressable package store. Old-generation stores can be reclaimed with pnpm store prune.`)]}],totalApps:5,truncated:!1};function lEe(){return typeof window<`u`&&window.location.hash.includes(`audit-fixture`)}function uEe(){typeof document<`u`&&(document.documentElement.removeAttribute(`macos`),delete document.documentElement.dataset.backdrop)}var dEe={"/Applications/Claude.app":`data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2214%22%20fill%3D%22%23d97757%22%2F%3E%3Cg%20stroke%3D%22%23fff%22%20stroke-width%3D%224%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M32%2014v36M14%2032h36M19%2019l26%2026M45%2019L19%2045%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E`,"/Applications/Xcode.app":`data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2214%22%20fill%3D%22%231478f0%22%2F%3E%3Ccircle%20cx%3D%2232%22%20cy%3D%2232%22%20r%3D%2217%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%224%22%2F%3E%3Cpath%20d%3D%22M20%2044%2044%2020%22%20stroke%3D%22%23fff%22%20stroke-width%3D%225%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E`};function fEe(e){if(typeof document<`u`){let e=document.documentElement;e.style.setProperty(`--color-system-accent`,`#007aff`),e.style.setProperty(`--color-system-accent-foreground`,`#ffffff`),e.style.setProperty(`--primary`,`#007aff`),e.style.setProperty(`--primary-foreground`,`#ffffff`)}e.capabilities={apiMajor:1,contractVersion:`fixture`,scan:{start:!1,cancel:!1,discovery:!1,appAudit:!0,maxConcurrent:0},cleanup:{plan:!1,execute:!1,mode:`trash`,appPlan:!0,appExecute:!0},host:{folderPicker:!1,appLocationReveal:!0},icloud:`unavailable`};let t=e=>new Promise(t=>setTimeout(()=>t(e),350));e.service={baseUrl:`fixture`,health:()=>t({status:`ok`,serviceInstanceId:`fixture`,apiMajor:1,contractVersion:`fixture`}),capabilities:()=>t(e.capabilities),roots:()=>t({roots:[]}),startScan:()=>Promise.reject(Error(`fixture host cannot scan`)),scanStatus:()=>Promise.reject(Error(`fixture host cannot scan`)),cancelScan:()=>Promise.reject(Error(`fixture host cannot scan`)),treeSlice:()=>Promise.reject(Error(`fixture host cannot scan`)),children:()=>Promise.reject(Error(`fixture host cannot scan`)),plan:()=>Promise.reject(Error(`fixture host cannot plan engine cleanup`)),execute:()=>Promise.reject(Error(`fixture host cannot execute cleanup`)),appAudit:()=>t(JSON.parse(JSON.stringify(cEe))),appIcon:e=>{let n=dEe[e.appPath];return t(n?{dataUrl:n}:null)},appCleanupPlan:e=>Promise.reject({problem:{code:`InvalidRequest`,message:`fixture host cannot verify plans — sizes and classifications are illustrative only`},paths:e.paths}),appCleanupExecute:()=>Promise.reject({problem:{code:`InvalidRequest`,message:`fixture host cannot execute`}}),revealAppLocation:()=>t({revealed:!1})}}var pEe=A(`<div class="flex items-center gap-0.5 rounded-full border bg-background/90 p-0.5 shadow-sm backdrop-blur"><button type="button" class="view-switch-button">Storage</button> <button type="button" class="view-switch-button">Memory</button></div>`),mEe=A(`<div class="view-switch-pill fixed top-1.5 left-1/2 z-50 -translate-x-1/2" role="group" aria-label="Storage or memory view"><!></div>`),hEe=A(`<div data-tauri-drag-region="" class="fixed top-0 right-0 left-0 z-40 h-10"></div> <!>`,1),gEe=A(`<div class="workbench-shell compact-workbench windows:bg-sidebar"><!> <div class="workspace-body"><!> <div class="workspace-content windows:mr-3 windows:rounded-tl-lg windows:border windows:border-border windows:bg-background windows:pt-5"><!></div></div></div>`),_Ee=A(`<main class="scan-picker flex h-dvh min-h-0 flex-col bg-background text-foreground"><!> <div class="picker-layout flex min-h-0 flex-1 max-md:flex-col max-md:overflow-auto windows:bg-sidebar"><section class="flex min-h-0 min-w-0 flex-1 flex-col overflow-auto p-5 max-md:p-4 windows:rounded-tl-lg windows:border windows:border-border windows:bg-background linux:bg-background"><div class="flex min-h-0 w-full flex-1 flex-col"><div class="mb-4"><button type="button" class="text-sm text-muted-foreground underline-offset-4 hover:underline">← Back</button></div> <!></div></section></div></main>`),vEe=A(`<div class="pointer-events-none absolute inset-x-0 bottom-3 flex justify-center"><button type="button" class="pointer-events-auto text-xs text-muted-foreground underline-offset-4 hover:underline">App storage →</button></div>`),yEe=A(`<div class="relative"><!> <!></div>`),bEe=A(`<button type="button">Rescan</button>`),xEe=A(`<div class="workspace-notice" role="status"><span> </span><!><button type="button" aria-label="Dismiss notice">×</button></div>`),SEe=A(`<p class="chart-summary"> </p>`),CEe=A(`<div class="explorer-chart macos:bg-background macos:p-5 windows:rounded-lg windows:border windows:bg-background windows:p-4 linux:bg-background linux:p-5"><!> <!></div>`),wEe=A(`<div class="explorer-divider" role="separator" tabindex="0" aria-label="Resize folder contents"></div>`),TEe=A(`<button type="button">Clear selection</button>`),EEe=A(`<div class="load-more"><!></div>`),DEe=A(`<div class="explorer-pathbar macos:min-h-10 macos:px-4 windows:mx-4 windows:border-b-0 windows:px-2 linux:min-h-12 linux:px-5"><!> <!> <span> </span></div> <main><!> <!> <aside class="explorer-sidebar macos:bg-background macos:p-3 windows:rounded-lg windows:border windows:bg-card windows:p-3 linux:bg-card linux:p-4" aria-label="Folder contents"><div class="contents-heading macos:pb-3 windows:pb-4 linux:pb-4 windows:[&_h2]:text-base windows:[&_p]:text-xs linux:[&_h2]:text-sm linux:[&_p]:text-xs"><div><h2>Folder contents</h2> <p> </p></div> <div class="browse-sort"><!></div></div> <label class="browse-search relative mx-1 mb-2 block"><!></label> <div class="browse-selection"><button type="button"> </button><!></div> <!> <!></aside></main>`,1),OEe=A(`<span> </span><strong> </strong><span>Review →</span>`,1),kEe=A(`<div class="workbench-shell compact-workbench windows:bg-sidebar"><!> <div class="workspace-body"><!> <div class="workspace-content windows:mr-3 windows:rounded-tl-lg windows:border windows:border-border windows:bg-background windows:pt-5"><!> <!> <!> <!> <!> <!></div></div> <footer class="workspace-status macos:min-h-8 macos:bg-(--chrome) windows:min-h-11 windows:border-t-0 windows:bg-sidebar linux:min-h-10 linux:bg-(--chrome)"><span><i></i> <span class="status-separator">·</span> </span><!></footer> <!> <!></div>`),AEe=A(`<!> <!> <!> <!>`,1);function jEe(r,o){J(o,!0);let s=t=>{var n=pEe(),r=H(n),i=R(r,2);V(n),I(()=>{Y(r,`aria-pressed`,!e(_)),Y(i,`aria-pressed`,e(_))}),j(`click`,r,()=>z(_,!1)),j(`click`,i,()=>z(_,!0)),d(t,n)},c=`local`,l=P(``),u=P(``),p=P(``),m=P(!1),g=P(!1),_=P(!1),v=P(`overview`),y=P(null),b=P(null),x=P(!1),S=P(!0),C=P(!0),w=P(!1);P(null),P(null);let T=P(ve([])),E=P(c);P(!1),P(!1),P(null),P(null),P(null),P(!1),q(()=>e(T).find(t=>t.deviceId===e(E))?.label??(e(E)===c?`This machine`:e(E)));let D=`spacelens.contentsWidth`,O=`spacelens.contentsHeight`,ee=`spacelens.layoutDirection`,A=`spacelens.memory.section`,te=P(340),M=P(300),N=P(`auto`),F=P(1440),ne=q(()=>e(N)===`auto`?e(F)<900?`vertical`:`horizontal`:e(N)),re=P(!1),ie=P(null),ae=q(()=>Poe($.slice?.focusNode.path??e(gt)[0]??$.status?.label,$.status?.volumes??[],$.volumes)),oe=P(!1);async function se(){if($.status?.app){await vn();return}let t=e(gt).length>0?e(gt):$.targets.map(e=>e.path);if(t.length!==0){z(oe,!0);try{await pn(t)}finally{z(oe,!1)}}}function ce(e){return Math.min(720,Math.max(240,Math.round(e)))}function le(e){return Math.min(640,Math.max(160,Math.round(e)))}function B(t){z(te,ce(t),!0),window.localStorage.setItem(D,String(e(te)))}function ue(t){z(M,le(t),!0),window.localStorage.setItem(O,String(e(M)))}function de(){e(ne)===`vertical`?ue(300):B(340)}function fe(e){z(N,e,!0),window.localStorage.setItem(ee,e)}function pe(e){z(v,e,!0);try{window.localStorage.setItem(A,e)}catch{}}function me(){z(F,window.innerWidth,!0)}function he(){fe(e(ne)===`vertical`?`horizontal`:`vertical`)}function U(t){let n=e(ie);if(!n)return;t.preventDefault(),z(re,!0);let r=n.getBoundingClientRect(),i=e(ne)===`vertical`,a=t.currentTarget;try{a.setPointerCapture(t.pointerId)}catch{}let o=e=>i?ue(r.bottom-e.clientY):B(r.right-e.clientX),s=()=>{z(re,!1),a.releasePointerCapture(t.pointerId),a.removeEventListener(`pointermove`,o),a.removeEventListener(`pointerup`,s),a.removeEventListener(`pointercancel`,s)};a.addEventListener(`pointermove`,o),a.addEventListener(`pointerup`,s),a.addEventListener(`pointercancel`,s)}function _e(t){let n=t.shiftKey?48:16;if(e(ne)===`vertical`){if(t.key===`ArrowUp`)ue(e(M)+n);else if(t.key===`ArrowDown`)ue(e(M)-n);else if(t.key===`Home`)ue(300);else return}else if(t.key===`ArrowLeft`)B(e(te)+n);else if(t.key===`ArrowRight`)B(e(te)-n);else if(t.key===`Home`)B(340);else return;t.preventDefault()}let G=P(`sunburst`),be=P(`nested`);function xe(e){z(G,e,!0),window.localStorage.setItem(n7,e)}function Ce(e){z(be,e,!0),window.localStorage.setItem(r7,e)}let Te=P(!1),Ee=P(``),De=P(!1),Ae=P(null),je=P(ve(h7())),Pe=P(ve(g7()));ge(()=>{let t=$.status;e(E)===c&&t?.state===`ready`&&t.coverage&&!t.app&&t.label&&e(Pe)[t.label]?.at!==t.updatedAt&&(jCe(t.label,{bytes:t.bytesScanned,entries:t.coverage.files+t.coverage.directories,at:t.updatedAt}),z(Pe,g7(),!0))});let Fe=P(ve(Y9())),Ie=P(ve(new Map)),Le=P(ve([])),Re=0,ze=P(ve(new Map)),Be=P(ve(e7(null))),Ve=P(null),He=P(ve({state:`idle`})),Ue=P(`unsupported`);ge(()=>{});let We=P(!1),Ge=P(`browse`),Ke=P(null),qe=P(ve([])),Je=P(!1),Ye=P(null),Xe=P(10*1024**2),Ze=0,Qe=P(null),$e=P(!1),et=P(null),tt=P(0),nt=0,rt=new Map;async function it(e){let t=rt.get(e);if(t)return t;let n=(async()=>{try{return(await $.service?.appIcon?.({appPath:e}))?.dataUrl??null}catch{return null}})();return rt.set(e,n),n}let at=P(``),ot=P(`size`),st=[{value:`size`,label:`Largest first`},{value:`name`,label:`Name`},{value:`path`,label:`Path`}],ct=q(()=>$.status?.coverage?.protection===`macos-no-materialization`),lt=q(()=>$.slice?{...$.slice.focusNode,name:_k($.slice.focusNode,e(ct))}:null),ut=q(()=>$.status?.rootIds.map((t,n)=>({value:t,label:e(gt)[n]===`/`?e(ct)?`Macintosh HD`:`Filesystem`:e(gt)[n]===`/System/Volumes/Data`?`Data`:e(gt)[n]?.split(/[\\/]/).at(-1)||`Location ${n+1}`}))??[]),dt=P(!1),ft=P(null),pt=P(null),mt=P(null),ht=P(null),gt=P(ve([])),_t=q(()=>C7({capabilities:$.capabilities,service:$.service})),vt=q(()=>zCe({capabilities:$.capabilities,service:$.service,coverage:$.status?.coverage,scannedPaths:e(gt)})),yt=q(()=>PCe({capabilities:$.capabilities,service:$.service})),bt=q(()=>LCe({capabilities:$.capabilities,service:$.service})),xt=q(()=>BCe({capabilities:$.capabilities,desktop:!1,coverage:$.status?.coverage})),St=q(()=>!!($.capabilities?.ai&&$.service?.aiChat)),Ct=q(()=>FCe({capabilities:$.capabilities,service:$.service})),wt=q(()=>ICe({capabilities:$.capabilities,service:$.service})),Tt=q(()=>W5($.capabilities?.host.platform,`reveal`)),Et=q(()=>W5($.capabilities?.host.platform,`open`)),Dt=q(()=>VCe({desktop:!1,ports:e(b),hostAi:e(St)})),Ot=q(()=>w7({capabilities:$.capabilities,service:$.service})),kt=q(()=>$.service===null?null:z9($.service)),At=q(()=>$.items.filter(t=>t.name.toLowerCase().includes(e(at).toLowerCase()))),jt=q(()=>e(At).filter(e=>kk(e))),Mt=q(()=>new Set($.items.filter(e=>{let t=Y5($.collector,e.path,$.activeScanId);return!!(t&&t.nodeId!==e.id)}).map(e=>e.id))),Nt=q(()=>$.status?.app!=null),Z=q(()=>$.status?.app??null),Pt=q(()=>e(Z)?.auditId??null),Ft=q(()=>e(Pt)?e(Ie).get(e(Pt))||(e(Qe)?.auditId===e(Pt)?e(Qe):null):null),It=q(()=>e(Z)?e(Ft)?.apps.find(t=>t.id===e(Z).appId)??null:null),Lt=q(()=>{if(!e(Z))return!1;let t=e(Fe).find(t=>t.appId===e(Z).appId);return!!(t&&X9(t,e(Qe)?.auditId??null)||e(Qe)?.auditId&&e(Z).auditId!==e(Qe).auditId)}),Rt=q(()=>{let t=new Set;for(let n of e(Le)){let r=n.app;if(!r)continue;let i=e(Fe).find(e=>e.appId===r.appId);(i&&X9(i,e(Qe)?.auditId??null)||e(Qe)?.auditId&&r.auditId!==e(Qe).auditId)&&t.add(n.scanId)}return $.status?.app&&e(Lt)&&$.activeScanId&&t.add($.activeScanId),t}),zt=q(()=>($.hoveredId?$.items.find(e=>e.id===$.hoveredId)??null:null)??e(lt)),Bt=q(()=>{let t=e(zt),n=$.slice?.focusNode;return e(Nt)&&t!==null&&t.depth===1&&n!==void 0&&n.depth===0&&Ck(n.path)}),Vt=q(()=>e(zt)?nie(e(zt),e(Bt),e(Ft),e(Z)?.appId??null):null),Ht=q(()=>!e(Nt)||!e(zt)?null:Tk(e(zt))?`audit-time`:`measured`),Ut=t7(`auto`,!1,typeof navigator<`u`?navigator.userAgent:``);ge(()=>{if(!e(We))return;let t=t7(e(Be).style,!1,navigator.userAgent);document.documentElement.dataset.interface=t,document.documentElement.dataset.density=e(Be).density,document.documentElement.style.setProperty(`--glass-strength`,String(lCe(e(Be).transparency))),window.localStorage.setItem($5,JSON.stringify(e(Be)))});let Wt=P(!1);function Gt(){try{let e=document.documentElement.dataset.backdrop;z(Wt,e===`glass`||e===`vibrancy`,!0)}catch{z(Wt,!1)}}let Kt=P(!1);function qt(){try{let e=window.__nativeHost;z(Kt,!!e?.state?.accent,!0)}catch{z(Kt,!1)}}ge(()=>{e(x)&&(Gt(),qt())}),ge(()=>{e(Be).accent;let t=window.__nativeHost;t?.apply?.(t.state)}),ge(()=>{let t=$.activeScanId;e(Xe),t&&e(Ge)!==`browse`&&e(Ge)!==`apps`&&$.status?.state===`ready`&&e(_t)&&Dn(!0)}),ge(()=>{e(tt);let t=e(Ge),n=e(Qe),r=e(et);t===`apps`&&e(yt)&&n===null&&r===null&&On()});let Jt=P(!1),Yt=0,Xt=null,Zt=null;typeof navigator<`u`&&/Macintosh|Mac OS X/i.test(navigator.userAgent),typeof navigator<`u`&&/Windows/i.test(navigator.userAgent);function Qt(){return`px-4`}let $t=q(()=>$.resolvedUrl!==null&&!$.sameOrigin&&!/^https?:\/\/(localhost|127\.0\.0\.1|\[::1\])(:|\/|$)/i.test($.resolvedUrl)&&$.phase!==`ready`),en=q(()=>$.slice===null?[]:[...$.slice.ancestors,$.slice.focusNode].map(t=>({...t,name:_k(t,e(ct))}))),tn=q(()=>new Set($.collector.map(e=>e.nodeId))),nn=q(()=>new Set([...e(tn),...e(Mt)])),rn=q(()=>$.collector.reduce((e,t)=>e+t.size,0)),an=q(()=>{let t=$.targets??[],n=e(je).map((e,t)=>({id:`recent_${t}`,label:e.label,path:e.path,kind:`folder`,description:``,size:0,source:`recent`,removable:!0,lastScannedAt:e.lastScannedAt}));return[...t,...n].map(t=>t.path===`/`&&e(ct)?{...t,label:`Macintosh HD`}:t)});function on(t){let n=t.trim();return e(E),n}function sn(){Xt?.close(),Xt=null,Zt!==null&&clearInterval(Zt),Zt=null}async function cn(t,n){if(n!==null)return t.exchange(n,e($t)&&e(u)!==``?e(u):void 0);if(t.devSession!==void 0)try{return await t.devSession()}catch{}return t.exchange(``,e($t)&&e(u)!==``?e(u):void 0)}async function ln(){let t=d7(e(p)||null),[{createHttpService:n}]=await Promise.all([ke(()=>import(`../chunks/CEhA94eo.js`),[],import.meta.url)]),r=n({baseUrl:t.url,getToken:p7});if(r.devSession!==void 0){try{m7((await r.devSession()).token)}catch{return}await un()}}async function un(){$.phase=`connecting`,$.connectMessage=null;let t=d7(e(p)||null);$.resolvedUrl=t.url,$.sameOrigin=t.sameOrigin;let[{createHttpService:n}]=await Promise.all([ke(()=>import(`../chunks/CEhA94eo.js`),[],import.meta.url)]),r=n({baseUrl:t.url,getToken:p7});try{let n=await r.health();if(n.apiMajor!==1)throw new i7({code:`UnsupportedOperation`,message:`incompatible contract major ${n.apiMajor}`,retryable:!1},400);let i=e(l)===``?f7():e(l);(i||p7()===null)&&m7((await cn(r,i)).token),i!==null&&(DCe(t.url),OCe()),$.service=r,$.capabilities=await r.capabilities();let a=await r.roots();$.targets=Array.isArray(a?.roots)?a.roots:[],$.volumes=(await r.volumes?.().catch(()=>null))?.volumes??[],$.phase=`ready`,Xt=NCe()??null,dn(),new URLSearchParams(window.location.search).has(`autoscan`)||await fn()}catch(e){kCe(),$.phase=`failed`,$.connectMessage=v7(e)}}function dn(){Zt===null&&(Zt=setInterval(()=>{let{service:e,status:t}=$;e!==null&&t!==null&&t.state===`scanning`&&e.scanStatus(t.scanId).then(e=>{$.activeScanId===e.scanId&&($.status=e,e.app&&hn(e),e.state===`ready`&&_7())}).catch(()=>{})},2e3))}async function fn(){let t=sCe(window.sessionStorage.getItem(Z5)),n=$.service;if(t&&n)try{let r=await n.scanStatus(t.scanId);if(r.state!==`scanning`&&r.state!==`ready`){window.sessionStorage.removeItem(Z5);return}if(r.app&&hn(r),t.app&&r.app)z(gt,[],!0);else if(t.paths)z(gt,t.paths,!0),e(ze).set(r.scanId,e(gt));else{window.sessionStorage.removeItem(Z5);return}$.activeScanId=r.scanId,$.status=r,$.collector=x7(r.scanId),z(Te,!1),r.state===`ready`&&(t.focusNodeId&&await An(t.focusNodeId),$.slice||await _7())}catch{window.sessionStorage.removeItem(Z5)}}async function pn(t){let{service:n}=$;if(!(n===null||e(De)||$.deleting)){z(De,!0),$.error=null;try{let r=await n.startScan({localOnly:!0,paths:t.map(on),ignoreHidden:!1,respectGitignore:!t.some(e=>e===`/`||e===`/System/Volumes/Data`),ignoredMode:`summarize`,label:t.includes(`/`)&&t.includes(`/System/Volumes/Data`)?`Macintosh HD`:t[0]});if(e(E)===c){for(let e of t)MCe(e);z(je,h7(),!0)}z(gt,t.map(on),!0),e(ze).set(r.scanId,e(gt)),$.activeScanId&&$.activeScanId!==r.scanId&&b7($.activeScanId,$.collector),z(Te,!1),z(Ge,`browse`),z(at,``),z(ot,`size`),z(ht,null),z(ft,null),z(mt,null),Ze++,Yt++,z(Jt,!1),z(Je,!1),z(qe,[],!0),z(Ke,null),$.activeScanId=r.scanId,window.sessionStorage.setItem(Z5,JSON.stringify({scanId:r.scanId,paths:e(gt)})),$.status={scanId:r.scanId,state:`scanning`,message:``,progress:null,currentPath:null,bytesScanned:0,entriesScanned:0,rootIds:[],label:r.label,updatedAt:r.createdAt},$.slice=null,$.items=[],$.collector=[]}catch(e){$.error=v7(e)}finally{z(De,!1)}}}async function mn(){let{service:e,status:t}=$;if(e!==null&&t!==null)try{$.status=await e.cancelScan(t.scanId)}catch(e){$.error=v7(e)}}function hn(t){t.app&&z(Le,[t,...e(Le).filter(e=>e.scanId!==t.scanId)].slice(0,10),!0)}async function gn(t){let{service:n}=$;if(n?.startAppScan===void 0||e(De)||e(Ae)!==null||$.deleting)return;let r=e(Fe).find(e=>e.appId===t),i=e(Qe)?.apps.find(e=>e.id===t),a=i?e(Qe)?.auditId??r?.auditId:r?.auditId;if(!a){z(ht,`Run the audit first — an app scan needs the current audit generation.`);return}z(Ae,t,!0),$.error=null;try{let o=await n.startAppScan({auditId:a,appId:t});if(e(Qe)?.auditId===a){let t=new Map(e(Ie));t.set(a,e(Qe)),z(Ie,t,!0)}aEe({appId:t,appName:i?.name??o.app?.appName??r?.appName??t,auditId:a,generatedAt:e(Qe)?.auditId===a?e(Qe).generatedAt:r?.generatedAt??null}),z(Fe,Y9(),!0),$.activeScanId&&$.activeScanId!==o.scanId&&b7($.activeScanId,$.collector),z(gt,[],!0),z(Te,!1),z(Ge,`browse`),z(at,``),z(ot,`size`),z(ht,null),z(ft,null),z(mt,null),z(pt,null),Re++,Ze++,Yt++,z(Jt,!1),z(Je,!1),z(qe,[],!0),z(Ke,null),$.activeScanId=o.scanId,window.sessionStorage.setItem(Z5,JSON.stringify({scanId:o.scanId,app:{appId:t,auditId:a}})),$.status={scanId:o.scanId,state:`scanning`,message:``,progress:null,currentPath:null,bytesScanned:0,entriesScanned:0,rootIds:o.rootIds,label:o.label,updatedAt:o.createdAt,...o.app?{app:o.app}:{}},o.app&&hn($.status),$.slice=null,$.items=[],$.childrenTotal=0,$.collector=[]}catch(e){$.error=v7(e)}finally{z(Ae,null)}}async function _n(t){let{service:n}=$;if(!(n===null||$.deleting||e(dt)||e(De)||e(Ae)!==null)&&t!==$.activeScanId){$.activeScanId&&b7($.activeScanId,$.collector),Re++,z(ft,null),z(mt,null),z(pt,null),Yt++,z(Jt,!1);try{let r=await n.scanStatus(t);if(r.app&&hn(r),$.activeScanId=r.scanId,$.status=r,$.collector=x7(r.scanId),$.slice=null,$.items=[],$.childrenTotal=0,z(Ge,`browse`),z(at,``),Ze++,z(qe,[],!0),z(Ke,null),z(ht,null),r.app)z(gt,[],!0),window.sessionStorage.setItem(Z5,JSON.stringify({scanId:r.scanId,app:{appId:r.app.appId,auditId:r.app.auditId}}));else{let t=e(ze).get(r.scanId);if(t&&t.length>0)z(gt,t,!0);else try{z(gt,await Promise.all(r.rootIds.map(async e=>(await n.treeSlice({scanId:r.scanId,nodeId:e,depth:0,maxChildrenPerNode:1})).focusNode.path)),!0),e(ze).set(r.scanId,e(gt))}catch{z(gt,[],!0)}e(gt).length>0&&window.sessionStorage.setItem(Z5,JSON.stringify({scanId:r.scanId,paths:e(gt)}))}r.state===`ready`&&await _7()}catch(e){$.error=v7(e)}}}async function vn(){let t=$.status?.app;if(t){if(!e(Qe)?.auditId){z(ht,`Refresh the audit first — rescanning needs the current generation.`);return}z(oe,!0);try{await gn(t.appId)}finally{z(oe,!1)}}}async function yn(t){if(t.scanState===`skipped`){z(ht,`Not scanned: ${t.skipReason??`unavailable`}. See scan details for coverage.`);return}if(Dk(t)){z(ht,`This folder's own files are counted in the total — open the folder to explore its contents.`);return}let{service:n,status:r}=$;if(n===null||r===null||r.state!==`ready`)return;let i=++Yt;z(Jt,!0),$.error=null;try{let[a,o]=await Promise.all([n.treeSlice({scanId:r.scanId,nodeId:t.id,depth:3,maxChildrenPerNode:50}),n.children({scanId:r.scanId,nodeId:t.id,offset:0,limit:200,sort:e(ot)})]);if(i!==Yt||$.activeScanId!==r.scanId)return;$.hoveredId=null,$.slice=a,$.items=o.items,$.childrenTotal=o.total,z(at,``),window.sessionStorage.setItem(Z5,JSON.stringify({scanId:r.scanId,paths:e(gt),focusNodeId:t.id}))}catch(e){i===Yt&&($.error=v7(e))}finally{i===Yt&&z(Jt,!1)}}function bn(){let e=$.slice?.ancestors.at(-1);e&&yn(e)}function xn(){z(ft,null),z(mt,null)}function Sn(t){$.status===null||$.deleting||e(dt)||(xn(),$.collector=X5($.collector,t,$.status.scanId,new Date().toISOString(),`col_${crypto.randomUUID().slice(0,8)}`))}function Cn(t){$.deleting||e(dt)||(xn(),$.collector=$.collector.filter(e=>e.nodeId!==t.id))}function wn(t){e(tn).has(t.id)?Cn(t):Sn(t)}function Tn(e){xn(),$.collector=$.collector.filter(t=>t.id!==e)}function En(e){Yt++,z(Jt,!1),z(Ge,e,!0),e!==`browse`&&z(Xe,e===`large-files`?10*1024**2:0,!0),window.innerWidth<760&&z(S,!1)}async function Dn(t){let{service:n,status:r}=$;if(!n?.discover||r?.state!==`ready`||e(Ge)===`browse`||e(Ge)===`apps`)return;let i=++Ze,a=e(Ge),o=t?0:e(qe).length;z(Je,!0),z(Ye,null),t&&(z(Ke,null),z(qe,[],!0));try{let s=await n.discover({scanId:r.scanId,kind:a,minSize:e(Xe),offset:o,limit:200});if(i!==Ze||r.scanId!==$.activeScanId||e(Ge)!==a)return;z(Ke,s,!0),z(qe,t?s.items:[...e(qe),...s.items],!0)}catch(e){i===Ze&&z(Ye,v7(e),!0)}finally{i===Ze&&z(Je,!1)}}async function On(){let{service:t}=$;if(!t?.appAudit||e(Ge)!==`apps`&&!e(Te))return;let n=++nt;z($e,!0),z(et,null);try{let r=await t.appAudit({minSize:e(tt),includeHeuristic:!0,limit:500}),i=e(Ge)===`apps`||e(Te)?`apps`:e(Ge);if(!nEe({request:n,sequence:nt,view:i}))return;z(Qe,r,!0)}catch(e){n===nt&&z(et,v7(e),!0)}finally{n===nt&&z($e,!1)}}async function kn(){let{service:t,status:n,slice:r}=$;if(!t||!n||!r||e(Jt))return;let i=++Yt;z(Jt,!0);try{let a=await t.children({scanId:n.scanId,nodeId:r.focusNode.id,offset:$.items.length,limit:200,sort:e(ot)});if(i!==Yt||n.scanId!==$.activeScanId)return;$.items=[...$.items,...a.items],$.childrenTotal=a.total}catch(e){$.error=v7(e)}finally{i===Yt&&z(Jt,!1)}}async function An(t,n=!1){let{service:r,status:i}=$;if(!r||!i)return;let a=++Yt,o=e(Ge);try{let s=await r.treeSlice({scanId:i.scanId,nodeId:t,depth:3,maxChildrenPerNode:50});if(a!==Yt||i.scanId!==$.activeScanId||e(Ge)!==o)return;n&&En(`browse`),await yn(s.focusNode)}catch(e){a===Yt&&i.scanId===$.activeScanId&&($.error=v7(e))}}async function jn(e){let t=e.parentId??$.status?.rootIds[0];t&&await An(t,!0)}async function Mn(e){try{await navigator.clipboard.writeText(e),z(ht,`Path copied`)}catch{z(ht,`Copy this path: ${e}`)}}async function Nn(e,t){let n=$.service;if(!n?.revealPath){z(ht,`This host cannot open folders in a file manager`);return}try{await n.revealPath({path:e.path,action:t}),z(ht,t===`open`?`Opened ${e.name}`:`Revealed ${e.name}`,!0)}catch(e){z(ht,v7(e),!0)}}function Pn(t=``){$.deleting||e(dt)||(Yt++,z(Jt,!1),z(Ee,t,!0),z(Te,!0))}function Fn(t){z(je,e(je).filter(e=>e.path!==t),!0),window.localStorage.setItem(`spacelens.recentScans`,JSON.stringify(e(je)))}async function In(){let{service:t,status:n,collector:r}=$;if(!t||!n||!r.length||!$.capabilities?.cleanup.plan||e(dt))return;let i=n.scanId,a=++Re,o=r.filter(e=>e.scanId===i).map(e=>e.nodeId);if(o.length!==0){z(dt,!0),z(mt,null),z(pt,null);try{let e=await t.plan({scanId:i,nodeIds:o});if(!S7({request:a,sequence:Re,activeScanId:$.activeScanId,scanId:i}))return;z(ft,e,!0)}catch(e){if(!S7({request:a,sequence:Re,activeScanId:$.activeScanId,scanId:i}))return;z(mt,v7(e),!0)}finally{S7({request:a,sequence:Re,activeScanId:$.activeScanId,scanId:i})&&z(dt,!1)}}}async function Ln(){let{service:t}=$,n=e(ft);if(t&&n&&!$.deleting&&$.capabilities?.cleanup.execute){$.deleting=!0,z(mt,null);try{z(pt,await t.execute({planId:n.planId,confirm:!0}),!0);let r=new Set(e(pt).trashed.map(e=>e.path));$.collector=$.collector.filter(e=>!r.has(e.path)),z(ft,null);let i=$.status?.app;i&&(oEe(i.appId),z(Fe,Y9(),!0)),z(ht,`${e(pt).trashed.length} items moved to Trash. Rescan to update the storage map.`)}catch(e){z(mt,v7(e),!0),z(ft,null)}finally{$.deleting=!1}}}function Rn(e){sEe(e),z(Fe,Y9(),!0)}ye(()=>{if(lEe()){fEe($),uEe(),$.phase=`ready`,z(Ge,`apps`),z(Be,e7(window.localStorage.getItem($5)),!0),z(We,!0),Gt(),On();return}z(Be,e7(window.localStorage.getItem($5)),!0);let e=window.localStorage.getItem(n7);z(G,uCe(e),!0),z(be,dCe(window.localStorage.getItem(r7),e),!0);let t=Number(window.localStorage.getItem(D));Number.isFinite(t)&&t>0&&z(te,ce(t),!0);let n=Number(window.localStorage.getItem(O));Number.isFinite(n)&&n>0&&z(M,le(n),!0);let r=window.localStorage.getItem(ee);(r===`horizontal`||r===`vertical`||r===`auto`)&&z(N,r,!0),z(v,fSe(window.localStorage.getItem(A)),!0),z(F,window.innerWidth,!0),window.addEventListener(`resize`,me),z(We,!0),Gt(),window.innerWidth<760&&z(S,!1);let i=d7(null);$.resolvedUrl=i.url,$.sameOrigin=i.sameOrigin;let a=f7(),o=new URLSearchParams(window.location.search).get(`autoscan`);return a!==null||p7()!==null?un().then(()=>{if(o!==null&&$.phase===`ready`)return pn($.targets.map(e=>e.path))}):ln().then(()=>{if(o!==null&&$.phase===`ready`)return pn($.targets.map(e=>e.path))}),()=>{window.removeEventListener(`resize`,me),sn()}});var zn=AEe(),Bn=K(zn),Vn=e=>{var t=mEe(),n=H(t);s(n),V(t),d(e,t)};h(Bn,t=>{$.phase===`ready`&&e(Ot)&&t(Vn)});var Hn=R(Bn,2),Un=t=>{var n=hEe(),r=R(K(n),2);{let t=q(()=>$.phase===`failed`?`failed`:$.phase===`connecting`?`connecting`:`idle`);Cfe(r,{get phase(){return e(t)},get resolvedUrl(){return $.resolvedUrl},get sameOrigin(){return $.sameOrigin},get hosted(){return e($t)},get ticket(){return e(l)},get password(){return e(u)},get message(){return $.connectMessage},onBaseUrl:e=>z(p,e,!0),onTicket:e=>z(l,e,!0),onPassword:e=>z(u,e,!0),onConnect:()=>void un()})}d(t,n)},Wn=t=>{var n=gEe(),r=H(n);{let t=q(Qt),n=q(()=>void 0);aG(r,{title:`Memory`,get subtitle(){return V5[e(v)]},mode:`browser`,get chromeInset(){return e(t)},get sidebarVisible(){return e(S)},get deviceLabel(){return e(n)},onOpenDevices:void 0,onToggleSidebar:()=>z(S,!e(S)),onOpenSettings:()=>z(x,!0)})}var i=R(r,2),a=H(i),o=t=>{bSe(t,{get section(){return e(v)},onSection:pe,get snapshot(){return e(y)}})};h(a,t=>{e(S)&&t(o)});var s=R(a,2);tEe(H(s),{get service(){return $.service},get capabilities(){return $.capabilities},get section(){return e(v)},onSection:pe,get snapshot(){return e(y)},set snapshot(e){z(y,e,!0)}}),V(s),V(i),V(n),d(t,n)},Gn=t=>{var n=k(),r=K(n),i=t=>{var n=_Ee(),r=H(n);{let t=q(Qt),n=q(()=>void 0),i=q(()=>`${Oe}/logo-mark.png`);aG(r,{title:`App storage`,mode:`browser`,get chromeInset(){return e(t)},sidebarVisible:!1,get deviceLabel(){return e(n)},onOpenDevices:void 0,onOpenSettings:()=>z(x,!0),get logo(){return e(i)}})}var i=R(r,2),a=H(i),o=H(a),s=H(o),c=L(s),l=R(s,2);f(l,()=>e(Ge),t=>{{let n=q(()=>$.deleting||e(dt)||e(Ae)!==null),r=q(()=>new Map(e(Fe).filter(e=>e.stale===!0).map(e=>[e.appId,!0])));F2(t,{get report(){return e(Qe)},get loading(){return e($e)},get error(){return e(et)},get minSize(){return e(tt)},get disabled(){return e(n)},get scanAvailable(){return e(bt)},get scanningAppId(){return e(Ae)},get staleByApp(){return e(r)},onRefresh:()=>void On(),onMinSize:e=>z(tt,e,!0),onCopy:e=>void Mn(e),onIcon:it,onScanApp:e=>void gn(e.id)})}}),V(o),V(a),V(i),V(n),j(`click`,c,()=>z(Ge,`browse`)),d(t,n)},a=t=>{var n=yEe(),r=H(n);{let t=q(()=>$.capabilities?.host.folderPicker??!1),n=q(()=>void 0),i=q(()=>e(wt)?e=>$.service.listFolder({path:e}):void 0),a=q(Qt),o=q(()=>`${Oe}/logo-mark.png`),s=q(()=>$.status?.state===`ready`),c=q(()=>e(De)||e(Ae)!==null||$.status?.state===`scanning`),l=q(()=>$.error||($.status?.state===`failed`?$.status.message:$.status?.state===`cancelled`?`Scan cancelled. Choose a location to start again.`:null)),u=q(()=>void 0),d=q(()=>$.status?.state===`scanning`?Roe($.status.label,e(ze).get($.status.scanId)??e(gt),e(Pe),$.volumes):null);yK(r,{get targets(){return e(an)},get volumes(){return $.volumes},mode:`browser`,get folderPicker(){return e(t)},onSettings:()=>z(x,!0),get deviceLabel(){return e(n)},onOpenDevices:void 0,onPickFolder:()=>$.service?.pickFolder?.()??Promise.resolve(null),get onListFolder(){return e(i)},get chromeInset(){return e(a)},get logo(){return e(o)},get initialPath(){return e(Ee)},get canClose(){return e(s)},get busy(){return e(c)},get error(){return e(l)},get status(){return $.status},get sidebarFooter(){return e(u)},get progressBaseline(){return e(d)},onScan:e=>void pn(e),onForget:Fn,get auditReport(){return e(Qe)},get auditLoading(){return e($e)},get auditError(){return e(et)},onRefreshAudit:()=>void On(),get auditSupported(){return e(yt)},get appScanSupported(){return e(bt)},get scanningAppId(){return e(Ae)},get recentApps(){return e(Fe)},onScanApp:e=>void gn(e),onForgetApp:Rn,onIcon:it,onCancel:()=>{$.status?.state===`scanning`?mn():z(Te,!1)}})}var i=R(r,2),a=e=>{var t=vEe(),n=L(t);j(`click`,n,()=>z(Ge,`apps`)),d(e,t)};h(i,t=>{e(yt)&&t(a)}),V(n),d(t,n)};h(r,t=>{e(Ge)===`apps`&&e(yt)?t(i):t(a,-1)}),d(t,n)},Kn=r=>{var a=kEe(),o=H(a);{let t=q(()=>e(lt)?.name??$.status.label??`Storage`),n=q(Qt),r=q(()=>void 0),i=q(()=>$.deleting||e(dt)),a=q(()=>e(Dt)?()=>z(g,!e(g)):void 0);aG(o,{get title(){return e(t)},mode:`browser`,get chromeInset(){return e(n)},get sidebarVisible(){return e(S)},get chartVisible(){return e(C)},get chartFocused(){return e(w)},onToggleChartFocus:()=>z(w,!e(w)),get deviceLabel(){return e(r)},onOpenDevices:void 0,get collectorCount(){return $.collector.length},get busy(){return e(i)},onNewScan:()=>Pn(),onToggleSidebar:()=>z(S,!e(S)),onToggleChart:()=>{z(C,!e(C)),z(Ge,`browse`)},get orientation(){return e(ne)},onToggleOrientation:he,onOpenCollector:()=>z(m,!0),onOpenSettings:()=>z(x,!0),get onOpenAi(){return e(a)},get aiOpen(){return e(g)}})}var s=R(o,2),c=H(s),l=t=>{{let n=q(()=>e(en)[0]?.path??e(gt)[0]??$.status.label),r=q(()=>$.deleting||e(dt)),i=q(()=>$.deleting||e(dt)),a=q(()=>void 0),o=q(()=>$.status?.bytesScanned??0),s=q(()=>$.status?.entriesScanned??0),c=q(()=>$.status?.label??null);TG(t,{get targets(){return e(an)},get view(){return e(Ge)},get discoveryAvailable(){return e(_t)},get gitignoredAvailable(){return e(vt)},get appAuditAvailable(){return e(yt)},get selectedPath(){return e(n)},get busy(){return e(r)},onView:En,onSelect:e=>Pn(e.path),onCustom:()=>Pn(),onForget:Fn,get appScans(){return e(Le)},get activeScanId(){return $.activeScanId},onSwitchScan:e=>void _n(e),get staleScanIds(){return e(Rt)},get recentApps(){return e(Fe)},onSelectApp:e=>void gn(e),onForgetApp:Rn,get switchingBlocked(){return e(i)},get footer(){return e(a)},onSettings:()=>z(x,!0),get volume(){return e(ae)},get scanBytes(){return e(o)},get scanEntries(){return e(s)},get scanLabel(){return e(c)},get rescanning(){return e(oe)},onRescan:()=>void se()})}};h(c,t=>{e(S)&&t(l)});var u=R(c,2),p=H(u);{let t=q(()=>e(Ge)===`browse`?e(lt)?.name??`Storage`:e(Ge)===`large-files`?`Large files`:e(Ge)===`caches`?`Developer cleanup`:e(Ge)===`apps`?`App storage`:`Gitignored space`),n=q(()=>e(Nt)?void 0:e(lt)?.path??$.status.label??void 0),r=q(()=>$.deleting||e(dt));Uue(p,{get title(){return e(t)},get path(){return e(n)},get busy(){return e(r)},get collectorCount(){return $.collector.length},get chartVisible(){return e(C)},onNewScan:()=>Pn(),onOpenCollector:()=>z(m,!0),onToggleChart:()=>{z(C,!e(C)),z(Ge,`browse`)}})}var _=R(p,2),v=e=>{J2(e,{state:`error`,title:`Could not complete the request`,get detail(){return $.error}})};h(_,e=>{$.error&&e(v)});var y=R(_,2),b=t=>{var n=xEe(),r=H(n),i=L(r,!0),a=R(r),o=t=>{var n=bEe();I(()=>n.disabled=$.deleting),j(`click`,n,()=>{z(pt,null),$.status?.app?vn():pn(e(gt).length?e(gt):[$.status?.label??``])}),d(t,n)};h(a,t=>{e(pt)&&t(o)});var s=R(a);V(n),I(()=>X(i,e(ht))),j(`click`,s,()=>z(ht,null)),d(t,n)};h(y,t=>{e(ht)&&t(b)});var T=R(y,2),E=t=>{{let n=q(()=>e(It)?.name??e(Z).appName),r=q(()=>e(Ft)?.generatedAt??(e(Qe)?.auditId===e(Z).auditId?e(Qe).generatedAt:null)),i=q(()=>$.slice?.totalSize??$.status.bytesScanned),a=q(()=>e(It)?.locations.length??null),o=q(()=>e(It)?.appPath??null),s=q(()=>e(It)?.kind===`cli`);dfe(t,{get appName(){return e(n)},get appId(){return e(Z).appId},get auditId(){return e(Z).auditId},get generatedAt(){return e(r)},get stale(){return e(Lt)},get totalBytes(){return e(i)},get locationCount(){return e(a)},get appPath(){return e(o)},get isCli(){return e(s)},get rescanning(){return e(oe)},get rescanAvailable(){return e(bt)},onBack:()=>En(`apps`),onRescan:()=>void vn(),onIcon:it})}};h(T,t=>{e(Nt)&&e(Z)&&t(E)});var D=R(T,2);Lue(D,{get status(){return $.status},get fullDiskAccess(){return e(Ue)},onOpenFullDiskAccess:void 0});var O=R(D,2),ee=r=>{var a=DEe(),o=K(a),s=H(o),c=t=>{{let n=q(()=>e(en)[0]?.id??$.status.rootIds[0]);WK(t,{class:`root-select`,label:`Scanned location`,get value(){return e(n)},get options(){return e(ut)},onChange:e=>void An(e)})}};h(s,e=>{$.status.rootIds.length>1&&e(c)});var l=R(s,2);{let t=q(()=>e(en).length>1),n=q(()=>e(Ct)?(e,t)=>void Nn(e,t):void 0);_N(l,{get items(){return e(en)},onSelect:e=>void yn(e),onBack:bn,get canGoBack(){return e(t)},get onReveal(){return e(n)},get revealLabel(){return e(Tt)}})}var u=R(l,2),p=L(u,!0);V(o);var m=R(o,2);let g;var _=H(m),v=t=>{var n=CEe(),r=H(n);{let t=q(()=>$.slice?.tree??null),n=q(()=>$.items.find(e=>e.id===$.hoveredId)??null),i=q(()=>e(en).length>1);Noe(r,{get tree(){return e(t)},get focusNode(){return e(lt)},get mode(){return e(G)},onModeChange:xe,get density(){return e(be)},onDensityChange:Ce,get hoveredNode(){return e(n)},onBack:bn,get canGoBack(){return e(i)},get hoveredId(){return $.hoveredId},get collectedIds(){return e(Mt)},get inspectorAnnotation(){return e(Vt)},get inspectorProvenance(){return e(Ht)},onHover:e=>$.hoveredId=e,onOpen:e=>void yn(e),onContext:wn})}var i=R(r,2),a=e=>{var t=SEe(),n=L(t);I(e=>X(n,`${e??``} smaller items grouped · open a folder to explore`),[()=>$.slice.omittedCount.toLocaleString()]),d(e,t)};h(i,e=>{$.slice?.truncated&&e(a)}),V(n),d(t,n)};h(_,t=>{e(C)&&t(v)});var y=R(_,2),b=t=>{var n=wEe();I(()=>{Y(n,`data-dragging`,e(re)),Y(n,`aria-orientation`,e(ne)===`vertical`?`horizontal`:`vertical`),Y(n,`aria-valuenow`,e(ne)===`vertical`?e(M):e(te)),Y(n,`aria-valuemin`,e(ne)===`vertical`?160:240),Y(n,`aria-valuemax`,e(ne)===`vertical`?640:720)}),j(`pointerdown`,n,U),j(`keydown`,n,_e),j(`dblclick`,n,de),d(t,n)};h(y,t=>{e(C)&&t(b)});var x=R(y,2),S=H(x),T=H(S),E=R(H(T),2),D=L(E);V(T);var O=R(T,2);WK(H(O),{get value(){return e(ot)},get options(){return st},label:`Sort folder contents`,class:`w-32`,onChange:e=>{z(ot,e===`name`?`name`:e===`path`?`path`:`size`,!0),$.slice&&yn($.slice.focusNode)}}),V(O),V(S);var k=R(S,2),ee=H(k);t(ee,()=>NG,(t,n)=>{n(t,{type:`search`,"aria-label":`Search folder contents`,placeholder:`Search loaded items…`,get value(){return e(at)},set value(e){z(at,e,!0)}})}),V(k);var A=R(k,2),N=H(A),P=L(N),F=R(N),ae=t=>{var n=TEe();I(()=>n.disabled=$.deleting||e(dt)),j(`click`,n,()=>{xn(),$.collector=[]}),d(t,n)};h(F,e=>{$.collector.length&&e(ae)}),V(A);var oe=R(A,2);f(oe,()=>$.slice?.focusNode.id,t=>{{let n=q(()=>e(G)===`sunburst`?`sunburst`:`standard`),r=q(()=>e(dt)||$.deleting),i=q(()=>$.slice?.focusNode.size??0),a=q(()=>e(Ct)?(e,t)=>void Nn(e,t):void 0);qU(t,{get colorMode(){return e(n)},get disabled(){return e(r)},isCovered:e=>{let t=Y5($.collector,e.path,$.activeScanId);return!!(t&&t.nodeId!==e.id)},get totalSize(){return e(i)},get items(){return e(At)},get hoveredId(){return $.hoveredId},get collectedIds(){return e(nn)},onHover:e=>$.hoveredId=e,onOpen:e=>void yn(e),onCollect:Sn,onRemove:Cn,get onReveal(){return e(a)},get revealLabel(){return e(Tt)},get openLabel(){return e(Et)}})}});var se=R(oe,2),ce=r=>{var i=EEe(),a=H(i);t(a,()=>pN,(t,r)=>{r(t,{variant:`ghost`,size:`sm`,get disabled(){return e(Jt)},onclick:()=>void kn(),children:(e,t)=>{n();var r=W(`Load more items`);d(e,r)},$$slots:{default:!0}})}),V(i),d(r,i)};h(se,e=>{$.items.length<$.childrenTotal&&e(ce)}),V(x),V(m),Se(m,e=>z(ie,e),()=>e(ie)),I((t,n,r)=>{X(p,t),g=we(m,1,`explorer-layout windows:mx-4 windows:mb-4 windows:gap-3`,null,g,{"without-chart":!e(C),"chart-focused":e(w)&&e(C)}),Y(m,`data-chart-visible`,e(C)),Y(m,`data-orientation`,e(ne)),i(m,`--contents-width: ${e(te)}px; --contents-height: ${e(M)}px`),Y(m,`aria-busy`,e(Jt)),X(D,`${n??``} item${$.childrenTotal===1?``:`s`} · ${r??``}
|
|
162
|
+
runtimes, stopped processes, or long-idle leftovers.`)}),d(r,i)};h(l,t=>{e(Ue).length>0&&t(f)});var p=R(l,2),m=H(p),_=R(H(m),2),y=e=>{var t=WTe();j(`click`,t,()=>o.onSection?.(`processes`)),d(e,t)};h(_,e=>{o.onSection&&e(y)}),V(m);var b=R(m,2);v(b,21,()=>e(He),e=>e.groupId,(t,n)=>{let r=q(()=>u().breakdown.usedBytes<=0?0:Math.min(100,e(n).footprintBytes/u().breakdown.usedBytes*100));var a=GTe(),o=H(a),s=H(o);e4(s,{get kind(){return e(n).kind}});var c=R(s,2),l=L(c,!0),f=R(c,2),p=L(f),m=R(f,2),h=L(m,!0);V(o),V(a),I(t=>{Y(o,`title`,`Open ${e(n).name}`),X(l,e(n).name),i(p,`width: ${e(r)}%`),X(h,t)},[()=>hk(e(n).footprintBytes)]),j(`click`,o,()=>ze(e(n))),d(t,a)},e=>{var t=KTe();d(e,t)}),V(b),V(p),d(r,a)},J=r=>{let i=t=>{var n=JTe(),r=H(n),i=t=>{{let n=q(()=>e(M)??e(O)??u().processes.find(e=>e.pid===1)?.pid??u().processes[0].pid),r=q(()=>e(M)===null?void 0:()=>N(null)),i=q(()=>e(A)===`flow`),a=q(()=>e(A)===`flow`?`w-full min-h-[28rem] flex-1`:`w-full`);Wbe(t,{get snapshot(){return u()},get pid(){return e(n)},get maxDepth(){return e(ee)},onFocus:e=>z(M,e,!0),onEnter:N,get onClose(){return e(r)},get expanded(){return e(i)},onToggleExpand:()=>te(`flow`),get class(){return e(a)}})}};h(r,e=>{u()&&u().processes.length>0&&e(i)}),V(n),I(()=>we(n,1,`min-w-0 ${e(A)===`flow`?`flex min-h-0 flex-1 flex-col`:``}`,`svelte-mh5rar`)),d(t,n)},a=q(()=>E(u()));var o=$Te(),s=K(o);Xfe(s,{get groups(){return u().groups},get usedBytes(){return u().breakdown.usedBytes},get selection(){return e(C)},onSelect:Re});var c=R(s,2);v(c,21,()=>j2,e=>e.id,(t,n)=>{{let r=q(()=>ude(u(),e(n))),i=q(()=>e(T)?.presetId===e(n).id?e(T).ruleId:null);ife(t,{get label(){return e(n).label},get description(){return e(n).description},get summary(){return e(r)},get usedBytes(){return u().breakdown.usedBytes},get selected(){return e(i)},onSelect:t=>z(T,t===null?null:{presetId:e(n).id,ruleId:t},!0)})}}),V(c);var l=R(c,2),f=r=>{var i=ZTe(),a=H(i),o=r=>{var i=YTe(),a=K(i),o=L(a),s=R(a,2);t(s,()=>pN,(e,t)=>{t(e,{size:`sm`,onclick:Ke,children:(e,t)=>{n();var r=W(`Add to Quit list`);d(e,r)},$$slots:{default:!0}})});var c=R(s,2);t(c,()=>pN,(e,t)=>{t(e,{size:`sm`,variant:`ghost`,onclick:()=>z(C,new Set,!0),children:(e,t)=>{n();var r=W(`Clear selection`);d(e,r)},$$slots:{default:!0}})}),I(()=>X(o,`${e(C).size??``} selected`)),d(r,i)};h(a,t=>{e(C).size>0&&t(o)});var s=R(a,2),c=t=>{var n=XTe(),r=L(n);I(()=>X(r,`${e(Ge)??``} protected ${e(Ge)===1?`item was`:`items were`} not added.`)),d(t,n)};h(s,t=>{e(Ge)>0&&t(c)}),V(i),d(r,i)};h(l,t=>{e(De)&&(e(C).size>0||e(Ge)>0)&&t(f)});var p=R(l,2),m=H(p),g=r=>{var i=QTe(),o=H(i),s=H(o);{let r=q(()=>e(w)===`table`?`secondary`:`ghost`);t(s,()=>pN,(t,i)=>{i(t,{size:`sm`,get variant(){return e(r)},onclick:()=>z(w,`table`),children:(e,t)=>{n();var r=W(`By size`);d(e,r)},$$slots:{default:!0}})})}var c=R(s,2);{let r=q(()=>e(w)===`tree`?`secondary`:`ghost`);t(c,()=>pN,(t,i)=>{i(t,{size:`sm`,get variant(){return e(r)},onclick:()=>z(w,`tree`),children:(e,t)=>{n();var r=W(`Process tree`);d(e,r)},$$slots:{default:!0}})})}var l=R(c,2);{let n=q(()=>e(A)===`table`?`Restore the table size`:`Expand the table to fill the view`);t(l,()=>pN,(t,r)=>{r(t,{size:`sm`,variant:`ghost`,class:`ml-auto`,get"aria-label"(){return e(n)},onclick:()=>te(`table`),children:(t,n)=>{var r=k(),i=K(r),a=e=>{DA(e,{class:`size-3.5`})},o=e=>{EA(e,{class:`size-3.5`})};h(i,t=>{e(A)===`table`?t(a):t(o,-1)}),d(t,r)},$$slots:{default:!0}})})}V(o);var u=R(o,2),f=t=>{{let n=q(()=>e(De)?We:void 0),r=q(()=>e(De)?e=>e.kind===`group`?$e(e.group,`graceful`):Ve(e.process,`graceful`):void 0),i=q(()=>e(De)?e=>e.kind===`group`?$e(e.group,`force`):Ve(e.process,`force`):void 0);Wpe(t,{get snapshot(){return e(a)},get query(){return e(S)},get selection(){return e(C)},get selectedPid(){return e(M)},onFocus:N,onSelect:Re,onOpen:ze,onOpenProcess:Be,get onStage(){return e(n)},get onQuit(){return e(r)},get onForceQuit(){return e(i)},onQueryChange:e=>z(S,e,!0),get intervalMs(){return e(x)},onIntervalChange:Le,get paused(){return e(y)},onTogglePause:Ie})}},p=t=>{{let n=q(()=>e(De)?We:void 0);$pe(t,{get snapshot(){return e(a)},get search(){return e(S).search},onSearchChange:t=>z(S,{...e(S),search:t},!0),get selection(){return e(C)},onSelect:Re,onOpen:ze,onOpenProcess:Be,onFocus:N,get focusPid(){return e(M)},get onStage(){return e(n)},get scope(){return e(D)},onScopeChange:e=>z(D,e,!0)})}};h(u,t=>{e(w)===`table`?t(f):t(p,-1)}),V(i),d(r,i)};h(m,t=>{(e(A)===null||e(A)===`table`)&&t(g)});var _=R(m,2),b=t=>{{let n=q(()=>e(A)===`explorer`);RTe(t,{get snapshot(){return e(a)},get focusPid(){return e(O)},get selectedPid(){return e(M)},get expanded(){return e(n)},onToggleExpand:()=>te(`explorer`),onSelect:e=>z(M,e,!0),onFocus:N,onDetails:Be,get depth(){return e(ee)},set depth(e){z(ee,e,!0)}})}};h(_,t=>{(e(A)===null||e(A)===`explorer`)&&t(b)});var j=R(_,2),P=e=>{i(e)};h(j,t=>{(e(A)===null||e(A)===`flow`)&&t(P)}),V(p);var F=R(p,2),ne=e=>{var t=K9();d(e,t)};h(F,t=>{e(De)||t(ne)}),I(()=>we(p,1,`memory-panels ${e(A)===null?``:`flex-1`}`,`svelte-mh5rar`)),d(r,o)},Te=t=>{axe(t,{get processes(){return e(Ue)},get terminateAvailable(){return e(De)},onOpenProcess:Be,onQuit:e=>Ve(e,`graceful`)})},Ee=t=>{var n=G9(),r=K(n);{let t=q(()=>e(Oe)&&e(De));dSe(r,{get log(){return e(he)},get reopenAvailable(){return e(t)},onReopen:e=>void nt(e),get reopenBusyId(){return e(ge)},get error(){return e(U)}})}var i=R(r,2),a=e=>{var t=K9();d(e,t)};h(i,t=>{e(De)||t(a)}),d(t,n)};h(Se,e=>{l()===`overview`?e(Ce):l()===`processes`?e(J,1):l()===`stale`?e(Te,2):l()===`activity`&&e(Ee,3)}),V(s);var Me=R(s,2);{let t=q(()=>e(De)?We:void 0);vxe(Me,{get snapshot(){return u()},get group(){return e(ne)},get history(){return e(g)},onClose:()=>z(ne,null),onQuit:e=>$e(e,`graceful`),onForceQuit:e=>$e(e,`force`),get onStage(){return e(t)},onOpenProcess:e=>{z(ne,null),z(re,{pid:e.pid,startTimeUs:e.startTimeUs},!0)}})}var Ne=R(Me,2);{let t=q(()=>e(De)?We:void 0);eCe(Ne,{get snapshot(){return u()},get process(){return e(ie)},get terminateAvailable(){return e(De)},onClose:()=>z(re,null),get onStage(){return e(t)},onQuit:e=>Ve(e,`graceful`),onForceQuit:e=>Ve(e,`force`),onOpenProcess:e=>z(re,{pid:e.pid,startTimeUs:e.startTimeUs},!0),onOpenGroup:e=>{z(re,null),ze(e)}})}var Pe=R(Ne,2);Uxe(Pe,{get open(){return e(oe)},get entries(){return e(ae)},onClose:()=>z(oe,!1),onRemove:qe,onReview:Ze,onClear:()=>z(ae,[],!0),get planning(){return e(pe)},get terminateAvailable(){return e(De)}});var Fe=R(Pe,2);{let t=q(()=>e(Ae)??void 0);R9(Fe,{get open(){return e(se)},get available(){return e(je)},get port(){return e(ke)},get memory(){return e(t)},get presets(){return WCe},onClose:()=>z(se,!1)})}var Xe=R(Fe,2);{let t=q(()=>e(pe)||e(B));nSe(Xe,{get open(){return e(ce)},get candidates(){return e(le)},onReview:Qe,onClose:()=>z(ce,!1),onNeverSuggest:Je,get planning(){return e(t)}})}Fxe(R(Xe,2),{get plan(){return e(ue)},get outcome(){return e(de)},get error(){return e(fe)},get executing(){return e(me)},onConfirm:e=>void tt(e),onForceQuit:et,onClose:()=>{z(ue,null),z(de,null),z(fe,null)},get measuredBeforeBytes(){return e(G)},get measuredAfterBytes(){return e(be)},get measuredSeconds(){return e(xe)}}),d(r,a)};h(it,e=>{u()===null?e(at):e(ot,-1)}),d(r,rt),a()}p([`click`]),p([`click`]);function nEe(e){return e.request===e.sequence&&e.view===`apps`}var q9=`spacelens.recentAppScans`,J9=5;function rEe(){try{let e=window.localStorage.getItem(q9);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function iEe(e){if(typeof e!=`object`||!e)return null;let t=e,n=Mle.safeParse({appId:t.appId,appName:t.appName,auditId:t.auditId,lastScannedAt:t.lastScannedAt});if(!n.success)return null;let r={...n.data};return typeof t.generatedAt==`string`&&(r.generatedAt=t.generatedAt),t.stale===!0&&(r.stale=!0),r}function Y9(){return rEe().map(iEe).filter(e=>e!==null).slice(0,J9)}function aEe(e){let t=[{appId:e.appId,appName:e.appName,auditId:e.auditId,lastScannedAt:new Date().toISOString(),...e.generatedAt?{generatedAt:e.generatedAt}:{}},...Y9().filter(t=>t.appId!==e.appId)].slice(0,J9);window.localStorage.setItem(q9,JSON.stringify(t))}function oEe(e){let t=Y9().map(t=>t.appId===e?{...t,stale:!0}:t);window.localStorage.setItem(q9,JSON.stringify(t))}function sEe(e){let t=Y9().filter(t=>t.appId!==e);window.localStorage.setItem(q9,JSON.stringify(t))}function X9(e,t){return!!(e.stale===!0||t&&e.auditId!==t)}var Z9=(e,t,n,r,i,a)=>({path:e,label:t,classification:n,purgeable:i,comment:a??null,size:r,source:`catalog`}),Q9=1024**3,$9=1024**2,cEe={platform:`macos`,generatedAt:new Date().toISOString(),auditId:`audit_fixture0000000000000000`,apps:[{id:`codex-cli`,name:`Codex CLI`,kind:`cli`,source:`catalog`,bundleId:null,appPath:null,installedSize:0,totalSize:24*Q9+500*$9,locations:[Z9(`/Users/demo/.codex/worktrees`,`Agent worktrees`,`user-data`,11.2*Q9,!0,`Git worktrees created by agent runs. May contain uncommitted work — review before deleting.`),Z9(`/Users/demo/.codex/sessions`,`Chat session logs`,`user-data`,9.05*Q9,!0,`One JSONL per conversation. Months of sessions can reach tens of GB — back up first.`),Z9(`/Users/demo/.codex`,`Codex data root`,`support`,3.67*Q9,!1,`Config, auth and history databases; the itemized subfolders above are the big movers.`),Z9(`/Users/demo/.codex/packages/standalone/releases`,`Historical CLI releases`,`versions`,634*$9,!0,`Every release the updater ever kept (~250 MB each). Only the current one is used.`)]},{id:`claude-desktop`,name:`Claude`,kind:`app`,source:`catalog`,bundleId:`com.anthropic.claudefordesktop`,appPath:`/Applications/Claude.app`,installedSize:812*$9,totalSize:1.11*Q9,locations:[Z9(`/Users/demo/Library/Application Support/Claude/claude-code-vm`,`Sandbox VM images`,`re-downloadable`,296*$9,!0,`Linux VM images used for sandboxed code execution. Re-downloaded on next use.`),Z9(`/Users/demo/Library/Application Support/Claude`,`Claude data root`,`support`,40*$9,!1)]},{id:`com.apple.Xcode`,name:`Xcode`,kind:`app`,source:`heuristic`,bundleId:`com.apple.dt.Xcode`,appPath:`/Applications/Xcode.app`,installedSize:3.6*Q9,totalSize:3.62*Q9,locations:[Z9(`/Users/demo/Library/Developer/Xcode/DerivedData`,`Derived data`,`cache`,20*$9,!1)]},{id:`npm-cache`,name:`npm cache`,kind:`cli`,source:`catalog`,bundleId:null,appPath:null,installedSize:0,totalSize:1.47*Q9,locations:[Z9(`/Users/demo/.npm/_cacache`,`Package download cache`,`cache`,1.47*Q9,!0,`Safe to clear (npm cache clean --force); contents re-download on demand.`)]},{id:`pnpm-store`,name:`pnpm store`,kind:`cli`,source:`catalog`,bundleId:null,appPath:null,installedSize:0,totalSize:6.4*Q9,locations:[Z9(`/Users/demo/Library/pnpm`,`pnpm store and global bin`,`support`,6.4*Q9,!1,`Content-addressable package store. Old-generation stores can be reclaimed with pnpm store prune.`)]}],totalApps:5,truncated:!1};function lEe(){return typeof window<`u`&&window.location.hash.includes(`audit-fixture`)}function uEe(){typeof document<`u`&&(document.documentElement.removeAttribute(`macos`),delete document.documentElement.dataset.backdrop)}var dEe={"/Applications/Claude.app":`data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2214%22%20fill%3D%22%23d97757%22%2F%3E%3Cg%20stroke%3D%22%23fff%22%20stroke-width%3D%224%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M32%2014v36M14%2032h36M19%2019l26%2026M45%2019L19%2045%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E`,"/Applications/Xcode.app":`data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2214%22%20fill%3D%22%231478f0%22%2F%3E%3Ccircle%20cx%3D%2232%22%20cy%3D%2232%22%20r%3D%2217%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%224%22%2F%3E%3Cpath%20d%3D%22M20%2044%2044%2020%22%20stroke%3D%22%23fff%22%20stroke-width%3D%225%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E`};function fEe(e){if(typeof document<`u`){let e=document.documentElement;e.style.setProperty(`--color-system-accent`,`#007aff`),e.style.setProperty(`--color-system-accent-foreground`,`#ffffff`),e.style.setProperty(`--primary`,`#007aff`),e.style.setProperty(`--primary-foreground`,`#ffffff`)}e.capabilities={apiMajor:1,contractVersion:`fixture`,scan:{start:!1,cancel:!1,discovery:!1,appAudit:!0,maxConcurrent:0},cleanup:{plan:!1,execute:!1,mode:`trash`,appPlan:!0,appExecute:!0},host:{folderPicker:!1,appLocationReveal:!0},icloud:`unavailable`};let t=e=>new Promise(t=>setTimeout(()=>t(e),350));e.service={baseUrl:`fixture`,health:()=>t({status:`ok`,serviceInstanceId:`fixture`,apiMajor:1,contractVersion:`fixture`}),capabilities:()=>t(e.capabilities),roots:()=>t({roots:[]}),startScan:()=>Promise.reject(Error(`fixture host cannot scan`)),scanStatus:()=>Promise.reject(Error(`fixture host cannot scan`)),cancelScan:()=>Promise.reject(Error(`fixture host cannot scan`)),treeSlice:()=>Promise.reject(Error(`fixture host cannot scan`)),children:()=>Promise.reject(Error(`fixture host cannot scan`)),plan:()=>Promise.reject(Error(`fixture host cannot plan engine cleanup`)),execute:()=>Promise.reject(Error(`fixture host cannot execute cleanup`)),appAudit:()=>t(JSON.parse(JSON.stringify(cEe))),appIcon:e=>{let n=dEe[e.appPath];return t(n?{dataUrl:n}:null)},appCleanupPlan:e=>Promise.reject({problem:{code:`InvalidRequest`,message:`fixture host cannot verify plans — sizes and classifications are illustrative only`},paths:e.paths}),appCleanupExecute:()=>Promise.reject({problem:{code:`InvalidRequest`,message:`fixture host cannot execute`}}),revealAppLocation:()=>t({revealed:!1})}}var pEe=A(`<div class="flex items-center gap-0.5 rounded-full border bg-background/90 p-0.5 shadow-sm backdrop-blur"><button type="button" class="view-switch-button">Storage</button> <button type="button" class="view-switch-button">Memory</button></div>`),mEe=A(`<div class="view-switch-pill fixed top-1.5 left-1/2 z-50 -translate-x-1/2" role="group" aria-label="Storage or memory view"><!></div>`),hEe=A(`<div data-tauri-drag-region="" class="fixed top-0 right-0 left-0 z-40 h-10"></div> <!>`,1),gEe=A(`<div class="workbench-shell compact-workbench windows:bg-sidebar"><!> <div class="workspace-body"><!> <div class="workspace-content windows:mr-3 windows:rounded-tl-lg windows:border windows:border-border windows:bg-background windows:pt-5"><!></div></div></div>`),_Ee=A(`<main class="scan-picker flex h-dvh min-h-0 flex-col bg-background text-foreground"><!> <div class="picker-layout flex min-h-0 flex-1 max-md:flex-col max-md:overflow-auto windows:bg-sidebar"><section class="flex min-h-0 min-w-0 flex-1 flex-col overflow-auto p-5 max-md:p-4 windows:rounded-tl-lg windows:border windows:border-border windows:bg-background linux:bg-background"><div class="flex min-h-0 w-full flex-1 flex-col"><div class="mb-4"><button type="button" class="text-sm text-muted-foreground underline-offset-4 hover:underline">← Back</button></div> <!></div></section></div></main>`),vEe=A(`<div class="pointer-events-none absolute inset-x-0 bottom-3 flex justify-center"><button type="button" class="pointer-events-auto text-xs text-muted-foreground underline-offset-4 hover:underline">App storage →</button></div>`),yEe=A(`<div class="relative"><!> <!></div>`),bEe=A(`<button type="button">Rescan</button>`),xEe=A(`<div class="workspace-notice" role="status"><span> </span><!><button type="button" aria-label="Dismiss notice">×</button></div>`),SEe=A(`<p class="chart-summary"> </p>`),CEe=A(`<div class="explorer-chart macos:bg-background macos:p-5 windows:rounded-lg windows:border windows:bg-background windows:p-4 linux:bg-background linux:p-5"><!> <!></div>`),wEe=A(`<div class="explorer-divider" role="separator" tabindex="0" aria-label="Resize folder contents"></div>`),TEe=A(`<button type="button">Clear selection</button>`),EEe=A(`<div class="load-more"><!></div>`),DEe=A(`<div class="explorer-pathbar macos:min-h-10 macos:px-4 windows:mx-4 windows:border-b-0 windows:px-2 linux:min-h-12 linux:px-5"><!> <!> <span> </span></div> <main><!> <!> <aside class="explorer-sidebar macos:bg-background macos:p-3 windows:rounded-lg windows:border windows:bg-card windows:p-3 linux:bg-card linux:p-4" aria-label="Folder contents"><div class="contents-heading macos:pb-3 windows:pb-4 linux:pb-4 windows:[&_h2]:text-base windows:[&_p]:text-xs linux:[&_h2]:text-sm linux:[&_p]:text-xs"><div><h2>Folder contents</h2> <p> </p></div> <div class="browse-sort"><!></div></div> <label class="browse-search relative mx-1 mb-2 block"><!></label> <div class="browse-selection"><button type="button"> </button><!></div> <!> <!></aside></main>`,1),OEe=A(`<span> </span><strong> </strong><span>Review →</span>`,1),kEe=A(`<div class="workbench-shell compact-workbench windows:bg-sidebar"><!> <div class="workspace-body"><!> <div class="workspace-content windows:mr-3 windows:rounded-tl-lg windows:border windows:border-border windows:bg-background windows:pt-5"><!> <!> <!> <!> <!> <!></div></div> <footer class="workspace-status macos:min-h-8 macos:bg-(--chrome) windows:min-h-11 windows:border-t-0 windows:bg-sidebar linux:min-h-10 linux:bg-(--chrome)"><span><i></i> <span class="status-separator">·</span> </span><!></footer> <!> <!></div>`),AEe=A(`<!> <!> <!> <!>`,1);function jEe(r,o){J(o,!0);let s=t=>{var n=pEe(),r=H(n),i=R(r,2);V(n),I(()=>{Y(r,`aria-pressed`,!e(_)),Y(i,`aria-pressed`,e(_))}),j(`click`,r,()=>z(_,!1)),j(`click`,i,()=>z(_,!0)),d(t,n)},c=`local`,l=P(``),u=P(``),p=P(``),m=P(!1),g=P(!1),_=P(!1),v=P(`overview`),y=P(null),b=P(null),x=P(!1),S=P(!0),C=P(!0),w=P(!1);P(null),P(null);let T=P(ve([])),E=P(c);P(!1),P(!1),P(null),P(null),P(null),P(!1),q(()=>e(T).find(t=>t.deviceId===e(E))?.label??(e(E)===c?`This machine`:e(E)));let D=`spacelens.contentsWidth`,O=`spacelens.contentsHeight`,ee=`spacelens.layoutDirection`,A=`spacelens.memory.section`,te=P(340),M=P(300),N=P(`auto`),F=P(1440),ne=q(()=>e(N)===`auto`?e(F)<900?`vertical`:`horizontal`:e(N)),re=P(!1),ie=P(null),ae=q(()=>Poe($.slice?.focusNode.path??e(gt)[0]??$.status?.label,$.status?.volumes??[],$.volumes)),oe=P(!1);async function se(){if($.status?.app){await vn();return}let t=e(gt).length>0?e(gt):$.targets.map(e=>e.path);if(t.length!==0){z(oe,!0);try{await pn(t)}finally{z(oe,!1)}}}function ce(e){return Math.min(720,Math.max(240,Math.round(e)))}function le(e){return Math.min(640,Math.max(160,Math.round(e)))}function B(t){z(te,ce(t),!0),window.localStorage.setItem(D,String(e(te)))}function ue(t){z(M,le(t),!0),window.localStorage.setItem(O,String(e(M)))}function de(){e(ne)===`vertical`?ue(300):B(340)}function fe(e){z(N,e,!0),window.localStorage.setItem(ee,e)}function pe(e){z(v,e,!0);try{window.localStorage.setItem(A,e)}catch{}}function me(){z(F,window.innerWidth,!0)}function he(){fe(e(ne)===`vertical`?`horizontal`:`vertical`)}function U(t){let n=e(ie);if(!n)return;t.preventDefault(),z(re,!0);let r=n.getBoundingClientRect(),i=e(ne)===`vertical`,a=t.currentTarget;try{a.setPointerCapture(t.pointerId)}catch{}let o=e=>i?ue(r.bottom-e.clientY):B(r.right-e.clientX),s=()=>{z(re,!1),a.releasePointerCapture(t.pointerId),a.removeEventListener(`pointermove`,o),a.removeEventListener(`pointerup`,s),a.removeEventListener(`pointercancel`,s)};a.addEventListener(`pointermove`,o),a.addEventListener(`pointerup`,s),a.addEventListener(`pointercancel`,s)}function _e(t){let n=t.shiftKey?48:16;if(e(ne)===`vertical`){if(t.key===`ArrowUp`)ue(e(M)+n);else if(t.key===`ArrowDown`)ue(e(M)-n);else if(t.key===`Home`)ue(300);else return}else if(t.key===`ArrowLeft`)B(e(te)+n);else if(t.key===`ArrowRight`)B(e(te)-n);else if(t.key===`Home`)B(340);else return;t.preventDefault()}let G=P(`sunburst`),be=P(`nested`);function xe(e){z(G,e,!0),window.localStorage.setItem(n7,e)}function Ce(e){z(be,e,!0),window.localStorage.setItem(r7,e)}let Te=P(!1),Ee=P(``),De=P(!1),Ae=P(null),je=P(ve(h7())),Pe=P(ve(g7()));ge(()=>{let t=$.status;e(E)===c&&t?.state===`ready`&&t.coverage&&!t.app&&t.label&&e(Pe)[t.label]?.at!==t.updatedAt&&(jCe(t.label,{bytes:t.bytesScanned,entries:t.coverage.files+t.coverage.directories,at:t.updatedAt}),z(Pe,g7(),!0))});let Fe=P(ve(Y9())),Ie=P(ve(new Map)),Le=P(ve([])),Re=0,ze=P(ve(new Map)),Be=P(ve(e7(null))),Ve=P(null),He=P(ve({state:`idle`})),Ue=P(`unsupported`);ge(()=>{});let We=P(!1),Ge=P(`browse`),Ke=P(null),qe=P(ve([])),Je=P(!1),Ye=P(null),Xe=P(10*1024**2),Ze=0,Qe=P(null),$e=P(!1),et=P(null),tt=P(0),nt=0,rt=new Map;async function it(e){let t=rt.get(e);if(t)return t;let n=(async()=>{try{return(await $.service?.appIcon?.({appPath:e}))?.dataUrl??null}catch{return null}})();return rt.set(e,n),n}let at=P(``),ot=P(`size`),st=[{value:`size`,label:`Largest first`},{value:`name`,label:`Name`},{value:`path`,label:`Path`}],ct=q(()=>$.status?.coverage?.protection===`macos-no-materialization`),lt=q(()=>$.slice?{...$.slice.focusNode,name:_k($.slice.focusNode,e(ct))}:null),ut=q(()=>$.status?.rootIds.map((t,n)=>({value:t,label:e(gt)[n]===`/`?e(ct)?`Macintosh HD`:`Filesystem`:e(gt)[n]===`/System/Volumes/Data`?`Data`:e(gt)[n]?.split(/[\\/]/).at(-1)||`Location ${n+1}`}))??[]),dt=P(!1),ft=P(null),pt=P(null),mt=P(null),ht=P(null),gt=P(ve([])),_t=q(()=>C7({capabilities:$.capabilities,service:$.service})),vt=q(()=>zCe({capabilities:$.capabilities,service:$.service,coverage:$.status?.coverage,scannedPaths:e(gt)})),yt=q(()=>PCe({capabilities:$.capabilities,service:$.service})),bt=q(()=>LCe({capabilities:$.capabilities,service:$.service})),xt=q(()=>BCe({capabilities:$.capabilities,desktop:!1,coverage:$.status?.coverage})),St=q(()=>!!($.capabilities?.ai&&$.service?.aiChat)),Ct=q(()=>FCe({capabilities:$.capabilities,service:$.service})),wt=q(()=>ICe({capabilities:$.capabilities,service:$.service})),Tt=q(()=>W5($.capabilities?.host.platform,`reveal`)),Et=q(()=>W5($.capabilities?.host.platform,`open`)),Dt=q(()=>VCe({desktop:!1,ports:e(b),hostAi:e(St)})),Ot=q(()=>w7({capabilities:$.capabilities,service:$.service})),kt=q(()=>$.service===null?null:z9($.service)),At=q(()=>$.items.filter(t=>t.name.toLowerCase().includes(e(at).toLowerCase()))),jt=q(()=>e(At).filter(e=>kk(e))),Mt=q(()=>new Set($.items.filter(e=>{let t=Y5($.collector,e.path,$.activeScanId);return!!(t&&t.nodeId!==e.id)}).map(e=>e.id))),Nt=q(()=>$.status?.app!=null),Z=q(()=>$.status?.app??null),Pt=q(()=>e(Z)?.auditId??null),Ft=q(()=>e(Pt)?e(Ie).get(e(Pt))||(e(Qe)?.auditId===e(Pt)?e(Qe):null):null),It=q(()=>e(Z)?e(Ft)?.apps.find(t=>t.id===e(Z).appId)??null:null),Lt=q(()=>{if(!e(Z))return!1;let t=e(Fe).find(t=>t.appId===e(Z).appId);return!!(t&&X9(t,e(Qe)?.auditId??null)||e(Qe)?.auditId&&e(Z).auditId!==e(Qe).auditId)}),Rt=q(()=>{let t=new Set;for(let n of e(Le)){let r=n.app;if(!r)continue;let i=e(Fe).find(e=>e.appId===r.appId);(i&&X9(i,e(Qe)?.auditId??null)||e(Qe)?.auditId&&r.auditId!==e(Qe).auditId)&&t.add(n.scanId)}return $.status?.app&&e(Lt)&&$.activeScanId&&t.add($.activeScanId),t}),zt=q(()=>($.hoveredId?$.items.find(e=>e.id===$.hoveredId)??null:null)??e(lt)),Bt=q(()=>{let t=e(zt),n=$.slice?.focusNode;return e(Nt)&&t!==null&&t.depth===1&&n!==void 0&&n.depth===0&&Ck(n.path)}),Vt=q(()=>e(zt)?nie(e(zt),e(Bt),e(Ft),e(Z)?.appId??null):null),Ht=q(()=>!e(Nt)||!e(zt)?null:Tk(e(zt))?`audit-time`:`measured`),Ut=t7(`auto`,!1,typeof navigator<`u`?navigator.userAgent:``);ge(()=>{if(!e(We))return;let t=t7(e(Be).style,!1,navigator.userAgent);document.documentElement.dataset.interface=t,document.documentElement.dataset.density=e(Be).density,document.documentElement.style.setProperty(`--glass-strength`,String(lCe(e(Be).transparency))),window.localStorage.setItem($5,JSON.stringify(e(Be)))});let Wt=P(!1);function Gt(){try{let e=document.documentElement.dataset.backdrop;z(Wt,e===`glass`||e===`vibrancy`,!0)}catch{z(Wt,!1)}}let Kt=P(!1);function qt(){try{let e=window.__nativeHost;z(Kt,!!e?.state?.accent,!0)}catch{z(Kt,!1)}}ge(()=>{e(x)&&(Gt(),qt())}),ge(()=>{e(Be).accent;let t=window.__nativeHost;t?.apply?.(t.state)}),ge(()=>{let t=$.activeScanId;e(Xe),t&&e(Ge)!==`browse`&&e(Ge)!==`apps`&&$.status?.state===`ready`&&e(_t)&&Dn(!0)}),ge(()=>{e(tt);let t=e(Ge),n=e(Qe),r=e(et);t===`apps`&&e(yt)&&n===null&&r===null&&On()});let Jt=P(!1),Yt=0,Xt=null,Zt=null;typeof navigator<`u`&&/Macintosh|Mac OS X/i.test(navigator.userAgent),typeof navigator<`u`&&/Windows/i.test(navigator.userAgent);function Qt(){return`px-4`}let $t=q(()=>$.resolvedUrl!==null&&!$.sameOrigin&&!/^https?:\/\/(localhost|127\.0\.0\.1|\[::1\])(:|\/|$)/i.test($.resolvedUrl)&&$.phase!==`ready`),en=q(()=>$.slice===null?[]:[...$.slice.ancestors,$.slice.focusNode].map(t=>({...t,name:_k(t,e(ct))}))),tn=q(()=>new Set($.collector.map(e=>e.nodeId))),nn=q(()=>new Set([...e(tn),...e(Mt)])),rn=q(()=>$.collector.reduce((e,t)=>e+t.size,0)),an=q(()=>{let t=$.targets??[],n=e(je).map((e,t)=>({id:`recent_${t}`,label:e.label,path:e.path,kind:`folder`,description:``,size:0,source:`recent`,removable:!0,lastScannedAt:e.lastScannedAt}));return[...t,...n].map(t=>t.path===`/`&&e(ct)?{...t,label:`Macintosh HD`}:t)});function on(t){let n=t.trim();return e(E),n}function sn(){Xt?.close(),Xt=null,Zt!==null&&clearInterval(Zt),Zt=null}async function cn(t,n){if(n!==null)return t.exchange(n,e($t)&&e(u)!==``?e(u):void 0);if(t.devSession!==void 0)try{return await t.devSession()}catch{}return t.exchange(``,e($t)&&e(u)!==``?e(u):void 0)}async function ln(){let t=d7(e(p)||null),[{createHttpService:n}]=await Promise.all([ke(()=>import(`../chunks/rDsjs1c3.js`),[],import.meta.url)]),r=n({baseUrl:t.url,getToken:p7});if(r.devSession!==void 0){try{m7((await r.devSession()).token)}catch{return}await un()}}async function un(){$.phase=`connecting`,$.connectMessage=null;let t=d7(e(p)||null);$.resolvedUrl=t.url,$.sameOrigin=t.sameOrigin;let[{createHttpService:n}]=await Promise.all([ke(()=>import(`../chunks/rDsjs1c3.js`),[],import.meta.url)]),r=n({baseUrl:t.url,getToken:p7});try{let n=await r.health();if(n.apiMajor!==1)throw new i7({code:`UnsupportedOperation`,message:`incompatible contract major ${n.apiMajor}`,retryable:!1},400);let i=e(l)===``?f7():e(l);(i||p7()===null)&&m7((await cn(r,i)).token),i!==null&&(DCe(t.url),OCe()),$.service=r,$.capabilities=await r.capabilities();let a=await r.roots();$.targets=Array.isArray(a?.roots)?a.roots:[],$.volumes=(await r.volumes?.().catch(()=>null))?.volumes??[],$.phase=`ready`,Xt=NCe()??null,dn(),new URLSearchParams(window.location.search).has(`autoscan`)||await fn()}catch(e){kCe(),$.phase=`failed`,$.connectMessage=v7(e)}}function dn(){Zt===null&&(Zt=setInterval(()=>{let{service:e,status:t}=$;e!==null&&t!==null&&t.state===`scanning`&&e.scanStatus(t.scanId).then(e=>{$.activeScanId===e.scanId&&($.status=e,e.app&&hn(e),e.state===`ready`&&_7())}).catch(()=>{})},2e3))}async function fn(){let t=sCe(window.sessionStorage.getItem(Z5)),n=$.service;if(t&&n)try{let r=await n.scanStatus(t.scanId);if(r.state!==`scanning`&&r.state!==`ready`){window.sessionStorage.removeItem(Z5);return}if(r.app&&hn(r),t.app&&r.app)z(gt,[],!0);else if(t.paths)z(gt,t.paths,!0),e(ze).set(r.scanId,e(gt));else{window.sessionStorage.removeItem(Z5);return}$.activeScanId=r.scanId,$.status=r,$.collector=x7(r.scanId),z(Te,!1),r.state===`ready`&&(t.focusNodeId&&await An(t.focusNodeId),$.slice||await _7())}catch{window.sessionStorage.removeItem(Z5)}}async function pn(t){let{service:n}=$;if(!(n===null||e(De)||$.deleting)){z(De,!0),$.error=null;try{let r=await n.startScan({localOnly:!0,paths:t.map(on),ignoreHidden:!1,respectGitignore:!t.some(e=>e===`/`||e===`/System/Volumes/Data`),ignoredMode:`summarize`,label:t.includes(`/`)&&t.includes(`/System/Volumes/Data`)?`Macintosh HD`:t[0]});if(e(E)===c){for(let e of t)MCe(e);z(je,h7(),!0)}z(gt,t.map(on),!0),e(ze).set(r.scanId,e(gt)),$.activeScanId&&$.activeScanId!==r.scanId&&b7($.activeScanId,$.collector),z(Te,!1),z(Ge,`browse`),z(at,``),z(ot,`size`),z(ht,null),z(ft,null),z(mt,null),Ze++,Yt++,z(Jt,!1),z(Je,!1),z(qe,[],!0),z(Ke,null),$.activeScanId=r.scanId,window.sessionStorage.setItem(Z5,JSON.stringify({scanId:r.scanId,paths:e(gt)})),$.status={scanId:r.scanId,state:`scanning`,message:``,progress:null,currentPath:null,bytesScanned:0,entriesScanned:0,rootIds:[],label:r.label,updatedAt:r.createdAt},$.slice=null,$.items=[],$.collector=[]}catch(e){$.error=v7(e)}finally{z(De,!1)}}}async function mn(){let{service:e,status:t}=$;if(e!==null&&t!==null)try{$.status=await e.cancelScan(t.scanId)}catch(e){$.error=v7(e)}}function hn(t){t.app&&z(Le,[t,...e(Le).filter(e=>e.scanId!==t.scanId)].slice(0,10),!0)}async function gn(t){let{service:n}=$;if(n?.startAppScan===void 0||e(De)||e(Ae)!==null||$.deleting)return;let r=e(Fe).find(e=>e.appId===t),i=e(Qe)?.apps.find(e=>e.id===t),a=i?e(Qe)?.auditId??r?.auditId:r?.auditId;if(!a){z(ht,`Run the audit first — an app scan needs the current audit generation.`);return}z(Ae,t,!0),$.error=null;try{let o=await n.startAppScan({auditId:a,appId:t});if(e(Qe)?.auditId===a){let t=new Map(e(Ie));t.set(a,e(Qe)),z(Ie,t,!0)}aEe({appId:t,appName:i?.name??o.app?.appName??r?.appName??t,auditId:a,generatedAt:e(Qe)?.auditId===a?e(Qe).generatedAt:r?.generatedAt??null}),z(Fe,Y9(),!0),$.activeScanId&&$.activeScanId!==o.scanId&&b7($.activeScanId,$.collector),z(gt,[],!0),z(Te,!1),z(Ge,`browse`),z(at,``),z(ot,`size`),z(ht,null),z(ft,null),z(mt,null),z(pt,null),Re++,Ze++,Yt++,z(Jt,!1),z(Je,!1),z(qe,[],!0),z(Ke,null),$.activeScanId=o.scanId,window.sessionStorage.setItem(Z5,JSON.stringify({scanId:o.scanId,app:{appId:t,auditId:a}})),$.status={scanId:o.scanId,state:`scanning`,message:``,progress:null,currentPath:null,bytesScanned:0,entriesScanned:0,rootIds:o.rootIds,label:o.label,updatedAt:o.createdAt,...o.app?{app:o.app}:{}},o.app&&hn($.status),$.slice=null,$.items=[],$.childrenTotal=0,$.collector=[]}catch(e){$.error=v7(e)}finally{z(Ae,null)}}async function _n(t){let{service:n}=$;if(!(n===null||$.deleting||e(dt)||e(De)||e(Ae)!==null)&&t!==$.activeScanId){$.activeScanId&&b7($.activeScanId,$.collector),Re++,z(ft,null),z(mt,null),z(pt,null),Yt++,z(Jt,!1);try{let r=await n.scanStatus(t);if(r.app&&hn(r),$.activeScanId=r.scanId,$.status=r,$.collector=x7(r.scanId),$.slice=null,$.items=[],$.childrenTotal=0,z(Ge,`browse`),z(at,``),Ze++,z(qe,[],!0),z(Ke,null),z(ht,null),r.app)z(gt,[],!0),window.sessionStorage.setItem(Z5,JSON.stringify({scanId:r.scanId,app:{appId:r.app.appId,auditId:r.app.auditId}}));else{let t=e(ze).get(r.scanId);if(t&&t.length>0)z(gt,t,!0);else try{z(gt,await Promise.all(r.rootIds.map(async e=>(await n.treeSlice({scanId:r.scanId,nodeId:e,depth:0,maxChildrenPerNode:1})).focusNode.path)),!0),e(ze).set(r.scanId,e(gt))}catch{z(gt,[],!0)}e(gt).length>0&&window.sessionStorage.setItem(Z5,JSON.stringify({scanId:r.scanId,paths:e(gt)}))}r.state===`ready`&&await _7()}catch(e){$.error=v7(e)}}}async function vn(){let t=$.status?.app;if(t){if(!e(Qe)?.auditId){z(ht,`Refresh the audit first — rescanning needs the current generation.`);return}z(oe,!0);try{await gn(t.appId)}finally{z(oe,!1)}}}async function yn(t){if(t.scanState===`skipped`){z(ht,`Not scanned: ${t.skipReason??`unavailable`}. See scan details for coverage.`);return}if(Dk(t)){z(ht,`This folder's own files are counted in the total — open the folder to explore its contents.`);return}let{service:n,status:r}=$;if(n===null||r===null||r.state!==`ready`)return;let i=++Yt;z(Jt,!0),$.error=null;try{let[a,o]=await Promise.all([n.treeSlice({scanId:r.scanId,nodeId:t.id,depth:3,maxChildrenPerNode:50}),n.children({scanId:r.scanId,nodeId:t.id,offset:0,limit:200,sort:e(ot)})]);if(i!==Yt||$.activeScanId!==r.scanId)return;$.hoveredId=null,$.slice=a,$.items=o.items,$.childrenTotal=o.total,z(at,``),window.sessionStorage.setItem(Z5,JSON.stringify({scanId:r.scanId,paths:e(gt),focusNodeId:t.id}))}catch(e){i===Yt&&($.error=v7(e))}finally{i===Yt&&z(Jt,!1)}}function bn(){let e=$.slice?.ancestors.at(-1);e&&yn(e)}function xn(){z(ft,null),z(mt,null)}function Sn(t){$.status===null||$.deleting||e(dt)||(xn(),$.collector=X5($.collector,t,$.status.scanId,new Date().toISOString(),`col_${crypto.randomUUID().slice(0,8)}`))}function Cn(t){$.deleting||e(dt)||(xn(),$.collector=$.collector.filter(e=>e.nodeId!==t.id))}function wn(t){e(tn).has(t.id)?Cn(t):Sn(t)}function Tn(e){xn(),$.collector=$.collector.filter(t=>t.id!==e)}function En(e){Yt++,z(Jt,!1),z(Ge,e,!0),e!==`browse`&&z(Xe,e===`large-files`?10*1024**2:0,!0),window.innerWidth<760&&z(S,!1)}async function Dn(t){let{service:n,status:r}=$;if(!n?.discover||r?.state!==`ready`||e(Ge)===`browse`||e(Ge)===`apps`)return;let i=++Ze,a=e(Ge),o=t?0:e(qe).length;z(Je,!0),z(Ye,null),t&&(z(Ke,null),z(qe,[],!0));try{let s=await n.discover({scanId:r.scanId,kind:a,minSize:e(Xe),offset:o,limit:200});if(i!==Ze||r.scanId!==$.activeScanId||e(Ge)!==a)return;z(Ke,s,!0),z(qe,t?s.items:[...e(qe),...s.items],!0)}catch(e){i===Ze&&z(Ye,v7(e),!0)}finally{i===Ze&&z(Je,!1)}}async function On(){let{service:t}=$;if(!t?.appAudit||e(Ge)!==`apps`&&!e(Te))return;let n=++nt;z($e,!0),z(et,null);try{let r=await t.appAudit({minSize:e(tt),includeHeuristic:!0,limit:500}),i=e(Ge)===`apps`||e(Te)?`apps`:e(Ge);if(!nEe({request:n,sequence:nt,view:i}))return;z(Qe,r,!0)}catch(e){n===nt&&z(et,v7(e),!0)}finally{n===nt&&z($e,!1)}}async function kn(){let{service:t,status:n,slice:r}=$;if(!t||!n||!r||e(Jt))return;let i=++Yt;z(Jt,!0);try{let a=await t.children({scanId:n.scanId,nodeId:r.focusNode.id,offset:$.items.length,limit:200,sort:e(ot)});if(i!==Yt||n.scanId!==$.activeScanId)return;$.items=[...$.items,...a.items],$.childrenTotal=a.total}catch(e){$.error=v7(e)}finally{i===Yt&&z(Jt,!1)}}async function An(t,n=!1){let{service:r,status:i}=$;if(!r||!i)return;let a=++Yt,o=e(Ge);try{let s=await r.treeSlice({scanId:i.scanId,nodeId:t,depth:3,maxChildrenPerNode:50});if(a!==Yt||i.scanId!==$.activeScanId||e(Ge)!==o)return;n&&En(`browse`),await yn(s.focusNode)}catch(e){a===Yt&&i.scanId===$.activeScanId&&($.error=v7(e))}}async function jn(e){let t=e.parentId??$.status?.rootIds[0];t&&await An(t,!0)}async function Mn(e){try{await navigator.clipboard.writeText(e),z(ht,`Path copied`)}catch{z(ht,`Copy this path: ${e}`)}}async function Nn(e,t){let n=$.service;if(!n?.revealPath){z(ht,`This host cannot open folders in a file manager`);return}try{await n.revealPath({path:e.path,action:t}),z(ht,t===`open`?`Opened ${e.name}`:`Revealed ${e.name}`,!0)}catch(e){z(ht,v7(e),!0)}}function Pn(t=``){$.deleting||e(dt)||(Yt++,z(Jt,!1),z(Ee,t,!0),z(Te,!0))}function Fn(t){z(je,e(je).filter(e=>e.path!==t),!0),window.localStorage.setItem(`spacelens.recentScans`,JSON.stringify(e(je)))}async function In(){let{service:t,status:n,collector:r}=$;if(!t||!n||!r.length||!$.capabilities?.cleanup.plan||e(dt))return;let i=n.scanId,a=++Re,o=r.filter(e=>e.scanId===i).map(e=>e.nodeId);if(o.length!==0){z(dt,!0),z(mt,null),z(pt,null);try{let e=await t.plan({scanId:i,nodeIds:o});if(!S7({request:a,sequence:Re,activeScanId:$.activeScanId,scanId:i}))return;z(ft,e,!0)}catch(e){if(!S7({request:a,sequence:Re,activeScanId:$.activeScanId,scanId:i}))return;z(mt,v7(e),!0)}finally{S7({request:a,sequence:Re,activeScanId:$.activeScanId,scanId:i})&&z(dt,!1)}}}async function Ln(){let{service:t}=$,n=e(ft);if(t&&n&&!$.deleting&&$.capabilities?.cleanup.execute){$.deleting=!0,z(mt,null);try{z(pt,await t.execute({planId:n.planId,confirm:!0}),!0);let r=new Set(e(pt).trashed.map(e=>e.path));$.collector=$.collector.filter(e=>!r.has(e.path)),z(ft,null);let i=$.status?.app;i&&(oEe(i.appId),z(Fe,Y9(),!0)),z(ht,`${e(pt).trashed.length} items moved to Trash. Rescan to update the storage map.`)}catch(e){z(mt,v7(e),!0),z(ft,null)}finally{$.deleting=!1}}}function Rn(e){sEe(e),z(Fe,Y9(),!0)}ye(()=>{if(lEe()){fEe($),uEe(),$.phase=`ready`,z(Ge,`apps`),z(Be,e7(window.localStorage.getItem($5)),!0),z(We,!0),Gt(),On();return}z(Be,e7(window.localStorage.getItem($5)),!0);let e=window.localStorage.getItem(n7);z(G,uCe(e),!0),z(be,dCe(window.localStorage.getItem(r7),e),!0);let t=Number(window.localStorage.getItem(D));Number.isFinite(t)&&t>0&&z(te,ce(t),!0);let n=Number(window.localStorage.getItem(O));Number.isFinite(n)&&n>0&&z(M,le(n),!0);let r=window.localStorage.getItem(ee);(r===`horizontal`||r===`vertical`||r===`auto`)&&z(N,r,!0),z(v,fSe(window.localStorage.getItem(A)),!0),z(F,window.innerWidth,!0),window.addEventListener(`resize`,me),z(We,!0),Gt(),window.innerWidth<760&&z(S,!1);let i=d7(null);$.resolvedUrl=i.url,$.sameOrigin=i.sameOrigin;let a=f7(),o=new URLSearchParams(window.location.search).get(`autoscan`);return a!==null||p7()!==null?un().then(()=>{if(o!==null&&$.phase===`ready`)return pn($.targets.map(e=>e.path))}):ln().then(()=>{if(o!==null&&$.phase===`ready`)return pn($.targets.map(e=>e.path))}),()=>{window.removeEventListener(`resize`,me),sn()}});var zn=AEe(),Bn=K(zn),Vn=e=>{var t=mEe(),n=H(t);s(n),V(t),d(e,t)};h(Bn,t=>{$.phase===`ready`&&e(Ot)&&t(Vn)});var Hn=R(Bn,2),Un=t=>{var n=hEe(),r=R(K(n),2);{let t=q(()=>$.phase===`failed`?`failed`:$.phase===`connecting`?`connecting`:`idle`);Cfe(r,{get phase(){return e(t)},get resolvedUrl(){return $.resolvedUrl},get sameOrigin(){return $.sameOrigin},get hosted(){return e($t)},get ticket(){return e(l)},get password(){return e(u)},get message(){return $.connectMessage},onBaseUrl:e=>z(p,e,!0),onTicket:e=>z(l,e,!0),onPassword:e=>z(u,e,!0),onConnect:()=>void un()})}d(t,n)},Wn=t=>{var n=gEe(),r=H(n);{let t=q(Qt),n=q(()=>void 0);aG(r,{title:`Memory`,get subtitle(){return V5[e(v)]},mode:`browser`,get chromeInset(){return e(t)},get sidebarVisible(){return e(S)},get deviceLabel(){return e(n)},onOpenDevices:void 0,onToggleSidebar:()=>z(S,!e(S)),onOpenSettings:()=>z(x,!0)})}var i=R(r,2),a=H(i),o=t=>{bSe(t,{get section(){return e(v)},onSection:pe,get snapshot(){return e(y)}})};h(a,t=>{e(S)&&t(o)});var s=R(a,2);tEe(H(s),{get service(){return $.service},get capabilities(){return $.capabilities},get section(){return e(v)},onSection:pe,get snapshot(){return e(y)},set snapshot(e){z(y,e,!0)}}),V(s),V(i),V(n),d(t,n)},Gn=t=>{var n=k(),r=K(n),i=t=>{var n=_Ee(),r=H(n);{let t=q(Qt),n=q(()=>void 0),i=q(()=>`${Oe}/logo-mark.png`);aG(r,{title:`App storage`,mode:`browser`,get chromeInset(){return e(t)},sidebarVisible:!1,get deviceLabel(){return e(n)},onOpenDevices:void 0,onOpenSettings:()=>z(x,!0),get logo(){return e(i)}})}var i=R(r,2),a=H(i),o=H(a),s=H(o),c=L(s),l=R(s,2);f(l,()=>e(Ge),t=>{{let n=q(()=>$.deleting||e(dt)||e(Ae)!==null),r=q(()=>new Map(e(Fe).filter(e=>e.stale===!0).map(e=>[e.appId,!0])));F2(t,{get report(){return e(Qe)},get loading(){return e($e)},get error(){return e(et)},get minSize(){return e(tt)},get disabled(){return e(n)},get scanAvailable(){return e(bt)},get scanningAppId(){return e(Ae)},get staleByApp(){return e(r)},onRefresh:()=>void On(),onMinSize:e=>z(tt,e,!0),onCopy:e=>void Mn(e),onIcon:it,onScanApp:e=>void gn(e.id)})}}),V(o),V(a),V(i),V(n),j(`click`,c,()=>z(Ge,`browse`)),d(t,n)},a=t=>{var n=yEe(),r=H(n);{let t=q(()=>$.capabilities?.host.folderPicker??!1),n=q(()=>void 0),i=q(()=>e(wt)?e=>$.service.listFolder({path:e}):void 0),a=q(Qt),o=q(()=>`${Oe}/logo-mark.png`),s=q(()=>$.status?.state===`ready`),c=q(()=>e(De)||e(Ae)!==null||$.status?.state===`scanning`),l=q(()=>$.error||($.status?.state===`failed`?$.status.message:$.status?.state===`cancelled`?`Scan cancelled. Choose a location to start again.`:null)),u=q(()=>void 0),d=q(()=>$.status?.state===`scanning`?Roe($.status.label,e(ze).get($.status.scanId)??e(gt),e(Pe),$.volumes):null);yK(r,{get targets(){return e(an)},get volumes(){return $.volumes},mode:`browser`,get folderPicker(){return e(t)},onSettings:()=>z(x,!0),get deviceLabel(){return e(n)},onOpenDevices:void 0,onPickFolder:()=>$.service?.pickFolder?.()??Promise.resolve(null),get onListFolder(){return e(i)},get chromeInset(){return e(a)},get logo(){return e(o)},get initialPath(){return e(Ee)},get canClose(){return e(s)},get busy(){return e(c)},get error(){return e(l)},get status(){return $.status},get sidebarFooter(){return e(u)},get progressBaseline(){return e(d)},onScan:e=>void pn(e),onForget:Fn,get auditReport(){return e(Qe)},get auditLoading(){return e($e)},get auditError(){return e(et)},onRefreshAudit:()=>void On(),get auditSupported(){return e(yt)},get appScanSupported(){return e(bt)},get scanningAppId(){return e(Ae)},get recentApps(){return e(Fe)},onScanApp:e=>void gn(e),onForgetApp:Rn,onIcon:it,onCancel:()=>{$.status?.state===`scanning`?mn():z(Te,!1)}})}var i=R(r,2),a=e=>{var t=vEe(),n=L(t);j(`click`,n,()=>z(Ge,`apps`)),d(e,t)};h(i,t=>{e(yt)&&t(a)}),V(n),d(t,n)};h(r,t=>{e(Ge)===`apps`&&e(yt)?t(i):t(a,-1)}),d(t,n)},Kn=r=>{var a=kEe(),o=H(a);{let t=q(()=>e(lt)?.name??$.status.label??`Storage`),n=q(Qt),r=q(()=>void 0),i=q(()=>$.deleting||e(dt)),a=q(()=>e(Dt)?()=>z(g,!e(g)):void 0);aG(o,{get title(){return e(t)},mode:`browser`,get chromeInset(){return e(n)},get sidebarVisible(){return e(S)},get chartVisible(){return e(C)},get chartFocused(){return e(w)},onToggleChartFocus:()=>z(w,!e(w)),get deviceLabel(){return e(r)},onOpenDevices:void 0,get collectorCount(){return $.collector.length},get busy(){return e(i)},onNewScan:()=>Pn(),onToggleSidebar:()=>z(S,!e(S)),onToggleChart:()=>{z(C,!e(C)),z(Ge,`browse`)},get orientation(){return e(ne)},onToggleOrientation:he,onOpenCollector:()=>z(m,!0),onOpenSettings:()=>z(x,!0),get onOpenAi(){return e(a)},get aiOpen(){return e(g)}})}var s=R(o,2),c=H(s),l=t=>{{let n=q(()=>e(en)[0]?.path??e(gt)[0]??$.status.label),r=q(()=>$.deleting||e(dt)),i=q(()=>$.deleting||e(dt)),a=q(()=>void 0),o=q(()=>$.status?.bytesScanned??0),s=q(()=>$.status?.entriesScanned??0),c=q(()=>$.status?.label??null);TG(t,{get targets(){return e(an)},get view(){return e(Ge)},get discoveryAvailable(){return e(_t)},get gitignoredAvailable(){return e(vt)},get appAuditAvailable(){return e(yt)},get selectedPath(){return e(n)},get busy(){return e(r)},onView:En,onSelect:e=>Pn(e.path),onCustom:()=>Pn(),onForget:Fn,get appScans(){return e(Le)},get activeScanId(){return $.activeScanId},onSwitchScan:e=>void _n(e),get staleScanIds(){return e(Rt)},get recentApps(){return e(Fe)},onSelectApp:e=>void gn(e),onForgetApp:Rn,get switchingBlocked(){return e(i)},get footer(){return e(a)},onSettings:()=>z(x,!0),get volume(){return e(ae)},get scanBytes(){return e(o)},get scanEntries(){return e(s)},get scanLabel(){return e(c)},get rescanning(){return e(oe)},onRescan:()=>void se()})}};h(c,t=>{e(S)&&t(l)});var u=R(c,2),p=H(u);{let t=q(()=>e(Ge)===`browse`?e(lt)?.name??`Storage`:e(Ge)===`large-files`?`Large files`:e(Ge)===`caches`?`Developer cleanup`:e(Ge)===`apps`?`App storage`:`Gitignored space`),n=q(()=>e(Nt)?void 0:e(lt)?.path??$.status.label??void 0),r=q(()=>$.deleting||e(dt));Uue(p,{get title(){return e(t)},get path(){return e(n)},get busy(){return e(r)},get collectorCount(){return $.collector.length},get chartVisible(){return e(C)},onNewScan:()=>Pn(),onOpenCollector:()=>z(m,!0),onToggleChart:()=>{z(C,!e(C)),z(Ge,`browse`)}})}var _=R(p,2),v=e=>{J2(e,{state:`error`,title:`Could not complete the request`,get detail(){return $.error}})};h(_,e=>{$.error&&e(v)});var y=R(_,2),b=t=>{var n=xEe(),r=H(n),i=L(r,!0),a=R(r),o=t=>{var n=bEe();I(()=>n.disabled=$.deleting),j(`click`,n,()=>{z(pt,null),$.status?.app?vn():pn(e(gt).length?e(gt):[$.status?.label??``])}),d(t,n)};h(a,t=>{e(pt)&&t(o)});var s=R(a);V(n),I(()=>X(i,e(ht))),j(`click`,s,()=>z(ht,null)),d(t,n)};h(y,t=>{e(ht)&&t(b)});var T=R(y,2),E=t=>{{let n=q(()=>e(It)?.name??e(Z).appName),r=q(()=>e(Ft)?.generatedAt??(e(Qe)?.auditId===e(Z).auditId?e(Qe).generatedAt:null)),i=q(()=>$.slice?.totalSize??$.status.bytesScanned),a=q(()=>e(It)?.locations.length??null),o=q(()=>e(It)?.appPath??null),s=q(()=>e(It)?.kind===`cli`);dfe(t,{get appName(){return e(n)},get appId(){return e(Z).appId},get auditId(){return e(Z).auditId},get generatedAt(){return e(r)},get stale(){return e(Lt)},get totalBytes(){return e(i)},get locationCount(){return e(a)},get appPath(){return e(o)},get isCli(){return e(s)},get rescanning(){return e(oe)},get rescanAvailable(){return e(bt)},onBack:()=>En(`apps`),onRescan:()=>void vn(),onIcon:it})}};h(T,t=>{e(Nt)&&e(Z)&&t(E)});var D=R(T,2);Lue(D,{get status(){return $.status},get fullDiskAccess(){return e(Ue)},onOpenFullDiskAccess:void 0});var O=R(D,2),ee=r=>{var a=DEe(),o=K(a),s=H(o),c=t=>{{let n=q(()=>e(en)[0]?.id??$.status.rootIds[0]);WK(t,{class:`root-select`,label:`Scanned location`,get value(){return e(n)},get options(){return e(ut)},onChange:e=>void An(e)})}};h(s,e=>{$.status.rootIds.length>1&&e(c)});var l=R(s,2);{let t=q(()=>e(en).length>1),n=q(()=>e(Ct)?(e,t)=>void Nn(e,t):void 0);_N(l,{get items(){return e(en)},onSelect:e=>void yn(e),onBack:bn,get canGoBack(){return e(t)},get onReveal(){return e(n)},get revealLabel(){return e(Tt)}})}var u=R(l,2),p=L(u,!0);V(o);var m=R(o,2);let g;var _=H(m),v=t=>{var n=CEe(),r=H(n);{let t=q(()=>$.slice?.tree??null),n=q(()=>$.items.find(e=>e.id===$.hoveredId)??null),i=q(()=>e(en).length>1);Noe(r,{get tree(){return e(t)},get focusNode(){return e(lt)},get mode(){return e(G)},onModeChange:xe,get density(){return e(be)},onDensityChange:Ce,get hoveredNode(){return e(n)},onBack:bn,get canGoBack(){return e(i)},get hoveredId(){return $.hoveredId},get collectedIds(){return e(Mt)},get inspectorAnnotation(){return e(Vt)},get inspectorProvenance(){return e(Ht)},onHover:e=>$.hoveredId=e,onOpen:e=>void yn(e),onContext:wn})}var i=R(r,2),a=e=>{var t=SEe(),n=L(t);I(e=>X(n,`${e??``} smaller items grouped · open a folder to explore`),[()=>$.slice.omittedCount.toLocaleString()]),d(e,t)};h(i,e=>{$.slice?.truncated&&e(a)}),V(n),d(t,n)};h(_,t=>{e(C)&&t(v)});var y=R(_,2),b=t=>{var n=wEe();I(()=>{Y(n,`data-dragging`,e(re)),Y(n,`aria-orientation`,e(ne)===`vertical`?`horizontal`:`vertical`),Y(n,`aria-valuenow`,e(ne)===`vertical`?e(M):e(te)),Y(n,`aria-valuemin`,e(ne)===`vertical`?160:240),Y(n,`aria-valuemax`,e(ne)===`vertical`?640:720)}),j(`pointerdown`,n,U),j(`keydown`,n,_e),j(`dblclick`,n,de),d(t,n)};h(y,t=>{e(C)&&t(b)});var x=R(y,2),S=H(x),T=H(S),E=R(H(T),2),D=L(E);V(T);var O=R(T,2);WK(H(O),{get value(){return e(ot)},get options(){return st},label:`Sort folder contents`,class:`w-32`,onChange:e=>{z(ot,e===`name`?`name`:e===`path`?`path`:`size`,!0),$.slice&&yn($.slice.focusNode)}}),V(O),V(S);var k=R(S,2),ee=H(k);t(ee,()=>NG,(t,n)=>{n(t,{type:`search`,"aria-label":`Search folder contents`,placeholder:`Search loaded items…`,get value(){return e(at)},set value(e){z(at,e,!0)}})}),V(k);var A=R(k,2),N=H(A),P=L(N),F=R(N),ae=t=>{var n=TEe();I(()=>n.disabled=$.deleting||e(dt)),j(`click`,n,()=>{xn(),$.collector=[]}),d(t,n)};h(F,e=>{$.collector.length&&e(ae)}),V(A);var oe=R(A,2);f(oe,()=>$.slice?.focusNode.id,t=>{{let n=q(()=>e(G)===`sunburst`?`sunburst`:`standard`),r=q(()=>e(dt)||$.deleting),i=q(()=>$.slice?.focusNode.size??0),a=q(()=>e(Ct)?(e,t)=>void Nn(e,t):void 0);qU(t,{get colorMode(){return e(n)},get disabled(){return e(r)},isCovered:e=>{let t=Y5($.collector,e.path,$.activeScanId);return!!(t&&t.nodeId!==e.id)},get totalSize(){return e(i)},get items(){return e(At)},get hoveredId(){return $.hoveredId},get collectedIds(){return e(nn)},onHover:e=>$.hoveredId=e,onOpen:e=>void yn(e),onCollect:Sn,onRemove:Cn,get onReveal(){return e(a)},get revealLabel(){return e(Tt)},get openLabel(){return e(Et)}})}});var se=R(oe,2),ce=r=>{var i=EEe(),a=H(i);t(a,()=>pN,(t,r)=>{r(t,{variant:`ghost`,size:`sm`,get disabled(){return e(Jt)},onclick:()=>void kn(),children:(e,t)=>{n();var r=W(`Load more items`);d(e,r)},$$slots:{default:!0}})}),V(i),d(r,i)};h(se,e=>{$.items.length<$.childrenTotal&&e(ce)}),V(x),V(m),Se(m,e=>z(ie,e),()=>e(ie)),I((t,n,r)=>{X(p,t),g=we(m,1,`explorer-layout windows:mx-4 windows:mb-4 windows:gap-3`,null,g,{"without-chart":!e(C),"chart-focused":e(w)&&e(C)}),Y(m,`data-chart-visible`,e(C)),Y(m,`data-orientation`,e(ne)),i(m,`--contents-width: ${e(te)}px; --contents-height: ${e(M)}px`),Y(m,`aria-busy`,e(Jt)),X(D,`${n??``} item${$.childrenTotal===1?``:`s`} · ${r??``}
|
|
163
163
|
loaded`),N.disabled=$.deleting||e(dt)||!e(jt).length,X(P,`Select shown (${e(jt).length??``})`)},[()=>e(Jt)?`Opening…`:hk($.slice?.totalSize??$.status.bytesScanned),()=>$.childrenTotal.toLocaleString(),()=>$.items.length.toLocaleString()]),j(`click`,N,()=>e(jt).forEach(Sn)),d(r,a)},A=t=>{var n=k(),r=K(n);f(r,()=>e(Ge),t=>{{let n=q(()=>$.deleting||e(dt)||e(Ae)!==null),r=q(()=>new Map(e(Fe).filter(e=>e.stale===!0).map(e=>[e.appId,!0])));F2(t,{get report(){return e(Qe)},get loading(){return e($e)},get error(){return e(et)},get minSize(){return e(tt)},get disabled(){return e(n)},get scanAvailable(){return e(bt)},get scanningAppId(){return e(Ae)},get staleByApp(){return e(r)},onRefresh:()=>void On(),onMinSize:e=>z(tt,e,!0),onCopy:e=>void Mn(e),onIcon:it,onScanApp:e=>void gn(e.id)})}}),d(t,n)},N=t=>{var n=k(),r=K(n);f(r,()=>e(Ge),t=>{{let n=q(()=>$.deleting||e(dt)),r=q(()=>e(Ct)?(e,t)=>void Nn(e,t):void 0);ede(t,{get kind(){return e(Ge)},get page(){return e(Ke)},get items(){return e(qe)},get loading(){return e(Je)},get error(){return e(Ye)},get minSize(){return e(Xe)},get disabled(){return e(n)},isSelected:e=>!!Y5($.collector,e.path,$.activeScanId),isCovered:e=>{let t=Y5($.collector,e.path,$.activeScanId);return!!(t&&t.nodeId!==e.id)},onToggle:wn,onSelect:e=>e.forEach(Sn),onDeselect:e=>e.forEach(Cn),onMinSize:e=>z(Xe,e,!0),onLoadMore:()=>void Dn(!1),onRetry:()=>void Dn(!0),onBrowse:e=>void jn(e),onCopy:e=>void Mn(e),get onReveal(){return e(r)},get revealLabel(){return e(Tt)},get openLabel(){return e(Et)}})}}),d(t,n)};h(O,t=>{e(Ge)===`browse`?t(ee):e(Ge)===`apps`?t(A,1):t(N,-1)}),V(u),V(s);var P=R(s,2),F=H(P),ce=H(F);let le;var B=R(ce),ue=R(B,2);V(F);var fe=R(F);t(fe,()=>pN,(t,r)=>{r(t,{variant:`ghost`,size:`sm`,class:`macos:px-1 windows:mr-2 windows:bg-primary windows:px-3 windows:text-primary-foreground windows:hover:bg-primary/80 linux:rounded-lg linux:bg-(--control) linux:px-3`,onclick:()=>z(m,!0),children:(t,r)=>{var i=OEe(),a=K(i),o=L(a),s=R(a),c=L(s,!0);n(),I(e=>{X(o,`${$.collector.length??``} selected`),X(c,e)},[()=>hk(e(rn))]),d(t,i)},$$slots:{default:!0}})}),V(P);var pe=R(P,2);kW(pe,{get open(){return e(m)},get entries(){return $.collector},get totalSize(){return e(rn)},get deleting(){return $.deleting},get planning(){return e(dt)},get plan(){return e(ft)},get outcome(){return e(pt)},get error(){return e(mt)},get cleanupAvailable(){return e(xt)},onClose:()=>{z(m,!1),z(ft,null)},onRemove:Tn,onClear:()=>{xn(),$.collector=[]},onDelete:()=>void In(),onConfirm:()=>void Ln()}),R9(R(pe,2),{get open(){return e(g)},get available(){return e(Dt)},get port(){return e(kt)},onClose:()=>z(g,!1),onOpenCollector:()=>{z(g,!1),z(m,!0)}}),V(a),I(t=>{le=we(ce,1,``,null,le,{reconnecting:$.streamState!==`live`}),X(B,`${t??``} scanned `),X(ue,` ${$.status.coverage?e(xt)?`Cleanup enabled`:`Read-only scan`:e(xt)?`Cleanup enabled`:`Read-only connection`}`)},[()=>hk($.status.bytesScanned)]),d(r,a)};h(Hn,t=>{$.phase===`ready`?e(_)&&e(Ot)?t(Wn,1):e(Te)||$.status===null||$.status.state!==`ready`?t(Gn,2):t(Kn,-1):t(Un)});var qn=R(Hn,2);{let t=q(()=>Ut===`macos`?`macOS on this platform`:Ut===`windows`?`Windows on this platform`:Ut===`linux`?`Linux (GNOME) on this platform`:`Web on this platform`),n=q(()=>e(Ve)??void 0);yfe(qn,{get open(){return e(x)},get style(){return e(Be).style},get density(){return e(Be).density},get mode(){return Ne.current},get transparency(){return e(Be).transparency},get glassAvailable(){return e(Wt)},get accent(){return e(Be).accent},get systemAccentAvailable(){return e(Kt)},get automaticStyle(){return e(t)},get appVersion(){return e(n)},get update(){return e(He)},onClose:()=>z(x,!1),onStyle:t=>e(Be).style=t,onDensity:t=>e(Be).density=t,get onMode(){return Me},onTransparency:t=>e(Be).transparency=t,onAccent:t=>e(Be).accent=t,onCheckUpdates:void 0,onInstallUpdate:void 0})}var Jn=R(qn,2);h(Jn,e=>{}),d(r,zn),a()}p([`click`,`pointerdown`,`keydown`,`dblclick`]);export{i7 as a,jEe as component,o7 as i,l7 as n,pCe as o,xCe as r,s7 as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1795229550243"}
|
package/dist/web/index.html
CHANGED
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
8
|
<meta name="color-scheme" content="light dark" />
|
|
9
9
|
<title>Space Lens</title>
|
|
10
|
-
<link href="./_app/immutable/entry/start.
|
|
11
|
-
<link href="./_app/immutable/chunks/
|
|
10
|
+
<link href="./_app/immutable/entry/start.UvdeekY8.js" rel="modulepreload">
|
|
11
|
+
<link href="./_app/immutable/chunks/DXxXg_nY.js" rel="modulepreload">
|
|
12
12
|
<link href="./_app/immutable/chunks/D_inIiOK.js" rel="modulepreload">
|
|
13
|
-
<link href="./_app/immutable/entry/app.
|
|
13
|
+
<link href="./_app/immutable/entry/app.DmhhKB0C.js" rel="modulepreload">
|
|
14
14
|
<link href="./_app/immutable/chunks/uBIymjUX.js" rel="modulepreload">
|
|
15
15
|
<link href="./_app/immutable/chunks/xihTtKlq.js" rel="modulepreload">
|
|
16
16
|
<link href="./_app/immutable/nodes/0.BfNK78ja.js" rel="modulepreload">
|
|
17
17
|
<link href="./_app/immutable/chunks/Czmuk0Xq.js" rel="modulepreload">
|
|
18
|
-
<link href="./_app/immutable/nodes/2.
|
|
18
|
+
<link href="./_app/immutable/nodes/2.CxkPY10S.js" rel="modulepreload">
|
|
19
19
|
|
|
20
20
|
<link href="./_app/immutable/assets/0.DaFvPEiH.css" rel="stylesheet">
|
|
21
21
|
<link href="./_app/immutable/assets/2.Rwbdhuvh.css" rel="stylesheet">
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
<div style="display: contents">
|
|
25
25
|
<script>
|
|
26
26
|
{
|
|
27
|
-
|
|
27
|
+
__sveltekit_oetqib = {
|
|
28
28
|
base: new URL(".", location).pathname.slice(0, -1)
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const element = document.currentScript.parentElement;
|
|
32
32
|
|
|
33
33
|
Promise.all([
|
|
34
|
-
import("./_app/immutable/entry/start.
|
|
35
|
-
import("./_app/immutable/entry/app.
|
|
34
|
+
import("./_app/immutable/entry/start.UvdeekY8.js"),
|
|
35
|
+
import("./_app/immutable/entry/app.DmhhKB0C.js")
|
|
36
36
|
]).then(([kit, app]) => {
|
|
37
37
|
kit.start(app, element);
|
|
38
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=location.pathname.split(`/`).slice(0,-1).join(`/`),t=[e+`/_app/immutable/assets/inter-cyrillic-ext-wght-normal.BOeWTOD4.woff2`,e+`/_app/immutable/assets/inter-cyrillic-wght-normal.DqGufNeO.woff2`,e+`/_app/immutable/assets/inter-greek-ext-wght-normal.DlzME5K_.woff2`,e+`/_app/immutable/assets/inter-greek-wght-normal.CkhJZR-_.woff2`,e+`/_app/immutable/assets/inter-latin-ext-wght-normal.DO1Apj_S.woff2`,e+`/_app/immutable/assets/inter-latin-wght-normal.Dx4kXJAl.woff2`,e+`/_app/immutable/assets/inter-vietnamese-wght-normal.CBcvBZtf.woff2`,e+`/_app/immutable/entry/start.
|
|
1
|
+
var e=location.pathname.split(`/`).slice(0,-1).join(`/`),t=[e+`/_app/immutable/assets/inter-cyrillic-ext-wght-normal.BOeWTOD4.woff2`,e+`/_app/immutable/assets/inter-cyrillic-wght-normal.DqGufNeO.woff2`,e+`/_app/immutable/assets/inter-greek-ext-wght-normal.DlzME5K_.woff2`,e+`/_app/immutable/assets/inter-greek-wght-normal.CkhJZR-_.woff2`,e+`/_app/immutable/assets/inter-latin-ext-wght-normal.DO1Apj_S.woff2`,e+`/_app/immutable/assets/inter-latin-wght-normal.Dx4kXJAl.woff2`,e+`/_app/immutable/assets/inter-vietnamese-wght-normal.CBcvBZtf.woff2`,e+`/_app/immutable/entry/start.UvdeekY8.js`,e+`/_app/immutable/chunks/rDsjs1c3.js`,e+`/_app/immutable/entry/app.DmhhKB0C.js`,e+`/_app/immutable/nodes/0.BfNK78ja.js`,e+`/_app/immutable/assets/0.DaFvPEiH.css`,e+`/_app/immutable/nodes/1.aOMFgZ6r.js`,e+`/_app/immutable/nodes/2.CxkPY10S.js`,e+`/_app/immutable/assets/2.Rwbdhuvh.css`,e+`/_app/immutable/chunks/Bjy-W4x2.js`,e+`/_app/immutable/chunks/Czmuk0Xq.js`,e+`/_app/immutable/chunks/DXxXg_nY.js`,e+`/_app/immutable/chunks/D_inIiOK.js`,e+`/_app/immutable/chunks/uBIymjUX.js`,e+`/_app/immutable/chunks/xihTtKlq.js`],n=[e+`/favicon.png`,e+`/logo-mark.png`,e+`/manifest.webmanifest`];e+``;var r=`spacelens-shell-1795229550243`,i=[...t,...n,`/200.html`];self.addEventListener(`install`,e=>{e.waitUntil(caches.open(r).then(e=>e.addAll(i)).then(()=>self.skipWaiting()))}),self.addEventListener(`activate`,e=>{e.waitUntil(caches.keys().then(e=>Promise.all(e.filter(e=>e!==r).map(e=>caches.delete(e)))).then(()=>self.clients.claim()))}),self.addEventListener(`fetch`,e=>{let t=e.request;if(t.method!==`GET`)return;let n=new URL(t.url);if(n.origin===self.location.origin&&!n.pathname.startsWith(`/api/`)){if(t.mode===`navigate`){e.respondWith(fetch(t).then(e=>{let t=e.clone();return caches.open(r).then(e=>e.put(`/200.html`,t)),e}).catch(()=>caches.match(`/200.html`).then(e=>e??Response.error())));return}e.respondWith(caches.match(t).then(e=>e??fetch(t)))}});
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,n,o as r,r as i,t as a}from"../nodes/2.c02Tt4_b.js";export{e as ServiceError,a as TauriProblemError,t as connectEventStream,r as createHttpService,n as createTauriRemotes,i as createTauriService};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"../chunks/BjAaj2_R.js";export{e as load_css,t as start};
|