@axium/server 0.19.2 → 0.19.3

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.
Files changed (37) hide show
  1. package/build/client/_app/immutable/chunks/DtmP0Z35.js +3 -0
  2. package/build/client/_app/immutable/chunks/DtmP0Z35.js.br +0 -0
  3. package/build/client/_app/immutable/chunks/DtmP0Z35.js.gz +0 -0
  4. package/build/client/_app/immutable/entry/{app.BhR1OQ9M.js → app.BgQjbQRv.js} +2 -2
  5. package/build/client/_app/immutable/entry/app.BgQjbQRv.js.br +0 -0
  6. package/build/client/_app/immutable/entry/app.BgQjbQRv.js.gz +0 -0
  7. package/build/client/_app/immutable/entry/start.14fO9BBt.js +1 -0
  8. package/build/client/_app/immutable/entry/start.14fO9BBt.js.br +2 -0
  9. package/build/client/_app/immutable/entry/start.14fO9BBt.js.gz +0 -0
  10. package/build/client/_app/immutable/nodes/{1.CmApQ62q.js → 1.kus51SUJ.js} +1 -1
  11. package/build/client/_app/immutable/nodes/1.kus51SUJ.js.br +0 -0
  12. package/build/client/_app/immutable/nodes/1.kus51SUJ.js.gz +0 -0
  13. package/build/client/_app/version.json +1 -1
  14. package/build/client/_app/version.json.br +0 -0
  15. package/build/client/_app/version.json.gz +0 -0
  16. package/build/server/chunks/{1-Dvu-6EP-.js → 1-B2QhMtsi.js} +2 -2
  17. package/build/server/chunks/{1-Dvu-6EP-.js.map → 1-B2QhMtsi.js.map} +1 -1
  18. package/build/server/chunks/{hooks.server-w5bqOSE3.js → hooks.server-B-Z15-RT.js} +54 -2
  19. package/build/server/chunks/hooks.server-B-Z15-RT.js.map +1 -0
  20. package/build/server/index.js +2 -2
  21. package/build/server/index.js.map +1 -1
  22. package/build/server/manifest.js +2 -2
  23. package/build/server/manifest.js.map +1 -1
  24. package/dist/cli.js +0 -3
  25. package/dist/database.js +208 -132
  26. package/package.json +1 -1
  27. package/build/client/_app/immutable/chunks/DC6rf2pV.js +0 -3
  28. package/build/client/_app/immutable/chunks/DC6rf2pV.js.br +0 -0
  29. package/build/client/_app/immutable/chunks/DC6rf2pV.js.gz +0 -0
  30. package/build/client/_app/immutable/entry/app.BhR1OQ9M.js.br +0 -0
  31. package/build/client/_app/immutable/entry/app.BhR1OQ9M.js.gz +0 -0
  32. package/build/client/_app/immutable/entry/start.DVsnYbMe.js +0 -1
  33. package/build/client/_app/immutable/entry/start.DVsnYbMe.js.br +0 -2
  34. package/build/client/_app/immutable/entry/start.DVsnYbMe.js.gz +0 -0
  35. package/build/client/_app/immutable/nodes/1.CmApQ62q.js.br +0 -0
  36. package/build/client/_app/immutable/nodes/1.CmApQ62q.js.gz +0 -0
  37. package/build/server/chunks/hooks.server-w5bqOSE3.js.map +0 -1
