@kky42/pievo-server 2.3.0 → 2.4.2
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/.output/nitro.json +1 -1
- package/.output/public/assets/MachinesModal-CSbnrUER.js +1 -0
- package/.output/public/assets/SignIn-0Tjqs-Ma.js +1 -0
- package/.output/public/assets/actionUi-DpwGIGpw.js +1 -0
- package/.output/public/assets/app-CaZpuwOS.css +2 -0
- package/.output/public/assets/index-CaS_SmDq.js +10 -0
- package/.output/public/assets/invite._token-Btg_0aLp.js +1 -0
- package/.output/public/assets/invite._token-KMD2JAgE.js +1 -0
- package/.output/public/assets/lifecycleUi-C7dwHtbw.js +1 -0
- package/.output/public/assets/loops._loopId-D5usF3DO.js +67 -0
- package/.output/public/assets/loops._loopId_.runs._runId-DRCgXaCq.js +3 -0
- package/.output/public/assets/preload-helper-DsxECZIS.js +5 -0
- package/.output/public/assets/routes-CtFgwdgW.js +1 -0
- package/.output/public/assets/routes-LDbnnQ3f.js +1 -0
- package/.output/public/assets/t._teamId-D41xcbsF.js +1 -0
- package/.output/public/assets/t._teamId-DUena1pV.js +1 -0
- package/.output/public/assets/ui-Do4gqMyP.js +1 -0
- package/.output/server/_libs/@base-ui/react+[...].mjs +4130 -4130
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
- package/.output/server/_libs/drizzle-orm+postgres.mjs +28 -1
- package/.output/server/_ssr/DashboardView-C2LdV6J0.mjs +914 -0
- package/.output/server/_ssr/{notifyFns-DuPR1zd7.mjs → MachinesModal-BjkcVjjx.mjs} +55 -35
- package/.output/server/_ssr/{SignIn-RmpWm9uy.mjs → SignIn-DEGrvJvb.mjs} +10 -24
- package/.output/server/_ssr/SocialLinks-Cm4H8pUJ.mjs +1044 -0
- package/.output/server/_ssr/{actionUi-BN55TNYE.mjs → actionUi-DJBWuNwr.mjs} +3 -3
- package/.output/server/_ssr/{artifactFiles-BCaIIrrT.mjs → artifactFiles-DtpRidFZ.mjs} +7 -8
- package/.output/server/_ssr/{artifactKind-BW0isV8L.mjs → artifactKind-FBYbgSuf.mjs} +27 -2
- package/.output/server/_ssr/artifacts-BR3jj0NC.mjs +2 -0
- package/.output/server/_ssr/{auth-30Z4lV1w.mjs → auth-C0zoZCGe.mjs} +16 -19
- package/.output/server/_ssr/boot-CdOO4xOo.mjs +2 -0
- package/.output/server/_ssr/{boot-3BNKujyp.mjs → boot-sNlIkoLe.mjs} +1331 -3927
- package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-_7tfuNRi.mjs → bun-sqlite-dialect-BW9W1_Ps-DmlZWqO7.mjs} +2 -2
- package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-ucDUbeBk.mjs → d1-sqlite-dialect-BLC8LXE6-CCNzqZwZ.mjs} +2 -2
- package/.output/server/_ssr/db-CwLD-5w1.mjs +2 -0
- package/.output/server/_ssr/{dist-Cd6nlLlO.mjs → dist-B3SxDOpW.mjs} +2 -2
- package/.output/server/_ssr/{factory-CWWwV7XZ.mjs → factory-Dv3Zopis.mjs} +2 -2
- package/.output/server/_ssr/invite._token-CJ6-H-s3.mjs +20 -0
- package/.output/server/_ssr/{invite._token-SdWXemIc.mjs → invite._token-dLKDJKVs.mjs} +9 -17
- package/.output/server/_ssr/{invite._token-BKlz0R2f.mjs → invite._token-l1SjouDz.mjs} +6 -15
- package/.output/server/_ssr/{kysely-adapter-C8iS51DB.mjs → kysely-adapter-nL7WKSgw.mjs} +1 -1
- package/.output/server/_ssr/{lifecycleUi-DgBQAYzp.mjs → lifecycleUi-Dad3hvhm.mjs} +11 -11
- package/.output/server/_ssr/logger-B8m8F1Qu.mjs +2 -0
- package/.output/server/_ssr/loopApi-BKyFB4KM.mjs +342 -0
- package/.output/server/_ssr/{adapters-BoLkOf1T.mjs → loopProjection-B8a829ij.mjs} +25 -55
- package/.output/server/_ssr/loops._loopId-DS16Phmq.mjs +1271 -0
- package/.output/server/_ssr/{loops._loopId_.runs._runId-PUGBrD5q.mjs → loops._loopId_.runs._runId-BEJI6iK5.mjs} +23 -74
- package/.output/server/_ssr/{loops._loopId_.runs._runId-Ymy4lwee.mjs → loops._loopId_.runs._runId-CduETLqH.mjs} +4 -5
- package/.output/server/_ssr/{machineFns-BZ9puxDt.mjs → machineFns-ByMsgG12.mjs} +3 -5
- package/.output/server/_ssr/{node-sqlite-dialect-D_3JmkMo.mjs → node-sqlite-dialect-CjNineno.mjs} +2 -2
- package/.output/server/_ssr/router-CXyrnvx-.mjs +565 -0
- package/.output/server/_ssr/{routes-ClZEdsnB.mjs → routes-BulNEUEE.mjs} +6 -10
- package/.output/server/_ssr/{routes-ComqHvCL.mjs → routes-DD94baie.mjs} +3 -3
- package/.output/server/_ssr/{routes-D5jJJ-30.mjs → routes-Wjexi35W.mjs} +6 -6
- package/.output/server/_ssr/runDiff-Ba8Lg1vg.mjs +2 -0
- package/.output/server/_ssr/ssr.mjs +60 -100
- package/.output/server/_ssr/store-Cujtg2QE.mjs +2 -0
- package/.output/server/_ssr/{t._teamId-BgHV_KFP.mjs → t._teamId-1CreIlPV.mjs} +7 -11
- package/.output/server/_ssr/{t._teamId-DDERNgfn.mjs → t._teamId-Bd6-zZsy.mjs} +4 -4
- package/.output/server/_ssr/{t._teamId-DRJvKHZn.mjs → t._teamId-COuMKQ4r.mjs} +7 -7
- package/.output/server/_ssr/{teamFns-Bp81UO-x.mjs → teamFns-H438WnZC.mjs} +12 -30
- package/.output/server/_ssr/{teamFns-bm82twd5.mjs → teamFns-j2JKjorZ.mjs} +2 -2
- package/.output/server/_ssr/tokens-DgG_Syq3.mjs +2 -0
- package/.output/server/_ssr/{ui-Ww2tTM2u.mjs → ui-D5KWstlb.mjs} +26 -48
- package/.output/server/{_tanstack-start-manifest_v-DwKENYCN.mjs → _tanstack-start-manifest_v-3H7yBKLz.mjs} +25 -35
- package/{drizzle/0000_round_marauders.sql → .output/server/drizzle/0000_baseline.sql} +102 -44
- package/.output/server/drizzle/meta/_journal.json +3 -115
- package/.output/server/index.mjs +83 -132
- package/{.output/server/drizzle/0000_round_marauders.sql → drizzle/0000_baseline.sql} +102 -44
- package/drizzle/meta/_journal.json +3 -115
- package/package.json +2 -11
- package/scripts/pievo-server.mjs +3 -1
- package/scripts/server-cli-lib.mjs +23 -16
- package/.output/public/assets/CodeField-dOzyFQNH.js +0 -34
- package/.output/public/assets/LoopView-DjVHUyrR.js +0 -59
- package/.output/public/assets/Modal-CCRvx959.js +0 -1
- package/.output/public/assets/SignIn-Qxw5zDFq.js +0 -1
- package/.output/public/assets/actionUi-CXxhzYe2.js +0 -1
- package/.output/public/assets/app-D1cij_NJ.css +0 -2
- package/.output/public/assets/artifactView-Cd5wWPil.js +0 -66
- package/.output/public/assets/index-BRN_CQ8U.js +0 -12
- package/.output/public/assets/invite._token-BIxr8DlP.js +0 -1
- package/.output/public/assets/invite._token-j2BTCeG1.js +0 -1
- package/.output/public/assets/jsx-runtime-BseJUIpC.js +0 -1
- package/.output/public/assets/lifecycleUi-Qy_8beQK.js +0 -1
- package/.output/public/assets/loopApi-CT1mMhlb.js +0 -3
- package/.output/public/assets/loops._loopId-BRBQzioy.js +0 -4
- package/.output/public/assets/loops._loopId_.runs._runId-CMnOJkem.js +0 -3
- package/.output/public/assets/notifyFns-DYD4EKaG.js +0 -1
- package/.output/public/assets/preload-helper-DFkkpP6W.js +0 -3
- package/.output/public/assets/routes-3nuEJGdo.js +0 -1
- package/.output/public/assets/routes-DORLim-C.js +0 -1
- package/.output/public/assets/t._teamId-F5f4K8kd.js +0 -1
- package/.output/public/assets/t._teamId-XfE_S1Fo.js +0 -1
- package/.output/public/assets/ui-Dhsx6SW0.js +0 -1
- package/.output/public/assets/useRouter-DsjH8G0p.js +0 -1
- package/.output/server/_libs/@codemirror/autocomplete+[...].mjs +0 -19713
- package/.output/server/_libs/@codemirror/lang-css+[...].mjs +0 -2636
- package/.output/server/_libs/@codemirror/lang-html+[...].mjs +0 -2247
- package/.output/server/_libs/@codemirror/lang-json+[...].mjs +0 -79
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +0 -1736
- package/.output/server/_libs/@uiw/codemirror-extensions-basic-setup+[...].mjs +0 -76
- package/.output/server/_libs/babel__runtime.mjs +0 -30
- package/.output/server/_libs/clsx.mjs +0 -16
- package/.output/server/_libs/codemirror__commands.mjs +0 -1725
- package/.output/server/_libs/codemirror__lint.mjs +0 -565
- package/.output/server/_libs/codemirror__search.mjs +0 -1138
- package/.output/server/_libs/codemirror__theme-one-dark.mjs +0 -161
- package/.output/server/_libs/d3-array.mjs +0 -231
- package/.output/server/_libs/d3-color.mjs +0 -330
- package/.output/server/_libs/d3-format.mjs +0 -252
- package/.output/server/_libs/d3-interpolate.mjs +0 -163
- package/.output/server/_libs/d3-path.mjs +0 -77
- package/.output/server/_libs/d3-scale+[...].mjs +0 -1907
- package/.output/server/_libs/d3-shape.mjs +0 -818
- package/.output/server/_libs/decimal.js-light.mjs +0 -884
- package/.output/server/_libs/dom-serializer+[...].mjs +0 -708
- package/.output/server/_libs/domhandler.mjs +0 -461
- package/.output/server/_libs/domutils.mjs +0 -868
- package/.output/server/_libs/es-toolkit.mjs +0 -1737
- package/.output/server/_libs/eventemitter3.mjs +0 -236
- package/.output/server/_libs/html-dom-parser+htmlparser2.mjs +0 -1560
- package/.output/server/_libs/html-react-parser+[...].mjs +0 -1360
- package/.output/server/_libs/react-is.mjs +0 -48
- package/.output/server/_libs/react-redux+[...].mjs +0 -205
- package/.output/server/_libs/recharts+victory-vendor.mjs +0 -17303
- package/.output/server/_libs/uiw__codemirror-themes.mjs +0 -32
- package/.output/server/_libs/uiw__react-codemirror.mjs +0 -354
- package/.output/server/_ssr/CodeField-B7oOmmwH.mjs +0 -143
- package/.output/server/_ssr/DashboardView-BF7PciP7.mjs +0 -2736
- package/.output/server/_ssr/LoopPlaybook-DC7QVvPY.mjs +0 -2105
- package/.output/server/_ssr/LoopView-DwSrm9Ja.mjs +0 -1300
- package/.output/server/_ssr/Modal-MaCG52Pv.mjs +0 -49
- package/.output/server/_ssr/artifactView-iuPsp5aa.mjs +0 -304
- package/.output/server/_ssr/artifacts-jQ-bfdhI.mjs +0 -2
- package/.output/server/_ssr/boot-CsEFT53K.mjs +0 -2
- package/.output/server/_ssr/db-CXownd1H.mjs +0 -2
- package/.output/server/_ssr/invite._token-CWl6kipD.mjs +0 -28
- package/.output/server/_ssr/logger-Gy-47z3k.mjs +0 -2
- package/.output/server/_ssr/loopApi-8_KgBapr.mjs +0 -109
- package/.output/server/_ssr/loopApi-ABi9SgWS.mjs +0 -564
- package/.output/server/_ssr/loops._loopId-SON_t43g.mjs +0 -30
- package/.output/server/_ssr/loops._loopId-p1KWsvMM.mjs +0 -1477
- package/.output/server/_ssr/notifyFns-BUCePuF3.mjs +0 -118
- package/.output/server/_ssr/router-Czxvra6l.mjs +0 -685
- package/.output/server/_ssr/runDiff--qLtU4FI.mjs +0 -2
- package/.output/server/_ssr/store-40eVzW1S.mjs +0 -2
- package/.output/server/_ssr/tokens-CbfoRC_s.mjs +0 -2
- package/.output/server/drizzle/0001_naive_silver_fox.sql +0 -25
- package/.output/server/drizzle/0002_funny_sage.sql +0 -12
- package/.output/server/drizzle/0003_optimal_slapstick.sql +0 -102
- package/.output/server/drizzle/0004_remove_grok_agent.sql +0 -5
- package/.output/server/drizzle/0005_heavy_gauntlet.sql +0 -8
- package/.output/server/drizzle/0006_tranquil_sharon_carter.sql +0 -1
- package/.output/server/drizzle/0007_faulty_starbolt.sql +0 -30
- package/.output/server/drizzle/0008_durable_lifecycle_evidence.sql +0 -15
- package/.output/server/drizzle/0009_ordinary_electro.sql +0 -1
- package/.output/server/drizzle/0010_workable_rage.sql +0 -14
- package/.output/server/drizzle/0011_steep_marvel_zombies.sql +0 -3
- package/.output/server/drizzle/0012_blocked_run_status.sql +0 -12
- package/.output/server/drizzle/0013_drop_run_outcome.sql +0 -2
- package/.output/server/drizzle/0014_luxuriant_scrambler.sql +0 -5
- package/.output/server/drizzle/0015_run_history_foundation.sql +0 -43
- package/.output/server/drizzle/0016_plural_machine_runs.sql +0 -4
- package/.output/server/drizzle/meta/0000_snapshot.json +0 -1333
- package/.output/server/drizzle/meta/0001_snapshot.json +0 -1498
- package/.output/server/drizzle/meta/0002_snapshot.json +0 -1576
- package/.output/server/drizzle/meta/0003_snapshot.json +0 -1666
- package/.output/server/drizzle/meta/0005_snapshot.json +0 -1666
- package/.output/server/drizzle/meta/0006_snapshot.json +0 -1672
- package/.output/server/drizzle/meta/0007_snapshot.json +0 -1787
- package/.output/server/drizzle/meta/0009_snapshot.json +0 -1793
- package/.output/server/drizzle/meta/0010_snapshot.json +0 -1891
- package/.output/server/drizzle/meta/0011_snapshot.json +0 -1872
- package/drizzle/0001_naive_silver_fox.sql +0 -25
- package/drizzle/0002_funny_sage.sql +0 -12
- package/drizzle/0003_optimal_slapstick.sql +0 -102
- package/drizzle/0004_remove_grok_agent.sql +0 -5
- package/drizzle/0005_heavy_gauntlet.sql +0 -8
- package/drizzle/0006_tranquil_sharon_carter.sql +0 -1
- package/drizzle/0007_faulty_starbolt.sql +0 -30
- package/drizzle/0008_durable_lifecycle_evidence.sql +0 -15
- package/drizzle/0009_ordinary_electro.sql +0 -1
- package/drizzle/0010_workable_rage.sql +0 -14
- package/drizzle/0011_steep_marvel_zombies.sql +0 -3
- package/drizzle/0012_blocked_run_status.sql +0 -12
- package/drizzle/0013_drop_run_outcome.sql +0 -2
- package/drizzle/0014_luxuriant_scrambler.sql +0 -5
- package/drizzle/0015_run_history_foundation.sql +0 -43
- package/drizzle/0016_plural_machine_runs.sql +0 -4
- package/drizzle/meta/0000_snapshot.json +0 -1333
- package/drizzle/meta/0001_snapshot.json +0 -1498
- package/drizzle/meta/0002_snapshot.json +0 -1576
- package/drizzle/meta/0003_snapshot.json +0 -1666
- package/drizzle/meta/0005_snapshot.json +0 -1666
- package/drizzle/meta/0006_snapshot.json +0 -1672
- package/drizzle/meta/0007_snapshot.json +0 -1787
- package/drizzle/meta/0009_snapshot.json +0 -1793
- package/drizzle/meta/0010_snapshot.json +0 -1891
- package/drizzle/meta/0011_snapshot.json +0 -1872
|
@@ -1,461 +0,0 @@
|
|
|
1
|
-
import { n as __esmMin, r as __exportAll } from "../_runtime.mjs";
|
|
2
|
-
import { f as init_dist$1, p as isTag$1, u as ElementType } from "./dom-serializer+[...].mjs";
|
|
3
|
-
//#region ../../node_modules/.pnpm/domhandler@6.0.1/node_modules/domhandler/dist/node.js
|
|
4
|
-
/**
|
|
5
|
-
* Checks if `node` is an element node.
|
|
6
|
-
* @param node Node to check.
|
|
7
|
-
* @returns `true` if the node is an element node.
|
|
8
|
-
*/
|
|
9
|
-
function isTag(node) {
|
|
10
|
-
return isTag$1(node);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Checks if `node` is a CDATA node.
|
|
14
|
-
* @param node Node to check.
|
|
15
|
-
* @returns `true` if the node is a CDATA node.
|
|
16
|
-
*/
|
|
17
|
-
function isCDATA(node) {
|
|
18
|
-
return node.type === ElementType.CDATA;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Checks if `node` is a text node.
|
|
22
|
-
* @param node Node to check.
|
|
23
|
-
* @returns `true` if the node is a text node.
|
|
24
|
-
*/
|
|
25
|
-
function isText(node) {
|
|
26
|
-
return node.type === ElementType.Text;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Checks if `node` is a comment node.
|
|
30
|
-
* @param node Node to check.
|
|
31
|
-
* @returns `true` if the node is a comment node.
|
|
32
|
-
*/
|
|
33
|
-
function isComment(node) {
|
|
34
|
-
return node.type === ElementType.Comment;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Checks if `node` is a directive node.
|
|
38
|
-
* @param node Node to check.
|
|
39
|
-
* @returns `true` if the node is a directive node.
|
|
40
|
-
*/
|
|
41
|
-
function isDirective(node) {
|
|
42
|
-
return node.type === ElementType.Directive;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Checks if `node` is a document node.
|
|
46
|
-
* @param node Node to check.
|
|
47
|
-
* @returns `true` if the node is a document node.
|
|
48
|
-
*/
|
|
49
|
-
function isDocument(node) {
|
|
50
|
-
return node.type === ElementType.Root;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Checks if `node` has children.
|
|
54
|
-
* @param node Node to check.
|
|
55
|
-
* @returns `true` if the node has children.
|
|
56
|
-
*/
|
|
57
|
-
function hasChildren(node) {
|
|
58
|
-
return Object.hasOwn(node, "children");
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Clone a node, and optionally its children.
|
|
62
|
-
* @param node Node to clone.
|
|
63
|
-
* @param recursive Clone child nodes as well.
|
|
64
|
-
* @returns A clone of the node.
|
|
65
|
-
*/
|
|
66
|
-
function cloneNode(node, recursive = false) {
|
|
67
|
-
let result;
|
|
68
|
-
if (isText(node)) result = new Text(node.data);
|
|
69
|
-
else if (isComment(node)) result = new Comment(node.data);
|
|
70
|
-
else if (isTag(node)) {
|
|
71
|
-
const children = recursive ? cloneChildren(node.children) : [];
|
|
72
|
-
const clone = new Element(node.name, { ...node.attribs }, children);
|
|
73
|
-
for (const child of children) child.parent = clone;
|
|
74
|
-
if (node.namespace != null) clone.namespace = node.namespace;
|
|
75
|
-
if (node["x-attribsNamespace"]) clone["x-attribsNamespace"] = { ...node["x-attribsNamespace"] };
|
|
76
|
-
if (node["x-attribsPrefix"]) clone["x-attribsPrefix"] = { ...node["x-attribsPrefix"] };
|
|
77
|
-
result = clone;
|
|
78
|
-
} else if (isCDATA(node)) {
|
|
79
|
-
const children = recursive ? cloneChildren(node.children) : [];
|
|
80
|
-
const clone = new CDATA(children);
|
|
81
|
-
for (const child of children) child.parent = clone;
|
|
82
|
-
result = clone;
|
|
83
|
-
} else if (isDocument(node)) {
|
|
84
|
-
const children = recursive ? cloneChildren(node.children) : [];
|
|
85
|
-
const clone = new Document(children);
|
|
86
|
-
for (const child of children) child.parent = clone;
|
|
87
|
-
if (node["x-mode"]) clone["x-mode"] = node["x-mode"];
|
|
88
|
-
result = clone;
|
|
89
|
-
} else if (isDirective(node)) {
|
|
90
|
-
const instruction = new ProcessingInstruction(node.name, node.data);
|
|
91
|
-
if (node["x-name"] != null) {
|
|
92
|
-
instruction["x-name"] = node["x-name"];
|
|
93
|
-
instruction["x-publicId"] = node["x-publicId"];
|
|
94
|
-
instruction["x-systemId"] = node["x-systemId"];
|
|
95
|
-
}
|
|
96
|
-
result = instruction;
|
|
97
|
-
} else throw new Error(`Not implemented yet: ${node.type}`);
|
|
98
|
-
result.startIndex = node.startIndex;
|
|
99
|
-
result.endIndex = node.endIndex;
|
|
100
|
-
if (node.sourceCodeLocation != null) result.sourceCodeLocation = node.sourceCodeLocation;
|
|
101
|
-
return result;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Clone a list of child nodes.
|
|
105
|
-
* @param childs The child nodes to clone.
|
|
106
|
-
* @returns A list of cloned child nodes.
|
|
107
|
-
*/
|
|
108
|
-
function cloneChildren(childs) {
|
|
109
|
-
const children = childs.map((child) => cloneNode(child, true));
|
|
110
|
-
for (let index = 1; index < children.length; index++) {
|
|
111
|
-
children[index].prev = children[index - 1];
|
|
112
|
-
children[index - 1].next = children[index];
|
|
113
|
-
}
|
|
114
|
-
return children;
|
|
115
|
-
}
|
|
116
|
-
var Node, DataNode, Text, Comment, ProcessingInstruction, NodeWithChildren, CDATA, Document, Element;
|
|
117
|
-
var init_node = __esmMin((() => {
|
|
118
|
-
init_dist$1();
|
|
119
|
-
Node = class {
|
|
120
|
-
/** Parent of the node */
|
|
121
|
-
parent = null;
|
|
122
|
-
/** Previous sibling */
|
|
123
|
-
prev = null;
|
|
124
|
-
/** Next sibling */
|
|
125
|
-
next = null;
|
|
126
|
-
/** The start index of the node. Requires `withStartIndices` on the handler to be `true. */
|
|
127
|
-
startIndex = null;
|
|
128
|
-
/** The end index of the node. Requires `withEndIndices` on the handler to be `true. */
|
|
129
|
-
endIndex = null;
|
|
130
|
-
/**
|
|
131
|
-
* Same as {@link parent}.
|
|
132
|
-
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
133
|
-
*/
|
|
134
|
-
get parentNode() {
|
|
135
|
-
return this.parent;
|
|
136
|
-
}
|
|
137
|
-
set parentNode(parent) {
|
|
138
|
-
this.parent = parent;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Same as {@link prev}.
|
|
142
|
-
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
143
|
-
*/
|
|
144
|
-
get previousSibling() {
|
|
145
|
-
return this.prev;
|
|
146
|
-
}
|
|
147
|
-
set previousSibling(previous) {
|
|
148
|
-
this.prev = previous;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Same as {@link next}.
|
|
152
|
-
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
153
|
-
*/
|
|
154
|
-
get nextSibling() {
|
|
155
|
-
return this.next;
|
|
156
|
-
}
|
|
157
|
-
set nextSibling(next) {
|
|
158
|
-
this.next = next;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Clone this node, and optionally its children.
|
|
162
|
-
* @param recursive Clone child nodes as well.
|
|
163
|
-
* @returns A clone of the node.
|
|
164
|
-
*/
|
|
165
|
-
cloneNode(recursive = false) {
|
|
166
|
-
return cloneNode(this, recursive);
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
DataNode = class extends Node {
|
|
170
|
-
data;
|
|
171
|
-
/**
|
|
172
|
-
* @param data The content of the data node
|
|
173
|
-
*/
|
|
174
|
-
constructor(data) {
|
|
175
|
-
super();
|
|
176
|
-
this.data = data;
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Same as {@link data}.
|
|
180
|
-
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
181
|
-
*/
|
|
182
|
-
get nodeValue() {
|
|
183
|
-
return this.data;
|
|
184
|
-
}
|
|
185
|
-
set nodeValue(data) {
|
|
186
|
-
this.data = data;
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
Text = class extends DataNode {
|
|
190
|
-
type = ElementType.Text;
|
|
191
|
-
get nodeType() {
|
|
192
|
-
return 3;
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
Comment = class extends DataNode {
|
|
196
|
-
type = ElementType.Comment;
|
|
197
|
-
get nodeType() {
|
|
198
|
-
return 8;
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
ProcessingInstruction = class extends DataNode {
|
|
202
|
-
type = ElementType.Directive;
|
|
203
|
-
name;
|
|
204
|
-
constructor(name, data) {
|
|
205
|
-
super(data);
|
|
206
|
-
this.name = name;
|
|
207
|
-
}
|
|
208
|
-
get nodeType() {
|
|
209
|
-
return 1;
|
|
210
|
-
}
|
|
211
|
-
/** If this is a doctype, the document type name (parse5 only). */
|
|
212
|
-
"x-name";
|
|
213
|
-
/** If this is a doctype, the document type public identifier (parse5 only). */
|
|
214
|
-
"x-publicId";
|
|
215
|
-
/** If this is a doctype, the document type system identifier (parse5 only). */
|
|
216
|
-
"x-systemId";
|
|
217
|
-
};
|
|
218
|
-
NodeWithChildren = class extends Node {
|
|
219
|
-
children;
|
|
220
|
-
/**
|
|
221
|
-
* @param children Children of the node. Only certain node types can have children.
|
|
222
|
-
*/
|
|
223
|
-
constructor(children) {
|
|
224
|
-
super();
|
|
225
|
-
this.children = children;
|
|
226
|
-
}
|
|
227
|
-
/** First child of the node. */
|
|
228
|
-
get firstChild() {
|
|
229
|
-
return this.children[0] ?? null;
|
|
230
|
-
}
|
|
231
|
-
/** Last child of the node. */
|
|
232
|
-
get lastChild() {
|
|
233
|
-
return this.children.length > 0 ? this.children[this.children.length - 1] : null;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* Same as {@link children}.
|
|
237
|
-
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
238
|
-
*/
|
|
239
|
-
get childNodes() {
|
|
240
|
-
return this.children;
|
|
241
|
-
}
|
|
242
|
-
set childNodes(children) {
|
|
243
|
-
this.children = children;
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
CDATA = class extends NodeWithChildren {
|
|
247
|
-
type = ElementType.CDATA;
|
|
248
|
-
get nodeType() {
|
|
249
|
-
return 4;
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
Document = class extends NodeWithChildren {
|
|
253
|
-
type = ElementType.Root;
|
|
254
|
-
get nodeType() {
|
|
255
|
-
return 9;
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
|
-
Element = class extends NodeWithChildren {
|
|
259
|
-
name;
|
|
260
|
-
attribs;
|
|
261
|
-
type;
|
|
262
|
-
/**
|
|
263
|
-
* @param name Name of the tag, eg. `div`, `span`.
|
|
264
|
-
* @param attribs Object mapping attribute names to attribute values.
|
|
265
|
-
* @param children Children of the node.
|
|
266
|
-
* @param type Node type used for the new node instance.
|
|
267
|
-
*/
|
|
268
|
-
constructor(name, attribs, children = [], type = name === "script" ? ElementType.Script : name === "style" ? ElementType.Style : ElementType.Tag) {
|
|
269
|
-
super(children);
|
|
270
|
-
this.name = name;
|
|
271
|
-
this.attribs = attribs;
|
|
272
|
-
this.type = type;
|
|
273
|
-
}
|
|
274
|
-
get nodeType() {
|
|
275
|
-
return 1;
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* Same as {@link name}.
|
|
279
|
-
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
280
|
-
*/
|
|
281
|
-
get tagName() {
|
|
282
|
-
return this.name;
|
|
283
|
-
}
|
|
284
|
-
set tagName(name) {
|
|
285
|
-
this.name = name;
|
|
286
|
-
}
|
|
287
|
-
get attributes() {
|
|
288
|
-
return Object.keys(this.attribs).map((name) => ({
|
|
289
|
-
name,
|
|
290
|
-
value: this.attribs[name],
|
|
291
|
-
namespace: this["x-attribsNamespace"]?.[name],
|
|
292
|
-
prefix: this["x-attribsPrefix"]?.[name]
|
|
293
|
-
}));
|
|
294
|
-
}
|
|
295
|
-
/** Element namespace (parse5 only). */
|
|
296
|
-
namespace;
|
|
297
|
-
/** Element attribute namespaces (parse5 only). */
|
|
298
|
-
"x-attribsNamespace";
|
|
299
|
-
/** Element attribute namespace-related prefixes (parse5 only). */
|
|
300
|
-
"x-attribsPrefix";
|
|
301
|
-
};
|
|
302
|
-
}));
|
|
303
|
-
//#endregion
|
|
304
|
-
//#region ../../node_modules/.pnpm/domhandler@6.0.1/node_modules/domhandler/dist/index.js
|
|
305
|
-
var dist_exports = /* @__PURE__ */ __exportAll({
|
|
306
|
-
CDATA: () => CDATA,
|
|
307
|
-
Comment: () => Comment,
|
|
308
|
-
DataNode: () => DataNode,
|
|
309
|
-
Document: () => Document,
|
|
310
|
-
DomHandler: () => DomHandler,
|
|
311
|
-
Element: () => Element,
|
|
312
|
-
Node: () => Node,
|
|
313
|
-
NodeWithChildren: () => NodeWithChildren,
|
|
314
|
-
ProcessingInstruction: () => ProcessingInstruction,
|
|
315
|
-
Text: () => Text,
|
|
316
|
-
cloneNode: () => cloneNode,
|
|
317
|
-
default: () => DomHandler,
|
|
318
|
-
hasChildren: () => hasChildren,
|
|
319
|
-
isCDATA: () => isCDATA,
|
|
320
|
-
isComment: () => isComment,
|
|
321
|
-
isDirective: () => isDirective,
|
|
322
|
-
isDocument: () => isDocument,
|
|
323
|
-
isTag: () => isTag,
|
|
324
|
-
isText: () => isText
|
|
325
|
-
});
|
|
326
|
-
var defaultOptions, DomHandler;
|
|
327
|
-
var init_dist = __esmMin((() => {
|
|
328
|
-
init_dist$1();
|
|
329
|
-
init_node();
|
|
330
|
-
init_node();
|
|
331
|
-
defaultOptions = {
|
|
332
|
-
withStartIndices: false,
|
|
333
|
-
withEndIndices: false,
|
|
334
|
-
xmlMode: false
|
|
335
|
-
};
|
|
336
|
-
DomHandler = class {
|
|
337
|
-
/** The elements of the DOM */
|
|
338
|
-
dom = [];
|
|
339
|
-
/** The root element for the DOM */
|
|
340
|
-
root = new Document(this.dom);
|
|
341
|
-
/** Called once parsing has completed. */
|
|
342
|
-
callback;
|
|
343
|
-
/** Settings for the handler. */
|
|
344
|
-
options;
|
|
345
|
-
/** Callback whenever a tag is closed. */
|
|
346
|
-
elementCB;
|
|
347
|
-
/** Indicated whether parsing has been completed. */
|
|
348
|
-
done = false;
|
|
349
|
-
/** Stack of open tags. */
|
|
350
|
-
tagStack = [this.root];
|
|
351
|
-
/** A data node that is still being written to. */
|
|
352
|
-
lastNode = null;
|
|
353
|
-
/** Reference to the parser instance. Used for location information. */
|
|
354
|
-
parser = null;
|
|
355
|
-
/**
|
|
356
|
-
* @param callback Called once parsing has completed.
|
|
357
|
-
* @param options Settings for the handler.
|
|
358
|
-
* @param elementCB Callback whenever a tag is closed.
|
|
359
|
-
*/
|
|
360
|
-
constructor(callback, options, elementCB) {
|
|
361
|
-
if (typeof options === "function") {
|
|
362
|
-
elementCB = options;
|
|
363
|
-
options = defaultOptions;
|
|
364
|
-
}
|
|
365
|
-
if (typeof callback === "object") {
|
|
366
|
-
options = callback;
|
|
367
|
-
callback = void 0;
|
|
368
|
-
}
|
|
369
|
-
this.callback = callback ?? null;
|
|
370
|
-
this.options = options ?? defaultOptions;
|
|
371
|
-
this.elementCB = elementCB ?? null;
|
|
372
|
-
}
|
|
373
|
-
onparserinit(parser) {
|
|
374
|
-
this.parser = parser;
|
|
375
|
-
}
|
|
376
|
-
onreset() {
|
|
377
|
-
this.dom = [];
|
|
378
|
-
this.root = new Document(this.dom);
|
|
379
|
-
this.done = false;
|
|
380
|
-
this.tagStack = [this.root];
|
|
381
|
-
this.lastNode = null;
|
|
382
|
-
this.parser = null;
|
|
383
|
-
}
|
|
384
|
-
onend() {
|
|
385
|
-
if (this.done) return;
|
|
386
|
-
this.done = true;
|
|
387
|
-
this.parser = null;
|
|
388
|
-
this.handleCallback(null);
|
|
389
|
-
}
|
|
390
|
-
onerror(error) {
|
|
391
|
-
this.handleCallback(error);
|
|
392
|
-
}
|
|
393
|
-
onclosetag() {
|
|
394
|
-
this.lastNode = null;
|
|
395
|
-
const element = this.tagStack.pop();
|
|
396
|
-
if (this.options.withEndIndices && this.parser) element.endIndex = this.parser.endIndex;
|
|
397
|
-
if (this.elementCB) this.elementCB(element);
|
|
398
|
-
}
|
|
399
|
-
onopentag(name, attribs) {
|
|
400
|
-
const element = new Element(name, attribs, void 0, this.options.xmlMode ? ElementType.Tag : void 0);
|
|
401
|
-
this.addNode(element);
|
|
402
|
-
this.tagStack.push(element);
|
|
403
|
-
}
|
|
404
|
-
ontext(data) {
|
|
405
|
-
const { lastNode } = this;
|
|
406
|
-
if (lastNode && lastNode.type === ElementType.Text) {
|
|
407
|
-
lastNode.data += data;
|
|
408
|
-
if (this.options.withEndIndices && this.parser) lastNode.endIndex = this.parser.endIndex;
|
|
409
|
-
} else {
|
|
410
|
-
const node = new Text(data);
|
|
411
|
-
this.addNode(node);
|
|
412
|
-
this.lastNode = node;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
oncomment(data) {
|
|
416
|
-
if (this.lastNode && this.lastNode.type === ElementType.Comment) {
|
|
417
|
-
this.lastNode.data += data;
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
const node = new Comment(data);
|
|
421
|
-
this.addNode(node);
|
|
422
|
-
this.lastNode = node;
|
|
423
|
-
}
|
|
424
|
-
oncommentend() {
|
|
425
|
-
this.lastNode = null;
|
|
426
|
-
}
|
|
427
|
-
oncdatastart() {
|
|
428
|
-
const text = new Text("");
|
|
429
|
-
const node = new CDATA([text]);
|
|
430
|
-
this.addNode(node);
|
|
431
|
-
text.parent = node;
|
|
432
|
-
this.lastNode = text;
|
|
433
|
-
}
|
|
434
|
-
oncdataend() {
|
|
435
|
-
this.lastNode = null;
|
|
436
|
-
}
|
|
437
|
-
onprocessinginstruction(name, data) {
|
|
438
|
-
const node = new ProcessingInstruction(name, data);
|
|
439
|
-
this.addNode(node);
|
|
440
|
-
}
|
|
441
|
-
handleCallback(error) {
|
|
442
|
-
if (typeof this.callback === "function") this.callback(error, this.dom);
|
|
443
|
-
else if (error) throw error;
|
|
444
|
-
}
|
|
445
|
-
addNode(node) {
|
|
446
|
-
const parent = this.tagStack[this.tagStack.length - 1];
|
|
447
|
-
const previousSibling = parent.children[parent.children.length - 1];
|
|
448
|
-
if (this.options.withStartIndices && this.parser) node.startIndex = this.parser.startIndex;
|
|
449
|
-
if (this.options.withEndIndices && this.parser) node.endIndex = this.parser.endIndex;
|
|
450
|
-
parent.children.push(node);
|
|
451
|
-
if (previousSibling) {
|
|
452
|
-
node.prev = previousSibling;
|
|
453
|
-
previousSibling.next = node;
|
|
454
|
-
}
|
|
455
|
-
node.parent = parent;
|
|
456
|
-
this.lastNode = null;
|
|
457
|
-
}
|
|
458
|
-
};
|
|
459
|
-
}));
|
|
460
|
-
//#endregion
|
|
461
|
-
export { init_node as a, isTag as c, hasChildren as i, isText as l, dist_exports as n, isCDATA as o, init_dist as r, isComment as s, DomHandler as t };
|