@tung-engineering/agent-platform-web-sdk 0.0.50 → 0.0.52
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/web-sdk.cjs +19 -19
- package/dist/web-sdk.cjs.map +1 -1
- package/dist/web-sdk.min.js +16 -16
- package/dist/web-sdk.min.js.map +1 -1
- package/dist/web-sdk.mjs +114 -113
- package/dist/web-sdk.mjs.map +1 -1
- package/package.json +1 -1
package/dist/web-sdk.mjs
CHANGED
|
@@ -4195,9 +4195,9 @@ const qh = (e, t) => {
|
|
|
4195
4195
|
// enumerable: false,
|
|
4196
4196
|
}
|
|
4197
4197
|
});
|
|
4198
|
-
},
|
|
4198
|
+
}, at = v("ZodError", qh, {
|
|
4199
4199
|
Parent: Error
|
|
4200
|
-
}), Fh = /* @__PURE__ */ ki(
|
|
4200
|
+
}), Fh = /* @__PURE__ */ ki(at), Hh = /* @__PURE__ */ _i(at), Bh = /* @__PURE__ */ Po(at), Gh = /* @__PURE__ */ Ro(at), Wh = /* @__PURE__ */ Cu(at), Jh = /* @__PURE__ */ Pu(at), Xh = /* @__PURE__ */ Ru(at), Vh = /* @__PURE__ */ zu(at), Yh = /* @__PURE__ */ Lu(at), Kh = /* @__PURE__ */ Iu(at), Qh = /* @__PURE__ */ $u(at), ef = /* @__PURE__ */ Nu(at), he = /* @__PURE__ */ v("ZodType", (e, t) => (de.init(e, t), Object.assign(e["~standard"], {
|
|
4201
4201
|
jsonSchema: {
|
|
4202
4202
|
input: mo(e, "input"),
|
|
4203
4203
|
output: mo(e, "output")
|
|
@@ -4318,7 +4318,7 @@ function yt(e, t) {
|
|
|
4318
4318
|
return /* @__PURE__ */ sh(Ef, e, t);
|
|
4319
4319
|
}
|
|
4320
4320
|
const Af = /* @__PURE__ */ v("ZodObject", (e, t) => {
|
|
4321
|
-
Qd.init(e, t), he.init(e, t), e._zod.processJSONSchema = (n, r, o) => xh(e, n, r, o), K(e, "shape", () => t.shape), e.keyof = () =>
|
|
4321
|
+
Qd.init(e, t), he.init(e, t), e._zod.processJSONSchema = (n, r, o) => xh(e, n, r, o), K(e, "shape", () => t.shape), e.keyof = () => rt(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Cs() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Cs() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Tf() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => _u(e, n), e.safeExtend = (n) => vu(e, n), e.merge = (n) => yu(e, n), e.pick = (n) => bu(e, n), e.omit = (n) => ku(e, n), e.partial = (...n) => wu(Fa, e, n[0]), e.required = (...n) => xu(Ha, e, n[0]);
|
|
4322
4322
|
});
|
|
4323
4323
|
function le(e, t) {
|
|
4324
4324
|
const n = {
|
|
@@ -4401,7 +4401,7 @@ const oi = /* @__PURE__ */ v("ZodEnum", (e, t) => {
|
|
|
4401
4401
|
});
|
|
4402
4402
|
};
|
|
4403
4403
|
});
|
|
4404
|
-
function
|
|
4404
|
+
function rt(e, t) {
|
|
4405
4405
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
4406
4406
|
return new oi({
|
|
4407
4407
|
type: "enum",
|
|
@@ -4573,19 +4573,19 @@ const rn = le({
|
|
|
4573
4573
|
extraCommands: yt(Kf).optional(),
|
|
4574
4574
|
id: A().uuid().optional(),
|
|
4575
4575
|
rotationKey: A().optional(),
|
|
4576
|
-
usageStatus:
|
|
4576
|
+
usageStatus: rt(["free", "in_use"]).optional()
|
|
4577
4577
|
}), Qf = qa("operation", [
|
|
4578
4578
|
rn.extend({
|
|
4579
4579
|
operation: nt("create"),
|
|
4580
4580
|
content: A().optional(),
|
|
4581
4581
|
contentPath: A().optional(),
|
|
4582
|
-
encoding:
|
|
4582
|
+
encoding: rt(["utf-8", "base64"]).optional()
|
|
4583
4583
|
}),
|
|
4584
4584
|
rn.extend({
|
|
4585
4585
|
operation: nt("merge"),
|
|
4586
4586
|
data: wt(A(), ja()),
|
|
4587
|
-
mergeStrategy:
|
|
4588
|
-
arrayMergeStrategy:
|
|
4587
|
+
mergeStrategy: rt(["deep", "shallow"]).optional(),
|
|
4588
|
+
arrayMergeStrategy: rt(["concat", "replace"]).optional()
|
|
4589
4589
|
}),
|
|
4590
4590
|
rn.extend({
|
|
4591
4591
|
operation: nt("modify"),
|
|
@@ -4619,12 +4619,12 @@ const rn = le({
|
|
|
4619
4619
|
]);
|
|
4620
4620
|
var ye = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.ASSIGNED = "assigned", e.IN_PROGRESS = "in_progress", e.WAITING_FOR_INPUT = "waiting_for_input", e.WAITING_FOR_PLAN_APPROVAL = "waiting_for_plan_approval", e.PLAN_APPROVED = "plan_approved", e.PLAN_REJECTED = "plan_rejected", e.COMPLETED = "completed", e.FAILED = "failed", e.CANCELLED = "cancelled", e.RESULT_REJECTED = "result_rejected", e))(ye || {});
|
|
4621
4621
|
const eg = le({
|
|
4622
|
-
type:
|
|
4622
|
+
type: rt(["json", "file", "regex"]).describe("Extraction method"),
|
|
4623
4623
|
source: A().describe("Source to extract from (file path or stdout/stderr)"),
|
|
4624
4624
|
schema: le({}).passthrough().optional().describe("JSON schema for validation"),
|
|
4625
4625
|
pattern: A().optional().describe("Regex pattern for extraction")
|
|
4626
4626
|
}), tg = le({
|
|
4627
|
-
type:
|
|
4627
|
+
type: rt(["issue_update", "bulk_issue_update", "notification", "webhook"]).describe("Hook type"),
|
|
4628
4628
|
config: ja().describe("Hook-specific configuration")
|
|
4629
4629
|
});
|
|
4630
4630
|
le({
|
|
@@ -4638,14 +4638,14 @@ le({
|
|
|
4638
4638
|
gitCommitMessage: A().optional().describe("Commit message for git operations"),
|
|
4639
4639
|
resultExtraction: eg.optional().describe("Schema for extracting result data"),
|
|
4640
4640
|
postExecutionHooks: yt(tg).optional().describe("Hooks to run after task completion"),
|
|
4641
|
-
executionMode:
|
|
4641
|
+
executionMode: rt(["claudeAgentSdk", "openaiAgentSdk", "opencodeSdk", "cursorSdk", "codexSdk"]).optional().default("claudeAgentSdk").describe("Execution mode (default: claudeAgentSdk)"),
|
|
4642
4642
|
executionPlan: qa("executionMode", [
|
|
4643
4643
|
le({
|
|
4644
4644
|
executionMode: nt("claudeAgentSdk"),
|
|
4645
4645
|
promptText: A(),
|
|
4646
4646
|
sdkOptions: le({
|
|
4647
4647
|
model: A(),
|
|
4648
|
-
permissionMode:
|
|
4648
|
+
permissionMode: rt(["plan", "acceptEdits", "bypassPermissions", "ask"]),
|
|
4649
4649
|
settingSources: yt(A()),
|
|
4650
4650
|
allowDangerouslySkipPermissions: me(),
|
|
4651
4651
|
persistSession: me(),
|
|
@@ -4673,8 +4673,8 @@ le({
|
|
|
4673
4673
|
promptText: A(),
|
|
4674
4674
|
sdkOptions: le({
|
|
4675
4675
|
model: A().optional(),
|
|
4676
|
-
sandboxMode:
|
|
4677
|
-
approvalPolicy:
|
|
4676
|
+
sandboxMode: rt(["read-only", "workspace-write", "danger-full-access"]).optional(),
|
|
4677
|
+
approvalPolicy: rt(["never", "on-request", "on-failure", "untrusted"]).optional(),
|
|
4678
4678
|
env: wt(A(), A()).optional()
|
|
4679
4679
|
}),
|
|
4680
4680
|
resume: le({ sessionId: A().optional(), continue: me() }).optional()
|
|
@@ -4714,7 +4714,8 @@ le({
|
|
|
4714
4714
|
createdAt: A()
|
|
4715
4715
|
})).optional().describe("Inline review comments attached to the plan"),
|
|
4716
4716
|
hasAiConfigSecrets: me().optional().describe("True when AI Config has secret-backed env vars; agent must fetch resolved values via /tasks/:id/resolve-secrets"),
|
|
4717
|
-
hasCredentials: me().optional().describe("True when the task has credentials attached; agent must fetch resolved values via /tasks/:id/resolve-credentials")
|
|
4717
|
+
hasCredentials: me().optional().describe("True when the task has credentials attached; agent must fetch resolved values via /tasks/:id/resolve-credentials"),
|
|
4718
|
+
mcpServersMode: rt(["all", "agentPlatformOnly"]).optional().describe("MCP server strategy for this run; 'agentPlatformOnly' strips every other MCP server and keeps only the agent-platform server")
|
|
4718
4719
|
});
|
|
4719
4720
|
ye.PENDING + "", ye.CANCELLED, ye.ASSIGNED + "", ye.CANCELLED, ye.IN_PROGRESS + "", ye.CANCELLED, ye.FAILED, ye.WAITING_FOR_INPUT + "", ye.CANCELLED, ye.WAITING_FOR_PLAN_APPROVAL + "", ye.CANCELLED, ye.PLAN_APPROVED + "", ye.CANCELLED, ye.PLAN_REJECTED + "", ye.CANCELLED, ye.COMPLETED + "", ye.RESULT_REJECTED + "", ye.CANCELLED, ye.FAILED + "", ye.CANCELLED + "";
|
|
4720
4721
|
const ng = "browser_capture", rg = "browser_automate";
|
|
@@ -5241,7 +5242,7 @@ var Ja = { exports: {} };
|
|
|
5241
5242
|
return i < 128 ? l : i < 2048 ? Q(192 | i >>> 6) + Q(128 | i & 63) : Q(224 | i >>> 12 & 15) + Q(128 | i >>> 6 & 63) + Q(128 | i & 63);
|
|
5242
5243
|
}, bt = function(l) {
|
|
5243
5244
|
return l.replace(/[^\x00-\x7F]/g, Ie);
|
|
5244
|
-
},
|
|
5245
|
+
}, ct = function(l) {
|
|
5245
5246
|
var i = [0, 2, 1][l.length % 3], a = l.charCodeAt(0) << 16 | (l.length > 1 ? l.charCodeAt(1) : 0) << 8 | (l.length > 2 ? l.charCodeAt(2) : 0), f = [
|
|
5246
5247
|
Re.charAt(a >>> 18),
|
|
5247
5248
|
Re.charAt(a >>> 12 & 63),
|
|
@@ -5250,7 +5251,7 @@ var Ja = { exports: {} };
|
|
|
5250
5251
|
];
|
|
5251
5252
|
return f.join("");
|
|
5252
5253
|
}, ge = window.btoa || function(l) {
|
|
5253
|
-
return l.replace(/[\s\S]{1,3}/g,
|
|
5254
|
+
return l.replace(/[\s\S]{1,3}/g, ct);
|
|
5254
5255
|
};
|
|
5255
5256
|
class Se {
|
|
5256
5257
|
constructor(i, a, f, g) {
|
|
@@ -5515,11 +5516,11 @@ var Ja = { exports: {} };
|
|
|
5515
5516
|
});
|
|
5516
5517
|
E.send($);
|
|
5517
5518
|
};
|
|
5518
|
-
},
|
|
5519
|
+
}, lt = {
|
|
5519
5520
|
name: "jsonp",
|
|
5520
5521
|
getAgent: _n
|
|
5521
5522
|
};
|
|
5522
|
-
const Mt =
|
|
5523
|
+
const Mt = lt;
|
|
5523
5524
|
function Qt(l, i, a) {
|
|
5524
5525
|
var f = l + (i.useTLS ? "s" : ""), g = i.useTLS ? i.hostTLS : i.hostNonTLS;
|
|
5525
5526
|
return f + "://" + g + a;
|
|
@@ -5584,7 +5585,7 @@ var Ja = { exports: {} };
|
|
|
5584
5585
|
function At(l) {
|
|
5585
5586
|
return "_" + l;
|
|
5586
5587
|
}
|
|
5587
|
-
class
|
|
5588
|
+
class ut {
|
|
5588
5589
|
constructor(i) {
|
|
5589
5590
|
this.callbacks = new No(), this.global_callbacks = [], this.failThrough = i;
|
|
5590
5591
|
}
|
|
@@ -5614,7 +5615,7 @@ var Ja = { exports: {} };
|
|
|
5614
5615
|
return this;
|
|
5615
5616
|
}
|
|
5616
5617
|
}
|
|
5617
|
-
class Oo extends
|
|
5618
|
+
class Oo extends ut {
|
|
5618
5619
|
constructor(i, a, f, g, y) {
|
|
5619
5620
|
super(), this.initialize = q.transportConnectionInitializer, this.hooks = i, this.name = a, this.priority = f, this.key = g, this.options = y, this.state = "new", this.timeline = y.timeline, this.activityTimeout = y.activityTimeout, this.id = this.timeline.generateUniqueID();
|
|
5620
5621
|
}
|
|
@@ -5773,8 +5774,8 @@ var Ja = { exports: {} };
|
|
|
5773
5774
|
}
|
|
5774
5775
|
}, Qn = new ce(Ee({}, Vn, Kn)), Or = new ce(Ee({}, wn, Kn));
|
|
5775
5776
|
et.xdr_streaming = Qn, et.xdr_polling = Or, et.sockjs = Nr;
|
|
5776
|
-
const
|
|
5777
|
-
class Dr extends
|
|
5777
|
+
const dt = et;
|
|
5778
|
+
class Dr extends ut {
|
|
5778
5779
|
constructor() {
|
|
5779
5780
|
super();
|
|
5780
5781
|
var i = this;
|
|
@@ -5867,7 +5868,7 @@ var Ja = { exports: {} };
|
|
|
5867
5868
|
} : null;
|
|
5868
5869
|
}
|
|
5869
5870
|
}, Ct = er;
|
|
5870
|
-
class O extends
|
|
5871
|
+
class O extends ut {
|
|
5871
5872
|
constructor(i, a) {
|
|
5872
5873
|
super(), this.id = i, this.transport = a, this.activityTimeout = a.activityTimeout, this.bindListeners();
|
|
5873
5874
|
}
|
|
@@ -5983,7 +5984,7 @@ var Ja = { exports: {} };
|
|
|
5983
5984
|
this.timeline.isEmpty() || this.timeline.send(q.TimelineTransport.getAgent(this, i), a);
|
|
5984
5985
|
}
|
|
5985
5986
|
}
|
|
5986
|
-
class z extends
|
|
5987
|
+
class z extends ut {
|
|
5987
5988
|
constructor(i, a) {
|
|
5988
5989
|
super(function(f, g) {
|
|
5989
5990
|
ae.debug("No callbacks on " + i + " for " + f);
|
|
@@ -6167,7 +6168,7 @@ var Ja = { exports: {} };
|
|
|
6167
6168
|
this.members.reset(), super.disconnect();
|
|
6168
6169
|
}
|
|
6169
6170
|
}
|
|
6170
|
-
var
|
|
6171
|
+
var pt = d(978), kt = d(594);
|
|
6171
6172
|
class tr extends ne {
|
|
6172
6173
|
constructor(i, a, f) {
|
|
6173
6174
|
super(i, a), this.key = null, this.nacl = f;
|
|
@@ -6234,7 +6235,7 @@ var Ja = { exports: {} };
|
|
|
6234
6235
|
this.emit(i, this.getDataToEmit(y));
|
|
6235
6236
|
}
|
|
6236
6237
|
getDataToEmit(i) {
|
|
6237
|
-
let a = (0,
|
|
6238
|
+
let a = (0, pt.D4)(i);
|
|
6238
6239
|
try {
|
|
6239
6240
|
return JSON.parse(a);
|
|
6240
6241
|
} catch {
|
|
@@ -6242,7 +6243,7 @@ var Ja = { exports: {} };
|
|
|
6242
6243
|
}
|
|
6243
6244
|
}
|
|
6244
6245
|
}
|
|
6245
|
-
class Te extends
|
|
6246
|
+
class Te extends ut {
|
|
6246
6247
|
constructor(i, a) {
|
|
6247
6248
|
super(), this.state = "initialized", this.connection = null, this.key = i, this.options = a, this.timeline = this.options.timeline, this.usingTLS = this.options.useTLS, this.errorCallbacks = this.buildErrorCallbacks(), this.connectionCallbacks = this.buildConnectionCallbacks(this.errorCallbacks), this.handshakeCallbacks = this.buildHandshakeCallbacks(this.errorCallbacks);
|
|
6248
6249
|
var f = q.getNetwork();
|
|
@@ -6766,7 +6767,7 @@ var Ja = { exports: {} };
|
|
|
6766
6767
|
}
|
|
6767
6768
|
};
|
|
6768
6769
|
const Gc = Bc, Wc = 256 * 1024;
|
|
6769
|
-
class Jc extends
|
|
6770
|
+
class Jc extends ut {
|
|
6770
6771
|
constructor(i, a, f) {
|
|
6771
6772
|
super(), this.hooks = i, this.method = a, this.url = f;
|
|
6772
6773
|
}
|
|
@@ -6995,7 +6996,7 @@ var Ja = { exports: {} };
|
|
|
6995
6996
|
ScriptReceivers: h,
|
|
6996
6997
|
DependenciesReceivers: w,
|
|
6997
6998
|
getDefaultStrategy: Fc,
|
|
6998
|
-
Transports:
|
|
6999
|
+
Transports: dt,
|
|
6999
7000
|
transportConnectionInitializer: Hc,
|
|
7000
7001
|
HTTPFactory: Wi,
|
|
7001
7002
|
TimelineTransport: Mt,
|
|
@@ -7315,7 +7316,7 @@ var Ja = { exports: {} };
|
|
|
7315
7316
|
const a = Al(l, i);
|
|
7316
7317
|
return Vi(a) ? a.customHandler : _l(a);
|
|
7317
7318
|
}
|
|
7318
|
-
class Pl extends
|
|
7319
|
+
class Pl extends ut {
|
|
7319
7320
|
constructor(i) {
|
|
7320
7321
|
super(function(a, f) {
|
|
7321
7322
|
ae.debug(`No callbacks on watchlist events for ${a}`);
|
|
@@ -7340,7 +7341,7 @@ var Ja = { exports: {} };
|
|
|
7340
7341
|
}), resolve: l, reject: i };
|
|
7341
7342
|
}
|
|
7342
7343
|
const zl = Rl;
|
|
7343
|
-
class Ll extends
|
|
7344
|
+
class Ll extends ut {
|
|
7344
7345
|
constructor(i) {
|
|
7345
7346
|
super(function(a, f) {
|
|
7346
7347
|
ae.debug("No callbacks on user for " + a);
|
|
@@ -7415,7 +7416,7 @@ var Ja = { exports: {} };
|
|
|
7415
7416
|
}));
|
|
7416
7417
|
}
|
|
7417
7418
|
constructor(i, a) {
|
|
7418
|
-
Il(i), gl(a), this.key = i, this.options = a, this.config = Xi(this.options, this), this.channels = Pt.createChannels(), this.global_emitter = new
|
|
7419
|
+
Il(i), gl(a), this.key = i, this.options = a, this.config = Xi(this.options, this), this.channels = Pt.createChannels(), this.global_emitter = new ut(), this.sessionID = q.randomInt(1e9), this.timeline = new ul(this.key, this.sessionID, {
|
|
7419
7420
|
cluster: this.config.cluster,
|
|
7420
7421
|
features: ze.getClientFeatures(),
|
|
7421
7422
|
params: this.config.timelineParams || {},
|
|
@@ -7551,7 +7552,7 @@ const _g = /* @__PURE__ */ bg(kg), Vr = {
|
|
|
7551
7552
|
TASK_INTERACTION_ANSWERED: "task:interaction:answered",
|
|
7552
7553
|
TASK_BROWSER_COMMAND_CREATED: "task:browser-command:created"
|
|
7553
7554
|
};
|
|
7554
|
-
let
|
|
7555
|
+
let mt = null, xn = null;
|
|
7555
7556
|
async function vg(e) {
|
|
7556
7557
|
return xn || (xn = (async () => {
|
|
7557
7558
|
const t = e.backendUrl.replace(/\/+$/, ""), n = await fetch(`${t}/api/settings`, {
|
|
@@ -7559,7 +7560,7 @@ async function vg(e) {
|
|
|
7559
7560
|
});
|
|
7560
7561
|
if (!n.ok) throw new Error(`Failed to fetch settings: HTTP ${n.status}`);
|
|
7561
7562
|
const r = await n.json();
|
|
7562
|
-
|
|
7563
|
+
mt = new _g(r.pusher.key, {
|
|
7563
7564
|
cluster: r.pusher.cluster || "local",
|
|
7564
7565
|
forceTLS: !0,
|
|
7565
7566
|
wsHost: r.pusher.wsHost || void 0,
|
|
@@ -7584,21 +7585,21 @@ async function vg(e) {
|
|
|
7584
7585
|
}), xn);
|
|
7585
7586
|
}
|
|
7586
7587
|
function yg(e) {
|
|
7587
|
-
if (!e || !
|
|
7588
|
+
if (!e || !mt) return null;
|
|
7588
7589
|
let t = !1;
|
|
7589
7590
|
const n = ({ current: r }) => {
|
|
7590
7591
|
r === "connected" && t ? (t = !1, e()) : r !== "connected" && (t = !0);
|
|
7591
7592
|
};
|
|
7592
|
-
return
|
|
7593
|
+
return mt.connection.bind("state_change", n), () => mt == null ? void 0 : mt.connection.unbind("state_change", n);
|
|
7593
7594
|
}
|
|
7594
7595
|
async function wg(e, t, n) {
|
|
7595
|
-
if (await vg(e), !
|
|
7596
|
+
if (await vg(e), !mt) return () => {
|
|
7596
7597
|
};
|
|
7597
|
-
const r =
|
|
7598
|
+
const r = mt.subscribe(`private-task-${t}`);
|
|
7598
7599
|
n.onStatusUpdate && r.bind(Vr.TASK_STATUS_UPDATED, n.onStatusUpdate), n.onInteractionCreated && r.bind(Vr.TASK_INTERACTION_CREATED, n.onInteractionCreated), n.onInteractionAnswered && r.bind(Vr.TASK_INTERACTION_ANSWERED, n.onInteractionAnswered), n.onBrowserCommandCreated && r.bind(Vr.TASK_BROWSER_COMMAND_CREATED, n.onBrowserCommandCreated);
|
|
7599
7600
|
const o = yg(n.onReconnect);
|
|
7600
7601
|
return () => {
|
|
7601
|
-
r.unbind_all(),
|
|
7602
|
+
r.unbind_all(), mt == null || mt.unsubscribe(`private-task-${t}`), o == null || o();
|
|
7602
7603
|
};
|
|
7603
7604
|
}
|
|
7604
7605
|
const yi = "ap-sdk-active-automation";
|
|
@@ -8115,7 +8116,7 @@ ${w}`, o = o.substring(0, o.length - _.text.length) + N.text;
|
|
|
8115
8116
|
return { type: "text", raw: t[0], text: t[0], escaped: n };
|
|
8116
8117
|
}
|
|
8117
8118
|
}
|
|
8118
|
-
},
|
|
8119
|
+
}, ft = class ai {
|
|
8119
8120
|
constructor(t) {
|
|
8120
8121
|
re(this, "tokens");
|
|
8121
8122
|
re(this, "options");
|
|
@@ -8485,7 +8486,7 @@ ${e}</tr>
|
|
|
8485
8486
|
checkbox({ raw: e }) {
|
|
8486
8487
|
return e;
|
|
8487
8488
|
}
|
|
8488
|
-
},
|
|
8489
|
+
}, gt = class ci {
|
|
8489
8490
|
constructor(t) {
|
|
8490
8491
|
re(this, "options");
|
|
8491
8492
|
re(this, "renderer");
|
|
@@ -8657,10 +8658,10 @@ ${e}</tr>
|
|
|
8657
8658
|
return e;
|
|
8658
8659
|
}
|
|
8659
8660
|
provideLexer(e = this.block) {
|
|
8660
|
-
return e ?
|
|
8661
|
+
return e ? ft.lex : ft.lexInline;
|
|
8661
8662
|
}
|
|
8662
8663
|
provideParser(e = this.block) {
|
|
8663
|
-
return e ?
|
|
8664
|
+
return e ? gt.parse : gt.parseInline;
|
|
8664
8665
|
}
|
|
8665
8666
|
}, re(no, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), re(no, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), no), xm = class {
|
|
8666
8667
|
constructor(...e) {
|
|
@@ -8668,10 +8669,10 @@ ${e}</tr>
|
|
|
8668
8669
|
re(this, "options", this.setOptions);
|
|
8669
8670
|
re(this, "parse", this.parseMarkdown(!0));
|
|
8670
8671
|
re(this, "parseInline", this.parseMarkdown(!1));
|
|
8671
|
-
re(this, "Parser",
|
|
8672
|
+
re(this, "Parser", gt);
|
|
8672
8673
|
re(this, "Renderer", vo);
|
|
8673
8674
|
re(this, "TextRenderer", zi);
|
|
8674
|
-
re(this, "Lexer",
|
|
8675
|
+
re(this, "Lexer", ft);
|
|
8675
8676
|
re(this, "Tokenizer", _o);
|
|
8676
8677
|
re(this, "Hooks", hr);
|
|
8677
8678
|
this.use(...e);
|
|
@@ -8784,10 +8785,10 @@ ${e}</tr>
|
|
|
8784
8785
|
return this.defaults = { ...this.defaults, ...e }, this;
|
|
8785
8786
|
}
|
|
8786
8787
|
lexer(e, t) {
|
|
8787
|
-
return
|
|
8788
|
+
return ft.lex(e, t ?? this.defaults);
|
|
8788
8789
|
}
|
|
8789
8790
|
parser(e, t) {
|
|
8790
|
-
return
|
|
8791
|
+
return gt.parse(e, t ?? this.defaults);
|
|
8791
8792
|
}
|
|
8792
8793
|
parseMarkdown(e) {
|
|
8793
8794
|
return (t, n) => {
|
|
@@ -8796,16 +8797,16 @@ ${e}</tr>
|
|
|
8796
8797
|
if (typeof t > "u" || t === null) return s(new Error("marked(): input parameter is undefined or null"));
|
|
8797
8798
|
if (typeof t != "string") return s(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
8798
8799
|
if (o.hooks && (o.hooks.options = o, o.hooks.block = e), o.async) return (async () => {
|
|
8799
|
-
let c = o.hooks ? await o.hooks.preprocess(t) : t, u = await (o.hooks ? await o.hooks.provideLexer(e) : e ?
|
|
8800
|
+
let c = o.hooks ? await o.hooks.preprocess(t) : t, u = await (o.hooks ? await o.hooks.provideLexer(e) : e ? ft.lex : ft.lexInline)(c, o), d = o.hooks ? await o.hooks.processAllTokens(u) : u;
|
|
8800
8801
|
o.walkTokens && await Promise.all(this.walkTokens(d, o.walkTokens));
|
|
8801
|
-
let p = await (o.hooks ? await o.hooks.provideParser(e) : e ?
|
|
8802
|
+
let p = await (o.hooks ? await o.hooks.provideParser(e) : e ? gt.parse : gt.parseInline)(d, o);
|
|
8802
8803
|
return o.hooks ? await o.hooks.postprocess(p) : p;
|
|
8803
8804
|
})().catch(s);
|
|
8804
8805
|
try {
|
|
8805
8806
|
o.hooks && (t = o.hooks.preprocess(t));
|
|
8806
|
-
let c = (o.hooks ? o.hooks.provideLexer(e) : e ?
|
|
8807
|
+
let c = (o.hooks ? o.hooks.provideLexer(e) : e ? ft.lex : ft.lexInline)(t, o);
|
|
8807
8808
|
o.hooks && (c = o.hooks.processAllTokens(c)), o.walkTokens && this.walkTokens(c, o.walkTokens);
|
|
8808
|
-
let u = (o.hooks ? o.hooks.provideParser(e) : e ?
|
|
8809
|
+
let u = (o.hooks ? o.hooks.provideParser(e) : e ? gt.parse : gt.parseInline)(c, o);
|
|
8809
8810
|
return o.hooks && (u = o.hooks.postprocess(u)), u;
|
|
8810
8811
|
} catch (c) {
|
|
8811
8812
|
return s(c);
|
|
@@ -8840,12 +8841,12 @@ ie.walkTokens = function(e, t) {
|
|
|
8840
8841
|
return un.walkTokens(e, t);
|
|
8841
8842
|
};
|
|
8842
8843
|
ie.parseInline = un.parseInline;
|
|
8843
|
-
ie.Parser =
|
|
8844
|
-
ie.parser =
|
|
8844
|
+
ie.Parser = gt;
|
|
8845
|
+
ie.parser = gt.parse;
|
|
8845
8846
|
ie.Renderer = vo;
|
|
8846
8847
|
ie.TextRenderer = zi;
|
|
8847
|
-
ie.Lexer =
|
|
8848
|
-
ie.lexer =
|
|
8848
|
+
ie.Lexer = ft;
|
|
8849
|
+
ie.lexer = ft.lex;
|
|
8849
8850
|
ie.Tokenizer = _o;
|
|
8850
8851
|
ie.Hooks = hr;
|
|
8851
8852
|
ie.parse = ie;
|
|
@@ -8853,8 +8854,8 @@ ie.options;
|
|
|
8853
8854
|
ie.setOptions;
|
|
8854
8855
|
ie.walkTokens;
|
|
8855
8856
|
ie.parseInline;
|
|
8856
|
-
|
|
8857
|
-
|
|
8857
|
+
gt.parse;
|
|
8858
|
+
ft.lex;
|
|
8858
8859
|
/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
|
|
8859
8860
|
const {
|
|
8860
8861
|
entries: cc,
|
|
@@ -8865,7 +8866,7 @@ const {
|
|
|
8865
8866
|
} = Object;
|
|
8866
8867
|
let {
|
|
8867
8868
|
freeze: Be,
|
|
8868
|
-
seal:
|
|
8869
|
+
seal: st,
|
|
8869
8870
|
create: li
|
|
8870
8871
|
} = Object, {
|
|
8871
8872
|
apply: ui,
|
|
@@ -8874,7 +8875,7 @@ let {
|
|
|
8874
8875
|
Be || (Be = function(t) {
|
|
8875
8876
|
return t;
|
|
8876
8877
|
});
|
|
8877
|
-
|
|
8878
|
+
st || (st = function(t) {
|
|
8878
8879
|
return t;
|
|
8879
8880
|
});
|
|
8880
8881
|
ui || (ui = function(t, n) {
|
|
@@ -8887,7 +8888,7 @@ di || (di = function(t) {
|
|
|
8887
8888
|
r[o - 1] = arguments[o];
|
|
8888
8889
|
return new t(...r);
|
|
8889
8890
|
});
|
|
8890
|
-
const Qr = Ge(Array.prototype.forEach), Cm = Ge(Array.prototype.lastIndexOf), Gs = Ge(Array.prototype.pop), sr = Ge(Array.prototype.push), Pm = Ge(Array.prototype.splice), oo = Ge(String.prototype.toLowerCase), Wo = Ge(String.prototype.toString), Jo = Ge(String.prototype.match), ar = Ge(String.prototype.replace), Rm = Ge(String.prototype.indexOf), zm = Ge(String.prototype.trim),
|
|
8891
|
+
const Qr = Ge(Array.prototype.forEach), Cm = Ge(Array.prototype.lastIndexOf), Gs = Ge(Array.prototype.pop), sr = Ge(Array.prototype.push), Pm = Ge(Array.prototype.splice), oo = Ge(String.prototype.toLowerCase), Wo = Ge(String.prototype.toString), Jo = Ge(String.prototype.match), ar = Ge(String.prototype.replace), Rm = Ge(String.prototype.indexOf), zm = Ge(String.prototype.trim), ht = Ge(Object.prototype.hasOwnProperty), qe = Ge(RegExp.prototype.test), cr = Lm(TypeError);
|
|
8891
8892
|
function Ge(e) {
|
|
8892
8893
|
return function(t) {
|
|
8893
8894
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -8919,13 +8920,13 @@ function B(e, t) {
|
|
|
8919
8920
|
}
|
|
8920
8921
|
function Im(e) {
|
|
8921
8922
|
for (let t = 0; t < e.length; t++)
|
|
8922
|
-
|
|
8923
|
+
ht(e, t) || (e[t] = null);
|
|
8923
8924
|
return e;
|
|
8924
8925
|
}
|
|
8925
8926
|
function vt(e) {
|
|
8926
8927
|
const t = li(null);
|
|
8927
8928
|
for (const [n, r] of cc(e))
|
|
8928
|
-
|
|
8929
|
+
ht(e, n) && (Array.isArray(r) ? t[n] = Im(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = vt(r) : t[n] = r);
|
|
8929
8930
|
return t;
|
|
8930
8931
|
}
|
|
8931
8932
|
function lr(e, t) {
|
|
@@ -8944,13 +8945,13 @@ function lr(e, t) {
|
|
|
8944
8945
|
}
|
|
8945
8946
|
return n;
|
|
8946
8947
|
}
|
|
8947
|
-
const Ws = Be(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Xo = Be(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Vo = Be(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), $m = Be(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Yo = Be(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Nm = Be(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Js = Be(["#text"]), Xs = Be(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Ko = Be(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Vs = Be(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), eo = Be(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Om =
|
|
8948
|
+
const Ws = Be(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Xo = Be(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Vo = Be(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), $m = Be(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Yo = Be(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Nm = Be(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Js = Be(["#text"]), Xs = Be(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Ko = Be(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Vs = Be(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), eo = Be(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Om = st(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Dm = st(/<%[\w\W]*|[\w\W]*%>/gm), Mm = st(/\$\{[\w\W]*/gm), Um = st(/^data-[\-\w.\u00B7-\uFFFF]+$/), jm = st(/^aria-[\-\w]+$/), lc = st(
|
|
8948
8949
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
8949
8950
|
// eslint-disable-line no-useless-escape
|
|
8950
|
-
), Zm =
|
|
8951
|
+
), Zm = st(/^(?:\w+script|data):/i), qm = st(
|
|
8951
8952
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
8952
8953
|
// eslint-disable-line no-control-regex
|
|
8953
|
-
), uc =
|
|
8954
|
+
), uc = st(/^html$/i), Fm = st(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
8954
8955
|
var Ys = /* @__PURE__ */ Object.freeze({
|
|
8955
8956
|
__proto__: null,
|
|
8956
8957
|
ARIA_ATTR: jm,
|
|
@@ -9050,7 +9051,7 @@ function dc() {
|
|
|
9050
9051
|
CUSTOM_ELEMENT: bt
|
|
9051
9052
|
} = Ys;
|
|
9052
9053
|
let {
|
|
9053
|
-
IS_ALLOWED_URI:
|
|
9054
|
+
IS_ALLOWED_URI: ct
|
|
9054
9055
|
} = Ys, ge = null;
|
|
9055
9056
|
const Se = B({}, [...Ws, ...Xo, ...Vo, ...Yo, ...Js]);
|
|
9056
9057
|
let W = null;
|
|
@@ -9096,13 +9097,13 @@ function dc() {
|
|
|
9096
9097
|
let ae = null;
|
|
9097
9098
|
const zr = B({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
9098
9099
|
let Xn = null;
|
|
9099
|
-
const Lr = B({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), kn = "http://www.w3.org/1998/Math/MathML", _n = "http://www.w3.org/2000/svg",
|
|
9100
|
-
let Mt =
|
|
9101
|
-
const $o = B({}, [kn, _n,
|
|
9100
|
+
const Lr = B({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), kn = "http://www.w3.org/1998/Math/MathML", _n = "http://www.w3.org/2000/svg", lt = "http://www.w3.org/1999/xhtml";
|
|
9101
|
+
let Mt = lt, Qt = !1, en = null;
|
|
9102
|
+
const $o = B({}, [kn, _n, lt], Wo);
|
|
9102
9103
|
let vn = B({}, ["mi", "mo", "mn", "ms", "mtext"]), yn = B({}, ["annotation-xml"]);
|
|
9103
9104
|
const No = B({}, ["title", "style", "font", "a", "script"]);
|
|
9104
9105
|
let At = null;
|
|
9105
|
-
const
|
|
9106
|
+
const ut = ["application/xhtml+xml", "text/html"], Oo = "text/html";
|
|
9106
9107
|
let ce = null, Ut = null;
|
|
9107
9108
|
const Ir = n.createElement("form"), Vn = function(b) {
|
|
9108
9109
|
return b instanceof RegExp || b instanceof Function;
|
|
@@ -9110,7 +9111,7 @@ function dc() {
|
|
|
9110
9111
|
let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9111
9112
|
if (!(Ut && Ut === b)) {
|
|
9112
9113
|
if ((!b || typeof b != "object") && (b = {}), b = vt(b), At = // eslint-disable-next-line unicorn/prefer-includes
|
|
9113
|
-
|
|
9114
|
+
ut.indexOf(b.PARSER_MEDIA_TYPE) === -1 ? Oo : b.PARSER_MEDIA_TYPE, ce = At === "application/xhtml+xml" ? Wo : oo, ge = ht(b, "ALLOWED_TAGS") ? B({}, b.ALLOWED_TAGS, ce) : Se, W = ht(b, "ALLOWED_ATTR") ? B({}, b.ALLOWED_ATTR, ce) : Me, en = ht(b, "ALLOWED_NAMESPACES") ? B({}, b.ALLOWED_NAMESPACES, Wo) : $o, Xn = ht(b, "ADD_URI_SAFE_ATTR") ? B(vt(Lr), b.ADD_URI_SAFE_ATTR, ce) : Lr, ae = ht(b, "ADD_DATA_URI_TAGS") ? B(vt(zr), b.ADD_DATA_URI_TAGS, ce) : zr, Ze = ht(b, "FORBID_CONTENTS") ? B({}, b.FORBID_CONTENTS, ce) : Jn, Ue = ht(b, "FORBID_TAGS") ? B({}, b.FORBID_TAGS, ce) : vt({}), Xe = ht(b, "FORBID_ATTR") ? B({}, b.FORBID_ATTR, ce) : vt({}), Dt = ht(b, "USE_PROFILES") ? b.USE_PROFILES : !1, _e = b.ALLOW_ARIA_ATTR !== !1, Ee = b.ALLOW_DATA_ATTR !== !1, Pr = b.ALLOW_UNKNOWN_PROTOCOLS || !1, Bn = b.ALLOW_SELF_CLOSE_IN_ATTR !== !1, $e = b.SAFE_FOR_TEMPLATES || !1, Xt = b.SAFE_FOR_XML !== !1, Tt = b.WHOLE_DOCUMENT || !1, Ot = b.RETURN_DOM || !1, Vt = b.RETURN_DOM_FRAGMENT || !1, Yt = b.RETURN_TRUSTED_TYPE || !1, bn = b.FORCE_BODY || !1, Rr = b.SANITIZE_DOM !== !1, Gn = b.SANITIZE_NAMED_PROPS || !1, Wn = b.KEEP_CONTENT !== !1, Kt = b.IN_PLACE || !1, ct = b.ALLOWED_URI_REGEXP || lc, Mt = b.NAMESPACE || lt, vn = b.MATHML_TEXT_INTEGRATION_POINTS || vn, yn = b.HTML_INTEGRATION_POINTS || yn, J = b.CUSTOM_ELEMENT_HANDLING || {}, b.CUSTOM_ELEMENT_HANDLING && Vn(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (J.tagNameCheck = b.CUSTOM_ELEMENT_HANDLING.tagNameCheck), b.CUSTOM_ELEMENT_HANDLING && Vn(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (J.attributeNameCheck = b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), b.CUSTOM_ELEMENT_HANDLING && typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (J.allowCustomizedBuiltInElements = b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), $e && (Ee = !1), Vt && (Ot = !0), Dt && (ge = B({}, Js), W = [], Dt.html === !0 && (B(ge, Ws), B(W, Xs)), Dt.svg === !0 && (B(ge, Xo), B(W, Ko), B(W, eo)), Dt.svgFilters === !0 && (B(ge, Vo), B(W, Ko), B(W, eo)), Dt.mathMl === !0 && (B(ge, Yo), B(W, Vs), B(W, eo))), b.ADD_TAGS && (typeof b.ADD_TAGS == "function" ? je.tagCheck = b.ADD_TAGS : (ge === Se && (ge = vt(ge)), B(ge, b.ADD_TAGS, ce))), b.ADD_ATTR && (typeof b.ADD_ATTR == "function" ? je.attributeCheck = b.ADD_ATTR : (W === Me && (W = vt(W)), B(W, b.ADD_ATTR, ce))), b.ADD_URI_SAFE_ATTR && B(Xn, b.ADD_URI_SAFE_ATTR, ce), b.FORBID_CONTENTS && (Ze === Jn && (Ze = vt(Ze)), B(Ze, b.FORBID_CONTENTS, ce)), b.ADD_FORBID_CONTENTS && (Ze === Jn && (Ze = vt(Ze)), B(Ze, b.ADD_FORBID_CONTENTS, ce)), Wn && (ge["#text"] = !0), Tt && B(ge, ["html", "head", "body"]), ge.table && (B(ge, ["tbody"]), delete Ue.tbody), b.TRUSTED_TYPES_POLICY) {
|
|
9114
9115
|
if (typeof b.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
9115
9116
|
throw cr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
9116
9117
|
if (typeof b.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -9127,7 +9128,7 @@ function dc() {
|
|
|
9127
9128
|
tagName: "template"
|
|
9128
9129
|
});
|
|
9129
9130
|
const z = oo(b.tagName), ne = oo(T.tagName);
|
|
9130
|
-
return en[b.namespaceURI] ? b.namespaceURI === _n ? T.namespaceURI ===
|
|
9131
|
+
return en[b.namespaceURI] ? b.namespaceURI === _n ? T.namespaceURI === lt ? z === "svg" : T.namespaceURI === kn ? z === "svg" && (ne === "annotation-xml" || vn[ne]) : !!Yn[z] : b.namespaceURI === kn ? T.namespaceURI === lt ? z === "math" : T.namespaceURI === _n ? z === "math" && yn[ne] : !!$r[z] : b.namespaceURI === lt ? T.namespaceURI === _n && !yn[ne] || T.namespaceURI === kn && !vn[ne] ? !1 : !$r[z] && (No[z] || !Yn[z]) : !!(At === "application/xhtml+xml" && en[b.namespaceURI]) : !1;
|
|
9131
9132
|
}, Qe = function(b) {
|
|
9132
9133
|
sr(t.removed, {
|
|
9133
9134
|
element: b
|
|
@@ -9168,9 +9169,9 @@ function dc() {
|
|
|
9168
9169
|
const ve = Jo(b, /^[\r\n\t ]+/);
|
|
9169
9170
|
z = ve && ve[0];
|
|
9170
9171
|
}
|
|
9171
|
-
At === "application/xhtml+xml" && Mt ===
|
|
9172
|
+
At === "application/xhtml+xml" && Mt === lt && (b = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + b + "</body></html>");
|
|
9172
9173
|
const ne = S ? S.createHTML(b) : b;
|
|
9173
|
-
if (Mt ===
|
|
9174
|
+
if (Mt === lt)
|
|
9174
9175
|
try {
|
|
9175
9176
|
T = new m().parseFromString(ne, At);
|
|
9176
9177
|
} catch {
|
|
@@ -9183,7 +9184,7 @@ function dc() {
|
|
|
9183
9184
|
}
|
|
9184
9185
|
}
|
|
9185
9186
|
const Ae = T.body || T.documentElement;
|
|
9186
|
-
return b && z && Ae.insertBefore(n.createTextNode(z), Ae.childNodes[0] || null), Mt ===
|
|
9187
|
+
return b && z && Ae.insertBefore(n.createTextNode(z), Ae.childNodes[0] || null), Mt === lt ? Pe.call(T, Tt ? "html" : "body")[0] : Tt ? T.documentElement : Ae;
|
|
9187
9188
|
}, Kn = function(b) {
|
|
9188
9189
|
return se.call(
|
|
9189
9190
|
b.ownerDocument || b,
|
|
@@ -9197,17 +9198,17 @@ function dc() {
|
|
|
9197
9198
|
}, Or = function(b) {
|
|
9198
9199
|
return typeof u == "function" && b instanceof u;
|
|
9199
9200
|
};
|
|
9200
|
-
function
|
|
9201
|
+
function dt(O, b, T) {
|
|
9201
9202
|
Qr(O, (z) => {
|
|
9202
9203
|
z.call(t, b, T, Ut);
|
|
9203
9204
|
});
|
|
9204
9205
|
}
|
|
9205
9206
|
const Dr = function(b) {
|
|
9206
9207
|
let T = null;
|
|
9207
|
-
if (
|
|
9208
|
+
if (dt(V.beforeSanitizeElements, b, null), Qn(b))
|
|
9208
9209
|
return Qe(b), !0;
|
|
9209
9210
|
const z = ce(b.nodeName);
|
|
9210
|
-
if (
|
|
9211
|
+
if (dt(V.uponSanitizeElement, b, {
|
|
9211
9212
|
tagName: z,
|
|
9212
9213
|
allowedTags: ge
|
|
9213
9214
|
}), Xt && b.hasChildNodes() && !Or(b.firstElementChild) && qe(/<[/\w!]/g, b.innerHTML) && qe(/<[/\w!]/g, b.textContent) || b.nodeType === ur.progressingInstruction || Xt && b.nodeType === ur.comment && qe(/<[/\w]/g, b.data))
|
|
@@ -9220,8 +9221,8 @@ function dc() {
|
|
|
9220
9221
|
if (Ae && ne) {
|
|
9221
9222
|
const ve = Ae.length;
|
|
9222
9223
|
for (let Ne = ve - 1; Ne >= 0; --Ne) {
|
|
9223
|
-
const
|
|
9224
|
-
|
|
9224
|
+
const pt = P(Ae[Ne], !0);
|
|
9225
|
+
pt.__removalCount = (b.__removalCount || 0) + 1, ne.insertBefore(pt, te(b));
|
|
9225
9226
|
}
|
|
9226
9227
|
}
|
|
9227
9228
|
}
|
|
@@ -9231,7 +9232,7 @@ function dc() {
|
|
|
9231
9232
|
T = ar(T, ne, " ");
|
|
9232
9233
|
}), b.textContent !== T && (sr(t.removed, {
|
|
9233
9234
|
element: b.cloneNode()
|
|
9234
|
-
}), b.textContent = T)),
|
|
9235
|
+
}), b.textContent = T)), dt(V.afterSanitizeElements, b, null), !1);
|
|
9235
9236
|
}, Mr = function(b, T, z) {
|
|
9236
9237
|
if (Rr && (T === "id" || T === "name") && (z in n || z in Ir))
|
|
9237
9238
|
return !1;
|
|
@@ -9248,7 +9249,7 @@ function dc() {
|
|
|
9248
9249
|
T === "is" && J.allowCustomizedBuiltInElements && (J.tagNameCheck instanceof RegExp && qe(J.tagNameCheck, z) || J.tagNameCheck instanceof Function && J.tagNameCheck(z)))
|
|
9249
9250
|
) return !1;
|
|
9250
9251
|
} else if (!Xn[T]) {
|
|
9251
|
-
if (!qe(
|
|
9252
|
+
if (!qe(ct, ar(z, Ie, ""))) {
|
|
9252
9253
|
if (!((T === "src" || T === "xlink:href" || T === "href") && b !== "script" && Rm(z, "data:") === 0 && ae[b])) {
|
|
9253
9254
|
if (!(Pr && !qe(Re, ar(z, Ie, "")))) {
|
|
9254
9255
|
if (z)
|
|
@@ -9264,7 +9265,7 @@ function dc() {
|
|
|
9264
9265
|
}, Ur = function(b) {
|
|
9265
9266
|
return b !== "annotation-xml" && Jo(b, bt);
|
|
9266
9267
|
}, er = function(b) {
|
|
9267
|
-
|
|
9268
|
+
dt(V.beforeSanitizeAttributes, b, null);
|
|
9268
9269
|
const {
|
|
9269
9270
|
attributes: T
|
|
9270
9271
|
} = b;
|
|
@@ -9282,10 +9283,10 @@ function dc() {
|
|
|
9282
9283
|
const Ae = T[ne], {
|
|
9283
9284
|
name: ve,
|
|
9284
9285
|
namespaceURI: Ne,
|
|
9285
|
-
value:
|
|
9286
|
-
} = Ae, kt = ce(ve), tr =
|
|
9286
|
+
value: pt
|
|
9287
|
+
} = Ae, kt = ce(ve), tr = pt;
|
|
9287
9288
|
let Te = ve === "value" ? tr : zm(tr);
|
|
9288
|
-
if (z.attrName = kt, z.attrValue = Te, z.keepAttr = !0, z.forceKeepAttr = void 0,
|
|
9289
|
+
if (z.attrName = kt, z.attrValue = Te, z.keepAttr = !0, z.forceKeepAttr = void 0, dt(V.uponSanitizeAttribute, b, z), Te = z.attrValue, Gn && (kt === "id" || kt === "name") && (et(ve, b), Te = Io + Te), Xt && qe(/((--!?|])>)|<\/(style|title|textarea)/i, Te)) {
|
|
9289
9290
|
et(ve, b);
|
|
9290
9291
|
continue;
|
|
9291
9292
|
}
|
|
@@ -9329,13 +9330,13 @@ function dc() {
|
|
|
9329
9330
|
et(ve, b);
|
|
9330
9331
|
}
|
|
9331
9332
|
}
|
|
9332
|
-
|
|
9333
|
+
dt(V.afterSanitizeAttributes, b, null);
|
|
9333
9334
|
}, Ct = function O(b) {
|
|
9334
9335
|
let T = null;
|
|
9335
9336
|
const z = Kn(b);
|
|
9336
|
-
for (
|
|
9337
|
-
|
|
9338
|
-
|
|
9337
|
+
for (dt(V.beforeSanitizeShadowDOM, b, null); T = z.nextNode(); )
|
|
9338
|
+
dt(V.uponSanitizeShadowNode, T, null), Dr(T), er(T), T.content instanceof s && O(T.content);
|
|
9339
|
+
dt(V.afterSanitizeShadowDOM, b, null);
|
|
9339
9340
|
};
|
|
9340
9341
|
return t.sanitize = function(O) {
|
|
9341
9342
|
let b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, T = null, z = null, ne = null, Ae = null;
|
|
@@ -9349,8 +9350,8 @@ function dc() {
|
|
|
9349
9350
|
return O;
|
|
9350
9351
|
if (Et || wn(b), t.removed = [], typeof O == "string" && (Kt = !1), Kt) {
|
|
9351
9352
|
if (O.nodeName) {
|
|
9352
|
-
const
|
|
9353
|
-
if (!ge[
|
|
9353
|
+
const pt = ce(O.nodeName);
|
|
9354
|
+
if (!ge[pt] || Ue[pt])
|
|
9354
9355
|
throw cr("root node is forbidden and cannot be sanitized in-place");
|
|
9355
9356
|
}
|
|
9356
9357
|
} else if (O instanceof u)
|
|
@@ -9378,8 +9379,8 @@ function dc() {
|
|
|
9378
9379
|
}
|
|
9379
9380
|
let Ne = Tt ? T.outerHTML : T.innerHTML;
|
|
9380
9381
|
return Tt && ge["!doctype"] && T.ownerDocument && T.ownerDocument.doctype && T.ownerDocument.doctype.name && qe(uc, T.ownerDocument.doctype.name) && (Ne = "<!DOCTYPE " + T.ownerDocument.doctype.name + `>
|
|
9381
|
-
` + Ne), $e && Qr([fe, Je, Nt], (
|
|
9382
|
-
Ne = ar(Ne,
|
|
9382
|
+
` + Ne), $e && Qr([fe, Je, Nt], (pt) => {
|
|
9383
|
+
Ne = ar(Ne, pt, " ");
|
|
9383
9384
|
}), S && Yt ? S.createHTML(Ne) : Ne;
|
|
9384
9385
|
}, t.setConfig = function() {
|
|
9385
9386
|
let O = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -10136,10 +10137,10 @@ function xb(e, t, n, r, o, s, c, u, d) {
|
|
|
10136
10137
|
<div class="ap-sdk-pick-entry" data-pick-index="${Q}">
|
|
10137
10138
|
<div class="ap-sdk-pick-entry__header">
|
|
10138
10139
|
<span class="ap-sdk-pick-entry__number">${Q + 1}</span>
|
|
10139
|
-
<span class="ap-sdk-pick-entry__element" title="${
|
|
10140
|
+
<span class="ap-sdk-pick-entry__element" title="${ot(j.ctx.elementText ?? "")}">${ot(j.ctx.elementText || "(no text)")}</span>
|
|
10140
10141
|
<button class="ap-sdk-pick-entry__remove" data-ap-remove="${Q}" aria-label="Remove pick ${Q + 1}">×</button>
|
|
10141
10142
|
</div>
|
|
10142
|
-
<div class="ap-sdk-pick-entry__instruction">${
|
|
10143
|
+
<div class="ap-sdk-pick-entry__instruction">${ot(j.instruction)}</div>
|
|
10143
10144
|
</div>
|
|
10144
10145
|
`).join(""), x.querySelectorAll("[data-ap-remove]").forEach((j) => {
|
|
10145
10146
|
j.addEventListener("click", () => {
|
|
@@ -10203,12 +10204,12 @@ function xb(e, t, n, r, o, s, c, u, d) {
|
|
|
10203
10204
|
return;
|
|
10204
10205
|
}
|
|
10205
10206
|
p.submitting = !0, oa(F, !0), dr(te, null, ""), P.textContent = "Submitting…";
|
|
10206
|
-
const Ie = { backendUrl: j, token: Q }, bt = m.getOptions(),
|
|
10207
|
+
const Ie = { backendUrl: j, token: Q }, bt = m.getOptions(), ct = [...p.completedPicks, { ctx: p.currentCtx, instruction: Re }];
|
|
10207
10208
|
try {
|
|
10208
10209
|
let Se = r;
|
|
10209
10210
|
Se || (Se = await Ba(Ie, o), s({ backendUrl: j, token: Q }));
|
|
10210
10211
|
let W, Me, J;
|
|
10211
|
-
if (
|
|
10212
|
+
if (ct.length === 1)
|
|
10212
10213
|
if (p.captureType === "task")
|
|
10213
10214
|
W = (await ii(Ie, Se.id, Re, p.currentCtx, bt)).id, Me = "task", J = Re.slice(0, 120) || p.currentCtx.pageTitle || "Browser capture";
|
|
10214
10215
|
else if (p.captureType === "planning") {
|
|
@@ -10220,8 +10221,8 @@ ${p.currentCtx.innerTree}`), W = (await Is(Ie, Se.id, Xe, bt)).id, Me = "plannin
|
|
|
10220
10221
|
} else
|
|
10221
10222
|
W = (await Ls(Ie, Se.id, Re, p.currentCtx, bt)).id, Me = "automate", J = Re.slice(0, 120) || p.currentCtx.pageTitle || "Browser automation";
|
|
10222
10223
|
else {
|
|
10223
|
-
const Xe = Sb(
|
|
10224
|
-
p.captureType === "task" ? (W = (await ii(Ie, Se.id, Xe,
|
|
10224
|
+
const Xe = Sb(ct), je = ct[0].instruction.slice(0, 120) || ct[0].ctx.pageTitle || "Multi-element capture";
|
|
10225
|
+
p.captureType === "task" ? (W = (await ii(Ie, Se.id, Xe, ct[0].ctx, bt, je)).id, Me = "task", J = je) : p.captureType === "planning" ? (W = (await Is(Ie, Se.id, Xe, bt)).id, Me = "planning", J = je) : (W = (await Ls(Ie, Se.id, Xe, ct[0].ctx, bt, je)).id, Me = "automate", J = je);
|
|
10225
10226
|
}
|
|
10226
10227
|
if (db({
|
|
10227
10228
|
id: W,
|
|
@@ -10248,8 +10249,8 @@ ${p.currentCtx.innerTree}`), W = (await Is(Ie, Se.id, Xe, bt)).id, Me = "plannin
|
|
|
10248
10249
|
function ra(e) {
|
|
10249
10250
|
return `
|
|
10250
10251
|
<div class="ap-sdk-panel__context-label">Captured element</div>
|
|
10251
|
-
<div class="ap-sdk-panel__context-text" title="${
|
|
10252
|
-
${e.cssSelector ? `<div class="ap-sdk-panel__context-selector" title="${
|
|
10252
|
+
<div class="ap-sdk-panel__context-text" title="${ot(e.elementText ?? "")}">${ot(e.elementText || "(no text)")}</div>
|
|
10253
|
+
${e.cssSelector ? `<div class="ap-sdk-panel__context-selector" title="${ot(e.cssSelector)}">${ot(e.cssSelector)}</div>` : ""}
|
|
10253
10254
|
`;
|
|
10254
10255
|
}
|
|
10255
10256
|
function Sb(e) {
|
|
@@ -10282,13 +10283,13 @@ function Tb(e, t, n, r, o) {
|
|
|
10282
10283
|
<circle class="ap-sdk-success-check__circle" cx="24" cy="24" r="22"/>
|
|
10283
10284
|
<path class="ap-sdk-success-check__tick" d="M14 24l7 7 13-14"/>
|
|
10284
10285
|
</svg>
|
|
10285
|
-
<p class="ap-sdk-success-headline">${
|
|
10286
|
+
<p class="ap-sdk-success-headline">${ot(c)}</p>
|
|
10286
10287
|
<div class="ap-sdk-success-meta">
|
|
10287
|
-
<span class="ap-sdk-list-item__badge ap-sdk-list-item__badge--${t}">${
|
|
10288
|
-
<span class="ap-sdk-success-title" title="${
|
|
10288
|
+
<span class="ap-sdk-list-item__badge ap-sdk-list-item__badge--${t}">${ot(s)}</span>
|
|
10289
|
+
<span class="ap-sdk-success-title" title="${ot(n)}">${ot(d)}</span>
|
|
10289
10290
|
</div>
|
|
10290
10291
|
<div class="ap-sdk-success-actions">
|
|
10291
|
-
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-success-view>${
|
|
10292
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-success-view>${ot(u)}</button>
|
|
10292
10293
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost" data-ap-success-close>Close</button>
|
|
10293
10294
|
</div>
|
|
10294
10295
|
</div>
|
|
@@ -10301,7 +10302,7 @@ function oa(e, t) {
|
|
|
10301
10302
|
n.disabled = t;
|
|
10302
10303
|
});
|
|
10303
10304
|
}
|
|
10304
|
-
function
|
|
10305
|
+
function ot(e) {
|
|
10305
10306
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
10306
10307
|
}
|
|
10307
10308
|
let oe = null, wr = null;
|
|
@@ -10537,21 +10538,21 @@ function ei(e) {
|
|
|
10537
10538
|
function sa(e) {
|
|
10538
10539
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
10539
10540
|
}
|
|
10540
|
-
let
|
|
10541
|
+
let it = null, So = !1;
|
|
10541
10542
|
function Nb() {
|
|
10542
|
-
|
|
10543
|
+
it == null || it.disconnect(), Array.from(document.body.querySelectorAll(':scope > [data-ap-sdk="1"]')).forEach((e) => document.body.appendChild(e)), it && it.observe(document.body, { childList: !0 }), So = !1;
|
|
10543
10544
|
}
|
|
10544
10545
|
function Cc() {
|
|
10545
|
-
|
|
10546
|
+
it || (it = new MutationObserver((e) => {
|
|
10546
10547
|
!e.some(
|
|
10547
10548
|
(n) => Array.from(n.addedNodes).some(
|
|
10548
10549
|
(r) => r instanceof Element && r.getAttribute("data-ap-sdk") !== "1"
|
|
10549
10550
|
)
|
|
10550
10551
|
) || So || (So = !0, queueMicrotask(Nb));
|
|
10551
|
-
}),
|
|
10552
|
+
}), it.observe(document.body, { childList: !0 }));
|
|
10552
10553
|
}
|
|
10553
10554
|
function Ob() {
|
|
10554
|
-
|
|
10555
|
+
it == null || it.disconnect(), it = null, So = !1;
|
|
10555
10556
|
}
|
|
10556
10557
|
let H = null, To = null, Eo = null;
|
|
10557
10558
|
function ji(e, t) {
|