@@ -10,10 +10,10 @@ return {
10
10
  assets: new Set(["icons/brands.svg","icons/light.svg","icons/regular.svg","icons/solid.svg","styles.css"]),
11
11
  mimeTypes: {".svg":"image/svg+xml",".css":"text/css"},
12
12
  _: {
13
- client: {start:"_app/immutable/entry/start.DVsnYbMe.js",app:"_app/immutable/entry/app.BhR1OQ9M.js",imports:["_app/immutable/entry/start.DVsnYbMe.js","_app/immutable/chunks/DC6rf2pV.js","_app/immutable/chunks/IgiyYk6u.js","_app/immutable/chunks/DCUM25og.js","_app/immutable/chunks/BYEtX5Az.js","_app/immutable/chunks/p-F-zYzk.js","_app/immutable/entry/app.BhR1OQ9M.js","_app/immutable/chunks/DCUM25og.js","_app/immutable/chunks/BYEtX5Az.js","_app/immutable/chunks/DsnmJJEf.js","_app/immutable/chunks/IgiyYk6u.js","_app/immutable/chunks/p-F-zYzk.js","_app/immutable/chunks/FWeOBoAM.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
13
+ client: {start:"_app/immutable/entry/start.14fO9BBt.js",app:"_app/immutable/entry/app.BgQjbQRv.js",imports:["_app/immutable/entry/start.14fO9BBt.js","_app/immutable/chunks/DtmP0Z35.js","_app/immutable/chunks/IgiyYk6u.js","_app/immutable/chunks/DCUM25og.js","_app/immutable/chunks/BYEtX5Az.js","_app/immutable/chunks/p-F-zYzk.js","_app/immutable/entry/app.BgQjbQRv.js","_app/immutable/chunks/DCUM25og.js","_app/immutable/chunks/BYEtX5Az.js","_app/immutable/chunks/DsnmJJEf.js","_app/immutable/chunks/IgiyYk6u.js","_app/immutable/chunks/p-F-zYzk.js","_app/immutable/chunks/FWeOBoAM.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
14
14
  nodes: [
15
15
  __memo(() => import('./chunks/0-BwO1RCtn.js')),
16
- __memo(() => import('./chunks/1-Dvu-6EP-.js')),
16
+ __memo(() => import('./chunks/1-B2QhMtsi.js')),
17
17
  __memo(() => import('./chunks/2-BwMXZ3uH.js')),
18
18
  __memo(() => import('./chunks/3-BI9EEPQX.js')),
19
19
  __memo(() => import('./chunks/4-B4PHWuxx.js')),
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.js","sources":["../../.svelte-kit/adapter-node/manifest.js"],"sourcesContent":["export const manifest = (() => {\nfunction __memo(fn) {\n\tlet value;\n\treturn () => value ??= (value = fn());\n}\n\nreturn {\n\tappDir: \"_app\",\n\tappPath: \"_app\",\n\tassets: new Set([\"icons/brands.svg\",\"icons/light.svg\",\"icons/regular.svg\",\"icons/solid.svg\",\"styles.css\"]),\n\tmimeTypes: {\".svg\":\"image/svg+xml\",\".css\":\"text/css\"},\n\t_: {\n\t\tclient: {start:\"_app/immutable/entry/start.DVsnYbMe.js\",app:\"_app/immutable/entry/app.BhR1OQ9M.js\",imports:[\"_app/immutable/entry/start.DVsnYbMe.js\",\"_app/immutable/chunks/DC6rf2pV.js\",\"_app/immutable/chunks/IgiyYk6u.js\",\"_app/immutable/chunks/DCUM25og.js\",\"_app/immutable/chunks/BYEtX5Az.js\",\"_app/immutable/chunks/p-F-zYzk.js\",\"_app/immutable/entry/app.BhR1OQ9M.js\",\"_app/immutable/chunks/DCUM25og.js\",\"_app/immutable/chunks/BYEtX5Az.js\",\"_app/immutable/chunks/DsnmJJEf.js\",\"_app/immutable/chunks/IgiyYk6u.js\",\"_app/immutable/chunks/p-F-zYzk.js\",\"_app/immutable/chunks/FWeOBoAM.js\"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},\n\t\tnodes: [\n\t\t\t__memo(() => import('./nodes/0.js')),\n\t\t\t__memo(() => import('./nodes/1.js')),\n\t\t\t__memo(() => import('./nodes/2.js')),\n\t\t\t__memo(() => import('./nodes/3.js')),\n\t\t\t__memo(() => import('./nodes/4.js')),\n\t\t\t__memo(() => import('./nodes/5.js')),\n\t\t\t__memo(() => import('./nodes/6.js'))\n\t\t],\n\t\troutes: [\n\t\t\t{\n\t\t\t\tid: \"/_axium/default\",\n\t\t\t\tpattern: /^\\/_axium\\/default\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 2 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/account\",\n\t\t\t\tpattern: /^\\/account\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 3 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/login\",\n\t\t\t\tpattern: /^\\/login\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 4 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/logout\",\n\t\t\t\tpattern: /^\\/logout\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 5 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/register\",\n\t\t\t\tpattern: /^\\/register\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 6 },\n\t\t\t\tendpoint: null\n\t\t\t}\n\t\t],\n\t\tprerendered_routes: new Set([]),\n\t\tmatchers: async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GAAG;AACH,IAAI,EAAE,EAAE,WAAW;AACnB,IAAI,OAAO,EAAE,iBAAiB;AAC9B,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd;AACA,GAAG;AACH,EAAE,kBAAkB,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC;AACjC,EAAE,QAAQ,EAAE,YAAY;AACxB;AACA,GAAG,OAAO,IAAI;AACd,EAAE,CAAC;AACH,EAAE,aAAa,EAAE;AACjB;AACA;AACA,CAAC;;AAEW,MAAC,WAAW,GAAG,IAAI,GAAG,CAAC,EAAE;;AAEzB,MAAC,IAAI,GAAG;;;;"}
1
+ {"version":3,"file":"manifest.js","sources":["../../.svelte-kit/adapter-node/manifest.js"],"sourcesContent":["export const manifest = (() => {\nfunction __memo(fn) {\n\tlet value;\n\treturn () => value ??= (value = fn());\n}\n\nreturn {\n\tappDir: \"_app\",\n\tappPath: \"_app\",\n\tassets: new Set([\"icons/brands.svg\",\"icons/light.svg\",\"icons/regular.svg\",\"icons/solid.svg\",\"styles.css\"]),\n\tmimeTypes: {\".svg\":\"image/svg+xml\",\".css\":\"text/css\"},\n\t_: {\n\t\tclient: {start:\"_app/immutable/entry/start.14fO9BBt.js\",app:\"_app/immutable/entry/app.BgQjbQRv.js\",imports:[\"_app/immutable/entry/start.14fO9BBt.js\",\"_app/immutable/chunks/DtmP0Z35.js\",\"_app/immutable/chunks/IgiyYk6u.js\",\"_app/immutable/chunks/DCUM25og.js\",\"_app/immutable/chunks/BYEtX5Az.js\",\"_app/immutable/chunks/p-F-zYzk.js\",\"_app/immutable/entry/app.BgQjbQRv.js\",\"_app/immutable/chunks/DCUM25og.js\",\"_app/immutable/chunks/BYEtX5Az.js\",\"_app/immutable/chunks/DsnmJJEf.js\",\"_app/immutable/chunks/IgiyYk6u.js\",\"_app/immutable/chunks/p-F-zYzk.js\",\"_app/immutable/chunks/FWeOBoAM.js\"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},\n\t\tnodes: [\n\t\t\t__memo(() => import('./nodes/0.js')),\n\t\t\t__memo(() => import('./nodes/1.js')),\n\t\t\t__memo(() => import('./nodes/2.js')),\n\t\t\t__memo(() => import('./nodes/3.js')),\n\t\t\t__memo(() => import('./nodes/4.js')),\n\t\t\t__memo(() => import('./nodes/5.js')),\n\t\t\t__memo(() => import('./nodes/6.js'))\n\t\t],\n\t\troutes: [\n\t\t\t{\n\t\t\t\tid: \"/_axium/default\",\n\t\t\t\tpattern: /^\\/_axium\\/default\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 2 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/account\",\n\t\t\t\tpattern: /^\\/account\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 3 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/login\",\n\t\t\t\tpattern: /^\\/login\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 4 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/logout\",\n\t\t\t\tpattern: /^\\/logout\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 5 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/register\",\n\t\t\t\tpattern: /^\\/register\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 6 },\n\t\t\t\tendpoint: null\n\t\t\t}\n\t\t],\n\t\tprerendered_routes: new Set([]),\n\t\tmatchers: async () => {\n\t\t\t\n\t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AAE,EAAE,WAAW;AACnB,IAAI,OAAO,EAAE,iBAAiB;AAC9B,IAAI,MAAM,EAAE,EAAE;AACd,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd;AACA,GAAG;AACH,EAAE,kBAAkB,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC;AACjC,EAAE,QAAQ,EAAE,YAAY;AACxB;AACA,GAAG,OAAO,IAAI;AACd,EAAE,CAAC;AACH,EAAE,aAAa,EAAE;AACjB;AACA;AACA,CAAC;;AAEW,MAAC,WAAW,GAAG,IAAI,GAAG,CAAC,EAAE;;AAEzB,MAAC,IAAI,GAAG;;;;"}
package/dist/cli.js CHANGED
@@ -150,9 +150,6 @@ axiumDB
150
150
  output.error('Unavailable');
151
151
  process.exitCode = 1;
152
152
  }
153
- finally {
154
- await db.database.destroy();
155
- }
156
153
  });
157
154
  axiumDB
158
155
  .command('drop')
package/dist/database.js CHANGED
@@ -1,3 +1,55 @@
1
+ var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
2
+ if (value !== null && value !== void 0) {
3
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
4
+ var dispose, inner;
5
+ if (async) {
6
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
7
+ dispose = value[Symbol.asyncDispose];
8
+ }
9
+ if (dispose === void 0) {
10
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
11
+ dispose = value[Symbol.dispose];
12
+ if (async) inner = dispose;
13
+ }
14
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
15
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
16
+ env.stack.push({ value: value, dispose: dispose, async: async });
17
+ }
18
+ else if (async) {
19
+ env.stack.push({ async: true });
20
+ }
21
+ return value;
22
+ };
23
+ var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
24
+ return function (env) {
25
+ function fail(e) {
26
+ env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
27
+ env.hasError = true;
28
+ }
29
+ var r, s = 0;
30
+ function next() {
31
+ while (r = env.stack.pop()) {
32
+ try {
33
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
34
+ if (r.dispose) {
35
+ var result = r.dispose.call(r.value);
36
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
37
+ }
38
+ else s |= 1;
39
+ }
40
+ catch (e) {
41
+ fail(e);
42
+ }
43
+ }
44
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
45
+ if (env.hasError) throw env.error;
46
+ }
47
+ return next();
48
+ };
49
+ })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
50
+ var e = new Error(message);
51
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
52
+ });
1
53
  import { Kysely, PostgresDialect, sql } from 'kysely';
2
54
  import { jsonObjectFrom } from 'kysely/helpers/postgres';
3
55
  import { randomBytes } from 'node:crypto';
@@ -99,118 +151,130 @@ export async function createIndex(table, column, mod) {
99
151
  await query.execute().then(io.done).catch(warnExists);
100
152
  }
101
153
  export async function init(opt) {
102
- if (!config.db.password) {
103
- config.save({ db: { password: randomBytes(32).toString('base64') } }, true);
104
- io.debug('Generated password and wrote to global config');
105
- }
106
- await io.run('Checking for sudo', 'which sudo');
107
- await io.run('Checking for psql', 'which psql');
108
- await _sql('CREATE DATABASE axium', 'Creating database').catch(async (error) => {
109
- if (error != 'database "axium" already exists')
110
- throw error;
111
- if (shouldRecreate(opt))
112
- return;
113
- await _sql('DROP DATABASE axium', 'Dropping database');
114
- await _sql('CREATE DATABASE axium', 'Re-creating database');
115
- });
116
- const createQuery = `CREATE USER axium WITH ENCRYPTED PASSWORD '${config.db.password}' LOGIN`;
117
- await _sql(createQuery, 'Creating user').catch(async (error) => {
118
- if (error != 'role "axium" already exists')
119
- throw error;
120
- if (shouldRecreate(opt))
121
- return;
122
- await _sql('REVOKE ALL PRIVILEGES ON SCHEMA public FROM axium', 'Revoking schema privileges');
123
- await _sql('DROP USER axium', 'Dropping user');
124
- await _sql(createQuery, 'Re-creating user');
125
- });
126
- await _sql('GRANT ALL PRIVILEGES ON DATABASE axium TO axium', 'Granting database privileges');
127
- await _sql('GRANT ALL PRIVILEGES ON SCHEMA public TO axium', 'Granting schema privileges');
128
- await _sql('ALTER DATABASE axium OWNER TO axium', 'Setting database owner');
129
- await getHBA(opt)
130
- .then(([content, writeBack]) => {
131
- io.start('Checking for Axium HBA configuration');
132
- if (content.includes(pgHba))
133
- throw 'already exists.';
134
- io.done();
135
- io.start('Adding Axium HBA configuration');
136
- const newContent = content.replace(/^local\s+all\s+all.*$/m, `$&\n${pgHba}`);
154
+ const env_1 = { stack: [], error: void 0, hasError: false };
155
+ try {
156
+ if (!config.db.password) {
157
+ config.save({ db: { password: randomBytes(32).toString('base64') } }, true);
158
+ io.debug('Generated password and wrote to global config');
159
+ }
160
+ await io.run('Checking for sudo', 'which sudo');
161
+ await io.run('Checking for psql', 'which psql');
162
+ await _sql('CREATE DATABASE axium', 'Creating database').catch(async (error) => {
163
+ if (error != 'database "axium" already exists')
164
+ throw error;
165
+ if (shouldRecreate(opt))
166
+ return;
167
+ await _sql('DROP DATABASE axium', 'Dropping database');
168
+ await _sql('CREATE DATABASE axium', 'Re-creating database');
169
+ });
170
+ const createQuery = `CREATE USER axium WITH ENCRYPTED PASSWORD '${config.db.password}' LOGIN`;
171
+ await _sql(createQuery, 'Creating user').catch(async (error) => {
172
+ if (error != 'role "axium" already exists')
173
+ throw error;
174
+ if (shouldRecreate(opt))
175
+ return;
176
+ await _sql('REVOKE ALL PRIVILEGES ON SCHEMA public FROM axium', 'Revoking schema privileges');
177
+ await _sql('DROP USER axium', 'Dropping user');
178
+ await _sql(createQuery, 'Re-creating user');
179
+ });
180
+ await _sql('GRANT ALL PRIVILEGES ON DATABASE axium TO axium', 'Granting database privileges');
181
+ await _sql('GRANT ALL PRIVILEGES ON SCHEMA public TO axium', 'Granting schema privileges');
182
+ await _sql('ALTER DATABASE axium OWNER TO axium', 'Setting database owner');
183
+ await getHBA(opt)
184
+ .then(([content, writeBack]) => {
185
+ io.start('Checking for Axium HBA configuration');
186
+ if (content.includes(pgHba))
187
+ throw 'already exists.';
188
+ io.done();
189
+ io.start('Adding Axium HBA configuration');
190
+ const newContent = content.replace(/^local\s+all\s+all.*$/m, `$&\n${pgHba}`);
191
+ io.done();
192
+ writeBack(newContent);
193
+ })
194
+ .catch(io.warn);
195
+ await _sql('SELECT pg_reload_conf()', 'Reloading configuration');
196
+ io.start('Connecting to database');
197
+ const _ = __addDisposableResource(env_1, connect(), true);
137
198
  io.done();
138
- writeBack(newContent);
139
- })
140
- .catch(io.warn);
141
- await _sql('SELECT pg_reload_conf()', 'Reloading configuration');
142
- io.start('Connecting to database');
143
- connect();
144
- io.done();
145
- function maybeCheck(table) {
146
- return (e) => {
147
- warnExists(e);
148
- if (opt.check)
149
- return checkTableTypes(table, expectedTypes[table], opt);
150
- };
199
+ function maybeCheck(table) {
200
+ return (e) => {
201
+ warnExists(e);
202
+ if (opt.check)
203
+ return checkTableTypes(table, expectedTypes[table], opt);
204
+ };
205
+ }
206
+ io.start('Creating table users');
207
+ await database.schema
208
+ .createTable('users')
209
+ .addColumn('id', 'uuid', col => col.primaryKey().defaultTo(sql `gen_random_uuid()`))
210
+ .addColumn('name', 'text')
211
+ .addColumn('email', 'text', col => col.unique().notNull())
212
+ .addColumn('emailVerified', 'timestamptz')
213
+ .addColumn('image', 'text')
214
+ .addColumn('isAdmin', 'boolean', col => col.notNull().defaultTo(false))
215
+ .addColumn('roles', sql `text[]`, col => col.notNull().defaultTo(sql `'{}'::text[]`))
216
+ .addColumn('tags', sql `text[]`, col => col.notNull().defaultTo(sql `'{}'::text[]`))
217
+ .addColumn('preferences', 'jsonb', col => col.notNull().defaultTo('{}'))
218
+ .addColumn('registeredAt', 'timestamptz', col => col.notNull().defaultTo(sql `now()`))
219
+ .execute()
220
+ .then(io.done)
221
+ .catch(maybeCheck('users'));
222
+ io.start('Creating table sessions');
223
+ await database.schema
224
+ .createTable('sessions')
225
+ .addColumn('id', 'uuid', col => col.primaryKey().defaultTo(sql `gen_random_uuid()`))
226
+ .addColumn('userId', 'uuid', col => col.references('users.id').onDelete('cascade').notNull())
227
+ .addColumn('token', 'text', col => col.notNull().unique())
228
+ .addColumn('created', 'timestamptz', col => col.notNull())
229
+ .addColumn('expires', 'timestamptz', col => col.notNull())
230
+ .addColumn('elevated', 'boolean', col => col.notNull())
231
+ .execute()
232
+ .then(io.done)
233
+ .catch(maybeCheck('sessions'));
234
+ await createIndex('sessions', 'id');
235
+ io.start('Creating table verifications');
236
+ await database.schema
237
+ .createTable('verifications')
238
+ .addColumn('userId', 'uuid', col => col.references('users.id').onDelete('cascade').notNull())
239
+ .addColumn('token', 'text', col => col.notNull().unique())
240
+ .addColumn('expires', 'timestamptz', col => col.notNull())
241
+ .addColumn('role', 'text', col => col.notNull())
242
+ .execute()
243
+ .then(io.done)
244
+ .catch(maybeCheck('verifications'));
245
+ io.start('Creating table passkeys');
246
+ await database.schema
247
+ .createTable('passkeys')
248
+ .addColumn('id', 'text', col => col.primaryKey().notNull())
249
+ .addColumn('name', 'text')
250
+ .addColumn('createdAt', 'timestamptz', col => col.notNull().defaultTo(sql `now()`))
251
+ .addColumn('userId', 'uuid', col => col.notNull().references('users.id').onDelete('cascade').notNull())
252
+ .addColumn('publicKey', 'bytea', col => col.notNull())
253
+ .addColumn('counter', 'integer', col => col.notNull())
254
+ .addColumn('deviceType', 'text', col => col.notNull())
255
+ .addColumn('backedUp', 'boolean', col => col.notNull())
256
+ .addColumn('transports', sql `text[]`)
257
+ .execute()
258
+ .then(io.done)
259
+ .catch(maybeCheck('passkeys'));
260
+ await createIndex('passkeys', 'userId');
261
+ io.start('Creating schema acl');
262
+ await database.schema.createSchema('acl').execute().then(io.done).catch(warnExists);
263
+ for (const plugin of plugins) {
264
+ if (!plugin.hooks.db_init)
265
+ continue;
266
+ io.plugin(plugin.name);
267
+ await plugin.hooks.db_init(opt);
268
+ }
151
269
  }
152
- io.start('Creating table users');
153
- await database.schema
154
- .createTable('users')
155
- .addColumn('id', 'uuid', col => col.primaryKey().defaultTo(sql `gen_random_uuid()`))
156
- .addColumn('name', 'text')
157
- .addColumn('email', 'text', col => col.unique().notNull())
158
- .addColumn('emailVerified', 'timestamptz')
159
- .addColumn('image', 'text')
160
- .addColumn('isAdmin', 'boolean', col => col.notNull().defaultTo(false))
161
- .addColumn('roles', sql `text[]`, col => col.notNull().defaultTo(sql `'{}'::text[]`))
162
- .addColumn('tags', sql `text[]`, col => col.notNull().defaultTo(sql `'{}'::text[]`))
163
- .addColumn('preferences', 'jsonb', col => col.notNull().defaultTo('{}'))
164
- .addColumn('registeredAt', 'timestamptz', col => col.notNull().defaultTo(sql `now()`))
165
- .execute()
166
- .then(io.done)
167
- .catch(maybeCheck('users'));
168
- io.start('Creating table sessions');
169
- await database.schema
170
- .createTable('sessions')
171
- .addColumn('id', 'uuid', col => col.primaryKey().defaultTo(sql `gen_random_uuid()`))
172
- .addColumn('userId', 'uuid', col => col.references('users.id').onDelete('cascade').notNull())
173
- .addColumn('token', 'text', col => col.notNull().unique())
174
- .addColumn('created', 'timestamptz', col => col.notNull())
175
- .addColumn('expires', 'timestamptz', col => col.notNull())
176
- .addColumn('elevated', 'boolean', col => col.notNull())
177
- .execute()
178
- .then(io.done)
179
- .catch(maybeCheck('sessions'));
180
- await createIndex('sessions', 'id');
181
- io.start('Creating table verifications');
182
- await database.schema
183
- .createTable('verifications')
184
- .addColumn('userId', 'uuid', col => col.references('users.id').onDelete('cascade').notNull())
185
- .addColumn('token', 'text', col => col.notNull().unique())
186
- .addColumn('expires', 'timestamptz', col => col.notNull())
187
- .addColumn('role', 'text', col => col.notNull())
188
- .execute()
189
- .then(io.done)
190
- .catch(maybeCheck('verifications'));
191
- io.start('Creating table passkeys');
192
- await database.schema
193
- .createTable('passkeys')
194
- .addColumn('id', 'text', col => col.primaryKey().notNull())
195
- .addColumn('name', 'text')
196
- .addColumn('createdAt', 'timestamptz', col => col.notNull().defaultTo(sql `now()`))
197
- .addColumn('userId', 'uuid', col => col.notNull().references('users.id').onDelete('cascade').notNull())
198
- .addColumn('publicKey', 'bytea', col => col.notNull())
199
- .addColumn('counter', 'integer', col => col.notNull())
200
- .addColumn('deviceType', 'text', col => col.notNull())
201
- .addColumn('backedUp', 'boolean', col => col.notNull())
202
- .addColumn('transports', sql `text[]`)
203
- .execute()
204
- .then(io.done)
205
- .catch(maybeCheck('passkeys'));
206
- await createIndex('passkeys', 'userId');
207
- io.start('Creating schema acl');
208
- await database.schema.createSchema('acl').execute().then(io.done).catch(warnExists);
209
- for (const plugin of plugins) {
210
- if (!plugin.hooks.db_init)
211
- continue;
212
- io.plugin(plugin.name);
213
- await plugin.hooks.db_init(opt);
270
+ catch (e_1) {
271
+ env_1.error = e_1;
272
+ env_1.hasError = true;
273
+ }
274
+ finally {
275
+ const result_1 = __disposeResources(env_1);
276
+ if (result_1)
277
+ await result_1;
214
278
  }
215
279
  }
216
280
  export const expectedTypes = {
@@ -298,29 +362,41 @@ export async function checkTableTypes(tableName, types, opt) {
298
362
  io.warn(unchecked);
299
363
  }
300
364
  export async function check(opt) {
301
- await io.run('Checking for sudo', 'which sudo');
302
- await io.run('Checking for psql', 'which psql');
303
- await _sql(`SELECT 1 FROM pg_database WHERE datname = 'axium'`, 'Checking for database').then(throwUnlessRows);
304
- await _sql(`SELECT 1 FROM pg_roles WHERE rolname = 'axium'`, 'Checking for user').then(throwUnlessRows);
305
- io.start('Connecting to database');
306
- connect();
307
- io.done();
308
- io.start('Getting table metadata');
309
- opt._metadata = await database.introspection.getTables();
310
- const tables = Object.fromEntries(opt._metadata.map(t => [t.name, t]));
311
- io.done();
312
- for (const table of Object.keys(expectedTypes)) {
313
- await checkTableTypes(table, expectedTypes[table], opt);
314
- delete tables[table];
315
- }
316
- io.start('Checking for extra tables');
317
- const unchecked = Object.keys(tables).join(', ');
318
- if (!unchecked.length)
365
+ const env_2 = { stack: [], error: void 0, hasError: false };
366
+ try {
367
+ await io.run('Checking for sudo', 'which sudo');
368
+ await io.run('Checking for psql', 'which psql');
369
+ await _sql(`SELECT 1 FROM pg_database WHERE datname = 'axium'`, 'Checking for database').then(throwUnlessRows);
370
+ await _sql(`SELECT 1 FROM pg_roles WHERE rolname = 'axium'`, 'Checking for user').then(throwUnlessRows);
371
+ io.start('Connecting to database');
372
+ const _ = __addDisposableResource(env_2, connect(), true);
319
373
  io.done();
320
- else if (opt.strict)
321
- throw unchecked;
322
- else
323
- io.warn(unchecked);
374
+ io.start('Getting table metadata');
375
+ opt._metadata = await database.introspection.getTables();
376
+ const tables = Object.fromEntries(opt._metadata.map(t => [t.name, t]));
377
+ io.done();
378
+ for (const table of Object.keys(expectedTypes)) {
379
+ await checkTableTypes(table, expectedTypes[table], opt);
380
+ delete tables[table];
381
+ }
382
+ io.start('Checking for extra tables');
383
+ const unchecked = Object.keys(tables).join(', ');
384
+ if (!unchecked.length)
385
+ io.done();
386
+ else if (opt.strict)
387
+ throw unchecked;
388
+ else
389
+ io.warn(unchecked);
390
+ }
391
+ catch (e_2) {
392
+ env_2.error = e_2;
393
+ env_2.hasError = true;
394
+ }
395
+ finally {
396
+ const result_2 = __disposeResources(env_2);
397
+ if (result_2)
398
+ await result_2;
399
+ }
324
400
  }
325
401
  export async function clean(opt) {
326
402
  const now = new Date();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/server",
3
- "version": "0.19.2",
3
+ "version": "0.19.3",
4
4
  "author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
5
5
  "funding": {
6
6
  "type": "individual",
@@ -1,3 +0,0 @@
1
- import{o as De,s as yt}from"./IgiyYk6u.js";import{D as me,aZ as wt,ax as T,a3 as x,a5 as P}from"./DCUM25og.js";const B=[];function Re(e,t=me){let n=null;const r=new Set;function a(o){if(wt(e,o)&&(e=o,n)){const c=!B.length;for(const l of r)l[1](),B.push(l,e);if(c){for(let l=0;l<B.length;l+=2)B[l][0](B[l+1]);B.length=0}}}function s(o){a(o(e))}function i(o,c=me){const l=[o,c];return r.add(l),r.size===1&&(n=t(a,s)||me),o(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:s,subscribe:i}}class le{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ie{constructor(t,n){this.status=t,this.location=n}}class Ue extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function vt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function bt(e){return e.split("%25").map(decodeURI).join("%25")}function At(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function ye({href:e}){return e.split("#")[0]}function St(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function kt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}function Et(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}const Rt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&H.delete(Le(e)),Rt(e,t));const H=new Map;function It(e,t){const n=Le(e,t),r=document.querySelector(n);if(r?.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&H.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Et(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Ut(e,t,n){if(H.size>0){const r=Le(e,n),a=H.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);H.delete(r)}}return window.fetch(t,n)}function Le(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${kt(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Tt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Pt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return we(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return we(String.fromCharCode(...c.slice(2).split("-").map(m=>parseInt(m,16))));const d=Lt.exec(c),[,h,u,f,p]=d;return t.push({name:f,matcher:p,optional:!!h,rest:!!u,chained:u?l===1&&i[0]==="":!1}),u?"(.*?)":h?"([^/]*)?":"([^/]+?)"}return we(c)}).join("")}).join("")}/?$`),params:t}}function xt(e){return!/^\([^)]+\)$/.test(e)}function Pt(e){return e.slice(1).split("/").filter(xt)}function Ct(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let l=a[o-i];if(c.chained&&c.rest&&i&&(l=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=t[o+1],h=a[o+1];d&&!d.rest&&d.optional&&h&&c.chained&&(i=0),!d&&!h&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function we(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ot({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,l,d]])=>{const{pattern:h,params:u}=Tt(o),f={id:o,exec:p=>{const m=h.exec(p);if(m)return Ct(m,u,r)},errors:[1,...d||[]].map(p=>e[p]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function Ye(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Be(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const U=globalThis.__sveltekit_1i6jn5l?.base??"",Nt=globalThis.__sveltekit_1i6jn5l?.assets??U,jt="1753816054424",ze="sveltekit:snapshot",Je="sveltekit:scroll",Xe="sveltekit:states",$t="sveltekit:pageurl",V="sveltekit:history",z="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},fe=location.origin;function Ze(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function ue(){return{x:pageXOffset,y:pageYOffset}}function F(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Fe={...j,"":j.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function et(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function Ae(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||de(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=r?.origin===fe&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function te(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=F(o,"preload-code")),a===null&&(a=F(o,"preload-data")),t===null&&(t=F(o,"keepfocus")),n===null&&(n=F(o,"noscroll")),s===null&&(s=F(o,"reload")),i===null&&(i=F(o,"replacestate")),o=Qe(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Fe[r??"off"],preload_data:Fe[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Ve(e){const t=Re(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const tt={v:()=>{}};function Dt(){const{set:e,subscribe:t}=Re(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Nt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==jt;return i&&(e(!0),tt.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function de(e,t,n){return e.origin!==fe||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function Sn(e){}function qe(e){const t=Ft(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const Bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ft(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=Bt.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const Vt=-1,qt=-2,Mt=-3,Gt=-4,Ht=-5,Kt=-6;function Wt(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===Vt)return;if(s===Mt)return NaN;if(s===Gt)return 1/0;if(s===Ht)return-1/0;if(s===Kt)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=t?.[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let f=1;f<o.length;f+=1)d.add(a(o[f]));break;case"Map":const h=new Map;r[s]=h;for(let f=1;f<o.length;f+=2)h.set(a(o[f]),a(o[f+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const u=Object.create(null);r[s]=u;for(let f=1;f<o.length;f+=2)u[o[f]]=a(o[f+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const f=globalThis[c],p=o[1],m=qe(p),_=new f(m);r[s]=_;break}case"ArrayBuffer":{const f=o[1],p=qe(f);r[s]=p;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let l=0;l<o.length;l+=1){const d=o[l];d!==qt&&(c[l]=a(d))}}else{const c={};r[s]=c;for(const l in o){const d=o[l];c[l]=a(d)}}return r[s]}return a(0)}const nt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...nt];const Yt=new Set([...nt]);[...Yt];function zt(e){return e.filter(t=>t!=null)}const Jt="x-sveltekit-invalidated",Xt="x-sveltekit-trailing-slash";function ne(e){return e instanceof le||e instanceof Ue?e.status:500}function Zt(e){return e instanceof Ue?e.text:"Internal Error"}let k,J,ve;const Qt=De.toString().includes("$$")||/function \w+\(\) \{\}/.test(De.toString());Qt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},ve={current:!1}):(k=new class{#e=T({});get data(){return x(this.#e)}set data(t){P(this.#e,t)}#t=T(null);get form(){return x(this.#t)}set form(t){P(this.#t,t)}#n=T(null);get error(){return x(this.#n)}set error(t){P(this.#n,t)}#r=T({});get params(){return x(this.#r)}set params(t){P(this.#r,t)}#a=T({id:null});get route(){return x(this.#a)}set route(t){P(this.#a,t)}#o=T({});get state(){return x(this.#o)}set state(t){P(this.#o,t)}#s=T(-1);get status(){return x(this.#s)}set status(t){P(this.#s,t)}#i=T(new URL("https://example.com"));get url(){return x(this.#i)}set url(t){P(this.#i,t)}},J=new class{#e=T(null);get current(){return x(this.#e)}set current(t){P(this.#e,t)}},ve=new class{#e=T(!1);get current(){return x(this.#e)}set current(t){P(this.#e,t)}},tt.v=()=>ve.current=!0);function en(e){Object.assign(k,e)}const tn="/__data.json",nn=".html__data.json";function rn(e){return e.endsWith(".html")?e.replace(/\.html$/,nn):e.replace(/\/$/,"")+tn}const{tick:an}=yt,on=new Set(["icon","shortcut icon","apple-touch-icon"]),D=Ye(Je)??{},X=Ye(ze)??{},N={url:Ve({}),page:Ve({}),navigating:Re(null),updated:Dt()};function Te(e){D[e]=ue()}function sn(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;X[n];)delete X[n],n+=1}function M(e){return location.href=e.href,new Promise(()=>{})}async function rt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(U||"/");e&&await e.update()}}function Me(){}let xe,Se,re,C,ke,v;const ae=[],oe=[];let O=null;const ee=new Map,at=new Set,cn=new Set,K=new Set;let w={branch:[],error:null,url:null},Pe=!1,se=!1,Ge=!0,Z=!1,G=!1,ot=!1,Ce=!1,st,A,I,$;const W=new Set;async function In(e,t,n){document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),xe=Ot(e),C=document.documentElement,ke=t,Se=e.nodes[0],re=e.nodes[1],Se(),re(),A=history.state?.[V],I=history.state?.[z],A||(A=I=Date.now(),history.replaceState({...history.state,[V]:A,[z]:I},""));const r=D[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await yn(ke,n)):(await Y({type:"enter",url:Ze(v.hash?vn(new URL(location.href)):location.href),replace_state:!0}),a()),mn()}function ln(){ae.length=0,Ce=!1}function it(e){oe.some(t=>t?.snapshot)&&(X[e]=oe.map(t=>t?.snapshot?.capture()))}function ct(e){X[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function He(){Te(A),Be(Je,D),it(I),Be(ze,X)}async function lt(e,t,n,r){return Y({type:"goto",url:Ze(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ce=!0),t.invalidate&&t.invalidate.forEach(_n)}})}async function fn(e){if(e.id!==O?.id){const t={};W.add(t),O={id:e.id,token:t,promise:dt({...e,preload:t}).then(n=>(W.delete(t),n.type==="loaded"&&n.state.error&&(O=null),n))}}return O.promise}async function be(e){const t=(await pe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}function ft(e,t,n){w=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),st=new v.root({target:t,props:{...e.props,stores:N,components:oe},hydrate:n,sync:!1}),ct(I),n){const a={from:null,to:{params:w.params,route:{id:w.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};K.forEach(s=>s(a))}se=!0}function ie({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(U&&(e.pathname===U||e.pathname===U+"/"))o="always";else for(const f of n)f?.slash!==void 0&&(o=f.slash);e.pathname=vt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:zt(n).map(f=>f.node.component),page:$e(k)}};i!==void 0&&(c.props.form=i);let l={},d=!k,h=0;for(let f=0;f<Math.max(n.length,w.branch.length);f+=1){const p=n[f],m=w.branch[f];p?.data!==m?.data&&(d=!0),p&&(l={...l,...p.data},d&&(c.props[`data_${h}`]=l),h+=1)}return(!w.url||e.href!==w.url.href||w.error!==a||i!==void 0&&i!==k.form||d)&&(c.props.page={error:a,params:t,route:{id:s?.id??null},state:{},status:r,url:new URL(e),form:i??null,data:d?l:k.data}),c}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){let d=function(...u){for(const f of u){const{href:p}=new URL(f,n);c.dependencies.add(p)}};const h={route:new Proxy(a,{get:(u,f)=>(o&&(c.route=!0),u[f])}),params:new Proxy(r,{get:(u,f)=>(o&&c.params.add(f),u[f])}),data:s?.data??null,url:St(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},v.hash),async fetch(u,f){u instanceof Request&&(f={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u?.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...f});const{resolved:p,promise:m}=ut(u,f,n);return o&&d(p.href),m},setHeaders:()=>{},depends:d,parent(){return o&&(c.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await l.universal.load.call(null,h)??null}return{node:l,loader:e,server:s,universal:l.universal?.load?{type:"data",data:i,uses:c}:null,data:i??s?.data??null,slash:l.universal?.trailingSlash??s?.slash}}function ut(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=se?Ut(r,a.href,t):It(r,t);return{resolved:a,promise:s}}function Ke(e,t,n,r,a,s){if(Ce)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==w.params[i])return!0;for(const i of a.dependencies)if(ae.some(o=>o(new URL(i))))return!0;return!1}function Ne(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function un(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function We({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:$e(k),constructors:[]}}}async function dt({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(O?.id===e)return W.delete(O.token),O.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(g=>g?.().catch(()=>{})),l.forEach(g=>g?.[1]().catch(()=>{}));let d=null;const h=w.url?e!==ce(w.url):!1,u=w.route?a.id!==w.route.id:!1,f=un(w.url,n);let p=!1;const m=l.map((g,y)=>{const b=w.branch[y],S=!!g?.[0]&&(b?.loader!==g[1]||Ke(p,u,h,f,b.server?.uses,r));return S&&(p=!0),S});if(m.some(Boolean)){try{d=await gt(n,m)}catch(g){const y=await q(g,{url:n,params:r,route:{id:e}});return W.has(s)?We({error:y,url:n,params:r,route:a}):he({status:ne(g),error:y,url:n,route:a})}if(d.type==="redirect")return d}const _=d?.nodes;let R=!1;const E=l.map(async(g,y)=>{if(!g)return;const b=w.branch[y],S=_?.[y];if((!S||S.type==="skip")&&g[1]===b?.loader&&!Ke(R,u,h,f,b.universal?.uses,r))return b;if(R=!0,S?.type==="error")throw S;return Oe({loader:g[1],url:n,params:r,route:a,parent:async()=>{const ge={};for(let _e=0;_e<y;_e+=1)Object.assign(ge,(await E[_e])?.data);return ge},server_data_node:Ne(S===void 0&&g[0]?{type:"skip"}:S??null,g[0]?b?.server:void 0)})});for(const g of E)g.catch(()=>{});const L=[];for(let g=0;g<l.length;g+=1)if(l[g])try{L.push(await E[g])}catch(y){if(y instanceof Ie)return{type:"redirect",location:y.location};if(W.has(s))return We({error:await q(y,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=ne(y),S;if(_?.includes(y))b=y.status??b,S=y.error;else if(y instanceof le)S=y.body;else{if(await N.updated.check())return await rt(),await M(n);S=await q(y,{params:r,url:n,route:{id:a.id}})}const Q=await dn(g,L,i);return Q?ie({url:n,params:r,branch:L.slice(0,Q.idx).concat(Q.node),status:b,error:S,route:a}):await pt(n,{id:a.id},S,b)}else L.push(void 0);return ie({url:n,params:r,branch:L,status:200,error:null,route:a,form:t?void 0:null})}async function dn(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function he({status:e,error:t,url:n,route:r}){const a={};let s=null;if(v.server_loads[0]===0)try{const o=await gt(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==fe||n.pathname!==location.pathname||Pe)&&await M(n)}try{const o=await Oe({loader:Se,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ne(s)}),c={node:await re(),loader:re,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Ie)return lt(new URL(o.location,location.href),{},0);throw o}}async function hn(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(s,i)=>ut(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);v.hash?s.hash=a:s.pathname=a,a=s}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function pe(e,t){if(e&&!de(e,U,v.hash)){const n=await hn(e);if(!n)return;const r=pn(n);for(const a of xe){const s=a.exec(r);if(s)return{id:ce(e),invalidating:t,route:a,params:At(s),url:e}}}}function pn(e){return bt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(U.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ht({url:e,type:t,intent:n,delta:r}){let a=!1;const s=je(w,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return Z||at.forEach(o=>o(i)),a?null:s}async function Y({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=Me,block:d=Me}){const h=$;$=c;const u=await pe(t,!1),f=e==="enter"?je(w,u,t,e):ht({url:t,type:e,delta:n?.delta,intent:u});if(!f){d(),$===c&&($=h);return}const p=A,m=I;l(),Z=!0,se&&f.navigation.type!=="enter"&&N.navigating.set(J.current=f.navigation);let _=u&&await dt(u);if(!_){if(de(t,U,v.hash))return await M(t);_=await pt(t,{id:null},await q(new Ue(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=u?.url||t,$!==c)return f.reject(new Error("navigation aborted")),!1;if(_.type==="redirect")if(o>=20)_=await he({status:500,error:await q(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await lt(new URL(_.location,t).href,{},o+1,c),!1;else _.props.page.status>=400&&await N.updated.check()&&(await rt(),await M(t));if(ln(),Te(p),it(m),_.props.page.url.pathname!==t.pathname&&(t.pathname=_.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,y={[V]:A+=g,[z]:I+=g,[Xe]:i};(s?history.replaceState:history.pushState).call(history,y,"",t),s||sn(A,I)}if(O=null,_.props.page.state=i,se){w=_.state,_.props.page&&(_.props.page.url=t);const g=(await Promise.all(Array.from(cn,y=>y(f.navigation)))).filter(y=>typeof y=="function");if(g.length>0){let y=function(){g.forEach(b=>{K.delete(b)})};g.push(y),g.forEach(b=>{K.add(b)})}st.$set(_.props),en(_.props.page),ot=!0}else ft(_,ke,!1);const{activeElement:R}=document;await an();const E=n?n.scroll:a?ue():null;if(Ge){const g=t.hash&&document.getElementById(mt(t));E?scrollTo(E.x,E.y):g?g.scrollIntoView():scrollTo(0,0)}const L=document.activeElement!==R&&document.activeElement!==document.body;!r&&!L&&wn(t),Ge=!0,_.props.page&&Object.assign(k,_.props.page),Z=!1,e==="popstate"&&ct(I),f.fulfil(void 0),K.forEach(g=>g(f.navigation)),N.navigating.set(J.current=null)}async function pt(e,t,n,r){return e.origin===fe&&e.pathname===location.pathname&&!Pe?await he({status:r,error:n,url:e,route:t}):await M(e)}function gn(){let e,t,n;C.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,j.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],j.tap)}C.addEventListener("mousedown",r),C.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(be(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const l=et(o,C),d=l===t&&c>=n;if(!l||d)return;const{url:h,external:u,download:f}=Ae(l,U,v.hash);if(u||f)return;const p=te(l),m=h&&ce(w.url)===ce(h);if(!(p.reload||m))if(c<=p.preload_data){t=l,n=j.tap;const _=await pe(h,!1);if(!_)return;fn(_)}else c<=p.preload_code&&(t=l,n=c,be(h))}function i(){a.disconnect();for(const o of C.querySelectorAll("a")){const{url:c,external:l,download:d}=Ae(o,U,v.hash);if(l||d)continue;const h=te(o);h.reload||(h.preload_code===j.viewport&&a.observe(o),h.preload_code===j.eager&&be(c))}}K.add(i),i()}function q(e,t){if(e instanceof le)return e.body;const n=ne(e),r=Zt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function _n(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function mn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(He(),!Z){const r=je(w,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};at.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&He()}),navigator.connection?.saveData||gn(),C.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=et(t.composedPath()[0],C);if(!n)return;const{url:r,external:a,target:s,download:i}=Ae(n,U,v.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const o=te(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||i)return;const[l,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),h=l===ye(location);if(a||o.reload&&(!h||!d)){ht({url:r,type:"link"})?Z=!0:t.preventDefault();return}if(d!==void 0&&h){const[,u]=w.url.href.split("#");if(u===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const f=n.ownerDocument.getElementById(decodeURIComponent(d));f&&(f.scrollIntoView(),f.focus())}return}if(G=!0,Te(A),e(r),!o.replace_state)return;G=!1}t.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),await Y({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href})}),C.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const i=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(de(i,U,!1))return;const o=t.target,c=te(o);if(c.reload)return;t.preventDefault(),t.stopPropagation();const l=new FormData(o),d=r?.getAttribute("name");d&&l.append(d,r?.getAttribute("value")??""),i.search=new URLSearchParams(l).toString(),Y({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href})}),addEventListener("popstate",async t=>{if(!Ee){if(t.state?.[V]){const n=t.state[V];if($={},n===A)return;const r=D[n],a=t.state[Xe]??{},s=new URL(t.state[$t]??location.href),i=t.state[z],o=w.url?ye(location)===ye(w.url):!1;if(i===I&&(ot||o)){a!==k.state&&(k.state=a),e(s),D[A]=ue(),r&&scrollTo(r.x,r.y),A=n;return}const l=n-A;await Y({type:"popstate",url:s,popped:{state:a,scroll:r,delta:l},accept:()=>{A=n,I=i},block:()=>{history.go(-l)},nav_token:$})}else if(!G){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[V]:++A,[z]:I},"",location.href))});for(const t of document.querySelectorAll("link"))on.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&N.navigating.set(J.current=null)});function e(t){w.url=k.url=t,N.page.set($e(k)),N.page.notify()}}async function yn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Pe=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await pe(l,!1)||{}),d=xe.find(({id:f})=>f===s.id);let h,u=!0;try{const f=r.map(async(m,_)=>{const R=o[_];return R?.uses&&(R.uses=_t(R.uses)),Oe({loader:v.nodes[m],url:l,params:a,route:s,parent:async()=>{const E={};for(let L=0;L<_;L+=1)Object.assign(E,(await f[L]).data);return E},server_data_node:Ne(R)})}),p=await Promise.all(f);if(d){const m=d.layouts;for(let _=0;_<m.length;_++)m[_]||p.splice(_,0,void 0)}h=ie({url:l,params:a,branch:p,status:t,error:n,form:c,route:d??null})}catch(f){if(f instanceof Ie){await M(new URL(f.location,location.href));return}h=await he({status:ne(f),error:await q(f,{url:l,params:a,route:s}),url:l,route:s}),e.textContent="",u=!1}h.props.page&&(h.props.page.state={}),ft(h,e,u)}async function gt(e,t){const n=new URL(e);n.pathname=rn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(Xt,"1"),n.searchParams.append(Jt,t.map(s=>s?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new le(a.status,s)}return new Promise(async s=>{const i=new Map,o=a.body.getReader(),c=new TextDecoder;function l(h){return Wt(h,{...v.decoders,Promise:u=>new Promise((f,p)=>{i.set(u,{fulfil:f,reject:p})})})}let d="";for(;;){const{done:h,value:u}=await o.read();if(h&&!d)break;for(d+=!u&&d?`
2
- `:c.decode(u,{stream:!0});;){const f=d.indexOf(`
3
- `);if(f===-1)break;const p=JSON.parse(d.slice(0,f));if(d=d.slice(f+1),p.type==="redirect")return s(p);if(p.type==="data")p.nodes?.forEach(m=>{m?.type==="data"&&(m.uses=_t(m.uses),m.data=l(m.data))}),s(p);else if(p.type==="chunk"){const{id:m,data:_,error:R}=p,E=i.get(m);i.delete(m),R?E.reject(l(R)):E.fulfil(l(_))}}}})}function _t(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ee=!1;function wn(e){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=mt(e);if(n&&document.getElementById(n)){const{x:a,y:s}=ue();setTimeout(()=>{const i=history.state;Ee=!0,location.replace(`#${n}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(a,s),Ee=!1})}else{const a=document.body,s=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),s!==null?a.setAttribute("tabindex",s):a.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const i=a[s],o=r.getRangeAt(s);if(i.commonAncestorContainer!==o.commonAncestorContainer||i.startContainer!==o.startContainer||i.endContainer!==o.endContainer||i.startOffset!==o.startOffset||i.endOffset!==o.endOffset)return}r.removeAllRanges()}})}}}function je(e,t,n,r){let a,s;const i=new Promise((c,l)=>{a=c,s=l});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function $e(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 vn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{In as a,Sn as l,k as p,N as s};
@@ -1 +0,0 @@
1
- import{l as o,a as r}from"../chunks/DC6rf2pV.js";export{o as load_css,r as start};
@@ -1,2 +0,0 @@
1
- )�import{l as o,a as r}from"../chunks/DC6rf2pV.js";export{o as load_css,r as start};
2
-