hypothesis 1.1540.0 → 1.1542.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/boot.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?b3fd3a","styles/annotator.css":"styles/annotator.css?09b239","styles/annotator.css.map":"styles/annotator.css.map?a79968","styles/highlights.css":"styles/highlights.css?6b4ebd","styles/highlights.css.map":"styles/highlights.css.map?241350","styles/katex.min.css":"styles/katex.min.css?58e394","styles/katex.min.css.map":"styles/katex.min.css.map?1785d7","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?c95edf","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?1d8ac6","styles/sidebar.css":"styles/sidebar.css?979e6c","styles/sidebar.css.map":"styles/sidebar.css.map?f2d2d8","styles/ui-playground.css":"styles/ui-playground.css?c01dc6","styles/ui-playground.css.map":"styles/ui-playground.css.map?3265b9","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?384d50","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?030b8c","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?1e77cb","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?1b7b0f","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?c9dbf8"};function t(s){s.setAttribute("data-hypothesis-asset","")}function e(s,e){var o=s.createElement("link");o.rel="stylesheet",o.type="text/css",o.href=e,t(o),s.head.appendChild(o)}function o(s,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=o.esModule,n=void 0===r||r,i=o.forceReload,a=void 0!==i&&i,l=s.createElement("script");n&&(l.type="module"),a&&(e+="#ts=".concat(Date.now())),l.src=e,l.async=!1,t(l),s.head.appendChild(l)}function r(s,e,o,r){var n=s.createElement("link");n.rel=e,n.href=r,n.type="application/annotator+".concat(o),t(n),s.head.appendChild(n)}function n(s,e,o){var r=s.createElement("link");r.rel="preload",r.as=e,r.href=o,"fetch"===e&&(r.crossOrigin="anonymous"),t(r),s.head.appendChild(r)}function i(s,t){return s.assetRoot+"build/"+s.manifest[t]}function a(s){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===s.indexOf("{"))return s;var e=function(){var s,t,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).currentScript;return e?(s=e.src,(t=s.match(/(https?):\/\/([^:/]+)/))?{protocol:t[1],hostname:t[2]}:null):null}(t);if(!e)throw new Error("Could not process URL template because script origin is unknown");return s=(s=s.replace("{current_host}",e.hostname)).replace("{current_scheme}",e.protocol)}if(function(){var s=[()=>Object.fromEntries([]),()=>new URL(document.location.href),()=>new Request("https://hypothes.is"),()=>Element.prototype.attachShadow,()=>CSS.supports("display: grid"),()=>(document.evaluate("/html/body",document,null,XPathResult.ANY_TYPE,null),!0)];try{return s.every((s=>s()))}catch(s){return!1}}()){var l=function(s){for(var t={},e=s.querySelectorAll("script.js-hypothesis-config"),o=0;o<e.length;o++){var r=void 0;try{r=JSON.parse(e[o].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),r={}}Object.assign(t,r)}return t}(document),p=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1540.0/");if(document.querySelector("hypothesis-app")){!function(s,t){n(s,"fetch",t.apiUrl),n(s,"fetch",t.apiUrl+"links");for(var r=0,a=["scripts/sidebar.bundle.js"];r<a.length;r++)o(s,i(t,a[r]),{esModule:!0});for(var l=0,p=["styles/katex.min.css","styles/sidebar.css"];l<p.length;l++)e(s,i(t,p[l]))}(document,{assetRoot:p,manifest:s,apiUrl:l.apiUrl})}else{var c=function(){var s;return null===(s=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).chrome)||void 0===s||null===(s=s.runtime)||void 0===s?void 0:s.id}();if(c&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(c))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,h=a(d.notebookAppUrl||"https://hypothes.is/notebook"),u=a(d.profileAppUrl||"https://hypothes.is/user-profile"),y=a(d.sidebarAppUrl||"https://hypothes.is/app.html");!function(s,t){if(!s.querySelector('link[type="application/annotator+html"]')){r(s,"sidebar","html",t.sidebarAppUrl),r(s,"notebook","html",t.notebookAppUrl),r(s,"profile","html",t.profileAppUrl),n(s,"style",i(t,"styles/annotator.css")),r(s,"hypothesis-client","javascript",t.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)o(s,i(t,l[a]),{esModule:!1});var p=[];void 0!==window.PDFViewerApplication&&p.push("styles/pdfjs-overrides.css"),p.push("styles/highlights.css");for(var c=0,d=p;c<d.length;c++)e(s,i(t,d[c]))}}(document,{assetRoot:p,manifest:s,notebookAppUrl:h,profileAppUrl:u,sidebarAppUrl:y})}}else console.warn("The Hypothesis annotation tool is not supported in this browser. See https://web.hypothes.is/help/which-browsers-are-supported-by-hypothesis/.")}();
1
+ !function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?068897","styles/annotator.css":"styles/annotator.css?f0ac17","styles/annotator.css.map":"styles/annotator.css.map?c421a4","styles/highlights.css.map":"styles/highlights.css.map?241350","styles/highlights.css":"styles/highlights.css?6b4ebd","styles/katex.min.css.map":"styles/katex.min.css.map?1785d7","styles/katex.min.css":"styles/katex.min.css?58e394","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?c95edf","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?1d8ac6","styles/sidebar.css.map":"styles/sidebar.css.map?868a38","styles/sidebar.css":"styles/sidebar.css?d8c723","styles/ui-playground.css.map":"styles/ui-playground.css.map?9f0295","styles/ui-playground.css":"styles/ui-playground.css?249d2a","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?82aadc","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?90f243","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?6dfb36","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?d9f900","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?d44f1f"};function t(s){s.setAttribute("data-hypothesis-asset","")}function e(s,e){var o=s.createElement("link");o.rel="stylesheet",o.type="text/css",o.href=e,t(o),s.head.appendChild(o)}function o(s,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=o.esModule,n=void 0===r||r,i=o.forceReload,a=void 0!==i&&i,l=s.createElement("script");n&&(l.type="module"),a&&(e+="#ts=".concat(Date.now())),l.src=e,l.async=!1,t(l),s.head.appendChild(l)}function r(s,e,o,r){var n=s.createElement("link");n.rel=e,n.href=r,n.type="application/annotator+".concat(o),t(n),s.head.appendChild(n)}function n(s,e,o){var r=s.createElement("link");r.rel="preload",r.as=e,r.href=o,"fetch"===e&&(r.crossOrigin="anonymous"),t(r),s.head.appendChild(r)}function i(s,t){return s.assetRoot+"build/"+s.manifest[t]}function a(s){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===s.indexOf("{"))return s;var e=function(){var s,t,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).currentScript;return e?(s=e.src,(t=s.match(/(https?):\/\/([^:/]+)/))?{protocol:t[1],hostname:t[2]}:null):null}(t);if(!e)throw new Error("Could not process URL template because script origin is unknown");return s=(s=s.replace("{current_host}",e.hostname)).replace("{current_scheme}",e.protocol)}if(function(){var s=[()=>Object.fromEntries([]),()=>new URL(document.location.href),()=>new Request("https://hypothes.is"),()=>Element.prototype.attachShadow,()=>CSS.supports("display: grid"),()=>(document.evaluate("/html/body",document,null,XPathResult.ANY_TYPE,null),!0)];try{return s.every((s=>s()))}catch(s){return!1}}()){var l=function(s){for(var t={},e=s.querySelectorAll("script.js-hypothesis-config"),o=0;o<e.length;o++){var r=void 0;try{r=JSON.parse(e[o].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),r={}}Object.assign(t,r)}return t}(document),p=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1542.0/");if(document.querySelector("hypothesis-app")){!function(s,t){n(s,"fetch",t.apiUrl),n(s,"fetch",t.apiUrl+"links");for(var r=0,a=["scripts/sidebar.bundle.js"];r<a.length;r++)o(s,i(t,a[r]),{esModule:!0});for(var l=0,p=["styles/katex.min.css","styles/sidebar.css"];l<p.length;l++)e(s,i(t,p[l]))}(document,{assetRoot:p,manifest:s,apiUrl:l.apiUrl})}else{var c=function(){var s;return null===(s=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).chrome)||void 0===s||null===(s=s.runtime)||void 0===s?void 0:s.id}();if(c&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(c))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,h=a(d.notebookAppUrl||"https://hypothes.is/notebook"),u=a(d.profileAppUrl||"https://hypothes.is/user-profile"),y=a(d.sidebarAppUrl||"https://hypothes.is/app.html");!function(s,t){if(!s.querySelector('link[type="application/annotator+html"]')){r(s,"sidebar","html",t.sidebarAppUrl),r(s,"notebook","html",t.notebookAppUrl),r(s,"profile","html",t.profileAppUrl),n(s,"style",i(t,"styles/annotator.css")),r(s,"hypothesis-client","javascript",t.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)o(s,i(t,l[a]),{esModule:!1});var p=[];void 0!==window.PDFViewerApplication&&p.push("styles/pdfjs-overrides.css"),p.push("styles/highlights.css");for(var c=0,d=p;c<d.length;c++)e(s,i(t,d[c]))}}(document,{assetRoot:p,manifest:s,notebookAppUrl:h,profileAppUrl:u,sidebarAppUrl:y})}}else console.warn("The Hypothesis annotation tool is not supported in this browser. See https://web.hypothes.is/help/which-browsers-are-supported-by-hypothesis/.")}();
@@ -1,20 +1,20 @@
1
1
  {
2
- "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?b3fd3a",
3
- "styles/annotator.css": "styles/annotator.css?09b239",
4
- "styles/annotator.css.map": "styles/annotator.css.map?a79968",
5
- "styles/highlights.css": "styles/highlights.css?6b4ebd",
2
+ "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?068897",
3
+ "styles/annotator.css": "styles/annotator.css?f0ac17",
4
+ "styles/annotator.css.map": "styles/annotator.css.map?c421a4",
6
5
  "styles/highlights.css.map": "styles/highlights.css.map?241350",
7
- "styles/katex.min.css": "styles/katex.min.css?58e394",
6
+ "styles/highlights.css": "styles/highlights.css?6b4ebd",
8
7
  "styles/katex.min.css.map": "styles/katex.min.css.map?1785d7",
8
+ "styles/katex.min.css": "styles/katex.min.css?58e394",
9
9
  "styles/pdfjs-overrides.css": "styles/pdfjs-overrides.css?c95edf",
10
10
  "styles/pdfjs-overrides.css.map": "styles/pdfjs-overrides.css.map?1d8ac6",
11
- "styles/sidebar.css": "styles/sidebar.css?979e6c",
12
- "styles/sidebar.css.map": "styles/sidebar.css.map?f2d2d8",
13
- "styles/ui-playground.css": "styles/ui-playground.css?c01dc6",
14
- "styles/ui-playground.css.map": "styles/ui-playground.css.map?3265b9",
15
- "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?384d50",
16
- "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?030b8c",
17
- "scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?1e77cb",
18
- "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?1b7b0f",
19
- "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?c9dbf8"
11
+ "styles/sidebar.css.map": "styles/sidebar.css.map?868a38",
12
+ "styles/sidebar.css": "styles/sidebar.css?d8c723",
13
+ "styles/ui-playground.css.map": "styles/ui-playground.css.map?9f0295",
14
+ "styles/ui-playground.css": "styles/ui-playground.css?249d2a",
15
+ "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?82aadc",
16
+ "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?90f243",
17
+ "scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?6dfb36",
18
+ "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?d9f900",
19
+ "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?d44f1f"
20
20
  }
