@utsu-ri/cli 0.2.0 → 0.3.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/README.md +27 -17
- package/dist/build-manifest.json +20 -20
- package/dist/sbom.spdx.json +14 -14
- package/dist/third-party-licenses.json +2 -2
- package/dist/utsuri.mjs +328 -58
- package/package.json +6 -6
package/dist/utsuri.mjs
CHANGED
|
@@ -208433,9 +208433,16 @@ var annotations_schema_default = {
|
|
|
208433
208433
|
title: "Annotations",
|
|
208434
208434
|
type: "object",
|
|
208435
208435
|
additionalProperties: false,
|
|
208436
|
-
required: ["schemaVersion", "changes"],
|
|
208436
|
+
required: ["schemaVersion", "language", "overview", "changes"],
|
|
208437
208437
|
properties: {
|
|
208438
208438
|
schemaVersion: { const: "1.0" },
|
|
208439
|
+
language: {
|
|
208440
|
+
type: "string",
|
|
208441
|
+
minLength: 2,
|
|
208442
|
+
maxLength: 35,
|
|
208443
|
+
pattern: "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$"
|
|
208444
|
+
},
|
|
208445
|
+
overview: { type: "string", minLength: 1, maxLength: 2e3 },
|
|
208439
208446
|
changes: { type: "array", items: { $ref: "#/$defs/semanticChange" } }
|
|
208440
208447
|
},
|
|
208441
208448
|
$defs: {
|
|
@@ -208453,6 +208460,7 @@ var annotations_schema_default = {
|
|
|
208453
208460
|
"technicalImpact",
|
|
208454
208461
|
"risk",
|
|
208455
208462
|
"hunkRefs",
|
|
208463
|
+
"hunkExplanations",
|
|
208456
208464
|
"targetRefs",
|
|
208457
208465
|
"findingRefs",
|
|
208458
208466
|
"verification"
|
|
@@ -208492,6 +208500,10 @@ var annotations_schema_default = {
|
|
|
208492
208500
|
}
|
|
208493
208501
|
},
|
|
208494
208502
|
hunkRefs: { type: "array", items: { type: "string" }, uniqueItems: true },
|
|
208503
|
+
hunkExplanations: {
|
|
208504
|
+
type: "array",
|
|
208505
|
+
items: { $ref: "#/$defs/hunkExplanation" }
|
|
208506
|
+
},
|
|
208495
208507
|
targetRefs: { type: "array", items: { type: "string" }, uniqueItems: true },
|
|
208496
208508
|
findingRefs: { type: "array", items: { type: "string" }, uniqueItems: true },
|
|
208497
208509
|
verification: {
|
|
@@ -208504,6 +208516,16 @@ var annotations_schema_default = {
|
|
|
208504
208516
|
}
|
|
208505
208517
|
}
|
|
208506
208518
|
}
|
|
208519
|
+
},
|
|
208520
|
+
hunkExplanation: {
|
|
208521
|
+
type: "object",
|
|
208522
|
+
additionalProperties: false,
|
|
208523
|
+
required: ["hunkRef", "purpose", "meaning"],
|
|
208524
|
+
properties: {
|
|
208525
|
+
hunkRef: { type: "string", pattern: "^hunk:" },
|
|
208526
|
+
purpose: { type: "string", minLength: 1, maxLength: 160 },
|
|
208527
|
+
meaning: { type: "string", minLength: 1, maxLength: 320 }
|
|
208528
|
+
}
|
|
208507
208529
|
}
|
|
208508
208530
|
}
|
|
208509
208531
|
};
|
|
@@ -208957,7 +208979,12 @@ var config_schema_default = {
|
|
|
208957
208979
|
required: ["outputDirectory", "singleFile", "includeAbsolutePaths"],
|
|
208958
208980
|
properties: {
|
|
208959
208981
|
outputDirectory: { type: "string", minLength: 1 },
|
|
208960
|
-
language: {
|
|
208982
|
+
language: {
|
|
208983
|
+
type: "string",
|
|
208984
|
+
minLength: 2,
|
|
208985
|
+
maxLength: 35,
|
|
208986
|
+
pattern: "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$"
|
|
208987
|
+
},
|
|
208961
208988
|
theme: { enum: ["system", "light", "dark"] },
|
|
208962
208989
|
singleFile: { type: "boolean" },
|
|
208963
208990
|
singleFileMaxBytes: {
|
|
@@ -209750,6 +209777,7 @@ var report_schema_default = {
|
|
|
209750
209777
|
additionalProperties: false,
|
|
209751
209778
|
required: [
|
|
209752
209779
|
"schemaVersion",
|
|
209780
|
+
"language",
|
|
209753
209781
|
"reportId",
|
|
209754
209782
|
"status",
|
|
209755
209783
|
"summary",
|
|
@@ -209767,6 +209795,12 @@ var report_schema_default = {
|
|
|
209767
209795
|
],
|
|
209768
209796
|
properties: {
|
|
209769
209797
|
schemaVersion: { const: "1.0" },
|
|
209798
|
+
language: {
|
|
209799
|
+
type: "string",
|
|
209800
|
+
minLength: 2,
|
|
209801
|
+
maxLength: 35,
|
|
209802
|
+
pattern: "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$"
|
|
209803
|
+
},
|
|
209770
209804
|
reportId: {
|
|
209771
209805
|
type: "string",
|
|
209772
209806
|
pattern: "^report[-:][A-Za-z0-9._:-]+$",
|
|
@@ -209778,6 +209812,7 @@ var report_schema_default = {
|
|
|
209778
209812
|
additionalProperties: false,
|
|
209779
209813
|
required: ["statement", "filesChanged", "additions", "deletions"],
|
|
209780
209814
|
properties: {
|
|
209815
|
+
overview: { type: "string", minLength: 1, maxLength: 2e3 },
|
|
209781
209816
|
statement: { type: "string" },
|
|
209782
209817
|
filesChanged: { type: "integer", minimum: 0 },
|
|
209783
209818
|
additions: { type: "integer", minimum: 0 },
|
|
@@ -210015,6 +210050,10 @@ var report_schema_default = {
|
|
|
210015
210050
|
}
|
|
210016
210051
|
},
|
|
210017
210052
|
hunkRefs: { type: "array", items: { type: "string" }, uniqueItems: true },
|
|
210053
|
+
hunkExplanations: {
|
|
210054
|
+
type: "array",
|
|
210055
|
+
items: { $ref: "#/$defs/hunkExplanation" }
|
|
210056
|
+
},
|
|
210018
210057
|
targetRefs: { type: "array", items: { type: "string" }, uniqueItems: true },
|
|
210019
210058
|
findingRefs: { type: "array", items: { type: "string" }, uniqueItems: true },
|
|
210020
210059
|
verification: {
|
|
@@ -210028,6 +210067,16 @@ var report_schema_default = {
|
|
|
210028
210067
|
}
|
|
210029
210068
|
}
|
|
210030
210069
|
},
|
|
210070
|
+
hunkExplanation: {
|
|
210071
|
+
type: "object",
|
|
210072
|
+
additionalProperties: false,
|
|
210073
|
+
required: ["hunkRef", "purpose", "meaning"],
|
|
210074
|
+
properties: {
|
|
210075
|
+
hunkRef: { type: "string", pattern: "^hunk:" },
|
|
210076
|
+
purpose: { type: "string", minLength: 1, maxLength: 160 },
|
|
210077
|
+
meaning: { type: "string", minLength: 1, maxLength: 320 }
|
|
210078
|
+
}
|
|
210079
|
+
},
|
|
210031
210080
|
captureResult: {
|
|
210032
210081
|
type: "object",
|
|
210033
210082
|
additionalProperties: false,
|
|
@@ -211087,6 +211136,22 @@ function validateReportReferences(report) {
|
|
|
211087
211136
|
if (previous) errors2.push(`${ref} is assigned to both ${previous} and ${change.id}`);
|
|
211088
211137
|
assigned.set(ref, change.id);
|
|
211089
211138
|
}
|
|
211139
|
+
if (change.hunkExplanations) {
|
|
211140
|
+
const explanationRefs = change.hunkExplanations.map((explanation) => explanation.hunkRef);
|
|
211141
|
+
const explained = new Set(explanationRefs);
|
|
211142
|
+
const changeHunks = new Set(change.hunkRefs);
|
|
211143
|
+
unique(`${change.id}.hunkExplanations`, explanationRefs);
|
|
211144
|
+
for (const ref of explanationRefs) {
|
|
211145
|
+
if (!changeHunks.has(ref)) {
|
|
211146
|
+
errors2.push(`${change.id}.hunkExplanations references hunk outside the change ${ref}`);
|
|
211147
|
+
}
|
|
211148
|
+
}
|
|
211149
|
+
for (const ref of change.hunkRefs) {
|
|
211150
|
+
if (!explained.has(ref)) {
|
|
211151
|
+
errors2.push(`${change.id}.hunkExplanations is missing ${ref}`);
|
|
211152
|
+
}
|
|
211153
|
+
}
|
|
211154
|
+
}
|
|
211090
211155
|
for (const ref of change.targetRefs) {
|
|
211091
211156
|
if (!targetIds.has(ref)) errors2.push(`${change.id} references missing target ${ref}`);
|
|
211092
211157
|
}
|
|
@@ -211302,7 +211367,7 @@ var nativeHelperTargets = [
|
|
|
211302
211367
|
"linux-arm64",
|
|
211303
211368
|
"linux-x64"
|
|
211304
211369
|
];
|
|
211305
|
-
var nativeHelperPackageVersion = "0.
|
|
211370
|
+
var nativeHelperPackageVersion = "0.3.0";
|
|
211306
211371
|
function currentTarget() {
|
|
211307
211372
|
const value2 = `${process.platform}-${process.arch}`;
|
|
211308
211373
|
return nativeHelperTargets.find((target) => target === value2) ?? null;
|
|
@@ -211376,7 +211441,7 @@ var import_pngjs = __toESM2(require_png(), 1);
|
|
|
211376
211441
|
var staticCspDirectives = [
|
|
211377
211442
|
"default-src 'none'",
|
|
211378
211443
|
"base-uri 'none'",
|
|
211379
|
-
"connect-src '
|
|
211444
|
+
"connect-src 'self'",
|
|
211380
211445
|
"font-src 'self'",
|
|
211381
211446
|
"form-action 'none'",
|
|
211382
211447
|
"frame-ancestors 'none'",
|
|
@@ -211388,7 +211453,7 @@ var staticCspDirectives = [
|
|
|
211388
211453
|
"style-src 'self'"
|
|
211389
211454
|
];
|
|
211390
211455
|
var staticReportCsp = staticCspDirectives.join("; ");
|
|
211391
|
-
var interactiveReportCsp =
|
|
211456
|
+
var interactiveReportCsp = staticReportCsp;
|
|
211392
211457
|
var staticFragmentCsp = [
|
|
211393
211458
|
"default-src 'none'",
|
|
211394
211459
|
"base-uri 'none'",
|
|
@@ -217048,8 +217113,8 @@ import { access as access4, lstat as lstat7, mkdir as mkdir5, open as open6, rea
|
|
|
217048
217113
|
import path18 from "node:path";
|
|
217049
217114
|
|
|
217050
217115
|
// packages/report-builder/src/generated-ui-assets.ts
|
|
217051
|
-
var reportUiJavaScript = 'typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");let Rs=!1,Tu=!1;function zu(){Rs=!0}zu();const Mu=1,Vu=2,ol=4,Fu=8,Du=16,Bu=1,Hu=2,ht=Symbol("uninitialized"),Wu="http://www.w3.org/1999/xhtml",ll=!1;var ii=Array.isArray,Zu=Array.prototype.indexOf,tn=Array.prototype.includes,pn=Array.from,Uu=Object.defineProperty,bs=Object.getOwnPropertyDescriptor,dl=Object.getOwnPropertyDescriptors,Ku=Object.prototype,Ju=Array.prototype,oi=Object.getPrototypeOf,To=Object.isExtensible;const Yu=()=>{};function Gu(t){return t()}function Wn(t){for(var a=0;a<t.length;a++)t[a]()}function pl(){var t,a,s=new Promise((d,p)=>{t=d,a=p});return{promise:s,resolve:t,reject:a}}const wt=2,Ba=4,Ss=8,ul=1<<24,Sr=16,kr=32,aa=64,Zn=128,wr=512,pt=1024,ut=2048,br=4096,Ft=8192,Pr=16384,Ka=32768,Un=1<<25,Ha=65536,rn=1<<17,Qu=1<<18,Ja=1<<19,cl=1<<20,Dr=1<<25,Ra=65536,an=1<<21,Da=1<<22,ca=1<<23,ha=Symbol("$state"),Xu=Symbol(""),hl=Symbol("attributes"),Kn=Symbol("class"),Jn=Symbol("style"),Yn=Symbol("text"),Js=Symbol("form reset"),Es=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function fl(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ec(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function tc(t,a,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function rc(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ac(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function sc(t){throw new Error("https://svelte.dev/e/effect_orphan")}function nc(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ic(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function oc(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function lc(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function dc(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function pc(){console.warn("https://svelte.dev/e/derived_inert")}function uc(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function cc(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ml(t){return t===this.v}function hc(t,a){return t!=t?a==a:t!==a||t!==null&&typeof t=="object"||typeof t=="function"}function vl(t){return!hc(t,this.v)}let Se=null;function Wa(t){Se=t}function gl(t,a=!1,s){Se={p:Se,i:!1,c:null,e:null,s:t,x:null,r:oe,l:Rs&&!a?{s:null,u:null,$:[]}:null}}function yl(t){var a=Se,s=a.e;if(s!==null){a.e=null;for(var d of s)Ol(d)}return a.i=!0,Se=a.p,{}}function Ns(){return!Rs||Se!==null&&Se.l===null}let xa=[];function _l(){var t=xa;xa=[],Wn(t)}function ta(t){if(xa.length===0&&!Ps){var a=xa;queueMicrotask(()=>{a===xa&&_l()})}xa.push(t)}function fc(){for(;xa.length>0;)_l()}function wl(t){var a=oe;if(a===null)return pe.f|=ca,t;if((a.f&Ka)===0&&(a.f&Ba)===0)throw t;ua(t,a)}function ua(t,a){if(!(a!==null&&(a.f&Pr)!==0)){for(;a!==null;){if((a.f&Zn)!==0){if((a.f&Ka)===0)throw t;try{a.b.error(t);return}catch(s){t=s}}a=a.parent}throw t}}const mc=-7169;function Ze(t,a){t.f=t.f&mc|a}function li(t){(t.f&wr)!==0||t.deps===null?Ze(t,pt):Ze(t,br)}function bl(t){if(t!==null)for(const a of t)(a.f&wt)===0||(a.f&Ra)===0||(a.f^=Ra,bl(a.deps))}function Pl(t,a,s){(t.f&ut)!==0?a.add(t):(t.f&br)!==0&&s.add(t),bl(t.deps),Ze(t,pt)}let zo=!1;function vc(){zo||(zo=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const a of t.target.elements)a[Js]?.()})},{capture:!0}))}function Ya(t){var a=pe,s=oe;xr(null),Ar(null);try{return t()}finally{xr(a),Ar(s)}}function di(t,a,s,d=s){t.addEventListener(a,()=>Ya(s));const p=t[Js];p?t[Js]=()=>{p(),d(!0)}:t[Js]=()=>d(!0),vc()}function gc(t){let a=0,s=Sa(0),d;return()=>{hi()&&(r(s),Ga(()=>(a===0&&(d=h(()=>t(()=>ks(s)))),a+=1,()=>{ta(()=>{a-=1,a===0&&(d?.(),d=void 0,ks(s))})})))}}var yc=Ha|Ja;function _c(t,a,s,d){new wc(t,a,s,d)}class wc{parent;is_pending=!1;transform_error;#t;#i=null;#e;#l;#a;#n=null;#r=null;#o=null;#s=null;#m=0;#d=0;#p=!1;#c=new Set;#v=new Set;#u=null;#y=gc(()=>(this.#u=Sa(this.#m),()=>{this.#u=null}));constructor(a,s,d,p){this.#t=a,this.#e=s,this.#l=e=>{var n=oe;n.b=this,n.f|=Zn,d(e)},this.parent=oe.b,this.transform_error=p??this.parent?.transform_error??(e=>e),this.#a=mi(()=>{this.#h()},yc)}#g(){try{this.#n=_r(()=>this.#l(this.#t))}catch(a){this.error(a)}}#b(a){const s=this.#e.failed,{reset:d,invoke_onerror:p}=this.#_(a);ta(p),s&&(this.#o=_r(()=>{s(this.#t,()=>a,()=>d)}))}#_(a){var s=!1,d=!1;const p=()=>{if(s){cc();return}s=!0,d&&dc(),this.#o!==null&&$a(this.#o,()=>{this.#o=null}),this.#f(()=>{this.#h()})};return{reset:p,invoke_onerror:()=>{try{d=!0,this.#e.onerror?.(a,p),d=!1}catch(n){ua(n,this.#a&&this.#a.parent)}}}}#P(){const a=this.#e.pending;a&&(this.is_pending=!0,this.#r=_r(()=>a(this.#t)),ta(()=>{var s=this.#s=document.createDocumentFragment(),d=fa();s.append(d),this.#n=this.#f(()=>_r(()=>this.#l(d))),this.#d===0&&(this.#t.before(s),this.#s=null,$a(this.#r,()=>{this.#r=null}),this.#w(ae))}))}#h(){try{if(this.is_pending=this.has_pending_snippet(),this.#d=0,this.#m=0,this.#n=_r(()=>{this.#l(this.#t)}),this.#d>0){var a=this.#s=document.createDocumentFragment();gi(this.#n,a);const s=this.#e.pending;this.#r=_r(()=>s(this.#t))}else this.#w(ae)}catch(s){this.error(s)}}#w(a){this.is_pending=!1,a.transfer_effects(this.#c,this.#v)}defer_effect(a){Pl(a,this.#c,this.#v)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#e.pending}#f(a){var s=oe,d=pe,p=Se;Ar(this.#a),xr(this.#a),Wa(this.#a.ctx);try{return ma.ensure(),a()}catch(e){return wl(e),null}finally{Ar(s),xr(d),Wa(p)}}#k(a,s){if(!this.has_pending_snippet()){this.parent&&this.parent.#k(a,s);return}this.#d+=a,this.#d===0&&(this.#w(s),this.#r&&$a(this.#r,()=>{this.#r=null}),this.#s&&(this.#t.before(this.#s),this.#s=null))}update_pending_count(a,s){this.#k(a,s),this.#m+=a,!(!this.#u||this.#p)&&(this.#p=!0,ta(()=>{this.#p=!1,this.#u&&Za(this.#u,this.#m)}))}get_effect_pending(){return this.#y(),r(this.#u)}error(a){if(!this.#e.onerror&&!this.#e.failed)throw a;ae?.is_fork?(this.#n&&ae.skip_effect(this.#n),this.#r&&ae.skip_effect(this.#r),this.#o&&ae.skip_effect(this.#o),ae.oncommit(()=>{this.#x(a)})):this.#x(a)}#x(a){this.#n&&(Qt(this.#n),this.#n=null),this.#r&&(Qt(this.#r),this.#r=null),this.#o&&(Qt(this.#o),this.#o=null);let s=this.#e.failed;const d=p=>{const{reset:e,invoke_onerror:n}=this.#_(p);n(),s&&(this.#o=this.#f(()=>{try{return _r(()=>{var i=oe;i.b=this,i.f|=Zn,s(this.#t,()=>p,()=>e)})}catch(i){return ua(i,this.#a.parent),null}}))};ta(()=>{var p;try{p=this.transform_error(a)}catch(e){ua(e,this.#a&&this.#a.parent);return}p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(d,e=>ua(e,this.#a&&this.#a.parent)):d(p)})}}function bc(t,a,s,d){const p=Ns()?un:ka;var e=t.filter(b=>!b.settled),n=a.map(p);if(s.length===0&&e.length===0){d(n);return}var i=oe,o=Pc(),l=e.length===1?e[0].promise:e.length>1?Promise.all(e.map(b=>b.promise)):null;function m(b){if((i.f&Pr)===0){o();try{d([...n,...b])}catch(R){ua(R,i)}sn()}}var u=kl();if(s.length===0){l.then(()=>m([])).finally(u);return}function f(){Promise.all(s.map(b=>kc(b))).then(m).catch(b=>ua(b,i)).finally(u)}l?l.then(()=>{o(),f(),sn()}):f()}function Pc(){var t=oe,a=pe,s=Se,d=ae;return function(e=!0){Ar(t),xr(a),Wa(s),e&&(t.f&Pr)===0&&(d?.activate(),d?.apply())}}function sn(t=!0){Ar(null),xr(null),Wa(null),t&&ae?.deactivate()}function kl(){var t=oe,a=t.b,s=ae,d=!!a?.is_rendered();return a?.update_pending_count(1,s),s.increment(d,t),()=>{a?.update_pending_count(-1,s),s.decrement(d,t)}}function un(t){var a=wt|ut;return oe!==null&&(oe.f|=Ja),{ctx:Se,deps:null,effects:null,equals:ml,f:a,fn:t,reactions:null,rv:0,v:ht,wv:0,parent:oe,ac:null}}const vs=Symbol("obsolete");function kc(t,a,s){let d=oe;d===null&&ec();var p=void 0,e=Sa(ht),n=!pe,i=new Set;return Mc(()=>{var o=oe,l=pl();p=l.promise;try{Promise.resolve(t()).then(l.resolve,b=>{b!==Es&&l.reject(b)}).finally(sn)}catch(b){l.reject(b),sn()}var m=ae;if(n){if((o.f&Ka)!==0)var u=kl();if(d.b?.is_rendered())m.async_deriveds.get(o)?.reject(vs);else for(const b of i.values())b.reject(vs);i.add(l),m.async_deriveds.set(o,l)}const f=(b,R=void 0)=>{u?.(),i.delete(l),R!==vs&&(m.activate(),R?(e.f|=ca,Za(e,R)):((e.f&ca)!==0&&(e.f^=ca),Za(e,b)),m.deactivate())};l.promise.then(f,b=>f(null,b||"unknown"))}),fi(()=>{for(const o of i)o.reject(vs)}),new Promise(o=>{function l(m){function u(){m===p?o(e):l(p)}m.then(u,u)}l(p)})}function xc(t){const a=un(t);return Dl(a),a}function ka(t){const a=un(t);return a.equals=vl,a}function Ac(t){var a=t.effects;if(a!==null){t.effects=null;for(var s=0;s<a.length;s+=1)Qt(a[s])}}function pi(t){var a,s=oe,d=t.parent;if(!va&&d!==null&&t.v!==ht&&(d.f&(Pr|Ft))!==0)return pc(),t.v;Ar(d);try{t.f&=~Ra,Ac(t),a=Zl(t)}finally{Ar(s)}return a}function xl(t){var a=pi(t);if(!t.equals(a)&&(t.wv=Hl(),(!ae?.is_fork||t.deps===null)&&(ae!==null?(ae.capture(t,a,!0),Gn?.capture(t,a,!0)):t.v=a,t.deps===null))){Ze(t,pt);return}va||(Er!==null?(hi()||ae?.is_fork)&&Er.set(t,a):li(t))}function Ic(t){if(t.effects!==null)for(const a of t.effects)(a.teardown||a.ac)&&(a.teardown?.(),a.ac!==null&&Ya(()=>{a.ac.abort(Es),a.ac=null}),a.fn!==null&&(a.teardown=Yu),Is(a,0),vi(a))}function Al(t){if(t.effects!==null)for(const a of t.effects)a.teardown&&a.fn!==null&&Ea(a)}let En=null,Ta=null,ae=null,Gn=null,Er=null,Qn=null,Ps=!1,Nn=!1,Fa=null,Ys=null;var Mo=0;let $c=1;class ma{id=$c++;#t=!1;linked=!0;#i=null;#e=null;async_deriveds=new Map;current=new Map;previous=new Map;#l=new Set;#a=new Set;#n=0;#r=new Map;#o=null;#s=[];#m=[];#d=new Set;#p=new Set;#c=new Map;#v=new Set;is_fork=!1;#u=!1;constructor(){Ta===null?En=Ta=this:(Ta.#e=this,this.#i=Ta),Ta=this}#y(){if(this.is_fork)return!0;for(const d of this.#r.keys()){for(var a=d,s=!1;a.parent!==null;){if(this.#c.has(a)){s=!0;break}a=a.parent}if(!s)return!0}return!1}skip_effect(a){this.#c.has(a)||this.#c.set(a,{d:[],m:[]}),this.#v.delete(a)}unskip_effect(a,s=d=>this.schedule(d)){var d=this.#c.get(a);if(d){this.#c.delete(a);for(var p of d.d)Ze(p,ut),s(p);for(p of d.m)Ze(p,br),s(p)}this.#v.add(a)}#g(){this.#t=!0,Mo++>1e3&&(this.#f(),Rc());for(const o of this.#d)this.#p.delete(o),Ze(o,ut),this.schedule(o);for(const o of this.#p)Ze(o,br),this.schedule(o);const a=this.#s;this.#s=[],this.apply();var s=Fa=[],d=[],p=Ys=[];for(const o of a)try{this.#b(o,s,d)}catch(l){throw ql(o),this.#y()||this.discard(),l}if(ae=null,p.length>0){var e=ma.ensure();for(const o of p)e.schedule(o)}if(Fa=null,Ys=null,this.#y()){this.#h(d),this.#h(s);for(const[o,l]of this.#c)$l(o,l);p.length>0&&ae.#g();return}const n=this.#_();if(n){this.#h(d),this.#h(s),n.#P(this);return}this.#d.clear(),this.#p.clear();for(const o of this.#l)o(this);this.#l.clear(),Gn=this,Vo(d),Vo(s),Gn=null,this.#o?.resolve();var i=ae;if(this.#n===0&&(this.#s.length===0||i!==null)&&this.#f(),this.#s.length>0)if(i!==null){const o=i;o.#s.push(...this.#s.filter(l=>!o.#s.includes(l)))}else i=this;i!==null&&i.#g()}#b(a,s,d){a.f^=pt;for(var p=a.first;p!==null;){var e=p.f,n=(e&(kr|aa))!==0,i=n&&(e&pt)!==0,o=i||(e&Ft)!==0||this.#c.has(p);if(!o&&p.fn!==null){n?p.f^=pt:(e&Ba)!==0?s.push(p):Qa(p)&&((e&Sr)!==0&&this.#p.add(p),Ea(p));var l=p.first;if(l!==null){p=l;continue}}for(;p!==null;){var m=p.next;if(m!==null){p=m;break}p=p.parent}}}#_(){for(var a=this.#i;a!==null;){if(!a.is_fork){for(const[s,[,d]]of this.current)if(a.current.has(s)&&!d)return a}a=a.#i}return null}#P(a){for(const[d,p]of a.current)!this.previous.has(d)&&a.previous.has(d)&&this.previous.set(d,a.previous.get(d)),this.current.set(d,p);for(const[d,p]of a.async_deriveds){const e=this.async_deriveds.get(d);e&&p.promise.then(e.resolve).catch(e.reject)}a.async_deriveds.clear(),this.transfer_effects(a.#d,a.#p);const s=d=>{var p=d.reactions;if(p!==null&&!((d.f&wt)!==0&&(d.f&(ut|br))===0))for(const i of p){var e=i.f;if((e&wt)!==0)s(i);else{var n=i;e&(Da|Sr)&&!this.async_deriveds.has(n)&&(this.#p.delete(n),Ze(n,ut),this.schedule(n))}}};for(const d of this.current.keys())s(d);this.oncommit(()=>a.discard()),a.#f(),ae=this,this.#g()}#h(a){for(var s=0;s<a.length;s+=1)Pl(a[s],this.#d,this.#p)}capture(a,s,d=!1){a.v!==ht&&!this.previous.has(a)&&this.previous.set(a,a.v),(a.f&ca)===0&&(this.current.set(a,[s,d]),Er?.set(a,s)),this.is_fork||(a.v=s)}activate(){ae=this}deactivate(){ae=null,Er=null}flush(){try{Nn=!0,ae=this,this.#g()}finally{Mo=0,Qn=null,Fa=null,Ys=null,Nn=!1,ae=null,Er=null,Ia.clear()}}discard(){for(const a of this.#a)a(this);this.#a.clear();for(const a of this.async_deriveds.values())a.reject(vs);this.#f(),this.#o?.resolve()}register_created_effect(a){this.#m.push(a)}#w(){for(let u=En;u!==null;u=u.#e){var a=u.id<this.id,s=[];for(const[f,[b,R]]of this.current){if(u.current.has(f)){var d=u.current.get(f)[0];if(a&&b!==d)u.current.set(f,[b,R]);else continue}s.push(f)}if(a)for(const[f,b]of this.async_deriveds){const R=u.async_deriveds.get(f);R&&b.promise.then(R.resolve).catch(R.reject)}var p=[...u.current.keys()].filter(f=>!u.current.get(f)[1]);if(!(!u.#t||p.length===0)){var e=p.filter(f=>!this.current.has(f));if(e.length===0)a&&u.discard();else if(s.length>0){if(a)for(const f of this.#v)u.unskip_effect(f,b=>{(b.f&(Sr|Da))!==0?u.schedule(b):u.#h([b])});u.activate();var n=new Set,i=new Map;for(var o of s)Il(o,e,n,i);i=new Map;var l=[...u.current].filter(([f,b])=>{const R=this.current.get(f);return R?R[0]!==b[0]||R[1]!==b[1]:!0}).map(([f])=>f);if(l.length>0)for(const f of this.#m)(f.f&(Pr|Ft|rn))===0&&ui(f,l,i)&&((f.f&(Da|Sr))!==0?(Ze(f,ut),u.schedule(f)):u.#d.add(f));if(u.#s.length>0&&!u.#u){u.apply();for(var m of u.#s)u.#b(m,[],[]);u.#s=[]}u.deactivate()}}}}increment(a,s){if(this.#n+=1,a){let d=this.#r.get(s)??0;this.#r.set(s,d+1)}}decrement(a,s){if(this.#n-=1,a){let d=this.#r.get(s)??0;d===1?this.#r.delete(s):this.#r.set(s,d-1)}this.#u||(this.#u=!0,ta(()=>{this.#u=!1,this.linked&&this.flush()}))}transfer_effects(a,s){for(const d of a)this.#d.add(d);for(const d of s)this.#p.add(d);a.clear(),s.clear()}oncommit(a){this.#l.add(a)}ondiscard(a){this.#a.add(a)}settled(){return(this.#o??=pl()).promise}static ensure(){if(ae===null){const a=ae=new ma;!Nn&&!Ps&&ta(()=>{a.#t||a.flush()})}return ae}apply(){{Er=null;return}}schedule(a){if(Qn=a,a.b?.is_pending&&(a.f&(Ba|Ss|ul))!==0&&(a.f&Ka)===0){a.b.defer_effect(a);return}for(var s=a;s.parent!==null;){s=s.parent;var d=s.f;if(Fa!==null&&s===oe&&(pe===null||(pe.f&wt)===0))return;if((d&(aa|kr))!==0){if((d&pt)===0)return;s.f^=pt}}this.#s.push(s)}#f(){if(this.linked){var a=this.#i,s=this.#e;a===null?En=s:a.#e=s,s===null?Ta=a:s.#i=a,this.linked=!1}}}function qc(t){var a=Ps;Ps=!0;try{for(var s;;){if(fc(),ae===null)return s;ae.flush()}}finally{Ps=a}}function Rc(){try{nc()}catch(t){ua(t,Qn)}}let ea=null;function Vo(t){var a=t.length;if(a!==0){for(var s=0;s<a;){var d=t[s++];if((d.f&(Pr|Ft))===0&&Qa(d)&&(ea=new Set,Ea(d),d.deps===null&&d.first===null&&d.nodes===null&&d.teardown===null&&d.ac===null&&Ml(d),ea?.size>0)){Ia.clear();for(const p of ea){if((p.f&(Pr|Ft))!==0)continue;const e=[p];let n=p.parent;for(;n!==null;)ea.has(n)&&(ea.delete(n),e.push(n)),n=n.parent;for(let i=e.length-1;i>=0;i--){const o=e[i];(o.f&(Pr|Ft))===0&&Ea(o)}}ea.clear()}}ea=null}}function Il(t,a,s,d){if(!s.has(t)&&(s.add(t),t.reactions!==null))for(const p of t.reactions){const e=p.f;(e&wt)!==0?Il(p,a,s,d):(e&(Da|Sr))!==0&&(e&ut)===0&&ui(p,a,d)&&(Ze(p,ut),ci(p))}}function ui(t,a,s){const d=s.get(t);if(d!==void 0)return d;if(t.deps!==null)for(const p of t.deps){if(tn.call(a,p))return!0;if((p.f&wt)!==0&&ui(p,a,s))return s.set(p,!0),!0}return s.set(t,!1),!1}function ci(t){ae.schedule(t)}function $l(t,a){if(!((t.f&kr)!==0&&(t.f&pt)!==0)){(t.f&ut)!==0?a.d.push(t):(t.f&br)!==0&&a.m.push(t),Ze(t,pt);for(var s=t.first;s!==null;)$l(s,a),s=s.next}}function ql(t){Ze(t,pt);for(var a=t.first;a!==null;)ql(a),a=a.next}let nn=new Set;const Ia=new Map;let Rl=!1;function Sa(t,a){var s={f:0,v:t,reactions:null,equals:ml,rv:0,wv:0};return s}function da(t,a){const s=Sa(t);return Dl(s),s}function K(t,a=!1,s=!0){const d=Sa(t);return a||(d.equals=vl),Rs&&s&&Se!==null&&Se.l!==null&&(Se.l.s??=[]).push(d),d}function Fo(t,a){return k(t,h(()=>r(t))),a}function k(t,a,s=!1){pe!==null&&(!Nr||(pe.f&rn)!==0)&&Ns()&&(pe.f&(wt|Sr|Da|rn))!==0&&(Br===null||!Br.has(t))&&lc();let d=s?gs(a):a;return Za(t,d,Ys)}function Za(t,a,s=null){if(!t.equals(a)){Ia.set(t,va?a:t.v);var d=ma.ensure();if(d.capture(t,a),(t.f&wt)!==0){const p=t;(t.f&ut)!==0&&pi(p),Er===null&&li(p)}t.wv=Hl(),Sl(t,ut,s),Ns()&&oe!==null&&(oe.f&pt)!==0&&(oe.f&(kr|aa))===0&&(yr===null?Dc([t]):yr.push(t)),!d.is_fork&&nn.size>0&&!Rl&&Sc()}return a}function Sc(){Rl=!1;for(const t of nn){(t.f&pt)!==0&&Ze(t,br);let a;try{a=Qa(t)}catch{a=!0}a&&Ea(t)}nn.clear()}function ks(t){k(t,t.v+1)}function Sl(t,a,s){var d=t.reactions;if(d!==null)for(var p=Ns(),e=d.length,n=0;n<e;n++){var i=d[n],o=i.f;if(!(!p&&i===oe)){var l=(o&ut)===0;if(l&&Ze(i,a),(o&rn)!==0)nn.add(i);else if((o&wt)!==0){var m=i;Er?.delete(m),(o&Ra)===0&&(o&wr&&(oe===null||(oe.f&an)===0)&&(i.f|=Ra),Sl(m,br,s))}else if(l){var u=i;(o&Sr)!==0&&ea!==null&&ea.add(u),s!==null?s.push(u):ci(u)}}}}function gs(t){if(typeof t!="object"||t===null||ha in t)return t;const a=oi(t);if(a!==Ku&&a!==Ju)return t;var s=new Map,d=ii(t),p=da(0),e=qa,n=i=>{if(qa===e)return i();var o=pe,l=qa;xr(null),Wo(e);var m=i();return xr(o),Wo(l),m};return d&&s.set("length",da(t.length)),new Proxy(t,{defineProperty(i,o,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&ic();var m=s.get(o);return m===void 0?n(()=>{var u=da(l.value);return s.set(o,u),u}):k(m,l.value,!0),!0},deleteProperty(i,o){var l=s.get(o);if(l===void 0){if(o in i){const m=n(()=>da(ht));s.set(o,m),ks(p)}}else k(l,ht),ks(p);return!0},get(i,o,l){if(o===ha)return t;var m=s.get(o),u=o in i;if(m===void 0&&(!u||bs(i,o)?.writable)&&(m=n(()=>{var b=gs(u?i[o]:ht),R=da(b);return R}),s.set(o,m)),m!==void 0){var f=r(m);return f===ht?void 0:f}return Reflect.get(i,o,l)},getOwnPropertyDescriptor(i,o){var l=Reflect.getOwnPropertyDescriptor(i,o);if(l&&"value"in l){var m=s.get(o);m&&(l.value=r(m))}else if(l===void 0){var u=s.get(o),f=u?.v;if(u!==void 0&&f!==ht)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return l},has(i,o){if(o===ha)return!0;var l=s.get(o),m=l!==void 0&&l.v!==ht||Reflect.has(i,o);if(l!==void 0||oe!==null&&(!m||bs(i,o)?.writable)){l===void 0&&(l=n(()=>{var f=m?gs(i[o]):ht,b=da(f);return b}),s.set(o,l));var u=r(l);if(u===ht)return!1}return m},set(i,o,l,m){var u=s.get(o),f=o in i;if(d&&o==="length")for(var b=l;b<u.v;b+=1){var R=s.get(b+"");R!==void 0?k(R,ht):b in i&&(R=n(()=>da(ht)),s.set(b+"",R))}if(u===void 0)(!f||bs(i,o)?.writable)&&(u=n(()=>da(void 0)),k(u,gs(l)),s.set(o,u));else{f=u.v!==ht;var O=n(()=>gs(l));k(u,O)}var S=Reflect.getOwnPropertyDescriptor(i,o);if(S?.set&&S.set.call(m,l),!f){if(d&&typeof o=="string"){var G=s.get("length"),H=Number(o);Number.isInteger(H)&&H>=G.v&&k(G,H+1)}ks(p)}return!0},ownKeys(i){r(p);var o=Reflect.ownKeys(i).filter(u=>{var f=s.get(u);return f===void 0||f.v!==ht});for(var[l,m]of s)m.v!==ht&&!(l in i)&&o.push(l);return o},setPrototypeOf(){oc()}})}function Do(t){try{if(t!==null&&typeof t=="object"&&ha in t)return t[ha]}catch{}return t}function Ec(t,a){return Object.is(Do(t),Do(a))}var Bo,El,Nl,Cl;function Nc(){if(Bo===void 0){Bo=window,El=/Firefox/.test(navigator.userAgent);var t=Element.prototype,a=Node.prototype,s=Text.prototype;Nl=bs(a,"firstChild").get,Cl=bs(a,"nextSibling").get,To(t)&&(t[Kn]=void 0,t[hl]=null,t[Jn]=void 0,t.__e=void 0),To(s)&&(s[Yn]=void 0)}}function fa(t=""){return document.createTextNode(t)}function on(t){return Nl.call(t)}function Cs(t){return Cl.call(t)}function c(t,a){return on(t)}function Vr(t,a=!1){{var s=on(t);return s instanceof Comment&&s.data===""?Cs(s):s}}function y(t,a=1,s=!1){let d=t;for(;a--;)d=Cs(d);return d}function Cc(t){t.textContent=""}function Ll(){return!1}function Lc(t,a,s){return s?document.createElement(t,{is:s}):document.createElement(t)}function jl(t){oe===null&&(pe===null&&sc(),ac()),va&&rc()}function jc(t,a){var s=a.last;s===null?a.last=a.first=t:(s.next=t,t.prev=s,a.last=t)}function Hr(t,a){var s=oe;s!==null&&(s.f&Ft)!==0&&(t|=Ft);var d={ctx:Se,deps:null,nodes:null,f:t|ut|wr,first:null,fn:a,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};ae?.register_created_effect(d);var p=d;if((t&Ba)!==0)Fa!==null?Fa.push(d):ma.ensure().schedule(d);else if(a!==null){try{Ea(d)}catch(n){throw Qt(d),n}p.deps===null&&p.teardown===null&&p.nodes===null&&p.first===p.last&&(p.f&Ja)===0&&(p=p.first,(t&Sr)!==0&&(t&Ha)!==0&&p!==null&&(p.f|=Ha))}if(p!==null&&(p.parent=s,s!==null&&jc(p,s),pe!==null&&(pe.f&wt)!==0&&(t&aa)===0)){var e=pe;(e.effects??=[]).push(p)}return d}function hi(){return pe!==null&&!Nr}function fi(t){const a=Hr(Ss,null);return Ze(a,pt),a.teardown=t,a}function Xn(t){jl();var a=oe.f,s=!pe&&(a&kr)!==0&&Se!==null&&!Se.i;if(s){var d=Se;(d.e??=[]).push(t)}else return Ol(t)}function Ol(t){return Hr(Ba|cl,t)}function Oc(t){return jl(),Hr(Ss|cl,t)}function Tc(t){ma.ensure();const a=Hr(aa|Ja,t);return(s={})=>new Promise(d=>{s.outro?$a(a,()=>{Qt(a),d(void 0)}):(Qt(a),d(void 0))})}function Tl(t){return Hr(Ba,t)}function ur(t,a){var s=Se,d={effect:null,ran:!1,deps:t};s.l.$.push(d),d.effect=Ga(()=>{if(t(),!d.ran){d.ran=!0;var p=oe;try{Ar(p.parent),h(a)}finally{Ar(p)}}})}function zc(){var t=Se;Ga(()=>{for(var a of t.l.$){a.deps();var s=a.effect;(s.f&pt)!==0&&s.deps!==null&&Ze(s,br),Qa(s)&&Ea(s),a.ran=!1}})}function Mc(t){return Hr(Da|Ja,t)}function Ga(t,a=0){return Hr(Ss|a,t)}function N(t,a=[],s=[],d=[]){bc(d,a,s,p=>{Hr(Ss,()=>{t(...p.map(r))})})}function mi(t,a=0){var s=Hr(Sr|a,t);return s}function _r(t){return Hr(kr|Ja,t)}function zl(t){var a=t.teardown;if(a!==null){const s=va,d=pe;Ho(!0),xr(null);try{a.call(null)}finally{Ho(s),xr(d)}}}function vi(t,a=!1){var s=t.first;for(t.first=t.last=null;s!==null;){const p=s.ac;p!==null&&Ya(()=>{p.abort(Es)});var d=s.next;(s.f&aa)!==0?s.parent=null:Qt(s,a),s=d}}function Vc(t){for(var a=t.first;a!==null;){var s=a.next;(a.f&kr)===0&&Qt(a),a=s}}function Qt(t,a=!0){var s=!1;(a||(t.f&Qu)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(Fc(t.nodes.start,t.nodes.end),s=!0),t.f|=Un,vi(t,a&&!s),Is(t,0);var d=t.nodes&&t.nodes.t;if(d!==null)for(const e of d)e.stop();zl(t),t.f^=Un,t.f|=Pr;var p=t.parent;p!==null&&p.first!==null&&Ml(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function Fc(t,a){for(;t!==null;){var s=t===a?null:Cs(t);t.remove(),t=s}}function Ml(t){var a=t.parent,s=t.prev,d=t.next;s!==null&&(s.next=d),d!==null&&(d.prev=s),a!==null&&(a.first===t&&(a.first=d),a.last===t&&(a.last=s))}function $a(t,a,s=!0){var d=[];Vl(t,d,!0);var p=()=>{s&&Qt(t),a&&a()},e=d.length;if(e>0){var n=()=>--e||p();for(var i of d)i.out(n)}else p()}function Vl(t,a,s){if((t.f&Ft)===0){t.f^=Ft;var d=t.nodes&&t.nodes.t;if(d!==null)for(const i of d)(i.is_global||s)&&a.push(i);for(var p=t.first;p!==null;){var e=p.next;if((p.f&aa)===0){var n=(p.f&Ha)!==0||(p.f&kr)!==0&&(t.f&Sr)!==0;Vl(p,a,n?s:!1)}p=e}}}function ln(t){Fl(t,!0)}function Fl(t,a){if((t.f&Ft)!==0){t.f^=Ft,(t.f&pt)===0&&(Ze(t,ut),ma.ensure().schedule(t));for(var s=t.first;s!==null;){var d=s.next,p=(s.f&Ha)!==0||(s.f&kr)!==0;Fl(s,p?a:!1),s=d}var e=t.nodes&&t.nodes.t;if(e!==null)for(const n of e)(n.is_global||a)&&n.in()}}function gi(t,a){if(t.nodes)for(var s=t.nodes.start,d=t.nodes.end;s!==null;){var p=s===d?null:Cs(s);a.append(s),s=p}}let Gs=!1,va=!1;function Ho(t){va=t}let pe=null,Nr=!1;function xr(t){pe=t}let oe=null;function Ar(t){oe=t}let Br=null;function Dl(t){pe!==null&&(Br??=new Set).add(t)}let Gt=null,hr=0,yr=null;function Dc(t){yr=t}let Bl=1,Aa=0,qa=Aa;function Wo(t){qa=t}function Hl(){return++Bl}function Qa(t){var a=t.f;if((a&ut)!==0)return!0;if(a&wt&&(t.f&=~Ra),(a&br)!==0){for(var s=t.deps,d=s.length,p=0;p<d;p++){var e=s[p];if(Qa(e)&&xl(e),e.wv>t.wv)return!0}(a&wr)!==0&&Er===null&&Ze(t,pt)}return!1}function Wl(t,a,s=!0){var d=t.reactions;if(d!==null&&!(Br!==null&&Br.has(t)))for(var p=0;p<d.length;p++){var e=d[p];(e.f&wt)!==0?Wl(e,a,!1):a===e&&(s?Ze(e,ut):(e.f&pt)!==0&&Ze(e,br),ci(e))}}function Zl(t){var a=Gt,s=hr,d=yr,p=pe,e=Br,n=Se,i=Nr,o=qa,l=t.f;Gt=null,hr=0,yr=null,pe=(l&(kr|aa))===0?t:null,Br=null,Wa(t.ctx),Nr=!1,qa=++Aa,t.ac!==null&&(Ya(()=>{t.ac.abort(Es)}),t.ac=null);try{t.f|=an;var m=t.fn,u=m();t.f|=Ka;var f=t.deps,b=ae?.is_fork;if(Gt!==null){var R;if(b||Is(t,hr),f!==null&&hr>0)for(f.length=hr+Gt.length,R=0;R<Gt.length;R++)f[hr+R]=Gt[R];else t.deps=f=Gt;if(hi()&&(t.f&wr)!==0)for(R=hr;R<f.length;R++)(f[R].reactions??=[]).push(t)}else!b&&f!==null&&hr<f.length&&(Is(t,hr),f.length=hr);if(Ns()&&yr!==null&&!Nr&&f!==null&&(t.f&(wt|br|ut))===0)for(R=0;R<yr.length;R++)Wl(yr[R],t);if(p!==null&&p!==t){if(Aa++,p.deps!==null)for(let O=0;O<s;O+=1)p.deps[O].rv=Aa;if(a!==null)for(const O of a)O.rv=Aa;yr!==null&&(d===null?d=yr:d.push(...yr))}return(t.f&ca)!==0&&(t.f^=ca),u}catch(O){return wl(O)}finally{t.f^=an,Gt=a,hr=s,yr=d,pe=p,Br=e,Wa(n),Nr=i,qa=o}}function Bc(t,a){let s=a.reactions;if(s!==null){var d=Zu.call(s,t);if(d!==-1){var p=s.length-1;p===0?s=a.reactions=null:(s[d]=s[p],s.pop())}}if(s===null&&(a.f&wt)!==0&&(Gt===null||!tn.call(Gt,a))){var e=a;(e.f&wr)!==0&&(e.f^=wr,e.f&=~Ra),e.v!==ht&&li(e),e.ac!==null&&Ya(()=>{e.ac.abort(Es),e.ac=null,Ze(e,ut)}),Ic(e),Is(e,0)}}function Is(t,a){var s=t.deps;if(s!==null)for(var d=a;d<s.length;d++)Bc(t,s[d])}function Ea(t){var a=t.f;if((a&Pr)===0){Ze(t,pt);var s=oe,d=Gs;oe=t,Gs=(a&(kr|aa))===0;try{(a&(Sr|ul))!==0?Vc(t):vi(t),zl(t);var p=Zl(t);t.teardown=typeof p=="function"?p:null,t.wv=Bl;var e;ll&&Tu&&(t.f&ut)!==0&&t.deps}finally{Gs=d,oe=s}}}async function Qs(){await Promise.resolve(),qc()}function r(t){var a=t.f,s=(a&wt)!==0;if(pe!==null&&!Nr){var d=oe!==null&&(oe.f&Pr)!==0;if(!d&&(Br===null||!Br.has(t))){var p=pe.deps;if((pe.f&an)!==0)t.rv<Aa&&(t.rv=Aa,Gt===null&&p!==null&&p[hr]===t?hr++:Gt===null?Gt=[t]:Gt.push(t));else{pe.deps??=[],tn.call(pe.deps,t)||pe.deps.push(t);var e=t.reactions;e===null?t.reactions=[pe]:tn.call(e,pe)||e.push(pe)}}}if(va&&Ia.has(t))return Ia.get(t);if(s){var n=t;if(va){var i=n.v;return((n.f&pt)===0&&n.reactions!==null||Kl(n))&&(i=pi(n)),Ia.set(n,i),i}var o=(n.f&wr)===0&&!Nr&&pe!==null&&(Gs||(pe.f&wr)!==0),l=(n.f&Ka)===0;Qa(n)&&(o&&(n.f|=wr),xl(n)),o&&!l&&(Al(n),Ul(n))}if(Er?.has(t))return Er.get(t);if((t.f&ca)!==0)throw t.v;return t.v}function Ul(t){if(t.f|=wr,t.deps!==null)for(const a of t.deps)(a.reactions??=[]).push(t),(a.f&wt)!==0&&(a.f&wr)===0&&(Al(a),Ul(a))}function Kl(t){if(t.v===ht)return!0;if(t.deps===null)return!1;for(const a of t.deps)if(Ia.has(a)||(a.f&wt)!==0&&Kl(a))return!0;return!1}function h(t){var a=Nr;try{return Nr=!0,t()}finally{Nr=a}}function We(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(ha in t)ei(t);else if(!Array.isArray(t))for(let a in t){const s=t[a];typeof s=="object"&&s&&ha in s&&ei(s)}}}function ei(t,a=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!a.has(t)){a.add(t),t instanceof Date&&t.getTime();for(let d in t)try{ei(t[d],a)}catch{}const s=oi(t);if(s!==Object.prototype&&s!==Array.prototype&&s!==Map.prototype&&s!==Set.prototype&&s!==Date.prototype){const d=dl(s);for(let p in d){const e=d[p].get;if(e)try{e.call(t)}catch{}}}}}const ys=Symbol("events"),Jl=new Set,ti=new Set;function Hc(t,a,s,d={}){function p(e){if(d.capture||ri.call(a,e),!e.cancelBubble)return Ya(()=>s?.call(this,e))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?ta(()=>{a.addEventListener(t,p,d)}):a.addEventListener(t,p,d),p}function Cn(t,a,s,d,p){var e={capture:d,passive:p},n=Hc(t,a,s,e);(a===document.body||a===window||a===document||a instanceof HTMLMediaElement)&&fi(()=>{a.removeEventListener(t,n,e)})}function Y(t,a,s){(a[ys]??={})[t]=s}function Wc(t){for(var a=0;a<t.length;a++)Jl.add(t[a]);for(var s of ti)s(t)}let Zo=null;function ri(t){var a=this,s=a.ownerDocument,d=t.type,p=t.composedPath?.()||[],e=p[0]||t.target;Zo=t;var n=0,i=Zo===t&&t[ys];if(i){var o=p.indexOf(i);if(o!==-1&&(a===document||a===window)){t[ys]=a;return}var l=p.indexOf(a);if(l===-1)return;o<=l&&(n=o)}if(e=p[n]||t.target,e!==a){Uu(t,"currentTarget",{configurable:!0,get(){return e||s}});var m=pe,u=oe;xr(null),Ar(null);try{for(var f,b=[];e!==null&&e!==a;){try{var R=e[ys]?.[d];R!=null&&(!e.disabled||t.target===e)&&R.call(e,t)}catch(O){f?b.push(O):f=O}if(t.cancelBubble)break;n++,e=n<p.length?p[n]:null}if(f){for(let O of b)queueMicrotask(()=>{throw O});throw f}}finally{t[ys]=a,delete t.currentTarget,xr(m),Ar(u)}}}const Zc=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Uc(t){return Zc?.createHTML(t)??t}function Kc(t){var a=Lc("template");return a.innerHTML=Uc(t.replaceAll("<!>","<!---->")),a.content}function ai(t,a){var s=oe;s.nodes===null&&(s.nodes={start:t,end:a,a:null,t:null})}function z(t,a){var s=(a&Bu)!==0,d=(a&Hu)!==0,p,e=!t.startsWith("<!>");return()=>{p===void 0&&(p=Kc(e?t:"<!>"+t),s||(p=on(p)));var n=d||El?document.importNode(p,!0):p.cloneNode(!0);if(s){var i=on(n),o=n.lastChild;ai(i,o)}else ai(n,n);return n}}function us(){var t=document.createDocumentFragment(),a=document.createComment(""),s=fa();return t.append(a,s),ai(a,s),t}function $(t,a){t!==null&&t.before(a)}const Jc=["touchstart","touchmove"];function Yc(t){return Jc.includes(t)}function w(t,a){var s=a==null?"":typeof a=="object"?`${a}`:a;s!==(t[Yn]??=t.nodeValue)&&(t[Yn]=s,t.nodeValue=`${s}`)}function Gc(t,a){return Qc(t,a)}const Hs=new Map;function Qc(t,{target:a,anchor:s,props:d={},events:p,context:e,intro:n=!0,transformError:i}){Nc();var o=void 0,l=Tc(()=>{var m=s??a.appendChild(fa());_c(m,{pending:()=>{}},b=>{gl({});var R=Se;e&&(R.c=e),p&&(d.$$events=p),o=t(b,d)||{},yl()},i);var u=new Set,f=b=>{for(var R=0;R<b.length;R++){var O=b[R];if(!u.has(O)){u.add(O);var S=Yc(O);for(const X of[a,document]){var G=Hs.get(X);G===void 0&&(G=new Map,Hs.set(X,G));var H=G.get(O);H===void 0?(X.addEventListener(O,ri,{passive:S}),G.set(O,1)):G.set(O,H+1)}}}};return f(pn(Jl)),ti.add(f),()=>{for(var b of u)for(const S of[a,document]){var R=Hs.get(S),O=R.get(b);--O==0?(S.removeEventListener(b,ri),R.delete(b),R.size===0&&Hs.delete(S)):R.set(b,O)}ti.delete(f),m!==s&&m.parentNode?.removeChild(m)}});return Xc.set(o,l),o}let Xc=new WeakMap;class eh{anchor;#t=new Map;#i=new Map;#e=new Map;#l=new Set;#a=!0;constructor(a,s=!0){this.anchor=a,this.#a=s}#n=a=>{if(this.#t.has(a)){var s=this.#t.get(a),d=this.#i.get(s);if(d)ln(d),this.#l.delete(s);else{var p=this.#e.get(s);p&&(ln(p.effect),this.#i.set(s,p.effect),this.#e.delete(s),p.fragment.lastChild.remove(),this.anchor.before(p.fragment),d=p.effect)}for(const[e,n]of this.#t){if(this.#t.delete(e),e===a)break;const i=this.#e.get(n);i&&(Qt(i.effect),this.#e.delete(n))}for(const[e,n]of this.#i){if(e===s||this.#l.has(e))continue;const i=()=>{if(Array.from(this.#t.values()).includes(e)){var l=document.createDocumentFragment();gi(n,l),l.append(fa()),this.#e.set(e,{effect:n,fragment:l})}else Qt(n);this.#l.delete(e),this.#i.delete(e)};this.#a||!d?(this.#l.add(e),$a(n,i,!1)):i()}}};#r=a=>{this.#t.delete(a);const s=Array.from(this.#t.values());for(const[d,p]of this.#e)s.includes(d)||(Qt(p.effect),this.#e.delete(d))};ensure(a,s){var d=ae,p=Ll();if(s&&!this.#i.has(a)&&!this.#e.has(a))if(p){var e=document.createDocumentFragment(),n=fa();e.append(n),this.#e.set(a,{effect:_r(()=>s(n)),fragment:e})}else this.#i.set(a,_r(()=>s(this.anchor)));if(this.#t.set(d,a),p){for(const[i,o]of this.#i)i===a?d.unskip_effect(o):d.skip_effect(o);for(const[i,o]of this.#e)i===a?d.unskip_effect(o.effect):d.skip_effect(o.effect);d.oncommit(this.#n),d.ondiscard(this.#r)}else this.#n(d)}}function Yl(t){Se===null&&fl(),Rs&&Se.l!==null?rh(Se).m.push(t):Xn(()=>{const a=h(t);if(typeof a=="function")return a})}function th(t){Se===null&&fl(),Yl(()=>()=>h(t))}function rh(t){var a=t.l;return a.u??={a:[],b:[],m:[]}}function Q(t,a,s=!1){var d=new eh(t),p=s?Ha:0;function e(n,i){d.ensure(n,i)}mi(()=>{var n=!1;a((i,o=0)=>{n=!0,e(o,i)}),n||e(-1,null)},p)}function Qr(t,a){return a}function ah(t,a,s){for(var d=[],p=a.length,e,n=a.length,i=0;i<p;i++){let u=a[i];$a(u,()=>{if(e){if(e.pending.delete(u),e.done.add(u),e.pending.size===0){var f=t.outrogroups;si(t,pn(e.done)),f.delete(e),f.size===0&&(t.outrogroups=null)}}else n-=1},!1)}if(n===0){var o=d.length===0&&s!==null;if(o){var l=s,m=l.parentNode;Cc(m),m.append(l),t.items.clear()}si(t,a,!o)}else e={pending:new Set(a),done:new Set},(t.outrogroups??=new Set).add(e)}function si(t,a,s=!0){var d;if(t.pending.size>0){d=new Set;for(const n of t.pending.values())for(const i of n)d.add(t.items.get(i).e)}for(var p=0;p<a.length;p++){var e=a[p];if(d?.has(e)){e.f|=Dr;const n=document.createDocumentFragment();gi(e,n)}else Qt(a[p],s)}}var Uo;function ye(t,a,s,d,p,e=null){var n=t,i=new Map,o=(a&ol)!==0;if(o){var l=t;n=l.appendChild(fa())}var m=null,u=ka(()=>{var X=s();return ii(X)?X:X==null?[]:pn(X)}),f,b=new Map,R=!0;function O(X){(H.effect.f&Pr)===0&&(H.pending.delete(X),H.fallback=m,sh(H,f,n,a,d),m!==null&&(f.length===0?(m.f&Dr)===0?ln(m):(m.f^=Dr,_s(m,null,n)):$a(m,()=>{m=null})))}function S(X){H.pending.delete(X)}var G=mi(()=>{f=r(u);for(var X=f.length,ee=new Set,he=ae,fe=Ll(),ue=0;ue<X;ue+=1){var Ee=f[ue],Nt=d(Ee,ue),Ae=R?null:i.get(Nt);Ae?(Ae.v&&Za(Ae.v,Ee),Ae.i&&Za(Ae.i,ue),fe&&he.unskip_effect(Ae.e)):(Ae=nh(i,R?n:Uo??=fa(),Ee,Nt,ue,p,a,s),R||(Ae.e.f|=Dr),i.set(Nt,Ae)),ee.add(Nt)}if(X===0&&e&&!m&&(R?m=_r(()=>e(n)):(m=_r(()=>e(Uo??=fa())),m.f|=Dr)),X>ee.size&&tc(),!R)if(b.set(he,ee),fe){for(const[B,ie]of i)ee.has(B)||he.skip_effect(ie.e);he.oncommit(O),he.ondiscard(S)}else O(he);r(u)}),H={effect:G,items:i,pending:b,outrogroups:null,fallback:m};R=!1}function cs(t){for(;t!==null&&(t.f&kr)===0;)t=t.next;return t}function sh(t,a,s,d,p){var e=(d&Fu)!==0,n=a.length,i=t.items,o=cs(t.effect.first),l,m=null,u,f=[],b=[],R,O,S,G;if(e)for(G=0;G<n;G+=1)R=a[G],O=p(R,G),S=i.get(O).e,(S.f&Dr)===0&&(S.nodes?.a?.measure(),(u??=new Set).add(S));for(G=0;G<n;G+=1){if(R=a[G],O=p(R,G),S=i.get(O).e,t.outrogroups!==null)for(const Ae of t.outrogroups)Ae.pending.delete(S),Ae.done.delete(S);if((S.f&Ft)!==0&&(ln(S),e&&(S.nodes?.a?.unfix(),(u??=new Set).delete(S))),(S.f&Dr)!==0)if(S.f^=Dr,S===o)_s(S,null,s);else{var H=m?m.next:o;S===t.effect.last&&(t.effect.last=S.prev),S.prev&&(S.prev.next=S.next),S.next&&(S.next.prev=S.prev),pa(t,m,S),pa(t,S,H),_s(S,H,s),m=S,f=[],b=[],o=cs(m.next);continue}if(S!==o){if(l!==void 0&&l.has(S)){if(f.length<b.length){var X=b[0],ee;m=X.prev;var he=f[0],fe=f[f.length-1];for(ee=0;ee<f.length;ee+=1)_s(f[ee],X,s);for(ee=0;ee<b.length;ee+=1)l.delete(b[ee]);pa(t,he.prev,fe.next),pa(t,m,he),pa(t,fe,X),o=X,m=fe,G-=1,f=[],b=[]}else l.delete(S),_s(S,o,s),pa(t,S.prev,S.next),pa(t,S,m===null?t.effect.first:m.next),pa(t,m,S),m=S;continue}for(f=[],b=[];o!==null&&o!==S;)(l??=new Set).add(o),b.push(o),o=cs(o.next);if(o===null)continue}(S.f&Dr)===0&&f.push(S),m=S,o=cs(S.next)}if(t.outrogroups!==null){for(const Ae of t.outrogroups)Ae.pending.size===0&&(si(t,pn(Ae.done)),t.outrogroups?.delete(Ae));t.outrogroups.size===0&&(t.outrogroups=null)}if(o!==null||l!==void 0){var ue=[];if(l!==void 0)for(S of l)(S.f&Ft)===0&&ue.push(S);for(;o!==null;)(o.f&Ft)===0&&o!==t.fallback&&ue.push(o),o=cs(o.next);var Ee=ue.length;if(Ee>0){var Nt=(d&ol)!==0&&n===0?s:null;if(e){for(G=0;G<Ee;G+=1)ue[G].nodes?.a?.measure();for(G=0;G<Ee;G+=1)ue[G].nodes?.a?.fix()}ah(t,ue,Nt)}}e&&ta(()=>{if(u!==void 0)for(S of u)S.nodes?.a?.apply()})}function nh(t,a,s,d,p,e,n,i){var o=(n&Mu)!==0?(n&Du)===0?K(s,!1,!1):Sa(s):null,l=(n&Vu)!==0?Sa(p):null;return{v:o,i:l,e:_r(()=>(e(a,o??s,l??p,i),()=>{t.delete(d)}))}}function _s(t,a,s){if(t.nodes)for(var d=t.nodes.start,p=t.nodes.end,e=a&&(a.f&Dr)===0?a.nodes.start:s;d!==null;){var n=Cs(d);if(e.before(d),d===p)return;d=n}}function pa(t,a,s){a===null?t.effect.first=s:a.next=s,s===null?t.effect.last=a:s.prev=a}const Ko=[..." \\t\\n\\r\\f \\u000b\uFEFF"];function ih(t,a,s){var d=t==null?"":""+t;if(a&&(d=d?d+" "+a:a),s){for(var p of Object.keys(s))if(s[p])d=d?d+" "+p:p;else if(d.length)for(var e=p.length,n=0;(n=d.indexOf(p,n))>=0;){var i=n+e;(n===0||Ko.includes(d[n-1]))&&(i===d.length||Ko.includes(d[i]))?d=(n===0?"":d.substring(0,n))+d.substring(i+1):n=i}}return d===""?null:d}function oh(t,a){return t==null?null:String(t)}function cr(t,a,s,d,p,e){var n=t[Kn];if(n!==s||n===void 0){var i=ih(s,d,e);i==null?t.removeAttribute("class"):t.className=i,t[Kn]=s}else if(e&&p!==e)for(var o in e){var l=!!e[o];(p==null||l!==!!p[o])&&t.classList.toggle(o,l)}return e}function Yt(t,a,s,d){var p=t[Jn];if(p!==a){var e=oh(a);e==null?t.removeAttribute("style"):t.style.cssText=e,t[Jn]=a}return d}function xs(t,a,s=!1){if(t.multiple){if(a==null)return;if(!ii(a))return uc();for(var d of t.options)d.selected=a.includes(As(d));return}for(d of t.options){var p=As(d);if(Ec(p,a)){d.selected=!0;return}}(!s||a!==void 0)&&(t.selectedIndex=-1)}function Xs(t){var a=new MutationObserver(()=>{"__value"in t&&xs(t,t.__value)});a.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),fi(()=>{a.disconnect()})}function lh(t,a,s=a){var d=new WeakSet,p=!0;di(t,"change",e=>{var n=e?"[selected]":":checked",i;if(t.multiple)i=[].map.call(t.querySelectorAll(n),As);else{var o=t.querySelector(n)??t.querySelector("option:not([disabled])");i=o&&As(o)}s(i),t.__value=i,ae!==null&&d.add(ae)}),Tl(()=>{var e=a();if(t===document.activeElement){var n=ae;if(d.has(n))return}if(xs(t,e,p),p&&e===void 0){var i=t.querySelector(":checked");i!==null&&(e=As(i),s(e))}t.__value=e,p=!1}),Xs(t)}function As(t){return"__value"in t?t.__value:t.value}const dh=Symbol("is custom element"),ph=Symbol("is html");function za(t,a){var s=Gl(t);s.checked!==(s.checked=a??void 0)&&(t.checked=a)}function M(t,a,s,d){var p=Gl(t);p[a]!==(p[a]=s)&&(a==="loading"&&(t[Xu]=s),s==null?t.removeAttribute(a):typeof s!="string"&&uh(t).includes(a)?t[a]=s:t.setAttribute(a,s))}function Gl(t){return t[hl]??={[dh]:t.nodeName.includes("-"),[ph]:t.namespaceURI===Wu}}var Jo=new Map;function uh(t){var a=t.getAttribute("is")||t.nodeName,s=Jo.get(a);if(s)return s;Jo.set(a,s=[]);for(var d,p=t,e=Element.prototype;e!==p;){d=dl(p);for(var n in d)d[n].set&&n!=="innerHTML"&&n!=="textContent"&&n!=="innerText"&&s.push(n);p=oi(p)}return s}function Ws(t,a,s=a){var d=new WeakSet;di(t,"input",async p=>{var e=p?t.defaultValue:t.value;if(e=Ln(t)?jn(e):e,s(e),ae!==null&&d.add(ae),await Qs(),e!==(e=a())){var n=t.selectionStart,i=t.selectionEnd,o=t.value.length;if(t.value=e??"",i!==null){var l=t.value.length;n===i&&i===o&&l>o?(t.selectionStart=l,t.selectionEnd=l):(t.selectionStart=n,t.selectionEnd=Math.min(i,l))}}}),h(a)==null&&t.value&&(s(Ln(t)?jn(t.value):t.value),ae!==null&&d.add(ae)),Ga(()=>{var p=a();if(t===document.activeElement){var e=ae;if(d.has(e))return}Ln(t)&&p===jn(t.value)||t.type==="date"&&!p&&!t.value||p!==t.value&&(t.value=p??"")})}function Yo(t,a,s=a){di(t,"change",d=>{var p=d?t.defaultChecked:t.checked;s(p)}),h(a)==null&&s(t.checked),Ga(()=>{var d=a();t.checked=!!d})}function Ln(t){var a=t.type;return a==="number"||a==="range"}function jn(t){return t===""?null:+t}function On(t,a){return t===a||t?.[ha]===a}function hs(t={},a,s,d){var p=Se.r,e=oe;return Tl(()=>{var n,i;return Ga(()=>{n=i,i=[],h(()=>{On(s(...i),t)||(a(t,...i),n&&On(s(...n),t)&&a(null,...n))})}),()=>{let o=e;for(;o!==p&&o.parent!==null&&o.parent.f&Un;)o=o.parent;const l=()=>{i&&On(s(...i),t)&&a(null,...i)},m=o.teardown;o.teardown=()=>{l(),m?.()}}}),t}function ch(t=!1){const a=Se,s=a.l.u;if(!s)return;let d=()=>We(a.s);if(t){let p=0,e={};const n=un(()=>{let i=!1;const o=a.s;for(const l in o)o[l]!==e[l]&&(e[l]=o[l],i=!0);return i&&p++,p});d=()=>r(n)}s.b.length&&Oc(()=>{Go(a,d),Wn(s.b)}),Xn(()=>{const p=h(()=>s.m.map(Gu));return()=>{for(const e of p)typeof e=="function"&&e()}}),s.a.length&&Xn(()=>{Go(a,d),Wn(s.a)})}function Go(t,a){if(t.l.s)for(const s of t.l.s)r(s);a()}async function Xr(t,a,s){return{...a,fingerprint:await t(s)}}async function hh(t,a){const s=[];for(const p of t.changes){s.push(Xr(a,{type:"change",ref:p.id},p));for(const[e,n]of p.verification.gaps.entries())s.push(Xr(a,{type:"verification-gap",ref:`${p.id}:gap:${e}`},{changeId:p.id,index:e,gap:n}))}for(const p of t.files)s.push(Xr(a,{type:"file",ref:p.id,path:p.newPath??p.oldPath??void 0},p));for(const p of t.hunks){s.push(Xr(a,{type:"hunk",ref:p.id,path:p.path},p));for(const[e,n]of p.lines.entries()){if(n.kind==="no-newline")continue;const i=n.kind==="addition"?"after":n.kind==="deletion"?"before":"diff",o=i==="before"?n.oldLine:n.newLine??n.oldLine;!o||o<1||s.push(Xr(a,{type:"line-range",ref:`${p.id}:${i}:${o}:${e}`,path:p.path,side:i,startLine:o,endLine:o},{path:p.path,side:i,lineNumber:o,content:n.content}))}}for(const p of t.targets)s.push(Xr(a,{type:"visual-target",ref:p.id},p));for(const p of t.comparisons){const e=t.targets.find(n=>n.id===p.targetRef);for(const n of p.images)for(const i of n.regions)s.push(Xr(a,{type:"visual-region",ref:`${p.id}:${n.id}:${i.id}`,targetRef:p.targetRef,region:{x:i.x/n.width,y:i.y/n.height,width:i.width/n.width,height:i.height/n.height}},{target:e,comparison:p,image:n,region:i}))}for(const p of t.findings)s.push(Xr(a,{type:"finding",ref:p.id,targetRef:p.targetRef},p));return(await Promise.all(s)).sort((p,e)=>`${p.type}\\0${p.ref}`.localeCompare(`${e.type}\\0${e.ref}`))}async function Ql(t,a){const s=[];for(const d of t.comparisons)for(const p of d.images)for(const e of p.regions)s.push(Xr(a,{type:"visual-region",ref:`${d.id}:${p.id}:${e.id}`,targetRef:d.targetRef,region:{x:e.x,y:e.y,width:e.width,height:e.height}},{comparisonId:d.id,imageId:p.id,region:e}));return Promise.all(s)}function fh(t){return!!(t&&typeof t=="object"&&!Array.isArray(t))}function mh(t){if(!fh(t))return!1;const a=Object.keys(t);return a.length===4&&a.every(s=>new Set(["x","y","width","height"]).has(s))&&[t.x,t.y,t.width,t.height].every(s=>typeof s=="number"&&Number.isFinite(s))}function Xl(t,a,s,d){const p=structuredClone(t);if(!p||typeof p!="object")return p;const e=new Map(a.map(l=>[Fr(l),l])),n=new Map(s.map(l=>[Fr(l),l])),i=[p],o=new WeakSet;for(;i.length>0;){const l=i.pop();if(o.has(l))continue;if(o.add(l),Array.isArray(l)){for(const u of l)u&&typeof u=="object"&&i.push(u);continue}const m=l;if(m.type==="visual-region"&&typeof m.ref=="string"&&typeof m.fingerprint=="string"&&mh(m.region)){const u=JSON.stringify([m.type,m.ref]),f=e.get(u),b=n.get(u),R=[m.region.x,m.region.y,m.region.width,m.region.height].some(S=>S>1);b?.fingerprint===m.fingerprint&&f?(f.region?m.region=structuredClone(f.region):delete m.region,f.targetRef?m.targetRef=f.targetRef:delete m.targetRef,d&&(m.fingerprint=f.fingerprint)):R&&!d&&delete m.region}for(const u of Object.values(m))u&&typeof u=="object"&&i.push(u)}return p}function Fr(t){return JSON.stringify([t.type,t.ref])}function Qo(t,a,s){return t.find(d=>d.type===a&&d.ref===s)}function Tn(t,a){const s=a.find(p=>p.type===t.type&&p.ref===t.ref);if(s?.fingerprint===t.fingerprint)return{source:t,result:"exact",disposition:"matched",candidate:s};if(s)return{source:t,result:"changed",disposition:"stale",candidate:s};const d=a.filter(p=>p.type===t.type&&p.fingerprint===t.fingerprint);return d.length===1?{source:t,result:"probable",disposition:"stale",candidate:d[0]}:{source:t,result:"missing",disposition:"orphaned"}}function ni(t){if(t===null||typeof t=="string"||typeof t=="boolean")return t;if(typeof t=="number"){if(!Number.isFinite(t))throw new TypeError("Review JSON does not support non-finite numbers");return Object.is(t,-0)?0:t}if(Array.isArray(t))return t.map(ni);if(t instanceof Date)return t.toISOString();if(typeof t=="object"){const a={};for(const s of Object.keys(t).sort()){const d=t[s];d!==void 0&&(a[s]=ni(d))}return a}throw new TypeError(`Review JSON does not support ${typeof t}`)}function Pa(t){return JSON.stringify(ni(t))}const Cr=async t=>{const a=new TextEncoder().encode(Pa(t)),s=await crypto.subtle.digest("SHA-256",a);return[...new Uint8Array(s)].map(d=>d.toString(16).padStart(2,"0")).join("")};var ed=(t,a)=>()=>(a||t((a={exports:{}}).exports,a),a.exports),vh=ed(t=>{Object.defineProperty(t,"__esModule",{value:!0});function a(s){let d=s.length,p=0,e=0,n;for(;e<d;)p++,n=s.charCodeAt(e++),n>=55296&&n<=56319&&e<d&&(n=s.charCodeAt(e),(n&64512)===56320&&e++);return p}t.default=a,a.code=\'require("ajv/dist/runtime/ucs2length").default\'}),gh=ed(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function a(B,ie){return{validate:B,compare:ie}}t.fullFormats={date:a(e,n),time:a(o(!0),l),"date-time":a(f(!0),b),"iso-time":a(o(),m),"iso-date-time":a(f(),R),duration:/^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$/,uri:G,"uri-reference":/^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\\x00-\\x20"\'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,url:/^(?:https?|ftp):\\/\\/(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)(?:\\.(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,email:/^[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,regex:Ae,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\\/(?:[a-z0-9_\\-.!$&\'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,byte:X,int32:{type:"number",validate:fe},int64:{type:"number",validate:ue},float:{type:"number",validate:Ee},double:{type:"number",validate:Ee},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:a(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d$/,n),time:a(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i,l),"date-time":a(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\dt(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i,b),"iso-time":a(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,m),"iso-date-time":a(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d[t\\s](?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,R),uri:/^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/)?[^\\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\\-.]*:)?\\/?\\/)?(?:[^\\\\\\s#][^\\s#]*)?(?:#[^\\\\\\s]*)?$/i,email:/^[a-z0-9.!#$%&\'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function s(B){return B%4===0&&(B%100!==0||B%400===0)}var d=/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/,p=[0,31,28,31,30,31,30,31,31,30,31,30,31];function e(B){let ie=d.exec(B);if(!ie)return!1;let q=+ie[1],me=+ie[2],Fe=+ie[3];return me>=1&&me<=12&&Fe>=1&&Fe<=(me===2&&s(q)?29:p[me])}function n(B,ie){if(B&&ie)return B>ie?1:B<ie?-1:0}var i=/^(\\d\\d):(\\d\\d):(\\d\\d(?:\\.\\d+)?)(z|([+-])(\\d\\d)(?::?(\\d\\d))?)?$/i;function o(B){return function(ie){let q=i.exec(ie);if(!q)return!1;let me=+q[1],Fe=+q[2],fr=+q[3],at=q[4],ce=q[5]==="-"?-1:1,E=+(q[6]||0),$t=+(q[7]||0);if(E>23||$t>59||B&&!at)return!1;if(me<=23&&Fe<=59&&fr<60)return!0;let j=Fe-$t*ce,Wr=me-E*ce-(j<0?1:0);return(Wr===23||Wr===-1)&&(j===59||j===-1)&&fr<61}}function l(B,ie){if(!(B&&ie))return;let q=new Date("2020-01-01T"+B).valueOf(),me=new Date("2020-01-01T"+ie).valueOf();if(q&&me)return q-me}function m(B,ie){if(!(B&&ie))return;let q=i.exec(B),me=i.exec(ie);if(q&&me)return B=q[1]+q[2]+q[3],ie=me[1]+me[2]+me[3],B>ie?1:B<ie?-1:0}var u=/t|\\s/i;function f(B){let ie=o(B);return function(q){let me=q.split(u);return me.length===2&&e(me[0])&&ie(me[1])}}function b(B,ie){if(!(B&&ie))return;let q=new Date(B).valueOf(),me=new Date(ie).valueOf();if(q&&me)return q-me}function R(B,ie){if(!(B&&ie))return;let[q,me]=B.split(u),[Fe,fr]=ie.split(u),at=n(q,Fe);if(at!==void 0)return at||l(me,fr)}var O=/\\/|:/,S=/^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function G(B){return O.test(B)&&S.test(B)}var H=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function X(B){return H.lastIndex=0,H.test(B)}var ee=-2147483648,he=2**31-1;function fe(B){return Number.isInteger(B)&&B<=he&&B>=ee}function ue(B){return Number.isInteger(B)}function Ee(){return!0}var Nt=/[^\\\\]\\\\Z/;function Ae(B){if(Nt.test(B))return!1;try{return new RegExp(B),!0}catch{return!1}}}),yh=td,Xo={properties:{source:{properties:{base:{type:["string","null"]},head:{type:["string","null"]}}}}},zn={properties:{type:{enum:["change","file","hunk","line-range","visual-target","visual-region","finding","verification-gap"]},ref:{type:"string",minLength:1},path:{type:"string"},side:{enum:["before","after","diff"]},startLine:{type:"integer",minimum:1},endLine:{type:"integer",minimum:1},targetRef:{type:"string"},region:{type:"object",additionalProperties:!1,required:["x","y","width","height"],properties:{x:{type:"number",minimum:0,maximum:1},y:{type:"number",minimum:0,maximum:1},width:{type:"number",exclusiveMinimum:0,maximum:1},height:{type:"number",exclusiveMinimum:0,maximum:1}}},selectorHint:{type:"string"},fingerprint:{type:"string",pattern:"^[a-f0-9]{64}$"}}},Je=vh().default,Na=Object.prototype.hasOwnProperty,$s=new RegExp("^report[-:][A-Za-z0-9._:-]+$","u"),Ua=new RegExp("^[a-f0-9]{64}$","u"),ra=gh().fullFormats["date-time"];function td(t,{instancePath:a="",parentData:s,parentDataProperty:d,rootData:p=t}={}){let e=null,n=0;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.schemaVersion===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property \'schemaVersion\'"};e===null?e=[i]:e.push(i),n++}if(t.source===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property \'source\'"};e===null?e=[i]:e.push(i),n++}if(t.state===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property \'state\'"};e===null?e=[i]:e.push(i),n++}if(t.threads===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"threads"},message:"must have required property \'threads\'"};e===null?e=[i]:e.push(i),n++}if(t.events===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"events"},message:"must have required property \'events\'"};e===null?e=[i]:e.push(i),n++}if(t.anchorCatalog===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"anchorCatalog"},message:"must have required property \'anchorCatalog\'"};e===null?e=[i]:e.push(i),n++}if(t.exportedAt===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"exportedAt"},message:"must have required property \'exportedAt\'"};e===null?e=[i]:e.push(i),n++}for(let i in t)if(!(i==="schemaVersion"||i==="source"||i==="state"||i==="threads"||i==="events"||i==="anchorCatalog"||i==="exportedAt")){let o={instancePath:a,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[o]:e.push(o),n++}if(t.schemaVersion!==void 0&&t.schemaVersion!=="1.0"){let i={instancePath:a+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:"1.0"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),n++}if(t.source!==void 0){let i=t.source;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.reportId===void 0){let o={instancePath:a+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"reportId"},message:"must have required property \'reportId\'"};e===null?e=[o]:e.push(o),n++}if(i.reportFingerprint===void 0){let o={instancePath:a+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"reportFingerprint"},message:"must have required property \'reportFingerprint\'"};e===null?e=[o]:e.push(o),n++}if(i.base===void 0){let o={instancePath:a+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"base"},message:"must have required property \'base\'"};e===null?e=[o]:e.push(o),n++}if(i.head===void 0){let o={instancePath:a+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"head"},message:"must have required property \'head\'"};e===null?e=[o]:e.push(o),n++}for(let o in i)if(!(o==="reportId"||o==="reportFingerprint"||o==="base"||o==="head")){let l={instancePath:a+"/source",schemaPath:"#/properties/source/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),n++}if(i.reportId!==void 0){let o=i.reportId;if(typeof o=="string"){if(Je(o)>256){let l={instancePath:a+"/source/reportId",schemaPath:"#/properties/source/properties/reportId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[l]:e.push(l),n++}if(!$s.test(o)){let l={instancePath:a+"/source/reportId",schemaPath:"#/properties/source/properties/reportId/pattern",keyword:"pattern",params:{pattern:"^report[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^report[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[l]:e.push(l),n++}}else{let l={instancePath:a+"/source/reportId",schemaPath:"#/properties/source/properties/reportId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),n++}}if(i.reportFingerprint!==void 0){let o=i.reportFingerprint;if(typeof o=="string"){if(!Ua.test(o)){let l={instancePath:a+"/source/reportFingerprint",schemaPath:"#/properties/source/properties/reportFingerprint/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:\'must match pattern "^[a-f0-9]{64}$"\'};e===null?e=[l]:e.push(l),n++}}else{let l={instancePath:a+"/source/reportFingerprint",schemaPath:"#/properties/source/properties/reportFingerprint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),n++}}if(i.base!==void 0){let o=i.base;if(typeof o!="string"&&o!==null){let l={instancePath:a+"/source/base",schemaPath:"#/properties/source/properties/base/type",keyword:"type",params:{type:Xo.properties.source.properties.base.type},message:"must be string,null"};e===null?e=[l]:e.push(l),n++}}if(i.head!==void 0){let o=i.head;if(typeof o!="string"&&o!==null){let l={instancePath:a+"/source/head",schemaPath:"#/properties/source/properties/head/type",keyword:"type",params:{type:Xo.properties.source.properties.head.type},message:"must be string,null"};e===null?e=[l]:e.push(l),n++}}}else{let o={instancePath:a+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),n++}}if(t.state!==void 0){let i=t.state;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let o={instancePath:a+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),n++}}if(t.threads!==void 0){let i=t.threads;if(Array.isArray(i)){let o=i.length;for(let l=0;l<o;l++){let m=i[l];if(!(m&&typeof m=="object"&&!Array.isArray(m))){let u={instancePath:a+"/threads/"+l,schemaPath:"#/properties/threads/items/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[u]:e.push(u),n++}}}else{let o={instancePath:a+"/threads",schemaPath:"#/properties/threads/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),n++}}if(t.events!==void 0){let i=t.events;if(Array.isArray(i)){let o=i.length;for(let l=0;l<o;l++){let m=i[l];if(!(m&&typeof m=="object"&&!Array.isArray(m))){let u={instancePath:a+"/events/"+l,schemaPath:"#/properties/events/items/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[u]:e.push(u),n++}}}else{let o={instancePath:a+"/events",schemaPath:"#/properties/events/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),n++}}if(t.anchorCatalog!==void 0){let i=t.anchorCatalog;if(Array.isArray(i)){let o=i.length;for(let l=0;l<o;l++){let m=i[l];if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.type===void 0){let u={instancePath:a+"/anchorCatalog/"+l,schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property \'type\'"};e===null?e=[u]:e.push(u),n++}if(m.ref===void 0){let u={instancePath:a+"/anchorCatalog/"+l,schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property \'ref\'"};e===null?e=[u]:e.push(u),n++}if(m.fingerprint===void 0){let u={instancePath:a+"/anchorCatalog/"+l,schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"fingerprint"},message:"must have required property \'fingerprint\'"};e===null?e=[u]:e.push(u),n++}for(let u in m)if(!Na.call(zn.properties,u)){let f={instancePath:a+"/anchorCatalog/"+l,schemaPath:"#/$defs/reviewAnchor/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:u},message:"must NOT have additional properties"};e===null?e=[f]:e.push(f),n++}if(m.type!==void 0){let u=m.type;if(!(u==="change"||u==="file"||u==="hunk"||u==="line-range"||u==="visual-target"||u==="visual-region"||u==="finding"||u==="verification-gap")){let f={instancePath:a+"/anchorCatalog/"+l+"/type",schemaPath:"#/$defs/reviewAnchor/properties/type/enum",keyword:"enum",params:{allowedValues:zn.properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[f]:e.push(f),n++}}if(m.ref!==void 0){let u=m.ref;if(typeof u=="string"){if(Je(u)<1){let f={instancePath:a+"/anchorCatalog/"+l+"/ref",schemaPath:"#/$defs/reviewAnchor/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[f]:e.push(f),n++}}else{let f={instancePath:a+"/anchorCatalog/"+l+"/ref",schemaPath:"#/$defs/reviewAnchor/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),n++}}if(m.path!==void 0&&typeof m.path!="string"){let u={instancePath:a+"/anchorCatalog/"+l+"/path",schemaPath:"#/$defs/reviewAnchor/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[u]:e.push(u),n++}if(m.side!==void 0){let u=m.side;if(!(u==="before"||u==="after"||u==="diff")){let f={instancePath:a+"/anchorCatalog/"+l+"/side",schemaPath:"#/$defs/reviewAnchor/properties/side/enum",keyword:"enum",params:{allowedValues:zn.properties.side.enum},message:"must be equal to one of the allowed values"};e===null?e=[f]:e.push(f),n++}}if(m.startLine!==void 0){let u=m.startLine;if(!(typeof u=="number"&&!(u%1)&&!isNaN(u))){let f={instancePath:a+"/anchorCatalog/"+l+"/startLine",schemaPath:"#/$defs/reviewAnchor/properties/startLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[f]:e.push(f),n++}if(typeof u=="number"&&(u<1||isNaN(u))){let f={instancePath:a+"/anchorCatalog/"+l+"/startLine",schemaPath:"#/$defs/reviewAnchor/properties/startLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[f]:e.push(f),n++}}if(m.endLine!==void 0){let u=m.endLine;if(!(typeof u=="number"&&!(u%1)&&!isNaN(u))){let f={instancePath:a+"/anchorCatalog/"+l+"/endLine",schemaPath:"#/$defs/reviewAnchor/properties/endLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[f]:e.push(f),n++}if(typeof u=="number"&&(u<1||isNaN(u))){let f={instancePath:a+"/anchorCatalog/"+l+"/endLine",schemaPath:"#/$defs/reviewAnchor/properties/endLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[f]:e.push(f),n++}}if(m.targetRef!==void 0&&typeof m.targetRef!="string"){let u={instancePath:a+"/anchorCatalog/"+l+"/targetRef",schemaPath:"#/$defs/reviewAnchor/properties/targetRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[u]:e.push(u),n++}if(m.region!==void 0){let u=m.region;if(u&&typeof u=="object"&&!Array.isArray(u)){if(u.x===void 0){let f={instancePath:a+"/anchorCatalog/"+l+"/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"x"},message:"must have required property \'x\'"};e===null?e=[f]:e.push(f),n++}if(u.y===void 0){let f={instancePath:a+"/anchorCatalog/"+l+"/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"y"},message:"must have required property \'y\'"};e===null?e=[f]:e.push(f),n++}if(u.width===void 0){let f={instancePath:a+"/anchorCatalog/"+l+"/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"width"},message:"must have required property \'width\'"};e===null?e=[f]:e.push(f),n++}if(u.height===void 0){let f={instancePath:a+"/anchorCatalog/"+l+"/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"height"},message:"must have required property \'height\'"};e===null?e=[f]:e.push(f),n++}for(let f in u)if(!(f==="x"||f==="y"||f==="width"||f==="height")){let b={instancePath:a+"/anchorCatalog/"+l+"/region",schemaPath:"#/$defs/reviewAnchor/properties/region/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),n++}if(u.x!==void 0){let f=u.x;if(typeof f=="number"){if(f>1||isNaN(f)){let b={instancePath:a+"/anchorCatalog/"+l+"/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[b]:e.push(b),n++}if(f<0||isNaN(f)){let b={instancePath:a+"/anchorCatalog/"+l+"/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/anchorCatalog/"+l+"/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[b]:e.push(b),n++}}if(u.y!==void 0){let f=u.y;if(typeof f=="number"){if(f>1||isNaN(f)){let b={instancePath:a+"/anchorCatalog/"+l+"/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[b]:e.push(b),n++}if(f<0||isNaN(f)){let b={instancePath:a+"/anchorCatalog/"+l+"/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/anchorCatalog/"+l+"/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[b]:e.push(b),n++}}if(u.width!==void 0){let f=u.width;if(typeof f=="number"){if(f>1||isNaN(f)){let b={instancePath:a+"/anchorCatalog/"+l+"/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[b]:e.push(b),n++}if(f<=0||isNaN(f)){let b={instancePath:a+"/anchorCatalog/"+l+"/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/anchorCatalog/"+l+"/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[b]:e.push(b),n++}}if(u.height!==void 0){let f=u.height;if(typeof f=="number"){if(f>1||isNaN(f)){let b={instancePath:a+"/anchorCatalog/"+l+"/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[b]:e.push(b),n++}if(f<=0||isNaN(f)){let b={instancePath:a+"/anchorCatalog/"+l+"/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/anchorCatalog/"+l+"/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[b]:e.push(b),n++}}}else{let f={instancePath:a+"/anchorCatalog/"+l+"/region",schemaPath:"#/$defs/reviewAnchor/properties/region/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),n++}}if(m.selectorHint!==void 0&&typeof m.selectorHint!="string"){let u={instancePath:a+"/anchorCatalog/"+l+"/selectorHint",schemaPath:"#/$defs/reviewAnchor/properties/selectorHint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[u]:e.push(u),n++}if(m.fingerprint!==void 0){let u=m.fingerprint;if(typeof u=="string"){if(!Ua.test(u)){let f={instancePath:a+"/anchorCatalog/"+l+"/fingerprint",schemaPath:"#/$defs/reviewAnchor/properties/fingerprint/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:\'must match pattern "^[a-f0-9]{64}$"\'};e===null?e=[f]:e.push(f),n++}}else{let f={instancePath:a+"/anchorCatalog/"+l+"/fingerprint",schemaPath:"#/$defs/reviewAnchor/properties/fingerprint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),n++}}}else{let u={instancePath:a+"/anchorCatalog/"+l,schemaPath:"#/$defs/reviewAnchor/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[u]:e.push(u),n++}}}else{let o={instancePath:a+"/anchorCatalog",schemaPath:"#/properties/anchorCatalog/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),n++}}if(t.exportedAt!==void 0){let i=t.exportedAt;if(typeof i=="string"){if(!ra.validate(i)){let o={instancePath:a+"/exportedAt",schemaPath:"#/properties/exportedAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/exportedAt",schemaPath:"#/properties/exportedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}}else{let i={instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),n++}return td.errors=e,n===0}var _h=nd,Ma={properties:{schemaVersion:{const:"1.0"},id:{type:"string",pattern:"^event[-:][A-Za-z0-9._:-]+$",maxLength:256},reportId:{type:"string",pattern:"^report[-:][A-Za-z0-9._:-]+$",maxLength:256},sequence:{type:"integer",minimum:1},type:{enum:["viewed.changed","judgment.changed","thread.created","thread.message-added","thread.resolved","state.imported","agent-attention.changed","feedback-batch.stored","feedback-batch.claimed","feedback-batch.released","feedback-batch.answered"]},createdAt:{type:"string",format:"date-time"},anchor:{$ref:"#/$defs/reviewAnchor"},changeId:{type:"string",pattern:"^change[-:]"},viewState:{enum:["unseen","viewed","stale"]},judgmentState:{enum:["unreviewed","reviewed","follow-up","blocked","stale"]},threadId:{type:"string",pattern:"^thread[-:][A-Za-z0-9._:-]+$",maxLength:256},messageId:{type:"string",pattern:"^message[-:][A-Za-z0-9._:-]+$",maxLength:256},sourceReportId:{type:"string",pattern:"^report[-:][A-Za-z0-9._:-]+$",maxLength:256},attentionState:{enum:["none","requested","batched","submitted","acknowledged","answered","stale"]},batchId:{type:"string",pattern:"^fb[-:][A-Za-z0-9._:-]+$",maxLength:256},threadIds:{type:"array",maxItems:20,items:{type:"string",pattern:"^thread[-:][A-Za-z0-9._:-]+$",maxLength:256},uniqueItems:!0},itemIds:{type:"array",maxItems:20,items:{type:"string",pattern:"^item[-:][A-Za-z0-9._:-]+$",maxLength:256},uniqueItems:!0},itemCount:{type:"integer",minimum:1,maximum:20},deliveryMode:{enum:["direct-same-session","return-to-session","export-only"]},originSessionMatched:{type:"boolean"}}},Mn={properties:{type:{enum:["change","file","hunk","line-range","visual-target","visual-region","finding","verification-gap"]},ref:{type:"string",minLength:1},path:{type:"string"},side:{enum:["before","after","diff"]},startLine:{type:"integer",minimum:1},endLine:{type:"integer",minimum:1},targetRef:{type:"string"},region:{type:"object",additionalProperties:!1,required:["x","y","width","height"],properties:{x:{type:"number",minimum:0,maximum:1},y:{type:"number",minimum:0,maximum:1},width:{type:"number",exclusiveMinimum:0,maximum:1},height:{type:"number",exclusiveMinimum:0,maximum:1}}},selectorHint:{type:"string"},fingerprint:{type:"string",pattern:"^[a-f0-9]{64}$"}}},wh=new RegExp("^event[-:][A-Za-z0-9._:-]+$","u"),bh=new RegExp("^change[-:]","u"),qs=new RegExp("^thread[-:][A-Za-z0-9._:-]+$","u"),rd=new RegExp("^message[-:][A-Za-z0-9._:-]+$","u"),ad=new RegExp("^fb[-:][A-Za-z0-9._:-]+$","u"),sd=new RegExp("^item[-:][A-Za-z0-9._:-]+$","u");function nd(t,{instancePath:a="",parentData:s,parentDataProperty:d,rootData:p=t}={}){let e=null,n=0,i=n,o=!0,l=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.type!==void 0&&t.type!=="viewed.changed"){let v={};e===null?e=[v]:e.push(v),n++}var m=l===n;if(n=i,e!==null&&(i?e.length=i:e=null),m){let v=n;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.anchor===void 0){let P={instancePath:a,schemaPath:"#/allOf/0/then/required",keyword:"required",params:{missingProperty:"anchor"},message:"must have required property \'anchor\'"};e===null?e=[P]:e.push(P),n++}if(t.viewState===void 0){let P={instancePath:a,schemaPath:"#/allOf/0/then/required",keyword:"required",params:{missingProperty:"viewState"},message:"must have required property \'viewState\'"};e===null?e=[P]:e.push(P),n++}}var m=v===n;o=m}if(!o){let v={instancePath:a,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[v]:e.push(v),n++}let u=n,f=!0,b=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.type!==void 0&&t.type!=="judgment.changed"){let v={};e===null?e=[v]:e.push(v),n++}var R=b===n;if(n=u,e!==null&&(u?e.length=u:e=null),R){let v=n;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.changeId===void 0){let P={instancePath:a,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty:"changeId"},message:"must have required property \'changeId\'"};e===null?e=[P]:e.push(P),n++}if(t.judgmentState===void 0){let P={instancePath:a,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty:"judgmentState"},message:"must have required property \'judgmentState\'"};e===null?e=[P]:e.push(P),n++}}var R=v===n;f=R}if(!f){let v={instancePath:a,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[v]:e.push(v),n++}let O=n,S=!0,G=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.type!==void 0&&t.type!=="thread.created"){let v={};e===null?e=[v]:e.push(v),n++}var H=G===n;if(n=O,e!==null&&(O?e.length=O:e=null),H){let v=n;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.anchor===void 0){let P={instancePath:a,schemaPath:"#/allOf/2/then/required",keyword:"required",params:{missingProperty:"anchor"},message:"must have required property \'anchor\'"};e===null?e=[P]:e.push(P),n++}if(t.threadId===void 0){let P={instancePath:a,schemaPath:"#/allOf/2/then/required",keyword:"required",params:{missingProperty:"threadId"},message:"must have required property \'threadId\'"};e===null?e=[P]:e.push(P),n++}if(t.messageId===void 0){let P={instancePath:a,schemaPath:"#/allOf/2/then/required",keyword:"required",params:{missingProperty:"messageId"},message:"must have required property \'messageId\'"};e===null?e=[P]:e.push(P),n++}}var H=v===n;S=H}if(!S){let v={instancePath:a,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[v]:e.push(v),n++}let X=n,ee=!0,he=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.type!==void 0&&t.type!=="thread.message-added"){let v={};e===null?e=[v]:e.push(v),n++}var fe=he===n;if(n=X,e!==null&&(X?e.length=X:e=null),fe){let v=n;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.threadId===void 0){let P={instancePath:a,schemaPath:"#/allOf/3/then/required",keyword:"required",params:{missingProperty:"threadId"},message:"must have required property \'threadId\'"};e===null?e=[P]:e.push(P),n++}if(t.messageId===void 0){let P={instancePath:a,schemaPath:"#/allOf/3/then/required",keyword:"required",params:{missingProperty:"messageId"},message:"must have required property \'messageId\'"};e===null?e=[P]:e.push(P),n++}}var fe=v===n;ee=fe}if(!ee){let v={instancePath:a,schemaPath:"#/allOf/3/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[v]:e.push(v),n++}let ue=n,Ee=!0,Nt=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.type!==void 0&&t.type!=="thread.resolved"){let v={};e===null?e=[v]:e.push(v),n++}var Ae=Nt===n;if(n=ue,e!==null&&(ue?e.length=ue:e=null),Ae){let v=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.threadId===void 0){let P={instancePath:a,schemaPath:"#/allOf/4/then/required",keyword:"required",params:{missingProperty:"threadId"},message:"must have required property \'threadId\'"};e===null?e=[P]:e.push(P),n++}var Ae=v===n;Ee=Ae}if(!Ee){let v={instancePath:a,schemaPath:"#/allOf/4/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[v]:e.push(v),n++}let B=n,ie=!0,q=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.type!==void 0&&t.type!=="state.imported"){let v={};e===null?e=[v]:e.push(v),n++}var me=q===n;if(n=B,e!==null&&(B?e.length=B:e=null),me){let v=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.sourceReportId===void 0){let P={instancePath:a,schemaPath:"#/allOf/5/then/required",keyword:"required",params:{missingProperty:"sourceReportId"},message:"must have required property \'sourceReportId\'"};e===null?e=[P]:e.push(P),n++}var me=v===n;ie=me}if(!ie){let v={instancePath:a,schemaPath:"#/allOf/5/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[v]:e.push(v),n++}let Fe=n,fr=!0,at=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.type!==void 0&&t.type!=="agent-attention.changed"){let v={};e===null?e=[v]:e.push(v),n++}var ce=at===n;if(n=Fe,e!==null&&(Fe?e.length=Fe:e=null),ce){let v=n;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.threadId===void 0){let P={instancePath:a,schemaPath:"#/allOf/6/then/required",keyword:"required",params:{missingProperty:"threadId"},message:"must have required property \'threadId\'"};e===null?e=[P]:e.push(P),n++}if(t.attentionState===void 0){let P={instancePath:a,schemaPath:"#/allOf/6/then/required",keyword:"required",params:{missingProperty:"attentionState"},message:"must have required property \'attentionState\'"};e===null?e=[P]:e.push(P),n++}}var ce=v===n;fr=ce}if(!fr){let v={instancePath:a,schemaPath:"#/allOf/6/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[v]:e.push(v),n++}let E=n,$t=!0,j=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.type!==void 0&&t.type!=="feedback-batch.stored"){let v={};e===null?e=[v]:e.push(v),n++}var Wr=j===n;if(n=E,e!==null&&(E?e.length=E:e=null),Wr){let v=n;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.batchId===void 0){let P={instancePath:a,schemaPath:"#/allOf/7/then/required",keyword:"required",params:{missingProperty:"batchId"},message:"must have required property \'batchId\'"};e===null?e=[P]:e.push(P),n++}if(t.threadIds===void 0){let P={instancePath:a,schemaPath:"#/allOf/7/then/required",keyword:"required",params:{missingProperty:"threadIds"},message:"must have required property \'threadIds\'"};e===null?e=[P]:e.push(P),n++}if(t.itemCount===void 0){let P={instancePath:a,schemaPath:"#/allOf/7/then/required",keyword:"required",params:{missingProperty:"itemCount"},message:"must have required property \'itemCount\'"};e===null?e=[P]:e.push(P),n++}if(t.deliveryMode===void 0){let P={instancePath:a,schemaPath:"#/allOf/7/then/required",keyword:"required",params:{missingProperty:"deliveryMode"},message:"must have required property \'deliveryMode\'"};e===null?e=[P]:e.push(P),n++}}var Wr=v===n;$t=Wr}if(!$t){let v={instancePath:a,schemaPath:"#/allOf/7/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[v]:e.push(v),n++}let sa=n,st=!0,ts=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.type!==void 0&&t.type!=="feedback-batch.claimed"){let v={};e===null?e=[v]:e.push(v),n++}var Z=ts===n;if(n=sa,e!==null&&(sa?e.length=sa:e=null),Z){let v=n;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.batchId===void 0){let P={instancePath:a,schemaPath:"#/allOf/8/then/required",keyword:"required",params:{missingProperty:"batchId"},message:"must have required property \'batchId\'"};e===null?e=[P]:e.push(P),n++}if(t.originSessionMatched===void 0){let P={instancePath:a,schemaPath:"#/allOf/8/then/required",keyword:"required",params:{missingProperty:"originSessionMatched"},message:"must have required property \'originSessionMatched\'"};e===null?e=[P]:e.push(P),n++}}var Z=v===n;st=Z}if(!st){let v={instancePath:a,schemaPath:"#/allOf/8/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[v]:e.push(v),n++}let ft=n,mr=!0,Ca=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.type!==void 0&&t.type!=="feedback-batch.released"){let v={};e===null?e=[v]:e.push(v),n++}var Ir=Ca===n;if(n=ft,e!==null&&(ft?e.length=ft:e=null),Ir){let v=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.batchId===void 0){let P={instancePath:a,schemaPath:"#/allOf/9/then/required",keyword:"required",params:{missingProperty:"batchId"},message:"must have required property \'batchId\'"};e===null?e=[P]:e.push(P),n++}var Ir=v===n;mr=Ir}if(!mr){let v={instancePath:a,schemaPath:"#/allOf/9/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[v]:e.push(v),n++}let ga=n,Lr=!0,jr=n;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.type!==void 0&&t.type!=="feedback-batch.answered"){let v={};e===null?e=[v]:e.push(v),n++}var Ce=jr===n;if(n=ga,e!==null&&(ga?e.length=ga:e=null),Ce){let v=n;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.batchId===void 0){let P={instancePath:a,schemaPath:"#/allOf/10/then/required",keyword:"required",params:{missingProperty:"batchId"},message:"must have required property \'batchId\'"};e===null?e=[P]:e.push(P),n++}if(t.itemIds===void 0){let P={instancePath:a,schemaPath:"#/allOf/10/then/required",keyword:"required",params:{missingProperty:"itemIds"},message:"must have required property \'itemIds\'"};e===null?e=[P]:e.push(P),n++}}var Ce=v===n;Lr=Ce}if(!Lr){let v={instancePath:a,schemaPath:"#/allOf/10/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[v]:e.push(v),n++}if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.schemaVersion===void 0){let v={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property \'schemaVersion\'"};e===null?e=[v]:e.push(v),n++}if(t.id===void 0){let v={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property \'id\'"};e===null?e=[v]:e.push(v),n++}if(t.reportId===void 0){let v={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"reportId"},message:"must have required property \'reportId\'"};e===null?e=[v]:e.push(v),n++}if(t.sequence===void 0){let v={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sequence"},message:"must have required property \'sequence\'"};e===null?e=[v]:e.push(v),n++}if(t.type===void 0){let v={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property \'type\'"};e===null?e=[v]:e.push(v),n++}if(t.createdAt===void 0){let v={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property \'createdAt\'"};e===null?e=[v]:e.push(v),n++}for(let v in t)if(!Na.call(Ma.properties,v)){let _={instancePath:a,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),n++}if(t.schemaVersion!==void 0&&t.schemaVersion!=="1.0"){let v={instancePath:a+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:"1.0"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),n++}if(t.id!==void 0){let v=t.id;if(typeof v=="string"){if(Je(v)>256){let _={instancePath:a+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[_]:e.push(_),n++}if(!wh.test(v)){let _={instancePath:a+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^event[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^event[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[_]:e.push(_),n++}}else{let _={instancePath:a+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),n++}}if(t.reportId!==void 0){let v=t.reportId;if(typeof v=="string"){if(Je(v)>256){let _={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[_]:e.push(_),n++}if(!$s.test(v)){let _={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/pattern",keyword:"pattern",params:{pattern:"^report[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^report[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[_]:e.push(_),n++}}else{let _={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),n++}}if(t.sequence!==void 0){let v=t.sequence;if(!(typeof v=="number"&&!(v%1)&&!isNaN(v))){let _={instancePath:a+"/sequence",schemaPath:"#/properties/sequence/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[_]:e.push(_),n++}if(typeof v=="number"&&(v<1||isNaN(v))){let _={instancePath:a+"/sequence",schemaPath:"#/properties/sequence/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[_]:e.push(_),n++}}if(t.type!==void 0){let v=t.type;if(!(v==="viewed.changed"||v==="judgment.changed"||v==="thread.created"||v==="thread.message-added"||v==="thread.resolved"||v==="state.imported"||v==="agent-attention.changed"||v==="feedback-batch.stored"||v==="feedback-batch.claimed"||v==="feedback-batch.released"||v==="feedback-batch.answered")){let _={instancePath:a+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Ma.properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[_]:e.push(_),n++}}if(t.createdAt!==void 0){let v=t.createdAt;if(typeof v=="string"){if(!ra.validate(v)){let _={instancePath:a+"/createdAt",schemaPath:"#/properties/createdAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[_]:e.push(_),n++}}else{let _={instancePath:a+"/createdAt",schemaPath:"#/properties/createdAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),n++}}if(t.anchor!==void 0){let v=t.anchor;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.type===void 0){let _={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property \'type\'"};e===null?e=[_]:e.push(_),n++}if(v.ref===void 0){let _={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property \'ref\'"};e===null?e=[_]:e.push(_),n++}if(v.fingerprint===void 0){let _={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"fingerprint"},message:"must have required property \'fingerprint\'"};e===null?e=[_]:e.push(_),n++}for(let _ in v)if(!Na.call(Mn.properties,_)){let P={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:_},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),n++}if(v.type!==void 0){let _=v.type;if(!(_==="change"||_==="file"||_==="hunk"||_==="line-range"||_==="visual-target"||_==="visual-region"||_==="finding"||_==="verification-gap")){let P={instancePath:a+"/anchor/type",schemaPath:"#/$defs/reviewAnchor/properties/type/enum",keyword:"enum",params:{allowedValues:Mn.properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[P]:e.push(P),n++}}if(v.ref!==void 0){let _=v.ref;if(typeof _=="string"){if(Je(_)<1){let P={instancePath:a+"/anchor/ref",schemaPath:"#/$defs/reviewAnchor/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[P]:e.push(P),n++}}else{let P={instancePath:a+"/anchor/ref",schemaPath:"#/$defs/reviewAnchor/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),n++}}if(v.path!==void 0&&typeof v.path!="string"){let _={instancePath:a+"/anchor/path",schemaPath:"#/$defs/reviewAnchor/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),n++}if(v.side!==void 0){let _=v.side;if(!(_==="before"||_==="after"||_==="diff")){let P={instancePath:a+"/anchor/side",schemaPath:"#/$defs/reviewAnchor/properties/side/enum",keyword:"enum",params:{allowedValues:Mn.properties.side.enum},message:"must be equal to one of the allowed values"};e===null?e=[P]:e.push(P),n++}}if(v.startLine!==void 0){let _=v.startLine;if(!(typeof _=="number"&&!(_%1)&&!isNaN(_))){let P={instancePath:a+"/anchor/startLine",schemaPath:"#/$defs/reviewAnchor/properties/startLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[P]:e.push(P),n++}if(typeof _=="number"&&(_<1||isNaN(_))){let P={instancePath:a+"/anchor/startLine",schemaPath:"#/$defs/reviewAnchor/properties/startLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[P]:e.push(P),n++}}if(v.endLine!==void 0){let _=v.endLine;if(!(typeof _=="number"&&!(_%1)&&!isNaN(_))){let P={instancePath:a+"/anchor/endLine",schemaPath:"#/$defs/reviewAnchor/properties/endLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[P]:e.push(P),n++}if(typeof _=="number"&&(_<1||isNaN(_))){let P={instancePath:a+"/anchor/endLine",schemaPath:"#/$defs/reviewAnchor/properties/endLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[P]:e.push(P),n++}}if(v.targetRef!==void 0&&typeof v.targetRef!="string"){let _={instancePath:a+"/anchor/targetRef",schemaPath:"#/$defs/reviewAnchor/properties/targetRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),n++}if(v.region!==void 0){let _=v.region;if(_&&typeof _=="object"&&!Array.isArray(_)){if(_.x===void 0){let P={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"x"},message:"must have required property \'x\'"};e===null?e=[P]:e.push(P),n++}if(_.y===void 0){let P={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"y"},message:"must have required property \'y\'"};e===null?e=[P]:e.push(P),n++}if(_.width===void 0){let P={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"width"},message:"must have required property \'width\'"};e===null?e=[P]:e.push(P),n++}if(_.height===void 0){let P={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"height"},message:"must have required property \'height\'"};e===null?e=[P]:e.push(P),n++}for(let P in _)if(!(P==="x"||P==="y"||P==="width"||P==="height")){let U={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[U]:e.push(U),n++}if(_.x!==void 0){let P=_.x;if(typeof P=="number"){if(P>1||isNaN(P)){let U={instancePath:a+"/anchor/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[U]:e.push(U),n++}if(P<0||isNaN(P)){let U={instancePath:a+"/anchor/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[U]:e.push(U),n++}}else{let U={instancePath:a+"/anchor/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[U]:e.push(U),n++}}if(_.y!==void 0){let P=_.y;if(typeof P=="number"){if(P>1||isNaN(P)){let U={instancePath:a+"/anchor/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[U]:e.push(U),n++}if(P<0||isNaN(P)){let U={instancePath:a+"/anchor/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[U]:e.push(U),n++}}else{let U={instancePath:a+"/anchor/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[U]:e.push(U),n++}}if(_.width!==void 0){let P=_.width;if(typeof P=="number"){if(P>1||isNaN(P)){let U={instancePath:a+"/anchor/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[U]:e.push(U),n++}if(P<=0||isNaN(P)){let U={instancePath:a+"/anchor/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[U]:e.push(U),n++}}else{let U={instancePath:a+"/anchor/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[U]:e.push(U),n++}}if(_.height!==void 0){let P=_.height;if(typeof P=="number"){if(P>1||isNaN(P)){let U={instancePath:a+"/anchor/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[U]:e.push(U),n++}if(P<=0||isNaN(P)){let U={instancePath:a+"/anchor/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[U]:e.push(U),n++}}else{let U={instancePath:a+"/anchor/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[U]:e.push(U),n++}}}else{let P={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),n++}}if(v.selectorHint!==void 0&&typeof v.selectorHint!="string"){let _={instancePath:a+"/anchor/selectorHint",schemaPath:"#/$defs/reviewAnchor/properties/selectorHint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),n++}if(v.fingerprint!==void 0){let _=v.fingerprint;if(typeof _=="string"){if(!Ua.test(_)){let P={instancePath:a+"/anchor/fingerprint",schemaPath:"#/$defs/reviewAnchor/properties/fingerprint/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:\'must match pattern "^[a-f0-9]{64}$"\'};e===null?e=[P]:e.push(P),n++}}else{let P={instancePath:a+"/anchor/fingerprint",schemaPath:"#/$defs/reviewAnchor/properties/fingerprint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),n++}}}else{let _={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[_]:e.push(_),n++}}if(t.changeId!==void 0){let v=t.changeId;if(typeof v=="string"){if(!bh.test(v)){let _={instancePath:a+"/changeId",schemaPath:"#/properties/changeId/pattern",keyword:"pattern",params:{pattern:"^change[-:]"},message:\'must match pattern "^change[-:]"\'};e===null?e=[_]:e.push(_),n++}}else{let _={instancePath:a+"/changeId",schemaPath:"#/properties/changeId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),n++}}if(t.viewState!==void 0){let v=t.viewState;if(!(v==="unseen"||v==="viewed"||v==="stale")){let _={instancePath:a+"/viewState",schemaPath:"#/properties/viewState/enum",keyword:"enum",params:{allowedValues:Ma.properties.viewState.enum},message:"must be equal to one of the allowed values"};e===null?e=[_]:e.push(_),n++}}if(t.judgmentState!==void 0){let v=t.judgmentState;if(!(v==="unreviewed"||v==="reviewed"||v==="follow-up"||v==="blocked"||v==="stale")){let _={instancePath:a+"/judgmentState",schemaPath:"#/properties/judgmentState/enum",keyword:"enum",params:{allowedValues:Ma.properties.judgmentState.enum},message:"must be equal to one of the allowed values"};e===null?e=[_]:e.push(_),n++}}if(t.threadId!==void 0){let v=t.threadId;if(typeof v=="string"){if(Je(v)>256){let _={instancePath:a+"/threadId",schemaPath:"#/properties/threadId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[_]:e.push(_),n++}if(!qs.test(v)){let _={instancePath:a+"/threadId",schemaPath:"#/properties/threadId/pattern",keyword:"pattern",params:{pattern:"^thread[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^thread[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[_]:e.push(_),n++}}else{let _={instancePath:a+"/threadId",schemaPath:"#/properties/threadId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),n++}}if(t.messageId!==void 0){let v=t.messageId;if(typeof v=="string"){if(Je(v)>256){let _={instancePath:a+"/messageId",schemaPath:"#/properties/messageId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[_]:e.push(_),n++}if(!rd.test(v)){let _={instancePath:a+"/messageId",schemaPath:"#/properties/messageId/pattern",keyword:"pattern",params:{pattern:"^message[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^message[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[_]:e.push(_),n++}}else{let _={instancePath:a+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),n++}}if(t.sourceReportId!==void 0){let v=t.sourceReportId;if(typeof v=="string"){if(Je(v)>256){let _={instancePath:a+"/sourceReportId",schemaPath:"#/properties/sourceReportId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[_]:e.push(_),n++}if(!$s.test(v)){let _={instancePath:a+"/sourceReportId",schemaPath:"#/properties/sourceReportId/pattern",keyword:"pattern",params:{pattern:"^report[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^report[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[_]:e.push(_),n++}}else{let _={instancePath:a+"/sourceReportId",schemaPath:"#/properties/sourceReportId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),n++}}if(t.attentionState!==void 0){let v=t.attentionState;if(!(v==="none"||v==="requested"||v==="batched"||v==="submitted"||v==="acknowledged"||v==="answered"||v==="stale")){let _={instancePath:a+"/attentionState",schemaPath:"#/properties/attentionState/enum",keyword:"enum",params:{allowedValues:Ma.properties.attentionState.enum},message:"must be equal to one of the allowed values"};e===null?e=[_]:e.push(_),n++}}if(t.batchId!==void 0){let v=t.batchId;if(typeof v=="string"){if(Je(v)>256){let _={instancePath:a+"/batchId",schemaPath:"#/properties/batchId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[_]:e.push(_),n++}if(!ad.test(v)){let _={instancePath:a+"/batchId",schemaPath:"#/properties/batchId/pattern",keyword:"pattern",params:{pattern:"^fb[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^fb[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[_]:e.push(_),n++}}else{let _={instancePath:a+"/batchId",schemaPath:"#/properties/batchId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),n++}}if(t.threadIds!==void 0){let v=t.threadIds;if(Array.isArray(v)){if(v.length>20){let le={instancePath:a+"/threadIds",schemaPath:"#/properties/threadIds/maxItems",keyword:"maxItems",params:{limit:20},message:"must NOT have more than 20 items"};e===null?e=[le]:e.push(le),n++}let _=v.length;for(let le=0;le<_;le++){let Ye=v[le];if(typeof Ye=="string"){if(Je(Ye)>256){let J={instancePath:a+"/threadIds/"+le,schemaPath:"#/properties/threadIds/items/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[J]:e.push(J),n++}if(!qs.test(Ye)){let J={instancePath:a+"/threadIds/"+le,schemaPath:"#/properties/threadIds/items/pattern",keyword:"pattern",params:{pattern:"^thread[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^thread[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[J]:e.push(J),n++}}else{let J={instancePath:a+"/threadIds/"+le,schemaPath:"#/properties/threadIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[J]:e.push(J),n++}}let P=v.length,U;if(P>1){let le={};for(;P--;){let Ye=v[P];if(typeof Ye=="string"){if(typeof le[Ye]=="number"){U=le[Ye];let J={instancePath:a+"/threadIds",schemaPath:"#/properties/threadIds/uniqueItems",keyword:"uniqueItems",params:{i:P,j:U},message:"must NOT have duplicate items (items ## "+U+" and "+P+" are identical)"};e===null?e=[J]:e.push(J),n++;break}le[Ye]=P}}}}else{let _={instancePath:a+"/threadIds",schemaPath:"#/properties/threadIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[_]:e.push(_),n++}}if(t.itemIds!==void 0){let v=t.itemIds;if(Array.isArray(v)){if(v.length>20){let le={instancePath:a+"/itemIds",schemaPath:"#/properties/itemIds/maxItems",keyword:"maxItems",params:{limit:20},message:"must NOT have more than 20 items"};e===null?e=[le]:e.push(le),n++}let _=v.length;for(let le=0;le<_;le++){let Ye=v[le];if(typeof Ye=="string"){if(Je(Ye)>256){let J={instancePath:a+"/itemIds/"+le,schemaPath:"#/properties/itemIds/items/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[J]:e.push(J),n++}if(!sd.test(Ye)){let J={instancePath:a+"/itemIds/"+le,schemaPath:"#/properties/itemIds/items/pattern",keyword:"pattern",params:{pattern:"^item[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^item[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[J]:e.push(J),n++}}else{let J={instancePath:a+"/itemIds/"+le,schemaPath:"#/properties/itemIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[J]:e.push(J),n++}}let P=v.length,U;if(P>1){let le={};for(;P--;){let Ye=v[P];if(typeof Ye=="string"){if(typeof le[Ye]=="number"){U=le[Ye];let J={instancePath:a+"/itemIds",schemaPath:"#/properties/itemIds/uniqueItems",keyword:"uniqueItems",params:{i:P,j:U},message:"must NOT have duplicate items (items ## "+U+" and "+P+" are identical)"};e===null?e=[J]:e.push(J),n++;break}le[Ye]=P}}}}else{let _={instancePath:a+"/itemIds",schemaPath:"#/properties/itemIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[_]:e.push(_),n++}}if(t.itemCount!==void 0){let v=t.itemCount;if(!(typeof v=="number"&&!(v%1)&&!isNaN(v))){let _={instancePath:a+"/itemCount",schemaPath:"#/properties/itemCount/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[_]:e.push(_),n++}if(typeof v=="number"){if(v>20||isNaN(v)){let _={instancePath:a+"/itemCount",schemaPath:"#/properties/itemCount/maximum",keyword:"maximum",params:{comparison:"<=",limit:20},message:"must be <= 20"};e===null?e=[_]:e.push(_),n++}if(v<1||isNaN(v)){let _={instancePath:a+"/itemCount",schemaPath:"#/properties/itemCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[_]:e.push(_),n++}}}if(t.deliveryMode!==void 0){let v=t.deliveryMode;if(!(v==="direct-same-session"||v==="return-to-session"||v==="export-only")){let _={instancePath:a+"/deliveryMode",schemaPath:"#/properties/deliveryMode/enum",keyword:"enum",params:{allowedValues:Ma.properties.deliveryMode.enum},message:"must be equal to one of the allowed values"};e===null?e=[_]:e.push(_),n++}}if(t.originSessionMatched!==void 0&&typeof t.originSessionMatched!="boolean"){let v={instancePath:a+"/originSessionMatched",schemaPath:"#/properties/originSessionMatched/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[v]:e.push(v),n++}}else{let v={instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),n++}return nd.errors=e,n===0}var Ph=id,Vn={properties:{schemaVersion:{const:"1.3"},reportId:{type:"string",pattern:"^report[-:][A-Za-z0-9._:-]+$",maxLength:256},reportFingerprint:{type:"string",pattern:"^[a-f0-9]{64}$"},revision:{type:"integer",minimum:0},updatedAt:{type:"string",format:"date-time"},viewed:{type:"object",additionalProperties:{type:"object",additionalProperties:!1,required:["anchor","state","updatedAt"],properties:{anchor:{$ref:"#/$defs/reviewAnchor"},state:{enum:["unseen","viewed","stale"]},updatedAt:{type:"string",format:"date-time"}}}},judgments:{type:"object",additionalProperties:{type:"object",additionalProperties:!1,required:["changeId","state","updatedAt"],properties:{changeId:{type:"string"},state:{enum:["unreviewed","reviewed","follow-up","blocked","stale"]},updatedAt:{type:"string",format:"date-time"}}}},threadIds:{type:"array",items:{type:"string",pattern:"^thread[-:][A-Za-z0-9._:-]+$",maxLength:256},uniqueItems:!0},orphanedThreadIds:{type:"array",items:{type:"string",pattern:"^thread[-:][A-Za-z0-9._:-]+$",maxLength:256},uniqueItems:!0}}},Fn={properties:{type:{enum:["change","file","hunk","line-range","visual-target","visual-region","finding","verification-gap"]},ref:{type:"string",minLength:1},path:{type:"string"},side:{enum:["before","after","diff"]},startLine:{type:"integer",minimum:1},endLine:{type:"integer",minimum:1},targetRef:{type:"string"},region:{$ref:"#/$defs/region"},selectorHint:{type:"string"},fingerprint:{type:"string",pattern:"^[a-f0-9]{64}$"}}};function en(t,{instancePath:a="",parentData:s,parentDataProperty:d,rootData:p=t}={}){let e=null,n=0;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property \'type\'"};e===null?e=[i]:e.push(i),n++}if(t.ref===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property \'ref\'"};e===null?e=[i]:e.push(i),n++}if(t.fingerprint===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fingerprint"},message:"must have required property \'fingerprint\'"};e===null?e=[i]:e.push(i),n++}for(let i in t)if(!Na.call(Fn.properties,i)){let o={instancePath:a,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[o]:e.push(o),n++}if(t.type!==void 0){let i=t.type;if(!(i==="change"||i==="file"||i==="hunk"||i==="line-range"||i==="visual-target"||i==="visual-region"||i==="finding"||i==="verification-gap")){let o={instancePath:a+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Fn.properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[o]:e.push(o),n++}}if(t.ref!==void 0){let i=t.ref;if(typeof i=="string"){if(Je(i)<1){let o={instancePath:a+"/ref",schemaPath:"#/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/ref",schemaPath:"#/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}if(t.path!==void 0&&typeof t.path!="string"){let i={instancePath:a+"/path",schemaPath:"#/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}if(t.side!==void 0){let i=t.side;if(!(i==="before"||i==="after"||i==="diff")){let o={instancePath:a+"/side",schemaPath:"#/properties/side/enum",keyword:"enum",params:{allowedValues:Fn.properties.side.enum},message:"must be equal to one of the allowed values"};e===null?e=[o]:e.push(o),n++}}if(t.startLine!==void 0){let i=t.startLine;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let o={instancePath:a+"/startLine",schemaPath:"#/properties/startLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[o]:e.push(o),n++}if(typeof i=="number"&&(i<1||isNaN(i))){let o={instancePath:a+"/startLine",schemaPath:"#/properties/startLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[o]:e.push(o),n++}}if(t.endLine!==void 0){let i=t.endLine;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let o={instancePath:a+"/endLine",schemaPath:"#/properties/endLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[o]:e.push(o),n++}if(typeof i=="number"&&(i<1||isNaN(i))){let o={instancePath:a+"/endLine",schemaPath:"#/properties/endLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[o]:e.push(o),n++}}if(t.targetRef!==void 0&&typeof t.targetRef!="string"){let i={instancePath:a+"/targetRef",schemaPath:"#/properties/targetRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}if(t.region!==void 0){let i=t.region;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.x===void 0){let o={instancePath:a+"/region",schemaPath:"#/$defs/region/required",keyword:"required",params:{missingProperty:"x"},message:"must have required property \'x\'"};e===null?e=[o]:e.push(o),n++}if(i.y===void 0){let o={instancePath:a+"/region",schemaPath:"#/$defs/region/required",keyword:"required",params:{missingProperty:"y"},message:"must have required property \'y\'"};e===null?e=[o]:e.push(o),n++}if(i.width===void 0){let o={instancePath:a+"/region",schemaPath:"#/$defs/region/required",keyword:"required",params:{missingProperty:"width"},message:"must have required property \'width\'"};e===null?e=[o]:e.push(o),n++}if(i.height===void 0){let o={instancePath:a+"/region",schemaPath:"#/$defs/region/required",keyword:"required",params:{missingProperty:"height"},message:"must have required property \'height\'"};e===null?e=[o]:e.push(o),n++}for(let o in i)if(!(o==="x"||o==="y"||o==="width"||o==="height")){let l={instancePath:a+"/region",schemaPath:"#/$defs/region/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),n++}if(i.x!==void 0){let o=i.x;if(typeof o=="number"){if(o>1||isNaN(o)){let l={instancePath:a+"/region/x",schemaPath:"#/$defs/region/properties/x/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),n++}if(o<0||isNaN(o)){let l={instancePath:a+"/region/x",schemaPath:"#/$defs/region/properties/x/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),n++}}else{let l={instancePath:a+"/region/x",schemaPath:"#/$defs/region/properties/x/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),n++}}if(i.y!==void 0){let o=i.y;if(typeof o=="number"){if(o>1||isNaN(o)){let l={instancePath:a+"/region/y",schemaPath:"#/$defs/region/properties/y/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),n++}if(o<0||isNaN(o)){let l={instancePath:a+"/region/y",schemaPath:"#/$defs/region/properties/y/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),n++}}else{let l={instancePath:a+"/region/y",schemaPath:"#/$defs/region/properties/y/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),n++}}if(i.width!==void 0){let o=i.width;if(typeof o=="number"){if(o>1||isNaN(o)){let l={instancePath:a+"/region/width",schemaPath:"#/$defs/region/properties/width/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),n++}if(o<=0||isNaN(o)){let l={instancePath:a+"/region/width",schemaPath:"#/$defs/region/properties/width/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[l]:e.push(l),n++}}else{let l={instancePath:a+"/region/width",schemaPath:"#/$defs/region/properties/width/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),n++}}if(i.height!==void 0){let o=i.height;if(typeof o=="number"){if(o>1||isNaN(o)){let l={instancePath:a+"/region/height",schemaPath:"#/$defs/region/properties/height/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),n++}if(o<=0||isNaN(o)){let l={instancePath:a+"/region/height",schemaPath:"#/$defs/region/properties/height/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[l]:e.push(l),n++}}else{let l={instancePath:a+"/region/height",schemaPath:"#/$defs/region/properties/height/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),n++}}}else{let o={instancePath:a+"/region",schemaPath:"#/$defs/region/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),n++}}if(t.selectorHint!==void 0&&typeof t.selectorHint!="string"){let i={instancePath:a+"/selectorHint",schemaPath:"#/properties/selectorHint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}if(t.fingerprint!==void 0){let i=t.fingerprint;if(typeof i=="string"){if(!Ua.test(i)){let o={instancePath:a+"/fingerprint",schemaPath:"#/properties/fingerprint/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:\'must match pattern "^[a-f0-9]{64}$"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/fingerprint",schemaPath:"#/properties/fingerprint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}}else{let i={instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),n++}return en.errors=e,n===0}function id(t,{instancePath:a="",parentData:s,parentDataProperty:d,rootData:p=t}={}){let e=null,n=0;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.schemaVersion===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property \'schemaVersion\'"};e===null?e=[i]:e.push(i),n++}if(t.reportId===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"reportId"},message:"must have required property \'reportId\'"};e===null?e=[i]:e.push(i),n++}if(t.reportFingerprint===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"reportFingerprint"},message:"must have required property \'reportFingerprint\'"};e===null?e=[i]:e.push(i),n++}if(t.revision===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"revision"},message:"must have required property \'revision\'"};e===null?e=[i]:e.push(i),n++}if(t.updatedAt===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property \'updatedAt\'"};e===null?e=[i]:e.push(i),n++}if(t.viewed===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"viewed"},message:"must have required property \'viewed\'"};e===null?e=[i]:e.push(i),n++}if(t.judgments===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"judgments"},message:"must have required property \'judgments\'"};e===null?e=[i]:e.push(i),n++}if(t.threadIds===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"threadIds"},message:"must have required property \'threadIds\'"};e===null?e=[i]:e.push(i),n++}if(t.orphanedThreadIds===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"orphanedThreadIds"},message:"must have required property \'orphanedThreadIds\'"};e===null?e=[i]:e.push(i),n++}for(let i in t)if(!Na.call(Vn.properties,i)){let o={instancePath:a,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[o]:e.push(o),n++}if(t.schemaVersion!==void 0&&t.schemaVersion!=="1.3"){let i={instancePath:a+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:"1.3"},message:"must be equal to constant"};e===null?e=[i]:e.push(i),n++}if(t.reportId!==void 0){let i=t.reportId;if(typeof i=="string"){if(Je(i)>256){let o={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[o]:e.push(o),n++}if(!$s.test(i)){let o={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/pattern",keyword:"pattern",params:{pattern:"^report[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^report[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}if(t.reportFingerprint!==void 0){let i=t.reportFingerprint;if(typeof i=="string"){if(!Ua.test(i)){let o={instancePath:a+"/reportFingerprint",schemaPath:"#/properties/reportFingerprint/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:\'must match pattern "^[a-f0-9]{64}$"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/reportFingerprint",schemaPath:"#/properties/reportFingerprint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}if(t.revision!==void 0){let i=t.revision;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let o={instancePath:a+"/revision",schemaPath:"#/properties/revision/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[o]:e.push(o),n++}if(typeof i=="number"&&(i<0||isNaN(i))){let o={instancePath:a+"/revision",schemaPath:"#/properties/revision/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[o]:e.push(o),n++}}if(t.updatedAt!==void 0){let i=t.updatedAt;if(typeof i=="string"){if(!ra.validate(i)){let o={instancePath:a+"/updatedAt",schemaPath:"#/properties/updatedAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/updatedAt",schemaPath:"#/properties/updatedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}if(t.viewed!==void 0){let i=t.viewed;if(i&&typeof i=="object"&&!Array.isArray(i))for(let o in i){let l=i[o];if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.anchor===void 0){let m={instancePath:a+"/viewed/"+o.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/viewed/additionalProperties/required",keyword:"required",params:{missingProperty:"anchor"},message:"must have required property \'anchor\'"};e===null?e=[m]:e.push(m),n++}if(l.state===void 0){let m={instancePath:a+"/viewed/"+o.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/viewed/additionalProperties/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property \'state\'"};e===null?e=[m]:e.push(m),n++}if(l.updatedAt===void 0){let m={instancePath:a+"/viewed/"+o.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/viewed/additionalProperties/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property \'updatedAt\'"};e===null?e=[m]:e.push(m),n++}for(let m in l)if(!(m==="anchor"||m==="state"||m==="updatedAt")){let u={instancePath:a+"/viewed/"+o.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/viewed/additionalProperties/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[u]:e.push(u),n++}if(l.anchor!==void 0&&(en(l.anchor,{instancePath:a+"/viewed/"+o.replace(/~/g,"~0").replace(/\\//g,"~1")+"/anchor",parentData:l,parentDataProperty:"anchor",rootData:p})||(e=e===null?en.errors:e.concat(en.errors),n=e.length)),l.state!==void 0){let m=l.state;if(!(m==="unseen"||m==="viewed"||m==="stale")){let u={instancePath:a+"/viewed/"+o.replace(/~/g,"~0").replace(/\\//g,"~1")+"/state",schemaPath:"#/properties/viewed/additionalProperties/properties/state/enum",keyword:"enum",params:{allowedValues:Vn.properties.viewed.additionalProperties.properties.state.enum},message:"must be equal to one of the allowed values"};e===null?e=[u]:e.push(u),n++}}if(l.updatedAt!==void 0){let m=l.updatedAt;if(typeof m=="string"){if(!ra.validate(m)){let u={instancePath:a+"/viewed/"+o.replace(/~/g,"~0").replace(/\\//g,"~1")+"/updatedAt",schemaPath:"#/properties/viewed/additionalProperties/properties/updatedAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[u]:e.push(u),n++}}else{let u={instancePath:a+"/viewed/"+o.replace(/~/g,"~0").replace(/\\//g,"~1")+"/updatedAt",schemaPath:"#/properties/viewed/additionalProperties/properties/updatedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[u]:e.push(u),n++}}}else{let m={instancePath:a+"/viewed/"+o.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/viewed/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),n++}}else{let o={instancePath:a+"/viewed",schemaPath:"#/properties/viewed/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),n++}}if(t.judgments!==void 0){let i=t.judgments;if(i&&typeof i=="object"&&!Array.isArray(i))for(let o in i){let l=i[o];if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.changeId===void 0){let m={instancePath:a+"/judgments/"+o.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/judgments/additionalProperties/required",keyword:"required",params:{missingProperty:"changeId"},message:"must have required property \'changeId\'"};e===null?e=[m]:e.push(m),n++}if(l.state===void 0){let m={instancePath:a+"/judgments/"+o.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/judgments/additionalProperties/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property \'state\'"};e===null?e=[m]:e.push(m),n++}if(l.updatedAt===void 0){let m={instancePath:a+"/judgments/"+o.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/judgments/additionalProperties/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property \'updatedAt\'"};e===null?e=[m]:e.push(m),n++}for(let m in l)if(!(m==="changeId"||m==="state"||m==="updatedAt")){let u={instancePath:a+"/judgments/"+o.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/judgments/additionalProperties/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[u]:e.push(u),n++}if(l.changeId!==void 0&&typeof l.changeId!="string"){let m={instancePath:a+"/judgments/"+o.replace(/~/g,"~0").replace(/\\//g,"~1")+"/changeId",schemaPath:"#/properties/judgments/additionalProperties/properties/changeId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),n++}if(l.state!==void 0){let m=l.state;if(!(m==="unreviewed"||m==="reviewed"||m==="follow-up"||m==="blocked"||m==="stale")){let u={instancePath:a+"/judgments/"+o.replace(/~/g,"~0").replace(/\\//g,"~1")+"/state",schemaPath:"#/properties/judgments/additionalProperties/properties/state/enum",keyword:"enum",params:{allowedValues:Vn.properties.judgments.additionalProperties.properties.state.enum},message:"must be equal to one of the allowed values"};e===null?e=[u]:e.push(u),n++}}if(l.updatedAt!==void 0){let m=l.updatedAt;if(typeof m=="string"){if(!ra.validate(m)){let u={instancePath:a+"/judgments/"+o.replace(/~/g,"~0").replace(/\\//g,"~1")+"/updatedAt",schemaPath:"#/properties/judgments/additionalProperties/properties/updatedAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[u]:e.push(u),n++}}else{let u={instancePath:a+"/judgments/"+o.replace(/~/g,"~0").replace(/\\//g,"~1")+"/updatedAt",schemaPath:"#/properties/judgments/additionalProperties/properties/updatedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[u]:e.push(u),n++}}}else{let m={instancePath:a+"/judgments/"+o.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/judgments/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),n++}}else{let o={instancePath:a+"/judgments",schemaPath:"#/properties/judgments/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),n++}}if(t.threadIds!==void 0){let i=t.threadIds;if(Array.isArray(i)){let o=i.length;for(let u=0;u<o;u++){let f=i[u];if(typeof f=="string"){if(Je(f)>256){let b={instancePath:a+"/threadIds/"+u,schemaPath:"#/properties/threadIds/items/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[b]:e.push(b),n++}if(!qs.test(f)){let b={instancePath:a+"/threadIds/"+u,schemaPath:"#/properties/threadIds/items/pattern",keyword:"pattern",params:{pattern:"^thread[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^thread[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/threadIds/"+u,schemaPath:"#/properties/threadIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}}let l=i.length,m;if(l>1){let u={};for(;l--;){let f=i[l];if(typeof f=="string"){if(typeof u[f]=="number"){m=u[f];let b={instancePath:a+"/threadIds",schemaPath:"#/properties/threadIds/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[b]:e.push(b),n++;break}u[f]=l}}}}else{let o={instancePath:a+"/threadIds",schemaPath:"#/properties/threadIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),n++}}if(t.orphanedThreadIds!==void 0){let i=t.orphanedThreadIds;if(Array.isArray(i)){let o=i.length;for(let u=0;u<o;u++){let f=i[u];if(typeof f=="string"){if(Je(f)>256){let b={instancePath:a+"/orphanedThreadIds/"+u,schemaPath:"#/properties/orphanedThreadIds/items/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[b]:e.push(b),n++}if(!qs.test(f)){let b={instancePath:a+"/orphanedThreadIds/"+u,schemaPath:"#/properties/orphanedThreadIds/items/pattern",keyword:"pattern",params:{pattern:"^thread[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^thread[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/orphanedThreadIds/"+u,schemaPath:"#/properties/orphanedThreadIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}}let l=i.length,m;if(l>1){let u={};for(;l--;){let f=i[l];if(typeof f=="string"){if(typeof u[f]=="number"){m=u[f];let b={instancePath:a+"/orphanedThreadIds",schemaPath:"#/properties/orphanedThreadIds/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[b]:e.push(b),n++;break}u[f]=l}}}}else{let o={instancePath:a+"/orphanedThreadIds",schemaPath:"#/properties/orphanedThreadIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),n++}}}else{let i={instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),n++}return id.errors=e,n===0}var kh=od,Zs={properties:{id:{type:"string",pattern:"^thread[-:][A-Za-z0-9._:-]+$",maxLength:256},reportId:{type:"string",pattern:"^report[-:][A-Za-z0-9._:-]+$",maxLength:256},anchor:{$ref:"#/$defs/reviewAnchor"},kind:{enum:["note","question","finding","change-request"]},state:{enum:["open","answered","resolved","stale","orphaned"]},messages:{type:"array",items:{$ref:"#/$defs/message"}},agentAttention:{type:"object",additionalProperties:!1,required:["state"],properties:{state:{enum:["none","requested","batched","submitted","acknowledged","answered","stale"]},batchId:{type:"string",pattern:"^fb[-:][A-Za-z0-9._:-]+$",maxLength:256},updatedAt:{type:"string",format:"date-time"}}},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"}}},Dn={properties:{type:{enum:["change","file","hunk","line-range","visual-target","visual-region","finding","verification-gap"]},ref:{type:"string"},path:{type:"string"},side:{enum:["before","after","diff"]},startLine:{type:"integer",minimum:1},endLine:{type:"integer",minimum:1},targetRef:{type:"string"},region:{type:"object",additionalProperties:!1,required:["x","y","width","height"],properties:{x:{type:"number",minimum:0,maximum:1},y:{type:"number",minimum:0,maximum:1},width:{type:"number",exclusiveMinimum:0,maximum:1},height:{type:"number",exclusiveMinimum:0,maximum:1}}},selectorHint:{type:"string"},fingerprint:{type:"string",pattern:"^[a-f0-9]{64}$"}}},el={properties:{kind:{enum:["human-note","agent-answer","system"]},author:{properties:{type:{enum:["human","agent","system"]}}}}};function od(t,{instancePath:a="",parentData:s,parentDataProperty:d,rootData:p=t}={}){let e=null,n=0;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.id===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property \'id\'"};e===null?e=[i]:e.push(i),n++}if(t.reportId===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"reportId"},message:"must have required property \'reportId\'"};e===null?e=[i]:e.push(i),n++}if(t.anchor===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"anchor"},message:"must have required property \'anchor\'"};e===null?e=[i]:e.push(i),n++}if(t.kind===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"kind"},message:"must have required property \'kind\'"};e===null?e=[i]:e.push(i),n++}if(t.state===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property \'state\'"};e===null?e=[i]:e.push(i),n++}if(t.messages===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property \'messages\'"};e===null?e=[i]:e.push(i),n++}if(t.agentAttention===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"agentAttention"},message:"must have required property \'agentAttention\'"};e===null?e=[i]:e.push(i),n++}if(t.createdAt===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property \'createdAt\'"};e===null?e=[i]:e.push(i),n++}if(t.updatedAt===void 0){let i={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property \'updatedAt\'"};e===null?e=[i]:e.push(i),n++}for(let i in t)if(!Na.call(Zs.properties,i)){let o={instancePath:a,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[o]:e.push(o),n++}if(t.id!==void 0){let i=t.id;if(typeof i=="string"){if(Je(i)>256){let o={instancePath:a+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[o]:e.push(o),n++}if(!qs.test(i)){let o={instancePath:a+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^thread[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^thread[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}if(t.reportId!==void 0){let i=t.reportId;if(typeof i=="string"){if(Je(i)>256){let o={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[o]:e.push(o),n++}if(!$s.test(i)){let o={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/pattern",keyword:"pattern",params:{pattern:"^report[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^report[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}if(t.anchor!==void 0){let i=t.anchor;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let o={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property \'type\'"};e===null?e=[o]:e.push(o),n++}if(i.ref===void 0){let o={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property \'ref\'"};e===null?e=[o]:e.push(o),n++}if(i.fingerprint===void 0){let o={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"fingerprint"},message:"must have required property \'fingerprint\'"};e===null?e=[o]:e.push(o),n++}for(let o in i)if(!Na.call(Dn.properties,o)){let l={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),n++}if(i.type!==void 0){let o=i.type;if(!(o==="change"||o==="file"||o==="hunk"||o==="line-range"||o==="visual-target"||o==="visual-region"||o==="finding"||o==="verification-gap")){let l={instancePath:a+"/anchor/type",schemaPath:"#/$defs/reviewAnchor/properties/type/enum",keyword:"enum",params:{allowedValues:Dn.properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[l]:e.push(l),n++}}if(i.ref!==void 0&&typeof i.ref!="string"){let o={instancePath:a+"/anchor/ref",schemaPath:"#/$defs/reviewAnchor/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}if(i.path!==void 0&&typeof i.path!="string"){let o={instancePath:a+"/anchor/path",schemaPath:"#/$defs/reviewAnchor/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}if(i.side!==void 0){let o=i.side;if(!(o==="before"||o==="after"||o==="diff")){let l={instancePath:a+"/anchor/side",schemaPath:"#/$defs/reviewAnchor/properties/side/enum",keyword:"enum",params:{allowedValues:Dn.properties.side.enum},message:"must be equal to one of the allowed values"};e===null?e=[l]:e.push(l),n++}}if(i.startLine!==void 0){let o=i.startLine;if(!(typeof o=="number"&&!(o%1)&&!isNaN(o))){let l={instancePath:a+"/anchor/startLine",schemaPath:"#/$defs/reviewAnchor/properties/startLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[l]:e.push(l),n++}if(typeof o=="number"&&(o<1||isNaN(o))){let l={instancePath:a+"/anchor/startLine",schemaPath:"#/$defs/reviewAnchor/properties/startLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[l]:e.push(l),n++}}if(i.endLine!==void 0){let o=i.endLine;if(!(typeof o=="number"&&!(o%1)&&!isNaN(o))){let l={instancePath:a+"/anchor/endLine",schemaPath:"#/$defs/reviewAnchor/properties/endLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[l]:e.push(l),n++}if(typeof o=="number"&&(o<1||isNaN(o))){let l={instancePath:a+"/anchor/endLine",schemaPath:"#/$defs/reviewAnchor/properties/endLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[l]:e.push(l),n++}}if(i.targetRef!==void 0&&typeof i.targetRef!="string"){let o={instancePath:a+"/anchor/targetRef",schemaPath:"#/$defs/reviewAnchor/properties/targetRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}if(i.region!==void 0){let o=i.region;if(o&&typeof o=="object"&&!Array.isArray(o)){if(o.x===void 0){let l={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"x"},message:"must have required property \'x\'"};e===null?e=[l]:e.push(l),n++}if(o.y===void 0){let l={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"y"},message:"must have required property \'y\'"};e===null?e=[l]:e.push(l),n++}if(o.width===void 0){let l={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"width"},message:"must have required property \'width\'"};e===null?e=[l]:e.push(l),n++}if(o.height===void 0){let l={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"height"},message:"must have required property \'height\'"};e===null?e=[l]:e.push(l),n++}for(let l in o)if(!(l==="x"||l==="y"||l==="width"||l==="height")){let m={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[m]:e.push(m),n++}if(o.x!==void 0){let l=o.x;if(typeof l=="number"){if(l>1||isNaN(l)){let m={instancePath:a+"/anchor/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[m]:e.push(m),n++}if(l<0||isNaN(l)){let m={instancePath:a+"/anchor/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[m]:e.push(m),n++}}else{let m={instancePath:a+"/anchor/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[m]:e.push(m),n++}}if(o.y!==void 0){let l=o.y;if(typeof l=="number"){if(l>1||isNaN(l)){let m={instancePath:a+"/anchor/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[m]:e.push(m),n++}if(l<0||isNaN(l)){let m={instancePath:a+"/anchor/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[m]:e.push(m),n++}}else{let m={instancePath:a+"/anchor/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[m]:e.push(m),n++}}if(o.width!==void 0){let l=o.width;if(typeof l=="number"){if(l>1||isNaN(l)){let m={instancePath:a+"/anchor/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[m]:e.push(m),n++}if(l<=0||isNaN(l)){let m={instancePath:a+"/anchor/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[m]:e.push(m),n++}}else{let m={instancePath:a+"/anchor/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[m]:e.push(m),n++}}if(o.height!==void 0){let l=o.height;if(typeof l=="number"){if(l>1||isNaN(l)){let m={instancePath:a+"/anchor/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[m]:e.push(m),n++}if(l<=0||isNaN(l)){let m={instancePath:a+"/anchor/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[m]:e.push(m),n++}}else{let m={instancePath:a+"/anchor/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[m]:e.push(m),n++}}}else{let l={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),n++}}if(i.selectorHint!==void 0&&typeof i.selectorHint!="string"){let o={instancePath:a+"/anchor/selectorHint",schemaPath:"#/$defs/reviewAnchor/properties/selectorHint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}if(i.fingerprint!==void 0){let o=i.fingerprint;if(typeof o=="string"){if(!Ua.test(o)){let l={instancePath:a+"/anchor/fingerprint",schemaPath:"#/$defs/reviewAnchor/properties/fingerprint/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:\'must match pattern "^[a-f0-9]{64}$"\'};e===null?e=[l]:e.push(l),n++}}else{let l={instancePath:a+"/anchor/fingerprint",schemaPath:"#/$defs/reviewAnchor/properties/fingerprint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),n++}}}else{let o={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),n++}}if(t.kind!==void 0){let i=t.kind;if(!(i==="note"||i==="question"||i==="finding"||i==="change-request")){let o={instancePath:a+"/kind",schemaPath:"#/properties/kind/enum",keyword:"enum",params:{allowedValues:Zs.properties.kind.enum},message:"must be equal to one of the allowed values"};e===null?e=[o]:e.push(o),n++}}if(t.state!==void 0){let i=t.state;if(!(i==="open"||i==="answered"||i==="resolved"||i==="stale"||i==="orphaned")){let o={instancePath:a+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:Zs.properties.state.enum},message:"must be equal to one of the allowed values"};e===null?e=[o]:e.push(o),n++}}if(t.messages!==void 0){let i=t.messages;if(Array.isArray(i)){let o=i.length;for(let l=0;l<o;l++){let m=i[l];if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.id===void 0){let u={instancePath:a+"/messages/"+l,schemaPath:"#/$defs/message/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property \'id\'"};e===null?e=[u]:e.push(u),n++}if(m.kind===void 0){let u={instancePath:a+"/messages/"+l,schemaPath:"#/$defs/message/required",keyword:"required",params:{missingProperty:"kind"},message:"must have required property \'kind\'"};e===null?e=[u]:e.push(u),n++}if(m.author===void 0){let u={instancePath:a+"/messages/"+l,schemaPath:"#/$defs/message/required",keyword:"required",params:{missingProperty:"author"},message:"must have required property \'author\'"};e===null?e=[u]:e.push(u),n++}if(m.body===void 0){let u={instancePath:a+"/messages/"+l,schemaPath:"#/$defs/message/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property \'body\'"};e===null?e=[u]:e.push(u),n++}if(m.createdAt===void 0){let u={instancePath:a+"/messages/"+l,schemaPath:"#/$defs/message/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property \'createdAt\'"};e===null?e=[u]:e.push(u),n++}for(let u in m)if(!(u==="id"||u==="kind"||u==="author"||u==="body"||u==="feedbackItemId"||u==="evidenceRefs"||u==="createdAt")){let f={instancePath:a+"/messages/"+l,schemaPath:"#/$defs/message/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:u},message:"must NOT have additional properties"};e===null?e=[f]:e.push(f),n++}if(m.id!==void 0){let u=m.id;if(typeof u=="string"){if(Je(u)>256){let f={instancePath:a+"/messages/"+l+"/id",schemaPath:"#/$defs/message/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[f]:e.push(f),n++}if(!rd.test(u)){let f={instancePath:a+"/messages/"+l+"/id",schemaPath:"#/$defs/message/properties/id/pattern",keyword:"pattern",params:{pattern:"^message[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^message[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[f]:e.push(f),n++}}else{let f={instancePath:a+"/messages/"+l+"/id",schemaPath:"#/$defs/message/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),n++}}if(m.kind!==void 0){let u=m.kind;if(!(u==="human-note"||u==="agent-answer"||u==="system")){let f={instancePath:a+"/messages/"+l+"/kind",schemaPath:"#/$defs/message/properties/kind/enum",keyword:"enum",params:{allowedValues:el.properties.kind.enum},message:"must be equal to one of the allowed values"};e===null?e=[f]:e.push(f),n++}}if(m.author!==void 0){let u=m.author;if(u&&typeof u=="object"&&!Array.isArray(u)){if(u.type===void 0){let f={instancePath:a+"/messages/"+l+"/author",schemaPath:"#/$defs/message/properties/author/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property \'type\'"};e===null?e=[f]:e.push(f),n++}if(u.label===void 0){let f={instancePath:a+"/messages/"+l+"/author",schemaPath:"#/$defs/message/properties/author/required",keyword:"required",params:{missingProperty:"label"},message:"must have required property \'label\'"};e===null?e=[f]:e.push(f),n++}for(let f in u)if(!(f==="type"||f==="label")){let b={instancePath:a+"/messages/"+l+"/author",schemaPath:"#/$defs/message/properties/author/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),n++}if(u.type!==void 0){let f=u.type;if(!(f==="human"||f==="agent"||f==="system")){let b={instancePath:a+"/messages/"+l+"/author/type",schemaPath:"#/$defs/message/properties/author/properties/type/enum",keyword:"enum",params:{allowedValues:el.properties.author.properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),n++}}if(u.label!==void 0&&typeof u.label!="string"){let f={instancePath:a+"/messages/"+l+"/author/label",schemaPath:"#/$defs/message/properties/author/properties/label/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),n++}}else{let f={instancePath:a+"/messages/"+l+"/author",schemaPath:"#/$defs/message/properties/author/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),n++}}if(m.body!==void 0){let u=m.body;if(typeof u=="string"){if(Je(u)>16384){let f={instancePath:a+"/messages/"+l+"/body",schemaPath:"#/$defs/message/properties/body/maxLength",keyword:"maxLength",params:{limit:16384},message:"must NOT have more than 16384 characters"};e===null?e=[f]:e.push(f),n++}if(Je(u)<1){let f={instancePath:a+"/messages/"+l+"/body",schemaPath:"#/$defs/message/properties/body/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[f]:e.push(f),n++}}else{let f={instancePath:a+"/messages/"+l+"/body",schemaPath:"#/$defs/message/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),n++}}if(m.feedbackItemId!==void 0){let u=m.feedbackItemId;if(typeof u=="string"){if(Je(u)>256){let f={instancePath:a+"/messages/"+l+"/feedbackItemId",schemaPath:"#/$defs/message/properties/feedbackItemId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[f]:e.push(f),n++}if(!sd.test(u)){let f={instancePath:a+"/messages/"+l+"/feedbackItemId",schemaPath:"#/$defs/message/properties/feedbackItemId/pattern",keyword:"pattern",params:{pattern:"^item[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^item[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[f]:e.push(f),n++}}else{let f={instancePath:a+"/messages/"+l+"/feedbackItemId",schemaPath:"#/$defs/message/properties/feedbackItemId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),n++}}if(m.evidenceRefs!==void 0){let u=m.evidenceRefs;if(Array.isArray(u)){if(u.length>100){let O={instancePath:a+"/messages/"+l+"/evidenceRefs",schemaPath:"#/$defs/message/properties/evidenceRefs/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[O]:e.push(O),n++}let f=u.length;for(let O=0;O<f;O++)if(typeof u[O]!="string"){let S={instancePath:a+"/messages/"+l+"/evidenceRefs/"+O,schemaPath:"#/$defs/message/properties/evidenceRefs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[S]:e.push(S),n++}let b=u.length,R;if(b>1){let O={};for(;b--;){let S=u[b];if(typeof S=="string"){if(typeof O[S]=="number"){R=O[S];let G={instancePath:a+"/messages/"+l+"/evidenceRefs",schemaPath:"#/$defs/message/properties/evidenceRefs/uniqueItems",keyword:"uniqueItems",params:{i:b,j:R},message:"must NOT have duplicate items (items ## "+R+" and "+b+" are identical)"};e===null?e=[G]:e.push(G),n++;break}O[S]=b}}}}else{let f={instancePath:a+"/messages/"+l+"/evidenceRefs",schemaPath:"#/$defs/message/properties/evidenceRefs/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[f]:e.push(f),n++}}if(m.createdAt!==void 0){let u=m.createdAt;if(typeof u=="string"){if(!ra.validate(u)){let f={instancePath:a+"/messages/"+l+"/createdAt",schemaPath:"#/$defs/message/properties/createdAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[f]:e.push(f),n++}}else{let f={instancePath:a+"/messages/"+l+"/createdAt",schemaPath:"#/$defs/message/properties/createdAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),n++}}}else{let u={instancePath:a+"/messages/"+l,schemaPath:"#/$defs/message/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[u]:e.push(u),n++}}}else{let o={instancePath:a+"/messages",schemaPath:"#/properties/messages/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),n++}}if(t.agentAttention!==void 0){let i=t.agentAttention;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.state===void 0){let o={instancePath:a+"/agentAttention",schemaPath:"#/properties/agentAttention/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property \'state\'"};e===null?e=[o]:e.push(o),n++}for(let o in i)if(!(o==="state"||o==="batchId"||o==="updatedAt")){let l={instancePath:a+"/agentAttention",schemaPath:"#/properties/agentAttention/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),n++}if(i.state!==void 0){let o=i.state;if(!(o==="none"||o==="requested"||o==="batched"||o==="submitted"||o==="acknowledged"||o==="answered"||o==="stale")){let l={instancePath:a+"/agentAttention/state",schemaPath:"#/properties/agentAttention/properties/state/enum",keyword:"enum",params:{allowedValues:Zs.properties.agentAttention.properties.state.enum},message:"must be equal to one of the allowed values"};e===null?e=[l]:e.push(l),n++}}if(i.batchId!==void 0){let o=i.batchId;if(typeof o=="string"){if(Je(o)>256){let l={instancePath:a+"/agentAttention/batchId",schemaPath:"#/properties/agentAttention/properties/batchId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[l]:e.push(l),n++}if(!ad.test(o)){let l={instancePath:a+"/agentAttention/batchId",schemaPath:"#/properties/agentAttention/properties/batchId/pattern",keyword:"pattern",params:{pattern:"^fb[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^fb[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[l]:e.push(l),n++}}else{let l={instancePath:a+"/agentAttention/batchId",schemaPath:"#/properties/agentAttention/properties/batchId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),n++}}if(i.updatedAt!==void 0){let o=i.updatedAt;if(typeof o=="string"){if(!ra.validate(o)){let l={instancePath:a+"/agentAttention/updatedAt",schemaPath:"#/properties/agentAttention/properties/updatedAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[l]:e.push(l),n++}}else{let l={instancePath:a+"/agentAttention/updatedAt",schemaPath:"#/properties/agentAttention/properties/updatedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),n++}}}else{let o={instancePath:a+"/agentAttention",schemaPath:"#/properties/agentAttention/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),n++}}if(t.createdAt!==void 0){let i=t.createdAt;if(typeof i=="string"){if(!ra.validate(i)){let o={instancePath:a+"/createdAt",schemaPath:"#/properties/createdAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/createdAt",schemaPath:"#/properties/createdAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}if(t.updatedAt!==void 0){let i=t.updatedAt;if(typeof i=="string"){if(!ra.validate(i)){let o={instancePath:a+"/updatedAt",schemaPath:"#/properties/updatedAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/updatedAt",schemaPath:"#/properties/updatedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}}else{let i={instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),n++}return od.errors=e,n===0}const xh={"review-bundle":yh,"review-event":_h,"review-state":Ph,"review-thread":kh};function Ah(t){return`${t.instancePath||"/"} ${t.message??"is invalid"}`}function dn(t){return Array.isArray(t)?`[${t.map(dn).join(",")}]`:t&&typeof t=="object"?`{${Object.entries(t).sort(([a],[s])=>a.localeCompare(s)).map(([a,s])=>`${JSON.stringify(a)}:${dn(s)}`).join(",")}}`:JSON.stringify(t)??"null"}function ws(t,a){const s=xh[t],d=s(a);return{ok:!!d,errors:d?[]:(s.errors??[]).map(Ah)}}function ld(t){const a=ws("review-bundle",t);if(!a.ok)return a;const s=t,d=[],p=ws("review-state",s.state);d.push(...p.errors.map(u=>`state${u}`));for(const[u,f]of s.threads.entries()){const b=ws("review-thread",f);d.push(...b.errors.map(R=>`threads/${u}${R}`))}for(const[u,f]of s.events.entries()){const b=ws("review-event",f);d.push(...b.errors.map(R=>`events/${u}${R}`))}if(d.length>0)return{ok:!1,errors:d};s.state.reportId!==s.source.reportId&&d.push("state.reportId does not match source.reportId"),s.state.reportFingerprint!==s.source.reportFingerprint&&d.push("state.reportFingerprint does not match source.reportFingerprint");const e=s.threads.map(u=>u.id);new Set(e).size!==e.length&&d.push("threads contains duplicate IDs"),[...new Set(s.state.threadIds)].sort().join(`\n`)!==[...new Set(e)].sort().join(`\n`)&&d.push("state.threadIds does not match bundled threads");const n=new Set(s.state.orphanedThreadIds);for(const u of s.threads){u.reportId!==s.source.reportId&&d.push(`${u.id} reportId does not match source.reportId`),u.state==="orphaned"!==n.has(u.id)&&d.push(`${u.id} orphaned state is inconsistent`);for(const[f,b]of u.messages.entries()){const R=new TextEncoder().encode(b.body).byteLength;b.body.trim()||d.push(`${u.id}.messages/${f} body is empty`),R>16*1024&&d.push(`${u.id}.messages/${f} body exceeds 16 KiB`)}}for(const u of n)e.includes(u)||d.push(`orphaned thread is missing: ${u}`);const i=s.events.map(u=>u.id);new Set(i).size!==i.length&&d.push("events contains duplicate IDs");for(const[u,f]of s.events.entries())f.sequence!==u+1&&d.push(`events/${u} sequence is not contiguous`),f.reportId!==s.source.reportId&&d.push(`events/${u} reportId does not match source.reportId`);const o=s.anchorCatalog.map(u=>`${u.type}\\0${u.ref}`);new Set(o).size!==o.length&&d.push("anchorCatalog contains duplicate type/ref pairs");const l=new Map(s.anchorCatalog.map(u=>[`${u.type}\\0${u.ref}`,u])),m=(u,f)=>{const b=l.get(`${f.type}\\0${f.ref}`);(!b||dn(b)!==dn(f))&&d.push(`${u} does not match anchorCatalog`)};for(const[u,f]of Object.entries(s.state.viewed))u!==JSON.stringify([f.anchor.type,f.anchor.ref])&&d.push(`state.viewed key does not match its anchor: ${u}`),m(`state.viewed/${u}.anchor`,f.anchor);for(const[u,f]of s.threads.entries())m(`threads/${u}.anchor`,f.anchor);for(const[u,f]of s.events.entries())f.anchor&&m(`events/${u}.anchor`,f.anchor);return{ok:d.length===0,errors:d}}const dd=4*1024*1024;function Re(t,a){const s=new Error(a);return s.name=t,s}function xe(t){return structuredClone(t)}function pd(t){return`utsuri:review:v1:${encodeURIComponent(t)}`}function ud(t){if(new TextEncoder().encode(t).byteLength>dd)throw Re("REVIEW_BROWSER_LIMIT","Stored review state exceeds 4 MiB");const a=JSON.parse(t),s=[a];for(;s.length>0;){const d=s.pop();if(!(!d||typeof d!="object"))if(Array.isArray(d))s.push(...d);else for(const[p,e]of Object.entries(d)){if(new Set(["__proto__","constructor","prototype"]).has(p))throw Re("REVIEW_BROWSER_KEY","Stored review state has a forbidden key");s.push(e)}}return a}function Ih(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const a=t;return a.schemaVersion==="1.0"&&typeof a.reportFingerprint=="string"&&!!(a.state&&typeof a.state=="object")&&Array.isArray(a.threads)&&Array.isArray(a.events)}function Bn(t,a){const s=ws(t,a);if(!s.ok)throw Re("REVIEW_BROWSER_INVALID",`${t}: ${s.errors.join("; ")}`)}function $h(t){for(const a of t)for(const s of a.messages){if(!s.body.trim())throw Re("REVIEW_BROWSER_INVALID","Stored review comment body is empty");if(new TextEncoder().encode(s.body).byteLength>16*1024)throw Re("REVIEW_BROWSER_INVALID","Stored review comment exceeds 16 KiB")}}function cn(t){Bn("review-state",t.state);for(const p of t.threads)Bn("review-thread",p);for(const p of t.events)Bn("review-event",p);if($h(t.threads),t.state.schemaVersion!=="1.3"||t.state.reportId!==t.report.reportId||t.state.reportFingerprint.length!==64||t.state.revision!==t.events.length)throw Re("REVIEW_BROWSER_INVALID","Stored review state is inconsistent");if(new Set(t.state.threadIds).size!==t.state.threadIds.length)throw Re("REVIEW_BROWSER_INVALID","Stored review threads are duplicated");const a=new Set(t.threads.map(p=>p.id));if(a.size!==t.threads.length||t.state.threadIds.length!==t.threads.length||t.state.threadIds.some(p=>!a.has(p)))throw Re("REVIEW_BROWSER_INVALID","Stored review thread inventory is inconsistent");const s=new Set(t.state.orphanedThreadIds);for(const p of t.threads)if(p.reportId!==t.report.reportId||p.state==="orphaned"!==s.has(p.id))throw Re("REVIEW_BROWSER_INVALID","Stored review thread identity is inconsistent");const d=new Set;for(const[p,e]of t.events.entries()){if(d.has(e.id)||e.sequence!==p+1||e.reportId!==t.report.reportId)throw Re("REVIEW_BROWSER_INVALID","Stored review event sequence is invalid");d.add(e.id)}}async function cd(t,a){const s=ud(a);if(!Ih(s))throw Re("REVIEW_BROWSER_INVALID","Stored review state has an invalid shape");if(s.reportFingerprint!==t.state.reportFingerprint||s.state.reportFingerprint!==s.reportFingerprint)throw Re("REVIEW_BROWSER_STALE","Stored review state belongs to an older report; export it before re-anchoring");const d=Xl(s,t.anchorCatalog,await Ql(t.report,Cr),!0);return cn({...t,state:xe(d.state),threads:xe(d.threads),events:xe(d.events)}),d}function qh(){const t=globalThis.navigator?.locks;if(!t)throw Re("REVIEW_BROWSER_LOCK_UNAVAILABLE","Concurrent-safe review storage requires utsuri serve in a browser with Web Locks support");return t}function Xa(t,a){return{...xe(t.state),revision:t.state.revision+1,updatedAt:a}}async function es(t,a,s){const d=t.events.length+1,p={reportId:t.report.reportId,sequence:d,createdAt:a,...s};return{schemaVersion:"1.0",id:`event:${(await Cr(p)).slice(0,24)}`,...p}}async function hd(t,a){const s=await Cr(t);return{report:xe(t),state:{schemaVersion:"1.3",reportId:t.reportId,reportFingerprint:s,revision:0,updatedAt:a,viewed:{},judgments:Object.fromEntries(t.changes.map(d=>[d.id,{changeId:d.id,state:"unreviewed",updatedAt:a}])),threadIds:[],orphanedThreadIds:[]},threads:[],events:[],anchorCatalog:await hh(t,Cr),sidecarFiles:{}}}async function Rh(t){const a=await hd(t,new Date().toISOString()),s=localStorage.getItem(pd(t.reportId));if(!s)return a;const d=await cd(a,s),p={...a,state:xe(d.state),threads:xe(d.threads),events:xe(d.events)};return cn(p),p}async function Sh(t,a=t.state.revision-1){if(cn(t),a<0||t.state.revision!==a+1)throw Re("REVIEW_REVISION_INVALID","Review mutation must advance one revision");const s={schemaVersion:"1.0",reportFingerprint:t.state.reportFingerprint,state:xe(t.state),threads:xe(t.threads),events:xe(t.events)},d=JSON.stringify(s);if(new TextEncoder().encode(d).byteLength>dd)throw Re("REVIEW_BROWSER_LIMIT","Review state is near browser-storage limits; export it before adding more comments");const p=pd(t.report.reportId);await qh().request(`${p}:write`,{mode:"exclusive"},async()=>{const e=localStorage.getItem(p);if((e?(await cd(t,e)).state.revision:0)!==a)throw Re("REVIEW_REVISION_CONFLICT","Review state changed in another tab; reload before retrying this edit");localStorage.setItem(p,d)})}async function Eh(t,a,s,d=new Date().toISOString()){const p=Xa(t,d);p.viewed[Fr(a)]={anchor:xe(a),state:s,updatedAt:d};const e=await es(t,d,{type:"viewed.changed",anchor:xe(a),viewState:s});return{...t,state:p,events:[...t.events,e]}}async function Nh(t,a,s,d=new Date().toISOString()){if(!t.report.changes.some(n=>n.id===a))throw Re("REVIEW_CHANGE_MISSING","Review change does not exist");const p=Xa(t,d);p.judgments[a]={changeId:a,state:s,updatedAt:d};const e=await es(t,d,{type:"judgment.changed",changeId:a,judgmentState:s});return{...t,state:p,events:[...t.events,e]}}async function Ch(t,a,s,d,p=new Date().toISOString(),e=!1){const n=s.trim();if(!n)throw Re("REVIEW_COMMENT_EMPTY","Review comments must not be empty");if(new TextEncoder().encode(n).byteLength>16*1024)throw Re("REVIEW_COMMENT_LIMIT","Review comment exceeds 16 KiB");const i=`thread:${(await Cr({reportId:t.report.reportId,anchor:a,kind:d,normalized:n,createdAt:p})).slice(0,24)}`,o=`message:${(await Cr({threadId:i,normalized:n,createdAt:p})).slice(0,24)}`,l={id:i,reportId:t.report.reportId,anchor:xe(a),kind:d,state:"open",messages:[{id:o,kind:"human-note",author:{type:"human",label:"Reviewer"},body:n,createdAt:p}],agentAttention:e?{state:"requested",updatedAt:p}:{state:"none"},createdAt:p,updatedAt:p},m=Xa(t,p);m.threadIds=[...m.threadIds,i];const u=await es(t,p,{type:"thread.created",anchor:xe(a),threadId:i,messageId:o,attentionState:e?"requested":"none"});return{...t,state:m,threads:[...t.threads,l],events:[...t.events,u]}}async function Lh(t,a,s,d=new Date().toISOString()){const p=t.threads.findIndex(m=>m.id===a);if(p===-1)throw Re("REVIEW_THREAD_MISSING","Review thread does not exist");const e=t.threads[p];if(new Set(["stale","orphaned","resolved"]).has(e.state))throw Re("REVIEW_THREAD_NOT_CURRENT","Stale, orphaned, or resolved comments cannot request Agent attention");const n=s?"requested":"none";if(e.agentAttention.state!=="none"&&e.agentAttention.state!=="requested")throw Re("REVIEW_ATTENTION_SUBMITTED","Submitted Agent attention cannot be changed");if(e.agentAttention.state===n)return t;const i=xe(t.threads);i[p]={...i[p],agentAttention:{state:n,updatedAt:d},updatedAt:d};const o=Xa(t,d),l=await es(t,d,{type:"agent-attention.changed",threadId:a,attentionState:n});return{...t,state:o,threads:i,events:[...t.events,l]}}async function jh(t,a,s=new Date().toISOString()){const d=t.threads.findIndex(o=>o.id===a);if(d===-1)throw Re("REVIEW_THREAD_MISSING","Review thread does not exist");const p=t.threads[d];if(p.state==="stale"||p.state==="orphaned")throw Re("REVIEW_THREAD_NOT_CURRENT","Stale or orphaned comments cannot be resolved");const e=xe(t.threads);e[d]={...e[d],state:"resolved",updatedAt:s};const n=Xa(t,s),i=await es(t,s,{type:"thread.resolved",threadId:a});return{...t,state:n,threads:e,events:[...t.events,i]}}function Oh(t){const a=new Map(t.anchorCatalog.map(s=>[Fr(s),xe(s)]));for(const s of Object.values(t.state.viewed))a.set(Fr(s.anchor),xe(s.anchor));for(const s of t.threads)a.set(Fr(s.anchor),xe(s.anchor));return[...a.values()].sort((s,d)=>Fr(s).localeCompare(Fr(d)))}function Th(t,a,s=new Date().toISOString()){const d={schemaVersion:"1.0",source:{reportId:t.report.reportId,reportFingerprint:t.state.reportFingerprint,base:a.base,head:a.head},state:xe(t.state),threads:xe(t.threads),events:xe(t.events),anchorCatalog:Oh(t),exportedAt:s},p=ld(d);if(!p.ok)throw Re("REVIEW_BUNDLE_INVALID",p.errors.join("; "));return d}async function zh(t,a,s={}){const d=s.importedAt??new Date().toISOString(),p=JSON.stringify(a),e=ud(p),n=e&&typeof e=="object"&&!Array.isArray(e)&&"source"in e?e.source:null,i=!!(n&&typeof n=="object"&&!Array.isArray(n)&&"reportId"in n&&"reportFingerprint"in n&&n.reportId===t.report.reportId&&n.reportFingerprint===t.state.reportFingerprint),o=Xl(e,t.anchorCatalog,await Ql(t.report,Cr),i),l=ld(o);if(!l.ok)throw Re("REVIEW_BUNDLE_INVALID",l.errors.join("; "));const m=o;if(!i&&!s.reanchor)throw Re("REVIEW_REPORT_MISMATCH","Review bundle belongs to another report; explicitly enable re-anchoring to import it");const u=[],f=[],b=Xa(t,d);for(const[H,X]of Object.entries(m.state.viewed)){const ee=Tn(X.anchor,t.anchorCatalog);f.push(ee);const he=ee.result==="exact"?ee.candidate:X.anchor,fe=ee.result==="exact"?Fr(he):H,ue={anchor:xe(he),state:ee.result==="exact"?X.state:"stale",updatedAt:d},Ee=b.viewed[fe];Ee&&Pa(Ee)!==Pa(ue)?u.push({kind:"viewed",id:fe,current:Ee,incoming:ue}):b.viewed[fe]=ue}const R=new Map(m.anchorCatalog.filter(H=>H.type==="change").map(H=>[H.ref,H]));for(const[H,X]of Object.entries(m.state.judgments)){const ee=R.get(H),he=ee?Tn(ee,t.anchorCatalog):void 0;he&&f.push(he);const fe=he?.result==="exact"?he.candidate.ref:H,ue={changeId:fe,state:he?.result==="exact"?X.state:"stale",updatedAt:d},Ee=b.judgments[fe];Ee&&Ee.state!=="unreviewed"&&Pa(Ee)!==Pa(ue)?u.push({kind:"judgment",id:fe,current:Ee,incoming:ue}):b.judgments[fe]=ue}const O=xe(t.threads);for(const H of m.threads){const X=Tn(H.anchor,t.anchorCatalog);f.push(X);const ee={...xe(H),reportId:t.report.reportId,anchor:X.result==="exact"?xe(X.candidate):xe(H.anchor),state:X.result==="exact"?H.state:X.result==="missing"?"orphaned":"stale",updatedAt:d},he=O.find(fe=>fe.id===ee.id);he&&Pa(he)!==Pa(ee)?u.push({kind:"thread",id:ee.id,current:he,incoming:ee}):he||O.push(ee)}b.threadIds=O.map(H=>H.id),b.orphanedThreadIds=O.filter(H=>H.state==="orphaned").map(H=>H.id);const S=await es(t,d,{type:"state.imported",sourceReportId:m.source.reportId}),G={...t,state:b,threads:O,events:[...t.events,S]};return cn(G),{store:G,reanchored:f,conflicts:u}}const Mh=512*1024;function fs(t,a,s){const d=[/\\bBearer\\s+[A-Za-z0-9._~+/=-]{8,}\\b/giu,/\\b(?:api[_-]?key|access[_-]?token|auth[_-]?token|token|password|passwd|secret)\\b\\s*[:=]\\s*[^\\s,;]+/giu,/\\bAKIA[0-9A-Z]{16}\\b/gu,/\\b(?:gh[pousr]_[A-Za-z0-9_]{20,}|github_pat_[A-Za-z0-9_]{20,}|sk-[A-Za-z0-9_-]{12,})\\b/gu];let p=t;for(const e of d)e.test(p)&&(s.push({category:"secret-pattern",ref:a}),p=p.replace(e,"[REDACTED]")),e.lastIndex=0;return p}function Vh(t,a){const s=a.anchor;return s.type==="change"?t.changes.find(d=>d.id===s.ref):s.type==="hunk"||s.type==="line-range"?t.changes.find(d=>d.hunkRefs.some(p=>s.ref===p||s.ref.startsWith(`${p}:`))):s.type==="visual-target"||s.type==="visual-region"?t.changes.find(d=>d.targetRefs.includes(s.targetRef??s.ref)):s.type==="finding"?t.changes.find(d=>d.findingRefs.includes(s.ref)):t.changes.find(d=>s.ref.startsWith(`${d.id}:gap:`))}function Fh(t,a,s){return a.anchor.type==="hunk"||a.anchor.type==="line-range"?t.hunks.filter(d=>a.anchor.ref===d.id||a.anchor.ref.startsWith(`${d.id}:`)):s?t.hunks.filter(d=>s.hunkRefs.includes(d.id)):[]}function Dh(t,a){const s=a.anchor.targetRef??(a.anchor.type==="visual-target"?a.anchor.ref:void 0);if(!s)return[];const d=a.anchor.type==="visual-region"?a.anchor.region:void 0;return t.comparisons.filter(p=>p.targetRef===s).flatMap(p=>p.images.flatMap(e=>[{role:"before",assetRef:e.beforeRef,...d?{crop:d}:{}},{role:"after",assetRef:e.afterRef,...d?{crop:d}:{}},{role:"diff",assetRef:e.diffRef,...d?{crop:d}:{}}])).slice(0,10)}async function Bh(t,a=new Date().toISOString()){const s=t.threads.filter(o=>o.agentAttention.state==="requested"&&!new Set(["stale","orphaned","resolved"]).has(o.state));if(s.length===0)throw new Error("No current comments request Agent attention");if(s.length>20)throw new Error("Feedback Batch exceeds 20 items");const d=`fb:${(await Cr({reportId:t.report.reportId,threads:s.map(o=>o.id),createdAt:a})).slice(0,24)}`,p=await Promise.all(s.map(async o=>{const l=[...o.messages].reverse().find(u=>u.author.type==="human");if(!l)throw new Error("Feedback thread has no human source message");const m=o.anchor.type==="visual-target"||o.anchor.type==="visual-region";return{id:`item:${(await Cr({batchId:d,threadId:o.id,messageId:l.id})).slice(0,24)}`,threadId:o.id,anchor:structuredClone(o.anchor),sourceMessageId:l.id,requestKind:o.kind==="question"?"explain":"freeform",question:l.body,contextSelection:{includeCodeDiff:!m,includeVisualCrop:m,includeComputedStyle:!1,includeDomAria:!1,includeRelatedTests:!1},state:"ready"}})),e=structuredClone(t.report.origin),n=[];for(const[o,l]of p.entries()){const m=s[o],u=Vh(t.report,m),f=[],b=Fh(t.report,m,u),R={schemaVersion:"1.1",reportId:t.report.reportId,batchId:d,itemId:l.id,baseSha:"",headSha:"",anchor:structuredClone(l.anchor),question:fs(l.question,`item:${l.id}:question`,f),...u?{semanticChange:{id:u.id,title:fs(u.title,`change:${u.id}:title`,f),summary:fs(u.summary,`change:${u.id}:summary`,f),intent:{text:fs(u.intent.text,`change:${u.id}:intent`,f),source:u.intent.source,evidenceRefs:[...u.intent.evidenceRefs]},risk:structuredClone(u.risk)}}:{},code:l.contextSelection.includeCodeDiff?b.map(S=>({path:S.path,startLine:Math.max(1,S.newStart||S.oldStart),endLine:Math.max(1,(S.newStart||S.oldStart)+Math.max(S.newLines,S.oldLines)-1),textRef:S.id})):[],images:l.contextSelection.includeVisualCrop?Dh(t.report,m):[],evidenceRefs:u?[...u.intent.evidenceRefs]:[],priorThreadMessages:m.messages.map(S=>({role:S.author.type==="agent"?"agent":"human",text:fs(S.body,`message:${S.id}`,f)})),redactions:f},O={...R,contextHash:await Cr(R)};if(new TextEncoder().encode(JSON.stringify(O)).byteLength>Mh)throw new Error("Context Pack exceeds 512 KiB");n.push(O)}return{batch:{id:d,reportId:t.report.reportId,origin:e,items:p.map((o,l)=>({...o,question:n[l].question})),state:"ready",deliveryMode:"export-only",contextHash:await Cr(n.map(o=>o.contextHash)),createdAt:a},contexts:n,shared:{comments:p.length,codeRanges:n.reduce((o,l)=>o+l.code.length,0),imageCrops:n.reduce((o,l)=>o+l.images.length,0),evidenceReferences:n.reduce((o,l)=>o+l.evidenceRefs.length,0)},excluded:["raw DOM and ARIA artifacts","environment variables","files outside the report","related tests"],redactionCount:n.reduce((o,l)=>o+l.redactions.length,0),contextBytes:n.reduce((o,l)=>o+new TextEncoder().encode(JSON.stringify(l)).byteLength,0),warnings:["Static mode exports files; it cannot submit to an Origin Session"],destination:{host:e.host,bound:!!e.sessionRef,deliveryMode:"export-only"}}}var Us=z("<span> </span>"),Hh=z(\'<li><a><span class="queue-index"> </span> <span class="queue-copy"><strong> </strong> <span class="badges"><span> </span> <!></span></span></a></li>\'),Wh=z(\'<section class="queue-section"><h3><span> </span> <span class="count"> </span></h3> <ol></ol></section>\'),Zh=z(\'<li><a><span class="queue-index"> </span> <span class="queue-copy"><strong> </strong><span> </span></span></a></li>\'),Uh=z(\'<section class="queue-section unclassified"><h3><span> </span><span class="count"> </span></h3> <ol></ol></section>\'),Kh=z(\'<label class="viewed-control compact-control"><input type="checkbox"/> <span> </span></label>\'),Jh=z(\'<li><span class="file-status"> </span> <code> </code> <span> </span> <!></li>\'),Va=z("<p> </p>"),Ks=z("<option> </option>"),Yh=z(\'<div class="review-controls"><label><span> </span> <select><!><!></select></label> <label class="viewed-control"><input type="checkbox"/> <span> </span></label> <button type="button"> </button></div> <p class="local-only-note"> </p>\',1),Gh=z(\'<p class="review-message" role="alert"> </p>\'),Qh=z(\'<p class="review-message" role="status"> </p>\'),Hn=z("<li> </li>"),Xh=z("<ul></ul>"),ef=z(\'<button type="button" class="inline-comment-action"> </button>\'),tf=z("<li><span> </span> <!></li>"),rf=z("<label><span>Target</span> <select></select></label>"),af=z("<label><span> </span> <select></select></label>"),sf=z(\'<label class="viewed-control visual-viewed-control"><input type="checkbox"/> <span> </span></label>\'),nf=z(\'<div class="persistent-error" role="alert"><strong>INCOMPLETE</strong> <span> </span></div>\'),tl=z(\'<span aria-hidden="true"> </span>\'),ms=z(\'<button class="visual-comment-pin" type="button"> </button>\'),of=z(\'<div class="visual-panes" data-visual-mode="side-by-side"><figure><figcaption> </figcaption> <div class="visual-scroll"><div class="image-stage"><img/></div></div></figure> <figure><figcaption> </figcaption> <div class="visual-scroll"><div class="image-stage"><img/> <!> <!></div></div></figure></div>\'),lf=z(\'<label class="wipe-control"><span> </span> <input type="range" min="0" max="100"/></label> <figure class="single-visual"><figcaption> </figcaption> <div class="visual-scroll"><div class="image-stage"><img/> <img class="wipe-after"/> <!></div></div></figure>\',1),df=z(\'<figure class="single-visual"><figcaption> </figcaption> <div class="visual-scroll"><div class="image-stage"><img/> <img/> <!></div></div></figure>\'),pf=z(\'<figure class="single-visual pixel-diff-view"><figcaption> </figcaption> <div class="visual-scroll"><div class="image-stage"><img/> <!></div></div></figure>\'),uf=z(\'<figure class="single-visual"><figcaption> </figcaption> <div class="visual-scroll"><div class="image-stage"><img/> <!> <!></div></div></figure>\'),ba=z(\'<button type="button"> </button>\'),cf=z(\'<li><div class="region-actions"><button type="button"> </button> <!></div></li>\'),rl=z("<ol></ol>"),hf=z(\'<dl class="visual-metrics"><div><dt>Pixels changed</dt> <dd> </dd></div> <div><dt>Pixel ratio</dt> <dd> </dd></div> <div><dt> </dt> <dd> </dd></div> <div><dt>Canvas</dt> <dd> </dd></div></dl> <!> <section class="region-list" aria-labelledby="region-heading"><h4 id="region-heading"> </h4> <!></section>\',1),ff=z(\'<div class="visual-selectors"><!> <!> <!> <label class="visual-slider"><span> </span> <input type="range" min="50" max="200" step="10"/></label></div> <div class="visual-mode-control" role="group"><button type="button"> </button> <button type="button"> </button> <button type="button"> </button> <button type="button"> </button> <button type="button"> </button></div> <!> <!>\',1),mf=z(\'<div class="verification-gap" role="status"><strong>UNCOVERED</strong> <span> </span></div>\'),vf=z(\'<li><article tabindex="-1"><div class="finding-badges"><span> </span><span> </span><span> </span></div> <h5> </h5> <p> </p> <!> <!></article></li>\'),gf=z("<li><span> </span><strong> </strong> <p> </p></li>"),yf=z("<li><strong> </strong> </li>"),_f=z(\'<details class="more-evidence"><summary> </summary> <ul></ul></details>\'),wf=z(\'<label class="viewed-control dark-control"><input type="checkbox"/> <span> </span></label> <button type="button"> </button>\',1),al=z(\'<button class="context-fold" type="button"> </button>\'),sl=z(\'<button class="line-comment" type="button">✎</button>\'),bf=z(\'<div role="group"><span class="line-number" aria-hidden="true"> </span> <span class="line-number" aria-hidden="true"> </span> <span class="line-sign" aria-hidden="true"> </span> <code></code> <!></div>\'),nl=z("<code></code>"),Pf=z(\'<div class="split-row" role="group"><div><span class="line-number" aria-hidden="true"> </span> <span class="line-sign" aria-hidden="true"> </span> <!></div> <div><span class="line-number" aria-hidden="true"> </span> <span class="line-sign" aria-hidden="true"> </span> <!></div> <!></div>\'),kf=z(\'<button class="back-link hunk-back" type="button"> </button>\'),xf=z(\'<section tabindex="-1"><header><div><p> </p> <h4> </h4></div> <div class="hunk-actions"><!> <!> <button type="button" class="anchor-button">#</button></div></header> <div role="region"></div> <!></section>\'),Af=z(\'<form class="comment-composer"><div><p class="kicker"> </p> <code> </code></div> <label><span>Kind</span> <select><option>Note</option><option>Question</option><option>Finding</option><option>Change request</option></select></label> <label class="comment-body"><span> </span> <textarea rows="4" maxlength="16384" required=""></textarea></label> <label class="agent-attention-control"><input type="checkbox"/> <span> </span> <small> </small></label> <p> </p> <div class="comment-actions"><button type="submit"> </button> <button type="button"> </button></div></form>\'),If=z(\'<label class="agent-attention-control compact-attention"><input type="checkbox"/> <span> </span></label>\'),$f=z(\'<p class="attention-state"> </p>\'),qf=z(\'<li tabindex="-1"><header><div><span> </span> <strong> </strong></div> <span> </span></header> <code> </code> <!> <!> <!></li>\'),Rf=z(\'<ol class="thread-list"></ol>\'),Sf=z(\'<p class="empty-comments"> </p>\'),Ef=z(\'<article class="focused-change" tabindex="-1"><button class="back-link" type="button"> </button> <header class="change-header"><div><p class="kicker"> </p> <h2> </h2></div> <div class="change-badges" aria-label="Change status"><span> </span> <span> </span> <span> </span></div></header> <section class="review-workspace" aria-labelledby="review-workspace-heading"><div class="review-workspace-heading"><div><p class="kicker">State / human-owned</p> <h3 id="review-workspace-heading"> </h3> <!></div> <div class="review-transfer-actions"><label><input type="checkbox"/> <span> </span></label> <button type="button"> </button> <button type="button"> </button> <input class="visually-hidden" type="file" accept="application/json,.json"/></div></div> <!> <!> <!></section> <section class="interpretation-section" aria-labelledby="interpretation-heading"><div class="section-heading"><div><p class="kicker">Interpretation / Agent</p> <h3 id="interpretation-heading"> </h3></div></div> <div class="explanation-grid"><section><h3> </h3> <p> </p> <p class="technical"> </p></section> <section><h3> </h3> <p> </p></section> <section><h3> </h3> <!></section> <section class="risk-block"><h3> </h3> <ul></ul></section> <section class="gap-block"><h3> </h3> <ul></ul></section> <section><h3> </h3> <ul></ul></section></div></section> <section class="visual-evidence-section" aria-labelledby="measured-evidence-heading"><div class="section-heading visual-heading"><div><p class="kicker"> </p> <h3 id="measured-evidence-heading"> </h3> <h4 id="visual-evidence-heading" tabindex="-1"> </h4> <p> </p></div></div> <!> <section class="finding-list" aria-labelledby="finding-heading"><div class="section-heading"><div><p class="kicker"> </p> <h4 id="finding-heading"> </h4></div></div> <!></section></section> <section class="evidence-section" aria-labelledby="evidence-heading"><div class="section-heading"><div><p class="kicker"> </p> <h3 id="evidence-heading"> </h3></div></div> <ul class="evidence-list"></ul> <!></section> <section class="diff-section" aria-labelledby="diff-heading"><div class="section-heading"><div><p class="kicker"> </p> <h3 id="diff-heading"> </h3></div> <div class="segmented-control" aria-label="Diff layout"><button type="button"> </button> <button type="button"> </button></div></div> <!></section> <section class="review-comments" aria-labelledby="review-comments-heading"><div class="section-heading"><div><p class="kicker"> </p> <h3 id="review-comments-heading"> </h3></div></div> <!> <!></section></article>\'),Nf=z(\'<div class="hunk-actions"><label class="viewed-control dark-control"><input type="checkbox"/> <span> </span></label> <button type="button"> </button></div>\'),Cf=z(\'<div><span class="line-number"> </span><span class="line-number"> </span><span class="line-sign"> </span><code> </code></div>\'),Lf=z(\'<section class="focused-change unclassified-focus"><button class="back-link" type="button"> </button> <p class="kicker"> </p> <h2> </h2> <section class="hunk active-hunk" tabindex="-1"><header><h3> </h3> <!></header> <div class="diff-table"></div></section></section>\'),jf=z(\'<section class="focused-change empty-focus"><h2> </h2></section>\'),Of=z(\'<span class="unread-badge"> </span>\'),Tf=z("<li><strong> </strong> <code> </code> <span> </span></li>"),zf=z(\'<p class="feedback-warning"> </p>\'),Mf=z("<pre> </pre>"),Vf=z(\'<section class="feedback-preview" aria-labelledby="feedback-preview-heading"><h2 id="feedback-preview-heading"> </h2> <ol></ol> <div class="feedback-preview-grid"><section><h3> </h3> <p> </p></section> <section><h3> </h3> <p> </p></section> <section><h3> </h3> <p> </p></section></div> <!> <div class="feedback-actions"><button type="button"> </button> <!></div> <!></section>\'),Ff=z(\'<aside class="feedback-dock" aria-live="polite"><header><div><strong> </strong> <!></div> <!></header> <!></aside>\'),Df=z(\'<div class="report-shell"><header class="report-header"><a class="wordmark" href="#summary-heading" aria-label="Utsuri review summary"><span aria-hidden="true">UT</span> <strong>Utsuri</strong></a> <div class="report-state"><span class="state-mark" aria-hidden="true"></span> <span> </span> <small> </small></div> <p class="report-id"> </p></header> <aside class="review-rail" aria-labelledby="queue-heading"><div class="rail-heading"><p class="kicker">Focus / 01</p> <h2 id="queue-heading" tabindex="-1"> </h2></div> <label class="queue-search"><span> </span> <input type="search" autocomplete="off"/></label> <nav><!> <!></nav></aside> <main id="main-content"><section aria-labelledby="summary-heading" class="decision-summary"><div><p class="kicker"> </p> <h1 id="summary-heading"> </h1> <p class="decision-statement"> </p></div> <dl class="metrics"><div><dt> </dt> <dd> </dd></div> <div><dt> </dt> <dd class="positive"> </dd></div> <div><dt> </dt> <dd class="negative"> </dd></div> <div><dt> </dt> <dd> </dd></div> <div><dt> </dt> <dd> </dd></div></dl> <section class="coverage-overview" aria-labelledby="coverage-heading"><div><p class="kicker">Coverage / structured</p> <h2 id="coverage-heading"> </h2> <p> </p></div> <dl><div><dt> </dt> <dd> </dd></div> <div><dt> </dt> <dd> </dd></div> <div><dt> </dt> <dd> </dd></div></dl></section> <details class="file-inventory"><summary> </summary> <ul></ul></details></section> <!></main> <!></div>\'),Bf=z(\'<p class="loading" aria-live="polite"> </p>\');function Hf(t,a){gl(a,!1);const s=K(),d=K(),p=K(),e=K(),n={en:{queue:"Review queue",search:"Filter changes",action:"Action required",confirm:"Needs confirmation",clear:"No issue found",unclassified:"Unclassified hunks",summary:"Decision summary",files:"Files",additions:"Additions",deletions:"Deletions",changes:"Change groups",lowSignal:"Low-signal files",inventory:"File inventory",backQueue:"Back to review queue",what:"What changed",why:"Why",userImpact:"User impact",noImpact:"User impact is not established.",risk:"Risk",gaps:"Not verified",verified:"Verified",evidence:"Evidence",codeDiff:"Code diff",unified:"Unified",split:"Side by side",context:"Show {count} hidden context lines",moreEvidence:"More evidence",measured:"Measured evidence",interpretation:"Agent interpretation",visualEvidence:"Visual comparison",sideBySide:"Side by side",wipe:"Wipe",blink:"Blink",stopBlink:"Stop blink",pixelDiff:"Pixel diff",afterOnly:"After only",imageScope:"Image scope",zoom:"Zoom",wipePosition:"Wipe position",changedRegions:"Changed regions",noRegions:"No changed pixel regions",findings:"Findings",noFindings:"No linked findings",coverage:"Visual coverage",planned:"Planned targets",captured:"Captured targets",failed:"Failed targets",viewCode:"View linked code",viewVisual:"View visual evidence",reducedMotion:"Blink unavailable because reduced motion is enabled",backChange:"Back to focused change",visualGap:"Visual verification has not run",reviewWorkspace:"Human review",reviewProgress:"Review progress",viewed:"Viewed",humanJudgment:"Human judgment",unreviewed:"Unreviewed",reviewed:"Reviewed",followUp:"Follow-up",blocked:"Blocked",comments:"Comments",comment:"Comment",commentOn:"Comment on",commentBody:"Review note",saveComment:"Save comment",cancel:"Cancel",resolve:"Resolve",resolved:"Resolved",noComments:"No comments for this change",localOnly:"Saved locally. Plain comments are never sent to an Agent.",askAgent:"Ask the current Agent",askAgentHelp:"This only saves the selection. It does not submit or create a conversation.",selectedItems:"Items for Agent review",reviewItems:"Review items",feedbackPreview:"Feedback Batch preview",shared:"Shared",notShared:"Not shared",delivery:"Delivery",returnConversation:"Return to current conversation",prepareRequest:"Prepare review request",copyHandoff:"Copy handoff",handoffCopied:"Handoff copied",unreadAnswers:"Unread answers",exportReview:"Export review",importReview:"Import review",reviewBundleFile:"Review bundle file",reanchorImport:"Re-anchor another report",stale:"Stale",orphaned:"Orphaned",reviewUnavailable:"Review state unavailable",empty:"No semantic changes",loading:"Loading review data…"},ja:{queue:"レビューキュー",search:"変更を絞り込む",action:"対応が必要",confirm:"確認が必要",clear:"問題なし",unclassified:"未分類のハンク",summary:"判断サマリー",files:"ファイル",additions:"追加",deletions:"削除",changes:"変更グループ",lowSignal:"低シグナル",inventory:"ファイル一覧",backQueue:"レビューキューへ戻る",what:"変更内容",why:"変更理由",userImpact:"ユーザー影響",noImpact:"ユーザー影響は未確定です。",risk:"リスク",gaps:"未検証",verified:"検証済み",evidence:"根拠",codeDiff:"コード差分",unified:"統合表示",split:"左右表示",context:"非表示のコンテキスト {count} 行を表示",moreEvidence:"その他の根拠",measured:"計測された根拠",interpretation:"Agent の解釈",visualEvidence:"画面比較",sideBySide:"左右比較",wipe:"ワイプ",blink:"点滅比較",stopBlink:"点滅を停止",pixelDiff:"ピクセル差分",afterOnly:"変更後のみ",imageScope:"画像の範囲",zoom:"拡大率",wipePosition:"ワイプ位置",changedRegions:"変更領域",noRegions:"変更ピクセル領域はありません",findings:"検出事項",noFindings:"関連する検出事項はありません",coverage:"画面カバレッジ",planned:"予定 target",captured:"取得済み target",failed:"失敗 target",viewCode:"関連コードを見る",viewVisual:"画面根拠を見る",reducedMotion:"視差低減が有効なため点滅比較は利用できません",backChange:"変更グループへ戻る",visualGap:"画面の検証は未実施です",reviewWorkspace:"人によるレビュー",reviewProgress:"レビュー進捗",viewed:"確認済み",humanJudgment:"人の判断",unreviewed:"未レビュー",reviewed:"レビュー済み",followUp:"要フォロー",blocked:"ブロック中",comments:"コメント",comment:"コメント",commentOn:"コメント対象",commentBody:"レビューメモ",saveComment:"コメントを保存",cancel:"キャンセル",resolve:"解決済みにする",resolved:"解決済み",noComments:"この変更へのコメントはありません",localOnly:"ローカルに保存します。通常コメントを Agent へ送信することはありません。",askAgent:"現在の Agent に確認を依頼",askAgentHelp:"選択状態だけを保存します。送信や新しい会話の作成は行いません。",selectedItems:"Agent 確認対象",reviewItems:"確認項目をレビュー",feedbackPreview:"Feedback Batch プレビュー",shared:"共有する情報",notShared:"共有しない情報",delivery:"受け渡し",returnConversation:"現在の会話へ戻す",prepareRequest:"レビュー依頼を準備",copyHandoff:"引き継ぎ文をコピー",handoffCopied:"引き継ぎ文をコピーしました",unreadAnswers:"未読回答",exportReview:"レビューを書き出す",importReview:"レビューを読み込む",reviewBundleFile:"レビューバンドルファイル",reanchorImport:"別レポートへ再アンカーする",stale:"古い状態",orphaned:"参照先なし",reviewUnavailable:"レビュー状態を利用できません",empty:"意味単位の変更はありません",loading:"レビューデータを読み込んでいます…"}};let i=K(null),o=K(""),l=K("en"),m=K(""),u=K(""),f=K(""),b="",R=K("unified"),O=K("side-by-side"),S=K(""),G=K(""),H=K(0),X=K(0),ee=K(100),he=K(50),fe=K(!1),ue=K(!1),Ee=K(),Nt=K(),Ae=K(),B=!1,ie=new Set,q=K(),me=K([]),Fe=K([]),fr=K([]),at=K([]),ce=K(),E=K(),$t=K([]),j=K(null),Wr={base:null,head:null},sa=K(""),st=K(""),ts=K(!1),Z=K(!1),ft=K(null),mr=K(""),Ca=K("note"),Ir=K(!1),ga=K(),Lr=K(),jr=K([]),Ce=K(""),v=K([]),_=K(null),P=K(""),U="",le=K(!1),Ye=null;function J(g,x){return`${g}-${x.replace(/[^a-zA-Z0-9_-]/gu,"-")}`}function rs(g){const x=g.region;return x?`left:${(x.x+x.width/2)*100}%;top:${(x.y+x.height/2)*100}%`:"display:none"}function Ls(g){return g.risk.level==="critical"||g.risk.level==="high"?"action-required":g.verification.gaps.length>0||g.intent.source==="unknown"?"needs-confirmation":"no-issue"}function fd(g){return g==="reviewed"?r(s).reviewed:g==="follow-up"?r(s).followUp:g==="blocked"?r(s).blocked:g==="stale"?r(s).stale:r(s).unreviewed}function hn(g,x){return g?.state.judgments[x]?.state??"unreviewed"}function na(g,x){return r(j)?Qo(r(j).anchorCatalog,g,x):void 0}function as(g,x,C){const V=g?Qo(g.anchorCatalog,x,C):void 0;return!V||!g?!1:g.state.viewed[Fr(V)]?.state==="viewed"}function yi(g,x){const C=g.lines[x];if(!C||C.kind==="no-newline")return;const V=C.kind==="addition"?"after":C.kind==="deletion"?"before":"diff",W=V==="before"?C.oldLine:C.newLine??C.oldLine;return W?na("line-range",`${g.id}:${V}:${W}:${x}`):void 0}function md(g,x){return g.type==="change"?g.ref===x.id:g.type==="hunk"||g.type==="line-range"?x.hunkRefs.some(C=>g.ref===C||g.ref.startsWith(`${C}:`)):g.type==="visual-target"||g.type==="visual-region"?!!(g.targetRef&&x.targetRefs.includes(g.targetRef))||x.targetRefs.includes(g.ref):g.type==="finding"?x.findingRefs.includes(g.ref):g.type==="verification-gap"?g.ref.startsWith(`${x.id}:gap:`):!1}function vd(){const x=new URLSearchParams(location.hash.startsWith("#")?location.hash.slice(1):"").get("token")??"";if(x){if(!/^[A-Za-z0-9_-]{32,128}$/u.test(x)){k(sa,"Interactive capability token is invalid"),history.replaceState(null,"",`${location.pathname}${location.search}`);return}k(Ce,x),history.replaceState(null,"",`${location.pathname}${location.search}`)}}async function ss(g,x={}){if(!r(Ce)||!r(i))throw new Error("Interactive review capability is unavailable");const C=await fetch(`./api/v1/${g}`,{...x,credentials:"omit",headers:{authorization:`Bearer ${r(Ce)}`,"x-utsuri-report-id":r(i).reportId,...x.body?{"content-type":"application/json"}:{},...x.headers??{}}}),V=await C.json();if(!C.ok)throw new Error(V?.error?.message??`HTTP ${C.status}`);return V}function fn(g){r(j)&&(k(j,{...r(j),state:structuredClone(g.state),threads:structuredClone(g.threads),events:r(j).events}),k(v,structuredClone(g.inbox?.entries??r(v))))}async function _i(){const g=await ss("review-state");fn(g)}async function ns(g){if(!r(j)||!r(i))return;const x=await ss("review-events",{method:"POST",body:JSON.stringify({schemaVersion:"1.0",reportId:r(i).reportId,expectedRevision:r(j).state.revision,action:g})});fn(x)}async function gd(){if(!r(Ce)||!r(i))return;Ye?.abort();const g=new AbortController;Ye=g;try{const x=await fetch("./api/v1/events",{credentials:"omit",headers:{authorization:`Bearer ${r(Ce)}`,"x-utsuri-report-id":r(i).reportId},signal:g.signal});if(!x.ok||!x.body)return;const C=x.body.getReader(),V=new TextDecoder;let W="";for(;!g.signal.aborted;){const{value:Ge,done:Tr}=await C.read();if(Tr)break;W+=V.decode(Ge,{stream:!0});const js=W.split(`\n\n`);W=js.pop()??"",js.some(Os=>Os.startsWith("data:")&&!Os.includes(\'"type":"ready"\'))&&await _i()}}catch(x){g.signal.aborted||k(st,x instanceof Error?x.message:String(x))}}th(()=>Ye?.abort());async function La(g){await Sh(g,g.state.revision-1),k(j,g),k(st,"")}async function is(g,x,C){const V=na(g,x);if(!(!r(j)||!V)){k(Z,!0);try{r(Ce)?await ns({type:"viewed.changed",anchor:{type:V.type,ref:V.ref,fingerprint:V.fingerprint},viewState:C?"viewed":"unseen"}):await La(await Eh(r(j),V,C?"viewed":"unseen"))}catch(W){k(st,W instanceof Error?W.message:String(W))}finally{k(Z,!1)}}}async function yd(g,x){if(!(!r(j)||x==="stale")){k(Z,!0);try{r(Ce)?await ns({type:"judgment.changed",changeId:g,judgmentState:x}):await La(await Nh(r(j),g,x))}catch(C){k(st,C instanceof Error?C.message:String(C))}finally{k(Z,!1)}}}async function ia(g){!g||r(Z)||(k(ft,g),k(mr,""),k(Ir,!1),await Qs(),r(ga)?.focus())}async function _d(){if(!(!r(j)||!r(ft))){k(Z,!0);try{r(Ce)?await ns({type:"thread.created",anchor:{type:r(ft).type,ref:r(ft).ref,fingerprint:r(ft).fingerprint},body:r(mr),kind:r(Ca),requestAgentAttention:r(Ir)}):await La(await Ch(r(j),r(ft),r(mr),r(Ca),new Date().toISOString(),r(Ir))),k(ft,null),k(mr,""),k(Ir,!1)}catch(g){k(st,g instanceof Error?g.message:String(g))}finally{k(Z,!1)}}}async function wd(g){if(r(j)){k(Z,!0);try{r(Ce)?await ns({type:"thread.resolved",threadId:g}):await La(await jh(r(j),g))}catch(x){k(st,x instanceof Error?x.message:String(x))}finally{k(Z,!1)}}}async function bd(g,x){if(r(j)){k(Z,!0);try{r(Ce)?await ns({type:"agent-attention.changed",threadId:g,requested:x}):await La(await Lh(r(j),g,x)),k(_,null),k(P,"")}catch(C){k(st,C instanceof Error?C.message:String(C))}finally{k(Z,!1)}}}async function Pd(){if(!(!r(j)||!r(i))){k(Z,!0);try{const g=r(Ce)?await ss("review/export",{method:"POST",body:JSON.stringify({schemaVersion:"1.0",reportId:r(i).reportId,expectedRevision:r(j).state.revision})}):Th(r(j),Wr);wi(`${r(i)?.reportId??"utsuri"}-review.json`,g)}catch(g){k(st,g instanceof Error?g.message:String(g))}finally{k(Z,!1)}}}function wi(g,x){const C=new Blob([`${JSON.stringify(x,null,2)}\n`],{type:"application/json"}),V=URL.createObjectURL(C),W=document.createElement("a");W.href=V,W.download=g,W.click(),URL.revokeObjectURL(V)}function kd(g){return`Process the pending Utsuri review items.\nReport: ${g.reportId}\nBatch: ${g.id}`}async function xd(){if(!(!r(j)||!r(i))){k(le,!0);try{if(r(Ce)){const g=await ss("feedback-batches/preview",{method:"POST",body:JSON.stringify({schemaVersion:"1.0",reportId:r(i).reportId,expectedRevision:r(j).state.revision,deliveryMode:"return-to-session"})});k(_,g.preview)}else k(_,await Bh(r(j)));U=`ui:${r(_).batch.id}`,k(P,"")}catch(g){k(st,g instanceof Error?g.message:String(g))}finally{k(le,!1)}}}async function Ad(){if(!(!r(_)||!r(j)||!r(i))){k(le,!0);try{if(r(Ce)){const g=await ss("feedback-batches",{method:"POST",body:JSON.stringify({schemaVersion:"1.0",reportId:r(i).reportId,expectedRevision:r(j).state.revision,idempotencyKey:U,deliveryMode:"return-to-session"})});k(_,g.preview),fn(g)}else wi(`${r(i).reportId}-${r(_).batch.id.replace(":","-")}.json`,{schemaVersion:"1.0",batch:r(_).batch,contexts:r(_).contexts,preview:{shared:r(_).shared,excluded:r(_).excluded,redactionCount:r(_).redactionCount,contextBytes:r(_).contextBytes,destination:r(_).destination}});k(P,kd(r(_).batch))}catch(g){k(st,g instanceof Error?g.message:String(g))}finally{k(le,!1)}}}async function Id(){if(r(P))try{await navigator.clipboard.writeText(r(P)),k(st,r(s).handoffCopied)}catch(g){k(st,g instanceof Error?g.message:String(g))}}async function $d(g){if(!(!r(j)||!g)){if(r(Ce)){k(st,"Import is available only in static report mode"),Fo(Lr,r(Lr).value="");return}k(Z,!0);try{if(g.size>16*1024*1024)throw new Error("Review bundle exceeds 16 MiB");const x=await zh(r(j),JSON.parse(await g.text()),{reanchor:r(ts)});await La(x.store);const C=x.reanchored.reduce((V,W)=>(V[W.disposition]+=1,V),{matched:0,stale:0,orphaned:0});k(st,`${C.matched} matched · ${C.stale} stale · ${C.orphaned} orphaned · ${x.conflicts.length} conflicts`)}catch(x){k(st,x instanceof Error?x.message:String(x))}finally{Fo(Lr,r(Lr).value=""),k(Z,!1)}}}function bi(g){return g==="action-required"?r(s).action:g==="needs-confirmation"?r(s).confirm:r(s).clear}function qd(g){return r(fr).filter(x=>Ls(x)===g).length}function mn(g,x){history.pushState(null,"",`#${g}=${encodeURIComponent(x)}`)}async function Xt(g){await Qs(),document.getElementById(g)?.focus({preventScroll:!1})}function Pi(g,x=!0){x&&(b=J("queue",g.id)),k(u,g.id),k(f,""),k(S,""),k(G,""),k(H,0),k(X,0),k(fe,!1),mn("change",g.id),Xt(J("change",g.id))}function vn(g){k(f,g),mn("hunk",g),Xt(J("hunk",g))}function ki(){k(f,""),Xt("visual-evidence-heading")}function Or(g){if(g==="blink"&&r(ue)){k(O,"side-by-side"),k(fe,!1);return}k(O,g),k(fe,g==="blink"&&!r(ue))}function Rd(g){k(S,g),k(G,""),k(H,0)}function Sd(g){k(G,g),k(H,0)}async function Ed(g){k(H,g),await Qs(),document.getElementById(`visual-region-${g}`)?.scrollIntoView({block:"center",inline:"center",behavior:"smooth"})}function xi(g,x){if(B||!g||!x)return;B=!0;const C=g.scrollHeight-g.clientHeight,V=g.scrollWidth-g.clientWidth,W=x.scrollHeight-x.clientHeight,Ge=x.scrollWidth-x.clientWidth;x.scrollTop=C>0?g.scrollTop/C*W:0,x.scrollLeft=V>0?g.scrollLeft/V*Ge:0,requestAnimationFrame(()=>B=!1)}function gn(g){const x=g.coverage.knownUsages,C=x===null?`${g.coverage.verifiedUsages} verified; known usage count unavailable`:`${g.coverage.verifiedUsages} of ${x} known usages verified`;return g.coverage.unknownPossible?`${C}; additional usage may exist`:C}function Ai(g){const x=g.target;if(!(x?.isContentEditable||new Set(["INPUT","TEXTAREA","SELECT"]).has(x?.tagName??"")||g.metaKey||g.ctrlKey||g.altKey)){if(g.key==="/"){g.preventDefault(),r(Ee)?.focus();return}if(g.key==="1")Or("side-by-side");else if(g.key==="2")Or("wipe");else if(g.key==="3")Or("pixel-diff");else if(g.key==="4")Or("blink");else if(g.key==="5")Or("after-only");else if((g.key==="j"||g.key==="k")&&r(i)?.changes.length){const C=r(i).changes.findIndex(W=>W.id===r(u)),V=g.key==="j"?1:-1;Pi(r(i).changes[(C+V+r(i).changes.length)%r(i).changes.length])}else if((g.key==="n"||g.key==="p")&&r($t).length){const C=g.key==="n"?1:-1;k(X,(r(X)+C+r($t).length)%r($t).length),Xt(J("finding",r($t)[r(X)].id))}else g.key==="e"&&ki()}}function Nd(g){b=J("queue-hunk",g),k(u,""),vn(g)}function Ii(){k(f,""),history.pushState(null,"","#queue"),Xt(b||"queue-heading")}function Cd(){k(f,""),r(q)&&(mn("change",r(q).id),Xt(J("change",r(q).id)))}function yn(){if(!r(i))return;const g=location.hash.match(/^#(change|hunk)=(.+)$/u);if(!g){k(u,r(u)||(r(i).changes[0]?.id??""));return}let x="";try{x=decodeURIComponent(g[2]??"")}catch{k(u,r(u)||(r(i).changes[0]?.id??""));return}if(g[1]==="change"&&r(i).changes.some(C=>C.id===x)){k(u,x),k(f,""),Xt(J("change",x));return}g[1]==="hunk"&&r(i).hunks.some(C=>C.id===x)&&(k(u,r(i).changes.find(C=>C.hunkRefs.includes(x))?.id??""),k(f,x),Xt(J("hunk",x)))}async function Ld(){try{vd();const g=document.querySelector("[data-utsuri-report]"),x=document.querySelector("[data-utsuri-manifest]");let C=null;if(g?.textContent)k(i,JSON.parse(g.textContent)),C=x?.textContent?JSON.parse(x.textContent):null;else{const[V,W]=await Promise.all([fetch("./report.json",{credentials:"omit"}),fetch("./manifest.json",{credentials:"omit"})]);if(!V.ok)throw new Error(`HTTP ${V.status}`);k(i,await V.json()),C=W.ok?await W.json():null}C&&(Wr={base:C.source?.base??null,head:C.source?.head??null});try{r(Ce)?(k(j,await hd(r(i),new Date().toISOString())),await _i(),gd()):k(j,await Rh(r(i)))}catch(V){k(sa,V instanceof Error?V.message:String(V))}k(u,r(i).changes[0]?.id??""),document.querySelector("[data-static-fallback]")?.remove(),yn()}catch(g){k(o,`Interactive data unavailable: ${g instanceof Error?g.message:String(g)}`)}}function $i(g){if(ie.has(g.id))return g.lines.map((V,W)=>({kind:"line",line:V,index:W}));const x=g.lines.map(()=>!1);g.lines.forEach((V,W)=>{if(V.kind==="addition"||V.kind==="deletion")for(let Ge=Math.max(0,W-3);Ge<=Math.min(g.lines.length-1,W+3);Ge+=1)x[Ge]=!0}),x.some(Boolean)||x.fill(!0);const C=[];for(let V=0;V<g.lines.length;)if(x[V])C.push({kind:"line",line:g.lines[V],index:V}),V+=1;else{let W=V+1;for(;W<g.lines.length&&!x[W];)W+=1;C.push({kind:"fold",count:W-V}),V=W}return C}function qi(g){ie=new Set([...ie,g])}function jd(g,x){const C=g.lines[x];if(!C||C.kind!=="addition"&&C.kind!=="deletion")return;const V=C.kind==="addition"?"deletion":"addition";for(let W=1;W<=6;W+=1)for(const Ge of[x-W,x+W]){const Tr=g.lines[Ge];if(Tr?.kind===V)return Tr;if(Tr&&Tr.kind==="context")break}}function _n(g,x){const C=g.lines[x],V=jd(g,x);if(!V)return[{text:C.content,changed:C.kind==="addition"||C.kind==="deletion"}];let W=0;for(;W<C.content.length&&C.content[W]===V.content[W];)W+=1;let Ge=0;for(;Ge<C.content.length-W&&Ge<V.content.length-W&&C.content[C.content.length-Ge-1]===V.content[V.content.length-Ge-1];)Ge+=1;return[{text:C.content.slice(0,W),changed:!1},{text:C.content.slice(W,Ge?-Ge:void 0),changed:!0},{text:Ge?C.content.slice(-Ge):"",changed:!1}].filter(Tr=>Tr.text.length>0)}Yl(()=>(k(l,navigator.language.toLowerCase().startsWith("ja")?"ja":"en"),Ld(),k(ue,window.matchMedia("(prefers-reduced-motion: reduce)").matches),window.addEventListener("hashchange",yn),window.addEventListener("keydown",Ai),()=>{window.removeEventListener("hashchange",yn),window.removeEventListener("keydown",Ai)})),ur(()=>r(l),()=>{k(s,n[r(l)])}),ur(()=>(r(i),r(u)),()=>{k(q,r(i)?.changes.find(g=>g.id===r(u)))}),ur(()=>(r(q),r(i)),()=>{k(me,r(q)?r(q).hunkRefs.map(g=>r(i)?.hunks.find(x=>x.id===g)).filter(g=>g!==void 0):[])}),ur(()=>(r(q),r(i)),()=>{k(Fe,r(q)&&r(i)?r(i).evidence.filter(g=>r(q)?.intent.evidenceRefs.includes(g.id)||g.hunkRefs.some(x=>r(q)?.hunkRefs.includes(x))):[])}),ur(()=>(r(i),r(m)),()=>{k(fr,r(i)?r(i).changes.filter(g=>`${g.title} ${g.summary}`.toLocaleLowerCase().includes(r(m).toLocaleLowerCase())):[])}),ur(()=>(r(q),r(i)),()=>{k(at,r(q)&&r(i)?r(i).comparisons.filter(g=>r(q)?.targetRefs.includes(g.targetRef)):[])}),ur(()=>(r(at),r(S)),()=>{k(ce,r(at).find(g=>g.id===r(S))??r(at)[0])}),ur(()=>(r(ce),r(G)),()=>{k(E,r(ce)?.images.find(g=>g.id===r(G))??r(ce)?.images[0])}),ur(()=>(r(q),r(i)),()=>{k($t,r(q)&&r(i)?r(i).findings.filter(g=>r(q)?.findingRefs.includes(g.id)||(g.targetRef?r(q)?.targetRefs.includes(g.targetRef):!1)):[])}),ur(()=>(r(q),r(j)),()=>{k(jr,r(q)&&r(j)?r(j).threads.filter(g=>md(g.anchor,r(q))):[])}),ur(()=>(r(jr),r(ce),r(E)),()=>{k(d,r(jr).filter(g=>g.state!=="resolved"&&g.anchor.type==="visual-region"&&!!g.anchor.region&&!!(r(ce)&&r(E))&&g.anchor.ref.startsWith(`${r(ce).id}:${r(E).id}:`)))}),ur(()=>r(j),()=>{k(p,r(j)?.threads.filter(g=>g.agentAttention.state==="requested").length??0)}),ur(()=>r(v),()=>{k(e,r(v).reduce((g,x)=>g+x.unreadAnswerItemIds.length,0))}),zc(),ch();var Ri=us(),Od=Vr(Ri);{var Td=g=>{var x=Df(),C=c(x),V=y(c(C),2),W=y(c(V),2),Ge=c(W),Tr=y(W,2),js=c(Tr),Os=y(V,2),Md=c(Os),Si=y(C,2),Ei=c(Si),Vd=y(c(Ei),2),Fd=c(Vd),Ni=y(Ei,2),Ci=c(Ni),Dd=c(Ci),Li=y(Ci,2);hs(Li,ve=>k(Ee,ve),()=>r(Ee));var ji=y(Ni,2),Oi=c(ji);ye(Oi,0,()=>["action-required","needs-confirmation","no-issue"],ve=>ve,(ve,F)=>{var De=Wh(),bt=c(De),Dt=c(bt),Pt=c(Dt),er=y(Dt,2),Bt=c(er),Ht=y(bt,2);ye(Ht,7,()=>(r(fr),h(()=>r(fr).filter(je=>Ls(je)===F))),je=>je.id,(je,Ie,Be)=>{var Oe=Hh(),ke=c(Oe),mt=c(ke),qt=c(mt),Ct=y(mt,2),Lt=c(Ct),vr=c(Lt),$r=y(Lt,2),kt=c($r),$e=c(kt),tr=y(kt,2);{var jt=vt=>{var Rt=Us(),Qe=c(Rt);N(()=>w(Qe,`${r(Ie),h(()=>r(Ie).verification.gaps.length)??""} gaps`)),$(vt,Rt)};Q(tr,vt=>{r(Ie),h(()=>r(Ie).verification.gaps.length>0)&&vt(jt)})}N((vt,Rt,Qe)=>{M(ke,"id",vt),M(ke,"href",Rt),M(ke,"aria-current",(r(u),r(Ie),h(()=>r(u)===r(Ie).id?"page":void 0))),w(qt,Qe),w(vr,(r(Ie),h(()=>r(Ie).title))),w($e,(r(Ie),h(()=>r(Ie).risk.level)))},[()=>(r(Ie),h(()=>J("queue",r(Ie).id))),()=>(r(Ie),h(()=>`#change=${encodeURIComponent(r(Ie).id)}`)),()=>(We(r(Be)),h(()=>String(r(Be)+1).padStart(2,"0")))]),Y("click",ke,vt=>{vt.preventDefault(),Pi(r(Ie))}),$(je,Oe)}),N((je,Ie)=>{M(De,"data-queue",F),w(Pt,je),w(Bt,Ie)},[()=>h(()=>bi(F)),()=>h(()=>qd(F))]),$(ve,De)});var Bd=y(Oi,2);{var Hd=ve=>{var F=Uh(),De=c(F),bt=c(De),Dt=c(bt),Pt=y(bt),er=c(Pt),Bt=y(De,2);ye(Bt,7,()=>(r(i),h(()=>r(i).unclassifiedHunkRefs)),Ht=>Ht,(Ht,je,Ie)=>{const Be=ka(()=>(r(i),r(je),h(()=>r(i).hunks.find(qt=>qt.id===r(je)))));var Oe=us(),ke=Vr(Oe);{var mt=qt=>{var Ct=Zh(),Lt=c(Ct),vr=c(Lt),$r=c(vr),kt=y(vr,2),$e=c(kt),tr=c($e),jt=y($e),vt=c(jt);N((Rt,Qe)=>{M(Lt,"id",Rt),M(Lt,"href",Qe),w($r,`U${r(Ie)+1}`),w(tr,(We(r(Be)),h(()=>r(Be).path))),w(vt,`@@ ${We(r(Be)),h(()=>r(Be).oldStart)??""} → ${We(r(Be)),h(()=>r(Be).newStart)??""}`)},[()=>(r(je),h(()=>J("queue-hunk",r(je)))),()=>(r(je),h(()=>`#hunk=${encodeURIComponent(r(je))}`))]),Y("click",Lt,Rt=>{Rt.preventDefault(),Nd(r(je))}),$(qt,Ct)};Q(ke,qt=>{r(Be)&&qt(mt)})}$(Ht,Oe)}),N(()=>{w(Dt,(r(s),h(()=>r(s).unclassified))),w(er,(r(i),h(()=>r(i).unclassifiedHunkRefs.length)))}),$(ve,F)};Q(Bd,ve=>{r(i),h(()=>r(i).unclassifiedHunkRefs.length>0)&&ve(Hd)})}var Ti=y(Si,2),zi=c(Ti),Mi=c(zi),Vi=c(Mi),Wd=c(Vi),Fi=y(Vi,2),Zd=c(Fi),Ud=y(Fi,2),Kd=c(Ud),Di=y(Mi,2),Bi=c(Di),Hi=c(Bi),Jd=c(Hi),Yd=y(Hi,2),Gd=c(Yd),Wi=y(Bi,2),Zi=c(Wi),Qd=c(Zi),Xd=y(Zi,2),ep=c(Xd),Ui=y(Wi,2),Ki=c(Ui),tp=c(Ki),rp=y(Ki,2),ap=c(rp),Ji=y(Ui,2),Yi=c(Ji),sp=c(Yi),np=y(Yi,2),ip=c(np),op=y(Ji,2),Gi=c(op),lp=c(Gi),dp=y(Gi,2),pp=c(dp),Qi=y(Di,2),Xi=c(Qi),eo=y(c(Xi),2),up=c(eo),cp=y(eo,2),hp=c(cp),fp=y(Xi,2),to=c(fp),ro=c(to),mp=c(ro),vp=y(ro,2),gp=c(vp),ao=y(to,2),so=c(ao),yp=c(so),_p=y(so,2),wp=c(_p),bp=y(ao,2),no=c(bp),Pp=c(no),kp=y(no,2),xp=c(kp),Ap=y(Qi,2),io=c(Ap),Ip=c(io),$p=y(io,2);ye($p,5,()=>(r(i),h(()=>r(i).files)),ve=>ve.id,(ve,F)=>{var De=Jh(),bt=c(De),Dt=c(bt),Pt=y(bt,2),er=c(Pt),Bt=y(Pt,2),Ht=c(Bt),je=y(Bt,2);{var Ie=Be=>{var Oe=Kh(),ke=c(Oe),mt=y(ke,2),qt=c(mt);N(Ct=>{za(ke,Ct),ke.disabled=r(Z),w(qt,(r(s),h(()=>r(s).viewed)))},[()=>(r(j),r(F),h(()=>as(r(j),"file",r(F).id)))]),Y("change",ke,Ct=>{is("file",r(F).id,Ct.currentTarget.checked)}),$(Be,Oe)};Q(je,Be=>{r(j)&&Be(Ie)})}N(()=>{w(Dt,(r(F),h(()=>r(F).status))),w(er,(r(F),h(()=>r(F).oldPath&&r(F).newPath&&r(F).oldPath!==r(F).newPath?`${r(F).oldPath} → ${r(F).newPath}`:r(F).newPath??r(F).oldPath))),w(Ht,(r(F),h(()=>r(F).binary?"binary":`+${r(F).additions??0} / −${r(F).deletions??0}`)))}),$(ve,De)});var qp=y(zi,2);{var Rp=ve=>{var F=Ef(),De=c(F),bt=c(De),Dt=y(De,2),Pt=c(Dt),er=c(Pt),Bt=c(er),Ht=y(er,2),je=c(Ht),Ie=y(Pt,2),Be=c(Ie),Oe=c(Be),ke=y(Be,2),mt=c(ke),qt=y(ke,2),Ct=c(qt),Lt=y(Dt,2),vr=c(Lt),$r=c(vr),kt=y(c($r),2),$e=c(kt),tr=y(kt,2);{var jt=T=>{var A=Va(),D=c(A);N((L,we,be)=>w(D,`${r(s),h(()=>r(s).reviewProgress)??""}: ${L??""}\n ${we??""} ·\n ${r(j),h(()=>r(j).threads.length)??""}\n ${be??""}`),[()=>(r(j),h(()=>Object.values(r(j).state.viewed).filter(L=>L.state==="viewed").length)),()=>(r(s),h(()=>r(s).viewed.toLocaleLowerCase())),()=>(r(s),h(()=>r(s).comments.toLocaleLowerCase()))]),$(T,A)},vt=T=>{var A=Va(),D=c(A);N(()=>w(D,(r(s),h(()=>r(s).reviewUnavailable)))),$(T,A)};Q(tr,T=>{r(j)?T(jt):T(vt,-1)})}var Rt=y($r,2),Qe=c(Rt),Ot=c(Qe),gr=y(Ot,2),oa=c(gr),Zr=y(Qe,2),os=c(Zr),Ur=y(Zr,2),ja=c(Ur),la=y(Ur,2);hs(la,T=>k(Lr,T),()=>r(Lr));var Kr=y(vr,2);{var wn=T=>{var A=Yh(),D=Vr(A),L=c(D),we=c(L),be=c(we),ge=y(we,2),Le=c(ge);ye(Le,0,()=>["unreviewed","reviewed","follow-up","blocked"],se=>se,(se,I)=>{var re=Ks(),de=c(re),ze={};N(zt=>{w(de,zt),ze!==(ze=I)&&(re.value=(re.__value=I)??"")},[()=>h(()=>fd(I))]),$(se,re)});var Te=y(Le);{var et=se=>{var I=Ks(),re=c(I);I.value=I.__value="stale",N(()=>w(re,(r(s),h(()=>r(s).stale)))),$(se,I)},gt=xc(()=>(r(j),r(q),h(()=>hn(r(j),r(q).id)==="stale")));Q(Te,se=>{r(gt)&&se(et)})}var St;Xs(ge);var rr=y(L,2),ct=c(rr),Tt=y(ct,2),Wt=c(Tt),Ue=y(rr,2),Zt=c(Ue),yt=y(D,2),ar=c(yt);N((se,I,re)=>{w(be,(r(s),h(()=>r(s).humanJudgment))),ge.disabled=se,St!==(St=I)&&(ge.value=(ge.__value=I)??"",xs(ge,I)),za(ct,re),ct.disabled=r(Z),w(Wt,(r(s),h(()=>r(s).viewed))),Ue.disabled=r(Z),w(Zt,(r(s),h(()=>r(s).comment))),w(ar,(r(s),h(()=>r(s).localOnly)))},[()=>(r(Z),r(j),r(q),h(()=>r(Z)||hn(r(j),r(q).id)==="stale")),()=>(r(j),r(q),h(()=>hn(r(j),r(q).id))),()=>(r(j),r(q),h(()=>as(r(j),"change",r(q).id)))]),Y("change",ge,se=>{yd(r(q).id,se.currentTarget.value)}),Y("change",ct,se=>{is("change",r(q).id,se.currentTarget.checked)}),Y("click",Ue,()=>{ia(na("change",r(q).id))}),$(T,A)};Q(Kr,T=>{r(j)&&T(wn)})}var Ts=y(Kr,2);{var bn=T=>{var A=Gh(),D=c(A);N(()=>w(D,r(sa))),$(T,A)};Q(Ts,T=>{r(sa)&&T(bn)})}var Pn=y(Ts,2);{var kn=T=>{var A=Qh(),D=c(A);N(()=>w(D,r(st))),$(T,A)};Q(Pn,T=>{r(st)&&T(kn)})}var nt=y(Lt,2),Xe=c(nt),qr=c(Xe),Oa=y(c(qr),2),xn=c(Oa),zs=y(Xe,2),Ms=c(zs),Vs=c(Ms),An=c(Vs),oo=y(Vs,2),Lp=c(oo),jp=y(oo,2),Op=c(jp),lo=y(Ms,2),po=c(lo),Tp=c(po),zp=y(po,2),Mp=c(zp),uo=y(lo,2),co=c(uo),Vp=c(co),Fp=y(co,2);{var Dp=T=>{var A=Xh();ye(A,5,()=>(r(q),h(()=>r(q).userImpact)),Qr,(D,L)=>{var we=Hn(),be=c(we);N(()=>w(be,r(L))),$(D,we)}),$(T,A)},Bp=T=>{var A=Va(),D=c(A);N(()=>w(D,(r(s),h(()=>r(s).noImpact)))),$(T,A)};Q(Fp,T=>{r(q),h(()=>r(q).userImpact.length>0)?T(Dp):T(Bp,-1)})}var ho=y(uo,2),fo=c(ho),Hp=c(fo),Wp=y(fo,2);ye(Wp,5,()=>(r(q),h(()=>r(q).risk.reasons)),Qr,(T,A)=>{var D=Hn(),L=c(D);N(()=>w(L,r(A))),$(T,D)});var mo=y(ho,2),vo=c(mo),Zp=c(vo),Up=y(vo,2);ye(Up,5,()=>(r(q),h(()=>r(q).verification.gaps)),Qr,(T,A,D)=>{var L=tf(),we=c(L),be=c(we),ge=y(we,2);{var Le=Te=>{var et=ef(),gt=c(et);N(()=>{et.disabled=r(Z),w(gt,(r(s),h(()=>r(s).comment)))}),Y("click",et,()=>{ia(na("verification-gap",`${r(q).id}:gap:${D}`))}),$(Te,et)};Q(ge,Te=>{r(j)&&Te(Le)})}N(()=>w(be,r(A))),$(T,L)});var Kp=y(mo,2),go=c(Kp),Jp=c(go),Yp=y(go,2);ye(Yp,5,()=>(r(q),h(()=>r(q).verification.verified)),Qr,(T,A)=>{var D=Hn(),L=c(D);N(()=>w(L,r(A))),$(T,D)});var yo=y(nt,2),_o=c(yo),Gp=c(_o),wo=c(Gp),Qp=c(wo),bo=y(wo,2),Xp=c(bo),Po=y(bo,2),eu=c(Po),tu=y(Po,2),ru=c(tu),ko=y(_o,2);{var au=T=>{var A=ff(),D=Vr(A),L=c(D);{var we=te=>{var qe=rf(),ne=y(c(qe),2);ye(ne,5,()=>r(at),Me=>Me.id,(Me,tt)=>{const rt=ka(()=>(r(i),r(tt),h(()=>r(i).targets.find(ir=>ir.id===r(tt).targetRef))));var xt=Ks(),nr=c(xt),Rr={};N(()=>{w(nr,`${We(r(rt)),r(tt),h(()=>r(rt)?.routeOrStory??r(tt).targetRef)??""} · ${We(r(rt)),h(()=>r(rt)?.viewport)??""} · ${We(r(rt)),h(()=>r(rt)?.state)??""}`),Rr!==(Rr=(r(tt),h(()=>r(tt).id)))&&(xt.value=(xt.__value=(r(tt),h(()=>r(tt).id)))??"")}),$(Me,xt)});var Et;Xs(ne),N(()=>{Et!==(Et=(r(ce),h(()=>r(ce)?.id)))&&(ne.value=(ne.__value=(r(ce),h(()=>r(ce)?.id)))??"",xs(ne,(r(ce),h(()=>r(ce)?.id))))}),Y("change",ne,Me=>Rd(Me.currentTarget.value)),$(te,qe)};Q(L,te=>{r(at),h(()=>r(at).length>1)&&te(we)})}var be=y(L,2);{var ge=te=>{var qe=af(),ne=c(qe),Et=c(ne),Me=y(ne,2);ye(Me,5,()=>(r(ce),h(()=>r(ce).images)),rt=>rt.id,(rt,xt)=>{var nr=Ks(),Rr=c(nr),ir={};N(()=>{w(Rr,(r(xt),h(()=>r(xt).label))),ir!==(ir=(r(xt),h(()=>r(xt).id)))&&(nr.value=(nr.__value=(r(xt),h(()=>r(xt).id)))??"")}),$(rt,nr)});var tt;Xs(Me),N(()=>{w(Et,(r(s),h(()=>r(s).imageScope))),tt!==(tt=(r(E),h(()=>r(E)?.id)))&&(Me.value=(Me.__value=(r(E),h(()=>r(E)?.id)))??"",xs(Me,(r(E),h(()=>r(E)?.id))))}),Y("change",Me,rt=>Sd(rt.currentTarget.value)),$(te,qe)};Q(be,te=>{r(ce),h(()=>r(ce)&&r(ce).images.length>1)&&te(ge)})}var Le=y(be,2);{var Te=te=>{var qe=sf(),ne=c(qe),Et=y(ne,2),Me=c(Et);N(tt=>{za(ne,tt),ne.disabled=r(Z),w(Me,(r(s),h(()=>r(s).viewed)))},[()=>(r(j),r(ce),h(()=>as(r(j),"visual-target",r(ce).targetRef)))]),Y("change",ne,tt=>{is("visual-target",r(ce).targetRef,tt.currentTarget.checked)}),$(te,qe)};Q(Le,te=>{r(ce)&&r(j)&&te(Te)})}var et=y(Le,2),gt=c(et),St=c(gt),rr=y(gt,2),ct=y(D,2),Tt=c(ct),Wt=c(Tt),Ue=y(Tt,2),Zt=c(Ue),yt=y(Ue,2),ar=c(yt),se=y(yt,2),I=c(se),re=y(se,2),de=c(re),ze=y(ct,2);{var zt=te=>{var qe=nf(),ne=y(c(qe),2),Et=c(ne);N(Me=>w(Et,Me),[()=>(r(ce),h(()=>r(ce).incompleteReasons.join(", ")))]),$(te,qe)};Q(ze,te=>{r(ce),h(()=>r(ce)?.status==="incomplete")&&te(zt)})}var sr=y(ze,2);{var Mt=te=>{var qe=hf(),ne=Vr(qe),Et=c(ne),Me=y(c(Et),2),tt=c(Me),rt=y(Et,2),xt=y(c(rt),2),nr=c(xt),Rr=y(rt,2),ir=c(Rr),zr=c(ir),Ut=y(ir,2),ya=c(Ut),_a=y(Rr,2),ls=y(c(_a),2),$n=c(ls),Ds=y(ne,2);{var qn=Ve=>{var it=of(),ot=c(it),He=c(ot),dr=c(He),At=y(He,2),_t=c(At),lt=c(_t);hs(At,Vt=>k(Nt,Vt),()=>r(Nt));var Kt=y(ot,2),Ke=c(Kt),Ne=c(Ke),_e=y(Ke,2),Pe=c(_e),dt=c(Pe),Jt=y(dt,2);ye(Jt,3,()=>(r(E),h(()=>r(E).regions)),Vt=>Vt.id,(Vt,It,Gr)=>{var pr=tl();let Bs;var Sn=c(pr);N(()=>{M(pr,"id",`visual-region-${r(Gr)}`),Bs=cr(pr,1,"region-marker",null,Bs,{"active-region":r(H)===r(Gr)}),Yt(pr,(r(It),r(E),h(()=>`left:${r(It).x/r(E).width*100}%;top:${r(It).y/r(E).height*100}%;width:${r(It).width/r(E).width*100}%;height:${r(It).height/r(E).height*100}%`))),w(Sn,r(Gr)+1)}),$(Vt,pr)});var Yr=y(Jt,2);ye(Yr,3,()=>r(d),Vt=>Vt.id,(Vt,It,Gr)=>{var pr=ms(),Bs=c(pr);N(Sn=>{Yt(pr,Sn),M(pr,"aria-label",(r(s),We(r(Gr)),r(It),h(()=>`${r(s).comment} pin ${r(Gr)+1}: ${r(It).state}`))),w(Bs,r(Gr)+1)},[()=>(r(It),h(()=>rs(r(It).anchor)))]),Y("click",pr,()=>{Xt(J("thread",r(It).id))}),$(Vt,pr)}),hs(_e,Vt=>k(Ae,Vt),()=>r(Ae)),N(()=>{w(dr,`Before · ${r(E),h(()=>r(E).label)??""}`),Yt(_t,`width: ${r(ee)}%`),M(lt,"src",(r(E),h(()=>`./${r(E).beforeRef}`))),M(lt,"alt",(r(E),h(()=>`Before capture for ${r(E).label}`))),w(Ne,`After · ${r(E),h(()=>r(E).label)??""}`),Yt(Pe,`width: ${r(ee)}%`),M(dt,"src",(r(E),h(()=>`./${r(E).afterRef}`))),M(dt,"alt",(r(E),h(()=>`After capture for ${r(E).label}`)))}),Cn("scroll",At,()=>xi(r(Nt),r(Ae))),Cn("scroll",_e,()=>xi(r(Ae),r(Nt))),$(Ve,it)},Rn=Ve=>{var it=lf(),ot=Vr(it),He=c(ot),dr=c(He),At=y(He,2),_t=y(ot,2),lt=c(_t),Kt=c(lt),Ke=y(lt,2),Ne=c(Ke),_e=c(Ne),Pe=y(_e,2),dt=y(Pe,2);ye(dt,3,()=>r(d),Jt=>Jt.id,(Jt,Yr,Vt)=>{var It=ms(),Gr=c(It);N(pr=>{Yt(It,pr),M(It,"aria-label",(r(s),We(r(Vt)),r(Yr),h(()=>`${r(s).comment} pin ${r(Vt)+1}: ${r(Yr).state}`))),w(Gr,r(Vt)+1)},[()=>(r(Yr),h(()=>rs(r(Yr).anchor)))]),Y("click",It,()=>{Xt(J("thread",r(Yr).id))}),$(Jt,It)}),N(()=>{w(dr,`${r(s),h(()=>r(s).wipePosition)??""}: ${r(he)??""}%`),w(Kt,`Before / after wipe · ${r(E),h(()=>r(E).label)??""}`),Yt(Ne,`width: ${r(ee)}%`),M(_e,"src",(r(E),h(()=>`./${r(E).beforeRef}`))),M(_e,"alt",(r(E),h(()=>`Before capture for ${r(E).label}`))),Yt(Pe,`clip-path: inset(0 ${100-r(he)}% 0 0)`),M(Pe,"src",(r(E),h(()=>`./${r(E).afterRef}`))),M(Pe,"alt",`After capture revealed to ${r(he)}%`)}),Ws(At,()=>r(he),Jt=>k(he,Jt)),$(Ve,it)},or=Ve=>{var it=df(),ot=c(it),He=c(ot),dr=y(ot,2),At=c(dr),_t=c(At),lt=y(_t,2);let Kt;var Ke=y(lt,2);ye(Ke,3,()=>r(d),Ne=>Ne.id,(Ne,_e,Pe)=>{var dt=ms(),Jt=c(dt);N(Yr=>{Yt(dt,Yr),M(dt,"aria-label",(r(s),We(r(Pe)),r(_e),h(()=>`${r(s).comment} pin ${r(Pe)+1}: ${r(_e).state}`))),w(Jt,r(Pe)+1)},[()=>(r(_e),h(()=>rs(r(_e).anchor)))]),Y("click",dt,()=>{Xt(J("thread",r(_e).id))}),$(Ne,dt)}),N(()=>{w(He,`${r(fe)?"Blink running; use Stop blink to pause":"Blink paused"} ·\n ${r(E),h(()=>r(E).label)??""}`),Yt(At,`width: ${r(ee)}%`),M(_t,"src",(r(E),h(()=>`./${r(E).beforeRef}`))),M(_t,"alt",(r(E),h(()=>`Before capture for ${r(E).label}`))),Kt=cr(lt,1,"blink-after",null,Kt,{"blink-running":r(fe)}),M(lt,"src",(r(E),h(()=>`./${r(E).afterRef}`))),M(lt,"alt",(r(E),h(()=>`After capture for ${r(E).label}`)))}),$(Ve,it)},lr=Ve=>{var it=pf(),ot=c(it),He=c(ot),dr=y(ot,2),At=c(dr),_t=c(At),lt=y(_t,2);ye(lt,3,()=>r(d),Kt=>Kt.id,(Kt,Ke,Ne)=>{var _e=ms(),Pe=c(_e);N(dt=>{Yt(_e,dt),M(_e,"aria-label",(r(s),We(r(Ne)),r(Ke),h(()=>`${r(s).comment} pin ${r(Ne)+1}: ${r(Ke).state}`))),w(Pe,r(Ne)+1)},[()=>(r(Ke),h(()=>rs(r(Ke).anchor)))]),Y("click",_e,()=>{Xt(J("thread",r(Ke).id))}),$(Kt,_e)}),N(()=>{w(He,`${r(s),h(()=>r(s).pixelDiff)??""} · ${r(E),h(()=>r(E).label)??""}`),Yt(At,`width: ${r(ee)}%`),M(_t,"src",(r(E),h(()=>`./${r(E).diffRef}`))),M(_t,"alt",(r(E),h(()=>`Pixel difference bitmap with ${r(E).diffPixelCount} changed pixels`)))}),$(Ve,it)},ds=Ve=>{var it=uf(),ot=c(it),He=c(ot),dr=y(ot,2),At=c(dr),_t=c(At),lt=y(_t,2);ye(lt,3,()=>(r(E),h(()=>r(E).regions)),Ke=>Ke.id,(Ke,Ne,_e)=>{var Pe=tl();let dt;var Jt=c(Pe);N(()=>{M(Pe,"id",`visual-region-${r(_e)}`),dt=cr(Pe,1,"region-marker",null,dt,{"active-region":r(H)===r(_e)}),Yt(Pe,(r(Ne),r(E),h(()=>`left:${r(Ne).x/r(E).width*100}%;top:${r(Ne).y/r(E).height*100}%;width:${r(Ne).width/r(E).width*100}%;height:${r(Ne).height/r(E).height*100}%`))),w(Jt,r(_e)+1)}),$(Ke,Pe)});var Kt=y(lt,2);ye(Kt,3,()=>r(d),Ke=>Ke.id,(Ke,Ne,_e)=>{var Pe=ms(),dt=c(Pe);N(Jt=>{Yt(Pe,Jt),M(Pe,"aria-label",(r(s),We(r(_e)),r(Ne),h(()=>`${r(s).comment} pin ${r(_e)+1}: ${r(Ne).state}`))),w(dt,r(_e)+1)},[()=>(r(Ne),h(()=>rs(r(Ne).anchor)))]),Y("click",Pe,()=>{Xt(J("thread",r(Ne).id))}),$(Ke,Pe)}),N(()=>{w(He,`${r(s),h(()=>r(s).afterOnly)??""} · ${r(E),h(()=>r(E).label)??""}`),Yt(At,`width: ${r(ee)}%`),M(_t,"src",(r(E),h(()=>`./${r(E).afterRef}`))),M(_t,"alt",(r(E),h(()=>`After capture for ${r(E).label}`)))}),$(Ve,it)};Q(Ds,Ve=>{r(O)==="side-by-side"?Ve(qn):r(O)==="wipe"?Ve(Rn,1):r(O)==="blink"?Ve(or,2):r(O)==="pixel-diff"?Ve(lr,3):Ve(ds,-1)})}var Jr=y(Ds,2),Mr=c(Jr),wa=c(Mr),ps=y(Mr,2);{var ju=Ve=>{var it=rl();ye(it,7,()=>(r(E),h(()=>r(E).regions)),ot=>ot.id,(ot,He,dr)=>{var At=cf(),_t=c(At),lt=c(_t),Kt=c(lt),Ke=y(lt,2);{var Ne=_e=>{var Pe=ba(),dt=c(Pe);N(()=>{Pe.disabled=r(Z),w(dt,(r(s),h(()=>r(s).comment)))}),Y("click",Pe,()=>{ia(na("visual-region",`${r(ce).id}:${r(E).id}:${r(He).id}`))}),$(_e,Pe)};Q(Ke,_e=>{r(j)&&_e(Ne)})}N(()=>{M(lt,"aria-current",r(H)===r(dr)?"true":void 0),w(Kt,`Region ${r(dr)+1} · ${r(He),h(()=>r(He).pixels)??""} px · (${r(He),h(()=>r(He).x)??""}, ${r(He),h(()=>r(He).y)??""}) ${r(He),h(()=>r(He).width)??""}\n × ${r(He),h(()=>r(He).height)??""}`)}),Y("click",lt,()=>{Ed(r(dr))}),$(ot,At)}),$(Ve,it)},Ou=Ve=>{var it=Va(),ot=c(it);N(()=>w(ot,(r(s),h(()=>r(s).noRegions)))),$(Ve,it)};Q(ps,Ve=>{r(E),h(()=>r(E).regions.length>0)?Ve(ju):Ve(Ou,-1)})}N(Ve=>{w(tt,(r(E),h(()=>r(E).diffPixelCount))),w(nr,`${Ve??""}%`),w(zr,(r(s),h(()=>r(s).changedRegions))),w(ya,(r(E),h(()=>r(E).regions.length))),w($n,`${r(E),h(()=>r(E).width)??""} × ${r(E),h(()=>r(E).height)??""}`),w(wa,(r(s),h(()=>r(s).changedRegions)))},[()=>(r(E),h(()=>(r(E).diffRatio*100).toFixed(3)))]),$(te,qe)};Q(sr,te=>{r(E)&&te(Mt)})}N(()=>{w(St,`${r(s),h(()=>r(s).zoom)??""}: ${r(ee)??""}%`),M(ct,"aria-label",(r(s),h(()=>r(s).visualEvidence))),M(Tt,"aria-pressed",r(O)==="side-by-side"),w(Wt,(r(s),h(()=>r(s).sideBySide))),M(Ue,"aria-pressed",r(O)==="wipe"),w(Zt,(r(s),h(()=>r(s).wipe))),M(yt,"aria-pressed",r(O)==="blink"),yt.disabled=r(ue),M(yt,"title",(r(ue),r(s),h(()=>r(ue)?r(s).reducedMotion:void 0))),w(ar,(r(O),r(fe),r(s),h(()=>r(O)==="blink"&&r(fe)?r(s).stopBlink:r(s).blink))),M(se,"aria-pressed",r(O)==="pixel-diff"),w(I,(r(s),h(()=>r(s).pixelDiff))),M(re,"aria-pressed",r(O)==="after-only"),w(de,(r(s),h(()=>r(s).afterOnly)))}),Ws(rr,()=>r(ee),te=>k(ee,te)),Y("click",Tt,()=>Or("side-by-side")),Y("click",Ue,()=>Or("wipe")),Y("click",yt,()=>{r(O)==="blink"?k(fe,!r(fe)):Or("blink")}),Y("click",se,()=>Or("pixel-diff")),Y("click",re,()=>Or("after-only")),$(T,A)},su=T=>{var A=mf(),D=y(c(A),2),L=c(D);N(()=>w(L,(r(s),h(()=>r(s).visualGap)))),$(T,A)};Q(ko,T=>{r(at),h(()=>r(at).length>0)?T(au):T(su,-1)})}var nu=y(ko,2),xo=c(nu),iu=c(xo),Ao=c(iu),ou=c(Ao),lu=y(Ao,2),du=c(lu),pu=y(xo,2);{var uu=T=>{var A=rl();ye(A,7,()=>r($t),D=>D.id,(D,L,we)=>{var be=vf(),ge=c(be);let Le;var Te=c(ge),et=c(Te),gt=c(et),St=y(et),rr=c(St),ct=y(St),Tt=c(ct),Wt=y(Te,2),Ue=c(Wt),Zt=y(Wt,2),yt=c(Zt),ar=y(Zt,2);{var se=de=>{var ze=ba(),zt=c(ze);N(()=>w(zt,(r(s),h(()=>r(s).viewCode)))),Y("click",ze,()=>vn(r(L).hunkRefs[0])),$(de,ze)};Q(ar,de=>{r(L),h(()=>r(L).hunkRefs[0])&&de(se)})}var I=y(ar,2);{var re=de=>{var ze=ba(),zt=c(ze);N(()=>{ze.disabled=r(Z),w(zt,(r(s),h(()=>r(s).comment)))}),Y("click",ze,()=>{ia(na("finding",r(L).id))}),$(de,ze)};Q(I,de=>{r(j)&&de(re)})}N(de=>{M(ge,"id",de),Le=cr(ge,1,"",null,Le,{"active-finding":r(X)===r(we)}),w(gt,(r(L),h(()=>r(L).state))),w(rr,(r(L),h(()=>r(L).severity))),w(Tt,(r(L),h(()=>r(L).category))),w(Ue,(r(L),h(()=>r(L).title))),w(yt,(r(L),h(()=>r(L).description)))},[()=>(r(L),h(()=>J("finding",r(L).id)))]),$(D,be)}),$(T,A)},cu=T=>{var A=Va(),D=c(A);N(()=>w(D,(r(s),h(()=>r(s).noFindings)))),$(T,A)};Q(pu,T=>{r($t),h(()=>r($t).length>0)?T(uu):T(cu,-1)})}var Io=y(yo,2),$o=c(Io),hu=c($o),qo=c(hu),fu=c(qo),mu=y(qo,2),vu=c(mu),Ro=y($o,2);ye(Ro,5,()=>(r(Fe),h(()=>r(Fe).slice(0,3))),T=>T.id,(T,A)=>{var D=gf(),L=c(D),we=c(L),be=y(L),ge=c(be),Le=y(be,2),Te=c(Le);N(()=>{w(we,(r(A),h(()=>r(A).type))),w(ge,(r(A),h(()=>r(A).path))),w(Te,(r(A),h(()=>r(A).summary)))}),$(T,D)});var gu=y(Ro,2);{var yu=T=>{var A=_f(),D=c(A),L=c(D),we=y(D,2);ye(we,5,()=>(r(Fe),h(()=>r(Fe).slice(3))),be=>be.id,(be,ge)=>{var Le=yf(),Te=c(Le),et=c(Te),gt=y(Te);N(()=>{w(et,(r(ge),h(()=>r(ge).path))),w(gt,` — ${r(ge),h(()=>r(ge).summary)??""}`)}),$(be,Le)}),N(()=>w(L,`${r(s),h(()=>r(s).moreEvidence)??""} (${r(Fe),h(()=>r(Fe).length-3)??""})`)),$(T,A)};Q(gu,T=>{r(Fe),h(()=>r(Fe).length>3)&&T(yu)})}var So=y(Io,2),Eo=c(So),No=c(Eo),Co=c(No),_u=c(Co),wu=y(Co,2),bu=c(wu),Pu=y(No,2),Fs=c(Pu),ku=c(Fs),In=y(Fs,2),xu=c(In),Au=y(Eo,2);ye(Au,1,()=>r(me),T=>T.id,(T,A)=>{var D=xf();let L;var we=c(D),be=c(we),ge=c(be),Le=c(ge),Te=y(ge,2),et=c(Te),gt=y(be,2),St=c(gt);{var rr=se=>{var I=wf(),re=Vr(I),de=c(re),ze=y(de,2),zt=c(ze),sr=y(re,2),Mt=c(sr);N(te=>{za(de,te),de.disabled=r(Z),w(zt,(r(s),h(()=>r(s).viewed))),sr.disabled=r(Z),w(Mt,(r(s),h(()=>r(s).comment)))},[()=>(r(j),r(A),h(()=>as(r(j),"hunk",r(A).id)))]),Y("change",de,te=>{is("hunk",r(A).id,te.currentTarget.checked)}),Y("click",sr,()=>{ia(na("hunk",r(A).id))}),$(se,I)};Q(St,se=>{r(j)&&se(rr)})}var ct=y(St,2);{var Tt=se=>{var I=ba(),re=c(I);N(()=>w(re,(r(s),h(()=>r(s).viewVisual)))),Y("click",I,ki),$(se,I)};Q(ct,se=>{r(at),h(()=>r(at).length>0)&&se(Tt)})}var Wt=y(ct,2),Ue=y(we,2);let Zt;ye(Ue,5,()=>(r(A),h(()=>$i(r(A)))),Qr,(se,I)=>{var re=us(),de=Vr(re);{var ze=Mt=>{var te=al(),qe=c(te);N(ne=>w(qe,ne),[()=>(r(s),r(I),h(()=>r(s).context.replace("{count}",String(r(I).count))))]),Y("click",te,()=>qi(r(A).id)),$(Mt,te)},zt=Mt=>{const te=ka(()=>(r(A),r(I),h(()=>yi(r(A),r(I).index))));var qe=bf(),ne=c(qe),Et=c(ne),Me=y(ne,2),tt=c(Me),rt=y(Me,2),xt=c(rt),nr=y(rt,2);ye(nr,5,()=>(r(A),r(I),h(()=>_n(r(A),r(I).index))),Qr,(zr,Ut)=>{var ya=Us();let _a;var ls=c(ya);N(()=>{_a=cr(ya,1,"",null,_a,{"word-change":r(Ut).changed}),w(ls,(r(Ut),h(()=>r(Ut).text)))}),$(zr,ya)});var Rr=y(nr,2);{var ir=zr=>{var Ut=sl();N(()=>{Ut.disabled=r(Z),M(Ut,"aria-label",(r(s),r(A),We(r(te)),h(()=>`${r(s).commentOn} ${r(A).path}:${r(te).startLine}`))),M(Ut,"title",(r(s),h(()=>r(s).comment)))}),Y("click",Ut,()=>{ia(r(te))}),$(zr,Ut)};Q(Rr,zr=>{r(j)&&r(te)&&zr(ir)})}N(()=>{cr(qe,1,(r(I),h(()=>`diff-line ${r(I).line.kind}`))),M(qe,"aria-label",(r(I),h(()=>`${r(I).line.kind}, old line ${r(I).line.oldLine??"none"}, new line ${r(I).line.newLine??"none"}`))),w(Et,(r(I),h(()=>r(I).line.oldLine??""))),w(tt,(r(I),h(()=>r(I).line.newLine??""))),w(xt,(r(I),h(()=>r(I).line.kind==="addition"?"+":r(I).line.kind==="deletion"?"−":" ")))}),$(Mt,qe)},sr=Mt=>{const te=ka(()=>(r(A),r(I),h(()=>yi(r(A),r(I).index))));var qe=Pf(),ne=c(qe);let Et;var Me=c(ne),tt=c(Me),rt=y(Me,2),xt=c(rt),nr=y(rt,2);{var Rr=or=>{var lr=nl();ye(lr,5,()=>(r(A),r(I),h(()=>_n(r(A),r(I).index))),Qr,(ds,Jr)=>{var Mr=Us();let wa;var ps=c(Mr);N(()=>{wa=cr(Mr,1,"",null,wa,{"word-change":r(Jr).changed}),w(ps,(r(Jr),h(()=>r(Jr).text)))}),$(ds,Mr)}),$(or,lr)};Q(nr,or=>{r(I),h(()=>r(I).line.kind!=="addition")&&or(Rr)})}var ir=y(ne,2);let zr;var Ut=c(ir),ya=c(Ut),_a=y(Ut,2),ls=c(_a),$n=y(_a,2);{var Ds=or=>{var lr=nl();ye(lr,5,()=>(r(A),r(I),h(()=>_n(r(A),r(I).index))),Qr,(ds,Jr)=>{var Mr=Us();let wa;var ps=c(Mr);N(()=>{wa=cr(Mr,1,"",null,wa,{"word-change":r(Jr).changed}),w(ps,(r(Jr),h(()=>r(Jr).text)))}),$(ds,Mr)}),$(or,lr)};Q($n,or=>{r(I),h(()=>r(I).line.kind!=="deletion")&&or(Ds)})}var qn=y(ir,2);{var Rn=or=>{var lr=sl();N(()=>{lr.disabled=r(Z),M(lr,"aria-label",(r(s),r(A),We(r(te)),h(()=>`${r(s).commentOn} ${r(A).path}:${r(te).startLine}`))),M(lr,"title",(r(s),h(()=>r(s).comment)))}),Y("click",lr,()=>{ia(r(te))}),$(or,lr)};Q(qn,or=>{r(j)&&r(te)&&or(Rn)})}N(()=>{M(qe,"aria-label",(r(I),h(()=>`${r(I).line.kind}, old line ${r(I).line.oldLine??"none"}, new line ${r(I).line.newLine??"none"}`))),Et=cr(ne,1,(r(I),h(()=>`diff-line ${r(I).line.kind==="addition"?"empty":r(I).line.kind}`)),null,Et,{"empty-side":r(I).line.kind==="addition"}),w(tt,(r(I),h(()=>r(I).line.oldLine??""))),w(xt,(r(I),h(()=>r(I).line.kind==="deletion"?"−":" "))),zr=cr(ir,1,(r(I),h(()=>`diff-line ${r(I).line.kind==="deletion"?"empty":r(I).line.kind}`)),null,zr,{"empty-side":r(I).line.kind==="deletion"}),w(ya,(r(I),h(()=>r(I).line.newLine??""))),w(ls,(r(I),h(()=>r(I).line.kind==="addition"?"+":" ")))}),$(Mt,qe)};Q(de,Mt=>{r(I),h(()=>r(I).kind==="fold")?Mt(ze):r(R)==="unified"?Mt(zt,1):Mt(sr,-1)})}$(se,re)});var yt=y(Ue,2);{var ar=se=>{var I=kf(),re=c(I);N(()=>w(re,`← ${r(s),h(()=>r(s).backChange)??""}`)),Y("click",I,Cd),$(se,I)};Q(yt,se=>{r(f),r(A),h(()=>r(f)===r(A).id)&&se(ar)})}N((se,I,re)=>{L=cr(D,1,"hunk",null,L,{"active-hunk":r(f)===r(A).id}),M(D,"id",se),M(D,"aria-labelledby",I),w(Le,(r(A),h(()=>r(A).path))),M(Te,"id",re),w(et,`@@ −${r(A),h(()=>r(A).oldStart)??""},${r(A),h(()=>r(A).oldLines)??""} +${r(A),h(()=>r(A).newStart)??""},${r(A),h(()=>r(A).newLines)??""} @@ ${r(A),h(()=>r(A).heading)??""}`),M(Wt,"aria-label",(r(A),h(()=>`Link to hunk in ${r(A).path}`))),Zt=cr(Ue,1,"diff-table",null,Zt,{"split-diff":r(R)==="split"}),M(Ue,"aria-label",(r(A),h(()=>`Diff for ${r(A).path}`)))},[()=>(r(A),h(()=>J("hunk",r(A).id))),()=>(r(A),h(()=>J("hunk-title",r(A).id))),()=>(r(A),h(()=>J("hunk-title",r(A).id)))]),Y("click",Wt,()=>vn(r(A).id)),$(T,D)});var Iu=y(So,2),Lo=c(Iu),$u=c(Lo),jo=c($u),qu=c(jo),Ru=y(jo,2),Su=c(Ru),Oo=y(Lo,2);{var Eu=T=>{var A=Af(),D=c(A),L=c(D),we=c(L),be=y(L,2),ge=c(be),Le=y(D,2),Te=y(c(Le),2),et=c(Te);et.value=et.__value="note";var gt=y(et);gt.value=gt.__value="question";var St=y(gt);St.value=St.__value="finding";var rr=y(St);rr.value=rr.__value="change-request";var ct=y(Le,2),Tt=c(ct),Wt=c(Tt),Ue=y(Tt,2);hs(Ue,ne=>k(ga,ne),()=>r(ga));var Zt=y(ct,2),yt=c(Zt),ar=y(yt,2),se=c(ar),I=y(ar,2),re=c(I),de=y(Zt,2),ze=c(de),zt=y(de,2),sr=c(zt),Mt=c(sr),te=y(sr,2),qe=c(te);N(ne=>{w(we,`${r(s),h(()=>r(s).commentOn)??""} / ${r(ft),h(()=>r(ft).type)??""}`),w(ge,(r(ft),h(()=>r(ft).path??r(ft).ref))),Te.disabled=r(Z),w(Wt,(r(s),h(()=>r(s).commentBody))),Ue.disabled=r(Z),yt.disabled=r(Z),w(se,(r(s),h(()=>r(s).askAgent))),w(re,(r(s),h(()=>r(s).askAgentHelp))),w(ze,(r(s),h(()=>r(s).localOnly))),sr.disabled=ne,w(Mt,(r(s),h(()=>r(s).saveComment))),te.disabled=r(Z),w(qe,(r(s),h(()=>r(s).cancel)))},[()=>(r(Z),r(mr),h(()=>r(Z)||!r(mr).trim()))]),Cn("submit",A,ne=>{ne.preventDefault(),_d()}),lh(Te,()=>r(Ca),ne=>k(Ca,ne)),Ws(Ue,()=>r(mr),ne=>k(mr,ne)),Yo(yt,()=>r(Ir),ne=>k(Ir,ne)),Y("click",te,()=>{k(ft,null),k(mr,""),k(Ir,!1)}),$(T,A)};Q(Oo,T=>{r(ft)&&T(Eu)})}var Nu=y(Oo,2);{var Cu=T=>{var A=Rf();ye(A,5,()=>r(jr),D=>D.id,(D,L)=>{var we=qf(),be=c(we),ge=c(be),Le=c(ge),Te=c(Le),et=y(Le,2),gt=c(et),St=y(ge,2),rr=c(St),ct=y(be,2),Tt=c(ct),Wt=y(ct,2);ye(Wt,1,()=>(r(L),h(()=>r(L).messages)),I=>I.id,(I,re)=>{var de=Va(),ze=c(de);N(()=>w(ze,(r(re),h(()=>r(re).body)))),$(I,de)});var Ue=y(Wt,2);{var Zt=I=>{var re=If(),de=c(re),ze=y(de,2),zt=c(ze);N(()=>{za(de,(r(L),h(()=>r(L).agentAttention.state==="requested"))),de.disabled=(r(Z),r(L),h(()=>r(Z)||r(L).state!=="open")),w(zt,(r(s),h(()=>r(s).askAgent)))}),Y("change",de,sr=>{bd(r(L).id,sr.currentTarget.checked)}),$(I,re)},yt=I=>{var re=$f(),de=c(re);N(()=>w(de,`Agent attention: ${r(L),h(()=>r(L).agentAttention.state)??""}`)),$(I,re)};Q(Ue,I=>{r(L),h(()=>r(L).agentAttention.state==="none"||r(L).agentAttention.state==="requested")?I(Zt):I(yt,-1)})}var ar=y(Ue,2);{var se=I=>{var re=ba(),de=c(re);N(()=>{re.disabled=r(Z),w(de,(r(s),h(()=>r(s).resolve)))}),Y("click",re,()=>{wd(r(L).id)}),$(I,re)};Q(ar,I=>{r(L),h(()=>r(L).state==="open")&&I(se)})}N(I=>{M(we,"id",I),M(we,"data-thread-state",(r(L),h(()=>r(L).state))),w(Te,(r(L),h(()=>r(L).kind))),w(gt,(r(L),h(()=>r(L).anchor.type))),w(rr,(r(L),r(s),h(()=>r(L).state==="resolved"?r(s).resolved:r(L).state))),w(Tt,(r(L),h(()=>r(L).anchor.path??r(L).anchor.ref)))},[()=>(r(L),h(()=>J("thread",r(L).id)))]),$(D,we)}),$(T,A)},Lu=T=>{var A=Sf(),D=c(A);N(()=>w(D,(r(s),h(()=>r(s).noComments)))),$(T,A)};Q(Nu,T=>{r(jr),h(()=>r(jr).length>0)?T(Cu):T(Lu,-1)})}N((T,A,D,L,we,be,ge,Le)=>{M(F,"id",T),M(F,"aria-labelledby",A),w(bt,`← ${r(s),h(()=>r(s).backQueue)??""}`),w(Bt,`Focused change / ${r(q),h(()=>r(q).kind)??""}`),M(Ht,"id",D),w(je,(r(q),h(()=>r(q).title))),M(Be,"data-queue",L),w(Oe,we),w(mt,`${r(q),h(()=>r(q).risk.level)??""} risk`),w(Ct,(r(q),h(()=>r(q).intent.source))),w($e,(r(s),h(()=>r(s).reviewWorkspace))),Ot.disabled=be,w(oa,(r(s),h(()=>r(s).reanchorImport))),Zr.disabled=!r(j)||r(Z),w(os,(r(s),h(()=>r(s).exportReview))),Ur.disabled=ge,w(ja,(r(s),h(()=>r(s).importReview))),M(la,"aria-label",(r(s),h(()=>r(s).reviewBundleFile))),w(xn,(r(s),h(()=>r(s).interpretation))),w(An,(r(s),h(()=>r(s).what))),w(Lp,(r(q),h(()=>r(q).summary))),w(Op,(r(q),h(()=>r(q).implementation))),w(Tp,(r(s),h(()=>r(s).why))),w(Mp,(r(q),h(()=>r(q).intent.text||"Intent unknown"))),w(Vp,(r(s),h(()=>r(s).userImpact))),w(Hp,(r(s),h(()=>r(s).risk))),w(Zp,(r(s),h(()=>r(s).gaps))),w(Jp,(r(s),h(()=>r(s).verified))),w(Qp,`Evidence / ${r(at),h(()=>r(at).length)??""}`),w(Xp,(r(s),h(()=>r(s).measured))),w(eu,(r(s),h(()=>r(s).visualEvidence))),w(ru,Le),w(ou,`Finding states / ${r($t),h(()=>r($t).length)??""}`),w(du,(r(s),h(()=>r(s).findings))),w(fu,`Evidence / ${r(Fe),h(()=>r(Fe).length)??""}`),w(vu,(r(s),h(()=>r(s).evidence))),w(_u,`Structured patch / ${r(me),h(()=>r(me).length)??""}`),w(bu,(r(s),h(()=>r(s).codeDiff))),M(Fs,"aria-pressed",r(R)==="unified"),w(ku,(r(s),h(()=>r(s).unified))),M(In,"aria-pressed",r(R)==="split"),w(xu,(r(s),h(()=>r(s).split))),w(qu,`Notes / ${r(jr),h(()=>r(jr).length)??""}`),w(Su,(r(s),h(()=>r(s).comments)))},[()=>(r(q),h(()=>J("change",r(q).id))),()=>(r(q),h(()=>J("title",r(q).id))),()=>(r(q),h(()=>J("title",r(q).id))),()=>(r(q),h(()=>Ls(r(q)))),()=>(r(q),h(()=>bi(Ls(r(q))))),()=>(r(Z),r(Ce),h(()=>r(Z)||!!r(Ce))),()=>(r(j),r(Z),r(Ce),h(()=>!r(j)||r(Z)||!!r(Ce))),()=>(r(i),h(()=>gn(r(i))))]),Y("click",De,Ii),Yo(Ot,()=>r(ts),T=>k(ts,T)),Y("click",Zr,()=>{Pd()}),Y("click",Ur,()=>r(Lr)?.click()),Y("change",la,T=>{$d(T.currentTarget.files?.[0])}),Y("click",Fs,()=>k(R,"unified")),Y("click",In,()=>k(R,"split")),$(ve,F)},Sp=ve=>{const F=ka(()=>(r(i),r(f),h(()=>r(i).hunks.find(Pt=>Pt.id===r(f)))));var De=us(),bt=Vr(De);{var Dt=Pt=>{var er=Lf(),Bt=c(er),Ht=c(Bt),je=y(Bt,2),Ie=c(je),Be=y(je,2),Oe=c(Be),ke=y(Be,2),mt=c(ke),qt=c(mt),Ct=c(qt),Lt=y(qt,2);{var vr=kt=>{var $e=Nf(),tr=c($e),jt=c(tr),vt=y(jt,2),Rt=c(vt),Qe=y(tr,2),Ot=c(Qe);N(gr=>{za(jt,gr),jt.disabled=r(Z),w(Rt,(r(s),h(()=>r(s).viewed))),Qe.disabled=r(Z),w(Ot,(r(s),h(()=>r(s).comment)))},[()=>(r(j),We(r(F)),h(()=>as(r(j),"hunk",r(F).id)))]),Y("change",jt,gr=>{is("hunk",r(F).id,gr.currentTarget.checked)}),Y("click",Qe,()=>{ia(na("hunk",r(F).id))}),$(kt,$e)};Q(Lt,kt=>{r(j)&&kt(vr)})}var $r=y(mt,2);ye($r,5,()=>(We(r(F)),h(()=>$i(r(F)))),Qr,(kt,$e)=>{var tr=us(),jt=Vr(tr);{var vt=Qe=>{var Ot=al(),gr=c(Ot);N(oa=>w(gr,oa),[()=>(r(s),r($e),h(()=>r(s).context.replace("{count}",String(r($e).count))))]),Y("click",Ot,()=>qi(r(F).id)),$(Qe,Ot)},Rt=Qe=>{var Ot=Cf(),gr=c(Ot),oa=c(gr),Zr=y(gr),os=c(Zr),Ur=y(Zr),ja=c(Ur),la=y(Ur),Kr=c(la);N(()=>{cr(Ot,1,(r($e),h(()=>`diff-line ${r($e).line.kind}`))),w(oa,(r($e),h(()=>r($e).line.oldLine??""))),w(os,(r($e),h(()=>r($e).line.newLine??""))),w(ja,(r($e),h(()=>r($e).line.kind==="addition"?"+":r($e).line.kind==="deletion"?"−":" "))),w(Kr,(r($e),h(()=>r($e).line.content)))}),$(Qe,Ot)};Q(jt,Qe=>{r($e),h(()=>r($e).kind==="fold")?Qe(vt):Qe(Rt,-1)})}$(kt,tr)}),N(kt=>{w(Ht,`← ${r(s),h(()=>r(s).backQueue)??""}`),w(Ie,(r(s),h(()=>r(s).unclassified))),w(Oe,(We(r(F)),h(()=>r(F).path))),M(ke,"id",kt),w(Ct,`@@ −${We(r(F)),h(()=>r(F).oldStart)??""},${We(r(F)),h(()=>r(F).oldLines)??""} +${We(r(F)),h(()=>r(F).newStart)??""},${We(r(F)),h(()=>r(F).newLines)??""} @@`)},[()=>(We(r(F)),h(()=>J("hunk",r(F).id)))]),Y("click",Bt,Ii),$(Pt,er)};Q(bt,Pt=>{r(F)&&Pt(Dt)})}$(ve,De)},Ep=ve=>{var F=jf(),De=c(F),bt=c(De);N(()=>w(bt,(r(s),h(()=>r(s).empty)))),$(ve,F)};Q(qp,ve=>{r(q)?ve(Rp):r(f)?ve(Sp,1):ve(Ep,-1)})}var Np=y(Ti,2);{var Cp=ve=>{var F=Ff(),De=c(F),bt=c(De),Dt=c(bt),Pt=c(Dt),er=y(Dt,2);{var Bt=Oe=>{var ke=Of(),mt=c(ke);N(()=>w(mt,`${r(s),h(()=>r(s).unreadAnswers)??""}: ${r(e)??""}`)),$(Oe,ke)};Q(er,Oe=>{r(e)>0&&Oe(Bt)})}var Ht=y(bt,2);{var je=Oe=>{var ke=ba(),mt=c(ke);N(()=>{ke.disabled=r(le)||r(Z),w(mt,(r(s),h(()=>r(s).reviewItems)))}),Y("click",ke,()=>{xd()}),$(Oe,ke)};Q(Ht,Oe=>{r(p)>0&&Oe(je)})}var Ie=y(De,2);{var Be=Oe=>{var ke=Vf(),mt=c(ke),qt=c(mt),Ct=y(mt,2);ye(Ct,5,()=>(r(_),h(()=>r(_).batch.items)),nt=>nt.id,(nt,Xe)=>{var qr=Tf(),Oa=c(qr),xn=c(Oa),zs=y(Oa,2),Ms=c(zs),Vs=y(zs,2),An=c(Vs);N(()=>{w(xn,(r(Xe),h(()=>r(Xe).question))),w(Ms,`${r(Xe),h(()=>r(Xe).anchor.type)??""}: ${r(Xe),h(()=>r(Xe).anchor.ref)??""}`),w(An,(r(Xe),h(()=>r(Xe).state)))}),$(nt,qr)});var Lt=y(Ct,2),vr=c(Lt),$r=c(vr),kt=c($r),$e=y($r,2),tr=c($e),jt=y(vr,2),vt=c(jt),Rt=c(vt),Qe=y(vt,2),Ot=c(Qe),gr=y(jt,2),oa=c(gr),Zr=c(oa),os=y(oa,2),Ur=c(os),ja=y(Lt,2);ye(ja,1,()=>(r(_),h(()=>r(_).warnings)),nt=>nt,(nt,Xe)=>{var qr=zf(),Oa=c(qr);N(()=>w(Oa,r(Xe))),$(nt,qr)});var la=y(ja,2),Kr=c(la),wn=c(Kr),Ts=y(Kr,2);{var bn=nt=>{var Xe=ba(),qr=c(Xe);N(()=>{Xe.disabled=r(le),w(qr,(r(s),h(()=>r(s).copyHandoff)))}),Y("click",Xe,()=>{Id()}),$(nt,Xe)};Q(Ts,nt=>{r(P)&&nt(bn)})}var Pn=y(la,2);{var kn=nt=>{var Xe=Mf(),qr=c(Xe);N(()=>w(qr,r(P))),$(nt,Xe)};Q(Pn,nt=>{r(P)&&nt(kn)})}N(nt=>{w(qt,(r(s),h(()=>r(s).feedbackPreview))),w(kt,(r(s),h(()=>r(s).shared))),w(tr,`${r(_),h(()=>r(_).shared.comments)??""} comments · ${r(_),h(()=>r(_).shared.codeRanges)??""}\n code ranges · ${r(_),h(()=>r(_).shared.imageCrops)??""} image crops ·\n ${r(_),h(()=>r(_).shared.evidenceReferences)??""} evidence refs`),w(Rt,(r(s),h(()=>r(s).notShared))),w(Ot,nt),w(Zr,(r(s),h(()=>r(s).delivery))),w(Ur,`${r(_),h(()=>r(_).destination.deliveryMode)??""} · ${r(_),h(()=>r(_).contextBytes)??""} bytes ·\n ${r(_),h(()=>r(_).redactionCount)??""} redactions`),Kr.disabled=r(le),w(wn,(r(Ce),r(s),h(()=>r(Ce)?r(s).returnConversation:r(s).prepareRequest)))},[()=>(r(_),h(()=>r(_).excluded.join(" · ")))]),Y("click",Kr,()=>{Ad()}),$(Oe,ke)};Q(Ie,Oe=>{r(_)&&Oe(Be)})}N(()=>{M(F,"aria-label",(r(s),h(()=>r(s).selectedItems))),w(Pt,`${r(s),h(()=>r(s).selectedItems)??""}: ${r(p)??""}`)}),$(ve,F)};Q(Np,ve=>{r(j)&&(r(p)>0||r(e)>0||r(_))&&ve(Cp)})}N((ve,F,De)=>{M(V,"data-status",(r(i),h(()=>r(i).status))),w(Ge,(r(i),h(()=>r(i).status))),w(js,ve),w(Md,(r(i),h(()=>r(i).reportId))),w(Fd,(r(s),h(()=>r(s).queue))),w(Dd,(r(s),h(()=>r(s).search))),M(ji,"aria-label",(r(s),h(()=>r(s).queue))),w(Wd,`Overview / ${r(i),h(()=>r(i).status)??""}`),w(Zd,(r(s),h(()=>r(s).summary))),w(Kd,(r(i),h(()=>r(i).summary.statement))),w(Jd,(r(s),h(()=>r(s).files))),w(Gd,(r(i),h(()=>r(i).summary.filesChanged))),w(Qd,(r(s),h(()=>r(s).additions))),w(ep,`+${r(i),h(()=>r(i).summary.additions)??""}`),w(tp,(r(s),h(()=>r(s).deletions))),w(ap,`−${r(i),h(()=>r(i).summary.deletions)??""}`),w(sp,(r(s),h(()=>r(s).changes))),w(ip,(r(i),h(()=>r(i).changes.length))),w(lp,(r(s),h(()=>r(s).lowSignal))),w(pp,F),w(up,(r(s),h(()=>r(s).coverage))),w(hp,De),w(mp,(r(s),h(()=>r(s).planned))),w(gp,(r(i),h(()=>r(i).coverage.planned))),w(yp,(r(s),h(()=>r(s).captured))),w(wp,(r(i),h(()=>r(i).coverage.succeeded))),w(Pp,(r(s),h(()=>r(s).failed))),w(xp,(r(i),h(()=>r(i).coverage.failed))),w(Ip,(r(s),h(()=>r(s).inventory)))},[()=>(r(i),h(()=>gn(r(i)))),()=>(r(i),h(()=>r(i).files.filter(ve=>ve.lowSignal).length)),()=>(r(i),h(()=>gn(r(i))))]),Ws(Li,()=>r(m),ve=>k(m,ve)),$(g,x)},zd=g=>{var x=Bf(),C=c(x);N(()=>{M(x,"role",r(o)?"alert":"status"),w(C,(r(o),h(()=>r(o)||n.en.loading)))}),$(g,x)};Q(Od,g=>{r(i)?g(Td):g(zd,-1)})}$(t,Ri),yl()}Wc(["click","change"]);const il=document.querySelector("[data-utsuri-app]");il&&Gc(Hf,{target:il});\n';
|
|
217052
|
-
var reportUiCss = ":root{color-scheme:light dark;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Hiragino Sans,Yu Gothic UI,sans-serif;font-size:16px;--paper: #f2efe7;--paper-raised: #fffdf7;--ink: #171a1f;--ink-muted: #61656d;--line: #c9c4b8;--line-strong: #7c7b77;--rail: #e4e0d6;--blue: #1558d6;--blue-soft: #dce7ff;--coral: #b73f2d;--coral-soft: #fae1db;--green: #176948;--green-soft: #d8eee3;--amber: #805400;--amber-soft: #f5e7bf;--focus: #0066ff;--code-bg: #20242b;--code-text: #f5f2e9;--code-muted: #a9afb9;--addition: #123d2e;--deletion: #4d2524;--word-addition: #297553;--word-deletion: #9c4139;--radius: .25rem;--shadow: 0 1px 0 rgb(23 26 31 / 8%), 0 12px 34px rgb(23 26 31 / 7%)}@media(prefers-color-scheme:dark){:root{--paper: #15171a;--paper-raised: #1e2126;--ink: #f4f0e7;--ink-muted: #b3b5ba;--line: #3b3f45;--line-strong: #71757c;--rail: #1a1d21;--blue: #80a9ff;--blue-soft: #25395f;--coral: #ff9b89;--coral-soft: #542e2a;--green: #76d4ac;--green-soft: #1c4637;--amber: #f0c66c;--amber-soft: #4b3b1c;--focus: #8ab4ff;--code-bg: #0c0e11}}*{box-sizing:border-box}html{background:var(--paper);color:var(--ink);scroll-behavior:smooth}body{margin:0;min-width:320px;background-image:linear-gradient(rgb(23 26 31 / 3%) 1px,transparent 1px);background-size:100% 2rem}button,input,select{font:inherit}button,a,summary{-webkit-tap-highlight-color:transparent}a{color:inherit}:focus-visible{outline:3px solid var(--focus);outline-offset:3px}.skip-link{position:fixed;inset:0 auto auto 0;z-index:100;transform:translateY(-120%);padding:.75rem 1rem;background:var(--paper-raised);color:var(--ink)}.skip-link:focus{transform:translateY(0)}.report-shell{display:grid;grid-template-columns:clamp(17rem,23vw,22rem) minmax(0,1fr);grid-template-rows:4.5rem minmax(calc(100vh - 4.5rem),auto);min-height:100vh}.report-header{position:sticky;top:0;z-index:20;grid-column:1 / -1;display:grid;grid-template-columns:clamp(17rem,23vw,22rem) 1fr auto;align-items:stretch;min-height:4.5rem;border-bottom:1px solid var(--line-strong);background:color-mix(in srgb,var(--paper-raised) 94%,transparent);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.wordmark{display:flex;align-items:center;gap:.8rem;padding:0 1.25rem;border-right:1px solid var(--line-strong);text-decoration:none}.wordmark>span{display:grid;width:2rem;height:2rem;place-items:center;border-radius:50%;background:var(--ink);color:var(--paper-raised);font-size:.68rem;font-weight:800;letter-spacing:-.08em}.wordmark strong{font-size:1.05rem;letter-spacing:-.025em}.report-state{display:flex;align-items:center;gap:.65rem;padding:0 1.5rem;font-size:.78rem;font-weight:760;letter-spacing:.075em}.report-state small{color:var(--ink-muted);font-size:.75rem;font-weight:500;letter-spacing:0}.state-mark{width:.72rem;height:.72rem;border:2px solid currentColor;transform:rotate(45deg)}.report-state[data-status=UNCOVERED],.report-state[data-status=INCOMPLETE]{color:var(--amber)}.report-state[data-status=REGRESSION]{color:var(--coral)}.report-state[data-status=PASS]{color:var(--green)}.report-state[data-status=CHANGED]{color:var(--blue)}.report-id{align-self:center;margin:0;padding:0 1.25rem;color:var(--ink-muted);font:.7rem/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}.review-rail{position:sticky;top:4.5rem;align-self:start;height:calc(100vh - 4.5rem);overflow-y:auto;border-right:1px solid var(--line-strong);background:color-mix(in srgb,var(--rail) 96%,transparent)}.rail-heading,.queue-search,.queue-section h3{padding-right:1.25rem;padding-left:1.25rem}.rail-heading{padding-top:1.6rem;padding-bottom:1rem}.kicker{margin:0 0 .55rem;color:var(--ink-muted);font-size:.69rem;font-weight:750;letter-spacing:.12em;text-transform:uppercase}.rail-heading h2,.decision-summary h1,.focused-change h2,.section-heading h3{margin:0;letter-spacing:-.04em}.rail-heading h2{font-size:1.55rem}.queue-search{display:grid;gap:.42rem;padding-bottom:1.4rem;color:var(--ink-muted);font-size:.72rem;font-weight:650}.queue-search input{width:100%;border:1px solid var(--line-strong);border-radius:var(--radius);padding:.72rem .8rem;background:var(--paper-raised);color:var(--ink)}.queue-section{border-top:1px solid var(--line)}.queue-section h3{display:flex;align-items:center;justify-content:space-between;margin:0;padding-top:.75rem;padding-bottom:.75rem;color:var(--ink-muted);font-size:.7rem;letter-spacing:.055em;text-transform:uppercase}.count{min-width:1.7rem;border:1px solid var(--line);border-radius:1rem;padding:.12rem .38rem;text-align:center}.queue-section ol{margin:0;padding:0;list-style:none}.queue-section a{display:grid;grid-template-columns:2rem minmax(0,1fr);gap:.65rem;padding:.9rem 1.25rem;border-top:1px solid color-mix(in srgb,var(--line) 70%,transparent);text-decoration:none}.queue-section a:hover,.queue-section a[aria-current=page]{background:var(--paper-raised)}.queue-section a[aria-current=page]{box-shadow:inset .24rem 0 var(--blue)}.queue-index{padding-top:.08rem;color:var(--ink-muted);font:.68rem/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}.queue-copy{min-width:0}.queue-copy strong{display:block;overflow:hidden;font-size:.84rem;line-height:1.35;text-overflow:ellipsis}.queue-copy>span:not(.badges){color:var(--ink-muted);font-size:.7rem}.badges{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.48rem}.badges span,.change-badges span{border:1px solid var(--line);border-radius:99px;padding:.16rem .45rem;color:var(--ink-muted);font-size:.63rem;font-weight:700}main{min-width:0;padding:clamp(1.25rem,3vw,3rem)}.decision-summary,.focused-change{width:min(100%,90rem);margin:0 auto;border:1px solid var(--line-strong);background:var(--paper-raised);box-shadow:var(--shadow)}.decision-summary{display:grid;grid-template-columns:minmax(15rem,1fr) minmax(28rem,1.25fr);gap:clamp(1.5rem,4vw,4rem);padding:clamp(1.4rem,3vw,2.6rem)}.decision-summary h1{font-size:clamp(1.9rem,4vw,3.6rem);line-height:.98}.decision-statement{max-width:44rem;margin:1.25rem 0 0;color:var(--ink-muted);font-size:clamp(1rem,1.6vw,1.25rem);line-height:1.55}.metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-self:end;margin:0;border-top:1px solid var(--line-strong);border-bottom:1px solid var(--line-strong)}.metrics div{min-width:0;padding:.85rem .65rem;border-right:1px solid var(--line)}.metrics div:last-child{border-right:0}.metrics dt{min-height:2.2em;color:var(--ink-muted);font-size:.65rem}.metrics dd{margin:.35rem 0 0;font:700 clamp(1.25rem,2vw,1.8rem)/1 ui-monospace,SFMono-Regular,Menlo,monospace}.positive{color:var(--green)}.negative{color:var(--coral)}.file-inventory{grid-column:1 / -1;border-top:1px solid var(--line);padding-top:1rem}.coverage-overview{grid-column:1 / -1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2rem;align-items:end;border-top:1px solid var(--line);padding-top:1rem}.coverage-overview h2,.coverage-overview p{margin:0}.coverage-overview h2{font-size:1rem}.coverage-overview p{margin-top:.35rem;color:var(--ink-muted);font-size:.82rem}.coverage-overview dl{display:grid;grid-template-columns:repeat(3,minmax(6rem,1fr));margin:0}.coverage-overview dl div{border-left:1px solid var(--line);padding-left:1rem}.coverage-overview dt{color:var(--ink-muted);font-size:.65rem}.coverage-overview dd{margin:.25rem 0 0;font:700 1.2rem/1 ui-monospace,SFMono-Regular,Menlo,monospace}.file-inventory summary,.more-evidence summary{cursor:pointer;font-size:.78rem;font-weight:720}.file-inventory ul{display:grid;gap:0;margin:.8rem 0 0;padding:0;list-style:none}.file-inventory li{display:grid;grid-template-columns:6rem minmax(0,1fr) auto auto;gap:1rem;padding:.48rem 0;border-top:1px solid var(--line);color:var(--ink-muted);font-size:.72rem}.file-inventory code{overflow-wrap:anywhere;color:var(--ink)}.file-status{font-weight:750;text-transform:uppercase}.focused-change{margin-top:1.4rem;padding:clamp(1.4rem,3vw,2.6rem)}.back-link,.anchor-button{border:0;padding:0;background:transparent;color:var(--blue);cursor:pointer;font-size:.75rem;font-weight:720}.change-header{display:flex;align-items:end;justify-content:space-between;gap:2rem;margin-top:1.8rem;padding-bottom:1.5rem;border-bottom:2px solid var(--ink)}.change-header h2{max-width:50rem;overflow-wrap:anywhere;font-size:clamp(1.8rem,4vw,3.25rem);line-height:1.04}.change-header>div,.finding-list li,.finding-list article{min-width:0}.change-badges{display:flex;flex-wrap:wrap;justify-content:end;gap:.4rem}.change-badges span[data-queue=action-required]{border-color:var(--coral);background:var(--coral-soft);color:var(--coral)}.change-badges span[data-queue=needs-confirmation]{border-color:var(--amber);background:var(--amber-soft);color:var(--amber)}.change-badges span[data-queue=no-issue]{border-color:var(--green);background:var(--green-soft);color:var(--green)}.review-workspace{margin-top:1rem;border:1px solid var(--line-strong);border-left:.35rem solid var(--blue);padding:1rem 1.1rem;background:linear-gradient(90deg,color-mix(in srgb,var(--blue-soft) 48%,transparent),transparent 54%),var(--paper)}.review-workspace-heading{display:flex;align-items:end;justify-content:space-between;gap:1rem}.review-workspace h3,.review-workspace p{margin:0}.review-workspace h3{font-size:1.05rem}.review-workspace-heading p:not(.kicker),.local-only-note,.review-message{margin-top:.35rem;color:var(--ink-muted);font-size:.74rem}.review-transfer-actions,.review-controls,.comment-actions{display:flex;flex-wrap:wrap;gap:.45rem;align-items:center}.review-controls{margin-top:.9rem;border-top:1px solid var(--line);padding-top:.9rem}.review-transfer-actions button,.review-controls button,.comment-actions button,.thread-list button,.feedback-dock button,.inline-comment-action{min-height:2.25rem;border:1px solid var(--line-strong);border-radius:var(--radius);padding:.45rem .7rem;background:var(--paper-raised);color:var(--ink);cursor:pointer;font-size:.7rem;font-weight:720}.review-transfer-actions button:disabled,.review-controls button:disabled,.comment-actions button:disabled,.thread-list button:disabled,.feedback-dock button:disabled{cursor:not-allowed;opacity:.55}.review-controls>label:not(.viewed-control),.comment-composer label{display:grid;gap:.28rem;color:var(--ink-muted);font-size:.68rem;font-weight:700}.review-controls select,.comment-composer select,.comment-composer textarea{border:1px solid var(--line-strong);border-radius:var(--radius);padding:.5rem .65rem;background:var(--paper-raised);color:var(--ink)}.viewed-control{display:inline-flex;gap:.4rem;align-items:center;min-height:2.25rem;color:var(--ink-muted);font-size:.7rem;font-weight:720}.viewed-control input{width:1rem;height:1rem;accent-color:var(--blue)}.compact-control{min-height:auto;justify-self:end}.dark-control{color:#d8e3ff}.visual-viewed-control{align-self:end}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;clip-path:inset(50%)}.review-message{border-left:.2rem solid var(--amber);padding:.45rem .6rem;background:var(--amber-soft);color:var(--amber)}.explanation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:1px solid var(--line-strong)}.explanation-grid section{min-width:0;padding:1.5rem 1.5rem 1.5rem 0;border-bottom:1px solid var(--line)}.explanation-grid section:nth-child(2n){padding-right:0;padding-left:1.5rem;border-left:1px solid var(--line)}.explanation-grid h3{margin:0 0 .7rem;font-size:.74rem;letter-spacing:.08em;text-transform:uppercase}.explanation-grid p,.explanation-grid li{font-size:.9rem;line-height:1.62}.explanation-grid ul{margin:0;padding-left:1.1rem}.technical{color:var(--ink-muted)}.risk-block{box-shadow:inset .22rem 0 var(--coral);padding-left:1.2rem!important}.gap-block{background:var(--amber-soft);box-shadow:inset .22rem 0 var(--amber)}.gap-block li{display:flex;gap:.6rem;align-items:start;justify-content:space-between}.inline-comment-action{min-height:1.7rem;flex:none;padding:.18rem .45rem;background:transparent}.interpretation-section,.visual-evidence-section{padding-top:2.2rem}.interpretation-section>.section-heading{margin-bottom:0}.visual-evidence-section{border-top:2px solid var(--ink)}.visual-heading p:not(.kicker){max-width:42rem;margin:.5rem 0 0;color:var(--ink-muted);font-size:.82rem}.visual-heading h4{margin:.35rem 0 0;font-size:1rem}.visual-selectors{display:flex;flex-wrap:wrap;gap:.8rem;align-items:end;margin-bottom:.8rem}.visual-selectors label,.wipe-control{display:grid;gap:.35rem;min-width:min(100%,13rem);color:var(--ink-muted);font-size:.7rem;font-weight:680}.visual-selectors select,.visual-selectors input,.wipe-control input{min-height:2.5rem}.visual-selectors select{max-width:24rem;border:1px solid var(--line-strong);border-radius:var(--radius);padding:.5rem .65rem;background:var(--paper-raised);color:var(--ink)}.visual-slider{margin-left:auto}.visual-mode-control{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:1rem}.visual-mode-control button,.region-list button,.finding-list button,.hunk-actions button{min-height:2rem;border:1px solid var(--line-strong);border-radius:var(--radius);padding:.42rem .65rem;background:transparent;color:var(--ink);cursor:pointer;font-size:.7rem;font-weight:700}.visual-mode-control button[aria-pressed=true]{background:var(--ink);color:var(--paper-raised)}.visual-mode-control button:disabled{cursor:not-allowed;opacity:.55}.persistent-error,.verification-gap{display:flex;gap:.7rem;align-items:baseline;margin:0 0 1rem;border-left:.3rem solid var(--amber);padding:.85rem 1rem;background:var(--amber-soft);color:var(--amber);font-size:.8rem}.persistent-error strong,.verification-gap strong{letter-spacing:.08em}.visual-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 .8rem;border:1px solid var(--line)}.visual-metrics div{padding:.65rem .8rem;border-right:1px solid var(--line)}.visual-metrics div:last-child{border-right:0}.visual-metrics dt{color:var(--ink-muted);font-size:.64rem}.visual-metrics dd{margin:.25rem 0 0;font:700 .82rem/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}.visual-panes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.visual-panes figure,.single-visual{min-width:0;margin:0}.visual-panes figcaption,.single-visual figcaption{border:1px solid var(--line-strong);border-bottom:0;padding:.5rem .7rem;background:var(--rail);color:var(--ink);font-size:.7rem;font-weight:720}.visual-scroll{overflow:auto;max-height:32rem;min-height:12rem;border:1px solid var(--line-strong);background:linear-gradient(45deg,color-mix(in srgb,var(--line) 25%,transparent) 25%,transparent 25%) 0 0 / 1rem 1rem,linear-gradient(45deg,transparent 75%,color-mix(in srgb,var(--line) 25%,transparent) 75%) 0 0 / 1rem 1rem,var(--paper-raised);overscroll-behavior:contain}.image-stage{position:relative;min-width:20rem}.image-stage img{display:block;width:100%;height:auto}.wipe-after,.blink-after{position:absolute;inset:0}.blink-after{opacity:0}.blink-after.blink-running{animation:utsuri-blink 1s steps(1,end) infinite}@keyframes utsuri-blink{0%,49%{opacity:0}50%,to{opacity:1}}.pixel-diff-view .visual-scroll{background-color:#16191e}.region-marker{position:absolute;display:grid;min-width:1.5rem;min-height:1.5rem;place-items:center;border:2px solid #fff;border-radius:0;padding:0;background:#b73f2d4d;box-shadow:0 0 0 2px var(--coral);color:#fff;font-size:.65rem;font-weight:800;pointer-events:none}.region-marker.active-region{border-width:4px;background:#b73f2d7f}.visual-comment-pin{position:absolute;z-index:4;display:grid;width:2rem;height:2rem;place-items:center;transform:translate(-50%,-50%);border:2px solid #fff;border-radius:50%;padding:0;background:var(--blue);box-shadow:0 0 0 3px #0e1117a6;color:#fff;font-size:.72rem;font-weight:820}.visual-comment-pin:hover{background:var(--coral)}.wipe-control{width:min(100%,28rem);margin:0 0 .75rem}.region-list,.finding-list{margin-top:1rem;border-top:1px solid var(--line);padding-top:1rem}.region-list h4,.finding-list h4{margin:0 0 .65rem;font-size:.82rem}.region-list ol,.finding-list ol{display:grid;gap:.5rem;margin:0;padding:0;list-style:none}.region-list ol{grid-template-columns:repeat(auto-fit,minmax(14rem,1fr))}.region-list button{width:100%;text-align:left}.region-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.35rem}.region-list button[aria-current=true]{border-color:var(--coral);box-shadow:inset .22rem 0 var(--coral)}.finding-list article{border:1px solid var(--line);padding:1rem;background:color-mix(in srgb,var(--paper) 55%,var(--paper-raised))}.finding-list article.active-finding{border-color:var(--blue)}.finding-list h5{margin:.65rem 0 .35rem;overflow-wrap:anywhere;font-size:.95rem}.finding-list p{margin:0 0 .8rem;color:var(--ink-muted);font-size:.82rem;line-height:1.5}.finding-badges{display:flex;flex-wrap:wrap;gap:.35rem}.finding-badges span{border:1px solid var(--line-strong);border-radius:99px;padding:.15rem .45rem;font-size:.63rem;font-weight:720;text-transform:uppercase}.hunk-actions{display:flex;flex-shrink:0;gap:.5rem;align-items:center}.hunk-actions button{border-color:#707987;color:#d8e3ff}.evidence-section,.diff-section{padding-top:2.2rem}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:1.5rem;margin-bottom:1rem}.section-heading h3{font-size:clamp(1.35rem,2.5vw,2rem)}.evidence-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin:0;padding:0;list-style:none}.evidence-list li{min-width:0;border:1px solid var(--line);padding:1rem;background:color-mix(in srgb,var(--blue-soft) 35%,transparent)}.evidence-list span{display:block;color:var(--blue);font-size:.64rem;font-weight:780;letter-spacing:.08em;text-transform:uppercase}.evidence-list strong{display:block;overflow-wrap:anywhere;margin-top:.55rem;font:.77rem/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}.evidence-list p{margin:.55rem 0 0;color:var(--ink-muted);font-size:.78rem;line-height:1.45}.more-evidence{margin-top:.8rem}.segmented-control{display:inline-flex;border:1px solid var(--line-strong);border-radius:var(--radius);overflow:hidden}.segmented-control button{border:0;border-right:1px solid var(--line-strong);padding:.48rem .72rem;background:transparent;color:var(--ink-muted);cursor:pointer;font-size:.7rem;font-weight:700}.segmented-control button:last-child{border-right:0}.segmented-control button[aria-pressed=true]{background:var(--ink);color:var(--paper-raised)}.hunk{overflow:hidden;margin-top:1rem;border:1px solid #555c66;border-radius:var(--radius);background:var(--code-bg);color:var(--code-text)}.hunk.active-hunk{box-shadow:0 0 0 4px var(--focus)}.hunk>header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 1rem;border-bottom:1px solid #555c66;background:#292e36}.hunk>header p,.hunk>header h4,.hunk>header h3{margin:0;overflow-wrap:anywhere;font:.72rem/1.45 ui-monospace,SFMono-Regular,Menlo,monospace}.hunk>header p{color:#d6d9de;font-weight:760}.hunk>header h4{color:var(--code-muted);font-weight:500}.anchor-button{min-width:2rem;min-height:2rem;color:#9bbaff;font:700 1rem/1 ui-monospace,SFMono-Regular,Menlo,monospace}.diff-table{overflow-x:auto;font:.76rem/1.55 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-variant-ligatures:none}.diff-line{display:grid;grid-template-columns:3.4rem 3.4rem 1.4rem minmax(max-content,1fr) 2.2rem;min-height:1.55rem}.diff-line.addition{background:var(--addition)}.diff-line.deletion{background:var(--deletion)}.diff-line.no-newline{color:var(--code-muted);font-style:italic}.line-number{padding:0 .65rem;border-right:1px solid rgb(255 255 255 / 8%);color:var(--code-muted);text-align:right;-webkit-user-select:none;user-select:none}.line-sign{color:var(--code-muted);text-align:center;-webkit-user-select:none;user-select:none}.diff-line code{padding:0 .75rem 0 0;white-space:pre}.word-change{border-radius:.12rem;background:var(--word-addition);box-shadow:0 0 0 .08rem var(--word-addition)}.deletion .word-change{background:var(--word-deletion);box-shadow:0 0 0 .08rem var(--word-deletion)}.context-fold{width:100%;border:0;border-top:1px solid #3a4049;border-bottom:1px solid #3a4049;padding:.4rem;background:#252a31;color:#a9c0ef;cursor:pointer;font:inherit;text-align:center}.split-row{display:grid;grid-template-columns:repeat(2,minmax(max-content,1fr)) 2.2rem;border-bottom:1px solid rgb(255 255 255 / 5%)}.split-row .diff-line{grid-template-columns:3.4rem 1.4rem minmax(max-content,1fr)}.split-row .diff-line:first-child{border-right:1px solid #555c66}.empty-side{background:#171a1f!important}.line-comment{position:sticky;right:0;min-width:2.2rem;border:0;border-left:1px solid rgb(255 255 255 / 14%);background:#292e36;color:#b8ccff;cursor:pointer;font:700 .82rem/1 ui-monospace,SFMono-Regular,Menlo,monospace}.line-comment:hover{background:#384252;color:#fff}.review-comments{margin-top:2.2rem;border-top:2px solid var(--ink);padding-top:2.2rem}.comment-composer{display:grid;grid-template-columns:minmax(0,1fr) 11rem;gap:.9rem 1rem;margin-bottom:1rem;border:1px solid var(--line-strong);border-left:.35rem solid var(--blue);padding:1rem;background:var(--paper)}.comment-composer code{overflow-wrap:anywhere;font-size:.74rem}.comment-body,.agent-attention-control,.comment-composer>p,.comment-actions{grid-column:1 / -1}.comment-composer textarea{width:100%;resize:vertical;line-height:1.5}.comment-composer>p,.empty-comments{margin:0;color:var(--ink-muted);font-size:.75rem}.agent-attention-control{grid-template-columns:1.15rem minmax(0,1fr);align-items:center;border:1px solid var(--line);border-radius:var(--radius);padding:.65rem .75rem;background:var(--blue-soft);color:var(--ink);font-size:.78rem;font-weight:720}.agent-attention-control small{grid-column:2;color:var(--ink-muted);font-size:.68rem;font-weight:500}.compact-attention{display:inline-grid;margin-top:.4rem;padding:.45rem .55rem}.attention-state{color:var(--blue);font-size:.72rem!important;font-weight:720}.feedback-dock{position:fixed;z-index:20;right:1rem;bottom:1rem;width:min(44rem,calc(100vw - 22rem));max-height:min(70vh,42rem);overflow:auto;border:1px solid var(--line-strong);border-top:.35rem solid var(--blue);border-radius:var(--radius);padding:.9rem 1rem;background:var(--paper-raised);box-shadow:0 1.1rem 3rem #141e2d33}.feedback-dock>header,.feedback-dock>header>div,.feedback-actions{display:flex;flex-wrap:wrap;gap:.55rem;align-items:center}.feedback-dock>header{justify-content:space-between}.unread-badge{border-radius:999px;padding:.25rem .5rem;background:var(--blue);color:#fff;font-size:.68rem;font-weight:750}.feedback-preview{margin-top:.8rem;border-top:1px solid var(--line);padding-top:.8rem}.feedback-preview h2,.feedback-preview h3,.feedback-preview p{margin:0}.feedback-preview h2{font-size:.95rem}.feedback-preview ol{display:grid;gap:.35rem;margin:.65rem 0;padding-left:1.3rem}.feedback-preview li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.2rem .7rem;font-size:.75rem}.feedback-preview li code{overflow-wrap:anywhere;color:var(--ink-muted);font-size:.66rem}.feedback-preview li span{grid-row:1 / 3;grid-column:2;color:var(--ink-muted);font-size:.64rem;text-transform:uppercase}.feedback-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem}.feedback-preview-grid section{border:1px solid var(--line);padding:.6rem;background:var(--paper)}.feedback-preview-grid h3{margin-bottom:.25rem;font-size:.7rem}.feedback-preview-grid p,.feedback-warning{color:var(--ink-muted);font-size:.66rem;line-height:1.45}.feedback-warning{margin-top:.55rem!important;color:var(--amber)}.feedback-actions{margin-top:.65rem}.feedback-preview pre{overflow:auto;margin:.65rem 0 0;border:1px solid var(--line);padding:.65rem;background:var(--paper);white-space:pre-wrap;font-size:.67rem}.thread-list{display:grid;gap:.65rem;margin:0;padding:0;list-style:none}.thread-list li{border:1px solid var(--line);padding:.9rem 1rem;background:color-mix(in srgb,var(--paper) 60%,var(--paper-raised))}.thread-list li[data-thread-state=stale],.thread-list li[data-thread-state=orphaned]{border-left:.35rem solid var(--amber);background:var(--amber-soft)}.thread-list header{display:flex;justify-content:space-between;gap:1rem;color:var(--ink-muted);font-size:.66rem;text-transform:uppercase}.thread-list header div{display:flex;gap:.45rem}.thread-list code{display:block;overflow-wrap:anywhere;margin-top:.5rem;color:var(--ink-muted);font-size:.68rem}.thread-list p{margin:.65rem 0;white-space:pre-wrap;font-size:.86rem;line-height:1.55}.hunk-back{margin:.75rem 1rem;color:#9bbaff}.loading{margin:3rem;color:var(--ink-muted)}.empty-focus{min-height:12rem}@media(max-width:1100px){.report-shell{grid-template-columns:16rem minmax(0,1fr)}.report-header{grid-template-columns:16rem 1fr}.report-id{display:none}.decision-summary,.coverage-overview{grid-template-columns:1fr}.metrics{grid-template-columns:repeat(5,minmax(5rem,1fr));overflow-x:auto}.evidence-list{grid-template-columns:1fr}}@media(max-width:760px){.report-shell{display:block}.report-header{position:sticky;display:flex;min-height:3.75rem}.wordmark{border-right:0}.report-state{margin-left:auto;padding-right:1rem}.report-state small{display:none}.review-rail{position:static;width:100%;height:auto;max-height:26rem;border-right:0;border-bottom:1px solid var(--line-strong)}main{padding:.8rem}.feedback-dock{right:.5rem;bottom:.5rem;left:.5rem;width:auto}.feedback-preview-grid{grid-template-columns:1fr}.decision-summary,.focused-change{box-shadow:none}.change-header{display:block}.change-badges{justify-content:start;margin-top:1rem}.explanation-grid{display:block}.explanation-grid section,.explanation-grid section:nth-child(2n){padding:1.15rem 0;border-left:0}.risk-block,.gap-block{padding-left:1rem!important}.section-heading{display:block}.coverage-overview dl,.visual-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.coverage-overview dl div:nth-child(3),.visual-metrics div:nth-child(3){border-top:1px solid var(--line)}.visual-panes{grid-template-columns:1fr}.visual-slider{margin-left:0}.visual-mode-control button{flex:1 1 8rem}.segmented-control{margin-top:.8rem}.file-inventory li{grid-template-columns:1fr;gap:.25rem}.review-workspace-heading,.comment-composer{display:block}.review-transfer-actions,.review-controls,.comment-composer label,.comment-actions{margin-top:.75rem}.region-actions{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}.blink-after.blink-running{animation:none!important;opacity:1}}@media print{.review-rail,.segmented-control,.back-link,.anchor-button,.visual-mode-control,.visual-selectors,.wipe-control,.region-list,.review-transfer-actions,.review-controls,.comment-composer,.line-comment{display:none!important}.report-shell,.report-header{display:block}main{padding:0}.decision-summary,.focused-change{border:0;box-shadow:none}}\n";
|
|
217116
|
+
var reportUiJavaScript = 'typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");let js=!1,oc=!1;function lc(){js=!0}lc();const dc=1,pc=2,Pl=4,uc=8,cc=16,hc=1,fc=2,xt=Symbol("uninitialized"),mc="http://www.w3.org/1999/xhtml",kl=!1;var fi=Array.isArray,vc=Array.prototype.indexOf,ln=Array.prototype.includes,vn=Array.from,gc=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,xl=Object.getOwnPropertyDescriptors,yc=Object.prototype,_c=Array.prototype,mi=Object.getPrototypeOf,Qo=Object.isExtensible;const wc=()=>{};function bc(r){return r()}function Xn(r){for(var a=0;a<r.length;a++)r[a]()}function Al(){var r,a,s=new Promise((d,p)=>{r=d,a=p});return{promise:s,resolve:r,reject:a}}const jt=2,Ya=4,Os=8,Il=1<<24,jr=16,Ir=32,ia=64,ei=128,kr=512,vt=1024,gt=2048,xr=4096,Yt=8192,Ar=16384,ts=32768,ti=1<<25,Ga=65536,dn=1<<17,Pc=1<<18,rs=1<<19,$l=1<<20,Hr=1<<25,Oa=65536,pn=1<<21,Ja=1<<22,ga=1<<23,ya=Symbol("$state"),kc=Symbol(""),ql=Symbol("attributes"),ri=Symbol("class"),ai=Symbol("style"),si=Symbol("text"),tn=Symbol("form reset"),Ts=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Rl(r){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function xc(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ac(r,a,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Ic(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function $c(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function qc(r){throw new Error("https://svelte.dev/e/effect_orphan")}function Rc(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Sc(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ec(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Nc(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Cc(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Lc(){console.warn("https://svelte.dev/e/derived_inert")}function jc(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Oc(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Sl(r){return r===this.v}function Tc(r,a){return r!=r?a==a:r!==a||r!==null&&typeof r=="object"||typeof r=="function"}function El(r){return!Tc(r,this.v)}let Me=null;function Qa(r){Me=r}function Nl(r,a=!1,s){Me={p:Me,i:!1,c:null,e:null,s:r,x:null,r:de,l:js&&!a?{s:null,u:null,$:[]}:null}}function Cl(r){var a=Me,s=a.e;if(s!==null){a.e=null;for(var d of s)Gl(d)}return a.i=!0,Me=a.p,{}}function zs(){return!js||Me!==null&&Me.l===null}let Ea=[];function Ll(){var r=Ea;Ea=[],Xn(r)}function sa(r){if(Ea.length===0&&!qs){var a=Ea;queueMicrotask(()=>{a===Ea&&Ll()})}Ea.push(r)}function zc(){for(;Ea.length>0;)Ll()}function jl(r){var a=de;if(a===null)return pe.f|=ga,r;if((a.f&ts)===0&&(a.f&Ya)===0)throw r;va(r,a)}function va(r,a){if(!(a!==null&&(a.f&Ar)!==0)){for(;a!==null;){if((a.f&ei)!==0){if((a.f&ts)===0)throw r;try{a.b.error(r);return}catch(s){r=s}}a=a.parent}throw r}}const Mc=-7169;function Qe(r,a){r.f=r.f&Mc|a}function vi(r){(r.f&kr)!==0||r.deps===null?Qe(r,vt):Qe(r,xr)}function Ol(r){if(r!==null)for(const a of r)(a.f&jt)===0||(a.f&Oa)===0||(a.f^=Oa,Ol(a.deps))}function Tl(r,a,s){(r.f>)!==0?a.add(r):(r.f&xr)!==0&&s.add(r),Ol(r.deps),Qe(r,vt)}let Xo=!1;function Vc(){Xo||(Xo=!0,document.addEventListener("reset",r=>{Promise.resolve().then(()=>{if(!r.defaultPrevented)for(const a of r.target.elements)a[tn]?.()})},{capture:!0}))}function as(r){var a=pe,s=de;$r(null),qr(null);try{return r()}finally{$r(a),qr(s)}}function gi(r,a,s,d=s){r.addEventListener(a,()=>as(s));const p=r[tn];p?r[tn]=()=>{p(),d(!0)}:r[tn]=()=>d(!0),Vc()}function Fc(r){let a=0,s=Ta(0),d;return()=>{bi()&&(t(s),ss(()=>(a===0&&(d=c(()=>r(()=>Rs(s)))),a+=1,()=>{sa(()=>{a-=1,a===0&&(d?.(),d=void 0,Rs(s))})})))}}var Dc=Ga|rs;function Bc(r,a,s,d){new Hc(r,a,s,d)}class Hc{parent;is_pending=!1;transform_error;#t;#i=null;#e;#l;#a;#n=null;#r=null;#o=null;#s=null;#m=0;#d=0;#p=!1;#c=new Set;#v=new Set;#u=null;#y=Fc(()=>(this.#u=Ta(this.#m),()=>{this.#u=null}));constructor(a,s,d,p){this.#t=a,this.#e=s,this.#l=e=>{var n=de;n.b=this,n.f|=ei,d(e)},this.parent=de.b,this.transform_error=p??this.parent?.transform_error??(e=>e),this.#a=ki(()=>{this.#h()},Dc)}#g(){try{this.#n=Pr(()=>this.#l(this.#t))}catch(a){this.error(a)}}#b(a){const s=this.#e.failed,{reset:d,invoke_onerror:p}=this.#_(a);sa(p),s&&(this.#o=Pr(()=>{s(this.#t,()=>a,()=>d)}))}#_(a){var s=!1,d=!1;const p=()=>{if(s){Oc();return}s=!0,d&&Cc(),this.#o!==null&&La(this.#o,()=>{this.#o=null}),this.#f(()=>{this.#h()})};return{reset:p,invoke_onerror:()=>{try{d=!0,this.#e.onerror?.(a,p),d=!1}catch(n){va(n,this.#a&&this.#a.parent)}}}}#P(){const a=this.#e.pending;a&&(this.is_pending=!0,this.#r=Pr(()=>a(this.#t)),sa(()=>{var s=this.#s=document.createDocumentFragment(),d=_a();s.append(d),this.#n=this.#f(()=>Pr(()=>this.#l(d))),this.#d===0&&(this.#t.before(s),this.#s=null,La(this.#r,()=>{this.#r=null}),this.#w(ie))}))}#h(){try{if(this.is_pending=this.has_pending_snippet(),this.#d=0,this.#m=0,this.#n=Pr(()=>{this.#l(this.#t)}),this.#d>0){var a=this.#s=document.createDocumentFragment();Ai(this.#n,a);const s=this.#e.pending;this.#r=Pr(()=>s(this.#t))}else this.#w(ie)}catch(s){this.error(s)}}#w(a){this.is_pending=!1,a.transfer_effects(this.#c,this.#v)}defer_effect(a){Tl(a,this.#c,this.#v)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#e.pending}#f(a){var s=de,d=pe,p=Me;qr(this.#a),$r(this.#a),Qa(this.#a.ctx);try{return wa.ensure(),a()}catch(e){return jl(e),null}finally{qr(s),$r(d),Qa(p)}}#k(a,s){if(!this.has_pending_snippet()){this.parent&&this.parent.#k(a,s);return}this.#d+=a,this.#d===0&&(this.#w(s),this.#r&&La(this.#r,()=>{this.#r=null}),this.#s&&(this.#t.before(this.#s),this.#s=null))}update_pending_count(a,s){this.#k(a,s),this.#m+=a,!(!this.#u||this.#p)&&(this.#p=!0,sa(()=>{this.#p=!1,this.#u&&Xa(this.#u,this.#m)}))}get_effect_pending(){return this.#y(),t(this.#u)}error(a){if(!this.#e.onerror&&!this.#e.failed)throw a;ie?.is_fork?(this.#n&&ie.skip_effect(this.#n),this.#r&&ie.skip_effect(this.#r),this.#o&&ie.skip_effect(this.#o),ie.oncommit(()=>{this.#x(a)})):this.#x(a)}#x(a){this.#n&&(dr(this.#n),this.#n=null),this.#r&&(dr(this.#r),this.#r=null),this.#o&&(dr(this.#o),this.#o=null);let s=this.#e.failed;const d=p=>{const{reset:e,invoke_onerror:n}=this.#_(p);n(),s&&(this.#o=this.#f(()=>{try{return Pr(()=>{var l=de;l.b=this,l.f|=ei,s(this.#t,()=>p,()=>e)})}catch(l){return va(l,this.#a.parent),null}}))};sa(()=>{var p;try{p=this.transform_error(a)}catch(e){va(e,this.#a&&this.#a.parent);return}p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(d,e=>va(e,this.#a&&this.#a.parent)):d(p)})}}function Wc(r,a,s,d){const p=zs()?gn:ma;var e=r.filter(w=>!w.settled),n=a.map(p);if(s.length===0&&e.length===0){d(n);return}var l=de,i=Zc(),o=e.length===1?e[0].promise:e.length>1?Promise.all(e.map(w=>w.promise)):null;function f(w){if((l.f&Ar)===0){i();try{d([...n,...w])}catch($){va($,l)}un()}}var h=zl();if(s.length===0){o.then(()=>f([])).finally(h);return}function m(){Promise.all(s.map(w=>Uc(w))).then(f).catch(w=>va(w,l)).finally(h)}o?o.then(()=>{i(),m(),un()}):m()}function Zc(){var r=de,a=pe,s=Me,d=ie;return function(e=!0){qr(r),$r(a),Qa(s),e&&(r.f&Ar)===0&&(d?.activate(),d?.apply())}}function un(r=!0){qr(null),$r(null),Qa(null),r&&ie?.deactivate()}function zl(){var r=de,a=r.b,s=ie,d=!!a?.is_rendered();return a?.update_pending_count(1,s),s.increment(d,r),()=>{a?.update_pending_count(-1,s),s.decrement(d,r)}}function gn(r){var a=jt|gt;return de!==null&&(de.f|=rs),{ctx:Me,deps:null,effects:null,equals:Sl,f:a,fn:r,reactions:null,rv:0,v:xt,wv:0,parent:de,ac:null}}const Ps=Symbol("obsolete");function Uc(r,a,s){let d=de;d===null&&xc();var p=void 0,e=Ta(xt),n=!pe,l=new Set;return dh(()=>{var i=de,o=Al();p=o.promise;try{Promise.resolve(r()).then(o.resolve,w=>{w!==Ts&&o.reject(w)}).finally(un)}catch(w){o.reject(w),un()}var f=ie;if(n){if((i.f&ts)!==0)var h=zl();if(d.b?.is_rendered())f.async_deriveds.get(i)?.reject(Ps);else for(const w of l.values())w.reject(Ps);l.add(o),f.async_deriveds.set(i,o)}const m=(w,$=void 0)=>{h?.(),l.delete(o),$!==Ps&&(f.activate(),$?(e.f|=ga,Xa(e,$)):((e.f&ga)!==0&&(e.f^=ga),Xa(e,w)),f.deactivate())};o.promise.then(m,w=>m(null,w||"unknown"))}),Pi(()=>{for(const i of l)i.reject(Ps)}),new Promise(i=>{function o(f){function h(){f===p?i(e):o(p)}f.then(h,h)}o(p)})}function Kc(r){const a=gn(r);return ad(a),a}function ma(r){const a=gn(r);return a.equals=El,a}function Jc(r){var a=r.effects;if(a!==null){r.effects=null;for(var s=0;s<a.length;s+=1)dr(a[s])}}function yi(r){var a,s=de,d=r.parent;if(!ba&&d!==null&&r.v!==xt&&(d.f&(Ar|Yt))!==0)return Lc(),r.v;qr(d);try{r.f&=~Oa,Jc(r),a=od(r)}finally{qr(s)}return a}function Ml(r){var a=yi(r);if(!r.equals(a)&&(r.wv=nd(),(!ie?.is_fork||r.deps===null)&&(ie!==null?(ie.capture(r,a,!0),ni?.capture(r,a,!0)):r.v=a,r.deps===null))){Qe(r,vt);return}ba||(Or!==null?(bi()||ie?.is_fork)&&Or.set(r,a):vi(r))}function Yc(r){if(r.effects!==null)for(const a of r.effects)(a.teardown||a.ac)&&(a.teardown?.(),a.ac!==null&&as(()=>{a.ac.abort(Ts),a.ac=null}),a.fn!==null&&(a.teardown=wc),Ns(a,0),xi(a))}function Vl(r){if(r.effects!==null)for(const a of r.effects)a.teardown&&a.fn!==null&&za(a)}let Mn=null,Wa=null,ie=null,ni=null,Or=null,ii=null,qs=!1,Vn=!1,Ka=null,rn=null;var el=0;let Gc=1;class wa{id=Gc++;#t=!1;linked=!0;#i=null;#e=null;async_deriveds=new Map;current=new Map;previous=new Map;#l=new Set;#a=new Set;#n=0;#r=new Map;#o=null;#s=[];#m=[];#d=new Set;#p=new Set;#c=new Map;#v=new Set;is_fork=!1;#u=!1;constructor(){Wa===null?Mn=Wa=this:(Wa.#e=this,this.#i=Wa),Wa=this}#y(){if(this.is_fork)return!0;for(const d of this.#r.keys()){for(var a=d,s=!1;a.parent!==null;){if(this.#c.has(a)){s=!0;break}a=a.parent}if(!s)return!0}return!1}skip_effect(a){this.#c.has(a)||this.#c.set(a,{d:[],m:[]}),this.#v.delete(a)}unskip_effect(a,s=d=>this.schedule(d)){var d=this.#c.get(a);if(d){this.#c.delete(a);for(var p of d.d)Qe(p,gt),s(p);for(p of d.m)Qe(p,xr),s(p)}this.#v.add(a)}#g(){this.#t=!0,el++>1e3&&(this.#f(),Xc());for(const i of this.#d)this.#p.delete(i),Qe(i,gt),this.schedule(i);for(const i of this.#p)Qe(i,xr),this.schedule(i);const a=this.#s;this.#s=[],this.apply();var s=Ka=[],d=[],p=rn=[];for(const i of a)try{this.#b(i,s,d)}catch(o){throw Bl(i),this.#y()||this.discard(),o}if(ie=null,p.length>0){var e=wa.ensure();for(const i of p)e.schedule(i)}if(Ka=null,rn=null,this.#y()){this.#h(d),this.#h(s);for(const[i,o]of this.#c)Dl(i,o);p.length>0&&ie.#g();return}const n=this.#_();if(n){this.#h(d),this.#h(s),n.#P(this);return}this.#d.clear(),this.#p.clear();for(const i of this.#l)i(this);this.#l.clear(),ni=this,tl(d),tl(s),ni=null,this.#o?.resolve();var l=ie;if(this.#n===0&&(this.#s.length===0||l!==null)&&this.#f(),this.#s.length>0)if(l!==null){const i=l;i.#s.push(...this.#s.filter(o=>!i.#s.includes(o)))}else l=this;l!==null&&l.#g()}#b(a,s,d){a.f^=vt;for(var p=a.first;p!==null;){var e=p.f,n=(e&(Ir|ia))!==0,l=n&&(e&vt)!==0,i=l||(e&Yt)!==0||this.#c.has(p);if(!i&&p.fn!==null){n?p.f^=vt:(e&Ya)!==0?s.push(p):ns(p)&&((e&jr)!==0&&this.#p.add(p),za(p));var o=p.first;if(o!==null){p=o;continue}}for(;p!==null;){var f=p.next;if(f!==null){p=f;break}p=p.parent}}}#_(){for(var a=this.#i;a!==null;){if(!a.is_fork){for(const[s,[,d]]of this.current)if(a.current.has(s)&&!d)return a}a=a.#i}return null}#P(a){for(const[d,p]of a.current)!this.previous.has(d)&&a.previous.has(d)&&this.previous.set(d,a.previous.get(d)),this.current.set(d,p);for(const[d,p]of a.async_deriveds){const e=this.async_deriveds.get(d);e&&p.promise.then(e.resolve).catch(e.reject)}a.async_deriveds.clear(),this.transfer_effects(a.#d,a.#p);const s=d=>{var p=d.reactions;if(p!==null&&!((d.f&jt)!==0&&(d.f&(gt|xr))===0))for(const l of p){var e=l.f;if((e&jt)!==0)s(l);else{var n=l;e&(Ja|jr)&&!this.async_deriveds.has(n)&&(this.#p.delete(n),Qe(n,gt),this.schedule(n))}}};for(const d of this.current.keys())s(d);this.oncommit(()=>a.discard()),a.#f(),ie=this,this.#g()}#h(a){for(var s=0;s<a.length;s+=1)Tl(a[s],this.#d,this.#p)}capture(a,s,d=!1){a.v!==xt&&!this.previous.has(a)&&this.previous.set(a,a.v),(a.f&ga)===0&&(this.current.set(a,[s,d]),Or?.set(a,s)),this.is_fork||(a.v=s)}activate(){ie=this}deactivate(){ie=null,Or=null}flush(){try{Vn=!0,ie=this,this.#g()}finally{el=0,ii=null,Ka=null,rn=null,Vn=!1,ie=null,Or=null,Ca.clear()}}discard(){for(const a of this.#a)a(this);this.#a.clear();for(const a of this.async_deriveds.values())a.reject(Ps);this.#f(),this.#o?.resolve()}register_created_effect(a){this.#m.push(a)}#w(){for(let h=Mn;h!==null;h=h.#e){var a=h.id<this.id,s=[];for(const[m,[w,$]]of this.current){if(h.current.has(m)){var d=h.current.get(m)[0];if(a&&w!==d)h.current.set(m,[w,$]);else continue}s.push(m)}if(a)for(const[m,w]of this.async_deriveds){const $=h.async_deriveds.get(m);$&&w.promise.then($.resolve).catch($.reject)}var p=[...h.current.keys()].filter(m=>!h.current.get(m)[1]);if(!(!h.#t||p.length===0)){var e=p.filter(m=>!this.current.has(m));if(e.length===0)a&&h.discard();else if(s.length>0){if(a)for(const m of this.#v)h.unskip_effect(m,w=>{(w.f&(jr|Ja))!==0?h.schedule(w):h.#h([w])});h.activate();var n=new Set,l=new Map;for(var i of s)Fl(i,e,n,l);l=new Map;var o=[...h.current].filter(([m,w])=>{const $=this.current.get(m);return $?$[0]!==w[0]||$[1]!==w[1]:!0}).map(([m])=>m);if(o.length>0)for(const m of this.#m)(m.f&(Ar|Yt|dn))===0&&_i(m,o,l)&&((m.f&(Ja|jr))!==0?(Qe(m,gt),h.schedule(m)):h.#d.add(m));if(h.#s.length>0&&!h.#u){h.apply();for(var f of h.#s)h.#b(f,[],[]);h.#s=[]}h.deactivate()}}}}increment(a,s){if(this.#n+=1,a){let d=this.#r.get(s)??0;this.#r.set(s,d+1)}}decrement(a,s){if(this.#n-=1,a){let d=this.#r.get(s)??0;d===1?this.#r.delete(s):this.#r.set(s,d-1)}this.#u||(this.#u=!0,sa(()=>{this.#u=!1,this.linked&&this.flush()}))}transfer_effects(a,s){for(const d of a)this.#d.add(d);for(const d of s)this.#p.add(d);a.clear(),s.clear()}oncommit(a){this.#l.add(a)}ondiscard(a){this.#a.add(a)}settled(){return(this.#o??=Al()).promise}static ensure(){if(ie===null){const a=ie=new wa;!Vn&&!qs&&sa(()=>{a.#t||a.flush()})}return ie}apply(){{Or=null;return}}schedule(a){if(ii=a,a.b?.is_pending&&(a.f&(Ya|Os|Il))!==0&&(a.f&ts)===0){a.b.defer_effect(a);return}for(var s=a;s.parent!==null;){s=s.parent;var d=s.f;if(Ka!==null&&s===de&&(pe===null||(pe.f&jt)===0))return;if((d&(ia|Ir))!==0){if((d&vt)===0)return;s.f^=vt}}this.#s.push(s)}#f(){if(this.linked){var a=this.#i,s=this.#e;a===null?Mn=s:a.#e=s,s===null?Wa=a:s.#i=a,this.linked=!1}}}function Qc(r){var a=qs;qs=!0;try{for(var s;;){if(zc(),ie===null)return s;ie.flush()}}finally{qs=a}}function Xc(){try{Rc()}catch(r){va(r,ii)}}let aa=null;function tl(r){var a=r.length;if(a!==0){for(var s=0;s<a;){var d=r[s++];if((d.f&(Ar|Yt))===0&&ns(d)&&(aa=new Set,za(d),d.deps===null&&d.first===null&&d.nodes===null&&d.teardown===null&&d.ac===null&&ed(d),aa?.size>0)){Ca.clear();for(const p of aa){if((p.f&(Ar|Yt))!==0)continue;const e=[p];let n=p.parent;for(;n!==null;)aa.has(n)&&(aa.delete(n),e.push(n)),n=n.parent;for(let l=e.length-1;l>=0;l--){const i=e[l];(i.f&(Ar|Yt))===0&&za(i)}}aa.clear()}}aa=null}}function Fl(r,a,s,d){if(!s.has(r)&&(s.add(r),r.reactions!==null))for(const p of r.reactions){const e=p.f;(e&jt)!==0?Fl(p,a,s,d):(e&(Ja|jr))!==0&&(e>)===0&&_i(p,a,d)&&(Qe(p,gt),wi(p))}}function _i(r,a,s){const d=s.get(r);if(d!==void 0)return d;if(r.deps!==null)for(const p of r.deps){if(ln.call(a,p))return!0;if((p.f&jt)!==0&&_i(p,a,s))return s.set(p,!0),!0}return s.set(r,!1),!1}function wi(r){ie.schedule(r)}function Dl(r,a){if(!((r.f&Ir)!==0&&(r.f&vt)!==0)){(r.f>)!==0?a.d.push(r):(r.f&xr)!==0&&a.m.push(r),Qe(r,vt);for(var s=r.first;s!==null;)Dl(s,a),s=s.next}}function Bl(r){Qe(r,vt);for(var a=r.first;a!==null;)Bl(a),a=a.next}let cn=new Set;const Ca=new Map;let Hl=!1;function Ta(r,a){var s={f:0,v:r,reactions:null,equals:Sl,rv:0,wv:0};return s}function ha(r,a){const s=Ta(r);return ad(s),s}function J(r,a=!1,s=!0){const d=Ta(r);return a||(d.equals=El),js&&s&&Me!==null&&Me.l!==null&&(Me.l.s??=[]).push(d),d}function rl(r,a){return x(r,c(()=>t(r))),a}function x(r,a,s=!1){pe!==null&&(!Tr||(pe.f&dn)!==0)&&zs()&&(pe.f&(jt|jr|Ja|dn))!==0&&(Wr===null||!Wr.has(r))&&Nc();let d=s?ks(a):a;return Xa(r,d,rn)}function Xa(r,a,s=null){if(!r.equals(a)){Ca.set(r,ba?a:r.v);var d=wa.ensure();if(d.capture(r,a),(r.f&jt)!==0){const p=r;(r.f>)!==0&&yi(p),Or===null&&vi(p)}r.wv=nd(),Wl(r,gt,s),zs()&&de!==null&&(de.f&vt)!==0&&(de.f&(Ir|ia))===0&&(br===null?ch([r]):br.push(r)),!d.is_fork&&cn.size>0&&!Hl&&eh()}return a}function eh(){Hl=!1;for(const r of cn){(r.f&vt)!==0&&Qe(r,xr);let a;try{a=ns(r)}catch{a=!0}a&&za(r)}cn.clear()}function Rs(r){x(r,r.v+1)}function Wl(r,a,s){var d=r.reactions;if(d!==null)for(var p=zs(),e=d.length,n=0;n<e;n++){var l=d[n],i=l.f;if(!(!p&&l===de)){var o=(i>)===0;if(o&&Qe(l,a),(i&dn)!==0)cn.add(l);else if((i&jt)!==0){var f=l;Or?.delete(f),(i&Oa)===0&&(i&kr&&(de===null||(de.f&pn)===0)&&(l.f|=Oa),Wl(f,xr,s))}else if(o){var h=l;(i&jr)!==0&&aa!==null&&aa.add(h),s!==null?s.push(h):wi(h)}}}}function ks(r){if(typeof r!="object"||r===null||ya in r)return r;const a=mi(r);if(a!==yc&&a!==_c)return r;var s=new Map,d=fi(r),p=ha(0),e=ja,n=l=>{if(ja===e)return l();var i=pe,o=ja;$r(null),il(e);var f=l();return $r(i),il(o),f};return d&&s.set("length",ha(r.length)),new Proxy(r,{defineProperty(l,i,o){(!("value"in o)||o.configurable===!1||o.enumerable===!1||o.writable===!1)&&Sc();var f=s.get(i);return f===void 0?n(()=>{var h=ha(o.value);return s.set(i,h),h}):x(f,o.value,!0),!0},deleteProperty(l,i){var o=s.get(i);if(o===void 0){if(i in l){const f=n(()=>ha(xt));s.set(i,f),Rs(p)}}else x(o,xt),Rs(p);return!0},get(l,i,o){if(i===ya)return r;var f=s.get(i),h=i in l;if(f===void 0&&(!h||$s(l,i)?.writable)&&(f=n(()=>{var w=ks(h?l[i]:xt),$=ha(w);return $}),s.set(i,f)),f!==void 0){var m=t(f);return m===xt?void 0:m}return Reflect.get(l,i,o)},getOwnPropertyDescriptor(l,i){var o=Reflect.getOwnPropertyDescriptor(l,i);if(o&&"value"in o){var f=s.get(i);f&&(o.value=t(f))}else if(o===void 0){var h=s.get(i),m=h?.v;if(h!==void 0&&m!==xt)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return o},has(l,i){if(i===ya)return!0;var o=s.get(i),f=o!==void 0&&o.v!==xt||Reflect.has(l,i);if(o!==void 0||de!==null&&(!f||$s(l,i)?.writable)){o===void 0&&(o=n(()=>{var m=f?ks(l[i]):xt,w=ha(m);return w}),s.set(i,o));var h=t(o);if(h===xt)return!1}return f},set(l,i,o,f){var h=s.get(i),m=i in l;if(d&&i==="length")for(var w=o;w<h.v;w+=1){var $=s.get(w+"");$!==void 0?x($,xt):w in l&&($=n(()=>ha(xt)),s.set(w+"",$))}if(h===void 0)(!m||$s(l,i)?.writable)&&(h=n(()=>ha(void 0)),x(h,ks(o)),s.set(i,h));else{m=h.v!==xt;var V=n(()=>ks(o));x(h,V)}var q=Reflect.getOwnPropertyDescriptor(l,i);if(q?.set&&q.set.call(f,o),!m){if(d&&typeof i=="string"){var B=s.get("length"),te=Number(i);Number.isInteger(te)&&te>=B.v&&x(B,te+1)}Rs(p)}return!0},ownKeys(l){t(p);var i=Reflect.ownKeys(l).filter(h=>{var m=s.get(h);return m===void 0||m.v!==xt});for(var[o,f]of s)f.v!==xt&&!(o in l)&&i.push(o);return i},setPrototypeOf(){Ec()}})}function al(r){try{if(r!==null&&typeof r=="object"&&ya in r)return r[ya]}catch{}return r}function th(r,a){return Object.is(al(r),al(a))}var sl,Zl,Ul,Kl;function rh(){if(sl===void 0){sl=window,Zl=/Firefox/.test(navigator.userAgent);var r=Element.prototype,a=Node.prototype,s=Text.prototype;Ul=$s(a,"firstChild").get,Kl=$s(a,"nextSibling").get,Qo(r)&&(r[ri]=void 0,r[ql]=null,r[ai]=void 0,r.__e=void 0),Qo(s)&&(s[si]=void 0)}}function _a(r=""){return document.createTextNode(r)}function hn(r){return Ul.call(r)}function Ms(r){return Kl.call(r)}function u(r,a){return hn(r)}function Lr(r,a=!1){{var s=hn(r);return s instanceof Comment&&s.data===""?Ms(s):s}}function g(r,a=1,s=!1){let d=r;for(;a--;)d=Ms(d);return d}function ah(r){r.textContent=""}function Jl(){return!1}function sh(r,a,s){return s?document.createElement(r,{is:s}):document.createElement(r)}function Yl(r){de===null&&(pe===null&&qc(),$c()),ba&&Ic()}function nh(r,a){var s=a.last;s===null?a.last=a.first=r:(s.next=r,r.prev=s,a.last=r)}function Zr(r,a){var s=de;s!==null&&(s.f&Yt)!==0&&(r|=Yt);var d={ctx:Me,deps:null,nodes:null,f:r|gt|kr,first:null,fn:a,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};ie?.register_created_effect(d);var p=d;if((r&Ya)!==0)Ka!==null?Ka.push(d):wa.ensure().schedule(d);else if(a!==null){try{za(d)}catch(n){throw dr(d),n}p.deps===null&&p.teardown===null&&p.nodes===null&&p.first===p.last&&(p.f&rs)===0&&(p=p.first,(r&jr)!==0&&(r&Ga)!==0&&p!==null&&(p.f|=Ga))}if(p!==null&&(p.parent=s,s!==null&&nh(p,s),pe!==null&&(pe.f&jt)!==0&&(r&ia)===0)){var e=pe;(e.effects??=[]).push(p)}return d}function bi(){return pe!==null&&!Tr}function Pi(r){const a=Zr(Os,null);return Qe(a,vt),a.teardown=r,a}function oi(r){Yl();var a=de.f,s=!pe&&(a&Ir)!==0&&Me!==null&&!Me.i;if(s){var d=Me;(d.e??=[]).push(r)}else return Gl(r)}function Gl(r){return Zr(Ya|$l,r)}function ih(r){return Yl(),Zr(Os|$l,r)}function oh(r){wa.ensure();const a=Zr(ia|rs,r);return(s={})=>new Promise(d=>{s.outro?La(a,()=>{dr(a),d(void 0)}):(dr(a),d(void 0))})}function Ql(r){return Zr(Ya,r)}function Zt(r,a){var s=Me,d={effect:null,ran:!1,deps:r};s.l.$.push(d),d.effect=ss(()=>{if(r(),!d.ran){d.ran=!0;var p=de;try{qr(p.parent),c(a)}finally{qr(p)}}})}function lh(){var r=Me;ss(()=>{for(var a of r.l.$){a.deps();var s=a.effect;(s.f&vt)!==0&&s.deps!==null&&Qe(s,xr),ns(s)&&za(s),a.ran=!1}})}function dh(r){return Zr(Ja|rs,r)}function ss(r,a=0){return Zr(Os|a,r)}function R(r,a=[],s=[],d=[]){Wc(d,a,s,p=>{Zr(Os,()=>{r(...p.map(t))})})}function ki(r,a=0){var s=Zr(jr|a,r);return s}function Pr(r){return Zr(Ir|rs,r)}function Xl(r){var a=r.teardown;if(a!==null){const s=ba,d=pe;nl(!0),$r(null);try{a.call(null)}finally{nl(s),$r(d)}}}function xi(r,a=!1){var s=r.first;for(r.first=r.last=null;s!==null;){const p=s.ac;p!==null&&as(()=>{p.abort(Ts)});var d=s.next;(s.f&ia)!==0?s.parent=null:dr(s,a),s=d}}function ph(r){for(var a=r.first;a!==null;){var s=a.next;(a.f&Ir)===0&&dr(a),a=s}}function dr(r,a=!0){var s=!1;(a||(r.f&Pc)!==0)&&r.nodes!==null&&r.nodes.end!==null&&(uh(r.nodes.start,r.nodes.end),s=!0),r.f|=ti,xi(r,a&&!s),Ns(r,0);var d=r.nodes&&r.nodes.t;if(d!==null)for(const e of d)e.stop();Xl(r),r.f^=ti,r.f|=Ar;var p=r.parent;p!==null&&p.first!==null&&ed(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes=r.ac=r.b=null}function uh(r,a){for(;r!==null;){var s=r===a?null:Ms(r);r.remove(),r=s}}function ed(r){var a=r.parent,s=r.prev,d=r.next;s!==null&&(s.next=d),d!==null&&(d.prev=s),a!==null&&(a.first===r&&(a.first=d),a.last===r&&(a.last=s))}function La(r,a,s=!0){var d=[];td(r,d,!0);var p=()=>{s&&dr(r),a&&a()},e=d.length;if(e>0){var n=()=>--e||p();for(var l of d)l.out(n)}else p()}function td(r,a,s){if((r.f&Yt)===0){r.f^=Yt;var d=r.nodes&&r.nodes.t;if(d!==null)for(const l of d)(l.is_global||s)&&a.push(l);for(var p=r.first;p!==null;){var e=p.next;if((p.f&ia)===0){var n=(p.f&Ga)!==0||(p.f&Ir)!==0&&(r.f&jr)!==0;td(p,a,n?s:!1)}p=e}}}function fn(r){rd(r,!0)}function rd(r,a){if((r.f&Yt)!==0){r.f^=Yt,(r.f&vt)===0&&(Qe(r,gt),wa.ensure().schedule(r));for(var s=r.first;s!==null;){var d=s.next,p=(s.f&Ga)!==0||(s.f&Ir)!==0;rd(s,p?a:!1),s=d}var e=r.nodes&&r.nodes.t;if(e!==null)for(const n of e)(n.is_global||a)&&n.in()}}function Ai(r,a){if(r.nodes)for(var s=r.nodes.start,d=r.nodes.end;s!==null;){var p=s===d?null:Ms(s);a.append(s),s=p}}let an=!1,ba=!1;function nl(r){ba=r}let pe=null,Tr=!1;function $r(r){pe=r}let de=null;function qr(r){de=r}let Wr=null;function ad(r){pe!==null&&(Wr??=new Set).add(r)}let lr=null,yr=0,br=null;function ch(r){br=r}let sd=1,Na=0,ja=Na;function il(r){ja=r}function nd(){return++sd}function ns(r){var a=r.f;if((a>)!==0)return!0;if(a&jt&&(r.f&=~Oa),(a&xr)!==0){for(var s=r.deps,d=s.length,p=0;p<d;p++){var e=s[p];if(ns(e)&&Ml(e),e.wv>r.wv)return!0}(a&kr)!==0&&Or===null&&Qe(r,vt)}return!1}function id(r,a,s=!0){var d=r.reactions;if(d!==null&&!(Wr!==null&&Wr.has(r)))for(var p=0;p<d.length;p++){var e=d[p];(e.f&jt)!==0?id(e,a,!1):a===e&&(s?Qe(e,gt):(e.f&vt)!==0&&Qe(e,xr),wi(e))}}function od(r){var a=lr,s=yr,d=br,p=pe,e=Wr,n=Me,l=Tr,i=ja,o=r.f;lr=null,yr=0,br=null,pe=(o&(Ir|ia))===0?r:null,Wr=null,Qa(r.ctx),Tr=!1,ja=++Na,r.ac!==null&&(as(()=>{r.ac.abort(Ts)}),r.ac=null);try{r.f|=pn;var f=r.fn,h=f();r.f|=ts;var m=r.deps,w=ie?.is_fork;if(lr!==null){var $;if(w||Ns(r,yr),m!==null&&yr>0)for(m.length=yr+lr.length,$=0;$<lr.length;$++)m[yr+$]=lr[$];else r.deps=m=lr;if(bi()&&(r.f&kr)!==0)for($=yr;$<m.length;$++)(m[$].reactions??=[]).push(r)}else!w&&m!==null&&yr<m.length&&(Ns(r,yr),m.length=yr);if(zs()&&br!==null&&!Tr&&m!==null&&(r.f&(jt|xr|gt))===0)for($=0;$<br.length;$++)id(br[$],r);if(p!==null&&p!==r){if(Na++,p.deps!==null)for(let V=0;V<s;V+=1)p.deps[V].rv=Na;if(a!==null)for(const V of a)V.rv=Na;br!==null&&(d===null?d=br:d.push(...br))}return(r.f&ga)!==0&&(r.f^=ga),h}catch(V){return jl(V)}finally{r.f^=pn,lr=a,yr=s,br=d,pe=p,Wr=e,Qa(n),Tr=l,ja=i}}function hh(r,a){let s=a.reactions;if(s!==null){var d=vc.call(s,r);if(d!==-1){var p=s.length-1;p===0?s=a.reactions=null:(s[d]=s[p],s.pop())}}if(s===null&&(a.f&jt)!==0&&(lr===null||!ln.call(lr,a))){var e=a;(e.f&kr)!==0&&(e.f^=kr,e.f&=~Oa),e.v!==xt&&vi(e),e.ac!==null&&as(()=>{e.ac.abort(Ts),e.ac=null,Qe(e,gt)}),Yc(e),Ns(e,0)}}function Ns(r,a){var s=r.deps;if(s!==null)for(var d=a;d<s.length;d++)hh(r,s[d])}function za(r){var a=r.f;if((a&Ar)===0){Qe(r,vt);var s=de,d=an;de=r,an=(a&(Ir|ia))===0;try{(a&(jr|Il))!==0?ph(r):xi(r),Xl(r);var p=od(r);r.teardown=typeof p=="function"?p:null,r.wv=sd;var e;kl&&oc&&(r.f>)!==0&&r.deps}finally{an=d,de=s}}}async function sn(){await Promise.resolve(),Qc()}function t(r){var a=r.f,s=(a&jt)!==0;if(pe!==null&&!Tr){var d=de!==null&&(de.f&Ar)!==0;if(!d&&(Wr===null||!Wr.has(r))){var p=pe.deps;if((pe.f&pn)!==0)r.rv<Na&&(r.rv=Na,lr===null&&p!==null&&p[yr]===r?yr++:lr===null?lr=[r]:lr.push(r));else{pe.deps??=[],ln.call(pe.deps,r)||pe.deps.push(r);var e=r.reactions;e===null?r.reactions=[pe]:ln.call(e,pe)||e.push(pe)}}}if(ba&&Ca.has(r))return Ca.get(r);if(s){var n=r;if(ba){var l=n.v;return((n.f&vt)===0&&n.reactions!==null||dd(n))&&(l=yi(n)),Ca.set(n,l),l}var i=(n.f&kr)===0&&!Tr&&pe!==null&&(an||(pe.f&kr)!==0),o=(n.f&ts)===0;ns(n)&&(i&&(n.f|=kr),Ml(n)),i&&!o&&(Vl(n),ld(n))}if(Or?.has(r))return Or.get(r);if((r.f&ga)!==0)throw r.v;return r.v}function ld(r){if(r.f|=kr,r.deps!==null)for(const a of r.deps)(a.reactions??=[]).push(r),(a.f&jt)!==0&&(a.f&kr)===0&&(Vl(a),ld(a))}function dd(r){if(r.v===xt)return!0;if(r.deps===null)return!1;for(const a of r.deps)if(Ca.has(a)||(a.f&jt)!==0&&dd(a))return!0;return!1}function c(r){var a=Tr;try{return Tr=!0,r()}finally{Tr=a}}function He(r){if(!(typeof r!="object"||!r||r instanceof EventTarget)){if(ya in r)li(r);else if(!Array.isArray(r))for(let a in r){const s=r[a];typeof s=="object"&&s&&ya in s&&li(s)}}}function li(r,a=new Set){if(typeof r=="object"&&r!==null&&!(r instanceof EventTarget)&&!a.has(r)){a.add(r),r instanceof Date&&r.getTime();for(let d in r)try{li(r[d],a)}catch{}const s=mi(r);if(s!==Object.prototype&&s!==Array.prototype&&s!==Map.prototype&&s!==Set.prototype&&s!==Date.prototype){const d=xl(s);for(let p in d){const e=d[p].get;if(e)try{e.call(r)}catch{}}}}}const xs=Symbol("events"),pd=new Set,di=new Set;function fh(r,a,s,d={}){function p(e){if(d.capture||pi.call(a,e),!e.cancelBubble)return as(()=>s?.call(this,e))}return r.startsWith("pointer")||r.startsWith("touch")||r==="wheel"?sa(()=>{a.addEventListener(r,p,d)}):a.addEventListener(r,p,d),p}function Fn(r,a,s,d,p){var e={capture:d,passive:p},n=fh(r,a,s,e);(a===document.body||a===window||a===document||a instanceof HTMLMediaElement)&&Pi(()=>{a.removeEventListener(r,n,e)})}function Y(r,a,s){(a[xs]??={})[r]=s}function mh(r){for(var a=0;a<r.length;a++)pd.add(r[a]);for(var s of di)s(r)}let ol=null;function pi(r){var a=this,s=a.ownerDocument,d=r.type,p=r.composedPath?.()||[],e=p[0]||r.target;ol=r;var n=0,l=ol===r&&r[xs];if(l){var i=p.indexOf(l);if(i!==-1&&(a===document||a===window)){r[xs]=a;return}var o=p.indexOf(a);if(o===-1)return;i<=o&&(n=i)}if(e=p[n]||r.target,e!==a){gc(r,"currentTarget",{configurable:!0,get(){return e||s}});var f=pe,h=de;$r(null),qr(null);try{for(var m,w=[];e!==null&&e!==a;){try{var $=e[xs]?.[d];$!=null&&(!e.disabled||r.target===e)&&$.call(e,r)}catch(V){m?w.push(V):m=V}if(r.cancelBubble)break;n++,e=n<p.length?p[n]:null}if(m){for(let V of w)queueMicrotask(()=>{throw V});throw m}}finally{r[xs]=a,delete r.currentTarget,$r(f),qr(h)}}}const vh=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:r=>r});function gh(r){return vh?.createHTML(r)??r}function yh(r){var a=sh("template");return a.innerHTML=gh(r.replaceAll("<!>","<!---->")),a.content}function ui(r,a){var s=de;s.nodes===null&&(s.nodes={start:r,end:a,a:null,t:null})}function z(r,a){var s=(a&hc)!==0,d=(a&fc)!==0,p,e=!r.startsWith("<!>");return()=>{p===void 0&&(p=yh(e?r:"<!>"+r),s||(p=hn(p)));var n=d||Zl?document.importNode(p,!0):p.cloneNode(!0);if(s){var l=hn(n),i=n.lastChild;ui(l,i)}else ui(n,n);return n}}function gs(){var r=document.createDocumentFragment(),a=document.createComment(""),s=_a();return r.append(a,s),ui(a,s),r}function I(r,a){r!==null&&r.before(a)}const _h=["touchstart","touchmove"];function wh(r){return _h.includes(r)}function _(r,a){var s=a==null?"":typeof a=="object"?`${a}`:a;s!==(r[si]??=r.nodeValue)&&(r[si]=s,r.nodeValue=`${s}`)}function bh(r,a){return Ph(r,a)}const Ys=new Map;function Ph(r,{target:a,anchor:s,props:d={},events:p,context:e,intro:n=!0,transformError:l}){rh();var i=void 0,o=oh(()=>{var f=s??a.appendChild(_a());Bc(f,{pending:()=>{}},w=>{Nl({});var $=Me;e&&($.c=e),p&&(d.$$events=p),i=r(w,d)||{},Cl()},l);var h=new Set,m=w=>{for(var $=0;$<w.length;$++){var V=w[$];if(!h.has(V)){h.add(V);var q=wh(V);for(const re of[a,document]){var B=Ys.get(re);B===void 0&&(B=new Map,Ys.set(re,B));var te=B.get(V);te===void 0?(re.addEventListener(V,pi,{passive:q}),B.set(V,1)):B.set(V,te+1)}}}};return m(vn(pd)),di.add(m),()=>{for(var w of h)for(const q of[a,document]){var $=Ys.get(q),V=$.get(w);--V==0?(q.removeEventListener(w,pi),$.delete(w),$.size===0&&Ys.delete(q)):$.set(w,V)}di.delete(m),f!==s&&f.parentNode?.removeChild(f)}});return kh.set(i,o),i}let kh=new WeakMap;class xh{anchor;#t=new Map;#i=new Map;#e=new Map;#l=new Set;#a=!0;constructor(a,s=!0){this.anchor=a,this.#a=s}#n=a=>{if(this.#t.has(a)){var s=this.#t.get(a),d=this.#i.get(s);if(d)fn(d),this.#l.delete(s);else{var p=this.#e.get(s);p&&(fn(p.effect),this.#i.set(s,p.effect),this.#e.delete(s),p.fragment.lastChild.remove(),this.anchor.before(p.fragment),d=p.effect)}for(const[e,n]of this.#t){if(this.#t.delete(e),e===a)break;const l=this.#e.get(n);l&&(dr(l.effect),this.#e.delete(n))}for(const[e,n]of this.#i){if(e===s||this.#l.has(e))continue;const l=()=>{if(Array.from(this.#t.values()).includes(e)){var o=document.createDocumentFragment();Ai(n,o),o.append(_a()),this.#e.set(e,{effect:n,fragment:o})}else dr(n);this.#l.delete(e),this.#i.delete(e)};this.#a||!d?(this.#l.add(e),La(n,l,!1)):l()}}};#r=a=>{this.#t.delete(a);const s=Array.from(this.#t.values());for(const[d,p]of this.#e)s.includes(d)||(dr(p.effect),this.#e.delete(d))};ensure(a,s){var d=ie,p=Jl();if(s&&!this.#i.has(a)&&!this.#e.has(a))if(p){var e=document.createDocumentFragment(),n=_a();e.append(n),this.#e.set(a,{effect:Pr(()=>s(n)),fragment:e})}else this.#i.set(a,Pr(()=>s(this.anchor)));if(this.#t.set(d,a),p){for(const[l,i]of this.#i)l===a?d.unskip_effect(i):d.skip_effect(i);for(const[l,i]of this.#e)l===a?d.unskip_effect(i.effect):d.skip_effect(i.effect);d.oncommit(this.#n),d.ondiscard(this.#r)}else this.#n(d)}}function ud(r){Me===null&&Rl(),js&&Me.l!==null?Ih(Me).m.push(r):oi(()=>{const a=c(r);if(typeof a=="function")return a})}function Ah(r){Me===null&&Rl(),ud(()=>()=>c(r))}function Ih(r){var a=r.l;return a.u??={a:[],b:[],m:[]}}function K(r,a,s=!1){var d=new xh(r),p=s?Ga:0;function e(n,l){d.ensure(n,l)}ki(()=>{var n=!1;a((l,i=0)=>{n=!0,e(i,l)}),n||e(-1,null)},p)}function ta(r,a){return a}function $h(r,a,s){for(var d=[],p=a.length,e,n=a.length,l=0;l<p;l++){let h=a[l];La(h,()=>{if(e){if(e.pending.delete(h),e.done.add(h),e.pending.size===0){var m=r.outrogroups;ci(r,vn(e.done)),m.delete(e),m.size===0&&(r.outrogroups=null)}}else n-=1},!1)}if(n===0){var i=d.length===0&&s!==null;if(i){var o=s,f=o.parentNode;ah(f),f.append(o),r.items.clear()}ci(r,a,!i)}else e={pending:new Set(a),done:new Set},(r.outrogroups??=new Set).add(e)}function ci(r,a,s=!0){var d;if(r.pending.size>0){d=new Set;for(const n of r.pending.values())for(const l of n)d.add(r.items.get(l).e)}for(var p=0;p<a.length;p++){var e=a[p];if(d?.has(e)){e.f|=Hr;const n=document.createDocumentFragment();Ai(e,n)}else dr(a[p],s)}}var ll;function ge(r,a,s,d,p,e=null){var n=r,l=new Map,i=(a&Pl)!==0;if(i){var o=r;n=o.appendChild(_a())}var f=null,h=ma(()=>{var re=s();return fi(re)?re:re==null?[]:vn(re)}),m,w=new Map,$=!0;function V(re){(te.effect.f&Ar)===0&&(te.pending.delete(re),te.fallback=f,qh(te,m,n,a,d),f!==null&&(m.length===0?(f.f&Hr)===0?fn(f):(f.f^=Hr,As(f,null,n)):La(f,()=>{f=null})))}function q(re){te.pending.delete(re)}var B=ki(()=>{m=t(h);for(var re=m.length,ne=new Set,fe=ie,me=Jl(),ve=0;ve<re;ve+=1){var ye=m[ve],Ot=d(ye,ve),Ve=$?null:l.get(Ot);Ve?(Ve.v&&Xa(Ve.v,ye),Ve.i&&Xa(Ve.i,ve),me&&fe.unskip_effect(Ve.e)):(Ve=Rh(l,$?n:ll??=_a(),ye,Ot,ve,p,a,s),$||(Ve.e.f|=Hr),l.set(Ot,Ve)),ne.add(Ot)}if(re===0&&e&&!f&&($?f=Pr(()=>e(n)):(f=Pr(()=>e(ll??=_a())),f.f|=Hr)),re>ne.size&&Ac(),!$)if(w.set(fe,ne),me){for(const[W,oe]of l)ne.has(W)||fe.skip_effect(oe.e);fe.oncommit(V),fe.ondiscard(q)}else V(fe);t(h)}),te={effect:B,items:l,pending:w,outrogroups:null,fallback:f};$=!1}function ys(r){for(;r!==null&&(r.f&Ir)===0;)r=r.next;return r}function qh(r,a,s,d,p){var e=(d&uc)!==0,n=a.length,l=r.items,i=ys(r.effect.first),o,f=null,h,m=[],w=[],$,V,q,B;if(e)for(B=0;B<n;B+=1)$=a[B],V=p($,B),q=l.get(V).e,(q.f&Hr)===0&&(q.nodes?.a?.measure(),(h??=new Set).add(q));for(B=0;B<n;B+=1){if($=a[B],V=p($,B),q=l.get(V).e,r.outrogroups!==null)for(const Ve of r.outrogroups)Ve.pending.delete(q),Ve.done.delete(q);if((q.f&Yt)!==0&&(fn(q),e&&(q.nodes?.a?.unfix(),(h??=new Set).delete(q))),(q.f&Hr)!==0)if(q.f^=Hr,q===i)As(q,null,s);else{var te=f?f.next:i;q===r.effect.last&&(r.effect.last=q.prev),q.prev&&(q.prev.next=q.next),q.next&&(q.next.prev=q.prev),fa(r,f,q),fa(r,q,te),As(q,te,s),f=q,m=[],w=[],i=ys(f.next);continue}if(q!==i){if(o!==void 0&&o.has(q)){if(m.length<w.length){var re=w[0],ne;f=re.prev;var fe=m[0],me=m[m.length-1];for(ne=0;ne<m.length;ne+=1)As(m[ne],re,s);for(ne=0;ne<w.length;ne+=1)o.delete(w[ne]);fa(r,fe.prev,me.next),fa(r,f,fe),fa(r,me,re),i=re,f=me,B-=1,m=[],w=[]}else o.delete(q),As(q,i,s),fa(r,q.prev,q.next),fa(r,q,f===null?r.effect.first:f.next),fa(r,f,q),f=q;continue}for(m=[],w=[];i!==null&&i!==q;)(o??=new Set).add(i),w.push(i),i=ys(i.next);if(i===null)continue}(q.f&Hr)===0&&m.push(q),f=q,i=ys(q.next)}if(r.outrogroups!==null){for(const Ve of r.outrogroups)Ve.pending.size===0&&(ci(r,vn(Ve.done)),r.outrogroups?.delete(Ve));r.outrogroups.size===0&&(r.outrogroups=null)}if(i!==null||o!==void 0){var ve=[];if(o!==void 0)for(q of o)(q.f&Yt)===0&&ve.push(q);for(;i!==null;)(i.f&Yt)===0&&i!==r.fallback&&ve.push(i),i=ys(i.next);var ye=ve.length;if(ye>0){var Ot=(d&Pl)!==0&&n===0?s:null;if(e){for(B=0;B<ye;B+=1)ve[B].nodes?.a?.measure();for(B=0;B<ye;B+=1)ve[B].nodes?.a?.fix()}$h(r,ve,Ot)}}e&&sa(()=>{if(h!==void 0)for(q of h)q.nodes?.a?.apply()})}function Rh(r,a,s,d,p,e,n,l){var i=(n&dc)!==0?(n&cc)===0?J(s,!1,!1):Ta(s):null,o=(n&pc)!==0?Ta(p):null;return{v:i,i:o,e:Pr(()=>(e(a,i??s,o??p,l),()=>{r.delete(d)}))}}function As(r,a,s){if(r.nodes)for(var d=r.nodes.start,p=r.nodes.end,e=a&&(a.f&Hr)===0?a.nodes.start:s;d!==null;){var n=Ms(d);if(e.before(d),d===p)return;d=n}}function fa(r,a,s){a===null?r.effect.first=s:a.next=s,s===null?r.effect.last=a:s.prev=a}const dl=[..." \\t\\n\\r\\f \\u000b\uFEFF"];function Sh(r,a,s){var d=r==null?"":""+r;if(a&&(d=d?d+" "+a:a),s){for(var p of Object.keys(s))if(s[p])d=d?d+" "+p:p;else if(d.length)for(var e=p.length,n=0;(n=d.indexOf(p,n))>=0;){var l=n+e;(n===0||dl.includes(d[n-1]))&&(l===d.length||dl.includes(d[l]))?d=(n===0?"":d.substring(0,n))+d.substring(l+1):n=l}}return d===""?null:d}function Eh(r,a){return r==null?null:String(r)}function gr(r,a,s,d,p,e){var n=r[ri];if(n!==s||n===void 0){var l=Sh(s,d,e);l==null?r.removeAttribute("class"):r.className=l,r[ri]=s}else if(e&&p!==e)for(var i in e){var o=!!e[i];(p==null||o!==!!p[i])&&r.classList.toggle(i,o)}return e}function or(r,a,s,d){var p=r[ai];if(p!==a){var e=Eh(a);e==null?r.removeAttribute("style"):r.style.cssText=e,r[ai]=a}return d}function Ss(r,a,s=!1){if(r.multiple){if(a==null)return;if(!fi(a))return jc();for(var d of r.options)d.selected=a.includes(Es(d));return}for(d of r.options){var p=Es(d);if(th(p,a)){d.selected=!0;return}}(!s||a!==void 0)&&(r.selectedIndex=-1)}function nn(r){var a=new MutationObserver(()=>{"__value"in r&&Ss(r,r.__value)});a.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Pi(()=>{a.disconnect()})}function Nh(r,a,s=a){var d=new WeakSet,p=!0;gi(r,"change",e=>{var n=e?"[selected]":":checked",l;if(r.multiple)l=[].map.call(r.querySelectorAll(n),Es);else{var i=r.querySelector(n)??r.querySelector("option:not([disabled])");l=i&&Es(i)}s(l),r.__value=l,ie!==null&&d.add(ie)}),Ql(()=>{var e=a();if(r===document.activeElement){var n=ie;if(d.has(n))return}if(Ss(r,e,p),p&&e===void 0){var l=r.querySelector(":checked");l!==null&&(e=Es(l),s(e))}r.__value=e,p=!1}),nn(r)}function Es(r){return"__value"in r?r.__value:r.value}const Ch=Symbol("is custom element"),Lh=Symbol("is html");function Za(r,a){var s=cd(r);s.checked!==(s.checked=a??void 0)&&(r.checked=a)}function M(r,a,s,d){var p=cd(r);p[a]!==(p[a]=s)&&(a==="loading"&&(r[kc]=s),s==null?r.removeAttribute(a):typeof s!="string"&&jh(r).includes(a)?r[a]=s:r.setAttribute(a,s))}function cd(r){return r[ql]??={[Ch]:r.nodeName.includes("-"),[Lh]:r.namespaceURI===mc}}var pl=new Map;function jh(r){var a=r.getAttribute("is")||r.nodeName,s=pl.get(a);if(s)return s;pl.set(a,s=[]);for(var d,p=r,e=Element.prototype;e!==p;){d=xl(p);for(var n in d)d[n].set&&n!=="innerHTML"&&n!=="textContent"&&n!=="innerText"&&s.push(n);p=mi(p)}return s}function Gs(r,a,s=a){var d=new WeakSet;gi(r,"input",async p=>{var e=p?r.defaultValue:r.value;if(e=Dn(r)?Bn(e):e,s(e),ie!==null&&d.add(ie),await sn(),e!==(e=a())){var n=r.selectionStart,l=r.selectionEnd,i=r.value.length;if(r.value=e??"",l!==null){var o=r.value.length;n===l&&l===i&&o>i?(r.selectionStart=o,r.selectionEnd=o):(r.selectionStart=n,r.selectionEnd=Math.min(l,o))}}}),c(a)==null&&r.value&&(s(Dn(r)?Bn(r.value):r.value),ie!==null&&d.add(ie)),ss(()=>{var p=a();if(r===document.activeElement){var e=ie;if(d.has(e))return}Dn(r)&&p===Bn(r.value)||r.type==="date"&&!p&&!r.value||p!==r.value&&(r.value=p??"")})}function ul(r,a,s=a){gi(r,"change",d=>{var p=d?r.defaultChecked:r.checked;s(p)}),c(a)==null&&s(r.checked),ss(()=>{var d=a();r.checked=!!d})}function Dn(r){var a=r.type;return a==="number"||a==="range"}function Bn(r){return r===""?null:+r}function Hn(r,a){return r===a||r?.[ya]===a}function _s(r={},a,s,d){var p=Me.r,e=de;return Ql(()=>{var n,l;return ss(()=>{n=l,l=[],c(()=>{Hn(s(...l),r)||(a(r,...l),n&&Hn(s(...n),r)&&a(null,...n))})}),()=>{let i=e;for(;i!==p&&i.parent!==null&&i.parent.f&ti;)i=i.parent;const o=()=>{l&&Hn(s(...l),r)&&a(null,...l)},f=i.teardown;i.teardown=()=>{o(),f?.()}}}),r}function Oh(r=!1){const a=Me,s=a.l.u;if(!s)return;let d=()=>He(a.s);if(r){let p=0,e={};const n=gn(()=>{let l=!1;const i=a.s;for(const o in i)i[o]!==e[o]&&(e[o]=i[o],l=!0);return l&&p++,p});d=()=>t(n)}s.b.length&&ih(()=>{cl(a,d),Xn(s.b)}),oi(()=>{const p=c(()=>s.m.map(bc));return()=>{for(const e of p)typeof e=="function"&&e()}}),s.a.length&&oi(()=>{cl(a,d),Xn(s.a)})}function cl(r,a){if(r.l.s)for(const s of r.l.s)t(s);a()}async function ra(r,a,s){return{...a,fingerprint:await r(s)}}async function Th(r,a){const s=[];for(const p of r.changes){s.push(ra(a,{type:"change",ref:p.id},p));for(const[e,n]of p.verification.gaps.entries())s.push(ra(a,{type:"verification-gap",ref:`${p.id}:gap:${e}`},{changeId:p.id,index:e,gap:n}))}for(const p of r.files)s.push(ra(a,{type:"file",ref:p.id,path:p.newPath??p.oldPath??void 0},p));for(const p of r.hunks){s.push(ra(a,{type:"hunk",ref:p.id,path:p.path},p));for(const[e,n]of p.lines.entries()){if(n.kind==="no-newline")continue;const l=n.kind==="addition"?"after":n.kind==="deletion"?"before":"diff",i=l==="before"?n.oldLine:n.newLine??n.oldLine;!i||i<1||s.push(ra(a,{type:"line-range",ref:`${p.id}:${l}:${i}:${e}`,path:p.path,side:l,startLine:i,endLine:i},{path:p.path,side:l,lineNumber:i,content:n.content}))}}for(const p of r.targets)s.push(ra(a,{type:"visual-target",ref:p.id},p));for(const p of r.comparisons){const e=r.targets.find(n=>n.id===p.targetRef);for(const n of p.images)for(const l of n.regions)s.push(ra(a,{type:"visual-region",ref:`${p.id}:${n.id}:${l.id}`,targetRef:p.targetRef,region:{x:l.x/n.width,y:l.y/n.height,width:l.width/n.width,height:l.height/n.height}},{target:e,comparison:p,image:n,region:l}))}for(const p of r.findings)s.push(ra(a,{type:"finding",ref:p.id,targetRef:p.targetRef},p));return(await Promise.all(s)).sort((p,e)=>`${p.type}\\0${p.ref}`.localeCompare(`${e.type}\\0${e.ref}`))}async function hd(r,a){const s=[];for(const d of r.comparisons)for(const p of d.images)for(const e of p.regions)s.push(ra(a,{type:"visual-region",ref:`${d.id}:${p.id}:${e.id}`,targetRef:d.targetRef,region:{x:e.x,y:e.y,width:e.width,height:e.height}},{comparisonId:d.id,imageId:p.id,region:e}));return Promise.all(s)}function zh(r){return!!(r&&typeof r=="object"&&!Array.isArray(r))}function Mh(r){if(!zh(r))return!1;const a=Object.keys(r);return a.length===4&&a.every(s=>new Set(["x","y","width","height"]).has(s))&&[r.x,r.y,r.width,r.height].every(s=>typeof s=="number"&&Number.isFinite(s))}function fd(r,a,s,d){const p=structuredClone(r);if(!p||typeof p!="object")return p;const e=new Map(a.map(o=>[Br(o),o])),n=new Map(s.map(o=>[Br(o),o])),l=[p],i=new WeakSet;for(;l.length>0;){const o=l.pop();if(i.has(o))continue;if(i.add(o),Array.isArray(o)){for(const h of o)h&&typeof h=="object"&&l.push(h);continue}const f=o;if(f.type==="visual-region"&&typeof f.ref=="string"&&typeof f.fingerprint=="string"&&Mh(f.region)){const h=JSON.stringify([f.type,f.ref]),m=e.get(h),w=n.get(h),$=[f.region.x,f.region.y,f.region.width,f.region.height].some(q=>q>1);w?.fingerprint===f.fingerprint&&m?(m.region?f.region=structuredClone(m.region):delete f.region,m.targetRef?f.targetRef=m.targetRef:delete f.targetRef,d&&(f.fingerprint=m.fingerprint)):$&&!d&&delete f.region}for(const h of Object.values(f))h&&typeof h=="object"&&l.push(h)}return p}function Br(r){return JSON.stringify([r.type,r.ref])}function hl(r,a,s){return r.find(d=>d.type===a&&d.ref===s)}function Wn(r,a){const s=a.find(p=>p.type===r.type&&p.ref===r.ref);if(s?.fingerprint===r.fingerprint)return{source:r,result:"exact",disposition:"matched",candidate:s};if(s)return{source:r,result:"changed",disposition:"stale",candidate:s};const d=a.filter(p=>p.type===r.type&&p.fingerprint===r.fingerprint);return d.length===1?{source:r,result:"probable",disposition:"stale",candidate:d[0]}:{source:r,result:"missing",disposition:"orphaned"}}function hi(r){if(r===null||typeof r=="string"||typeof r=="boolean")return r;if(typeof r=="number"){if(!Number.isFinite(r))throw new TypeError("Review JSON does not support non-finite numbers");return Object.is(r,-0)?0:r}if(Array.isArray(r))return r.map(hi);if(r instanceof Date)return r.toISOString();if(typeof r=="object"){const a={};for(const s of Object.keys(r).sort()){const d=r[s];d!==void 0&&(a[s]=hi(d))}return a}throw new TypeError(`Review JSON does not support ${typeof r}`)}function Sa(r){return JSON.stringify(hi(r))}const zr=async r=>{const a=new TextEncoder().encode(Sa(r)),s=await crypto.subtle.digest("SHA-256",a);return[...new Uint8Array(s)].map(d=>d.toString(16).padStart(2,"0")).join("")};var md=(r,a)=>()=>(a||r((a={exports:{}}).exports,a),a.exports),Vh=md(r=>{Object.defineProperty(r,"__esModule",{value:!0});function a(s){let d=s.length,p=0,e=0,n;for(;e<d;)p++,n=s.charCodeAt(e++),n>=55296&&n<=56319&&e<d&&(n=s.charCodeAt(e),(n&64512)===56320&&e++);return p}r.default=a,a.code=\'require("ajv/dist/runtime/ucs2length").default\'}),Fh=md(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.formatNames=r.fastFormats=r.fullFormats=void 0;function a(W,oe){return{validate:W,compare:oe}}r.fullFormats={date:a(e,n),time:a(i(!0),o),"date-time":a(m(!0),w),"iso-time":a(i(),f),"iso-date-time":a(m(),$),duration:/^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$/,uri:B,"uri-reference":/^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\\x00-\\x20"\'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,url:/^(?:https?|ftp):\\/\\/(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)(?:\\.(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,email:/^[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,regex:Ve,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\\/(?:[a-z0-9_\\-.!$&\'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,byte:re,int32:{type:"number",validate:me},int64:{type:"number",validate:ve},float:{type:"number",validate:ye},double:{type:"number",validate:ye},password:!0,binary:!0},r.fastFormats={...r.fullFormats,date:a(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d$/,n),time:a(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i,o),"date-time":a(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\dt(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i,w),"iso-time":a(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,f),"iso-date-time":a(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d[t\\s](?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,$),uri:/^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/)?[^\\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\\-.]*:)?\\/?\\/)?(?:[^\\\\\\s#][^\\s#]*)?(?:#[^\\\\\\s]*)?$/i,email:/^[a-z0-9.!#$%&\'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},r.formatNames=Object.keys(r.fullFormats);function s(W){return W%4===0&&(W%100!==0||W%400===0)}var d=/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/,p=[0,31,28,31,30,31,30,31,31,30,31,30,31];function e(W){let oe=d.exec(W);if(!oe)return!1;let ke=+oe[1],_e=+oe[2],L=+oe[3];return _e>=1&&_e<=12&&L>=1&&L<=(_e===2&&s(ke)?29:p[_e])}function n(W,oe){if(W&&oe)return W>oe?1:W<oe?-1:0}var l=/^(\\d\\d):(\\d\\d):(\\d\\d(?:\\.\\d+)?)(z|([+-])(\\d\\d)(?::?(\\d\\d))?)?$/i;function i(W){return function(oe){let ke=l.exec(oe);if(!ke)return!1;let _e=+ke[1],L=+ke[2],_r=+ke[3],At=ke[4],It=ke[5]==="-"?-1:1,Rr=+(ke[6]||0),Bt=+(ke[7]||0);if(Rr>23||Bt>59||W&&!At)return!1;if(_e<=23&&L<=59&&_r<60)return!0;let yt=L-Bt*It,ue=_e-Rr*It-(yt<0?1:0);return(ue===23||ue===-1)&&(yt===59||yt===-1)&&_r<61}}function o(W,oe){if(!(W&&oe))return;let ke=new Date("2020-01-01T"+W).valueOf(),_e=new Date("2020-01-01T"+oe).valueOf();if(ke&&_e)return ke-_e}function f(W,oe){if(!(W&&oe))return;let ke=l.exec(W),_e=l.exec(oe);if(ke&&_e)return W=ke[1]+ke[2]+ke[3],oe=_e[1]+_e[2]+_e[3],W>oe?1:W<oe?-1:0}var h=/t|\\s/i;function m(W){let oe=i(W);return function(ke){let _e=ke.split(h);return _e.length===2&&e(_e[0])&&oe(_e[1])}}function w(W,oe){if(!(W&&oe))return;let ke=new Date(W).valueOf(),_e=new Date(oe).valueOf();if(ke&&_e)return ke-_e}function $(W,oe){if(!(W&&oe))return;let[ke,_e]=W.split(h),[L,_r]=oe.split(h),At=n(ke,L);if(At!==void 0)return At||o(_e,_r)}var V=/\\/|:/,q=/^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&\'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&\'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&\'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&\'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function B(W){return V.test(W)&&q.test(W)}var te=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function re(W){return te.lastIndex=0,te.test(W)}var ne=-2147483648,fe=2**31-1;function me(W){return Number.isInteger(W)&&W<=fe&&W>=ne}function ve(W){return Number.isInteger(W)}function ye(){return!0}var Ot=/[^\\\\]\\\\Z/;function Ve(W){if(Ot.test(W))return!1;try{return new RegExp(W),!0}catch{return!1}}}),Dh=vd,fl={properties:{source:{properties:{base:{type:["string","null"]},head:{type:["string","null"]}}}}},Zn={properties:{type:{enum:["change","file","hunk","line-range","visual-target","visual-region","finding","verification-gap"]},ref:{type:"string",minLength:1},path:{type:"string"},side:{enum:["before","after","diff"]},startLine:{type:"integer",minimum:1},endLine:{type:"integer",minimum:1},targetRef:{type:"string"},region:{type:"object",additionalProperties:!1,required:["x","y","width","height"],properties:{x:{type:"number",minimum:0,maximum:1},y:{type:"number",minimum:0,maximum:1},width:{type:"number",exclusiveMinimum:0,maximum:1},height:{type:"number",exclusiveMinimum:0,maximum:1}}},selectorHint:{type:"string"},fingerprint:{type:"string",pattern:"^[a-f0-9]{64}$"}}},nt=Vh().default,Ma=Object.prototype.hasOwnProperty,Cs=new RegExp("^report[-:][A-Za-z0-9._:-]+$","u"),es=new RegExp("^[a-f0-9]{64}$","u"),na=Fh().fullFormats["date-time"];function vd(r,{instancePath:a="",parentData:s,parentDataProperty:d,rootData:p=r}={}){let e=null,n=0;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.schemaVersion===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property \'schemaVersion\'"};e===null?e=[l]:e.push(l),n++}if(r.source===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"source"},message:"must have required property \'source\'"};e===null?e=[l]:e.push(l),n++}if(r.state===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property \'state\'"};e===null?e=[l]:e.push(l),n++}if(r.threads===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"threads"},message:"must have required property \'threads\'"};e===null?e=[l]:e.push(l),n++}if(r.events===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"events"},message:"must have required property \'events\'"};e===null?e=[l]:e.push(l),n++}if(r.anchorCatalog===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"anchorCatalog"},message:"must have required property \'anchorCatalog\'"};e===null?e=[l]:e.push(l),n++}if(r.exportedAt===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"exportedAt"},message:"must have required property \'exportedAt\'"};e===null?e=[l]:e.push(l),n++}for(let l in r)if(!(l==="schemaVersion"||l==="source"||l==="state"||l==="threads"||l==="events"||l==="anchorCatalog"||l==="exportedAt")){let i={instancePath:a,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),n++}if(r.schemaVersion!==void 0&&r.schemaVersion!=="1.0"){let l={instancePath:a+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:"1.0"},message:"must be equal to constant"};e===null?e=[l]:e.push(l),n++}if(r.source!==void 0){let l=r.source;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.reportId===void 0){let i={instancePath:a+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"reportId"},message:"must have required property \'reportId\'"};e===null?e=[i]:e.push(i),n++}if(l.reportFingerprint===void 0){let i={instancePath:a+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"reportFingerprint"},message:"must have required property \'reportFingerprint\'"};e===null?e=[i]:e.push(i),n++}if(l.base===void 0){let i={instancePath:a+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"base"},message:"must have required property \'base\'"};e===null?e=[i]:e.push(i),n++}if(l.head===void 0){let i={instancePath:a+"/source",schemaPath:"#/properties/source/required",keyword:"required",params:{missingProperty:"head"},message:"must have required property \'head\'"};e===null?e=[i]:e.push(i),n++}for(let i in l)if(!(i==="reportId"||i==="reportFingerprint"||i==="base"||i==="head")){let o={instancePath:a+"/source",schemaPath:"#/properties/source/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[o]:e.push(o),n++}if(l.reportId!==void 0){let i=l.reportId;if(typeof i=="string"){if(nt(i)>256){let o={instancePath:a+"/source/reportId",schemaPath:"#/properties/source/properties/reportId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[o]:e.push(o),n++}if(!Cs.test(i)){let o={instancePath:a+"/source/reportId",schemaPath:"#/properties/source/properties/reportId/pattern",keyword:"pattern",params:{pattern:"^report[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^report[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/source/reportId",schemaPath:"#/properties/source/properties/reportId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}if(l.reportFingerprint!==void 0){let i=l.reportFingerprint;if(typeof i=="string"){if(!es.test(i)){let o={instancePath:a+"/source/reportFingerprint",schemaPath:"#/properties/source/properties/reportFingerprint/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:\'must match pattern "^[a-f0-9]{64}$"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/source/reportFingerprint",schemaPath:"#/properties/source/properties/reportFingerprint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}if(l.base!==void 0){let i=l.base;if(typeof i!="string"&&i!==null){let o={instancePath:a+"/source/base",schemaPath:"#/properties/source/properties/base/type",keyword:"type",params:{type:fl.properties.source.properties.base.type},message:"must be string,null"};e===null?e=[o]:e.push(o),n++}}if(l.head!==void 0){let i=l.head;if(typeof i!="string"&&i!==null){let o={instancePath:a+"/source/head",schemaPath:"#/properties/source/properties/head/type",keyword:"type",params:{type:fl.properties.source.properties.head.type},message:"must be string,null"};e===null?e=[o]:e.push(o),n++}}}else{let i={instancePath:a+"/source",schemaPath:"#/properties/source/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),n++}}if(r.state!==void 0){let l=r.state;if(!(l&&typeof l=="object"&&!Array.isArray(l))){let i={instancePath:a+"/state",schemaPath:"#/properties/state/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),n++}}if(r.threads!==void 0){let l=r.threads;if(Array.isArray(l)){let i=l.length;for(let o=0;o<i;o++){let f=l[o];if(!(f&&typeof f=="object"&&!Array.isArray(f))){let h={instancePath:a+"/threads/"+o,schemaPath:"#/properties/threads/items/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),n++}}}else{let i={instancePath:a+"/threads",schemaPath:"#/properties/threads/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),n++}}if(r.events!==void 0){let l=r.events;if(Array.isArray(l)){let i=l.length;for(let o=0;o<i;o++){let f=l[o];if(!(f&&typeof f=="object"&&!Array.isArray(f))){let h={instancePath:a+"/events/"+o,schemaPath:"#/properties/events/items/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),n++}}}else{let i={instancePath:a+"/events",schemaPath:"#/properties/events/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),n++}}if(r.anchorCatalog!==void 0){let l=r.anchorCatalog;if(Array.isArray(l)){let i=l.length;for(let o=0;o<i;o++){let f=l[o];if(f&&typeof f=="object"&&!Array.isArray(f)){if(f.type===void 0){let h={instancePath:a+"/anchorCatalog/"+o,schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property \'type\'"};e===null?e=[h]:e.push(h),n++}if(f.ref===void 0){let h={instancePath:a+"/anchorCatalog/"+o,schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property \'ref\'"};e===null?e=[h]:e.push(h),n++}if(f.fingerprint===void 0){let h={instancePath:a+"/anchorCatalog/"+o,schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"fingerprint"},message:"must have required property \'fingerprint\'"};e===null?e=[h]:e.push(h),n++}for(let h in f)if(!Ma.call(Zn.properties,h)){let m={instancePath:a+"/anchorCatalog/"+o,schemaPath:"#/$defs/reviewAnchor/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[m]:e.push(m),n++}if(f.type!==void 0){let h=f.type;if(!(h==="change"||h==="file"||h==="hunk"||h==="line-range"||h==="visual-target"||h==="visual-region"||h==="finding"||h==="verification-gap")){let m={instancePath:a+"/anchorCatalog/"+o+"/type",schemaPath:"#/$defs/reviewAnchor/properties/type/enum",keyword:"enum",params:{allowedValues:Zn.properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[m]:e.push(m),n++}}if(f.ref!==void 0){let h=f.ref;if(typeof h=="string"){if(nt(h)<1){let m={instancePath:a+"/anchorCatalog/"+o+"/ref",schemaPath:"#/$defs/reviewAnchor/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[m]:e.push(m),n++}}else{let m={instancePath:a+"/anchorCatalog/"+o+"/ref",schemaPath:"#/$defs/reviewAnchor/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),n++}}if(f.path!==void 0&&typeof f.path!="string"){let h={instancePath:a+"/anchorCatalog/"+o+"/path",schemaPath:"#/$defs/reviewAnchor/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),n++}if(f.side!==void 0){let h=f.side;if(!(h==="before"||h==="after"||h==="diff")){let m={instancePath:a+"/anchorCatalog/"+o+"/side",schemaPath:"#/$defs/reviewAnchor/properties/side/enum",keyword:"enum",params:{allowedValues:Zn.properties.side.enum},message:"must be equal to one of the allowed values"};e===null?e=[m]:e.push(m),n++}}if(f.startLine!==void 0){let h=f.startLine;if(!(typeof h=="number"&&!(h%1)&&!isNaN(h))){let m={instancePath:a+"/anchorCatalog/"+o+"/startLine",schemaPath:"#/$defs/reviewAnchor/properties/startLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[m]:e.push(m),n++}if(typeof h=="number"&&(h<1||isNaN(h))){let m={instancePath:a+"/anchorCatalog/"+o+"/startLine",schemaPath:"#/$defs/reviewAnchor/properties/startLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[m]:e.push(m),n++}}if(f.endLine!==void 0){let h=f.endLine;if(!(typeof h=="number"&&!(h%1)&&!isNaN(h))){let m={instancePath:a+"/anchorCatalog/"+o+"/endLine",schemaPath:"#/$defs/reviewAnchor/properties/endLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[m]:e.push(m),n++}if(typeof h=="number"&&(h<1||isNaN(h))){let m={instancePath:a+"/anchorCatalog/"+o+"/endLine",schemaPath:"#/$defs/reviewAnchor/properties/endLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[m]:e.push(m),n++}}if(f.targetRef!==void 0&&typeof f.targetRef!="string"){let h={instancePath:a+"/anchorCatalog/"+o+"/targetRef",schemaPath:"#/$defs/reviewAnchor/properties/targetRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),n++}if(f.region!==void 0){let h=f.region;if(h&&typeof h=="object"&&!Array.isArray(h)){if(h.x===void 0){let m={instancePath:a+"/anchorCatalog/"+o+"/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"x"},message:"must have required property \'x\'"};e===null?e=[m]:e.push(m),n++}if(h.y===void 0){let m={instancePath:a+"/anchorCatalog/"+o+"/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"y"},message:"must have required property \'y\'"};e===null?e=[m]:e.push(m),n++}if(h.width===void 0){let m={instancePath:a+"/anchorCatalog/"+o+"/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"width"},message:"must have required property \'width\'"};e===null?e=[m]:e.push(m),n++}if(h.height===void 0){let m={instancePath:a+"/anchorCatalog/"+o+"/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"height"},message:"must have required property \'height\'"};e===null?e=[m]:e.push(m),n++}for(let m in h)if(!(m==="x"||m==="y"||m==="width"||m==="height")){let w={instancePath:a+"/anchorCatalog/"+o+"/region",schemaPath:"#/$defs/reviewAnchor/properties/region/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),n++}if(h.x!==void 0){let m=h.x;if(typeof m=="number"){if(m>1||isNaN(m)){let w={instancePath:a+"/anchorCatalog/"+o+"/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),n++}if(m<0||isNaN(m)){let w={instancePath:a+"/anchorCatalog/"+o+"/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),n++}}else{let w={instancePath:a+"/anchorCatalog/"+o+"/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),n++}}if(h.y!==void 0){let m=h.y;if(typeof m=="number"){if(m>1||isNaN(m)){let w={instancePath:a+"/anchorCatalog/"+o+"/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),n++}if(m<0||isNaN(m)){let w={instancePath:a+"/anchorCatalog/"+o+"/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),n++}}else{let w={instancePath:a+"/anchorCatalog/"+o+"/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),n++}}if(h.width!==void 0){let m=h.width;if(typeof m=="number"){if(m>1||isNaN(m)){let w={instancePath:a+"/anchorCatalog/"+o+"/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),n++}if(m<=0||isNaN(m)){let w={instancePath:a+"/anchorCatalog/"+o+"/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[w]:e.push(w),n++}}else{let w={instancePath:a+"/anchorCatalog/"+o+"/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),n++}}if(h.height!==void 0){let m=h.height;if(typeof m=="number"){if(m>1||isNaN(m)){let w={instancePath:a+"/anchorCatalog/"+o+"/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),n++}if(m<=0||isNaN(m)){let w={instancePath:a+"/anchorCatalog/"+o+"/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[w]:e.push(w),n++}}else{let w={instancePath:a+"/anchorCatalog/"+o+"/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),n++}}}else{let m={instancePath:a+"/anchorCatalog/"+o+"/region",schemaPath:"#/$defs/reviewAnchor/properties/region/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),n++}}if(f.selectorHint!==void 0&&typeof f.selectorHint!="string"){let h={instancePath:a+"/anchorCatalog/"+o+"/selectorHint",schemaPath:"#/$defs/reviewAnchor/properties/selectorHint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),n++}if(f.fingerprint!==void 0){let h=f.fingerprint;if(typeof h=="string"){if(!es.test(h)){let m={instancePath:a+"/anchorCatalog/"+o+"/fingerprint",schemaPath:"#/$defs/reviewAnchor/properties/fingerprint/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:\'must match pattern "^[a-f0-9]{64}$"\'};e===null?e=[m]:e.push(m),n++}}else{let m={instancePath:a+"/anchorCatalog/"+o+"/fingerprint",schemaPath:"#/$defs/reviewAnchor/properties/fingerprint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),n++}}}else{let h={instancePath:a+"/anchorCatalog/"+o,schemaPath:"#/$defs/reviewAnchor/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),n++}}}else{let i={instancePath:a+"/anchorCatalog",schemaPath:"#/properties/anchorCatalog/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),n++}}if(r.exportedAt!==void 0){let l=r.exportedAt;if(typeof l=="string"){if(!na.validate(l)){let i={instancePath:a+"/exportedAt",schemaPath:"#/properties/exportedAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[i]:e.push(i),n++}}else{let i={instancePath:a+"/exportedAt",schemaPath:"#/properties/exportedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}}}else{let l={instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),n++}return vd.errors=e,n===0}var Bh=wd,Ua={properties:{schemaVersion:{const:"1.0"},id:{type:"string",pattern:"^event[-:][A-Za-z0-9._:-]+$",maxLength:256},reportId:{type:"string",pattern:"^report[-:][A-Za-z0-9._:-]+$",maxLength:256},sequence:{type:"integer",minimum:1},type:{enum:["viewed.changed","judgment.changed","thread.created","thread.message-added","thread.resolved","state.imported","agent-attention.changed","feedback-batch.stored","feedback-batch.claimed","feedback-batch.released","feedback-batch.answered"]},createdAt:{type:"string",format:"date-time"},anchor:{$ref:"#/$defs/reviewAnchor"},changeId:{type:"string",pattern:"^change[-:]"},viewState:{enum:["unseen","viewed","stale"]},judgmentState:{enum:["unreviewed","reviewed","follow-up","blocked","stale"]},threadId:{type:"string",pattern:"^thread[-:][A-Za-z0-9._:-]+$",maxLength:256},messageId:{type:"string",pattern:"^message[-:][A-Za-z0-9._:-]+$",maxLength:256},sourceReportId:{type:"string",pattern:"^report[-:][A-Za-z0-9._:-]+$",maxLength:256},attentionState:{enum:["none","requested","batched","submitted","acknowledged","answered","stale"]},batchId:{type:"string",pattern:"^fb[-:][A-Za-z0-9._:-]+$",maxLength:256},threadIds:{type:"array",maxItems:20,items:{type:"string",pattern:"^thread[-:][A-Za-z0-9._:-]+$",maxLength:256},uniqueItems:!0},itemIds:{type:"array",maxItems:20,items:{type:"string",pattern:"^item[-:][A-Za-z0-9._:-]+$",maxLength:256},uniqueItems:!0},itemCount:{type:"integer",minimum:1,maximum:20},deliveryMode:{enum:["direct-same-session","return-to-session","export-only"]},originSessionMatched:{type:"boolean"}}},Un={properties:{type:{enum:["change","file","hunk","line-range","visual-target","visual-region","finding","verification-gap"]},ref:{type:"string",minLength:1},path:{type:"string"},side:{enum:["before","after","diff"]},startLine:{type:"integer",minimum:1},endLine:{type:"integer",minimum:1},targetRef:{type:"string"},region:{type:"object",additionalProperties:!1,required:["x","y","width","height"],properties:{x:{type:"number",minimum:0,maximum:1},y:{type:"number",minimum:0,maximum:1},width:{type:"number",exclusiveMinimum:0,maximum:1},height:{type:"number",exclusiveMinimum:0,maximum:1}}},selectorHint:{type:"string"},fingerprint:{type:"string",pattern:"^[a-f0-9]{64}$"}}},Hh=new RegExp("^event[-:][A-Za-z0-9._:-]+$","u"),Wh=new RegExp("^change[-:]","u"),Ls=new RegExp("^thread[-:][A-Za-z0-9._:-]+$","u"),gd=new RegExp("^message[-:][A-Za-z0-9._:-]+$","u"),yd=new RegExp("^fb[-:][A-Za-z0-9._:-]+$","u"),_d=new RegExp("^item[-:][A-Za-z0-9._:-]+$","u");function wd(r,{instancePath:a="",parentData:s,parentDataProperty:d,rootData:p=r}={}){let e=null,n=0,l=n,i=!0,o=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.type!==void 0&&r.type!=="viewed.changed"){let y={};e===null?e=[y]:e.push(y),n++}var f=o===n;if(n=l,e!==null&&(l?e.length=l:e=null),f){let y=n;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.anchor===void 0){let P={instancePath:a,schemaPath:"#/allOf/0/then/required",keyword:"required",params:{missingProperty:"anchor"},message:"must have required property \'anchor\'"};e===null?e=[P]:e.push(P),n++}if(r.viewState===void 0){let P={instancePath:a,schemaPath:"#/allOf/0/then/required",keyword:"required",params:{missingProperty:"viewState"},message:"must have required property \'viewState\'"};e===null?e=[P]:e.push(P),n++}}var f=y===n;i=f}if(!i){let y={instancePath:a,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[y]:e.push(y),n++}let h=n,m=!0,w=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.type!==void 0&&r.type!=="judgment.changed"){let y={};e===null?e=[y]:e.push(y),n++}var $=w===n;if(n=h,e!==null&&(h?e.length=h:e=null),$){let y=n;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.changeId===void 0){let P={instancePath:a,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty:"changeId"},message:"must have required property \'changeId\'"};e===null?e=[P]:e.push(P),n++}if(r.judgmentState===void 0){let P={instancePath:a,schemaPath:"#/allOf/1/then/required",keyword:"required",params:{missingProperty:"judgmentState"},message:"must have required property \'judgmentState\'"};e===null?e=[P]:e.push(P),n++}}var $=y===n;m=$}if(!m){let y={instancePath:a,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[y]:e.push(y),n++}let V=n,q=!0,B=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.type!==void 0&&r.type!=="thread.created"){let y={};e===null?e=[y]:e.push(y),n++}var te=B===n;if(n=V,e!==null&&(V?e.length=V:e=null),te){let y=n;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.anchor===void 0){let P={instancePath:a,schemaPath:"#/allOf/2/then/required",keyword:"required",params:{missingProperty:"anchor"},message:"must have required property \'anchor\'"};e===null?e=[P]:e.push(P),n++}if(r.threadId===void 0){let P={instancePath:a,schemaPath:"#/allOf/2/then/required",keyword:"required",params:{missingProperty:"threadId"},message:"must have required property \'threadId\'"};e===null?e=[P]:e.push(P),n++}if(r.messageId===void 0){let P={instancePath:a,schemaPath:"#/allOf/2/then/required",keyword:"required",params:{missingProperty:"messageId"},message:"must have required property \'messageId\'"};e===null?e=[P]:e.push(P),n++}}var te=y===n;q=te}if(!q){let y={instancePath:a,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[y]:e.push(y),n++}let re=n,ne=!0,fe=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.type!==void 0&&r.type!=="thread.message-added"){let y={};e===null?e=[y]:e.push(y),n++}var me=fe===n;if(n=re,e!==null&&(re?e.length=re:e=null),me){let y=n;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.threadId===void 0){let P={instancePath:a,schemaPath:"#/allOf/3/then/required",keyword:"required",params:{missingProperty:"threadId"},message:"must have required property \'threadId\'"};e===null?e=[P]:e.push(P),n++}if(r.messageId===void 0){let P={instancePath:a,schemaPath:"#/allOf/3/then/required",keyword:"required",params:{missingProperty:"messageId"},message:"must have required property \'messageId\'"};e===null?e=[P]:e.push(P),n++}}var me=y===n;ne=me}if(!ne){let y={instancePath:a,schemaPath:"#/allOf/3/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[y]:e.push(y),n++}let ve=n,ye=!0,Ot=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.type!==void 0&&r.type!=="thread.resolved"){let y={};e===null?e=[y]:e.push(y),n++}var Ve=Ot===n;if(n=ve,e!==null&&(ve?e.length=ve:e=null),Ve){let y=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.threadId===void 0){let P={instancePath:a,schemaPath:"#/allOf/4/then/required",keyword:"required",params:{missingProperty:"threadId"},message:"must have required property \'threadId\'"};e===null?e=[P]:e.push(P),n++}var Ve=y===n;ye=Ve}if(!ye){let y={instancePath:a,schemaPath:"#/allOf/4/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[y]:e.push(y),n++}let W=n,oe=!0,ke=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.type!==void 0&&r.type!=="state.imported"){let y={};e===null?e=[y]:e.push(y),n++}var _e=ke===n;if(n=W,e!==null&&(W?e.length=W:e=null),_e){let y=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.sourceReportId===void 0){let P={instancePath:a,schemaPath:"#/allOf/5/then/required",keyword:"required",params:{missingProperty:"sourceReportId"},message:"must have required property \'sourceReportId\'"};e===null?e=[P]:e.push(P),n++}var _e=y===n;oe=_e}if(!oe){let y={instancePath:a,schemaPath:"#/allOf/5/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[y]:e.push(y),n++}let L=n,_r=!0,At=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.type!==void 0&&r.type!=="agent-attention.changed"){let y={};e===null?e=[y]:e.push(y),n++}var It=At===n;if(n=L,e!==null&&(L?e.length=L:e=null),It){let y=n;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.threadId===void 0){let P={instancePath:a,schemaPath:"#/allOf/6/then/required",keyword:"required",params:{missingProperty:"threadId"},message:"must have required property \'threadId\'"};e===null?e=[P]:e.push(P),n++}if(r.attentionState===void 0){let P={instancePath:a,schemaPath:"#/allOf/6/then/required",keyword:"required",params:{missingProperty:"attentionState"},message:"must have required property \'attentionState\'"};e===null?e=[P]:e.push(P),n++}}var It=y===n;_r=It}if(!_r){let y={instancePath:a,schemaPath:"#/allOf/6/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[y]:e.push(y),n++}let Rr=n,Bt=!0,yt=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.type!==void 0&&r.type!=="feedback-batch.stored"){let y={};e===null?e=[y]:e.push(y),n++}var ue=yt===n;if(n=Rr,e!==null&&(Rr?e.length=Rr:e=null),ue){let y=n;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.batchId===void 0){let P={instancePath:a,schemaPath:"#/allOf/7/then/required",keyword:"required",params:{missingProperty:"batchId"},message:"must have required property \'batchId\'"};e===null?e=[P]:e.push(P),n++}if(r.threadIds===void 0){let P={instancePath:a,schemaPath:"#/allOf/7/then/required",keyword:"required",params:{missingProperty:"threadIds"},message:"must have required property \'threadIds\'"};e===null?e=[P]:e.push(P),n++}if(r.itemCount===void 0){let P={instancePath:a,schemaPath:"#/allOf/7/then/required",keyword:"required",params:{missingProperty:"itemCount"},message:"must have required property \'itemCount\'"};e===null?e=[P]:e.push(P),n++}if(r.deliveryMode===void 0){let P={instancePath:a,schemaPath:"#/allOf/7/then/required",keyword:"required",params:{missingProperty:"deliveryMode"},message:"must have required property \'deliveryMode\'"};e===null?e=[P]:e.push(P),n++}}var ue=y===n;Bt=ue}if(!Bt){let y={instancePath:a,schemaPath:"#/allOf/7/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[y]:e.push(y),n++}let N=n,pr=!0,ur=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.type!==void 0&&r.type!=="feedback-batch.claimed"){let y={};e===null?e=[y]:e.push(y),n++}var O=ur===n;if(n=N,e!==null&&(N?e.length=N:e=null),O){let y=n;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.batchId===void 0){let P={instancePath:a,schemaPath:"#/allOf/8/then/required",keyword:"required",params:{missingProperty:"batchId"},message:"must have required property \'batchId\'"};e===null?e=[P]:e.push(P),n++}if(r.originSessionMatched===void 0){let P={instancePath:a,schemaPath:"#/allOf/8/then/required",keyword:"required",params:{missingProperty:"originSessionMatched"},message:"must have required property \'originSessionMatched\'"};e===null?e=[P]:e.push(P),n++}}var O=y===n;pr=O}if(!pr){let y={instancePath:a,schemaPath:"#/allOf/8/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[y]:e.push(y),n++}let Va=n,Pa=!0,_t=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.type!==void 0&&r.type!=="feedback-batch.released"){let y={};e===null?e=[y]:e.push(y),n++}var ka=_t===n;if(n=Va,e!==null&&(Va?e.length=Va:e=null),ka){let y=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.batchId===void 0){let P={instancePath:a,schemaPath:"#/allOf/9/then/required",keyword:"required",params:{missingProperty:"batchId"},message:"must have required property \'batchId\'"};e===null?e=[P]:e.push(P),n++}var ka=y===n;Pa=ka}if(!Pa){let y={instancePath:a,schemaPath:"#/allOf/9/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[y]:e.push(y),n++}let X=n,Tt=!0,Sr=n;if(r&&typeof r=="object"&&!Array.isArray(r)&&r.type!==void 0&&r.type!=="feedback-batch.answered"){let y={};e===null?e=[y]:e.push(y),n++}var oa=Sr===n;if(n=X,e!==null&&(X?e.length=X:e=null),oa){let y=n;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.batchId===void 0){let P={instancePath:a,schemaPath:"#/allOf/10/then/required",keyword:"required",params:{missingProperty:"batchId"},message:"must have required property \'batchId\'"};e===null?e=[P]:e.push(P),n++}if(r.itemIds===void 0){let P={instancePath:a,schemaPath:"#/allOf/10/then/required",keyword:"required",params:{missingProperty:"itemIds"},message:"must have required property \'itemIds\'"};e===null?e=[P]:e.push(P),n++}}var oa=y===n;Tt=oa}if(!Tt){let y={instancePath:a,schemaPath:"#/allOf/10/if",keyword:"if",params:{failingKeyword:"then"},message:\'must match "then" schema\'};e===null?e=[y]:e.push(y),n++}if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.schemaVersion===void 0){let y={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property \'schemaVersion\'"};e===null?e=[y]:e.push(y),n++}if(r.id===void 0){let y={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property \'id\'"};e===null?e=[y]:e.push(y),n++}if(r.reportId===void 0){let y={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"reportId"},message:"must have required property \'reportId\'"};e===null?e=[y]:e.push(y),n++}if(r.sequence===void 0){let y={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"sequence"},message:"must have required property \'sequence\'"};e===null?e=[y]:e.push(y),n++}if(r.type===void 0){let y={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property \'type\'"};e===null?e=[y]:e.push(y),n++}if(r.createdAt===void 0){let y={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property \'createdAt\'"};e===null?e=[y]:e.push(y),n++}for(let y in r)if(!Ma.call(Ua.properties,y)){let b={instancePath:a,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),n++}if(r.schemaVersion!==void 0&&r.schemaVersion!=="1.0"){let y={instancePath:a+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:"1.0"},message:"must be equal to constant"};e===null?e=[y]:e.push(y),n++}if(r.id!==void 0){let y=r.id;if(typeof y=="string"){if(nt(y)>256){let b={instancePath:a+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[b]:e.push(b),n++}if(!Hh.test(y)){let b={instancePath:a+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^event[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^event[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}}if(r.reportId!==void 0){let y=r.reportId;if(typeof y=="string"){if(nt(y)>256){let b={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[b]:e.push(b),n++}if(!Cs.test(y)){let b={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/pattern",keyword:"pattern",params:{pattern:"^report[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^report[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}}if(r.sequence!==void 0){let y=r.sequence;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let b={instancePath:a+"/sequence",schemaPath:"#/properties/sequence/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[b]:e.push(b),n++}if(typeof y=="number"&&(y<1||isNaN(y))){let b={instancePath:a+"/sequence",schemaPath:"#/properties/sequence/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[b]:e.push(b),n++}}if(r.type!==void 0){let y=r.type;if(!(y==="viewed.changed"||y==="judgment.changed"||y==="thread.created"||y==="thread.message-added"||y==="thread.resolved"||y==="state.imported"||y==="agent-attention.changed"||y==="feedback-batch.stored"||y==="feedback-batch.claimed"||y==="feedback-batch.released"||y==="feedback-batch.answered")){let b={instancePath:a+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Ua.properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),n++}}if(r.createdAt!==void 0){let y=r.createdAt;if(typeof y=="string"){if(!na.validate(y)){let b={instancePath:a+"/createdAt",schemaPath:"#/properties/createdAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/createdAt",schemaPath:"#/properties/createdAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}}if(r.anchor!==void 0){let y=r.anchor;if(y&&typeof y=="object"&&!Array.isArray(y)){if(y.type===void 0){let b={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property \'type\'"};e===null?e=[b]:e.push(b),n++}if(y.ref===void 0){let b={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property \'ref\'"};e===null?e=[b]:e.push(b),n++}if(y.fingerprint===void 0){let b={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"fingerprint"},message:"must have required property \'fingerprint\'"};e===null?e=[b]:e.push(b),n++}for(let b in y)if(!Ma.call(Un.properties,b)){let P={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:b},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),n++}if(y.type!==void 0){let b=y.type;if(!(b==="change"||b==="file"||b==="hunk"||b==="line-range"||b==="visual-target"||b==="visual-region"||b==="finding"||b==="verification-gap")){let P={instancePath:a+"/anchor/type",schemaPath:"#/$defs/reviewAnchor/properties/type/enum",keyword:"enum",params:{allowedValues:Un.properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[P]:e.push(P),n++}}if(y.ref!==void 0){let b=y.ref;if(typeof b=="string"){if(nt(b)<1){let P={instancePath:a+"/anchor/ref",schemaPath:"#/$defs/reviewAnchor/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[P]:e.push(P),n++}}else{let P={instancePath:a+"/anchor/ref",schemaPath:"#/$defs/reviewAnchor/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),n++}}if(y.path!==void 0&&typeof y.path!="string"){let b={instancePath:a+"/anchor/path",schemaPath:"#/$defs/reviewAnchor/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}if(y.side!==void 0){let b=y.side;if(!(b==="before"||b==="after"||b==="diff")){let P={instancePath:a+"/anchor/side",schemaPath:"#/$defs/reviewAnchor/properties/side/enum",keyword:"enum",params:{allowedValues:Un.properties.side.enum},message:"must be equal to one of the allowed values"};e===null?e=[P]:e.push(P),n++}}if(y.startLine!==void 0){let b=y.startLine;if(!(typeof b=="number"&&!(b%1)&&!isNaN(b))){let P={instancePath:a+"/anchor/startLine",schemaPath:"#/$defs/reviewAnchor/properties/startLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[P]:e.push(P),n++}if(typeof b=="number"&&(b<1||isNaN(b))){let P={instancePath:a+"/anchor/startLine",schemaPath:"#/$defs/reviewAnchor/properties/startLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[P]:e.push(P),n++}}if(y.endLine!==void 0){let b=y.endLine;if(!(typeof b=="number"&&!(b%1)&&!isNaN(b))){let P={instancePath:a+"/anchor/endLine",schemaPath:"#/$defs/reviewAnchor/properties/endLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[P]:e.push(P),n++}if(typeof b=="number"&&(b<1||isNaN(b))){let P={instancePath:a+"/anchor/endLine",schemaPath:"#/$defs/reviewAnchor/properties/endLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[P]:e.push(P),n++}}if(y.targetRef!==void 0&&typeof y.targetRef!="string"){let b={instancePath:a+"/anchor/targetRef",schemaPath:"#/$defs/reviewAnchor/properties/targetRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}if(y.region!==void 0){let b=y.region;if(b&&typeof b=="object"&&!Array.isArray(b)){if(b.x===void 0){let P={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"x"},message:"must have required property \'x\'"};e===null?e=[P]:e.push(P),n++}if(b.y===void 0){let P={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"y"},message:"must have required property \'y\'"};e===null?e=[P]:e.push(P),n++}if(b.width===void 0){let P={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"width"},message:"must have required property \'width\'"};e===null?e=[P]:e.push(P),n++}if(b.height===void 0){let P={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"height"},message:"must have required property \'height\'"};e===null?e=[P]:e.push(P),n++}for(let P in b)if(!(P==="x"||P==="y"||P==="width"||P==="height")){let Z={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[Z]:e.push(Z),n++}if(b.x!==void 0){let P=b.x;if(typeof P=="number"){if(P>1||isNaN(P)){let Z={instancePath:a+"/anchor/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[Z]:e.push(Z),n++}if(P<0||isNaN(P)){let Z={instancePath:a+"/anchor/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[Z]:e.push(Z),n++}}else{let Z={instancePath:a+"/anchor/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[Z]:e.push(Z),n++}}if(b.y!==void 0){let P=b.y;if(typeof P=="number"){if(P>1||isNaN(P)){let Z={instancePath:a+"/anchor/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[Z]:e.push(Z),n++}if(P<0||isNaN(P)){let Z={instancePath:a+"/anchor/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[Z]:e.push(Z),n++}}else{let Z={instancePath:a+"/anchor/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[Z]:e.push(Z),n++}}if(b.width!==void 0){let P=b.width;if(typeof P=="number"){if(P>1||isNaN(P)){let Z={instancePath:a+"/anchor/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[Z]:e.push(Z),n++}if(P<=0||isNaN(P)){let Z={instancePath:a+"/anchor/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[Z]:e.push(Z),n++}}else{let Z={instancePath:a+"/anchor/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[Z]:e.push(Z),n++}}if(b.height!==void 0){let P=b.height;if(typeof P=="number"){if(P>1||isNaN(P)){let Z={instancePath:a+"/anchor/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[Z]:e.push(Z),n++}if(P<=0||isNaN(P)){let Z={instancePath:a+"/anchor/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[Z]:e.push(Z),n++}}else{let Z={instancePath:a+"/anchor/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[Z]:e.push(Z),n++}}}else{let P={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),n++}}if(y.selectorHint!==void 0&&typeof y.selectorHint!="string"){let b={instancePath:a+"/anchor/selectorHint",schemaPath:"#/$defs/reviewAnchor/properties/selectorHint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}if(y.fingerprint!==void 0){let b=y.fingerprint;if(typeof b=="string"){if(!es.test(b)){let P={instancePath:a+"/anchor/fingerprint",schemaPath:"#/$defs/reviewAnchor/properties/fingerprint/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:\'must match pattern "^[a-f0-9]{64}$"\'};e===null?e=[P]:e.push(P),n++}}else{let P={instancePath:a+"/anchor/fingerprint",schemaPath:"#/$defs/reviewAnchor/properties/fingerprint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),n++}}}else{let b={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[b]:e.push(b),n++}}if(r.changeId!==void 0){let y=r.changeId;if(typeof y=="string"){if(!Wh.test(y)){let b={instancePath:a+"/changeId",schemaPath:"#/properties/changeId/pattern",keyword:"pattern",params:{pattern:"^change[-:]"},message:\'must match pattern "^change[-:]"\'};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/changeId",schemaPath:"#/properties/changeId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}}if(r.viewState!==void 0){let y=r.viewState;if(!(y==="unseen"||y==="viewed"||y==="stale")){let b={instancePath:a+"/viewState",schemaPath:"#/properties/viewState/enum",keyword:"enum",params:{allowedValues:Ua.properties.viewState.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),n++}}if(r.judgmentState!==void 0){let y=r.judgmentState;if(!(y==="unreviewed"||y==="reviewed"||y==="follow-up"||y==="blocked"||y==="stale")){let b={instancePath:a+"/judgmentState",schemaPath:"#/properties/judgmentState/enum",keyword:"enum",params:{allowedValues:Ua.properties.judgmentState.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),n++}}if(r.threadId!==void 0){let y=r.threadId;if(typeof y=="string"){if(nt(y)>256){let b={instancePath:a+"/threadId",schemaPath:"#/properties/threadId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[b]:e.push(b),n++}if(!Ls.test(y)){let b={instancePath:a+"/threadId",schemaPath:"#/properties/threadId/pattern",keyword:"pattern",params:{pattern:"^thread[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^thread[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/threadId",schemaPath:"#/properties/threadId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}}if(r.messageId!==void 0){let y=r.messageId;if(typeof y=="string"){if(nt(y)>256){let b={instancePath:a+"/messageId",schemaPath:"#/properties/messageId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[b]:e.push(b),n++}if(!gd.test(y)){let b={instancePath:a+"/messageId",schemaPath:"#/properties/messageId/pattern",keyword:"pattern",params:{pattern:"^message[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^message[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}}if(r.sourceReportId!==void 0){let y=r.sourceReportId;if(typeof y=="string"){if(nt(y)>256){let b={instancePath:a+"/sourceReportId",schemaPath:"#/properties/sourceReportId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[b]:e.push(b),n++}if(!Cs.test(y)){let b={instancePath:a+"/sourceReportId",schemaPath:"#/properties/sourceReportId/pattern",keyword:"pattern",params:{pattern:"^report[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^report[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/sourceReportId",schemaPath:"#/properties/sourceReportId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}}if(r.attentionState!==void 0){let y=r.attentionState;if(!(y==="none"||y==="requested"||y==="batched"||y==="submitted"||y==="acknowledged"||y==="answered"||y==="stale")){let b={instancePath:a+"/attentionState",schemaPath:"#/properties/attentionState/enum",keyword:"enum",params:{allowedValues:Ua.properties.attentionState.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),n++}}if(r.batchId!==void 0){let y=r.batchId;if(typeof y=="string"){if(nt(y)>256){let b={instancePath:a+"/batchId",schemaPath:"#/properties/batchId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[b]:e.push(b),n++}if(!yd.test(y)){let b={instancePath:a+"/batchId",schemaPath:"#/properties/batchId/pattern",keyword:"pattern",params:{pattern:"^fb[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^fb[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[b]:e.push(b),n++}}else{let b={instancePath:a+"/batchId",schemaPath:"#/properties/batchId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),n++}}if(r.threadIds!==void 0){let y=r.threadIds;if(Array.isArray(y)){if(y.length>20){let ee={instancePath:a+"/threadIds",schemaPath:"#/properties/threadIds/maxItems",keyword:"maxItems",params:{limit:20},message:"must NOT have more than 20 items"};e===null?e=[ee]:e.push(ee),n++}let b=y.length;for(let ee=0;ee<b;ee++){let Xe=y[ee];if(typeof Xe=="string"){if(nt(Xe)>256){let D={instancePath:a+"/threadIds/"+ee,schemaPath:"#/properties/threadIds/items/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[D]:e.push(D),n++}if(!Ls.test(Xe)){let D={instancePath:a+"/threadIds/"+ee,schemaPath:"#/properties/threadIds/items/pattern",keyword:"pattern",params:{pattern:"^thread[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^thread[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[D]:e.push(D),n++}}else{let D={instancePath:a+"/threadIds/"+ee,schemaPath:"#/properties/threadIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[D]:e.push(D),n++}}let P=y.length,Z;if(P>1){let ee={};for(;P--;){let Xe=y[P];if(typeof Xe=="string"){if(typeof ee[Xe]=="number"){Z=ee[Xe];let D={instancePath:a+"/threadIds",schemaPath:"#/properties/threadIds/uniqueItems",keyword:"uniqueItems",params:{i:P,j:Z},message:"must NOT have duplicate items (items ## "+Z+" and "+P+" are identical)"};e===null?e=[D]:e.push(D),n++;break}ee[Xe]=P}}}}else{let b={instancePath:a+"/threadIds",schemaPath:"#/properties/threadIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[b]:e.push(b),n++}}if(r.itemIds!==void 0){let y=r.itemIds;if(Array.isArray(y)){if(y.length>20){let ee={instancePath:a+"/itemIds",schemaPath:"#/properties/itemIds/maxItems",keyword:"maxItems",params:{limit:20},message:"must NOT have more than 20 items"};e===null?e=[ee]:e.push(ee),n++}let b=y.length;for(let ee=0;ee<b;ee++){let Xe=y[ee];if(typeof Xe=="string"){if(nt(Xe)>256){let D={instancePath:a+"/itemIds/"+ee,schemaPath:"#/properties/itemIds/items/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[D]:e.push(D),n++}if(!_d.test(Xe)){let D={instancePath:a+"/itemIds/"+ee,schemaPath:"#/properties/itemIds/items/pattern",keyword:"pattern",params:{pattern:"^item[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^item[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[D]:e.push(D),n++}}else{let D={instancePath:a+"/itemIds/"+ee,schemaPath:"#/properties/itemIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[D]:e.push(D),n++}}let P=y.length,Z;if(P>1){let ee={};for(;P--;){let Xe=y[P];if(typeof Xe=="string"){if(typeof ee[Xe]=="number"){Z=ee[Xe];let D={instancePath:a+"/itemIds",schemaPath:"#/properties/itemIds/uniqueItems",keyword:"uniqueItems",params:{i:P,j:Z},message:"must NOT have duplicate items (items ## "+Z+" and "+P+" are identical)"};e===null?e=[D]:e.push(D),n++;break}ee[Xe]=P}}}}else{let b={instancePath:a+"/itemIds",schemaPath:"#/properties/itemIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[b]:e.push(b),n++}}if(r.itemCount!==void 0){let y=r.itemCount;if(!(typeof y=="number"&&!(y%1)&&!isNaN(y))){let b={instancePath:a+"/itemCount",schemaPath:"#/properties/itemCount/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[b]:e.push(b),n++}if(typeof y=="number"){if(y>20||isNaN(y)){let b={instancePath:a+"/itemCount",schemaPath:"#/properties/itemCount/maximum",keyword:"maximum",params:{comparison:"<=",limit:20},message:"must be <= 20"};e===null?e=[b]:e.push(b),n++}if(y<1||isNaN(y)){let b={instancePath:a+"/itemCount",schemaPath:"#/properties/itemCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[b]:e.push(b),n++}}}if(r.deliveryMode!==void 0){let y=r.deliveryMode;if(!(y==="direct-same-session"||y==="return-to-session"||y==="export-only")){let b={instancePath:a+"/deliveryMode",schemaPath:"#/properties/deliveryMode/enum",keyword:"enum",params:{allowedValues:Ua.properties.deliveryMode.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),n++}}if(r.originSessionMatched!==void 0&&typeof r.originSessionMatched!="boolean"){let y={instancePath:a+"/originSessionMatched",schemaPath:"#/properties/originSessionMatched/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[y]:e.push(y),n++}}else{let y={instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[y]:e.push(y),n++}return wd.errors=e,n===0}var Zh=bd,Kn={properties:{schemaVersion:{const:"1.3"},reportId:{type:"string",pattern:"^report[-:][A-Za-z0-9._:-]+$",maxLength:256},reportFingerprint:{type:"string",pattern:"^[a-f0-9]{64}$"},revision:{type:"integer",minimum:0},updatedAt:{type:"string",format:"date-time"},viewed:{type:"object",additionalProperties:{type:"object",additionalProperties:!1,required:["anchor","state","updatedAt"],properties:{anchor:{$ref:"#/$defs/reviewAnchor"},state:{enum:["unseen","viewed","stale"]},updatedAt:{type:"string",format:"date-time"}}}},judgments:{type:"object",additionalProperties:{type:"object",additionalProperties:!1,required:["changeId","state","updatedAt"],properties:{changeId:{type:"string"},state:{enum:["unreviewed","reviewed","follow-up","blocked","stale"]},updatedAt:{type:"string",format:"date-time"}}}},threadIds:{type:"array",items:{type:"string",pattern:"^thread[-:][A-Za-z0-9._:-]+$",maxLength:256},uniqueItems:!0},orphanedThreadIds:{type:"array",items:{type:"string",pattern:"^thread[-:][A-Za-z0-9._:-]+$",maxLength:256},uniqueItems:!0}}},Jn={properties:{type:{enum:["change","file","hunk","line-range","visual-target","visual-region","finding","verification-gap"]},ref:{type:"string",minLength:1},path:{type:"string"},side:{enum:["before","after","diff"]},startLine:{type:"integer",minimum:1},endLine:{type:"integer",minimum:1},targetRef:{type:"string"},region:{$ref:"#/$defs/region"},selectorHint:{type:"string"},fingerprint:{type:"string",pattern:"^[a-f0-9]{64}$"}}};function on(r,{instancePath:a="",parentData:s,parentDataProperty:d,rootData:p=r}={}){let e=null,n=0;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property \'type\'"};e===null?e=[l]:e.push(l),n++}if(r.ref===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property \'ref\'"};e===null?e=[l]:e.push(l),n++}if(r.fingerprint===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"fingerprint"},message:"must have required property \'fingerprint\'"};e===null?e=[l]:e.push(l),n++}for(let l in r)if(!Ma.call(Jn.properties,l)){let i={instancePath:a,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),n++}if(r.type!==void 0){let l=r.type;if(!(l==="change"||l==="file"||l==="hunk"||l==="line-range"||l==="visual-target"||l==="visual-region"||l==="finding"||l==="verification-gap")){let i={instancePath:a+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues:Jn.properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),n++}}if(r.ref!==void 0){let l=r.ref;if(typeof l=="string"){if(nt(l)<1){let i={instancePath:a+"/ref",schemaPath:"#/properties/ref/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),n++}}else{let i={instancePath:a+"/ref",schemaPath:"#/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}}if(r.path!==void 0&&typeof r.path!="string"){let l={instancePath:a+"/path",schemaPath:"#/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),n++}if(r.side!==void 0){let l=r.side;if(!(l==="before"||l==="after"||l==="diff")){let i={instancePath:a+"/side",schemaPath:"#/properties/side/enum",keyword:"enum",params:{allowedValues:Jn.properties.side.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),n++}}if(r.startLine!==void 0){let l=r.startLine;if(!(typeof l=="number"&&!(l%1)&&!isNaN(l))){let i={instancePath:a+"/startLine",schemaPath:"#/properties/startLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[i]:e.push(i),n++}if(typeof l=="number"&&(l<1||isNaN(l))){let i={instancePath:a+"/startLine",schemaPath:"#/properties/startLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),n++}}if(r.endLine!==void 0){let l=r.endLine;if(!(typeof l=="number"&&!(l%1)&&!isNaN(l))){let i={instancePath:a+"/endLine",schemaPath:"#/properties/endLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[i]:e.push(i),n++}if(typeof l=="number"&&(l<1||isNaN(l))){let i={instancePath:a+"/endLine",schemaPath:"#/properties/endLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),n++}}if(r.targetRef!==void 0&&typeof r.targetRef!="string"){let l={instancePath:a+"/targetRef",schemaPath:"#/properties/targetRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),n++}if(r.region!==void 0){let l=r.region;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.x===void 0){let i={instancePath:a+"/region",schemaPath:"#/$defs/region/required",keyword:"required",params:{missingProperty:"x"},message:"must have required property \'x\'"};e===null?e=[i]:e.push(i),n++}if(l.y===void 0){let i={instancePath:a+"/region",schemaPath:"#/$defs/region/required",keyword:"required",params:{missingProperty:"y"},message:"must have required property \'y\'"};e===null?e=[i]:e.push(i),n++}if(l.width===void 0){let i={instancePath:a+"/region",schemaPath:"#/$defs/region/required",keyword:"required",params:{missingProperty:"width"},message:"must have required property \'width\'"};e===null?e=[i]:e.push(i),n++}if(l.height===void 0){let i={instancePath:a+"/region",schemaPath:"#/$defs/region/required",keyword:"required",params:{missingProperty:"height"},message:"must have required property \'height\'"};e===null?e=[i]:e.push(i),n++}for(let i in l)if(!(i==="x"||i==="y"||i==="width"||i==="height")){let o={instancePath:a+"/region",schemaPath:"#/$defs/region/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[o]:e.push(o),n++}if(l.x!==void 0){let i=l.x;if(typeof i=="number"){if(i>1||isNaN(i)){let o={instancePath:a+"/region/x",schemaPath:"#/$defs/region/properties/x/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[o]:e.push(o),n++}if(i<0||isNaN(i)){let o={instancePath:a+"/region/x",schemaPath:"#/$defs/region/properties/x/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/region/x",schemaPath:"#/$defs/region/properties/x/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[o]:e.push(o),n++}}if(l.y!==void 0){let i=l.y;if(typeof i=="number"){if(i>1||isNaN(i)){let o={instancePath:a+"/region/y",schemaPath:"#/$defs/region/properties/y/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[o]:e.push(o),n++}if(i<0||isNaN(i)){let o={instancePath:a+"/region/y",schemaPath:"#/$defs/region/properties/y/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/region/y",schemaPath:"#/$defs/region/properties/y/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[o]:e.push(o),n++}}if(l.width!==void 0){let i=l.width;if(typeof i=="number"){if(i>1||isNaN(i)){let o={instancePath:a+"/region/width",schemaPath:"#/$defs/region/properties/width/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[o]:e.push(o),n++}if(i<=0||isNaN(i)){let o={instancePath:a+"/region/width",schemaPath:"#/$defs/region/properties/width/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/region/width",schemaPath:"#/$defs/region/properties/width/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[o]:e.push(o),n++}}if(l.height!==void 0){let i=l.height;if(typeof i=="number"){if(i>1||isNaN(i)){let o={instancePath:a+"/region/height",schemaPath:"#/$defs/region/properties/height/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[o]:e.push(o),n++}if(i<=0||isNaN(i)){let o={instancePath:a+"/region/height",schemaPath:"#/$defs/region/properties/height/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/region/height",schemaPath:"#/$defs/region/properties/height/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[o]:e.push(o),n++}}}else{let i={instancePath:a+"/region",schemaPath:"#/$defs/region/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),n++}}if(r.selectorHint!==void 0&&typeof r.selectorHint!="string"){let l={instancePath:a+"/selectorHint",schemaPath:"#/properties/selectorHint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[l]:e.push(l),n++}if(r.fingerprint!==void 0){let l=r.fingerprint;if(typeof l=="string"){if(!es.test(l)){let i={instancePath:a+"/fingerprint",schemaPath:"#/properties/fingerprint/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:\'must match pattern "^[a-f0-9]{64}$"\'};e===null?e=[i]:e.push(i),n++}}else{let i={instancePath:a+"/fingerprint",schemaPath:"#/properties/fingerprint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}}}else{let l={instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),n++}return on.errors=e,n===0}function bd(r,{instancePath:a="",parentData:s,parentDataProperty:d,rootData:p=r}={}){let e=null,n=0;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.schemaVersion===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"schemaVersion"},message:"must have required property \'schemaVersion\'"};e===null?e=[l]:e.push(l),n++}if(r.reportId===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"reportId"},message:"must have required property \'reportId\'"};e===null?e=[l]:e.push(l),n++}if(r.reportFingerprint===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"reportFingerprint"},message:"must have required property \'reportFingerprint\'"};e===null?e=[l]:e.push(l),n++}if(r.revision===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"revision"},message:"must have required property \'revision\'"};e===null?e=[l]:e.push(l),n++}if(r.updatedAt===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property \'updatedAt\'"};e===null?e=[l]:e.push(l),n++}if(r.viewed===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"viewed"},message:"must have required property \'viewed\'"};e===null?e=[l]:e.push(l),n++}if(r.judgments===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"judgments"},message:"must have required property \'judgments\'"};e===null?e=[l]:e.push(l),n++}if(r.threadIds===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"threadIds"},message:"must have required property \'threadIds\'"};e===null?e=[l]:e.push(l),n++}if(r.orphanedThreadIds===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"orphanedThreadIds"},message:"must have required property \'orphanedThreadIds\'"};e===null?e=[l]:e.push(l),n++}for(let l in r)if(!Ma.call(Kn.properties,l)){let i={instancePath:a,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),n++}if(r.schemaVersion!==void 0&&r.schemaVersion!=="1.3"){let l={instancePath:a+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue:"1.3"},message:"must be equal to constant"};e===null?e=[l]:e.push(l),n++}if(r.reportId!==void 0){let l=r.reportId;if(typeof l=="string"){if(nt(l)>256){let i={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[i]:e.push(i),n++}if(!Cs.test(l)){let i={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/pattern",keyword:"pattern",params:{pattern:"^report[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^report[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[i]:e.push(i),n++}}else{let i={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}}if(r.reportFingerprint!==void 0){let l=r.reportFingerprint;if(typeof l=="string"){if(!es.test(l)){let i={instancePath:a+"/reportFingerprint",schemaPath:"#/properties/reportFingerprint/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:\'must match pattern "^[a-f0-9]{64}$"\'};e===null?e=[i]:e.push(i),n++}}else{let i={instancePath:a+"/reportFingerprint",schemaPath:"#/properties/reportFingerprint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}}if(r.revision!==void 0){let l=r.revision;if(!(typeof l=="number"&&!(l%1)&&!isNaN(l))){let i={instancePath:a+"/revision",schemaPath:"#/properties/revision/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[i]:e.push(i),n++}if(typeof l=="number"&&(l<0||isNaN(l))){let i={instancePath:a+"/revision",schemaPath:"#/properties/revision/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),n++}}if(r.updatedAt!==void 0){let l=r.updatedAt;if(typeof l=="string"){if(!na.validate(l)){let i={instancePath:a+"/updatedAt",schemaPath:"#/properties/updatedAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[i]:e.push(i),n++}}else{let i={instancePath:a+"/updatedAt",schemaPath:"#/properties/updatedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}}if(r.viewed!==void 0){let l=r.viewed;if(l&&typeof l=="object"&&!Array.isArray(l))for(let i in l){let o=l[i];if(o&&typeof o=="object"&&!Array.isArray(o)){if(o.anchor===void 0){let f={instancePath:a+"/viewed/"+i.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/viewed/additionalProperties/required",keyword:"required",params:{missingProperty:"anchor"},message:"must have required property \'anchor\'"};e===null?e=[f]:e.push(f),n++}if(o.state===void 0){let f={instancePath:a+"/viewed/"+i.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/viewed/additionalProperties/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property \'state\'"};e===null?e=[f]:e.push(f),n++}if(o.updatedAt===void 0){let f={instancePath:a+"/viewed/"+i.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/viewed/additionalProperties/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property \'updatedAt\'"};e===null?e=[f]:e.push(f),n++}for(let f in o)if(!(f==="anchor"||f==="state"||f==="updatedAt")){let h={instancePath:a+"/viewed/"+i.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/viewed/additionalProperties/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[h]:e.push(h),n++}if(o.anchor!==void 0&&(on(o.anchor,{instancePath:a+"/viewed/"+i.replace(/~/g,"~0").replace(/\\//g,"~1")+"/anchor",parentData:o,parentDataProperty:"anchor",rootData:p})||(e=e===null?on.errors:e.concat(on.errors),n=e.length)),o.state!==void 0){let f=o.state;if(!(f==="unseen"||f==="viewed"||f==="stale")){let h={instancePath:a+"/viewed/"+i.replace(/~/g,"~0").replace(/\\//g,"~1")+"/state",schemaPath:"#/properties/viewed/additionalProperties/properties/state/enum",keyword:"enum",params:{allowedValues:Kn.properties.viewed.additionalProperties.properties.state.enum},message:"must be equal to one of the allowed values"};e===null?e=[h]:e.push(h),n++}}if(o.updatedAt!==void 0){let f=o.updatedAt;if(typeof f=="string"){if(!na.validate(f)){let h={instancePath:a+"/viewed/"+i.replace(/~/g,"~0").replace(/\\//g,"~1")+"/updatedAt",schemaPath:"#/properties/viewed/additionalProperties/properties/updatedAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[h]:e.push(h),n++}}else{let h={instancePath:a+"/viewed/"+i.replace(/~/g,"~0").replace(/\\//g,"~1")+"/updatedAt",schemaPath:"#/properties/viewed/additionalProperties/properties/updatedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),n++}}}else{let f={instancePath:a+"/viewed/"+i.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/viewed/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),n++}}else{let i={instancePath:a+"/viewed",schemaPath:"#/properties/viewed/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),n++}}if(r.judgments!==void 0){let l=r.judgments;if(l&&typeof l=="object"&&!Array.isArray(l))for(let i in l){let o=l[i];if(o&&typeof o=="object"&&!Array.isArray(o)){if(o.changeId===void 0){let f={instancePath:a+"/judgments/"+i.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/judgments/additionalProperties/required",keyword:"required",params:{missingProperty:"changeId"},message:"must have required property \'changeId\'"};e===null?e=[f]:e.push(f),n++}if(o.state===void 0){let f={instancePath:a+"/judgments/"+i.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/judgments/additionalProperties/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property \'state\'"};e===null?e=[f]:e.push(f),n++}if(o.updatedAt===void 0){let f={instancePath:a+"/judgments/"+i.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/judgments/additionalProperties/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property \'updatedAt\'"};e===null?e=[f]:e.push(f),n++}for(let f in o)if(!(f==="changeId"||f==="state"||f==="updatedAt")){let h={instancePath:a+"/judgments/"+i.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/judgments/additionalProperties/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[h]:e.push(h),n++}if(o.changeId!==void 0&&typeof o.changeId!="string"){let f={instancePath:a+"/judgments/"+i.replace(/~/g,"~0").replace(/\\//g,"~1")+"/changeId",schemaPath:"#/properties/judgments/additionalProperties/properties/changeId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),n++}if(o.state!==void 0){let f=o.state;if(!(f==="unreviewed"||f==="reviewed"||f==="follow-up"||f==="blocked"||f==="stale")){let h={instancePath:a+"/judgments/"+i.replace(/~/g,"~0").replace(/\\//g,"~1")+"/state",schemaPath:"#/properties/judgments/additionalProperties/properties/state/enum",keyword:"enum",params:{allowedValues:Kn.properties.judgments.additionalProperties.properties.state.enum},message:"must be equal to one of the allowed values"};e===null?e=[h]:e.push(h),n++}}if(o.updatedAt!==void 0){let f=o.updatedAt;if(typeof f=="string"){if(!na.validate(f)){let h={instancePath:a+"/judgments/"+i.replace(/~/g,"~0").replace(/\\//g,"~1")+"/updatedAt",schemaPath:"#/properties/judgments/additionalProperties/properties/updatedAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[h]:e.push(h),n++}}else{let h={instancePath:a+"/judgments/"+i.replace(/~/g,"~0").replace(/\\//g,"~1")+"/updatedAt",schemaPath:"#/properties/judgments/additionalProperties/properties/updatedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),n++}}}else{let f={instancePath:a+"/judgments/"+i.replace(/~/g,"~0").replace(/\\//g,"~1"),schemaPath:"#/properties/judgments/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),n++}}else{let i={instancePath:a+"/judgments",schemaPath:"#/properties/judgments/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),n++}}if(r.threadIds!==void 0){let l=r.threadIds;if(Array.isArray(l)){let i=l.length;for(let h=0;h<i;h++){let m=l[h];if(typeof m=="string"){if(nt(m)>256){let w={instancePath:a+"/threadIds/"+h,schemaPath:"#/properties/threadIds/items/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[w]:e.push(w),n++}if(!Ls.test(m)){let w={instancePath:a+"/threadIds/"+h,schemaPath:"#/properties/threadIds/items/pattern",keyword:"pattern",params:{pattern:"^thread[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^thread[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[w]:e.push(w),n++}}else{let w={instancePath:a+"/threadIds/"+h,schemaPath:"#/properties/threadIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),n++}}let o=l.length,f;if(o>1){let h={};for(;o--;){let m=l[o];if(typeof m=="string"){if(typeof h[m]=="number"){f=h[m];let w={instancePath:a+"/threadIds",schemaPath:"#/properties/threadIds/uniqueItems",keyword:"uniqueItems",params:{i:o,j:f},message:"must NOT have duplicate items (items ## "+f+" and "+o+" are identical)"};e===null?e=[w]:e.push(w),n++;break}h[m]=o}}}}else{let i={instancePath:a+"/threadIds",schemaPath:"#/properties/threadIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),n++}}if(r.orphanedThreadIds!==void 0){let l=r.orphanedThreadIds;if(Array.isArray(l)){let i=l.length;for(let h=0;h<i;h++){let m=l[h];if(typeof m=="string"){if(nt(m)>256){let w={instancePath:a+"/orphanedThreadIds/"+h,schemaPath:"#/properties/orphanedThreadIds/items/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[w]:e.push(w),n++}if(!Ls.test(m)){let w={instancePath:a+"/orphanedThreadIds/"+h,schemaPath:"#/properties/orphanedThreadIds/items/pattern",keyword:"pattern",params:{pattern:"^thread[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^thread[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[w]:e.push(w),n++}}else{let w={instancePath:a+"/orphanedThreadIds/"+h,schemaPath:"#/properties/orphanedThreadIds/items/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),n++}}let o=l.length,f;if(o>1){let h={};for(;o--;){let m=l[o];if(typeof m=="string"){if(typeof h[m]=="number"){f=h[m];let w={instancePath:a+"/orphanedThreadIds",schemaPath:"#/properties/orphanedThreadIds/uniqueItems",keyword:"uniqueItems",params:{i:o,j:f},message:"must NOT have duplicate items (items ## "+f+" and "+o+" are identical)"};e===null?e=[w]:e.push(w),n++;break}h[m]=o}}}}else{let i={instancePath:a+"/orphanedThreadIds",schemaPath:"#/properties/orphanedThreadIds/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),n++}}}else{let l={instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),n++}return bd.errors=e,n===0}var Uh=Pd,Qs={properties:{id:{type:"string",pattern:"^thread[-:][A-Za-z0-9._:-]+$",maxLength:256},reportId:{type:"string",pattern:"^report[-:][A-Za-z0-9._:-]+$",maxLength:256},anchor:{$ref:"#/$defs/reviewAnchor"},kind:{enum:["note","question","finding","change-request"]},state:{enum:["open","answered","resolved","stale","orphaned"]},messages:{type:"array",items:{$ref:"#/$defs/message"}},agentAttention:{type:"object",additionalProperties:!1,required:["state"],properties:{state:{enum:["none","requested","batched","submitted","acknowledged","answered","stale"]},batchId:{type:"string",pattern:"^fb[-:][A-Za-z0-9._:-]+$",maxLength:256},updatedAt:{type:"string",format:"date-time"}}},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"}}},Yn={properties:{type:{enum:["change","file","hunk","line-range","visual-target","visual-region","finding","verification-gap"]},ref:{type:"string"},path:{type:"string"},side:{enum:["before","after","diff"]},startLine:{type:"integer",minimum:1},endLine:{type:"integer",minimum:1},targetRef:{type:"string"},region:{type:"object",additionalProperties:!1,required:["x","y","width","height"],properties:{x:{type:"number",minimum:0,maximum:1},y:{type:"number",minimum:0,maximum:1},width:{type:"number",exclusiveMinimum:0,maximum:1},height:{type:"number",exclusiveMinimum:0,maximum:1}}},selectorHint:{type:"string"},fingerprint:{type:"string",pattern:"^[a-f0-9]{64}$"}}},ml={properties:{kind:{enum:["human-note","agent-answer","system"]},author:{properties:{type:{enum:["human","agent","system"]}}}}};function Pd(r,{instancePath:a="",parentData:s,parentDataProperty:d,rootData:p=r}={}){let e=null,n=0;if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.id===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property \'id\'"};e===null?e=[l]:e.push(l),n++}if(r.reportId===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"reportId"},message:"must have required property \'reportId\'"};e===null?e=[l]:e.push(l),n++}if(r.anchor===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"anchor"},message:"must have required property \'anchor\'"};e===null?e=[l]:e.push(l),n++}if(r.kind===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"kind"},message:"must have required property \'kind\'"};e===null?e=[l]:e.push(l),n++}if(r.state===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property \'state\'"};e===null?e=[l]:e.push(l),n++}if(r.messages===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property \'messages\'"};e===null?e=[l]:e.push(l),n++}if(r.agentAttention===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"agentAttention"},message:"must have required property \'agentAttention\'"};e===null?e=[l]:e.push(l),n++}if(r.createdAt===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property \'createdAt\'"};e===null?e=[l]:e.push(l),n++}if(r.updatedAt===void 0){let l={instancePath:a,schemaPath:"#/required",keyword:"required",params:{missingProperty:"updatedAt"},message:"must have required property \'updatedAt\'"};e===null?e=[l]:e.push(l),n++}for(let l in r)if(!Ma.call(Qs.properties,l)){let i={instancePath:a,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),n++}if(r.id!==void 0){let l=r.id;if(typeof l=="string"){if(nt(l)>256){let i={instancePath:a+"/id",schemaPath:"#/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[i]:e.push(i),n++}if(!Ls.test(l)){let i={instancePath:a+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern:"^thread[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^thread[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[i]:e.push(i),n++}}else{let i={instancePath:a+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}}if(r.reportId!==void 0){let l=r.reportId;if(typeof l=="string"){if(nt(l)>256){let i={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[i]:e.push(i),n++}if(!Cs.test(l)){let i={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/pattern",keyword:"pattern",params:{pattern:"^report[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^report[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[i]:e.push(i),n++}}else{let i={instancePath:a+"/reportId",schemaPath:"#/properties/reportId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}}if(r.anchor!==void 0){let l=r.anchor;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.type===void 0){let i={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property \'type\'"};e===null?e=[i]:e.push(i),n++}if(l.ref===void 0){let i={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"ref"},message:"must have required property \'ref\'"};e===null?e=[i]:e.push(i),n++}if(l.fingerprint===void 0){let i={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/required",keyword:"required",params:{missingProperty:"fingerprint"},message:"must have required property \'fingerprint\'"};e===null?e=[i]:e.push(i),n++}for(let i in l)if(!Ma.call(Yn.properties,i)){let o={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[o]:e.push(o),n++}if(l.type!==void 0){let i=l.type;if(!(i==="change"||i==="file"||i==="hunk"||i==="line-range"||i==="visual-target"||i==="visual-region"||i==="finding"||i==="verification-gap")){let o={instancePath:a+"/anchor/type",schemaPath:"#/$defs/reviewAnchor/properties/type/enum",keyword:"enum",params:{allowedValues:Yn.properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[o]:e.push(o),n++}}if(l.ref!==void 0&&typeof l.ref!="string"){let i={instancePath:a+"/anchor/ref",schemaPath:"#/$defs/reviewAnchor/properties/ref/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}if(l.path!==void 0&&typeof l.path!="string"){let i={instancePath:a+"/anchor/path",schemaPath:"#/$defs/reviewAnchor/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}if(l.side!==void 0){let i=l.side;if(!(i==="before"||i==="after"||i==="diff")){let o={instancePath:a+"/anchor/side",schemaPath:"#/$defs/reviewAnchor/properties/side/enum",keyword:"enum",params:{allowedValues:Yn.properties.side.enum},message:"must be equal to one of the allowed values"};e===null?e=[o]:e.push(o),n++}}if(l.startLine!==void 0){let i=l.startLine;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let o={instancePath:a+"/anchor/startLine",schemaPath:"#/$defs/reviewAnchor/properties/startLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[o]:e.push(o),n++}if(typeof i=="number"&&(i<1||isNaN(i))){let o={instancePath:a+"/anchor/startLine",schemaPath:"#/$defs/reviewAnchor/properties/startLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[o]:e.push(o),n++}}if(l.endLine!==void 0){let i=l.endLine;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let o={instancePath:a+"/anchor/endLine",schemaPath:"#/$defs/reviewAnchor/properties/endLine/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[o]:e.push(o),n++}if(typeof i=="number"&&(i<1||isNaN(i))){let o={instancePath:a+"/anchor/endLine",schemaPath:"#/$defs/reviewAnchor/properties/endLine/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[o]:e.push(o),n++}}if(l.targetRef!==void 0&&typeof l.targetRef!="string"){let i={instancePath:a+"/anchor/targetRef",schemaPath:"#/$defs/reviewAnchor/properties/targetRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}if(l.region!==void 0){let i=l.region;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.x===void 0){let o={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"x"},message:"must have required property \'x\'"};e===null?e=[o]:e.push(o),n++}if(i.y===void 0){let o={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"y"},message:"must have required property \'y\'"};e===null?e=[o]:e.push(o),n++}if(i.width===void 0){let o={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"width"},message:"must have required property \'width\'"};e===null?e=[o]:e.push(o),n++}if(i.height===void 0){let o={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/required",keyword:"required",params:{missingProperty:"height"},message:"must have required property \'height\'"};e===null?e=[o]:e.push(o),n++}for(let o in i)if(!(o==="x"||o==="y"||o==="width"||o==="height")){let f={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[f]:e.push(f),n++}if(i.x!==void 0){let o=i.x;if(typeof o=="number"){if(o>1||isNaN(o)){let f={instancePath:a+"/anchor/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[f]:e.push(f),n++}if(o<0||isNaN(o)){let f={instancePath:a+"/anchor/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[f]:e.push(f),n++}}else{let f={instancePath:a+"/anchor/region/x",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/x/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[f]:e.push(f),n++}}if(i.y!==void 0){let o=i.y;if(typeof o=="number"){if(o>1||isNaN(o)){let f={instancePath:a+"/anchor/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[f]:e.push(f),n++}if(o<0||isNaN(o)){let f={instancePath:a+"/anchor/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[f]:e.push(f),n++}}else{let f={instancePath:a+"/anchor/region/y",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/y/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[f]:e.push(f),n++}}if(i.width!==void 0){let o=i.width;if(typeof o=="number"){if(o>1||isNaN(o)){let f={instancePath:a+"/anchor/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[f]:e.push(f),n++}if(o<=0||isNaN(o)){let f={instancePath:a+"/anchor/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[f]:e.push(f),n++}}else{let f={instancePath:a+"/anchor/region/width",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/width/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[f]:e.push(f),n++}}if(i.height!==void 0){let o=i.height;if(typeof o=="number"){if(o>1||isNaN(o)){let f={instancePath:a+"/anchor/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[f]:e.push(f),n++}if(o<=0||isNaN(o)){let f={instancePath:a+"/anchor/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[f]:e.push(f),n++}}else{let f={instancePath:a+"/anchor/region/height",schemaPath:"#/$defs/reviewAnchor/properties/region/properties/height/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[f]:e.push(f),n++}}}else{let o={instancePath:a+"/anchor/region",schemaPath:"#/$defs/reviewAnchor/properties/region/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),n++}}if(l.selectorHint!==void 0&&typeof l.selectorHint!="string"){let i={instancePath:a+"/anchor/selectorHint",schemaPath:"#/$defs/reviewAnchor/properties/selectorHint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}if(l.fingerprint!==void 0){let i=l.fingerprint;if(typeof i=="string"){if(!es.test(i)){let o={instancePath:a+"/anchor/fingerprint",schemaPath:"#/$defs/reviewAnchor/properties/fingerprint/pattern",keyword:"pattern",params:{pattern:"^[a-f0-9]{64}$"},message:\'must match pattern "^[a-f0-9]{64}$"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/anchor/fingerprint",schemaPath:"#/$defs/reviewAnchor/properties/fingerprint/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}}else{let i={instancePath:a+"/anchor",schemaPath:"#/$defs/reviewAnchor/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),n++}}if(r.kind!==void 0){let l=r.kind;if(!(l==="note"||l==="question"||l==="finding"||l==="change-request")){let i={instancePath:a+"/kind",schemaPath:"#/properties/kind/enum",keyword:"enum",params:{allowedValues:Qs.properties.kind.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),n++}}if(r.state!==void 0){let l=r.state;if(!(l==="open"||l==="answered"||l==="resolved"||l==="stale"||l==="orphaned")){let i={instancePath:a+"/state",schemaPath:"#/properties/state/enum",keyword:"enum",params:{allowedValues:Qs.properties.state.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),n++}}if(r.messages!==void 0){let l=r.messages;if(Array.isArray(l)){let i=l.length;for(let o=0;o<i;o++){let f=l[o];if(f&&typeof f=="object"&&!Array.isArray(f)){if(f.id===void 0){let h={instancePath:a+"/messages/"+o,schemaPath:"#/$defs/message/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property \'id\'"};e===null?e=[h]:e.push(h),n++}if(f.kind===void 0){let h={instancePath:a+"/messages/"+o,schemaPath:"#/$defs/message/required",keyword:"required",params:{missingProperty:"kind"},message:"must have required property \'kind\'"};e===null?e=[h]:e.push(h),n++}if(f.author===void 0){let h={instancePath:a+"/messages/"+o,schemaPath:"#/$defs/message/required",keyword:"required",params:{missingProperty:"author"},message:"must have required property \'author\'"};e===null?e=[h]:e.push(h),n++}if(f.body===void 0){let h={instancePath:a+"/messages/"+o,schemaPath:"#/$defs/message/required",keyword:"required",params:{missingProperty:"body"},message:"must have required property \'body\'"};e===null?e=[h]:e.push(h),n++}if(f.createdAt===void 0){let h={instancePath:a+"/messages/"+o,schemaPath:"#/$defs/message/required",keyword:"required",params:{missingProperty:"createdAt"},message:"must have required property \'createdAt\'"};e===null?e=[h]:e.push(h),n++}for(let h in f)if(!(h==="id"||h==="kind"||h==="author"||h==="body"||h==="feedbackItemId"||h==="evidenceRefs"||h==="createdAt")){let m={instancePath:a+"/messages/"+o,schemaPath:"#/$defs/message/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[m]:e.push(m),n++}if(f.id!==void 0){let h=f.id;if(typeof h=="string"){if(nt(h)>256){let m={instancePath:a+"/messages/"+o+"/id",schemaPath:"#/$defs/message/properties/id/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[m]:e.push(m),n++}if(!gd.test(h)){let m={instancePath:a+"/messages/"+o+"/id",schemaPath:"#/$defs/message/properties/id/pattern",keyword:"pattern",params:{pattern:"^message[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^message[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[m]:e.push(m),n++}}else{let m={instancePath:a+"/messages/"+o+"/id",schemaPath:"#/$defs/message/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),n++}}if(f.kind!==void 0){let h=f.kind;if(!(h==="human-note"||h==="agent-answer"||h==="system")){let m={instancePath:a+"/messages/"+o+"/kind",schemaPath:"#/$defs/message/properties/kind/enum",keyword:"enum",params:{allowedValues:ml.properties.kind.enum},message:"must be equal to one of the allowed values"};e===null?e=[m]:e.push(m),n++}}if(f.author!==void 0){let h=f.author;if(h&&typeof h=="object"&&!Array.isArray(h)){if(h.type===void 0){let m={instancePath:a+"/messages/"+o+"/author",schemaPath:"#/$defs/message/properties/author/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property \'type\'"};e===null?e=[m]:e.push(m),n++}if(h.label===void 0){let m={instancePath:a+"/messages/"+o+"/author",schemaPath:"#/$defs/message/properties/author/required",keyword:"required",params:{missingProperty:"label"},message:"must have required property \'label\'"};e===null?e=[m]:e.push(m),n++}for(let m in h)if(!(m==="type"||m==="label")){let w={instancePath:a+"/messages/"+o+"/author",schemaPath:"#/$defs/message/properties/author/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[w]:e.push(w),n++}if(h.type!==void 0){let m=h.type;if(!(m==="human"||m==="agent"||m==="system")){let w={instancePath:a+"/messages/"+o+"/author/type",schemaPath:"#/$defs/message/properties/author/properties/type/enum",keyword:"enum",params:{allowedValues:ml.properties.author.properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[w]:e.push(w),n++}}if(h.label!==void 0&&typeof h.label!="string"){let m={instancePath:a+"/messages/"+o+"/author/label",schemaPath:"#/$defs/message/properties/author/properties/label/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),n++}}else{let m={instancePath:a+"/messages/"+o+"/author",schemaPath:"#/$defs/message/properties/author/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),n++}}if(f.body!==void 0){let h=f.body;if(typeof h=="string"){if(nt(h)>16384){let m={instancePath:a+"/messages/"+o+"/body",schemaPath:"#/$defs/message/properties/body/maxLength",keyword:"maxLength",params:{limit:16384},message:"must NOT have more than 16384 characters"};e===null?e=[m]:e.push(m),n++}if(nt(h)<1){let m={instancePath:a+"/messages/"+o+"/body",schemaPath:"#/$defs/message/properties/body/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[m]:e.push(m),n++}}else{let m={instancePath:a+"/messages/"+o+"/body",schemaPath:"#/$defs/message/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),n++}}if(f.feedbackItemId!==void 0){let h=f.feedbackItemId;if(typeof h=="string"){if(nt(h)>256){let m={instancePath:a+"/messages/"+o+"/feedbackItemId",schemaPath:"#/$defs/message/properties/feedbackItemId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[m]:e.push(m),n++}if(!_d.test(h)){let m={instancePath:a+"/messages/"+o+"/feedbackItemId",schemaPath:"#/$defs/message/properties/feedbackItemId/pattern",keyword:"pattern",params:{pattern:"^item[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^item[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[m]:e.push(m),n++}}else{let m={instancePath:a+"/messages/"+o+"/feedbackItemId",schemaPath:"#/$defs/message/properties/feedbackItemId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),n++}}if(f.evidenceRefs!==void 0){let h=f.evidenceRefs;if(Array.isArray(h)){if(h.length>100){let V={instancePath:a+"/messages/"+o+"/evidenceRefs",schemaPath:"#/$defs/message/properties/evidenceRefs/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[V]:e.push(V),n++}let m=h.length;for(let V=0;V<m;V++)if(typeof h[V]!="string"){let q={instancePath:a+"/messages/"+o+"/evidenceRefs/"+V,schemaPath:"#/$defs/message/properties/evidenceRefs/items/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[q]:e.push(q),n++}let w=h.length,$;if(w>1){let V={};for(;w--;){let q=h[w];if(typeof q=="string"){if(typeof V[q]=="number"){$=V[q];let B={instancePath:a+"/messages/"+o+"/evidenceRefs",schemaPath:"#/$defs/message/properties/evidenceRefs/uniqueItems",keyword:"uniqueItems",params:{i:w,j:$},message:"must NOT have duplicate items (items ## "+$+" and "+w+" are identical)"};e===null?e=[B]:e.push(B),n++;break}V[q]=w}}}}else{let m={instancePath:a+"/messages/"+o+"/evidenceRefs",schemaPath:"#/$defs/message/properties/evidenceRefs/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[m]:e.push(m),n++}}if(f.createdAt!==void 0){let h=f.createdAt;if(typeof h=="string"){if(!na.validate(h)){let m={instancePath:a+"/messages/"+o+"/createdAt",schemaPath:"#/$defs/message/properties/createdAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[m]:e.push(m),n++}}else{let m={instancePath:a+"/messages/"+o+"/createdAt",schemaPath:"#/$defs/message/properties/createdAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),n++}}}else{let h={instancePath:a+"/messages/"+o,schemaPath:"#/$defs/message/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),n++}}}else{let i={instancePath:a+"/messages",schemaPath:"#/properties/messages/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),n++}}if(r.agentAttention!==void 0){let l=r.agentAttention;if(l&&typeof l=="object"&&!Array.isArray(l)){if(l.state===void 0){let i={instancePath:a+"/agentAttention",schemaPath:"#/properties/agentAttention/required",keyword:"required",params:{missingProperty:"state"},message:"must have required property \'state\'"};e===null?e=[i]:e.push(i),n++}for(let i in l)if(!(i==="state"||i==="batchId"||i==="updatedAt")){let o={instancePath:a+"/agentAttention",schemaPath:"#/properties/agentAttention/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[o]:e.push(o),n++}if(l.state!==void 0){let i=l.state;if(!(i==="none"||i==="requested"||i==="batched"||i==="submitted"||i==="acknowledged"||i==="answered"||i==="stale")){let o={instancePath:a+"/agentAttention/state",schemaPath:"#/properties/agentAttention/properties/state/enum",keyword:"enum",params:{allowedValues:Qs.properties.agentAttention.properties.state.enum},message:"must be equal to one of the allowed values"};e===null?e=[o]:e.push(o),n++}}if(l.batchId!==void 0){let i=l.batchId;if(typeof i=="string"){if(nt(i)>256){let o={instancePath:a+"/agentAttention/batchId",schemaPath:"#/properties/agentAttention/properties/batchId/maxLength",keyword:"maxLength",params:{limit:256},message:"must NOT have more than 256 characters"};e===null?e=[o]:e.push(o),n++}if(!yd.test(i)){let o={instancePath:a+"/agentAttention/batchId",schemaPath:"#/properties/agentAttention/properties/batchId/pattern",keyword:"pattern",params:{pattern:"^fb[-:][A-Za-z0-9._:-]+$"},message:\'must match pattern "^fb[-:][A-Za-z0-9._:-]+$"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/agentAttention/batchId",schemaPath:"#/properties/agentAttention/properties/batchId/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}if(l.updatedAt!==void 0){let i=l.updatedAt;if(typeof i=="string"){if(!na.validate(i)){let o={instancePath:a+"/agentAttention/updatedAt",schemaPath:"#/properties/agentAttention/properties/updatedAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[o]:e.push(o),n++}}else{let o={instancePath:a+"/agentAttention/updatedAt",schemaPath:"#/properties/agentAttention/properties/updatedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),n++}}}else{let i={instancePath:a+"/agentAttention",schemaPath:"#/properties/agentAttention/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),n++}}if(r.createdAt!==void 0){let l=r.createdAt;if(typeof l=="string"){if(!na.validate(l)){let i={instancePath:a+"/createdAt",schemaPath:"#/properties/createdAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[i]:e.push(i),n++}}else{let i={instancePath:a+"/createdAt",schemaPath:"#/properties/createdAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}}if(r.updatedAt!==void 0){let l=r.updatedAt;if(typeof l=="string"){if(!na.validate(l)){let i={instancePath:a+"/updatedAt",schemaPath:"#/properties/updatedAt/format",keyword:"format",params:{format:"date-time"},message:\'must match format "date-time"\'};e===null?e=[i]:e.push(i),n++}}else{let i={instancePath:a+"/updatedAt",schemaPath:"#/properties/updatedAt/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),n++}}}else{let l={instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),n++}return Pd.errors=e,n===0}const Kh={"review-bundle":Dh,"review-event":Bh,"review-state":Zh,"review-thread":Uh};function Jh(r){return`${r.instancePath||"/"} ${r.message??"is invalid"}`}function mn(r){return Array.isArray(r)?`[${r.map(mn).join(",")}]`:r&&typeof r=="object"?`{${Object.entries(r).sort(([a],[s])=>a.localeCompare(s)).map(([a,s])=>`${JSON.stringify(a)}:${mn(s)}`).join(",")}}`:JSON.stringify(r)??"null"}function Is(r,a){const s=Kh[r],d=s(a);return{ok:!!d,errors:d?[]:(s.errors??[]).map(Jh)}}function kd(r){const a=Is("review-bundle",r);if(!a.ok)return a;const s=r,d=[],p=Is("review-state",s.state);d.push(...p.errors.map(h=>`state${h}`));for(const[h,m]of s.threads.entries()){const w=Is("review-thread",m);d.push(...w.errors.map($=>`threads/${h}${$}`))}for(const[h,m]of s.events.entries()){const w=Is("review-event",m);d.push(...w.errors.map($=>`events/${h}${$}`))}if(d.length>0)return{ok:!1,errors:d};s.state.reportId!==s.source.reportId&&d.push("state.reportId does not match source.reportId"),s.state.reportFingerprint!==s.source.reportFingerprint&&d.push("state.reportFingerprint does not match source.reportFingerprint");const e=s.threads.map(h=>h.id);new Set(e).size!==e.length&&d.push("threads contains duplicate IDs"),[...new Set(s.state.threadIds)].sort().join(`\n`)!==[...new Set(e)].sort().join(`\n`)&&d.push("state.threadIds does not match bundled threads");const n=new Set(s.state.orphanedThreadIds);for(const h of s.threads){h.reportId!==s.source.reportId&&d.push(`${h.id} reportId does not match source.reportId`),h.state==="orphaned"!==n.has(h.id)&&d.push(`${h.id} orphaned state is inconsistent`);for(const[m,w]of h.messages.entries()){const $=new TextEncoder().encode(w.body).byteLength;w.body.trim()||d.push(`${h.id}.messages/${m} body is empty`),$>16*1024&&d.push(`${h.id}.messages/${m} body exceeds 16 KiB`)}}for(const h of n)e.includes(h)||d.push(`orphaned thread is missing: ${h}`);const l=s.events.map(h=>h.id);new Set(l).size!==l.length&&d.push("events contains duplicate IDs");for(const[h,m]of s.events.entries())m.sequence!==h+1&&d.push(`events/${h} sequence is not contiguous`),m.reportId!==s.source.reportId&&d.push(`events/${h} reportId does not match source.reportId`);const i=s.anchorCatalog.map(h=>`${h.type}\\0${h.ref}`);new Set(i).size!==i.length&&d.push("anchorCatalog contains duplicate type/ref pairs");const o=new Map(s.anchorCatalog.map(h=>[`${h.type}\\0${h.ref}`,h])),f=(h,m)=>{const w=o.get(`${m.type}\\0${m.ref}`);(!w||mn(w)!==mn(m))&&d.push(`${h} does not match anchorCatalog`)};for(const[h,m]of Object.entries(s.state.viewed))h!==JSON.stringify([m.anchor.type,m.anchor.ref])&&d.push(`state.viewed key does not match its anchor: ${h}`),f(`state.viewed/${h}.anchor`,m.anchor);for(const[h,m]of s.threads.entries())f(`threads/${h}.anchor`,m.anchor);for(const[h,m]of s.events.entries())m.anchor&&f(`events/${h}.anchor`,m.anchor);return{ok:d.length===0,errors:d}}const xd=4*1024*1024;function ze(r,a){const s=new Error(a);return s.name=r,s}function je(r){return structuredClone(r)}function Ad(r){return`utsuri:review:v1:${encodeURIComponent(r)}`}function Id(r){if(new TextEncoder().encode(r).byteLength>xd)throw ze("REVIEW_BROWSER_LIMIT","Stored review state exceeds 4 MiB");const a=JSON.parse(r),s=[a];for(;s.length>0;){const d=s.pop();if(!(!d||typeof d!="object"))if(Array.isArray(d))s.push(...d);else for(const[p,e]of Object.entries(d)){if(new Set(["__proto__","constructor","prototype"]).has(p))throw ze("REVIEW_BROWSER_KEY","Stored review state has a forbidden key");s.push(e)}}return a}function Yh(r){if(!r||typeof r!="object"||Array.isArray(r))return!1;const a=r;return a.schemaVersion==="1.0"&&typeof a.reportFingerprint=="string"&&!!(a.state&&typeof a.state=="object")&&Array.isArray(a.threads)&&Array.isArray(a.events)}function Gn(r,a){const s=Is(r,a);if(!s.ok)throw ze("REVIEW_BROWSER_INVALID",`${r}: ${s.errors.join("; ")}`)}function Gh(r){for(const a of r)for(const s of a.messages){if(!s.body.trim())throw ze("REVIEW_BROWSER_INVALID","Stored review comment body is empty");if(new TextEncoder().encode(s.body).byteLength>16*1024)throw ze("REVIEW_BROWSER_INVALID","Stored review comment exceeds 16 KiB")}}function yn(r){Gn("review-state",r.state);for(const p of r.threads)Gn("review-thread",p);for(const p of r.events)Gn("review-event",p);if(Gh(r.threads),r.state.schemaVersion!=="1.3"||r.state.reportId!==r.report.reportId||r.state.reportFingerprint.length!==64||r.state.revision!==r.events.length)throw ze("REVIEW_BROWSER_INVALID","Stored review state is inconsistent");if(new Set(r.state.threadIds).size!==r.state.threadIds.length)throw ze("REVIEW_BROWSER_INVALID","Stored review threads are duplicated");const a=new Set(r.threads.map(p=>p.id));if(a.size!==r.threads.length||r.state.threadIds.length!==r.threads.length||r.state.threadIds.some(p=>!a.has(p)))throw ze("REVIEW_BROWSER_INVALID","Stored review thread inventory is inconsistent");const s=new Set(r.state.orphanedThreadIds);for(const p of r.threads)if(p.reportId!==r.report.reportId||p.state==="orphaned"!==s.has(p.id))throw ze("REVIEW_BROWSER_INVALID","Stored review thread identity is inconsistent");const d=new Set;for(const[p,e]of r.events.entries()){if(d.has(e.id)||e.sequence!==p+1||e.reportId!==r.report.reportId)throw ze("REVIEW_BROWSER_INVALID","Stored review event sequence is invalid");d.add(e.id)}}async function $d(r,a){const s=Id(a);if(!Yh(s))throw ze("REVIEW_BROWSER_INVALID","Stored review state has an invalid shape");if(s.reportFingerprint!==r.state.reportFingerprint||s.state.reportFingerprint!==s.reportFingerprint)throw ze("REVIEW_BROWSER_STALE","Stored review state belongs to an older report; export it before re-anchoring");const d=fd(s,r.anchorCatalog,await hd(r.report,zr),!0);return yn({...r,state:je(d.state),threads:je(d.threads),events:je(d.events)}),d}function Qh(){const r=globalThis.navigator?.locks;if(!r)throw ze("REVIEW_BROWSER_LOCK_UNAVAILABLE","Concurrent-safe review storage requires utsuri serve in a browser with Web Locks support");return r}function is(r,a){return{...je(r.state),revision:r.state.revision+1,updatedAt:a}}async function os(r,a,s){const d=r.events.length+1,p={reportId:r.report.reportId,sequence:d,createdAt:a,...s};return{schemaVersion:"1.0",id:`event:${(await zr(p)).slice(0,24)}`,...p}}async function qd(r,a){const s=await zr(r);return{report:je(r),state:{schemaVersion:"1.3",reportId:r.reportId,reportFingerprint:s,revision:0,updatedAt:a,viewed:{},judgments:Object.fromEntries(r.changes.map(d=>[d.id,{changeId:d.id,state:"unreviewed",updatedAt:a}])),threadIds:[],orphanedThreadIds:[]},threads:[],events:[],anchorCatalog:await Th(r,zr),sidecarFiles:{}}}async function Xh(r){const a=await qd(r,new Date().toISOString()),s=localStorage.getItem(Ad(r.reportId));if(!s)return a;const d=await $d(a,s),p={...a,state:je(d.state),threads:je(d.threads),events:je(d.events)};return yn(p),p}async function ef(r,a=r.state.revision-1){if(yn(r),a<0||r.state.revision!==a+1)throw ze("REVIEW_REVISION_INVALID","Review mutation must advance one revision");const s={schemaVersion:"1.0",reportFingerprint:r.state.reportFingerprint,state:je(r.state),threads:je(r.threads),events:je(r.events)},d=JSON.stringify(s);if(new TextEncoder().encode(d).byteLength>xd)throw ze("REVIEW_BROWSER_LIMIT","Review state is near browser-storage limits; export it before adding more comments");const p=Ad(r.report.reportId);await Qh().request(`${p}:write`,{mode:"exclusive"},async()=>{const e=localStorage.getItem(p);if((e?(await $d(r,e)).state.revision:0)!==a)throw ze("REVIEW_REVISION_CONFLICT","Review state changed in another tab; reload before retrying this edit");localStorage.setItem(p,d)})}async function tf(r,a,s,d=new Date().toISOString()){const p=is(r,d);p.viewed[Br(a)]={anchor:je(a),state:s,updatedAt:d};const e=await os(r,d,{type:"viewed.changed",anchor:je(a),viewState:s});return{...r,state:p,events:[...r.events,e]}}async function rf(r,a,s,d=new Date().toISOString()){if(!r.report.changes.some(n=>n.id===a))throw ze("REVIEW_CHANGE_MISSING","Review change does not exist");const p=is(r,d);p.judgments[a]={changeId:a,state:s,updatedAt:d};const e=await os(r,d,{type:"judgment.changed",changeId:a,judgmentState:s});return{...r,state:p,events:[...r.events,e]}}async function af(r,a,s,d,p=new Date().toISOString(),e=!1){const n=s.trim();if(!n)throw ze("REVIEW_COMMENT_EMPTY","Review comments must not be empty");if(new TextEncoder().encode(n).byteLength>16*1024)throw ze("REVIEW_COMMENT_LIMIT","Review comment exceeds 16 KiB");const l=`thread:${(await zr({reportId:r.report.reportId,anchor:a,kind:d,normalized:n,createdAt:p})).slice(0,24)}`,i=`message:${(await zr({threadId:l,normalized:n,createdAt:p})).slice(0,24)}`,o={id:l,reportId:r.report.reportId,anchor:je(a),kind:d,state:"open",messages:[{id:i,kind:"human-note",author:{type:"human",label:"Reviewer"},body:n,createdAt:p}],agentAttention:e?{state:"requested",updatedAt:p}:{state:"none"},createdAt:p,updatedAt:p},f=is(r,p);f.threadIds=[...f.threadIds,l];const h=await os(r,p,{type:"thread.created",anchor:je(a),threadId:l,messageId:i,attentionState:e?"requested":"none"});return{...r,state:f,threads:[...r.threads,o],events:[...r.events,h]}}async function sf(r,a,s,d=new Date().toISOString()){const p=r.threads.findIndex(f=>f.id===a);if(p===-1)throw ze("REVIEW_THREAD_MISSING","Review thread does not exist");const e=r.threads[p];if(new Set(["stale","orphaned","resolved"]).has(e.state))throw ze("REVIEW_THREAD_NOT_CURRENT","Stale, orphaned, or resolved comments cannot request Agent attention");const n=s?"requested":"none";if(e.agentAttention.state!=="none"&&e.agentAttention.state!=="requested")throw ze("REVIEW_ATTENTION_SUBMITTED","Submitted Agent attention cannot be changed");if(e.agentAttention.state===n)return r;const l=je(r.threads);l[p]={...l[p],agentAttention:{state:n,updatedAt:d},updatedAt:d};const i=is(r,d),o=await os(r,d,{type:"agent-attention.changed",threadId:a,attentionState:n});return{...r,state:i,threads:l,events:[...r.events,o]}}async function nf(r,a,s=new Date().toISOString()){const d=r.threads.findIndex(i=>i.id===a);if(d===-1)throw ze("REVIEW_THREAD_MISSING","Review thread does not exist");const p=r.threads[d];if(p.state==="stale"||p.state==="orphaned")throw ze("REVIEW_THREAD_NOT_CURRENT","Stale or orphaned comments cannot be resolved");const e=je(r.threads);e[d]={...e[d],state:"resolved",updatedAt:s};const n=is(r,s),l=await os(r,s,{type:"thread.resolved",threadId:a});return{...r,state:n,threads:e,events:[...r.events,l]}}function of(r){const a=new Map(r.anchorCatalog.map(s=>[Br(s),je(s)]));for(const s of Object.values(r.state.viewed))a.set(Br(s.anchor),je(s.anchor));for(const s of r.threads)a.set(Br(s.anchor),je(s.anchor));return[...a.values()].sort((s,d)=>Br(s).localeCompare(Br(d)))}function lf(r,a,s=new Date().toISOString()){const d={schemaVersion:"1.0",source:{reportId:r.report.reportId,reportFingerprint:r.state.reportFingerprint,base:a.base,head:a.head},state:je(r.state),threads:je(r.threads),events:je(r.events),anchorCatalog:of(r),exportedAt:s},p=kd(d);if(!p.ok)throw ze("REVIEW_BUNDLE_INVALID",p.errors.join("; "));return d}async function df(r,a,s={}){const d=s.importedAt??new Date().toISOString(),p=JSON.stringify(a),e=Id(p),n=e&&typeof e=="object"&&!Array.isArray(e)&&"source"in e?e.source:null,l=!!(n&&typeof n=="object"&&!Array.isArray(n)&&"reportId"in n&&"reportFingerprint"in n&&n.reportId===r.report.reportId&&n.reportFingerprint===r.state.reportFingerprint),i=fd(e,r.anchorCatalog,await hd(r.report,zr),l),o=kd(i);if(!o.ok)throw ze("REVIEW_BUNDLE_INVALID",o.errors.join("; "));const f=i;if(!l&&!s.reanchor)throw ze("REVIEW_REPORT_MISMATCH","Review bundle belongs to another report; explicitly enable re-anchoring to import it");const h=[],m=[],w=is(r,d);for(const[te,re]of Object.entries(f.state.viewed)){const ne=Wn(re.anchor,r.anchorCatalog);m.push(ne);const fe=ne.result==="exact"?ne.candidate:re.anchor,me=ne.result==="exact"?Br(fe):te,ve={anchor:je(fe),state:ne.result==="exact"?re.state:"stale",updatedAt:d},ye=w.viewed[me];ye&&Sa(ye)!==Sa(ve)?h.push({kind:"viewed",id:me,current:ye,incoming:ve}):w.viewed[me]=ve}const $=new Map(f.anchorCatalog.filter(te=>te.type==="change").map(te=>[te.ref,te]));for(const[te,re]of Object.entries(f.state.judgments)){const ne=$.get(te),fe=ne?Wn(ne,r.anchorCatalog):void 0;fe&&m.push(fe);const me=fe?.result==="exact"?fe.candidate.ref:te,ve={changeId:me,state:fe?.result==="exact"?re.state:"stale",updatedAt:d},ye=w.judgments[me];ye&&ye.state!=="unreviewed"&&Sa(ye)!==Sa(ve)?h.push({kind:"judgment",id:me,current:ye,incoming:ve}):w.judgments[me]=ve}const V=je(r.threads);for(const te of f.threads){const re=Wn(te.anchor,r.anchorCatalog);m.push(re);const ne={...je(te),reportId:r.report.reportId,anchor:re.result==="exact"?je(re.candidate):je(te.anchor),state:re.result==="exact"?te.state:re.result==="missing"?"orphaned":"stale",updatedAt:d},fe=V.find(me=>me.id===ne.id);fe&&Sa(fe)!==Sa(ne)?h.push({kind:"thread",id:ne.id,current:fe,incoming:ne}):fe||V.push(ne)}w.threadIds=V.map(te=>te.id),w.orphanedThreadIds=V.filter(te=>te.state==="orphaned").map(te=>te.id);const q=await os(r,d,{type:"state.imported",sourceReportId:f.source.reportId}),B={...r,state:w,threads:V,events:[...r.events,q]};return yn(B),{store:B,reanchored:m,conflicts:h}}const pf=512*1024;function ws(r,a,s){const d=[/\\bBearer\\s+[A-Za-z0-9._~+/=-]{8,}\\b/giu,/\\b(?:api[_-]?key|access[_-]?token|auth[_-]?token|token|password|passwd|secret)\\b\\s*[:=]\\s*[^\\s,;]+/giu,/\\bAKIA[0-9A-Z]{16}\\b/gu,/\\b(?:gh[pousr]_[A-Za-z0-9_]{20,}|github_pat_[A-Za-z0-9_]{20,}|sk-[A-Za-z0-9_-]{12,})\\b/gu];let p=r;for(const e of d)e.test(p)&&(s.push({category:"secret-pattern",ref:a}),p=p.replace(e,"[REDACTED]")),e.lastIndex=0;return p}function uf(r,a){const s=a.anchor;return s.type==="change"?r.changes.find(d=>d.id===s.ref):s.type==="hunk"||s.type==="line-range"?r.changes.find(d=>d.hunkRefs.some(p=>s.ref===p||s.ref.startsWith(`${p}:`))):s.type==="visual-target"||s.type==="visual-region"?r.changes.find(d=>d.targetRefs.includes(s.targetRef??s.ref)):s.type==="finding"?r.changes.find(d=>d.findingRefs.includes(s.ref)):r.changes.find(d=>s.ref.startsWith(`${d.id}:gap:`))}function cf(r,a,s){return a.anchor.type==="hunk"||a.anchor.type==="line-range"?r.hunks.filter(d=>a.anchor.ref===d.id||a.anchor.ref.startsWith(`${d.id}:`)):s?r.hunks.filter(d=>s.hunkRefs.includes(d.id)):[]}function hf(r,a){const s=a.anchor.targetRef??(a.anchor.type==="visual-target"?a.anchor.ref:void 0);if(!s)return[];const d=a.anchor.type==="visual-region"?a.anchor.region:void 0;return r.comparisons.filter(p=>p.targetRef===s).flatMap(p=>p.images.flatMap(e=>[{role:"before",assetRef:e.beforeRef,...d?{crop:d}:{}},{role:"after",assetRef:e.afterRef,...d?{crop:d}:{}},{role:"diff",assetRef:e.diffRef,...d?{crop:d}:{}}])).slice(0,10)}async function ff(r,a=new Date().toISOString()){const s=r.threads.filter(i=>i.agentAttention.state==="requested"&&!new Set(["stale","orphaned","resolved"]).has(i.state));if(s.length===0)throw new Error("No current comments request Agent attention");if(s.length>20)throw new Error("Feedback Batch exceeds 20 items");const d=`fb:${(await zr({reportId:r.report.reportId,threads:s.map(i=>i.id),createdAt:a})).slice(0,24)}`,p=await Promise.all(s.map(async i=>{const o=[...i.messages].reverse().find(h=>h.author.type==="human");if(!o)throw new Error("Feedback thread has no human source message");const f=i.anchor.type==="visual-target"||i.anchor.type==="visual-region";return{id:`item:${(await zr({batchId:d,threadId:i.id,messageId:o.id})).slice(0,24)}`,threadId:i.id,anchor:structuredClone(i.anchor),sourceMessageId:o.id,requestKind:i.kind==="question"?"explain":"freeform",question:o.body,contextSelection:{includeCodeDiff:!f,includeVisualCrop:f,includeComputedStyle:!1,includeDomAria:!1,includeRelatedTests:!1},state:"ready"}})),e=structuredClone(r.report.origin),n=[];for(const[i,o]of p.entries()){const f=s[i],h=uf(r.report,f),m=[],w=cf(r.report,f,h),$={schemaVersion:"1.1",reportId:r.report.reportId,batchId:d,itemId:o.id,baseSha:"",headSha:"",anchor:structuredClone(o.anchor),question:ws(o.question,`item:${o.id}:question`,m),...h?{semanticChange:{id:h.id,title:ws(h.title,`change:${h.id}:title`,m),summary:ws(h.summary,`change:${h.id}:summary`,m),intent:{text:ws(h.intent.text,`change:${h.id}:intent`,m),source:h.intent.source,evidenceRefs:[...h.intent.evidenceRefs]},risk:structuredClone(h.risk)}}:{},code:o.contextSelection.includeCodeDiff?w.map(q=>({path:q.path,startLine:Math.max(1,q.newStart||q.oldStart),endLine:Math.max(1,(q.newStart||q.oldStart)+Math.max(q.newLines,q.oldLines)-1),textRef:q.id})):[],images:o.contextSelection.includeVisualCrop?hf(r.report,f):[],evidenceRefs:h?[...h.intent.evidenceRefs]:[],priorThreadMessages:f.messages.map(q=>({role:q.author.type==="agent"?"agent":"human",text:ws(q.body,`message:${q.id}`,m)})),redactions:m},V={...$,contextHash:await zr($)};if(new TextEncoder().encode(JSON.stringify(V)).byteLength>pf)throw new Error("Context Pack exceeds 512 KiB");n.push(V)}return{batch:{id:d,reportId:r.report.reportId,origin:e,items:p.map((i,o)=>({...i,question:n[o].question})),state:"ready",deliveryMode:"export-only",contextHash:await zr(n.map(i=>i.contextHash)),createdAt:a},contexts:n,shared:{comments:p.length,codeRanges:n.reduce((i,o)=>i+o.code.length,0),imageCrops:n.reduce((i,o)=>i+o.images.length,0),evidenceReferences:n.reduce((i,o)=>i+o.evidenceRefs.length,0)},excluded:["raw DOM and ARIA artifacts","environment variables","files outside the report","related tests"],redactionCount:n.reduce((i,o)=>i+o.redactions.length,0),contextBytes:n.reduce((i,o)=>i+new TextEncoder().encode(JSON.stringify(o)).byteLength,0),warnings:["Static mode exports files; it cannot submit to an Origin Session"],destination:{host:e.host,bound:!!e.sessionRef,deliveryMode:"export-only"}}}var Xs=z("<span> </span>"),mf=z(\'<li><a><span class="queue-index"> </span> <span class="queue-copy"><strong> </strong> <span class="badges"><span> </span> <!></span></span></a></li>\'),vf=z(\'<section class="queue-section"><h3><span> </span> <span class="count"> </span></h3> <ol></ol></section>\'),gf=z(\'<li><a><span class="queue-index"> </span> <span class="queue-copy"><strong> </strong><span> </span></span></a></li>\'),yf=z(\'<section class="queue-section unclassified"><h3><span> </span><span class="count"> </span></h3> <ol></ol></section>\'),_f=z(\'<p class="review-overview"> </p>\'),wf=z(\'<p class="route-status"> </p> <h3> </h3> <p> </p> <button type="button"> <span aria-hidden="true">→</span></button>\',1),qa=z("<p> </p>"),bf=z(\'<li><button type="button"><span class="map-index"> </span> <span class="map-copy"><strong> </strong> <span> </span></span> <span class="map-meta"> <span aria-hidden="true">·</span> </span></button></li>\'),Pf=z(\'<li class="map-remainder"> </li>\'),kf=z(\'<section class="review-map" aria-labelledby="review-map-heading"><header><div><p class="kicker">Map / semantic</p> <h2 id="review-map-heading"> </h2></div> <p> </p></header> <ol><!> <!></ol></section>\'),xf=z(\'<label class="viewed-control compact-control"><input type="checkbox"/> <span> </span></label>\'),Af=z(\'<li><span class="file-status"> </span> <code> </code> <span> </span> <!></li>\'),en=z("<option> </option>"),If=z(\'<div class="review-controls"><label><span> </span> <select><!><!></select></label> <label class="viewed-control"><input type="checkbox"/> <span> </span></label> <button type="button"> </button></div> <p class="local-only-note"> </p>\',1),$f=z(\'<p class="review-message" role="alert"> </p>\'),qf=z(\'<p class="review-message" role="status"> </p>\'),Qn=z("<li> </li>"),Rf=z("<ul></ul>"),Sf=z(\'<button type="button" class="inline-comment-action"> </button>\'),Ef=z("<li><span> </span> <!></li>"),Nf=z("<label><span>Target</span> <select></select></label>"),Cf=z("<label><span> </span> <select></select></label>"),Lf=z(\'<label class="viewed-control visual-viewed-control"><input type="checkbox"/> <span> </span></label>\'),jf=z(\'<div class="persistent-error" role="alert"><strong>INCOMPLETE</strong> <span> </span></div>\'),vl=z(\'<span aria-hidden="true"> </span>\'),bs=z(\'<button class="visual-comment-pin" type="button"> </button>\'),Of=z(\'<div class="visual-panes" data-visual-mode="side-by-side"><figure><figcaption> </figcaption> <div class="visual-scroll"><div class="image-stage"><img/></div></div></figure> <figure><figcaption> </figcaption> <div class="visual-scroll"><div class="image-stage"><img/> <!> <!></div></div></figure></div>\'),Tf=z(\'<label class="wipe-control"><span> </span> <input type="range" min="0" max="100"/></label> <figure class="single-visual"><figcaption> </figcaption> <div class="visual-scroll"><div class="image-stage"><img/> <img class="wipe-after"/> <!></div></div></figure>\',1),zf=z(\'<figure class="single-visual"><figcaption> </figcaption> <div class="visual-scroll"><div class="image-stage"><img/> <img/> <!></div></div></figure>\'),Mf=z(\'<figure class="single-visual pixel-diff-view"><figcaption> </figcaption> <div class="visual-scroll"><div class="image-stage"><img/> <!></div></div></figure>\'),Vf=z(\'<figure class="single-visual"><figcaption> </figcaption> <div class="visual-scroll"><div class="image-stage"><img/> <!> <!></div></div></figure>\'),Ra=z(\'<button type="button"> </button>\'),Ff=z(\'<li><div class="region-actions"><button type="button"> </button> <!></div></li>\'),gl=z("<ol></ol>"),Df=z(\'<dl class="visual-metrics"><div><dt>Pixels changed</dt> <dd> </dd></div> <div><dt>Pixel ratio</dt> <dd> </dd></div> <div><dt> </dt> <dd> </dd></div> <div><dt>Canvas</dt> <dd> </dd></div></dl> <!> <section class="region-list" aria-labelledby="region-heading"><h4 id="region-heading"> </h4> <!></section>\',1),Bf=z(\'<div class="visual-selectors"><!> <!> <!> <label class="visual-slider"><span> </span> <input type="range" min="50" max="200" step="10"/></label></div> <div class="visual-mode-control" role="group"><button type="button"> </button> <button type="button"> </button> <button type="button"> </button> <button type="button"> </button> <button type="button"> </button></div> <!> <!>\',1),Hf=z(\'<div class="verification-gap" role="status"><strong>UNCOVERED</strong> <span> </span></div>\'),Wf=z(\'<li><article tabindex="-1"><div class="finding-badges"><span> </span><span> </span><span> </span></div> <h5> </h5> <p> </p> <!> <!></article></li>\'),Zf=z("<li><span> </span><strong> </strong> <p> </p></li>"),Uf=z("<li><strong> </strong> </li>"),Kf=z(\'<details class="more-evidence"><summary> </summary> <ul></ul></details>\'),Jf=z(\'<label class="viewed-control dark-control"><input type="checkbox"/> <span> </span></label> <button type="button"> </button>\',1),Yf=z(\'<dl class="hunk-explanation"><div><dt> </dt> <dd> </dd></div> <div><dt> </dt> <dd> </dd></div></dl>\'),yl=z(\'<button class="context-fold" type="button"> </button>\'),_l=z(\'<button class="line-comment" type="button">✎</button>\'),Gf=z(\'<div role="group"><span class="line-number" aria-hidden="true"> </span> <span class="line-number" aria-hidden="true"> </span> <span class="line-sign" aria-hidden="true"> </span> <code></code> <!></div>\'),wl=z("<code></code>"),Qf=z(\'<div class="split-row" role="group"><div><span class="line-number" aria-hidden="true"> </span> <span class="line-sign" aria-hidden="true"> </span> <!></div> <div><span class="line-number" aria-hidden="true"> </span> <span class="line-sign" aria-hidden="true"> </span> <!></div> <!></div>\'),Xf=z(\'<button class="back-link hunk-back" type="button"> </button>\'),em=z(\'<section tabindex="-1"><header><div><p> </p> <h4> </h4></div> <div class="hunk-actions"><!> <!> <button type="button" class="anchor-button">#</button></div></header> <!> <div role="region"></div> <!></section>\'),tm=z(\'<form class="comment-composer"><div><p class="kicker"> </p> <code> </code></div> <label><span>Kind</span> <select><option>Note</option><option>Question</option><option>Finding</option><option>Change request</option></select></label> <label class="comment-body"><span> </span> <textarea rows="4" maxlength="16384" required=""></textarea></label> <label class="agent-attention-control"><input type="checkbox"/> <span> </span> <small> </small></label> <p> </p> <div class="comment-actions"><button type="submit"> </button> <button type="button"> </button></div></form>\'),rm=z(\'<label class="agent-attention-control compact-attention"><input type="checkbox"/> <span> </span></label>\'),am=z(\'<p class="attention-state"> </p>\'),sm=z(\'<li tabindex="-1"><header><div><span> </span> <strong> </strong></div> <span> </span></header> <code> </code> <!> <!> <!></li>\'),nm=z(\'<ol class="thread-list"></ol>\'),im=z(\'<p class="empty-comments"> </p>\'),om=z(\'<article class="focused-change" tabindex="-1"><button class="back-link" type="button"> </button> <header class="change-header"><div><p class="kicker"> </p> <h2> </h2></div> <div class="change-badges" aria-label="Change status"><span> </span> <span> </span> <span> </span></div></header> <section class="review-workspace" aria-labelledby="review-workspace-heading"><div class="review-workspace-heading"><div><p class="kicker">State / human-owned</p> <h3 id="review-workspace-heading"> </h3> <!></div> <div class="review-transfer-actions"><label><input type="checkbox"/> <span> </span></label> <button type="button"> </button> <button type="button"> </button> <input class="visually-hidden" type="file" accept="application/json,.json"/></div></div> <!> <!> <!></section> <section class="interpretation-section" aria-labelledby="interpretation-heading"><div class="section-heading"><div><p class="kicker">Interpretation / Agent</p> <h3 id="interpretation-heading"> </h3></div></div> <div class="explanation-grid"><section><h3> </h3> <p> </p> <p class="technical"> </p></section> <section><h3> </h3> <p> </p></section> <section><h3> </h3> <!></section> <section class="risk-block"><h3> </h3> <ul></ul></section> <section class="gap-block"><h3> </h3> <ul></ul></section> <section><h3> </h3> <ul></ul></section></div></section> <section class="visual-evidence-section" aria-labelledby="measured-evidence-heading"><div class="section-heading visual-heading"><div><p class="kicker"> </p> <h3 id="measured-evidence-heading"> </h3> <h4 id="visual-evidence-heading" tabindex="-1"> </h4> <p> </p></div></div> <!> <section class="finding-list" aria-labelledby="finding-heading"><div class="section-heading"><div><p class="kicker"> </p> <h4 id="finding-heading"> </h4></div></div> <!></section></section> <section class="evidence-section" aria-labelledby="evidence-heading"><div class="section-heading"><div><p class="kicker"> </p> <h3 id="evidence-heading"> </h3></div></div> <ul class="evidence-list"></ul> <!></section> <section class="diff-section" aria-labelledby="diff-heading"><div class="section-heading"><div><p class="kicker"> </p> <h3 id="diff-heading"> </h3></div> <div class="segmented-control" aria-label="Diff layout"><button type="button"> </button> <button type="button"> </button></div></div> <!></section> <section class="review-comments" aria-labelledby="review-comments-heading"><div class="section-heading"><div><p class="kicker"> </p> <h3 id="review-comments-heading"> </h3></div></div> <!> <!></section></article>\'),lm=z(\'<div class="hunk-actions"><label class="viewed-control dark-control"><input type="checkbox"/> <span> </span></label> <button type="button"> </button></div>\'),dm=z(\'<div><span class="line-number"> </span><span class="line-number"> </span><span class="line-sign"> </span><code> </code></div>\'),pm=z(\'<section class="focused-change unclassified-focus"><button class="back-link" type="button"> </button> <p class="kicker"> </p> <h2> </h2> <section class="hunk active-hunk" tabindex="-1"><header><h3> </h3> <!></header> <div class="diff-table"></div></section></section>\'),um=z(\'<section class="focused-change empty-focus"><h2> </h2></section>\'),cm=z(\'<span class="unread-badge"> </span>\'),hm=z("<li><strong> </strong> <code> </code> <span> </span></li>"),fm=z(\'<p class="feedback-warning"> </p>\'),mm=z("<pre> </pre>"),vm=z(\'<section class="feedback-preview" aria-labelledby="feedback-preview-heading"><h2 id="feedback-preview-heading"> </h2> <ol></ol> <div class="feedback-preview-grid"><section><h3> </h3> <p> </p></section> <section><h3> </h3> <p> </p></section> <section><h3> </h3> <p> </p></section></div> <!> <div class="feedback-actions"><button type="button"> </button> <!></div> <!></section>\'),gm=z(\'<aside class="feedback-dock" aria-live="polite"><header><div><strong> </strong> <!></div> <!></header> <!></aside>\'),ym=z(\'<div class="report-shell"><header class="report-header"><a class="wordmark" href="#summary" aria-label="Utsuri review summary"><span aria-hidden="true">UT</span> <strong>Utsuri</strong></a> <div class="report-state"><span class="state-mark" aria-hidden="true"></span> <span> </span> <small> </small></div> <p class="report-id"> </p></header> <aside class="review-rail" aria-labelledby="queue-heading"><div class="rail-heading"><p class="kicker">Focus / 01</p> <h2 id="queue-heading" tabindex="-1"> </h2></div> <label class="queue-search"><span> </span> <input type="search" autocomplete="off"/></label> <nav><!> <!></nav></aside> <main id="main-content"><section aria-labelledby="summary-heading" class="decision-summary"><div class="brief-lead"><p class="kicker"> </p> <h1 id="summary-heading" tabindex="-1"> </h1> <!> <div class="evidence-posture"><p class="kicker"> </p> <p class="decision-statement"> </p></div></div> <aside class="review-route" aria-labelledby="review-route-heading"><p class="kicker">Next / 01</p> <h2 id="review-route-heading"> </h2> <!></aside> <dl class="metrics"><div><dt> </dt> <dd> </dd></div> <div><dt> </dt> <dd class="positive"> </dd></div> <div><dt> </dt> <dd class="negative"> </dd></div> <div><dt> </dt> <dd> </dd></div> <div><dt> </dt> <dd> </dd></div></dl> <!> <section class="coverage-overview" aria-labelledby="coverage-heading"><div><p class="kicker">Coverage / structured</p> <h2 id="coverage-heading"> </h2> <p> </p></div> <dl><div><dt> </dt> <dd> </dd></div> <div><dt> </dt> <dd> </dd></div> <div><dt> </dt> <dd> </dd></div></dl></section> <details class="file-inventory"><summary> </summary> <ul></ul></details></section> <!></main> <!></div>\'),_m=z(\'<p class="loading" aria-live="polite"> </p>\');function wm(r,a){Nl(a,!1);const s=J(),d=J(),p=J(),e=J(),n={critical:0,high:1,medium:2,low:3,info:4},l={"action-required":0,"needs-confirmation":1,"no-issue":2},i={en:{queue:"Review queue",search:"Filter changes",action:"Action required",confirm:"Needs confirmation",clear:"No issue found",unclassified:"Unclassified hunks",summary:"Review brief",reviewMap:"Change map",reviewerRoute:"Reviewer route",evidencePosture:"Evidence posture",startReview:"Start with highest attention",files:"Files",additions:"Additions",deletions:"Deletions",changes:"Change groups",lowSignal:"Low-signal files",inventory:"File inventory",backQueue:"Back to review queue",what:"What changed",why:"Why",userImpact:"User impact",noImpact:"User impact is not established.",risk:"Risk",gaps:"Not verified",verified:"Verified",evidence:"Evidence",codeDiff:"Code diff",unified:"Unified",split:"Side by side",context:"Show {count} hidden context lines",moreEvidence:"More evidence",measured:"Measured evidence",interpretation:"Agent interpretation",hunkPurpose:"Purpose",hunkMeaning:"Meaning",visualEvidence:"Visual comparison",sideBySide:"Side by side",wipe:"Wipe",blink:"Blink",stopBlink:"Stop blink",pixelDiff:"Pixel diff",afterOnly:"After only",imageScope:"Image scope",zoom:"Zoom",wipePosition:"Wipe position",changedRegions:"Changed regions",noRegions:"No changed pixel regions",findings:"Findings",noFindings:"No linked findings",coverage:"Visual coverage",planned:"Planned targets",captured:"Captured targets",failed:"Failed targets",viewCode:"View linked code",viewVisual:"View visual evidence",reducedMotion:"Blink unavailable because reduced motion is enabled",backChange:"Back to focused change",visualGap:"Visual verification has not run",reviewWorkspace:"Human review",reviewProgress:"Review progress",viewed:"Viewed",humanJudgment:"Human judgment",unreviewed:"Unreviewed",reviewed:"Reviewed",followUp:"Follow-up",blocked:"Blocked",comments:"Comments",comment:"Comment",commentOn:"Comment on",commentBody:"Review note",saveComment:"Save comment",cancel:"Cancel",resolve:"Resolve",resolved:"Resolved",noComments:"No comments for this change",localOnly:"Saved locally. Plain comments are never sent to an Agent.",askAgent:"Ask the current Agent",askAgentHelp:"This only saves the selection. It does not submit or create a conversation.",selectedItems:"Items for Agent review",reviewItems:"Review items",feedbackPreview:"Feedback Batch preview",shared:"Shared",notShared:"Not shared",delivery:"Delivery",returnConversation:"Return to current conversation",prepareRequest:"Prepare review request",copyHandoff:"Copy handoff",handoffCopied:"Handoff copied",unreadAnswers:"Unread answers",exportReview:"Export review",importReview:"Import review",reviewBundleFile:"Review bundle file",reanchorImport:"Re-anchor another report",stale:"Stale",orphaned:"Orphaned",reviewUnavailable:"Review state unavailable",empty:"No semantic changes",dataUnavailable:"Review data unavailable",intentUnknown:"Intent unknown",loading:"Loading review data…"},ja:{queue:"レビューキュー",search:"変更を絞り込む",action:"対応が必要",confirm:"確認が必要",clear:"問題なし",unclassified:"未分類のハンク",summary:"レビュー要旨",reviewMap:"変更の全体像",reviewerRoute:"レビュー経路",evidencePosture:"根拠の状態",startReview:"要確認から見る",files:"ファイル",additions:"追加",deletions:"削除",changes:"変更グループ",lowSignal:"低シグナル",inventory:"ファイル一覧",backQueue:"レビューキューへ戻る",what:"変更内容",why:"変更理由",userImpact:"ユーザー影響",noImpact:"ユーザー影響は未確定です。",risk:"リスク",gaps:"未検証",verified:"検証済み",evidence:"根拠",codeDiff:"コード差分",unified:"統合表示",split:"左右表示",context:"非表示のコンテキスト {count} 行を表示",moreEvidence:"その他の根拠",measured:"計測された根拠",interpretation:"Agent の解釈",hunkPurpose:"目的",hunkMeaning:"この差分の意味",visualEvidence:"画面比較",sideBySide:"左右比較",wipe:"ワイプ",blink:"点滅比較",stopBlink:"点滅を停止",pixelDiff:"ピクセル差分",afterOnly:"変更後のみ",imageScope:"画像の範囲",zoom:"拡大率",wipePosition:"ワイプ位置",changedRegions:"変更領域",noRegions:"変更ピクセル領域はありません",findings:"検出事項",noFindings:"関連する検出事項はありません",coverage:"画面カバレッジ",planned:"予定 target",captured:"取得済み target",failed:"失敗 target",viewCode:"関連コードを見る",viewVisual:"画面根拠を見る",reducedMotion:"視差低減が有効なため点滅比較は利用できません",backChange:"変更グループへ戻る",visualGap:"画面の検証は未実施です",reviewWorkspace:"人によるレビュー",reviewProgress:"レビュー進捗",viewed:"確認済み",humanJudgment:"人の判断",unreviewed:"未レビュー",reviewed:"レビュー済み",followUp:"要フォロー",blocked:"ブロック中",comments:"コメント",comment:"コメント",commentOn:"コメント対象",commentBody:"レビューメモ",saveComment:"コメントを保存",cancel:"キャンセル",resolve:"解決済みにする",resolved:"解決済み",noComments:"この変更へのコメントはありません",localOnly:"ローカルに保存します。通常コメントを Agent へ送信することはありません。",askAgent:"現在の Agent に確認を依頼",askAgentHelp:"選択状態だけを保存します。送信や新しい会話の作成は行いません。",selectedItems:"Agent 確認対象",reviewItems:"確認項目をレビュー",feedbackPreview:"Feedback Batch プレビュー",shared:"共有する情報",notShared:"共有しない情報",delivery:"受け渡し",returnConversation:"現在の会話へ戻す",prepareRequest:"レビュー依頼を準備",copyHandoff:"引き継ぎ文をコピー",handoffCopied:"引き継ぎ文をコピーしました",unreadAnswers:"未読回答",exportReview:"レビューを書き出す",importReview:"レビューを読み込む",reviewBundleFile:"レビューバンドルファイル",reanchorImport:"別レポートへ再アンカーする",stale:"古い状態",orphaned:"参照先なし",reviewUnavailable:"レビュー状態を利用できません",empty:"意味単位の変更はありません",dataUnavailable:"レビューデータを利用できません",intentUnknown:"変更意図は不明です",loading:"レビューデータを読み込んでいます…"}};let o=J(null),f=J(""),h=J("en"),m=J(""),w=J(""),$=J(""),V="",q=J("unified"),B=J("side-by-side"),te=J(""),re=J(""),ne=J(0),fe=J(0),me=J(100),ve=J(50),ye=J(!1),Ot=J(!1),Ve=J(),W=J(),oe=J(),ke=!1,_e=new Set,L=J(),_r=J([]),At=J([]),It=J([]),Rr=J([]),Bt=J([]),yt=J([]),ue=J(),N=J(),pr=J([]),ur=J(),O=J(null),Va={base:null,head:null},Pa=J(""),_t=J(""),ka=J(!1),X=J(!1),Tt=J(null),Sr=J(""),oa=J("note"),y=J(!1),b=J(),P=J(),Z=J([]),ee=J(""),Xe=J([]),D=J(null),la=J(""),Ii="",xa=J(!1),_n=null;function We(v,k){return`${v}-${k.replace(/[^a-zA-Z0-9_-]/gu,"-")}`}function ls(v){const k=v.region;return k?`left:${(k.x+k.width/2)*100}%;top:${(k.y+k.height/2)*100}%`:"display:none"}function Ur(v){return v.risk.level==="critical"||v.risk.level==="high"?"action-required":v.risk.level==="medium"||v.verification.gaps.length>0||v.intent.source==="unknown"?"needs-confirmation":"no-issue"}function $i(v){return n[v.risk.level]*3+l[Ur(v)]}function Rd(v){return t(o)?new Set(v.hunkRefs.map(k=>t(o)?.hunks.find(E=>E.id===k)?.path).filter(k=>k!==void 0)).size:0}function Sd(v,k){return/^ja(?:-|$)/iu.test(k)?`${v}ファイル`:`${v} file${v===1?"":"s"}`}function Ed(v,k){return/^ja(?:-|$)/iu.test(k)?`ほか${v}件の対応`:`${v} more change group${v===1?"":"s"}`}function Nd(v,k){return v==="reviewed"?k.reviewed:v==="follow-up"?k.followUp:v==="blocked"?k.blocked:v==="stale"?k.stale:k.unreviewed}function wn(v,k){return v?.state.judgments[k]?.state??"unreviewed"}function da(v,k){return t(O)?hl(t(O).anchorCatalog,v,k):void 0}function ds(v,k,E){const F=v?hl(v.anchorCatalog,k,E):void 0;return!F||!v?!1:v.state.viewed[Br(F)]?.state==="viewed"}function qi(v,k){const E=v.lines[k];if(!E||E.kind==="no-newline")return;const F=E.kind==="addition"?"after":E.kind==="deletion"?"before":"diff",U=F==="before"?E.oldLine:E.newLine??E.oldLine;return U?da("line-range",`${v.id}:${F}:${U}:${k}`):void 0}function Cd(v,k){return v.type==="change"?v.ref===k.id:v.type==="hunk"||v.type==="line-range"?k.hunkRefs.some(E=>v.ref===E||v.ref.startsWith(`${E}:`)):v.type==="visual-target"||v.type==="visual-region"?!!(v.targetRef&&k.targetRefs.includes(v.targetRef))||k.targetRefs.includes(v.ref):v.type==="finding"?k.findingRefs.includes(v.ref):v.type==="verification-gap"?v.ref.startsWith(`${k.id}:gap:`):!1}function Ld(){const k=new URLSearchParams(location.hash.startsWith("#")?location.hash.slice(1):"").get("token")??"";if(k){if(!/^[A-Za-z0-9_-]{32,128}$/u.test(k)){x(Pa,"Interactive capability token is invalid"),history.replaceState(null,"",`${location.pathname}${location.search}`);return}x(ee,k),history.replaceState(null,"",`${location.pathname}${location.search}`)}}async function ps(v,k={}){if(!t(ee)||!t(o))throw new Error("Interactive review capability is unavailable");const E=await fetch(`./api/v1/${v}`,{...k,credentials:"omit",headers:{authorization:`Bearer ${t(ee)}`,"x-utsuri-report-id":t(o).reportId,...k.body?{"content-type":"application/json"}:{},...k.headers??{}}}),F=await E.json();if(!E.ok)throw new Error(F?.error?.message??`HTTP ${E.status}`);return F}function bn(v){t(O)&&(x(O,{...t(O),state:structuredClone(v.state),threads:structuredClone(v.threads),events:t(O).events}),x(Xe,structuredClone(v.inbox?.entries??t(Xe))))}async function Ri(){const v=await ps("review-state");bn(v)}async function us(v){if(!t(O)||!t(o))return;const k=await ps("review-events",{method:"POST",body:JSON.stringify({schemaVersion:"1.0",reportId:t(o).reportId,expectedRevision:t(O).state.revision,action:v})});bn(k)}async function jd(){if(!t(ee)||!t(o))return;_n?.abort();const v=new AbortController;_n=v;try{const k=await fetch("./api/v1/events",{credentials:"omit",headers:{authorization:`Bearer ${t(ee)}`,"x-utsuri-report-id":t(o).reportId},signal:v.signal});if(!k.ok||!k.body)return;const E=k.body.getReader(),F=new TextDecoder;let U="";for(;!v.signal.aborted;){const{value:Ze,done:Vr}=await E.read();if(Vr)break;U+=F.decode(Ze,{stream:!0});const Ds=U.split(`\n\n`);U=Ds.pop()??"",Ds.some(Bs=>Bs.startsWith("data:")&&!Bs.includes(\'"type":"ready"\'))&&await Ri()}}catch(k){v.signal.aborted||x(_t,k instanceof Error?k.message:String(k))}}Ah(()=>_n?.abort());async function Fa(v){await ef(v,v.state.revision-1),x(O,v),x(_t,"")}async function cs(v,k,E){const F=da(v,k);if(!(!t(O)||!F)){x(X,!0);try{t(ee)?await us({type:"viewed.changed",anchor:{type:F.type,ref:F.ref,fingerprint:F.fingerprint},viewState:E?"viewed":"unseen"}):await Fa(await tf(t(O),F,E?"viewed":"unseen"))}catch(U){x(_t,U instanceof Error?U.message:String(U))}finally{x(X,!1)}}}async function Od(v,k){if(!(!t(O)||k==="stale")){x(X,!0);try{t(ee)?await us({type:"judgment.changed",changeId:v,judgmentState:k}):await Fa(await rf(t(O),v,k))}catch(E){x(_t,E instanceof Error?E.message:String(E))}finally{x(X,!1)}}}async function pa(v){!v||t(X)||(x(Tt,v),x(Sr,""),x(y,!1),await sn(),t(b)?.focus())}async function Td(){if(!(!t(O)||!t(Tt))){x(X,!0);try{t(ee)?await us({type:"thread.created",anchor:{type:t(Tt).type,ref:t(Tt).ref,fingerprint:t(Tt).fingerprint},body:t(Sr),kind:t(oa),requestAgentAttention:t(y)}):await Fa(await af(t(O),t(Tt),t(Sr),t(oa),new Date().toISOString(),t(y))),x(Tt,null),x(Sr,""),x(y,!1)}catch(v){x(_t,v instanceof Error?v.message:String(v))}finally{x(X,!1)}}}async function zd(v){if(t(O)){x(X,!0);try{t(ee)?await us({type:"thread.resolved",threadId:v}):await Fa(await nf(t(O),v))}catch(k){x(_t,k instanceof Error?k.message:String(k))}finally{x(X,!1)}}}async function Md(v,k){if(t(O)){x(X,!0);try{t(ee)?await us({type:"agent-attention.changed",threadId:v,requested:k}):await Fa(await sf(t(O),v,k)),x(D,null),x(la,"")}catch(E){x(_t,E instanceof Error?E.message:String(E))}finally{x(X,!1)}}}async function Vd(){if(!(!t(O)||!t(o))){x(X,!0);try{const v=t(ee)?await ps("review/export",{method:"POST",body:JSON.stringify({schemaVersion:"1.0",reportId:t(o).reportId,expectedRevision:t(O).state.revision})}):lf(t(O),Va);Si(`${t(o)?.reportId??"utsuri"}-review.json`,v)}catch(v){x(_t,v instanceof Error?v.message:String(v))}finally{x(X,!1)}}}function Si(v,k){const E=new Blob([`${JSON.stringify(k,null,2)}\n`],{type:"application/json"}),F=URL.createObjectURL(E),U=document.createElement("a");U.href=F,U.download=v,U.click(),URL.revokeObjectURL(F)}function Fd(v){return`Process the pending Utsuri review items.\nReport: ${v.reportId}\nBatch: ${v.id}`}async function Dd(){if(!(!t(O)||!t(o))){x(xa,!0);try{if(t(ee)){const v=await ps("feedback-batches/preview",{method:"POST",body:JSON.stringify({schemaVersion:"1.0",reportId:t(o).reportId,expectedRevision:t(O).state.revision,deliveryMode:"return-to-session"})});x(D,v.preview)}else x(D,await ff(t(O)));Ii=`ui:${t(D).batch.id}`,x(la,"")}catch(v){x(_t,v instanceof Error?v.message:String(v))}finally{x(xa,!1)}}}async function Bd(){if(!(!t(D)||!t(O)||!t(o))){x(xa,!0);try{if(t(ee)){const v=await ps("feedback-batches",{method:"POST",body:JSON.stringify({schemaVersion:"1.0",reportId:t(o).reportId,expectedRevision:t(O).state.revision,idempotencyKey:Ii,deliveryMode:"return-to-session"})});x(D,v.preview),bn(v)}else Si(`${t(o).reportId}-${t(D).batch.id.replace(":","-")}.json`,{schemaVersion:"1.0",batch:t(D).batch,contexts:t(D).contexts,preview:{shared:t(D).shared,excluded:t(D).excluded,redactionCount:t(D).redactionCount,contextBytes:t(D).contextBytes,destination:t(D).destination}});x(la,Fd(t(D).batch))}catch(v){x(_t,v instanceof Error?v.message:String(v))}finally{x(xa,!1)}}}async function Hd(){if(t(la))try{await navigator.clipboard.writeText(t(la)),x(_t,t(s).handoffCopied)}catch(v){x(_t,v instanceof Error?v.message:String(v))}}async function Wd(v){if(!(!t(O)||!v)){if(t(ee)){x(_t,"Import is available only in static report mode"),rl(P,t(P).value="");return}x(X,!0);try{if(v.size>16*1024*1024)throw new Error("Review bundle exceeds 16 MiB");const k=await df(t(O),JSON.parse(await v.text()),{reanchor:t(ka)});await Fa(k.store);const E=k.reanchored.reduce((F,U)=>(F[U.disposition]+=1,F),{matched:0,stale:0,orphaned:0});x(_t,`${E.matched} matched · ${E.stale} stale · ${E.orphaned} orphaned · ${k.conflicts.length} conflicts`)}catch(k){x(_t,k instanceof Error?k.message:String(k))}finally{rl(P,t(P).value=""),x(X,!1)}}}function Vs(v,k){return v==="action-required"?k.action:v==="needs-confirmation"?k.confirm:k.clear}function Zd(v){return t(Rr).filter(k=>Ur(k)===v).length}function Pn(v,k){history.pushState(null,"",`#${v}=${encodeURIComponent(k)}`)}async function Gt(v){await sn(),document.getElementById(v)?.focus({preventScroll:!1})}function Fs(v,k=!0){k&&(V=We("queue",v.id)),x(w,v.id),x($,""),x(te,""),x(re,""),x(ne,0),x(fe,0),x(ye,!1),Pn("change",v.id),Gt(We("change",v.id))}function Ei(){x(w,""),x($,""),history.pushState(null,"","#summary"),Gt("summary-heading")}function kn(v){x($,v),Pn("hunk",v),Gt(We("hunk",v))}function Ni(){x($,""),Gt("visual-evidence-heading")}function Mr(v){if(v==="blink"&&t(Ot)){x(B,"side-by-side"),x(ye,!1);return}x(B,v),x(ye,v==="blink"&&!t(Ot))}function Ud(v){x(te,v),x(re,""),x(ne,0)}function Kd(v){x(re,v),x(ne,0)}async function Jd(v){x(ne,v),await sn(),document.getElementById(`visual-region-${v}`)?.scrollIntoView({block:"center",inline:"center",behavior:"smooth"})}function Ci(v,k){if(ke||!v||!k)return;ke=!0;const E=v.scrollHeight-v.clientHeight,F=v.scrollWidth-v.clientWidth,U=k.scrollHeight-k.clientHeight,Ze=k.scrollWidth-k.clientWidth;k.scrollTop=E>0?v.scrollTop/E*U:0,k.scrollLeft=F>0?v.scrollLeft/F*Ze:0,requestAnimationFrame(()=>ke=!1)}function xn(v,k){const E=v.coverage.knownUsages;if(k==="ja"){const U=E===null?`${v.coverage.verifiedUsages}件を検証済み、既知の利用件数は不明`:`既知の利用箇所${E}件中${v.coverage.verifiedUsages}件を検証済み`;return v.coverage.unknownPossible?`${U}。ほかの利用箇所が存在する可能性があります`:U}const F=E===null?`${v.coverage.verifiedUsages} verified; known usage count unavailable`:`${v.coverage.verifiedUsages} of ${E} known usages verified`;return v.coverage.unknownPossible?`${F}; additional usage may exist`:F}function Li(v){const k=v.target;if(!(k?.isContentEditable||new Set(["INPUT","TEXTAREA","SELECT"]).has(k?.tagName??"")||v.metaKey||v.ctrlKey||v.altKey)){if(v.key==="b"){v.preventDefault(),Ei();return}if(v.key==="/"){v.preventDefault(),t(Ve)?.focus();return}if(v.key==="1")Mr("side-by-side");else if(v.key==="2")Mr("wipe");else if(v.key==="3")Mr("pixel-diff");else if(v.key==="4")Mr("blink");else if(v.key==="5")Mr("after-only");else if((v.key==="j"||v.key==="k")&&t(It).length){const E=t(It).findIndex(Ze=>Ze.id===t(w)),F=v.key==="j"?1:-1,U=E===-1?v.key==="j"?0:t(It).length-1:(E+F+t(It).length)%t(It).length;Fs(t(It)[U])}else if((v.key==="n"||v.key==="p")&&t(pr).length){const E=v.key==="n"?1:-1;x(fe,(t(fe)+E+t(pr).length)%t(pr).length),Gt(We("finding",t(pr)[t(fe)].id))}else v.key==="e"&&Ni()}}function Yd(v){V=We("queue-hunk",v),x(w,""),kn(v)}function ji(){x($,""),history.pushState(null,"","#queue"),Gt(V||"queue-heading")}function Gd(){x($,""),t(L)&&(Pn("change",t(L).id),Gt(We("change",t(L).id)))}function An(){if(!t(o))return;const v=location.hash.match(/^#(change|hunk)=(.+)$/u);if(!v){x(w,""),x($,"");return}let k="";try{k=decodeURIComponent(v[2]??"")}catch{x(w,""),x($,"");return}if(v[1]==="change"&&t(o).changes.some(E=>E.id===k)){x(w,k),x($,""),Gt(We("change",k));return}v[1]==="hunk"&&t(o).hunks.some(E=>E.id===k)&&(x(w,t(o).changes.find(E=>E.hunkRefs.includes(k))?.id??""),x($,k),Gt(We("hunk",k)))}async function Qd(){try{Ld();const v=document.querySelector("[data-utsuri-report]"),k=document.querySelector("[data-utsuri-manifest]");let E=null;if(v?.textContent)x(o,JSON.parse(v.textContent)),E=k?.textContent?JSON.parse(k.textContent):null;else{const[F,U]=await Promise.all([fetch("./report.json",{credentials:"omit"}),fetch("./manifest.json",{credentials:"omit"})]);if(!F.ok)throw new Error(`HTTP ${F.status}`);x(o,await F.json()),E=U.ok?await U.json():null}x(h,/^ja(?:-|$)/iu.test(t(o).language)?"ja":"en"),document.documentElement.lang=t(o).language,E&&(Va={base:E.source?.base??null,head:E.source?.head??null});try{t(ee)?(x(O,await qd(t(o),new Date().toISOString())),await Ri(),jd()):x(O,await Xh(t(o)))}catch(F){x(Pa,F instanceof Error?F.message:String(F))}document.querySelector("[data-static-fallback]")?.remove(),An()}catch(v){x(f,`${t(s).dataUnavailable}: ${v instanceof Error?v.message:String(v)}`)}}function Oi(v){if(_e.has(v.id))return v.lines.map((F,U)=>({kind:"line",line:F,index:U}));const k=v.lines.map(()=>!1);v.lines.forEach((F,U)=>{if(F.kind==="addition"||F.kind==="deletion")for(let Ze=Math.max(0,U-3);Ze<=Math.min(v.lines.length-1,U+3);Ze+=1)k[Ze]=!0}),k.some(Boolean)||k.fill(!0);const E=[];for(let F=0;F<v.lines.length;)if(k[F])E.push({kind:"line",line:v.lines[F],index:F}),F+=1;else{let U=F+1;for(;U<v.lines.length&&!k[U];)U+=1;E.push({kind:"fold",count:U-F}),F=U}return E}function Ti(v){_e=new Set([..._e,v])}function Xd(v,k){const E=v.lines[k];if(!E||E.kind!=="addition"&&E.kind!=="deletion")return;const F=E.kind==="addition"?"deletion":"addition";for(let U=1;U<=6;U+=1)for(const Ze of[k-U,k+U]){const Vr=v.lines[Ze];if(Vr?.kind===F)return Vr;if(Vr&&Vr.kind==="context")break}}function In(v,k){const E=v.lines[k],F=Xd(v,k);if(!F)return[{text:E.content,changed:E.kind==="addition"||E.kind==="deletion"}];let U=0;for(;U<E.content.length&&E.content[U]===F.content[U];)U+=1;let Ze=0;for(;Ze<E.content.length-U&&Ze<F.content.length-U&&E.content[E.content.length-Ze-1]===F.content[F.content.length-Ze-1];)Ze+=1;return[{text:E.content.slice(0,U),changed:!1},{text:E.content.slice(U,Ze?-Ze:void 0),changed:!0},{text:Ze?E.content.slice(-Ze):"",changed:!1}].filter(Vr=>Vr.text.length>0)}ud(()=>(x(h,navigator.language.toLowerCase().startsWith("ja")?"ja":"en"),Qd(),x(Ot,window.matchMedia("(prefers-reduced-motion: reduce)").matches),window.addEventListener("hashchange",An),window.addEventListener("keydown",Li),()=>{window.removeEventListener("hashchange",An),window.removeEventListener("keydown",Li)})),Zt(()=>t(h),()=>{x(s,i[t(h)])}),Zt(()=>(t(o),t(w)),()=>{x(L,t(o)?.changes.find(v=>v.id===t(w)))}),Zt(()=>(t(L),t(o)),()=>{x(_r,t(L)?t(L).hunkRefs.map(v=>t(o)?.hunks.find(k=>k.id===v)).filter(v=>v!==void 0):[])}),Zt(()=>(t(L),t(o)),()=>{x(At,t(L)&&t(o)?t(o).evidence.filter(v=>t(L)?.intent.evidenceRefs.includes(v.id)||v.hunkRefs.some(k=>t(L)?.hunkRefs.includes(k))):[])}),Zt(()=>t(o),()=>{x(It,t(o)?[...t(o).changes].sort((v,k)=>$i(v)-$i(k)):[])}),Zt(()=>(t(It),t(m)),()=>{x(Rr,t(It).filter(v=>`${v.title} ${v.summary}`.toLocaleLowerCase().includes(t(m).toLocaleLowerCase())))}),Zt(()=>t(It),()=>{x(Bt,t(It).slice(0,5))}),Zt(()=>t(Bt),()=>{x(ur,t(Bt)[0])}),Zt(()=>(t(L),t(o)),()=>{x(yt,t(L)&&t(o)?t(o).comparisons.filter(v=>t(L)?.targetRefs.includes(v.targetRef)):[])}),Zt(()=>(t(yt),t(te)),()=>{x(ue,t(yt).find(v=>v.id===t(te))??t(yt)[0])}),Zt(()=>(t(ue),t(re)),()=>{x(N,t(ue)?.images.find(v=>v.id===t(re))??t(ue)?.images[0])}),Zt(()=>(t(L),t(o)),()=>{x(pr,t(L)&&t(o)?t(o).findings.filter(v=>t(L)?.findingRefs.includes(v.id)||(v.targetRef?t(L)?.targetRefs.includes(v.targetRef):!1)):[])}),Zt(()=>(t(L),t(O)),()=>{x(Z,t(L)&&t(O)?t(O).threads.filter(v=>Cd(v.anchor,t(L))):[])}),Zt(()=>(t(Z),t(ue),t(N)),()=>{x(d,t(Z).filter(v=>v.state!=="resolved"&&v.anchor.type==="visual-region"&&!!v.anchor.region&&!!(t(ue)&&t(N))&&v.anchor.ref.startsWith(`${t(ue).id}:${t(N).id}:`)))}),Zt(()=>t(O),()=>{x(p,t(O)?.threads.filter(v=>v.agentAttention.state==="requested").length??0)}),Zt(()=>t(Xe),()=>{x(e,t(Xe).reduce((v,k)=>v+k.unreadAnswerItemIds.length,0))}),lh(),Oh();var zi=gs(),ep=Lr(zi);{var tp=v=>{var k=ym(),E=u(k),F=u(E),U=g(F,2),Ze=g(u(U),2),Vr=u(Ze),Ds=g(Ze,2),Bs=u(Ds),ap=g(U,2),sp=u(ap),Mi=g(E,2),Vi=u(Mi),np=g(u(Vi),2),ip=u(np),Fi=g(Vi,2),Di=u(Fi),op=u(Di),Bi=g(Di,2);_s(Bi,G=>x(Ve,G),()=>t(Ve));var Hi=g(Fi,2),Wi=u(Hi);ge(Wi,0,()=>["action-required","needs-confirmation","no-issue"],G=>G,(G,T)=>{var ce=vf(),et=u(ce),wt=u(et),it=u(wt),$t=g(wt,2),qt=u($t),bt=g(et,2);ge(bt,7,()=>(t(Rr),c(()=>t(Rr).filter(Ee=>Ur(Ee)===T))),Ee=>Ee.id,(Ee,xe,Oe)=>{var he=mf(),se=u(he),Ke=u(se),tt=u(Ke),Rt=g(Ke,2),St=u(Rt),Qt=u(St),Xt=g(St,2),lt=u(Xt),Ne=u(lt),Ut=g(lt,2);{var zt=dt=>{var Pt=Xs(),Je=u(Pt);R(()=>_(Je,`${t(xe),c(()=>t(xe).verification.gaps.length)??""} gaps`)),I(dt,Pt)};K(Ut,dt=>{t(xe),c(()=>t(xe).verification.gaps.length>0)&&dt(zt)})}R((dt,Pt,Je)=>{M(se,"id",dt),M(se,"href",Pt),M(se,"aria-current",(t(w),t(xe),c(()=>t(w)===t(xe).id?"page":void 0))),_(tt,Je),_(Qt,(t(xe),c(()=>t(xe).title))),_(Ne,(t(xe),c(()=>t(xe).risk.level)))},[()=>(t(xe),c(()=>We("queue",t(xe).id))),()=>(t(xe),c(()=>`#change=${encodeURIComponent(t(xe).id)}`)),()=>(He(t(Oe)),c(()=>String(t(Oe)+1).padStart(2,"0")))]),Y("click",se,dt=>{dt.preventDefault(),Fs(t(xe))}),I(Ee,he)}),R((Ee,xe)=>{M(ce,"data-queue",T),_(it,Ee),_(qt,xe)},[()=>(t(s),c(()=>Vs(T,t(s)))),()=>c(()=>Zd(T))]),I(G,ce)});var lp=g(Wi,2);{var dp=G=>{var T=yf(),ce=u(T),et=u(ce),wt=u(et),it=g(et),$t=u(it),qt=g(ce,2);ge(qt,7,()=>(t(o),c(()=>t(o).unclassifiedHunkRefs)),bt=>bt,(bt,Ee,xe)=>{const Oe=ma(()=>(t(o),t(Ee),c(()=>t(o).hunks.find(tt=>tt.id===t(Ee)))));var he=gs(),se=Lr(he);{var Ke=tt=>{var Rt=gf(),St=u(Rt),Qt=u(St),Xt=u(Qt),lt=g(Qt,2),Ne=u(lt),Ut=u(Ne),zt=g(Ne),dt=u(zt);R((Pt,Je)=>{M(St,"id",Pt),M(St,"href",Je),_(Xt,`U${t(xe)+1}`),_(Ut,(He(t(Oe)),c(()=>t(Oe).path))),_(dt,`@@ ${He(t(Oe)),c(()=>t(Oe).oldStart)??""} → ${He(t(Oe)),c(()=>t(Oe).newStart)??""}`)},[()=>(t(Ee),c(()=>We("queue-hunk",t(Ee)))),()=>(t(Ee),c(()=>`#hunk=${encodeURIComponent(t(Ee))}`))]),Y("click",St,Pt=>{Pt.preventDefault(),Yd(t(Ee))}),I(tt,Rt)};K(se,tt=>{t(Oe)&&tt(Ke)})}I(bt,he)}),R(()=>{_(wt,(t(s),c(()=>t(s).unclassified))),_($t,(t(o),c(()=>t(o).unclassifiedHunkRefs.length)))}),I(G,T)};K(lp,G=>{t(o),c(()=>t(o).unclassifiedHunkRefs.length>0)&&G(dp)})}var Zi=g(Mi,2),Ui=u(Zi),Ki=u(Ui),Ji=u(Ki),pp=u(Ji),Yi=g(Ji,2),up=u(Yi),Gi=g(Yi,2);{var cp=G=>{var T=_f(),ce=u(T);R(()=>_(ce,(t(o),c(()=>t(o).summary.overview)))),I(G,T)};K(Gi,G=>{t(o),c(()=>t(o).summary.overview)&&G(cp)})}var Qi=g(Gi,2),Xi=u(Qi),hp=u(Xi),fp=g(Xi,2),mp=u(fp),eo=g(Ki,2),to=g(u(eo),2),vp=u(to),gp=g(to,2);{var yp=G=>{var T=wf(),ce=Lr(T),et=u(ce),wt=g(ce,2),it=u(wt),$t=g(wt,2),qt=u($t),bt=g($t,2),Ee=u(bt);R((xe,Oe)=>{M(ce,"data-queue",xe),_(et,Oe),_(it,(t(ur),c(()=>t(ur).title))),_(qt,(t(ur),c(()=>t(ur).summary))),_(Ee,`${t(s),c(()=>t(s).startReview)??""} `)},[()=>(t(ur),c(()=>Ur(t(ur)))),()=>(t(ur),t(s),c(()=>Vs(Ur(t(ur)),t(s))))]),Y("click",bt,()=>Fs(t(ur),!1)),I(G,T)},_p=G=>{var T=qa(),ce=u(T);R(()=>_(ce,(t(s),c(()=>t(s).empty)))),I(G,T)};K(gp,G=>{t(ur)?G(yp):G(_p,-1)})}var ro=g(eo,2),ao=u(ro),so=u(ao),wp=u(so),bp=g(so,2),Pp=u(bp),no=g(ao,2),io=u(no),kp=u(io),xp=g(io,2),Ap=u(xp),oo=g(no,2),lo=u(oo),Ip=u(lo),$p=g(lo,2),qp=u($p),po=g(oo,2),uo=u(po),Rp=u(uo),Sp=g(uo,2),Ep=u(Sp),Np=g(po,2),co=u(Np),Cp=u(co),Lp=g(co,2),jp=u(Lp),ho=g(ro,2);{var Op=G=>{var T=kf(),ce=u(T),et=u(ce),wt=g(u(et),2),it=u(wt),$t=g(et,2),qt=u($t),bt=g(ce,2),Ee=u(bt);ge(Ee,3,()=>t(Bt),he=>he.id,(he,se,Ke)=>{var tt=bf(),Rt=u(tt),St=u(Rt),Qt=u(St),Xt=g(St,2),lt=u(Xt),Ne=u(lt),Ut=g(lt,2),zt=u(Ut),dt=g(Xt,2),Pt=u(dt),Je=g(Pt,2);R((Mt,er,Fr,Er)=>{M(tt,"data-queue",Mt),_(Qt,er),_(Ne,(t(se),c(()=>t(se).title))),_(zt,(t(se),c(()=>t(se).summary))),_(Pt,`${Fr??""} `),_(Je,` ${Er??""}`)},[()=>(t(se),c(()=>Ur(t(se)))),()=>(He(t(Ke)),c(()=>String(t(Ke)+1).padStart(2,"0"))),()=>(t(se),t(s),c(()=>Vs(Ur(t(se)),t(s)))),()=>(t(se),t(o),c(()=>Sd(Rd(t(se)),t(o).language)))]),Y("click",Rt,()=>Fs(t(se),!1)),I(he,tt)});var xe=g(Ee,2);{var Oe=he=>{var se=Pf(),Ke=u(se);R(tt=>_(Ke,tt),[()=>(t(o),t(Bt),c(()=>Ed(t(o).changes.length-t(Bt).length,t(o).language)))]),I(he,se)};K(xe,he=>{t(o),t(Bt),c(()=>t(o).changes.length>t(Bt).length)&&he(Oe)})}R(he=>{_(it,(t(s),c(()=>t(s).reviewMap))),_(qt,`${t(o),c(()=>t(o).changes.length)??""} ${he??""}`)},[()=>(t(s),c(()=>t(s).changes.toLocaleLowerCase()))]),I(G,T)};K(ho,G=>{t(Bt),c(()=>t(Bt).length>0)&&G(Op)})}var fo=g(ho,2),mo=u(fo),vo=g(u(mo),2),Tp=u(vo),zp=g(vo,2),Mp=u(zp),Vp=g(mo,2),go=u(Vp),yo=u(go),Fp=u(yo),Dp=g(yo,2),Bp=u(Dp),_o=g(go,2),wo=u(_o),Hp=u(wo),Wp=g(wo,2),Zp=u(Wp),Up=g(_o,2),bo=u(Up),Kp=u(bo),Jp=g(bo,2),Yp=u(Jp),Gp=g(fo,2),Po=u(Gp),Qp=u(Po),Xp=g(Po,2);ge(Xp,5,()=>(t(o),c(()=>t(o).files)),G=>G.id,(G,T)=>{var ce=Af(),et=u(ce),wt=u(et),it=g(et,2),$t=u(it),qt=g(it,2),bt=u(qt),Ee=g(qt,2);{var xe=Oe=>{var he=xf(),se=u(he),Ke=g(se,2),tt=u(Ke);R(Rt=>{Za(se,Rt),se.disabled=t(X),_(tt,(t(s),c(()=>t(s).viewed)))},[()=>(t(O),t(T),c(()=>ds(t(O),"file",t(T).id)))]),Y("change",se,Rt=>{cs("file",t(T).id,Rt.currentTarget.checked)}),I(Oe,he)};K(Ee,Oe=>{t(O)&&Oe(xe)})}R(()=>{_(wt,(t(T),c(()=>t(T).status))),_($t,(t(T),c(()=>t(T).oldPath&&t(T).newPath&&t(T).oldPath!==t(T).newPath?`${t(T).oldPath} → ${t(T).newPath}`:t(T).newPath??t(T).oldPath))),_(bt,(t(T),c(()=>t(T).binary?"binary":`+${t(T).additions??0} / −${t(T).deletions??0}`)))}),I(G,ce)});var eu=g(Ui,2);{var tu=G=>{var T=om(),ce=u(T),et=u(ce),wt=g(ce,2),it=u(wt),$t=u(it),qt=u($t),bt=g($t,2),Ee=u(bt),xe=g(it,2),Oe=u(xe),he=u(Oe),se=g(Oe,2),Ke=u(se),tt=g(se,2),Rt=u(tt),St=g(wt,2),Qt=u(St),Xt=u(Qt),lt=g(u(Xt),2),Ne=u(lt),Ut=g(lt,2);{var zt=j=>{var A=qa(),H=u(A);R((C,qe,Re)=>_(H,`${t(s),c(()=>t(s).reviewProgress)??""}: ${C??""}\n ${qe??""} ·\n ${t(O),c(()=>t(O).threads.length)??""}\n ${Re??""}`),[()=>(t(O),c(()=>Object.values(t(O).state.viewed).filter(C=>C.state==="viewed").length)),()=>(t(s),c(()=>t(s).viewed.toLocaleLowerCase())),()=>(t(s),c(()=>t(s).comments.toLocaleLowerCase()))]),I(j,A)},dt=j=>{var A=qa(),H=u(A);R(()=>_(H,(t(s),c(()=>t(s).reviewUnavailable)))),I(j,A)};K(Ut,j=>{t(O)?j(zt):j(dt,-1)})}var Pt=g(Xt,2),Je=u(Pt),Mt=u(Je),er=g(Mt,2),Fr=u(er),Er=g(Je,2),hs=u(Er),Kr=g(Er,2),Da=u(Kr),ua=g(Kr,2);_s(ua,j=>x(P,j),()=>t(P));var Jr=g(Qt,2);{var $n=j=>{var A=If(),H=Lr(A),C=u(H),qe=u(C),Re=u(qe),we=g(qe,2),Fe=u(we);ge(Fe,0,()=>["unreviewed","reviewed","follow-up","blocked"],Te=>Te,(Te,le)=>{var be=en(),Q=u(be),S={};R(De=>{_(Q,De),S!==(S=le)&&(be.value=(be.__value=le)??"")},[()=>(t(s),c(()=>Nd(le,t(s))))]),I(Te,be)});var Ye=g(Fe);{var rt=Te=>{var le=en(),be=u(le);le.value=le.__value="stale",R(()=>_(be,(t(s),c(()=>t(s).stale)))),I(Te,le)},Et=Kc(()=>(t(O),t(L),c(()=>wn(t(O),t(L).id)==="stale")));K(Ye,Te=>{t(Et)&&Te(rt)})}var Kt;nn(we);var tr=g(C,2),Nt=u(tr),Ht=g(Nt,2),cr=u(Ht),ut=g(tr,2),rr=u(ut),Ct=g(H,2),Wt=u(Ct);R((Te,le,be)=>{_(Re,(t(s),c(()=>t(s).humanJudgment))),we.disabled=Te,Kt!==(Kt=le)&&(we.value=(we.__value=le)??"",Ss(we,le)),Za(Nt,be),Nt.disabled=t(X),_(cr,(t(s),c(()=>t(s).viewed))),ut.disabled=t(X),_(rr,(t(s),c(()=>t(s).comment))),_(Wt,(t(s),c(()=>t(s).localOnly)))},[()=>(t(X),t(O),t(L),c(()=>t(X)||wn(t(O),t(L).id)==="stale")),()=>(t(O),t(L),c(()=>wn(t(O),t(L).id))),()=>(t(O),t(L),c(()=>ds(t(O),"change",t(L).id)))]),Y("change",we,Te=>{Od(t(L).id,Te.currentTarget.value)}),Y("change",Nt,Te=>{cs("change",t(L).id,Te.currentTarget.checked)}),Y("click",ut,()=>{pa(da("change",t(L).id))}),I(j,A)};K(Jr,j=>{t(O)&&j($n)})}var Hs=g(Jr,2);{var qn=j=>{var A=$f(),H=u(A);R(()=>_(H,t(Pa))),I(j,A)};K(Hs,j=>{t(Pa)&&j(qn)})}var Rn=g(Hs,2);{var Sn=j=>{var A=qf(),H=u(A);R(()=>_(H,t(_t))),I(j,A)};K(Rn,j=>{t(_t)&&j(Sn)})}var pt=g(St,2),ot=u(pt),Nr=u(ot),Ba=g(u(Nr),2),En=u(Ba),Ws=g(ot,2),Zs=u(Ws),Us=u(Zs),Nn=u(Us),ko=g(Us,2),iu=u(ko),ou=g(ko,2),lu=u(ou),xo=g(Zs,2),Ao=u(xo),du=u(Ao),pu=g(Ao,2),uu=u(pu),Io=g(xo,2),$o=u(Io),cu=u($o),hu=g($o,2);{var fu=j=>{var A=Rf();ge(A,5,()=>(t(L),c(()=>t(L).userImpact)),ta,(H,C)=>{var qe=Qn(),Re=u(qe);R(()=>_(Re,t(C))),I(H,qe)}),I(j,A)},mu=j=>{var A=qa(),H=u(A);R(()=>_(H,(t(s),c(()=>t(s).noImpact)))),I(j,A)};K(hu,j=>{t(L),c(()=>t(L).userImpact.length>0)?j(fu):j(mu,-1)})}var qo=g(Io,2),Ro=u(qo),vu=u(Ro),gu=g(Ro,2);ge(gu,5,()=>(t(L),c(()=>t(L).risk.reasons)),ta,(j,A)=>{var H=Qn(),C=u(H);R(()=>_(C,t(A))),I(j,H)});var So=g(qo,2),Eo=u(So),yu=u(Eo),_u=g(Eo,2);ge(_u,5,()=>(t(L),c(()=>t(L).verification.gaps)),ta,(j,A,H)=>{var C=Ef(),qe=u(C),Re=u(qe),we=g(qe,2);{var Fe=Ye=>{var rt=Sf(),Et=u(rt);R(()=>{rt.disabled=t(X),_(Et,(t(s),c(()=>t(s).comment)))}),Y("click",rt,()=>{pa(da("verification-gap",`${t(L).id}:gap:${H}`))}),I(Ye,rt)};K(we,Ye=>{t(O)&&Ye(Fe)})}R(()=>_(Re,t(A))),I(j,C)});var wu=g(So,2),No=u(wu),bu=u(No),Pu=g(No,2);ge(Pu,5,()=>(t(L),c(()=>t(L).verification.verified)),ta,(j,A)=>{var H=Qn(),C=u(H);R(()=>_(C,t(A))),I(j,H)});var Co=g(pt,2),Lo=u(Co),ku=u(Lo),jo=u(ku),xu=u(jo),Oo=g(jo,2),Au=u(Oo),To=g(Oo,2),Iu=u(To),$u=g(To,2),qu=u($u),zo=g(Lo,2);{var Ru=j=>{var A=Bf(),H=Lr(A),C=u(H);{var qe=Ae=>{var Ue=Nf(),ae=g(u(Ue),2);ge(ae,5,()=>t(yt),Ie=>Ie.id,(Ie,Ce)=>{const at=ma(()=>(t(o),t(Ce),c(()=>t(o).targets.find(Cr=>Cr.id===t(Ce).targetRef))));var kt=en(),wr=u(kt),hr={};R(()=>{_(wr,`${He(t(at)),t(Ce),c(()=>t(at)?.routeOrStory??t(Ce).targetRef)??""} · ${He(t(at)),c(()=>t(at)?.viewport)??""} · ${He(t(at)),c(()=>t(at)?.state)??""}`),hr!==(hr=(t(Ce),c(()=>t(Ce).id)))&&(kt.value=(kt.__value=(t(Ce),c(()=>t(Ce).id)))??"")}),I(Ie,kt)});var Pe;nn(ae),R(()=>{Pe!==(Pe=(t(ue),c(()=>t(ue)?.id)))&&(ae.value=(ae.__value=(t(ue),c(()=>t(ue)?.id)))??"",Ss(ae,(t(ue),c(()=>t(ue)?.id))))}),Y("change",ae,Ie=>Ud(Ie.currentTarget.value)),I(Ae,Ue)};K(C,Ae=>{t(yt),c(()=>t(yt).length>1)&&Ae(qe)})}var Re=g(C,2);{var we=Ae=>{var Ue=Cf(),ae=u(Ue),Pe=u(ae),Ie=g(ae,2);ge(Ie,5,()=>(t(ue),c(()=>t(ue).images)),at=>at.id,(at,kt)=>{var wr=en(),hr=u(wr),Cr={};R(()=>{_(hr,(t(kt),c(()=>t(kt).label))),Cr!==(Cr=(t(kt),c(()=>t(kt).id)))&&(wr.value=(wr.__value=(t(kt),c(()=>t(kt).id)))??"")}),I(at,wr)});var Ce;nn(Ie),R(()=>{_(Pe,(t(s),c(()=>t(s).imageScope))),Ce!==(Ce=(t(N),c(()=>t(N)?.id)))&&(Ie.value=(Ie.__value=(t(N),c(()=>t(N)?.id)))??"",Ss(Ie,(t(N),c(()=>t(N)?.id))))}),Y("change",Ie,at=>Kd(at.currentTarget.value)),I(Ae,Ue)};K(Re,Ae=>{t(ue),c(()=>t(ue)&&t(ue).images.length>1)&&Ae(we)})}var Fe=g(Re,2);{var Ye=Ae=>{var Ue=Lf(),ae=u(Ue),Pe=g(ae,2),Ie=u(Pe);R(Ce=>{Za(ae,Ce),ae.disabled=t(X),_(Ie,(t(s),c(()=>t(s).viewed)))},[()=>(t(O),t(ue),c(()=>ds(t(O),"visual-target",t(ue).targetRef)))]),Y("change",ae,Ce=>{cs("visual-target",t(ue).targetRef,Ce.currentTarget.checked)}),I(Ae,Ue)};K(Fe,Ae=>{t(ue)&&t(O)&&Ae(Ye)})}var rt=g(Fe,2),Et=u(rt),Kt=u(Et),tr=g(Et,2),Nt=g(H,2),Ht=u(Nt),cr=u(Ht),ut=g(Ht,2),rr=u(ut),Ct=g(ut,2),Wt=u(Ct),Te=g(Ct,2),le=u(Te),be=g(Te,2),Q=u(be),S=g(Nt,2);{var De=Ae=>{var Ue=jf(),ae=g(u(Ue),2),Pe=u(ae);R(Ie=>_(Pe,Ie),[()=>(t(ue),c(()=>t(ue).incompleteReasons.join(", ")))]),I(Ae,Ue)};K(S,Ae=>{t(ue),c(()=>t(ue)?.status==="incomplete")&&Ae(De)})}var Vt=g(S,2);{var Yr=Ae=>{var Ue=Df(),ae=Lr(Ue),Pe=u(ae),Ie=g(u(Pe),2),Ce=u(Ie),at=g(Pe,2),kt=g(u(at),2),wr=u(kt),hr=g(at,2),Cr=u(hr),Ha=u(Cr),fs=g(Cr,2),Aa=u(fs),Dr=g(hr,2),ar=g(u(Dr),2),Ia=u(ar),ca=g(ae,2);{var ms=Le=>{var ct=Of(),ht=u(ct),Ge=u(ht),mr=u(Ge),Ft=g(Ge,2),Lt=u(Ft),ft=u(Lt);_s(Ft,Jt=>x(W,Jt),()=>t(W));var nr=g(ht,2),st=u(nr),Be=u(st),$e=g(st,2),Se=u($e),mt=u(Se),ir=g(mt,2);ge(ir,3,()=>(t(N),c(()=>t(N).regions)),Jt=>Jt.id,(Jt,Dt,ea)=>{var vr=vl();let Js;var zn=u(vr);R(()=>{M(vr,"id",`visual-region-${t(ea)}`),Js=gr(vr,1,"region-marker",null,Js,{"active-region":t(ne)===t(ea)}),or(vr,(t(Dt),t(N),c(()=>`left:${t(Dt).x/t(N).width*100}%;top:${t(Dt).y/t(N).height*100}%;width:${t(Dt).width/t(N).width*100}%;height:${t(Dt).height/t(N).height*100}%`))),_(zn,t(ea)+1)}),I(Jt,vr)});var Xr=g(ir,2);ge(Xr,3,()=>t(d),Jt=>Jt.id,(Jt,Dt,ea)=>{var vr=bs(),Js=u(vr);R(zn=>{or(vr,zn),M(vr,"aria-label",(t(s),He(t(ea)),t(Dt),c(()=>`${t(s).comment} pin ${t(ea)+1}: ${t(Dt).state}`))),_(Js,t(ea)+1)},[()=>(t(Dt),c(()=>ls(t(Dt).anchor)))]),Y("click",vr,()=>{Gt(We("thread",t(Dt).id))}),I(Jt,vr)}),_s($e,Jt=>x(oe,Jt),()=>t(oe)),R(()=>{_(mr,`Before · ${t(N),c(()=>t(N).label)??""}`),or(Lt,`width: ${t(me)}%`),M(ft,"src",(t(N),c(()=>`./${t(N).beforeRef}`))),M(ft,"alt",(t(N),c(()=>`Before capture for ${t(N).label}`))),_(Be,`After · ${t(N),c(()=>t(N).label)??""}`),or(Se,`width: ${t(me)}%`),M(mt,"src",(t(N),c(()=>`./${t(N).afterRef}`))),M(mt,"alt",(t(N),c(()=>`After capture for ${t(N).label}`)))}),Fn("scroll",Ft,()=>Ci(t(W),t(oe))),Fn("scroll",$e,()=>Ci(t(oe),t(W))),I(Le,ct)},Ln=Le=>{var ct=Tf(),ht=Lr(ct),Ge=u(ht),mr=u(Ge),Ft=g(Ge,2),Lt=g(ht,2),ft=u(Lt),nr=u(ft),st=g(ft,2),Be=u(st),$e=u(Be),Se=g($e,2),mt=g(Se,2);ge(mt,3,()=>t(d),ir=>ir.id,(ir,Xr,Jt)=>{var Dt=bs(),ea=u(Dt);R(vr=>{or(Dt,vr),M(Dt,"aria-label",(t(s),He(t(Jt)),t(Xr),c(()=>`${t(s).comment} pin ${t(Jt)+1}: ${t(Xr).state}`))),_(ea,t(Jt)+1)},[()=>(t(Xr),c(()=>ls(t(Xr).anchor)))]),Y("click",Dt,()=>{Gt(We("thread",t(Xr).id))}),I(ir,Dt)}),R(()=>{_(mr,`${t(s),c(()=>t(s).wipePosition)??""}: ${t(ve)??""}%`),_(nr,`Before / after wipe · ${t(N),c(()=>t(N).label)??""}`),or(Be,`width: ${t(me)}%`),M($e,"src",(t(N),c(()=>`./${t(N).beforeRef}`))),M($e,"alt",(t(N),c(()=>`Before capture for ${t(N).label}`))),or(Se,`clip-path: inset(0 ${100-t(ve)}% 0 0)`),M(Se,"src",(t(N),c(()=>`./${t(N).afterRef}`))),M(Se,"alt",`After capture revealed to ${t(ve)}%`)}),Gs(Ft,()=>t(ve),ir=>x(ve,ir)),I(Le,ct)},jn=Le=>{var ct=zf(),ht=u(ct),Ge=u(ht),mr=g(ht,2),Ft=u(mr),Lt=u(Ft),ft=g(Lt,2);let nr;var st=g(ft,2);ge(st,3,()=>t(d),Be=>Be.id,(Be,$e,Se)=>{var mt=bs(),ir=u(mt);R(Xr=>{or(mt,Xr),M(mt,"aria-label",(t(s),He(t(Se)),t($e),c(()=>`${t(s).comment} pin ${t(Se)+1}: ${t($e).state}`))),_(ir,t(Se)+1)},[()=>(t($e),c(()=>ls(t($e).anchor)))]),Y("click",mt,()=>{Gt(We("thread",t($e).id))}),I(Be,mt)}),R(()=>{_(Ge,`${t(ye)?"Blink running; use Stop blink to pause":"Blink paused"} ·\n ${t(N),c(()=>t(N).label)??""}`),or(Ft,`width: ${t(me)}%`),M(Lt,"src",(t(N),c(()=>`./${t(N).beforeRef}`))),M(Lt,"alt",(t(N),c(()=>`Before capture for ${t(N).label}`))),nr=gr(ft,1,"blink-after",null,nr,{"blink-running":t(ye)}),M(ft,"src",(t(N),c(()=>`./${t(N).afterRef}`))),M(ft,"alt",(t(N),c(()=>`After capture for ${t(N).label}`)))}),I(Le,ct)},On=Le=>{var ct=Mf(),ht=u(ct),Ge=u(ht),mr=g(ht,2),Ft=u(mr),Lt=u(Ft),ft=g(Lt,2);ge(ft,3,()=>t(d),nr=>nr.id,(nr,st,Be)=>{var $e=bs(),Se=u($e);R(mt=>{or($e,mt),M($e,"aria-label",(t(s),He(t(Be)),t(st),c(()=>`${t(s).comment} pin ${t(Be)+1}: ${t(st).state}`))),_(Se,t(Be)+1)},[()=>(t(st),c(()=>ls(t(st).anchor)))]),Y("click",$e,()=>{Gt(We("thread",t(st).id))}),I(nr,$e)}),R(()=>{_(Ge,`${t(s),c(()=>t(s).pixelDiff)??""} · ${t(N),c(()=>t(N).label)??""}`),or(Ft,`width: ${t(me)}%`),M(Lt,"src",(t(N),c(()=>`./${t(N).diffRef}`))),M(Lt,"alt",(t(N),c(()=>`Pixel difference bitmap with ${t(N).diffPixelCount} changed pixels`)))}),I(Le,ct)},Tn=Le=>{var ct=Vf(),ht=u(ct),Ge=u(ht),mr=g(ht,2),Ft=u(mr),Lt=u(Ft),ft=g(Lt,2);ge(ft,3,()=>(t(N),c(()=>t(N).regions)),st=>st.id,(st,Be,$e)=>{var Se=vl();let mt;var ir=u(Se);R(()=>{M(Se,"id",`visual-region-${t($e)}`),mt=gr(Se,1,"region-marker",null,mt,{"active-region":t(ne)===t($e)}),or(Se,(t(Be),t(N),c(()=>`left:${t(Be).x/t(N).width*100}%;top:${t(Be).y/t(N).height*100}%;width:${t(Be).width/t(N).width*100}%;height:${t(Be).height/t(N).height*100}%`))),_(ir,t($e)+1)}),I(st,Se)});var nr=g(ft,2);ge(nr,3,()=>t(d),st=>st.id,(st,Be,$e)=>{var Se=bs(),mt=u(Se);R(ir=>{or(Se,ir),M(Se,"aria-label",(t(s),He(t($e)),t(Be),c(()=>`${t(s).comment} pin ${t($e)+1}: ${t(Be).state}`))),_(mt,t($e)+1)},[()=>(t(Be),c(()=>ls(t(Be).anchor)))]),Y("click",Se,()=>{Gt(We("thread",t(Be).id))}),I(st,Se)}),R(()=>{_(Ge,`${t(s),c(()=>t(s).afterOnly)??""} · ${t(N),c(()=>t(N).label)??""}`),or(Ft,`width: ${t(me)}%`),M(Lt,"src",(t(N),c(()=>`./${t(N).afterRef}`))),M(Lt,"alt",(t(N),c(()=>`After capture for ${t(N).label}`)))}),I(Le,ct)};K(ca,Le=>{t(B)==="side-by-side"?Le(ms):t(B)==="wipe"?Le(Ln,1):t(B)==="blink"?Le(jn,2):t(B)==="pixel-diff"?Le(On,3):Le(Tn,-1)})}var fr=g(ca,2),sr=u(fr),vs=u(sr),Gr=g(sr,2);{var Qr=Le=>{var ct=gl();ge(ct,7,()=>(t(N),c(()=>t(N).regions)),ht=>ht.id,(ht,Ge,mr)=>{var Ft=Ff(),Lt=u(Ft),ft=u(Lt),nr=u(ft),st=g(ft,2);{var Be=$e=>{var Se=Ra(),mt=u(Se);R(()=>{Se.disabled=t(X),_(mt,(t(s),c(()=>t(s).comment)))}),Y("click",Se,()=>{pa(da("visual-region",`${t(ue).id}:${t(N).id}:${t(Ge).id}`))}),I($e,Se)};K(st,$e=>{t(O)&&$e(Be)})}R(()=>{M(ft,"aria-current",t(ne)===t(mr)?"true":void 0),_(nr,`Region ${t(mr)+1} · ${t(Ge),c(()=>t(Ge).pixels)??""} px · (${t(Ge),c(()=>t(Ge).x)??""}, ${t(Ge),c(()=>t(Ge).y)??""}) ${t(Ge),c(()=>t(Ge).width)??""}\n × ${t(Ge),c(()=>t(Ge).height)??""}`)}),Y("click",ft,()=>{Jd(t(mr))}),I(ht,Ft)}),I(Le,ct)},$a=Le=>{var ct=qa(),ht=u(ct);R(()=>_(ht,(t(s),c(()=>t(s).noRegions)))),I(Le,ct)};K(Gr,Le=>{t(N),c(()=>t(N).regions.length>0)?Le(Qr):Le($a,-1)})}R(Le=>{_(Ce,(t(N),c(()=>t(N).diffPixelCount))),_(wr,`${Le??""}%`),_(Ha,(t(s),c(()=>t(s).changedRegions))),_(Aa,(t(N),c(()=>t(N).regions.length))),_(Ia,`${t(N),c(()=>t(N).width)??""} × ${t(N),c(()=>t(N).height)??""}`),_(vs,(t(s),c(()=>t(s).changedRegions)))},[()=>(t(N),c(()=>(t(N).diffRatio*100).toFixed(3)))]),I(Ae,Ue)};K(Vt,Ae=>{t(N)&&Ae(Yr)})}R(()=>{_(Kt,`${t(s),c(()=>t(s).zoom)??""}: ${t(me)??""}%`),M(Nt,"aria-label",(t(s),c(()=>t(s).visualEvidence))),M(Ht,"aria-pressed",t(B)==="side-by-side"),_(cr,(t(s),c(()=>t(s).sideBySide))),M(ut,"aria-pressed",t(B)==="wipe"),_(rr,(t(s),c(()=>t(s).wipe))),M(Ct,"aria-pressed",t(B)==="blink"),Ct.disabled=t(Ot),M(Ct,"title",(t(Ot),t(s),c(()=>t(Ot)?t(s).reducedMotion:void 0))),_(Wt,(t(B),t(ye),t(s),c(()=>t(B)==="blink"&&t(ye)?t(s).stopBlink:t(s).blink))),M(Te,"aria-pressed",t(B)==="pixel-diff"),_(le,(t(s),c(()=>t(s).pixelDiff))),M(be,"aria-pressed",t(B)==="after-only"),_(Q,(t(s),c(()=>t(s).afterOnly)))}),Gs(tr,()=>t(me),Ae=>x(me,Ae)),Y("click",Ht,()=>Mr("side-by-side")),Y("click",ut,()=>Mr("wipe")),Y("click",Ct,()=>{t(B)==="blink"?x(ye,!t(ye)):Mr("blink")}),Y("click",Te,()=>Mr("pixel-diff")),Y("click",be,()=>Mr("after-only")),I(j,A)},Su=j=>{var A=Hf(),H=g(u(A),2),C=u(H);R(()=>_(C,(t(s),c(()=>t(s).visualGap)))),I(j,A)};K(zo,j=>{t(yt),c(()=>t(yt).length>0)?j(Ru):j(Su,-1)})}var Eu=g(zo,2),Mo=u(Eu),Nu=u(Mo),Vo=u(Nu),Cu=u(Vo),Lu=g(Vo,2),ju=u(Lu),Ou=g(Mo,2);{var Tu=j=>{var A=gl();ge(A,7,()=>t(pr),H=>H.id,(H,C,qe)=>{var Re=Wf(),we=u(Re);let Fe;var Ye=u(we),rt=u(Ye),Et=u(rt),Kt=g(rt),tr=u(Kt),Nt=g(Kt),Ht=u(Nt),cr=g(Ye,2),ut=u(cr),rr=g(cr,2),Ct=u(rr),Wt=g(rr,2);{var Te=Q=>{var S=Ra(),De=u(S);R(()=>_(De,(t(s),c(()=>t(s).viewCode)))),Y("click",S,()=>kn(t(C).hunkRefs[0])),I(Q,S)};K(Wt,Q=>{t(C),c(()=>t(C).hunkRefs[0])&&Q(Te)})}var le=g(Wt,2);{var be=Q=>{var S=Ra(),De=u(S);R(()=>{S.disabled=t(X),_(De,(t(s),c(()=>t(s).comment)))}),Y("click",S,()=>{pa(da("finding",t(C).id))}),I(Q,S)};K(le,Q=>{t(O)&&Q(be)})}R(Q=>{M(we,"id",Q),Fe=gr(we,1,"",null,Fe,{"active-finding":t(fe)===t(qe)}),_(Et,(t(C),c(()=>t(C).state))),_(tr,(t(C),c(()=>t(C).severity))),_(Ht,(t(C),c(()=>t(C).category))),_(ut,(t(C),c(()=>t(C).title))),_(Ct,(t(C),c(()=>t(C).description)))},[()=>(t(C),c(()=>We("finding",t(C).id)))]),I(H,Re)}),I(j,A)},zu=j=>{var A=qa(),H=u(A);R(()=>_(H,(t(s),c(()=>t(s).noFindings)))),I(j,A)};K(Ou,j=>{t(pr),c(()=>t(pr).length>0)?j(Tu):j(zu,-1)})}var Fo=g(Co,2),Do=u(Fo),Mu=u(Do),Bo=u(Mu),Vu=u(Bo),Fu=g(Bo,2),Du=u(Fu),Ho=g(Do,2);ge(Ho,5,()=>(t(At),c(()=>t(At).slice(0,3))),j=>j.id,(j,A)=>{var H=Zf(),C=u(H),qe=u(C),Re=g(C),we=u(Re),Fe=g(Re,2),Ye=u(Fe);R(()=>{_(qe,(t(A),c(()=>t(A).type))),_(we,(t(A),c(()=>t(A).path))),_(Ye,(t(A),c(()=>t(A).summary)))}),I(j,H)});var Bu=g(Ho,2);{var Hu=j=>{var A=Kf(),H=u(A),C=u(H),qe=g(H,2);ge(qe,5,()=>(t(At),c(()=>t(At).slice(3))),Re=>Re.id,(Re,we)=>{var Fe=Uf(),Ye=u(Fe),rt=u(Ye),Et=g(Ye);R(()=>{_(rt,(t(we),c(()=>t(we).path))),_(Et,` — ${t(we),c(()=>t(we).summary)??""}`)}),I(Re,Fe)}),R(()=>_(C,`${t(s),c(()=>t(s).moreEvidence)??""} (${t(At),c(()=>t(At).length-3)??""})`)),I(j,A)};K(Bu,j=>{t(At),c(()=>t(At).length>3)&&j(Hu)})}var Wo=g(Fo,2),Zo=u(Wo),Uo=u(Zo),Ko=u(Uo),Wu=u(Ko),Zu=g(Ko,2),Uu=u(Zu),Ku=g(Uo,2),Ks=u(Ku),Ju=u(Ks),Cn=g(Ks,2),Yu=u(Cn),Gu=g(Zo,2);ge(Gu,1,()=>t(_r),j=>j.id,(j,A)=>{const H=ma(()=>(t(L),t(A),c(()=>t(L).hunkExplanations?.find(({hunkRef:Q})=>Q===t(A).id))));var C=em();let qe;var Re=u(C),we=u(Re),Fe=u(we),Ye=u(Fe),rt=g(Fe,2),Et=u(rt),Kt=g(we,2),tr=u(Kt);{var Nt=Q=>{var S=Jf(),De=Lr(S),Vt=u(De),Yr=g(Vt,2),Ae=u(Yr),Ue=g(De,2),ae=u(Ue);R(Pe=>{Za(Vt,Pe),Vt.disabled=t(X),_(Ae,(t(s),c(()=>t(s).viewed))),Ue.disabled=t(X),_(ae,(t(s),c(()=>t(s).comment)))},[()=>(t(O),t(A),c(()=>ds(t(O),"hunk",t(A).id)))]),Y("change",Vt,Pe=>{cs("hunk",t(A).id,Pe.currentTarget.checked)}),Y("click",Ue,()=>{pa(da("hunk",t(A).id))}),I(Q,S)};K(tr,Q=>{t(O)&&Q(Nt)})}var Ht=g(tr,2);{var cr=Q=>{var S=Ra(),De=u(S);R(()=>_(De,(t(s),c(()=>t(s).viewVisual)))),Y("click",S,Ni),I(Q,S)};K(Ht,Q=>{t(yt),c(()=>t(yt).length>0)&&Q(cr)})}var ut=g(Ht,2),rr=g(Re,2);{var Ct=Q=>{var S=Yf(),De=u(S),Vt=u(De),Yr=u(Vt),Ae=g(Vt,2),Ue=u(Ae),ae=g(De,2),Pe=u(ae),Ie=u(Pe),Ce=g(Pe,2),at=u(Ce);R(()=>{M(S,"aria-label",(t(s),c(()=>t(s).interpretation))),_(Yr,(t(s),c(()=>t(s).hunkPurpose))),_(Ue,(He(t(H)),c(()=>t(H).purpose))),_(Ie,(t(s),c(()=>t(s).hunkMeaning))),_(at,(He(t(H)),c(()=>t(H).meaning)))}),I(Q,S)};K(rr,Q=>{t(H)&&Q(Ct)})}var Wt=g(rr,2);let Te;ge(Wt,5,()=>(t(A),c(()=>Oi(t(A)))),ta,(Q,S)=>{var De=gs(),Vt=Lr(De);{var Yr=ae=>{var Pe=yl(),Ie=u(Pe);R(Ce=>_(Ie,Ce),[()=>(t(s),t(S),c(()=>t(s).context.replace("{count}",String(t(S).count))))]),Y("click",Pe,()=>Ti(t(A).id)),I(ae,Pe)},Ae=ae=>{const Pe=ma(()=>(t(A),t(S),c(()=>qi(t(A),t(S).index))));var Ie=Gf(),Ce=u(Ie),at=u(Ce),kt=g(Ce,2),wr=u(kt),hr=g(kt,2),Cr=u(hr),Ha=g(hr,2);ge(Ha,5,()=>(t(A),t(S),c(()=>In(t(A),t(S).index))),ta,(Dr,ar)=>{var Ia=Xs();let ca;var ms=u(Ia);R(()=>{ca=gr(Ia,1,"",null,ca,{"word-change":t(ar).changed}),_(ms,(t(ar),c(()=>t(ar).text)))}),I(Dr,Ia)});var fs=g(Ha,2);{var Aa=Dr=>{var ar=_l();R(()=>{ar.disabled=t(X),M(ar,"aria-label",(t(s),t(A),He(t(Pe)),c(()=>`${t(s).commentOn} ${t(A).path}:${t(Pe).startLine}`))),M(ar,"title",(t(s),c(()=>t(s).comment)))}),Y("click",ar,()=>{pa(t(Pe))}),I(Dr,ar)};K(fs,Dr=>{t(O)&&t(Pe)&&Dr(Aa)})}R(()=>{gr(Ie,1,(t(S),c(()=>`diff-line ${t(S).line.kind}`))),M(Ie,"aria-label",(t(S),c(()=>`${t(S).line.kind}, old line ${t(S).line.oldLine??"none"}, new line ${t(S).line.newLine??"none"}`))),_(at,(t(S),c(()=>t(S).line.oldLine??""))),_(wr,(t(S),c(()=>t(S).line.newLine??""))),_(Cr,(t(S),c(()=>t(S).line.kind==="addition"?"+":t(S).line.kind==="deletion"?"−":" ")))}),I(ae,Ie)},Ue=ae=>{const Pe=ma(()=>(t(A),t(S),c(()=>qi(t(A),t(S).index))));var Ie=Qf(),Ce=u(Ie);let at;var kt=u(Ce),wr=u(kt),hr=g(kt,2),Cr=u(hr),Ha=g(hr,2);{var fs=fr=>{var sr=wl();ge(sr,5,()=>(t(A),t(S),c(()=>In(t(A),t(S).index))),ta,(vs,Gr)=>{var Qr=Xs();let $a;var Le=u(Qr);R(()=>{$a=gr(Qr,1,"",null,$a,{"word-change":t(Gr).changed}),_(Le,(t(Gr),c(()=>t(Gr).text)))}),I(vs,Qr)}),I(fr,sr)};K(Ha,fr=>{t(S),c(()=>t(S).line.kind!=="addition")&&fr(fs)})}var Aa=g(Ce,2);let Dr;var ar=u(Aa),Ia=u(ar),ca=g(ar,2),ms=u(ca),Ln=g(ca,2);{var jn=fr=>{var sr=wl();ge(sr,5,()=>(t(A),t(S),c(()=>In(t(A),t(S).index))),ta,(vs,Gr)=>{var Qr=Xs();let $a;var Le=u(Qr);R(()=>{$a=gr(Qr,1,"",null,$a,{"word-change":t(Gr).changed}),_(Le,(t(Gr),c(()=>t(Gr).text)))}),I(vs,Qr)}),I(fr,sr)};K(Ln,fr=>{t(S),c(()=>t(S).line.kind!=="deletion")&&fr(jn)})}var On=g(Aa,2);{var Tn=fr=>{var sr=_l();R(()=>{sr.disabled=t(X),M(sr,"aria-label",(t(s),t(A),He(t(Pe)),c(()=>`${t(s).commentOn} ${t(A).path}:${t(Pe).startLine}`))),M(sr,"title",(t(s),c(()=>t(s).comment)))}),Y("click",sr,()=>{pa(t(Pe))}),I(fr,sr)};K(On,fr=>{t(O)&&t(Pe)&&fr(Tn)})}R(()=>{M(Ie,"aria-label",(t(S),c(()=>`${t(S).line.kind}, old line ${t(S).line.oldLine??"none"}, new line ${t(S).line.newLine??"none"}`))),at=gr(Ce,1,(t(S),c(()=>`diff-line ${t(S).line.kind==="addition"?"empty":t(S).line.kind}`)),null,at,{"empty-side":t(S).line.kind==="addition"}),_(wr,(t(S),c(()=>t(S).line.oldLine??""))),_(Cr,(t(S),c(()=>t(S).line.kind==="deletion"?"−":" "))),Dr=gr(Aa,1,(t(S),c(()=>`diff-line ${t(S).line.kind==="deletion"?"empty":t(S).line.kind}`)),null,Dr,{"empty-side":t(S).line.kind==="deletion"}),_(Ia,(t(S),c(()=>t(S).line.newLine??""))),_(ms,(t(S),c(()=>t(S).line.kind==="addition"?"+":" ")))}),I(ae,Ie)};K(Vt,ae=>{t(S),c(()=>t(S).kind==="fold")?ae(Yr):t(q)==="unified"?ae(Ae,1):ae(Ue,-1)})}I(Q,De)});var le=g(Wt,2);{var be=Q=>{var S=Xf(),De=u(S);R(()=>_(De,`← ${t(s),c(()=>t(s).backChange)??""}`)),Y("click",S,Gd),I(Q,S)};K(le,Q=>{t($),t(A),c(()=>t($)===t(A).id)&&Q(be)})}R((Q,S,De)=>{qe=gr(C,1,"hunk",null,qe,{"active-hunk":t($)===t(A).id}),M(C,"id",Q),M(C,"aria-labelledby",S),_(Ye,(t(A),c(()=>t(A).path))),M(rt,"id",De),_(Et,`@@ −${t(A),c(()=>t(A).oldStart)??""},${t(A),c(()=>t(A).oldLines)??""} +${t(A),c(()=>t(A).newStart)??""},${t(A),c(()=>t(A).newLines)??""} @@ ${t(A),c(()=>t(A).heading)??""}`),M(ut,"aria-label",(t(A),c(()=>`Link to hunk in ${t(A).path}`))),Te=gr(Wt,1,"diff-table",null,Te,{"split-diff":t(q)==="split"}),M(Wt,"aria-label",(t(A),c(()=>`Diff for ${t(A).path}`)))},[()=>(t(A),c(()=>We("hunk",t(A).id))),()=>(t(A),c(()=>We("hunk-title",t(A).id))),()=>(t(A),c(()=>We("hunk-title",t(A).id)))]),Y("click",ut,()=>kn(t(A).id)),I(j,C)});var Qu=g(Wo,2),Jo=u(Qu),Xu=u(Jo),Yo=u(Xu),ec=u(Yo),tc=g(Yo,2),rc=u(tc),Go=g(Jo,2);{var ac=j=>{var A=tm(),H=u(A),C=u(H),qe=u(C),Re=g(C,2),we=u(Re),Fe=g(H,2),Ye=g(u(Fe),2),rt=u(Ye);rt.value=rt.__value="note";var Et=g(rt);Et.value=Et.__value="question";var Kt=g(Et);Kt.value=Kt.__value="finding";var tr=g(Kt);tr.value=tr.__value="change-request";var Nt=g(Fe,2),Ht=u(Nt),cr=u(Ht),ut=g(Ht,2);_s(ut,ae=>x(b,ae),()=>t(b));var rr=g(Nt,2),Ct=u(rr),Wt=g(Ct,2),Te=u(Wt),le=g(Wt,2),be=u(le),Q=g(rr,2),S=u(Q),De=g(Q,2),Vt=u(De),Yr=u(Vt),Ae=g(Vt,2),Ue=u(Ae);R(ae=>{_(qe,`${t(s),c(()=>t(s).commentOn)??""} / ${t(Tt),c(()=>t(Tt).type)??""}`),_(we,(t(Tt),c(()=>t(Tt).path??t(Tt).ref))),Ye.disabled=t(X),_(cr,(t(s),c(()=>t(s).commentBody))),ut.disabled=t(X),Ct.disabled=t(X),_(Te,(t(s),c(()=>t(s).askAgent))),_(be,(t(s),c(()=>t(s).askAgentHelp))),_(S,(t(s),c(()=>t(s).localOnly))),Vt.disabled=ae,_(Yr,(t(s),c(()=>t(s).saveComment))),Ae.disabled=t(X),_(Ue,(t(s),c(()=>t(s).cancel)))},[()=>(t(X),t(Sr),c(()=>t(X)||!t(Sr).trim()))]),Fn("submit",A,ae=>{ae.preventDefault(),Td()}),Nh(Ye,()=>t(oa),ae=>x(oa,ae)),Gs(ut,()=>t(Sr),ae=>x(Sr,ae)),ul(Ct,()=>t(y),ae=>x(y,ae)),Y("click",Ae,()=>{x(Tt,null),x(Sr,""),x(y,!1)}),I(j,A)};K(Go,j=>{t(Tt)&&j(ac)})}var sc=g(Go,2);{var nc=j=>{var A=nm();ge(A,5,()=>t(Z),H=>H.id,(H,C)=>{var qe=sm(),Re=u(qe),we=u(Re),Fe=u(we),Ye=u(Fe),rt=g(Fe,2),Et=u(rt),Kt=g(we,2),tr=u(Kt),Nt=g(Re,2),Ht=u(Nt),cr=g(Nt,2);ge(cr,1,()=>(t(C),c(()=>t(C).messages)),le=>le.id,(le,be)=>{var Q=qa(),S=u(Q);R(()=>_(S,(t(be),c(()=>t(be).body)))),I(le,Q)});var ut=g(cr,2);{var rr=le=>{var be=rm(),Q=u(be),S=g(Q,2),De=u(S);R(()=>{Za(Q,(t(C),c(()=>t(C).agentAttention.state==="requested"))),Q.disabled=(t(X),t(C),c(()=>t(X)||t(C).state!=="open")),_(De,(t(s),c(()=>t(s).askAgent)))}),Y("change",Q,Vt=>{Md(t(C).id,Vt.currentTarget.checked)}),I(le,be)},Ct=le=>{var be=am(),Q=u(be);R(()=>_(Q,`Agent attention: ${t(C),c(()=>t(C).agentAttention.state)??""}`)),I(le,be)};K(ut,le=>{t(C),c(()=>t(C).agentAttention.state==="none"||t(C).agentAttention.state==="requested")?le(rr):le(Ct,-1)})}var Wt=g(ut,2);{var Te=le=>{var be=Ra(),Q=u(be);R(()=>{be.disabled=t(X),_(Q,(t(s),c(()=>t(s).resolve)))}),Y("click",be,()=>{zd(t(C).id)}),I(le,be)};K(Wt,le=>{t(C),c(()=>t(C).state==="open")&&le(Te)})}R(le=>{M(qe,"id",le),M(qe,"data-thread-state",(t(C),c(()=>t(C).state))),_(Ye,(t(C),c(()=>t(C).kind))),_(Et,(t(C),c(()=>t(C).anchor.type))),_(tr,(t(C),t(s),c(()=>t(C).state==="resolved"?t(s).resolved:t(C).state))),_(Ht,(t(C),c(()=>t(C).anchor.path??t(C).anchor.ref)))},[()=>(t(C),c(()=>We("thread",t(C).id)))]),I(H,qe)}),I(j,A)},ic=j=>{var A=im(),H=u(A);R(()=>_(H,(t(s),c(()=>t(s).noComments)))),I(j,A)};K(sc,j=>{t(Z),c(()=>t(Z).length>0)?j(nc):j(ic,-1)})}R((j,A,H,C,qe,Re,we,Fe)=>{M(T,"id",j),M(T,"aria-labelledby",A),_(et,`← ${t(s),c(()=>t(s).backQueue)??""}`),_(qt,`Focused change / ${t(L),c(()=>t(L).kind)??""}`),M(bt,"id",H),_(Ee,(t(L),c(()=>t(L).title))),M(Oe,"data-queue",C),_(he,qe),_(Ke,`${t(L),c(()=>t(L).risk.level)??""} risk`),_(Rt,(t(L),c(()=>t(L).intent.source))),_(Ne,(t(s),c(()=>t(s).reviewWorkspace))),Mt.disabled=Re,_(Fr,(t(s),c(()=>t(s).reanchorImport))),Er.disabled=!t(O)||t(X),_(hs,(t(s),c(()=>t(s).exportReview))),Kr.disabled=we,_(Da,(t(s),c(()=>t(s).importReview))),M(ua,"aria-label",(t(s),c(()=>t(s).reviewBundleFile))),_(En,(t(s),c(()=>t(s).interpretation))),_(Nn,(t(s),c(()=>t(s).what))),_(iu,(t(L),c(()=>t(L).summary))),_(lu,(t(L),c(()=>t(L).implementation))),_(du,(t(s),c(()=>t(s).why))),_(uu,(t(L),t(s),c(()=>t(L).intent.text||t(s).intentUnknown))),_(cu,(t(s),c(()=>t(s).userImpact))),_(vu,(t(s),c(()=>t(s).risk))),_(yu,(t(s),c(()=>t(s).gaps))),_(bu,(t(s),c(()=>t(s).verified))),_(xu,`Evidence / ${t(yt),c(()=>t(yt).length)??""}`),_(Au,(t(s),c(()=>t(s).measured))),_(Iu,(t(s),c(()=>t(s).visualEvidence))),_(qu,Fe),_(Cu,`Finding states / ${t(pr),c(()=>t(pr).length)??""}`),_(ju,(t(s),c(()=>t(s).findings))),_(Vu,`Evidence / ${t(At),c(()=>t(At).length)??""}`),_(Du,(t(s),c(()=>t(s).evidence))),_(Wu,`Structured patch / ${t(_r),c(()=>t(_r).length)??""}`),_(Uu,(t(s),c(()=>t(s).codeDiff))),M(Ks,"aria-pressed",t(q)==="unified"),_(Ju,(t(s),c(()=>t(s).unified))),M(Cn,"aria-pressed",t(q)==="split"),_(Yu,(t(s),c(()=>t(s).split))),_(ec,`Notes / ${t(Z),c(()=>t(Z).length)??""}`),_(rc,(t(s),c(()=>t(s).comments)))},[()=>(t(L),c(()=>We("change",t(L).id))),()=>(t(L),c(()=>We("title",t(L).id))),()=>(t(L),c(()=>We("title",t(L).id))),()=>(t(L),c(()=>Ur(t(L)))),()=>(t(L),t(s),c(()=>Vs(Ur(t(L)),t(s)))),()=>(t(X),t(ee),c(()=>t(X)||!!t(ee))),()=>(t(O),t(X),t(ee),c(()=>!t(O)||t(X)||!!t(ee))),()=>(t(o),t(h),c(()=>xn(t(o),t(h))))]),Y("click",ce,ji),ul(Mt,()=>t(ka),j=>x(ka,j)),Y("click",Er,()=>{Vd()}),Y("click",Kr,()=>t(P)?.click()),Y("change",ua,j=>{Wd(j.currentTarget.files?.[0])}),Y("click",Ks,()=>x(q,"unified")),Y("click",Cn,()=>x(q,"split")),I(G,T)},ru=G=>{const T=ma(()=>(t(o),t($),c(()=>t(o).hunks.find(it=>it.id===t($)))));var ce=gs(),et=Lr(ce);{var wt=it=>{var $t=pm(),qt=u($t),bt=u(qt),Ee=g(qt,2),xe=u(Ee),Oe=g(Ee,2),he=u(Oe),se=g(Oe,2),Ke=u(se),tt=u(Ke),Rt=u(tt),St=g(tt,2);{var Qt=lt=>{var Ne=lm(),Ut=u(Ne),zt=u(Ut),dt=g(zt,2),Pt=u(dt),Je=g(Ut,2),Mt=u(Je);R(er=>{Za(zt,er),zt.disabled=t(X),_(Pt,(t(s),c(()=>t(s).viewed))),Je.disabled=t(X),_(Mt,(t(s),c(()=>t(s).comment)))},[()=>(t(O),He(t(T)),c(()=>ds(t(O),"hunk",t(T).id)))]),Y("change",zt,er=>{cs("hunk",t(T).id,er.currentTarget.checked)}),Y("click",Je,()=>{pa(da("hunk",t(T).id))}),I(lt,Ne)};K(St,lt=>{t(O)&<(Qt)})}var Xt=g(Ke,2);ge(Xt,5,()=>(He(t(T)),c(()=>Oi(t(T)))),ta,(lt,Ne)=>{var Ut=gs(),zt=Lr(Ut);{var dt=Je=>{var Mt=yl(),er=u(Mt);R(Fr=>_(er,Fr),[()=>(t(s),t(Ne),c(()=>t(s).context.replace("{count}",String(t(Ne).count))))]),Y("click",Mt,()=>Ti(t(T).id)),I(Je,Mt)},Pt=Je=>{var Mt=dm(),er=u(Mt),Fr=u(er),Er=g(er),hs=u(Er),Kr=g(Er),Da=u(Kr),ua=g(Kr),Jr=u(ua);R(()=>{gr(Mt,1,(t(Ne),c(()=>`diff-line ${t(Ne).line.kind}`))),_(Fr,(t(Ne),c(()=>t(Ne).line.oldLine??""))),_(hs,(t(Ne),c(()=>t(Ne).line.newLine??""))),_(Da,(t(Ne),c(()=>t(Ne).line.kind==="addition"?"+":t(Ne).line.kind==="deletion"?"−":" "))),_(Jr,(t(Ne),c(()=>t(Ne).line.content)))}),I(Je,Mt)};K(zt,Je=>{t(Ne),c(()=>t(Ne).kind==="fold")?Je(dt):Je(Pt,-1)})}I(lt,Ut)}),R(lt=>{_(bt,`← ${t(s),c(()=>t(s).backQueue)??""}`),_(xe,(t(s),c(()=>t(s).unclassified))),_(he,(He(t(T)),c(()=>t(T).path))),M(se,"id",lt),_(Rt,`@@ −${He(t(T)),c(()=>t(T).oldStart)??""},${He(t(T)),c(()=>t(T).oldLines)??""} +${He(t(T)),c(()=>t(T).newStart)??""},${He(t(T)),c(()=>t(T).newLines)??""} @@`)},[()=>(He(t(T)),c(()=>We("hunk",t(T).id)))]),Y("click",qt,ji),I(it,$t)};K(et,it=>{t(T)&&it(wt)})}I(G,ce)},au=G=>{var T=um(),ce=u(T),et=u(ce);R(()=>_(et,(t(s),c(()=>t(s).empty)))),I(G,T)};K(eu,G=>{t(L)?G(tu):t($)?G(ru,1):(t(o),c(()=>t(o).changes.length===0)&&G(au,2))})}var su=g(Zi,2);{var nu=G=>{var T=gm(),ce=u(T),et=u(ce),wt=u(et),it=u(wt),$t=g(wt,2);{var qt=he=>{var se=cm(),Ke=u(se);R(()=>_(Ke,`${t(s),c(()=>t(s).unreadAnswers)??""}: ${t(e)??""}`)),I(he,se)};K($t,he=>{t(e)>0&&he(qt)})}var bt=g(et,2);{var Ee=he=>{var se=Ra(),Ke=u(se);R(()=>{se.disabled=t(xa)||t(X),_(Ke,(t(s),c(()=>t(s).reviewItems)))}),Y("click",se,()=>{Dd()}),I(he,se)};K(bt,he=>{t(p)>0&&he(Ee)})}var xe=g(ce,2);{var Oe=he=>{var se=vm(),Ke=u(se),tt=u(Ke),Rt=g(Ke,2);ge(Rt,5,()=>(t(D),c(()=>t(D).batch.items)),pt=>pt.id,(pt,ot)=>{var Nr=hm(),Ba=u(Nr),En=u(Ba),Ws=g(Ba,2),Zs=u(Ws),Us=g(Ws,2),Nn=u(Us);R(()=>{_(En,(t(ot),c(()=>t(ot).question))),_(Zs,`${t(ot),c(()=>t(ot).anchor.type)??""}: ${t(ot),c(()=>t(ot).anchor.ref)??""}`),_(Nn,(t(ot),c(()=>t(ot).state)))}),I(pt,Nr)});var St=g(Rt,2),Qt=u(St),Xt=u(Qt),lt=u(Xt),Ne=g(Xt,2),Ut=u(Ne),zt=g(Qt,2),dt=u(zt),Pt=u(dt),Je=g(dt,2),Mt=u(Je),er=g(zt,2),Fr=u(er),Er=u(Fr),hs=g(Fr,2),Kr=u(hs),Da=g(St,2);ge(Da,1,()=>(t(D),c(()=>t(D).warnings)),pt=>pt,(pt,ot)=>{var Nr=fm(),Ba=u(Nr);R(()=>_(Ba,t(ot))),I(pt,Nr)});var ua=g(Da,2),Jr=u(ua),$n=u(Jr),Hs=g(Jr,2);{var qn=pt=>{var ot=Ra(),Nr=u(ot);R(()=>{ot.disabled=t(xa),_(Nr,(t(s),c(()=>t(s).copyHandoff)))}),Y("click",ot,()=>{Hd()}),I(pt,ot)};K(Hs,pt=>{t(la)&&pt(qn)})}var Rn=g(ua,2);{var Sn=pt=>{var ot=mm(),Nr=u(ot);R(()=>_(Nr,t(la))),I(pt,ot)};K(Rn,pt=>{t(la)&&pt(Sn)})}R(pt=>{_(tt,(t(s),c(()=>t(s).feedbackPreview))),_(lt,(t(s),c(()=>t(s).shared))),_(Ut,`${t(D),c(()=>t(D).shared.comments)??""} comments · ${t(D),c(()=>t(D).shared.codeRanges)??""}\n code ranges · ${t(D),c(()=>t(D).shared.imageCrops)??""} image crops ·\n ${t(D),c(()=>t(D).shared.evidenceReferences)??""} evidence refs`),_(Pt,(t(s),c(()=>t(s).notShared))),_(Mt,pt),_(Er,(t(s),c(()=>t(s).delivery))),_(Kr,`${t(D),c(()=>t(D).destination.deliveryMode)??""} · ${t(D),c(()=>t(D).contextBytes)??""} bytes ·\n ${t(D),c(()=>t(D).redactionCount)??""} redactions`),Jr.disabled=t(xa),_($n,(t(ee),t(s),c(()=>t(ee)?t(s).returnConversation:t(s).prepareRequest)))},[()=>(t(D),c(()=>t(D).excluded.join(" · ")))]),Y("click",Jr,()=>{Bd()}),I(he,se)};K(xe,he=>{t(D)&&he(Oe)})}R(()=>{M(T,"aria-label",(t(s),c(()=>t(s).selectedItems))),_(it,`${t(s),c(()=>t(s).selectedItems)??""}: ${t(p)??""}`)}),I(G,T)};K(su,G=>{t(O)&&(t(p)>0||t(e)>0||t(D))&&G(nu)})}R((G,T,ce)=>{M(U,"data-status",(t(o),c(()=>t(o).status))),_(Vr,(t(o),c(()=>t(o).status))),_(Bs,G),_(sp,(t(o),c(()=>t(o).reportId))),_(ip,(t(s),c(()=>t(s).queue))),_(op,(t(s),c(()=>t(s).search))),M(Hi,"aria-label",(t(s),c(()=>t(s).queue))),_(pp,`Brief / ${t(o),c(()=>t(o).status)??""}`),_(up,(t(s),c(()=>t(s).summary))),M(Qi,"data-status",(t(o),c(()=>t(o).status))),_(hp,(t(s),c(()=>t(s).evidencePosture))),_(mp,(t(o),c(()=>t(o).summary.statement))),_(vp,(t(s),c(()=>t(s).reviewerRoute))),_(wp,(t(s),c(()=>t(s).files))),_(Pp,(t(o),c(()=>t(o).summary.filesChanged))),_(kp,(t(s),c(()=>t(s).additions))),_(Ap,`+${t(o),c(()=>t(o).summary.additions)??""}`),_(Ip,(t(s),c(()=>t(s).deletions))),_(qp,`−${t(o),c(()=>t(o).summary.deletions)??""}`),_(Rp,(t(s),c(()=>t(s).changes))),_(Ep,(t(o),c(()=>t(o).changes.length))),_(Cp,(t(s),c(()=>t(s).lowSignal))),_(jp,T),_(Tp,(t(s),c(()=>t(s).coverage))),_(Mp,ce),_(Fp,(t(s),c(()=>t(s).planned))),_(Bp,(t(o),c(()=>t(o).coverage.planned))),_(Hp,(t(s),c(()=>t(s).captured))),_(Zp,(t(o),c(()=>t(o).coverage.succeeded))),_(Kp,(t(s),c(()=>t(s).failed))),_(Yp,(t(o),c(()=>t(o).coverage.failed))),_(Qp,(t(s),c(()=>t(s).inventory)))},[()=>(t(o),t(h),c(()=>xn(t(o),t(h)))),()=>(t(o),c(()=>t(o).files.filter(G=>G.lowSignal).length)),()=>(t(o),t(h),c(()=>xn(t(o),t(h))))]),Y("click",F,G=>{G.preventDefault(),Ei()}),Gs(Bi,()=>t(m),G=>x(m,G)),I(v,k)},rp=v=>{var k=_m(),E=u(k);R(()=>{M(k,"role",t(f)?"alert":"status"),_(E,(t(f),c(()=>t(f)||i.en.loading)))}),I(v,k)};K(ep,v=>{t(o)?v(tp):v(rp,-1)})}I(r,zi),Cl()}mh(["click","change"]);const bl=document.querySelector("[data-utsuri-app]");bl&&bh(wm,{target:bl});\n';
|
|
217117
|
+
var reportUiCss = ':root{color-scheme:light dark;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Hiragino Sans,Yu Gothic UI,sans-serif;font-size:16px;--paper: #f2efe7;--paper-raised: #fffdf7;--ink: #171a1f;--ink-muted: #61656d;--line: #c9c4b8;--line-strong: #7c7b77;--rail: #e4e0d6;--blue: #1558d6;--blue-soft: #dce7ff;--coral: #b73f2d;--coral-soft: #fae1db;--green: #176948;--green-soft: #d8eee3;--amber: #805400;--amber-soft: #f5e7bf;--focus: #0066ff;--code-bg: #20242b;--code-text: #f5f2e9;--code-muted: #a9afb9;--addition: #123d2e;--deletion: #4d2524;--word-addition: #297553;--word-deletion: #9c4139;--radius: .25rem;--shadow: 0 1px 0 rgb(23 26 31 / 8%), 0 12px 34px rgb(23 26 31 / 7%)}@media(prefers-color-scheme:dark){:root{--paper: #15171a;--paper-raised: #1e2126;--ink: #f4f0e7;--ink-muted: #b3b5ba;--line: #3b3f45;--line-strong: #71757c;--rail: #1a1d21;--blue: #80a9ff;--blue-soft: #25395f;--coral: #ff9b89;--coral-soft: #542e2a;--green: #76d4ac;--green-soft: #1c4637;--amber: #f0c66c;--amber-soft: #4b3b1c;--focus: #8ab4ff;--code-bg: #0c0e11}}*{box-sizing:border-box}html{background:var(--paper);color:var(--ink);scroll-behavior:smooth}body{margin:0;min-width:320px;background-image:linear-gradient(rgb(23 26 31 / 3%) 1px,transparent 1px);background-size:100% 2rem}button,input,select{font:inherit}button,a,summary{-webkit-tap-highlight-color:transparent}a{color:inherit}:focus-visible{outline:3px solid var(--focus);outline-offset:3px}.skip-link{position:fixed;inset:0 auto auto 0;z-index:100;transform:translateY(-120%);padding:.75rem 1rem;background:var(--paper-raised);color:var(--ink)}.skip-link:focus{transform:translateY(0)}.report-shell{display:grid;grid-template-columns:clamp(17rem,23vw,22rem) minmax(0,1fr);grid-template-rows:4.5rem minmax(calc(100vh - 4.5rem),auto);min-height:100vh}.report-header{position:sticky;top:0;z-index:20;grid-column:1 / -1;display:grid;grid-template-columns:clamp(17rem,23vw,22rem) 1fr auto;align-items:stretch;min-height:4.5rem;border-bottom:1px solid var(--line-strong);background:color-mix(in srgb,var(--paper-raised) 94%,transparent);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.wordmark{display:flex;align-items:center;gap:.8rem;padding:0 1.25rem;border-right:1px solid var(--line-strong);text-decoration:none}.wordmark>span{display:grid;width:2rem;height:2rem;place-items:center;border-radius:50%;background:var(--ink);color:var(--paper-raised);font-size:.68rem;font-weight:800;letter-spacing:-.08em}.wordmark strong{font-size:1.05rem;letter-spacing:-.025em}.report-state{display:flex;align-items:center;gap:.65rem;padding:0 1.5rem;font-size:.78rem;font-weight:760;letter-spacing:.075em}.report-state small{color:var(--ink-muted);font-size:.75rem;font-weight:500;letter-spacing:0}.state-mark{width:.72rem;height:.72rem;border:2px solid currentColor;transform:rotate(45deg)}.report-state[data-status=UNCOVERED],.report-state[data-status=INCOMPLETE]{color:var(--amber)}.report-state[data-status=REGRESSION]{color:var(--coral)}.report-state[data-status=PASS]{color:var(--green)}.report-state[data-status=CHANGED]{color:var(--blue)}.report-id{align-self:center;margin:0;padding:0 1.25rem;color:var(--ink-muted);font:.7rem/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}.review-rail{position:sticky;top:4.5rem;align-self:start;height:calc(100vh - 4.5rem);overflow-y:auto;border-right:1px solid var(--line-strong);background:color-mix(in srgb,var(--rail) 96%,transparent)}.rail-heading,.queue-search,.queue-section h3{padding-right:1.25rem;padding-left:1.25rem}.rail-heading{padding-top:1.6rem;padding-bottom:1rem}.kicker{margin:0 0 .55rem;color:var(--ink-muted);font-size:.69rem;font-weight:750;letter-spacing:.12em;text-transform:uppercase}.rail-heading h2,.decision-summary h1,.focused-change h2,.section-heading h3{margin:0;letter-spacing:-.04em}.rail-heading h2{font-size:1.55rem}.queue-search{display:grid;gap:.42rem;padding-bottom:1.4rem;color:var(--ink-muted);font-size:.72rem;font-weight:650}.queue-search input{width:100%;border:1px solid var(--line-strong);border-radius:var(--radius);padding:.72rem .8rem;background:var(--paper-raised);color:var(--ink)}.queue-section{border-top:1px solid var(--line)}.queue-section h3{display:flex;align-items:center;justify-content:space-between;margin:0;padding-top:.75rem;padding-bottom:.75rem;color:var(--ink-muted);font-size:.7rem;letter-spacing:.055em;text-transform:uppercase}.count{min-width:1.7rem;border:1px solid var(--line);border-radius:1rem;padding:.12rem .38rem;text-align:center}.queue-section ol{margin:0;padding:0;list-style:none}.queue-section a{display:grid;grid-template-columns:2rem minmax(0,1fr);gap:.65rem;padding:.9rem 1.25rem;border-top:1px solid color-mix(in srgb,var(--line) 70%,transparent);text-decoration:none}.queue-section a:hover,.queue-section a[aria-current=page]{background:var(--paper-raised)}.queue-section a[aria-current=page]{box-shadow:inset .24rem 0 var(--blue)}.queue-index{padding-top:.08rem;color:var(--ink-muted);font:.68rem/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}.queue-copy{min-width:0}.queue-copy strong{display:block;overflow:hidden;font-size:.84rem;line-height:1.35;text-overflow:ellipsis}.queue-copy>span:not(.badges){color:var(--ink-muted);font-size:.7rem}.badges{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.48rem}.badges span,.change-badges span{border:1px solid var(--line);border-radius:99px;padding:.16rem .45rem;color:var(--ink-muted);font-size:.63rem;font-weight:700}main{min-width:0;padding:clamp(1.25rem,3vw,3rem)}.decision-summary,.focused-change{width:min(100%,90rem);margin:0 auto;border:1px solid var(--line-strong);background:var(--paper-raised);box-shadow:var(--shadow)}.decision-summary{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(18rem,.55fr);gap:clamp(1.5rem,4vw,4rem);padding:clamp(1.4rem,3vw,2.6rem)}.decision-summary h1{font-size:clamp(1.9rem,4vw,3.6rem);line-height:.98}.review-overview{max-width:54rem;margin:1.4rem 0 0;font-size:clamp(1.25rem,2.25vw,2rem);font-weight:680;letter-spacing:-.028em;line-height:1.34}.evidence-posture{max-width:48rem;margin-top:2rem;border-left:.24rem solid var(--amber);padding:.15rem 0 .15rem 1rem}.evidence-posture .kicker{margin-bottom:.3rem}.decision-statement{margin:0;color:var(--ink-muted);font-size:.9rem;line-height:1.55}.review-route{position:relative;display:flex;min-width:0;flex-direction:column;align-items:flex-start;overflow:hidden;border-left:1px solid var(--line-strong);padding-left:clamp(1.25rem,3vw,2.4rem)}.review-route:before{position:absolute;top:-1.25rem;right:-.3rem;content:"01";color:color-mix(in srgb,var(--ink) 8%,transparent);font:800 clamp(5rem,9vw,8rem)/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:-.12em;pointer-events:none}.review-route h2,.review-route h3,.review-route>p{position:relative;margin:0}.review-route h2{font-size:.9rem;letter-spacing:.06em;text-transform:uppercase}.review-route h3{max-width:min(100%,28rem);overflow-wrap:anywhere;margin-top:1.25rem;font-size:clamp(1.25rem,2vw,1.75rem);letter-spacing:-.035em;line-height:1.12}.review-route>p:not(.kicker,.route-status){max-width:30rem;margin-top:.8rem;color:var(--ink-muted);font-size:.82rem;line-height:1.5}.route-status{margin-top:1.5rem!important;border:1px solid currentColor;padding:.28rem .48rem;color:var(--amber);font-size:.65rem;font-weight:760;letter-spacing:.065em;text-transform:uppercase}.route-status[data-queue=action-required]{color:var(--coral)}.route-status[data-queue=no-issue]{color:var(--green)}.review-route button{position:relative;width:100%;margin-top:auto;border:0;border-top:1px solid var(--line-strong);border-bottom:1px solid var(--line-strong);padding:.8rem 0;background:transparent;color:var(--ink);font-size:.78rem;font-weight:760;text-align:left;cursor:pointer}.review-route button span{float:right;transition:transform .14s ease}.review-route button:hover span{transform:translate(.3rem)}.metrics{grid-column:1 / -1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-self:end;margin:0;border-top:1px solid var(--line-strong);border-bottom:1px solid var(--line-strong)}.metrics div{min-width:0;padding:.85rem .65rem;border-right:1px solid var(--line)}.metrics div:last-child{border-right:0}.metrics dt{min-height:2.2em;color:var(--ink-muted);font-size:.65rem}.metrics dd{margin:.35rem 0 0;font:700 clamp(1.25rem,2vw,1.8rem)/1 ui-monospace,SFMono-Regular,Menlo,monospace}.positive{color:var(--green)}.negative{color:var(--coral)}.review-map{grid-column:1 / -1;border-top:1px solid var(--line);padding-top:1.15rem}.review-map header{display:flex;align-items:end;justify-content:space-between;gap:1rem;padding-bottom:.9rem}.review-map h2,.review-map header p{margin:0}.review-map h2{font-size:clamp(1.15rem,2vw,1.55rem);letter-spacing:-.03em}.review-map header>p{color:var(--ink-muted);font:.68rem/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}.review-map ol{margin:0;border-top:1px solid var(--line-strong);padding:0;list-style:none}.review-map li{animation:brief-row-enter .32s ease-out both}.review-map li:nth-child(2){animation-delay:45ms}.review-map li:nth-child(3){animation-delay:90ms}.review-map li:nth-child(4){animation-delay:135ms}.review-map li:nth-child(5){animation-delay:.18s}.review-map button{display:grid;width:100%;grid-template-columns:2.5rem minmax(0,1fr) auto;gap:1rem;align-items:center;border:0;border-bottom:1px solid var(--line);padding:1rem .75rem;background:transparent;color:var(--ink);text-align:left;cursor:pointer}.review-map button:hover{background:color-mix(in srgb,var(--amber-soft) 58%,transparent)}.review-map li[data-queue=action-required] button{box-shadow:inset .22rem 0 var(--coral)}.review-map li[data-queue=needs-confirmation] button{box-shadow:inset .22rem 0 var(--amber)}.review-map li[data-queue=no-issue] button{box-shadow:inset .22rem 0 var(--green)}.map-index{color:var(--ink-muted);font:.7rem/1 ui-monospace,SFMono-Regular,Menlo,monospace}.map-copy{min-width:0}.map-copy strong,.map-copy>span{display:block}.map-copy strong{overflow-wrap:anywhere;font-size:.92rem;line-height:1.3}.map-copy>span{overflow:hidden;margin-top:.25rem;color:var(--ink-muted);font-size:.74rem;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.map-meta{display:flex;gap:.4rem;color:var(--ink-muted);font-size:.68rem;white-space:nowrap}.map-remainder{border-bottom:1px solid var(--line);padding:.7rem .75rem .7rem 3.25rem;color:var(--ink-muted);font-size:.72rem}@keyframes brief-row-enter{0%{transform:translateY(.4rem)}to{transform:translateY(0)}}.file-inventory{grid-column:1 / -1;border-top:1px solid var(--line);padding-top:1rem}.coverage-overview{grid-column:1 / -1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2rem;align-items:end;border-top:1px solid var(--line);padding-top:1rem}.coverage-overview h2,.coverage-overview p{margin:0}.coverage-overview h2{font-size:1rem}.coverage-overview p{margin-top:.35rem;color:var(--ink-muted);font-size:.82rem}.coverage-overview dl{display:grid;grid-template-columns:repeat(3,minmax(6rem,1fr));margin:0}.coverage-overview dl div{border-left:1px solid var(--line);padding-left:1rem}.coverage-overview dt{color:var(--ink-muted);font-size:.65rem}.coverage-overview dd{margin:.25rem 0 0;font:700 1.2rem/1 ui-monospace,SFMono-Regular,Menlo,monospace}.file-inventory summary,.more-evidence summary{cursor:pointer;font-size:.78rem;font-weight:720}.file-inventory ul{display:grid;gap:0;margin:.8rem 0 0;padding:0;list-style:none}.file-inventory li{display:grid;grid-template-columns:6rem minmax(0,1fr) auto auto;gap:1rem;padding:.48rem 0;border-top:1px solid var(--line);color:var(--ink-muted);font-size:.72rem}.file-inventory code{overflow-wrap:anywhere;color:var(--ink)}.file-status{font-weight:750;text-transform:uppercase}.focused-change{margin-top:1.4rem;padding:clamp(1.4rem,3vw,2.6rem)}.back-link,.anchor-button{border:0;padding:0;background:transparent;color:var(--blue);cursor:pointer;font-size:.75rem;font-weight:720}.change-header{display:flex;align-items:end;justify-content:space-between;gap:2rem;margin-top:1.8rem;padding-bottom:1.5rem;border-bottom:2px solid var(--ink)}.change-header h2{max-width:50rem;overflow-wrap:anywhere;font-size:clamp(1.8rem,4vw,3.25rem);line-height:1.04}.change-header>div,.finding-list li,.finding-list article{min-width:0}.change-badges{display:flex;flex-wrap:wrap;justify-content:end;gap:.4rem}.change-badges span[data-queue=action-required]{border-color:var(--coral);background:var(--coral-soft);color:var(--coral)}.change-badges span[data-queue=needs-confirmation]{border-color:var(--amber);background:var(--amber-soft);color:var(--amber)}.change-badges span[data-queue=no-issue]{border-color:var(--green);background:var(--green-soft);color:var(--green)}.review-workspace{margin-top:1rem;border:1px solid var(--line-strong);border-left:.35rem solid var(--blue);padding:1rem 1.1rem;background:linear-gradient(90deg,color-mix(in srgb,var(--blue-soft) 48%,transparent),transparent 54%),var(--paper)}.review-workspace-heading{display:flex;align-items:end;justify-content:space-between;gap:1rem}.review-workspace h3,.review-workspace p{margin:0}.review-workspace h3{font-size:1.05rem}.review-workspace-heading p:not(.kicker),.local-only-note,.review-message{margin-top:.35rem;color:var(--ink-muted);font-size:.74rem}.review-transfer-actions,.review-controls,.comment-actions{display:flex;flex-wrap:wrap;gap:.45rem;align-items:center}.review-controls{margin-top:.9rem;border-top:1px solid var(--line);padding-top:.9rem}.review-transfer-actions button,.review-controls button,.comment-actions button,.thread-list button,.feedback-dock button,.inline-comment-action{min-height:2.25rem;border:1px solid var(--line-strong);border-radius:var(--radius);padding:.45rem .7rem;background:var(--paper-raised);color:var(--ink);cursor:pointer;font-size:.7rem;font-weight:720}.review-transfer-actions button:disabled,.review-controls button:disabled,.comment-actions button:disabled,.thread-list button:disabled,.feedback-dock button:disabled{cursor:not-allowed;opacity:.55}.review-controls>label:not(.viewed-control),.comment-composer label{display:grid;gap:.28rem;color:var(--ink-muted);font-size:.68rem;font-weight:700}.review-controls select,.comment-composer select,.comment-composer textarea{border:1px solid var(--line-strong);border-radius:var(--radius);padding:.5rem .65rem;background:var(--paper-raised);color:var(--ink)}.viewed-control{display:inline-flex;gap:.4rem;align-items:center;min-height:2.25rem;color:var(--ink-muted);font-size:.7rem;font-weight:720}.viewed-control input{width:1rem;height:1rem;accent-color:var(--blue)}.compact-control{min-height:auto;justify-self:end}.dark-control{color:#d8e3ff}.visual-viewed-control{align-self:end}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;clip-path:inset(50%)}.review-message{border-left:.2rem solid var(--amber);padding:.45rem .6rem;background:var(--amber-soft);color:var(--amber)}.explanation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:1px solid var(--line-strong)}.explanation-grid section{min-width:0;padding:1.5rem 1.5rem 1.5rem 0;border-bottom:1px solid var(--line)}.explanation-grid section:nth-child(2n){padding-right:0;padding-left:1.5rem;border-left:1px solid var(--line)}.explanation-grid h3{margin:0 0 .7rem;font-size:.74rem;letter-spacing:.08em;text-transform:uppercase}.explanation-grid p,.explanation-grid li{font-size:.9rem;line-height:1.62}.explanation-grid ul{margin:0;padding-left:1.1rem}.technical{color:var(--ink-muted)}.risk-block{box-shadow:inset .22rem 0 var(--coral);padding-left:1.2rem!important}.gap-block{background:var(--amber-soft);box-shadow:inset .22rem 0 var(--amber)}.gap-block li{display:flex;gap:.6rem;align-items:start;justify-content:space-between}.inline-comment-action{min-height:1.7rem;flex:none;padding:.18rem .45rem;background:transparent}.interpretation-section,.visual-evidence-section{padding-top:2.2rem}.interpretation-section>.section-heading{margin-bottom:0}.visual-evidence-section{border-top:2px solid var(--ink)}.visual-heading p:not(.kicker){max-width:42rem;margin:.5rem 0 0;color:var(--ink-muted);font-size:.82rem}.visual-heading h4{margin:.35rem 0 0;font-size:1rem}.visual-selectors{display:flex;flex-wrap:wrap;gap:.8rem;align-items:end;margin-bottom:.8rem}.visual-selectors label,.wipe-control{display:grid;gap:.35rem;min-width:min(100%,13rem);color:var(--ink-muted);font-size:.7rem;font-weight:680}.visual-selectors select,.visual-selectors input,.wipe-control input{min-height:2.5rem}.visual-selectors select{max-width:24rem;border:1px solid var(--line-strong);border-radius:var(--radius);padding:.5rem .65rem;background:var(--paper-raised);color:var(--ink)}.visual-slider{margin-left:auto}.visual-mode-control{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:1rem}.visual-mode-control button,.region-list button,.finding-list button,.hunk-actions button{min-height:2rem;border:1px solid var(--line-strong);border-radius:var(--radius);padding:.42rem .65rem;background:transparent;color:var(--ink);cursor:pointer;font-size:.7rem;font-weight:700}.visual-mode-control button[aria-pressed=true]{background:var(--ink);color:var(--paper-raised)}.visual-mode-control button:disabled{cursor:not-allowed;opacity:.55}.persistent-error,.verification-gap{display:flex;gap:.7rem;align-items:baseline;margin:0 0 1rem;border-left:.3rem solid var(--amber);padding:.85rem 1rem;background:var(--amber-soft);color:var(--amber);font-size:.8rem}.persistent-error strong,.verification-gap strong{letter-spacing:.08em}.visual-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 .8rem;border:1px solid var(--line)}.visual-metrics div{padding:.65rem .8rem;border-right:1px solid var(--line)}.visual-metrics div:last-child{border-right:0}.visual-metrics dt{color:var(--ink-muted);font-size:.64rem}.visual-metrics dd{margin:.25rem 0 0;font:700 .82rem/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}.visual-panes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.visual-panes figure,.single-visual{min-width:0;margin:0}.visual-panes figcaption,.single-visual figcaption{border:1px solid var(--line-strong);border-bottom:0;padding:.5rem .7rem;background:var(--rail);color:var(--ink);font-size:.7rem;font-weight:720}.visual-scroll{overflow:auto;max-height:32rem;min-height:12rem;border:1px solid var(--line-strong);background:linear-gradient(45deg,color-mix(in srgb,var(--line) 25%,transparent) 25%,transparent 25%) 0 0 / 1rem 1rem,linear-gradient(45deg,transparent 75%,color-mix(in srgb,var(--line) 25%,transparent) 75%) 0 0 / 1rem 1rem,var(--paper-raised);overscroll-behavior:contain}.image-stage{position:relative;min-width:20rem}.image-stage img{display:block;width:100%;height:auto}.wipe-after,.blink-after{position:absolute;inset:0}.blink-after{opacity:0}.blink-after.blink-running{animation:utsuri-blink 1s steps(1,end) infinite}@keyframes utsuri-blink{0%,49%{opacity:0}50%,to{opacity:1}}.pixel-diff-view .visual-scroll{background-color:#16191e}.region-marker{position:absolute;display:grid;min-width:1.5rem;min-height:1.5rem;place-items:center;border:2px solid #fff;border-radius:0;padding:0;background:#b73f2d4d;box-shadow:0 0 0 2px var(--coral);color:#fff;font-size:.65rem;font-weight:800;pointer-events:none}.region-marker.active-region{border-width:4px;background:#b73f2d7f}.visual-comment-pin{position:absolute;z-index:4;display:grid;width:2rem;height:2rem;place-items:center;transform:translate(-50%,-50%);border:2px solid #fff;border-radius:50%;padding:0;background:var(--blue);box-shadow:0 0 0 3px #0e1117a6;color:#fff;font-size:.72rem;font-weight:820}.visual-comment-pin:hover{background:var(--coral)}.wipe-control{width:min(100%,28rem);margin:0 0 .75rem}.region-list,.finding-list{margin-top:1rem;border-top:1px solid var(--line);padding-top:1rem}.region-list h4,.finding-list h4{margin:0 0 .65rem;font-size:.82rem}.region-list ol,.finding-list ol{display:grid;gap:.5rem;margin:0;padding:0;list-style:none}.region-list ol{grid-template-columns:repeat(auto-fit,minmax(14rem,1fr))}.region-list button{width:100%;text-align:left}.region-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.35rem}.region-list button[aria-current=true]{border-color:var(--coral);box-shadow:inset .22rem 0 var(--coral)}.finding-list article{border:1px solid var(--line);padding:1rem;background:color-mix(in srgb,var(--paper) 55%,var(--paper-raised))}.finding-list article.active-finding{border-color:var(--blue)}.finding-list h5{margin:.65rem 0 .35rem;overflow-wrap:anywhere;font-size:.95rem}.finding-list p{margin:0 0 .8rem;color:var(--ink-muted);font-size:.82rem;line-height:1.5}.finding-badges{display:flex;flex-wrap:wrap;gap:.35rem}.finding-badges span{border:1px solid var(--line-strong);border-radius:99px;padding:.15rem .45rem;font-size:.63rem;font-weight:720;text-transform:uppercase}.hunk-actions{display:flex;flex-shrink:0;gap:.5rem;align-items:center}.hunk-actions button{border-color:#707987;color:#d8e3ff}.evidence-section,.diff-section{padding-top:2.2rem}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:1.5rem;margin-bottom:1rem}.section-heading h3{font-size:clamp(1.35rem,2.5vw,2rem)}.evidence-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin:0;padding:0;list-style:none}.evidence-list li{min-width:0;border:1px solid var(--line);padding:1rem;background:color-mix(in srgb,var(--blue-soft) 35%,transparent)}.evidence-list span{display:block;color:var(--blue);font-size:.64rem;font-weight:780;letter-spacing:.08em;text-transform:uppercase}.evidence-list strong{display:block;overflow-wrap:anywhere;margin-top:.55rem;font:.77rem/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}.evidence-list p{margin:.55rem 0 0;color:var(--ink-muted);font-size:.78rem;line-height:1.45}.more-evidence{margin-top:.8rem}.segmented-control{display:inline-flex;border:1px solid var(--line-strong);border-radius:var(--radius);overflow:hidden}.segmented-control button{border:0;border-right:1px solid var(--line-strong);padding:.48rem .72rem;background:transparent;color:var(--ink-muted);cursor:pointer;font-size:.7rem;font-weight:700}.segmented-control button:last-child{border-right:0}.segmented-control button[aria-pressed=true]{background:var(--ink);color:var(--paper-raised)}.hunk{overflow:hidden;margin-top:1rem;border:1px solid #555c66;border-radius:var(--radius);background:var(--code-bg);color:var(--code-text)}.hunk.active-hunk{box-shadow:0 0 0 4px var(--focus)}.hunk>header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 1rem;border-bottom:1px solid #555c66;background:#292e36}.hunk>header p,.hunk>header h4,.hunk>header h3{margin:0;overflow-wrap:anywhere;font:.72rem/1.45 ui-monospace,SFMono-Regular,Menlo,monospace}.hunk>header p{color:#d6d9de;font-weight:760}.hunk>header h4{color:var(--code-muted);font-weight:500}.anchor-button{min-width:2rem;min-height:2rem;color:#9bbaff;font:700 1rem/1 ui-monospace,SFMono-Regular,Menlo,monospace}.hunk-explanation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:0;border-bottom:1px solid #555c66;background:#20262e}.hunk-explanation div{padding:.85rem 1rem .95rem}.hunk-explanation div+div{border-left:1px solid #555c66}.hunk-explanation dt{margin-bottom:.3rem;color:#a9bce9;font-size:.68rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.hunk-explanation dd{margin:0;color:#f2f5fb;font-size:.84rem;line-height:1.55;overflow-wrap:anywhere}.diff-table{overflow-x:auto;font:.76rem/1.55 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-variant-ligatures:none}.diff-line{display:grid;grid-template-columns:3.4rem 3.4rem 1.4rem minmax(max-content,1fr) 2.2rem;min-height:1.55rem}.diff-line.addition{background:var(--addition)}.diff-line.deletion{background:var(--deletion)}.diff-line.no-newline{color:var(--code-muted);font-style:italic}.line-number{padding:0 .65rem;border-right:1px solid rgb(255 255 255 / 8%);color:var(--code-muted);text-align:right;-webkit-user-select:none;user-select:none}.line-sign{color:var(--code-muted);text-align:center;-webkit-user-select:none;user-select:none}.diff-line code{padding:0 .75rem 0 0;white-space:pre}.word-change{border-radius:.12rem;background:var(--word-addition);box-shadow:0 0 0 .08rem var(--word-addition)}.deletion .word-change{background:var(--word-deletion);box-shadow:0 0 0 .08rem var(--word-deletion)}.context-fold{width:100%;border:0;border-top:1px solid #3a4049;border-bottom:1px solid #3a4049;padding:.4rem;background:#252a31;color:#a9c0ef;cursor:pointer;font:inherit;text-align:center}.split-row{display:grid;grid-template-columns:repeat(2,minmax(max-content,1fr)) 2.2rem;border-bottom:1px solid rgb(255 255 255 / 5%)}.split-row .diff-line{grid-template-columns:3.4rem 1.4rem minmax(max-content,1fr)}.split-row .diff-line:first-child{border-right:1px solid #555c66}.empty-side{background:#171a1f!important}.line-comment{position:sticky;right:0;min-width:2.2rem;border:0;border-left:1px solid rgb(255 255 255 / 14%);background:#292e36;color:#b8ccff;cursor:pointer;font:700 .82rem/1 ui-monospace,SFMono-Regular,Menlo,monospace}.line-comment:hover{background:#384252;color:#fff}.review-comments{margin-top:2.2rem;border-top:2px solid var(--ink);padding-top:2.2rem}.comment-composer{display:grid;grid-template-columns:minmax(0,1fr) 11rem;gap:.9rem 1rem;margin-bottom:1rem;border:1px solid var(--line-strong);border-left:.35rem solid var(--blue);padding:1rem;background:var(--paper)}.comment-composer code{overflow-wrap:anywhere;font-size:.74rem}.comment-body,.agent-attention-control,.comment-composer>p,.comment-actions{grid-column:1 / -1}.comment-composer textarea{width:100%;resize:vertical;line-height:1.5}.comment-composer>p,.empty-comments{margin:0;color:var(--ink-muted);font-size:.75rem}.agent-attention-control{grid-template-columns:1.15rem minmax(0,1fr);align-items:center;border:1px solid var(--line);border-radius:var(--radius);padding:.65rem .75rem;background:var(--blue-soft);color:var(--ink);font-size:.78rem;font-weight:720}.agent-attention-control small{grid-column:2;color:var(--ink-muted);font-size:.68rem;font-weight:500}.compact-attention{display:inline-grid;margin-top:.4rem;padding:.45rem .55rem}.attention-state{color:var(--blue);font-size:.72rem!important;font-weight:720}.feedback-dock{position:fixed;z-index:20;right:1rem;bottom:1rem;width:min(44rem,calc(100vw - 22rem));max-height:min(70vh,42rem);overflow:auto;border:1px solid var(--line-strong);border-top:.35rem solid var(--blue);border-radius:var(--radius);padding:.9rem 1rem;background:var(--paper-raised);box-shadow:0 1.1rem 3rem #141e2d33}.feedback-dock>header,.feedback-dock>header>div,.feedback-actions{display:flex;flex-wrap:wrap;gap:.55rem;align-items:center}.feedback-dock>header{justify-content:space-between}.unread-badge{border-radius:999px;padding:.25rem .5rem;background:var(--blue);color:#fff;font-size:.68rem;font-weight:750}.feedback-preview{margin-top:.8rem;border-top:1px solid var(--line);padding-top:.8rem}.feedback-preview h2,.feedback-preview h3,.feedback-preview p{margin:0}.feedback-preview h2{font-size:.95rem}.feedback-preview ol{display:grid;gap:.35rem;margin:.65rem 0;padding-left:1.3rem}.feedback-preview li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.2rem .7rem;font-size:.75rem}.feedback-preview li code{overflow-wrap:anywhere;color:var(--ink-muted);font-size:.66rem}.feedback-preview li span{grid-row:1 / 3;grid-column:2;color:var(--ink-muted);font-size:.64rem;text-transform:uppercase}.feedback-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem}.feedback-preview-grid section{border:1px solid var(--line);padding:.6rem;background:var(--paper)}.feedback-preview-grid h3{margin-bottom:.25rem;font-size:.7rem}.feedback-preview-grid p,.feedback-warning{color:var(--ink-muted);font-size:.66rem;line-height:1.45}.feedback-warning{margin-top:.55rem!important;color:var(--amber)}.feedback-actions{margin-top:.65rem}.feedback-preview pre{overflow:auto;margin:.65rem 0 0;border:1px solid var(--line);padding:.65rem;background:var(--paper);white-space:pre-wrap;font-size:.67rem}.thread-list{display:grid;gap:.65rem;margin:0;padding:0;list-style:none}.thread-list li{border:1px solid var(--line);padding:.9rem 1rem;background:color-mix(in srgb,var(--paper) 60%,var(--paper-raised))}.thread-list li[data-thread-state=stale],.thread-list li[data-thread-state=orphaned]{border-left:.35rem solid var(--amber);background:var(--amber-soft)}.thread-list header{display:flex;justify-content:space-between;gap:1rem;color:var(--ink-muted);font-size:.66rem;text-transform:uppercase}.thread-list header div{display:flex;gap:.45rem}.thread-list code{display:block;overflow-wrap:anywhere;margin-top:.5rem;color:var(--ink-muted);font-size:.68rem}.thread-list p{margin:.65rem 0;white-space:pre-wrap;font-size:.86rem;line-height:1.55}.hunk-back{margin:.75rem 1rem;color:#9bbaff}.loading{margin:3rem;color:var(--ink-muted)}.empty-focus{min-height:12rem}@media(max-width:1100px){.report-shell{grid-template-columns:16rem minmax(0,1fr)}.report-header{grid-template-columns:16rem 1fr}.report-id{display:none}.decision-summary{grid-template-columns:1fr}.review-route{border-top:1px solid var(--line-strong);border-left:0;padding-top:1.25rem;padding-left:0}.review-route button{margin-top:1.5rem}.coverage-overview{grid-template-columns:1fr}.metrics{grid-template-columns:repeat(5,minmax(5rem,1fr));overflow-x:auto}.evidence-list{grid-template-columns:1fr}}@media(max-width:760px){.report-shell{display:block}.report-header{position:sticky;display:flex;min-height:3.75rem}.wordmark{border-right:0}.report-state{margin-left:auto;padding-right:1rem}.report-state small{display:none}.review-rail{position:static;width:100%;height:auto;max-height:26rem;border-right:0;border-bottom:1px solid var(--line-strong)}main{padding:.8rem}.feedback-dock{right:.5rem;bottom:.5rem;left:.5rem;width:auto}.feedback-preview-grid{grid-template-columns:1fr}.decision-summary,.focused-change{box-shadow:none}.change-header{display:block}.change-badges{justify-content:start;margin-top:1rem}.review-map button{grid-template-columns:2rem minmax(0,1fr);gap:.7rem}.map-meta{grid-column:2;flex-wrap:wrap;white-space:normal}.explanation-grid{display:block}.explanation-grid section,.explanation-grid section:nth-child(2n){padding:1.15rem 0;border-left:0}.risk-block,.gap-block{padding-left:1rem!important}.section-heading{display:block}.coverage-overview dl,.visual-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.coverage-overview dl div:nth-child(3),.visual-metrics div:nth-child(3){border-top:1px solid var(--line)}.visual-panes{grid-template-columns:1fr}.visual-slider{margin-left:0}.visual-mode-control button{flex:1 1 8rem}.segmented-control{margin-top:.8rem}.hunk-explanation{grid-template-columns:1fr}.hunk-explanation div+div{border-top:1px solid #555c66;border-left:0}.file-inventory li{grid-template-columns:1fr;gap:.25rem}.review-workspace-heading,.comment-composer{display:block}.review-transfer-actions,.review-controls,.comment-composer label,.comment-actions{margin-top:.75rem}.region-actions{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}.blink-after.blink-running{animation:none!important;opacity:1}}@media print{.review-rail,.segmented-control,.back-link,.anchor-button,.visual-mode-control,.visual-selectors,.wipe-control,.region-list,.review-transfer-actions,.review-controls,.comment-composer,.line-comment{display:none!important}.report-shell,.report-header{display:block}main{padding:0}.decision-summary,.focused-change{border:0;box-shadow:none}}\n';
|
|
217053
217118
|
|
|
217054
217119
|
// packages/report-builder/src/native-publish.ts
|
|
217055
217120
|
import { spawn as spawn6 } from "node:child_process";
|
|
@@ -217205,11 +217270,30 @@ function sha2563(bytes) {
|
|
|
217205
217270
|
function escapeHtml2(value2) {
|
|
217206
217271
|
return value2.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
217207
217272
|
}
|
|
217273
|
+
function reportText(language, english, japanese) {
|
|
217274
|
+
return /^ja(?:-|$)/iu.test(language) ? japanese : english;
|
|
217275
|
+
}
|
|
217276
|
+
var generatedPreComparisonGaps = {
|
|
217277
|
+
"Visual behavior was not captured.": true,
|
|
217278
|
+
"Runtime behavior was not executed.": true,
|
|
217279
|
+
"Captured evidence has not been compared or mapped to this change.": true,
|
|
217280
|
+
"画面上の挙動は取得されていません。": true,
|
|
217281
|
+
"実行時の挙動は検証されていません。": true,
|
|
217282
|
+
"取得済みの根拠は、この変更との比較または対応付けが完了していません。": true
|
|
217283
|
+
};
|
|
217208
217284
|
function indexHtml(report) {
|
|
217209
|
-
const summary = escapeHtml2(report.summary.statement);
|
|
217285
|
+
const summary = escapeHtml2(report.summary.overview ?? report.summary.statement);
|
|
217210
217286
|
const status = escapeHtml2(report.status);
|
|
217287
|
+
const language = escapeHtml2(report.language);
|
|
217288
|
+
const skipLink = reportText(report.language, "Skip to review", "レビューへ移動");
|
|
217289
|
+
const summaryHeading = reportText(report.language, "Review brief", "レビュー要旨");
|
|
217290
|
+
const servingHint = reportText(
|
|
217291
|
+
report.language,
|
|
217292
|
+
"Full review data is available from the local report server.",
|
|
217293
|
+
"完全なレビューデータはローカルのレポートサーバーから表示できます。"
|
|
217294
|
+
);
|
|
217211
217295
|
return `<!doctype html>
|
|
217212
|
-
<html lang="
|
|
217296
|
+
<html lang="${language}">
|
|
217213
217297
|
<head>
|
|
217214
217298
|
<meta charset="utf-8">
|
|
217215
217299
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
@@ -217218,12 +217302,12 @@ function indexHtml(report) {
|
|
|
217218
217302
|
<link rel="stylesheet" href="./assets/app.css">
|
|
217219
217303
|
</head>
|
|
217220
217304
|
<body>
|
|
217221
|
-
<a class="skip-link" href="#main-content"
|
|
217305
|
+
<a class="skip-link" href="#main-content">${skipLink}</a>
|
|
217222
217306
|
<main id="main-content" data-static-fallback tabindex="-1">
|
|
217223
217307
|
<p>Utsuri review · ${status}</p>
|
|
217224
|
-
<h1
|
|
217308
|
+
<h1>${summaryHeading}</h1>
|
|
217225
217309
|
<p>${summary}</p>
|
|
217226
|
-
<p
|
|
217310
|
+
<p>${servingHint}</p>
|
|
217227
217311
|
</main>
|
|
217228
217312
|
<div data-utsuri-app></div>
|
|
217229
217313
|
<script type="module" src="./assets/app.js"></script>
|
|
@@ -217365,6 +217449,22 @@ async function assertArtifactDigests(runDirectory, references, artifactDigests2)
|
|
|
217365
217449
|
function assertReferenceResult(id, result2) {
|
|
217366
217450
|
if (!result2.ok) throw new UtsuriError(id, result2.errors.join("; "), ExitCode.Artifact);
|
|
217367
217451
|
}
|
|
217452
|
+
function assertAnnotationsCoverDiff(annotations, diff2) {
|
|
217453
|
+
const expected = new Set(diff2.hunks.map((hunk) => hunk.id));
|
|
217454
|
+
const counts = /* @__PURE__ */ new Map();
|
|
217455
|
+
for (const reference of annotations.changes.flatMap((change) => change.hunkRefs)) {
|
|
217456
|
+
counts.set(reference, (counts.get(reference) ?? 0) + 1);
|
|
217457
|
+
}
|
|
217458
|
+
const missing = [...expected].filter((reference) => !counts.has(reference)).length;
|
|
217459
|
+
const duplicate = [...counts.values()].filter((count) => count > 1).length;
|
|
217460
|
+
const unknown = [...counts.keys()].filter((reference) => !expected.has(reference)).length;
|
|
217461
|
+
if (missing === 0 && duplicate === 0 && unknown === 0) return;
|
|
217462
|
+
throw new UtsuriError(
|
|
217463
|
+
"ANNOTATIONS_HUNK_COVERAGE_INVALID",
|
|
217464
|
+
`Annotations must classify every collected hunk exactly once (${missing} missing, ${duplicate} duplicate, ${unknown} unknown)`,
|
|
217465
|
+
ExitCode.Artifact
|
|
217466
|
+
);
|
|
217467
|
+
}
|
|
217368
217468
|
function inferredKind(paths) {
|
|
217369
217469
|
const extensions = new Set(paths.map((entry) => path18.extname(entry).toLowerCase()));
|
|
217370
217470
|
if ([...extensions].some((extension) => [".css", ".scss", ".sass", ".less"].includes(extension))) {
|
|
@@ -217378,7 +217478,7 @@ function inferredKind(paths) {
|
|
|
217378
217478
|
}
|
|
217379
217479
|
return "unknown";
|
|
217380
217480
|
}
|
|
217381
|
-
function createCandidateChanges(diff2, plan) {
|
|
217481
|
+
function createCandidateChanges(diff2, plan, language) {
|
|
217382
217482
|
const filesById = new Map(diff2.files.map((file) => [file.id, file]));
|
|
217383
217483
|
return plan.candidates.map((candidate) => {
|
|
217384
217484
|
const paths = candidate.fileRefs.map((reference) => filesById.get(reference)).filter((file) => file !== void 0).map((file) => file.newPath ?? file.oldPath ?? "unknown");
|
|
@@ -217389,26 +217489,75 @@ function createCandidateChanges(diff2, plan) {
|
|
|
217389
217489
|
id: candidate.id,
|
|
217390
217490
|
title: candidate.title,
|
|
217391
217491
|
kind: inferredKind(paths),
|
|
217392
|
-
summary:
|
|
217492
|
+
summary: reportText(
|
|
217493
|
+
language,
|
|
217494
|
+
`${candidate.hunkRefs.length} hunk${candidate.hunkRefs.length === 1 ? "" : "s"} across ${paths.length} file${paths.length === 1 ? "" : "s"}.`,
|
|
217495
|
+
`${candidate.hunkRefs.length}件のハンクを${paths.length}件のファイルで確認しました。`
|
|
217496
|
+
),
|
|
217393
217497
|
intent: {
|
|
217394
|
-
text:
|
|
217498
|
+
text: reportText(
|
|
217499
|
+
language,
|
|
217500
|
+
"Intent has not been declared.",
|
|
217501
|
+
"変更意図は宣言されていません。"
|
|
217502
|
+
),
|
|
217395
217503
|
source: "unknown",
|
|
217396
217504
|
evidenceRefs: candidate.evidenceRefs,
|
|
217397
|
-
missingEvidence: [
|
|
217505
|
+
missingEvidence: [
|
|
217506
|
+
reportText(
|
|
217507
|
+
language,
|
|
217508
|
+
"User request, specification, or commit rationale",
|
|
217509
|
+
"ユーザー要求、仕様、またはコミット理由"
|
|
217510
|
+
)
|
|
217511
|
+
]
|
|
217398
217512
|
},
|
|
217399
|
-
implementation:
|
|
217513
|
+
implementation: reportText(
|
|
217514
|
+
language,
|
|
217515
|
+
`Git changes were collected for ${paths.join(", ")}.`,
|
|
217516
|
+
`${paths.join("、")}のGit変更を収集しました。`
|
|
217517
|
+
),
|
|
217400
217518
|
userImpact: [],
|
|
217401
|
-
technicalImpact: paths.map(
|
|
217519
|
+
technicalImpact: paths.map(
|
|
217520
|
+
(entry) => reportText(language, `Changed ${entry}`, `${entry}を変更`)
|
|
217521
|
+
),
|
|
217402
217522
|
risk: {
|
|
217403
217523
|
level: lowSignalOnly ? "info" : "low",
|
|
217404
|
-
reasons: lowSignalOnly ? [
|
|
217524
|
+
reasons: lowSignalOnly ? [
|
|
217525
|
+
reportText(
|
|
217526
|
+
language,
|
|
217527
|
+
"Only low-signal or generated evidence is present.",
|
|
217528
|
+
"低シグナルまたは生成済みの根拠だけが存在します。"
|
|
217529
|
+
)
|
|
217530
|
+
] : [
|
|
217531
|
+
reportText(
|
|
217532
|
+
language,
|
|
217533
|
+
"Runtime and visual effects have not been exercised.",
|
|
217534
|
+
"実行時および画面上の影響は検証されていません。"
|
|
217535
|
+
)
|
|
217536
|
+
]
|
|
217405
217537
|
},
|
|
217406
217538
|
hunkRefs: candidate.hunkRefs,
|
|
217407
217539
|
targetRefs: [],
|
|
217408
217540
|
findingRefs: [],
|
|
217409
217541
|
verification: {
|
|
217410
|
-
verified: [
|
|
217411
|
-
|
|
217542
|
+
verified: [
|
|
217543
|
+
reportText(
|
|
217544
|
+
language,
|
|
217545
|
+
"Git patch structure and cross-references were validated.",
|
|
217546
|
+
"Gitパッチの構造と相互参照を検証しました。"
|
|
217547
|
+
)
|
|
217548
|
+
],
|
|
217549
|
+
gaps: [
|
|
217550
|
+
reportText(
|
|
217551
|
+
language,
|
|
217552
|
+
"Visual behavior was not captured.",
|
|
217553
|
+
"画面上の挙動は取得されていません。"
|
|
217554
|
+
),
|
|
217555
|
+
reportText(
|
|
217556
|
+
language,
|
|
217557
|
+
"Runtime behavior was not executed.",
|
|
217558
|
+
"実行時の挙動は検証されていません。"
|
|
217559
|
+
)
|
|
217560
|
+
]
|
|
217412
217561
|
}
|
|
217413
217562
|
};
|
|
217414
217563
|
});
|
|
@@ -217698,7 +217847,8 @@ function validateDiscoveryArtifact(capture, diff2, plan, value2) {
|
|
|
217698
217847
|
return discoveryArtifactError("discovery.json has an invalid top-level structure");
|
|
217699
217848
|
}
|
|
217700
217849
|
const captureTargets = new Set(capture.targets.map((target) => target.id));
|
|
217701
|
-
const
|
|
217850
|
+
const planCandidates = new Map(plan.candidates.map((candidate) => [candidate.id, candidate]));
|
|
217851
|
+
const changeIds = new Set(planCandidates.keys());
|
|
217702
217852
|
const hunkIds = new Set(diff2.hunks.map((hunk) => hunk.id));
|
|
217703
217853
|
const mappedChanges2 = /* @__PURE__ */ new Set();
|
|
217704
217854
|
const candidateIds = [];
|
|
@@ -217746,6 +217896,16 @@ function validateDiscoveryArtifact(capture, diff2, plan, value2) {
|
|
|
217746
217896
|
return discoveryArtifactError(`Discovery hunk reference is invalid: ${String(reference)}`);
|
|
217747
217897
|
}
|
|
217748
217898
|
}
|
|
217899
|
+
const expectedHunkRefs = [
|
|
217900
|
+
...new Set(
|
|
217901
|
+
rawCandidate.changeRefs.flatMap(
|
|
217902
|
+
(reference) => planCandidates.get(String(reference))?.hunkRefs ?? []
|
|
217903
|
+
)
|
|
217904
|
+
)
|
|
217905
|
+
].sort();
|
|
217906
|
+
if (new Set(rawCandidate.changeRefs).size !== rawCandidate.changeRefs.length || canonicalJson([...rawCandidate.hunkRefs].sort()) !== canonicalJson(expectedHunkRefs)) {
|
|
217907
|
+
return discoveryArtifactError("Discovery candidate hunk provenance is inconsistent");
|
|
217908
|
+
}
|
|
217749
217909
|
}
|
|
217750
217910
|
if (new Set(candidateIds).size !== candidateIds.length || canonicalJson([...assignedTargets].sort()) !== canonicalJson([...captureTargets].sort())) {
|
|
217751
217911
|
return discoveryArtifactError("Discovery candidate inventory is inconsistent");
|
|
@@ -217968,6 +218128,7 @@ function reportComparisons(comparison) {
|
|
|
217968
218128
|
}
|
|
217969
218129
|
function integratePhase3(source11, capture, comparison, discovery) {
|
|
217970
218130
|
if (!capture || !comparison || !discovery) return source11;
|
|
218131
|
+
const language = source11.language;
|
|
217971
218132
|
const targets = reportCaptureTargets(capture, discovery, comparison);
|
|
217972
218133
|
const comparisons = reportComparisons(comparison);
|
|
217973
218134
|
const phase3Evidence = comparisonEvidence(source11, comparison, discovery);
|
|
@@ -217989,8 +218150,9 @@ function integratePhase3(source11, capture, comparison, discovery) {
|
|
|
217989
218150
|
});
|
|
217990
218151
|
const findingsById = new Map(findings.map((finding) => [finding.id, finding]));
|
|
217991
218152
|
const changes = source11.changes.map((change) => {
|
|
218153
|
+
const changeHunks = new Set(change.hunkRefs);
|
|
217992
218154
|
const candidates = discovery.candidates.filter(
|
|
217993
|
-
(candidate) => candidate.
|
|
218155
|
+
(candidate) => candidate.hunkRefs.some((reference) => changeHunks.has(reference))
|
|
217994
218156
|
);
|
|
217995
218157
|
const targetRefs = [...new Set(candidates.flatMap((candidate) => candidate.targetRefs))].sort();
|
|
217996
218158
|
const findingRefs = findings.filter((finding) => finding.targetRef && targetRefs.includes(finding.targetRef)).map((finding) => finding.id).sort();
|
|
@@ -218002,17 +218164,35 @@ function integratePhase3(source11, capture, comparison, discovery) {
|
|
|
218002
218164
|
).length;
|
|
218003
218165
|
const knownGap = discovery.coverage.knownUsages === null ? null : Math.max(0, discovery.coverage.knownUsages - discovery.coverage.verifiedUsages);
|
|
218004
218166
|
const gaps = [
|
|
218005
|
-
...change.verification.gaps.filter(
|
|
218006
|
-
|
|
218007
|
-
|
|
218008
|
-
|
|
218009
|
-
"
|
|
218010
|
-
|
|
218011
|
-
|
|
218012
|
-
|
|
218013
|
-
...targetRefs.length > compared ? [
|
|
218014
|
-
|
|
218015
|
-
|
|
218167
|
+
...change.verification.gaps.filter((gap) => generatedPreComparisonGaps[gap] !== true),
|
|
218168
|
+
...targetRefs.length === 0 ? [
|
|
218169
|
+
reportText(
|
|
218170
|
+
language,
|
|
218171
|
+
"No visual target was mapped to this change.",
|
|
218172
|
+
"この変更に対応する画面ターゲットはありません。"
|
|
218173
|
+
)
|
|
218174
|
+
] : [],
|
|
218175
|
+
...targetRefs.length > compared ? [
|
|
218176
|
+
reportText(
|
|
218177
|
+
language,
|
|
218178
|
+
`${targetRefs.length - compared} mapped target comparison is incomplete.`,
|
|
218179
|
+
`${targetRefs.length - compared}件の対応済みターゲット比較が未完了です。`
|
|
218180
|
+
)
|
|
218181
|
+
] : [],
|
|
218182
|
+
...knownGap && knownGap > 0 ? [
|
|
218183
|
+
reportText(
|
|
218184
|
+
language,
|
|
218185
|
+
`${knownGap} known usages were not verified.`,
|
|
218186
|
+
`${knownGap}件の既知の利用箇所が未検証です。`
|
|
218187
|
+
)
|
|
218188
|
+
] : [],
|
|
218189
|
+
...discovery.coverage.unknownPossible ? [
|
|
218190
|
+
reportText(
|
|
218191
|
+
language,
|
|
218192
|
+
"Additional unmapped usages may exist; coverage is not a percentage.",
|
|
218193
|
+
"未対応の利用箇所がほかにも存在する可能性があり、カバレッジは割合ではありません。"
|
|
218194
|
+
)
|
|
218195
|
+
] : []
|
|
218016
218196
|
];
|
|
218017
218197
|
return {
|
|
218018
218198
|
...change,
|
|
@@ -218022,14 +218202,26 @@ function integratePhase3(source11, capture, comparison, discovery) {
|
|
|
218022
218202
|
level: riskLevel,
|
|
218023
218203
|
reasons: [
|
|
218024
218204
|
...change.risk.reasons,
|
|
218025
|
-
...severeNewFinding ? [
|
|
218205
|
+
...severeNewFinding ? [
|
|
218206
|
+
reportText(
|
|
218207
|
+
language,
|
|
218208
|
+
`New ${severeNewFinding.severity} ${severeNewFinding.category} finding.`,
|
|
218209
|
+
`新しい${severeNewFinding.severity}レベルの${severeNewFinding.category}所見があります。`
|
|
218210
|
+
)
|
|
218211
|
+
] : []
|
|
218026
218212
|
]
|
|
218027
218213
|
},
|
|
218028
218214
|
verification: {
|
|
218029
218215
|
verified: [
|
|
218030
218216
|
.../* @__PURE__ */ new Set([
|
|
218031
218217
|
...change.verification.verified,
|
|
218032
|
-
...compared > 0 ? [
|
|
218218
|
+
...compared > 0 ? [
|
|
218219
|
+
reportText(
|
|
218220
|
+
language,
|
|
218221
|
+
`${compared} mapped browser target${compared === 1 ? " was" : "s were"} compared.`,
|
|
218222
|
+
`${compared}件の対応済みブラウザターゲットを比較しました。`
|
|
218223
|
+
)
|
|
218224
|
+
] : []
|
|
218033
218225
|
])
|
|
218034
218226
|
],
|
|
218035
218227
|
gaps: [...new Set(gaps)]
|
|
@@ -218050,7 +218242,27 @@ function integratePhase3(source11, capture, comparison, discovery) {
|
|
|
218050
218242
|
);
|
|
218051
218243
|
const changed = findings.some((finding) => (/* @__PURE__ */ new Set(["new", "resolved"])).has(finding.state));
|
|
218052
218244
|
const status = captureIncomplete || comparisonIncomplete ? "INCOMPLETE" : discovery.unmappedChangeRefs.length > 0 ? "UNCOVERED" : regression ? "REGRESSION" : changed ? "CHANGED" : "PASS";
|
|
218053
|
-
const statement = status === "INCOMPLETE" ?
|
|
218245
|
+
const statement = status === "INCOMPLETE" ? reportText(
|
|
218246
|
+
language,
|
|
218247
|
+
"Browser comparison is incomplete; inspect failed targets before making a visual judgment.",
|
|
218248
|
+
"ブラウザ比較は未完了です。画面上の判断を行う前に失敗したターゲットを確認してください。"
|
|
218249
|
+
) : status === "UNCOVERED" ? reportText(
|
|
218250
|
+
language,
|
|
218251
|
+
"Comparison completed, but at least one code change has no mapped visual target.",
|
|
218252
|
+
"比較は完了しましたが、少なくとも1件のコード変更に対応する画面ターゲットがありません。"
|
|
218253
|
+
) : status === "REGRESSION" ? reportText(
|
|
218254
|
+
language,
|
|
218255
|
+
`Comparison found ${newFindings.length} new finding${newFindings.length === 1 ? "" : "s"}, including a likely regression.`,
|
|
218256
|
+
`比較で${newFindings.length}件の新しい所見が見つかり、回帰の可能性が含まれています。`
|
|
218257
|
+
) : status === "CHANGED" ? reportText(
|
|
218258
|
+
language,
|
|
218259
|
+
"Measured visual or structural evidence changed without a regression being established by pixels alone.",
|
|
218260
|
+
"計測した画面または構造の根拠に変化がありますが、ピクセル差分だけでは回帰と判断できません。"
|
|
218261
|
+
) : reportText(
|
|
218262
|
+
language,
|
|
218263
|
+
"Compared targets have no new measured difference; coverage remains visible below.",
|
|
218264
|
+
"比較したターゲットに新しい計測差分はありません。カバレッジは以下で確認できます。"
|
|
218265
|
+
);
|
|
218054
218266
|
const incompleteReasons = [
|
|
218055
218267
|
...source11.diagnostics.incompleteReasons.filter(
|
|
218056
218268
|
(reason) => !(/* @__PURE__ */ new Set([
|
|
@@ -218090,7 +218302,8 @@ function integratePhase3(source11, capture, comparison, discovery) {
|
|
|
218090
218302
|
};
|
|
218091
218303
|
}
|
|
218092
218304
|
function createCodeOnlyReport(input, diff2, evidenceIndex, plan, annotations, capture) {
|
|
218093
|
-
const
|
|
218305
|
+
const language = annotations?.language ?? "en";
|
|
218306
|
+
const sourceChanges = annotations ? annotations.changes : createCandidateChanges(diff2, plan, language);
|
|
218094
218307
|
const captureState = captureReportState(capture);
|
|
218095
218308
|
const captureComplete = capture !== null && captureState.targets.length > 0 && captureState.failed === 0 && captureState.blockedRequestCount === 0;
|
|
218096
218309
|
const changes = sourceChanges.map((change) => ({
|
|
@@ -218099,21 +218312,41 @@ function createCodeOnlyReport(input, diff2, evidenceIndex, plan, annotations, ca
|
|
|
218099
218312
|
verified: [
|
|
218100
218313
|
.../* @__PURE__ */ new Set([
|
|
218101
218314
|
...change.verification.verified,
|
|
218102
|
-
...captureComplete ? [
|
|
218315
|
+
...captureComplete ? [
|
|
218316
|
+
reportText(
|
|
218317
|
+
language,
|
|
218318
|
+
"Configured before/after browser evidence was captured.",
|
|
218319
|
+
"設定済みの変更前後のブラウザ根拠を取得しました。"
|
|
218320
|
+
)
|
|
218321
|
+
] : []
|
|
218103
218322
|
])
|
|
218104
218323
|
],
|
|
218105
218324
|
gaps: capture ? [
|
|
218106
218325
|
.../* @__PURE__ */ new Set([
|
|
218107
|
-
...change.verification.gaps.filter(
|
|
218108
|
-
|
|
218109
|
-
|
|
218110
|
-
|
|
218326
|
+
...change.verification.gaps.filter((gap) => generatedPreComparisonGaps[gap] !== true),
|
|
218327
|
+
captureComplete ? reportText(
|
|
218328
|
+
language,
|
|
218329
|
+
"Captured evidence has not been compared or mapped to this change.",
|
|
218330
|
+
"取得済みの根拠は、この変更との比較または対応付けが完了していません。"
|
|
218331
|
+
) : reportText(
|
|
218332
|
+
language,
|
|
218333
|
+
"Browser capture is incomplete.",
|
|
218334
|
+
"ブラウザキャプチャは未完了です。"
|
|
218335
|
+
)
|
|
218111
218336
|
])
|
|
218112
218337
|
] : [
|
|
218113
218338
|
.../* @__PURE__ */ new Set([
|
|
218114
218339
|
...change.verification.gaps,
|
|
218115
|
-
|
|
218116
|
-
|
|
218340
|
+
reportText(
|
|
218341
|
+
language,
|
|
218342
|
+
"Visual behavior was not captured.",
|
|
218343
|
+
"画面上の挙動は取得されていません。"
|
|
218344
|
+
),
|
|
218345
|
+
reportText(
|
|
218346
|
+
language,
|
|
218347
|
+
"Runtime behavior was not executed.",
|
|
218348
|
+
"実行時の挙動は検証されていません。"
|
|
218349
|
+
)
|
|
218117
218350
|
])
|
|
218118
218351
|
]
|
|
218119
218352
|
}
|
|
@@ -218123,10 +218356,24 @@ function createCodeOnlyReport(input, diff2, evidenceIndex, plan, annotations, ca
|
|
|
218123
218356
|
const reportId = `report-${stableHash({ input, diff: diff2, evidenceIndex, plan, annotations, ...capture ? { capture } : {} }).slice(0, 16)}`;
|
|
218124
218357
|
return {
|
|
218125
218358
|
schemaVersion: "1.0",
|
|
218359
|
+
language,
|
|
218126
218360
|
reportId,
|
|
218127
218361
|
status: capture && !captureComplete ? "INCOMPLETE" : "UNCOVERED",
|
|
218128
218362
|
summary: {
|
|
218129
|
-
|
|
218363
|
+
...annotations?.overview ? { overview: annotations.overview } : {},
|
|
218364
|
+
statement: capture ? captureComplete ? reportText(
|
|
218365
|
+
language,
|
|
218366
|
+
"Code changes and browser evidence were collected. Comparison and target mapping remain unverified.",
|
|
218367
|
+
"コード変更とブラウザ根拠を収集しました。比較とターゲット対応付けは未検証です。"
|
|
218368
|
+
) : reportText(
|
|
218369
|
+
language,
|
|
218370
|
+
"Code changes were collected, but browser evidence is incomplete.",
|
|
218371
|
+
"コード変更を収集しましたが、ブラウザ根拠は未完了です。"
|
|
218372
|
+
) : reportText(
|
|
218373
|
+
language,
|
|
218374
|
+
"Code changes were collected and grouped. Visual and runtime behavior remain unverified.",
|
|
218375
|
+
"コード変更を収集してグループ化しました。画面および実行時の挙動は未検証です。"
|
|
218376
|
+
),
|
|
218130
218377
|
filesChanged: diff2.summary.filesChanged,
|
|
218131
218378
|
additions: diff2.summary.additions,
|
|
218132
218379
|
deletions: diff2.summary.deletions
|
|
@@ -218224,6 +218471,7 @@ async function reconstructReportFromSourceSnapshot(runDirectory, source11, annot
|
|
|
218224
218471
|
"REVIEW_PLAN_INVALID",
|
|
218225
218472
|
validateReviewPlanReferences(plan, diff2, evidenceIndex)
|
|
218226
218473
|
);
|
|
218474
|
+
if (annotations) assertAnnotationsCoverDiff(annotations, diff2);
|
|
218227
218475
|
const discovery = discoveryValue === null || capture === null ? null : validateDiscoveryArtifact(capture, diff2, plan, discoveryValue);
|
|
218228
218476
|
const report2 = integratePhase3(
|
|
218229
218477
|
createCodeOnlyReport(input, diff2, evidenceIndex, plan, annotations, capture),
|
|
@@ -218255,15 +218503,33 @@ async function reconstructReportFromSourceSnapshot(runDirectory, source11, annot
|
|
|
218255
218503
|
ExitCode.Artifact
|
|
218256
218504
|
);
|
|
218257
218505
|
}
|
|
218506
|
+
const language = annotations?.language ?? "en";
|
|
218258
218507
|
const captureState = captureReportState(capture);
|
|
218259
218508
|
const captureComplete = capture !== null && captureState.targets.length > 0 && captureState.failed === 0 && captureState.blockedRequestCount === 0;
|
|
218260
|
-
const reportId = `report-${stableHash({
|
|
218509
|
+
const reportId = `report-${stableHash({
|
|
218510
|
+
input,
|
|
218511
|
+
...annotations ? { language } : {},
|
|
218512
|
+
...capture ? { capture } : {}
|
|
218513
|
+
}).slice(0, 16)}`;
|
|
218261
218514
|
const report = {
|
|
218262
218515
|
schemaVersion: "1.0",
|
|
218516
|
+
language,
|
|
218263
218517
|
reportId,
|
|
218264
218518
|
status: capture ? captureComplete ? "UNCOVERED" : "INCOMPLETE" : "SKIPPED",
|
|
218265
218519
|
summary: {
|
|
218266
|
-
statement: capture ? captureComplete ?
|
|
218520
|
+
statement: capture ? captureComplete ? reportText(
|
|
218521
|
+
language,
|
|
218522
|
+
"Browser evidence was captured without a code diff; comparison remains unverified.",
|
|
218523
|
+
"コード差分なしでブラウザ根拠を取得しました。比較は未検証です。"
|
|
218524
|
+
) : reportText(
|
|
218525
|
+
language,
|
|
218526
|
+
"Browser evidence is incomplete and no code diff was supplied.",
|
|
218527
|
+
"ブラウザ根拠は未完了で、コード差分も指定されていません。"
|
|
218528
|
+
) : reportText(
|
|
218529
|
+
language,
|
|
218530
|
+
"No code diff was supplied; visual verification was skipped.",
|
|
218531
|
+
"コード差分が指定されていないため、画面検証をスキップしました。"
|
|
218532
|
+
),
|
|
218267
218533
|
filesChanged: 0,
|
|
218268
218534
|
additions: 0,
|
|
218269
218535
|
deletions: 0
|
|
@@ -221293,7 +221559,7 @@ function exactArguments(value2, required, optional = []) {
|
|
|
221293
221559
|
var ReviewMcpService = class {
|
|
221294
221560
|
toolDefinitions = toolDefinitions;
|
|
221295
221561
|
structuredToolErrors = false;
|
|
221296
|
-
serverInfo = { name: "utsu-ri-review", version: "0.
|
|
221562
|
+
serverInfo = { name: "utsu-ri-review", version: "0.3.0" };
|
|
221297
221563
|
#runDirectory;
|
|
221298
221564
|
#report;
|
|
221299
221565
|
#currentSession;
|
|
@@ -221492,7 +221758,7 @@ async function runReviewMcpStdio(service, streams = {}) {
|
|
|
221492
221758
|
result2 = {
|
|
221493
221759
|
protocolVersion: "2025-06-18",
|
|
221494
221760
|
capabilities: { tools: { listChanged: false } },
|
|
221495
|
-
serverInfo: service.serverInfo ?? { name: "utsu-ri-review", version: "0.
|
|
221761
|
+
serverInfo: service.serverInfo ?? { name: "utsu-ri-review", version: "0.3.0" }
|
|
221496
221762
|
};
|
|
221497
221763
|
} else if (request3.method === "ping") result2 = {};
|
|
221498
221764
|
else if (request3.method === "tools/list")
|
|
@@ -222856,6 +223122,10 @@ function cspHash(value2) {
|
|
|
222856
223122
|
function singleFileDocument(loaded) {
|
|
222857
223123
|
const css = loaded.files.get("assets/app.css").toString("utf8");
|
|
222858
223124
|
const javascript = loaded.files.get("assets/app.js").toString("utf8");
|
|
223125
|
+
const language = loaded.report.language;
|
|
223126
|
+
const japanese = /^ja(?:-|$)/iu.test(language);
|
|
223127
|
+
const skipLink = japanese ? "レビューへ移動" : "Skip to review";
|
|
223128
|
+
const loading = japanese ? "埋め込み済みレビューデータを読み込んでいます…" : "Loading embedded review data…";
|
|
222859
223129
|
if (/<\/style/iu.test(css) || /<\/script/iu.test(javascript)) {
|
|
222860
223130
|
throw new UtsuriError(
|
|
222861
223131
|
"PACK_INLINE_BOUNDARY",
|
|
@@ -222885,7 +223155,7 @@ function singleFileDocument(loaded) {
|
|
|
222885
223155
|
`style-src 'sha256-${cspHash(css)}'`
|
|
222886
223156
|
].join("; ");
|
|
222887
223157
|
return Buffer.from(`<!doctype html>
|
|
222888
|
-
<html lang="
|
|
223158
|
+
<html lang="${language}">
|
|
222889
223159
|
<head>
|
|
222890
223160
|
<meta charset="utf-8">
|
|
222891
223161
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
@@ -222894,10 +223164,10 @@ function singleFileDocument(loaded) {
|
|
|
222894
223164
|
<style>${css}</style>
|
|
222895
223165
|
</head>
|
|
222896
223166
|
<body>
|
|
222897
|
-
<a class="skip-link" href="#main-content"
|
|
223167
|
+
<a class="skip-link" href="#main-content">${skipLink}</a>
|
|
222898
223168
|
<main id="main-content" data-static-fallback tabindex="-1">
|
|
222899
223169
|
<h1>Utsuri review</h1>
|
|
222900
|
-
<p
|
|
223170
|
+
<p>${loading}</p>
|
|
222901
223171
|
</main>
|
|
222902
223172
|
<div data-utsuri-app></div>
|
|
222903
223173
|
<script type="application/json" data-utsuri-report>${reportJson}</script>
|
|
@@ -224299,7 +224569,7 @@ async function readPublishedOrigin(runDirectory) {
|
|
|
224299
224569
|
assertArtifact("report", report);
|
|
224300
224570
|
return structuredClone(report.origin);
|
|
224301
224571
|
}
|
|
224302
|
-
var help = `Utsuri 0.
|
|
224572
|
+
var help = `Utsuri 0.3.0
|
|
224303
224573
|
|
|
224304
224574
|
Usage: utsuri <command> [options]
|
|
224305
224575
|
|
|
@@ -224341,10 +224611,10 @@ async function executeCli(argv2, cwd = process.cwd(), environment = process.env)
|
|
|
224341
224611
|
ok: true,
|
|
224342
224612
|
command: "version",
|
|
224343
224613
|
package: "@utsu-ri/cli",
|
|
224344
|
-
version: "0.
|
|
224614
|
+
version: "0.3.0",
|
|
224345
224615
|
protocolVersion: "1.1"
|
|
224346
224616
|
},
|
|
224347
|
-
human: "0.
|
|
224617
|
+
human: "0.3.0",
|
|
224348
224618
|
json
|
|
224349
224619
|
};
|
|
224350
224620
|
}
|
|
@@ -224428,7 +224698,7 @@ async function executeCli(argv2, cwd = process.cwd(), environment = process.env)
|
|
|
224428
224698
|
publishedOrigin
|
|
224429
224699
|
);
|
|
224430
224700
|
const built = await buildReport(runDirectory, report, {
|
|
224431
|
-
toolVersion: "0.
|
|
224701
|
+
toolVersion: "0.3.0",
|
|
224432
224702
|
annotations,
|
|
224433
224703
|
...report.origin.bindingMode === "unbound" ? {} : { origin: report.origin }
|
|
224434
224704
|
});
|
|
@@ -224833,7 +225103,7 @@ function sameRegistration(left, right) {
|
|
|
224833
225103
|
var PluginBrokerMcpService = class {
|
|
224834
225104
|
toolDefinitions = brokerMcpToolDefinitions;
|
|
224835
225105
|
structuredToolErrors = true;
|
|
224836
|
-
serverInfo = { name: "utsu-ri-plugin-broker", version: "0.
|
|
225106
|
+
serverInfo = { name: "utsu-ri-plugin-broker", version: "0.3.0" };
|
|
224837
225107
|
#projectRoot;
|
|
224838
225108
|
#environment;
|
|
224839
225109
|
#readRegistrations;
|