@snagset/server 0.1.23 → 0.1.25

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.
@@ -28,7 +28,7 @@ export const REGISTRY = [
28
28
  { name: "SNAGSET_SESSION_ABSOLUTE_TTL_S", type: "int", default: "43200", required: false, oneOf: null, secret: false, section: "4.3" },
29
29
  { name: "SNAGSET_REVIEW_LINK_TTL_DAYS", type: "int", default: "14", required: false, oneOf: null, secret: false, section: "4.3" },
30
30
  { name: "SNAGSET_REVIEW_LINK_MAX_TTL_DAYS", type: "int", default: "90", required: false, oneOf: null, secret: false, section: "4.3" },
31
- { name: "SNAGSET_WRITE_MODE_GRACE_HOURS", type: "int", default: "24", required: false, oneOf: null, secret: false, section: "4.3" },
31
+ { name: "SNAGSET_WRITE_MODE_GRACE_HOURS", type: "int", default: "0", required: false, oneOf: null, secret: false, section: "4.3" },
32
32
  { name: "SNAGSET_STORAGE_S3_ENDPOINT", type: "url", default: null, required: false, oneOf: null, secret: false, section: "4.4" },
33
33
  { name: "SNAGSET_STORAGE_S3_BUCKET", type: "string", default: null, required: false, oneOf: null, secret: false, section: "4.4" },
34
34
  { name: "SNAGSET_STORAGE_S3_REGION", type: "string", default: "auto", required: false, oneOf: null, secret: false, section: "4.4" },
@@ -1 +1 @@
1
- {"version":3,"file":"config.generated.js","sourceRoot":"","sources":["../src/config.generated.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,4EAA4E;AAC5E,4EAA4E;AAC5E,qFAAqF;AACrF,2EAA2E;AAC3E,gFAAgF;AAchF,4BAA4B;AAC5B,MAAM,CAAC,MAAM,QAAQ,GAAsB;IACzC,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;IACxI,EAAE,IAAI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AAE,kBAAkB,EAAE,EAAE,EAAE,cAAc,EAAE;IAChD,EAAE,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,cAAc,EAAE;IAC/C,EAAE,IAAI,EAAE,yBAAyB,EAAE,EAAE,EAAE,IAAI,EAAE;CAC9C,CAAC"}
@@ -0,0 +1,24 @@
1
+ -- ───────────────────────────────────────
2
+ -- Sites stay open until the studio locks them — D127.
3
+ --
4
+ -- Until now a new site started `open` and switched itself to `link-required`
5
+ -- after SNAGSET_WRITE_MODE_GRACE_HOURS (24 by default). A studio running
6
+ -- QA with designers who have no accounts found its client site locked a day
7
+ -- later, and since 0.1.23 a link-only site also hides its comments from
8
+ -- anyone without a link — so the switch silently took the review away.
9
+ -- Link-required is an option a studio chooses in a site's settings now; the
10
+ -- grace window is opt-in (a number of hours) and defaults to never.
11
+ --
12
+ -- This clears the switches already scheduled on open sites. A site already
13
+ -- set to link-required, by hand or by an earlier switch, is left as it is.
14
+ --
15
+ -- No column changes, so §3 needs no edit and schema:diff:check sees nothing.
16
+ -- THE MAINTENANCE CLAIM: projects is FORCE ROW LEVEL SECURITY and a migration
17
+ -- runs with no app.org_id, so without it this UPDATE would match no rows,
18
+ -- silently. SET LOCAL ends with the migration's transaction.
19
+ SET LOCAL app.maintenance = 'on';
20
+
21
+ UPDATE projects
22
+ SET write_mode_downgrade_at = NULL
23
+ WHERE write_mode = 'open'
24
+ AND write_mode_downgrade_at IS NOT NULL;
package/dist/projects.js CHANGED
@@ -72,7 +72,7 @@ export async function createProject(tx, input) {
72
72
  INSERT INTO projects (id, org_id, uid, name, ip_salt, config_etag, write_mode_downgrade_at, settings)
73
73
  VALUES (${id}, ${input.orgId}, ${uid}, ${name},
74
74
  ${randomBytes(32)}, ${randomBytes(8).toString("hex")},
75
- now() + ${input.graceHours}::int * interval '1 hour',
75
+ ${input.graceHours > 0 ? tx `now() + ${input.graceHours}::int * interval '1 hour'` : null},
76
76
  ${tx.json(input.domain ? { domain: input.domain } : {})}::jsonb)
77
77
  `;
78
78
  // `threads.environment_id` is NOT NULL.
@@ -1 +1 @@
1
- {"version":3,"file":"projects.js","sourceRoot":"","sources":["../src/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AA8CjD;;;;;;;;;GASG;AACH,MAAM,SAAS,GAAG,kCAAkC,CAAC;AACrD,MAAM,UAAU,MAAM,CAAC,MAAc,EAAE,MAAM,GAAG,EAAE;IAChD,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,OAAO,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC;QAC3B,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;YACvC,IAAI,IAAI,IAAI,GAAG,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC;gBAAE,SAAS;YACvC,GAAG,IAAI,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;YAC5B,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM;gBAAE,MAAM;QACnC,CAAC;IACH,CAAC;IACD,OAAO,MAAM,GAAG,GAAG,CAAC;AACtB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,OAA0B;IACxD,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;QAC1B,IAAI,CAAC,MAAM;YAAE,SAAS;QACtB,IAAI,MAAW,CAAC;QAChB,IAAI,CAAC;YACH,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,KAAK,CACb,GAAG,IAAI,CAAC,S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C,IAAI;QACpC,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,CAAC;QAClC,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC;KACrB,EAAE,CAAC;QACX,MAAM,EAAE,CAAA;;gBAEI,UAAU,EAAE,KAAK,KAAK,CAAC,KAAK,KAAK,EAAE,KAAK,GAAG,KAAK,KAAK,KAAK,SAAS;KAC9E,CAAC;IACJ,CAAC;IAED,2EAA2E;IAC3E,yEAAyE;IACzE,8CAA8C;IAC9C,MAAM,EAAE,CAAA;;cAEI,UAAU,EAAE,KAAK,KAAK,CAAC,KAAK,KAAK,EAAE,mBAAmB,KAAK,CAAC,SAAS;GAChF,CAAC;IAEF,+DAA+D;IAC/D,wEAAwE;IACxE,wEAAwE;IACxE,MAAM,qBAAqB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;IAEvE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,EAAE,CAAA;;gBAEI,UAAU,EAAE,KAAK,KAAK,CAAC,KAAK,KAAK,EAAE,KAAK,MAAM,KAAK,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;KACnF,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snagset/server",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "The Snagset server: API, dashboard and widget in one package. Node and Postgres, or Vercel.",
@@ -1,5 +1,5 @@
1
- var X,C,Fe,B,Be,Ke,qe,ve,Z,G,We,we,$e,Se,ee={},ne=[],Ln=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,te=Array.isArray;function H(e,n){for(var t in n)e[t]=n[t];return e}function Ce(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function z(e,n,t){var o,s,a,i={};for(a in n)a=="key"?o=n[a]:a=="ref"?s=n[a]:i[a]=n[a];if(arguments.length>2&&(i.children=arguments.length>3?X.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return oe(e,i,o,s,null)}function oe(e,n,t,o,s){var a={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Fe,__i:-1,__u:0};return s==null&&C.vnode!=null&&C.vnode(a),a}function I(e){return e.children}function re(e,n){this.props=e,this.context=n}function K(e,n){if(n==null)return e.__?K(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if((t=e.__k[n])!=null&&t.__e!=null)return t.__e;return typeof e.type=="function"?K(e):null}function Un(e){if(e.__P&&e.__d){var n=e.__v,t=n.__e,o=[],s=[],a=H({},n);a.__v=n.__v+1,C.vnode&&C.vnode(a),Ee(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[t]:null,o,t??K(n),!!(32&n.__u),s),a.__v=n.__v,a.__.__k[a.__i]=a,en(o,a,s),n.__e=n.__=null,a.__e!=t&&Ye(a)}}function Ye(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),Ye(e)}function Ge(e){(!e.__d&&(e.__d=!0)&&B.push(e)&&!ae.__r++||Be!=C.debounceRendering)&&((Be=C.debounceRendering)||Ke)(ae)}function ae(){try{for(var e,n=1;B.length;)B.length>n&&B.sort(qe),e=B.shift(),n=B.length,Un(e)}finally{B.length=ae.__r=0}}function Ve(e,n,t,o,s,a,i,d,g,c,m){var w,u,f,S,k,h,y=o&&o.__k||ne,$=n.length;for(g=jn(t,n,y,g,$),w=0;w<$;w++)(f=t.__k[w])!=null&&(u=f.__i!=-1&&y[f.__i]||ee,f.__i=w,h=Ee(e,f,u,s,a,i,d,g,c,m),S=f.__e,f.ref&&u.ref!=f.ref&&(u.ref&&Me(u.ref,null,f),m.push(f.ref,f.__c||S,f)),k==null&&S!=null&&(k=S),4&f.__u?(g=Je(f,g,e),u.__e&&(u.__e=null)):typeof f.type=="function"&&h!==void 0?g=h:S&&(g=S.nextSibling),f.__u&=-7);return t.__e=k,g}function jn(e,n,t,o,s){var a,i,d,g,c,m=t.length,w=m,u=0;for(e.__k=new Array(s),a=0;a<s;a++)(i=n[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?i=e.__k[a]=oe(null,i,null,null,null):te(i)?i=e.__k[a]=oe(I,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?i=e.__k[a]=oe(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):e.__k[a]=i,g=a+u,i.__=e,i.__b=e.__b+1,d=null,(c=i.__i=Hn(i,t,g,w))!=-1&&(w--,(d=t[c])&&(d.__u|=2)),d==null||d.__v==null?(c==-1&&(s>m?u--:s<m&&u++),typeof i.type!="function"&&(i.__u|=4)):c!=g&&(c==g-1?u--:c==g+1?u++:(c>g?u--:u++,i.__u|=4))):e.__k[a]=null;if(w)for(a=0;a<m;a++)(d=t[a])!=null&&(2&d.__u)==0&&(d.__e==o&&(o=K(d)),tn(d,d));return o}function Je(e,n,t){var o,s;if(typeof e.type=="function"){for(o=e.__k,s=0;o&&s<o.length;s++)o[s]&&(o[s].__=e,n=Je(o[s],n,t));return n}e.__e!=n&&(n&&e.type&&!n.parentNode&&(n=K(e)),n=t.insertBefore(e.__e,n||null));do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function Hn(e,n,t,o){var s,a,i,d=e.key,g=e.type,c=n[t],m=c!=null&&(2&c.__u)==0;if(c===null&&d==null||m&&d==c.key&&g==c.type)return t;if(o>(m?1:0)){for(s=t-1,a=t+1;s>=0||a<n.length;)if((c=n[i=s>=0?s--:a++])!=null&&(2&c.__u)==0&&d==c.key&&g==c.type)return i}return-1}function Qe(e,n,t){n[0]=="-"?e.setProperty(n,t??""):e[n]=t==null?"":typeof t!="number"||Ln.test(n)?t:t+"px"}function se(e,n,t,o,s){var a,i;e:if(n=="style")if(typeof t=="string")e.style.cssText=t;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||Qe(e.style,n,"");if(t)for(n in t)o&&t[n]==o[n]||Qe(e.style,n,t[n])}else if(n[0]=="o"&&n[1]=="n")a=n!=(n=n.replace(We,"$1")),i=n.toLowerCase(),n=i in e||n=="onFocusOut"||n=="onFocusIn"?i.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+a]=t,t?o?t[G]=o[G]:(t[G]=we,e.addEventListener(n,a?Se:$e,a)):e.removeEventListener(n,a?Se:$e,a);else{if(s=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&t==1?"":t))}}function Xe(e){return function(n){if(this.l){var t=this.l[n.type+e];if(n[Z]==null)n[Z]=we++;else if(n[Z]<t[G])return;return t(C.event?C.event(n):n)}}}function Ee(e,n,t,o,s,a,i,d,g,c){var m,w,u,f,S,k,h,y,$,E,P,R,A,b,x,q,N=n.type;if(n.constructor!==void 0)return null;128&t.__u&&(g=!!(32&t.__u),a=[d=n.__e=t.__e]),(m=C.__b)&&m(n);e:if(typeof N=="function"){w=i.length;try{if($=n.props,E=N.prototype&&N.prototype.render,P=(m=N.contextType)&&o[m.__c],R=m?P?P.props.value:m.__:o,t.__c?y=(u=n.__c=t.__c).__=u.__E:(E?n.__c=u=new N($,R):(n.__c=u=new re($,R),u.constructor=N,u.render=Bn),P&&P.sub(u),u.state||(u.state={}),u.__n=o,f=u.__d=!0,u.__h=[],u._sb=[]),E&&u.__s==null&&(u.__s=u.state),E&&N.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=H({},u.__s)),H(u.__s,N.getDerivedStateFromProps($,u.__s))),S=u.props,k=u.state,u.__v=n,f)E&&N.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),E&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(E&&N.getDerivedStateFromProps==null&&$!==S&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps($,R),n.__v==t.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate($,u.__s,R)===!1){n.__v!=t.__v&&(u.props=$,u.state=u.__s,u.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.some(function(F){F&&(F.__=n)}),ne.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&i.push(u),d=K(t);break e}u.componentWillUpdate!=null&&u.componentWillUpdate($,u.__s,R),E&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(S,k,h)})}if(u.context=R,u.props=$,u.__P=e,u.__e=!1,A=C.__r,b=0,E)u.state=u.__s,u.__d=!1,A&&A(n),m=u.render(u.props,u.state,u.context),ne.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,A&&A(n),m=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++b<25);u.state=u.__s,u.getChildContext!=null&&(o=H(H({},o),u.getChildContext())),E&&!f&&u.getSnapshotBeforeUpdate!=null&&(h=u.getSnapshotBeforeUpdate(S,k)),x=m!=null&&m.type===I&&m.key==null?nn(m.props.children):m,d=Ve(e,te(x)?x:[x],n,t,o,s,a,i,d,g,c),u.base=n.__e,n.__u&=-161,u.__h.length&&i.push(u),y&&(u.__E=u.__=null)}catch(F){if(i.length=w,n.__v=null,g||a!=null){if(F.then){for(n.__u|=g?160:128;d&&d.nodeType==8&&d.nextSibling;)d=d.nextSibling;a!=null&&(a[a.indexOf(d)]=null),n.__e=d}else if(a!=null)for(q=a.length;q--;)Ce(a[q])}else n.__e=t.__e;n.__k==null&&(n.__k=t.__k||[]),F.then||Ze(n),C.__e(F,n,t)}}else a==null&&n.__v==t.__v?(n.__k=t.__k,n.__e=t.__e):d=n.__e=Fn(t.__e,n,t,o,s,a,i,g,c);return(m=C.diffed)&&m(n),128&n.__u?void 0:d}function Ze(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ze))}function en(e,n,t){for(var o=0;o<t.length;o++)Me(t[o],t[++o],t[++o]);C.__c&&C.__c(n,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(a){a.call(s)})}catch(a){C.__e(a,s.__v)}})}function nn(e){return typeof e!="object"||e==null||e.__b>0?e:te(e)?e.map(nn):e.constructor!==void 0?null:H({},e)}function Fn(e,n,t,o,s,a,i,d,g){var c,m,w,u,f,S,k,h=t.props||ee,y=n.props,$=n.type;if($=="svg"?s="http://www.w3.org/2000/svg":$=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),a!=null){for(c=0;c<a.length;c++)if((f=a[c])&&"setAttribute"in f==!!$&&($?f.localName==$:f.nodeType==3)){e=f,a[c]=null;break}}if(e==null){if($==null)return document.createTextNode(y);e=document.createElementNS(s,$,y.is&&y),d&&(C.__m&&C.__m(n,a),d=!1),a=null}if($==null)h===y||d&&e.data==y||(e.data=y);else{if(a=$=="textarea"&&y.defaultValue!=null?null:a&&X.call(e.childNodes),!d&&a!=null)for(h={},c=0;c<e.attributes.length;c++)h[(f=e.attributes[c]).name]=f.value;for(c in h)f=h[c],c=="dangerouslySetInnerHTML"?w=f:c=="children"||c in y||c=="value"&&"defaultValue"in y||c=="checked"&&"defaultChecked"in y||se(e,c,null,f,s);for(c in y)f=y[c],c=="children"?u=f:c=="dangerouslySetInnerHTML"?m=f:c=="value"?S=f:c=="checked"?k=f:d&&typeof f!="function"||h[c]===f||se(e,c,f,h[c],s);if(m)d||w&&(m.__html==w.__html||m.__html==e.innerHTML)||(e.innerHTML=m.__html),n.__k=[];else if(w&&(e.innerHTML=""),Ve(n.type=="template"?e.content:e,te(u)?u:[u],n,t,o,$=="foreignObject"?"http://www.w3.org/1999/xhtml":s,a,i,a?a[0]:t.__k&&K(t,0),d,g),a!=null)for(c=a.length;c--;)Ce(a[c]);d&&$!="textarea"||(c="value",$=="progress"&&S==null?e.removeAttribute("value"):S!=null&&(S!==e[c]||$=="progress"&&!S||$=="option"&&S!=h[c])&&se(e,c,S,h[c],s),c="checked",k!=null&&k!=e[c]&&se(e,c,k,h[c],s))}return e}function Me(e,n,t){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&n==null||(e.__u=e(n))}else e.current=n}catch(s){C.__e(s,t)}}function tn(e,n,t){var o,s;if(C.unmount&&C.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||Me(o,null,n)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(a){C.__e(a,n)}o.base=o.__P=o.__n=null}if(o=e.__k)for(s=0;s<o.length;s++)o[s]&&tn(o[s],n,t||typeof e.type!="function");t||Ce(e.__e),e.__c=e.__=e.__e=void 0}function Bn(e,n,t){return this.constructor(e,t)}function on(e,n,t){var o,s,a,i;n==document&&(n=document.documentElement),C.__&&C.__(e,n),s=(o=!1)?null:n.__k,a=[],i=[],Ee(n,e=n.__k=z(I,null,[e]),s||ee,ee,n.namespaceURI,s?null:n.firstChild?X.call(n.childNodes):null,a,s?s.__e:n.firstChild,o,i),en(a,e,i),e.props.children=null}X=ne.slice,C={__e:function(e,n,t,o){for(var s,a,i;n=n.__;)if((s=n.__c)&&!s.__)try{if((a=s.constructor)&&a.getDerivedStateFromError!=null&&(s.setState(a.getDerivedStateFromError(e)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,o||{}),i=s.__d),i)return s.__E=s}catch(d){e=d}throw e}},Fe=0,re.prototype.setState=function(e,n){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=H({},this.state),typeof e=="function"&&(e=e(H({},t),this.props)),e&&H(t,e),e!=null&&this.__v&&(n&&this._sb.push(n),Ge(this))},re.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ge(this))},re.prototype.render=I,B=[],Ke=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,qe=function(e,n){return e.__v.__b-n.__v.__b},ae.__r=0,ve=Math.random().toString(8),Z="__d"+ve,G="__a"+ve,We=/(PointerCapture)$|Capture$/i,we=0,$e=Xe(!1),Se=Xe(!0);var Kn=0;function r(e,n,t,o,s,a){n||(n={});var i,d,g=n;if("ref"in g)for(d in g={},n)d=="ref"?i=n[d]:g[d]=n[d];var c={type:e,props:g,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Kn,__i:-1,__u:0,__source:s,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(d in i)g[d]===void 0&&(g[d]=i[d]);return C.vnode&&C.vnode(c),c}const qn="Snagset",Wn="snagset",Yn="snagset:",Gn="Snagset",Vn="Snag",Jn="Snags",v={font:"--snag-font",accent:"--snag-accent",onAccent:"--snag-onAccent",bg:"--snag-bg",fg:"--snag-fg",muted:"--snag-muted",border:"--snag-border",radius:"--snag-radius",shadow:"--snag-shadow",z:"--snag-z",motion:"--snag-motion",surface:"--snag-surface",sunken:"--snag-sunken",hover:"--snag-hover",focus:"--snag-focus",disabled:"--snag-disabled",statusOpen:"--snag-status-open",statusProgress:"--snag-status-progress",statusReview:"--snag-status-review",statusResolved:"--snag-status-resolved",anchorOrphan:"--snag-anchor-orphan",tbH:"--snag-tb-h",dockW:"--snag-dock-w",kb:"--snag-kb",thumbX:"--snag-thumb-x",thumbW:"--snag-thumb-w"},Qn=e=>`var(${v[e]})`,Xn=e=>"snag_"+e,rn={query:["snag_t","snag_off","snag_debug","snag_theme"],fragment:["snag_k"]},an="snag:identity",Zn="data-snag-theme";var V,M,Te,sn,ie=0,ln=[],T=C,dn=T.__b,cn=T.__r,un=T.diffed,pn=T.__c,gn=T.unmount,hn=T.__;function Re(e,n){T.__h&&T.__h(M,e,ie||n),ie=0;var t=M.__H||(M.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function D(e){return ie=1,et(_n,e)}function et(e,n,t){var o=Re(V++,2);if(o.t=e,!o.__c&&(o.__=[_n(void 0,n),function(d){var g=o.__N?o.__N[0]:o.__[0],c=o.t(g,d);g!==c&&(o.__N=[c,o.__[1]],o.__c.setState({}))}],o.__c=M,!M.__f)){var s=function(d,g,c){if(!o.__c.__H)return!0;var m=!1,w=o.__c.props!==d;if(o.__c.__H.__.some(function(f){if(f.__N){m=!0;var S=f.__[0];f.__=f.__N,f.__N=void 0,S!==f.__[0]&&(w=!0)}}),a){var u=a.call(this,d,g,c);return m?u||w:u}return!m||w};M.__f=!0;var a=M.shouldComponentUpdate,i=M.componentWillUpdate;M.componentWillUpdate=function(d,g,c){if(this.__e){var m=a;a=void 0,s(d,g,c),a=m}i&&i.call(this,d,g,c)},M.shouldComponentUpdate=s}return o.__N||o.__}function L(e,n){var t=Re(V++,3);!T.__s&&mn(t.__H,n)&&(t.__=e,t.u=n,M.__H.__h.push(t))}function U(e){return ie=5,nt(function(){return{current:e}},[])}function nt(e,n){var t=Re(V++,7);return mn(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function tt(){for(var e;e=ln.shift();){var n=e.__H;if(e.__P&&n)try{n.__h.some(le),n.__h.some(De),n.__h=[]}catch(t){n.__h=[],T.__e(t,e.__v)}}}T.__b=function(e){M=null,dn&&dn(e)},T.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),hn&&hn(e,n)},T.__r=function(e){cn&&cn(e),V=0;var n=(M=e.__c).__H;n&&(Te===M?(n.__h=[],M.__h=[],n.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(n.__h.some(le),n.__h.some(De),n.__h=[],V=0)),Te=M},T.diffed=function(e){un&&un(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(ln.push(n)!==1&&sn===T.requestAnimationFrame||((sn=T.requestAnimationFrame)||ot)(tt)),n.__H.__.some(function(t){t.u&&(t.__H=t.u,t.u=void 0)})),Te=M=null},T.__c=function(e,n){n.some(function(t){try{t.__h.some(le),t.__h=t.__h.filter(function(o){return!o.__||De(o)})}catch(o){n.some(function(s){s.__h&&(s.__h=[])}),n=[],T.__e(o,t.__v)}}),pn&&pn(e,n)},T.unmount=function(e){gn&&gn(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.some(function(o){try{le(o)}catch(s){n=s}}),t.__H=void 0,n&&T.__e(n,t.__v))};var fn=typeof requestAnimationFrame=="function";function ot(e){var n,t=function(){clearTimeout(o),fn&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,35);fn&&(n=requestAnimationFrame(t))}function le(e){var n=M,t=e.__c;typeof t=="function"&&(e.__c=void 0,t()),M=n}function De(e){var n=M;e.__c=e.__(),M=n}function mn(e,n){return!e||e.length!==n.length||n.some(function(t,o){return t!==e[o]})}function _n(e,n){return typeof n=="function"?n(e):n}const rt={product:qn,set:Gn,item:Vn,items:Jn};function kn(e){return(n,t)=>(e[n]??"").replace(/\{(\w+)\}/g,(o,s)=>{const a=t?.[s]??rt[s];return a===void 0?o:String(a)})}const O=e=>new Intl.NumberFormat().format(e),bn={"where.anchored":"{label}","where.approximate":"position approximate \u2014 the page changed","where.orphaned":"moved \u2014 the element is gone","status.open":"Active","status.progress":"In progress","status.review":"In review","status.resolved":"Resolved","author.unknown":"Someone","label.image":"an image","label.link":"a link","label.button":"a button","label.tag":"the {tag}"},at=kn(bn),de={open:{colour:"#4f6ef7"},progress:{colour:"#f59e0b"},review:{colour:"#8b5cf6"},resolved:{colour:"#10b981"}},ce=e=>de[e]?.colour??"#8a8f98",xn=e=>e==="open"||e==="review"?"#fff":"#16161a",ue=e=>e in de?at(`status.${e}`):e,l=Object.fromEntries(Object.keys(v).map(e=>[e,Qn(e)])),st=Object.entries(de).map(([e,n])=>` ${v[`status${e[0].toUpperCase()}${e.slice(1)}`]}:${n.colour};`).join(`
2
- `);`${l.font}${l.fg}${v.font}${v.accent}${v.bg}${v.fg}${v.muted}${v.border}${v.radius}${v.shadow}${v.z}${v.motion}${v.surface}${l.fg}${l.bg}${v.sunken}${l.fg}${l.bg}${v.hover}${l.fg}${l.bg}${v.onAccent}${v.focus}${l.accent}${l.fg}${v.disabled}${l.muted}${l.bg}${st}${v.anchorOrphan}${Zn}${v.accent}${v.onAccent}${v.bg}${v.fg}${v.muted}${v.border}${v.shadow}${v.motion}${v.bg}${v.fg}${v.muted}${v.border}${v.accent}${v.onAccent}${v.surface}${v.sunken}${v.hover}${v.focus}${v.disabled}${v.shadow}${v.anchorOrphan}`;const it={dock:5},yn=new WeakMap;function vn(e,n,t){let o=yn.get(e);if(o||yn.set(e,o=new Set),o.has(n))return;o.add(n);try{const i=new CSSStyleSheet;i.replaceSync(t),e.adoptedStyleSheets=[...e.adoptedStyleSheets,i];return}catch{}const a=(e.ownerDocument??document).createElement("style");a.setAttribute(`data-snag-${n}`,""),a.textContent=t,e.appendChild(a)}const lt=` .snag-input,.snag-text{width:100%;box-sizing:border-box;background:${l.surface};color:inherit;border:1px solid ${l.border};border-radius:${l.radius};padding:8px;font:inherit;resize:vertical}@media (pointer:coarse){.snag-input,.snag-text{font-size:16px}}.snag-input:focus,.snag-text:focus{outline:2px solid ${l.focus};outline-offset:1px;border-color:transparent}.snag-input--bad{border-color:${l.anchorOrphan}}.snag-note{margin:-2px 0 0;color:${l.anchorOrphan};font-size:11px;line-height:1.35}.snag-note.snag-dim{color:${l.muted}}.snag-actions{display:flex;justify-content:flex-end;gap:6px}.snag-actions button{appearance:none;border:0;border-radius:calc(${l.radius} - 1px);padding:7px 13px;font:inherit;cursor:pointer;min-height:32px;transition:background ${l.motion}}.snag-cancel{background:transparent;color:${l.muted}}.snag-armed{color:${l.anchorOrphan};font-weight:600}.snag-cancel:hover{background:${l.hover};color:inherit}.snag-send{background:${l.accent};color:${l.onAccent};font-weight:600}.snag-send:disabled{opacity:.45;cursor:not-allowed}.snag-actions button:focus-visible{outline:2px solid ${l.focus};outline-offset:2px}`;function dt(e,n,t){const[o,s]=D(!1);return L(()=>{if(!o)return;const a=setTimeout(()=>s(!1),3e3);return()=>clearTimeout(a)},[o]),{armed:o,press(){if(o||n){s(!1),e();return}s(!0)}}}function ct(e){const n=window.visualViewport;if(!n)return;let t=0,o=0;const s=()=>{t=0;const d=Math.max(0,Math.round(window.innerHeight-n.height-n.offsetTop));e.style.setProperty(v.kb,`${d}px`)},a=()=>{t||(t=requestAnimationFrame(s))},i=()=>{clearTimeout(o),o=window.setTimeout(s,300)};return s(),n.addEventListener("resize",a),n.addEventListener("scroll",a),window.addEventListener("orientationchange",a),e.addEventListener("focusout",i),()=>{t&&cancelAnimationFrame(t),clearTimeout(o),n.removeEventListener("resize",a),n.removeEventListener("scroll",a),window.removeEventListener("orientationchange",a),e.removeEventListener("focusout",i)}}const ut="noreferrer nofollow";function pt(e){const n=e.trim();if(!n||/[-]/.test(n)||n.startsWith("//"))return null;const t=/^([a-z][a-z0-9+.-]*):/i.exec(n);return t?/^(https?|mailto)$/i.test(t[1])?n:null:n}const gt=new RegExp(["\\*\\*(?=\\S)(?<bold>[\\s\\S]*?\\S)\\*\\*","(?<!\\w)__(?=\\S)(?<boldU>[\\s\\S]*?\\S)__(?!\\w)","(?<!\\*)\\*(?!\\*)(?=\\S)(?<em>[\\s\\S]*?\\S)(?<!\\*)\\*(?!\\*)","(?<!\\w)_(?=\\S)(?<emU>[\\s\\S]*?\\S)_(?!\\w)","`(?<code>[^`]+)`","\\[(?<label>[^\\]\\n]*)\\]\\((?<href>(?:[^()\\s]|\\([^()\\s]*\\))*)\\)"].join("|")),ht=4;function pe(e,n=0,t=0){const o=[];let s=e,a=n;if(t>=ht)return e?[e]:[];for(;;){const i=gt.exec(s);if(!i)return s&&o.push(s),o;i.index>0&&o.push(s.slice(0,i.index));const d=`i${a++}`,g=i.groups,c=g.bold??g.boldU,m=g.em??g.emU;if(c!==void 0)o.push(z("strong",{key:d},pe(c,a,t+1)));else if(m!==void 0)o.push(z("em",{key:d},pe(m,a,t+1)));else if(g.code!==void 0)o.push(z("code",{key:d},g.code));else{const w=pt(g.href??"");o.push(w?z("a",{key:d,href:w,target:"_blank",rel:ut},g.label??""):i[0])}s=s.slice(i.index+i[0].length)}}const Ae=/^```[^\n]*$/,Pe=/^[-*]\s+(.*)$/,Ne=/^\d{1,9}[.)]\s+(.*)$/;function wn(e){const n=e.split(`
3
- `),t=[];let o=0,s=0;for(;o<n.length;){const a=n[o];if(Ae.test(a)){const c=[];for(o++;o<n.length&&!Ae.test(n[o]);)c.push(n[o++]);o++,t.push(z("pre",{key:`b${s++}`},z("code",null,c.join(`
4
- `))));continue}const i=Pe.exec(a),d=Ne.exec(a);if(i||d){const c=i?Pe:Ne,m=[];for(;o<n.length;){const w=c.exec(n[o]);if(!w)break;m.push(z("li",{key:`l${m.length}`},pe(w[1]))),o++}t.push(z(i?"ul":"ol",{key:`b${s++}`},m));continue}const g=[];for(;o<n.length;){const c=n[o];if(!c.trim()||Ae.test(c)||Pe.test(c)||Ne.test(c))break;g.push(c),o++}g.length?t.push(z("p",{key:`b${s++}`},pe(g.join(`
5
- `)))):o++}return z("div",{class:"snag-md"},t)}const ft=`${Yn}session`;function mt(e,n,t){if(e.origin!==n||!t||e.source!==t)return!1;const o=e.data;return!!o&&o.type===ft&&typeof o.session?.sessionToken=="string"&&typeof o.session.reviewer?.name=="string"}function _t(e,n,t,o){const s=new URLSearchParams({project:n,origin:t});return o&&s.set("env",o),`${new URL(e).origin}/widget-signin?${s}`}function kt(e,n,t){const o=new URL(e).origin,s=window.open(_t(e,n,location.origin,t),`${Wn}-signin`,"popup,width=480,height=600");return s?new Promise(a=>{let i=0;const d=m=>{removeEventListener("message",g),clearInterval(c),a(m)},g=m=>{mt(m,o,s)&&d(m.data.session)};addEventListener("message",g);const c=setInterval(()=>{s.closed&&++i>1&&d(null)},400)}):Promise.resolve("blocked")}function $n(){let e=null;try{e=localStorage.getItem(an)}catch{return{}}if(!e)return{};if(e[0]!=="{")return{name:e};try{const n=JSON.parse(e);return n&&typeof n=="object"?n:{}}catch{return{}}}function bt(e){try{localStorage.setItem(an,JSON.stringify(e))}catch{}}function xt(){const e=$n();return{name:typeof e.name=="string"?e.name:"",...e.email?{email:e.email}:{}}}function yt(e){const n=$n();bt({...n,name:e.name,...e.email?{email:e.email}:{}})}const vt={"detail.details":"Anchor details","detail.hidden":"This element isn't visible right now \u2014 it may be inside a closed menu, tab, or accordion.","detail.orphaned":"The element this was pinned to has moved or gone \u2014 it was {label}.","detail.approximate":"The page changed since this was written, so the pin is close rather than exact \u2014 it points at {label}.","detail.unavailable":"Some of the matching steps couldn't load, so this was judged with the basic ones only.","detail.filedat":"Filed at {query}.","detail.openquery":"Open with original query","capture.agent":"{browser} \xB7 {os}","capture.agent.noos":"{browser}","capture.device":"{device} \xB7 {w}\xD7{h} @{dpr}x","capture.device.at1x":"{device} \xB7 {w}\xD7{h}"},wt={"disclosure.title":"Before your first comment","disclosure.always":"Each comment carries the page address, viewport size and browser make.","disclosure.crumbs.on":"Recent console messages and network results ride along, recognisable secrets redacted first.","disclosure.crumbs.off":"Console and network capture is off here.","disclosure.screenshot.off":"Screenshots are off for this project.","disclosure.screenshot.on":"{product} never reads what you type. Screenshots are pictures of the page, so anything visible on screen is in the picture \u2014 mark sensitive regions with {maskAttr} and they are blurred before the screenshot leaves your browser.","disclosure.retention":"Everything stays in this browser until someone exports it \u2014 the privacy notes list what can still leak.","disclosure.retention.server":"Your comment, the page address and the details above are sent to {host} when you post \u2014 the privacy notes list what can still leak.","disclosure.ack":"Got it","composer.aria":"New comment","composer.parent":"Pin the parent","composer.child":"Pin the first child","composer.shot":"Add a screenshot","composer.name":"Your name","composer.email":"Email, so we can reply","composer.email.bad":"Check the address \u2014 or leave it blank.","composer.signin":"Studio member? Sign in","composer.signin.blocked":"Allow pop-ups for this page to sign in.","composer.member":"Commenting as {name}","composer.signout":"Not you? Sign out","composer.round.closed":"This round is closed \u2014 your comment goes to {round}.","composer.chars":"{n} characters left","composer.body":"Comment","composer.body.placeholder":"What's the {item}?","action.cancel":"Cancel","action.post":"Post comment","composer.discard.sure":"Sure? Discard this comment","action.discard":"Discard?"},$t={"shot.open":"See the screenshot","shot.aria":"Screenshot","shot.close":"Close","announce.status":"Comment {key} set to {status}.","search.placeholder":"Search {n} comments\u2026","search.aria":"Search comments","round.label":"Round","round.closed":"(closed)","filter.status":"Status","filter.selectall":"Select all","sort.button":"Sort","sort.newest":"Newest first","sort.oldest":"Oldest first","sort.page":"By page","filter.button":"Filter","filter.button.n":"Filter \xB7 {n}","filter.by":"Comments by","filter.by.anyone":"Anyone","filter.pages":"Pages","filter.pages.all":"All pages","filter.pageonly":"Show comments on this page only","filter.new":"See new activity \xB7 {n}","filter.new.on":"Showing new activity \u2014 show all","filter.new.none":"You\u2019re caught up \u2014 show all","filter.read":"Marked as","filter.read.all":"Anyone\u2019s, read or not","filter.read.unread":"Unread","filter.read.read":"Read","dock.unread":"Unread","badge.anchored":"","badge.approximate":"~","badge.orphaned":"moved","badge.hidden":"hidden","capture.label":"Comment left on","capture.page":"{route}","device.Mobile":"Mobile","device.Desktop":"Desktop","dock.aria":"All comments","dock.title.list":"All comments","dock.title.detail":"Comment","dock.close":"Close all comments","dock.empty":"No comments yet. Press +, then click anything on the page.","dock.empty.filter":"Nothing matches that filter.","dock.empty.orphans":"Every comment here lost its element \u2014 but what each one pointed at is still recorded.","dock.empty.page":"Nothing on this page. {n} comments on {m} other pages.","dock.row.empty":"(no comment)","dock.replies":"{n} replies","dock.goto":"Go to {route}","dock.cluster":"{n} comments in this cluster","dock.cluster.clear":"Show all","dock.hiddenrow":"That comment is now hidden by your filter","dock.hiddenrow.show":"Show","dock.back":"All","dock.back.aria":"Back to all comments","dock.position":"{n} of {total}","dock.prev":"Previous comment","dock.next":"Next comment","dock.clear":"Clear all","dock.clear.aria":"Delete every comment in this review","comment.edit":"Edit this comment","comment.delete":"Delete this comment and its pin","reply.delete":"Delete this reply","time.now":"just now","who.name":"Your name","who.email":"Email, so we can reply","who.email.bad":"Check the address \u2014 or leave it blank.","who.signin":"Studio member? Sign in","who.signin.blocked":"Allow pop-ups for this page to sign in.","who.member":"Replying as {name}","who.signout":"Not you? Sign out","detail.hidden.show":"Show anyway","field.status":"Status","field.status.locked":"Only the studio can change status here.","field.assignee":"Assigned to","assignee.none":"Unassigned","permalink.copy":"Copy link","permalink.copied":"Copied","reply.add":"Add reply","reply.aria":"Reply","reply.placeholder":"Reply\u2026","reply.send":"Reply","action.more":"More actions","action.edit":"Edit","action.delete":"Delete","action.save":"Save","action.sure":"Sure?","export.button":"Export","export.md":"Markdown","export.json":"JSON"},St={...bn,...vt,...wt,...$t},p=kn(St),Ct=[/^utm_/,/^(gclid|gbraid|wbraid|fbclid|msclkid|ttclid|twclid|igshid|yclid|li_fat_id)$/,/^(mc_cid|mc_eid|_hsenc|_hsmi|vero_id|oly_enc_id|oly_anon_id)$/,/^_vercel_/,/^__vercel_/,/^_rsc$/],Et=[...rn.query,...rn.fragment];function Mt(e,n=[]){return Et.includes(e)||n.includes(e)?!0:Ct.some(t=>t.test(e))}const ge=["open","progress","review","resolved"];function Tt(e,n){const t=e.includes(n)?e.filter(o=>o!==n):[...e,n];return t.length>=ge.length?[]:t}function Rt(e,n,t){if(n.statuses.length>0&&ge.includes(e.status)&&!n.statuses.includes(e.status)||n.by&&e.createdBy.id!==n.by||n.page&&e.route!==n.page)return!1;if(n.read!=="all"&&t){const o=he(e,t);if(n.read==="unread"&&!o||n.read==="read"&&o)return!1}return!0}function he(e,n){const t=n.get(e.id)??0;return Date.parse(e.updatedAt)>t}function Dt(e,n,t,o){let s=e;n.pageOnly&&(s=s.filter(i=>i.route===t)),n.newOnly&&o&&(s=s.filter(i=>he(i,o)));const a=n.q?.trim().toLowerCase();return a&&(s=s.filter(i=>i.comments.some(d=>(d.body??"").toLowerCase().includes(a)||d.author.name.toLowerCase().includes(a))||i.createdBy.name.toLowerCase().includes(a))),s}function At(e,n){if(n==="page")return e;const t=(s,a)=>Date.parse(s.createdAt)-Date.parse(a.createdAt),o=[...e].sort(t);return n==="oldest"?o:o.reverse()}function Pt(e){const n=new Map;for(const t of e)n.set(t.status,(n.get(t.status)??0)+1);return{all:e.length,byStatus:n}}function Nt(e){return(e.read!=="all"?1:0)+(e.by?1:0)+(e.page?1:0)}const Oe=Object.keys(de);function Sn({label:e,title:n,cls:t,role:o,onConfirm:s}){const{armed:a,press:i}=dt(s);return r("button",{type:"button",...o===void 0?{}:{role:o},class:`${t}${a?" snag-dk-armed":""}`,"aria-label":a?`${p("action.sure")} ${n}`:n,title:n,onClick:i,children:a?p("action.sure"):e})}function Ot({snag:e}){const n=e.context?.derived?.device;if(!n)return null;const t=p(`device.${n}`);return r("span",{class:"snag-dk-dev",title:t,"aria-label":t,role:"img",children:n==="Mobile"?r("svg",{width:"11",height:"14",viewBox:"0 0 11 14",fill:"none","aria-hidden":"true",children:[r("rect",{x:".75",y:".75",width:"9.5",height:"12.5",rx:"1.75",stroke:"currentColor","stroke-width":"1.5"}),r("path",{d:"M4.5 11h2",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}):r("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:[r("rect",{x:".75",y:"1.75",width:"12.5",height:"8.5",rx:"1.75",stroke:"currentColor","stroke-width":"1.5"}),r("path",{d:"M5 12.75h4",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]})})}function zt({anchor:e}){const n=[];if(e.testid&&n.push(["testid",e.testid]),e.domid&&n.push(["id",e.domid]),e.css&&n.push(["css",e.css]),e.hostPath?.length&&n.push(["shadow host",e.hostPath.join(" >> ")]),e.role&&n.push(["role",e.role]),e.accessibleName&&n.push(["name",e.accessibleName]),e.text?.exact&&n.push(["text",e.text.exact]),e.path?.length&&n.push(["path",e.path.join(" > ")]),e.rect){const t=e.rect;n.push(["rect",`${Math.round(t.x)}, ${Math.round(t.y)} \u2014 ${Math.round(t.w)} x ${Math.round(t.h)}`])}return e.breakpoint&&n.push(["breakpoint",`${e.breakpoint} at capture \xB7 you are at ${typeof window>"u"?"?":window.innerWidth}px`]),r("details",{class:"snag-dk-anchor",children:[r("summary",{children:p("detail.details")}),r("dl",{children:n.map(([t,o])=>r("div",{children:[r("dt",{children:t}),r("dd",{children:o})]},t))})]})}function Cn({iso:e}){const n=Date.parse(e);if(!Number.isFinite(n))return null;const t=new Date(n),o=Math.round((n-Date.now())/1e3);let s;if(Math.abs(o)<45)s=p("time.now");else if(Math.abs(o)<7*86400){const a=new Intl.RelativeTimeFormat(void 0,{numeric:"auto",style:"short"}),[i,d]=Math.abs(o)<3600?[Math.round(o/60),"minute"]:Math.abs(o)<86400?[Math.round(o/3600),"hour"]:[Math.round(o/86400),"day"];s=a.format(i,d)}else s=t.toLocaleDateString(void 0,{day:"numeric",month:"short",...t.getFullYear()===new Date().getFullYear()?{}:{year:"numeric"}});return r("time",{class:"snag-dk-dim snag-dk-when",dateTime:t.toISOString(),title:t.toLocaleString(),children:s})}function En({body:e,onEdit:n,deleteLabel:t,onDelete:o}){const s=e??"",[a,i]=D(!1),[d,g]=D(!1),[c,m]=D(s),w=U(null),u=f=>{f.key!=="Escape"||!d||(f.stopPropagation(),g(!1))};return L(()=>{a&&w.current?.focus()},[a]),a&&n?r("div",{class:"snag-dk-editbox",children:[r("textarea",{ref:w,class:"snag-text",rows:3,"aria-label":p("comment.edit"),value:c,onInput:f=>m(f.target.value),onKeyDown:f=>{f.key==="Enter"&&(f.metaKey||f.ctrlKey)&&(f.preventDefault(),c.trim()&&(n(c.trim()),i(!1))),f.key==="Escape"&&(f.stopPropagation(),m(s),i(!1))}}),r("div",{class:"snag-actions",children:[r("button",{type:"button",class:"snag-cancel",onClick:()=>{m(s),i(!1)},children:p("action.cancel")}),r("button",{type:"button",class:"snag-send",disabled:!c.trim()||c.trim()===s,onClick:()=>{n(c.trim()),i(!1)},children:p("action.save")})]})]}):r("div",{class:"snag-dk-acts snag-dk-menus",onKeyDown:u,children:[d&&r("div",{class:"snag-dk-menubg","aria-hidden":"true",onClick:()=>g(!1)}),r("span",{class:"snag-dk-menuwrap",children:[r("button",{type:"button",class:"snag-dk-act snag-dk-more","aria-label":p("action.more"),"aria-expanded":d,"aria-haspopup":"menu",title:p("action.more"),onClick:()=>g(!d),children:"\u22EF"}),d&&r("div",{class:"snag-dk-menu",role:"menu",children:[n&&r("button",{type:"button",role:"menuitem",title:p("comment.edit"),"aria-label":p("comment.edit"),onClick:()=>{g(!1),m(s),i(!0)},children:p("action.edit")}),o&&r(Sn,{label:p("action.delete"),title:t,cls:"snag-dk-act--danger",role:"menuitem",onConfirm:o})]})]})]})}function It({snag:e}){const n=e.anchorReasons?.includes("hidden")??!1;return r("span",{class:"snag-dk-dim snag-dk-where",children:[n&&r(I,{children:[r("span",{class:"snag-dk-moved",children:p("badge.hidden")})," "]}),e.anchorState!=="anchored"&&r(I,{children:[r("span",{class:"snag-dk-moved",children:p(`badge.${e.anchorState}`)})," "]}),e.anchor.label]})}function Lt(e){const n=new Map,t=new Map;for(const o of e){const s=(n.get(o.route)??0)+1;n.set(o.route,s),t.set(o.id,s)}return t}function Ut(e,n){const t=new Map;for(const o of e){const s=t.get(o.route);s?s.push(o):t.set(o.route,[o])}return[...t.entries()].map(([o,s])=>({route:o,here:o===n,snags:s})).sort((o,s)=>o.route.localeCompare(s.route))}function jt({snag:e,n,here:t,unread:o,onOpen:s,onHover:a}){const i=g=>a(t?g:null),d=t?"":p("dock.goto",{route:e.route});return r("li",{children:r("button",{type:"button",class:"snag-dk-item",onClick:()=>s(e.id),onPointerEnter:()=>i(e.id),onPointerLeave:()=>i(null),onFocus:()=>i(e.id),onBlur:()=>i(null),children:[r("span",{class:`snag-dk-dot${o?" snag-dk-dot--on":""}`,role:"img","aria-label":o?p("dock.unread"):""}),r("span",{class:`snag-dk-num${e.anchorState==="anchored"?"":` snag-dk-num--${e.anchorState}`}`,style:{background:ce(e.status),color:xn(e.status)},children:n}),r("span",{class:"snag-dk-main",children:[r("span",{class:`snag-dk-body${e.status==="resolved"?" snag-dk-done":""}`,children:e.comments[0]?.body??p("dock.row.empty")}),r("span",{class:"snag-dk-sub",children:r(It,{snag:e})})]}),r(Ot,{snag:e}),e.comments.length>1&&r("span",{class:"snag-dk-replies",role:"img","aria-label":p("dock.replies",{n:O(e.comments.length-1)}),children:O(e.comments.length-1)}),!t&&r("span",{class:"snag-dk-goto",role:"img",title:d,"aria-label":d,children:"\u2197"})]})})}const Mn=e=>l[`status${e[0].toUpperCase()}${e.slice(1)}`]??l.muted;function Ht({round:e,filter:n,onFilter:t,onClearAll:o,seenAt:s,trailing:a}){const[i,d]=D(null),g=Pt(e),c=h=>{const y={...n};for(const[$,E]of Object.entries(h))E===void 0?delete y[$]:y[$]=E;t(y)},m=Nt(n),w=[...new Map(e.map(h=>[h.createdBy.id,h.createdBy.name]))],u=[...new Set(e.map(h=>h.route))].sort(),f=[...g.byStatus.keys()].filter(h=>!ge.includes(h)),S=h=>d(i===h?null:h),k=r("svg",{class:"snag-dk-caret",width:"8",height:"8",viewBox:"0 0 8 8","aria-hidden":"true",children:r("path",{d:"M1 2.5 4 5.5 7 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"})});return r("div",{class:"snag-dk-filters",children:[r("div",{class:"snag-dk-searchwrap",children:[r("svg",{class:"snag-dk-searchicon",width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:[r("circle",{cx:"7",cy:"7",r:"4.75",fill:"none",stroke:"currentColor","stroke-width":"1.5"}),r("path",{d:"M10.5 10.5 14 14",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}),r("input",{class:"snag-input snag-dk-search",type:"search","aria-label":p("search.aria"),placeholder:p("search.placeholder",{n:O(e.length)}),value:n.q??"",onInput:h=>c({q:h.currentTarget.value||void 0})})]}),r("div",{class:"snag-dk-chiphead",children:[r("span",{class:"snag-dk-menutitle",id:"snag-dk-st",children:p("filter.status")}),r("button",{type:"button",class:"snag-dk-link snag-dk-selectall",onClick:()=>c({statuses:[]}),children:p("filter.selectall")})]}),r("div",{class:"snag-dk-chips",role:"group","aria-labelledby":"snag-dk-st",children:[ge.map(h=>{const y=n.statuses.includes(h);return r("button",{type:"button",class:"snag-dk-chip","aria-pressed":y,style:y?`border-color:${Mn(h)};background:color-mix(in srgb, ${Mn(h)} 18%, transparent)`:void 0,onClick:()=>c({statuses:Tt(n.statuses,h)}),children:[r("span",{class:"snag-dk-chipdot","aria-hidden":"true",style:{background:ce(h)}}),r("span",{class:"snag-dk-chiplabel",children:ue(h)})," ",r("span",{class:"snag-dk-chipn",children:O(g.byStatus.get(h)??0)})]})}),f.map(h=>r("span",{class:"snag-dk-chip snag-dk-chip-stray",children:[r("span",{class:"snag-dk-chiplabel",children:h})," ",r("span",{class:"snag-dk-chipn",children:O(g.byStatus.get(h)??0)})]}))]}),r("div",{class:"snag-dk-menus",onKeyDown:h=>{h.key!=="Escape"||!i||(h.stopPropagation(),d(null))},children:[i&&r("div",{class:"snag-dk-menubg","aria-hidden":"true",onClick:()=>d(null)}),r("span",{class:"snag-dk-menuwrap",children:[r("button",{type:"button",class:"snag-dk-link snag-dk-trigger","aria-expanded":i==="sort",onClick:()=>S("sort"),children:[p("sort.button"),k]}),i==="sort"&&r("div",{class:"snag-dk-menu",role:"radiogroup","aria-label":p("sort.button"),children:[["newest","sort.newest"],["oldest","sort.oldest"],["page","sort.page"]].map(([h,y])=>r("button",{type:"button",role:"radio","aria-checked":n.sort===h,onClick:()=>c({sort:h}),children:[r("span",{class:"snag-dk-tick","aria-hidden":"true",children:n.sort===h?"\u2713":"\xA0"}),p(y)]}))})]}),r("span",{class:"snag-dk-menuwrap",children:[r("button",{type:"button",class:"snag-dk-link snag-dk-trigger","aria-expanded":i==="filter",onClick:()=>S("filter"),children:[m>0?p("filter.button.n",{n:O(m)}):p("filter.button"),k]}),i==="filter"&&r("div",{class:"snag-dk-menu snag-dk-menu-form",role:"group","aria-label":p("filter.button"),children:[r("div",{class:"snag-dk-menugroup",children:[s&&r("label",{children:[p("filter.read"),r("select",{value:n.read,onChange:h=>c({read:h.currentTarget.value}),children:[r("option",{value:"all",children:p("filter.read.all")}),r("option",{value:"unread",children:p("filter.read.unread")}),r("option",{value:"read",children:p("filter.read.read")})]})]}),r("label",{children:[p("filter.by"),r("select",{value:n.by??"",onChange:h=>c({by:h.currentTarget.value||void 0}),children:[r("option",{value:"",children:p("filter.by.anyone")}),w.map(([h,y])=>r("option",{value:h,children:y}))]})]}),r("label",{children:[p("filter.pages"),r("select",{value:n.page??"",onChange:h=>c({page:h.currentTarget.value||void 0}),children:[r("option",{value:"",children:p("filter.pages.all")}),u.map(h=>r("option",{value:h,children:h}))]})]}),r("label",{class:"snag-dk-pageonly",children:[r("input",{type:"checkbox",checked:n.pageOnly,onChange:h=>c({pageOnly:h.currentTarget.checked})})," ",p("filter.pageonly")]})]}),r("div",{class:"snag-dk-menugroup snag-dk-menugroup-last",children:r(Sn,{label:p("dock.clear"),title:p("dock.clear.aria"),cls:"snag-dk-link snag-dk-clear",onConfirm:o})})]})]}),a]})]})}function Ft({snags:e,groups:n,route:t,onOpen:o,onHover:s,onExport:a,onClearAll:i,clusterFilter:d,onClusterClear:g,filter:c,onFilter:m,hiddenNote:w,onHiddenShow:u,seenAt:f}){const S=Lt(e),k=n.flatMap(b=>b.snags),h=c.statuses.length>0||!!c.by||!!c.page||!!c.q?.trim()||c.pageOnly||c.newOnly||c.read!=="all",y=f?e.filter(b=>he(b,f)).length:0,$=U(null),[E,P]=D(!1),R=b=>{b.key!=="Escape"||!E||(b.stopPropagation(),P(!1))},A=U(null);return L(()=>{const b=$.current,x=A.current;!b||!x||(b.scrollTop+=x.getBoundingClientRect().top-b.getBoundingClientRect().top)},[t,n.length]),r(I,{children:[e.length>0&&r(Ht,{round:e,filter:c,onFilter:m,onClearAll:i,...f===void 0?{}:{seenAt:f},trailing:f&&(y>0||c.newOnly)?r("button",{type:"button",class:"snag-dk-link snag-dk-newpill","aria-pressed":c.newOnly,onClick:()=>m({...c,newOnly:!c.newOnly}),children:c.newOnly?p(y===0?"filter.new.none":"filter.new.on"):p("filter.new",{n:O(y)})}):null}),e.length===0?r("div",{class:"snag-dk-empty",children:r("p",{children:p("dock.empty")})}):k.length===0&&h?r("div",{class:"snag-dk-empty",children:c.pageOnly&&e.some(b=>b.route!==t)?r("p",{children:p("dock.empty.page",{n:O(e.filter(b=>b.route!==t).length),m:O(new Set(e.filter(b=>b.route!==t).map(b=>b.route)).size)})}):r("p",{children:p("dock.empty.filter")})}):r(I,{children:[w&&r("p",{class:"snag-dk-notice",children:[p("dock.hiddenrow")," ",r("button",{type:"button",class:"snag-dk-link",onClick:()=>u(w),children:p("dock.hiddenrow.show")})]}),d&&r("p",{class:"snag-dk-notice",children:[p("dock.cluster",{n:d.length})," ",r("button",{type:"button",class:"snag-dk-link",onClick:()=>g?.(),children:p("dock.cluster.clear")})]}),e.every(b=>b.anchorState==="orphaned")&&r("p",{class:"snag-dk-notice",children:p("dock.empty.orphans")}),r("div",{class:"snag-dk-scroll",ref:$,children:n.map(b=>r("section",{class:"snag-dk-group",ref:b.here?A:null,children:[b.route!==""&&r("h3",{class:"snag-dk-grouphd",children:[r("span",{class:"snag-dk-route",children:b.route}),r("span",{class:"snag-dk-dim",children:O(b.snags.length)})]}),r("ul",{class:"snag-dk-list",children:b.snags.map(x=>r(jt,{snag:x,n:S.get(x.id),here:b.here,unread:!!f&&he(x,f),onOpen:o,onHover:s},x.id))})]},b.route))})]}),a&&r("div",{class:"snag-dk-foot",children:r("div",{class:"snag-dk-menus snag-dk-menus-up",onKeyDown:R,children:[E&&r("div",{class:"snag-dk-menubg","aria-hidden":"true",onClick:()=>P(!1)}),r("span",{class:"snag-dk-menuwrap",children:[r("button",{type:"button",class:"snag-dk-link","aria-expanded":E,"aria-haspopup":"menu",onClick:()=>P(!E),children:p("export.button")}),E&&r("div",{class:"snag-dk-menu snag-dk-menu-up",role:"menu",children:["md","json"].map(b=>r("button",{type:"button",role:"menuitem",onClick:()=>{P(!1),a(b)},children:p(b==="md"?"export.md":"export.json")}))})]})]})})]})}const ze=new Map;function Bt(e){const n=[];try{for(const[t,o]of new URL(e).searchParams)Mt(t)||n.push(o&&o!=="[redacted]"?`${t}=${o}`:t)}catch{return null}return n.length?`?${n.join("&")}`:null}function Kt({att:e,load:n}){const t=U(null),[o,s]=D(!1),[a,i]=D(null);return L(()=>{let d=!1;return n(e).then(async g=>{if(!g||d)return;const c=await createImageBitmap(g);d?c.close():i(c)}).catch(()=>{}),()=>{d=!0}},[e.id,e.url]),L(()=>{const d=t.current;if(!d||!a)return;const g=142,c=g/a.width;d.width=g,d.height=Math.min(96,Math.round(a.height*c)),d.getContext("2d").drawImage(a,0,0,a.width,Math.round(d.height/c),0,0,d.width,d.height)},[a]),a?r(I,{children:[r("button",{type:"button",class:"snag-dk-shot",onClick:()=>s(!0),"aria-label":p("shot.open"),children:r("canvas",{ref:t,width:142,height:Math.min(96,Math.round(a.height*(142/a.width)))})}),o&&r(qt,{bmp:a,onClose:()=>s(!1)})]}):null}function qt({bmp:e,onClose:n}){const t=U(null);return L(()=>{const o=t.current;o&&(o.width=e.width,o.height=e.height,o.getContext("2d").drawImage(e,0,0))},[e]),r("div",{class:"snag-dk-lightbox",role:"dialog","aria-modal":"true","aria-label":p("shot.aria"),tabIndex:-1,ref:o=>o?.focus(),onKeyDown:o=>{o.key==="Escape"&&(o.stopPropagation(),n())},onClick:n,children:[r("canvas",{ref:t}),r("button",{type:"button",class:"snag-dk-link snag-dk-lightclose",onClick:n,children:p("shot.close")})]})}function Wt({snag:e,loadShot:n}){const t=e.context;if(!t)return null;const o=e.attachments?.find(d=>d.kind==="screenshot"),s=t.derived,a=t.viewport,i=a?Math.round(a.dpr*100)/100:1;return r("div",{class:"snag-dk-cap",children:[o&&n&&r(Kt,{att:o,load:n}),r("p",{class:"snag-dk-caplabel",children:p("capture.label")}),t.page?.route!==void 0&&r("p",{children:p("capture.page",{route:t.page.route})}),s&&a&&r(I,{children:[r("p",{children:s.os?p("capture.agent",{browser:s.browser,os:s.os}):p("capture.agent.noos",{browser:s.browser})}),r("p",{children:i===1?p("capture.device.at1x",{device:s.device,w:a.w,h:a.h}):p("capture.device",{device:s.device,w:a.w,h:a.h,dpr:i})})]}),t.capture?.reasons?.map(d=>r("p",{class:"snag-dk-capwhy",children:d},d)),t.capture?.blindSpots?.map(d=>r("p",{class:"snag-dk-capwhy",children:d},d)),(()=>{const d=Bt(t.url);return d?r("p",{class:"snag-dk-capwhy",children:[p("detail.filedat",{query:d})," ",r("a",{class:"snag-dk-openq",href:t.url,target:"_blank",rel:"noreferrer",children:p("detail.openquery")})]}):null})()]})}function Tn(e){const n=e.context?.url??e.route;return`${n}${n.includes("?")?"&":"?"}${Xn("t")}=${e.key}`}function Yt({snag:e}){const[n,t]=D(!1),o=Tn(e);return navigator.clipboard?r("button",{type:"button",class:"snag-dk-link",onClick:()=>void navigator.clipboard.writeText(o).then(()=>{t(!0),setTimeout(()=>t(!1),1500)},()=>{}),children:p(n?"permalink.copied":"permalink.copy")}):null}function Gt({snag:e}){return navigator.clipboard?null:r("p",{class:"snag-dk-permaline",children:[r("span",{class:"snag-dk-permalabel",children:p("permalink.copy")})," ",r("span",{class:"snag-dk-permaurl",children:Tn(e)})]})}let Ie=null;function Vt({snag:e,list:n,onAssign:t}){const[o,s]=D([]);L(()=>{n&&(Ie??=n().catch(()=>(Ie=null,[])),Ie.then(s))},[n]);const a=e.assignee??null;if(!n||!t)return a?r("p",{class:"snag-dk-field",children:[r("span",{class:"snag-dk-dim",children:p("field.assignee")})," ",r("strong",{children:a.name})]}):null;const i=a&&!o.some(d=>d.id===a.id)?[a,...o]:o;return r("label",{class:"snag-dk-field",children:[r("span",{class:"snag-dk-dim",children:p("field.assignee")}),r("select",{class:"snag-dk-select",value:a?.id??"",onChange:d=>{const g=d.target.value;t(e.id,i.find(c=>c.id===g)??null)},children:[r("option",{value:"",children:p("assignee.none")}),i.map(d=>r("option",{value:d.id,children:d.name},d.id))]})]})}function Jt({snags:e,round:n,fallbackCursor:t,openId:o,onOpen:s,onStatus:a,onReply:i,onEdit:d,onDeleteComment:g,onDeleteThread:c,isMine:m,canDeleteOwnThread:w=!0,canModerate:u=!1,canStatus:f=!0,studio:S,assignees:k,onAssign:h,onShowAnyway:y,onAnnounce:$,loadShot:E}){const P=e.findIndex(_=>_.id===o),R=P>=0,A=_=>m?m(_):!0,b=R?P:Math.min(t,e.length),x=R?e[P]:n.find(_=>_.id===o),q=o?ze.get(o)??"":"",[N,F]=D(q),[fe,me]=D(q.length>0),_e=U(null);L(()=>{fe&&_e.current?.focus()},[fe]);const ke=_=>{F(_),o&&(_?ze.set(o,_):ze.delete(o))},be=xt(),[xe]=D(!be.name),[W,Le]=D(S?.member??null),[ye,Pn]=D(be.name??""),[Y,Nn]=D(be.email??""),[On,Ue]=D(!1),J=Y.trim().length>0&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Y.trim()),je=!!N.trim()&&(!!W||!xe||!!ye.trim()&&!J),zn=()=>{S&&(Ue(!1),kt(S.host,S.uid,S.env).then(_=>{if(_==="blocked")return Ue(!0);_&&(S.adopt(_),Le(_.reviewer.name),_e.current?.focus())}))},He=()=>{if(!x||!je)return;let _;W?_=W:xe&&(_=ye.trim(),yt({name:_,...Y.trim()?{email:Y.trim()}:{}})),i(x.id,N.trim(),_),ke(""),me(!1)};if(!x)return null;const j=x.comments[0],In=n.filter(_=>_.route===x.route).findIndex(_=>_.id===x.id)+1;return r("div",{class:"snag-dk-detail",children:[r("div",{class:"snag-dk-detailhd",children:[r("button",{type:"button",class:"snag-dk-link",onClick:()=>s(null),"aria-label":p("dock.back.aria"),children:[r("span",{"aria-hidden":"true",children:"\u2190"})," ",p("dock.back")]}),r("span",{class:"snag-dk-dim",children:p("dock.position",{n:R?O(b+1):"\u2013",total:O(e.length)})}),r("span",{class:"snag-dk-nav",children:[r("button",{type:"button",class:"snag-dk-link",disabled:b<=0,"aria-label":p("dock.prev"),onClick:()=>s(e[b-1].id),children:"\u2191"}),r("button",{type:"button",class:"snag-dk-link",disabled:R?b>=e.length-1:b>=e.length,"aria-label":p("dock.next"),onClick:()=>s(e[R?b+1:b].id),children:"\u2193"})]})]}),r("div",{class:"snag-dk-card",children:[r("div",{class:"snag-dk-meta",children:[r("span",{class:"snag-dk-num",style:{background:ce(x.status),color:xn(x.status)},children:In}),r("strong",{children:j?.author.name??p("author.unknown")}),r("span",{class:"snag-dk-dim",children:x.key}),j&&r(Cn,{iso:j.createdAt}),r(Yt,{snag:x})]}),r("div",{class:"snag-dk-cardbody",children:wn(j?.body??"")}),r(Gt,{snag:x}),j&&(A(j.author)||u)&&r(En,{body:j.body,...A(j.author)?{onEdit:_=>d(j.id,_)}:{},deleteLabel:p("comment.delete"),...u||w&&x.comments.every(_=>A(_.author))?{onDelete:()=>c(x.id)}:{}})]}),f?r("label",{class:"snag-dk-field",children:[r("span",{class:"snag-dk-dim",children:p("field.status")}),r("select",{class:"snag-dk-select",style:{borderColor:ce(x.status)},value:x.status,onChange:_=>{const Q=_.target.value;a(x.id,Q),$?.(p("announce.status",{key:x.key,status:ue(Q)}))},children:Oe.map(_=>r("option",{value:_,children:ue(_)},_))})]}):r("p",{class:"snag-dk-field","data-status-locked":!0,children:[r("span",{class:"snag-dk-dim",children:p("field.status")}),r("strong",{children:ue(x.status)}),r("span",{class:"snag-dk-dim",children:p("field.status.locked")})]}),r(Vt,{snag:x,...k&&h?{list:k,onAssign:h}:{}}),r(Wt,{snag:x,...E?{loadShot:E}:{}}),x.anchorReasons?.includes("hidden")&&r("p",{class:"snag-dk-moved-note",children:[p("detail.hidden")," ",r("button",{type:"button",class:"snag-dk-link",onClick:()=>y?.(x),children:p("detail.hidden.show")})]}),x.anchorState!=="anchored"&&r("p",{class:"snag-dk-moved-note",children:[p(`detail.${x.anchorState}`,{label:x.anchor.label}),x.anchorReasons?.includes("budget-exceeded")&&` ${p("detail.unavailable")}`]}),x.anchorState!=="anchored"&&r(zt,{anchor:x.anchor}),x.comments.length>1&&r("ul",{class:"snag-dk-replies-list",children:x.comments.slice(1).map(_=>r("li",{children:[r("strong",{children:_.author.name})," ",r(Cn,{iso:_.createdAt}),wn(_.body??""),(A(_.author)||u)&&r(En,{body:_.body,...A(_.author)?{onEdit:Q=>d(_.id,Q)}:{},deleteLabel:p("reply.delete"),onDelete:()=>g(_.id)})]},_.id))}),fe?r("div",{class:"snag-dk-replybox",children:[W?r("p",{class:"snag-dk-who",children:[p("who.member",{name:W})," ",r("button",{type:"button",class:"snag-dk-link",onClick:()=>{S?.signOut(),Le(null)},children:p("who.signout")})]}):xe&&r(I,{children:[r("input",{class:"snag-input",type:"text",autocomplete:"name",placeholder:p("who.name"),"aria-label":p("who.name"),value:ye,onInput:_=>Pn(_.target.value)}),r("input",{class:`snag-input${J?" snag-input--bad":""}`,type:"email",inputMode:"email",autocomplete:"email",placeholder:p("who.email"),"aria-label":p("who.email"),"aria-invalid":J?"true":void 0,value:Y,onInput:_=>Nn(_.target.value)}),J&&r("p",{class:"snag-dk-who",children:p("who.email.bad")})]}),S&&!W&&r("p",{class:"snag-dk-who",children:[r("button",{type:"button",class:"snag-dk-link",onClick:zn,children:p("who.signin")}),On&&r("span",{role:"status",children:[" ",p("who.signin.blocked")]})]}),r("textarea",{ref:_e,class:"snag-text",rows:2,enterkeyhint:"enter","aria-label":p("reply.aria"),placeholder:p("reply.placeholder"),value:N,onInput:_=>ke(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),He()),_.key==="Escape"&&(_.stopPropagation(),_.target.blur())}}),r("div",{class:"snag-actions",children:[r("button",{type:"button",class:"snag-cancel",onClick:()=>{ke(""),me(!1)},children:p("action.cancel")}),r("button",{type:"button",class:"snag-send",disabled:!je,onClick:He,children:p("reply.send")})]})]}):r("button",{type:"button",class:"snag-dk-addreply",onClick:()=>me(!0),children:p("reply.add")})]})}function Qt(e){const n=e.openId?e.snags.find(k=>k.id===e.openId):null,t=U(null),o=e.clusterFilter?e.snags.filter(k=>e.clusterFilter.includes(k.id)):e.snags,s=Dt(o.filter(k=>Rt(k,e.filter,e.seenAt)),e.filter,e.route,e.seenAt),a=At(s,e.filter.sort),i=e.filter.sort==="page"?Ut(a,e.route):[{route:"",here:!1,snags:a}],d=i.flatMap(k=>k.snags),g=U(0),c=d.findIndex(k=>k.id===e.openId);c>=0&&(g.current=c);const m=U(null),[w,u]=D(null);e.openId?(m.current={id:e.openId,absent:c===-1},w&&u(null)):m.current?.absent&&w!==m.current.id&&(u(m.current.id),m.current=null),L(()=>{t.current?.focus()},[e.openId]),L(()=>{if(!(window.matchMedia?.("(pointer: coarse)").matches??!1))return;const k=t.current;return k?ct(k):void 0},[]);const f=U({snag:n,onStatus:e.onStatus,can:e.canStatus!==!1});f.current={snag:n,onStatus:e.onStatus,can:e.canStatus!==!1},L(()=>{const k=h=>{const{snag:y,onStatus:$,can:E}=f.current;if(!y||!E||h.metaKey||h.ctrlKey||h.altKey||h.composedPath().some(A=>{const b=A;if(!b?.tagName)return!1;const x=b.tagName.toLowerCase();return x==="textarea"||x==="select"?!0:x==="input"?!/^(button|submit|checkbox|radio)$/i.test(b.type):b.isContentEditable?!0:/^(textbox|searchbox|combobox)$/.test(b.getAttribute?.("role")??"")}))return;const R=Number(h.key);if(R>=1&&R<=Oe.length){h.preventDefault(),$(y.id,Oe[R-1]);return}(h.key==="r"||h.key==="R")&&(h.preventDefault(),$(y.id,y.status==="resolved"?"open":"resolved"))};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[]);const S=window.matchMedia?.("(pointer: coarse)").matches??!1;return r("aside",{ref:t,class:"snag-dk",role:"complementary","aria-label":p("dock.aria"),tabIndex:-1,onKeyDown:k=>{k.key==="Escape"&&(k.stopPropagation(),e.openId?e.onOpen(null):e.onClose())},children:[S&&r("div",{class:"snag-dk-scrim","aria-hidden":"true",onClick:e.onClose}),S&&r("div",{class:"snag-dk-grab","aria-hidden":"true",onPointerDown:k=>{const h=k.clientY,y=k.currentTarget;try{y.setPointerCapture(k.pointerId)}catch{}y.onpointermove=$=>{$.clientY-h>56&&(y.onpointermove=null,e.onClose())},y.onpointerup=()=>y.onpointermove=null},children:r("span",{})}),r("header",{class:"snag-dk-hd",children:[!n&&e.rounds&&e.rounds.length>1&&e.onRound?r("span",{class:"snag-dk-roundwrap",children:[r("select",{class:"snag-dk-round","aria-label":p("round.label"),value:String(e.activeRound??""),onChange:k=>e.onRound(Number(k.currentTarget.value)),children:e.rounds.map(k=>r("option",{value:String(k.number),children:[k.name,k.closed?` ${p("round.closed")}`:""]},k.number))}),r("svg",{class:"snag-dk-roundcaret",width:"10",height:"10",viewBox:"0 0 8 8","aria-hidden":"true",children:r("path",{d:"M1 2.5 4 5.5 7 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"})})]}):r("strong",{children:p(n?"dock.title.detail":"dock.title.list")}),r("button",{type:"button",class:"snag-dk-link",onClick:e.onClose,"aria-label":p("dock.close"),children:"\u2715"})]}),n?r(Jt,{...e,snags:d,round:e.snags,fallbackCursor:g.current},n.id):r(Ft,{...e,groups:i,hiddenNote:w,onHiddenShow:k=>{u(null),e.onOpen(k)}})]})}const Rn=360,Xt=` .snag-dk{position:fixed;inset-block:0;inset-inline-end:0;width:${Rn}px;max-width:100vw;z-index:${it.dock};background:${l.bg};color:${l.fg};display:flex;flex-direction:column;font:400 13px/1.45 ${l.font};box-shadow:${l.shadow};border-inline-start:1px solid ${l.border};pointer-events:auto;overscroll-behavior:contain}.snag-dk-filters{padding:10px 14px 6px;border-block-end:1px solid ${l.border};display:grid;gap:8px;flex:0 0 auto}.snag-dk-searchwrap{position:relative;display:flex}.snag-dk-searchicon{position:absolute;inset-inline-start:9px;top:50%;transform:translateY(-50%);color:${l.muted};pointer-events:none}.snag-dk-search{width:100%;box-sizing:border-box;font-size:12px;padding:6px 8px;padding-inline-start:28px}.snag-dk-chiphead{display:flex;justify-content:space-between;align-items:center;margin-block-end:-4px}.snag-dk-chiphead .snag-dk-menutitle{padding:0}.snag-dk-selectall{font-size:11px;letter-spacing:.06em;text-transform:uppercase;padding:2px 4px;margin-inline-end:-4px}.snag-dk-chips{display:grid;grid-template-columns:1fr 1fr;gap:6px}.snag-dk-chip{font:500 12px/1.2 ${l.font};color:${l.fg};padding:7px 10px;border-radius:6px;border:1px solid ${l.border};background:none;cursor:pointer;text-align:start;display:flex;align-items:center;gap:7px;min-width:0;transition:background ${l.motion},border-color ${l.motion}}.snag-dk-chip:hover{background:${l.hover}}.snag-dk-chip:focus-visible{outline:2px solid ${l.focus};outline-offset:1px}.snag-dk-chip[aria-pressed="true"]{font-weight:600}.snag-dk-chipdot{flex:0 0 8px;width:8px;height:8px;border-radius:50%;forced-color-adjust:none}.snag-dk-chiplabel{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.snag-dk-chipn{flex:0 0 auto;color:${l.muted};font-variant-numeric:tabular-nums}.snag-dk-chip-stray{color:${l.muted};cursor:default}.snag-dk-chip-stray:hover{background:none}@media (forced-colors:active){.snag-dk-chip[aria-pressed="true"]{border:2px solid Highlight;padding:6px 9px}}.snag-dk-menus{display:flex;gap:4px;position:relative;margin-inline-start:-6px}.snag-dk-trigger{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:500;position:relative;z-index:3}.snag-dk-menuwrap{position:relative}.snag-dk-menugroup{display:flex;flex-direction:column;gap:1px;padding-bottom:6px;margin-bottom:6px;border-bottom:1px solid ${l.border}}.snag-dk-menugroup-last{padding-bottom:0;margin-bottom:0;border-bottom:0}.snag-dk-menutitle{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:${l.muted};padding:2px 8px 4px}.snag-dk-menubg{position:absolute;inset:-200px -20px -2000px;background:transparent;z-index:2}.snag-dk-menu{position:absolute;inset-block-start:100%;inset-inline-start:0;z-index:3;min-width:150px;background:${l.bg};border:1px solid ${l.border};border-radius:6px;box-shadow:${l.shadow};display:grid;padding:4px}.snag-dk-menu button{font:400 12px/1.3 ${l.font};color:${l.fg};background:none;border:0;text-align:start;padding:5px 8px;border-radius:4px;cursor:pointer;display:flex;gap:4px}.snag-dk-menu button:hover{background:color-mix(in srgb,${l.fg} 8%,transparent)}.snag-dk-menus-up{position:relative}.snag-dk-menu-up{inset-block-start:auto;inset-block-end:100%;margin-block-end:4px}.snag-dk-menu-form{padding:8px;gap:6px;min-width:224px}.snag-dk-menu-form label:not(.snag-dk-pageonly){display:grid;gap:2px;font:600 10px/1.4 ${l.font};letter-spacing:.05em;text-transform:uppercase;color:${l.muted}}.snag-dk-menu-form select{font:400 12px/1.3 ${l.font};color:${l.fg};background:${l.bg};border:1px solid ${l.border};border-radius:4px;padding:4px}.snag-dk-pageonly{display:flex;align-items:center;gap:6px;font-size:12px;color:${l.fg};cursor:pointer}.snag-dk-permaline{margin:6px 0 0;font-size:11px;color:${l.muted};overflow-wrap:anywhere}.snag-dk-permalabel{font-weight:600}.snag-dk-permaurl{user-select:all}.snag-dk:focus{outline:none}@media (pointer:coarse){.snag-dk{inset-block-start:auto;inset-inline-start:0;width:auto;height:82vh;border-radius:14px 14px 0 0;box-sizing:border-box;padding-bottom:max(var(${v.tbH},68px),var(${v.kb},0px));padding-inline:env(safe-area-inset-left) env(safe-area-inset-right)}.snag-dk-scrim{position:fixed;inset:0;background:#0005;touch-action:none;z-index:-1}.snag-dk-grab{display:flex;justify-content:center;padding:10px 0 4px;touch-action:none}.snag-dk-grab span{width:36px;height:4px;border-radius:2px;background:${l.border}}.snag-dk-item{min-height:56px}.snag-dk-link{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}.snag-dk-select{min-height:44px}.snag-dk-chip{min-height:44px}.snag-dk-search{min-height:44px}.snag-dk-round{min-height:44px}}@media (pointer:fine){.snag-dk-scrim,.snag-dk-grab{display:none}}.snag-dk-hd{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid ${l.border};flex:0 0 auto}.snag-dk-scroll{overflow-y:auto;flex:1 1 auto}.snag-dk-list{list-style:none;margin:0;padding:0}.snag-dk-grouphd{position:sticky;top:0;z-index:1;margin:0;display:flex;align-items:center;gap:8px;padding:7px 14px;font:600 11px/1.45 ${l.font};letter-spacing:.02em;background:${l.sunken};border-bottom:1px solid ${l.border}}.snag-dk-route{color:${l.fg};overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;direction:ltr;unicode-bidi:isolate}.snag-dk-grouphd .snag-dk-dim{margin-inline-start:auto;font-weight:400;flex:0 0 auto}.snag-dk-goto{flex:0 0 auto;color:${l.muted};font-size:13px;line-height:1}.snag-dk-dev{flex:0 0 auto;color:${l.muted};display:flex;align-items:center}.snag-dk-item:hover .snag-dk-goto,.snag-dk-item:focus-visible .snag-dk-goto{color:${l.accent}}.snag-dk-item{display:flex;gap:10px;align-items:flex-start;width:100%;text-align:start;background:transparent;border:0;border-bottom:1px solid ${l.border};color:inherit;font:inherit;padding:11px 14px;cursor:pointer;transition:background ${l.motion}}.snag-dk-item:hover{background:${l.hover}}.snag-dk-item:focus-visible{outline:2px solid ${l.focus};outline-offset:-2px}.snag-dk-dot{flex:0 0 7px;width:7px;height:7px;border-radius:50%;margin-block-start:8px;background:transparent}.snag-dk-dot--on{background:${l.accent}}.snag-dk-newpill{margin-inline-start:auto;font-weight:600;white-space:nowrap}.snag-dk-newpill[aria-pressed="true"]{background:${l.sunken};border-radius:6px}.snag-dk-newpill:hover{background:${l.hover}}.snag-dk-newpill:focus-visible{outline:2px solid ${l.focus};outline-offset:-2px}.snag-dk-num{flex:0 0 22px;height:22px;border-radius:50% 50% 50% 2px;font-weight:600;font-size:11px;line-height:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box}.snag-dk-num--orphaned{border:2px solid currentColor;box-shadow:inset 0 0 0 2px currentColor}.snag-dk-num--approximate{border:2px dashed currentColor}.snag-dk-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 auto}.snag-dk-body,.snag-dk-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.snag-dk-sub{font-size:11px}.snag-dk-dim{color:${l.muted}}.snag-dk-moved{color:${l.anchorOrphan};font-weight:600}.snag-dk-replies{background:${l.surface};border-radius:999px;padding:1px 7px;font-size:11px;flex:0 0 auto}.snag-dk-empty{padding:28px 16px;text-align:center;flex:1 1 auto}.snag-dk-empty p{margin:0 0 4px}.snag-dk-notice{margin:0;padding:11px 14px;font-size:12px;color:${l.muted};border-bottom:1px solid ${l.border};flex:0 0 auto}.snag-dk-roundwrap{position:relative;display:inline-flex;align-items:center;min-width:0;flex:0 1 auto}.snag-dk-round{appearance:none;-webkit-appearance:none;background:${l.sunken};border:1px solid ${l.border};color:${l.fg};font:600 13px/1.45 ${l.font};padding-block:4px;padding-inline:10px 26px;border-radius:6px;cursor:pointer;max-width:100%;text-overflow:ellipsis;transition:background ${l.motion}}.snag-dk-round:hover{background:${l.hover}}.snag-dk-round:focus-visible{outline:2px solid ${l.focus};outline-offset:1px}.snag-dk-round option{background:${l.bg};color:${l.fg};font-weight:400}.snag-dk-roundcaret{position:absolute;inset-inline-end:10px;color:${l.muted};pointer-events:none}.snag-dk-foot{display:flex;gap:6px;padding:10px 14px;border-top:1px solid ${l.border};flex:0 0 auto}.snag-dk-link{background:transparent;border:0;color:${l.accent};font:inherit;cursor:pointer;padding:4px 6px;border-radius:calc(${l.radius} - 2px);transition:background ${l.motion}}.snag-dk-link:hover:not(:disabled){background:${l.hover}}.snag-dk-link:disabled{color:${l.disabled};cursor:not-allowed}.snag-dk-link:focus-visible{outline:2px solid ${l.focus};outline-offset:1px}.snag-dk-detail{padding:12px 14px;overflow-y:auto;flex:1 1 auto;display:flex;flex-direction:column;gap:12px}.snag-dk-detailhd{display:flex;align-items:center;justify-content:space-between;gap:8px}.snag-dk-nav{display:flex;gap:2px}.snag-dk-card{background:${l.surface};border-radius:${l.radius};padding:11px}.snag-dk-meta{display:flex;justify-content:space-between;gap:8px;font-size:12px;margin-bottom:6px}.snag-md{overflow-wrap:anywhere}.snag-md>*{margin:0}.snag-md>*+*{margin-block-start:6px}.snag-md p{white-space:pre-wrap}.snag-md ul,.snag-md ol{padding-inline-start:20px}.snag-md li+li{margin-block-start:2px}.snag-md code{background:${l.sunken};border-radius:3px;padding:1px 4px;font-size:.92em;font-family:ui-monospace,monospace}.snag-md pre{background:${l.sunken};border-radius:${l.radius};padding:8px 10px;overflow-x:auto}.snag-md pre code{background:none;padding:0;font-size:.92em}.snag-md a{color:${l.accent}}.snag-dk-field{display:flex;flex-direction:column;gap:4px;font-size:12px}.snag-dk-select{background:${l.surface};color:inherit;border:2px solid;border-radius:${l.radius};padding:7px 9px;font:inherit;min-height:34px}.snag-dk-done{color:${l.muted};text-decoration:line-through}.snag-dk-meta .snag-dk-num{margin-inline-end:2px}.snag-dk-cap{background:${l.sunken};border-radius:${l.radius};padding:9px 11px;display:flex;flex-direction:column;gap:1px;font-size:12px;overflow-wrap:anywhere}.snag-dk-cap p{margin:0}.snag-dk-shot{padding:0;border:1px solid ${l.border};border-radius:calc(${l.radius} - 2px);background:none;cursor:zoom-in;overflow:hidden;line-height:0;align-self:flex-start;margin-block-end:6px}.snag-dk-shot canvas{display:block;max-width:100%}.snag-dk-lightbox{position:fixed;inset:0;z-index:1;background:#000c;display:flex;align-items:center;justify-content:center;padding:24px;cursor:zoom-out}.snag-dk-lightbox canvas{max-width:100%;max-height:100%;object-fit:contain;box-shadow:${l.shadow};background:${l.bg}}.snag-dk-lightclose{position:absolute;inset-block-start:12px;inset-inline-end:16px;color:#fff}.snag-dk-caplabel{font-weight:600;font-size:11px;letter-spacing:.02em;margin-bottom:3px!important}.snag-dk-capwhy{color:${l.muted};font-size:11px;margin-top:5px!important}.snag-dk-moved-note{margin:0;padding:8px 10px;font-size:12px;background:${l.sunken};border-inline-start:3px solid ${l.anchorOrphan};border-radius:${l.radius}}.snag-dk-anchor{font-size:12px;border:1px solid ${l.border};border-radius:${l.radius};padding:6px 10px;background:${l.sunken}}.snag-dk-anchor summary{cursor:pointer;color:${l.muted};font-weight:600;list-style:revert}.snag-dk-anchor dl{margin:8px 0 2px;display:grid;gap:6px}.snag-dk-anchor dt{color:${l.muted};font-size:11px;letter-spacing:.03em;text-transform:uppercase}.snag-dk-anchor dd{margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;overflow-wrap:anywhere;user-select:text}.snag-dk-replies-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.snag-dk-replies-list li{background:${l.sunken};border-radius:${l.radius};padding:9px;overflow-wrap:anywhere}.snag-dk-acts{display:flex;gap:2px;margin-top:6px}.snag-dk-act{background:transparent;border:0;color:${l.muted};font:inherit;font-size:11px;cursor:pointer;padding:3px 6px;border-radius:calc(${l.radius} - 3px);transition:background ${l.motion},color ${l.motion}}.snag-dk-more{font-size:14px;line-height:1;letter-spacing:1px}.snag-dk-act:hover{background:${l.hover};color:inherit}.snag-dk-act:focus-visible{outline:2px solid ${l.focus};outline-offset:1px}.snag-dk-act--danger:hover{color:${l.anchorOrphan}}.snag-dk-menu .snag-dk-act--danger{color:${l.fg}}.snag-dk-menu .snag-dk-act--danger:hover{color:${l.anchorOrphan}}.snag-dk-armed{color:${l.anchorOrphan};font-weight:600}.snag-dk-clear{margin-inline-start:auto}.snag-dk-menu .snag-dk-clear{margin-inline-start:0}.snag-dk-editbox{display:flex;flex-direction:column;gap:8px;margin-top:8px}.snag-dk-addreply{background:transparent;border:1px dashed ${l.border};color:${l.muted};border-radius:${l.radius};padding:9px;font:inherit;cursor:pointer;text-align:start;transition:border-color ${l.motion},color ${l.motion}}.snag-dk-addreply:hover{border-color:${l.accent};color:inherit}.snag-dk-replybox{display:flex;flex-direction:column;gap:8px}.snag-dk-who{margin:0;font-size:11px;color:${l.muted}}.snag-dk-who .snag-dk-link{padding:0;font-size:inherit;text-decoration:underline}`;function Zt(e,n,t){const o=e.ownerDocument??document;vn(e,"form",lt),vn(e,"dock",Xt);const s=o.createElement("div");(t??e).appendChild(s);const a=o.defaultView?.matchMedia?.("(pointer: coarse)").matches??!1,i=g=>{const c=e.host;g&&!a?c.style.setProperty(v.dockW,`${Rn}px`):c.style.removeProperty(v.dockW)};i(!0);const d=g=>{on(r(Qt,{...g}),s)};return d(n),{update:d,close(){i(!1),on(null,s),s.remove()}}}const Dn=24;function An(e,n){const t=e.innerHeight,o=n.querySelector(".snag-dk");if(!o)return{top:0,bottom:t};const s=o.getBoundingClientRect();return s.height>=t-1?{top:0,bottom:t}:{top:0,bottom:Math.max(0,s.top)}}function eo(e,n,t){const o=t.anchor.rect;if(!o)return;const s=t.anchor.offset??{fy:.5},a=o.y+o.h*s.fy,i=An(e,n),d=a-e.scrollY;if(d>=i.top+Dn&&d<=i.bottom-Dn)return;const g=e.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1;e.scrollTo({top:Math.max(0,a-(i.top+i.bottom)/2),behavior:g?"auto":"smooth"})}export{Zt as openDock,eo as scrollToSnag,An as visibleStrip};
1
+ var Z,S,Fe,K,Be,Ke,qe,ve,ee,G,We,we,$e,Se,ne={},te=[],Ln=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,oe=Array.isArray;function F(e,n){for(var t in n)e[t]=n[t];return e}function Ce(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function I(e,n,t){var o,s,a,i={};for(a in n)a=="key"?o=n[a]:a=="ref"?s=n[a]:i[a]=n[a];if(arguments.length>2&&(i.children=arguments.length>3?Z.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return re(e,i,o,s,null)}function re(e,n,t,o,s){var a={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Fe,__i:-1,__u:0};return s==null&&S.vnode!=null&&S.vnode(a),a}function L(e){return e.children}function ae(e,n){this.props=e,this.context=n}function q(e,n){if(n==null)return e.__?q(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if((t=e.__k[n])!=null&&t.__e!=null)return t.__e;return typeof e.type=="function"?q(e):null}function Un(e){if(e.__P&&e.__d){var n=e.__v,t=n.__e,o=[],s=[],a=F({},n);a.__v=n.__v+1,S.vnode&&S.vnode(a),Ee(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[t]:null,o,t??q(n),!!(32&n.__u),s),a.__v=n.__v,a.__.__k[a.__i]=a,en(o,a,s),n.__e=n.__=null,a.__e!=t&&Ye(a)}}function Ye(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),Ye(e)}function Ge(e){(!e.__d&&(e.__d=!0)&&K.push(e)&&!se.__r++||Be!=S.debounceRendering)&&((Be=S.debounceRendering)||Ke)(se)}function se(){try{for(var e,n=1;K.length;)K.length>n&&K.sort(qe),e=K.shift(),n=K.length,Un(e)}finally{K.length=se.__r=0}}function Ve(e,n,t,o,s,a,i,d,g,u,h){var w,c,_,v,b,$,f=o&&o.__k||te,x=n.length;for(g=jn(t,n,f,g,x),w=0;w<x;w++)(_=t.__k[w])!=null&&(c=_.__i!=-1&&f[_.__i]||ne,_.__i=w,$=Ee(e,_,c,s,a,i,d,g,u,h),v=_.__e,_.ref&&c.ref!=_.ref&&(c.ref&&Me(c.ref,null,_),h.push(_.ref,_.__c||v,_)),b==null&&v!=null&&(b=v),4&_.__u?(g=Je(_,g,e),c.__e&&(c.__e=null)):typeof _.type=="function"&&$!==void 0?g=$:v&&(g=v.nextSibling),_.__u&=-7);return t.__e=b,g}function jn(e,n,t,o,s){var a,i,d,g,u,h=t.length,w=h,c=0;for(e.__k=new Array(s),a=0;a<s;a++)(i=n[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?i=e.__k[a]=re(null,i,null,null,null):oe(i)?i=e.__k[a]=re(L,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?i=e.__k[a]=re(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):e.__k[a]=i,g=a+c,i.__=e,i.__b=e.__b+1,d=null,(u=i.__i=Hn(i,t,g,w))!=-1&&(w--,(d=t[u])&&(d.__u|=2)),d==null||d.__v==null?(u==-1&&(s>h?c--:s<h&&c++),typeof i.type!="function"&&(i.__u|=4)):u!=g&&(u==g-1?c--:u==g+1?c++:(u>g?c--:c++,i.__u|=4))):e.__k[a]=null;if(w)for(a=0;a<h;a++)(d=t[a])!=null&&(2&d.__u)==0&&(d.__e==o&&(o=q(d)),tn(d,d));return o}function Je(e,n,t){var o,s;if(typeof e.type=="function"){for(o=e.__k,s=0;o&&s<o.length;s++)o[s]&&(o[s].__=e,n=Je(o[s],n,t));return n}e.__e!=n&&(n&&e.type&&!n.parentNode&&(n=q(e)),n=t.insertBefore(e.__e,n||null));do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function Hn(e,n,t,o){var s,a,i,d=e.key,g=e.type,u=n[t],h=u!=null&&(2&u.__u)==0;if(u===null&&d==null||h&&d==u.key&&g==u.type)return t;if(o>(h?1:0)){for(s=t-1,a=t+1;s>=0||a<n.length;)if((u=n[i=s>=0?s--:a++])!=null&&(2&u.__u)==0&&d==u.key&&g==u.type)return i}return-1}function Qe(e,n,t){n[0]=="-"?e.setProperty(n,t??""):e[n]=t==null?"":typeof t!="number"||Ln.test(n)?t:t+"px"}function ie(e,n,t,o,s){var a,i;e:if(n=="style")if(typeof t=="string")e.style.cssText=t;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||Qe(e.style,n,"");if(t)for(n in t)o&&t[n]==o[n]||Qe(e.style,n,t[n])}else if(n[0]=="o"&&n[1]=="n")a=n!=(n=n.replace(We,"$1")),i=n.toLowerCase(),n=i in e||n=="onFocusOut"||n=="onFocusIn"?i.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+a]=t,t?o?t[G]=o[G]:(t[G]=we,e.addEventListener(n,a?Se:$e,a)):e.removeEventListener(n,a?Se:$e,a);else{if(s=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&t==1?"":t))}}function Xe(e){return function(n){if(this.l){var t=this.l[n.type+e];if(n[ee]==null)n[ee]=we++;else if(n[ee]<t[G])return;return t(S.event?S.event(n):n)}}}function Ee(e,n,t,o,s,a,i,d,g,u){var h,w,c,_,v,b,$,f,x,E,R,C,A,D,m,N,O=n.type;if(n.constructor!==void 0)return null;128&t.__u&&(g=!!(32&t.__u),a=[d=n.__e=t.__e]),(h=S.__b)&&h(n);e:if(typeof O=="function"){w=i.length;try{if(x=n.props,E=O.prototype&&O.prototype.render,R=(h=O.contextType)&&o[h.__c],C=h?R?R.props.value:h.__:o,t.__c?f=(c=n.__c=t.__c).__=c.__E:(E?n.__c=c=new O(x,C):(n.__c=c=new ae(x,C),c.constructor=O,c.render=Bn),R&&R.sub(c),c.state||(c.state={}),c.__n=o,_=c.__d=!0,c.__h=[],c._sb=[]),E&&c.__s==null&&(c.__s=c.state),E&&O.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=F({},c.__s)),F(c.__s,O.getDerivedStateFromProps(x,c.__s))),v=c.props,b=c.state,c.__v=n,_)E&&O.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),E&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(E&&O.getDerivedStateFromProps==null&&x!==v&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,C),n.__v==t.__v||!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,C)===!1){n.__v!=t.__v&&(c.props=x,c.state=c.__s,c.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.some(function(B){B&&(B.__=n)}),te.push.apply(c.__h,c._sb),c._sb=[],c.__h.length&&i.push(c),d=q(t);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,C),E&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(v,b,$)})}if(c.context=C,c.props=x,c.__P=e,c.__e=!1,A=S.__r,D=0,E)c.state=c.__s,c.__d=!1,A&&A(n),h=c.render(c.props,c.state,c.context),te.push.apply(c.__h,c._sb),c._sb=[];else do c.__d=!1,A&&A(n),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++D<25);c.state=c.__s,c.getChildContext!=null&&(o=F(F({},o),c.getChildContext())),E&&!_&&c.getSnapshotBeforeUpdate!=null&&($=c.getSnapshotBeforeUpdate(v,b)),m=h!=null&&h.type===L&&h.key==null?nn(h.props.children):h,d=Ve(e,oe(m)?m:[m],n,t,o,s,a,i,d,g,u),c.base=n.__e,n.__u&=-161,c.__h.length&&i.push(c),f&&(c.__E=c.__=null)}catch(B){if(i.length=w,n.__v=null,g||a!=null){if(B.then){for(n.__u|=g?160:128;d&&d.nodeType==8&&d.nextSibling;)d=d.nextSibling;a!=null&&(a[a.indexOf(d)]=null),n.__e=d}else if(a!=null)for(N=a.length;N--;)Ce(a[N])}else n.__e=t.__e;n.__k==null&&(n.__k=t.__k||[]),B.then||Ze(n),S.__e(B,n,t)}}else a==null&&n.__v==t.__v?(n.__k=t.__k,n.__e=t.__e):d=n.__e=Fn(t.__e,n,t,o,s,a,i,g,u);return(h=S.diffed)&&h(n),128&n.__u?void 0:d}function Ze(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ze))}function en(e,n,t){for(var o=0;o<t.length;o++)Me(t[o],t[++o],t[++o]);S.__c&&S.__c(n,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(a){a.call(s)})}catch(a){S.__e(a,s.__v)}})}function nn(e){return typeof e!="object"||e==null||e.__b>0?e:oe(e)?e.map(nn):e.constructor!==void 0?null:F({},e)}function Fn(e,n,t,o,s,a,i,d,g){var u,h,w,c,_,v,b,$=t.props||ne,f=n.props,x=n.type;if(x=="svg"?s="http://www.w3.org/2000/svg":x=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),a!=null){for(u=0;u<a.length;u++)if((_=a[u])&&"setAttribute"in _==!!x&&(x?_.localName==x:_.nodeType==3)){e=_,a[u]=null;break}}if(e==null){if(x==null)return document.createTextNode(f);e=document.createElementNS(s,x,f.is&&f),d&&(S.__m&&S.__m(n,a),d=!1),a=null}if(x==null)$===f||d&&e.data==f||(e.data=f);else{if(a=x=="textarea"&&f.defaultValue!=null?null:a&&Z.call(e.childNodes),!d&&a!=null)for($={},u=0;u<e.attributes.length;u++)$[(_=e.attributes[u]).name]=_.value;for(u in $)_=$[u],u=="dangerouslySetInnerHTML"?w=_:u=="children"||u in f||u=="value"&&"defaultValue"in f||u=="checked"&&"defaultChecked"in f||ie(e,u,null,_,s);for(u in f)_=f[u],u=="children"?c=_:u=="dangerouslySetInnerHTML"?h=_:u=="value"?v=_:u=="checked"?b=_:d&&typeof _!="function"||$[u]===_||ie(e,u,_,$[u],s);if(h)d||w&&(h.__html==w.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),n.__k=[];else if(w&&(e.innerHTML=""),Ve(n.type=="template"?e.content:e,oe(c)?c:[c],n,t,o,x=="foreignObject"?"http://www.w3.org/1999/xhtml":s,a,i,a?a[0]:t.__k&&q(t,0),d,g),a!=null)for(u=a.length;u--;)Ce(a[u]);d&&x!="textarea"||(u="value",x=="progress"&&v==null?e.removeAttribute("value"):v!=null&&(v!==e[u]||x=="progress"&&!v||x=="option"&&v!=$[u])&&ie(e,u,v,$[u],s),u="checked",b!=null&&b!=e[u]&&ie(e,u,b,$[u],s))}return e}function Me(e,n,t){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&n==null||(e.__u=e(n))}else e.current=n}catch(s){S.__e(s,t)}}function tn(e,n,t){var o,s;if(S.unmount&&S.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||Me(o,null,n)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(a){S.__e(a,n)}o.base=o.__P=o.__n=null}if(o=e.__k)for(s=0;s<o.length;s++)o[s]&&tn(o[s],n,t||typeof e.type!="function");t||Ce(e.__e),e.__c=e.__=e.__e=void 0}function Bn(e,n,t){return this.constructor(e,t)}function on(e,n,t){var o,s,a,i;n==document&&(n=document.documentElement),S.__&&S.__(e,n),s=(o=!1)?null:n.__k,a=[],i=[],Ee(n,e=n.__k=I(L,null,[e]),s||ne,ne,n.namespaceURI,s?null:n.firstChild?Z.call(n.childNodes):null,a,s?s.__e:n.firstChild,o,i),en(a,e,i),e.props.children=null}Z=te.slice,S={__e:function(e,n,t,o){for(var s,a,i;n=n.__;)if((s=n.__c)&&!s.__)try{if((a=s.constructor)&&a.getDerivedStateFromError!=null&&(s.setState(a.getDerivedStateFromError(e)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,o||{}),i=s.__d),i)return s.__E=s}catch(d){e=d}throw e}},Fe=0,ae.prototype.setState=function(e,n){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=F({},this.state),typeof e=="function"&&(e=e(F({},t),this.props)),e&&F(t,e),e!=null&&this.__v&&(n&&this._sb.push(n),Ge(this))},ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ge(this))},ae.prototype.render=L,K=[],Ke=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,qe=function(e,n){return e.__v.__b-n.__v.__b},se.__r=0,ve=Math.random().toString(8),ee="__d"+ve,G="__a"+ve,We=/(PointerCapture)$|Capture$/i,we=0,$e=Xe(!1),Se=Xe(!0);var Kn=0;function r(e,n,t,o,s,a){n||(n={});var i,d,g=n;if("ref"in g)for(d in g={},n)d=="ref"?i=n[d]:g[d]=n[d];var u={type:e,props:g,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Kn,__i:-1,__u:0,__source:s,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(d in i)g[d]===void 0&&(g[d]=i[d]);return S.vnode&&S.vnode(u),u}const qn="Snagset",Wn="snagset",Yn="snagset:",Gn="Snagset",Vn="Snag",Jn="Snags",y={font:"--snag-font",accent:"--snag-accent",onAccent:"--snag-onAccent",bg:"--snag-bg",fg:"--snag-fg",muted:"--snag-muted",border:"--snag-border",radius:"--snag-radius",shadow:"--snag-shadow",z:"--snag-z",motion:"--snag-motion",surface:"--snag-surface",sunken:"--snag-sunken",hover:"--snag-hover",focus:"--snag-focus",disabled:"--snag-disabled",statusOpen:"--snag-status-open",statusProgress:"--snag-status-progress",statusReview:"--snag-status-review",statusResolved:"--snag-status-resolved",anchorOrphan:"--snag-anchor-orphan",tbH:"--snag-tb-h",dockW:"--snag-dock-w",kb:"--snag-kb",thumbX:"--snag-thumb-x",thumbW:"--snag-thumb-w"},Qn=e=>`var(${y[e]})`,Xn=e=>"snag_"+e,rn={query:["snag_t","snag_off","snag_debug","snag_theme"],fragment:["snag_k"]},an="snag:identity",Zn="data-snag-theme";var V,M,Te,sn,le=0,ln=[],T=S,dn=T.__b,cn=T.__r,un=T.diffed,pn=T.__c,gn=T.unmount,hn=T.__;function Re(e,n){T.__h&&T.__h(M,e,le||n),le=0;var t=M.__H||(M.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function P(e){return le=1,et(_n,e)}function et(e,n,t){var o=Re(V++,2);if(o.t=e,!o.__c&&(o.__=[_n(void 0,n),function(d){var g=o.__N?o.__N[0]:o.__[0],u=o.t(g,d);g!==u&&(o.__N=[u,o.__[1]],o.__c.setState({}))}],o.__c=M,!M.__f)){var s=function(d,g,u){if(!o.__c.__H)return!0;var h=!1,w=o.__c.props!==d;if(o.__c.__H.__.some(function(_){if(_.__N){h=!0;var v=_.__[0];_.__=_.__N,_.__N=void 0,v!==_.__[0]&&(w=!0)}}),a){var c=a.call(this,d,g,u);return h?c||w:c}return!h||w};M.__f=!0;var a=M.shouldComponentUpdate,i=M.componentWillUpdate;M.componentWillUpdate=function(d,g,u){if(this.__e){var h=a;a=void 0,s(d,g,u),a=h}i&&i.call(this,d,g,u)},M.shouldComponentUpdate=s}return o.__N||o.__}function U(e,n){var t=Re(V++,3);!T.__s&&mn(t.__H,n)&&(t.__=e,t.u=n,M.__H.__h.push(t))}function j(e){return le=5,nt(function(){return{current:e}},[])}function nt(e,n){var t=Re(V++,7);return mn(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function tt(){for(var e;e=ln.shift();){var n=e.__H;if(e.__P&&n)try{n.__h.some(de),n.__h.some(De),n.__h=[]}catch(t){n.__h=[],T.__e(t,e.__v)}}}T.__b=function(e){M=null,dn&&dn(e)},T.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),hn&&hn(e,n)},T.__r=function(e){cn&&cn(e),V=0;var n=(M=e.__c).__H;n&&(Te===M?(n.__h=[],M.__h=[],n.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(n.__h.some(de),n.__h.some(De),n.__h=[],V=0)),Te=M},T.diffed=function(e){un&&un(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(ln.push(n)!==1&&sn===T.requestAnimationFrame||((sn=T.requestAnimationFrame)||ot)(tt)),n.__H.__.some(function(t){t.u&&(t.__H=t.u,t.u=void 0)})),Te=M=null},T.__c=function(e,n){n.some(function(t){try{t.__h.some(de),t.__h=t.__h.filter(function(o){return!o.__||De(o)})}catch(o){n.some(function(s){s.__h&&(s.__h=[])}),n=[],T.__e(o,t.__v)}}),pn&&pn(e,n)},T.unmount=function(e){gn&&gn(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.some(function(o){try{de(o)}catch(s){n=s}}),t.__H=void 0,n&&T.__e(n,t.__v))};var fn=typeof requestAnimationFrame=="function";function ot(e){var n,t=function(){clearTimeout(o),fn&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,35);fn&&(n=requestAnimationFrame(t))}function de(e){var n=M,t=e.__c;typeof t=="function"&&(e.__c=void 0,t()),M=n}function De(e){var n=M;e.__c=e.__(),M=n}function mn(e,n){return!e||e.length!==n.length||n.some(function(t,o){return t!==e[o]})}function _n(e,n){return typeof n=="function"?n(e):n}const rt={product:qn,set:Gn,item:Vn,items:Jn};function kn(e){return(n,t)=>(e[n]??"").replace(/\{(\w+)\}/g,(o,s)=>{const a=t?.[s]??rt[s];return a===void 0?o:String(a)})}const z=e=>new Intl.NumberFormat().format(e),bn={"where.anchored":"{label}","where.approximate":"position approximate \u2014 the page changed","where.orphaned":"moved \u2014 the element is gone","status.open":"Active","status.progress":"In progress","status.review":"In review","status.resolved":"Resolved","author.unknown":"Someone","label.image":"an image","label.link":"a link","label.button":"a button","label.tag":"the {tag}"},at=kn(bn),ce={open:{colour:"#4f6ef7"},progress:{colour:"#f59e0b"},review:{colour:"#8b5cf6"},resolved:{colour:"#10b981"}},ue=e=>ce[e]?.colour??"#8a8f98",xn=e=>e==="open"||e==="review"?"#fff":"#16161a",pe=e=>e in ce?at(`status.${e}`):e,l=Object.fromEntries(Object.keys(y).map(e=>[e,Qn(e)])),st=Object.entries(ce).map(([e,n])=>` ${y[`status${e[0].toUpperCase()}${e.slice(1)}`]}:${n.colour};`).join(`
2
+ `);`${l.font}${l.fg}${y.font}${y.accent}${y.bg}${y.fg}${y.muted}${y.border}${y.radius}${y.shadow}${y.z}${y.motion}${y.surface}${l.fg}${l.bg}${y.sunken}${l.fg}${l.bg}${y.hover}${l.fg}${l.bg}${y.onAccent}${y.focus}${l.accent}${l.fg}${y.disabled}${l.muted}${l.bg}${st}${y.anchorOrphan}${Zn}${y.accent}${y.onAccent}${y.bg}${y.fg}${y.muted}${y.border}${y.shadow}${y.motion}${y.bg}${y.fg}${y.muted}${y.border}${y.accent}${y.onAccent}${y.surface}${y.sunken}${y.hover}${y.focus}${y.disabled}${y.shadow}${y.anchorOrphan}`;const it={dock:5},yn=new WeakMap;function vn(e,n,t){let o=yn.get(e);if(o||yn.set(e,o=new Set),o.has(n))return;o.add(n);try{const i=new CSSStyleSheet;i.replaceSync(t),e.adoptedStyleSheets=[...e.adoptedStyleSheets,i];return}catch{}const a=(e.ownerDocument??document).createElement("style");a.setAttribute(`data-snag-${n}`,""),a.textContent=t,e.appendChild(a)}const lt=` .snag-input,.snag-text{width:100%;box-sizing:border-box;background:${l.surface};color:inherit;border:1px solid ${l.border};border-radius:${l.radius};padding:8px;font:inherit;resize:vertical}@media (pointer:coarse){.snag-input,.snag-text{font-size:16px}}.snag-input:focus,.snag-text:focus{outline:2px solid ${l.focus};outline-offset:1px;border-color:transparent}.snag-input--bad{border-color:${l.anchorOrphan}}.snag-note{margin:-2px 0 0;color:${l.anchorOrphan};font-size:11px;line-height:1.35}.snag-note.snag-dim{color:${l.muted}}.snag-actions{display:flex;justify-content:flex-end;gap:6px}.snag-actions button{appearance:none;border:0;border-radius:calc(${l.radius} - 1px);padding:7px 13px;font:inherit;cursor:pointer;min-height:32px;transition:background ${l.motion}}.snag-cancel{background:transparent;color:${l.muted}}.snag-armed{color:${l.anchorOrphan};font-weight:600}.snag-cancel:hover{background:${l.hover};color:inherit}.snag-send{background:${l.accent};color:${l.onAccent};font-weight:600}.snag-send:disabled{opacity:.45;cursor:not-allowed}.snag-actions button:focus-visible{outline:2px solid ${l.focus};outline-offset:2px}`;function dt(e,n,t){const[o,s]=P(!1);return U(()=>{if(!o)return;const a=setTimeout(()=>s(!1),3e3);return()=>clearTimeout(a)},[o]),{armed:o,press(){if(o||n){s(!1),e();return}s(!0)}}}function ct(e){const n=window.visualViewport;if(!n)return;let t=0,o=0;const s=()=>{t=0;const d=Math.max(0,Math.round(window.innerHeight-n.height-n.offsetTop));e.style.setProperty(y.kb,`${d}px`)},a=()=>{t||(t=requestAnimationFrame(s))},i=()=>{clearTimeout(o),o=window.setTimeout(s,300)};return s(),n.addEventListener("resize",a),n.addEventListener("scroll",a),window.addEventListener("orientationchange",a),e.addEventListener("focusout",i),()=>{t&&cancelAnimationFrame(t),clearTimeout(o),n.removeEventListener("resize",a),n.removeEventListener("scroll",a),window.removeEventListener("orientationchange",a),e.removeEventListener("focusout",i)}}const ut="noreferrer nofollow";function pt(e){const n=e.trim();if(!n||/[-]/.test(n)||n.startsWith("//"))return null;const t=/^([a-z][a-z0-9+.-]*):/i.exec(n);return t?/^(https?|mailto)$/i.test(t[1])?n:null:n}const gt=new RegExp(["\\*\\*(?=\\S)(?<bold>[\\s\\S]*?\\S)\\*\\*","(?<!\\w)__(?=\\S)(?<boldU>[\\s\\S]*?\\S)__(?!\\w)","(?<!\\*)\\*(?!\\*)(?=\\S)(?<em>[\\s\\S]*?\\S)(?<!\\*)\\*(?!\\*)","(?<!\\w)_(?=\\S)(?<emU>[\\s\\S]*?\\S)_(?!\\w)","`(?<code>[^`]+)`","\\[(?<label>[^\\]\\n]*)\\]\\((?<href>(?:[^()\\s]|\\([^()\\s]*\\))*)\\)"].join("|")),ht=4;function ge(e,n=0,t=0){const o=[];let s=e,a=n;if(t>=ht)return e?[e]:[];for(;;){const i=gt.exec(s);if(!i)return s&&o.push(s),o;i.index>0&&o.push(s.slice(0,i.index));const d=`i${a++}`,g=i.groups,u=g.bold??g.boldU,h=g.em??g.emU;if(u!==void 0)o.push(I("strong",{key:d},ge(u,a,t+1)));else if(h!==void 0)o.push(I("em",{key:d},ge(h,a,t+1)));else if(g.code!==void 0)o.push(I("code",{key:d},g.code));else{const w=pt(g.href??"");o.push(w?I("a",{key:d,href:w,target:"_blank",rel:ut},g.label??""):i[0])}s=s.slice(i.index+i[0].length)}}const Pe=/^```[^\n]*$/,Ae=/^[-*]\s+(.*)$/,Ne=/^\d{1,9}[.)]\s+(.*)$/;function wn(e){const n=e.split(`
3
+ `),t=[];let o=0,s=0;for(;o<n.length;){const a=n[o];if(Pe.test(a)){const u=[];for(o++;o<n.length&&!Pe.test(n[o]);)u.push(n[o++]);o++,t.push(I("pre",{key:`b${s++}`},I("code",null,u.join(`
4
+ `))));continue}const i=Ae.exec(a),d=Ne.exec(a);if(i||d){const u=i?Ae:Ne,h=[];for(;o<n.length;){const w=u.exec(n[o]);if(!w)break;h.push(I("li",{key:`l${h.length}`},ge(w[1]))),o++}t.push(I(i?"ul":"ol",{key:`b${s++}`},h));continue}const g=[];for(;o<n.length;){const u=n[o];if(!u.trim()||Pe.test(u)||Ae.test(u)||Ne.test(u))break;g.push(u),o++}g.length?t.push(I("p",{key:`b${s++}`},ge(g.join(`
5
+ `)))):o++}return I("div",{class:"snag-md"},t)}const ft=`${Yn}session`;function mt(e,n,t){if(e.origin!==n||!t||e.source!==t)return!1;const o=e.data;return!!o&&o.type===ft&&typeof o.session?.sessionToken=="string"&&typeof o.session.reviewer?.name=="string"}function _t(e,n,t,o){const s=new URLSearchParams({project:n,origin:t});return o&&s.set("env",o),`${new URL(e).origin}/widget-signin?${s}`}function kt(e,n,t){const o=new URL(e).origin,s=window.open(_t(e,n,location.origin,t),`${Wn}-signin`,"popup,width=480,height=600");return s?new Promise(a=>{let i=0;const d=h=>{removeEventListener("message",g),clearInterval(u),a(h)},g=h=>{mt(h,o,s)&&d(h.data.session)};addEventListener("message",g);const u=setInterval(()=>{s.closed&&++i>1&&d(null)},400)}):Promise.resolve("blocked")}function $n(){let e=null;try{e=localStorage.getItem(an)}catch{return{}}if(!e)return{};if(e[0]!=="{")return{name:e};try{const n=JSON.parse(e);return n&&typeof n=="object"?n:{}}catch{return{}}}function bt(e){try{localStorage.setItem(an,JSON.stringify(e))}catch{}}function xt(){const e=$n();return{name:typeof e.name=="string"?e.name:"",...e.email?{email:e.email}:{}}}function yt(e){const n=$n();bt({...n,name:e.name,...e.email?{email:e.email}:{}})}const vt={"detail.details":"Anchor details","detail.hidden":"This element isn't visible right now \u2014 it may be inside a closed menu, tab, or accordion.","detail.orphaned":"The element this was pinned to has moved or gone \u2014 it was {label}.","detail.approximate":"The page changed since this was written, so the pin is close rather than exact \u2014 it points at {label}.","detail.unavailable":"Some of the matching steps couldn't load, so this was judged with the basic ones only.","detail.filedat":"Filed at {query}.","detail.openquery":"Open with original query","capture.agent":"{browser} \xB7 {os}","capture.agent.noos":"{browser}","capture.device":"{device} \xB7 {w}\xD7{h} @{dpr}x","capture.device.at1x":"{device} \xB7 {w}\xD7{h}"},wt={"disclosure.title":"Before your first comment","disclosure.always":"Each comment carries the page address, viewport size and browser make.","disclosure.crumbs.on":"Recent console messages and network results ride along, recognisable secrets redacted first.","disclosure.crumbs.off":"Console and network capture is off here.","disclosure.screenshot.off":"Screenshots are off for this project.","disclosure.screenshot.on":"{product} never reads what you type. Screenshots are pictures of the page, so anything visible on screen is in the picture \u2014 mark sensitive regions with {maskAttr} and they are blurred before the screenshot leaves your browser.","disclosure.retention":"Everything stays in this browser until someone exports it \u2014 the privacy notes list what can still leak.","disclosure.retention.server":"Your comment, the page address and the details above are sent to {host} when you post \u2014 the privacy notes list what can still leak.","disclosure.ack":"Got it","composer.aria":"New comment","composer.parent":"Pin the parent","composer.child":"Pin the first child","composer.shot":"Add a screenshot","composer.name":"Your name","composer.email":"Email, so we can reply","composer.email.bad":"Check the address \u2014 or leave it blank.","composer.signin":"Studio member? Sign in","composer.signin.blocked":"Allow pop-ups for this page to sign in.","composer.member":"Commenting as {name}","composer.signout":"Not you? Sign out","composer.round.closed":"This round is closed \u2014 your comment goes to {round}.","composer.chars":"{n} characters left","composer.body":"Comment","composer.body.placeholder":"What's the {item}?","action.cancel":"Cancel","action.post":"Post comment","composer.discard.sure":"Sure? Discard this comment","action.discard":"Discard?"},$t={"shot.open":"See the screenshot","shot.aria":"Screenshot","shot.close":"Close","announce.status":"Comment {key} set to {status}.","search.placeholder":"Search {n} comments\u2026","search.aria":"Search comments","round.label":"Round","round.closed":"(closed)","filter.status":"Status","filter.selectall":"Select all","filter.clear":"Clear","sort.button":"Sort","sort.newest":"Newest first","sort.oldest":"Oldest first","sort.page":"By page","filter.button":"Filter","filter.button.n":"Filter \xB7 {n}","filter.by":"Comments by","filter.by.anyone":"Anyone","filter.pages":"Pages","filter.pages.all":"All pages","filter.pageonly":"Show comments on this page only","filter.new":"See new activity \xB7 {n}","filter.new.on":"Showing new activity \u2014 show all","filter.new.none":"You\u2019re caught up \u2014 show all","filter.new.markread":"Mark all read","filter.read":"Marked as","filter.read.all":"Anyone\u2019s, read or not","filter.read.unread":"Unread","filter.read.read":"Read","dock.unread":"Unread","badge.anchored":"","badge.approximate":"~","badge.orphaned":"moved","badge.hidden":"hidden","capture.label":"Comment left on","capture.page":"{route}","device.Mobile":"Mobile","device.Desktop":"Desktop","dock.aria":"All comments","dock.title.list":"All comments","dock.title.detail":"Comment","dock.close":"Close all comments","dock.empty":"No comments yet. Press +, then click anything on the page.","dock.empty.filter":"Nothing matches that filter.","dock.empty.orphans":"Every comment here lost its element \u2014 but what each one pointed at is still recorded.","dock.empty.page":"Nothing on this page. {n} comments on {m} other pages.","dock.row.empty":"(no comment)","dock.replies":"{n} replies","dock.goto":"Go to {route}","dock.cluster":"{n} comments in this cluster","dock.cluster.clear":"Show all","dock.hiddenrow":"That comment is now hidden by your filter","dock.hiddenrow.show":"Show","dock.back":"All","dock.back.aria":"Back to all comments","dock.position":"{n} of {total}","dock.prev":"Previous comment","dock.next":"Next comment","dock.clear":"Clear all","dock.clear.aria":"Delete every comment in this review","comment.edit":"Edit this comment","comment.delete":"Delete this comment and its pin","reply.delete":"Delete this reply","time.now":"just now","who.name":"Your name","who.email":"Email, so we can reply","who.email.bad":"Check the address \u2014 or leave it blank.","who.signin":"Studio member? Sign in","who.signin.blocked":"Allow pop-ups for this page to sign in.","who.member":"Replying as {name}","who.signout":"Not you? Sign out","detail.hidden.show":"Show anyway","field.status":"Status","field.status.locked":"Only the studio can change status here.","field.assignee":"Assigned to","assignee.none":"Unassigned","permalink.copy":"Copy link","permalink.copied":"Copied","reply.add":"Add reply","reply.aria":"Reply","reply.placeholder":"Reply\u2026","reply.send":"Reply","action.more":"More actions","action.edit":"Edit","action.delete":"Delete","action.save":"Save","action.sure":"Sure?","export.button":"Export","export.md":"Markdown","export.json":"JSON"},St={...bn,...vt,...wt,...$t},p=kn(St),Ct=[/^utm_/,/^(gclid|gbraid|wbraid|fbclid|msclkid|ttclid|twclid|igshid|yclid|li_fat_id)$/,/^(mc_cid|mc_eid|_hsenc|_hsmi|vero_id|oly_enc_id|oly_anon_id)$/,/^_vercel_/,/^__vercel_/,/^_rsc$/],Et=[...rn.query,...rn.fragment];function Mt(e,n=[]){return Et.includes(e)||n.includes(e)?!0:Ct.some(t=>t.test(e))}const J=["open","progress","review","resolved"];function Tt(e,n){return e.includes(n)?e.filter(t=>t!==n):[...e,n]}function Rt(e,n,t){if(n.statuses.length>0&&J.includes(e.status)&&!n.statuses.includes(e.status)||n.by&&e.createdBy.id!==n.by||n.page&&e.route!==n.page)return!1;if(n.read!=="all"&&t){const o=he(e,t);if(n.read==="unread"&&!o||n.read==="read"&&o)return!1}return!0}function he(e,n){const t=n.get(e.id)??0;return Date.parse(e.updatedAt)>t}function Dt(e,n,t,o){let s=e;n.pageOnly&&(s=s.filter(i=>i.route===t)),n.newOnly&&o&&(s=s.filter(i=>he(i,o)));const a=n.q?.trim().toLowerCase();return a&&(s=s.filter(i=>i.comments.some(d=>(d.body??"").toLowerCase().includes(a)||d.author.name.toLowerCase().includes(a))||i.createdBy.name.toLowerCase().includes(a))),s}function Pt(e,n){if(n==="page")return e;const t=(s,a)=>Date.parse(s.createdAt)-Date.parse(a.createdAt),o=[...e].sort(t);return n==="oldest"?o:o.reverse()}function At(e){const n=new Map;for(const t of e)n.set(t.status,(n.get(t.status)??0)+1);return{all:e.length,byStatus:n}}function Nt(e){return(e.read!=="all"?1:0)+(e.by?1:0)+(e.page?1:0)}const Oe=Object.keys(ce);function Sn({label:e,title:n,cls:t,role:o,onConfirm:s}){const{armed:a,press:i}=dt(s);return r("button",{type:"button",...o===void 0?{}:{role:o},class:`${t}${a?" snag-dk-armed":""}`,"aria-label":a?`${p("action.sure")} ${n}`:n,title:n,onClick:i,children:a?p("action.sure"):e})}function Ot({snag:e}){const n=e.context?.derived?.device;if(!n)return null;const t=p(`device.${n}`);return r("span",{class:"snag-dk-dev",title:t,"aria-label":t,role:"img",children:n==="Mobile"?r("svg",{width:"11",height:"14",viewBox:"0 0 11 14",fill:"none","aria-hidden":"true",children:[r("rect",{x:".75",y:".75",width:"9.5",height:"12.5",rx:"1.75",stroke:"currentColor","stroke-width":"1.5"}),r("path",{d:"M4.5 11h2",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}):r("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:[r("rect",{x:".75",y:"1.75",width:"12.5",height:"8.5",rx:"1.75",stroke:"currentColor","stroke-width":"1.5"}),r("path",{d:"M5 12.75h4",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]})})}function zt({anchor:e}){const n=[];if(e.testid&&n.push(["testid",e.testid]),e.domid&&n.push(["id",e.domid]),e.css&&n.push(["css",e.css]),e.hostPath?.length&&n.push(["shadow host",e.hostPath.join(" >> ")]),e.role&&n.push(["role",e.role]),e.accessibleName&&n.push(["name",e.accessibleName]),e.text?.exact&&n.push(["text",e.text.exact]),e.path?.length&&n.push(["path",e.path.join(" > ")]),e.rect){const t=e.rect;n.push(["rect",`${Math.round(t.x)}, ${Math.round(t.y)} \u2014 ${Math.round(t.w)} x ${Math.round(t.h)}`])}return e.breakpoint&&n.push(["breakpoint",`${e.breakpoint} at capture \xB7 you are at ${typeof window>"u"?"?":window.innerWidth}px`]),r("details",{class:"snag-dk-anchor",children:[r("summary",{children:p("detail.details")}),r("dl",{children:n.map(([t,o])=>r("div",{children:[r("dt",{children:t}),r("dd",{children:o})]},t))})]})}function Cn({iso:e}){const n=Date.parse(e);if(!Number.isFinite(n))return null;const t=new Date(n),o=Math.round((n-Date.now())/1e3);let s;if(Math.abs(o)<45)s=p("time.now");else if(Math.abs(o)<7*86400){const a=new Intl.RelativeTimeFormat(void 0,{numeric:"auto",style:"short"}),[i,d]=Math.abs(o)<3600?[Math.round(o/60),"minute"]:Math.abs(o)<86400?[Math.round(o/3600),"hour"]:[Math.round(o/86400),"day"];s=a.format(i,d)}else s=t.toLocaleDateString(void 0,{day:"numeric",month:"short",...t.getFullYear()===new Date().getFullYear()?{}:{year:"numeric"}});return r("time",{class:"snag-dk-dim snag-dk-when",dateTime:t.toISOString(),title:t.toLocaleString(),children:s})}function En({body:e,onEdit:n,deleteLabel:t,onDelete:o}){const s=e??"",[a,i]=P(!1),[d,g]=P(!1),[u,h]=P(s),w=j(null),c=_=>{_.key!=="Escape"||!d||(_.stopPropagation(),g(!1))};return U(()=>{a&&w.current?.focus()},[a]),a&&n?r("div",{class:"snag-dk-editbox",children:[r("textarea",{ref:w,class:"snag-text",rows:3,"aria-label":p("comment.edit"),value:u,onInput:_=>h(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),u.trim()&&(n(u.trim()),i(!1))),_.key==="Escape"&&(_.stopPropagation(),h(s),i(!1))}}),r("div",{class:"snag-actions",children:[r("button",{type:"button",class:"snag-cancel",onClick:()=>{h(s),i(!1)},children:p("action.cancel")}),r("button",{type:"button",class:"snag-send",disabled:!u.trim()||u.trim()===s,onClick:()=>{n(u.trim()),i(!1)},children:p("action.save")})]})]}):r("div",{class:"snag-dk-acts snag-dk-menus",onKeyDown:c,children:[d&&r("div",{class:"snag-dk-menubg","aria-hidden":"true",onClick:()=>g(!1)}),r("span",{class:"snag-dk-menuwrap",children:[r("button",{type:"button",class:"snag-dk-act snag-dk-more","aria-label":p("action.more"),"aria-expanded":d,"aria-haspopup":"menu",title:p("action.more"),onClick:()=>g(!d),children:"\u22EF"}),d&&r("div",{class:"snag-dk-menu",role:"menu",children:[n&&r("button",{type:"button",role:"menuitem",title:p("comment.edit"),"aria-label":p("comment.edit"),onClick:()=>{g(!1),h(s),i(!0)},children:p("action.edit")}),o&&r(Sn,{label:p("action.delete"),title:t,cls:"snag-dk-act--danger",role:"menuitem",onConfirm:o})]})]})]})}function It({snag:e}){const n=e.anchorReasons?.includes("hidden")??!1;return r("span",{class:"snag-dk-dim snag-dk-where",children:[n&&r(L,{children:[r("span",{class:"snag-dk-moved",children:p("badge.hidden")})," "]}),e.anchorState!=="anchored"&&r(L,{children:[r("span",{class:"snag-dk-moved",children:p(`badge.${e.anchorState}`)})," "]}),e.anchor.label]})}function Lt(e){const n=new Map,t=new Map;for(const o of e){const s=(n.get(o.route)??0)+1;n.set(o.route,s),t.set(o.id,s)}return t}function Ut(e,n){const t=new Map;for(const o of e){const s=t.get(o.route);s?s.push(o):t.set(o.route,[o])}return[...t.entries()].map(([o,s])=>({route:o,here:o===n,snags:s})).sort((o,s)=>o.route.localeCompare(s.route))}function jt({snag:e,n,here:t,unread:o,onOpen:s,onHover:a}){const i=g=>a(t?g:null),d=t?"":p("dock.goto",{route:e.route});return r("li",{children:r("button",{type:"button",class:"snag-dk-item",onClick:()=>s(e.id),onPointerEnter:()=>i(e.id),onPointerLeave:()=>i(null),onFocus:()=>i(e.id),onBlur:()=>i(null),children:[r("span",{class:`snag-dk-dot${o?" snag-dk-dot--on":""}`,role:"img","aria-label":o?p("dock.unread"):""}),r("span",{class:`snag-dk-num${e.anchorState==="anchored"?"":` snag-dk-num--${e.anchorState}`}`,style:{background:ue(e.status),color:xn(e.status)},children:n}),r("span",{class:"snag-dk-main",children:[r("span",{class:`snag-dk-body${e.status==="resolved"?" snag-dk-done":""}`,children:e.comments[0]?.body??p("dock.row.empty")}),r("span",{class:"snag-dk-sub",children:r(It,{snag:e})})]}),r(Ot,{snag:e}),e.comments.length>1&&r("span",{class:"snag-dk-replies",role:"img","aria-label":p("dock.replies",{n:z(e.comments.length-1)}),children:z(e.comments.length-1)}),!t&&r("span",{class:"snag-dk-goto",role:"img",title:d,"aria-label":d,children:"\u2197"})]})})}const Mn=e=>l[`status${e[0].toUpperCase()}${e.slice(1)}`]??l.muted;function Ht({round:e,filter:n,onFilter:t,onClearAll:o,seenAt:s,trailing:a}){const[i,d]=P(null),g=At(e),u=J.every(f=>n.statuses.includes(f)),h=f=>{const x={...n};for(const[E,R]of Object.entries(f))R===void 0?delete x[E]:x[E]=R;t(x)},w=Nt(n),c=[...new Map(e.map(f=>[f.createdBy.id,f.createdBy.name]))],_=[...new Set(e.map(f=>f.route))].sort(),v=[...g.byStatus.keys()].filter(f=>!J.includes(f)),b=f=>d(i===f?null:f),$=r("svg",{class:"snag-dk-caret",width:"8",height:"8",viewBox:"0 0 8 8","aria-hidden":"true",children:r("path",{d:"M1 2.5 4 5.5 7 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"})});return r("div",{class:"snag-dk-filters",children:[r("div",{class:"snag-dk-searchwrap",children:[r("svg",{class:"snag-dk-searchicon",width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:[r("circle",{cx:"7",cy:"7",r:"4.75",fill:"none",stroke:"currentColor","stroke-width":"1.5"}),r("path",{d:"M10.5 10.5 14 14",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}),r("input",{class:"snag-input snag-dk-search",type:"search","aria-label":p("search.aria"),placeholder:p("search.placeholder",{n:z(e.length)}),value:n.q??"",onInput:f=>h({q:f.currentTarget.value||void 0})})]}),r("div",{class:"snag-dk-chiphead",children:[r("span",{class:"snag-dk-menutitle",id:"snag-dk-st",children:p("filter.status")}),r("button",{type:"button",class:"snag-dk-link snag-dk-selectall",onClick:()=>h({statuses:u?[]:[...J]}),children:p(u?"filter.clear":"filter.selectall")})]}),r("div",{class:"snag-dk-chips",role:"group","aria-labelledby":"snag-dk-st",children:[J.map(f=>{const x=n.statuses.includes(f);return r("button",{type:"button",class:"snag-dk-chip","aria-pressed":x,style:x?`border-color:${Mn(f)};background:color-mix(in srgb, ${Mn(f)} 18%, transparent)`:void 0,onClick:()=>h({statuses:Tt(n.statuses,f)}),children:[r("span",{class:"snag-dk-chipdot","aria-hidden":"true",style:{background:ue(f)}}),r("span",{class:"snag-dk-chiplabel",children:pe(f)})," ",r("span",{class:"snag-dk-chipn",children:z(g.byStatus.get(f)??0)})]})}),v.map(f=>r("span",{class:"snag-dk-chip snag-dk-chip-stray",children:[r("span",{class:"snag-dk-chiplabel",children:f})," ",r("span",{class:"snag-dk-chipn",children:z(g.byStatus.get(f)??0)})]}))]}),r("div",{class:"snag-dk-menus",onKeyDown:f=>{f.key!=="Escape"||!i||(f.stopPropagation(),d(null))},children:[i&&r("div",{class:"snag-dk-menubg","aria-hidden":"true",onClick:()=>d(null)}),r("span",{class:"snag-dk-menuwrap",children:[r("button",{type:"button",class:"snag-dk-link snag-dk-trigger","aria-expanded":i==="sort",onClick:()=>b("sort"),children:[p("sort.button"),$]}),i==="sort"&&r("div",{class:"snag-dk-menu",role:"radiogroup","aria-label":p("sort.button"),children:[["newest","sort.newest"],["oldest","sort.oldest"],["page","sort.page"]].map(([f,x])=>r("button",{type:"button",role:"radio","aria-checked":n.sort===f,onClick:()=>h({sort:f}),children:[r("span",{class:"snag-dk-tick","aria-hidden":"true",children:n.sort===f?"\u2713":"\xA0"}),p(x)]}))})]}),r("span",{class:"snag-dk-menuwrap",children:[r("button",{type:"button",class:"snag-dk-link snag-dk-trigger","aria-expanded":i==="filter",onClick:()=>b("filter"),children:[w>0?p("filter.button.n",{n:z(w)}):p("filter.button"),$]}),i==="filter"&&r("div",{class:"snag-dk-menu snag-dk-menu-form",role:"group","aria-label":p("filter.button"),children:[r("div",{class:"snag-dk-menugroup",children:[s&&r("label",{children:[p("filter.read"),r("select",{value:n.read,onChange:f=>h({read:f.currentTarget.value}),children:[r("option",{value:"all",children:p("filter.read.all")}),r("option",{value:"unread",children:p("filter.read.unread")}),r("option",{value:"read",children:p("filter.read.read")})]})]}),r("label",{children:[p("filter.by"),r("select",{value:n.by??"",onChange:f=>h({by:f.currentTarget.value||void 0}),children:[r("option",{value:"",children:p("filter.by.anyone")}),c.map(([f,x])=>r("option",{value:f,children:x}))]})]}),r("label",{children:[p("filter.pages"),r("select",{value:n.page??"",onChange:f=>h({page:f.currentTarget.value||void 0}),children:[r("option",{value:"",children:p("filter.pages.all")}),_.map(f=>r("option",{value:f,children:f}))]})]}),r("label",{class:"snag-dk-pageonly",children:[r("input",{type:"checkbox",checked:n.pageOnly,onChange:f=>h({pageOnly:f.currentTarget.checked})})," ",p("filter.pageonly")]})]}),r("div",{class:"snag-dk-menugroup snag-dk-menugroup-last",children:r(Sn,{label:p("dock.clear"),title:p("dock.clear.aria"),cls:"snag-dk-link snag-dk-clear",onConfirm:o})})]})]}),a]})]})}function Ft({snags:e,groups:n,route:t,onOpen:o,onHover:s,onExport:a,onClearAll:i,onMarkAllRead:d,clusterFilter:g,onClusterClear:u,filter:h,onFilter:w,hiddenNote:c,onHiddenShow:_,seenAt:v}){const b=Lt(e),$=n.flatMap(m=>m.snags),f=h.statuses.length>0||!!h.by||!!h.page||!!h.q?.trim()||h.pageOnly||h.newOnly||h.read!=="all",x=v?e.filter(m=>he(m,v)).length:0,E=j(null),[R,C]=P(!1),A=m=>{m.key!=="Escape"||!R||(m.stopPropagation(),C(!1))},D=j(null);return U(()=>{const m=E.current,N=D.current;!m||!N||(m.scrollTop+=N.getBoundingClientRect().top-m.getBoundingClientRect().top)},[t,n.length]),r(L,{children:[e.length>0&&r(Ht,{round:e,filter:h,onFilter:w,onClearAll:i,...v===void 0?{}:{seenAt:v},trailing:v&&h.newOnly&&x>0&&d?r("button",{type:"button",class:"snag-dk-link snag-dk-newpill",onClick:d,children:p("filter.new.markread")}):v&&(x>0||h.newOnly)?r("button",{type:"button",class:"snag-dk-link snag-dk-newpill","aria-pressed":h.newOnly,onClick:()=>w({...h,newOnly:!h.newOnly}),children:h.newOnly?p(x===0?"filter.new.none":"filter.new.on"):p("filter.new",{n:z(x)})}):null}),e.length===0?r("div",{class:"snag-dk-empty",children:r("p",{children:p("dock.empty")})}):$.length===0&&f?r("div",{class:"snag-dk-empty",children:h.pageOnly&&e.some(m=>m.route!==t)?r("p",{children:p("dock.empty.page",{n:z(e.filter(m=>m.route!==t).length),m:z(new Set(e.filter(m=>m.route!==t).map(m=>m.route)).size)})}):r("p",{children:p("dock.empty.filter")})}):r(L,{children:[c&&r("p",{class:"snag-dk-notice",children:[p("dock.hiddenrow")," ",r("button",{type:"button",class:"snag-dk-link",onClick:()=>_(c),children:p("dock.hiddenrow.show")})]}),g&&r("p",{class:"snag-dk-notice",children:[p("dock.cluster",{n:g.length})," ",r("button",{type:"button",class:"snag-dk-link",onClick:()=>u?.(),children:p("dock.cluster.clear")})]}),e.every(m=>m.anchorState==="orphaned")&&r("p",{class:"snag-dk-notice",children:p("dock.empty.orphans")}),r("div",{class:"snag-dk-scroll",ref:E,children:n.map(m=>r("section",{class:"snag-dk-group",ref:m.here?D:null,children:[m.route!==""&&r("h3",{class:"snag-dk-grouphd",children:[r("span",{class:"snag-dk-route",children:m.route}),r("span",{class:"snag-dk-dim",children:z(m.snags.length)})]}),r("ul",{class:"snag-dk-list",children:m.snags.map(N=>r(jt,{snag:N,n:b.get(N.id),here:m.here,unread:!!v&&he(N,v),onOpen:o,onHover:s},N.id))})]},m.route))})]}),a&&r("div",{class:"snag-dk-foot",children:r("div",{class:"snag-dk-menus snag-dk-menus-up",onKeyDown:A,children:[R&&r("div",{class:"snag-dk-menubg","aria-hidden":"true",onClick:()=>C(!1)}),r("span",{class:"snag-dk-menuwrap",children:[r("button",{type:"button",class:"snag-dk-link","aria-expanded":R,"aria-haspopup":"menu",onClick:()=>C(!R),children:p("export.button")}),R&&r("div",{class:"snag-dk-menu snag-dk-menu-up",role:"menu",children:["md","json"].map(m=>r("button",{type:"button",role:"menuitem",onClick:()=>{C(!1),a(m)},children:p(m==="md"?"export.md":"export.json")}))})]})]})})]})}const ze=new Map;function Bt(e){const n=[];try{for(const[t,o]of new URL(e).searchParams)Mt(t)||n.push(o&&o!=="[redacted]"?`${t}=${o}`:t)}catch{return null}return n.length?`?${n.join("&")}`:null}function Kt({att:e,load:n}){const t=j(null),[o,s]=P(!1),[a,i]=P(null);return U(()=>{let d=!1;return n(e).then(async g=>{if(!g||d)return;const u=await createImageBitmap(g);d?u.close():i(u)}).catch(()=>{}),()=>{d=!0}},[e.id,e.url]),U(()=>{const d=t.current;if(!d||!a)return;const g=142,u=g/a.width;d.width=g,d.height=Math.min(96,Math.round(a.height*u)),d.getContext("2d").drawImage(a,0,0,a.width,Math.round(d.height/u),0,0,d.width,d.height)},[a]),a?r(L,{children:[r("button",{type:"button",class:"snag-dk-shot",onClick:()=>s(!0),"aria-label":p("shot.open"),children:r("canvas",{ref:t,width:142,height:Math.min(96,Math.round(a.height*(142/a.width)))})}),o&&r(qt,{bmp:a,onClose:()=>s(!1)})]}):null}function qt({bmp:e,onClose:n}){const t=j(null);return U(()=>{const o=t.current;o&&(o.width=e.width,o.height=e.height,o.getContext("2d").drawImage(e,0,0))},[e]),r("div",{class:"snag-dk-lightbox",role:"dialog","aria-modal":"true","aria-label":p("shot.aria"),tabIndex:-1,ref:o=>o?.focus(),onKeyDown:o=>{o.key==="Escape"&&(o.stopPropagation(),n())},onClick:n,children:[r("canvas",{ref:t}),r("button",{type:"button",class:"snag-dk-link snag-dk-lightclose",onClick:n,children:p("shot.close")})]})}function Wt({snag:e,loadShot:n}){const t=e.context;if(!t)return null;const o=e.attachments?.find(d=>d.kind==="screenshot"),s=t.derived,a=t.viewport,i=a?Math.round(a.dpr*100)/100:1;return r("div",{class:"snag-dk-cap",children:[o&&n&&r(Kt,{att:o,load:n}),r("p",{class:"snag-dk-caplabel",children:p("capture.label")}),t.page?.route!==void 0&&r("p",{children:p("capture.page",{route:t.page.route})}),s&&a&&r(L,{children:[r("p",{children:s.os?p("capture.agent",{browser:s.browser,os:s.os}):p("capture.agent.noos",{browser:s.browser})}),r("p",{children:i===1?p("capture.device.at1x",{device:s.device,w:a.w,h:a.h}):p("capture.device",{device:s.device,w:a.w,h:a.h,dpr:i})})]}),t.capture?.reasons?.map(d=>r("p",{class:"snag-dk-capwhy",children:d},d)),t.capture?.blindSpots?.map(d=>r("p",{class:"snag-dk-capwhy",children:d},d)),(()=>{const d=Bt(t.url);return d?r("p",{class:"snag-dk-capwhy",children:[p("detail.filedat",{query:d})," ",r("a",{class:"snag-dk-openq",href:t.url,target:"_blank",rel:"noreferrer",children:p("detail.openquery")})]}):null})()]})}function Tn(e){const n=e.context?.url??e.route;return`${n}${n.includes("?")?"&":"?"}${Xn("t")}=${e.key}`}function Yt({snag:e}){const[n,t]=P(!1),o=Tn(e);return navigator.clipboard?r("button",{type:"button",class:"snag-dk-link",onClick:()=>void navigator.clipboard.writeText(o).then(()=>{t(!0),setTimeout(()=>t(!1),1500)},()=>{}),children:p(n?"permalink.copied":"permalink.copy")}):null}function Gt({snag:e}){return navigator.clipboard?null:r("p",{class:"snag-dk-permaline",children:[r("span",{class:"snag-dk-permalabel",children:p("permalink.copy")})," ",r("span",{class:"snag-dk-permaurl",children:Tn(e)})]})}let Ie=null;function Vt({snag:e,list:n,onAssign:t}){const[o,s]=P([]);U(()=>{n&&(Ie??=n().catch(()=>(Ie=null,[])),Ie.then(s))},[n]);const a=e.assignee??null;if(!n||!t)return a?r("p",{class:"snag-dk-field",children:[r("span",{class:"snag-dk-dim",children:p("field.assignee")})," ",r("strong",{children:a.name})]}):null;const i=a&&!o.some(d=>d.id===a.id)?[a,...o]:o;return r("label",{class:"snag-dk-field",children:[r("span",{class:"snag-dk-dim",children:p("field.assignee")}),r("select",{class:"snag-dk-select",value:a?.id??"",onChange:d=>{const g=d.target.value;t(e.id,i.find(u=>u.id===g)??null)},children:[r("option",{value:"",children:p("assignee.none")}),i.map(d=>r("option",{value:d.id,children:d.name},d.id))]})]})}function Jt({snags:e,round:n,fallbackCursor:t,openId:o,onOpen:s,onStatus:a,onReply:i,onEdit:d,onDeleteComment:g,onDeleteThread:u,isMine:h,canDeleteOwnThread:w=!0,canModerate:c=!1,canStatus:_=!0,studio:v,assignees:b,onAssign:$,onShowAnyway:f,onAnnounce:x,loadShot:E}){const R=e.findIndex(k=>k.id===o),C=R>=0,A=k=>h?h(k):!0,D=C?R:Math.min(t,e.length),m=C?e[R]:n.find(k=>k.id===o),N=o?ze.get(o)??"":"",[O,B]=P(N),[fe,me]=P(N.length>0),_e=j(null);U(()=>{fe&&_e.current?.focus()},[fe]);const ke=k=>{B(k),o&&(k?ze.set(o,k):ze.delete(o))},be=xt(),[xe]=P(!be.name),[W,Le]=P(v?.member??null),[ye,An]=P(be.name??""),[Y,Nn]=P(be.email??""),[On,Ue]=P(!1),Q=Y.trim().length>0&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Y.trim()),je=!!O.trim()&&(!!W||!xe||!!ye.trim()&&!Q),zn=()=>{v&&(Ue(!1),kt(v.host,v.uid,v.env).then(k=>{if(k==="blocked")return Ue(!0);k&&(v.adopt(k),Le(k.reviewer.name),_e.current?.focus())}))},He=()=>{if(!m||!je)return;let k;W?k=W:xe&&(k=ye.trim(),yt({name:k,...Y.trim()?{email:Y.trim()}:{}})),i(m.id,O.trim(),k),ke(""),me(!1)};if(!m)return null;const H=m.comments[0],In=n.filter(k=>k.route===m.route).findIndex(k=>k.id===m.id)+1;return r("div",{class:"snag-dk-detail",children:[r("div",{class:"snag-dk-detailhd",children:[r("button",{type:"button",class:"snag-dk-link",onClick:()=>s(null),"aria-label":p("dock.back.aria"),children:[r("span",{"aria-hidden":"true",children:"\u2190"})," ",p("dock.back")]}),r("span",{class:"snag-dk-dim",children:p("dock.position",{n:C?z(D+1):"\u2013",total:z(e.length)})}),r("span",{class:"snag-dk-nav",children:[r("button",{type:"button",class:"snag-dk-link",disabled:D<=0,"aria-label":p("dock.prev"),onClick:()=>s(e[D-1].id),children:"\u2191"}),r("button",{type:"button",class:"snag-dk-link",disabled:C?D>=e.length-1:D>=e.length,"aria-label":p("dock.next"),onClick:()=>s(e[C?D+1:D].id),children:"\u2193"})]})]}),r("div",{class:"snag-dk-card",children:[r("div",{class:"snag-dk-meta",children:[r("span",{class:"snag-dk-num",style:{background:ue(m.status),color:xn(m.status)},children:In}),r("strong",{children:H?.author.name??p("author.unknown")}),r("span",{class:"snag-dk-dim",children:m.key}),H&&r(Cn,{iso:H.createdAt}),r(Yt,{snag:m})]}),r("div",{class:"snag-dk-cardbody",children:wn(H?.body??"")}),r(Gt,{snag:m}),H&&(A(H.author)||c)&&r(En,{body:H.body,...A(H.author)?{onEdit:k=>d(H.id,k)}:{},deleteLabel:p("comment.delete"),...c||w&&m.comments.every(k=>A(k.author))?{onDelete:()=>u(m.id)}:{}})]}),_?r("label",{class:"snag-dk-field",children:[r("span",{class:"snag-dk-dim",children:p("field.status")}),r("select",{class:"snag-dk-select",style:{borderColor:ue(m.status)},value:m.status,onChange:k=>{const X=k.target.value;a(m.id,X),x?.(p("announce.status",{key:m.key,status:pe(X)}))},children:Oe.map(k=>r("option",{value:k,children:pe(k)},k))})]}):r("p",{class:"snag-dk-field","data-status-locked":!0,children:[r("span",{class:"snag-dk-dim",children:p("field.status")}),r("strong",{children:pe(m.status)}),r("span",{class:"snag-dk-dim",children:p("field.status.locked")})]}),r(Vt,{snag:m,...b&&$?{list:b,onAssign:$}:{}}),r(Wt,{snag:m,...E?{loadShot:E}:{}}),m.anchorReasons?.includes("hidden")&&r("p",{class:"snag-dk-moved-note",children:[p("detail.hidden")," ",r("button",{type:"button",class:"snag-dk-link",onClick:()=>f?.(m),children:p("detail.hidden.show")})]}),m.anchorState!=="anchored"&&r("p",{class:"snag-dk-moved-note",children:[p(`detail.${m.anchorState}`,{label:m.anchor.label}),m.anchorReasons?.includes("budget-exceeded")&&` ${p("detail.unavailable")}`]}),m.anchorState!=="anchored"&&r(zt,{anchor:m.anchor}),m.comments.length>1&&r("ul",{class:"snag-dk-replies-list",children:m.comments.slice(1).map(k=>r("li",{children:[r("strong",{children:k.author.name})," ",r(Cn,{iso:k.createdAt}),wn(k.body??""),(A(k.author)||c)&&r(En,{body:k.body,...A(k.author)?{onEdit:X=>d(k.id,X)}:{},deleteLabel:p("reply.delete"),onDelete:()=>g(k.id)})]},k.id))}),fe?r("div",{class:"snag-dk-replybox",children:[W?r("p",{class:"snag-dk-who",children:[p("who.member",{name:W})," ",r("button",{type:"button",class:"snag-dk-link",onClick:()=>{v?.signOut(),Le(null)},children:p("who.signout")})]}):xe&&r(L,{children:[r("input",{class:"snag-input",type:"text",autocomplete:"name",placeholder:p("who.name"),"aria-label":p("who.name"),value:ye,onInput:k=>An(k.target.value)}),r("input",{class:`snag-input${Q?" snag-input--bad":""}`,type:"email",inputMode:"email",autocomplete:"email",placeholder:p("who.email"),"aria-label":p("who.email"),"aria-invalid":Q?"true":void 0,value:Y,onInput:k=>Nn(k.target.value)}),Q&&r("p",{class:"snag-dk-who",children:p("who.email.bad")})]}),v&&!W&&r("p",{class:"snag-dk-who",children:[r("button",{type:"button",class:"snag-dk-link",onClick:zn,children:p("who.signin")}),On&&r("span",{role:"status",children:[" ",p("who.signin.blocked")]})]}),r("textarea",{ref:_e,class:"snag-text",rows:2,enterkeyhint:"enter","aria-label":p("reply.aria"),placeholder:p("reply.placeholder"),value:O,onInput:k=>ke(k.target.value),onKeyDown:k=>{k.key==="Enter"&&(k.metaKey||k.ctrlKey)&&(k.preventDefault(),He()),k.key==="Escape"&&(k.stopPropagation(),k.target.blur())}}),r("div",{class:"snag-actions",children:[r("button",{type:"button",class:"snag-cancel",onClick:()=>{ke(""),me(!1)},children:p("action.cancel")}),r("button",{type:"button",class:"snag-send",disabled:!je,onClick:He,children:p("reply.send")})]})]}):r("button",{type:"button",class:"snag-dk-addreply",onClick:()=>me(!0),children:p("reply.add")})]})}function Qt(e){const n=e.openId?e.snags.find(b=>b.id===e.openId):null,t=j(null),o=e.clusterFilter?e.snags.filter(b=>e.clusterFilter.includes(b.id)):e.snags,s=Dt(o.filter(b=>Rt(b,e.filter,e.seenAt)),e.filter,e.route,e.seenAt),a=Pt(s,e.filter.sort),i=e.filter.sort==="page"?Ut(a,e.route):[{route:"",here:!1,snags:a}],d=i.flatMap(b=>b.snags),g=j(0),u=d.findIndex(b=>b.id===e.openId);u>=0&&(g.current=u);const h=j(null),[w,c]=P(null);e.openId?(h.current={id:e.openId,absent:u===-1},w&&c(null)):h.current?.absent&&w!==h.current.id&&(c(h.current.id),h.current=null),U(()=>{t.current?.focus()},[e.openId]),U(()=>{if(!(window.matchMedia?.("(pointer: coarse)").matches??!1))return;const b=t.current;return b?ct(b):void 0},[]);const _=j({snag:n,onStatus:e.onStatus,can:e.canStatus!==!1});_.current={snag:n,onStatus:e.onStatus,can:e.canStatus!==!1},U(()=>{const b=$=>{const{snag:f,onStatus:x,can:E}=_.current;if(!f||!E||$.metaKey||$.ctrlKey||$.altKey||$.composedPath().some(A=>{const D=A;if(!D?.tagName)return!1;const m=D.tagName.toLowerCase();return m==="textarea"||m==="select"?!0:m==="input"?!/^(button|submit|checkbox|radio)$/i.test(D.type):D.isContentEditable?!0:/^(textbox|searchbox|combobox)$/.test(D.getAttribute?.("role")??"")}))return;const C=Number($.key);if(C>=1&&C<=Oe.length){$.preventDefault(),x(f.id,Oe[C-1]);return}($.key==="r"||$.key==="R")&&($.preventDefault(),x(f.id,f.status==="resolved"?"open":"resolved"))};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[]);const v=window.matchMedia?.("(pointer: coarse)").matches??!1;return r("aside",{ref:t,class:"snag-dk",role:"complementary","aria-label":p("dock.aria"),tabIndex:-1,onKeyDown:b=>{b.key==="Escape"&&(b.stopPropagation(),e.openId?e.onOpen(null):e.onClose())},children:[v&&r("div",{class:"snag-dk-scrim","aria-hidden":"true",onClick:e.onClose}),v&&r("div",{class:"snag-dk-grab","aria-hidden":"true",onPointerDown:b=>{const $=b.clientY,f=b.currentTarget;try{f.setPointerCapture(b.pointerId)}catch{}f.onpointermove=x=>{x.clientY-$>56&&(f.onpointermove=null,e.onClose())},f.onpointerup=()=>f.onpointermove=null},children:r("span",{})}),r("header",{class:"snag-dk-hd",children:[!n&&e.rounds&&e.rounds.length>1&&e.onRound?r("span",{class:"snag-dk-roundwrap",children:[r("select",{class:"snag-dk-round","aria-label":p("round.label"),value:String(e.activeRound??""),onChange:b=>e.onRound(Number(b.currentTarget.value)),children:e.rounds.map(b=>r("option",{value:String(b.number),children:[b.name,b.closed?` ${p("round.closed")}`:""]},b.number))}),r("svg",{class:"snag-dk-roundcaret",width:"10",height:"10",viewBox:"0 0 8 8","aria-hidden":"true",children:r("path",{d:"M1 2.5 4 5.5 7 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.4"})})]}):r("strong",{children:p(n?"dock.title.detail":"dock.title.list")}),r("button",{type:"button",class:"snag-dk-link",onClick:e.onClose,"aria-label":p("dock.close"),children:"\u2715"})]}),n?r(Jt,{...e,snags:d,round:e.snags,fallbackCursor:g.current},n.id):r(Ft,{...e,groups:i,hiddenNote:w,onHiddenShow:b=>{c(null),e.onOpen(b)}})]})}const Rn=360,Xt=` .snag-dk{position:fixed;inset-block:0;inset-inline-end:0;width:${Rn}px;max-width:100vw;z-index:${it.dock};background:${l.bg};color:${l.fg};display:flex;flex-direction:column;font:400 13px/1.45 ${l.font};box-shadow:${l.shadow};border-inline-start:1px solid ${l.border};pointer-events:auto;overscroll-behavior:contain}.snag-dk-filters{padding:10px 14px 6px;border-block-end:1px solid ${l.border};display:grid;gap:8px;flex:0 0 auto}.snag-dk-searchwrap{position:relative;display:flex}.snag-dk-searchicon{position:absolute;inset-inline-start:9px;top:50%;transform:translateY(-50%);color:${l.muted};pointer-events:none}.snag-dk-search{width:100%;box-sizing:border-box;font-size:12px;padding:6px 8px;padding-inline-start:28px}.snag-dk-chiphead{display:flex;justify-content:space-between;align-items:center;margin-block-end:-4px}.snag-dk-chiphead .snag-dk-menutitle{padding:0}.snag-dk-selectall{font-size:11px;letter-spacing:.06em;text-transform:uppercase;padding:2px 4px;margin-inline-end:-4px}.snag-dk-chips{display:grid;grid-template-columns:1fr 1fr;gap:6px}.snag-dk-chip{font:500 12px/1.2 ${l.font};color:${l.fg};padding:7px 10px;border-radius:6px;border:1px solid ${l.border};background:none;cursor:pointer;text-align:start;display:flex;align-items:center;gap:7px;min-width:0;transition:background ${l.motion},border-color ${l.motion}}.snag-dk-chip:hover{background:${l.hover}}.snag-dk-chip:focus-visible{outline:2px solid ${l.focus};outline-offset:1px}.snag-dk-chip[aria-pressed="true"]{font-weight:600}.snag-dk-chipdot{flex:0 0 8px;width:8px;height:8px;border-radius:50%;forced-color-adjust:none}.snag-dk-chiplabel{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.snag-dk-chipn{flex:0 0 auto;color:${l.muted};font-variant-numeric:tabular-nums}.snag-dk-chip-stray{color:${l.muted};cursor:default}.snag-dk-chip-stray:hover{background:none}@media (forced-colors:active){.snag-dk-chip[aria-pressed="true"]{border:2px solid Highlight;padding:6px 9px}}.snag-dk-menus{display:flex;gap:4px;position:relative;margin-inline-start:-6px}.snag-dk-trigger{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:500;position:relative;z-index:3}.snag-dk-menuwrap{position:relative}.snag-dk-menugroup{display:flex;flex-direction:column;gap:1px;padding-bottom:6px;margin-bottom:6px;border-bottom:1px solid ${l.border}}.snag-dk-menugroup-last{padding-bottom:0;margin-bottom:0;border-bottom:0}.snag-dk-menutitle{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:${l.muted};padding:2px 8px 4px}.snag-dk-menubg{position:absolute;inset:-200px -20px -2000px;background:transparent;z-index:2}.snag-dk-menu{position:absolute;inset-block-start:100%;inset-inline-start:0;z-index:3;min-width:150px;background:${l.bg};border:1px solid ${l.border};border-radius:6px;box-shadow:${l.shadow};display:grid;padding:4px}.snag-dk-menu button{font:400 12px/1.3 ${l.font};color:${l.fg};background:none;border:0;text-align:start;padding:5px 8px;border-radius:4px;cursor:pointer;display:flex;gap:4px}.snag-dk-menu button:hover{background:color-mix(in srgb,${l.fg} 8%,transparent)}.snag-dk-menus-up{position:relative}.snag-dk-menu-up{inset-block-start:auto;inset-block-end:100%;margin-block-end:4px}.snag-dk-menu-form{padding:8px;gap:6px;min-width:224px}.snag-dk-menu-form label:not(.snag-dk-pageonly){display:grid;gap:2px;font:600 10px/1.4 ${l.font};letter-spacing:.05em;text-transform:uppercase;color:${l.muted}}.snag-dk-menu-form select{font:400 12px/1.3 ${l.font};color:${l.fg};background:${l.bg};border:1px solid ${l.border};border-radius:4px;padding:4px}.snag-dk-pageonly{display:flex;align-items:center;gap:6px;font-size:12px;color:${l.fg};cursor:pointer}.snag-dk-permaline{margin:6px 0 0;font-size:11px;color:${l.muted};overflow-wrap:anywhere}.snag-dk-permalabel{font-weight:600}.snag-dk-permaurl{user-select:all}.snag-dk:focus{outline:none}@media (pointer:coarse){.snag-dk{inset-block-start:auto;inset-inline-start:0;width:auto;height:82vh;border-radius:14px 14px 0 0;box-sizing:border-box;padding-bottom:max(var(${y.tbH},68px),var(${y.kb},0px));padding-inline:env(safe-area-inset-left) env(safe-area-inset-right)}.snag-dk-scrim{position:fixed;inset:0;background:#0005;touch-action:none;z-index:-1}.snag-dk-grab{display:flex;justify-content:center;padding:10px 0 4px;touch-action:none}.snag-dk-grab span{width:36px;height:4px;border-radius:2px;background:${l.border}}.snag-dk-item{min-height:56px}.snag-dk-link{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}.snag-dk-select{min-height:44px}.snag-dk-chip{min-height:44px}.snag-dk-search{min-height:44px}.snag-dk-round{min-height:44px}}@media (pointer:fine){.snag-dk-scrim,.snag-dk-grab{display:none}}.snag-dk-hd{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid ${l.border};flex:0 0 auto}.snag-dk-scroll{overflow-y:auto;flex:1 1 auto}.snag-dk-list{list-style:none;margin:0;padding:0}.snag-dk-grouphd{position:sticky;top:0;z-index:1;margin:0;display:flex;align-items:center;gap:8px;padding:7px 14px;font:600 11px/1.45 ${l.font};letter-spacing:.02em;background:${l.sunken};border-bottom:1px solid ${l.border}}.snag-dk-route{color:${l.fg};overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;direction:ltr;unicode-bidi:isolate}.snag-dk-grouphd .snag-dk-dim{margin-inline-start:auto;font-weight:400;flex:0 0 auto}.snag-dk-goto{flex:0 0 auto;color:${l.muted};font-size:13px;line-height:1}.snag-dk-dev{flex:0 0 auto;color:${l.muted};display:flex;align-items:center}.snag-dk-item:hover .snag-dk-goto,.snag-dk-item:focus-visible .snag-dk-goto{color:${l.accent}}.snag-dk-item{display:flex;gap:10px;align-items:flex-start;width:100%;text-align:start;background:transparent;border:0;border-bottom:1px solid ${l.border};color:inherit;font:inherit;padding:11px 14px;cursor:pointer;transition:background ${l.motion}}.snag-dk-item:hover{background:${l.hover}}.snag-dk-item:focus-visible{outline:2px solid ${l.focus};outline-offset:-2px}.snag-dk-dot{flex:0 0 7px;width:7px;height:7px;border-radius:50%;margin-block-start:8px;background:transparent}.snag-dk-dot--on{background:${l.accent}}.snag-dk-newpill{margin-inline-start:auto;font-weight:600;white-space:nowrap}.snag-dk-newpill[aria-pressed="true"]{background:${l.sunken};border-radius:6px}.snag-dk-newpill:hover{background:${l.hover}}.snag-dk-newpill:focus-visible{outline:2px solid ${l.focus};outline-offset:-2px}.snag-dk-num{flex:0 0 22px;height:22px;border-radius:50% 50% 50% 2px;font-weight:600;font-size:11px;line-height:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box}.snag-dk-num--orphaned{border:2px solid currentColor;box-shadow:inset 0 0 0 2px currentColor}.snag-dk-num--approximate{border:2px dashed currentColor}.snag-dk-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 auto}.snag-dk-body,.snag-dk-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.snag-dk-sub{font-size:11px}.snag-dk-dim{color:${l.muted}}.snag-dk-moved{color:${l.anchorOrphan};font-weight:600}.snag-dk-replies{background:${l.surface};border-radius:999px;padding:1px 7px;font-size:11px;flex:0 0 auto}.snag-dk-empty{padding:28px 16px;text-align:center;flex:1 1 auto}.snag-dk-empty p{margin:0 0 4px}.snag-dk-notice{margin:0;padding:11px 14px;font-size:12px;color:${l.muted};border-bottom:1px solid ${l.border};flex:0 0 auto}.snag-dk-roundwrap{position:relative;display:inline-flex;align-items:center;min-width:0;flex:0 1 auto}.snag-dk-round{appearance:none;-webkit-appearance:none;background:${l.sunken};border:1px solid ${l.border};color:${l.fg};font:600 13px/1.45 ${l.font};padding-block:4px;padding-inline:10px 26px;border-radius:6px;cursor:pointer;max-width:100%;text-overflow:ellipsis;transition:background ${l.motion}}.snag-dk-round:hover{background:${l.hover}}.snag-dk-round:focus-visible{outline:2px solid ${l.focus};outline-offset:1px}.snag-dk-round option{background:${l.bg};color:${l.fg};font-weight:400}.snag-dk-roundcaret{position:absolute;inset-inline-end:10px;color:${l.muted};pointer-events:none}.snag-dk-foot{display:flex;gap:6px;padding:10px 14px;border-top:1px solid ${l.border};flex:0 0 auto}.snag-dk-link{background:transparent;border:0;color:${l.accent};font:inherit;cursor:pointer;padding:4px 6px;border-radius:calc(${l.radius} - 2px);transition:background ${l.motion}}.snag-dk-link:hover:not(:disabled){background:${l.hover}}.snag-dk-link:disabled{color:${l.disabled};cursor:not-allowed}.snag-dk-link:focus-visible{outline:2px solid ${l.focus};outline-offset:1px}.snag-dk-detail{padding:12px 14px;overflow-y:auto;flex:1 1 auto;display:flex;flex-direction:column;gap:12px}.snag-dk-detailhd{display:flex;align-items:center;justify-content:space-between;gap:8px}.snag-dk-nav{display:flex;gap:2px}.snag-dk-card{background:${l.surface};border-radius:${l.radius};padding:11px}.snag-dk-meta{display:flex;justify-content:space-between;gap:8px;font-size:12px;margin-bottom:6px}.snag-md{overflow-wrap:anywhere}.snag-md>*{margin:0}.snag-md>*+*{margin-block-start:6px}.snag-md p{white-space:pre-wrap}.snag-md ul,.snag-md ol{padding-inline-start:20px}.snag-md li+li{margin-block-start:2px}.snag-md code{background:${l.sunken};border-radius:3px;padding:1px 4px;font-size:.92em;font-family:ui-monospace,monospace}.snag-md pre{background:${l.sunken};border-radius:${l.radius};padding:8px 10px;overflow-x:auto}.snag-md pre code{background:none;padding:0;font-size:.92em}.snag-md a{color:${l.accent}}.snag-dk-field{display:flex;flex-direction:column;gap:4px;font-size:12px}.snag-dk-select{background:${l.surface};color:inherit;border:2px solid;border-radius:${l.radius};padding:7px 9px;font:inherit;min-height:34px}.snag-dk-done{color:${l.muted};text-decoration:line-through}.snag-dk-meta .snag-dk-num{margin-inline-end:2px}.snag-dk-cap{background:${l.sunken};border-radius:${l.radius};padding:9px 11px;display:flex;flex-direction:column;gap:1px;font-size:12px;overflow-wrap:anywhere}.snag-dk-cap p{margin:0}.snag-dk-shot{padding:0;border:1px solid ${l.border};border-radius:calc(${l.radius} - 2px);background:none;cursor:zoom-in;overflow:hidden;line-height:0;align-self:flex-start;margin-block-end:6px}.snag-dk-shot canvas{display:block;max-width:100%}.snag-dk-lightbox{position:fixed;inset:0;z-index:1;background:#000c;display:flex;align-items:center;justify-content:center;padding:24px;cursor:zoom-out}.snag-dk-lightbox canvas{max-width:100%;max-height:100%;object-fit:contain;box-shadow:${l.shadow};background:${l.bg}}.snag-dk-lightclose{position:absolute;inset-block-start:12px;inset-inline-end:16px;color:#fff}.snag-dk-caplabel{font-weight:600;font-size:11px;letter-spacing:.02em;margin-bottom:3px!important}.snag-dk-capwhy{color:${l.muted};font-size:11px;margin-top:5px!important}.snag-dk-moved-note{margin:0;padding:8px 10px;font-size:12px;background:${l.sunken};border-inline-start:3px solid ${l.anchorOrphan};border-radius:${l.radius}}.snag-dk-anchor{font-size:12px;border:1px solid ${l.border};border-radius:${l.radius};padding:6px 10px;background:${l.sunken}}.snag-dk-anchor summary{cursor:pointer;color:${l.muted};font-weight:600;list-style:revert}.snag-dk-anchor dl{margin:8px 0 2px;display:grid;gap:6px}.snag-dk-anchor dt{color:${l.muted};font-size:11px;letter-spacing:.03em;text-transform:uppercase}.snag-dk-anchor dd{margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;overflow-wrap:anywhere;user-select:text}.snag-dk-replies-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.snag-dk-replies-list li{background:${l.sunken};border-radius:${l.radius};padding:9px;overflow-wrap:anywhere}.snag-dk-acts{display:flex;gap:2px;margin-top:6px}.snag-dk-act{background:transparent;border:0;color:${l.muted};font:inherit;font-size:11px;cursor:pointer;padding:3px 6px;border-radius:calc(${l.radius} - 3px);transition:background ${l.motion},color ${l.motion}}.snag-dk-more{font-size:14px;line-height:1;letter-spacing:1px}.snag-dk-act:hover{background:${l.hover};color:inherit}.snag-dk-act:focus-visible{outline:2px solid ${l.focus};outline-offset:1px}.snag-dk-act--danger:hover{color:${l.anchorOrphan}}.snag-dk-menu .snag-dk-act--danger{color:${l.fg}}.snag-dk-menu .snag-dk-act--danger:hover{color:${l.anchorOrphan}}.snag-dk-armed{color:${l.anchorOrphan};font-weight:600}.snag-dk-clear{margin-inline-start:auto}.snag-dk-menu .snag-dk-clear{margin-inline-start:0}.snag-dk-editbox{display:flex;flex-direction:column;gap:8px;margin-top:8px}.snag-dk-addreply{background:transparent;border:1px dashed ${l.border};color:${l.muted};border-radius:${l.radius};padding:9px;font:inherit;cursor:pointer;text-align:start;transition:border-color ${l.motion},color ${l.motion}}.snag-dk-addreply:hover{border-color:${l.accent};color:inherit}.snag-dk-replybox{display:flex;flex-direction:column;gap:8px}.snag-dk-who{margin:0;font-size:11px;color:${l.muted}}.snag-dk-who .snag-dk-link{padding:0;font-size:inherit;text-decoration:underline}`;function Zt(e,n,t){const o=e.ownerDocument??document;vn(e,"form",lt),vn(e,"dock",Xt);const s=o.createElement("div");(t??e).appendChild(s);const a=o.defaultView?.matchMedia?.("(pointer: coarse)").matches??!1,i=g=>{const u=e.host;g&&!a?u.style.setProperty(y.dockW,`${Rn}px`):u.style.removeProperty(y.dockW)};i(!0);const d=g=>{on(r(Qt,{...g}),s)};return d(n),{update:d,close(){i(!1),on(null,s),s.remove()}}}const Dn=24;function Pn(e,n){const t=e.innerHeight,o=n.querySelector(".snag-dk");if(!o)return{top:0,bottom:t};const s=o.getBoundingClientRect();return s.height>=t-1?{top:0,bottom:t}:{top:0,bottom:Math.max(0,s.top)}}function eo(e,n,t){const o=t.anchor.rect;if(!o)return;const s=t.anchor.offset??{fy:.5},a=o.y+o.h*s.fy,i=Pn(e,n),d=a-e.scrollY;if(d>=i.top+Dn&&d<=i.bottom-Dn)return;const g=e.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1;e.scrollTo({top:Math.max(0,a-(i.top+i.bottom)/2),behavior:g?"auto":"smooth"})}export{Zt as openDock,eo as scrollToSnag,Pn as visibleStrip};
@@ -1,2 +1,2 @@
1
- const xe="Snagset",To="snagset",gn="snagset.v1",Ro="Snagset",zt="Snag",_o="Snags",Io={config:"SnagsetConfig"},Po={root:"data-snag-root"},Ot=e=>Po[e],Mo={anchor:"data-snag-anchor",ignore:"data-snag-ignore",mask:"data-snag-mask",nomask:"data-snag-nomask",src:"data-snag-src",component:"data-snag-component"},zo=e=>Mo[e],z={font:"--snag-font",accent:"--snag-accent",onAccent:"--snag-onAccent",bg:"--snag-bg",fg:"--snag-fg",muted:"--snag-muted",border:"--snag-border",radius:"--snag-radius",shadow:"--snag-shadow",z:"--snag-z",motion:"--snag-motion",surface:"--snag-surface",sunken:"--snag-sunken",hover:"--snag-hover",focus:"--snag-focus",disabled:"--snag-disabled",statusOpen:"--snag-status-open",statusProgress:"--snag-status-progress",statusReview:"--snag-status-review",statusResolved:"--snag-status-resolved",anchorOrphan:"--snag-anchor-orphan",tbH:"--snag-tb-h",dockW:"--snag-dock-w",kb:"--snag-kb",thumbX:"--snag-thumb-x",thumbW:"--snag-thumb-w"},Oo=e=>`var(${z[e]})`,Do=e=>"snag_"+e,vt={query:["snag_t","snag_off","snag_debug","snag_theme"],fragment:["snag_k"]},Lo="snag:disclosure:v1",Dt="snag:identity",yn="data-snag-theme",de={session:e=>`snag:session:${e}`,silent:e=>`snag:silent:${e}`,identity:Dt,threads:(e,t)=>`snag:threads:${e}:${t}`,seen:(e,t)=>`snag:seen:${e}:${t}`,counts:e=>`snag:counts:${e}`,draft:(e,t)=>`snag:draft:${e}:${t}`,outbox:e=>`snag:outbox:${e}`,mode:"snag:mode",handoff:"snag:handoff",seenCoach:"snag:seen-coach",disclosure:Lo},Me={panels:"snag.panels.js",crumbs:"snag.crumbs.js",capture:"snag.capture.js",screenshot:"snag.screenshot.js",anchorExt:"snag.anchor-ext.js",anchorFuzzy:"snag.anchor-fuzzy.js",dock:"snag.dock.js",text:"snag.text.js"},wt={thread:"thr_",comment:"cmt_",attachment:"att_"},Lt={attachmentKind:"x-snagset-attachment-kind",attachmentWidth:"x-snagset-attachment-width",attachmentHeight:"x-snagset-attachment-height"},No={route:"snagset:route"},bn={original:"snagset.original",wrapped:"snagset.wrapped"},vn="position:absolute!important;top:0!important;left:0!important;width:0!important;height:0!important;margin:0!important;padding:0!important;border:0!important;pointer-events:none!important;z-index:2147483647;isolation:isolate;color-scheme:light dark;";function wn(e){const t=e.ownerDocument.defaultView?.getComputedStyle(e);return t?t.transform!=="none"&&t.transform!==""||t.filter!=="none"&&t.filter!==""||t.perspective!=="none"&&t.perspective!==""||/transform|filter|perspective|contain/.test(t.willChange)||/paint|layout|strict|content/.test(t.contain)||t.containerType!==void 0&&t.containerType!=="normal"&&t.containerType!=="":!1}function Nt(e){const t=e.documentElement,n=e.body;return t&&wn(t)?{parent:n??t,trapped:!0}:n&&wn(n)?{parent:t??n,trapped:!1}:{parent:n??t,trapped:!1}}function xn(e=document){const t=Ot("root"),n=e.querySelector(`[${t}]`);if(n?.shadowRoot)return n.shadowRoot;const o=e.createElement("div");return o.setAttribute(t,""),o.style.cssText=vn,Nt(e).parent.appendChild(o),o.attachShadow({mode:"open"})}function Ho(e,t,n=5){const o=e.ownerDocument??document,r=e.host,c=Nt(o).parent;if(typeof MutationObserver!="function"||!c)return()=>{};let u=0;const a=new MutationObserver(()=>{if(!r.isConnected){if(u++,u>n){a.disconnect(),t(u);return}Nt(o).parent.appendChild(r)}});return a.observe(c,{childList:!0}),()=>a.disconnect()}const Sn=[["pointerdown",!0],["mousedown",!0],["touchstart",!0],["pointerup",!0],["mouseup",!0],["touchend",!0],["click",!0],["dblclick",!0],["focusin",!0],["focusout",!0]];function Wo(e){const t=e.host,n=o=>o.stopPropagation();for(const[o,r]of Sn)t.addEventListener(o,n,{passive:r});return()=>{for(const[o]of Sn)t.removeEventListener(o,n)}}function jo(e,t,n=20){const o=e.host;if(typeof MutationObserver!="function")return()=>{};let r=0;const c=()=>{let a=!1;return o.getAttribute("aria-hidden")==="true"&&(o.removeAttribute("aria-hidden"),a=!0),o.hasAttribute("inert")&&(o.removeAttribute("inert"),a=!0),a},u=new MutationObserver(()=>{c()&&++r>n&&(u.disconnect(),t(r))});return c(),u.observe(o,{attributes:!0,attributeFilter:["aria-hidden","inert"]}),()=>u.disconnect()}const Uo={product:xe,set:Ro,item:zt,items:_o};function An(e){return(t,n)=>(e[t]??"").replace(/\{(\w+)\}/g,(o,r)=>{const c=n?.[r]??Uo[r];return c===void 0?o:String(c)})}const Fo=e=>new Intl.NumberFormat().format(e),kn={"where.anchored":"{label}","where.approximate":"position approximate \u2014 the page changed","where.orphaned":"moved \u2014 the element is gone","status.open":"Active","status.progress":"In progress","status.review":"In review","status.resolved":"Resolved","author.unknown":"Someone","label.image":"an image","label.link":"a link","label.button":"a button","label.tag":"the {tag}"},$n=An(kn),En={open:{colour:"#4f6ef7"},progress:{colour:"#f59e0b"},review:{colour:"#8b5cf6"},resolved:{colour:"#10b981"}},Cn=e=>e==="open"||e==="review"?"#fff":"#16161a",Tn=e=>e in En?$n(`status.${e}`):e,Bo=e=>$n(`where.${e.anchorState}`,{label:e.anchor.label});class Ht extends Error{code;constructor(t,n){super(n??t),this.name="AdapterError",this.code=t}}function Rn(e){return{id:e.id,key:e.key,route:e.route,...e.scope?{scope:e.scope}:{},...e.attachments?.length?{attachments:e.attachments}:{},anchor:e.anchor,anchorState:e.anchorState,context:e.context,status:"open",comments:e.comment?[{id:e.comment.id,snagId:e.id,body:e.comment.body,author:e.comment.author,createdAt:e.createdAt}]:[],createdBy:e.createdBy,createdAt:e.createdAt,updatedAt:e.createdAt}}const x=Object.fromEntries(Object.keys(z).map(e=>[e,Oo(e)])),Zo=Object.entries(En).map(([e,t])=>` ${z[`status${e[0].toUpperCase()}${e.slice(1)}`]}:${t.colour};`).join(`
2
- `),Vo=` :host{all:initial}[hidden]{display:none!important}:host{display:block;font:400 14px/1.45 ${x.font};color:${x.fg};${z.font}:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;${z.accent}:#2a51b8;${z.bg}:#fefdfc;${z.fg}:#181716;${z.muted}:#666564;${z.border}:#e4e3e0;${z.radius}:8px;${z.shadow}:0 6px 24px -4px rgb(0 0 0 / .18);${z.z}:2147483647;${z.motion}:160ms;${z.surface}:color-mix(in srgb,${x.fg} 6%,${x.bg});${z.sunken}:color-mix(in srgb,${x.fg} 3%,${x.bg});${z.hover}:color-mix(in srgb,${x.fg} 8%,${x.bg});${z.onAccent}:#fff;${z.focus}:color-mix(in srgb,${x.accent} 62%,${x.fg});${z.disabled}:color-mix(in srgb,${x.muted} 52%,${x.bg});${Zo} ${z.anchorOrphan}:#DC2626;}:host([${yn}="dark"]){${z.accent}:#8aafff;${z.onAccent}:#1d1c1a;${z.bg}:#1d1c1a;${z.fg}:#f0eeec;${z.muted}:#9a9997;${z.border}:#2d2c2b;${z.shadow}:0 6px 24px -4px rgb(0 0 0 / .6);}@media (prefers-reduced-motion:reduce){:host{${z.motion}:0ms}}@media (forced-colors:active){:host{${z.bg}:Canvas;${z.fg}:CanvasText;${z.muted}:CanvasText;${z.border}:CanvasText;${z.accent}:Highlight;${z.onAccent}:HighlightText;${z.surface}:Canvas;${z.sunken}:Canvas;${z.hover}:Canvas;${z.focus}:Highlight;${z.disabled}:GrayText;${z.shadow}:none;${z.anchorOrphan}:CanvasText;}.snag-pin{border-color:CanvasText!important;color:CanvasText!important;forced-color-adjust:none}}`,Je={shield:1,pins:3,dock:5,notice:6,toolbar:7},_n=new WeakMap;function at(e,t,n){let o=_n.get(e);if(o||_n.set(e,o=new Set),o.has(t))return;o.add(t);try{const u=new CSSStyleSheet;u.replaceSync(n),e.adoptedStyleSheets=[...e.adoptedStyleSheets,u];return}catch{}const c=(e.ownerDocument??document).createElement("style");c.setAttribute(`data-snag-${t}`,""),c.textContent=n,e.appendChild(c)}function Yo(e){return e==="light"||e==="dark"?e:"auto"}function Xo(e,t){const n=yn;if(t!=="auto")return e.setAttribute(n,t),()=>e.removeAttribute(n);const o=e.ownerDocument?.defaultView?.matchMedia?.("(prefers-color-scheme: dark)");if(!o)return e.setAttribute(n,"light"),()=>e.removeAttribute(n);const r=()=>e.setAttribute(n,o.matches?"dark":"light");return r(),o.addEventListener("change",r),()=>{o.removeEventListener("change",r),e.removeAttribute(n)}}function Wt(e){return e.getBoundingClientRect()}function xt(e){if(e.closest('[inert],[aria-hidden="true"]'))return!1;const t=e.checkVisibility;if(typeof t=="function")return t.call(e,{contentVisibilityAuto:!0,opacityProperty:!1,visibilityProperty:!0});const n=Wt(e);if(!(n.width>0||n.height>0||e.getClientRects().length>0))return!1;const r=e.ownerDocument?.defaultView;return r?r.getComputedStyle(e).visibility!=="hidden":!0}const Ko="button,a[href],[role=button],[role=link],[role=tab],[role=menuitem],label,input,select,textarea,summary",Jo=3,In=8,qo=new Set(["img","picture","canvas","video","audio","iframe","embed","object","svg","math","input","select","textarea","button","progress","meter"]);function Qo(e,t){return qo.has(e.tagName.toLowerCase())?!1:t.getComputedStyle(e).display==="inline"}function Pn(e){const t=e.ownerDocument?.defaultView;if(!t)return e;let n=e;for(let r=e;r;r=r.parentElement){const c=Wt(r);if(c.width>=In&&c.height>=In&&!Qo(r,t)){n=r;break}n=r}let o=0;for(let r=n;r&&o<=Jo;r=r.parentElement){if(r.matches(Ko))return r;o++}return n}const Go=10,jt=[["click",!1],["auxclick",!1],["dblclick",!1],["pointerdown",!1],["pointerup",!1],["mousedown",!1],["mouseup",!1],["contextmenu",!1],["dragstart",!1],["wheel",!1],["touchstart",!0],["touchmove",!0],["touchend",!0],["selectstart",!0],["keydown",!1],["keyup",!1]];function er(e,t,n){let o=e;for(;o&&o!==o.ownerDocument.documentElement&&o!==o.ownerDocument.body;){const r=getComputedStyle(o),c=(r.overflowY==="auto"||r.overflowY==="scroll")&&o.scrollHeight>o.clientHeight&&(t>0&&o.scrollTop+o.clientHeight<o.scrollHeight-1||t<0&&o.scrollTop>0),u=(r.overflowX==="auto"||r.overflowX==="scroll")&&o.scrollWidth>o.clientWidth&&(n>0&&o.scrollLeft+o.clientWidth<o.scrollWidth-1||n<0&&o.scrollLeft>0);if(c||u)return o;o=o.parentElement}return null}function Mn(e,t){const n=t==="y"?e.deltaY:e.deltaX;return e.deltaMode===1?n*16:e.deltaMode===2?n*(t==="y"?innerHeight:innerWidth):n}const tr=["position:fixed","inset:0",`z-index:${Je.shield}`,"touch-action:pan-x pan-y pinch-zoom","background:transparent"].join(";");function nr(e,t={}){const n=t.doc??e.ownerDocument??document,o=n.defaultView??window;let r=t.coarsePointer??o.matchMedia?.("(pointer: coarse)").matches??!1;const c=l=>{const b=l.pointerType,E=b==="touch"?!0:b==="mouse"||b==="pen"?!1:r;E!==r&&(r=E,d())},u=n.createElement("div");u.className="snag-shield",u.style.cssText=tr;let a="browse";const d=()=>{u.style.pointerEvents=r?"none":"auto",u.style.cursor="crosshair"};d();const m=l=>{const b=l;return!b||typeof b.closest!="function"?!1:e.contains(b)?!0:!!b.closest(`[${Ot("root")}]`)};function v(l,b,E){let S=E,Q=0;for(;S.shadowRoot&&Q++<Go;){const H=_(S.shadowRoot,l,b);if(!H||H===S)break;S=H}return S}function _(l,b,E){const S=l.elementsFromPoint;if(typeof S=="function"){for(const H of S.call(l,b,E))if(H.getRootNode()===l)return H;return null}const Q=l.elementFromPoint(b,E);return Q&&Q.getRootNode()===l?Q:null}function p(l,b){const E=[];for(const S of n.elementsFromPoint(l,b)){if(m(S))continue;if(S===n.documentElement||S===n.body){E.push(S);continue}const Q=v(l,b,S);E.push(m(Q)?S:Q)}return E}let P=null;const j=(l,b)=>{const[E]=p(l,b);E&&t.onPick?.(Pn(E),{x:l,y:b})};let B=!1;const y=()=>{const l=n.getSelection?.();if(!l||l.isCollapsed||l.rangeCount===0||!l.toString().trim())return!1;const b=l.anchorNode;if(!b||e.contains(b))return!1;const E=b.nodeType===1?b:b.parentElement;return!m(E)},K=l=>{const b=l.composedPath()[0];if(b&&m(b)){B=!1;return}if(l.type==="selectstart"){t.onSelectStart?.();return}const E=l.type;if(E.endsWith("down")||E.endsWith("start")){B=!1;return}if(E.endsWith("up")||E.endsWith("end")){B=y();return}if(E==="click"||E==="auxclick"){if(!B)return;B=!1,l.preventDefault(),l.stopImmediatePropagation()}},re=l=>{if(l.type==="pointerdown"&&c(l),a==="comments"){K(l);return}if(a!=="add")return;if(l.type==="keydown"||l.type==="keyup"){w(l);return}const b=l.composedPath()[0];if(b&&b!==u&&m(b))return;const E=jt.find(([S])=>S===l.type)?.[1]??!1;if(l.stopImmediatePropagation(),!E){if(r&&l.type==="pointerdown"){const S=l;P={x:S.clientX,y:S.clientY,t:performance.now()},D(S.clientX,S.clientY)}if(r&&l.type==="pointerup"&&P){const S=l,Q=P;P=null,Math.hypot(S.clientX-Q.x,S.clientY-Q.y)<=8&&performance.now()-Q.t<=700&&j(S.clientX,S.clientY);return}if(l.type==="click"||l.type==="auxclick"||l.type==="dblclick"){l.preventDefault();const S=l;j(S.clientX,S.clientY);return}if(l.type==="wheel"){const S=l,Q=Mn(S,"y"),H=Mn(S,"x"),[Z]=p(S.clientX,S.clientY),te=er(Z??null,Q,H);te&&(te.scrollTop+=Q,te.scrollLeft+=H,l.preventDefault());return}if(l.type==="dragstart"||l.type==="contextmenu"){l.preventDefault();return}(l.type==="pointerdown"||l.type==="mousedown")&&!r&&l.preventDefault()}},G=new Set(["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," ","Spacebar","PageUp","PageDown","Home","End"]),J=/^[a-z0-9/?]$/;function h(l){for(const b of l.composedPath()){const E=b;if(!(!E||E.nodeType!==1||typeof E.matches!="function")&&E.matches('input:not([type=button]):not([type=submit]):not([type=checkbox]):not([type=radio]),textarea,select,[contenteditable=""],[contenteditable=true],[role=textbox],[role=searchbox],[role=combobox]'))return!0}return!1}function w(l){G.has(l.key)||l.metaKey||l.ctrlKey||l.altKey||/^F\d{1,2}$/.test(l.key)||l.key!=="Escape"&&l.key.length===1&&J.test(l.key.toLowerCase())&&!h(l)&&(l.preventDefault(),l.stopImmediatePropagation())}for(const[l,b]of jt)o.addEventListener(l,re,{capture:!0,passive:b});let T=0,M=null;function U(){if(T=0,a!=="add"||!M)return;const[l]=p(M.x,M.y);t.onHover?.(l?Pn(l):null)}function D(l,b){a==="add"&&(M={x:l,y:b},!T&&(T=o.requestAnimationFrame(U)))}return u.addEventListener("pointermove",l=>D(l.clientX,l.clientY)),u.addEventListener("pointerleave",()=>{M=null,t.onHover?.(null)}),{shield:u,getMode:()=>a,setMode(l){a=l,B=!1,d(),l==="add"?e.appendChild(u):u.remove(),l!=="add"&&(M=null,t.onHover?.(null))},hitTest:p,destroy(){T&&o.cancelAnimationFrame(T);for(const[l]of jt)o.removeEventListener(l,re,{capture:!0});u.remove()}}}const or=/[\u200B-\u200D\u2060\uFEFF]/gu,rr=/[\s\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]+/gu,sr=[[/[\u2018\u2019\u201A\u201B]/gu,"'"],[/[\u201C\u201D\u201E\u201F]/gu,'"'],[/[\u2010-\u2015\u2212]/gu,"-"],[/\u2026/gu,"..."],[/\u2044/gu,"/"]];function ar(e){let t=e.normalize("NFC").replace(or,"");for(const[n,o]of sr)t=t.replace(n,o);return t.replace(rr," ").trim()}const ir={testid:1,domid:1,css:.9,aria:.75,"text-exact":.8,"text-fuzzy":.78,"path-rect":.35,none:0,manual:1},zn={anchored:.75,approximate:.35};function cr(e,t){const n=ir[e];return t===1?n:n/(1+Math.log2(t))}function On(e){return e>=zn.anchored?"anchored":e>=zn.approximate?"approximate":"orphaned"}const lr=[zo("anchor"),"data-testid","data-test-id","data-test","data-cy","data-qa","data-pw","data-automation-id"],Dn=e=>typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/["\\]/g,"\\$&"),dr=[{strategy:"testid",applicable:e=>!!e.testid,find:(e,t)=>Ut(t,lr.map(n=>`[${n}="${Dn(e.testid)}"]`).join(","))},{strategy:"domid",applicable:e=>!!e.domid,find:(e,t)=>Ut(t,`#${Dn(e.domid)}`)},{strategy:"css",applicable:e=>!!e.css,find:(e,t)=>{try{return Ut(t,e.css)}catch{return[]}}}];function Ut(e,t){return[...e.querySelectorAll(t)].filter(ur)}function ur(e){return!e.closest(`[${Ot("root")}]`)}function fr(e,t){const n=t.text?.exact;if(!n)return!0;const o=ar(e.textContent??"");return o?o===n||o.includes(n)||n.includes(o):!0}function Ln(e,t,n,o){xt(e)||o.push("hidden"),t.hostPath?.length&&o.push("shadow-boundary");const r=!fr(e,t);r&&o.push("text-drift");let c=o.includes("hidden")?Math.min(n,.7):n;return r&&(c=Math.min(c,.5)),c}const hr={element:null,strategy:"none",score:0,state:"orphaned",reasons:["not-found"],candidates:0};function Ft(e,t=document,n={}){const o=[];for(const r of dr){if(!r.applicable(e))continue;const c=r.find(e,t);if(c.length===0)continue;const u=cr(r.strategy,c.length),a=c[0];c.length>1&&o.push("ambiguous");const d=Ln(a,e,u,o),m={element:a,strategy:r.strategy,score:d,state:On(d),reasons:o.length?o:["exact"],candidates:c.length};if(m.reasons.includes("text-drift")&&n.extended){const v=n.extended(e,t,{...n.viewportWidth===void 0?{}:{viewportWidth:n.viewportWidth},...n.passCaches?{caches:n.passCaches}:{}});if(v&&v.score>m.score)return v}return m}return n.extended?.(e,t,{...n.viewportWidth===void 0?{}:{viewportWidth:n.viewportWidth},...n.passCaches?{caches:n.passCaches}:{}})??hr}const pr={"toolbar.aria":"{product} review toolbar","toolbar.group":"What you see","toolbar.browse":"Browse","toolbar.comments":"Comment","toolbar.comments.unresolved":"Comment, {n} unresolved","toolbar.add":"Add a comment","toolbar.add.draft":"Add a comment \u2014 one is unfinished","toolbar.panel":"All comments","pin.aria":"Comment {key} on {target}. {status}, {replies} replies. Press Enter.","pin.aria.one":"Comment {key} on {target}. {status}, 1 reply. Press Enter.","pin.aria.none":"Comment {key} on {target}. {status}. Press Enter.","pin.aria.moved":"Comment {key} on {target}. {status}. {where}. Press Enter.","pin.target":"{role} \u201C{name}\u201D","cluster.aria":"{n} comments here: {list}","nav.announce":"Comment {n} on {label}, {i} of {total}","action.retry":"Retry","action.dismiss":"Dismiss","action.export":"Export","action.exportclear":"Export & clear","error.quota":"Storage is full \u2014 this {item} is on screen but not saved. Export to keep them.","error.nostorage":"Comments won't be saved in this browser. Export before you leave to keep them.","error.linkrevoked":"This review link was turned off. Ask whoever sent it for a new one.","error.sessionended":"This review session has ended. Open your review link again to carry on.","error.sendfailed":"That {item} couldn't be sent, so it wasn't kept. Check your connection and try again.","error.origin":"{product} is not enabled for {origin}. Add that address to the site's allowed origins.","error.panels":"{product} loaded, but its comment UI didn't. You can still see the comments on the page.","error.panels.add":"Adding comments is unavailable until the comment UI loads.","error.capture":"{product} can't take new comments \u2014 the part that records the page didn't load. Everything already here still works.","paused.dialog":"Review paused \u2014 a dialog is open on this page. Close it to carry on commenting. Commenting inside a native dialog isn't supported yet.","paused.close":"Close","announce.created":"Comment {key} added.","permalink.unknown":"That comment isn't on this page any more"},mr={...kn,...pr},V=An(mr);function gr(e,t){const n=new Array(e.length),o=[],r=new Map,c=[];let u=0;for(let a=0;a<e.length;a++){u++;const d=e[a],m=Math.floor(d.x/t),v=Math.floor(d.y/t);let _=-1;e:for(let p=-1;p<=1;p++)for(let P=-1;P<=1;P++)for(const j of r.get(`${m+p},${v+P}`)??[]){const B=c[j],y=d.x-B.x,K=d.y-B.y;if(y*y+K*K<=t*t){_=j;break e}}if(_===-1){_=o.length,o.push([]),c.push(d);const p=`${m},${v}`,P=r.get(p);P?P.push(_):r.set(p,[_])}n[a]=_,o[_].push(a)}return{group:n,members:o,visits:u}}const yr=`position:absolute;top:0;left:0;width:0;height:0;pointer-events:none;z-index:${Je.pins}`,br=' .snag-pp{animation:snag-pp .5s ease-out 2}@keyframes snag-pp{50%{transform:scale(1.45)}}@media (prefers-reduced-motion: reduce){.snag-pp{animation:none}}.snag-pin{width:28px;height:28px;margin:-14px 0 0 -14px}.snag-pin::after{content:"";position:absolute;inset:-8px}@media (pointer:coarse){.snag-pin{width:34px;height:34px;margin:-17px 0 0 -17px}}',vr=`position:fixed;inset:0;width:0;height:0;pointer-events:none;z-index:${Je.pins}`,it=["position:absolute",`color:${x.onAccent}`,`font:600 12px/1 ${x.font}`,"display:flex","align-items:center","justify-content:center","box-shadow:0 1px 4px rgb(0 0 0 / .35)","pointer-events:auto","cursor:pointer","box-sizing:border-box"].join(";"),St="border-radius:50% 50% 50% 2px",Nn=e=>x[`status${e[0].toUpperCase()}${e.slice(1)}`]??x.muted;function Hn(e,t){const n=Cn(t.status),o=`background:${Nn(t.status)};color:${n}`,r="0 1px 4px rgb(0 0 0 / .35)";return e==="anchored"?`${it};${St};${o};border:2px solid ${n};box-shadow:${r}`:e==="approximate"?`${it};${St};${o};border:2px dashed ${n};box-shadow:${r}`:`${it};${St};${o};border:2px solid ${n};box-shadow:inset 0 0 0 2px ${n},${r}`}function wr(e,t){const n=[];let o="static",r=!1;for(let c=e;c&&c!==e.ownerDocument.documentElement;c=c.parentElement){const u=t.getComputedStyle(c),a=c!==e.ownerDocument.body&&/auto|scroll|hidden|overlay/.test(u.overflowY+u.overflowX);a&&!r&&n.push(c),u.position==="fixed"?(o="dynamic",r=!0):u.transform!=="none"||u.filter!=="none"||u.perspective!=="none"?(o="dynamic",r=!1):(u.position==="sticky"||u.willChange.includes("transform")||u.contain.includes("layout")||a&&(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth))&&(o="dynamic")}return{tier:o,clips:n}}function xr(e,t,n,o){const r=e.ownerDocument??document,c=r.defaultView??window;at(e,"pins",br);const u=r.createElement("div");u.className="snag-pins",u.style.cssText=yr,e.appendChild(u);const a=r.createElement("div");a.className="snag-pins-dyn",a.style.cssText=vr,e.appendChild(a);let d=[],m=[];const v=new Map;let _=new Map,p=null;const P=new Map;let j=new Map;const B=c.matchMedia?.("(pointer: coarse)").matches??!1,y=B?32:24,K=B?34:28;let re=[],G=null,J=null,h={x:0,y:0};function w(){const A=r.defaultView,k=u.getBoundingClientRect();h={x:k.left+(A?.scrollX??0),y:k.top+(A?.scrollY??0)}}let T=[];const M=new Map,U=1e4,D=5,l=new Map,b=new Set(["testid","domid"]);function E(A){const k=l.get(A.id),g=k?.ref.deref();if(!g||!g.isConnected)return null;if(b.has(k.strategy))return g;if(A.anchor.css)try{if(!g.matches(A.anchor.css))return null}catch{return null}return g}function S(A,k){const g=[],L=Ln(k,A.anchor,1,g);return{element:k,strategy:l.get(A.id).strategy,score:L,state:On(L),reasons:g.length?g:["exact"],candidates:1}}function Q(A,k="authoritative"){v.clear(),T=[];const g=Date.now(),L=n?.newPass?.();return A.map(C=>{const O=E(C),$=n?.get();let R=O?S(C,O):Ft(C.anchor,r,{viewportWidth:r.defaultView?.innerWidth??0,...$?{extended:$}:{},...L?{passCaches:L}:{}});if(O&&R.reasons.includes("text-drift")){const W=Ft(C.anchor,r,{viewportWidth:r.defaultView?.innerWidth??0,...$?{extended:$}:{},...L?{passCaches:L}:{}});W.score>R.score&&(R=W)}if(n&&(!R.element||R.reasons.includes("text-drift"))&&n.want(C.anchor),!R.element&&n){const W=n.fuzzyHit?.(C.id);W?R=W:n.wantFuzzy?.(C.id,C.anchor)}const ee=R.element&&C.anchor.text?.exact&&(R.reasons.includes("text-drift")||R.strategy==="path-rect"&&R.score<.5);if(n&&ee){const W=n.fuzzyHit?.(C.id);W&&W.score>R.score?R=W:W||n.wantFuzzy?.(C.id,C.anchor)}R.element?l.set(C.id,{ref:new WeakRef(R.element),strategy:R.strategy}):l.delete(C.id),R.element&&v.set(C.id,R.element);let Y=!1;if(R.state==="orphaned"){const W=M.get(C.id)??{firstSeenAt:g,tries:0,best:R};W.tries++,R.score>=W.best.score&&(W.best=R),M.set(C.id,W);const se=n?.unavailable?.()??!1,ye=se?2:D,ne=g-W.firstSeenAt<U;k==="optimistic"||ne&&(k==="navigating"||W.tries<ye)?Y=!0:(R=W.best,se&&!R.reasons.includes("budget-exceeded")&&(R={...R,reasons:[...R.reasons,"budget-exceeded"]}),M.delete(C.id))}else M.delete(C.id);Y||T.push({id:C.id,state:R.state,strategy:R.strategy,confidence:R.score});const N=R.element?Wt(R.element):void 0;if(N&&(N.width>0||N.height>0)){const W=r.defaultView;C.anchor.rect={x:N.left+(W?.scrollX??0),y:N.top+(W?.scrollY??0),w:N.width,h:N.height}}return{...C,anchorState:Y?C.anchorState:R.state,anchorPending:Y,anchorReasons:R.reasons}})}function H(){const A=r.documentElement;return{w:A.scrollWidth,h:A.scrollHeight}}function Z(A,k,g){return{x:Math.min(Math.max(A,14),Math.max(g.w,28)-14),y:Math.min(Math.max(k,14),Math.max(g.h,28)-14)}}function te(A,k){w(),u.textContent="",a.textContent="",d=[],m=[],_=new Map,j=new Map,P.clear(),re=[],J=null,A.forEach((g,L)=>{const C=g.anchor.rect;if(!C)return;const O=g.anchor.offset??{fx:.5,fy:.5},$=r.createElement("div");$.className="snag-pin",$.setAttribute("data-state",g.anchorPending?"pending":g.anchorState),$.setAttribute("data-key",g.key),$.style.cssText=g.anchorPending?`${Hn("approximate",g)};opacity:.55`:Hn(g.anchorState,g);const R=v.get(g.id),{tier:ee,clips:Y}=R?wr(R,c):{tier:"static",clips:[]};if(ee==="dynamic"&&R){const oe=R.getBoundingClientRect(),He=ie();$.style.left=`${oe.left-He.left+oe.width*O.fx}px`,$.style.top=`${oe.top-He.top+oe.height*O.fy}px`,P.set($,{x:oe.left+oe.width*O.fx+c.scrollX-h.x,y:oe.top+oe.height*O.fy+c.scrollY-h.y});const be={node:$,el:R,fx:O.fx,fy:O.fy,clips:Y};d.push(be),$.hidden=!xt(R),$.hidden||Re(be,oe,new Map(Y.map(We=>[We,We.getBoundingClientRect()])))}else{const oe=Z(C.x+C.w*O.fx-h.x,C.y+C.h*O.fy-h.y,H());$.style.left=`${oe.x}px`,$.style.top=`${oe.y}px`,P.set($,oe),R&&(m.push({node:$,el:R,fx:O.fx,fy:O.fy,clips:[]}),$.hidden=!xt(R))}$.textContent=String(L+1);const N=Bo(g),W=g.anchor.role?V("pin.target",{role:g.anchor.role,name:g.anchor.accessibleName??g.anchor.label}):g.anchor.label,se=g.comments.length-1,ye=g.anchorState==="approximate"?`~ ${g.key}`:g.key;$.setAttribute("role","button"),$.setAttribute("tabindex","0");const ne=g.anchorState==="anchored"?V(se===0?"pin.aria.none":se===1?"pin.aria.one":"pin.aria",{key:ye,target:W,status:Tn(g.status),replies:se}):V("pin.aria.moved",{key:ye,target:W,status:Tn(g.status),where:N});$.title=ne,$.setAttribute("aria-label",ne),t&&ve($,()=>t(g)),k?.has(g.id)&&($.hidden=!0,$.setAttribute("data-fo","")),_.set(g.id,$),j.set($,{snag:g,ordinal:L+1}),(ee==="dynamic"?a:u).appendChild($)}),le(),p&&ce(p),Ie(),Ne="",et(r.visibilityState==="visible"&&_.size>0)}const ie=()=>a.getBoundingClientRect();let De=!1;function Re(A,k,g){for(const L of A.clips){const C=g.get(L);if(C&&(k.right<=C.left||k.left>=C.right||k.bottom<=C.top||k.top>=C.bottom)){A.node.hidden=!0;return}}A.node.hidden=!1}function Qe(A){const k=new Map;for(const g of A)for(const L of g.clips)k.has(L)||k.set(L,L.getBoundingClientRect());return k}const Et=["open","progress","review","resolved"];function ve(A,k){A.addEventListener("click",k),A.addEventListener("keydown",g=>{g.key!=="Enter"&&g.key!==" "||(g.preventDefault(),k())})}function _e(A,k,g,L,C){const O=Et.find(R=>A.some(ee=>ee.snag.status===R))??"open",$=r.createElement("div");$.className="snag-pin snag-cluster",$.style.cssText=`${it};border-radius:50%;background:${Nn(O)};color:${Cn(O)};border:2px solid ${x.onAccent}`,$.style.left=`${k}px`,$.style.top=`${g}px`,$.textContent=String(A.length),$.setAttribute("data-count",String(A.length)),$.setAttribute("data-state",O),$.setAttribute("role","button"),$.setAttribute("tabindex","0"),C&&$.setAttribute("aria-expanded","true"),$.setAttribute("aria-label",V("cluster.aria",{n:A.length,list:A.map(R=>R.ordinal).join(", ")})),ve($,()=>{if(C)G=null;else if(A.length<=6)G=L;else{o?.(A.map(R=>R.snag.id));return}le()}),u.appendChild($),re.push($)}function Ve(A,k,g,L){_e(A,k,g,L,!0),A.forEach((C,O)=>{const $=k,R=g+(O+1)*(K+12),ee=C.x-$,Y=C.y-R,N=Math.hypot(ee,Y);if(N>4){const se=r.createElement("div");se.className="snag-leader",se.setAttribute("aria-hidden","true"),se.style.cssText=`position:absolute;left:${$}px;top:${R}px;width:${N}px;height:0;border-top:1px solid ${x.onAccent};transform-origin:0 0;transform:rotate(${Math.atan2(Y,ee)}rad)`,u.appendChild(se),re.push(se)}const W=C.dot.cloneNode(!0);W.style.visibility="",W.style.left=`${$}px`,W.style.top=`${R}px`,ve(W,()=>t?.(C.snag)),u.appendChild(W),re.push(W)})}function le(){for(const C of re)C.remove();re=[];const A=[];for(const[C,O]of j){if(C.hidden){C.style.visibility="";continue}const $=P.get(C);$&&A.push({dot:C,snag:O.snag,ordinal:O.ordinal,x:$.x,y:$.y})}const{members:k,visits:g}=gr(A,y);u.setAttribute("data-cv",String(g)),u.setAttribute("data-cp",String(A.length));let L=!1;for(const C of k){if(C.length<2){A[C[0]].dot.style.visibility="";continue}const O=C.map(Y=>A[Y]),$=O.map(Y=>Y.snag.id).sort().join("|");for(const Y of O)Y.dot.style.visibility="hidden";const R=O.reduce((Y,N)=>Y+N.x,0)/O.length,ee=O.reduce((Y,N)=>Y+N.y,0)/O.length;G===$&&O.length<=6?(L=!0,Ve(O,R,ee,$)):_e(O,R,ee,$,!1)}G&&!L&&(G=null)}function Ct(A){J?.remove(),J=null;const k=A.anchor.rect;if(!k)return;const g=A.anchor.offset??{fx:.5,fy:.5},L=r.createElement("div");L.className="snag-pin snag-ghost",L.style.cssText=`${it};${St};background:transparent;border:2px dashed ${x.anchorOrphan};color:${x.anchorOrphan};box-shadow:none;pointer-events:none`;const C=Z(k.x+k.w*g.fx-h.x,k.y+k.h*g.fy-h.y,H());L.style.left=`${C.x}px`,L.style.top=`${C.y}px`,L.setAttribute("aria-hidden","true"),u.appendChild(L),J=L}function Ie(A=!1){const k=A?[...d,...m]:d;De||k.length===0||(De=!0,c.requestAnimationFrame(()=>{De=!1;const g=performance.now(),L=c.scrollX,C=c.scrollY,O=ie(),$=k.map(N=>N.el.isConnected?N.el.getBoundingClientRect():null),R=k.map(N=>N.el.isConnected&&xt(N.el)),ee=Qe(k),Y=H();k.forEach((N,W)=>{const se=$[W];if(!se)return;if(N.node.hasAttribute("data-fo")){N.node.hidden=!0;return}if(!R[W]){N.node.hidden=!0;return}N.node.hidden=!1;const ye=se.left+se.width*N.fx,ne=se.top+se.height*N.fy;if(N.node.parentElement===a)N.node.style.left=`${ye-O.left}px`,N.node.style.top=`${ne-O.top}px`,Re(N,se,ee),P.set(N.node,{x:ye+L-h.x,y:ne+C-h.y});else{const oe=Z(ye+L-h.x,ne+C-h.y,Y);N.node.style.left=`${oe.x}px`,N.node.style.top=`${oe.y}px`,P.set(N.node,oe)}}),le(),u.setAttribute("data-ms",(performance.now()-g).toFixed(2))}))}const Ge=()=>Ie();r.addEventListener("scroll",Ge,{capture:!0,passive:!0});const Ae=typeof c.ResizeObserver=="function"?new c.ResizeObserver(()=>Ie(!0)):null;Ae?.observe(r.documentElement);let Le=null,Ne="";function me(){let A="";for(const k of[...m,...d]){if(!k.el.isConnected)continue;const g=k.el.getBoundingClientRect();A+=`${Math.round(g.left)},${Math.round(g.top)},${Math.round(g.width)};`}!A||A===Ne||(Ne=A,Ie(!0))}function et(A){if(Le&&clearTimeout(Le),Le=null,!A)return;const k=()=>{me(),Le=setTimeout(k,500)};Le=setTimeout(k,500)}const ge=()=>et(r.visibilityState==="visible"&&_.size>0);r.addEventListener("visibilitychange",ge);function Tt(A){const k=_.get(A);k&&(k.classList.remove("snag-pp"),c.requestAnimationFrame(()=>k.classList.add("snag-pp")),c.setTimeout(()=>k.classList.remove("snag-pp"),1400))}function ce(A){const k=p?_.get(p):void 0;k&&(k.style.transform="",k.style.zIndex=""),p=A;const g=A?_.get(A):void 0;g&&(g.style.transform="scale(1.4)",g.style.zIndex="1")}return{el:u,render:te,showGhost:Ct,pulse:Tt,reanchor:Q,settled:()=>T,hasPending:()=>M.size>0,highlight:ce,destroy(){r.removeEventListener("scroll",Ge,{capture:!0}),r.removeEventListener("visibilitychange",ge),Ae?.disconnect(),et(!1),u.remove(),a.remove()}}}const Sr=` .snag-notice{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(24px + var(${z.tbH},56px));z-index:${Je.notice};max-width:min(420px,calc(100vw - 24px));background:${x.bg};color:${x.fg};border:1px solid ${x.border};border-inline-start:3px solid ${x.anchorOrphan};border-radius:${x.radius};box-shadow:${x.shadow};padding:12px 14px;pointer-events:auto;font:400 13px/1.45 ${x.font};display:flex;flex-direction:column;gap:10px}@media (pointer:coarse){.snag-notice{bottom:calc(12px + var(${z.tbH},64px))}}.snag-notice p{margin:0}.snag-notice-actions{display:flex;gap:6px;justify-content:flex-end}.snag-notice button{appearance:none;font:inherit;cursor:pointer;border-radius:calc(${x.radius} - 2px);padding:6px 12px;min-height:30px;border:0;transition:background ${x.motion}}.snag-notice-retry{background:${x.accent};color:${x.onAccent};font-weight:600}.snag-notice-dismiss{background:transparent;color:${x.muted}}.snag-notice-dismiss:hover{background:${x.hover};color:inherit}.snag-notice button:focus-visible{outline:2px solid ${x.focus};outline-offset:2px}`;function Ar(e,t){const n=e.ownerDocument??document,o=n.defaultView??window;at(e,"notice",Sr);const r=n.createElement("div");r.className="snag-notice",r.setAttribute("role","alert"),r.hidden=!0;const c=n.createElement("p"),u=n.createElement("div");u.className="snag-notice-actions";const a=n.createElement("button");a.type="button",a.className="snag-notice-dismiss",a.textContent=V("action.dismiss"),a.addEventListener("click",()=>_());const d=n.createElement("button");d.type="button",d.className="snag-notice-retry",u.append(a,d),r.append(c,u);let m;d.addEventListener("click",()=>{_(),m?.run()});let v=0;function _(){v&&o.cancelAnimationFrame(v),v=0,r.hidden=!0,r.remove()}return{show(p,P,j){m=P,d.hidden=!P,P&&(d.textContent=V(P.label)),r.hidden=!1,c.textContent="",(t??e).appendChild(r);const B=V(p,j);v&&o.cancelAnimationFrame(v),v=o.requestAnimationFrame(()=>{v=0,c.textContent=B})},hide:_,visible:()=>r.isConnected&&!r.hidden,destroy(){r.remove()}}}const kr=` .snag-paused{border:0;padding:0;background:transparent;pointer-events:auto;max-width:min(420px,calc(100vw - 32px))}.snag-paused::backdrop{background:rgb(0 0 0 / .28)}.snag-paused-box{background:${x.bg};color:${x.fg};border:1px solid ${x.border};border-inline-start:3px solid ${x.accent};border-radius:${x.radius};box-shadow:${x.shadow};padding:14px 16px;font:400 13px/1.45 ${x.font};display:flex;flex-direction:column;gap:12px}.snag-paused p{margin:0}.snag-paused-actions{display:flex;justify-content:flex-end}.snag-paused button{appearance:none;font:inherit;cursor:pointer;border:0;font-weight:600;border-radius:calc(${x.radius} - 2px);padding:6px 14px;min-height:30px;background:${x.accent};color:${x.onAccent}}.snag-paused button:focus-visible{outline:2px solid ${x.focus};outline-offset:2px}`;function $r(e,t){const n=e.ownerDocument??document;at(e,"paused",kr);const o=n.createElement("dialog");o.className="snag-paused",o.setAttribute("aria-label",V("paused.dialog"));const r=n.createElement("div");r.className="snag-paused-box",r.setAttribute("role","status");const c=n.createElement("p");c.textContent=V("paused.dialog");const u=n.createElement("div");u.className="snag-paused-actions";const a=n.createElement("button");a.type="button",a.textContent=V("paused.close"),a.addEventListener("click",()=>v()),u.append(a),r.append(c,u),o.append(r);let d=!1;function m(){if(!d){(t??e).appendChild(o);try{o.showModal(),d=!0}catch{o.setAttribute("open",""),d=!0}}}function v(){if(d){d=!1;try{o.close()}catch{o.removeAttribute("open")}o.remove()}}return o.addEventListener("close",()=>{d=!1,o.remove()}),{show:m,hide:v,destroy(){v(),o.remove()}}}const Er=Symbol.for(bn.original),Wn=Symbol.for(bn.wrapped),ct=()=>{};function Cr(e,t,n){let o;try{o=e[t]}catch{return ct}if(typeof o!="function"||o[Wn])return ct;const r=o,c=n(r);let u=!1;const a=function(...d){return u?r.apply(this,d):c.apply(this,d)};try{const d=a;d[Wn]=!0,d[Er]=r,Object.defineProperty(a,"name",{value:r.name,configurable:!0}),Object.defineProperty(a,"length",{value:r.length,configurable:!0})}catch{}try{e[t]=a}catch{return ct}return e[t]!==a?ct:()=>{let d;try{d=e[t]}catch{d=void 0}if(d===a)try{e[t]=r;return}catch{}u=!0}}function Tr(e,t){const n=[];let o=0;const r=()=>{o||(o=e.requestAnimationFrame(()=>{o=0,t.onResize()}))};e.addEventListener("resize",r),n.push(()=>{o&&e.cancelAnimationFrame(o),e.removeEventListener("resize",r)}),e.visualViewport?.addEventListener("resize",r),n.push(()=>e.visualViewport?.removeEventListener("resize",r));const c=()=>void e.setTimeout(t.onResize,250);e.addEventListener("orientationchange",c),n.push(()=>e.removeEventListener("orientationchange",c));let u=e.location.pathname;const a=()=>{const y=e.location.pathname;y!==u&&(u=y,t.onRoute())},d=e.navigation;if(d){const y=()=>void e.setTimeout(a,0);d.addEventListener("navigatesuccess",y),n.push(()=>d.removeEventListener("navigatesuccess",y))}else for(const y of["pushState","replaceState"])n.push(Cr(e.history,y,K=>function(...re){const G=K.apply(this,re);return e.setTimeout(a,0),G}));const m=e.document;let v=!0;try{m.documentElement.matches(":modal")}catch{v=!1}const _=()=>{const y=m.querySelectorAll("dialog[open]");if(!v)return y.length>0;for(const K of y)if(K.matches(":modal"))return!0;return!1};let p=!1;const P=()=>{const y=_();y!==p&&(p=y,t.onModal(y))};m.addEventListener("toggle",P,!0),n.push(()=>m.removeEventListener("toggle",P,!0));const j=new MutationObserver(P);j.observe(m.documentElement,{subtree:!0,attributes:!0,attributeFilter:["open"]}),n.push(()=>j.disconnect());const B=()=>void e.setTimeout(a,0);return e.addEventListener("popstate",B),n.push(()=>e.removeEventListener("popstate",B)),{destroy(){for(const y of n)y();n.length=0}}}function Rr(e,t){try{e.sessionStorage.setItem(de.handoff,JSON.stringify({openThreadId:t}))}catch{}}function _r(e){try{const t=e.sessionStorage.getItem(de.handoff);if(t===null)return null;e.sessionStorage.removeItem(de.handoff);const n=JSON.parse(t);return typeof n.openThreadId=="string"?n.openThreadId:null}catch{return null}}function Ir(){return{statuses:[],read:"all",pageOnly:!1,newOnly:!1,sort:"page"}}const Pr=["open","progress","review","resolved"];function Mr(e,t,n){if(t.statuses.length>0&&Pr.includes(e.status)&&!t.statuses.includes(e.status)||t.by&&e.createdBy.id!==t.by||t.page&&e.route!==t.page)return!1;if(t.read!=="all"&&n){const o=zr(e,n);if(t.read==="unread"&&!o||t.read==="read"&&o)return!1}return!0}function zr(e,t){const n=t.get(e.id)??0;return Date.parse(e.updatedAt)>n}function Or(e,t,n){const o=e.visualViewport;let r=0;const c=()=>{if(r=0,!o)return;const a=o.offsetLeft,d=o.offsetTop;t.style.translate=a||d?`${a}px ${d}px`:"",t.style.width=`${o.width}px`,t.style.height=`${o.height}px`,n?.(o.scale)},u=()=>{r||(r=e.requestAnimationFrame(c))};return o?.addEventListener("resize",u,{passive:!0}),o?.addEventListener("scroll",u,{passive:!0}),u(),()=>{r&&e.cancelAnimationFrame(r),o?.removeEventListener("resize",u),o?.removeEventListener("scroll",u)}}const Dr=/^eyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}/,Lr=/^[a-f0-9]{32,}$/i,Nr=/^(?=[A-Za-z0-9_-]{24,}$)(?=.*[A-Za-z])(?=.*\d)[A-Za-z0-9_-]+$/,Hr="[redacted]";function jn(e){return e.includes("/")?e.split("/").map(t=>Dr.test(t)||Lr.test(t)||Nr.test(t)?Hr:t).join("/"):e}const Wr=/\/index\.(html?|php)$/i;function jr(e){if(!e.startsWith("/"))return e;let t=e.replace(Wr,"/");return t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t.toLowerCase()}function Ur(e){try{const t=e.querySelector(`meta[name="${No.route}"]`)?.getAttribute("content")?.trim();return!t||t.length>512||!t.startsWith("/")?null:t}catch{return null}}function Fr(e,t){const n=t??Ur(e);return jr(n??jn(e.location.pathname))}const Br=[/^utm_/,/^(gclid|gbraid|wbraid|fbclid|msclkid|ttclid|twclid|igshid|yclid|li_fat_id)$/,/^(mc_cid|mc_eid|_hsenc|_hsmi|vero_id|oly_enc_id|oly_anon_id)$/,/^_vercel_/,/^__vercel_/,/^_rsc$/],Zr=[...vt.query,...vt.fragment];function Vr(e,t=[]){return Zr.includes(e)||t.includes(e)?!0:Br.some(n=>n.test(e))}function Yr(e,t={}){const n=t.significantQueryParams??[];if(n!=="*"&&n.length===0)return;let o;try{o=new URLSearchParams(e)}catch{return}const r={};for(const[c,u]of o)Vr(c,t.ignoredQueryParams??[])||n!=="*"&&!n.includes(c)||(r[c]=u);return Object.keys(r).length>0?r:void 0}function Xr(e,t,n={}){const o=n.significantQueryParams??[];if(o==="*"){const r=e??{},c=t??{},u=new Set([...Object.keys(r),...Object.keys(c)]);for(const a of u)if(r[a]!==c[a])return!1;return!0}for(const r of o)if((e?.[r]??void 0)!==(t?.[r]??void 0))return!1;return!0}const Kr=120,Jr=1e3,qr=200,Qr=1e4;function Gr(e,t,n){const o=t.MutationObserver;if(typeof o!="function")return{destroy:()=>{}};let r=!1,c=null,u=!1,a=!1,d=0,m=_(),v=0;function _(){return t.performance?.now?.()??0}const p=new o(()=>{r=!0,d++,j()});function P(){const y=_();return y-m>=1e3&&(d>qr&&(v=y+Qr),d=0,m=y),y<v?Jr:Kr}function j(){c||(c=setTimeout(B,P()))}function B(){if(c=null,!!r){if(u){a=!0;return}r=!1,u=!0;try{n()}finally{u=!1,a&&(a=!1,r=!0,j())}}}return p.observe(e.documentElement,{childList:!0,subtree:!0}),{destroy(){p.disconnect(),c&&clearTimeout(c),c=null}}}const es="0.0.0",ts={capture:Me.capture,"anchor-ext":Me.anchorExt,"anchor-fuzzy":Me.anchorFuzzy,crumbs:Me.crumbs,screenshot:Me.screenshot,dock:Me.dock,text:Me.text},Un=new Map,Bt=new Map,Fn=new Map;function ns(e,t,n){const o=new URL(t,n.location.href).href,r=new URL(ts[e],o);r.searchParams.set("cv",es);const c=Fn.get(e)??0;return c>0&&r.searchParams.set("r",String(c)),Fn.set(e,c+1),r.href}async function ze(e,t,n=document){const o=Un.get(e);if(o)return{ok:!0,mod:o};const r=Bt.get(e);if(r)return r;const c=(async()=>{for(let u=0;u<2;u++)try{const a=await import(ns(e,t,n));return Un.set(e,a),{ok:!0,mod:a}}catch{}return{ok:!1,reason:"unavailable"}})();Bt.set(e,c);try{return await c}finally{Bt.delete(e)}}const os="composer",Zt=e=>de.draft(e,os),rs=de.draft("\0","").split("\0")[0];function ss(e){try{return e.body.trim()?(localStorage.setItem(Zt(e.route),JSON.stringify(e)),!0):(Bn(e.route),!0)}catch{return!1}}function as(e){try{const t=localStorage.getItem(Zt(e));if(!t)return null;const n=JSON.parse(t);return!n||typeof n.body!="string"||!n.anchor||n.route!==e?null:n}catch{return null}}function Bn(e){try{localStorage.removeItem(Zt(e))}catch{}}function Vt(){try{for(let e=0;e<localStorage.length;e++){const t=localStorage.key(e);if(t&&t.startsWith(rs))return!0}return!1}catch{return!1}}const is="http://www.w3.org/2000/svg";function Oe(e,t,n,o=[]){const r=e.createElementNS(is,t);for(const c in n)r.setAttribute(c,n[c]);for(const c of o)r.appendChild(c);return r}const Yt=(e,t="16",n="16",o="0 0 16 16")=>({width:t,height:n,viewBox:o,fill:"none","aria-hidden":"true"}),cs=e=>Oe(e,"svg",Yt(),[Oe(e,"path",{d:"M8 3v10M3 8h10",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round"})]),ls=e=>Oe(e,"svg",Yt(),[Oe(e,"rect",{x:"2.25",y:"3.25",width:"11.5",height:"9.5",rx:"1.75",stroke:"currentColor","stroke-width":"1.5"}),Oe(e,"path",{d:"M9.5 3.5v9",stroke:"currentColor","stroke-width":"1.5"})]),ds=e=>Oe(e,"svg",{...Yt(e,"10","16","0 0 10 16"),fill:"currentColor"},[Oe(e,"g",{fill:"currentColor"},[4,8,12].flatMap(t=>[3,7].map(n=>Oe(e,"circle",{cx:String(n),cy:String(t),r:"1"}))))]),us=` .snag-tb{position:fixed;z-index:${Je.toolbar};display:flex;align-items:center;gap:2px;padding:4px;border-radius:calc(${x.radius} + 4px);background:${x.bg};color:${x.fg};box-shadow:${x.shadow};font:500 13px/1 ${x.font};pointer-events:auto;user-select:none;border:1px solid ${x.border}}.snag-tb{transition:inset-inline-end ${x.motion}}.snag-tb--fine{inset-inline-end:calc(20px + env(safe-area-inset-right) + var(${z.dockW},0px));inset-block-end:calc(20px + env(safe-area-inset-bottom));transition:inset-inline-end ${x.motion}}.snag-tb--coarse{inset-inline:0;inset-block-end:0;border-radius:14px 14px 0 0;padding:6px 10px calc(6px + env(safe-area-inset-bottom));justify-content:center;gap:4px;flex-direction:column}.snag-grabber{width:36px;height:4px;border-radius:2px;background:${x.muted};margin:2px auto 6px}.snag-row{display:flex;align-items:center;gap:2px}.snag-grip{display:flex;align-items:center;padding:0 4px;color:${x.muted};cursor:grab;touch-action:none}.snag-grip:active{cursor:grabbing}.snag-seg{display:flex;background:${x.surface};border-radius:${x.radius};padding:2px;position:relative}.snag-seg::before{content:"";position:absolute;inset-block:2px;inset-inline-start:var(${z.thumbX},0);width:var(${z.thumbW},0);background:${x.accent};border-radius:calc(${x.radius} - 2px);pointer-events:none;transition:inset-inline-start ${x.motion},width ${x.motion}}.snag-seg>.snag-b[aria-pressed="true"]{background:transparent;color:${x.onAccent}}.snag-seg>.snag-b{z-index:1}.snag-b{appearance:none;border:0;background:transparent;color:inherit;font:inherit;padding:6px 11px;border-radius:calc(${x.radius} - 2px);cursor:pointer;display:flex;align-items:center;gap:6px;position:relative;min-height:32px;transition:background ${x.motion}}.snag-b:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent)}.snag-b:disabled{opacity:.4;cursor:not-allowed}.snag-b[aria-pressed="true"]{background:${x.accent};color:${x.onAccent}}.snag-b:focus-visible{outline:2px solid ${x.focus};outline-offset:2px}.snag-icon{padding:6px 9px}@media (pointer:coarse){.snag-b{min-height:44px;min-width:44px;padding:6px 14px}.snag-icon{padding:6px 14px}}.snag-puck .snag-row>:not([aria-expanded]){display:none}.snag-puck{padding:4px;border-radius:50%}.snag-puck [aria-expanded]{min-width:44px;min-height:44px;border-radius:50%}`;function fs(e,t){const n=e.ownerDocument??document,o=t.coarsePointer??n.defaultView?.matchMedia?.("(pointer: coarse)").matches??!1;at(e,"toolbar",us);const r=n.createElement("div");r.className=`snag-tb ${o?"snag-tb--coarse":"snag-tb--fine"}`,r.setAttribute("role","toolbar"),r.setAttribute("aria-label",V("toolbar.aria"));const c=n.createElement("div");c.className="snag-grabber",c.setAttribute("aria-hidden","true");const u=n.createElement("div");u.className="snag-row";const a=n.createElement("span");a.className="snag-grip",a.setAttribute("aria-hidden","true"),a.appendChild(ds(n));const d=n.createElement("div");d.className="snag-seg",d.setAttribute("role","group"),d.setAttribute("aria-label",V("toolbar.group"));const m=(l,b,E)=>{const S=n.createElement("button");return S.type="button",S.className=`snag-b ${l}`,S.setAttribute("aria-label",b),typeof E=="string"?S.textContent=E:S.appendChild(E),S},v=m("",V("toolbar.browse"),V("toolbar.browse")),_=m("",V("toolbar.comments"),V("toolbar.comments")),p=m("snag-icon",V("toolbar.add"),cs(n)),P=m("snag-icon",V("toolbar.panel"),ls(n));P.setAttribute("aria-expanded","false"),d.append(v,_),o||u.appendChild(a),u.append(d,p,P),o&&r.appendChild(c),r.appendChild(u),(t.parent??e).appendChild(r);const j=()=>{e.host.style.setProperty(z.tbH,`${r.offsetHeight}px`)};j();let B=null;function y(l,b){const E=n.defaultView,S=r.offsetWidth,Q=r.offsetHeight,H=Zn(l,8,Math.max(8,E.innerWidth-S-8)),Z=Zn(b,8,Math.max(8,E.innerHeight-Q-8));B={left:H,top:Z},r.style.left=`${H}px`,r.style.top=`${Z}px`,r.style.right="auto",r.style.bottom="auto"}const K=()=>{j(),B&&y(B.left,B.top)},re=n.defaultView;if(re?.addEventListener("resize",K),v.addEventListener("click",()=>t.onState("browse")),_.addEventListener("click",()=>t.onState("comments")),p.addEventListener("click",()=>t.onState(G==="add"?"comments":"add")),P.addEventListener("click",()=>t.onPanel()),!o){let l=null;a.addEventListener("pointerdown",E=>{l={x:E.clientX,y:E.clientY,r:r.getBoundingClientRect()},a.setPointerCapture(E.pointerId),E.preventDefault()}),a.addEventListener("pointermove",E=>{l&&y(l.r.left+(E.clientX-l.x),l.r.top+(E.clientY-l.y))});const b=E=>{l=null,a.hasPointerCapture(E.pointerId)&&a.releasePointerCapture(E.pointerId)};a.addEventListener("pointerup",b),a.addEventListener("pointercancel",b)}let G="browse";function J(l){G=l,v.setAttribute("aria-pressed",String(l==="browse")),_.setAttribute("aria-pressed",String(l!=="browse")),p.setAttribute("aria-pressed",String(l==="add")),h()}function h(){const l=d.querySelector('.snag-b[aria-pressed="true"]'),b=d.getBoundingClientRect(),E=l?.getBoundingClientRect();if(!l||!E?.width){d.style.setProperty(z.thumbW,"0px");return}const S=n.defaultView?.getComputedStyle(d),Q=S?.direction==="rtl",H=parseFloat((Q?S?.paddingRight:S?.paddingLeft)??"0")||0,Z=(Q?b.right-E.right:E.left-b.left)-H;d.style.setProperty(z.thumbW,`${Math.round(E.width)}px`),d.style.setProperty(z.thumbX,`${Math.max(0,Math.round(Z))}px`)}function w(l){p.disabled=l,l?p.title=V("error.panels.add"):p.removeAttribute("title")}function T(l){p.setAttribute("aria-label",V(l?"toolbar.add.draft":"toolbar.add"))}function M(l){_.setAttribute("aria-label",l!==null&&l>0?V("toolbar.comments.unresolved",{n:Fo(l)}):V("toolbar.comments"))}J("browse"),M(0);function U(l){r.classList.toggle("snag-puck",l),l||h()}function D(l){r.hidden=l,l||h(),j()}return{el:r,setState:J,setCount:M,setDegraded:w,setDraft:T,setPuck:U,setConcealed:D,destroy(){re?.removeEventListener("resize",K),e.host.style.removeProperty(z.tbH),r.remove()}}}const Zn=(e,t,n)=>e<t?t:e>n?n:e,Vn=24;function hs(e,t){const n=e.innerHeight,o=t.querySelector(".snag-dk");if(!o)return{top:0,bottom:n};const r=o.getBoundingClientRect();return r.height>=n-1?{top:0,bottom:n}:{top:0,bottom:Math.max(0,r.top)}}function ps(e,t,n){const o=n.anchor.rect;if(!o)return;const r=n.anchor.offset??{fy:.5},c=o.y+o.h*r.fy,u=hs(e,t),a=c-e.scrollY;if(a>=u.top+Vn&&a<=u.bottom-Vn)return;const d=e.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1;e.scrollTo({top:Math.max(0,c-(u.top+u.bottom)/2),behavior:d?"auto":"smooth"})}function Xt(){const e=new Uint8Array(16);crypto.getRandomValues(e);const t=Date.now();e[0]=Math.floor(t/2**40)&255,e[1]=Math.floor(t/2**32)&255,e[2]=Math.floor(t/2**24)&255,e[3]=Math.floor(t/2**16)&255,e[4]=Math.floor(t/2**8)&255,e[5]=t&255,e[6]=e[6]&15|112,e[8]=e[8]&63|128;const n=Array.from(e,o=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}const ms=()=>wt.thread+Xt(),Yn=()=>wt.comment+Xt(),gs=()=>wt.attachment+Xt(),ys={attachments:"direct",realtime:"none",anchorReports:!1,identity:["guest"],export:["json","md"],serverSideSearch:!1,privateThreads:!1,assignees:!1};function bs(){const e=de.threads("probe","probe");try{return localStorage.setItem(e,"1"),localStorage.removeItem(e),!0}catch(t){return Xn(t)}}function vs(e,t,n){const o=de.threads(e,t);function r(){let a=null;try{a=localStorage.getItem(o)}catch{return[]}if(!a)return[];try{const d=JSON.parse(a);return Array.isArray(d)?d.filter(xs):[]}catch{return[]}}function c(a){try{localStorage.setItem(o,JSON.stringify(a))}catch(d){if(!Xn(d))return;throw new Ht("local_quota_exceeded")}}const u=a=>({...a,updatedAt:new Date().toISOString()});return{kind:"local",capabilities:ys,async init(a){return{uid:a.uid,env:a.env,features:{screenshots:!0,uploads:!1}}},async listThreads(a={}){let d=r();return a.route!==void 0&&(d=d.filter(m=>m.route===a.route)),a.status?.length&&(d=d.filter(m=>a.status.includes(m.status))),{data:d,serverTime:new Date().toISOString()}},async getThread(a){return r().find(d=>d.id===a)??null},async createThread(a){const d=Rn(a);return c([...r(),d]),d},async patchThread(a,d){const m=r(),v=m.findIndex(j=>j.id===a);if(v<0)return null;const{assignee:_,...p}=d,P=u({...m[v],...ws(p)});return m[v]=P,c(m),P},async deleteThread(a){const d=r(),m=d.find(_=>_.id===a),v=d.filter(_=>_.id!==a);v.length!==d.length&&c(v);for(const _ of m?.attachments??[])n?.del(_.id).catch(()=>{})},async uploadAttachment(a,d){if(!n)throw new Ht("attachments_unsupported");const m=gs();return await n.put(m,{blob:a,uid:e,env:t,kind:d.kind,...d.width!==void 0?{width:d.width}:{},...d.height!==void 0?{height:d.height}:{},createdAt:Date.now()}),{id:m,kind:d.kind,url:"",...d.width!==void 0?{width:d.width}:{},...d.height!==void 0?{height:d.height}:{},bytes:a.size,contentType:a.type}},async createComment(a,d){const m=r(),v=m.findIndex(p=>p.id===a);if(v<0)return null;const _={id:d.id,snagId:a,body:d.body,author:d.author,createdAt:new Date().toISOString()};return m[v]=u({...m[v],comments:[...m[v].comments,_]}),c(m),_},async patchComment(a,d){const m=r();for(let v=0;v<m.length;v++){const _=m[v].comments.find(P=>P.id===a);if(!_)continue;const p={..._,body:d};return m[v]=u({...m[v],comments:m[v].comments.map(P=>P.id===a?p:P)}),c(m),p}return null},async deleteComment(a){const d=r(),m=d.findIndex(v=>v.comments.some(_=>_.id===a));m<0||(d[m]=u({...d[m],comments:d[m].comments.filter(v=>v.id!==a)}),c(d))}}}function ws(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}function Xn(e){return e instanceof Error?e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED"||e.code===22||e.code===1014:!1}function xs(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.id=="string"&&typeof t.key=="string"&&typeof t.route=="string"&&typeof t.anchor=="object"&&t.anchor!==null&&typeof t.anchor.label=="string"&&Array.isArray(t.comments)}function Ss(e,t,n=()=>Date.now()){const o=de.seen(e,t);let r=null;function c(){if(r)return r;try{const a=localStorage.getItem(o),d=a?JSON.parse(a):{};return r=typeof d=="object"&&d!==null&&!Array.isArray(d)?d:{}}catch{return r={}}}function u(a){r=a;try{localStorage.setItem(o,JSON.stringify(a))}catch{}}return{map:()=>new Map(Object.entries(c())),mark(a){u({...c(),[a]:n()})},markAll(a){const d=n(),m={...c()};for(const v of a)m[v.id]=d;u(m)}}}function lt(){let e=null;try{e=localStorage.getItem(Dt)}catch{return{}}if(!e)return{};if(e[0]!=="{")return{name:e};try{const t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function Kn(e){try{localStorage.setItem(Dt,JSON.stringify(e))}catch{}}function Kt(){const e=lt();return{name:typeof e.name=="string"?e.name:"",...e.email?{email:e.email}:{}}}function Jn(e){return lt().projects?.[e]?.holderId}function As(e){const t=lt().projects?.[e]?.holderSecret;return t&&/^[\w-]{43}$/.test(t)?t:void 0}function ks(e,t,n){const o=lt();Kn({...o,projects:{...o.projects,[e]:{holderId:t,holderSecret:n}}})}function $s(e,t){const n=lt(),o=n.projects?.[e];o&&Kn({...n,projects:{...n.projects,[e]:{...o,holderId:t}}})}const Ze=e=>de.session(e);function qn(e){if(!e)return null;const t=JSON.parse(e);return typeof t?.token=="string"&&typeof t?.refreshableUntil=="number"?t:null}function qe(e){try{const t=qn(sessionStorage.getItem(Ze(e)));if(t)return t;const n=qn(localStorage.getItem(Ze(e)));return n?.member?n:null}catch{return null}}function Jt(e,t){try{t.member?(localStorage.setItem(Ze(e),JSON.stringify(t)),sessionStorage.removeItem(Ze(e))):sessionStorage.setItem(Ze(e),JSON.stringify(t))}catch{}}function dt(e){try{sessionStorage.removeItem(Ze(e)),localStorage.removeItem(Ze(e))}catch{}}const Es=(e,t=Date.now())=>t>e.expiresAt-3e4,qt=(e,t=Date.now())=>t>=e.refreshableUntil;class Ce extends Error{code;status;constructor(t,n,o){super(o),this.name="HttpAdapterError",this.status=t,this.code=n}}function Cs(e){const{offset:t,testId:n,domId:o,page:r,schemaVersion:c,...u}=e;return{...u,...n?{testid:n}:{},...o?{domid:o}:{},...t?{offset:{fx:t.x,fy:t.y}}:{}}}function Ts(e,t){const n=e.url??"",o=/^https?:/i.test(n)?n:n?`${t}${n.startsWith("/")?"":"/"}${n}`:`${t}/api/v1/attachments/${encodeURIComponent(e.id)}/blob`;return{...e,url:o}}function At(e,t,n){return{id:e.id,route:e.anchor?.page?.route??"",key:e.key,status:e.status,anchor:Cs(e.anchor),anchorState:e.anchorState,context:e.context,comments:e.comments??[],createdBy:e.createdBy,assignee:e.assignee??null,createdAt:e.createdAt,updatedAt:e.updatedAt,...e.resolvedAt?{resolvedAt:e.resolvedAt}:{},...e.attachments?.length?{attachments:e.attachments.map(o=>Ts(o,n))}:{},...t?{scope:{environment:t}}:{}}}function Rs(e,t){const{offset:n,testid:o,domid:r,...c}=e;return{...c,schemaVersion:gn,...o?{testId:o}:{},...r?{domId:r}:{},offset:n?{x:n.fx,y:n.fy}:{x:.5,y:.5},page:{route:t,pathname:location.pathname,origin:location.origin}}}function _s(e,t){const n=o=>/^[\d.]+$|:/.test(o)?o:o.split(".").slice(-2).join(".");return n(e)===n(t)}const Qn=10*6e4;function Is(e,t,n,o={}){const r=e.replace(/\/+$/,""),c=`${r}/api/v1/projects/${encodeURIComponent(t)}`;let u=o.reviewToken,a=qe(t),d=[];const m=de.silent(t);let v=0,_=Promise.resolve(!1);function p(){if(u||Date.now()-v<Qn)return _;try{if(!_s(location.hostname,new URL(r).hostname)||localStorage.getItem(m)||Date.now()-Number(sessionStorage.getItem(m))<Qn)return _}catch{}return v=Date.now(),_=(async()=>{try{const h=await fetch(`${c}/sessions/member/silent`,{method:"POST",credentials:"include",...n?{body:JSON.stringify({environment:n})}:{}});if(h.status===201)return j(await h.json()),v=0,!0}catch{}try{sessionStorage.setItem(m,String(Date.now()))}catch{}return!1})()}let P=null;function j(h){a={token:h.sessionToken,expiresAt:Date.parse(h.expiresAt),refreshableUntil:Date.parse(h.refreshableUntil),reviewerId:h.reviewer.id,permissions:h.permissions,member:h.reviewer.name,...h.moderator?{moderator:!0}:{}},Jt(t,a),o.onSessionStarted?.()}const B=()=>a;async function y(h=!1){const w=a&&!qt(a)?a.token:null,T=!!w&&!u&&!h,M=T?void 0:u?{kind:"link",token:u,name:Kt().name||void 0}:{kind:"guest",name:Kt().name||"Anonymous",holderId:Jn(t),holderSecret:As(t)};let U;try{U=await fetch(`${c}/sessions`,{method:"POST",credentials:"omit",headers:{"content-type":"application/json",...w?{Authorization:`Bearer ${w}`}:{}},body:JSON.stringify({...n?{environment:n}:{},...M?{identity:M}:{},client:{widget:To,schema:gn}})})}catch(E){throw new Ce(0,"network_error",E.message)}finally{u=void 0}if(!U.ok){const S=(await U.json().catch(()=>null))?.error?.code??"unauthorized",Q=T&&!!a?.member;if(dt(t),a=null,Q&&U.status===401&&await p())return B();throw S==="session_revoked"||S==="token_revoked"?o.onSessionEnded?.("revoked"):U.status===401&&o.onSessionEnded?.("expired"),new Ce(U.status,S,"This review session is not valid.")}const D=await U.json();D.holderSecret&&D.reviewer?ks(t,D.reviewer.id,D.holderSecret):D.reviewer&&$s(t,D.reviewer.id);const l=D.round?.number??(T||h?a?.round:void 0),b=M?M.name:a?.name;return a={token:D.sessionToken,expiresAt:Date.parse(D.expiresAt),refreshableUntil:Date.parse(D.refreshableUntil),reviewerId:D.reviewer?.id??a?.reviewerId??"",permissions:D.permissions??a?.permissions??[],...l!==void 0?{round:l}:{},...T&&a?.member?{member:a.member}:{},...T&&a?.member&&a.moderator?{moderator:!0}:{},...b?{name:b}:{}},Jt(t,a),o.onSessionStarted?.(),a}async function K(){if(a){if(qt(a)){dt(t),a=null,await p()||o.onSessionEnded?.("expired");return}await y().catch(()=>{})}}let re=null;async function G(){if(await(P??=a?.member?Promise.resolve():p()),a&&qt(a)&&(dt(t),a=null,!await p()))return o.onSessionEnded?.("expired"),null;const h=Kt().name||null,w=a!==null&&!a.member&&h!==null&&h!==(a.name??null);if(!a||Es(a)||u||w)try{await(re??=y(w).finally(()=>re=null))}catch(T){if(!(T instanceof Ce)||T.status===0)throw T;return null}return a?.token??null}async function J(h,w,T=!1){const M=await G();let U;try{U=await fetch(c+h,{...w,headers:{"content-type":"application/json",...M?{Authorization:`Bearer ${M}`}:{},...w?.headers??{}},credentials:"omit"})}catch(D){throw new Ce(0,"network_error",D.message)}if(!U.ok){const D=await U.json().catch(()=>null),l=D?.error?.code??"http_error";if(U.status===401&&!T&&l!=="session_revoked"){const b=!!a?.member;return dt(t),a=null,b&&await p(),J(h,w,!0)}throw new Ce(U.status,l,D?.error?.message??`The server answered ${U.status}.`)}return await U.json()}return{kind:"http",capabilities:{attachments:"none",realtime:"none",anchorReports:!0,identity:["guest"],export:[],serverSideSearch:!1,privateThreads:!1,assignees:!0},async init(h){G().catch(()=>{});const w=await fetch(`${c}/config`).catch(M=>{throw new Ce(0,"network_error",M.message)});if(!w.ok)throw new Ce(w.status,"http_error",`The server answered ${w.status}.`);const T=await w.json();return this.capabilities.attachments=T.features.screenshots?"direct":"none",d=T.rounds??[],{uid:h.uid,env:h.env,features:T.features,...T.rounds?{rounds:T.rounds}:{},...T.writable===void 0?{}:{writable:T.writable},...T.reason===void 0?{}:{reason:T.reason}}},async reportAnchors(h){if(h.length!==0)for(let w=0;w<h.length;w+=50)try{await J("/anchor-reports",{method:"POST",body:JSON.stringify({reports:h.slice(w,w+50)})})}catch{return}},revalidate:K,member:()=>a?.member??null,adoptSession(h){try{localStorage.removeItem(m)}catch{}j(h)},signOut(){dt(t),a=null;try{localStorage.setItem(m,"out")}catch{}},getRound(){return a?.round??qe(t)?.round??null},setRound(h){a&&(a={...a,round:h});const w=qe(t);w&&Jt(t,{...w,round:h})},async fetchForeignImage(h){try{const w=await G(),T=await fetch(`${c}/image?src=${encodeURIComponent(h)}`,{credentials:"omit",...w?{headers:{Authorization:`Bearer ${w}`}}:{}});if(!T.ok)return null;const M=await T.blob();return M.type.startsWith("image/")?M:null}catch{return null}},async uploadAttachment(h,w){const T=await G(),M=await fetch(`${c}/attachments`,{method:"POST",credentials:"omit",headers:{"content-type":h.type||"image/webp",[Lt.attachmentKind]:w.kind,...w.width?{[Lt.attachmentWidth]:String(w.width)}:{},...w.height?{[Lt.attachmentHeight]:String(w.height)}:{},...T?{Authorization:`Bearer ${T}`}:{}},body:h});if(!M.ok){const D=await M.json().catch(()=>null);throw new Ce(M.status,D?.error?.code??"upload_failed",D?.error?.message??"Upload failed.")}const U=await M.json();return{id:U.id,kind:w.kind,contentType:U.contentType,byteSize:U.byteSize,...w.width?{width:w.width}:{},...w.height?{height:w.height}:{},url:`${r}/api/v1/attachments/${U.id}/blob`}},async listThreads(h){const w=!a&&!u;w?G().catch(()=>{}):await G();const T=new URLSearchParams;n&&T.set("env",n),h?.route&&T.set("route",h.route),a?.round&&T.set("round",String(a.round));const M=`/threads?${T}`,U=()=>J(M),D=w?await fetch(c+M,{credentials:"omit"}).then(l=>l.ok?l.json():U(),U):await U();return{data:D.data.map(l=>At(l,n,r)),...D.nextCursor?{nextCursor:D.nextCursor}:{},deleted:[],serverTime:D.serverTime}},async getThread(h){return(await this.listThreads()).data.find(T=>T.id===h)??null},async getThreadByKey(h){const w=new URLSearchParams({key:h});n&&w.set("env",n);const M=(await J(`/threads?${w}`)).data[0];return M?At(M,n,r):null},async createThread(h){const w=a?.round,T=d.some(D=>D.number===w&&!D.closed)?w:void 0,M=D=>J("/threads",{method:"POST",body:JSON.stringify({id:h.id,anchor:Rs(h.anchor,h.route),anchorState:h.anchorState,context:h.context,...n||D?{scope:{...n?{environment:n}:{},...D?{round:D}:{}}}:{},createdBy:{name:h.createdBy.name},...h.comment?{comment:{id:h.comment.id,body:h.comment.body}}:{},...h.attachments?.length?{attachments:h.attachments.map(l=>l.id)}:{}})}),U=await M(T).catch(D=>{if(T&&D instanceof Ce&&D.code.startsWith("round_"))return M();throw D});return At(U,n,r)},async patchThread(h,w){const T="assignee"in w;if(!w.status&&!T)return null;const M=await J(`/threads/${encodeURIComponent(h)}`,{method:"PATCH",body:JSON.stringify({...w.status?{status:w.status}:{},...T?{assignee:w.assignee??null}:{}})});return At(M,n,r)},async listAssignees(h){return(await J(`/assignees${h?`?q=${encodeURIComponent(h)}`:""}`)).data??[]},async deleteThread(h){await J(`/threads/${encodeURIComponent(h)}`,{method:"DELETE"})},isMine(h){return h.id?h.id===(a??qe(t))?.reviewerId||h.id===Jn(t):!1},canModerate(){const h=a??qe(t);return!!h?.member&&!!h.moderator},can(h){return(a??qe(t))?.permissions.includes(h)??!1},async createComment(h,w){const T=await J(`/threads/${encodeURIComponent(h)}/comments`,{method:"POST",body:JSON.stringify({id:w.id,body:w.body})});return{id:T.id,snagId:h,body:T.body,author:T.author,createdAt:T.createdAt}},async patchComment(h,w){return await J(`/comments/${encodeURIComponent(h)}`,{method:"PATCH",body:JSON.stringify({body:w})}),null},async deleteComment(h){await J(`/comments/${encodeURIComponent(h)}`,{method:"DELETE"})}}}async function Ps(e,t){if(e.url&&/^https?:/i.test(e.url))try{const n=await fetch(e.url,{credentials:"omit"});if(!n.ok)return null;const o=await n.blob();return o.type&&!o.type.startsWith("image/")?null:o}catch{return null}return t(e.id)}const Ms=64,zs=4096,Os=e=>de.counts(e),Ds=e=>e.filter(t=>t.status!=="resolved").length;function Ls(e,t,n){const o=new Map;for(const a of t){const d=o.get(a.route)??{n:0,seen:""};a.status!=="resolved"&&d.n++,a.updatedAt>d.seen&&(d.seen=a.updatedAt),o.set(a.route,d)}o.has(n)||o.set(n,{n:0,seen:new Date().toISOString()});const c=[...o.entries()].sort((a,d)=>d[1].seen.localeCompare(a[1].seen)).slice(0,Ms);c.some(([a])=>a===n)||(c[c.length-1]=[n,o.get(n)]);let u={v:1,p:Ds(t),r:Object.fromEntries(c.map(([a,d])=>[a,d.n])),t:new Date().toISOString()};JSON.stringify(u).length>zs&&(u={...u,r:{}});try{localStorage.setItem(Os(e),JSON.stringify(u))}catch{return null}return u}function Ns(e,t){return e?.r[t]??0}const Hs="pass(?:word|wd)?|pwd|secret|token|api[_-]?key|apikey|auth(?:orization)?|credential|session|sid|cookie|jwt|bearer|otp|mfa|totp|cvv|cvc|ssn|nino|iban|card(?:[_-]?number)?|account[_-]?number|private[_-]?key|signature|client[_-]?secret|refresh[_-]?token|access[_-]?token",Ws=new RegExp(`(["'\`]?)(?<![A-Za-z0-9])(?:${Hs})[\\w-]*\\b\\1?\\s*[:=]\\s*(?:(["'\`])((?:\\\\.|(?!\\2)[^\\\\])*)\\2|([^\\s,;&}\\])]{3,}))`,"gi"),js=/^(?:Bearer|Basic|Digest|Negotiate|Token)$/i,Us=(e,t,n,o,r,c,u)=>{if(!n&&js.test(r)&&u.slice(c+e.length).startsWith(" [redacted]")||(n?o:r).startsWith("[redacted"))return e;const a=n?`${n}${o}${n}`:r;return e.slice(0,e.length-a.length)+(n?`${n}[redacted]${n}`:"[redacted]")},Gn=/data:[a-z0-9.+-]*\/?[a-z0-9.+-]*;base64,[A-Za-z0-9+/=]{16,}/gi,eo=/\beyJ[A-Za-z0-9_-]{6,}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[^\s/@]+@/gi,Bs=/^(?=[A-Za-z0-9_~.+/=-]*[a-z])(?=[A-Za-z0-9_~.+/=-]*[A-Z])(?=[A-Za-z0-9_~.+/=-]*\d)[A-Za-z0-9_~.+/=-]{24,}$/;function Te(e,t){e.lastIndex=0;const n=e.test(t);return e.lastIndex=0,n}function co(e){const t=e.replace(/[ -]/g,"");if(t.length<13||t.length>19)return!1;let n=0,o=!1;for(let r=t.length-1;r>=0;r--){let c=t.charCodeAt(r)-48;o&&(c*=2,c>9&&(c-=9)),n+=c,o=!o}return n%10===0}function Zs(e){Qt.lastIndex=0;for(const t of e.matchAll(Qt))if(co(t[0]))return!0;return!1}function kt(e){let t=e;return t=t.replace(Gn,"data:[redacted]"),t=t.replace(Fs,"$1 [redacted]"),t=t.replace(Ws,Us),t=t.replace(eo,"[redacted:jwt]"),t=t.replace(to,"[redacted:key]"),t=t.replace(ao,"[redacted:key]"),t=t.replace(io,"[redacted:url-cred]@"),t=t.replace(no,"[redacted:email]"),t=t.replace(Qt,n=>co(n)?"[redacted:card]":n),t=t.replace(so,n=>`[redacted:b64:${n.length}]`),t=t.replace(oo,n=>`[redacted:b64:${n.length}]`),t=t.replace(ro,n=>`[redacted:hex:${n.length}]`),t}const Vs=vt.query,Ys=vt.fragment;function Xs(e,t=[]){let n;try{const o=globalThis.location?.href;n=new URL(e,o)}catch{return kt(e)}n.username="",n.password="";for(const o of[...n.searchParams.keys()]){if(Ys.includes(o)){n.searchParams.set(o,"[redacted]");continue}if(Vs.includes(o))continue;if(!t.includes(o)){n.searchParams.set(o,"[redacted]");continue}const r=n.searchParams.get(o)??"";kt(r)!==r&&n.searchParams.set(o,"[redacted]")}return n.hash&&n.hash.length>1&&(n.hash=t.includes("#")?n.hash:"#[redacted]"),kt(n.toString().replace(/%5Bredacted%5D/gi,"[redacted]"))}function Ks(e){return e.length>120?!0:Te(no,e)||Te(eo,e)||Te(to,e)||Te(ro,e)||Te(oo,e)||Te(Gn,e)||Te(so,e)||Te(ao,e)||Te(io,e)||Bs.test(e)||Zs(e)}const $t={id:"rev_local",name:V("author.unknown"),kind:"guest"},Js="0.0.0";function lo(e,t){if(e)return{...$t,name:e,...t?{email:t}:{}};try{const n=localStorage.getItem(de.identity);if(n)return{...$t,name:n[0]==="{"?JSON.parse(n).name??$t.name:n}}catch{}return $t}function qs(e){return`SN-${e.reduce((n,o)=>{const r=Number(o.key.split("-")[1]??0);return Number.isFinite(r)&&r>n?r:n},0)+1}`}let Gt=null;const Se=e=>Fr(e,Gt);function Qs(e,t){const n=xn(),o=n.ownerDocument??document,r=o.defaultView??window,c=t?.config?.site??"local",u=t?.emit??(()=>{}),a=t?.assetBase??"./",d=t?.config?.env??"default";at(n,"tokens",Vo);const m=Xo(n.host,Yo(t?.config?.theme)),v={},_=t?.config?.storage==="local"?void 0:t?.config?.host,p=_&&c!=="local"?Is(_,c,t?.config?.env,{reviewToken:t?.reviewToken,onSessionEnded:s=>{ce.show(s==="revoked"?"error.linkrevoked":"error.sessionended")},onSessionStarted:()=>ce.hide()}):vs(c,d,{put:(s,i)=>v.put(s,i),del:s=>v.del(s)}),P=Ss(c,d);let j=null;const B=s=>p.init({uid:c,env:d}).catch(i=>s>=3?Promise.reject(i):new Promise(f=>setTimeout(f,1500*(s+1))).then(()=>B(s+1)));B(0).then(s=>{j=s.rounds??null,te?.update(ee()),s.writable===!1&&s.reason==="origin_not_allowed"&&ce.show("error.origin",void 0,{origin:location.origin})}).catch(()=>{});let y=[],K=[];const re=bs();let G=null,J=null,h=!1,w=!1,T=!1,M=null,U=!1;const D={get:()=>G,unavailable:()=>w||T,newPass:()=>J?.createPassCaches(),fuzzyHit:s=>M?.hit(s)??null,wantFuzzy:(s,i)=>{if(M){M.enqueue(s,i,()=>ae());return}U||!J||!i.text?.exact||i.text.exact.length<8||(U=!0,ze("anchor-fuzzy",a,o).then(f=>{if(!f.ok||!J){T=!0,ae();return}M=f.mod.createFuzzyEngine(o,J.fuzzyDeps),$e()}))},want:s=>{h||!(s.role&&s.accessibleName)&&!s.text?.exact&&!s.path?.length||(h=!0,ze("anchor-ext",a,o).then(i=>{if(!i.ok){w=!0,ae();return}J=i.mod,G=i.mod.resolveExtended,$e()}))}};let l=null,b=Ir();const E=()=>b.statuses.length>0||!!b.by||!!b.page||b.read!=="all",S=xr(n,s=>{if(H==="add"){if(Z?.hasText()){Z.pulse();return}Z?.close(),Z=null,fe("comments")}O(s.id)},D,s=>{l=s,te?te.update(ee()):O()});let H=(()=>{try{return sessionStorage.getItem(de.mode)==="comments"?"comments":"browse"}catch{return"browse"}})(),Z=null,te=null,ie=null,De=!1,Re=null,Qe=!1,Et=null,ve=null,_e=null,Ve=!1;function le(){return _e?Promise.resolve(_e):Ve?Promise.resolve(null):ze("capture",a,o).then(i=>i.ok?(v.put=i.mod.putBlob,v.del=i.mod.deleteBlob,_e=i.mod):(Ct(new Error("chunk unavailable")),null))}function Ct(s){Ve||(Ve=!0,H==="add"&&fe("comments"),ne.setDegraded(!0),ce.show("error.capture",{label:"action.retry",run:()=>{Ve=!1,ne.setDegraded(!1),le()}}),console.warn(`[${xe}] the capture chunk failed to load`,s))}let Ie=0;function Ge(){const s=new URL(a,o.location.href).href,i=new URL(Me.panels,s);return i.searchParams.set("cv",Js),Ie>0&&i.searchParams.set("r",String(Ie)),Ie++,import(i.href)}async function Ae(){if(Qe)return null;if(Re)return Re.catch(()=>null);Re=Ge().catch(async()=>(await new Promise(s=>setTimeout(s,1e3)),Ge()));try{return Et=await Re}catch(s){return Re=null,Le(s),null}}function Le(s){Qe=!0,H==="add"&&fe("comments"),ne.setDegraded(!0),ce.show("error.panels",{label:"action.retry",run:()=>{Qe=!1,ne.setDegraded(!1),O(ie)}}),console.warn(`[${xe}] the panels chunk failed to load`,s)}const Ne=o.defaultView?.matchMedia?.("(pointer: coarse)").matches??!1;let me=null;async function et(){if(me)return;const s=await le();!s||me||(me=s.createAddChrome(n,Ne,{pick:(i,f)=>void g(i,f),announce:nt}),me.setActive(H==="add"))}const ge=o.createElement("div");ge.style.cssText=`position:fixed;left:0;top:0;pointer-events:none;z-index:${Je.dock}`,n.appendChild(ge);const Tt=Or(r,ge,s=>ne.setPuck(s>1.2)),ce=Ar(n,ge),A=$r(n,ge),k=nr(n,{onPick:(s,i)=>void g(s,i),onHover:s=>s?me?.show(s):me?.clear(),onSelectStart:()=>{Ne||rn()}});async function g(s,i){if(Z?.hasText()){Z.pulse();return}Z?.close();const[f,I]=await Promise.all([Ae(),le()]);if(!f||!I)return;const F=I.captureContext({page:I.derivePageRef(o.location,pt()),...gt()});mn(s);const q=I.deriveAnchorLabel(s);L(f,s,i,F,q,I)}function L(s,i,f,I,F,q,X,Fe){let we=i;mt=!1;const he=Se(o);Pt=!1;const yt=()=>{Z=null,Bn(he),ne.setDraft(Vt()),fe("comments")},st=()=>{rt?.abort(),Ue=rt=null,yt()},pe=j?.find(ue=>ue.number===p.getRound?.())?.closed?j.find(ue=>!ue.closed):void 0,Be={at:f,label:F,...X?{initialBody:X.body,initialName:X.author,...X.email?{initialEmail:X.email}:{}}:{},onDraft:(ue,Pe,bt)=>{const Co=ss({route:he,body:ue,author:Pe,...bt?{email:bt}:{},label:F,anchor:Fe??q.createElementAnchor(i,{point:f,viewportWidth:r.innerWidth,label:F,...q.describeElement(i)}),at:{x:f.x+r.scrollX,y:f.y+r.scrollY},savedAt:new Date().toISOString()});ne.setDraft(Vt()),!Co&&!Pt&&(Pt=!0,ln())},onSend:(ue,Pe,bt)=>{yt(),pe&&p.setRound(pe.number),dn(we,f,I,ue,Pe,bt,Fe).then(()=>pe&&$e())},onRetarget:ue=>{const Pe=ue==="up"?q.widen(we):q.narrow(we);Pe&&(we=Pe,me?.show(Pe),Z?.setLabel(q.deriveAnchorLabel(Pe)))},...oe&&ot!==!1?{onShotOptIn:ue=>mt=ue}:{},onCancel:st,crumbsOn:pn!==!1,shotsOn:ot!==!1,..._&&c!=="local"?{serverHost:new URL(_).host}:{},..._&&p.adoptSession?{studio:{host:_,uid:c,env:t?.config?.env,member:p.member(),adopt:ue=>p.adoptSession(ue),signOut:()=>p.signOut()}}:{},...Fe?.text?.exact?{quote:Fe.text.exact}:{},...pe?{roundNote:pe.name}:{}};Z=s.openComposer(n,Be,ge),He()}async function C(){const s=Se(o),i=as(s);if(ne.setDraft(Vt()),!i||Z)return;const[f,I]=await Promise.all([Ae(),le()]);if(!f||!I)return;const F=Ft(i.anchor,o,{viewportWidth:r.innerWidth,...G?{extended:G}:{}});if(!F.element)return;const q=F.element.getBoundingClientRect();if(q.width===0&&q.height===0)return;const X={x:i.at.x-r.scrollX,y:i.at.y-r.scrollY};fe("add"),L(f,F.element,X,I.captureContext({page:I.derivePageRef(o.location,pt()),...gt()}),i.label,I,{body:i.body,author:i.author,...i.email?{email:i.email}:{}})}async function O(s=null){if(s&&s!==ie&&u("thread:open",{threadId:s}),s&&P.mark(s),ie=s,De=!0,H==="browse"&&fe("comments"),te){te.update(ee());return}if(!await Ae())return;const f=await ze("dock",a,o);if(!f.ok){ce.show("error.panels",{label:"action.retry",run:()=>void O(ie)});return}!De||te||(ve=f.mod,te=f.mod.openDock(n,ee(),ge),He())}function $(){P.markAll(y),b.newOnly&&(b={...b,newOnly:!1}),De=!1,te?.close(),te=null,ie=null,S.highlight(null),He(),E()&&ae()}function R(s){const i=s?y.find(f=>f.id===s):void 0;if(i&&i.route!==Se(o)){Rr(r,i.id),r.location.assign(i.route);return}s&&P.mark(s),ie=s,S.highlight(null),E()?ae():te?.update(ee()),i&&ve?.scrollToSnag(r,n,i)}function ee(){return{snags:y,route:Se(o),openId:ie,seenAt:P.map(),onOpen:R,onStatus:(s,i)=>void mo(s,i),onReply:(s,i,f)=>void yo(s,i,f),onEdit:(s,i)=>void N(s,i),onDeleteComment:s=>void W(s),onDeleteThread:s=>void se(s),...p.isMine?{isMine:s=>p.isMine(s)}:{},..._&&p.adoptSession?{studio:{host:_,uid:c,env:t?.config?.env,member:p.member(),adopt:s=>p.adoptSession(s),signOut:()=>p.signOut()}}:{},canDeleteOwnThread:p.can?p.can("thread:delete:own"):!0,canStatus:p.can?p.can("thread:resolve"):!0,canModerate:p.canModerate?.()??!1,...p.listAssignees&&p.can?.("thread:assign")?{assignees:()=>p.listAssignees(),onAssign:(s,i)=>void go(s,i)}:{},onClearAll:()=>void ye(),onClose:$,...p.kind==="local"?{onExport:It}:{},onHover:s=>S.highlight(s),...j&&j.length>1&&p.setRound?{rounds:j,activeRound:p.getRound?.()??j.find(s=>!s.closed)?.number??j[0].number,onRound:s=>{p.setRound(s),$e()}}:{},onAnnounce:nt,loadShot:s=>Ps(s,async i=>{const f=await le();return f?(await f.getBlob(i))?.blob??null:null}),filter:b,onFilter:s=>{const i=s.statuses.join()!==b.statuses.join()||s.by!==b.by||s.page!==b.page||s.read!==b.read;b=s,i?ae():te?.update(ee())},...l?{clusterFilter:l}:{},onClusterClear:()=>{l=null,te?.update(ee())},onShowAnyway:s=>{S.showGhost(s),ve?.scrollToSnag(r,n,s)}}}async function Y(s,i){const f=y;y=s,ae();try{await Xe(i)}catch{y=f,ae(),ce.show("error.sendfailed",void 0,{item:"change"})}}async function N(s,i){await Y(y.map(f=>({...f,comments:f.comments.map(I=>I.id===s?{...I,body:i}:I)})),()=>p.patchComment(s,i))}async function W(s){await Y(y.map(i=>({...i,comments:i.comments.filter(f=>f.id!==s)})),()=>p.deleteComment(s))}async function se(s){const i=ie;ie===s&&(ie=null),await Y(y.filter(f=>f.id!==s),()=>p.deleteThread(s)),y.some(f=>f.id===s)&&(ie=i)}async function ye(){const s=y.map(i=>i.id);y=[],ie=null,ae(),await Promise.all(s.map(i=>Xe(()=>p.deleteThread(i))))}const ne=fs(n,{onState:s=>fe(s),onPanel:()=>te?$():void O(),onNav:s=>nn(s),parent:ge}),oe=r.matchMedia?.("(pointer: coarse)").matches??!1,He=()=>{oe&&ne.setConcealed(!!Z||!!te)};let be=null,We=[];function uo(s){let i=!1;const f=()=>{i||(i=!0,r.removeEventListener("scrollend",f),s())};r.addEventListener("scrollend",f,{once:!0}),r.setTimeout(f,600)}const tt=o.createElement("div");tt.setAttribute("aria-live","polite"),tt.setAttribute("role","status");const en="position:absolute;width:1px;height:1px;overflow:hidden";tt.style.cssText=en;const Rt=o.createElement("div");Rt.setAttribute("aria-live","assertive"),Rt.style.cssText=en,n.append(tt,Rt);let tn=0;function nt(s){r.clearTimeout(tn),tn=r.setTimeout(()=>{tt.textContent=s},400)}function nn(s){const i=We.length;if(i===0)return;be=be===null?s===1?0:i-1:(be+s+i)%i;const f=We[be];ps(r,n,f);const I=be+1;uo(()=>{S.pulse(f.id),nt(V("nav.announce",{n:I,label:f.anchor.label,i:I,total:i}))})}function on(){if(H!=="comments"||Ne){ke?.disarm();return}rn().then(s=>{s&&H==="comments"&&s.arm()})}let ke=null,_t=null;async function rn(){if(ke)return ke;const s=await ze("text",a,o);return!s.ok||ke||(_t=s.mod,ke=s.mod.createSelectionWatcher(n,{onQuote:(i,f)=>void fo(i,f)})),ke}async function fo(s,i){const f=_e??await le();if(!f||!_t)return;const I=_t.createTextAnchor(s,f,{viewportWidth:r.innerWidth,ourRoot:n});if(I.kind==="refused-form-control"){g(I.el,i);return}if(I.kind!=="text")return;const F=await Ae();if(!F)return;const q=f.captureContext({page:f.derivePageRef(o.location,pt()),...gt()});try{s.removeAllRanges()}catch{}L(F,I.el,I.point,q,I.label,f,void 0,I.record)}function fe(s,i=!1){const f=H;H=s,s!=="add"&&Z&&!i&&(Z.close(),Z=null),s==="add"&&te&&$(),s==="add"&&(Ae(),le());try{sessionStorage.setItem(de.mode,s==="add"?"comments":s)}catch{}k.setMode(s),s!==f&&nt(V(`toolbar.${s}`)),He(),s==="add"&&et(),on(),me?.setActive(s==="add"),ne.setState(s),ae(),s!==f&&u("modechange",{mode:s,previous:f})}let Ye=0,sn=0;const an=[300,800,1600,3200];function ho(){if(Ye||!S.hasPending()){S.hasPending()||(sn=0);return}const s=an[Math.min(sn++,an.length-1)];Ye=r.setTimeout(()=>{Ye=0,ae()},s)}const po=3e3;let cn=0;function ae(s){const i=s??(Date.now()<cn?"navigating":"authoritative");K=S.reanchor(y.filter(ko()),i),Ao(),ho();const f=new Map(K.map(X=>[X.id,X]));y=y.map(X=>f.get(X.id)??X);const I=E()?new Set(K.filter(X=>!Mr(X,b,P.map())&&X.id!==ie).map(X=>X.id)):void 0;We=I?K.filter(X=>!I.has(X.id)):K,S.render(H==="browse"?[]:K,I);const F=Se(o),q=re?Ls(o.location.origin,y,F):null;ne.setCount(q?Ns(q,F):re?K.filter(X=>X.status!=="resolved").length:null),be!==null&&be>=We.length&&(be=null),te?.update(ee())}async function $e(){const{data:s}=await p.listThreads();y=s,ae();const i=S.settled();for(const f of i)u("anchor:settled",{threadId:f.id,state:f.state,strategy:f.strategy,confidence:f.confidence});return p.capabilities.anchorReports&&p.reportAnchors&&i.length&&Xe(()=>p.reportAnchors(i.map(f=>({threadId:f.id,state:f.state,confidence:f.confidence,strategy:f.strategy})))),p.capabilities.anchorReports||await Promise.all(s.flatMap(f=>{const I=y.find(F=>F.id===f.id);return!I||I.anchorState===f.anchorState?[]:[Xe(()=>p.patchThread(I.id,{anchor:I.anchor,anchorState:I.anchorState}))]})),K}async function mo(s,i){u("thread:resolve",{threadId:s,status:i}),await Y(y.map(f=>f.id===s?{...f,status:i}:f),()=>p.patchThread(s,{status:i}))}async function go(s,i){await Y(y.map(f=>f.id===s?{...f,assignee:i}:f),()=>p.patchThread(s,{assignee:i&&i.id}))}async function yo(s,i,f){const I={id:Yn(),body:i,author:lo(f)};y=y.map(F=>F.id===s?{...F,comments:[...F.comments,{...I,snagId:s,createdAt:new Date().toISOString()}]}:F),P.mark(s),ae(),u("comment:create",{threadId:s,comment:I}),await Xe(()=>p.createComment(s,I))}function ln(){ce.show("error.quota",{label:"action.exportclear",run:()=>{It("json"),ye()}}),console.warn(`[${xe}] ${V("error.quota")}`)}async function Xe(s){try{return await s()}catch(i){if(i instanceof Ht&&i.code==="local_quota_exceeded")return ln(),null;throw i}}function It(s){le().then(async i=>{if(!i)return;const f=await i.resolveAttachmentUris(y).catch(()=>new Map);i.download(n,i.buildExport(s,y,{origin:o.location.origin,exportedAt:new Date().toISOString()},f),r)})}async function dn(s,i,f,I,F,q,X){const Fe=lo(F,q),we=_e??await le();if(!we)throw new Error(`[${xe}] add() needs the capture chunk`);Ue||mn(s);const he=Ue?await Ue:null;Ue=rt=null,we.applyShotOutcome(f,he,ot===!1,oe&&!mt);const yt=he?.blob&&p.uploadAttachment?p.uploadAttachment(he.blob,{kind:"screenshot",...he.width!==void 0?{width:he.width}:{},...he.height!==void 0?{height:he.height}:{}}).catch(()=>null):Promise.resolve(null),st={id:ms(),key:qs(y),route:Se(o),anchor:X??we.createElementAnchor(s,{point:i,viewportWidth:r.innerWidth,label:we.deriveAnchorLabel(s),...we.describeElement(s)}),anchorState:"anchored",scope:xo(),context:f,createdBy:Fe,createdAt:new Date().toISOString(),...I?{comment:{id:Yn(),body:I,author:Fe}}:{}},Ee=Rn(st);he?.blob&&(Ee.screenshotBlob=he.blob),y=[...y,Ee],P.mark(Ee.id),nt(V("announce.created",{key:Ee.key})),u("thread:create",{thread:Ee}),H==="browse"?fe("comments"):ae();try{const pe=await yt;pe&&(st.attachments=[pe],y=y.map(Be=>Be.id===Ee.id?{...Be,attachments:[pe]}:Be),ae()),await Xe(()=>p.createThread(st))}catch(pe){throw y=y.filter(Be=>Be.id!==Ee.id),ae(),ce.show("error.sendfailed",void 0,{item:zt.toLowerCase()}),console.warn(`[${xe}] ${V("error.sendfailed",{item:zt.toLowerCase()})}`,pe),pe}return Ee}function un(s){if((s.key==="n"||s.key==="p")&&H==="comments"&&!Z){if(s.metaKey||s.ctrlKey||s.altKey)return;const i=s.composedPath()[0]??s.target;if(i&&(i.closest?.("input,textarea,select,[contenteditable]")||i.isContentEditable))return;s.preventDefault(),s.stopPropagation(),nn(s.key==="n"?1:-1);return}H==="add"&&s.key==="Escape"&&(Z||(s.stopPropagation(),fe("comments")))}o.addEventListener("keydown",un,!0);let fn=0;const hn=()=>{if(o.hidden||!p.revalidate)return;const s=Date.now();s-fn<3e4||(fn=s,p.revalidate())};o.addEventListener("visibilitychange",hn);const bo=Wo(n),vo=jo(n,s=>{console.warn(`[${xe}] the host page hid the widget from assistive technology ${s} times; leaving it alone.`)}),wo=Ho(n,s=>{console.warn(`[${xe}] the host page removed the widget ${s} times; leaving it alone. Reload to comment again.`)});function xo(){return{environment:d,...t?.config?.branch?{branch:t.config.branch}:{}}}let ut={route:Se(o),url:o.location.href},Pt=!1,ft=null;function So(s){if(s){if(H==="browse")return;ft=H,fe("browse",!0),A.show(),u("paused",{reason:"modal-dialog"})}else if(ft){const i=ft;ft=null,A.hide(),fe(i),u("resumed",{mode:i})}}Ae();function Ao(){K.length>0&&ze("dock",a,o)}{const s=o.createElement("div");s.style.cssText="position:fixed;inset:0;pointer-events:none;visibility:hidden",n.appendChild(s);const i=s.getBoundingClientRect(),f=Math.abs(i.left)>1||Math.abs(i.top)>1||Math.abs(i.width-r.innerWidth)>1||Math.abs(i.height-r.innerHeight)>1;s.remove(),f&&(console.warn(`[${xe}] fixed-trapped: <html> has transform/filter/contain, so our fixed layer follows it, not the viewport. Remove it, or expect drift.`),u("error",{code:"fixed-trapped"}))}let Ke=null;const ht=new Set,je=(()=>{const s=r[Io.config];return s&&typeof s=="object"?s:void 0})(),pn=je?.breadcrumbs,Mt=(()=>{const s=je?.significantQueryParams,i=je?.ignoredQueryParams,f={};return s==="*"?f.significantQueryParams="*":Array.isArray(s)&&(f.significantQueryParams=s.map(String)),Array.isArray(i)&&(f.ignoredQueryParams=i.map(String)),f})(),pt=()=>({routeOverride:Gt,query:Mt,doc:o}),ot=je?.screenshot===!1?!1:je?.screenshot&&typeof je.screenshot=="object"?je.screenshot:{};let mt=!1,Ue=null,rt=null;function mn(s){if(ot===!1||Ue||oe&&!mt)return;rt=new AbortController;const i=rt.signal;Ue=ze("screenshot",a,o).then(f=>f.ok?f.mod.captureScreenshot({doc:o,target:s,signal:i,...ot,...p.fetchForeignImage?{fetchForeignImage:I=>p.fetchForeignImage(I)}:{}}):{situation:"engine-load-failed",blindSpots:[],maskedCount:0})}function ko(){const s=Se(o),i=jn(o.location.pathname),f=Yr(o.location.search,Mt);return I=>(I.route===s||I.context?.page?.pathname===i)&&Xr(I.context?.page?.query,f,Mt)}{const s=pn;s!==!1&&ze("crumbs",a,o).then(i=>{i.ok&&(Ke=i.mod.installTierC({win:r,...t?.early?{early:t.early}:{},...s&&typeof s=="object"?{config:s}:{},subscribeNav:f=>(ht.add(f),()=>ht.delete(f))}))})}const gt=()=>Ke?{breadcrumbs:{records:Ke.drain(),status:Ke.status()}}:{},$o=Gr(o,r,()=>{H!=="browse"&&K.length>0&&ae()}),Eo=Tr(r,{onResize:()=>ae(),onRoute:()=>{const s={route:Se(o),url:o.location.href},i=s.route!==ut.route;if(i){u("navigate",{from:ut,to:s});for(const f of ht)f(ut.url,s.url)}if(ut=s,!i){$e();return}cn=Date.now()+po,r.setTimeout(()=>{p.listThreads().then(({data:f})=>{y=f,ae("optimistic")})},100),r.setTimeout(()=>void $e(),600)},onModal:So});return ne.setState(H),k.setMode(H),on(),re||ce.show("error.nostorage",{label:"action.export",run:()=>It("md")}),$e().then(async s=>{const i=_r(r);if(!i){const I=new URLSearchParams(o.location.search).get(Do("t"));if(I){let F=s.find(q=>q.key===I);if(!F&&p.getThreadByKey){const q=await p.getThreadByKey(I).catch(()=>null);q&&(y=[...y.filter(X=>X.id!==q.id),q],ae(),F=y.find(X=>X.id===q.id))}F?(await O(F.id),ve?.scrollToSnag(r,n,F)):(ce.show("permalink.unknown"),await O(null));return}await C();return}const f=s.find(I=>I.id===i);await O(f?i:null),f&&ve?.scrollToSnag(r,n,f)}),{root:n,assetBase:t?.assetBase??"",snags:()=>K,async add(s,i,f,I){const F=I?null:await le(),q=I??(F?F.captureContext({page:F.derivePageRef(o.location,pt()),...gt()}):void 0);if(!q)throw new Error(`[${xe}] add() needs the capture chunk, or an explicit context`);return dn(s,i,q,f)},refresh:$e,setRoute(s){Gt=s&&s.startsWith("/")?s:null,$e()},setState:fe,getState:()=>H,openPanel:O,async open(s){const i=s.startsWith(wt.thread)?y.find(f=>f.id===s):y.find(f=>f.key===s);return i?i.route!==Se(o)?{ok:!1,reason:"wrong-page",url:i.context?.url??i.route,route:i.route}:(await O(i.id),ve?.scrollToSnag(r,n,i),{ok:!0,anchorState:i.anchorState}):{ok:!1,reason:"not-found"}},closePanel:$,hitTest:(s,i)=>k.hitTest(s,i),destroy(){Z?.close(),$(),me?.destroy(),ce.destroy(),A.destroy(),Tt(),wo(),vo(),bo(),Eo.destroy(),$o.destroy(),Ke?.destroy(),Ke=null,ht.clear(),ke?.destroy(),ke=null,M?.destroy(),M=null,Ye&&r.clearTimeout(Ye),Ye=0,o.removeEventListener("keydown",un,!0),o.removeEventListener("visibilitychange",hn),m(),k.destroy(),S.destroy(),ne.destroy(),n.host.remove()}}}export{vn as HOST_CSS,xn as createHost,Ks as isSensitiveValue,Qs as mount,kt as redactText,Xs as redactUrl};
1
+ const xe="Snagset",_o="snagset",yn="snagset.v1",Io="Snagset",Ot="Snag",Po="Snags",Mo={config:"SnagsetConfig"},zo={root:"data-snag-root"},Dt=e=>zo[e],Oo={anchor:"data-snag-anchor",ignore:"data-snag-ignore",mask:"data-snag-mask",nomask:"data-snag-nomask",src:"data-snag-src",component:"data-snag-component"},Do=e=>Oo[e],z={font:"--snag-font",accent:"--snag-accent",onAccent:"--snag-onAccent",bg:"--snag-bg",fg:"--snag-fg",muted:"--snag-muted",border:"--snag-border",radius:"--snag-radius",shadow:"--snag-shadow",z:"--snag-z",motion:"--snag-motion",surface:"--snag-surface",sunken:"--snag-sunken",hover:"--snag-hover",focus:"--snag-focus",disabled:"--snag-disabled",statusOpen:"--snag-status-open",statusProgress:"--snag-status-progress",statusReview:"--snag-status-review",statusResolved:"--snag-status-resolved",anchorOrphan:"--snag-anchor-orphan",tbH:"--snag-tb-h",dockW:"--snag-dock-w",kb:"--snag-kb",thumbX:"--snag-thumb-x",thumbW:"--snag-thumb-w"},Lo=e=>`var(${z[e]})`,No=e=>"snag_"+e,wt={query:["snag_t","snag_off","snag_debug","snag_theme"],fragment:["snag_k"]},Ho="snag:disclosure:v1",Lt="snag:identity",bn="data-snag-theme",le={session:e=>`snag:session:${e}`,silent:e=>`snag:silent:${e}`,identity:Lt,threads:(e,t)=>`snag:threads:${e}:${t}`,seen:(e,t)=>`snag:seen:${e}:${t}`,counts:e=>`snag:counts:${e}`,draft:(e,t)=>`snag:draft:${e}:${t}`,outbox:e=>`snag:outbox:${e}`,mode:"snag:mode",handoff:"snag:handoff",seenCoach:"snag:seen-coach",disclosure:Ho},Me={panels:"snag.panels.js",crumbs:"snag.crumbs.js",capture:"snag.capture.js",screenshot:"snag.screenshot.js",anchorExt:"snag.anchor-ext.js",anchorFuzzy:"snag.anchor-fuzzy.js",dock:"snag.dock.js",text:"snag.text.js"},xt={thread:"thr_",comment:"cmt_",attachment:"att_"},Nt={attachmentKind:"x-snagset-attachment-kind",attachmentWidth:"x-snagset-attachment-width",attachmentHeight:"x-snagset-attachment-height"},Wo={route:"snagset:route"},vn={original:"snagset.original",wrapped:"snagset.wrapped"},wn="position:absolute!important;top:0!important;left:0!important;width:0!important;height:0!important;margin:0!important;padding:0!important;border:0!important;pointer-events:none!important;z-index:2147483647;isolation:isolate;color-scheme:light dark;";function xn(e){const t=e.ownerDocument.defaultView?.getComputedStyle(e);return t?t.transform!=="none"&&t.transform!==""||t.filter!=="none"&&t.filter!==""||t.perspective!=="none"&&t.perspective!==""||/transform|filter|perspective|contain/.test(t.willChange)||/paint|layout|strict|content/.test(t.contain)||t.containerType!==void 0&&t.containerType!=="normal"&&t.containerType!=="":!1}function Ht(e){const t=e.documentElement,n=e.body;return t&&xn(t)?{parent:n??t,trapped:!0}:n&&xn(n)?{parent:t??n,trapped:!1}:{parent:n??t,trapped:!1}}function Sn(e=document){const t=Dt("root"),n=e.querySelector(`[${t}]`);if(n?.shadowRoot)return n.shadowRoot;const o=e.createElement("div");return o.setAttribute(t,""),o.style.cssText=wn,Ht(e).parent.appendChild(o),o.attachShadow({mode:"open"})}function jo(e,t,n=5){const o=e.ownerDocument??document,r=e.host,c=Ht(o).parent;if(typeof MutationObserver!="function"||!c)return()=>{};let u=0;const a=new MutationObserver(()=>{if(!r.isConnected){if(u++,u>n){a.disconnect(),t(u);return}Ht(o).parent.appendChild(r)}});return a.observe(c,{childList:!0}),()=>a.disconnect()}const An=[["pointerdown",!0],["mousedown",!0],["touchstart",!0],["pointerup",!0],["mouseup",!0],["touchend",!0],["click",!0],["dblclick",!0],["focusin",!0],["focusout",!0]];function Uo(e){const t=e.host,n=o=>o.stopPropagation();for(const[o,r]of An)t.addEventListener(o,n,{passive:r});return()=>{for(const[o]of An)t.removeEventListener(o,n)}}function Fo(e,t,n=20){const o=e.host;if(typeof MutationObserver!="function")return()=>{};let r=0;const c=()=>{let a=!1;return o.getAttribute("aria-hidden")==="true"&&(o.removeAttribute("aria-hidden"),a=!0),o.hasAttribute("inert")&&(o.removeAttribute("inert"),a=!0),a},u=new MutationObserver(()=>{c()&&++r>n&&(u.disconnect(),t(r))});return c(),u.observe(o,{attributes:!0,attributeFilter:["aria-hidden","inert"]}),()=>u.disconnect()}const Bo={product:xe,set:Io,item:Ot,items:Po};function kn(e){return(t,n)=>(e[t]??"").replace(/\{(\w+)\}/g,(o,r)=>{const c=n?.[r]??Bo[r];return c===void 0?o:String(c)})}const Zo=e=>new Intl.NumberFormat().format(e),$n={"where.anchored":"{label}","where.approximate":"position approximate \u2014 the page changed","where.orphaned":"moved \u2014 the element is gone","status.open":"Active","status.progress":"In progress","status.review":"In review","status.resolved":"Resolved","author.unknown":"Someone","label.image":"an image","label.link":"a link","label.button":"a button","label.tag":"the {tag}"},En=kn($n),Cn={open:{colour:"#4f6ef7"},progress:{colour:"#f59e0b"},review:{colour:"#8b5cf6"},resolved:{colour:"#10b981"}},Tn=e=>e==="open"||e==="review"?"#fff":"#16161a",Rn=e=>e in Cn?En(`status.${e}`):e,Vo=e=>En(`where.${e.anchorState}`,{label:e.anchor.label});class Wt extends Error{code;constructor(t,n){super(n??t),this.name="AdapterError",this.code=t}}function _n(e){return{id:e.id,key:e.key,route:e.route,...e.scope?{scope:e.scope}:{},...e.attachments?.length?{attachments:e.attachments}:{},anchor:e.anchor,anchorState:e.anchorState,context:e.context,status:"open",comments:e.comment?[{id:e.comment.id,snagId:e.id,body:e.comment.body,author:e.comment.author,createdAt:e.createdAt}]:[],createdBy:e.createdBy,createdAt:e.createdAt,updatedAt:e.createdAt}}const S=Object.fromEntries(Object.keys(z).map(e=>[e,Lo(e)])),Yo=Object.entries(Cn).map(([e,t])=>` ${z[`status${e[0].toUpperCase()}${e.slice(1)}`]}:${t.colour};`).join(`
2
+ `),Xo=` :host{all:initial}[hidden]{display:none!important}:host{display:block;font:400 14px/1.45 ${S.font};color:${S.fg};${z.font}:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;${z.accent}:#2a51b8;${z.bg}:#fefdfc;${z.fg}:#181716;${z.muted}:#666564;${z.border}:#e4e3e0;${z.radius}:8px;${z.shadow}:0 6px 24px -4px rgb(0 0 0 / .18);${z.z}:2147483647;${z.motion}:160ms;${z.surface}:color-mix(in srgb,${S.fg} 6%,${S.bg});${z.sunken}:color-mix(in srgb,${S.fg} 3%,${S.bg});${z.hover}:color-mix(in srgb,${S.fg} 8%,${S.bg});${z.onAccent}:#fff;${z.focus}:color-mix(in srgb,${S.accent} 62%,${S.fg});${z.disabled}:color-mix(in srgb,${S.muted} 52%,${S.bg});${Yo} ${z.anchorOrphan}:#DC2626;}:host([${bn}="dark"]){${z.accent}:#8aafff;${z.onAccent}:#1d1c1a;${z.bg}:#1d1c1a;${z.fg}:#f0eeec;${z.muted}:#9a9997;${z.border}:#2d2c2b;${z.shadow}:0 6px 24px -4px rgb(0 0 0 / .6);}@media (prefers-reduced-motion:reduce){:host{${z.motion}:0ms}}@media (forced-colors:active){:host{${z.bg}:Canvas;${z.fg}:CanvasText;${z.muted}:CanvasText;${z.border}:CanvasText;${z.accent}:Highlight;${z.onAccent}:HighlightText;${z.surface}:Canvas;${z.sunken}:Canvas;${z.hover}:Canvas;${z.focus}:Highlight;${z.disabled}:GrayText;${z.shadow}:none;${z.anchorOrphan}:CanvasText;}.snag-pin{border-color:CanvasText!important;color:CanvasText!important;forced-color-adjust:none}}`,Je={shield:1,pins:3,dock:5,notice:6,toolbar:7},In=new WeakMap;function at(e,t,n){let o=In.get(e);if(o||In.set(e,o=new Set),o.has(t))return;o.add(t);try{const u=new CSSStyleSheet;u.replaceSync(n),e.adoptedStyleSheets=[...e.adoptedStyleSheets,u];return}catch{}const c=(e.ownerDocument??document).createElement("style");c.setAttribute(`data-snag-${t}`,""),c.textContent=n,e.appendChild(c)}function Ko(e){return e==="light"||e==="dark"?e:"auto"}function Jo(e,t){const n=bn;if(t!=="auto")return e.setAttribute(n,t),()=>e.removeAttribute(n);const o=e.ownerDocument?.defaultView?.matchMedia?.("(prefers-color-scheme: dark)");if(!o)return e.setAttribute(n,"light"),()=>e.removeAttribute(n);const r=()=>e.setAttribute(n,o.matches?"dark":"light");return r(),o.addEventListener("change",r),()=>{o.removeEventListener("change",r),e.removeAttribute(n)}}function jt(e){return e.getBoundingClientRect()}function St(e){if(e.closest('[inert],[aria-hidden="true"]'))return!1;const t=e.checkVisibility;if(typeof t=="function")return t.call(e,{contentVisibilityAuto:!0,opacityProperty:!1,visibilityProperty:!0});const n=jt(e);if(!(n.width>0||n.height>0||e.getClientRects().length>0))return!1;const r=e.ownerDocument?.defaultView;return r?r.getComputedStyle(e).visibility!=="hidden":!0}const qo="button,a[href],[role=button],[role=link],[role=tab],[role=menuitem],label,input,select,textarea,summary",Qo=3,Pn=8,Go=new Set(["img","picture","canvas","video","audio","iframe","embed","object","svg","math","input","select","textarea","button","progress","meter"]);function er(e,t){return Go.has(e.tagName.toLowerCase())?!1:t.getComputedStyle(e).display==="inline"}function Mn(e){const t=e.ownerDocument?.defaultView;if(!t)return e;let n=e;for(let r=e;r;r=r.parentElement){const c=jt(r);if(c.width>=Pn&&c.height>=Pn&&!er(r,t)){n=r;break}n=r}let o=0;for(let r=n;r&&o<=Qo;r=r.parentElement){if(r.matches(qo))return r;o++}return n}const tr=10,Ut=[["click",!1],["auxclick",!1],["dblclick",!1],["pointerdown",!1],["pointerup",!1],["mousedown",!1],["mouseup",!1],["contextmenu",!1],["dragstart",!1],["wheel",!1],["touchstart",!0],["touchmove",!0],["touchend",!0],["selectstart",!0],["keydown",!1],["keyup",!1]];function nr(e,t,n){let o=e;for(;o&&o!==o.ownerDocument.documentElement&&o!==o.ownerDocument.body;){const r=getComputedStyle(o),c=(r.overflowY==="auto"||r.overflowY==="scroll")&&o.scrollHeight>o.clientHeight&&(t>0&&o.scrollTop+o.clientHeight<o.scrollHeight-1||t<0&&o.scrollTop>0),u=(r.overflowX==="auto"||r.overflowX==="scroll")&&o.scrollWidth>o.clientWidth&&(n>0&&o.scrollLeft+o.clientWidth<o.scrollWidth-1||n<0&&o.scrollLeft>0);if(c||u)return o;o=o.parentElement}return null}function zn(e,t){const n=t==="y"?e.deltaY:e.deltaX;return e.deltaMode===1?n*16:e.deltaMode===2?n*(t==="y"?innerHeight:innerWidth):n}const or=["position:fixed","inset:0",`z-index:${Je.shield}`,"touch-action:pan-x pan-y pinch-zoom","background:transparent"].join(";");function rr(e,t={}){const n=t.doc??e.ownerDocument??document,o=n.defaultView??window;let r=t.coarsePointer??o.matchMedia?.("(pointer: coarse)").matches??!1;const c=l=>{const g=l.pointerType,C=g==="touch"?!0:g==="mouse"||g==="pen"?!1:r;C!==r&&(r=C,d())},u=n.createElement("div");u.className="snag-shield",u.style.cssText=or;let a="browse";const d=()=>{u.style.pointerEvents=r?"none":"auto",u.style.cursor="crosshair"};d();const m=l=>{const g=l;return!g||typeof g.closest!="function"?!1:e.contains(g)?!0:!!g.closest(`[${Dt("root")}]`)};function w(l,g,C){let A=C,G=0;for(;A.shadowRoot&&G++<tr;){const H=_(A.shadowRoot,l,g);if(!H||H===A)break;A=H}return A}function _(l,g,C){const A=l.elementsFromPoint;if(typeof A=="function"){for(const H of A.call(l,g,C))if(H.getRootNode()===l)return H;return null}const G=l.elementFromPoint(g,C);return G&&G.getRootNode()===l?G:null}function p(l,g){const C=[];for(const A of n.elementsFromPoint(l,g)){if(m(A))continue;if(A===n.documentElement||A===n.body){C.push(A);continue}const G=w(l,g,A);C.push(m(G)?A:G)}return C}let P=null;const j=(l,g)=>{const[C]=p(l,g);C&&t.onPick?.(Mn(C),{x:l,y:g})};let V=!1;const b=()=>{const l=n.getSelection?.();if(!l||l.isCollapsed||l.rangeCount===0||!l.toString().trim())return!1;const g=l.anchorNode;if(!g||e.contains(g))return!1;const C=g.nodeType===1?g:g.parentElement;return!m(C)},J=l=>{const g=l.composedPath()[0];if(g&&m(g)){V=!1;return}if(l.type==="selectstart"){t.onSelectStart?.();return}const C=l.type;if(C.endsWith("down")||C.endsWith("start")){V=!1;return}if(C.endsWith("up")||C.endsWith("end")){V=b();return}if(C==="click"||C==="auxclick"){if(!V)return;V=!1,l.preventDefault(),l.stopImmediatePropagation()}},ne=l=>{if(l.type==="pointerdown"&&c(l),a==="comments"){J(l);return}if(a!=="add")return;if(l.type==="keydown"||l.type==="keyup"){x(l);return}const g=l.composedPath()[0];if(g&&g!==u&&m(g))return;const C=Ut.find(([A])=>A===l.type)?.[1]??!1;if(l.stopImmediatePropagation(),!C){if(r&&l.type==="pointerdown"){const A=l;P={x:A.clientX,y:A.clientY,t:performance.now()},O(A.clientX,A.clientY)}if(r&&l.type==="pointerup"&&P){const A=l,G=P;P=null,Math.hypot(A.clientX-G.x,A.clientY-G.y)<=8&&performance.now()-G.t<=700&&j(A.clientX,A.clientY);return}if(l.type==="click"||l.type==="auxclick"||l.type==="dblclick"){l.preventDefault();const A=l;j(A.clientX,A.clientY);return}if(l.type==="wheel"){const A=l,G=zn(A,"y"),H=zn(A,"x"),[Y]=p(A.clientX,A.clientY),te=nr(Y??null,G,H);te&&(te.scrollTop+=G,te.scrollLeft+=H,l.preventDefault());return}if(l.type==="dragstart"||l.type==="contextmenu"){l.preventDefault();return}(l.type==="pointerdown"||l.type==="mousedown")&&!r&&l.preventDefault()}},ee=new Set(["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," ","Spacebar","PageUp","PageDown","Home","End"]),q=/^[a-z0-9/?]$/;function h(l){for(const g of l.composedPath()){const C=g;if(!(!C||C.nodeType!==1||typeof C.matches!="function")&&C.matches('input:not([type=button]):not([type=submit]):not([type=checkbox]):not([type=radio]),textarea,select,[contenteditable=""],[contenteditable=true],[role=textbox],[role=searchbox],[role=combobox]'))return!0}return!1}function x(l){ee.has(l.key)||l.metaKey||l.ctrlKey||l.altKey||/^F\d{1,2}$/.test(l.key)||l.key!=="Escape"&&l.key.length===1&&q.test(l.key.toLowerCase())&&!h(l)&&(l.preventDefault(),l.stopImmediatePropagation())}for(const[l,g]of Ut)o.addEventListener(l,ne,{capture:!0,passive:g});let R=0,M=null;function U(){if(R=0,a!=="add"||!M)return;const[l]=p(M.x,M.y);t.onHover?.(l?Mn(l):null)}function O(l,g){a==="add"&&(M={x:l,y:g},!R&&(R=o.requestAnimationFrame(U)))}return u.addEventListener("pointermove",l=>O(l.clientX,l.clientY)),u.addEventListener("pointerleave",()=>{M=null,t.onHover?.(null)}),{shield:u,getMode:()=>a,setMode(l){a=l,V=!1,d(),l==="add"?e.appendChild(u):u.remove(),l!=="add"&&(M=null,t.onHover?.(null))},hitTest:p,destroy(){R&&o.cancelAnimationFrame(R);for(const[l]of Ut)o.removeEventListener(l,ne,{capture:!0});u.remove()}}}const sr=/[\u200B-\u200D\u2060\uFEFF]/gu,ar=/[\s\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]+/gu,ir=[[/[\u2018\u2019\u201A\u201B]/gu,"'"],[/[\u201C\u201D\u201E\u201F]/gu,'"'],[/[\u2010-\u2015\u2212]/gu,"-"],[/\u2026/gu,"..."],[/\u2044/gu,"/"]];function cr(e){let t=e.normalize("NFC").replace(sr,"");for(const[n,o]of ir)t=t.replace(n,o);return t.replace(ar," ").trim()}const lr={testid:1,domid:1,css:.9,aria:.75,"text-exact":.8,"text-fuzzy":.78,"path-rect":.35,none:0,manual:1},On={anchored:.75,approximate:.35};function dr(e,t){const n=lr[e];return t===1?n:n/(1+Math.log2(t))}function Dn(e){return e>=On.anchored?"anchored":e>=On.approximate?"approximate":"orphaned"}const ur=[Do("anchor"),"data-testid","data-test-id","data-test","data-cy","data-qa","data-pw","data-automation-id"],Ln=e=>typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/["\\]/g,"\\$&"),fr=[{strategy:"testid",applicable:e=>!!e.testid,find:(e,t)=>Ft(t,ur.map(n=>`[${n}="${Ln(e.testid)}"]`).join(","))},{strategy:"domid",applicable:e=>!!e.domid,find:(e,t)=>Ft(t,`#${Ln(e.domid)}`)},{strategy:"css",applicable:e=>!!e.css,find:(e,t)=>{try{return Ft(t,e.css)}catch{return[]}}}];function Ft(e,t){return[...e.querySelectorAll(t)].filter(hr)}function hr(e){return!e.closest(`[${Dt("root")}]`)}function pr(e,t){const n=t.text?.exact;if(!n)return!0;const o=cr(e.textContent??"");return o?o===n||o.includes(n)||n.includes(o):!0}function Nn(e,t,n,o){St(e)||o.push("hidden"),t.hostPath?.length&&o.push("shadow-boundary");const r=!pr(e,t);r&&o.push("text-drift");let c=o.includes("hidden")?Math.min(n,.7):n;return r&&(c=Math.min(c,.5)),c}const mr={element:null,strategy:"none",score:0,state:"orphaned",reasons:["not-found"],candidates:0};function Bt(e,t=document,n={}){const o=[];for(const r of fr){if(!r.applicable(e))continue;const c=r.find(e,t);if(c.length===0)continue;const u=dr(r.strategy,c.length),a=c[0];c.length>1&&o.push("ambiguous");const d=Nn(a,e,u,o),m={element:a,strategy:r.strategy,score:d,state:Dn(d),reasons:o.length?o:["exact"],candidates:c.length};if(m.reasons.includes("text-drift")&&n.extended){const w=n.extended(e,t,{...n.viewportWidth===void 0?{}:{viewportWidth:n.viewportWidth},...n.passCaches?{caches:n.passCaches}:{}});if(w&&w.score>m.score)return w}return m}return n.extended?.(e,t,{...n.viewportWidth===void 0?{}:{viewportWidth:n.viewportWidth},...n.passCaches?{caches:n.passCaches}:{}})??mr}const gr={"toolbar.aria":"{product} review toolbar","toolbar.group":"What you see","toolbar.browse":"Browse","toolbar.comments":"Comment","toolbar.comments.unresolved":"Comment, {n} unresolved","toolbar.add":"Add a comment","toolbar.add.draft":"Add a comment \u2014 one is unfinished","toolbar.panel":"All comments","pin.aria":"Comment {key} on {target}. {status}, {replies} replies. Press Enter.","pin.aria.one":"Comment {key} on {target}. {status}, 1 reply. Press Enter.","pin.aria.none":"Comment {key} on {target}. {status}. Press Enter.","pin.aria.moved":"Comment {key} on {target}. {status}. {where}. Press Enter.","pin.target":"{role} \u201C{name}\u201D","cluster.aria":"{n} comments here: {list}","nav.announce":"Comment {n} on {label}, {i} of {total}","action.retry":"Retry","action.dismiss":"Dismiss","action.export":"Export","action.exportclear":"Export & clear","error.quota":"Storage is full \u2014 this {item} is on screen but not saved. Export to keep them.","error.nostorage":"Comments won't be saved in this browser. Export before you leave to keep them.","error.linkrevoked":"This review link was turned off. Ask whoever sent it for a new one.","error.sessionended":"This review session has ended. Open your review link again to carry on.","error.sendfailed":"That {item} couldn't be sent, so it wasn't kept. Check your connection and try again.","error.origin":"{product} is not enabled for {origin}. Add that address to the site's allowed origins.","error.panels":"{product} loaded, but its comment UI didn't. You can still see the comments on the page.","error.panels.add":"Adding comments is unavailable until the comment UI loads.","error.capture":"{product} can't take new comments \u2014 the part that records the page didn't load. Everything already here still works.","paused.dialog":"Review paused \u2014 a dialog is open on this page. Close it to carry on commenting. Commenting inside a native dialog isn't supported yet.","paused.close":"Close","announce.created":"Comment {key} added.","permalink.unknown":"That comment isn't on this page any more"},yr={...$n,...gr},X=kn(yr);function br(e,t){const n=new Array(e.length),o=[],r=new Map,c=[];let u=0;for(let a=0;a<e.length;a++){u++;const d=e[a],m=Math.floor(d.x/t),w=Math.floor(d.y/t);let _=-1;e:for(let p=-1;p<=1;p++)for(let P=-1;P<=1;P++)for(const j of r.get(`${m+p},${w+P}`)??[]){const V=c[j],b=d.x-V.x,J=d.y-V.y;if(b*b+J*J<=t*t){_=j;break e}}if(_===-1){_=o.length,o.push([]),c.push(d);const p=`${m},${w}`,P=r.get(p);P?P.push(_):r.set(p,[_])}n[a]=_,o[_].push(a)}return{group:n,members:o,visits:u}}const vr=`position:absolute;top:0;left:0;width:0;height:0;pointer-events:none;z-index:${Je.pins}`,wr=' .snag-pp{animation:snag-pp .5s ease-out 2}@keyframes snag-pp{50%{transform:scale(1.45)}}@media (prefers-reduced-motion: reduce){.snag-pp{animation:none}}.snag-pin{width:28px;height:28px;margin:-14px 0 0 -14px}.snag-pin::after{content:"";position:absolute;inset:-8px}@media (pointer:coarse){.snag-pin{width:34px;height:34px;margin:-17px 0 0 -17px}}',xr=`position:fixed;inset:0;width:0;height:0;pointer-events:none;z-index:${Je.pins}`,it=["position:absolute",`color:${S.onAccent}`,`font:600 12px/1 ${S.font}`,"display:flex","align-items:center","justify-content:center","box-shadow:0 1px 4px rgb(0 0 0 / .35)","pointer-events:auto","cursor:pointer","box-sizing:border-box"].join(";"),At="border-radius:50% 50% 50% 2px",Hn=e=>S[`status${e[0].toUpperCase()}${e.slice(1)}`]??S.muted;function Wn(e,t){const n=Tn(t.status),o=`background:${Hn(t.status)};color:${n}`,r="0 1px 4px rgb(0 0 0 / .35)";return e==="anchored"?`${it};${At};${o};border:2px solid ${n};box-shadow:${r}`:e==="approximate"?`${it};${At};${o};border:2px dashed ${n};box-shadow:${r}`:`${it};${At};${o};border:2px solid ${n};box-shadow:inset 0 0 0 2px ${n},${r}`}function Sr(e,t){const n=[];let o="static",r=!1;for(let c=e;c&&c!==e.ownerDocument.documentElement;c=c.parentElement){const u=t.getComputedStyle(c),a=c!==e.ownerDocument.body&&/auto|scroll|hidden|overlay/.test(u.overflowY+u.overflowX);a&&!r&&n.push(c),u.position==="fixed"?(o="dynamic",r=!0):u.transform!=="none"||u.filter!=="none"||u.perspective!=="none"?(o="dynamic",r=!1):(u.position==="sticky"||u.willChange.includes("transform")||u.contain.includes("layout")||a&&(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth))&&(o="dynamic")}return{tier:o,clips:n}}function Ar(e,t,n,o){const r=e.ownerDocument??document,c=r.defaultView??window;at(e,"pins",wr);const u=r.createElement("div");u.className="snag-pins",u.style.cssText=vr,e.appendChild(u);const a=r.createElement("div");a.className="snag-pins-dyn",a.style.cssText=xr,e.appendChild(a);let d=[],m=[];const w=new Map;let _=new Map,p=null;const P=new Map;let j=new Map;const V=c.matchMedia?.("(pointer: coarse)").matches??!1,b=V?32:24,J=V?34:28;let ne=[],ee=null,q=null,h={x:0,y:0};function x(){const k=r.defaultView,$=u.getBoundingClientRect();h={x:$.left+(k?.scrollX??0),y:$.top+(k?.scrollY??0)}}let R=[];const M=new Map,U=1e4,O=5,l=new Map,g=new Set(["testid","domid"]);function C(k){const $=l.get(k.id),y=$?.ref.deref();if(!y||!y.isConnected)return null;if(g.has($.strategy))return y;if(k.anchor.css)try{if(!y.matches(k.anchor.css))return null}catch{return null}return y}function A(k,$){const y=[],L=Nn($,k.anchor,1,y);return{element:$,strategy:l.get(k.id).strategy,score:L,state:Dn(L),reasons:y.length?y:["exact"],candidates:1}}function G(k,$="authoritative"){w.clear(),R=[];const y=Date.now(),L=n?.newPass?.();return k.map(T=>{const N=C(T),v=n?.get();let E=N?A(T,N):Bt(T.anchor,r,{viewportWidth:r.defaultView?.innerWidth??0,...v?{extended:v}:{},...L?{passCaches:L}:{}});if(N&&E.reasons.includes("text-drift")){const W=Bt(T.anchor,r,{viewportWidth:r.defaultView?.innerWidth??0,...v?{extended:v}:{},...L?{passCaches:L}:{}});W.score>E.score&&(E=W)}if(n&&(!E.element||E.reasons.includes("text-drift"))&&n.want(T.anchor),!E.element&&n){const W=n.fuzzyHit?.(T.id);W?E=W:n.wantFuzzy?.(T.id,T.anchor)}const ae=E.element&&T.anchor.text?.exact&&(E.reasons.includes("text-drift")||E.strategy==="path-rect"&&E.score<.5);if(n&&ae){const W=n.fuzzyHit?.(T.id);W&&W.score>E.score?E=W:W||n.wantFuzzy?.(T.id,T.anchor)}E.element?l.set(T.id,{ref:new WeakRef(E.element),strategy:E.strategy}):l.delete(T.id),E.element&&w.set(T.id,E.element);let B=!1;if(E.state==="orphaned"){const W=M.get(T.id)??{firstSeenAt:y,tries:0,best:E};W.tries++,E.score>=W.best.score&&(W.best=E),M.set(T.id,W);const oe=n?.unavailable?.()??!1,ve=oe?2:O,ge=y-W.firstSeenAt<U;$==="optimistic"||ge&&($==="navigating"||W.tries<ve)?B=!0:(E=W.best,oe&&!E.reasons.includes("budget-exceeded")&&(E={...E,reasons:[...E.reasons,"budget-exceeded"]}),M.delete(T.id))}else M.delete(T.id);B||R.push({id:T.id,state:E.state,strategy:E.strategy,confidence:E.score});const D=E.element?jt(E.element):void 0;if(D&&(D.width>0||D.height>0)){const W=r.defaultView;T.anchor.rect={x:D.left+(W?.scrollX??0),y:D.top+(W?.scrollY??0),w:D.width,h:D.height}}return{...T,anchorState:B?T.anchorState:E.state,anchorPending:B,anchorReasons:E.reasons}})}function H(){const k=r.documentElement;return{w:k.scrollWidth,h:k.scrollHeight}}function Y(k,$,y){return{x:Math.min(Math.max(k,14),Math.max(y.w,28)-14),y:Math.min(Math.max($,14),Math.max(y.h,28)-14)}}function te(k,$){x(),u.textContent="",a.textContent="",d=[],m=[],_=new Map,j=new Map,P.clear(),ne=[],q=null,k.forEach((y,L)=>{const T=y.anchor.rect;if(!T)return;const N=y.anchor.offset??{fx:.5,fy:.5},v=r.createElement("div");v.className="snag-pin",v.setAttribute("data-state",y.anchorPending?"pending":y.anchorState),v.setAttribute("data-key",y.key),v.style.cssText=y.anchorPending?`${Wn("approximate",y)};opacity:.55`:Wn(y.anchorState,y);const E=w.get(y.id),{tier:ae,clips:B}=E?Sr(E,c):{tier:"static",clips:[]};if(ae==="dynamic"&&E){const Z=E.getBoundingClientRect(),He=se();v.style.left=`${Z.left-He.left+Z.width*N.fx}px`,v.style.top=`${Z.top-He.top+Z.height*N.fy}px`,P.set(v,{x:Z.left+Z.width*N.fx+c.scrollX-h.x,y:Z.top+Z.height*N.fy+c.scrollY-h.y});const We={node:v,el:E,fx:N.fx,fy:N.fy,clips:B};d.push(We),v.hidden=!St(E),v.hidden||Re(We,Z,new Map(B.map(ye=>[ye,ye.getBoundingClientRect()])))}else{const Z=Y(T.x+T.w*N.fx-h.x,T.y+T.h*N.fy-h.y,H());v.style.left=`${Z.x}px`,v.style.top=`${Z.y}px`,P.set(v,Z),E&&(m.push({node:v,el:E,fx:N.fx,fy:N.fy,clips:[]}),v.hidden=!St(E))}v.textContent=String(L+1);const D=Vo(y),W=y.anchor.role?X("pin.target",{role:y.anchor.role,name:y.anchor.accessibleName??y.anchor.label}):y.anchor.label,oe=y.comments.length-1,ve=y.anchorState==="approximate"?`~ ${y.key}`:y.key;v.setAttribute("role","button"),v.setAttribute("tabindex","0");const ge=y.anchorState==="anchored"?X(oe===0?"pin.aria.none":oe===1?"pin.aria.one":"pin.aria",{key:ve,target:W,status:Rn(y.status),replies:oe}):X("pin.aria.moved",{key:ve,target:W,status:Rn(y.status),where:D});v.title=ge,v.setAttribute("aria-label",ge),t&&be(v,()=>t(y)),$?.has(y.id)&&(v.hidden=!0,v.setAttribute("data-fo","")),_.set(y.id,v),j.set(v,{snag:y,ordinal:L+1}),(ae==="dynamic"?a:u).appendChild(v)}),ce(),p&&ie(p),Ie(),Ne="",et(r.visibilityState==="visible"&&_.size>0)}const se=()=>a.getBoundingClientRect();let De=!1;function Re(k,$,y){for(const L of k.clips){const T=y.get(L);if(T&&($.right<=T.left||$.left>=T.right||$.bottom<=T.top||$.top>=T.bottom)){k.node.hidden=!0;return}}k.node.hidden=!1}function Qe(k){const $=new Map;for(const y of k)for(const L of y.clips)$.has(L)||$.set(L,L.getBoundingClientRect());return $}const Ct=["open","progress","review","resolved"];function be(k,$){k.addEventListener("click",$),k.addEventListener("keydown",y=>{y.key!=="Enter"&&y.key!==" "||(y.preventDefault(),$())})}function _e(k,$,y,L,T){const N=Ct.find(E=>k.some(ae=>ae.snag.status===E))??"open",v=r.createElement("div");v.className="snag-pin snag-cluster",v.style.cssText=`${it};border-radius:50%;background:${Hn(N)};color:${Tn(N)};border:2px solid ${S.onAccent}`,v.style.left=`${$}px`,v.style.top=`${y}px`,v.textContent=String(k.length),v.setAttribute("data-count",String(k.length)),v.setAttribute("data-state",N),v.setAttribute("role","button"),v.setAttribute("tabindex","0"),T&&v.setAttribute("aria-expanded","true"),v.setAttribute("aria-label",X("cluster.aria",{n:k.length,list:k.map(E=>E.ordinal).join(", ")})),be(v,()=>{if(T)ee=null;else if(k.length<=6)ee=L;else{o?.(k.map(E=>E.snag.id));return}ce()}),u.appendChild(v),ne.push(v)}function Ve(k,$,y,L){_e(k,$,y,L,!0),k.forEach((T,N)=>{const v=$,E=y+(N+1)*(J+12),ae=T.x-v,B=T.y-E,D=Math.hypot(ae,B);if(D>4){const oe=r.createElement("div");oe.className="snag-leader",oe.setAttribute("aria-hidden","true"),oe.style.cssText=`position:absolute;left:${v}px;top:${E}px;width:${D}px;height:0;border-top:1px solid ${S.onAccent};transform-origin:0 0;transform:rotate(${Math.atan2(B,ae)}rad)`,u.appendChild(oe),ne.push(oe)}const W=T.dot.cloneNode(!0);W.style.visibility="",W.style.left=`${v}px`,W.style.top=`${E}px`,be(W,()=>t?.(T.snag)),u.appendChild(W),ne.push(W)})}function ce(){for(const T of ne)T.remove();ne=[];const k=[];for(const[T,N]of j){if(T.hidden){T.style.visibility="";continue}const v=P.get(T);v&&k.push({dot:T,snag:N.snag,ordinal:N.ordinal,x:v.x,y:v.y})}const{members:$,visits:y}=br(k,b);u.setAttribute("data-cv",String(y)),u.setAttribute("data-cp",String(k.length));let L=!1;for(const T of $){if(T.length<2){k[T[0]].dot.style.visibility="";continue}const N=T.map(B=>k[B]),v=N.map(B=>B.snag.id).sort().join("|");for(const B of N)B.dot.style.visibility="hidden";const E=N.reduce((B,D)=>B+D.x,0)/N.length,ae=N.reduce((B,D)=>B+D.y,0)/N.length;ee===v&&N.length<=6?(L=!0,Ve(N,E,ae,v)):_e(N,E,ae,v,!1)}ee&&!L&&(ee=null)}function Tt(k){q?.remove(),q=null;const $=k.anchor.rect;if(!$)return;const y=k.anchor.offset??{fx:.5,fy:.5},L=r.createElement("div");L.className="snag-pin snag-ghost",L.style.cssText=`${it};${At};background:transparent;border:2px dashed ${S.anchorOrphan};color:${S.anchorOrphan};box-shadow:none;pointer-events:none`;const T=Y($.x+$.w*y.fx-h.x,$.y+$.h*y.fy-h.y,H());L.style.left=`${T.x}px`,L.style.top=`${T.y}px`,L.setAttribute("aria-hidden","true"),u.appendChild(L),q=L}function Ie(k=!1){const $=k?[...d,...m]:d;De||$.length===0||(De=!0,c.requestAnimationFrame(()=>{De=!1;const y=performance.now(),L=c.scrollX,T=c.scrollY,N=se(),v=$.map(D=>D.el.isConnected?D.el.getBoundingClientRect():null),E=$.map(D=>D.el.isConnected&&St(D.el)),ae=Qe($),B=H();$.forEach((D,W)=>{const oe=v[W];if(!oe)return;if(D.node.hasAttribute("data-fo")){D.node.hidden=!0;return}if(!E[W]){D.node.hidden=!0;return}D.node.hidden=!1;const ve=oe.left+oe.width*D.fx,ge=oe.top+oe.height*D.fy;if(D.node.parentElement===a)D.node.style.left=`${ve-N.left}px`,D.node.style.top=`${ge-N.top}px`,Re(D,oe,ae),P.set(D.node,{x:ve+L-h.x,y:ge+T-h.y});else{const Z=Y(ve+L-h.x,ge+T-h.y,B);D.node.style.left=`${Z.x}px`,D.node.style.top=`${Z.y}px`,P.set(D.node,Z)}}),ce(),u.setAttribute("data-ms",(performance.now()-y).toFixed(2))}))}const Ge=()=>Ie();r.addEventListener("scroll",Ge,{capture:!0,passive:!0});const Ae=typeof c.ResizeObserver=="function"?new c.ResizeObserver(()=>Ie(!0)):null;Ae?.observe(r.documentElement);let Le=null,Ne="";function pe(){let k="";for(const $ of[...m,...d]){if(!$.el.isConnected)continue;const y=$.el.getBoundingClientRect();k+=`${Math.round(y.left)},${Math.round(y.top)},${Math.round(y.width)};`}!k||k===Ne||(Ne=k,Ie(!0))}function et(k){if(Le&&clearTimeout(Le),Le=null,!k)return;const $=()=>{pe(),Le=setTimeout($,500)};Le=setTimeout($,500)}const me=()=>et(r.visibilityState==="visible"&&_.size>0);r.addEventListener("visibilitychange",me);function Rt(k){const $=_.get(k);$&&($.classList.remove("snag-pp"),c.requestAnimationFrame(()=>$.classList.add("snag-pp")),c.setTimeout(()=>$.classList.remove("snag-pp"),1400))}function ie(k){const $=p?_.get(p):void 0;$&&($.style.transform="",$.style.zIndex=""),p=k;const y=k?_.get(k):void 0;y&&(y.style.transform="scale(1.4)",y.style.zIndex="1")}return{el:u,render:te,showGhost:Tt,pulse:Rt,reanchor:G,settled:()=>R,hasPending:()=>M.size>0,highlight:ie,destroy(){r.removeEventListener("scroll",Ge,{capture:!0}),r.removeEventListener("visibilitychange",me),Ae?.disconnect(),et(!1),u.remove(),a.remove()}}}const kr=` .snag-notice{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(24px + var(${z.tbH},56px));z-index:${Je.notice};max-width:min(420px,calc(100vw - 24px));background:${S.bg};color:${S.fg};border:1px solid ${S.border};border-inline-start:3px solid ${S.anchorOrphan};border-radius:${S.radius};box-shadow:${S.shadow};padding:12px 14px;pointer-events:auto;font:400 13px/1.45 ${S.font};display:flex;flex-direction:column;gap:10px}@media (pointer:coarse){.snag-notice{bottom:calc(12px + var(${z.tbH},64px))}}.snag-notice p{margin:0}.snag-notice-actions{display:flex;gap:6px;justify-content:flex-end}.snag-notice button{appearance:none;font:inherit;cursor:pointer;border-radius:calc(${S.radius} - 2px);padding:6px 12px;min-height:30px;border:0;transition:background ${S.motion}}.snag-notice-retry{background:${S.accent};color:${S.onAccent};font-weight:600}.snag-notice-dismiss{background:transparent;color:${S.muted}}.snag-notice-dismiss:hover{background:${S.hover};color:inherit}.snag-notice button:focus-visible{outline:2px solid ${S.focus};outline-offset:2px}`;function $r(e,t){const n=e.ownerDocument??document,o=n.defaultView??window;at(e,"notice",kr);const r=n.createElement("div");r.className="snag-notice",r.setAttribute("role","alert"),r.hidden=!0;const c=n.createElement("p"),u=n.createElement("div");u.className="snag-notice-actions";const a=n.createElement("button");a.type="button",a.className="snag-notice-dismiss",a.textContent=X("action.dismiss"),a.addEventListener("click",()=>_());const d=n.createElement("button");d.type="button",d.className="snag-notice-retry",u.append(a,d),r.append(c,u);let m;d.addEventListener("click",()=>{_(),m?.run()});let w=0;function _(){w&&o.cancelAnimationFrame(w),w=0,r.hidden=!0,r.remove()}return{show(p,P,j){m=P,d.hidden=!P,P&&(d.textContent=X(P.label)),r.hidden=!1,c.textContent="",(t??e).appendChild(r);const V=X(p,j);w&&o.cancelAnimationFrame(w),w=o.requestAnimationFrame(()=>{w=0,c.textContent=V})},hide:_,visible:()=>r.isConnected&&!r.hidden,destroy(){r.remove()}}}const Er=` .snag-paused{border:0;padding:0;background:transparent;pointer-events:auto;max-width:min(420px,calc(100vw - 32px))}.snag-paused::backdrop{background:rgb(0 0 0 / .28)}.snag-paused-box{background:${S.bg};color:${S.fg};border:1px solid ${S.border};border-inline-start:3px solid ${S.accent};border-radius:${S.radius};box-shadow:${S.shadow};padding:14px 16px;font:400 13px/1.45 ${S.font};display:flex;flex-direction:column;gap:12px}.snag-paused p{margin:0}.snag-paused-actions{display:flex;justify-content:flex-end}.snag-paused button{appearance:none;font:inherit;cursor:pointer;border:0;font-weight:600;border-radius:calc(${S.radius} - 2px);padding:6px 14px;min-height:30px;background:${S.accent};color:${S.onAccent}}.snag-paused button:focus-visible{outline:2px solid ${S.focus};outline-offset:2px}`;function Cr(e,t){const n=e.ownerDocument??document;at(e,"paused",Er);const o=n.createElement("dialog");o.className="snag-paused",o.setAttribute("aria-label",X("paused.dialog"));const r=n.createElement("div");r.className="snag-paused-box",r.setAttribute("role","status");const c=n.createElement("p");c.textContent=X("paused.dialog");const u=n.createElement("div");u.className="snag-paused-actions";const a=n.createElement("button");a.type="button",a.textContent=X("paused.close"),a.addEventListener("click",()=>w()),u.append(a),r.append(c,u),o.append(r);let d=!1;function m(){if(!d){(t??e).appendChild(o);try{o.showModal(),d=!0}catch{o.setAttribute("open",""),d=!0}}}function w(){if(d){d=!1;try{o.close()}catch{o.removeAttribute("open")}o.remove()}}return o.addEventListener("close",()=>{d=!1,o.remove()}),{show:m,hide:w,destroy(){w(),o.remove()}}}const Tr=Symbol.for(vn.original),jn=Symbol.for(vn.wrapped),ct=()=>{};function Rr(e,t,n){let o;try{o=e[t]}catch{return ct}if(typeof o!="function"||o[jn])return ct;const r=o,c=n(r);let u=!1;const a=function(...d){return u?r.apply(this,d):c.apply(this,d)};try{const d=a;d[jn]=!0,d[Tr]=r,Object.defineProperty(a,"name",{value:r.name,configurable:!0}),Object.defineProperty(a,"length",{value:r.length,configurable:!0})}catch{}try{e[t]=a}catch{return ct}return e[t]!==a?ct:()=>{let d;try{d=e[t]}catch{d=void 0}if(d===a)try{e[t]=r;return}catch{}u=!0}}function _r(e,t){const n=[];let o=0;const r=()=>{o||(o=e.requestAnimationFrame(()=>{o=0,t.onResize()}))};e.addEventListener("resize",r),n.push(()=>{o&&e.cancelAnimationFrame(o),e.removeEventListener("resize",r)}),e.visualViewport?.addEventListener("resize",r),n.push(()=>e.visualViewport?.removeEventListener("resize",r));const c=()=>void e.setTimeout(t.onResize,250);e.addEventListener("orientationchange",c),n.push(()=>e.removeEventListener("orientationchange",c));let u=e.location.pathname;const a=()=>{const b=e.location.pathname;b!==u&&(u=b,t.onRoute())},d=e.navigation;if(d){const b=()=>void e.setTimeout(a,0);d.addEventListener("navigatesuccess",b),n.push(()=>d.removeEventListener("navigatesuccess",b))}else for(const b of["pushState","replaceState"])n.push(Rr(e.history,b,J=>function(...ne){const ee=J.apply(this,ne);return e.setTimeout(a,0),ee}));const m=e.document;let w=!0;try{m.documentElement.matches(":modal")}catch{w=!1}const _=()=>{const b=m.querySelectorAll("dialog[open]");if(!w)return b.length>0;for(const J of b)if(J.matches(":modal"))return!0;return!1};let p=!1;const P=()=>{const b=_();b!==p&&(p=b,t.onModal(b))};m.addEventListener("toggle",P,!0),n.push(()=>m.removeEventListener("toggle",P,!0));const j=new MutationObserver(P);j.observe(m.documentElement,{subtree:!0,attributes:!0,attributeFilter:["open"]}),n.push(()=>j.disconnect());const V=()=>void e.setTimeout(a,0);return e.addEventListener("popstate",V),n.push(()=>e.removeEventListener("popstate",V)),{destroy(){for(const b of n)b();n.length=0}}}function Ir(e,t){try{e.sessionStorage.setItem(le.handoff,JSON.stringify({openThreadId:t}))}catch{}}function Pr(e){try{const t=e.sessionStorage.getItem(le.handoff);if(t===null)return null;e.sessionStorage.removeItem(le.handoff);const n=JSON.parse(t);return typeof n.openThreadId=="string"?n.openThreadId:null}catch{return null}}function Mr(){return{statuses:[],read:"all",pageOnly:!1,newOnly:!1,sort:"page"}}const zr=["open","progress","review","resolved"];function Or(e,t,n){if(t.statuses.length>0&&zr.includes(e.status)&&!t.statuses.includes(e.status)||t.by&&e.createdBy.id!==t.by||t.page&&e.route!==t.page)return!1;if(t.read!=="all"&&n){const o=Un(e,n);if(t.read==="unread"&&!o||t.read==="read"&&o)return!1}return!0}function Un(e,t){const n=t.get(e.id)??0;return Date.parse(e.updatedAt)>n}function Dr(e,t,n){const o=e.visualViewport;let r=0;const c=()=>{if(r=0,!o)return;const a=o.offsetLeft,d=o.offsetTop;t.style.translate=a||d?`${a}px ${d}px`:"",t.style.width=`${o.width}px`,t.style.height=`${o.height}px`,n?.(o.scale)},u=()=>{r||(r=e.requestAnimationFrame(c))};return o?.addEventListener("resize",u,{passive:!0}),o?.addEventListener("scroll",u,{passive:!0}),u(),()=>{r&&e.cancelAnimationFrame(r),o?.removeEventListener("resize",u),o?.removeEventListener("scroll",u)}}const Lr=/^eyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}/,Nr=/^[a-f0-9]{32,}$/i,Hr=/^(?=[A-Za-z0-9_-]{24,}$)(?=.*[A-Za-z])(?=.*\d)[A-Za-z0-9_-]+$/,Wr="[redacted]";function Fn(e){return e.includes("/")?e.split("/").map(t=>Lr.test(t)||Nr.test(t)||Hr.test(t)?Wr:t).join("/"):e}const jr=/\/index\.(html?|php)$/i;function Ur(e){if(!e.startsWith("/"))return e;let t=e.replace(jr,"/");return t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t.toLowerCase()}function Fr(e){try{const t=e.querySelector(`meta[name="${Wo.route}"]`)?.getAttribute("content")?.trim();return!t||t.length>512||!t.startsWith("/")?null:t}catch{return null}}function Br(e,t){const n=t??Fr(e);return Ur(n??Fn(e.location.pathname))}const Zr=[/^utm_/,/^(gclid|gbraid|wbraid|fbclid|msclkid|ttclid|twclid|igshid|yclid|li_fat_id)$/,/^(mc_cid|mc_eid|_hsenc|_hsmi|vero_id|oly_enc_id|oly_anon_id)$/,/^_vercel_/,/^__vercel_/,/^_rsc$/],Vr=[...wt.query,...wt.fragment];function Yr(e,t=[]){return Vr.includes(e)||t.includes(e)?!0:Zr.some(n=>n.test(e))}function Xr(e,t={}){const n=t.significantQueryParams??[];if(n!=="*"&&n.length===0)return;let o;try{o=new URLSearchParams(e)}catch{return}const r={};for(const[c,u]of o)Yr(c,t.ignoredQueryParams??[])||n!=="*"&&!n.includes(c)||(r[c]=u);return Object.keys(r).length>0?r:void 0}function Kr(e,t,n={}){const o=n.significantQueryParams??[];if(o==="*"){const r=e??{},c=t??{},u=new Set([...Object.keys(r),...Object.keys(c)]);for(const a of u)if(r[a]!==c[a])return!1;return!0}for(const r of o)if((e?.[r]??void 0)!==(t?.[r]??void 0))return!1;return!0}const Jr=120,qr=1e3,Qr=200,Gr=1e4;function es(e,t,n){const o=t.MutationObserver;if(typeof o!="function")return{destroy:()=>{}};let r=!1,c=null,u=!1,a=!1,d=0,m=_(),w=0;function _(){return t.performance?.now?.()??0}const p=new o(()=>{r=!0,d++,j()});function P(){const b=_();return b-m>=1e3&&(d>Qr&&(w=b+Gr),d=0,m=b),b<w?qr:Jr}function j(){c||(c=setTimeout(V,P()))}function V(){if(c=null,!!r){if(u){a=!0;return}r=!1,u=!0;try{n()}finally{u=!1,a&&(a=!1,r=!0,j())}}}return p.observe(e.documentElement,{childList:!0,subtree:!0}),{destroy(){p.disconnect(),c&&clearTimeout(c),c=null}}}const ts="0.0.0",ns={capture:Me.capture,"anchor-ext":Me.anchorExt,"anchor-fuzzy":Me.anchorFuzzy,crumbs:Me.crumbs,screenshot:Me.screenshot,dock:Me.dock,text:Me.text},Bn=new Map,Zt=new Map,Zn=new Map;function os(e,t,n){const o=new URL(t,n.location.href).href,r=new URL(ns[e],o);r.searchParams.set("cv",ts);const c=Zn.get(e)??0;return c>0&&r.searchParams.set("r",String(c)),Zn.set(e,c+1),r.href}async function ze(e,t,n=document){const o=Bn.get(e);if(o)return{ok:!0,mod:o};const r=Zt.get(e);if(r)return r;const c=(async()=>{for(let u=0;u<2;u++)try{const a=await import(os(e,t,n));return Bn.set(e,a),{ok:!0,mod:a}}catch{}return{ok:!1,reason:"unavailable"}})();Zt.set(e,c);try{return await c}finally{Zt.delete(e)}}const rs="composer",Vt=e=>le.draft(e,rs),ss=le.draft("\0","").split("\0")[0];function as(e){try{return e.body.trim()?(localStorage.setItem(Vt(e.route),JSON.stringify(e)),!0):(Vn(e.route),!0)}catch{return!1}}function is(e){try{const t=localStorage.getItem(Vt(e));if(!t)return null;const n=JSON.parse(t);return!n||typeof n.body!="string"||!n.anchor||n.route!==e?null:n}catch{return null}}function Vn(e){try{localStorage.removeItem(Vt(e))}catch{}}function Yt(){try{for(let e=0;e<localStorage.length;e++){const t=localStorage.key(e);if(t&&t.startsWith(ss))return!0}return!1}catch{return!1}}const cs="http://www.w3.org/2000/svg";function Oe(e,t,n,o=[]){const r=e.createElementNS(cs,t);for(const c in n)r.setAttribute(c,n[c]);for(const c of o)r.appendChild(c);return r}const Xt=(e,t="16",n="16",o="0 0 16 16")=>({width:t,height:n,viewBox:o,fill:"none","aria-hidden":"true"}),ls=e=>Oe(e,"svg",Xt(),[Oe(e,"path",{d:"M8 3v10M3 8h10",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round"})]),ds=e=>Oe(e,"svg",Xt(),[Oe(e,"rect",{x:"2.25",y:"3.25",width:"11.5",height:"9.5",rx:"1.75",stroke:"currentColor","stroke-width":"1.5"}),Oe(e,"path",{d:"M9.5 3.5v9",stroke:"currentColor","stroke-width":"1.5"})]),us=e=>Oe(e,"svg",{...Xt(e,"10","16","0 0 10 16"),fill:"currentColor"},[Oe(e,"g",{fill:"currentColor"},[4,8,12].flatMap(t=>[3,7].map(n=>Oe(e,"circle",{cx:String(n),cy:String(t),r:"1"}))))]),fs=` .snag-tb{position:fixed;z-index:${Je.toolbar};display:flex;align-items:center;gap:2px;padding:4px;border-radius:calc(${S.radius} + 4px);background:${S.bg};color:${S.fg};box-shadow:${S.shadow};font:500 13px/1 ${S.font};pointer-events:auto;user-select:none;border:1px solid ${S.border}}.snag-tb{transition:inset-inline-end ${S.motion}}.snag-tb--fine{inset-inline-end:calc(20px + env(safe-area-inset-right) + var(${z.dockW},0px));inset-block-end:calc(20px + env(safe-area-inset-bottom));transition:inset-inline-end ${S.motion}}.snag-tb--coarse{inset-inline:0;inset-block-end:0;border-radius:14px 14px 0 0;padding:6px 10px calc(6px + env(safe-area-inset-bottom));justify-content:center;gap:4px;flex-direction:column}.snag-grabber{width:36px;height:4px;border-radius:2px;background:${S.muted};margin:2px auto 6px}.snag-row{display:flex;align-items:center;gap:2px}.snag-grip{display:flex;align-items:center;padding:0 4px;color:${S.muted};cursor:grab;touch-action:none}.snag-grip:active{cursor:grabbing}.snag-seg{display:flex;background:${S.surface};border-radius:${S.radius};padding:2px;position:relative}.snag-seg::before{content:"";position:absolute;inset-block:2px;inset-inline-start:var(${z.thumbX},0);width:var(${z.thumbW},0);background:${S.accent};border-radius:calc(${S.radius} - 2px);pointer-events:none;transition:inset-inline-start ${S.motion},width ${S.motion}}.snag-seg>.snag-b[aria-pressed="true"]{background:transparent;color:${S.onAccent}}.snag-seg>.snag-b{z-index:1}.snag-b{appearance:none;border:0;background:transparent;color:inherit;font:inherit;padding:6px 11px;border-radius:calc(${S.radius} - 2px);cursor:pointer;display:flex;align-items:center;gap:6px;position:relative;min-height:32px;transition:background ${S.motion}}.snag-b:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent)}.snag-b:disabled{opacity:.4;cursor:not-allowed}.snag-b[aria-pressed="true"]{background:${S.accent};color:${S.onAccent}}.snag-b:focus-visible{outline:2px solid ${S.focus};outline-offset:2px}.snag-icon{padding:6px 9px}@media (pointer:coarse){.snag-b{min-height:44px;min-width:44px;padding:6px 14px}.snag-icon{padding:6px 14px}}.snag-puck .snag-row>:not([aria-expanded]){display:none}.snag-puck{padding:4px;border-radius:50%}.snag-puck [aria-expanded]{min-width:44px;min-height:44px;border-radius:50%}`;function hs(e,t){const n=e.ownerDocument??document,o=t.coarsePointer??n.defaultView?.matchMedia?.("(pointer: coarse)").matches??!1;at(e,"toolbar",fs);const r=n.createElement("div");r.className=`snag-tb ${o?"snag-tb--coarse":"snag-tb--fine"}`,r.setAttribute("role","toolbar"),r.setAttribute("aria-label",X("toolbar.aria"));const c=n.createElement("div");c.className="snag-grabber",c.setAttribute("aria-hidden","true");const u=n.createElement("div");u.className="snag-row";const a=n.createElement("span");a.className="snag-grip",a.setAttribute("aria-hidden","true"),a.appendChild(us(n));const d=n.createElement("div");d.className="snag-seg",d.setAttribute("role","group"),d.setAttribute("aria-label",X("toolbar.group"));const m=(l,g,C)=>{const A=n.createElement("button");return A.type="button",A.className=`snag-b ${l}`,A.setAttribute("aria-label",g),typeof C=="string"?A.textContent=C:A.appendChild(C),A},w=m("",X("toolbar.browse"),X("toolbar.browse")),_=m("",X("toolbar.comments"),X("toolbar.comments")),p=m("snag-icon",X("toolbar.add"),ls(n)),P=m("snag-icon",X("toolbar.panel"),ds(n));P.setAttribute("aria-expanded","false"),d.append(w,_),o||u.appendChild(a),u.append(d,p,P),o&&r.appendChild(c),r.appendChild(u),(t.parent??e).appendChild(r);const j=()=>{e.host.style.setProperty(z.tbH,`${r.offsetHeight}px`)};j();let V=null;function b(l,g){const C=n.defaultView,A=r.offsetWidth,G=r.offsetHeight,H=Yn(l,8,Math.max(8,C.innerWidth-A-8)),Y=Yn(g,8,Math.max(8,C.innerHeight-G-8));V={left:H,top:Y},r.style.left=`${H}px`,r.style.top=`${Y}px`,r.style.right="auto",r.style.bottom="auto"}const J=()=>{j(),V&&b(V.left,V.top)},ne=n.defaultView;if(ne?.addEventListener("resize",J),w.addEventListener("click",()=>t.onState("browse")),_.addEventListener("click",()=>t.onState("comments")),p.addEventListener("click",()=>t.onState(ee==="add"?"comments":"add")),P.addEventListener("click",()=>t.onPanel()),!o){let l=null;a.addEventListener("pointerdown",C=>{l={x:C.clientX,y:C.clientY,r:r.getBoundingClientRect()},a.setPointerCapture(C.pointerId),C.preventDefault()}),a.addEventListener("pointermove",C=>{l&&b(l.r.left+(C.clientX-l.x),l.r.top+(C.clientY-l.y))});const g=C=>{l=null,a.hasPointerCapture(C.pointerId)&&a.releasePointerCapture(C.pointerId)};a.addEventListener("pointerup",g),a.addEventListener("pointercancel",g)}let ee="browse";function q(l){ee=l,w.setAttribute("aria-pressed",String(l==="browse")),_.setAttribute("aria-pressed",String(l!=="browse")),p.setAttribute("aria-pressed",String(l==="add")),h()}function h(){const l=d.querySelector('.snag-b[aria-pressed="true"]'),g=d.getBoundingClientRect(),C=l?.getBoundingClientRect();if(!l||!C?.width){d.style.setProperty(z.thumbW,"0px");return}const A=n.defaultView?.getComputedStyle(d),G=A?.direction==="rtl",H=parseFloat((G?A?.paddingRight:A?.paddingLeft)??"0")||0,Y=(G?g.right-C.right:C.left-g.left)-H;d.style.setProperty(z.thumbW,`${Math.round(C.width)}px`),d.style.setProperty(z.thumbX,`${Math.max(0,Math.round(Y))}px`)}function x(l){p.disabled=l,l?p.title=X("error.panels.add"):p.removeAttribute("title")}function R(l){p.setAttribute("aria-label",X(l?"toolbar.add.draft":"toolbar.add"))}function M(l){_.setAttribute("aria-label",l!==null&&l>0?X("toolbar.comments.unresolved",{n:Zo(l)}):X("toolbar.comments"))}q("browse"),M(0);function U(l){r.classList.toggle("snag-puck",l),l||h()}function O(l){r.hidden=l,l||h(),j()}return{el:r,setState:q,setCount:M,setDegraded:x,setDraft:R,setPuck:U,setConcealed:O,destroy(){ne?.removeEventListener("resize",J),e.host.style.removeProperty(z.tbH),r.remove()}}}const Yn=(e,t,n)=>e<t?t:e>n?n:e,Xn=24;function ps(e,t){const n=e.innerHeight,o=t.querySelector(".snag-dk");if(!o)return{top:0,bottom:n};const r=o.getBoundingClientRect();return r.height>=n-1?{top:0,bottom:n}:{top:0,bottom:Math.max(0,r.top)}}function ms(e,t,n){const o=n.anchor.rect;if(!o)return;const r=n.anchor.offset??{fy:.5},c=o.y+o.h*r.fy,u=ps(e,t),a=c-e.scrollY;if(a>=u.top+Xn&&a<=u.bottom-Xn)return;const d=e.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1;e.scrollTo({top:Math.max(0,c-(u.top+u.bottom)/2),behavior:d?"auto":"smooth"})}function Kt(){const e=new Uint8Array(16);crypto.getRandomValues(e);const t=Date.now();e[0]=Math.floor(t/2**40)&255,e[1]=Math.floor(t/2**32)&255,e[2]=Math.floor(t/2**24)&255,e[3]=Math.floor(t/2**16)&255,e[4]=Math.floor(t/2**8)&255,e[5]=t&255,e[6]=e[6]&15|112,e[8]=e[8]&63|128;const n=Array.from(e,o=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}const gs=()=>xt.thread+Kt(),Kn=()=>xt.comment+Kt(),ys=()=>xt.attachment+Kt(),bs={attachments:"direct",realtime:"none",anchorReports:!1,identity:["guest"],export:["json","md"],serverSideSearch:!1,privateThreads:!1,assignees:!1};function vs(){const e=le.threads("probe","probe");try{return localStorage.setItem(e,"1"),localStorage.removeItem(e),!0}catch(t){return Jn(t)}}function ws(e,t,n){const o=le.threads(e,t);function r(){let a=null;try{a=localStorage.getItem(o)}catch{return[]}if(!a)return[];try{const d=JSON.parse(a);return Array.isArray(d)?d.filter(Ss):[]}catch{return[]}}function c(a){try{localStorage.setItem(o,JSON.stringify(a))}catch(d){if(!Jn(d))return;throw new Wt("local_quota_exceeded")}}const u=a=>({...a,updatedAt:new Date().toISOString()});return{kind:"local",capabilities:bs,async init(a){return{uid:a.uid,env:a.env,features:{screenshots:!0,uploads:!1}}},async listThreads(a={}){let d=r();return a.route!==void 0&&(d=d.filter(m=>m.route===a.route)),a.status?.length&&(d=d.filter(m=>a.status.includes(m.status))),{data:d,serverTime:new Date().toISOString()}},async getThread(a){return r().find(d=>d.id===a)??null},async createThread(a){const d=_n(a);return c([...r(),d]),d},async patchThread(a,d){const m=r(),w=m.findIndex(j=>j.id===a);if(w<0)return null;const{assignee:_,...p}=d,P=u({...m[w],...xs(p)});return m[w]=P,c(m),P},async deleteThread(a){const d=r(),m=d.find(_=>_.id===a),w=d.filter(_=>_.id!==a);w.length!==d.length&&c(w);for(const _ of m?.attachments??[])n?.del(_.id).catch(()=>{})},async uploadAttachment(a,d){if(!n)throw new Wt("attachments_unsupported");const m=ys();return await n.put(m,{blob:a,uid:e,env:t,kind:d.kind,...d.width!==void 0?{width:d.width}:{},...d.height!==void 0?{height:d.height}:{},createdAt:Date.now()}),{id:m,kind:d.kind,url:"",...d.width!==void 0?{width:d.width}:{},...d.height!==void 0?{height:d.height}:{},bytes:a.size,contentType:a.type}},async createComment(a,d){const m=r(),w=m.findIndex(p=>p.id===a);if(w<0)return null;const _={id:d.id,snagId:a,body:d.body,author:d.author,createdAt:new Date().toISOString()};return m[w]=u({...m[w],comments:[...m[w].comments,_]}),c(m),_},async patchComment(a,d){const m=r();for(let w=0;w<m.length;w++){const _=m[w].comments.find(P=>P.id===a);if(!_)continue;const p={..._,body:d};return m[w]=u({...m[w],comments:m[w].comments.map(P=>P.id===a?p:P)}),c(m),p}return null},async deleteComment(a){const d=r(),m=d.findIndex(w=>w.comments.some(_=>_.id===a));m<0||(d[m]=u({...d[m],comments:d[m].comments.filter(w=>w.id!==a)}),c(d))}}}function xs(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}function Jn(e){return e instanceof Error?e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED"||e.code===22||e.code===1014:!1}function Ss(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.id=="string"&&typeof t.key=="string"&&typeof t.route=="string"&&typeof t.anchor=="object"&&t.anchor!==null&&typeof t.anchor.label=="string"&&Array.isArray(t.comments)}function As(e,t,n=()=>Date.now()){const o=le.seen(e,t);let r=null;function c(){if(r)return r;try{const a=localStorage.getItem(o),d=a?JSON.parse(a):{};return r=typeof d=="object"&&d!==null&&!Array.isArray(d)?d:{}}catch{return r={}}}function u(a){r=a;try{localStorage.setItem(o,JSON.stringify(a))}catch{}}return{map:()=>new Map(Object.entries(c())),mark(a){u({...c(),[a]:n()})},markAll(a){const d=n(),m={...c()};for(const w of a)m[w.id]=d;u(m)}}}function lt(){let e=null;try{e=localStorage.getItem(Lt)}catch{return{}}if(!e)return{};if(e[0]!=="{")return{name:e};try{const t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function qn(e){try{localStorage.setItem(Lt,JSON.stringify(e))}catch{}}function Jt(){const e=lt();return{name:typeof e.name=="string"?e.name:"",...e.email?{email:e.email}:{}}}function Qn(e){return lt().projects?.[e]?.holderId}function ks(e){const t=lt().projects?.[e]?.holderSecret;return t&&/^[\w-]{43}$/.test(t)?t:void 0}function $s(e,t,n){const o=lt();qn({...o,projects:{...o.projects,[e]:{holderId:t,holderSecret:n}}})}function Es(e,t){const n=lt(),o=n.projects?.[e];o&&qn({...n,projects:{...n.projects,[e]:{...o,holderId:t}}})}const Ze=e=>le.session(e);function Gn(e){if(!e)return null;const t=JSON.parse(e);return typeof t?.token=="string"&&typeof t?.refreshableUntil=="number"?t:null}function qe(e){try{const t=Gn(sessionStorage.getItem(Ze(e)));if(t)return t;const n=Gn(localStorage.getItem(Ze(e)));return n?.member?n:null}catch{return null}}function qt(e,t){try{t.member?(localStorage.setItem(Ze(e),JSON.stringify(t)),sessionStorage.removeItem(Ze(e))):sessionStorage.setItem(Ze(e),JSON.stringify(t))}catch{}}function dt(e){try{sessionStorage.removeItem(Ze(e)),localStorage.removeItem(Ze(e))}catch{}}const Cs=(e,t=Date.now())=>t>e.expiresAt-3e4,Qt=(e,t=Date.now())=>t>=e.refreshableUntil;class Ce extends Error{code;status;constructor(t,n,o){super(o),this.name="HttpAdapterError",this.status=t,this.code=n}}function Ts(e){const{offset:t,testId:n,domId:o,page:r,schemaVersion:c,...u}=e;return{...u,...n?{testid:n}:{},...o?{domid:o}:{},...t?{offset:{fx:t.x,fy:t.y}}:{}}}function Rs(e,t){const n=e.url??"",o=/^https?:/i.test(n)?n:n?`${t}${n.startsWith("/")?"":"/"}${n}`:`${t}/api/v1/attachments/${encodeURIComponent(e.id)}/blob`;return{...e,url:o}}function kt(e,t,n){return{id:e.id,route:e.anchor?.page?.route??"",key:e.key,status:e.status,anchor:Ts(e.anchor),anchorState:e.anchorState,context:e.context,comments:e.comments??[],createdBy:e.createdBy,assignee:e.assignee??null,createdAt:e.createdAt,updatedAt:e.updatedAt,...e.resolvedAt?{resolvedAt:e.resolvedAt}:{},...e.attachments?.length?{attachments:e.attachments.map(o=>Rs(o,n))}:{},...t?{scope:{environment:t}}:{}}}function _s(e,t){const{offset:n,testid:o,domid:r,...c}=e;return{...c,schemaVersion:yn,...o?{testId:o}:{},...r?{domId:r}:{},offset:n?{x:n.fx,y:n.fy}:{x:.5,y:.5},page:{route:t,pathname:location.pathname,origin:location.origin}}}function Is(e,t){const n=o=>/^[\d.]+$|:/.test(o)?o:o.split(".").slice(-2).join(".");return n(e)===n(t)}const eo=10*6e4;function Ps(e,t,n,o={}){const r=e.replace(/\/+$/,""),c=`${r}/api/v1/projects/${encodeURIComponent(t)}`;let u=o.reviewToken,a=qe(t),d=[];const m=le.silent(t);let w=0,_=Promise.resolve(!1);function p(){if(u||Date.now()-w<eo)return _;try{if(!Is(location.hostname,new URL(r).hostname)||localStorage.getItem(m)||Date.now()-Number(sessionStorage.getItem(m))<eo)return _}catch{}return w=Date.now(),_=(async()=>{try{const h=await fetch(`${c}/sessions/member/silent`,{method:"POST",credentials:"include",...n?{body:JSON.stringify({environment:n})}:{}});if(h.status===201)return j(await h.json()),w=0,!0}catch{}try{sessionStorage.setItem(m,String(Date.now()))}catch{}return!1})()}let P=null;function j(h){a={token:h.sessionToken,expiresAt:Date.parse(h.expiresAt),refreshableUntil:Date.parse(h.refreshableUntil),reviewerId:h.reviewer.id,permissions:h.permissions,member:h.reviewer.name,...h.moderator?{moderator:!0}:{}},qt(t,a),o.onSessionStarted?.()}const V=()=>a;async function b(h=!1){const x=a&&!Qt(a)?a.token:null,R=!!x&&!u&&!h,M=R?void 0:u?{kind:"link",token:u,name:Jt().name||void 0}:{kind:"guest",name:Jt().name||"Anonymous",holderId:Qn(t),holderSecret:ks(t)};let U;try{U=await fetch(`${c}/sessions`,{method:"POST",credentials:"omit",headers:{"content-type":"application/json",...x?{Authorization:`Bearer ${x}`}:{}},body:JSON.stringify({...n?{environment:n}:{},...M?{identity:M}:{},client:{widget:_o,schema:yn}})})}catch(C){throw new Ce(0,"network_error",C.message)}finally{u=void 0}if(!U.ok){const A=(await U.json().catch(()=>null))?.error?.code??"unauthorized",G=R&&!!a?.member;if(dt(t),a=null,G&&U.status===401&&await p())return V();throw A==="session_revoked"||A==="token_revoked"?o.onSessionEnded?.("revoked"):U.status===401&&o.onSessionEnded?.("expired"),new Ce(U.status,A,"This review session is not valid.")}const O=await U.json();O.holderSecret&&O.reviewer?$s(t,O.reviewer.id,O.holderSecret):O.reviewer&&Es(t,O.reviewer.id);const l=O.round?.number??(R||h?a?.round:void 0),g=M?M.name:a?.name;return a={token:O.sessionToken,expiresAt:Date.parse(O.expiresAt),refreshableUntil:Date.parse(O.refreshableUntil),reviewerId:O.reviewer?.id??a?.reviewerId??"",permissions:O.permissions??a?.permissions??[],...l!==void 0?{round:l}:{},...R&&a?.member?{member:a.member}:{},...R&&a?.member&&a.moderator?{moderator:!0}:{},...g?{name:g}:{}},qt(t,a),o.onSessionStarted?.(),a}async function J(){if(a){if(Qt(a)){dt(t),a=null,await p()||o.onSessionEnded?.("expired");return}await b().catch(()=>{})}}let ne=null;async function ee(){if(await(P??=a?.member?Promise.resolve():p()),a&&Qt(a)&&(dt(t),a=null,!await p()))return o.onSessionEnded?.("expired"),null;const h=Jt().name||null,x=a!==null&&!a.member&&h!==null&&h!==(a.name??null);if(!a||Cs(a)||u||x)try{await(ne??=b(x).finally(()=>ne=null))}catch(R){if(!(R instanceof Ce)||R.status===0)throw R;return null}return a?.token??null}async function q(h,x,R=!1){const M=await ee();let U;try{U=await fetch(c+h,{...x,headers:{"content-type":"application/json",...M?{Authorization:`Bearer ${M}`}:{},...x?.headers??{}},credentials:"omit"})}catch(O){throw new Ce(0,"network_error",O.message)}if(!U.ok){const O=await U.json().catch(()=>null),l=O?.error?.code??"http_error";if(U.status===401&&!R&&l!=="session_revoked"){const g=!!a?.member;return dt(t),a=null,g&&await p(),q(h,x,!0)}throw new Ce(U.status,l,O?.error?.message??`The server answered ${U.status}.`)}return await U.json()}return{kind:"http",capabilities:{attachments:"none",realtime:"none",anchorReports:!0,identity:["guest"],export:[],serverSideSearch:!1,privateThreads:!1,assignees:!0},async init(h){ee().catch(()=>{});const x=await fetch(`${c}/config`).catch(M=>{throw new Ce(0,"network_error",M.message)});if(!x.ok)throw new Ce(x.status,"http_error",`The server answered ${x.status}.`);const R=await x.json();return this.capabilities.attachments=R.features.screenshots?"direct":"none",d=R.rounds??[],{uid:h.uid,env:h.env,features:R.features,...R.rounds?{rounds:R.rounds}:{},...R.writable===void 0?{}:{writable:R.writable},...R.reason===void 0?{}:{reason:R.reason}}},async reportAnchors(h){if(h.length!==0)for(let x=0;x<h.length;x+=50)try{await q("/anchor-reports",{method:"POST",body:JSON.stringify({reports:h.slice(x,x+50)})})}catch{return}},revalidate:J,member:()=>a?.member??null,adoptSession(h){try{localStorage.removeItem(m)}catch{}j(h)},signOut(){dt(t),a=null;try{localStorage.setItem(m,"out")}catch{}},getRound(){return a?.round??qe(t)?.round??null},setRound(h){a&&(a={...a,round:h});const x=qe(t);x&&qt(t,{...x,round:h})},async fetchForeignImage(h){try{const x=await ee(),R=await fetch(`${c}/image?src=${encodeURIComponent(h)}`,{credentials:"omit",...x?{headers:{Authorization:`Bearer ${x}`}}:{}});if(!R.ok)return null;const M=await R.blob();return M.type.startsWith("image/")?M:null}catch{return null}},async uploadAttachment(h,x){const R=await ee(),M=await fetch(`${c}/attachments`,{method:"POST",credentials:"omit",headers:{"content-type":h.type||"image/webp",[Nt.attachmentKind]:x.kind,...x.width?{[Nt.attachmentWidth]:String(x.width)}:{},...x.height?{[Nt.attachmentHeight]:String(x.height)}:{},...R?{Authorization:`Bearer ${R}`}:{}},body:h});if(!M.ok){const O=await M.json().catch(()=>null);throw new Ce(M.status,O?.error?.code??"upload_failed",O?.error?.message??"Upload failed.")}const U=await M.json();return{id:U.id,kind:x.kind,contentType:U.contentType,byteSize:U.byteSize,...x.width?{width:x.width}:{},...x.height?{height:x.height}:{},url:`${r}/api/v1/attachments/${U.id}/blob`}},async listThreads(h){const x=!a&&!u;x?ee().catch(()=>{}):await ee();const R=new URLSearchParams;n&&R.set("env",n),h?.route&&R.set("route",h.route),a?.round&&R.set("round",String(a.round));const M=`/threads?${R}`,U=()=>q(M),O=x?await fetch(c+M,{credentials:"omit"}).then(l=>l.ok?l.json():U(),U):await U();return{data:O.data.map(l=>kt(l,n,r)),...O.nextCursor?{nextCursor:O.nextCursor}:{},deleted:[],serverTime:O.serverTime}},async getThread(h){return(await this.listThreads()).data.find(R=>R.id===h)??null},async getThreadByKey(h){const x=new URLSearchParams({key:h});n&&x.set("env",n);const M=(await q(`/threads?${x}`)).data[0];return M?kt(M,n,r):null},async createThread(h){const x=a?.round,R=d.some(O=>O.number===x&&!O.closed)?x:void 0,M=O=>q("/threads",{method:"POST",body:JSON.stringify({id:h.id,anchor:_s(h.anchor,h.route),anchorState:h.anchorState,context:h.context,...n||O?{scope:{...n?{environment:n}:{},...O?{round:O}:{}}}:{},createdBy:{name:h.createdBy.name},...h.comment?{comment:{id:h.comment.id,body:h.comment.body}}:{},...h.attachments?.length?{attachments:h.attachments.map(l=>l.id)}:{}})}),U=await M(R).catch(O=>{if(R&&O instanceof Ce&&O.code.startsWith("round_"))return M();throw O});return kt(U,n,r)},async patchThread(h,x){const R="assignee"in x;if(!x.status&&!R)return null;const M=await q(`/threads/${encodeURIComponent(h)}`,{method:"PATCH",body:JSON.stringify({...x.status?{status:x.status}:{},...R?{assignee:x.assignee??null}:{}})});return kt(M,n,r)},async listAssignees(h){return(await q(`/assignees${h?`?q=${encodeURIComponent(h)}`:""}`)).data??[]},async deleteThread(h){await q(`/threads/${encodeURIComponent(h)}`,{method:"DELETE"})},isMine(h){return h.id?h.id===(a??qe(t))?.reviewerId||h.id===Qn(t):!1},canModerate(){const h=a??qe(t);return!!h?.member&&!!h.moderator},can(h){return(a??qe(t))?.permissions.includes(h)??!1},async createComment(h,x){const R=await q(`/threads/${encodeURIComponent(h)}/comments`,{method:"POST",body:JSON.stringify({id:x.id,body:x.body})});return{id:R.id,snagId:h,body:R.body,author:R.author,createdAt:R.createdAt}},async patchComment(h,x){return await q(`/comments/${encodeURIComponent(h)}`,{method:"PATCH",body:JSON.stringify({body:x})}),null},async deleteComment(h){await q(`/comments/${encodeURIComponent(h)}`,{method:"DELETE"})}}}async function Ms(e,t){if(e.url&&/^https?:/i.test(e.url))try{const n=await fetch(e.url,{credentials:"omit"});if(!n.ok)return null;const o=await n.blob();return o.type&&!o.type.startsWith("image/")?null:o}catch{return null}return t(e.id)}const zs=64,Os=4096,Ds=e=>le.counts(e),Ls=e=>e.filter(t=>t.status!=="resolved").length;function Ns(e,t,n){const o=new Map;for(const a of t){const d=o.get(a.route)??{n:0,seen:""};a.status!=="resolved"&&d.n++,a.updatedAt>d.seen&&(d.seen=a.updatedAt),o.set(a.route,d)}o.has(n)||o.set(n,{n:0,seen:new Date().toISOString()});const c=[...o.entries()].sort((a,d)=>d[1].seen.localeCompare(a[1].seen)).slice(0,zs);c.some(([a])=>a===n)||(c[c.length-1]=[n,o.get(n)]);let u={v:1,p:Ls(t),r:Object.fromEntries(c.map(([a,d])=>[a,d.n])),t:new Date().toISOString()};JSON.stringify(u).length>Os&&(u={...u,r:{}});try{localStorage.setItem(Ds(e),JSON.stringify(u))}catch{return null}return u}function Hs(e,t){return e?.r[t]??0}const Ws="pass(?:word|wd)?|pwd|secret|token|api[_-]?key|apikey|auth(?:orization)?|credential|session|sid|cookie|jwt|bearer|otp|mfa|totp|cvv|cvc|ssn|nino|iban|card(?:[_-]?number)?|account[_-]?number|private[_-]?key|signature|client[_-]?secret|refresh[_-]?token|access[_-]?token",js=new RegExp(`(["'\`]?)(?<![A-Za-z0-9])(?:${Ws})[\\w-]*\\b\\1?\\s*[:=]\\s*(?:(["'\`])((?:\\\\.|(?!\\2)[^\\\\])*)\\2|([^\\s,;&}\\])]{3,}))`,"gi"),Us=/^(?:Bearer|Basic|Digest|Negotiate|Token)$/i,Fs=(e,t,n,o,r,c,u)=>{if(!n&&Us.test(r)&&u.slice(c+e.length).startsWith(" [redacted]")||(n?o:r).startsWith("[redacted"))return e;const a=n?`${n}${o}${n}`:r;return e.slice(0,e.length-a.length)+(n?`${n}[redacted]${n}`:"[redacted]")},to=/data:[a-z0-9.+-]*\/?[a-z0-9.+-]*;base64,[A-Za-z0-9+/=]{16,}/gi,no=/\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{0,}/g,oo=/\b(sk-[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-Za-z0-9_~.+/=-]*[A-Z])(?=[A-Za-z0-9_~.+/=-]*\d)[A-Za-z0-9_~.+/=-]{24,}$/;function Te(e,t){e.lastIndex=0;const n=e.test(t);return e.lastIndex=0,n}function uo(e){const t=e.replace(/[ -]/g,"");if(t.length<13||t.length>19)return!1;let n=0,o=!1;for(let r=t.length-1;r>=0;r--){let c=t.charCodeAt(r)-48;o&&(c*=2,c>9&&(c-=9)),n+=c,o=!o}return n%10===0}function Vs(e){Gt.lastIndex=0;for(const t of e.matchAll(Gt))if(uo(t[0]))return!0;return!1}function $t(e){let t=e;return t=t.replace(to,"data:[redacted]"),t=t.replace(Bs,"$1 [redacted]"),t=t.replace(js,Fs),t=t.replace(no,"[redacted:jwt]"),t=t.replace(oo,"[redacted:key]"),t=t.replace(co,"[redacted:key]"),t=t.replace(lo,"[redacted:url-cred]@"),t=t.replace(ro,"[redacted:email]"),t=t.replace(Gt,n=>uo(n)?"[redacted:card]":n),t=t.replace(io,n=>`[redacted:b64:${n.length}]`),t=t.replace(so,n=>`[redacted:b64:${n.length}]`),t=t.replace(ao,n=>`[redacted:hex:${n.length}]`),t}const Ys=wt.query,Xs=wt.fragment;function Ks(e,t=[]){let n;try{const o=globalThis.location?.href;n=new URL(e,o)}catch{return $t(e)}n.username="",n.password="";for(const o of[...n.searchParams.keys()]){if(Xs.includes(o)){n.searchParams.set(o,"[redacted]");continue}if(Ys.includes(o))continue;if(!t.includes(o)){n.searchParams.set(o,"[redacted]");continue}const r=n.searchParams.get(o)??"";$t(r)!==r&&n.searchParams.set(o,"[redacted]")}return n.hash&&n.hash.length>1&&(n.hash=t.includes("#")?n.hash:"#[redacted]"),$t(n.toString().replace(/%5Bredacted%5D/gi,"[redacted]"))}function Js(e){return e.length>120?!0:Te(ro,e)||Te(no,e)||Te(oo,e)||Te(ao,e)||Te(so,e)||Te(to,e)||Te(io,e)||Te(co,e)||Te(lo,e)||Zs.test(e)||Vs(e)}const Et={id:"rev_local",name:X("author.unknown"),kind:"guest"},qs="0.0.0";function fo(e,t){if(e)return{...Et,name:e,...t?{email:t}:{}};try{const n=localStorage.getItem(le.identity);if(n)return{...Et,name:n[0]==="{"?JSON.parse(n).name??Et.name:n}}catch{}return Et}function Qs(e){return`SN-${e.reduce((n,o)=>{const r=Number(o.key.split("-")[1]??0);return Number.isFinite(r)&&r>n?r:n},0)+1}`}let en=null;const Se=e=>Br(e,en);function Gs(e,t){const n=Sn(),o=n.ownerDocument??document,r=o.defaultView??window,c=t?.config?.site??"local",u=t?.emit??(()=>{}),a=t?.assetBase??"./",d=t?.config?.env??"default";at(n,"tokens",Xo);const m=Jo(n.host,Ko(t?.config?.theme)),w={},_=t?.config?.storage==="local"?void 0:t?.config?.host,p=_&&c!=="local"?Ps(_,c,t?.config?.env,{reviewToken:t?.reviewToken,onSessionEnded:s=>{ie.show(s==="revoked"?"error.linkrevoked":"error.sessionended")},onSessionStarted:()=>ie.hide()}):ws(c,d,{put:(s,i)=>w.put(s,i),del:s=>w.del(s)}),P=As(c,d);let j=null;const V=s=>p.init({uid:c,env:d}).catch(i=>s>=3?Promise.reject(i):new Promise(f=>setTimeout(f,1500*(s+1))).then(()=>V(s+1)));V(0).then(s=>{j=s.rounds??null,te?.update(B()),s.writable===!1&&s.reason==="origin_not_allowed"&&ie.show("error.origin",void 0,{origin:location.origin})}).catch(()=>{});let b=[],J=[];const ne=vs();let ee=null,q=null,h=!1,x=!1,R=!1,M=null,U=!1;const O={get:()=>ee,unavailable:()=>x||R,newPass:()=>q?.createPassCaches(),fuzzyHit:s=>M?.hit(s)??null,wantFuzzy:(s,i)=>{if(M){M.enqueue(s,i,()=>re());return}U||!q||!i.text?.exact||i.text.exact.length<8||(U=!0,ze("anchor-fuzzy",a,o).then(f=>{if(!f.ok||!q){R=!0,re();return}M=f.mod.createFuzzyEngine(o,q.fuzzyDeps),$e()}))},want:s=>{h||!(s.role&&s.accessibleName)&&!s.text?.exact&&!s.path?.length||(h=!0,ze("anchor-ext",a,o).then(i=>{if(!i.ok){x=!0,re();return}q=i.mod,ee=i.mod.resolveExtended,$e()}))}};let l=null,g=Mr();const C=()=>g.statuses.length>0||!!g.by||!!g.page||g.read!=="all",A=Ar(n,s=>{if(H==="add"){if(Y?.hasText()){Y.pulse();return}Y?.close(),Y=null,ue("comments")}v(s.id)},O,s=>{l=s,te?te.update(B()):v()});let H=(()=>{try{return sessionStorage.getItem(le.mode)==="comments"?"comments":"browse"}catch{return"browse"}})(),Y=null,te=null,se=null,De=!1,Re=null,Qe=!1,Ct=null,be=null,_e=null,Ve=!1;function ce(){return _e?Promise.resolve(_e):Ve?Promise.resolve(null):ze("capture",a,o).then(i=>i.ok?(w.put=i.mod.putBlob,w.del=i.mod.deleteBlob,_e=i.mod):(Tt(new Error("chunk unavailable")),null))}function Tt(s){Ve||(Ve=!0,H==="add"&&ue("comments"),Z.setDegraded(!0),ie.show("error.capture",{label:"action.retry",run:()=>{Ve=!1,Z.setDegraded(!1),ce()}}),console.warn(`[${xe}] the capture chunk failed to load`,s))}let Ie=0;function Ge(){const s=new URL(a,o.location.href).href,i=new URL(Me.panels,s);return i.searchParams.set("cv",qs),Ie>0&&i.searchParams.set("r",String(Ie)),Ie++,import(i.href)}async function Ae(){if(Qe)return null;if(Re)return Re.catch(()=>null);Re=Ge().catch(async()=>(await new Promise(s=>setTimeout(s,1e3)),Ge()));try{return Ct=await Re}catch(s){return Re=null,Le(s),null}}function Le(s){Qe=!0,H==="add"&&ue("comments"),Z.setDegraded(!0),ie.show("error.panels",{label:"action.retry",run:()=>{Qe=!1,Z.setDegraded(!1),v(se)}}),console.warn(`[${xe}] the panels chunk failed to load`,s)}const Ne=o.defaultView?.matchMedia?.("(pointer: coarse)").matches??!1;let pe=null;async function et(){if(pe)return;const s=await ce();!s||pe||(pe=s.createAddChrome(n,Ne,{pick:(i,f)=>void y(i,f),announce:nt}),pe.setActive(H==="add"))}const me=o.createElement("div");me.style.cssText=`position:fixed;left:0;top:0;pointer-events:none;z-index:${Je.dock}`,n.appendChild(me);const Rt=Dr(r,me,s=>Z.setPuck(s>1.2)),ie=$r(n,me),k=Cr(n,me),$=rr(n,{onPick:(s,i)=>void y(s,i),onHover:s=>s?pe?.show(s):pe?.clear(),onSelectStart:()=>{Ne||sn()}});async function y(s,i){if(Y?.hasText()){Y.pulse();return}Y?.close();const[f,I]=await Promise.all([Ae(),ce()]);if(!f||!I)return;const F=I.captureContext({page:I.derivePageRef(o.location,mt()),...yt()});gn(s);const Q=I.deriveAnchorLabel(s);L(f,s,i,F,Q,I)}function L(s,i,f,I,F,Q,K,Fe){let we=i;gt=!1;const fe=Se(o);Mt=!1;const bt=()=>{Y=null,Vn(fe),Z.setDraft(Yt()),ue("comments")},st=()=>{rt?.abort(),Ue=rt=null,bt()},he=j?.find(de=>de.number===p.getRound?.())?.closed?j.find(de=>!de.closed):void 0,Be={at:f,label:F,...K?{initialBody:K.body,initialName:K.author,...K.email?{initialEmail:K.email}:{}}:{},onDraft:(de,Pe,vt)=>{const Ro=as({route:fe,body:de,author:Pe,...vt?{email:vt}:{},label:F,anchor:Fe??Q.createElementAnchor(i,{point:f,viewportWidth:r.innerWidth,label:F,...Q.describeElement(i)}),at:{x:f.x+r.scrollX,y:f.y+r.scrollY},savedAt:new Date().toISOString()});Z.setDraft(Yt()),!Ro&&!Mt&&(Mt=!0,dn())},onSend:(de,Pe,vt)=>{bt(),he&&p.setRound(he.number),un(we,f,I,de,Pe,vt,Fe).then(()=>he&&$e())},onRetarget:de=>{const Pe=de==="up"?Q.widen(we):Q.narrow(we);Pe&&(we=Pe,pe?.show(Pe),Y?.setLabel(Q.deriveAnchorLabel(Pe)))},...He&&ot!==!1?{onShotOptIn:de=>gt=de}:{},onCancel:st,crumbsOn:mn!==!1,shotsOn:ot!==!1,..._&&c!=="local"?{serverHost:new URL(_).host}:{},..._&&p.adoptSession?{studio:{host:_,uid:c,env:t?.config?.env,member:p.member(),adopt:de=>p.adoptSession(de),signOut:()=>p.signOut()}}:{},...Fe?.text?.exact?{quote:Fe.text.exact}:{},...he?{roundNote:he.name}:{}};Y=s.openComposer(n,Be,me),We()}async function T(){const s=Se(o),i=is(s);if(Z.setDraft(Yt()),!i||Y)return;const[f,I]=await Promise.all([Ae(),ce()]);if(!f||!I)return;const F=Bt(i.anchor,o,{viewportWidth:r.innerWidth,...ee?{extended:ee}:{}});if(!F.element)return;const Q=F.element.getBoundingClientRect();if(Q.width===0&&Q.height===0)return;const K={x:i.at.x-r.scrollX,y:i.at.y-r.scrollY};ue("add"),L(f,F.element,K,I.captureContext({page:I.derivePageRef(o.location,mt()),...yt()}),i.label,I,{body:i.body,author:i.author,...i.email?{email:i.email}:{}})}function N(){g.newOnly&&!b.some(s=>Un(s,P.map()))&&(g={...g,newOnly:!1})}async function v(s=null){if(s&&s!==se&&u("thread:open",{threadId:s}),s&&(P.mark(s),N()),se=s,De=!0,H==="browse"&&ue("comments"),te){te.update(B());return}if(!await Ae())return;const f=await ze("dock",a,o);if(!f.ok){ie.show("error.panels",{label:"action.retry",run:()=>void v(se)});return}!De||te||(be=f.mod,te=f.mod.openDock(n,B(),me),We())}function E(){P.markAll(b),g.newOnly&&(g={...g,newOnly:!1}),De=!1,te?.close(),te=null,se=null,A.highlight(null),We(),C()&&re()}function ae(s){const i=s?b.find(f=>f.id===s):void 0;if(i&&i.route!==Se(o)){Ir(r,i.id),r.location.assign(i.route);return}s&&(P.mark(s),N()),se=s,A.highlight(null),C()?re():te?.update(B()),i&&be?.scrollToSnag(r,n,i)}function B(){return{snags:b,route:Se(o),openId:se,seenAt:P.map(),onOpen:ae,onStatus:(s,i)=>void yo(s,i),onReply:(s,i,f)=>void vo(s,i,f),onEdit:(s,i)=>void W(s,i),onDeleteComment:s=>void oe(s),onDeleteThread:s=>void ve(s),...p.isMine?{isMine:s=>p.isMine(s)}:{},..._&&p.adoptSession?{studio:{host:_,uid:c,env:t?.config?.env,member:p.member(),adopt:s=>p.adoptSession(s),signOut:()=>p.signOut()}}:{},canDeleteOwnThread:p.can?p.can("thread:delete:own"):!0,canStatus:p.can?p.can("thread:resolve"):!0,canModerate:p.canModerate?.()??!1,...p.listAssignees&&p.can?.("thread:assign")?{assignees:()=>p.listAssignees(),onAssign:(s,i)=>void bo(s,i)}:{},onClearAll:()=>void ge(),onMarkAllRead:()=>{P.markAll(b),g={...g,newOnly:!1},re()},onClose:E,...p.kind==="local"?{onExport:Pt}:{},onHover:s=>A.highlight(s),...j&&j.length>1&&p.setRound?{rounds:j,activeRound:p.getRound?.()??j.find(s=>!s.closed)?.number??j[0].number,onRound:s=>{p.setRound(s),$e()}}:{},onAnnounce:nt,loadShot:s=>Ms(s,async i=>{const f=await ce();return f?(await f.getBlob(i))?.blob??null:null}),filter:g,onFilter:s=>{const i=s.statuses.join()!==g.statuses.join()||s.by!==g.by||s.page!==g.page||s.read!==g.read;g=s,i?re():te?.update(B())},...l?{clusterFilter:l}:{},onClusterClear:()=>{l=null,te?.update(B())},onShowAnyway:s=>{A.showGhost(s),be?.scrollToSnag(r,n,s)}}}async function D(s,i){const f=b;b=s,re();try{await Xe(i)}catch{b=f,re(),ie.show("error.sendfailed",void 0,{item:"change"})}}async function W(s,i){await D(b.map(f=>({...f,comments:f.comments.map(I=>I.id===s?{...I,body:i}:I)})),()=>p.patchComment(s,i))}async function oe(s){await D(b.map(i=>({...i,comments:i.comments.filter(f=>f.id!==s)})),()=>p.deleteComment(s))}async function ve(s){const i=se;se===s&&(se=null),await D(b.filter(f=>f.id!==s),()=>p.deleteThread(s)),b.some(f=>f.id===s)&&(se=i)}async function ge(){const s=b.map(i=>i.id);b=[],se=null,re(),await Promise.all(s.map(i=>Xe(()=>p.deleteThread(i))))}const Z=hs(n,{onState:s=>ue(s),onPanel:()=>te?E():void v(),onNav:s=>on(s),parent:me}),He=r.matchMedia?.("(pointer: coarse)").matches??!1,We=()=>{He&&Z.setConcealed(!!Y||!!te)};let ye=null,ut=[];function ho(s){let i=!1;const f=()=>{i||(i=!0,r.removeEventListener("scrollend",f),s())};r.addEventListener("scrollend",f,{once:!0}),r.setTimeout(f,600)}const tt=o.createElement("div");tt.setAttribute("aria-live","polite"),tt.setAttribute("role","status");const tn="position:absolute;width:1px;height:1px;overflow:hidden";tt.style.cssText=tn;const _t=o.createElement("div");_t.setAttribute("aria-live","assertive"),_t.style.cssText=tn,n.append(tt,_t);let nn=0;function nt(s){r.clearTimeout(nn),nn=r.setTimeout(()=>{tt.textContent=s},400)}function on(s){const i=ut.length;if(i===0)return;ye=ye===null?s===1?0:i-1:(ye+s+i)%i;const f=ut[ye];ms(r,n,f);const I=ye+1;ho(()=>{A.pulse(f.id),nt(X("nav.announce",{n:I,label:f.anchor.label,i:I,total:i}))})}function rn(){if(H!=="comments"||Ne){ke?.disarm();return}sn().then(s=>{s&&H==="comments"&&s.arm()})}let ke=null,It=null;async function sn(){if(ke)return ke;const s=await ze("text",a,o);return!s.ok||ke||(It=s.mod,ke=s.mod.createSelectionWatcher(n,{onQuote:(i,f)=>void po(i,f)})),ke}async function po(s,i){const f=_e??await ce();if(!f||!It)return;const I=It.createTextAnchor(s,f,{viewportWidth:r.innerWidth,ourRoot:n});if(I.kind==="refused-form-control"){y(I.el,i);return}if(I.kind!=="text")return;const F=await Ae();if(!F)return;const Q=f.captureContext({page:f.derivePageRef(o.location,mt()),...yt()});try{s.removeAllRanges()}catch{}L(F,I.el,I.point,Q,I.label,f,void 0,I.record)}function ue(s,i=!1){const f=H;H=s,s!=="add"&&Y&&!i&&(Y.close(),Y=null),s==="add"&&te&&E(),s==="add"&&(Ae(),ce());try{sessionStorage.setItem(le.mode,s==="add"?"comments":s)}catch{}$.setMode(s),s!==f&&nt(X(`toolbar.${s}`)),We(),s==="add"&&et(),rn(),pe?.setActive(s==="add"),Z.setState(s),re(),s!==f&&u("modechange",{mode:s,previous:f})}let Ye=0,an=0;const cn=[300,800,1600,3200];function mo(){if(Ye||!A.hasPending()){A.hasPending()||(an=0);return}const s=cn[Math.min(an++,cn.length-1)];Ye=r.setTimeout(()=>{Ye=0,re()},s)}const go=3e3;let ln=0;function re(s){const i=s??(Date.now()<ln?"navigating":"authoritative");J=A.reanchor(b.filter(Eo()),i),$o(),mo();const f=new Map(J.map(K=>[K.id,K]));b=b.map(K=>f.get(K.id)??K);const I=C()?new Set(J.filter(K=>!Or(K,g,P.map())&&K.id!==se).map(K=>K.id)):void 0;ut=I?J.filter(K=>!I.has(K.id)):J,A.render(H==="browse"?[]:J,I);const F=Se(o),Q=ne?Ns(o.location.origin,b,F):null;Z.setCount(Q?Hs(Q,F):ne?J.filter(K=>K.status!=="resolved").length:null),ye!==null&&ye>=ut.length&&(ye=null),te?.update(B())}async function $e(){const{data:s}=await p.listThreads();b=s,re();const i=A.settled();for(const f of i)u("anchor:settled",{threadId:f.id,state:f.state,strategy:f.strategy,confidence:f.confidence});return p.capabilities.anchorReports&&p.reportAnchors&&i.length&&Xe(()=>p.reportAnchors(i.map(f=>({threadId:f.id,state:f.state,confidence:f.confidence,strategy:f.strategy})))),p.capabilities.anchorReports||await Promise.all(s.flatMap(f=>{const I=b.find(F=>F.id===f.id);return!I||I.anchorState===f.anchorState?[]:[Xe(()=>p.patchThread(I.id,{anchor:I.anchor,anchorState:I.anchorState}))]})),J}async function yo(s,i){u("thread:resolve",{threadId:s,status:i}),await D(b.map(f=>f.id===s?{...f,status:i}:f),()=>p.patchThread(s,{status:i}))}async function bo(s,i){await D(b.map(f=>f.id===s?{...f,assignee:i}:f),()=>p.patchThread(s,{assignee:i&&i.id}))}async function vo(s,i,f){const I={id:Kn(),body:i,author:fo(f)};b=b.map(F=>F.id===s?{...F,comments:[...F.comments,{...I,snagId:s,createdAt:new Date().toISOString()}]}:F),P.mark(s),re(),u("comment:create",{threadId:s,comment:I}),await Xe(()=>p.createComment(s,I))}function dn(){ie.show("error.quota",{label:"action.exportclear",run:()=>{Pt("json"),ge()}}),console.warn(`[${xe}] ${X("error.quota")}`)}async function Xe(s){try{return await s()}catch(i){if(i instanceof Wt&&i.code==="local_quota_exceeded")return dn(),null;throw i}}function Pt(s){ce().then(async i=>{if(!i)return;const f=await i.resolveAttachmentUris(b).catch(()=>new Map);i.download(n,i.buildExport(s,b,{origin:o.location.origin,exportedAt:new Date().toISOString()},f),r)})}async function un(s,i,f,I,F,Q,K){const Fe=fo(F,Q),we=_e??await ce();if(!we)throw new Error(`[${xe}] add() needs the capture chunk`);Ue||gn(s);const fe=Ue?await Ue:null;Ue=rt=null,we.applyShotOutcome(f,fe,ot===!1,He&&!gt);const bt=fe?.blob&&p.uploadAttachment?p.uploadAttachment(fe.blob,{kind:"screenshot",...fe.width!==void 0?{width:fe.width}:{},...fe.height!==void 0?{height:fe.height}:{}}).catch(()=>null):Promise.resolve(null),st={id:gs(),key:Qs(b),route:Se(o),anchor:K??we.createElementAnchor(s,{point:i,viewportWidth:r.innerWidth,label:we.deriveAnchorLabel(s),...we.describeElement(s)}),anchorState:"anchored",scope:Ao(),context:f,createdBy:Fe,createdAt:new Date().toISOString(),...I?{comment:{id:Kn(),body:I,author:Fe}}:{}},Ee=_n(st);fe?.blob&&(Ee.screenshotBlob=fe.blob),b=[...b,Ee],P.mark(Ee.id),nt(X("announce.created",{key:Ee.key})),u("thread:create",{thread:Ee}),H==="browse"?ue("comments"):re();try{const he=await bt;he&&(st.attachments=[he],b=b.map(Be=>Be.id===Ee.id?{...Be,attachments:[he]}:Be),re()),await Xe(()=>p.createThread(st))}catch(he){throw b=b.filter(Be=>Be.id!==Ee.id),re(),ie.show("error.sendfailed",void 0,{item:Ot.toLowerCase()}),console.warn(`[${xe}] ${X("error.sendfailed",{item:Ot.toLowerCase()})}`,he),he}return Ee}function fn(s){if((s.key==="n"||s.key==="p")&&H==="comments"&&!Y){if(s.metaKey||s.ctrlKey||s.altKey)return;const i=s.composedPath()[0]??s.target;if(i&&(i.closest?.("input,textarea,select,[contenteditable]")||i.isContentEditable))return;s.preventDefault(),s.stopPropagation(),on(s.key==="n"?1:-1);return}H==="add"&&s.key==="Escape"&&(Y||(s.stopPropagation(),ue("comments")))}o.addEventListener("keydown",fn,!0);let hn=0;const pn=()=>{if(o.hidden||!p.revalidate)return;const s=Date.now();s-hn<3e4||(hn=s,p.revalidate())};o.addEventListener("visibilitychange",pn);const wo=Uo(n),xo=Fo(n,s=>{console.warn(`[${xe}] the host page hid the widget from assistive technology ${s} times; leaving it alone.`)}),So=jo(n,s=>{console.warn(`[${xe}] the host page removed the widget ${s} times; leaving it alone. Reload to comment again.`)});function Ao(){return{environment:d,...t?.config?.branch?{branch:t.config.branch}:{}}}let ft={route:Se(o),url:o.location.href},Mt=!1,ht=null;function ko(s){if(s){if(H==="browse")return;ht=H,ue("browse",!0),k.show(),u("paused",{reason:"modal-dialog"})}else if(ht){const i=ht;ht=null,k.hide(),ue(i),u("resumed",{mode:i})}}Ae();function $o(){J.length>0&&ze("dock",a,o)}{const s=o.createElement("div");s.style.cssText="position:fixed;inset:0;pointer-events:none;visibility:hidden",n.appendChild(s);const i=s.getBoundingClientRect(),f=Math.abs(i.left)>1||Math.abs(i.top)>1||Math.abs(i.width-r.innerWidth)>1||Math.abs(i.height-r.innerHeight)>1;s.remove(),f&&(console.warn(`[${xe}] fixed-trapped: <html> has transform/filter/contain, so our fixed layer follows it, not the viewport. Remove it, or expect drift.`),u("error",{code:"fixed-trapped"}))}let Ke=null;const pt=new Set,je=(()=>{const s=r[Mo.config];return s&&typeof s=="object"?s:void 0})(),mn=je?.breadcrumbs,zt=(()=>{const s=je?.significantQueryParams,i=je?.ignoredQueryParams,f={};return s==="*"?f.significantQueryParams="*":Array.isArray(s)&&(f.significantQueryParams=s.map(String)),Array.isArray(i)&&(f.ignoredQueryParams=i.map(String)),f})(),mt=()=>({routeOverride:en,query:zt,doc:o}),ot=je?.screenshot===!1?!1:je?.screenshot&&typeof je.screenshot=="object"?je.screenshot:{};let gt=!1,Ue=null,rt=null;function gn(s){if(ot===!1||Ue||He&&!gt)return;rt=new AbortController;const i=rt.signal;Ue=ze("screenshot",a,o).then(f=>f.ok?f.mod.captureScreenshot({doc:o,target:s,signal:i,...ot,...p.fetchForeignImage?{fetchForeignImage:I=>p.fetchForeignImage(I)}:{}}):{situation:"engine-load-failed",blindSpots:[],maskedCount:0})}function Eo(){const s=Se(o),i=Fn(o.location.pathname),f=Xr(o.location.search,zt);return I=>(I.route===s||I.context?.page?.pathname===i)&&Kr(I.context?.page?.query,f,zt)}{const s=mn;s!==!1&&ze("crumbs",a,o).then(i=>{i.ok&&(Ke=i.mod.installTierC({win:r,...t?.early?{early:t.early}:{},...s&&typeof s=="object"?{config:s}:{},subscribeNav:f=>(pt.add(f),()=>pt.delete(f))}))})}const yt=()=>Ke?{breadcrumbs:{records:Ke.drain(),status:Ke.status()}}:{},Co=es(o,r,()=>{H!=="browse"&&J.length>0&&re()}),To=_r(r,{onResize:()=>re(),onRoute:()=>{const s={route:Se(o),url:o.location.href},i=s.route!==ft.route;if(i){u("navigate",{from:ft,to:s});for(const f of pt)f(ft.url,s.url)}if(ft=s,!i){$e();return}ln=Date.now()+go,r.setTimeout(()=>{p.listThreads().then(({data:f})=>{b=f,re("optimistic")})},100),r.setTimeout(()=>void $e(),600)},onModal:ko});return Z.setState(H),$.setMode(H),rn(),ne||ie.show("error.nostorage",{label:"action.export",run:()=>Pt("md")}),$e().then(async s=>{const i=Pr(r);if(!i){const I=new URLSearchParams(o.location.search).get(No("t"));if(I){let F=s.find(Q=>Q.key===I);if(!F&&p.getThreadByKey){const Q=await p.getThreadByKey(I).catch(()=>null);Q&&(b=[...b.filter(K=>K.id!==Q.id),Q],re(),F=b.find(K=>K.id===Q.id))}F?(await v(F.id),be?.scrollToSnag(r,n,F)):(ie.show("permalink.unknown"),await v(null));return}await T();return}const f=s.find(I=>I.id===i);await v(f?i:null),f&&be?.scrollToSnag(r,n,f)}),{root:n,assetBase:t?.assetBase??"",snags:()=>J,async add(s,i,f,I){const F=I?null:await ce(),Q=I??(F?F.captureContext({page:F.derivePageRef(o.location,mt()),...yt()}):void 0);if(!Q)throw new Error(`[${xe}] add() needs the capture chunk, or an explicit context`);return un(s,i,Q,f)},refresh:$e,setRoute(s){en=s&&s.startsWith("/")?s:null,$e()},setState:ue,getState:()=>H,openPanel:v,async open(s){const i=s.startsWith(xt.thread)?b.find(f=>f.id===s):b.find(f=>f.key===s);return i?i.route!==Se(o)?{ok:!1,reason:"wrong-page",url:i.context?.url??i.route,route:i.route}:(await v(i.id),be?.scrollToSnag(r,n,i),{ok:!0,anchorState:i.anchorState}):{ok:!1,reason:"not-found"}},closePanel:E,hitTest:(s,i)=>$.hitTest(s,i),destroy(){Y?.close(),E(),pe?.destroy(),ie.destroy(),k.destroy(),Rt(),So(),xo(),wo(),To.destroy(),Co.destroy(),Ke?.destroy(),Ke=null,pt.clear(),ke?.destroy(),ke=null,M?.destroy(),M=null,Ye&&r.clearTimeout(Ye),Ye=0,o.removeEventListener("keydown",fn,!0),o.removeEventListener("visibilitychange",pn),m(),$.destroy(),A.destroy(),Z.destroy(),n.host.remove()}}}export{wn as HOST_CSS,Sn as createHost,Js as isSensitiveValue,Gs as mount,$t as redactText,Ks as redactUrl};