cocheck 0.0.0-stage → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +104 -2
- package/THIRD_PARTY_NOTICES.md +279 -0
- package/bin/cocheck.mjs +8 -0
- package/dist/agent-transcripts.js +541 -0
- package/dist/attribution/basis.js +31 -0
- package/dist/attribution/evidence.js +311 -0
- package/dist/attribution/hooks/cocheck-preload.cjs +254 -0
- package/dist/attribution/hooks/sitecustomize.py +245 -0
- package/dist/attribution/names.js +163 -0
- package/dist/attribution/reconstruct.js +128 -0
- package/dist/attribution/tag.js +246 -0
- package/dist/attribution/write-scope-win.js +615 -0
- package/dist/attribution/write-scope.js +1668 -0
- package/dist/build-info.json +1 -0
- package/dist/cli-main.js +8 -0
- package/dist/cli.js +193 -0
- package/dist/codex-config.js +107 -0
- package/dist/connector/after-gap.js +56 -0
- package/dist/connector/after-snapshot.js +244 -0
- package/dist/connector/before-snapshot.js +168 -0
- package/dist/connector/builtins.js +93 -0
- package/dist/connector/changes-v1.js +276 -0
- package/dist/connector/claimed-state.js +40 -0
- package/dist/connector/claimed.js +86 -0
- package/dist/connector/conformance.js +458 -0
- package/dist/connector/diff-object.js +81 -0
- package/dist/connector/diff-samples.js +64 -0
- package/dist/connector/diff.js +273 -0
- package/dist/connector/doc-level.js +20 -0
- package/dist/connector/enabled-types.js +87 -0
- package/dist/connector/export-view.js +13 -0
- package/dist/connector/file-capture.js +265 -0
- package/dist/connector/frozen.js +213 -0
- package/dist/connector/installed-manifests.js +72 -0
- package/dist/connector/installed-match.js +161 -0
- package/dist/connector/local-process.js +119 -0
- package/dist/connector/nothing-changed-rule.js +23 -0
- package/dist/connector/old-rows.js +66 -0
- package/dist/connector/png-pixels.js +4 -0
- package/dist/connector/registry.js +78 -0
- package/dist/connector/requires.js +30 -0
- package/dist/connector/row-doc.js +54 -0
- package/dist/connector/run-argv.js +25 -0
- package/dist/connector/runner.js +325 -0
- package/dist/connector/schema.js +242 -0
- package/dist/connector/subject.js +8 -0
- package/dist/connector/subjects.js +113 -0
- package/dist/connector/validate.js +200 -0
- package/dist/connector-auth.js +101 -0
- package/dist/connector-create.js +55 -0
- package/dist/connector-doctor.js +167 -0
- package/dist/connector-test-cli.js +627 -0
- package/dist/connector-types-cli.js +43 -0
- package/dist/connectors/microsoft-excel/cocheck-connector.json +13 -0
- package/dist/connectors/microsoft-excel/connector.mjs +11 -0
- package/dist/connectors/microsoft-powerpoint/cocheck-connector.json +13 -0
- package/dist/connectors/microsoft-powerpoint/connector.mjs +11 -0
- package/dist/connectors/microsoft-word/cocheck-connector.json +13 -0
- package/dist/connectors/microsoft-word/connector.mjs +11 -0
- package/dist/copies.js +151 -0
- package/dist/copilot-helpers.js +246 -0
- package/dist/coverage.js +277 -0
- package/dist/credit-guard.js +330 -0
- package/dist/display.js +78 -0
- package/dist/file-lock.js +145 -0
- package/dist/fingerprint.js +25 -0
- package/dist/formats/files/align.js +84 -0
- package/dist/formats/files/csv.js +78 -0
- package/dist/formats/files/layer.js +274 -0
- package/dist/formats/files/scan.js +86 -0
- package/dist/formats/files/textlike.js +21 -0
- package/dist/formats/layer.js +48 -0
- package/dist/helpers/pdfpages +0 -0
- package/dist/home-page.js +173 -0
- package/dist/home-perms.js +59 -0
- package/dist/hook-adapter.js +3415 -0
- package/dist/hook-cli.js +505 -0
- package/dist/hook-journal.js +147 -0
- package/dist/hook.js +25 -0
- package/dist/hosts/claude.js +250 -0
- package/dist/hosts/codex-bin-macos.js +2 -0
- package/dist/hosts/codex-bin.js +35 -0
- package/dist/hosts/codex-trust-probe.js +52 -0
- package/dist/hosts/codex-trust.js +46 -0
- package/dist/hosts/codex.js +355 -0
- package/dist/hosts/copilot.js +236 -0
- package/dist/hosts/index.js +52 -0
- package/dist/hosts/session-titles.js +327 -0
- package/dist/hosts/shared.js +31 -0
- package/dist/hosts/types.js +26 -0
- package/dist/html.js +4 -0
- package/dist/install.js +676 -0
- package/dist/items.js +105 -0
- package/dist/ledger.js +2097 -0
- package/dist/narration.js +202 -0
- package/dist/normalize.js +82 -0
- package/dist/office/connector/apps.js +34 -0
- package/dist/office/connector/docx/layer.js +247 -0
- package/dist/office/connector/docx/reader.js +284 -0
- package/dist/office/connector/excel/align.js +284 -0
- package/dist/office/connector/excel/answer.js +352 -0
- package/dist/office/connector/excel/diff.js +1310 -0
- package/dist/office/connector/excel/errors.js +44 -0
- package/dist/office/connector/excel/look.js +121 -0
- package/dist/office/connector/excel/print-boxes.js +432 -0
- package/dist/office/connector/excel/print-grid-previous.js +206 -0
- package/dist/office/connector/excel/print-setup.js +168 -0
- package/dist/office/connector/excel/workbook.js +374 -0
- package/dist/office/connector/export-driver.js +9 -0
- package/dist/office/connector/helpers/cocheck-screen +0 -0
- package/dist/office/connector/issues.js +31 -0
- package/dist/office/connector/mac-guard.js +16 -0
- package/dist/office/connector/main.js +23 -0
- package/dist/office/connector/nothing-changed.js +18 -0
- package/dist/office/connector/office-job.js +416 -0
- package/dist/office/connector/office-macos.js +473 -0
- package/dist/office/connector/office-win-export.js +107 -0
- package/dist/office/connector/office-win-lifecycle.js +194 -0
- package/dist/office/connector/office-win.js +209 -0
- package/dist/office/connector/office-win.ps1 +451 -0
- package/dist/office/connector/open-watch.js +46 -0
- package/dist/office/connector/pictures.js +156 -0
- package/dist/office/connector/pptx/diff.js +589 -0
- package/dist/office/connector/pptx/frames.js +105 -0
- package/dist/office/connector/pptx/layer.js +148 -0
- package/dist/office/connector/pptx/links.js +59 -0
- package/dist/office/connector/pptx/reader.js +744 -0
- package/dist/office/connector/pptx/spans.js +70 -0
- package/dist/office/connector/pptx/tags.js +86 -0
- package/dist/office/connector/pptx/xml.js +96 -0
- package/dist/office/connector/pptx/zip.js +223 -0
- package/dist/office/connector/pptx-boxes.js +238 -0
- package/dist/office/connector/print-copy-cap.js +19 -0
- package/dist/office/connector/print-copy.js +13 -0
- package/dist/office/connector/program.js +291 -0
- package/dist/office/connector/reach.js +27 -0
- package/dist/office/connector/refusal.js +16 -0
- package/dist/office/connector/screen-macos.js +193 -0
- package/dist/office/connector/screen-windows.js +34 -0
- package/dist/office/connector/shared/chart-diff.js +376 -0
- package/dist/office/connector/shared/docprops-noise.js +13 -0
- package/dist/office/connector/shared/lock.js +107 -0
- package/dist/office/connector/shared/ooxml-names.js +347 -0
- package/dist/office/connector/shared/owner.js +57 -0
- package/dist/office/connector/shared/package-media.js +703 -0
- package/dist/office/connector/shared/preflight.js +226 -0
- package/dist/office/connector/shared/structure-check.js +623 -0
- package/dist/office/connector/word-boxes.js +364 -0
- package/dist/office/connector/word-print-copy.js +234 -0
- package/dist/office/connector/xlsx/diff.js +1038 -0
- package/dist/office/connector/xlsx/formula.js +410 -0
- package/dist/office/connector/xlsx/layer.js +621 -0
- package/dist/office/connector/xlsx/memo.js +39 -0
- package/dist/office/connector/xlsx/numbers.js +31 -0
- package/dist/office/connector/xlsx/numfmt.js +913 -0
- package/dist/office/connector/xlsx/parts.js +66 -0
- package/dist/office/connector/xlsx/reader.js +394 -0
- package/dist/office/connector/xlsx/types.js +20 -0
- package/dist/office/connector/xlsx/written.js +446 -0
- package/dist/open-pick.js +99 -0
- package/dist/patch-secrets.js +194 -0
- package/dist/paths.js +65 -0
- package/dist/platform/darwin.js +179 -0
- package/dist/platform/index.js +61 -0
- package/dist/platform/spawn.js +115 -0
- package/dist/platform/stub.js +21 -0
- package/dist/platform/task-folder.js +41 -0
- package/dist/platform/types.js +20 -0
- package/dist/platform/win32-docrender.js +7 -0
- package/dist/platform/win32.js +265 -0
- package/dist/preferences.js +49 -0
- package/dist/reason.js +103 -0
- package/dist/region-delivery.js +148 -0
- package/dist/registry.js +68 -0
- package/dist/reveal.js +45 -0
- package/dist/review-process.js +154 -0
- package/dist/review-refresh-process.js +17 -0
- package/dist/review-refresh.js +120 -0
- package/dist/review-server.js +2079 -0
- package/dist/review-view-server.js +106 -0
- package/dist/review.js +8 -0
- package/dist/seal.js +315 -0
- package/dist/secret-files.js +34 -0
- package/dist/secret-hashes.js +27 -0
- package/dist/secret-rules.generated.js +3519 -0
- package/dist/secret-scan.js +127 -0
- package/dist/session-context.js +18 -0
- package/dist/signoff.js +419 -0
- package/dist/skill.js +110 -0
- package/dist/states.js +192 -0
- package/dist/tasks.js +1001 -0
- package/dist/timeline/attribution.js +207 -0
- package/dist/timeline/broken.js +55 -0
- package/dist/timeline/describe.js +413 -0
- package/dist/timeline/generic.js +195 -0
- package/dist/timeline/load.js +464 -0
- package/dist/timeline/loading.js +49 -0
- package/dist/timeline/notes.js +208 -0
- package/dist/timeline/page.js +178 -0
- package/dist/timeline/picture.js +303 -0
- package/dist/timeline/rail/assets/cocheck-icon.svg +1 -0
- package/dist/timeline/rail/assets/files-view.js +198 -0
- package/dist/timeline/rail/assets/loaders/icon-intro.json +1 -0
- package/dist/timeline/rail/assets/loaders/loader-orbit.json +1 -0
- package/dist/timeline/rail/assets/loaders/loader-spin.json +1 -0
- package/dist/timeline/rail/assets/review.css +992 -0
- package/dist/timeline/rail/assets/review.js +3365 -0
- package/dist/timeline/rail/assets/view-table.js +683 -0
- package/dist/timeline/rail/failure-line.js +26 -0
- package/dist/timeline/rail/files-model.js +45 -0
- package/dist/timeline/rail/live.js +49 -0
- package/dist/timeline/rail/made-pictures.js +48 -0
- package/dist/timeline/rail/mcp-card.js +307 -0
- package/dist/timeline/rail/model.js +1317 -0
- package/dist/timeline/rail/page.js +167 -0
- package/dist/timeline/rail/passes.js +106 -0
- package/dist/timeline/rail/regions.js +26 -0
- package/dist/timeline/rail/send-back.js +154 -0
- package/dist/timeline/rail/stop-status.js +164 -0
- package/dist/timeline/read-signal.js +743 -0
- package/dist/timeline/render/claimed.js +13 -0
- package/dist/timeline/render/fallback.js +36 -0
- package/dist/timeline/render/pdf-helper.js +71 -0
- package/dist/timeline/render/pdf.js +410 -0
- package/dist/timeline/render/pixel-pages.js +168 -0
- package/dist/timeline/render/png-crop.js +281 -0
- package/dist/timeline/render/registry.js +7 -0
- package/dist/timeline/render/text.js +366 -0
- package/dist/timeline/render/types.js +1 -0
- package/dist/timeline/render/view-v1.js +148 -0
- package/dist/timeline/render/whole.js +6 -0
- package/dist/timeline/rollout-failures.js +40 -0
- package/dist/timeline/runs.js +836 -0
- package/dist/timeline/stored-image.js +34 -0
- package/dist/timeline/subject-display.js +44 -0
- package/dist/timeline/timeline.js +1114 -0
- package/dist/timeline/write-signal.js +403 -0
- package/dist/tool-label.js +201 -0
- package/dist/tracking.js +87 -0
- package/dist/vendor/pdfjs/LICENSE +177 -0
- package/dist/vendor/pdfjs/pdf.min.mjs +27 -0
- package/dist/vendor/pdfjs/pdf.worker.min.mjs +27 -0
- package/package.json +66 -4
- package/public-kit/GUIDE.md +189 -0
- package/public-kit/README.md +10 -0
- package/public-kit/conformance/README.md +13 -0
- package/public-kit/conformance/cases/C1.json +12 -0
- package/public-kit/conformance/cases/C10.json +15 -0
- package/public-kit/conformance/cases/C11.json +16 -0
- package/public-kit/conformance/cases/C12.json +18 -0
- package/public-kit/conformance/cases/C13.json +23 -0
- package/public-kit/conformance/cases/C14.json +16 -0
- package/public-kit/conformance/cases/C16.json +15 -0
- package/public-kit/conformance/cases/C17.json +25 -0
- package/public-kit/conformance/cases/C2.json +13 -0
- package/public-kit/conformance/cases/C3.json +44 -0
- package/public-kit/conformance/cases/C4.json +13 -0
- package/public-kit/conformance/cases/C5.json +16 -0
- package/public-kit/conformance/cases/C6.json +58 -0
- package/public-kit/conformance/generate-large.mjs +15 -0
- package/public-kit/examples/toy-export/cocheck-connector.json +10 -0
- package/public-kit/examples/toy-export/connector.mjs +28 -0
- package/public-kit/examples/toy-helpers/cocheck-connector.json +10 -0
- package/public-kit/examples/toy-helpers/connector.mjs +69 -0
- package/public-kit/examples/toy-level-1/cocheck-connector.json +10 -0
- package/public-kit/examples/toy-level-1/connector.mjs +61 -0
- package/public-kit/examples/toy-level-3/cocheck-connector.json +10 -0
- package/public-kit/examples/toy-level-3/connector.mjs +82 -0
- package/public-kit/examples/toy-tracker/cocheck-connector.json +14 -0
- package/public-kit/examples/toy-tracker/connector.mjs +46 -0
- package/public-kit/examples/toy-tracker/samples/history.json +10 -0
- package/public-kit/examples/toy-tracker/samples/samples.json +7 -0
- package/public-kit/examples/toy-vendor/cocheck-connector.json +15 -0
- package/public-kit/examples/toy-vendor/connector.mjs +62 -0
- package/public-kit/helpers/pdf-text-layout.d.mts +35 -0
- package/public-kit/helpers/pdf-text-layout.mjs +602 -0
- package/public-kit/helpers/pdf-text.d.mts +56 -0
- package/public-kit/helpers/pdf-text.mjs +375 -0
- package/public-kit/helpers/pdf.d.mts +61 -0
- package/public-kit/helpers/pdf.mjs +251 -0
- package/public-kit/helpers/png.d.mts +15 -0
- package/public-kit/helpers/png.mjs +88 -0
- package/public-kit/helpers/spec.d.mts +4 -0
- package/public-kit/helpers/spec.mjs +2 -0
- package/public-kit/scaffold/README.md +23 -0
- package/public-kit/scaffold/template/README.md +13 -0
- package/public-kit/scaffold/template/cocheck-connector.json +10 -0
- package/public-kit/scaffold/template/connector.mjs +50 -0
- package/public-kit/spec/README.md +408 -0
- package/public-kit/spec/v1.md +598 -0
- package/public-kit/toy-product/README.md +7 -0
- package/public-kit/toy-product/notes-store.mjs +30 -0
- package/public-kit/toy-product/states/create.after.json +16 -0
- package/public-kit/toy-product/states/create.before.json +12 -0
- package/public-kit/toy-product/states/delete.after.json +8 -0
- package/public-kit/toy-product/states/delete.before.json +12 -0
- package/public-kit/toy-product/states/edit.after.json +12 -0
- package/public-kit/toy-product/states/edit.before.json +12 -0
- package/public-kit/toy-product/states/malformed.after.json +1 -0
- package/public-kit/toy-product/states/malformed.before.json +12 -0
- package/public-kit/toy-product/states/no-change.after.json +12 -0
- package/public-kit/toy-product/states/no-change.before.json +12 -0
- package/scripts/hook-launch.mjs +58 -0
- package/scripts/hook-launch.sh +52 -0
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { inflateSync } from "node:zlib";
|
|
2
|
+
import { imageTypeOf, readStoredImage } from "./stored-image.js";
|
|
3
|
+
import { isSecretPath, secretLine } from "../secret-files.js";
|
|
4
|
+
import { claimedFile } from "../connector/claimed-state.js";
|
|
5
|
+
/**
|
|
6
|
+
* The picture tier of a file change: a changed png, jpg, jpeg, gif, webp or svg file that is not secret. The browser shows both states
|
|
7
|
+
* itself from the stored bytes (the preview route serves them), so nothing is rendered here. When both states are PNGs, they are decoded
|
|
8
|
+
* with node's zlib (no dependency) and a pixel diff names the regions that changed. Any other pair has no boxes.
|
|
9
|
+
*
|
|
10
|
+
* The region step is bounded (grid cells instead of a per-pixel flood) so the timeline route stays fast.
|
|
11
|
+
*
|
|
12
|
+
* Honesty rule: two PNGs that match pixel for pixel say "The change isn't visible in this preview".
|
|
13
|
+
*/
|
|
14
|
+
export const PICTURE_LABEL = "The image as stored, drawn by your browser";
|
|
15
|
+
export const NOT_VISIBLE = "The change isn't visible in this preview";
|
|
16
|
+
/** The reason a state a connector reads has no picture from CoCheck. */
|
|
17
|
+
export const CLAIMED_NO_PICTURE = "a connector reads this type of file, so CoCheck draws no picture of it.";
|
|
18
|
+
/** The most pixels one decoded picture may hold; a larger one falls to the fingerprint tier rather than costing the route time. */
|
|
19
|
+
export const MAX_PIXELS = 4_000_000;
|
|
20
|
+
/** The most regions listed; past this they are merged into one box around them all. */
|
|
21
|
+
export const MAX_REGIONS = 20;
|
|
22
|
+
const PNG_SIGNATURE = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
|
|
23
|
+
/** Decodes a non-interlaced 8-bit PNG (gray, gray+alpha, RGB, RGBA or palette) to RGBA; null for anything else or a damaged file. */
|
|
24
|
+
export function decodePng(buf) {
|
|
25
|
+
try {
|
|
26
|
+
if (buf.length < 33 || !buf.subarray(0, 8).equals(PNG_SIGNATURE))
|
|
27
|
+
return null;
|
|
28
|
+
let pos = 8;
|
|
29
|
+
let w = 0, h = 0, depth = 0, type = -1, interlace = 0;
|
|
30
|
+
let palette = null;
|
|
31
|
+
let trns = null;
|
|
32
|
+
const idat = [];
|
|
33
|
+
while (pos + 8 <= buf.length) {
|
|
34
|
+
const len = buf.readUInt32BE(pos);
|
|
35
|
+
const name = buf.toString("latin1", pos + 4, pos + 8);
|
|
36
|
+
const body = buf.subarray(pos + 8, pos + 8 + len);
|
|
37
|
+
if (body.length !== len)
|
|
38
|
+
return null;
|
|
39
|
+
if (name === "IHDR") {
|
|
40
|
+
w = body.readUInt32BE(0);
|
|
41
|
+
h = body.readUInt32BE(4);
|
|
42
|
+
depth = body[8];
|
|
43
|
+
type = body[9];
|
|
44
|
+
interlace = body[12];
|
|
45
|
+
}
|
|
46
|
+
else if (name === "PLTE")
|
|
47
|
+
palette = body;
|
|
48
|
+
else if (name === "tRNS")
|
|
49
|
+
trns = body;
|
|
50
|
+
else if (name === "IDAT")
|
|
51
|
+
idat.push(body);
|
|
52
|
+
else if (name === "IEND")
|
|
53
|
+
break;
|
|
54
|
+
pos += 12 + len;
|
|
55
|
+
}
|
|
56
|
+
const channels = { 0: 1, 2: 3, 3: 1, 4: 2, 6: 4 }[type];
|
|
57
|
+
if (depth !== 8 || interlace !== 0 || channels === undefined || w < 1 || h < 1 || w * h > MAX_PIXELS)
|
|
58
|
+
return null;
|
|
59
|
+
if (type === 3 && palette === null)
|
|
60
|
+
return null;
|
|
61
|
+
const raw = inflateSync(Buffer.concat(idat));
|
|
62
|
+
const stride = w * channels;
|
|
63
|
+
if (raw.length !== (stride + 1) * h)
|
|
64
|
+
return null;
|
|
65
|
+
const cur = new Uint8Array(stride);
|
|
66
|
+
let prev = new Uint8Array(stride);
|
|
67
|
+
const data = new Uint8Array(w * h * 4);
|
|
68
|
+
for (let y = 0; y < h; y++) {
|
|
69
|
+
const filter = raw[y * (stride + 1)];
|
|
70
|
+
const row = raw.subarray(y * (stride + 1) + 1, (y + 1) * (stride + 1));
|
|
71
|
+
for (let i = 0; i < stride; i++) {
|
|
72
|
+
const a = i >= channels ? cur[i - channels] : 0;
|
|
73
|
+
const b = prev[i];
|
|
74
|
+
const c = i >= channels ? prev[i - channels] : 0;
|
|
75
|
+
let v = row[i];
|
|
76
|
+
if (filter === 1)
|
|
77
|
+
v += a;
|
|
78
|
+
else if (filter === 2)
|
|
79
|
+
v += b;
|
|
80
|
+
else if (filter === 3)
|
|
81
|
+
v += (a + b) >> 1;
|
|
82
|
+
else if (filter === 4) {
|
|
83
|
+
const p = a + b - c;
|
|
84
|
+
const pa = Math.abs(p - a), pb = Math.abs(p - b), pc = Math.abs(p - c);
|
|
85
|
+
v += pa <= pb && pa <= pc ? a : pb <= pc ? b : c;
|
|
86
|
+
}
|
|
87
|
+
else if (filter !== 0)
|
|
88
|
+
return null;
|
|
89
|
+
cur[i] = v & 255;
|
|
90
|
+
}
|
|
91
|
+
for (let x = 0; x < w; x++) {
|
|
92
|
+
const o = (y * w + x) * 4;
|
|
93
|
+
const s = x * channels;
|
|
94
|
+
if (type === 6) {
|
|
95
|
+
data[o] = cur[s];
|
|
96
|
+
data[o + 1] = cur[s + 1];
|
|
97
|
+
data[o + 2] = cur[s + 2];
|
|
98
|
+
data[o + 3] = cur[s + 3];
|
|
99
|
+
}
|
|
100
|
+
else if (type === 2) {
|
|
101
|
+
data[o] = cur[s];
|
|
102
|
+
data[o + 1] = cur[s + 1];
|
|
103
|
+
data[o + 2] = cur[s + 2];
|
|
104
|
+
data[o + 3] = 255;
|
|
105
|
+
}
|
|
106
|
+
else if (type === 0) {
|
|
107
|
+
data[o] = data[o + 1] = data[o + 2] = cur[s];
|
|
108
|
+
data[o + 3] = 255;
|
|
109
|
+
}
|
|
110
|
+
else if (type === 4) {
|
|
111
|
+
data[o] = data[o + 1] = data[o + 2] = cur[s];
|
|
112
|
+
data[o + 3] = cur[s + 1];
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
const k = cur[s];
|
|
116
|
+
if (k * 3 + 2 >= palette.length)
|
|
117
|
+
return null;
|
|
118
|
+
data[o] = palette[k * 3];
|
|
119
|
+
data[o + 1] = palette[k * 3 + 1];
|
|
120
|
+
data[o + 2] = palette[k * 3 + 2];
|
|
121
|
+
data[o + 3] = trns !== null && k < trns.length ? trns[k] : 255;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
prev = Uint8Array.from(cur);
|
|
125
|
+
}
|
|
126
|
+
return { w, h, data };
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* The one definition of "identical": no pixel differs by more than this in any colour channel (0-255). Boxes are drawn at the
|
|
134
|
+
* same tolerance, so a picture that is not identical always has at least one box.
|
|
135
|
+
*/
|
|
136
|
+
export const IDENTICAL_TOL = 2;
|
|
137
|
+
export const BLANK = { w: 0, h: 0, data: new Uint8Array(0) };
|
|
138
|
+
/**
|
|
139
|
+
* Pixels that differ by more than `tol` in any colour channel (alpha counts as white background). Sizes may differ: the shorter
|
|
140
|
+
* picture is treated as blank white past its edge. `mask[y*w+x]` is 1 where they differ.
|
|
141
|
+
*/
|
|
142
|
+
export function diffPixels(a, b, tol = IDENTICAL_TOL) {
|
|
143
|
+
const w = Math.max(a.w, b.w), h = Math.max(a.h, b.h), mask = new Uint8Array(w * h);
|
|
144
|
+
const px = (p, x, y, c) => {
|
|
145
|
+
if (x >= p.w || y >= p.h)
|
|
146
|
+
return 255;
|
|
147
|
+
const i = (y * p.w + x) * 4, al = p.data[i + 3] / 255;
|
|
148
|
+
return p.data[i + c] * al + 255 * (1 - al);
|
|
149
|
+
};
|
|
150
|
+
let count = 0;
|
|
151
|
+
for (let y = 0; y < h; y++) {
|
|
152
|
+
for (let x = 0; x < w; x++) {
|
|
153
|
+
if (Math.abs(px(a, x, y, 0) - px(b, x, y, 0)) > tol || Math.abs(px(a, x, y, 1) - px(b, x, y, 1)) > tol || Math.abs(px(a, x, y, 2) - px(b, x, y, 2)) > tol) {
|
|
154
|
+
mask[y * w + x] = 1;
|
|
155
|
+
count++;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return { w, h, mask, count };
|
|
160
|
+
}
|
|
161
|
+
const CELL = 8;
|
|
162
|
+
/**
|
|
163
|
+
* Boxes around the differing pixels, top to bottom. Pixels are binned into 8-pixel cells; touching cells join one box, then boxes
|
|
164
|
+
* within `gap` pixels merge. Work is bounded by the picture size, not by how much changed, and at most MAX_REGIONS boxes are returned.
|
|
165
|
+
*/
|
|
166
|
+
export function regionsOf({ w, h, mask }, gap = 6) {
|
|
167
|
+
const cw = Math.ceil(w / CELL), ch = Math.ceil(h / CELL);
|
|
168
|
+
const box = new Int32Array(cw * ch * 4).fill(-1); // x0, y0, x1, y1 of the differing pixels in each cell
|
|
169
|
+
for (let y = 0; y < h; y++) {
|
|
170
|
+
for (let x = 0; x < w; x++) {
|
|
171
|
+
if (!mask[y * w + x])
|
|
172
|
+
continue;
|
|
173
|
+
const k = ((y >> 3) * cw + (x >> 3)) * 4;
|
|
174
|
+
if (box[k] < 0) {
|
|
175
|
+
box[k] = x;
|
|
176
|
+
box[k + 1] = y;
|
|
177
|
+
box[k + 2] = x;
|
|
178
|
+
box[k + 3] = y;
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (x < box[k])
|
|
182
|
+
box[k] = x;
|
|
183
|
+
if (y < box[k + 1])
|
|
184
|
+
box[k + 1] = y;
|
|
185
|
+
if (x > box[k + 2])
|
|
186
|
+
box[k + 2] = x;
|
|
187
|
+
if (y > box[k + 3])
|
|
188
|
+
box[k + 3] = y;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const seen = new Uint8Array(cw * ch);
|
|
192
|
+
const out = [];
|
|
193
|
+
for (let c0 = 0; c0 < cw * ch; c0++) {
|
|
194
|
+
if (box[c0 * 4] < 0 || seen[c0])
|
|
195
|
+
continue;
|
|
196
|
+
let b = { x0: box[c0 * 4], y0: box[c0 * 4 + 1], x1: box[c0 * 4 + 2], y1: box[c0 * 4 + 3] };
|
|
197
|
+
const stack = [c0];
|
|
198
|
+
seen[c0] = 1;
|
|
199
|
+
while (stack.length) {
|
|
200
|
+
const c = stack.pop();
|
|
201
|
+
const cx = c % cw, cy = (c - cx) / cw;
|
|
202
|
+
b = { x0: Math.min(b.x0, box[c * 4]), y0: Math.min(b.y0, box[c * 4 + 1]), x1: Math.max(b.x1, box[c * 4 + 2]), y1: Math.max(b.y1, box[c * 4 + 3]) };
|
|
203
|
+
for (let dy = -1; dy <= 1; dy++) {
|
|
204
|
+
for (let dx = -1; dx <= 1; dx++) {
|
|
205
|
+
const nx = cx + dx, ny = cy + dy;
|
|
206
|
+
if (nx < 0 || ny < 0 || nx >= cw || ny >= ch)
|
|
207
|
+
continue;
|
|
208
|
+
const n = ny * cw + nx;
|
|
209
|
+
if (box[n * 4] >= 0 && !seen[n]) {
|
|
210
|
+
seen[n] = 1;
|
|
211
|
+
stack.push(n);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
out.push(b);
|
|
217
|
+
}
|
|
218
|
+
let merged = true;
|
|
219
|
+
while (merged) {
|
|
220
|
+
merged = false;
|
|
221
|
+
for (let i = 0; i < out.length && !merged; i++) {
|
|
222
|
+
for (let j = i + 1; j < out.length && !merged; j++) {
|
|
223
|
+
const p = out[i], q = out[j];
|
|
224
|
+
if (p.x0 <= q.x1 + gap && q.x0 <= p.x1 + gap && p.y0 <= q.y1 + gap && q.y0 <= p.y1 + gap) {
|
|
225
|
+
out[i] = { x0: Math.min(p.x0, q.x0), y0: Math.min(p.y0, q.y0), x1: Math.max(p.x1, q.x1), y1: Math.max(p.y1, q.y1) };
|
|
226
|
+
out.splice(j, 1);
|
|
227
|
+
merged = true;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
let boxes = out;
|
|
233
|
+
if (boxes.length > MAX_REGIONS) {
|
|
234
|
+
boxes = [{ x0: Math.min(...boxes.map((b) => b.x0)), y0: Math.min(...boxes.map((b) => b.y0)), x1: Math.max(...boxes.map((b) => b.x1)), y1: Math.max(...boxes.map((b) => b.y1)) }];
|
|
235
|
+
}
|
|
236
|
+
return boxes.map((b) => ({ x: b.x0, y: b.y0, w: b.x1 - b.x0 + 1, h: b.y1 - b.y0 + 1 })).sort((p, q) => p.y - q.y || p.x - q.x);
|
|
237
|
+
}
|
|
238
|
+
const nameOf = (filePath) => filePath.split(/[\\/]/).pop() ?? filePath;
|
|
239
|
+
function fingerprint(i, note, label, secret = false) {
|
|
240
|
+
const side = (sha, size) => sha === null ? null : { sha, size: i.stored.get(sha) ?? size ?? 0 };
|
|
241
|
+
const ext = /\.([A-Za-z0-9]{1,8})$/.exec(nameOf(i.filePath))?.[1]?.toLowerCase();
|
|
242
|
+
return {
|
|
243
|
+
tier: "fingerprint",
|
|
244
|
+
label,
|
|
245
|
+
fingerprint: { before: side(i.before, i.sizes.before), after: side(i.after, i.sizes.after), kind: ext ?? "file", note },
|
|
246
|
+
...(secret ? { secret: true } : {}),
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
const memo = new Map();
|
|
250
|
+
const MEMO_MAX = 200;
|
|
251
|
+
/** The most bytes of one PNG state that are decoded for the pixel diff; a larger one is still shown, without boxes. */
|
|
252
|
+
const DIFF_MAX_BYTES = 20 * 1024 * 1024;
|
|
253
|
+
/**
|
|
254
|
+
* The generic entry for a changed file that is not text. A secret file is always a fingerprint and is never opened. Returns null
|
|
255
|
+
* for a text file (the text tier owns it). An image file is a picture; any other file type is a fingerprint.
|
|
256
|
+
*/
|
|
257
|
+
export async function pictureTier(i) {
|
|
258
|
+
if ((i.isSecret ?? isSecretPath)(i.filePath)) {
|
|
259
|
+
return fingerprint(i, "The file looks like it holds a secret, so only its fingerprint is kept and its contents are never shown.", secretLine(i.relPath ?? nameOf(i.filePath)), true);
|
|
260
|
+
}
|
|
261
|
+
const unrendered = (why) => fingerprint(i, why, `No preview of this change: ${why}`);
|
|
262
|
+
// CoCheck draws no file a connector reads: a fingerprint on every path, ahead of "is text" (a claimed state is never read as lines).
|
|
263
|
+
if (i.claimed ?? claimedFile(i.home)(i.filePath))
|
|
264
|
+
return unrendered(CLAIMED_NO_PICTURE);
|
|
265
|
+
if (i.isText?.(i.filePath))
|
|
266
|
+
return null;
|
|
267
|
+
if (imageTypeOf(i.filePath) === null)
|
|
268
|
+
return unrendered("CoCheck shows only png, jpg, gif, webp and svg images as pictures.");
|
|
269
|
+
for (const sha of [i.before, i.after]) {
|
|
270
|
+
if (sha !== null && !i.stored.has(sha))
|
|
271
|
+
return unrendered("a version of the file is no longer in the store.");
|
|
272
|
+
}
|
|
273
|
+
const key = `${i.home}\0${i.taskId}\0${i.before ?? ""}\0${i.after ?? ""}\0${/\.[A-Za-z0-9]+$/.exec(nameOf(i.filePath))?.[0]?.toLowerCase() ?? ""}`;
|
|
274
|
+
const hit = memo.get(key);
|
|
275
|
+
if (hit)
|
|
276
|
+
return hit;
|
|
277
|
+
// Boxes only for two PNGs we can read; anything else is shown by the browser without them.
|
|
278
|
+
const decode = async (sha) => {
|
|
279
|
+
if (sha === null)
|
|
280
|
+
return BLANK;
|
|
281
|
+
if ((i.stored.get(sha) ?? 0) > DIFF_MAX_BYTES)
|
|
282
|
+
return null;
|
|
283
|
+
const bytes = await readStoredImage(i.home, i.taskId, sha);
|
|
284
|
+
return bytes === null ? null : decodePng(bytes);
|
|
285
|
+
};
|
|
286
|
+
const [b, a] = /\.png$/i.test(i.filePath) ? await Promise.all([decode(i.before), decode(i.after)]) : [null, null];
|
|
287
|
+
// A created or deleted picture draws plain, like a created text or PDF file: with one side missing the whole image is the change, so there is
|
|
288
|
+
// nothing to box and no pixel diff. Its own side is still decoded for its size.
|
|
289
|
+
const oneSided = i.before === null || i.after === null;
|
|
290
|
+
const own = oneSided ? (i.before === null ? a : b) : null;
|
|
291
|
+
const d = !oneSided && b !== null && a !== null ? diffPixels(b, a) : null;
|
|
292
|
+
const regions = d === null || d.count === 0 ? [] : regionsOf(d);
|
|
293
|
+
const identical = d !== null && d.count === 0;
|
|
294
|
+
const out = {
|
|
295
|
+
tier: "picture",
|
|
296
|
+
label: identical ? `${PICTURE_LABEL}. ${NOT_VISIBLE}.` : PICTURE_LABEL,
|
|
297
|
+
picture: { before: i.before, after: i.after, width: d?.w ?? own?.w ?? 0, height: d?.h ?? own?.h ?? 0, regions, ...(identical ? { note: NOT_VISIBLE } : {}) },
|
|
298
|
+
};
|
|
299
|
+
if (memo.size >= MEMO_MAX)
|
|
300
|
+
memo.delete(memo.keys().next().value);
|
|
301
|
+
memo.set(key, out);
|
|
302
|
+
return out;
|
|
303
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><rect width="128" height="128" rx="28" fill="#1c2740"/><g transform="translate(26 24) scale(.7)" fill="none" stroke-linecap="round"><circle cx="41" cy="41" r="34" stroke="#a8cdeb" stroke-width="14"/><path d="M22 33 A21 21 0 0 1 33 22" stroke="#e4f0f9" stroke-width="7"/><path d="M69 69 L80 80" stroke="#a8cdeb" stroke-width="11" stroke-linecap="butt"/><path d="M83 83 L100 100" stroke="#a8cdeb" stroke-width="22"/></g></svg>
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/* The Files view of the review page. A file the task changed, its versions in time order, the strip of them. Drawn from the model's
|
|
2
|
+
`files` list (src/timeline/rail/model.ts); the page script (review.js) owns the data, the selection and the per-change view, and passes in
|
|
3
|
+
the few things this file needs (`h`). No innerHTML: every text goes in through textContent. The pure half is tested in node. */
|
|
4
|
+
(function (root) {
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
/* a strip has the positions Before task (0), v1..vN (1..N) and Now (N+1); Before task and Now show the file's first and last change */
|
|
8
|
+
function clamp(file, p) { var n = file.versions.length; return Math.max(0, Math.min(n + 1, p)); }
|
|
9
|
+
/* A file with a twin of the same name in another folder is named with its folder */
|
|
10
|
+
function labelOf(file) { return file.where ? file.name + ' (' + file.where + ')' : file.name; }
|
|
11
|
+
/* Before task and Now are one pane each: which side of the edge change to draw, or the sentence to show when there is nothing to draw. Null for a version, and for a secret file. */
|
|
12
|
+
function soloOf(file, p) {
|
|
13
|
+
var n = file.versions.length;
|
|
14
|
+
/* A source (read, never changed) has the one position, Before task; its bytes are not kept */
|
|
15
|
+
if (file.source) return { side: 'before', say: 'Content not kept.' };
|
|
16
|
+
if (p !== 0 && p !== n + 1) return null;
|
|
17
|
+
var last = file.versions[n - 1];
|
|
18
|
+
if (file.versions[0].secret) return null;
|
|
19
|
+
if (p === 0) return { side: 'before', say: file.start === 'none' ? 'This file did not exist before the task.' : file.start === 'lost' ? 'Content not kept.' : '' };
|
|
20
|
+
return { side: 'after', say: last.kind === 'deleted' ? 'This file is gone now.' : !last.kept ? 'Content not kept.' : '' };
|
|
21
|
+
}
|
|
22
|
+
function versionAt(file, p) { var n = file.versions.length; return file.versions[Math.min(Math.max(p, 1), n) - 1]; }
|
|
23
|
+
/* While the agent is still working the last position is "So far", never "Now": the final product is not known until the work stops */
|
|
24
|
+
var working = false;
|
|
25
|
+
function setLive(on) { working = !!on; }
|
|
26
|
+
function nameOf(p, n) { return p === 0 ? 'Before task' : p === n + 1 ? (working ? 'So far' : 'Now') : 'v' + p; }
|
|
27
|
+
function timeText(at) {
|
|
28
|
+
if (typeof at !== 'number' || !isFinite(at)) return '';
|
|
29
|
+
return new Date(at).toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' });
|
|
30
|
+
}
|
|
31
|
+
/* a connector's subject is not a file: no file-type icon, the subject shown whole */
|
|
32
|
+
function glyphOf(f, h) { return f.connector ? h.el('i', { class: 'glyph connector', 'aria-hidden': 'true' }) : h.el('i', { class: /\.(csv|tsv)$/i.test(f.name || '') ? 'glyph csv' : 'glyph' }); }
|
|
33
|
+
/* the one line under the strip's selected position that says what the position is */
|
|
34
|
+
function describe(file, p, who) {
|
|
35
|
+
var n = file.versions.length, v = versionAt(file, p);
|
|
36
|
+
if (file.source) return 'Not changed by the task: the file as the task found it.';
|
|
37
|
+
if (p === 0) return file.versions[0].kind === 'created' ? 'The file did not exist before the task.' : 'The file as the task found it.';
|
|
38
|
+
if (p === n + 1) return 'The file as it is now, after v' + n + '.';
|
|
39
|
+
return nameOf(p, n) + ' of ' + n + ': ' + v.label.toLowerCase() + ' by ' + who(v.lane) + (timeText(v.at) ? ', ' + timeText(v.at) : '') + '.';
|
|
40
|
+
}
|
|
41
|
+
/* a version whose bytes CoCheck does not hold says so; a secret file's content is never shown, so it never says this */
|
|
42
|
+
function notKept(v) { return !v.kept && !v.secret; }
|
|
43
|
+
|
|
44
|
+
/* Per-group open state, kept across repaints (verdicts arrive after the first paint) */
|
|
45
|
+
var groupOpen = {};
|
|
46
|
+
/* A reusable collapsed group: a <details class="outgrp"> with a summary; open when the person opened it before or the selected file is inside */
|
|
47
|
+
function makeGroup(h, name, title) {
|
|
48
|
+
var g = h.el('details', { class: 'outgrp', 'data-group': name }, h.el('summary', { class: 'grp' }, title));
|
|
49
|
+
g.open = !!groupOpen[name];
|
|
50
|
+
g.addEventListener && g.addEventListener('toggle', function () { groupOpen[name] = g.open; });
|
|
51
|
+
return g;
|
|
52
|
+
}
|
|
53
|
+
/* A file opens at Now, the final product (position N+1) */
|
|
54
|
+
function nowOf(f) { return f.versions.length + 1; }
|
|
55
|
+
/* The review bar's verdict on the file's latest version (the one judged), as a small tick or cross on its card; nothing when it has none */
|
|
56
|
+
function markEl(m, h) {
|
|
57
|
+
return m === 'passed' || m === 'failed' ? h.el('span', { class: 'jm ' + (m === 'passed' ? 'pass' : 'fail'), role: 'img', title: m === 'passed' ? 'Passed' : 'Failed', 'aria-label': m === 'passed' ? 'Passed' : 'Failed' }, m === 'passed' ? '\u2713' : '\u2717') : '';
|
|
58
|
+
}
|
|
59
|
+
/* the same tick or cross on a strip step, for the step that made that version; nothing when its step has no verdict */
|
|
60
|
+
function versionMark(v, h) { return markEl(v && h.markOfVersion ? h.markOfVersion(v) : null, h); }
|
|
61
|
+
/* The one status glyph on a file row: not reviewed is an open circle, passed a green check, failed a red cross */
|
|
62
|
+
function statusMark(f, h) {
|
|
63
|
+
var m = h.markOf ? h.markOf(f) : null;
|
|
64
|
+
if (m === 'passed' || m === 'failed') return markEl(m, h);
|
|
65
|
+
return h.el('span', { class: 'jm open', role: 'img', title: 'Not reviewed', 'aria-label': 'Not reviewed' }, '\u25CB');
|
|
66
|
+
}
|
|
67
|
+
/* h: { el, chip(lane) -> node, name(lane) -> text, color(lane) -> css color, pick(fileIndex, p) } */
|
|
68
|
+
function paintList(box, files, sel, h) {
|
|
69
|
+
box.textContent = '';
|
|
70
|
+
box.append(h.el('div', { class: 'grp' }, 'Files this task changed'));
|
|
71
|
+
var idx = files.map(function (_, i) { return i; });
|
|
72
|
+
var mainIdx = idx.filter(function (i) { return !files[i].outside && !files[i].source && !files[i].working; });
|
|
73
|
+
var workIdx = idx.filter(function (i) { return !files[i].outside && !files[i].source && files[i].working; });
|
|
74
|
+
var srcIdx = idx.filter(function (i) { return !files[i].outside && files[i].source; });
|
|
75
|
+
var outIdx = idx.filter(function (i) { return files[i].outside; });
|
|
76
|
+
function row(i) {
|
|
77
|
+
var f = files[i];
|
|
78
|
+
/* Files the task read and never changed, each a read-only entry */
|
|
79
|
+
if (f.source) {
|
|
80
|
+
return h.el('button', { type: 'button', class: 'fi src', 'data-file': String(i), 'aria-current': String(i === sel), onclick: function () { h.pick(i, 0); } },
|
|
81
|
+
h.el('span', { class: 'r1' }, glyphOf(f, h), h.el('span', { class: 'nm', title: f.file }, f.name), f.where ? h.el('span', { class: 'wh' }, f.where) : '', h.el('span', { class: 'vv' }, 'read only')));
|
|
82
|
+
}
|
|
83
|
+
/* Only the latest version is judged; unknown (could not tell what the script read) is its own mark, never shown as clean or as stale */
|
|
84
|
+
var last = f.versions[f.versions.length - 1];
|
|
85
|
+
var stale = !!(last.stale && last.stale.length), unknown = !stale && !!last.unknownReads;
|
|
86
|
+
/* icon, name, one status glyph; a file whose bytes equal another's says so in a tooltip on the row */
|
|
87
|
+
var attrs = { type: 'button', class: 'fi' + (stale ? ' st' : unknown ? ' un' : ''), 'data-file': String(i), 'aria-current': String(i === sel), onclick: function () { h.pick(i, nowOf(f)); } };
|
|
88
|
+
if (f.sameAs) attrs.title = identicalTip(f.sameAs);
|
|
89
|
+
return h.el('button', attrs,
|
|
90
|
+
h.el('span', { class: 'r1' }, glyphOf(f, h), h.el('span', { class: 'nm', title: f.file }, f.name), f.where ? h.el('span', { class: 'wh' }, f.where) : '', last.kind === 'deleted' ? h.el('span', { class: 'delmark' }, 'deleted') : '', stale ? h.el('span', { class: 'stdot', title: 'A version was built from an input that changed afterwards' }) : unknown ? h.el('span', { class: 'undot', title: "CoCheck couldn't tell everything the script behind the latest version read" }) : '', statusMark(f, h)));
|
|
91
|
+
}
|
|
92
|
+
mainIdx.forEach(function (i) { box.append(row(i)); });
|
|
93
|
+
srcIdx.forEach(function (i, n) {
|
|
94
|
+
if (n === 0) box.append(h.el('div', { class: 'grp' }, 'Files this task read, unchanged'));
|
|
95
|
+
box.append(row(i));
|
|
96
|
+
});
|
|
97
|
+
/* Build and scratch files made during the task (dot-folders): collapsed, open when the selected file is inside */
|
|
98
|
+
if (workIdx.length) {
|
|
99
|
+
var workBox = makeGroup(h, 'working', 'Working files');
|
|
100
|
+
if (workIdx.indexOf(sel) >= 0) workBox.open = true;
|
|
101
|
+
workIdx.forEach(function (i) { workBox.append(row(i)); });
|
|
102
|
+
box.append(workBox);
|
|
103
|
+
}
|
|
104
|
+
/* Scratch outside the folder (nothing the person typed asked for it): a collapsed group at the end, never in the main list */
|
|
105
|
+
if (outIdx.length) {
|
|
106
|
+
var outsideBox = makeGroup(h, 'outside', 'Outside the folder');
|
|
107
|
+
if (outIdx.indexOf(sel) >= 0) outsideBox.open = true;
|
|
108
|
+
outIdx.forEach(function (i) {
|
|
109
|
+
var f = files[i];
|
|
110
|
+
/* The real directory comes from its own route, asked when the group opens; it is never in the model */
|
|
111
|
+
var dirs = h.outsideDirs ? h.outsideDirs() : null, mine = dirs && f.ref && Array.isArray(dirs[f.ref]) ? dirs[f.ref] : [];
|
|
112
|
+
outsideBox.append(h.el('button', { type: 'button', class: 'fi out', 'data-file': String(i), 'aria-current': String(i === sel), onclick: function () { h.pick(i, nowOf(f)); } },
|
|
113
|
+
h.el('span', { class: 'r1' }, glyphOf(f, h), h.el('span', { class: 'nm', title: f.file }, f.name), h.el('span', { class: 'wh' }, 'outside the folder'), f.versions[f.versions.length - 1].kind === 'deleted' ? h.el('span', { class: 'delmark' }, 'deleted') : '', h.el('span', { class: 'vv' }, f.versions.length + (f.versions.length === 1 ? ' version' : ' versions'))),
|
|
114
|
+
mine.map(function (d) { return h.el('div', { class: 'od', title: d }, d); })));
|
|
115
|
+
});
|
|
116
|
+
box.append(outsideBox);
|
|
117
|
+
if (h.loadOutside) { if (outsideBox.open) h.loadOutside(); outsideBox.addEventListener('toggle', function () { if (outsideBox.open) h.loadOutside(); }); }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function paintStrip(box, file, p, h) {
|
|
122
|
+
var n = file.versions.length, cn = null;
|
|
123
|
+
box.textContent = '';
|
|
124
|
+
/* The strip reads left to right in time: Before task, v1..vN, Now. Positions (data-p, FILES) are the same numbers as the paint order. */
|
|
125
|
+
for (var q = 0; q <= n + 1; q++) (function (q) {
|
|
126
|
+
var edge = q === 0 || q === n + 1, v = edge ? null : file.versions[q - 1];
|
|
127
|
+
var top = h.el('div', { class: 'top' }, h.el('b', {}, edge ? nameOf(q, n) : timeText(v.at) || nameOf(q, n)), v && v.stale && v.stale.length ? h.el('span', { class: 'stl', title: 'Built from an input that changed afterwards' }, 'Stale') : '', versionMark(v, h));
|
|
128
|
+
/* a re-save the connector vouched changed nothing is drawn as a quiet line (the model's SAVED_AGAIN_NOTHING_CHANGED words); only `muted === true` does this, any other version is drawn as a normal version */
|
|
129
|
+
var quiet = !!v && v.muted === true;
|
|
130
|
+
var lbl = h.el('span', { class: 'lbl' }, quiet ? 'saved again, nothing changed' : v ? v.label : q === 0 ? 'Start' : 'End');
|
|
131
|
+
var who = h.el('div', { class: 'who' }, v ? h.chip(v.lane) : '', lbl);
|
|
132
|
+
var attrs = { type: 'button', role: 'option', class: 'vn' + (quiet ? ' muted' : '') + (q === p ? ' cur' : ''), 'aria-selected': String(q === p), 'data-p': String(q), onclick: function () { h.go(q); } };
|
|
133
|
+
if (v) attrs.title = nameOf(q, n) + ' by ' + h.name(v.lane) + (v.inferred === true ? ' (likely)' : '');
|
|
134
|
+
var b = h.el('button', attrs, top, who);
|
|
135
|
+
if (v) b.style.setProperty('--c', h.color(v.lane));
|
|
136
|
+
if (q === p) cn = b;
|
|
137
|
+
box.append(b);
|
|
138
|
+
})(q);
|
|
139
|
+
/* The strip opens at its newest card (the right end) and keeps the chosen card in view; no scroll is carried over from the previous file */
|
|
140
|
+
if (p === n + 1 || !cn) box.scrollLeft = typeof box.scrollWidth === 'number' ? box.scrollWidth : 0;
|
|
141
|
+
else if (typeof cn.offsetLeft === 'number' && (cn.offsetLeft < box.scrollLeft || cn.offsetLeft + cn.offsetWidth > box.scrollLeft + box.clientWidth)) box.scrollLeft = Math.max(0, cn.offsetLeft - (box.clientWidth - cn.offsetWidth) / 2);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* the model's "same bytes as <name> (<folder>)" as a tooltip, "Identical to <name> (<folder>)"; anything else is shown as it came */
|
|
145
|
+
function identicalTip(t) { var m = /^same bytes as (.+)$/.exec(String(t)); return m ? 'Identical to ' + m[1] : String(t); }
|
|
146
|
+
function paintHead(nameEl, orderEl, file, p, h) {
|
|
147
|
+
nameEl.textContent = labelOf(file); nameEl.setAttribute('data-tip', file.file);
|
|
148
|
+
orderEl.textContent = '';
|
|
149
|
+
var n = file.versions.length, v = p >= 1 && p <= n ? file.versions[p - 1] : null;
|
|
150
|
+
if (v) orderEl.append(h.chip(v.lane));
|
|
151
|
+
orderEl.append(h.el('span', {}, describe(file, p, h.name)));
|
|
152
|
+
if (v && v.inferred === true) orderEl.append(h.el('span', { class: 'hinferred' }, '(likely)'));
|
|
153
|
+
var held = p === n + 1 ? file.versions[n - 1] : v;
|
|
154
|
+
var lost = p === 0 ? file.start === 'lost' : p === n + 1 ? held.kind !== 'deleted' && notKept(held) : !!held && notKept(held);
|
|
155
|
+
if (lost) orderEl.append(h.el('span', { class: 'notkept' }, 'content not kept'));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* What the version on show was built from. Each input is a button that opens that file at that version (h.open); each says why: "named in the script" or "opened in the same call". Files the agent only opened with the Read tool sit below on a quieter "Looked at" line. Position 0 is Before task. Only a version (1..N) has inputs; Before task and Now have none. */
|
|
159
|
+
function inputLabel(files, i) { var f = files[i.file]; return labelOf(f) + ' ' + (i.p === 0 ? '(before task)' : 'v' + i.p); }
|
|
160
|
+
function paintBuilt(box, files, file, p, h) {
|
|
161
|
+
box.textContent = '';
|
|
162
|
+
var n = file.versions.length, v = p >= 1 && p <= n ? file.versions[p - 1] : null;
|
|
163
|
+
if (!v || ((!v.inputs || !v.inputs.length) && (!v.looked || !v.looked.length))) return;
|
|
164
|
+
if (v.inputs && v.inputs.length) box.append(h.el('div', { class: 'grp' }, 'Built from'));
|
|
165
|
+
(v.inputs || []).forEach(function (i) {
|
|
166
|
+
box.append(h.el('button', { type: 'button', class: 'bf', 'data-file': String(i.file), 'data-p': String(i.p), onclick: function () { h.open(i.file, i.p); } },
|
|
167
|
+
h.el('span', { class: 'nm', title: files[i.file].file }, inputLabel(files, i)), h.el('span', { class: 'inf' }, i.why === 'script' ? 'named in the script' : 'opened in the same call')));
|
|
168
|
+
});
|
|
169
|
+
if (v.looked && v.looked.length) {
|
|
170
|
+
var line = h.el('div', { class: 'looked' }, h.el('span', { class: 'grp' }, 'Looked at'));
|
|
171
|
+
v.looked.forEach(function (i) { line.append(h.el('button', { type: 'button', class: 'bf lk', 'data-file': String(i.file), 'data-p': String(i.p), onclick: function () { h.open(i.file, i.p); } }, h.el('span', { class: 'nm', title: files[i.file].file }, inputLabel(files, i)))); });
|
|
172
|
+
box.append(line);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/* A calm warning when the version on show read an input that changed afterwards; the button opens the newer input version. Only the version that read it. */
|
|
176
|
+
function paintStale(box, files, file, p, h) {
|
|
177
|
+
box.textContent = '';
|
|
178
|
+
var n = file.versions.length, v = p >= 1 && p <= n ? file.versions[p - 1] : null;
|
|
179
|
+
if (!v) return;
|
|
180
|
+
if (v.unknownReads) box.append(h.el('div', { class: 'warn unk', role: 'status' }, h.el('span', { class: 'ic', 'aria-hidden': 'true' }, '?'), h.el('div', { class: 'tx' }, "CoCheck couldn't tell everything this script read.")));
|
|
181
|
+
(v.stale || []).forEach(function (s) {
|
|
182
|
+
var g = files[s.file], was = s.p === 0 ? labelOf(g) + ' as the task found it' : labelOf(g) + ' v' + s.p + ' by ' + h.name(g.versions[s.p - 1].lane);
|
|
183
|
+
box.append(h.el('div', { class: 'warn', role: 'status' }, h.el('span', { class: 'ic', 'aria-hidden': 'true' }, '!'),
|
|
184
|
+
h.el('div', { class: 'tx' }, 'Built from ' + was + '. ' + labelOf(g) + ' changed afterwards: v' + s.newer + ' by ' + h.name(s.newerLane) + '.'),
|
|
185
|
+
h.el('button', { type: 'button', class: 'wopen', onclick: function () { h.open(s.file, s.newer); } }, 'Open ' + labelOf(g) + ' v' + s.newer)));
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
/* the look-back path: where you were before each step into an input; a click goes back to that place */
|
|
189
|
+
function paintCrumbs(box, trail, files, h) {
|
|
190
|
+
box.textContent = '';
|
|
191
|
+
trail.forEach(function (t, k) {
|
|
192
|
+
var f = files[t.f];
|
|
193
|
+
box.append(h.el('button', { type: 'button', class: 'crumb', onclick: function () { h.back(k); } }, labelOf(f) + ' ' + nameOf(clamp(f, t.p), f.versions.length)), h.el('span', { class: 'sep', 'aria-hidden': 'true' }, '\u203A'));
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
root.CoCheckFilesView = { setLive: setLive, paintBuilt: paintBuilt, paintStale: paintStale, paintCrumbs: paintCrumbs, clamp: clamp, versionAt: versionAt, labelOf: labelOf, soloOf: soloOf, nameOf: nameOf, timeText: timeText, describe: describe, notKept: notKept, paintList: paintList, paintStrip: paintStrip, paintHead: paintHead, nowOf: nowOf, versionMark: versionMark };
|
|
198
|
+
})(typeof globalThis !== 'undefined' ? globalThis : this);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"v":"5.7.0","fr":30,"ip":0,"op":75,"w":128,"h":128,"nm":"cocheck-icon","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Magnifier","sr":1,"ip":0,"op":75,"st":0,"bm":0,"ks":{"o":{"a":0,"k":100},"r":{"a":1,"k":[{"t":44,"s":[0],"o":{"x":[0.4],"y":[0]},"i":{"x":[0.3],"y":[1]}},{"t":53,"s":[-9],"o":{"x":[0.4],"y":[0]},"i":{"x":[0.3],"y":[1]}},{"t":62,"s":[7],"o":{"x":[0.4],"y":[0]},"i":{"x":[0.3],"y":[1]}},{"t":71,"s":[0]}]},"p":{"a":1,"k":[{"t":44,"s":[54.7,52.7,0],"o":{"x":[0.4,0.4,0.4],"y":[0,0,0]},"i":{"x":[0.3,0.3,0.3],"y":[1,1,1]}},{"t":53,"s":[47.7,50.7,0],"o":{"x":[0.4,0.4,0.4],"y":[0,0,0]},"i":{"x":[0.3,0.3,0.3],"y":[1,1,1]}},{"t":62,"s":[60.7,54.7,0],"o":{"x":[0.4,0.4,0.4],"y":[0,0,0]},"i":{"x":[0.3,0.3,0.3],"y":[1,1,1]}},{"t":71,"s":[54.7,52.7,0]}]},"a":{"a":0,"k":[41,41,0]},"s":{"a":1,"k":[{"t":44,"s":[70,70,100],"o":{"x":[0.4,0.4,0.4],"y":[0,0,0]},"i":{"x":[0.3,0.3,0.3],"y":[1,1,1]}},{"t":53,"s":[75.60000000000001,75.60000000000001,100],"o":{"x":[0.4,0.4,0.4],"y":[0,0,0]},"i":{"x":[0.3,0.3,0.3],"y":[1,1,1]}},{"t":62,"s":[75.60000000000001,75.60000000000001,100],"o":{"x":[0.4,0.4,0.4],"y":[0,0,0]},"i":{"x":[0.3,0.3,0.3],"y":[1,1,1]}},{"t":71,"s":[70,70,100]}]}},"shapes":[{"ty":"gr","nm":"Grip","it":[{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[83,83],[100,100]],"i":[[0,0],[0,0]],"o":[[0,0],[0,0]]}}},{"ty":"st","c":{"a":0,"k":[0.6588235294117647,0.803921568627451,0.9215686274509803,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":22},"lc":2,"lj":2,"ml":4},{"ty":"tm","s":{"a":0,"k":0},"e":{"a":1,"k":[{"t":31,"s":[0],"o":{"x":[0.4],"y":[0]},"i":{"x":[0.2],"y":[1]}},{"t":39,"s":[100]}]},"o":{"a":0,"k":0},"m":1},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":31,"s":[100]}]},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"gr","nm":"Neck","it":[{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[69,69],[80,80]],"i":[[0,0],[0,0]],"o":[[0,0],[0,0]]}}},{"ty":"st","c":{"a":0,"k":[0.6588235294117647,0.803921568627451,0.9215686274509803,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":11},"lc":1,"lj":2,"ml":4},{"ty":"tm","s":{"a":0,"k":0},"e":{"a":1,"k":[{"t":26,"s":[0],"o":{"x":[0.4],"y":[0]},"i":{"x":[0.2],"y":[1]}},{"t":31,"s":[100]}]},"o":{"a":0,"k":0},"m":1},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":26,"s":[100]}]},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"gr","nm":"Glint","it":[{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[22,33],[33,22]],"i":[[0,0],[-4.939636758106168,2.123294942682765]],"o":[[2.1232949426827648,-4.939636758106168],[0,0]]}}},{"ty":"st","c":{"a":0,"k":[0.8941176470588236,0.9411764705882353,0.9764705882352941,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":7},"lc":2,"lj":2,"ml":4},{"ty":"tm","s":{"a":0,"k":0},"e":{"a":1,"k":[{"t":30,"s":[0],"o":{"x":[0.4],"y":[0]},"i":{"x":[0.2],"y":[1]}},{"t":38,"s":[100]}]},"o":{"a":0,"k":0},"m":1},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":30,"s":[100]}]},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"gr","nm":"Lens","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[41,7],[75,41],[41,75],[7,41]],"i":[[-18.778200000000002,0],[0,-18.778200000000002],[18.778200000000002,0],[0,18.778200000000002]],"o":[[18.778200000000002,0],[0,18.778200000000002],[-18.778200000000002,0],[0,-18.778200000000002]]}}},{"ty":"st","c":{"a":0,"k":[0.6588235294117647,0.803921568627451,0.9215686274509803,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":14},"lc":2,"lj":2,"ml":4},{"ty":"tm","s":{"a":0,"k":0},"e":{"a":1,"k":[{"t":5,"s":[0],"o":{"x":[0.4],"y":[0]},"i":{"x":[0.2],"y":[1]}},{"t":30,"s":[100]}]},"o":{"a":0,"k":0},"m":1},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":1,"k":[{"t":0,"s":[0],"h":1},{"t":5,"s":[100]}]},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}]},{"ddd":0,"ind":2,"ty":4,"nm":"Background","sr":1,"ip":0,"op":75,"st":0,"bm":0,"ks":{"o":{"a":1,"k":[{"t":0,"s":[0],"o":{"x":[0.3],"y":[0]},"i":{"x":[0.7],"y":[1]}},{"t":8,"s":[100]}]},"r":{"a":0,"k":0},"p":{"a":0,"k":[64,64,0]},"a":{"a":0,"k":[64,64,0]},"s":{"a":1,"k":[{"t":0,"s":[85,85,100],"o":{"x":[0.2,0.2,0.2],"y":[0,0,0]},"i":{"x":[0.2,0.2,0.2],"y":[1,1,1]}},{"t":14,"s":[100,100,100]}]}},"shapes":[{"ty":"gr","nm":"Tile","it":[{"ty":"rc","p":{"a":0,"k":[64,64]},"s":{"a":0,"k":[128,128]},"r":{"a":0,"k":28},"d":1},{"ty":"fl","c":{"a":0,"k":[0.10980392156862745,0.15294117647058825,0.25098039215686274,1]},"o":{"a":0,"k":100},"r":1},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}]}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"v":"5.7.0","fr":30,"ip":0,"op":48,"w":128,"h":128,"nm":"cocheck-loader","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Magnifier","parent":3,"sr":1,"ip":0,"op":48,"st":0,"bm":0,"ks":{"o":{"a":0,"k":100},"r":{"a":1,"k":[{"t":0,"s":[0],"o":{"x":[0.167],"y":[0.167]},"i":{"x":[0.833],"y":[0.833]}},{"t":48,"s":[-360]}]},"p":{"a":0,"k":[5,0,0]},"a":{"a":0,"k":[41,41,0]},"s":{"a":0,"k":[70,70,100]}},"shapes":[{"ty":"gr","nm":"Grip","it":[{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[83,83],[100,100]],"i":[[0,0],[0,0]],"o":[[0,0],[0,0]]}}},{"ty":"st","c":{"a":0,"k":[0.6588235294117647,0.803921568627451,0.9215686274509803,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":22},"lc":2,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"gr","nm":"Neck","it":[{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[69,69],[80,80]],"i":[[0,0],[0,0]],"o":[[0,0],[0,0]]}}},{"ty":"st","c":{"a":0,"k":[0.6588235294117647,0.803921568627451,0.9215686274509803,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":11},"lc":1,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"gr","nm":"Glint","it":[{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[22,33],[33,22]],"i":[[0,0],[-4.939636758106168,2.123294942682765]],"o":[[2.1232949426827648,-4.939636758106168],[0,0]]}}},{"ty":"st","c":{"a":0,"k":[0.8941176470588236,0.9411764705882353,0.9764705882352941,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":7},"lc":2,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"gr","nm":"Lens","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[41,7],[75,41],[41,75],[7,41]],"i":[[-18.778200000000002,0],[0,-18.778200000000002],[18.778200000000002,0],[0,18.778200000000002]],"o":[[18.778200000000002,0],[0,18.778200000000002],[-18.778200000000002,0],[0,-18.778200000000002]]}}},{"ty":"st","c":{"a":0,"k":[0.6588235294117647,0.803921568627451,0.9215686274509803,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":14},"lc":2,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}]},{"ddd":0,"ind":2,"ty":4,"nm":"Background","sr":1,"ip":0,"op":48,"st":0,"bm":0,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[64,64,0]},"a":{"a":0,"k":[64,64,0]},"s":{"a":0,"k":[100,100,100]}},"shapes":[{"ty":"gr","nm":"Tile","it":[{"ty":"rc","p":{"a":0,"k":[64,64]},"s":{"a":0,"k":[128,128]},"r":{"a":0,"k":28},"d":1},{"ty":"fl","c":{"a":0,"k":[0.10980392156862745,0.15294117647058825,0.25098039215686274,1]},"o":{"a":0,"k":100},"r":1},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}]},{"ddd":0,"ind":3,"ty":3,"nm":"Orbit","sr":1,"ip":0,"op":48,"st":0,"bm":0,"ks":{"o":{"a":0,"k":0},"r":{"a":1,"k":[{"t":0,"s":[0],"o":{"x":[0.167],"y":[0.167]},"i":{"x":[0.833],"y":[0.833]}},{"t":48,"s":[360]}]},"p":{"a":0,"k":[54.7,52.7,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}}}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"v":"5.7.0","fr":30,"ip":0,"op":84,"w":128,"h":128,"nm":"cocheck-loader-spin","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Handle","sr":1,"ip":0,"op":84,"st":0,"bm":0,"ks":{"o":{"a":0,"k":100},"r":{"a":1,"k":[{"t":0,"s":[0],"o":{"x":[0.5],"y":[0.0]},"i":{"x":[0.5],"y":[1.0]}},{"t":20,"s":[0],"o":{"x":[0.5],"y":[0.0]},"i":{"x":[0.5],"y":[1.0]}},{"t":62,"s":[360],"o":{"x":[0.5],"y":[0.0]},"i":{"x":[0.5],"y":[1.0]}},{"t":84,"s":[360]}]},"p":{"a":1,"k":[{"t":0,"s":[54.7,52.7,0],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":6,"s":[54.7,52.7,0],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":20,"s":[64,64,0],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":62,"s":[64,64,0],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":76,"s":[54.7,52.7,0],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":84,"s":[54.7,52.7,0]}]},"a":{"a":0,"k":[41,41,0]},"s":{"a":1,"k":[{"t":0,"s":[70,70,100],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":6,"s":[70,70,100],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":20,"s":[62,62,100],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":62,"s":[62,62,100],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":76,"s":[70,70,100],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":84,"s":[70,70,100]}]}},"shapes":[{"ty":"gr","nm":"Grip","it":[{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[83,83],[100,100]],"i":[[0,0],[0,0]],"o":[[0,0],[0,0]]}}},{"ty":"st","c":{"a":0,"k":[0.6588235294117647,0.803921568627451,0.9215686274509803,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":22},"lc":2,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"gr","nm":"Neck","it":[{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[69,69],[80,80]],"i":[[0,0],[0,0]],"o":[[0,0],[0,0]]}}},{"ty":"st","c":{"a":0,"k":[0.6588235294117647,0.803921568627451,0.9215686274509803,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":11},"lc":1,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}]},{"ddd":0,"ind":2,"ty":4,"nm":"Lens","sr":1,"ip":0,"op":84,"st":0,"bm":0,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"t":0,"s":[54.7,52.7,0],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":6,"s":[54.7,52.7,0],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":20,"s":[64,64,0],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":62,"s":[64,64,0],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":76,"s":[54.7,52.7,0],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":84,"s":[54.7,52.7,0]}]},"a":{"a":0,"k":[41,41,0]},"s":{"a":1,"k":[{"t":0,"s":[70,70,100],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":6,"s":[70,70,100],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":20,"s":[62,62,100],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":62,"s":[62,62,100],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":76,"s":[70,70,100],"o":{"x":[0.4,0.4,0.4],"y":[0.0,0.0,0.0]},"i":{"x":[0.2,0.2,0.2],"y":[1.0,1.0,1.0]}},{"t":84,"s":[70,70,100]}]}},"shapes":[{"ty":"gr","nm":"Glint","it":[{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[22,33],[33,22]],"i":[[0,0],[-4.939636758106168,2.123294942682765]],"o":[[2.1232949426827648,-4.939636758106168],[0,0]]}}},{"ty":"st","c":{"a":0,"k":[0.8941176470588236,0.9411764705882353,0.9764705882352941,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":7},"lc":2,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"gr","nm":"Lens","it":[{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[41,7],[75,41],[41,75],[7,41]],"i":[[-18.778200000000002,0],[0,-18.778200000000002],[18.778200000000002,0],[0,18.778200000000002]],"o":[[18.778200000000002,0],[0,18.778200000000002],[-18.778200000000002,0],[0,-18.778200000000002]]}}},{"ty":"st","c":{"a":0,"k":[0.6588235294117647,0.803921568627451,0.9215686274509803,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":14},"lc":2,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}]},{"ddd":0,"ind":3,"ty":4,"nm":"Background","sr":1,"ip":0,"op":84,"st":0,"bm":0,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[64,64,0]},"a":{"a":0,"k":[64,64,0]},"s":{"a":0,"k":[100,100,100]}},"shapes":[{"ty":"gr","nm":"Tile","it":[{"ty":"rc","p":{"a":0,"k":[64,64]},"s":{"a":0,"k":[128,128]},"r":{"a":0,"k":28},"d":1},{"ty":"fl","c":{"a":0,"k":[0.10980392156862745,0.15294117647058825,0.25098039215686274,1]},"o":{"a":0,"k":100},"r":1},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}]}]}
|