@@ -59,7 +59,7 @@ if(!f)return;const t={closeListbox:void 0===e};if(void 0===e)return void h([],t)
59
59
  },this),!f&&Ct("div",{className:"px-3",children:Ct(qt,{className:xt("text-grey-6 scale-125",{"opacity-0":!m})},void 0,0,{fileName:Rn,lineNumber:216,columnNumber:13},this)},void 0,0,{fileName:Rn,lineNumber:215,columnNumber:11},this),f&&Ct(Cn,{containerClasses:xt("self-stretch px-3","text-lg",{"text-grey-6":m,"text-grey-3 hover:text-grey-6":!m}),checked:m,checkedIcon:jt,elementRef:s,containerRef:a,onChange:p,onKeyDown:e=>{var t;"ArrowLeft"===e.key&&(e.preventDefault(),null===(t=l.current)||void 0===t||t.focus())}},void 0,0,{fileName:Rn,lineNumber:227,columnNumber:11},this)]},void 0,0,{fileName:Rn,lineNumber:196,columnNumber:7},this)},void 0,0,{fileName:Rn,lineNumber:149,columnNumber:5},this)}Pn.displayName="Select.Option";const Ln=".25rem",On=8
60
60
  ;function Mn({buttonContent:e,value:t,onChange:n,children:o,disabled:i,elementRef:r,buttonId:s,buttonClasses:a,listboxClasses:l,containerClasses:c,onListboxScroll:d,right:h=!1,alignListbox:u=(h?"right":"left"),multiple:f,listboxOverflow:m="truncate","aria-label":g,"aria-labelledby":p,listboxAsPopover:_=HTMLElement.prototype.hasOwnProperty("popover")}){const b=Qe(null),w=Qe(null),[v,y]=je(!1),x=Ye((e=>{var t;(y(e),_)&&(null===(t=w.current)||void 0===t||t.togglePopover(e))}),[_]),N=Ye((()=>x(!1)),[x]),C=Ze(),S=_t(r),E=Ze();!function(e,t,n,o,i){const r=Ye((()=>{const r=t.current,s=e.current;if(!s||!r||!n)return()=>{};const a=e=>{Object.assign(r.style,e);const t=Object.keys(e);return()=>t.map((e=>r.style[e]=""))},l=window.innerHeight,{top:c,bottom:d,left:h,height:u,width:f}=s.getBoundingClientRect(),m=l-d,{height:g,width:p}=r.getBoundingClientRect(),_=m<g&&c>m;if(!o)return a(_?{bottom:"100%",marginBottom:Ln}:{top:"100%",marginTop:Ln})
61
61
  ;const{top:b,width:w}=document.body.getBoundingClientRect(),v=Math.abs(b),y=(i?h+f:w-h)-On;let x=h;return p>y?x=i?On:x-(p-y):i&&p>f&&(x-=p-f),a({minWidth:`${f}px`,top:_?`calc(${v+c-g}px - ${Ln})`:`calc(${v+c+u}px + ${Ln})`,left:`${Math.max(On,x)}px`})}),[o,e,n,t,i]);Ke((()=>{const e=r();if(!o)return e;const t=new ut;return t.add(document.body,"scroll",r,{capture:!0}),()=>{e(),t.removeAll()}}),[r,o])}(S,w,v,_,"right"===u);const k=Ye(((e,t)=>{n(e),t.closeListbox&&N()}),[n,N]);return function(e,t,{enabled:n=!0}={}){Xe((()=>{if(!n)return()=>{};const o=document.body,i=new ut,r=n=>{e.current&&!n.composedPath().includes(e.current)&&t(n)};return i.add(o,"mousedown",r),i.add(o,"click",r),()=>{i.removeAll()}}),[e,n,t])}(b,N),function(e,t,{enabled:n=!0}={}){Xe((()=>{if(!n||!e.current)return()=>{};const o=new ut;return o.add(e.current,"focusout",(n=>{const o=n;e.current&&!e.current.contains(o.relatedTarget)&&t(o)})),()=>{o.removeAll()}}),[e,n,t])}(b,N),function(e,t,{enabled:n=!0}={}){Xe((()=>{if(!n)return()=>{}
62
- ;const o=document.body,i=new ut;return i.add(o,"keydown",(n=>{e.includes(n.key)&&t(n)})),()=>{i.removeAll()}}),[n,t,e])}(["Escape"],N),mt(w,{horizontal:!1,loop:!1,autofocus:!0,containerVisible:v,selector:'[role="option"]:not([aria-disabled="true"])'}),Ct("div",{className:xt("relative w-full border rounded",{"border-grey-5":v},bn,c),ref:b,children:[Ct("button",{id:null!=s?s:E,className:xt("focus-visible-ring transition-colors whitespace-nowrap","w-full flex items-center justify-between gap-x-2 p-2","bg-grey-0 disabled:bg-grey-1 disabled:text-grey-6","text-left","rounded-[inherit]",a),type:"button",role:"combobox",disabled:i,"aria-expanded":v,"aria-haspopup":"listbox","aria-controls":C,"aria-label":g,"aria-labelledby":p,ref:S,onClick:()=>x(!v),onKeyDown:e=>{"ArrowDown"!==e.key||v||(e.preventDefault(),x(!0))},"data-testid":"select-toggle-button",children:[Ct("div",{className:"truncate grow",children:e},void 0,0,{fileName:Rn,lineNumber:592,columnNumber:9},this),Ct("div",{className:"text-grey-6",
62
+ ;const o=document.body,i=new ut;return i.add(o,"keydown",(n=>{e.includes(n.key)&&t(n)})),()=>{i.removeAll()}}),[n,t,e])}(["Escape"],N),mt(w,{horizontal:!1,loop:!1,autofocus:!0,containerVisible:v,selector:'[role="option"]:not([aria-disabled="true"])'}),Ct("div",{className:xt("relative w-full border rounded",{"border-grey-5":v},bn,c),ref:b,children:[Ct("button",{id:null!=s?s:E,className:xt("focus-visible-ring transition-colors whitespace-nowrap","w-full flex items-center justify-between gap-x-2","bg-grey-0 disabled:bg-grey-1 disabled:text-grey-6","text-left","rounded-[inherit]",a),type:"button",role:"combobox",disabled:i,"aria-expanded":v,"aria-haspopup":"listbox","aria-controls":C,"aria-label":g,"aria-labelledby":p,ref:S,onClick:()=>x(!v),onKeyDown:e=>{"ArrowDown"!==e.key||v||(e.preventDefault(),x(!0))},"data-testid":"select-toggle-button",children:[Ct("div",{className:"pl-2 py-2 truncate grow",children:e},void 0,0,{fileName:Rn,lineNumber:592,columnNumber:9},this),Ct("div",{className:"pr-2 py-2 text-grey-6",
63
63
  children:v?Ct(en,{},void 0,0,{fileName:Rn,lineNumber:594,columnNumber:26},this):Ct(nn,{},void 0,0,{fileName:Rn,lineNumber:594,columnNumber:49},this)},void 0,0,{fileName:Rn,lineNumber:593,columnNumber:9},this)]},void 0,0,{fileName:Rn,lineNumber:559,columnNumber:7},this),Ct(An.Provider,{value:{value:t,selectValue:k,multiple:f,listboxOverflow:m},children:Ct("ul",{className:xt("absolute z-5 max-h-80 overflow-y-auto overflow-x-hidden","max-w-[calc(100%-16px)]","rounded border bg-white shadow hover:shadow-md focus-within:shadow-md",!_&&{hidden:!v,"right-0":"right"===u,"min-w-full":!0},l),role:"listbox",ref:w,id:C,"aria-multiselectable":f,"aria-labelledby":null!=s?s:E,"aria-orientation":"vertical","data-testid":"select-listbox","data-listbox-open":v,popover:_?"auto":void 0,onScroll:d,children:v&&o},void 0,0,{fileName:Rn,lineNumber:607,columnNumber:9},this)},void 0,0,{fileName:Rn,lineNumber:598,columnNumber:7},this)]},void 0,0,{fileName:Rn,lineNumber:550,columnNumber:5},this)}Object.assign((function(e){return Mn({
64
64
  ...e,multiple:!1})}),{Option:Pn,displayName:"Select"}),Object.assign((function(e){return Mn({...e,multiple:!0})}),{Option:Pn,displayName:"MultiSelect"}),Pe({}),Pe(null);var In="/home/runner/work/frontend-shared/frontend-shared/src/components/feedback/Callout.tsx";function Bn({children:e,classes:t,elementRef:n,icon:o,status:i="notice",size:r="md",variant:s="outlined",unstyled:a=!1,...l}){const c=!a,d=c&&"custom"!==s,h=c&&"custom"!==r;let u=o;if(!u)switch(i){case"success":u=qt;break;case"error":u=Lt;break;default:u=Vt}const f=d&&h;return Ct("div",{"data-component":"Callout",...l,ref:n,className:xt(c&&"flex items-center border",d&&{"rounded border":!0,"shadow hover:shadow-md cursor-pointer":"raised"===s,"border-yellow-notice":"notice"===i,"border-green-success":"success"===i,"border-red-error":"error"===i},d&&{"bg-yellow-notice":"notice"===i&&f,"bg-green-success":"success"===i&&f,"bg-red-error":"error"===i&&f,"bg-white":!f},t),children:[f&&Ct("div",{className:xt({"p-2":"md"===r,"p-1.5":"sm"===r,"p-3":"lg"===r}),
65
65
  children:Ct(u,{"data-testid":"callout-icon",className:xt("text-white",{"w-[1.25em] h-[1.25em]":"md"===r,"w-[0.85em] h-[0.85em]":"sm"===r,"w-[1.5em] h-[1.5em]":"lg"===r})},void 0,0,{fileName:In,lineNumber:95,columnNumber:11},this)},void 0,0,{fileName:In,lineNumber:88,columnNumber:9},this),Ct("div",{className:xt(h&&{"p-2":"md"===r,"py-1.5 px-2":"sm"===r,"p-3":"lg"===r},c&&"grow",d&&"bg-white rounded-r"),children:e},void 0,0,{fileName:In,lineNumber:105,columnNumber:7},this)]},void 0,0,{fileName:In,lineNumber:64,columnNumber:5},this)}var Fn="/home/runner/work/frontend-shared/frontend-shared/src/components/feedback/ToastMessages.tsx";function Dn({message:e,onDismiss:t}){return Ct(Bn,{classes:xt({"sr-only":e.visuallyHidden}),status:e.type,onClick:()=>t(e.id),variant:"raised",children:e.message},void 0,0,{fileName:Fn,lineNumber:55,columnNumber:5},this)}const Hn=({direction:e,onTransitionEnd:t,children:n,transitionClasses:o={}})=>{const i="out"===e,r=Qe(null),s=Ge((()=>{
@@ -108,7 +108,7 @@ describe(e,t){return function(e,t){const n=[si,ei,ti,ni],o=[];for(const i of n)t
108
108
  return this._sideBySideActive}_activateSideBySide(e){const t=e+12,n=e=>parseInt(window.getComputedStyle(e).marginLeft,10);U((()=>{document.body.style.marginLeft="",document.body.style.marginRight="";const e=n(document.body);document.body.style.marginRight=`${t}px`;const o=function(e){const t=new Map,n=new Map,o=I.join(","),i=Array.from(e.querySelectorAll(o)).map((e=>({rect:e.getBoundingClientRect(),textLength:e.textContent.length}))).filter((({rect:e})=>e.width>0&&e.height>0)).sort(((e,t)=>t.textLength-e.textLength)).slice(0,15);if(i.forEach((({rect:e})=>{let o=t.get(e.left)??0;o+=1,t.set(e.left,o);let i=n.get(e.right)??0;i+=1,n.set(e.right,i)})),0===t.size||0===n.size)return null;const r=[...t.entries()].sort(((e,t)=>t[1]-e[1])),s=[...n.entries()].sort(((e,t)=>t[1]-e[1])),[a]=r[0],[l]=s[0];return{left:a,right:l}}(document.body);if(o){const i=Math.max(0,window.innerWidth-t-o.right);if(i>0){const e=Math.max(0,t-i);document.body.style.marginRight=`${e}px`}
109
109
  n(document.body)>e&&(document.body.style.marginLeft=`${e}px`),o.left<12&&(document.body.style.marginLeft="12px")}else document.body.style.marginLeft="",document.body.style.marginRight=""}))}_deactivateSideBySide(){U((()=>{document.body.style.marginLeft="",document.body.style.marginRight=""}))}async getMetadata(){return this._htmlMeta.getDocumentMetadata()}async uri(){return this._htmlMeta.uri()}async scrollToAnchor(e){const t=e.highlights?.[0];t&&await async function(e,{maxDuration:t=500}={}){const n=e.closest("body");n&&"BODY"!==n.tagName&&Object.defineProperty(n,"tagName",{value:"BODY",configurable:!0});const o=e.closest("details");o&&!o.hasAttribute("open")&&(o.open=!0),await new Promise((n=>mi(e,{time:t},n)))}(t)}}var vi,yi;var xi=function(){if(yi)return vi;yi=1
110
110
  ;var t=NaN,n="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof e&&e&&e.Object===Object&&e,c="object"==typeof self&&self&&self.Object===Object&&self,d=l||c||Function("return this")(),h=Object.prototype.toString,u=Math.max,f=Math.min,m=function(){return d.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&h.call(e)==n}(e))return t;if(g(e)){var l="function"==typeof e.valueOf?e.valueOf():e;e=g(l)?l+"":l}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var c=r.test(e);return c||s.test(e)?a(e.slice(2),c?2:8):i.test(e)?t:+e}return vi=function(e,t,n){var o,i,r,s,a,l,c=0,d=!1,h=!1,_=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=o,r=i;return o=i=void 0,c=t,s=e.apply(r,n)}function w(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-c>=r}
111
- function v(){var e=m();if(w(e))return y(e);a=setTimeout(v,function(e){var n=t-(e-l);return h?f(n,r-(e-c)):n}(e))}function y(e){return a=void 0,_&&o?b(e):(o=i=void 0,s)}function x(){var e=m(),n=w(e);if(o=arguments,i=this,l=e,n){if(void 0===a)return function(e){return c=e,a=setTimeout(v,t),d?b(e):s}(l);if(h)return a=setTimeout(v,t),b(l)}return void 0===a&&(a=setTimeout(v,t)),s}return t=p(t)||0,g(n)&&(d=!!n.leading,r=(h="maxWait"in n)?u(p(n.maxWait)||0,t):r,_="trailing"in n?!!n.trailing:_),x.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=l=i=a=void 0},x.flush=function(){return void 0===a?s:y(m())},x},vi}(),Ni=t(xi);function Ci(e,t,n,o=0){let i=o;for(;i<e.length&&t>0;)n(e[i])&&--t,++i;return i}function Si(e,t,n,o){let i=0;for(let r=n;r<o;r++)t(e[r])&&++i;return i}function Ei(e,t,n,o,i){const r=Si(e,i,0,n),s=Si(e,i,n,o);let a=Ci(t,r,i);for(;a<t.length&&!i(t[a]);)++a;return[a,Ci(t,s,i,a)]}const ki={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},Ai=new Map,Ri=new Map;function Ti(e,t){return`${e}:${t}`}function Pi(e){
111
+ function v(){var e=m();if(w(e))return y(e);a=setTimeout(v,function(e){var n=t-(e-l);return h?f(n,r-(e-c)):n}(e))}function y(e){return a=void 0,_&&o?b(e):(o=i=void 0,s)}function x(){var e=m(),n=w(e);if(o=arguments,i=this,l=e,n){if(void 0===a)return function(e){return c=e,a=setTimeout(v,t),d?b(e):s}(l);if(h)return a=setTimeout(v,t),b(l)}return void 0===a&&(a=setTimeout(v,t)),s}return t=p(t)||0,g(n)&&(d=!!n.leading,r=(h="maxWait"in n)?u(p(n.maxWait)||0,t):r,_="trailing"in n?!!n.trailing:_),x.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=l=i=a=void 0},x.flush=function(){return void 0===a?s:y(m())},x},vi}(),Ni=t(xi);function Ci(e,t,n,o=0){let i=o;for(;i<e.length&&t>0;)n(e[i])&&--t,++i;return i}function Si(e,t,n,o){let i=0;for(let r=n;r<o;r++)t(e[r])&&++i;return i}function Ei(e,t,n,o,i){const r=Si(e,i,0,n),s=Si(e,i,n,o);let a=Ci(t,r,i);for(;a<t.length&&!i(t[a]);)++a;return[a,Ci(t,s,i,a)]}const ki={INITIAL:0,FINISHED:3},Ai=new Map,Ri=new Map;function Ti(e,t){return`${e}:${t}`}function Pi(e){
112
112
  const t="closest"in e?e:e.parentElement;return t?.closest(".textLayer")??null}function Li(){return PDFViewerApplication.pdfViewer}async function Oi(e){const t=Li();let n=t.getPageView(e);return n&&n.pdfPage||(n=await new Promise((n=>{const o=()=>{t.eventBus?t.eventBus.off("pagesloaded",o):document.removeEventListener("pagesloaded",o),n(t.getPageView(e))};t.eventBus?t.eventBus.on("pagesloaded",o):document.addEventListener("pagesloaded",o)}))),n}function Mi(e){const t=Ai.get(e);if(t)return t;const n=(async()=>{const t=await Oi(e);return(await t.pdfPage.getTextContent({normalizeWhitespace:!0})).items.map((e=>e.str)).join("")})();return Ai.set(e,n),n}async function Ii(e){const t=Li();let n=0,o=0,i="";for(let r=0;r<t.pagesCount;r++)if(i=await Mi(r),n=o,o+=i.length,o>=e)return{index:r,offset:n,text:i};return{index:t.pagesCount-1,offset:n,text:i}}function Bi(e){switch(e){case" ":case"\f":case"\n":case"\r":case"\t":case"\v":case" ":return!0;default:return!1}}const Fi=e=>!Bi(e);function Di(e){
113
113
  return void 0!==e.renderingDone?e.renderingDone:!!e.div&&null!==e.div.querySelector(".endOfContent")}async function Hi(e,t,n){const[o,i]=await Promise.all([Oi(e),Mi(e)]);if(o.renderingState===ki.FINISHED&&o.textLayer&&Di(o.textLayer)){const e=o.textLayer.textLayerDiv??o.textLayer.div;if(!e)throw new Error("Unable to find PDF.js text layer root");const r=e.textContent,[s,a]=Ei(i,r,t,n,Fi);Vi(r.slice(s,a))!==Vi(i.slice(t,n))&&Mo("Text layer text does not match page text. Highlights will be mis-aligned.");const l=new lo(e,s),c=new lo(e,a);return new co(l,c).toRange()}const r=function(e){let t=e.querySelector(ho);return t||(t=document.createElement("span"),t.classList.add("annotator-placeholder"),t.textContent="Loading annotations...",e.appendChild(t),t)}(o.div),s=document.createRange();return s.setStartBefore(r),s.setEndAfter(r),s}function Vi(e){let t="";for(let n=0;n<e.length;n++){const o=e[n];Bi(o)||(t+=o)}return t}async function Ui(e,t){const n=t.find((e=>"TextQuoteSelector"===e.type))
114
114
  ;if(!n)throw new Error("No quote selector found");const o=t.find((e=>"TextPositionSelector"===e.type));if(o){try{const{index:e,offset:t,text:i}=await Ii(o.start),r=o.start-t,s=o.end-t,a=i.substring(r,s);if(n.exact!==a)throw new Error("quote mismatch");return await Hi(e,r,s)}catch{}try{const e=Ti(n.exact,o.start),t=Ri.get(e);if(t){const{pageIndex:e,anchor:n}=t;return await Hi(e,n.start,n.end)}}catch{}}return async function(e,t){const n=Li().pagesCount,o=Array(n).fill(0).map(((e,t)=>t));let i,r;if(t){const{index:e,offset:n}=await Ii(t);i=e,r=t-n,o.sort(((t,n)=>Math.abs(t-e)-Math.abs(n-e)))}const s=void 0!==e.prefix?Vi(e.prefix):void 0,a=void 0!==e.suffix?Vi(e.suffix):void 0,l=Vi(e.exact);let c;for(const e of o){const t=await Mi(e),n=Vi(t);let o;void 0!==i&&void 0!==r&&(e<i?o=n.length:e===i?[o]=Ei(t,n,r,r,Fi):o=0);const d=Qo(n,l,{prefix:s,suffix:a,hint:o});if(d&&(!c||d.score>c.match.score)){const[o,i]=Ei(n,t,d.start,d.end,Fi);c={page:e,match:{start:o,end:i,score:d.score}}
@@ -144,7 +144,7 @@ this._sidebarRPC.connect(e)})),this._sendDocumentInfo()}destroy(){var e;this._po
144
144
  const o=await this._integration.anchor(this.element,t.selector),i=co.fromRange(o);n={annotation:e,target:t,range:i}}catch{n={annotation:e,target:t}}return n})));if(!this._annotations.has(e.$tag))return[];for(const e of n)t(e);return e.$orphan=n.length>0&&n.every((e=>e.target.selector&&!e.range)),this._updateAnchors(this.anchors.concat(n),!0),this._sidebarRPC.call("syncAnchoringStatus",e),n}detach(e,t=!0){this._annotations.delete(e);const n=[];for(const t of this.anchors)t.annotation.$tag!==e?n.push(t):t.highlights&&No(t.highlights);this._updateAnchors(n,t)}_updateAnchors(e,t){this.anchors=e,this._clusterToolbar?.scheduleClusterUpdates(),t&&this._bucketBarClient.update(this.anchors)}async createAnnotation({highlight:e=!1}={}){const t=this.selectedRanges;this.selectedRanges=[];const n=await this.getDocumentInfo(),o=this.element,i=(await Promise.all(t.map((e=>this._integration.describe(o,e))))).map((e=>({source:n.uri,selector:e}))),s={uri:n.uri,document:n.metadata,target:i,$highlight:e,
145
145
  $cluster:e?"user-highlights":"user-annotations",$tag:"a:"+r(8)};return this._sidebarRPC.call("createAnnotation",s),this.anchor(s),xr(),s}_hoverAnnotations(e){this._hoveredAnnotations.clear(),e.forEach((e=>this._hoveredAnnotations.add(e)));for(const t of this.anchors)if(t.highlights){const n=e.includes(t.annotation.$tag);Co(t.highlights,n)}this._sidebarRPC.call("hoverAnnotations",e)}_onSelection(e){const t=this._integration.getAnnotatableRange(e);if(!t)return void this._onClearSelection();const n=document.getSelection(),o=go(n),i=bo(n);i?(this.selectedRanges=[t],this._hostRPC.call("textSelected"),this._adder.annotationsForSelection=wr(),this._isAdderVisible=!0,this._adder.show(i,o)):this._onClearSelection()}_onClearSelection(){this._isAdderVisible=!1,this._adder.hide(),this.selectedRanges=[],this._informHostOnNextSelectionClear&&this._hostRPC.call("textUnselected"),this._informHostOnNextSelectionClear=!0}selectAnnotations(e,{toggle:t=!1,focusInSidebar:n=!1}={}){
146
146
  t?this._sidebarRPC.call("toggleAnnotationSelection",e):this._sidebarRPC.call("showAnnotations",e,n),this._sidebarRPC.call("openSidebar")}setHighlightsVisible(e,t=!0){!function(e,t){e.classList.toggle("hypothesis-highlights-always-on",t)}(this.element,e),this._highlightsVisible=e,t&&this._hostRPC.call("highlightsVisibleChanged",e)}get highlightsVisible(){return this._highlightsVisible}fitSideBySide(e){this._sidebarLayout=e,this._integration.fitSideBySide(e)}get hoveredAnnotationTags(){return this._hoveredAnnotations}_handleShortcut(e){lt(e,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}_setOutsideAssignmentNoticeVisible(e){this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new pr(this.element)),this._outsideAssignmentNotice.setVisible(e)}}function Sr(e,t){const n=new URL(e),o=new URLSearchParams;return o.append("config",JSON.stringify(t)),n.hash=o.toString(),n.toString()}function Er(e,t){const n={}
147
- ;for(const[e,o]of Object.entries(t))"notebookAppUrl"!==e&&"sidebarAppUrl"!==e&&null!=o&&(n[e]=o);n.origin=new URL(e).origin,n.version="1.1540.0";const o=new URL(window.location.href);if(o.hash="",n.hostURL=o.toString(),Array.isArray(n.services)&&n.services?.length>0){const e=n.services[0];e.onLoginRequest&&(e.onLoginRequestProvided=!0),e.onLogoutRequest&&(e.onLogoutRequestProvided=!0),e.onSignupRequest&&(e.onSignupRequestProvided=!0),e.onProfileRequest&&(e.onProfileRequestProvided=!0),e.onHelpRequest&&(e.onHelpRequestProvided=!0)}return n}function kr({closed:e,onClose:t,children:n,"data-testid":o,"aria-label":i}){const r=Qe(null);return Xe((()=>{e?r.current?.close():r.current?.showModal()}),[e]),Xe((()=>{const e=r.current;return e?.addEventListener("cancel",t),()=>{e?.removeEventListener("cancel",t)}}),[t]),Ct("dialog",{ref:r,className:"relative w-full h-full backdrop:bg-black/50","data-testid":o,"aria-label":i,children:n})}function Ar({closed:e,children:t,...n}){return Ct("div",{...n,
147
+ ;for(const[e,o]of Object.entries(t))"notebookAppUrl"!==e&&"sidebarAppUrl"!==e&&null!=o&&(n[e]=o);n.origin=new URL(e).origin,n.version="1.1542.0";const o=new URL(window.location.href);if(o.hash="",n.hostURL=o.toString(),Array.isArray(n.services)&&n.services?.length>0){const e=n.services[0];e.onLoginRequest&&(e.onLoginRequestProvided=!0),e.onLogoutRequest&&(e.onLogoutRequestProvided=!0),e.onSignupRequest&&(e.onSignupRequestProvided=!0),e.onProfileRequest&&(e.onProfileRequestProvided=!0),e.onHelpRequest&&(e.onHelpRequestProvided=!0)}return n}function kr({closed:e,onClose:t,children:n,"data-testid":o,"aria-label":i}){const r=Qe(null);return Xe((()=>{e?r.current?.close():r.current?.showModal()}),[e]),Xe((()=>{const e=r.current;return e?.addEventListener("cancel",t),()=>{e?.removeEventListener("cancel",t)}}),[t]),Ct("dialog",{ref:r,className:"relative w-full h-full backdrop:bg-black/50","data-testid":o,"aria-label":i,children:n})}function Ar({closed:e,children:t,...n}){return Ct("div",{...n,
148
148
  className:xt("fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50",{hidden:e}),children:Ct("div",{className:"relative w-full h-full",children:t})})}function Rr({document_:e=document,...t}){return Ct(Ge((()=>function(e){return"function"==typeof e.createElement("dialog").showModal}(e)?kr:Ar),[e]),{...t})}function Tr({config:e,groupId:t}){return Ct("iframe",{title:"Hypothesis annotation notebook",className:"h-full w-full border-0",allow:"fullscreen; clipboard-write",src:Sr(e.notebookAppUrl,{...Er(e.notebookAppUrl,e),group:t})})}function Pr({eventBus:e,config:t}){const[n,o]=je(0),[i,r]=je(!0),[s,a]=je(null),l=Qe(""),c=Qe(null);Xe((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),Xe((()=>{document.body.style.overflow=i?l.current:"hidden"}),[i]),Xe((()=>{const t=e.createEmitter();return t.subscribe("openNotebook",(e=>{r(!1),o((e=>e+1)),a(e)})),c.current=t,()=>{t.destroy()}}),[e]);const d=Ye((()=>{r(!0),c.current?.publish("closeNotebook")}),[])
149
149
  ;return null===s?null:Ct(Rr,{closed:i,onClose:d,"data-testid":"notebook-outer","aria-label":"Hypothesis notebook",children:[Ct("div",{className:"absolute right-0 m-3",children:Ct(vn,{title:"Close notebook",onClick:d,variant:"dark",classes:xt("!bg-transparent enabled:hover:!bg-grey-3"),"data-testid":"close-button",children:Ct(Lt,{className:"w-4 h-4"})})}),Ct(Tr,{config:t,groupId:s},n)]})}class Lr{constructor(e,t,n){this._container=new Yn("notebook",(()=>Ct(Pr,{eventBus:t,config:n}))),e.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function Or({eventBus:e,config:t}){const[n,o]=je(!0),i=Qe(null);Xe((()=>{const t=e.createEmitter();return t.subscribe("openProfile",(()=>{o(!1)})),i.current=t,()=>{t.destroy()}}),[e]);const r=()=>{o(!0),i.current?.publish("closeProfile")};return n?null:Ct(Rr,{closed:n,onClose:r,"data-testid":"profile-outer","aria-label":"Hypothesis profile",children:[Ct("div",{className:"absolute right-0 m-3",children:Ct(vn,{
150
150
  title:"Close profile dialog",onClick:r,variant:"dark",classes:xt("!bg-transparent enabled:hover:!bg-grey-3"),children:Ct(Lt,{className:"w-4 h-4"})})}),Ct("iframe",{title:"Hypothesis profile",className:"h-full w-full border-0",src:t.profileAppUrl})]})}class Mr{constructor(e,t,n){this._container=new Yn("profile",(()=>Ct(Or,{eventBus:t,config:n}))),e.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function Ir({above:e,below:t,buckets:n,onFocusAnnotations:o,onScrollToAnnotation:i,onSelectAnnotations:r}){const s=e.anchors.length>0,a=t.anchors.length>0,l=e=>e.anchors.map((e=>e.tag));return Ct("ul",{className:"relative",children:[s&&Ct("li",{className:"absolute right-0 pointer-events-auto mt-[-11px]",style:{top:e.position},children:Ct(Wn,{"data-testid":"up-navigation-button",direction:"up",onClick:()=>{const t=[...e.anchors].sort(((e,t)=>e.bottom-t.bottom)),n=t[t.length-1];i(n.tag)},onBlur:()=>o([]),onFocus:()=>o(l(e)),onMouseEnter:()=>o(l(e)),onMouseOut:()=>o([]),