@canonry/canonry 7.121.0 → 7.123.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/assets/agent-workspace/skills/aero/SKILL.md +6 -4
- package/assets/agent-workspace/skills/aero/references/orchestration.md +2 -2
- package/assets/agent-workspace/skills/aero/references/reporting.md +1 -1
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +3 -2
- package/assets/assets/{AccessControls-CP27J4pe.js → AccessControls-qKt0MIwz.js} +2 -2
- package/assets/assets/{AgentSetupPage-Cr4N8PtT.js → AgentSetupPage-CS6TAG_q.js} +4 -4
- package/assets/assets/{AuditHistoryPanel-DLQzK10v.js → AuditHistoryPanel-C9muxa5U.js} +1 -1
- package/assets/assets/{BacklinksPage-DQL-PEeM.js → BacklinksPage-YSi04rze.js} +1 -1
- package/assets/assets/{ChartPrimitives-C-1eZmHk.js → ChartPrimitives-DA5ldw5q.js} +1 -1
- package/assets/assets/{Hint-DiyoPGOX.js → Hint-Drf3KqdJ.js} +1 -1
- package/assets/assets/{HistoryPage-BBzUc2Ba.js → HistoryPage-tTCABHZr.js} +1 -1
- package/assets/assets/{InfoTooltip-laRfQjZw.js → InfoTooltip-Dm4gYO4N.js} +1 -1
- package/assets/assets/MeasurementPropertyPage-B-eHRFSF.js +4 -0
- package/assets/assets/ProjectPage-DK7y3uMN.js +15 -0
- package/assets/assets/{RunsPage-D4ul_xdH.js → RunsPage-B6HxjqFp.js} +1 -1
- package/assets/assets/ServerTrafficSection-BCPF6Rxk.js +41 -0
- package/assets/assets/SettingsPage-Dlsqc0Xk.js +1 -0
- package/assets/assets/{ToneBadge-co0skd0y.js → ToneBadge-BekCDc9B.js} +3 -3
- package/assets/assets/{TrafficPage-DXjB09Mc.js → TrafficPage-CcZ2VKWS.js} +1 -1
- package/assets/assets/TrafficSourceDetailPage-BUWRBlEj.js +1 -0
- package/assets/assets/{account-context-DtBBZ6kn.js → account-context-CTgTl_U3.js} +1 -1
- package/assets/assets/{agent-trust-copy-KHOU1_xL.js → agent-trust-copy-C3Su6oTh.js} +1 -1
- package/assets/assets/{card-Cky0yiDz.js → card-fF4DLMtN.js} +1 -1
- package/assets/assets/index-CZK8ELxf.js +43 -0
- package/assets/assets/index-ODrMZLgB.css +1 -0
- package/assets/assets/preload-helper-D6vLhNAZ.js +1 -0
- package/assets/assets/{query-client-BGk_rgH_.js → query-client-bLCsQvmN.js} +1 -1
- package/assets/assets/react-query-DPn84_Mu.js +1 -0
- package/assets/assets/{react-sigma_core.esm.min-DY78Y3sE.js → react-sigma_core.esm.min-Dkaqqban.js} +1 -1
- package/assets/assets/{server-traffic-CqU3z6oz.js → server-traffic-CCdnHKbu.js} +1 -1
- package/assets/assets/service-CUnyHRGl.js +1 -0
- package/assets/assets/{use-tooltip-position-CM1lD8cm.js → use-tooltip-position-71Ffohl_.js} +1 -1
- package/assets/assets/vendor-lucide-C3F7vHjd.js +1 -0
- package/assets/assets/{vendor-markdown-CQdHmjWd.js → vendor-markdown-DMxglFrF.js} +1 -1
- package/assets/assets/{vendor-radix-WbUsEVSn.js → vendor-radix-CXYx3LLU.js} +1 -1
- package/assets/assets/{vendor-recharts-DCxaNd0O.js → vendor-recharts-DAGVAt0P.js} +1 -1
- package/assets/assets/{vendor-tanstack-C613NhXZ.js → vendor-tanstack-ZnWhYpCU.js} +1 -1
- package/assets/index.html +18 -18
- package/dist/activity-NEHRLN66.js +13 -0
- package/dist/{ads-RVWK3WOT.js → ads-OXZFLKFO.js} +4 -4
- package/dist/{agent-OSSTIYD5.js → agent-VMLMGUVU.js} +8 -8
- package/dist/{agent-ask-2SPA6RIE.js → agent-ask-IGL7KSBW.js} +4 -4
- package/dist/{agent-conversations-36UMFQY6.js → agent-conversations-ZQQJTVLM.js} +4 -4
- package/dist/{agent-journeys-TW2CF6JI.js → agent-journeys-Z3ZILTRB.js} +4 -4
- package/dist/{agent-memory-GD2X65LE.js → agent-memory-MEFTNQWG.js} +4 -4
- package/dist/{agent-providers-A4E2TUJ7.js → agent-providers-ZZ6RN4TB.js} +4 -4
- package/dist/{agent-transcript-JLHXL72N.js → agent-transcript-QK3OTZ7B.js} +4 -4
- package/dist/{analytics-BZ7FJTK4.js → analytics-VAJT24GQ.js} +4 -4
- package/dist/{apply-BJDXDQXK.js → apply-IWCME5ZF.js} +4 -4
- package/dist/{backfill-F2OC7F22.js → backfill-5E2D3HFJ.js} +11 -11
- package/dist/{backlinks-IGSJG4TC.js → backlinks-QVFDZZCI.js} +4 -4
- package/dist/{bing-HHWCD5QU.js → bing-JUCW5FTY.js} +4 -4
- package/dist/{bootstrap-5LOT7HNU.js → bootstrap-R2O2TPAR.js} +11 -11
- package/dist/{cdp-5XNSVSBE.js → cdp-VTQYZVW5.js} +8 -8
- package/dist/chunk-2DT55UKG.js +34 -0
- package/dist/{chunk-HGXAKSRX.js → chunk-2J6LXZPK.js} +1 -1
- package/dist/{chunk-3LJH6WL6.js → chunk-2RG6CSZB.js} +1 -1
- package/dist/{chunk-WKYQ7255.js → chunk-6URM26ZP.js} +2 -2
- package/dist/{chunk-UYRC244Y.js → chunk-73AQQAPC.js} +403 -294
- package/dist/{chunk-NGTWSJSP.js → chunk-7D735WS6.js} +1 -1
- package/dist/{chunk-6TKNNXDP.js → chunk-7E2TDSUH.js} +382 -370
- package/dist/{chunk-QE3PIF67.js → chunk-7G4YTMZE.js} +8 -8
- package/dist/{chunk-E6WE5AZN.js → chunk-AMVQA6NC.js} +28 -28
- package/dist/{chunk-SPNDMTXM.js → chunk-AUMR4UXI.js} +18 -5
- package/dist/{chunk-3CT756HO.js → chunk-BNL3BKXK.js} +1 -1
- package/dist/{chunk-F5UUN6UB.js → chunk-BSUAO3RJ.js} +1 -1
- package/dist/{chunk-RVRQJ2SA.js → chunk-BVJUYSOB.js} +2 -2
- package/dist/{chunk-X2WJ563G.js → chunk-CCBFBQFR.js} +3 -3
- package/dist/{chunk-ZA44DK2O.js → chunk-DMFFERXC.js} +1 -1
- package/dist/{chunk-GDAL3L25.js → chunk-DPUAVYEG.js} +4 -4
- package/dist/{chunk-XDCXC6DL.js → chunk-F3PBATIZ.js} +1 -1
- package/dist/{chunk-EGH7MBFI.js → chunk-F3UXTYXA.js} +4 -4
- package/dist/{chunk-VXBYTMSM.js → chunk-FLUYAMPP.js} +113 -37
- package/dist/{chunk-S6GBOBNO.js → chunk-HSYZCNXY.js} +2 -2
- package/dist/{chunk-NJTIZSBH.js → chunk-ITX7ELLK.js} +5 -5
- package/dist/{chunk-TH6JFDUI.js → chunk-LGD3K4G5.js} +4 -4
- package/dist/{chunk-LNBJ3ZEK.js → chunk-LQGTGSA5.js} +16 -3
- package/dist/{chunk-BB2KXNOG.js → chunk-LWGO6ETW.js} +2 -2
- package/dist/{chunk-LJ3MSVVW.js → chunk-NZOLX55S.js} +1 -1
- package/dist/{chunk-LZSY5GNZ.js → chunk-OCL6NZGL.js} +2 -2
- package/dist/{chunk-QFPQIPX3.js → chunk-QXUNANMR.js} +2 -2
- package/dist/{chunk-REDBG2JO.js → chunk-R2P6XGND.js} +5 -5
- package/dist/{chunk-D4G3FP7N.js → chunk-RBUT6DJG.js} +5 -5
- package/dist/{chunk-NZQWQK4N.js → chunk-RHH2K4BZ.js} +8 -4
- package/dist/{chunk-YETOLZWJ.js → chunk-SLHX5HBD.js} +4 -4
- package/dist/{chunk-G56TRFKC.js → chunk-TCHIEN67.js} +6 -6
- package/dist/{chunk-M2OSHVTB.js → chunk-TTK6ZZHK.js} +2 -2
- package/dist/{chunk-E6WLCHXT.js → chunk-XXSDKDKU.js} +4 -4
- package/dist/{chunk-CCFEMZI5.js → chunk-YWLJQ2FY.js} +1 -1
- package/dist/{chunk-IQGRGJFP.js → chunk-YXM6FPGD.js} +1 -1
- package/dist/{chunk-RHWKLRLF.js → chunk-Z6ZH7N6U.js} +3 -3
- package/dist/{chunk-TAFIB6LC.js → chunk-ZP6PZZAW.js} +3 -2
- package/dist/{citations-BJKMX32Y.js → citations-HQQQM73E.js} +5 -5
- package/dist/{cli-catalog-VK4DK55E.js → cli-catalog-STHVOXXT.js} +4 -4
- package/dist/cli-commands-AHQK2WVB.js +18 -0
- package/dist/cli.js +14 -14
- package/dist/{competitor-ONXSUUEJ.js → competitor-VP52MSQM.js} +4 -4
- package/dist/{content-U276NS4F.js → content-IHFS2BRF.js} +4 -4
- package/dist/{dashboard-SVYP4JIF.js → dashboard-S4KT2J34.js} +7 -7
- package/dist/{demo-CJEZXMD7.js → demo-E4Q6WQ5R.js} +3 -3
- package/dist/{demo-server-ASS76Y3T.js → demo-server-GYJZICT7.js} +15 -13
- package/dist/{discover-O6MXXTQP.js → discover-X2RATQCF.js} +5 -5
- package/dist/{discover-eval-RWCDKTW2.js → discover-eval-FEQ3HAM2.js} +4 -4
- package/dist/{doctor-LDHRSYBN.js → doctor-2CM5FVMJ.js} +4 -4
- package/dist/{evidence-HCQ3XGR3.js → evidence-5IAVY6JN.js} +4 -4
- package/dist/{export-cmd-FCD27XDA.js → export-cmd-LGXY4GIT.js} +4 -4
- package/dist/{ga-DNE32K5T.js → ga-KVFZSSFH.js} +4 -4
- package/dist/{gbp-BD6N5ZNR.js → gbp-PLSX7QBV.js} +4 -4
- package/dist/{google-JGLRBRDJ.js → google-R7HNCZNY.js} +5 -5
- package/dist/{google-marketing-VGDUCHDK.js → google-marketing-ZEU6ZNTS.js} +2 -2
- package/dist/{health-cmd-SSUFVJXH.js → health-cmd-UNYQIHHZ.js} +5 -5
- package/dist/{history-FPNPI3FR.js → history-IR234HUF.js} +4 -4
- package/dist/index.d.ts +33 -29
- package/dist/index.js +26 -26
- package/dist/{init-VSXHQ7IH.js → init-ZRVCNBSL.js} +13 -13
- package/dist/{insights-JXWPCIKX.js → insights-OQ4TYD7O.js} +4 -4
- package/dist/intelligence-service-G3EHHS35.js +15 -0
- package/dist/{journeys-ULUM5VHN.js → journeys-G72GTTDS.js} +4 -4
- package/dist/{keys-K7LFSZEV.js → keys-A2NSFAJR.js} +4 -4
- package/dist/{keyword-FEVMF4GU.js → keyword-4ECZAEFL.js} +4 -4
- package/dist/{logs-IFSEC6EG.js → logs-OMBVVMGA.js} +4 -4
- package/dist/{mcp-GEHAKVJQ.js → mcp-OALO7GAG.js} +5 -5
- package/dist/mcp.js +10 -10
- package/dist/{measurement-plan-P3VN75M2.js → measurement-plan-3KJSVBMM.js} +6 -6
- package/dist/{notify-J4FVK5NC.js → notify-AYBCSPXF.js} +4 -4
- package/dist/{organic-evidence-X53DBTMQ.js → organic-evidence-XMS6WPCR.js} +4 -4
- package/dist/{overview-F3LYI5W4.js → overview-K4RBEW7T.js} +52 -29
- package/dist/{project-RXT5IJKZ.js → project-KGIYKLEE.js} +4 -4
- package/dist/{project-setup-ATO24GGB.js → project-setup-OBS4PSB4.js} +4 -4
- package/dist/{query-LGPJDI56.js → query-TJAMHSAJ.js} +4 -4
- package/dist/{research-BHOCLEHN.js → research-REDM6KKM.js} +4 -4
- package/dist/{results-export-PFKBOBPA.js → results-export-E7P2G3FV.js} +4 -4
- package/dist/{run-ASLSXRUQ.js → run-43C6BWTO.js} +6 -6
- package/dist/{schedule-SQOLIVNL.js → schedule-B4TSMTC4.js} +4 -4
- package/dist/{search-3ZHHJHIN.js → search-VE7DGSD7.js} +4 -4
- package/dist/{serve-63VQPOQF.js → serve-LWXCQAA2.js} +27 -27
- package/dist/{session-KZJB4SN3.js → session-4FP4QJTN.js} +14 -14
- package/dist/{settings-JOPGFAZS.js → settings-W3SCNC25.js} +4 -4
- package/dist/{sitemaps-AAEYPCF3.js → sitemaps-YPD7U2ZP.js} +4 -4
- package/dist/{skills-IWK7KYBF.js → skills-K6BM2BQV.js} +3 -3
- package/dist/{snapshot-N45FCZO3.js → snapshot-GK6G72YF.js} +4 -4
- package/dist/{src-D5YFNRUG.js → src-RUWMU4ZS.js} +2 -2
- package/dist/{status-O4GQAJV5.js → status-I23DTMWM.js} +6 -6
- package/dist/{support-RNNKG6QY.js → support-PEI7R4MY.js} +2 -2
- package/dist/{technical-aeo-IMGI4ST7.js → technical-aeo-W5ZF2TPH.js} +4 -4
- package/dist/{telemetry-ELCKZQGI.js → telemetry-YV6IHYS7.js} +5 -5
- package/dist/{tools-7NYNPJTI.js → tools-46YC2R4V.js} +12 -12
- package/dist/{traffic-NJ476WXB.js → traffic-SQ4O6QW6.js} +6 -6
- package/dist/{trends-ULBZCMKS.js → trends-MCDIYFQB.js} +4 -4
- package/dist/{users-TFQRXDHF.js → users-R66ASOSH.js} +4 -4
- package/dist/{visibility-stats-Q3F5ORLR.js → visibility-stats-7XTGKFPE.js} +5 -5
- package/dist/{wordpress-JPDUJ7ZW.js → wordpress-ZMNF2C2H.js} +4 -4
- package/package.json +1 -1
- package/assets/assets/MeasurementPropertyPage-BQorimIL.js +0 -4
- package/assets/assets/ProjectPage-5TzCjfke.js +0 -15
- package/assets/assets/ServerTrafficSection-Dbg74DP1.js +0 -41
- package/assets/assets/SettingsPage-BlCcsRj8.js +0 -1
- package/assets/assets/TrafficSourceDetailPage-Bs-C93Kj.js +0 -1
- package/assets/assets/index-C9Op8ix9.css +0 -1
- package/assets/assets/index-KAuh2d07.js +0 -43
- package/assets/assets/preload-helper-BzmljT8n.js +0 -1
- package/assets/assets/react-query-DOCVYs22.js +0 -1
- package/assets/assets/service-BNdGdFA8.js +0 -1
- package/assets/assets/vendor-lucide-7AWeFVeL.js +0 -1
- package/dist/cli-commands-RQU2FMPV.js +0 -18
- package/dist/intelligence-service-XCADQRDI.js +0 -15
|
@@ -48,8 +48,10 @@ covering that work; an existing explicit authorization remains valid.
|
|
|
48
48
|
- **What changed in the latest check (both types):** quote the overview's
|
|
49
49
|
`whatChanged`, the counts the dashboard's What changed card shows, rather
|
|
50
50
|
than recounting answers. `lostMentions` and `lostCitations` each count the
|
|
51
|
-
queries that lost that signal
|
|
52
|
-
|
|
51
|
+
queries that lost that signal, and `gainedMentions` / `gainedCitations` the
|
|
52
|
+
queries that gained it (`queryCount`; `queries` lists at most 25, with
|
|
53
|
+
`truncated: true` when there are more). The four stay separate, and one
|
|
54
|
+
query can lose on one engine and gain on another. Read
|
|
53
55
|
`comparison` first. When its `state` is `unavailable`, nothing was
|
|
54
56
|
compared, so a 0 is unknown, not stable: say why from its `reason`.
|
|
55
57
|
`not-measured` there means the project has no completed check yet; it says
|
|
@@ -79,8 +81,8 @@ covering that work; an existing explicit authorization remains valid.
|
|
|
79
81
|
population. These conditioned reads provide counts, not competitive share
|
|
80
82
|
of voice. Per-Property named-instead lists sample weak Properties.
|
|
81
83
|
- What changed: the overview's `whatChanged` for the latest check, as the
|
|
82
|
-
dashboard card shows it (each lost query with its Properties
|
|
83
|
-
markets). For movement per Property, `canonry_measurement_changes` once
|
|
84
|
+
dashboard card shows it (each lost or gained query with its Properties
|
|
85
|
+
and markets). For movement per Property, `canonry_measurement_changes` once
|
|
84
86
|
per class, with its `distribution` and `withinNoise`; the noise rule
|
|
85
87
|
below applies before calling a Property's movement a loss.
|
|
86
88
|
- Which metros have the biggest gaps: the compact portfolio summary's
|
|
@@ -40,7 +40,7 @@ Steps:
|
|
|
40
40
|
Trigger: A stored comparison shows a decline, or a `mention.lost` or `citation.lost` notification arrives.
|
|
41
41
|
|
|
42
42
|
Steps:
|
|
43
|
-
1. `cnry overview <project> --format json` → read current class-specific coverage and scoped mention share. Its `whatChanged` already lists what the latest check lost: `lostMentions` first, then `lostCitations`, each query once with the engines and locations (and for Advanced the Properties and markets)
|
|
43
|
+
1. `cnry overview <project> --format json` → read current class-specific coverage and scoped mention share. Its `whatChanged` already lists what the latest check lost and gained: `lostMentions` first, then `lostCitations`, then `gainedMentions` / `gainedCitations`, each query once per direction with the engines and locations (and for Advanced the Properties and markets) where it moved. These are the dashboard's What changed counts, so start from them instead of recounting. Check `comparison` first: when it is `unavailable`, nothing was compared and a 0 is unknown. When `truncated` is true, `queries` lists only the first 25 of `queryCount`. Then `cnry analytics <project> --feature gaps --format json` (`mentionGap[]` / `notMentioned[]`) and `cnry citations visibility <project> --format json` for the per-query × engine drilldown (which signal actually dropped on which provider; a `not-measured` citation never dropped).
|
|
44
44
|
2. Read `cnry visibility-stats <project> --by-provider --format json` for the affected query's per-engine samples. Use `--since` and `--until` to select the periods.
|
|
45
45
|
3. Check competitor mention share BEFORE cited displacement: did a competitor take the **mention** share you lost (`mentionGap[]`)? Only then ask whether a competitor gained the **citation** you lost.
|
|
46
46
|
4. Read stored indexing evidence for the exact URL with `cnry google inspections <project> --url <url>` or `canonry_gsc_inspections`. State the inspection date.
|
|
@@ -70,7 +70,7 @@ Trigger: Scheduled (weekly, or on-demand)
|
|
|
70
70
|
Steps:
|
|
71
71
|
1. Read `cnry overview <project> --format json` for class-specific coverage and scoped mention share. Use the gaps and per-query reads for detail.
|
|
72
72
|
2. Compare compatible stored periods/runs using the reporting or portfolio playbook — mention rate + mention share first, cited rate second
|
|
73
|
-
3. Compute deltas: mentions gained/lost/stable (primary), then citations gained/lost/stable (secondary). The latest check's losses are the overview's `whatChanged
|
|
73
|
+
3. Compute deltas: mentions gained/lost/stable (primary), then citations gained/lost/stable (secondary). The latest check's losses and gains are the overview's `whatChanged` lost and gained counts (check `comparison` and `truncated`); compare stored runs only for sweeps before it.
|
|
74
74
|
4. Flag any new regressions not yet addressed (lead with lost mentions)
|
|
75
75
|
5. Check competitor movement — mention share swing first, then cited-domain displacement
|
|
76
76
|
6. Generate summary with key changes + recommended next steps
|
|
@@ -100,7 +100,7 @@ and requires explicit approval; preparing a summary does not authorize it.
|
|
|
100
100
|
- Mention share (non-brand): <X>% (Δ<+/-Y>% from last week) ← share-of-voice vs competitors; NEVER pooled with branded
|
|
101
101
|
- Cited rate: <X>% (Δ<+/-Y>% from last week) ← secondary signal; "not measured" when null, never 0%
|
|
102
102
|
- Regressions: <N> new, <N> resolved (lead with lost mentions; note lost citations second) ← latest check: the overview's whatChanged.lostMentions / lostCitations queryCount; comparison unavailable = not compared, never 0
|
|
103
|
-
- Gains: <N> new mentions / <N> new citations
|
|
103
|
+
- Gains: <N> new mentions / <N> new citations ← latest check: whatChanged.gainedMentions / gainedCitations queryCount (absent from servers before 7.123.0)
|
|
104
104
|
- Providers monitored: <N>
|
|
105
105
|
|
|
106
106
|
## Key Changes
|
|
@@ -262,6 +262,7 @@ cnry run fill <run-id> [--provider claude] --wait # record a partial run's miss
|
|
|
262
262
|
cnry runs <project> --limit 10 # list recent runs, including probes
|
|
263
263
|
cnry run list <project> --kind traffic-sync --status failed --since 2026-10-01T00:00:00Z --limit 20 --format json
|
|
264
264
|
cnry run show <id> # show run details
|
|
265
|
+
cnry activity [--since <iso>] --format json # jobs needing attention across projects: each job's latest failed, partial, cancelled, queued or running run (the dashboard's Activity)
|
|
265
266
|
```
|
|
266
267
|
|
|
267
268
|
`run list <project>` and `runs <project>` read the same stored history. Filters
|
|
@@ -845,9 +846,9 @@ A webhook that lists either event receives **only the health events it lists**,
|
|
|
845
846
|
|
|
846
847
|
For mention-first monitoring, use `cnry overview` to read `mentionCoverage.populations`, `scores.mentionShare`, and `whatChanged.lostMentions`. The citation webhooks report citation changes. See `cnry notify events --target server` for available events.
|
|
847
848
|
|
|
848
|
-
**What changed.** `cnry overview <project>` prints the dashboard's "What changed" rows: the queries that lost a mention and those that lost a citation in the latest check (each query once, the two signals counted apart, with the engines, locations, and for Advanced the Properties and markets
|
|
849
|
+
**What changed.** `cnry overview <project>` prints the dashboard's "What changed" rows: the queries that lost or gained a mention and those that lost or gained a citation in the latest check (each query once per direction, the two signals counted apart, with the engines, locations, and for Advanced the Properties and markets where it moved) and the runs in progress. A query can lose a signal on one engine and gain it on another, so it can count on both sides. `cnry overview --all` prints the portfolio's rows under its table, names the projects that were compared and did not change and those whose latest check could not be compared, and then prints Activity (the same list as `cnry activity`, read with the same `--since`). A project is called unchanged, and the all-clear says no mentions or citations changed, only when its server measured gains too; against a server before 7.123.0 the all-clear says no lost mentions or citations. JSON carries them as `whatChanged`: `lostMentions` / `gainedMentions` / `lostCitations` / `gainedCitations` (`queryCount`, at most 25 `queries`, `truncated`; servers before 7.123.0 send no `gained*`), `activeRuns`, the rows as `items`, and `comparison`. Simple compares each engine's answer with its previous check of the same query and location; Advanced compares each Property's answer with the comparable previous sweep.
|
|
849
850
|
|
|
850
|
-
`comparison` is `{ "state": "available", "previousRunIds" }` when the latest check was compared. Otherwise it is `{ "state": "unavailable", "reason" }`, and the
|
|
851
|
+
`comparison` is `{ "state": "available", "previousRunIds" }` when the latest check was compared. Otherwise it is `{ "state": "unavailable", "reason" }`, and the counts are 0 because nothing was compared, not because nothing moved:
|
|
851
852
|
|
|
852
853
|
- `not-measured`: the project has no completed check yet. It says nothing about any answer's citation.
|
|
853
854
|
- `no-previous-check`: the latest check is the first, so there is nothing earlier to compare it with.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./vendor-markdown-
|
|
2
|
-
`)}function C(e,a){let o=
|
|
1
|
+
import{r as e}from"./vendor-markdown-DMxglFrF.js";import{Mc as t,al as n,js as r,nl as i,r as a}from"./ToneBadge-BekCDc9B.js";import{D as o,E as s,h as c}from"./ChartPrimitives-DA5ldw5q.js";import{n as l,r as u}from"./account-context-CTgTl_U3.js";import{a as d,i as ee,n as te,r as f,t as ne}from"./card-fF4DLMtN.js";var p=`__cited__`,m=`__mentioned__`,h=`__mentionShare__`;function g(e){let t=e,{dataStartDate:n,dataEndDate:r}=t;return typeof n!=`string`||typeof r!=`string`?null:{start:c(n),end:c(r),sweepCount:t.sweepCount??1}}function _(e,t=new Date){return o(e,t)}function v(e,t=new Date){let n=g(e);if(!n)return null;let r=_(n.start,t),i=_(n.end,t);return r===i?r:`${r} to ${i}`}function y(e,t=new Date){let n=g(e),r=v(e,t);return!n||!r?`Check date unavailable`:`${r} · ${n.sweepCount} ${n.sweepCount===1?`check`:`checks`}`}function b(e){let t=g(e);return t?s(t.start):``}function x(e){return e.trim().toLowerCase()}function S(e,t={}){return e.map(e=>{let n=e.trim().toLowerCase(),r=(t[e]??[]).map(e=>e.trim().toLowerCase()).filter(Boolean).sort();return n&&r.length>0?`${n}=${r.join(`|`)}`:n}).filter(Boolean).sort().join(`
|
|
2
|
+
`)}function C(e,a){let o=n(e);if(o){let n=a?.find(e=>e.name===`openrouter`)?.knownModels??a?.find(t=>t.name===e)?.knownModels;return`${t(o,n)} via OpenRouter`}let s=a?.find(t=>t.name===e)?.displayName?.trim();return r(e,a)??(s||i(e))}function w(e){return Math.round(e*1e3)/10}function T(e){return e===null?null:w(e)}function E(e){return e.byProvider??{}}function re(e,t,n){let r=e.buckets.length>0,i=e.buckets.length===1;if(n===`overall`){let n=t===`cited`?p:m,a=t===`cited`?`citationRate`:`mentionRate`;return{rows:e.buckets.map(e=>({date:e.startDate,[n]:T(e[a])})),series:[n],hasData:r,singleBucket:i}}let a=t===`mentioned`?`mentionRate`:`citationRate`,o=[...new Set(e.buckets.flatMap(e=>Object.keys(E(e))))].sort();return{rows:e.buckets.map(e=>{let t={date:e.startDate},n=E(e);for(let e of o){let r=n[e];t[e]=r?T(r[a]):null}return t}),series:o,hasData:r,singleBucket:i}}function ie(e){let t=e;return Object.hasOwn(t,`modelEvidenceByProvider`)?t.modelEvidenceByProvider??{}:null}function ae(e){let t=e;return Object.hasOwn(t,`modelAttribution`)?t.modelAttribution??{}:null}function oe(e){return e.servedModelAttribution??{}}function D(e){return e.modelServiceMismatch??{}}function O(e){return e.modelPointerChanges??{}}function k(e){return e.length<=1?e[0]??``:`${e.slice(0,-1).join(`, `)} and ${e[e.length-1]}`}function A(e){switch(e.status){case`known`:return e.model.includes(`/`)?t(e.model):e.model;case`unknown`:return`Unknown model`;case`mixed`:return e.models.length===0?`Unknown model`:`${e.models.map(e=>e.includes(`/`)?t(e):e).join(`, `)}${e.includesUnknown?` and an unknown model`:``}`}}function j(e){return k([...e.models.map(e=>e.includes(`/`)?t(e):e),...e.includesUnknown?[`an unknown model`]:[]])}function M(e){let t=new Map;for(let[n,r]of Object.entries(e))for(let e of r.events){let r=t.get(e.bucketStartDate)??[];r.push({provider:n,event:e}),t.set(e.bucketStartDate,r)}return[...t.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({bucketStartDate:e,events:[...t].sort((e,t)=>e.provider.localeCompare(t.provider)||e.event.observedAt.localeCompare(t.event.observedAt))}))}function N(e){let t={},n=[];for(let[r,i]of Object.entries(e)){let e=i.events.filter(e=>!e.fromPreWindowAnchor);for(let e of i.events)e.fromPreWindowAnchor&&n.push({provider:r,event:e});e.length>0&&(t[r]={...i,events:e})}return{buckets:M(t),beforeWindow:n.sort((e,t)=>e.event.observedAt.localeCompare(t.event.observedAt)||e.provider.localeCompare(t.provider))}}function P(e){let t=[];for(let[n,r]of Object.entries(e)){let e=r.eventTotal??r.events.length;e>r.events.length&&t.push({provider:n,shown:r.events.length,total:e})}return t.sort((e,t)=>e.provider.localeCompare(t.provider))}function F(e){let t=e.buckets.map(e=>{let t=e.mentionShare;return{date:e.startDate,[h]:t?.rate==null?null:w(t.rate)}}),n=t.map(e=>e[h]).filter(e=>typeof e==`number`&&Number.isFinite(e));return{rows:t,series:[h],hasData:n.length>0,singleBucket:n.length===1}}function I(e,t,n){return t===`mentionShare`?F(e):re(e,t,n)}function L(e,t){if(t===`mentionShare`)return e.buckets.flatMap(e=>{let t=e.mentionShare?.rate;return typeof t==`number`&&Number.isFinite(t)?[t]:[]});let n=t===`cited`?`citationRate`:`mentionRate`;return e.buckets.flatMap(e=>{let t=e[n];return t===null?[]:[t]})}function R(e){return e.buckets.some(e=>e.citationRate!==null)}function z(e,t){let n=e.buckets.flatMap(e=>{let n=E(e)[t];return n?[n]:[]});return n.length>0&&n.every(e=>e.citationRate===null)}function B(e,t){let n=e.windowChange;if(!n)return null;switch(t){case`cited`:return n.citationRate;case`mentioned`:return n.mentionRate;case`mentionShare`:return n.mentionShare}}function V(e,t,n){let r=n===`mentioned`?`mentionRate`:`citationRate`;for(let n=e.buckets.length-1;n>=0;n--){let i=E(e.buckets[n])[t]?.[r];if(i!=null)return i}return null}function H(e){return Date.parse(e)}function U(e,t){let n=g(e);if(!n)return!1;let r=H(t);return r>=H(n.start)&&r<=H(n.end)}function W(e){return e.basketChanges??[]}function G(e,t){return t.filter(t=>U(e,t.at)).sort((e,t)=>H(e.at)-H(t.at))}function K(e,t){return x(e)===`perplexity`&&t.status===`known`&&!t.model.includes(`/`)}function se(e){return Object.entries(e).filter(([e,t])=>!K(e,t.configured)).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({provider:e,mismatch:t}))}function ce(e){return[...W(e)].sort((e,t)=>H(t.at)-H(e.at)).map(e=>({at:c(e.at),added:e.added,removed:e.removed}))}function le(e,t){let n=[...e.events].sort((e,t)=>H(e.observedAt)-H(t.observedAt)),r=n[0]?.from??e.latestObservation.state;for(let e of n)H(e.observedAt)<=H(t)&&(r=e.to);return r}function q(e,t,n,r){return{provider:e,at:c(t.observedAt),onOrBefore:t.fromPreWindowAnchor===!0,anchorAt:t.anchorObservedAt?c(t.anchorObservedAt):null,from:t.from,to:t.to,served:n,reroute:r}}function ue(e,t){let n=[];for(let[r,i]of Object.entries(e)){let e=t[r]?.events??[],a=new Set(i.events.map(e=>e.observedAt));for(let t of i.events){let i=K(r,t.to)?e.find(e=>e.observedAt===t.observedAt):void 0;n.push(q(r,t,i?{from:i.from,to:i.to}:null,!1))}for(let t of e)a.has(t.observedAt)||K(r,le(i,t.observedAt))&&n.push(q(r,t,null,!0))}return n.sort((e,t)=>H(t.at)-H(e.at)||e.provider.localeCompare(t.provider))}function de({latest:e,queryChanges:t,modelRows:n,now:r=new Date}){let i=[...t.map(e=>e.at),...n.map(e=>e.at)];if(i.length===0)return null;let a=t=>e!==void 0&&U(e,t),o=t.filter(e=>a(e.at)),s=o.reduce((e,t)=>e+t.added.length,0),c=o.reduce((e,t)=>e+t.removed.length,0),l=n.filter(e=>a(e.at)).length,u=e?v(e,r):null;if(u===null||s+c+l===0)return`No changes since ${_(i.reduce((e,t)=>H(t)>H(e)?t:e),r)}`;let d=[u];return s>0&&d.push(`${s} ${s===1?`query`:`queries`} added`),c>0&&d.push(`${c} ${c===1?`query`:`queries`} removed`),l>0&&d.push(`${l} new ${l===1?`model`:`models`}`),d.join(` · `)}function fe(e,t,n,r=null){let i=H(e);if(!Number.isFinite(i))return null;let a=t.filter(e=>H(e)<i);if(a.length>0)return c(a.reduce((e,t)=>H(t)>H(e)?t:e));let o=n.map(e=>g(e)).filter(e=>e!==null).sort((e,t)=>H(e.start)-H(t.start)),s=o.findIndex(e=>H(e.start)<=i&&i<=H(e.end));if(s===-1)return null;let l=o[s];return H(l.start)===i?s>0?o[s-1].end:r&&H(r)<i?c(r):null:l.sweepCount===2&&H(l.end)===i?l.start:null}function pe(e){let t=new Map,n=(e,n)=>{let r=t.get(e);r?r.push(n):t.set(e,[n])};for(let t of[...e].sort((e,t)=>e.revision-t.revision)){let e=H(t.at);for(let r of t.removed)n(r,{at:e,member:!1});for(let r of t.added)n(r,{at:e,member:!0})}return new Map([...t].filter(([,e])=>e.at(-1).member))}function J(e,t){let n=!e[0].member;for(let r of e)r.at<=t&&(n=r.member);return n}function me(e,t,n){return e.some(e=>e.at>t&&e.at<=n)}function Y(e,t){let n=H(t.start),r=H(t.end);return t.sweepCount>2?me(e,n,r):J(e,n)!==J(e,r)}function X(e,t,n,r){let i=H(t),a=H(n),o={added:[],removed:[],removedAndAddedBack:[],addedAndRemovedAgain:[]},s=new Set;for(let[t,n]of pe(e)){if(!r(n))continue;s.add(t);let e=J(n,i),c=J(n,a);e===c?(e?o.removedAndAddedBack:o.addedAndRemovedAgain).push(t):(c?o.added:o.removed).push(t)}if(s.size===0)return null;let c=e=>[...e.added,...e.removed].some(e=>s.has(e)),l=e.filter(e=>H(e.at)>i&&H(e.at)<=a&&c(e)).sort((e,t)=>H(e.at)-H(t.at));return{changes:l,keys:[...new Set(l.flatMap(e=>[...e.added,...e.removed]))].filter(e=>s.has(e)),moves:o}}function he(e,t){if(e.length<2)return null;let n=e[0],r=e.at(-1),i=g(n),a=g(r),o=i?.start??n.startDate,s=a?.end??r.endDate,c=X(t,o,s,e=>J(e,H(o))!==J(e,H(s))||i!==null&&Y(e,i)||a!==null&&Y(e,a));return!c&&n.queryCount===r.queryCount?null:{...c??{changes:[],keys:[],moves:{added:[],removed:[],removedAndAddedBack:[],addedAndRemovedAgain:[]}},firstCount:n.queryCount,latestCount:r.queryCount}}function Z(e,t){let n=g(e);if(!n)return null;let r=X(t,n.start,n.end,e=>Y(e,n));return r?{...r,firstCount:e.queryCount,latestCount:e.queryCount}:null}function Q(e){return`${e} ${e===1?`query`:`queries`}`}function ge(e){let t=[],n=e=>t.length===0?Q(e):String(e);return e.added.length>0&&t.push(`${n(e.added.length)} added`),e.removed.length>0&&t.push(`${n(e.removed.length)} removed`),e.removedAndAddedBack.length>0&&t.push(`${Q(e.removedAndAddedBack.length)} removed and added back`),e.addedAndRemovedAgain.length>0&&t.push(`${Q(e.addedAndRemovedAgain.length)} added and removed again`),k(t)}function _e(e,t,n,r){return e?t!==`mentionShare`||n!==`non-brand`||!r?!1:e.keys.length>0&&e.keys.every(e=>r(e)===`branded`):!0}var $=e();function ve({disabled:e,title:t,...n}){let{canWrite:r}=u();return r?(0,$.jsx)(a,{disabled:e,title:t,...n}):(0,$.jsx)(a,{...n,disabled:!0,title:l})}function ye({title:e,children:t}){let{isAdmin:n}=u();return n?(0,$.jsx)($.Fragment,{children:t}):(0,$.jsxs)(ne,{className:`surface-card mx-auto mt-8 max-w-lg`,children:[(0,$.jsxs)(ee,{children:[(0,$.jsxs)(d,{children:[e,` is for administrators`]}),(0,$.jsx)(f,{children:`Your account has view-only access. You can read everything this install has measured; changing how it is set up needs an administrator account.`})]}),(0,$.jsx)(te,{children:(0,$.jsx)(`p`,{className:`supporting-copy`,children:`If you need to make a change here, ask an administrator on this install.`})})]})}export{W as A,P as B,L as C,ce as D,C as E,D as F,oe as I,_e as L,g as M,ae as N,ge as O,O as P,se as R,N as S,z as T,de as V,k as _,h as a,ue as b,R as c,b as d,v as f,K as g,_ as h,m as i,ie as j,he as k,S as l,A as m,ve as n,G as o,j as p,p as r,I as s,ye as t,y as u,V as v,Z as w,x,B as y,fe as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{$ as t,B as n,H as r,lt as i}from"./vendor-lucide-C3F7vHjd.js";import{r as a}from"./vendor-markdown-DMxglFrF.js";import{Cs as o,Mt as s,Nt as c,Ss as l,Vn as u,ht as d,jt as f,ln as p,r as m,t as h,un as g,ws as _}from"./ToneBadge-BekCDc9B.js";import{r as v}from"./account-context-CTgTl_U3.js";import{t as y}from"./async-handler-Bj3TnIRw.js";import{rt as b,st as x}from"./index-CZK8ELxf.js";var S=e(i(),1),C=`Use the official Canonry docs:
|
|
2
2
|
- Agent quickstart: https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent
|
|
3
3
|
- CLI reference: https://github.com/Canonry/canonry/blob/main/skills/canonry/references/canonry-cli.md
|
|
4
4
|
- Plugin setup: https://github.com/Canonry/canonry/blob/main/docs/plugins.md
|
|
@@ -15,16 +15,16 @@ ${C}Pick one path and stay on it. Use connected Canonry tools (plugin or MCP) on
|
|
|
15
15
|
5. Propose a bounded Agent Readiness audit scan: \`--max-pages 100\` for a first look, plus whether dead-link checking is on (it is off unless you pass \`--check-dead-links\`). Show the connected operation or the exact \`cnry agent-readiness run <project> --max-pages 100 --wait --format json\` command with the project name filled in, and wait for separate approval before scanning. \`--wait\` polls for up to 15 minutes and returns only the run id and status. If the status it returns is still \`queued\` or \`running\`, the scan has not finished: do not rerun it or report results, poll \`cnry agent-readiness progress <project> --run-id <run-id> --format json\` until it is terminal. If \`--wait\` outruns your own tool timeout first, recover the run id with \`cnry runs <project> --kind site-audit --limit 1 --format json\`, which returns the newest scan whatever its status, and poll the same way.
|
|
16
16
|
6. When the run is \`completed\` or \`partial\`, read \`cnry agent-readiness overview <project> --run-id <run-id> --format json\` first. It is the only one of these commands that carries \`termination\` and \`complete\`; the score and page-scores commands do not. Then read \`cnry agent-readiness score <project> --run-id <run-id> --format json\` and \`cnry agent-readiness page-scores <project> --run-id <run-id> --sort score-asc --limit 10 --format jsonl\`. Tell me the termination reason in plain words and whether the scan covered the whole site or stopped at a page, link, depth, or time limit. A \`partial\` run scored the pages it reached and not my site, so never present it as a full-site result. If it stopped early, the fix depends on the reason, so say which: a page or depth limit needs a larger budget, a time limit needs a smaller scan (a lower \`--max-pages\` or \`--max-depth\`). If the run failed or was cancelled, inspect the run error and stop.
|
|
17
17
|
7. Summarize only completed evidence, then propose AI Visibility setup. Ask before you add queries, connect providers, start a provider-backed or quota-consuming run, edit files, or publish.`;function T(e){return e?w:w.replace(C,``)}var E=a(),D=`https://github.com/Canonry/canonry/blob/main/docs/mcp.md`,O=`https://github.com/Canonry/canonry/blob/main/docs/plugins.md`,k=`https://help.openai.com/en/articles/12584461-connecting-custom-mcp-servers-in-chatgpt`,A=`https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp`,j=`codex plugin marketplace add Canonry/canonry
|
|
18
|
-
codex plugin add canonry-remote@canonry`,M={[
|
|
18
|
+
codex plugin add canonry-remote@canonry`,M={[o[`public-url-required`]]:`Configure this instance’s public URL before connecting a hosted client.`,[o[`https-required`]]:`Configure an HTTPS public URL for this instance.`,[o[`public-host-required`]]:`Use a public HTTPS address that your client can reach. Localhost and private-network addresses do not work for hosted connectors.`,[o[`public-path-mismatch`]]:`Make the publicUrl path match basePath, and preserve that prefix when the proxy forwards requests for hosted OAuth.`,[o[`oauth-unavailable`]]:`The sign-in routes are unavailable. Check this instance’s OAuth configuration.`,[o[`account-required`]]:`Create a named Canonry account on this instance’s server with canonry user create. A shared dashboard password does not provide an OAuth account.`,[o[`transport-unavailable`]]:`Restore the instance’s HTTP MCP service before connecting a hosted client.`},N=[{client:`Claude Code`,command:`claude plugin marketplace add Canonry/canonry
|
|
19
19
|
claude plugin install canonry@canonry`},{client:`Codex`,command:`codex plugin marketplace add Canonry/canonry
|
|
20
|
-
codex plugin add canonry@canonry`}],P=`canonry-mcp`;function F({label:e,value:n,showText:i=!1,secondary:a=!1,action:o=`agent_setup.copy`}){let s=(0,S.useId)(),[l
|
|
20
|
+
codex plugin add canonry@canonry`}],P=`canonry-mcp`;function F({label:e,value:n,showText:i=!1,secondary:a=!1,action:o=`agent_setup.copy`}){let s=(0,S.useId)(),[c,l]=(0,S.useState)(!1),[d,f]=(0,S.useState)(!1);async function p(){try{await navigator.clipboard.writeText(n),u(o),l(!0),f(!1)}catch{l(!1),f(!0)}}return(0,E.jsxs)(`div`,{className:`min-w-0 space-y-3`,children:[i?(0,E.jsx)(`pre`,{className:`overflow-x-auto material-base p-3 text-copy-14 text-heading`,children:(0,E.jsx)(`code`,{children:n})}):null,(0,E.jsxs)(m,{type:`button`,className:`pointer-coarse:min-h-11`,variant:a?`outline`:`default`,onClick:y(p),children:[c?(0,E.jsx)(t,{className:`size-4`,"aria-hidden":`true`}):(0,E.jsx)(r,{className:`size-4`,"aria-hidden":`true`}),e]}),c?(0,E.jsx)(`p`,{role:`status`,className:`text-copy-14 text-secondary`,children:`Copied.`}):null,!i||d?(0,E.jsxs)(`details`,{open:d||void 0,className:`text-label-14 text-secondary`,children:[(0,E.jsx)(`summary`,{className:`min-h-11 w-fit cursor-pointer py-3`,children:d?`Copy unavailable. Select the text below.`:`Preview text`}),(0,E.jsxs)(`label`,{htmlFor:s,className:`sr-only`,children:[e,` text`]}),(0,E.jsx)(`textarea`,{id:s,readOnly:!0,rows:d&&i?3:8,value:n,className:`mt-2 w-full rounded-md border border-default bg-bg p-3 text-copy-14 text-heading`})]}):null]})}function I(){return f()||c()?(0,E.jsxs)(`div`,{className:`page-container`,children:[(0,E.jsx)(`h1`,{className:`page-title`,children:`Agent setup`}),(0,E.jsx)(`p`,{className:`mt-3 text-copy-14 text-secondary`,children:`Open Agent setup in your own Canonry instance to connect your agent.`}),g()?(0,E.jsx)(`a`,{className:`mt-4 inline-block text-label-14 underline`,href:D,target:`_blank`,rel:`noopener noreferrer`,children:`Read the connection guide`}):null]}):(0,E.jsx)(L,{})}function L(){let e=x(),{isAdmin:t}=v(),r=p(),i=g(),a=b(!e,e?.health,!0),o=a.data?.apiStatus,c=o?.state===`ok`?o.mcp:void 0,u=c?.status===_.available&&c.hosted?.status===l.ready?c.hosted:void 0,f=c?.hosted?.status===l.unavailable?c.hosted.reason:void 0,m=`${window.location.origin}${d()}`,y=`This server has not confirmed a public URL and OAuth sign-in. Ask your administrator to check the connection configuration or update Canonry.`;a.isPending?y=`Checking the instance’s hosted connection settings.`:f?y=t&&r?M[f]:`Ask your Canonry administrator to finish hosted connection setup for this instance.`:o?.state===`error`?y=`The instance’s connection settings could not be checked. Try again after the service is available.`:c?.status===_[`not-supported`]&&(y=`This deployment does not provide hosted MCP connections. Ask your administrator for a supported connection.`);let S=u?`Help me connect this existing Canonry instance to ChatGPT or Claude Desktop using its remote MCP URL: ${u.url}
|
|
21
21
|
|
|
22
22
|
Use the client's remote MCP connection flow with OAuth sign-in. For Claude, set the OAuth client option to Register automatically; Claude's published identity is not supported here, and on Team or Enterprise plans an Owner adds custom connectors. Have me sign in to Canonry in the browser and review the requested access before approving it. Keep passwords, API keys, browser sessions, and other credentials out of chat. Do not install software, run local commands, create another instance, or broaden access.
|
|
23
23
|
|
|
24
24
|
ChatGPT guide: ${k}
|
|
25
25
|
Claude guide: ${A}
|
|
26
26
|
|
|
27
|
-
After authorization, enable the connection in this conversation. Call canonry_help with intent "status", follow its available tool guidance, and list accessible projects using stored reads only. Confirm the target instance and report whether the read succeeded; an empty list can still mean success. Do not run scans, sweeps, research, live provider checks, or other writes.`:void 0,C=r&&!u&&
|
|
27
|
+
After authorization, enable the connection in this conversation. Call canonry_help with intent "status", follow its available tool guidance, and list accessible projects using stored reads only. Confirm the target instance and report whether the read succeeded; an empty list can still mean success. Do not run scans, sweeps, research, live provider checks, or other writes.`:void 0,C=r&&!u&&s(window.location.hostname),w=(0,E.jsx)(h,{tone:u?`positive`:f||o?.state===`error`?`caution`:`neutral`,children:u?`Hosted setup configured`:a.isPending?`Checking hosted setup`:f?`Hosted setup needs attention`:`Hosted setup not confirmed`});return(0,E.jsxs)(`div`,{className:`page-container`,children:[(0,E.jsx)(`div`,{className:`page-header`,children:(0,E.jsxs)(`div`,{className:`page-header-left`,children:[(0,E.jsx)(`h1`,{className:`page-title`,children:`Agent setup`}),(0,E.jsx)(`p`,{className:`page-subtitle`,children:r?`Connect Claude Code, Codex, ChatGPT, Claude Desktop, or another agent to this instance.`:`Connect ChatGPT or Claude Desktop to this instance.`})]})}),(0,E.jsxs)(`div`,{className:`max-w-3xl`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-default pb-5`,children:[(0,E.jsxs)(`div`,{className:`min-w-0`,children:[(0,E.jsx)(`p`,{className:`text-copy-14-strong text-heading`,children:`Your Canonry instance`}),(0,E.jsx)(`p`,{className:`mt-1 break-all text-copy-14 text-secondary`,children:m})]}),C?null:w]}),C?(0,E.jsx)(V,{instanceUrl:m,showResourceLinks:i,open:!0}):null,u&&S?u.plugin?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(R,{plugin:u.plugin}),(0,E.jsxs)(`details`,{className:`border-t border-default py-3 text-label-14`,children:[(0,E.jsx)(`summary`,{className:`min-h-11 w-fit cursor-pointer py-3 text-label-14-strong text-heading`,children:`Connect directly (Claude and other MCP clients)`}),(0,E.jsx)(z,{url:u.url,setupPrompt:S})]})]}):(0,E.jsx)(z,{url:u.url,setupPrompt:S}):(0,E.jsxs)(`section`,{className:C?`border-t border-default py-6`:`py-6`,"aria-labelledby":`agent-requirements-title`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,E.jsx)(`h2`,{id:`agent-requirements-title`,className:`text-heading-20 text-heading`,children:C?`Connect ChatGPT or Claude Desktop`:`Before you connect a hosted client`}),C?w:null]}),(0,E.jsx)(`p`,{className:`mt-2 max-w-prose text-copy-14 text-secondary`,children:y}),i?(0,E.jsxs)(`a`,{href:D,target:`_blank`,rel:`noopener noreferrer`,className:`mt-3 inline-flex min-h-11 items-center gap-2 text-label-14 underline`,children:[`Read the connection guide `,(0,E.jsx)(n,{className:`size-3.5`,"aria-hidden":`true`})]}):null]}),r&&!C?(0,E.jsx)(V,{instanceUrl:m,showResourceLinks:i,open:!1}):null]})]})}function R({plugin:e}){return(0,E.jsxs)(`section`,{className:`py-6`,"aria-labelledby":`agent-plugin-title`,children:[(0,E.jsx)(`h2`,{id:`agent-plugin-title`,className:`text-heading-20 text-heading`,children:`Use the Canonry plugin`}),(0,E.jsx)(`p`,{className:`mt-2 max-w-prose text-copy-14 text-secondary`,children:`For the ChatGPT desktop app and Codex. The plugin opens this workspace with your Canonry sign-in and reads stored results only.`}),(0,E.jsxs)(`ol`,{className:`mt-5 space-y-6`,children:[(0,E.jsxs)(`li`,{className:`space-y-3`,children:[(0,E.jsx)(`h3`,{className:`text-label-14-strong text-heading`,children:`1. Install the plugin`}),(0,E.jsx)(`p`,{className:`max-w-prose text-copy-14 text-secondary`,children:`Add the Canonry marketplace, then install Canonry. In Codex, run:`}),(0,E.jsx)(F,{label:`Copy plugin install commands`,value:j,showText:!0,secondary:!0})]}),(0,E.jsxs)(`li`,{className:`space-y-3`,children:[(0,E.jsx)(`h3`,{className:`text-label-14-strong text-heading`,children:`2. Enter this workspace`}),(0,E.jsx)(`p`,{className:`max-w-prose text-copy-14 text-secondary`,children:`When Canonry asks which workspace to open, enter:`}),(0,E.jsx)(F,{label:`Copy workspace`,value:e.workspace,showText:!0,secondary:!0},e.workspace)]}),(0,E.jsxs)(`li`,{className:`space-y-2`,children:[(0,E.jsx)(`h3`,{className:`text-label-14-strong text-heading`,children:`3. Sign in and approve access`}),(0,E.jsx)(`p`,{className:`max-w-prose text-copy-14 text-secondary`,children:`Sign in with your Canonry account for this workspace and approve read access. The plugin cannot start sweeps or change settings.`})]})]})]})}function z({url:e,setupPrompt:t}){return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`section`,{className:`py-6`,"aria-labelledby":`agent-connect-title`,children:[(0,E.jsx)(`h2`,{id:`agent-connect-title`,className:`text-heading-20 text-heading`,children:`1. Add Canonry to your client`}),(0,E.jsx)(`p`,{className:`mt-2 mb-4 max-w-prose text-copy-14 text-secondary`,children:`Add this URL to your client’s remote connector settings. No local installation is needed.`}),(0,E.jsx)(F,{label:`Copy MCP URL`,value:e,showText:!0},e),(0,E.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-x-5 gap-y-2 text-label-14 text-secondary`,children:[(0,E.jsx)(`a`,{href:k,target:`_blank`,rel:`noopener noreferrer`,className:`underline`,children:`ChatGPT setup guide`}),(0,E.jsx)(`a`,{href:A,target:`_blank`,rel:`noopener noreferrer`,className:`underline`,children:`Claude Desktop setup guide`})]}),(0,E.jsx)(`p`,{className:`mt-2 max-w-prose text-copy-14 text-secondary`,children:`Choose OAuth. In Claude, set the OAuth client to “Register automatically”. On Claude Team and Enterprise plans, an Owner adds the connector first.`}),(0,E.jsx)(`div`,{className:`mt-4`,children:(0,E.jsx)(F,{label:`Copy setup prompt`,value:t,secondary:!0},t)})]}),(0,E.jsxs)(`section`,{className:`border-t border-default py-6`,"aria-labelledby":`agent-authorize-title`,children:[(0,E.jsx)(`h2`,{id:`agent-authorize-title`,className:`text-heading-20 text-heading`,children:`2. Sign in and approve access`}),(0,E.jsx)(`p`,{className:`mt-2 max-w-prose text-copy-14 text-secondary`,children:`Sign in with your Canonry account and review the requested access. After approving it, return to your client and enable the connection for your conversation.`})]}),(0,E.jsxs)(`section`,{className:`border-t border-default py-6`,"aria-labelledby":`agent-verify-title`,children:[(0,E.jsx)(`h2`,{id:`agent-verify-title`,className:`text-heading-20 text-heading`,children:`3. Verify the connection`}),(0,E.jsx)(`p`,{className:`mt-2 mb-4 max-w-prose text-copy-14 text-secondary`,children:`Server configuration is ready. Use this prompt to confirm your agent can read your projects without starting work or using provider quota.`}),(0,E.jsx)(B,{target:e})]})]})}function B({target:e,local:t=!1}){let n=`Verify my existing Canonry connection targets ${e}. Call canonry_help with intent "status", follow its available tool guidance, then list accessible projects using stored reads only. Report the instance, connection method, and whether the project read succeeded. An empty project list can still be a successful connection. If the target cannot be confirmed, stop and explain. Do not install anything, change configuration, create projects, run scans, sweeps, research, or live provider checks.`;return(0,E.jsx)(F,{label:t?`Copy local verification prompt`:`Copy verification prompt`,value:n,secondary:!0,action:`agent_setup.verify_copy`},e)}function V({instanceUrl:e,showResourceLinks:t,open:r}){let i=`Connect my local agent to this existing Canonry instance: ${e}
|
|
28
28
|
|
|
29
29
|
Use an installed Canonry runtime whose private configuration already points to this exact instance. A local plugin or canonry-mcp process does not inherit the browser connection, and shell environment changes do not retarget an already-connected tool. Check the saved API URL before using it.
|
|
30
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{lt as t}from"./vendor-lucide-C3F7vHjd.js";import{r as n}from"./vendor-markdown-DMxglFrF.js";import{x as r}from"./vendor-tanstack-ZnWhYpCU.js";import{r as i,t as a,xt as o}from"./ToneBadge-BekCDc9B.js";import{bn as s,bt as c,l}from"./react-query-DPn84_Mu.js";import{t as u}from"./card-fF4DLMtN.js";var d=e(t(),1),f=n(),p=100;function m(e){if(e===`all`)return;let t=Number.parseInt(e,10);return new Date(Date.now()-t*24*60*60*1e3).toISOString()}function h(e){let t=e.userAgent?.toLowerCase()??``;return t.includes(`canonry-mcp`)?`MCP`:t.includes(`canonry-cli`)?`CLI`:t.includes(`mozilla/`)?`Dashboard`:e.actor===`scheduler`?`Scheduler`:e.actor===`agent`?`Agent`:e.actor===`mcp`?`MCP`:e.actor===`cli`?`CLI`:e.actor}function g(e){return/delete|remove|revoke|disconnect|failed|refused/.test(e)?`negative`:/create|add|connect|completed/.test(e)?`positive`:/update|replace|sync|apply/.test(e)?`caution`:`neutral`}function _(e){return[e.action,e.actor,e.entityType,e.entityId,e.actorSession,e.userAgent,e.diff==null?``:JSON.stringify(e.diff)].filter(Boolean).join(` `).toLowerCase()}function v({projectName:e}){let[t,n]=(0,d.useState)(0),[v,y]=(0,d.useState)(`90d`),[b,x]=(0,d.useState)(``),[S,C]=(0,d.useState)(``),w=(0,d.useMemo)(()=>m(v),[v]),T={limit:p,offset:t*p,since:w,actor:b||void 0},E=r({...c({client:o,path:{name:e??``},query:T}),enabled:!!e}),D=r({...l({client:o,query:T}),enabled:!e}),O=r({...s({client:o}),enabled:!e}),k=e?E:D,A=k.data??[],j=(0,d.useMemo)(()=>new Map((O.data??[]).map(e=>[e.id,e.displayName||e.name])),[O.data]),M=S.trim().toLowerCase(),N=(0,d.useMemo)(()=>M?A.filter(e=>_(e).includes(M)):A,[A,M]),P=e=>{n(0),e()};return k.isLoading?(0,f.jsx)(`p`,{className:`supporting-copy mt-6`,role:`status`,children:`Loading change history…`}):(0,f.jsxs)(`section`,{className:`mt-6`,"aria-labelledby":`change-history-heading`,children:[(0,f.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,f.jsx)(`div`,{children:(0,f.jsx)(`h2`,{id:`change-history-heading`,className:e?void 0:`sr-only`,children:`Change history`})}),(0,f.jsx)(i,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>void k.refetch(),disabled:k.isFetching,children:k.isFetching?`Refreshing…`:`Refresh`})]}),(0,f.jsxs)(`div`,{className:`mt-4 grid gap-2 sm:grid-cols-3`,children:[(0,f.jsx)(`input`,{type:`search`,"aria-label":`Search change history`,value:S,onChange:e=>C(e.target.value),placeholder:`Search actions, entities, or details`,className:`min-h-11 rounded-md border border-base bg-bg px-3 text-label-14 text-strong placeholder-mono-400 focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`}),(0,f.jsxs)(`select`,{"aria-label":`Filter change history by actor`,value:b,onChange:e=>P(()=>x(e.target.value)),className:`min-h-11 rounded-md border border-base bg-bg px-3 text-label-14 text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`,children:[(0,f.jsx)(`option`,{value:``,children:`All actors`}),(0,f.jsx)(`option`,{value:`api`,children:`API and dashboard`}),(0,f.jsx)(`option`,{value:`cli`,children:`CLI`}),(0,f.jsx)(`option`,{value:`scheduler`,children:`Scheduler`}),(0,f.jsx)(`option`,{value:`agent`,children:`Agent`}),(0,f.jsx)(`option`,{value:`mcp`,children:`MCP`})]}),(0,f.jsxs)(`select`,{"aria-label":`Filter change history by date range`,value:v,onChange:e=>P(()=>y(e.target.value)),className:`min-h-11 rounded-md border border-base bg-bg px-3 text-label-14 text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`,children:[(0,f.jsx)(`option`,{value:`30d`,children:`Last 30 days`}),(0,f.jsx)(`option`,{value:`90d`,children:`Last 90 days`}),(0,f.jsx)(`option`,{value:`365d`,children:`Last year`}),(0,f.jsx)(`option`,{value:`all`,children:`All retained history`})]})]}),k.isError?(0,f.jsxs)(u,{className:`surface-card empty-card mt-4`,children:[(0,f.jsx)(`h3`,{children:`Change history unavailable`}),(0,f.jsx)(`p`,{children:k.error instanceof Error?k.error.message:`Could not load the audit trail.`})]}):N.length===0?(0,f.jsxs)(u,{className:`surface-card empty-card mt-4`,children:[(0,f.jsx)(`h3`,{children:`No changes match these filters`}),(0,f.jsx)(`p`,{children:`Widen the date range or clear the actor and search filters.`})]}):(0,f.jsx)(`div`,{className:`evidence-table-wrap mt-4`,children:(0,f.jsxs)(`table`,{className:`evidence-table`,children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(`tr`,{children:[(0,f.jsx)(`th`,{children:`When`}),e?null:(0,f.jsx)(`th`,{children:`Scope`}),(0,f.jsx)(`th`,{children:`Action`}),(0,f.jsx)(`th`,{children:`Entity`}),(0,f.jsx)(`th`,{children:`Origin`}),(0,f.jsx)(`th`,{children:`Details`})]})}),(0,f.jsx)(`tbody`,{children:N.map(t=>(0,f.jsxs)(`tr`,{children:[(0,f.jsx)(`td`,{className:`whitespace-nowrap tabular-nums text-muted`,children:new Date(t.createdAt).toLocaleString()}),e?null:(0,f.jsx)(`td`,{className:`text-secondary`,children:t.projectId?j.get(t.projectId)??`Deleted project · ${t.projectId}`:`Instance settings`}),(0,f.jsx)(`td`,{children:(0,f.jsx)(a,{tone:g(t.action),children:t.action})}),(0,f.jsxs)(`td`,{children:[(0,f.jsx)(`span`,{className:`text-strong`,children:t.entityType}),t.entityId?(0,f.jsx)(`span`,{className:`mt-0.5 block max-w-48 truncate text-label-12-mono text-faint`,title:t.entityId,children:t.entityId}):null]}),(0,f.jsxs)(`td`,{children:[(0,f.jsx)(`span`,{className:`text-secondary`,children:h(t)}),t.actorSession?(0,f.jsxs)(`span`,{className:`mt-0.5 block max-w-40 truncate text-label-12-mono text-faint`,title:t.actorSession,children:[`Session `,t.actorSession]}):null]}),(0,f.jsx)(`td`,{children:t.diff==null?(0,f.jsx)(`span`,{className:`text-faint`,children:`No field diff`}):(0,f.jsxs)(`details`,{children:[(0,f.jsx)(`summary`,{className:`min-h-11 cursor-pointer py-3 text-label-14 text-secondary hover:text-strong`,children:`View diff`}),(0,f.jsx)(`pre`,{className:`max-h-72 max-w-xl overflow-auto whitespace-pre-wrap break-words rounded-md bg-bg-elevated p-3 text-copy-13 text-secondary`,children:JSON.stringify(t.diff,null,2)})]})})]},t.id))})]})}),!k.isError&&(t>0||A.length===p)?(0,f.jsxs)(`div`,{className:`mt-4 flex items-center justify-between gap-3`,children:[(0,f.jsx)(i,{type:`button`,variant:`outline`,size:`sm`,disabled:t===0,onClick:()=>n(e=>Math.max(0,e-1)),children:`Previous`}),(0,f.jsxs)(`span`,{className:`text-label-12 tabular-nums text-muted`,children:[`Page `,t+1]}),(0,f.jsx)(i,{type:`button`,variant:`outline`,size:`sm`,disabled:A.length<p,onClick:()=>n(e=>e+1),children:`Next`})]}):null]})}export{v as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{H as t,V as n,c as r,s as i,ut as a,w as o}from"./vendor-lucide-7AWeFVeL.js";import{r as s}from"./vendor-markdown-CQdHmjWd.js";import{Bt as c,J as l,Tt as u,U as d,W as f,Y as p,et as m,jt as h,o as g,r as _,t as v,wn as y}from"./ToneBadge-co0skd0y.js";import{t as b}from"./async-handler-Bj3TnIRw.js";import{t as x}from"./card-Cky0yiDz.js";import{t as S}from"./Hint-DiyoPGOX.js";var C=e(a(),1),w=s(),T=`https://commoncrawl.org/web-graphs`;function E(e){return e==null?`—`:e>=0xe8d4a51000?`${(e/0xe8d4a51000).toFixed(1)} TB`:e>=1e9?`${(e/1e9).toFixed(1)} GB`:e>=1e6?`${(e/1e6).toFixed(1)} MB`:e>=1e3?`${(e/1e3).toFixed(1)} KB`:`${e} B`}function D(e){if(!e)return`—`;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function O(e){switch(e){case`ready`:return`positive`;case`failed`:return`negative`;case`downloading`:case`querying`:case`queued`:return`caution`}}function k(){let[e,a]=(0,C.useState)(null),[s,k]=(0,C.useState)(null),[A,j]=(0,C.useState)([]),[M,N]=(0,C.useState)([]),[P,F]=(0,C.useState)(null),[I,L]=(0,C.useState)(!0),[R,z]=(0,C.useState)(!1),[B,V]=(0,C.useState)(!1),[H,U]=(0,C.useState)(``),[W,G]=(0,C.useState)(!1),[K,q]=(0,C.useState)(null),[J,Y]=(0,C.useState)(null),X=(0,C.useCallback)(async()=>{L(!0),q(null);try{let[e,t,n,r,i]=await Promise.all([d(),p().catch(()=>null),m().catch(()=>[]),f().catch(()=>[]),l().catch(()=>null)]);a(e),k(t),j(n),N(r),F(i)}catch(e){q(e instanceof Error?e.message:`Failed to load backlinks status`)}finally{L(!1)}},[]);(0,C.useEffect)(()=>{X()},[X]);async function Z(){z(!0),q(null),Y(null);try{let e=await u();Y(e.alreadyPresent?`DuckDB already installed (${e.version}).`:`Installed DuckDB ${e.version}.`),await X()}catch(e){q(e instanceof Error?e.message:`Failed to install DuckDB`)}finally{z(!1)}}async function Q(){let e=H.trim()||void 0;V(!0),q(null),Y(null);try{let t=await y(e);Y(e?`Queued sync for ${t.release}. Download + query runs in the background.`:`Queued sync for auto-discovered release ${t.release}. Download + query runs in the background.`),U(``),G(!1),await X()}catch(e){e instanceof g&&e.code===`MISSING_DEPENDENCY`?q(`DuckDB is not installed. Install it first.`):q(e instanceof Error?e.message:`Failed to trigger sync`)}finally{V(!1)}}async function $(e){q(null),Y(null);try{await c(e),Y(`Pruned cached release ${e}.`),await X()}catch(e){q(e instanceof Error?e.message:`Failed to prune release`)}}let ee=s?.status===`ready`&&M.every(e=>e.release!==s.release);return(0,w.jsxs)(`div`,{className:`page-container`,children:[(0,w.jsx)(`div`,{className:`page-header`,children:(0,w.jsxs)(`div`,{className:`page-header-left`,children:[(0,w.jsx)(`h1`,{className:`page-title`,children:`Backlink data`}),(0,w.jsx)(`p`,{className:`page-subtitle`,children:`Manage the shared backlink source and review its latest data.`})]})}),K&&(0,w.jsx)(x,{className:`surface-card p-4 mb-4 bg-negative-soft`,children:(0,w.jsx)(`p`,{className:`text-copy-14 text-negative`,children:K})}),J&&(0,w.jsx)(x,{className:`surface-card p-4 mb-4 bg-positive-soft`,children:(0,w.jsx)(`p`,{className:`text-copy-14 text-positive`,children:J})}),(0,w.jsxs)(`section`,{className:`page-section`,children:[(0,w.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,w.jsx)(`div`,{children:(0,w.jsx)(`h2`,{children:`Backlink source`})}),e?.duckdbInstalled?(0,w.jsx)(v,{tone:`positive`,children:`Installed`}):(0,w.jsx)(v,{tone:`caution`,children:`Not installed`})]}),(0,w.jsx)(x,{className:`surface-card p-4`,children:I?(0,w.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`Checking…`}):e?.duckdbInstalled?(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Ready to sync a Common Crawl release.`}):(0,w.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Install the local query engine to enable release syncs.`}),!h()&&(0,w.jsxs)(_,{type:`button`,size:`sm`,disabled:R,onClick:b(Z),children:[(0,w.jsx)(t,{className:`h-4 w-4 mr-1.5`,"aria-hidden":!0}),R?`Installing…`:`Install DuckDB`]})]})})]}),(0,w.jsxs)(`section`,{className:`page-section`,children:[(0,w.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,w.jsx)(`div`,{children:(0,w.jsxs)(`h2`,{className:`flex items-center gap-2`,children:[`Release sync`,(0,w.jsx)(S,{label:`What is a release sync?`,children:`A release sync downloads one Common Crawl dump (~16 GB) and extracts backlinks for every project in this workspace in one pass. This is the heavy job — subsequent per-project re-runs skip the download and just re-query the cached files.`})]})}),s&&(0,w.jsx)(v,{tone:O(s.status),children:s.status})]}),(0,w.jsxs)(`div`,{className:`space-y-4`,children:[s?(0,w.jsxs)(`div`,{className:`space-y-2 text-label-14`,children:[(0,w.jsxs)(`p`,{className:`text-strong`,children:[`Release `,(0,w.jsx)(`code`,{className:`text-neutral`,children:s.release})]}),s.phaseDetail&&(0,w.jsx)(`p`,{className:`text-secondary`,children:s.phaseDetail}),(0,w.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-4 text-label-12 text-muted pt-2`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-faint normal-case text-label-12`,children:`Projects`}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:s.projectsProcessed??`—`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`p`,{className:`text-faint normal-case text-label-12 flex items-center gap-1`,children:[`Rows`,(0,w.jsx)(S,{label:`What are rows?`,children:`Total number of (project, referring domain) pairs persisted in SQLite from this sync, across every project in the workspace.`})]}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:s.domainsDiscovered??`—`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-faint normal-case text-label-12`,children:`Started`}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:D(s.downloadStartedAt??s.createdAt)})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-faint normal-case text-label-12`,children:`Finished`}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:D(s.queryFinishedAt)})]})]}),s.error&&(0,w.jsx)(`p`,{className:`text-copy-14 text-negative-400 pt-2`,children:s.error})]}):(0,w.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`No release sync has run in this workspace yet.`}),ee&&(0,w.jsx)(`div`,{className:`mt-4 rounded border border-caution-800/60 bg-caution-950/20 p-3`,children:(0,w.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,w.jsx)(i,{className:`h-4 w-4 text-caution-400 shrink-0 mt-0.5`,"aria-hidden":!0}),(0,w.jsxs)(`div`,{className:`text-label-14 text-neutral`,children:[(0,w.jsx)(`p`,{className:`text-copy-14-strong text-caution-200`,children:`Cached files for this release are missing.`}),(0,w.jsx)(`p`,{className:`mt-1 text-secondary`,children:`Sync this release again, or sync the newest release, before refreshing individual projects.`})]})]})}),(0,w.jsxs)(`div`,{className:`space-y-3`,children:[(0,w.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-3`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-label-12 normal-case text-muted`,children:`Auto-detected release`}),P?(0,w.jsxs)(`p`,{className:`text-copy-14 text-strong mt-0.5`,children:[(0,w.jsx)(`code`,{className:`text-heading`,children:P.release}),(0,w.jsxs)(`span`,{className:`ml-2 text-label-12 text-muted`,children:[`Vertex `,E(P.vertexBytes),`, edges `,E(P.edgesBytes)]})]}):(0,w.jsx)(`p`,{className:`text-copy-14 text-muted mt-0.5`,children:I?`Checking Common Crawl…`:`Could not find a release. Choose one below.`}),(0,w.jsxs)(`a`,{href:T,target:`_blank`,rel:`noopener noreferrer`,className:`mt-1 inline-flex items-center gap-1 text-label-12 text-secondary hover:text-strong focus:text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,children:[`Browse all Common Crawl web-graph releases`,(0,w.jsx)(n,{className:`h-3 w-3`,"aria-hidden":!0})]})]}),!h()&&(0,w.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,w.jsxs)(_,{type:`button`,size:`sm`,disabled:B||!e?.duckdbInstalled||!P&&!H.trim(),onClick:b(Q),children:[(0,w.jsx)(o,{className:`h-4 w-4 mr-1.5`,"aria-hidden":!0}),B?`Queuing…`:`Run sync`]}),(0,w.jsxs)(S,{label:`What does Run sync do?`,children:[(0,w.jsxs)(`span`,{className:`block`,children:[`Downloads the auto-detected (or chosen) Common Crawl release (~16 GB) to`,` `,(0,w.jsx)(`code`,{className:`text-neutral`,children:`~/.canonry/cache/commoncrawl/`}),`, then runs a single DuckDB query that extracts referring domains for every project in this workspace.`]}),(0,w.jsxs)(`span`,{className:`mt-2 block text-secondary`,children:[`First time for a release: `,(0,w.jsx)(`span`,{className:`text-strong`,children:`~10–20 min download + ~5 min query`}),`. Re-running the same release later: `,(0,w.jsx)(`span`,{className:`text-strong`,children:`skips download, just re-queries`}),` (~5 min).`]})]})]})]}),h()?null:W?(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,w.jsx)(`input`,{type:`text`,className:`flex-1 min-w-[240px] rounded border border-strong bg-transparent px-2.5 py-1.5 text-label-14 text-strong placeholder-mono-400 focus:border-mono-500 focus:outline-none`,placeholder:`cc-main-2026-jan-feb-mar`,value:H,onChange:e=>U(e.target.value),disabled:B,autoFocus:!0}),(0,w.jsx)(`button`,{type:`button`,className:`text-button-14 text-secondary hover:text-neutral focus:text-neutral focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,onClick:()=>{U(``),G(!1)},disabled:B,children:`Cancel`})]}):(0,w.jsx)(`button`,{type:`button`,className:`text-button-14 text-secondary hover:text-neutral focus:text-neutral focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,onClick:()=>G(!0),disabled:B,children:`Use a different release →`})]}),!e?.duckdbInstalled&&(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary mt-2`,children:`Install DuckDB first to enable sync.`})]})]}),(0,w.jsxs)(`details`,{className:`page-section-divider group`,children:[(0,w.jsx)(`summary`,{className:`cursor-pointer text-label-14-strong text-secondary hover:text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,children:`Technical details and cache`}),(0,w.jsxs)(`div`,{className:`mt-4`,children:[(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary mb-3`,children:`Cached releases support project re-extracts. Pruning a release does not remove saved backlink results.`}),(0,w.jsx)(`div`,{className:`overflow-x-auto`,children:(0,w.jsxs)(`table`,{className:`w-full text-label-14`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{className:`border-b border-base text-left text-label-12 normal-case text-faint`,children:[(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Release`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Sync status`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-right text-label-12-strong`,children:`Size`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Last used`}),!h()&&(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong sr-only`,children:`Actions`})]})}),(0,w.jsxs)(`tbody`,{children:[M.map(e=>(0,w.jsxs)(`tr`,{className:`border-b border-mono-900 last:border-0`,children:[(0,w.jsx)(`td`,{className:`px-4 py-2 text-strong`,children:(0,w.jsx)(`code`,{children:e.release})}),(0,w.jsx)(`td`,{className:`px-4 py-2`,children:e.syncStatus?(0,w.jsx)(v,{tone:O(e.syncStatus),children:e.syncStatus}):(0,w.jsx)(`span`,{className:`text-faint`,children:`—`})}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-right text-secondary tabular-nums`,children:E(e.bytes)}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-secondary`,children:D(e.lastUsedAt)}),!h()&&(0,w.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,w.jsxs)(`div`,{className:`inline-flex items-center gap-1`,children:[(0,w.jsxs)(_,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>{$(e.release)},children:[(0,w.jsx)(r,{className:`h-4 w-4 mr-1.5`,"aria-hidden":!0}),`Prune`]}),(0,w.jsx)(S,{label:`What does Prune do?`,placement:`top`,children:`Deletes the ~16 GB cache for this release from disk. Backlink results already in SQLite remain untouched. To re-run extracts against this release, you’d have to sync it again (another ~16 GB download).`})]})})]},e.release)),M.length===0&&(0,w.jsx)(`tr`,{children:(0,w.jsx)(`td`,{className:`px-4 py-4 text-label-14 text-muted`,colSpan:h()?4:5,children:`No cached releases on this machine. If you ran a sync from a different machine (or deleted the cache), the backlink data is still in the database — but you’ll need to re-sync a release to run new extracts.`})})]})]})}),(0,w.jsx)(`p`,{className:`mt-3 text-copy-13 text-muted`,children:`Common Crawl files are stored locally. DuckDB reads them; Canonry stores results in its normal database.`})]})]}),A.length>1&&(0,w.jsxs)(`section`,{className:`page-section`,children:[(0,w.jsx)(`div`,{className:`section-head section-head-inline`,children:(0,w.jsx)(`div`,{children:(0,w.jsx)(`h2`,{children:`Past release syncs`})})}),(0,w.jsx)(x,{className:`surface-card overflow-hidden`,children:(0,w.jsxs)(`table`,{className:`w-full text-label-14`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{className:`border-b border-base text-left text-label-12 normal-case text-faint`,children:[(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Release`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Status`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-right text-label-12-strong`,children:`Projects`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-right text-label-12-strong`,children:`Rows`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Finished`})]})}),(0,w.jsx)(`tbody`,{children:A.map(e=>(0,w.jsxs)(`tr`,{className:`border-b border-mono-900 last:border-0`,children:[(0,w.jsx)(`td`,{className:`px-4 py-2 text-strong`,children:(0,w.jsx)(`code`,{children:e.release})}),(0,w.jsx)(`td`,{className:`px-4 py-2`,children:(0,w.jsx)(v,{tone:O(e.status),children:e.status})}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-right text-secondary tabular-nums`,children:e.projectsProcessed??`—`}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-right text-secondary tabular-nums`,children:e.domainsDiscovered??`—`}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-secondary`,children:D(e.queryFinishedAt??e.updatedAt)})]},e.id))})]})})]})]})}export{k as BacklinksPage};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{B as t,V as n,c as r,lt as i,s as a,w as o}from"./vendor-lucide-C3F7vHjd.js";import{r as s}from"./vendor-markdown-DMxglFrF.js";import{Bt as c,J as l,Tt as u,U as d,W as f,Y as p,et as m,jt as h,o as g,r as _,t as v,wn as y}from"./ToneBadge-BekCDc9B.js";import{t as b}from"./async-handler-Bj3TnIRw.js";import{t as x}from"./card-fF4DLMtN.js";import{t as S}from"./Hint-Drf3KqdJ.js";var C=e(i(),1),w=s(),T=`https://commoncrawl.org/web-graphs`;function E(e){return e==null?`—`:e>=0xe8d4a51000?`${(e/0xe8d4a51000).toFixed(1)} TB`:e>=1e9?`${(e/1e9).toFixed(1)} GB`:e>=1e6?`${(e/1e6).toFixed(1)} MB`:e>=1e3?`${(e/1e3).toFixed(1)} KB`:`${e} B`}function D(e){if(!e)return`—`;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function O(e){switch(e){case`ready`:return`positive`;case`failed`:return`negative`;case`downloading`:case`querying`:case`queued`:return`caution`}}function k(){let[e,i]=(0,C.useState)(null),[s,k]=(0,C.useState)(null),[A,j]=(0,C.useState)([]),[M,N]=(0,C.useState)([]),[P,F]=(0,C.useState)(null),[I,L]=(0,C.useState)(!0),[R,z]=(0,C.useState)(!1),[B,V]=(0,C.useState)(!1),[H,U]=(0,C.useState)(``),[W,G]=(0,C.useState)(!1),[K,q]=(0,C.useState)(null),[J,Y]=(0,C.useState)(null),X=(0,C.useCallback)(async()=>{L(!0),q(null);try{let[e,t,n,r,a]=await Promise.all([d(),p().catch(()=>null),m().catch(()=>[]),f().catch(()=>[]),l().catch(()=>null)]);i(e),k(t),j(n),N(r),F(a)}catch(e){q(e instanceof Error?e.message:`Failed to load backlinks status`)}finally{L(!1)}},[]);(0,C.useEffect)(()=>{X()},[X]);async function Z(){z(!0),q(null),Y(null);try{let e=await u();Y(e.alreadyPresent?`DuckDB already installed (${e.version}).`:`Installed DuckDB ${e.version}.`),await X()}catch(e){q(e instanceof Error?e.message:`Failed to install DuckDB`)}finally{z(!1)}}async function Q(){let e=H.trim()||void 0;V(!0),q(null),Y(null);try{let t=await y(e);Y(e?`Queued sync for ${t.release}. Download + query runs in the background.`:`Queued sync for auto-discovered release ${t.release}. Download + query runs in the background.`),U(``),G(!1),await X()}catch(e){e instanceof g&&e.code===`MISSING_DEPENDENCY`?q(`DuckDB is not installed. Install it first.`):q(e instanceof Error?e.message:`Failed to trigger sync`)}finally{V(!1)}}async function $(e){q(null),Y(null);try{await c(e),Y(`Pruned cached release ${e}.`),await X()}catch(e){q(e instanceof Error?e.message:`Failed to prune release`)}}let ee=s?.status===`ready`&&M.every(e=>e.release!==s.release);return(0,w.jsxs)(`div`,{className:`page-container`,children:[(0,w.jsx)(`div`,{className:`page-header`,children:(0,w.jsxs)(`div`,{className:`page-header-left`,children:[(0,w.jsx)(`h1`,{className:`page-title`,children:`Backlink data`}),(0,w.jsx)(`p`,{className:`page-subtitle`,children:`Manage the shared backlink source and review its latest data.`})]})}),K&&(0,w.jsx)(x,{className:`surface-card p-4 mb-4 bg-negative-soft`,children:(0,w.jsx)(`p`,{className:`text-copy-14 text-negative`,children:K})}),J&&(0,w.jsx)(x,{className:`surface-card p-4 mb-4 bg-positive-soft`,children:(0,w.jsx)(`p`,{className:`text-copy-14 text-positive`,children:J})}),(0,w.jsxs)(`section`,{className:`page-section`,children:[(0,w.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,w.jsx)(`div`,{children:(0,w.jsx)(`h2`,{children:`Backlink source`})}),e?.duckdbInstalled?(0,w.jsx)(v,{tone:`positive`,children:`Installed`}):(0,w.jsx)(v,{tone:`caution`,children:`Not installed`})]}),(0,w.jsx)(x,{className:`surface-card p-4`,children:I?(0,w.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`Checking…`}):e?.duckdbInstalled?(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Ready to sync a Common Crawl release.`}):(0,w.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Install the local query engine to enable release syncs.`}),!h()&&(0,w.jsxs)(_,{type:`button`,size:`sm`,disabled:R,onClick:b(Z),children:[(0,w.jsx)(n,{className:`h-4 w-4 mr-1.5`,"aria-hidden":!0}),R?`Installing…`:`Install DuckDB`]})]})})]}),(0,w.jsxs)(`section`,{className:`page-section`,children:[(0,w.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,w.jsx)(`div`,{children:(0,w.jsxs)(`h2`,{className:`flex items-center gap-2`,children:[`Release sync`,(0,w.jsx)(S,{label:`What is a release sync?`,children:`A release sync downloads one Common Crawl dump (~16 GB) and extracts backlinks for every project in this workspace in one pass. This is the heavy job — subsequent per-project re-runs skip the download and just re-query the cached files.`})]})}),s&&(0,w.jsx)(v,{tone:O(s.status),children:s.status})]}),(0,w.jsxs)(`div`,{className:`space-y-4`,children:[s?(0,w.jsxs)(`div`,{className:`space-y-2 text-label-14`,children:[(0,w.jsxs)(`p`,{className:`text-strong`,children:[`Release `,(0,w.jsx)(`code`,{className:`text-neutral`,children:s.release})]}),s.phaseDetail&&(0,w.jsx)(`p`,{className:`text-secondary`,children:s.phaseDetail}),(0,w.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-4 text-label-12 text-muted pt-2`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-faint normal-case text-label-12`,children:`Projects`}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:s.projectsProcessed??`—`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`p`,{className:`text-faint normal-case text-label-12 flex items-center gap-1`,children:[`Rows`,(0,w.jsx)(S,{label:`What are rows?`,children:`Total number of (project, referring domain) pairs persisted in SQLite from this sync, across every project in the workspace.`})]}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:s.domainsDiscovered??`—`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-faint normal-case text-label-12`,children:`Started`}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:D(s.downloadStartedAt??s.createdAt)})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-faint normal-case text-label-12`,children:`Finished`}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:D(s.queryFinishedAt)})]})]}),s.error&&(0,w.jsx)(`p`,{className:`text-copy-14 text-negative-400 pt-2`,children:s.error})]}):(0,w.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`No release sync has run in this workspace yet.`}),ee&&(0,w.jsx)(`div`,{className:`mt-4 rounded border border-caution-800/60 bg-caution-950/20 p-3`,children:(0,w.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,w.jsx)(a,{className:`h-4 w-4 text-caution-400 shrink-0 mt-0.5`,"aria-hidden":!0}),(0,w.jsxs)(`div`,{className:`text-label-14 text-neutral`,children:[(0,w.jsx)(`p`,{className:`text-copy-14-strong text-caution-200`,children:`Cached files for this release are missing.`}),(0,w.jsx)(`p`,{className:`mt-1 text-secondary`,children:`Sync this release again, or sync the newest release, before refreshing individual projects.`})]})]})}),(0,w.jsxs)(`div`,{className:`space-y-3`,children:[(0,w.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-3`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-label-12 normal-case text-muted`,children:`Auto-detected release`}),P?(0,w.jsxs)(`p`,{className:`text-copy-14 text-strong mt-0.5`,children:[(0,w.jsx)(`code`,{className:`text-heading`,children:P.release}),(0,w.jsxs)(`span`,{className:`ml-2 text-label-12 text-muted`,children:[`Vertex `,E(P.vertexBytes),`, edges `,E(P.edgesBytes)]})]}):(0,w.jsx)(`p`,{className:`text-copy-14 text-muted mt-0.5`,children:I?`Checking Common Crawl…`:`Could not find a release. Choose one below.`}),(0,w.jsxs)(`a`,{href:T,target:`_blank`,rel:`noopener noreferrer`,className:`mt-1 inline-flex items-center gap-1 text-label-12 text-secondary hover:text-strong focus:text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,children:[`Browse all Common Crawl web-graph releases`,(0,w.jsx)(t,{className:`h-3 w-3`,"aria-hidden":!0})]})]}),!h()&&(0,w.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,w.jsxs)(_,{type:`button`,size:`sm`,disabled:B||!e?.duckdbInstalled||!P&&!H.trim(),onClick:b(Q),children:[(0,w.jsx)(o,{className:`h-4 w-4 mr-1.5`,"aria-hidden":!0}),B?`Queuing…`:`Run sync`]}),(0,w.jsxs)(S,{label:`What does Run sync do?`,children:[(0,w.jsxs)(`span`,{className:`block`,children:[`Downloads the auto-detected (or chosen) Common Crawl release (~16 GB) to`,` `,(0,w.jsx)(`code`,{className:`text-neutral`,children:`~/.canonry/cache/commoncrawl/`}),`, then runs a single DuckDB query that extracts referring domains for every project in this workspace.`]}),(0,w.jsxs)(`span`,{className:`mt-2 block text-secondary`,children:[`First time for a release: `,(0,w.jsx)(`span`,{className:`text-strong`,children:`~10–20 min download + ~5 min query`}),`. Re-running the same release later: `,(0,w.jsx)(`span`,{className:`text-strong`,children:`skips download, just re-queries`}),` (~5 min).`]})]})]})]}),h()?null:W?(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,w.jsx)(`input`,{type:`text`,className:`flex-1 min-w-[240px] rounded border border-strong bg-transparent px-2.5 py-1.5 text-label-14 text-strong placeholder-mono-400 focus:border-mono-500 focus:outline-none`,placeholder:`cc-main-2026-jan-feb-mar`,value:H,onChange:e=>U(e.target.value),disabled:B,autoFocus:!0}),(0,w.jsx)(`button`,{type:`button`,className:`text-button-14 text-secondary hover:text-neutral focus:text-neutral focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,onClick:()=>{U(``),G(!1)},disabled:B,children:`Cancel`})]}):(0,w.jsx)(`button`,{type:`button`,className:`text-button-14 text-secondary hover:text-neutral focus:text-neutral focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,onClick:()=>G(!0),disabled:B,children:`Use a different release →`})]}),!e?.duckdbInstalled&&(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary mt-2`,children:`Install DuckDB first to enable sync.`})]})]}),(0,w.jsxs)(`details`,{className:`page-section-divider group`,children:[(0,w.jsx)(`summary`,{className:`cursor-pointer text-label-14-strong text-secondary hover:text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,children:`Technical details and cache`}),(0,w.jsxs)(`div`,{className:`mt-4`,children:[(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary mb-3`,children:`Cached releases support project re-extracts. Pruning a release does not remove saved backlink results.`}),(0,w.jsx)(`div`,{className:`overflow-x-auto`,children:(0,w.jsxs)(`table`,{className:`w-full text-label-14`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{className:`border-b border-base text-left text-label-12 normal-case text-faint`,children:[(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Release`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Sync status`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-right text-label-12-strong`,children:`Size`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Last used`}),!h()&&(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong sr-only`,children:`Actions`})]})}),(0,w.jsxs)(`tbody`,{children:[M.map(e=>(0,w.jsxs)(`tr`,{className:`border-b border-mono-900 last:border-0`,children:[(0,w.jsx)(`td`,{className:`px-4 py-2 text-strong`,children:(0,w.jsx)(`code`,{children:e.release})}),(0,w.jsx)(`td`,{className:`px-4 py-2`,children:e.syncStatus?(0,w.jsx)(v,{tone:O(e.syncStatus),children:e.syncStatus}):(0,w.jsx)(`span`,{className:`text-faint`,children:`—`})}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-right text-secondary tabular-nums`,children:E(e.bytes)}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-secondary`,children:D(e.lastUsedAt)}),!h()&&(0,w.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,w.jsxs)(`div`,{className:`inline-flex items-center gap-1`,children:[(0,w.jsxs)(_,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>{$(e.release)},children:[(0,w.jsx)(r,{className:`h-4 w-4 mr-1.5`,"aria-hidden":!0}),`Prune`]}),(0,w.jsx)(S,{label:`What does Prune do?`,placement:`top`,children:`Deletes the ~16 GB cache for this release from disk. Backlink results already in SQLite remain untouched. To re-run extracts against this release, you’d have to sync it again (another ~16 GB download).`})]})})]},e.release)),M.length===0&&(0,w.jsx)(`tr`,{children:(0,w.jsx)(`td`,{className:`px-4 py-4 text-label-14 text-muted`,colSpan:h()?4:5,children:`No cached releases on this machine. If you ran a sync from a different machine (or deleted the cache), the backlink data is still in the database — but you’ll need to re-sync a release to run new extracts.`})})]})]})}),(0,w.jsx)(`p`,{className:`mt-3 text-copy-13 text-muted`,children:`Common Crawl files are stored locally. DuckDB reads them; Canonry stores results in its normal database.`})]})]}),A.length>1&&(0,w.jsxs)(`section`,{className:`page-section`,children:[(0,w.jsx)(`div`,{className:`section-head section-head-inline`,children:(0,w.jsx)(`div`,{children:(0,w.jsx)(`h2`,{children:`Past release syncs`})})}),(0,w.jsx)(x,{className:`surface-card overflow-hidden`,children:(0,w.jsxs)(`table`,{className:`w-full text-label-14`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{className:`border-b border-base text-left text-label-12 normal-case text-faint`,children:[(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Release`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Status`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-right text-label-12-strong`,children:`Projects`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-right text-label-12-strong`,children:`Rows`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Finished`})]})}),(0,w.jsx)(`tbody`,{children:A.map(e=>(0,w.jsxs)(`tr`,{className:`border-b border-mono-900 last:border-0`,children:[(0,w.jsx)(`td`,{className:`px-4 py-2 text-strong`,children:(0,w.jsx)(`code`,{children:e.release})}),(0,w.jsx)(`td`,{className:`px-4 py-2`,children:(0,w.jsx)(v,{tone:O(e.status),children:e.status})}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-right text-secondary tabular-nums`,children:e.projectsProcessed??`—`}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-right text-secondary tabular-nums`,children:e.domainsDiscovered??`—`}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-secondary`,children:D(e.queryFinishedAt??e.updatedAt)})]},e.id))})]})})]})]})}export{k as BacklinksPage};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as e}from"./vendor-markdown-
|
|
1
|
+
import{r as e}from"./vendor-markdown-DMxglFrF.js";import{c as t,h as n,i as r,p as i,r as a,s as o,t as s,u as c}from"./vendor-recharts-DAGVAt0P.js";import{Sc as l,qc as u}from"./ToneBadge-BekCDc9B.js";var d={ambiguous:`Property identity unverified`},f=`No answer could be tied to one property`;function p(e){return e.denominator===null||e.denominator===void 0||e.unattributed===void 0||e.unattributed<=0?null:`${e.unattributed} of ${e.denominator+e.unattributed} answers could not be tied to one property`}function m(e){if(e.denominator===null||e.denominator===void 0||e.unchecked===void 0||e.unchecked<=0)return null;let t=e.denominator+e.unchecked+(e.citationNotMeasured??0);return`${e.unchecked} of ${t} ${t===1?`answer`:`answers`} had sources that could not be checked`}var h=`The engine returns no sources, so whether it cites you is not measured.`;function g(e){if(e.denominator===null||e.denominator===void 0||e.citationNotMeasured===void 0||e.citationNotMeasured<=0)return null;let t=e.denominator+(e.unchecked??0)+e.citationNotMeasured;return`${e.citationNotMeasured} of ${t} ${t===1?`answer`:`answers`} came from engines that return no sources`}var _={label:`Not measured`,signal:`Citation not measured`,timeline:`citation not measured`,sources:h},v=function(e){return e.Clicks=`clicks`,e.Impressions=`impressions`,e.CTR=`ctr`,e.Position=`position`,e}({}),y={clicks:`Clicks`,impressions:`Impressions`,ctr:`CTR`,position:`Position`},b=l;function x(e){return e.endsWith(`%`)?{figure:e.slice(0,-1),sign:`%`}:{figure:e,sign:``}}function S(e,t){if(t!==`cited`)return p(e);let n=[m(e),g(e)].filter(e=>e!==null);return n.length===0?null:n.join(`; `)}function C(e,t){let n=S(e,t);if(n===null)return null;let r=t===`cited`?[...e.unchecked?[`${e.unchecked} unchecked`]:[],...e.citationNotMeasured?[`${e.citationNotMeasured} not measured`]:[]]:e.unattributed?[`${e.unattributed} unattributed`]:[],i=t===`cited`?(e.unchecked??0)+(e.citationNotMeasured??0):e.unattributed??0;if(r.length===0)return null;let a=r.join(`, `);return{label:a,text:`${a}. ${n}, so this rate leaves ${i===1?`it`:`them`} out.`}}function w(e,t){let n=u(e);switch(t){case`cited`:return`${n} cited (any page)`;case`emerging`:return`${n} newly cited (any page)`;case`lost`:return`${n} citation lost (any page)`;case`not-cited`:return`${n} not cited (any page)`;case`not-measured`:return`${n} citation not measured`;case`pending`:return`Pending`}}var T={cited:`Cited`,"not-cited":`Not cited`,"not-measured":_.label};function E(e){let t=[];if(e.message&&t.push(e.message),e.providers)for(let[n,r]of Object.entries(e.providers)){let e=`[${n}] ${r.message}`;r.raw===void 0?t.push(e):t.push(`${e}\n\n${JSON.stringify(r.raw,null,2)}`)}return t.length>0?t.join(`
|
|
2
2
|
|
|
3
3
|
`):`Run failed.`}function D(e){return e.split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function O(e,t,n=new Date){let r=new Date(e);if(Number.isNaN(r.getTime()))return e;let i=r.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`});return t&&new Date(t).toDateString()===r.toDateString()?i:`${k(e,n)}, ${i}`}function k(e,t=new Date){let n=new Date(e);return Number.isNaN(n.getTime())?e:n.getFullYear()===t.getFullYear()?A(e):n.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}function A(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})}function j(e){if(!e)return`—`;try{return new Date(e).toLocaleString()}catch{return e}}function M(e){return e===null?`Unknown`:e?`Pass`:`Fail`}function N(e){return e===0?`12:00 AM`:e<12?`${e}:00 AM`:e===12?`12:00 PM`:`${e-12}:00 PM`}function P(e,t){return e===`twice-daily`?`twice-daily`:e.startsWith(`weekly@`)?`${e}@${t}`:`daily@${t}`}function F(e,t){if(!e)return{freq:`custom`,hour:6,customCron:t};if(e===`twice-daily`)return{freq:`twice-daily`,hour:6,customCron:``};let n=e.match(/^daily(?:@(\d+))?$/);if(n)return{freq:`daily`,hour:n[1]?parseInt(n[1]):6,customCron:``};let r=e.match(/^(weekly@(?:mon|tue|wed|thu|fri|sat|sun))(?:@(\d+))?$/);return r?{freq:r[1],hour:r[2]?parseInt(r[2]):6,customCron:``}:{freq:`custom`,hour:6,customCron:t}}function I(e,t,n){let r=n===`UTC`?`UTC`:n.split(`/`).pop()?.replace(/_/g,` `)??n;if(!e)return`Custom: ${t} · ${r}`;if(e===`twice-daily`)return`Twice a day (6am & 6pm) · ${r}`;let i=e.match(/^daily(?:@(\d+))?$/);if(i)return`Every day at ${N(i[1]?parseInt(i[1]):6)} · ${r}`;let a=e.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(a){let e={mon:`Monday`,tue:`Tuesday`,wed:`Wednesday`,thu:`Thursday`,fri:`Friday`,sat:`Saturday`,sun:`Sunday`},t=a[2]?parseInt(a[2]):6;return`Every ${e[a[1]]} at ${N(t)} · ${r}`}return`${e} · ${r}`}function L(e,t){return t&&t!==e?`${e} · ${t}`:e}function R(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone,t=new Intl.DateTimeFormat(`en-US`,{timeZoneName:`short`}).formatToParts().find(e=>e.type===`timeZoneName`)?.value;return L(e,t)}var z=e(),B={contentStyle:{backgroundColor:`var(--chart-tooltip-bg, #0a0a0a)`,border:`none`,borderRadius:`var(--radius-material-tooltip)`,boxShadow:`var(--shadow-material-tooltip)`,fontSize:13,lineHeight:`18px`,fontWeight:400},labelStyle:{color:`var(--chart-tooltip-label, #ededed)`},itemStyle:{color:`var(--chart-tooltip-item, #a1a1a1)`}},V={fill:`var(--chart-neutral-text-dim, #a1a1a1)`,fontSize:12},H=`var(--chart-grid, #2e2e2e)`,U=`var(--chart-axis, #2e2e2e)`,W=[`var(--chart-series-1, #34d399)`,`var(--chart-series-2, #60a5fa)`,`var(--chart-series-3, #f472b6)`,`var(--chart-series-4, #facc15)`,`var(--chart-series-5, #a78bfa)`,`var(--chart-series-6, #fb923c)`,`var(--chart-series-7, #22d3ee)`,`var(--chart-series-8, #f87171)`],G={gemini:`#60a5fa`,openai:`#34d399`,claude:`#fb923c`,perplexity:`#22d3ee`,muse:`#818cf8`,local:`#a78bfa`};function K(e,t=0){return G[e]??W[t%W.length]}var q={text:`var(--chart-neutral-text, #a1a1a1)`,textDim:`var(--chart-neutral-text-dim, #a1a1a1)`,textFaint:`var(--chart-neutral-text-faint, #7d7d7d)`,surface:`var(--chart-neutral-surface, #2e2e2e)`,trackSubtle:`var(--chart-neutral-track-subtle, rgb(255 255 255 / 0.04))`,gridLine:`var(--chart-neutral-grid-line, rgb(255 255 255 / 0.06))`},J={positive:`var(--chart-tone-positive, #34d399)`,positiveDeep:`var(--chart-tone-positive-deep, #10b981)`,caution:`var(--chart-tone-caution, #fbbf24)`,negative:`var(--chart-tone-negative, #fb7185)`,neutral:`var(--chart-tone-neutral, #a1a1a1)`};function Y(e){return e}function X(e){let t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e);return t?{year:Number(t[1]),month:Number(t[2]),day:Number(t[3])}:null}function Z(e){let t=String(e),n=X(t);return n?new Date(Date.UTC(n.year,n.month-1,n.day)).toLocaleDateString(void 0,{timeZone:`UTC`,month:`short`,day:`numeric`,year:`numeric`}):t}function Q(e){let t=X(String(e));return t?`${t.month}/${t.day}`:String(e)}function $(e){let t=X(String(e));return t?new Date(Date.UTC(t.year,t.month-1,t.day)).toLocaleDateString(void 0,{timeZone:`UTC`,month:`short`,day:`numeric`}):String(e)}function ee(e){return new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}function te(e){return new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function ne(e){return new Date(e).getFullYear()}function re(e){let t=new Date(e);return`${t.getMonth()+1}/${t.getDate()}`}function ie({data:e,xKey:l,series:u,height:d=260,xTickFormatter:f,labelFormatter:p,onSelectX:m,selectedX:h,accessibilityLayer:g=!0,ariaLabel:_}){let v=[...new Set(u.map(e=>e.axisId))],y=new Map(u.map(e=>[e.label,e.formatValue])),b=e.map((t,n)=>{let r={...t};for(let t of u){if(!t.trend)continue;let i=t.trend.startIndex??0,a=t.trend.endIndex??e.length-1;n<i||n>a?r[`${t.dataKey}__trend`]=null:r[`${t.dataKey}__trend`]=a<=i?t.trend.start:t.trend.start+(t.trend.end-t.trend.start)*(n-i)/(a-i)}return r});return(0,z.jsx)(n,{width:`100%`,height:d,children:(0,z.jsxs)(s,{data:b,accessibilityLayer:g,"aria-label":_,margin:{top:8,right:8,bottom:4,left:0},onClick:m?e=>{e?.activeLabel!==void 0&&m(String(e.activeLabel))}:void 0,style:m?{cursor:`pointer`}:void 0,children:[(0,z.jsx)(t,{stroke:H,strokeDasharray:`3 3`,vertical:!1}),h!=null&&(0,z.jsx)(c,{x:h,yAxisId:v[0],stroke:q.text,strokeDasharray:`2 3`,strokeWidth:1}),(0,z.jsx)(r,{dataKey:l,tick:V,stroke:U,tickFormatter:f,minTickGap:24}),v.map((e,t)=>{let n=u.find(t=>t.axisId===e);return(0,z.jsx)(a,{yAxisId:e,orientation:t===1?`right`:`left`,hide:t>1,reversed:n.inverted??!1,domain:n.inverted?[1,`auto`]:[0,`auto`],tick:V,stroke:U,width:48,tickFormatter:n.formatValue},e)}),(0,z.jsx)(i,{...B,labelFormatter:e=>{let t=typeof e==`string`||typeof e==`number`?String(e):``;return p?p(t):t},formatter:(e,t)=>{let n=String(t??``);return typeof e==`number`?[y.get(n)?.(e)??e.toLocaleString(),n]:[String(e??``),n]}}),u.filter(e=>e.trend).map(e=>(0,z.jsx)(o,{yAxisId:e.axisId,dataKey:`${e.dataKey}__trend`,name:`${e.label} trend`,stroke:e.color,strokeWidth:1.5,strokeDasharray:`5 4`,strokeOpacity:.55,dot:!1,activeDot:!1,isAnimationActive:!1,legendType:`none`,tooltipType:`none`},`${e.dataKey}-trend`)),u.map(e=>(0,z.jsx)(o,{yAxisId:e.axisId,dataKey:e.dataKey,name:e.label,stroke:e.color,strokeWidth:2,dot:!1,activeDot:{r:3},connectNulls:e.connectNulls??!1,isAnimationActive:!1},e.dataKey))]})})}export{R as A,d as B,M as C,k as D,A as E,b as F,D as I,_ as L,I as M,w as N,O,x as P,h as R,C as S,N as T,K as _,W as a,v as b,ie as c,Q as d,ee as f,ne as g,Y as h,q as i,F as j,j as k,Z as l,re as m,V as n,J as o,te as p,H as r,B as s,U as t,$ as u,T as v,E as w,P as x,y,f as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{lt as t,q as n}from"./vendor-lucide-C3F7vHjd.js";import{u as r}from"./vendor-radix-CXYx3LLU.js";import{r as i}from"./vendor-markdown-DMxglFrF.js";import{t as a}from"./use-tooltip-position-71Ffohl_.js";var o=e(t(),1),s=e(r(),1),c=i();function l({children:e,label:t=`More info`,placement:r=`top`,className:i}){let l=(0,o.useId)(),{open:u,triggerRef:d,bubbleRef:f,style:p,show:m,hide:h,hideAfterPointerLeaves:g}=a(r,`16rem`);return(0,c.jsxs)(`span`,{className:`relative inline-flex ${i??``}`,children:[(0,c.jsx)(`button`,{ref:d,type:`button`,"aria-label":t,"aria-describedby":u?l:void 0,className:`inline-flex h-4 w-4 items-center justify-center rounded-full text-muted hover:text-strong focus:text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500`,onMouseEnter:m,onMouseLeave:g,onFocus:m,onBlur:h,onKeyDown:e=>{e.key===`Escape`&&h()},children:(0,c.jsx)(n,{className:`h-3.5 w-3.5`,"aria-hidden":!0})}),u&&(0,s.createPortal)((0,c.jsx)(`span`,{ref:f,id:l,role:`tooltip`,className:`material-tooltip px-3 py-2 text-copy-13 text-secondary whitespace-normal`,style:p,onMouseEnter:m,onMouseLeave:g,children:e}),d.current?.closest(`.app-shell-embed`)??document.body)]})}export{l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./vendor-markdown-
|
|
1
|
+
import{r as e}from"./vendor-markdown-DMxglFrF.js";import{t}from"./AuditHistoryPanel-C9muxa5U.js";var n=e();function r(){return(0,n.jsxs)(`div`,{className:`page-container`,children:[(0,n.jsx)(`div`,{className:`page-header`,children:(0,n.jsxs)(`div`,{className:`page-header-left`,children:[(0,n.jsx)(`h1`,{className:`page-title`,children:`History`}),(0,n.jsx)(`p`,{className:`page-subtitle`,children:`Changes to projects and settings.`})]})}),(0,n.jsx)(t,{})]})}export{r as HistoryPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{lt as t,s as n}from"./vendor-lucide-C3F7vHjd.js";import{u as r}from"./vendor-radix-CXYx3LLU.js";import{r as i}from"./vendor-markdown-DMxglFrF.js";import{t as a}from"./use-tooltip-position-71Ffohl_.js";var o=e(t(),1),s=e(r(),1),c=i();function l({text:e,placement:t=`top`,tone:r=`info`,label:i}){let{open:l,triggerRef:u,bubbleRef:d,style:f,show:p,hide:m,hideAfterPointerLeaves:h}=a(t,`14rem`),g=(0,o.useRef)(!1);return(0,c.jsxs)(`span`,{className:`info-tooltip-wrapper`,onMouseEnter:p,onMouseLeave:h,children:[(0,c.jsxs)(`button`,{ref:u,type:`button`,className:`info-tooltip-trigger${i?` info-tooltip-trigger-labeled`:``}${r===`caution`?` info-tooltip-trigger-caution`:``}`,"aria-label":e,"aria-expanded":l,onFocus:p,onBlur:m,onPointerDown:()=>{g.current=l&&u.current?.ownerDocument.activeElement===u.current},onClick:e=>{e.detail===0?l?m():p():g.current?m():p()},onKeyDown:e=>{e.key===`Escape`&&m()},children:[r===`caution`?(0,c.jsx)(n,{className:`info-tooltip-icon`,"aria-hidden":`true`}):(0,c.jsxs)(`svg`,{className:`info-tooltip-icon`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:[(0,c.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,c.jsx)(`path`,{d:`M8 7v4M8 5.5v0`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),i?(0,c.jsx)(`span`,{"aria-hidden":`true`,children:i}):null]}),l&&(0,s.createPortal)((0,c.jsx)(`span`,{ref:d,"aria-hidden":`true`,className:`material-tooltip px-3 py-2 text-copy-13 text-secondary`,style:f,onMouseEnter:p,onMouseLeave:h,children:e}),u.current?.closest(`.app-shell-embed`)??document.body)]})}export{l as t};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{lt as t,st as n}from"./vendor-lucide-C3F7vHjd.js";import{r}from"./vendor-markdown-DMxglFrF.js";import{_ as i,d as a,f as o,p as s,u as c,v as l,x as u}from"./vendor-tanstack-ZnWhYpCU.js";import{At as d,Fs as f,Is as p,Ls as ee,Mc as m,Nc as h,Xs as g,pt as te,r as _,t as v,xt as y}from"./ToneBadge-BekCDc9B.js";import{R as b,S as x,f as S,h as C,z as w}from"./ChartPrimitives-DA5ldw5q.js";import{r as ne}from"./account-context-CTgTl_U3.js";import{Dt as re,Et as ie,Ft as ae,Mt as T,Ot as oe,Tt as E,kt as D,yn as O}from"./react-query-DPn84_Mu.js";import{E as k,n as A}from"./AccessControls-qKt0MIwz.js";import{t as j}from"./InfoTooltip-Dm4gYO4N.js";import{Dt as se,G as ce,J as M,Q as N,Z as P,dt as F,et as le,jt as ue,kt as de,lt as I,mt as L,ut as R}from"./index-CZK8ELxf.js";import{c as z,r as B,s as fe,t as pe,u as V}from"./service-CUnyHRGl.js";var H=e(t(),1),U=r(),W={heading:`Names that count as this Property`,help:`These names identify this Property in answer text. Source titles and URLs do not count as mentions. Qualified names add distinguishing words when several Properties share a name, such as a product line, service, or location.`,names:`Names`,qualifiedNames:`Qualified names`,noNames:`No names are set, so answers can cite this Property but never mention it.`,edit:`Edit names`,save:`Save to draft`,saving:`Saving…`,cancel:`Cancel`,namesHint:`One name per line.`,qualifiedHint:`One per line. Include a name above plus words that identify this specific Property.`,qualifiedNote:`With qualified names set, an answer that uses only a plain name counts as a mention only when it also cites this Property’s own page. Otherwise it is left out as not tied to one property.`,draftOnly:`Saving changes the draft only. Nothing is measured differently until the setup is published.`,saved:`Saved to the draft. Publish the setup to start using these names.`,pending:`Name changes are saved in the draft and not published yet.`,review:`Review and publish`,noChanges:`No changes to save.`,staleDraft:`The draft is based on an older published setup. Open measurement setup to restart it before editing names.`,missingFromDraft:`This Property is not included in the current draft. Open measurement setup to review it.`,conflict:`The draft changed in another session. The latest names are loaded; review them and save again.`,failed:`Could not save these names. Try again.`};function me(e){return[...new Set(e.split(`
|
|
2
|
+
`).map(e=>e.trim()).filter(Boolean))]}function he(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function G(e,t){return he(e.aliases,t.aliases)&&he(e.identityAliases??[],t.identityAliases??[])}function ge(e,t,n){let{identityAliases:r,...i}=e;return n.length>0?{...i,aliases:t,identityAliases:n}:{...i,aliases:t}}function _e({label:e,names:t}){return(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`h3`,{className:`text-heading-14 text-heading`,children:e}),(0,U.jsx)(`ul`,{className:`space-y-1`,children:t.map(e=>(0,U.jsx)(`li`,{className:`text-label-14 text-secondary`,children:e},e))})]})}function K({id:e,issues:t}){return t.length===0?null:(0,U.jsx)(`ul`,{id:e,className:`mt-2 space-y-1`,"aria-label":`Name warnings`,children:t.map(e=>(0,U.jsx)(`li`,{className:`text-label-14 text-caution`,children:f(e)},`${e.field}:${e.index}`))})}function ve({projectName:e,targetKey:t,published:n,activeRevision:r,publishedBrandNames:i,service:a=pe}){let{canWrite:o}=ne(),s=(0,H.useId)(),d=u({...ie({client:y,path:{name:e}}),enabled:o}),f=u({...ae({client:y,path:{name:e}}),enabled:o}),m=d.data?.draft?.authoring.targets.find(e=>e.stableKey===t),h=n.identityAliases??[],g=m!==void 0&&d.data?.draft?.baseActiveRevision===r&&!G(m,n),te=!d.isFetching&&!f.isPending,v=f.data,b=(0,H.useMemo)(()=>v?ee(v):i,[v,i]),[x,S]=(0,H.useState)(!1),[C,w]=(0,H.useState)(``),[re,T]=(0,H.useState)(``),[oe,E]=(0,H.useState)(n),[D,O]=(0,H.useState)(null),k=`${e}\u0000${t}`,[se,ce]=(0,H.useState)(k);se!==k&&(ce(k),S(!1),w(``),T(``),E(n),O(null));let M=(0,H.useRef)(k);M.current=k;let N=(0,H.useMemo)(()=>me(C),[C]),P=(0,H.useMemo)(()=>me(re),[re]),F=(0,H.useMemo)(()=>p({aliases:N,identityAliases:P,brandNames:b}),[N,P,b]),le=F.filter(e=>e.field===`aliases`),ue=F.filter(e=>e.field===`identityAliases`);function de(e){w(e.aliases.join(`
|
|
3
|
+
`)),T((e.identityAliases??[]).join(`
|
|
4
|
+
`)),E({aliases:[...e.aliases],identityAliases:[...e.identityAliases??[]]})}function I(e){return e.draft?e.draft.authoring.targets.find(e=>e.stableKey===t)??null:n}function L(){de(g?m:n),O(null),S(!0)}function R(e){e&&de(e),O({tone:`negative`,text:W.conflict,review:!1})}let z=l({mutationFn:async i=>{let o=await a.loadDraft(e);if(!o.draft){if(G(i.names,n))return{outcome:`unchanged`};if(!G(i.base,n))return{outcome:`conflict`,latest:n};await a.createDraft(e,r),o=await a.loadDraft(e)}let s=o.draft;if(!s||!o.etag)throw Error(W.failed);if(s.baseActiveRevision!==r)return{outcome:`stale`};let c=s.authoring.targets.find(e=>e.stableKey===t);return!c||c.status!==`included`?{outcome:`missing`}:G(i.names,c)?{outcome:`unchanged`}:G(i.base,c)?(await a.upsertTarget(e,o.etag,ge(c,i.names.aliases,i.names.identityAliases)),{outcome:`saved`}):{outcome:`conflict`,latest:c}},meta:{skipGlobalErrorToast:!0},onSuccess:(e,t)=>{if(t.openFor===M.current)switch(e.outcome){case`saved`:S(!1),O({tone:`positive`,text:W.saved,review:!0});return;case`unchanged`:S(!1),O({tone:`positive`,text:W.noChanges,review:!1});return;case`stale`:O({tone:`negative`,text:W.staleDraft,review:!0});return;case`missing`:O({tone:`negative`,text:W.missingFromDraft,review:!0});return;case`conflict`:R(e.latest),d.refetch();return}},onError:(e,t)=>{t.openFor===M.current&&(B(e)?(R(null),d.refetch().then(e=>{e.isSuccess&&R(I(e.data))})):O({tone:`negative`,text:W.failed,review:!1}))}}),fe=(0,U.jsx)(c,{to:`/projects/$projectName/portfolio`,params:{projectName:e},className:`text-link underline-offset-2 hover:underline`,children:W.review}),V=n.aliases.length+h.length;return(0,U.jsxs)(`section`,{"aria-labelledby":`property-names`,className:`page-section-divider`,children:[(0,U.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(`h2`,{id:`property-names`,className:`text-heading-16 text-heading`,children:W.heading}),(0,U.jsx)(j,{text:W.help})]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,U.jsxs)(`p`,{className:`supporting-copy`,children:[V,` `,V===1?`name`:`names`]}),o&&!x?(0,U.jsx)(_,{type:`button`,size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,disabled:!te,onClick:L,children:W.edit}):null]})]}),D?(0,U.jsxs)(`p`,{role:D.tone===`negative`?`alert`:`status`,className:`mb-3 text-copy-14 ${D.tone===`negative`?`text-negative`:`text-positive`}`,children:[D.text,D.review?(0,U.jsxs)(U.Fragment,{children:[` `,fe]}):null]}):g&&!x?(0,U.jsxs)(`p`,{role:`status`,className:`mb-3 text-copy-14 text-caution`,children:[W.pending,` `,fe]}):null,x?(0,U.jsxs)(`form`,{className:`space-y-4`,"aria-label":`Edit names`,onSubmit:e=>{e.preventDefault(),!z.isPending&&z.mutate({names:{aliases:N,identityAliases:P},base:oe,openFor:k})},children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`label`,{htmlFor:`${s}-names`,className:`block text-label-14-strong text-heading`,children:W.names}),(0,U.jsx)(`p`,{id:`${s}-names-hint`,className:`text-copy-14 text-secondary`,children:W.namesHint}),(0,U.jsx)(`textarea`,{id:`${s}-names`,className:`mt-1 min-h-24 w-full rounded-md border border-strong bg-transparent px-3 py-2 text-copy-14 text-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400`,"aria-describedby":`${s}-names-hint${le.length?` ${s}-names-issues`:``}`,value:C,onChange:e=>w(e.target.value)}),(0,U.jsx)(K,{id:`${s}-names-issues`,issues:le}),N.length===0?(0,U.jsx)(`p`,{className:`mt-2 text-copy-14 text-caution`,children:W.noNames}):null]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`label`,{htmlFor:`${s}-qualified`,className:`block text-label-14-strong text-heading`,children:W.qualifiedNames}),(0,U.jsx)(`p`,{id:`${s}-qualified-hint`,className:`text-copy-14 text-secondary`,children:W.qualifiedHint}),(0,U.jsx)(`textarea`,{id:`${s}-qualified`,className:`mt-1 min-h-20 w-full rounded-md border border-strong bg-transparent px-3 py-2 text-copy-14 text-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400`,"aria-describedby":`${s}-qualified-hint ${s}-qualified-note${ue.length?` ${s}-qualified-issues`:``}`,value:re,onChange:e=>T(e.target.value)}),(0,U.jsx)(K,{id:`${s}-qualified-issues`,issues:ue}),(0,U.jsx)(`p`,{id:`${s}-qualified-note`,className:`mt-2 max-w-3xl text-copy-14 text-secondary`,children:W.qualifiedNote})]}),(0,U.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:W.draftOnly}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,U.jsx)(A,{type:`submit`,className:`h-11 px-4 text-label-14 md:h-11`,disabled:z.isPending,children:z.isPending?W.saving:W.save}),(0,U.jsx)(_,{type:`button`,variant:`ghost`,className:`h-11 px-4 text-button-14 md:h-11`,disabled:z.isPending,onClick:()=>{S(!1),O(null)},children:W.cancel})]})]}):V===0?(0,U.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:W.noNames}):(0,U.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[n.aliases.length>0?(0,U.jsx)(_e,{label:W.names,names:n.aliases}):null,h.length>0?(0,U.jsx)(_e,{label:W.qualifiedNames,names:h}):null]})]})}var ye=50,q={branded:{technical:`Branded queries`},"non-brand":{technical:`Non-brand queries`}},J={plan_v1:`Setup update required`,no_completed_run:`No completed measurement yet`,no_population:`No queries of this type are assigned`,evidence_incomplete:`Source evidence is incomplete`,identity_ambiguous:w,not_applicable:`Not applicable for this Property`,citation_not_measured:`The engines return no sources`},be={complete:{label:`Measured`,tone:`positive`},partial:{label:`Partly measured`,tone:`caution`},running:{label:`Measuring now`,tone:`neutral`},queued:{label:`Measurement queued`,tone:`neutral`},failed:{label:`Measurement failed`,tone:`negative`},not_measured:{label:`Not measured`,tone:`neutral`}},Y={assigned:{label:`Matches this Property`,tone:`positive`},sibling:{label:`Matches another Property`,tone:`caution`},ownedUnmapped:{label:`Site URL not in a Property`,tone:`caution`},external:{label:`External URL`,tone:`neutral`},ambiguous:{label:`Matches multiple Properties`,tone:`caution`},invalid:{label:`Invalid URL`,tone:`negative`}};function X(e){return[...e].sort((e,t)=>Number(t.classification===`assigned`)-Number(e.classification===`assigned`))}function xe(e){return`${e.expectedSlotId}:${e.usageEdgeId}`}function Se({row:e}){return e.mentioned===null?(0,U.jsxs)(`span`,{className:`inline-flex flex-col items-start gap-0.5`,children:[(0,U.jsx)(v,{tone:`neutral`,children:`Not measured`}),(0,U.jsx)(`span`,{className:`text-label-12 text-muted`,children:`No mention signal for this Property`})]}):!e.mentioned&&e.mentionIdentity===`wrong-subject`?(0,U.jsxs)(`span`,{className:`inline-flex flex-col items-start gap-0.5`,children:[(0,U.jsx)(v,{tone:`neutral`,children:`Not mentioned`}),(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-label-12 text-muted`,children:[L.label,(0,U.jsx)(j,{text:L.property})]})]}):(0,U.jsx)(v,{tone:e.mentioned?`positive`:`neutral`,children:e.mentioned?`Mentioned`:`Not mentioned`})}var Ce=`—`;function we({row:e}){return e.cited===null?(0,U.jsxs)(`span`,{className:`inline-flex flex-col items-start gap-0.5`,children:[(0,U.jsx)(v,{tone:`neutral`,children:`Not measured`}),(0,U.jsx)(`span`,{className:`text-label-12 text-muted`,children:e.citationMeasured===!1?`The engine returns no sources`:`Sources were not fully captured`})]}):(0,U.jsx)(v,{tone:e.cited?`positive`:`neutral`,children:e.cited?`Cited`:`Not cited`})}function Te({row:e}){return e.citationMeasured===!1?(0,U.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,children:b}):e.cited===null&&e.sources.length===0?(0,U.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,children:`The sources for this answer were not fully captured, so none can be shown.`}):e.sources.length===0?(0,U.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,children:`This answer returned no source URLs at all.`}):(0,U.jsxs)(`details`,{className:`mt-2`,"data-answer-sources":!0,children:[(0,U.jsxs)(`summary`,{className:`min-h-11 cursor-pointer py-3 text-label-14 text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400`,children:[R,` (`,e.sources.length,`)`]}),(0,U.jsx)(`div`,{className:`overflow-x-auto`,children:(0,U.jsxs)(`table`,{className:`evidence-table min-w-[420px]`,children:[(0,U.jsxs)(`caption`,{className:`sr-only`,children:[`Source URLs for `,e.queryText]}),(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:`Match`}),(0,U.jsx)(`th`,{children:`URL`})]})}),(0,U.jsx)(`tbody`,{children:X(e.sources).map(e=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{children:(0,U.jsx)(v,{tone:Y[e.classification].tone,children:Y[e.classification].label})}),(0,U.jsx)(`td`,{children:(0,U.jsx)(I,{url:e.sourceUrl})})]},e.sourceUrl))})]})})]})}function Ee({project:e,targetKey:t,resultId:n}){let r=u({...T({client:y,path:{name:e},query:{targetKey:t,resultId:n}})});if(r.isPending)return(0,U.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,role:`status`,"aria-live":`polite`,children:`Loading the answer…`});if(r.isError)return(0,U.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,role:`alert`,children:`Could not load this answer.`});let i=r.data?.answer;return i==null||i.trim()===``?(0,U.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,children:`This answer was measured, but its text was not stored.`}):(0,U.jsx)(`div`,{className:`py-2`,children:(0,U.jsx)(F,{headingLevel:4,copyable:!0,children:i})})}function De(e){return J[e.reason]??`Not measured`}function Oe({metric:e,signal:t,queryClass:n,emphasis:r=!1,compact:i=!1}){if(e.state===`unavailable`)return(0,U.jsxs)(`span`,{className:`inline-flex flex-col gap-0.5`,children:[(0,U.jsx)(`span`,{className:r?`text-label-18-strong text-secondary`:`text-label-14-strong text-secondary`,children:`Not measured`}),(0,U.jsxs)(`span`,{className:`sr-only`,children:[` · `,n,` queries`]}),(0,U.jsx)(`span`,{className:`text-label-14 text-secondary`,children:De(e)})]});let a=g(e.value),o=e.numerator===void 0||e.denominator===void 0?null:`${e.numerator} of ${e.denominator}`,s=x(e,t);return i?(0,U.jsxs)(`span`,{className:`inline-flex flex-col items-end gap-0.5`,children:[(0,U.jsxs)(`span`,{className:`engine-comparison-metric`,children:[(0,U.jsx)(`span`,{className:`text-label-14-strong text-primary`,children:a}),o?(0,U.jsxs)(`span`,{className:`text-label-13 text-secondary`,"aria-hidden":`true`,children:[e.numerator,`/`,e.denominator]}):null,(0,U.jsxs)(`span`,{className:`sr-only`,children:[o?` · ${o} answers`:``,` · `,n,` queries`]})]}),s?(0,U.jsx)(`span`,{className:`flex`,children:(0,U.jsx)(j,{tone:`caution`,placement:`bottom`,label:s.label,text:s.text})}):null]}):(0,U.jsxs)(`span`,{className:`inline-flex flex-col gap-0.5 tabular-nums`,children:[(0,U.jsx)(`span`,{className:r?`text-label-18-strong text-heading`:`text-label-14-strong text-primary`,children:a}),(0,U.jsxs)(`span`,{className:`sr-only`,children:[` · `,n,` queries`]}),o?(0,U.jsx)(`span`,{className:`text-label-12 text-muted`,children:o}):null,s?(0,U.jsx)(`span`,{className:`-ml-2 flex`,children:(0,U.jsx)(j,{tone:`caution`,placement:`bottom`,label:s.label,text:s.text})}):null]})}function ke(e,t,n){return E({client:y,path:{name:e},query:{scope:`property`,targetKey:t,queryClass:n}})}function Ae(e){return e?.properties.items.at(0)}function je({measuredAt:e,unmeasuredReason:t,queryClass:n}){let r=e===void 0?null:e===null?`No completed check yet`:`Measured ${S(C(e))}`;return r===null&&t===void 0?null:(0,U.jsxs)(`p`,{className:`supporting-copy`,children:[[r,t].filter(Boolean).join(` · `),r!==null&&t===void 0?` · ${q[n].technical.toLocaleLowerCase()} only`:``]})}function Me({project:e,groups:t}){return t.length===0?null:(0,U.jsxs)(`section`,{"aria-labelledby":`property-market`,className:`page-section-divider`,children:[(0,U.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,U.jsx)(`div`,{children:(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(`h2`,{id:`property-market`,className:`text-heading-16 text-heading`,children:`Measured at the market level`}),(0,U.jsx)(j,{text:`Competitors are attached to groups. Share of voice and competitor pressure use the group or market that includes this Property.`})]})}),(0,U.jsx)(_,{asChild:!0,type:`button`,size:`sm`,variant:`outline`,children:(0,U.jsx)(c,{to:`/projects/$projectName`,params:{projectName:e},search:e=>N(M(e),{measurementScope:`project`}),children:`Open measurement overview`})})]}),(0,U.jsx)(`ul`,{className:`flex flex-wrap gap-2`,children:t.map(e=>(0,U.jsxs)(`li`,{className:`rounded-md border border-default px-3 py-1.5 text-label-14 text-strong`,children:[e.label,(0,U.jsxs)(`span`,{className:`ml-2 text-label-12 text-muted`,children:[e.competitors.length,` `,e.competitors.length===1?`competitor`:`competitors`]})]},e.stableKey))})]})}function Ne({branded:e,nonBrand:t,brandedError:n,nonBrandError:r,onRetry:i}){return(0,U.jsxs)(`section`,{"aria-labelledby":`property-brand-contrast`,children:[(0,U.jsx)(`div`,{className:`section-head section-head-inline`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(`h2`,{id:`property-brand-contrast`,className:`text-heading-16 text-heading`,children:`Coverage for this Property`}),(0,U.jsx)(j,{text:`Non-brand queries do not name this Property. Branded queries name it. Each rate uses only the measured answers for that query type. Mentioned means the Property was named in the answer; cited means its URL appeared in the sources. Unchecked sources are not counted as a citation miss.`})]})}),(0,U.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,U.jsxs)(`table`,{className:`evidence-table min-w-[560px]`,children:[(0,U.jsx)(`caption`,{className:`sr-only`,children:`Mention and citation coverage for this Property, split by query class`}),(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:`Query type`}),(0,U.jsx)(`th`,{children:`Mentioned in the answer`}),(0,U.jsx)(`th`,{children:`Cited as a source`})]})}),(0,U.jsx)(`tbody`,{children:[{queryClass:`non-brand`,row:t,isError:r},{queryClass:`branded`,row:e,isError:n}].map(({queryClass:e,row:t,isError:n})=>(0,U.jsxs)(`tr`,{children:[(0,U.jsxs)(`td`,{children:[(0,U.jsx)(`span`,{className:`block text-label-14-strong text-heading`,children:q[e].technical}),t&&n?(0,U.jsxs)(`span`,{className:`mt-2 flex flex-wrap items-center gap-2 text-label-14 text-caution`,children:[(0,U.jsx)(`span`,{role:`status`,children:`Refresh failed.`}),(0,U.jsxs)(_,{type:`button`,size:`sm`,variant:`ghost`,className:`h-11 px-3 text-button-14 md:h-11`,onClick:()=>i(e),children:[`Retry `,q[e].technical.toLocaleLowerCase()]})]}):null]}),t?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`td`,{children:(0,U.jsx)(Oe,{metric:t.mentionCoverage,signal:`mentioned`,queryClass:e,emphasis:!0})}),(0,U.jsx)(`td`,{children:(0,U.jsx)(Oe,{metric:t.citationCoverage,signal:`cited`,queryClass:e,emphasis:!0})})]}):n?(0,U.jsx)(`td`,{colSpan:2,children:(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,U.jsxs)(`span`,{role:`alert`,children:[`Could not load `,q[e].technical.toLocaleLowerCase(),`.`]}),(0,U.jsxs)(_,{type:`button`,size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,onClick:()=>i(e),children:[`Retry `,q[e].technical.toLocaleLowerCase()]})]})}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`td`,{children:(0,U.jsx)(`span`,{className:`text-label-14 text-secondary`,children:`Loading…`})}),(0,U.jsx)(`td`,{children:(0,U.jsx)(`span`,{className:`text-label-14 text-secondary`,children:`Loading…`})})]})]},e))})]})})]})}function Pe({row:e,queryClass:t,isError:n}){return(0,U.jsxs)(`section`,{"aria-labelledby":`property-providers`,className:`page-section-divider`,children:[(0,U.jsx)(`div`,{className:`section-head section-head-inline`,children:(0,U.jsx)(`div`,{children:(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(`h2`,{id:`property-providers`,className:`text-heading-16 text-heading`,children:`Which engines answer for this Property`}),(0,U.jsx)(j,{text:`Each row is measured over the queries that engine actually answered for this Property, so the rows are a split of the same population rather than parts that add up to the Property total. An engine that answered nothing for this Property is absent instead of shown at 0%.`})]})})}),e===void 0&&n?(0,U.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[`Details for `,q[t].technical.toLocaleLowerCase(),` are unavailable. Retry that query type above.`]}):e===void 0?(0,U.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Loading…`}):e.providers.length===0?(0,U.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[`No answer engine has measured `,q[t].technical.toLocaleLowerCase(),` for this Property.`,e.mentionCoverage.state===`unavailable`?` ${De(e.mentionCoverage)}.`:``]}):(0,U.jsx)(`div`,{className:`overflow-x-auto`,children:(0,U.jsxs)(`table`,{className:`engine-comparison`,children:[(0,U.jsx)(`caption`,{className:`sr-only`,children:`Per-engine mention and citation coverage`}),(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{scope:`col`,children:`Engine`}),(0,U.jsx)(`th`,{scope:`col`,children:`Mentioned`}),(0,U.jsx)(`th`,{scope:`col`,children:`Cited`})]})}),(0,U.jsx)(`tbody`,{children:e.providers.map(e=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{children:(0,U.jsx)(V,{provider:e.provider})}),(0,U.jsx)(`td`,{children:(0,U.jsx)(Oe,{metric:e.mentionCoverage,signal:`mentioned`,queryClass:t,compact:!0})}),(0,U.jsx)(`td`,{children:(0,U.jsx)(Oe,{metric:e.citationCoverage,signal:`cited`,queryClass:t,compact:!0})})]},e.provider))})]})})]})}function Z(e){let t=e.questions.join(` · `);return e.questionsTruncated?`${t} +${e.questionTotal-e.questions.length} more`:t}function Fe({project:e,targetKey:t,queryClass:n}){let r=u({...oe({client:y,path:{name:e},query:{targetKey:t,queryClass:n}})});if(r.isPending||r.isError)return null;let i=r.data?.competitors??[],a=r.data?.basis;return(0,U.jsxs)(`section`,{"aria-labelledby":`property-named-instead`,className:`page-section-divider`,children:[(0,U.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,U.jsx)(`div`,{children:(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(`h2`,{id:`property-named-instead`,className:`text-heading-16 text-heading`,children:`Named instead of this Property`}),(0,U.jsx)(j,{text:`Counted from the answers that did not name this Property, so a name here is one an engine recommended in its place. Occurrences count answers, not positions: an engine naming the same rival in two answers counts twice, and one naming it twice in a single answer counts once.`})]})}),i.length>0?(0,U.jsxs)(`p`,{className:`supporting-copy`,children:[r.data?.total??i.length,` named`]}):null]}),i.length===0?(0,U.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`No rival was named in the answers this Property missed. Nothing to compete with here yet.`}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`overflow-x-auto`,children:(0,U.jsxs)(`table`,{className:`evidence-table min-w-[420px]`,children:[(0,U.jsx)(`caption`,{className:`sr-only`,children:`Names the engines gave instead of this Property`}),(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:`Named`}),(0,U.jsx)(`th`,{children:`Answers`}),(0,U.jsx)(`th`,{children:`Engines`}),(0,U.jsx)(`th`,{children:`Queries`})]})}),(0,U.jsx)(`tbody`,{children:i.map(e=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{className:`text-strong`,children:e.name}),(0,U.jsx)(`td`,{className:`tabular-nums text-secondary`,children:e.occurrences}),(0,U.jsxs)(`td`,{className:`text-secondary`,children:[e.providers.map(e=>k(e)).join(`, `),e.providersTruncated?` +${e.providerTotal-e.providers.length}`:``]}),(0,U.jsx)(`td`,{className:`text-right`,children:(0,U.jsxs)(`span`,{className:`inline-flex items-center justify-end gap-1`,children:[(0,U.jsx)(`span`,{className:`tabular-nums text-secondary`,children:e.questionTotal}),(0,U.jsx)(j,{text:Z(e)})]})})]},e.name))})]})}),a?.state===`available`?(0,U.jsxs)(`p`,{className:`supporting-copy mt-2`,children:[a.targetMissResults,` of `,a.answeredResults,` answers to `,q[n].technical.toLocaleLowerCase(),` did not name this Property.`]}):null]})]})}function Ie({questions:e,queryClass:t}){return(0,U.jsxs)(`section`,{"aria-labelledby":`property-questions`,className:`page-section-divider`,children:[(0,U.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,U.jsx)(`div`,{children:(0,U.jsxs)(`h2`,{id:`property-questions`,className:`text-heading-16 text-heading`,children:[q[t].technical,` assigned to this Property`]})}),(0,U.jsxs)(`p`,{className:`supporting-copy`,children:[e.length,` assigned`]})]}),e.length===0?(0,U.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[`No `,q[t].technical.toLocaleLowerCase(),` are assigned. Add one in advanced measurement setup to measure this class.`]}):(0,U.jsx)(`div`,{className:`overflow-x-auto`,children:(0,U.jsxs)(`table`,{className:`evidence-table min-w-[420px]`,children:[(0,U.jsx)(`caption`,{className:`sr-only`,children:`Queries assigned to this Property`}),(0,U.jsx)(`thead`,{children:(0,U.jsx)(`tr`,{children:(0,U.jsx)(`th`,{children:`Query`})})}),(0,U.jsx)(`tbody`,{children:e.map(e=>(0,U.jsx)(`tr`,{children:(0,U.jsx)(`td`,{className:`text-secondary`,children:e})},e))})]})})]})}function Le({urls:e}){return(0,U.jsxs)(`section`,{"aria-labelledby":`property-urls`,className:`page-section-divider`,children:[(0,U.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,U.jsx)(`div`,{children:(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(`h2`,{id:`property-urls`,className:`text-heading-16 text-heading`,children:`URLs that count as this Property`}),(0,U.jsx)(j,{text:`A cited source URL is credited to this Property when it matches one of these. The most specific matcher wins, so a URL covered by two Properties at the same specificity is flagged for review instead of being credited to either.`})]})}),(0,U.jsxs)(`p`,{className:`supporting-copy`,children:[e.length,` configured`]})]}),e.length===0?(0,U.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`No URLs are configured for this Property.`}):(0,U.jsx)(`div`,{className:`overflow-x-auto`,children:(0,U.jsxs)(`table`,{className:`evidence-table min-w-[420px]`,children:[(0,U.jsx)(`caption`,{className:`sr-only`,children:`URL matchers configured for this Property`}),(0,U.jsx)(`thead`,{children:(0,U.jsx)(`tr`,{children:(0,U.jsx)(`th`,{children:`URL`})})}),(0,U.jsx)(`tbody`,{children:e.map(e=>(0,U.jsx)(`tr`,{children:(0,U.jsx)(`td`,{className:`break-all text-secondary`,children:e})},e))})]})})]})}var Q={heading:`Cited on other queries`,help:`Answers to queries assigned to other properties that still cited one of this Property’s own pages. This Property was not measured on those queries, so these answers are not in its Mentioned or Cited rates.`,notCounted:`not in this Property’s rates`,empty:`No answer to a query assigned elsewhere cited this Property’s pages in the displayed measurement.`,loadError:`Citations from other queries could not be loaded.`,partlySaved:`Sources partly saved`};function Re({project:e,targetKey:t,queryClass:n,runId:r,targetLabels:a}){let[o,s]=(0,H.useState)(new Set),l={client:y,path:{name:e},query:{targetKey:t,queryClass:n,shape:h[`other-queries`],limit:ye,...r?{runId:r}:{}}},u=i({...D(l),initialPageParam:l,getNextPageParam:e=>e.otherQueries?.nextCursor?{path:l.path,query:{...l.query,cursor:e.otherQueries.nextCursor}}:void 0}),d=u.data?.pages??[];if(d[0]?.measurement.state===`not_measured`)return null;let f=d.flatMap(e=>e.otherQueries?.items??[]),p=d[0]?.otherQueries?.totalEstimate??f.length,ee=e=>`${e.expectedSlotId}:${e.queryClass}`,m=q[n].technical.toLocaleLowerCase();return(0,U.jsxs)(`section`,{"aria-labelledby":`property-other-queries`,className:`page-section-divider`,children:[(0,U.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(`h2`,{id:`property-other-queries`,className:`text-heading-16 text-heading`,children:Q.heading}),(0,U.jsx)(j,{text:Q.help})]}),u.data?(0,U.jsxs)(`p`,{className:`supporting-copy`,children:[p,` `,p===1?`answer`:`answers`,` · `,m,` · `,Q.notCounted]}):null]}),u.isPending?(0,U.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Loading…`}):u.isError&&f.length===0?(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,U.jsx)(`span`,{role:`alert`,children:Q.loadError}),(0,U.jsx)(_,{type:`button`,size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,onClick:()=>{u.refetch()},children:`Retry`})]}):f.length===0?(0,U.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:Q.empty}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`overflow-x-auto`,children:(0,U.jsxs)(`table`,{className:`evidence-table min-w-[640px]`,children:[(0,U.jsx)(`caption`,{className:`sr-only`,children:`Answers to other properties’ queries that cited this Property’s pages`}),(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:`Query`}),(0,U.jsx)(`th`,{children:`Assigned to`}),(0,U.jsx)(`th`,{children:`Pages cited`}),(0,U.jsx)(`th`,{children:(0,U.jsx)(`span`,{className:`sr-only`,children:`Answer`})})]})}),(0,U.jsx)(`tbody`,{children:f.map(t=>{let n=ee(t),r=o.has(n),i=`property-other-query-${encodeURIComponent(n)}`;return(0,U.jsxs)(H.Fragment,{children:[(0,U.jsxs)(`tr`,{children:[(0,U.jsxs)(`td`,{className:`text-secondary`,children:[(0,U.jsx)(`span`,{className:`block text-label-14-strong text-heading`,children:t.queryText}),(0,U.jsx)(`span`,{className:`mt-1 block text-label-12 text-muted`,children:[k(t.provider),t.location].filter(Boolean).join(` · `)})]}),(0,U.jsx)(`td`,{children:(0,U.jsx)(`ul`,{className:`space-y-1`,children:t.assignedTargetKeys.map(t=>(0,U.jsx)(`li`,{children:(0,U.jsx)(c,{to:`/projects/$projectName/properties/$targetKey`,params:{projectName:e,targetKey:t},search:M,className:`text-label-14 text-link hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400`,children:a.get(t)??t})},t))})}),(0,U.jsxs)(`td`,{children:[(0,U.jsx)(`ul`,{className:`space-y-1`,children:t.sources.map(e=>(0,U.jsx)(`li`,{className:`min-w-0`,children:(0,U.jsx)(I,{url:e.sourceUrl})},e.sourceUrl))}),t.sourcesTruncated?(0,U.jsxs)(`span`,{className:`mt-1 block text-label-12 text-muted`,children:[t.sourceCount,` pages in total`]}):null,t.evidenceComplete?null:(0,U.jsx)(`span`,{className:`mt-1 block text-label-12 text-muted`,children:Q.partlySaved})]}),(0,U.jsx)(`td`,{className:`text-right`,children:(0,U.jsx)(_,{type:`button`,size:`sm`,variant:`ghost`,className:`h-auto pointer-coarse:min-h-11 max-w-full whitespace-normal py-2 text-left md:h-auto`,"aria-expanded":r,"aria-label":r?`Hide the answer for ${t.queryText}`:`Read the answer for ${t.queryText}`,"aria-controls":r?i:void 0,onClick:()=>s(e=>{let t=new Set(e);return t.delete(n)||t.add(n),t}),children:r?`Hide answer`:`Read answer`})})]}),r?(0,U.jsx)(`tr`,{children:(0,U.jsx)(`td`,{id:i,colSpan:4,className:`bg-surface-subtle px-4`,children:(0,U.jsx)(Ee,{project:e,targetKey:t.assignedTargetKeys[0],resultId:t.observationId})})}):null]},n)})})]})}),u.hasNextPage?(0,U.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,U.jsxs)(`span`,{children:[`Showing `,f.length,` of `,p]}),(0,U.jsx)(_,{size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,disabled:u.isFetchingNextPage,onClick:()=>{u.fetchNextPage()},children:u.isFetchingNextPage?`Loading…`:`Show ${ye} more`})]}):null]})]})}function ze(e,t){let n=[e.marketKey?t??`the selected market`:null,e.provider?`the ${k(e.provider)} answer engine`:null,e.model?`the ${m(e.model)} model`:null,e.location?`location ${e.location}`:null,e.from||e.to?`a date range`:null,e.measurementRunId?`a saved check`:null].filter(e=>e!==null);return n.length===0?null:`AI Visibility is filtered to ${n.join(`, `)}. This page shows the latest measurement for ${z.allMarkets.toLocaleLowerCase()} and answer engines.`}function Be(){let{projectName:e,targetKey:t}=s({strict:!1}),r=a(),l=o({strict:!1}),f=(0,H.useMemo)(()=>P(l),[l]),[p,ee]=(0,H.useState)(new Set),m=e??``,g=t??``,b=!!m&&!!g,x=(0,H.useMemo)(()=>de(`portfolio`,se(te())),[]),S=b&&x,{canWrite:C}=ne(),w=u({...re({client:y,path:{name:m}}),enabled:S}),ie=w.data?.active?.plan,ae=ie?.schemaVersion===2?ie:null,T=f.queryClass===`branded`||f.queryClass===`non-brand`?f.queryClass:null,oe=e=>ae?.assignments.some(t=>t.targetKey===g&&t.queryClass===e)??!1,E=T??(!oe(`non-brand`)&&oe(`branded`)?`branded`:`non-brand`);(0,H.useEffect)(()=>{ae&&!T&&r({to:`.`,replace:!0,search:e=>N(e,{queryClass:E})})},[ae,T,E,r]);let A=u({...ke(m,g,`branded`),enabled:S}),F=u({...ke(m,g,`non-brand`),enabled:S}),I=Ae(A.data),L=Ae(F.data),z=E===`branded`?A.data:F.data,B=E===`branded`?I:L,pe=(E===`branded`?A.isError:F.isError)&&B===void 0,V=z?.measurement.displayedRunId;ue(m,{view:`property`,selection:{mode:`advanced`,scope:`property`,scopeKey:g,queryClass:E,limit:10,...V?{runId:V}:{}}});let W=B?.mentionCoverage.state===`unavailable`?De(B.mentionCoverage):void 0,me=z===void 0?void 0:z.measurement.completedAt??null,he=z!==void 0&&(z.measurement.state===`not_measured`||z.nextAction.kind===`run_measurement`),G=e=>N(M(e),{measurementScope:`property`,measurementScopeKey:g,queryClass:E,measurementRunId:void 0,measurementRevision:void 0,measurementTo:void 0}),ge=u({...O({client:y,path:{name:m},query:le(P(G(l)))}),enabled:S&&he,retry:!1}).data,_e=ge!==void 0&&ge.selection.measurement.measuredRevision!==null&&(ge.populations.find(e=>e.queryClass===E)?.summary.queryCount??0)>0,K={client:y,path:{name:m},query:{targetKey:g,queryClass:E,shape:h.answers,limit:ye,...V?{runId:V}:{}}},J=i({...D(K),enabled:S&&z!==void 0,initialPageParam:K,getNextPageParam:e=>e.answers?.nextCursor?{path:K.path,query:{...K.query,cursor:e.answers.nextCursor}}:void 0}),Y=w.data?.active??null,X=Y?.plan.schemaVersion===2?Y.plan:null,Oe=Y!==null&&X===null,Z=X?.targets.find(e=>e.stableKey===g)??null,Q=ze(f,X?.reportingScopes?.find(e=>e.stableKey===f.marketKey)?.label),Be=(0,H.useMemo)(()=>{if(!X)return[];let e=new Map(X.querySnapshots.map(e=>[e.queryId,e.queryText]));return[...new Set(X.assignments.filter(e=>e.targetKey===g&&e.queryClass===E).flatMap(t=>{let n=e.get(t.queryId);return n===void 0?[]:[n]}))].sort((e,t)=>e.localeCompare(t))},[X,g,E]),Ve=(0,H.useMemo)(()=>Z?.urlMatchers.map(fe)??[],[Z]),He=(0,H.useMemo)(()=>new Map((X?.targets??[]).map(e=>[e.stableKey,e.label])),[X]),Ue=(0,H.useMemo)(()=>X?.groups.filter(e=>e.targetKeys.includes(g))??[],[X,g]),$=(0,H.useMemo)(()=>(J.data?.pages??[]).flatMap(e=>e.answers?.items??[]),[J.data]),We=J.data?.pages[0]?.answers?.totalEstimate??$.length,Ge=(J.data?.pages??[]).length>0&&(J.data?.pages??[]).every(e=>e.answers===void 0),Ke=J.data?.pages[0]?.measurement.state,qe=(0,U.jsxs)(c,{to:`/projects/$projectName`,params:{projectName:m},search:M,className:`inline-flex items-center gap-1 text-label-12 text-muted hover:text-strong`,children:[(0,U.jsx)(n,{className:`size-3.5`,"aria-hidden":`true`}),`Back to AI Visibility`]});if(!b)return(0,U.jsx)(`div`,{className:`page-container`,children:(0,U.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`Missing project name or Property key in URL.`})});if(!x)return(0,U.jsxs)(`div`,{className:`page-container space-y-3`,children:[qe,(0,U.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`This view is not available here.`})]});if(w.isPending&&!w.isError)return(0,U.jsx)(`div`,{className:`page-container`,children:(0,U.jsxs)(`div`,{role:`status`,"aria-live":`polite`,children:[(0,U.jsx)(`span`,{className:`sr-only`,children:`Loading Property`}),(0,U.jsx)(`div`,{className:`h-32 animate-pulse rounded-md bg-surface-subtle`,"aria-hidden":`true`})]})});let Je=w.isError&&w.data===void 0,Ye=A.isError&&A.data===void 0,Xe=F.isError&&F.data===void 0;return Je||Ye&&Xe?(0,U.jsxs)(`div`,{className:`page-container space-y-3`,children:[qe,(0,U.jsx)(`p`,{role:`alert`,className:`text-copy-14 text-negative`,children:`Could not load this Property.`}),(0,U.jsx)(_,{type:`button`,size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,onClick:()=>{w.refetch(),A.refetch(),F.refetch()},children:`Try again`})]}):!X||!Z?(0,U.jsxs)(`div`,{className:`page-container space-y-3`,children:[qe,(0,U.jsx)(`p`,{role:`status`,className:`text-copy-14 text-secondary`,children:X?`This Property is not in the published setup. It may have been renamed or removed.`:`A Property page needs a published advanced measurement setup. Republish setup from the project Portfolio tab.`}),(0,U.jsx)(_,{asChild:!0,type:`button`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,children:(0,U.jsx)(c,{to:`/projects/$projectName/portfolio`,params:{projectName:m},children:C?Oe?`Republish setup`:`Open measurement setup`:`View measurement setup`})})]}):(0,U.jsxs)(`div`,{className:`page-container space-y-8`,children:[(0,U.jsxs)(`div`,{className:`page-header`,children:[(0,U.jsxs)(`div`,{className:`page-header-left`,children:[qe,(0,U.jsx)(`h1`,{className:`page-title mt-2`,children:Z.label}),(0,U.jsxs)(`p`,{className:`page-subtitle`,children:[`Property in `,m,Q?(0,U.jsxs)(U.Fragment,{children:[` · Filters not applied `,(0,U.jsx)(j,{text:Q})]}):null]})]}),(0,U.jsxs)(`div`,{className:`page-header-right`,children:[z?(0,U.jsx)(v,{tone:be[z.measurement.state].tone,children:be[z.measurement.state].label}):null,B&&B.flags>0?(0,U.jsxs)(v,{tone:`caution`,children:[B.flags,` flagged`]}):null]})]}),(0,U.jsx)(Ne,{branded:I,nonBrand:L,brandedError:A.isError,nonBrandError:F.isError,onRetry:e=>{e===`branded`?A.refetch():F.refetch()}}),he?(0,U.jsxs)(`section`,{className:`flex flex-wrap items-center justify-between gap-3 py-4`,"aria-label":`Measurement next step`,children:[(0,U.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:d()?ce:C?`Run a measurement from the project overview to collect this Property’s coverage and source evidence.${_e?` AI Visibility still shows the last results.`:``}`:`This Property needs a new measurement before coverage and source evidence are available.`}),(0,U.jsx)(_,{asChild:!0,type:`button`,className:`h-11 px-4 text-button-14 md:h-11`,children:(0,U.jsx)(c,{to:`/projects/$projectName`,params:{projectName:m},search:_e?G:M,children:_e?`See the last results`:C?`Go to AI Visibility`:`View AI Visibility`})})]}):null,(0,U.jsxs)(`div`,{className:`flex flex-wrap items-end gap-4 py-4`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`label`,{htmlFor:`property-query-class`,className:`block text-label-14-strong text-heading`,children:`Query type`}),(0,U.jsxs)(`select`,{id:`property-query-class`,value:E,onChange:e=>{let t=e.target.value===`branded`?`branded`:`non-brand`;r({to:`.`,search:e=>N(e,{queryClass:t})})},className:`h-11 rounded-md border border-default bg-surface px-3 text-label-14 text-primary focus:outline-none focus:ring-2 focus:ring-mono-400`,children:[(0,U.jsx)(`option`,{value:`non-brand`,children:q[`non-brand`].technical}),(0,U.jsx)(`option`,{value:`branded`,children:q.branded.technical})]})]}),(0,U.jsx)(je,{measuredAt:me,unmeasuredReason:W,queryClass:E})]}),(0,U.jsx)(Pe,{row:B,queryClass:E,isError:pe}),(0,U.jsx)(Fe,{project:m,targetKey:g,queryClass:E}),(0,U.jsx)(Ie,{questions:Be,queryClass:E}),(0,U.jsx)(ve,{projectName:m,targetKey:g,published:Z,activeRevision:Y.revision,publishedBrandNames:X.identities.projectBrand.names}),(0,U.jsx)(Le,{urls:Ve}),(0,U.jsx)(Me,{project:m,groups:Ue}),(0,U.jsxs)(`section`,{"aria-labelledby":`property-evidence`,className:`page-section-divider`,children:[(0,U.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,U.jsx)(`div`,{children:(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(`h2`,{id:`property-evidence`,className:`text-heading-16 text-heading`,children:`Answers the engines gave`}),(0,U.jsx)(j,{text:`Answers for the queries assigned to this Property in the displayed measurement. Mentioned and cited are independent. Missing answer text shows Not measured. Open an answer to read its text and sources, including any other Property it named.`})]})}),$.length>0?(0,U.jsxs)(`p`,{className:`supporting-copy`,children:[$.length,` of `,We]}):null]}),pe?(0,U.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[`Evidence for `,q[E].technical.toLocaleLowerCase(),` is unavailable. Retry that query type above.`]}):J.isPending&&$.length===0?(0,U.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Loading evidence…`}):J.isError&&$.length===0?(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,U.jsx)(`span`,{role:`alert`,children:`Evidence could not be loaded.`}),(0,U.jsx)(_,{type:`button`,size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,onClick:()=>{J.refetch()},children:`Retry evidence`})]}):Ke===`not_measured`?(0,U.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:d()?ce:`Not measured yet. Run a measurement to collect the answers for this Property.`}):Ge?(0,U.jsx)(`p`,{role:`alert`,className:`text-copy-14 text-caution`,children:`This measurement was returned in an older format, so the answers cannot be shown here. The numbers above are unaffected.`}):$.length===0?(0,U.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`No answers matched this Property in the displayed measurement.`}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`property-answer-table-container overflow-x-auto`,children:(0,U.jsxs)(`table`,{className:`evidence-table property-evidence-table`,children:[(0,U.jsx)(`caption`,{className:`sr-only`,children:`Answers measured for this Property`}),(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:`Query`}),(0,U.jsx)(`th`,{children:`Mentioned in the answer`}),(0,U.jsx)(`th`,{children:`Cited as a source`}),(0,U.jsx)(`th`,{children:`Sources`}),(0,U.jsx)(`th`,{children:(0,U.jsx)(`span`,{className:`sr-only`,children:`Sources detail`})})]})}),(0,U.jsx)(`tbody`,{children:$.map(e=>{let t=xe(e),n=p.has(t),r=`property-answer-${encodeURIComponent(t)}`;return(0,U.jsxs)(H.Fragment,{children:[(0,U.jsxs)(`tr`,{className:`property-answer-summary`,children:[(0,U.jsxs)(`td`,{className:`text-secondary`,children:[(0,U.jsx)(`h3`,{className:`text-heading-14 text-heading`,children:e.queryText}),(0,U.jsx)(`span`,{className:`mt-1 block text-label-12 text-muted`,children:[k(e.provider),e.location].filter(Boolean).join(` · `)}),e.historical||e.bridged?(0,U.jsx)(`span`,{className:`mt-1 flex`,children:(0,U.jsx)(v,{tone:`caution`,children:`Historical`})}):null]}),(0,U.jsxs)(`td`,{children:[(0,U.jsx)(`span`,{className:`property-evidence-mobile-label`,"aria-hidden":`true`,children:`Mentioned`}),(0,U.jsx)(Se,{row:e})]}),(0,U.jsxs)(`td`,{children:[(0,U.jsx)(`span`,{className:`property-evidence-mobile-label`,"aria-hidden":`true`,children:`Cited`}),(0,U.jsx)(we,{row:e})]}),(0,U.jsxs)(`td`,{className:`tabular-nums text-secondary`,children:[(0,U.jsx)(`span`,{className:`property-evidence-mobile-label`,"aria-hidden":`true`,children:R}),e.cited===null?Ce:e.sources.length]}),(0,U.jsx)(`td`,{className:`text-right`,children:(0,U.jsx)(_,{type:`button`,size:`sm`,variant:`ghost`,className:`h-auto pointer-coarse:min-h-11 max-w-full whitespace-normal py-2 text-left md:h-auto`,"aria-expanded":n,"aria-label":n?`Hide the answer for ${e.queryText}`:`Read the answer for ${e.queryText}`,"aria-controls":n?r:void 0,onClick:()=>ee(e=>{let n=new Set(e);return n.delete(t)||n.add(t),n}),children:n?`Hide answer`:`Read answer`})})]}),n?(0,U.jsx)(`tr`,{className:`property-answer-detail`,children:(0,U.jsxs)(`td`,{id:r,colSpan:5,className:`bg-surface-subtle px-4`,children:[(0,U.jsx)(Ee,{project:m,targetKey:g,resultId:e.observationId}),(0,U.jsx)(Te,{row:e})]})}):null]},t)})})]})}),J.hasNextPage?(0,U.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,U.jsxs)(`span`,{children:[`Showing `,$.length,` of `,We]}),J.isFetchNextPageError?(0,U.jsx)(`span`,{role:`alert`,children:`Could not load more evidence.`}):null,(0,U.jsx)(_,{size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,disabled:J.isFetchingNextPage,onClick:()=>{J.fetchNextPage()},children:J.isFetchingNextPage?`Loading…`:J.isFetchNextPageError?`Retry more evidence`:`Show ${ye} more`})]}):null]})]}),z?(0,U.jsx)(Re,{project:m,targetKey:g,queryClass:E,runId:V,targetLabels:He}):null]})}export{Y as EVIDENCE_LABELS,Be as MeasurementPropertyPage,Q as OTHER_QUERIES_COPY};
|