hypothesis 1.1689.0 → 1.1691.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.
@@ -1 +1 @@
1
- !function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?15da73","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?ee8f84","styles/annotator.css":"styles/annotator.css?d8c51f","styles/annotator.css.map":"styles/annotator.css.map?4a856f","styles/highlights.css":"styles/highlights.css?470b72","styles/highlights.css.map":"styles/highlights.css.map?d94fe5","styles/katex.min.css.map":"styles/katex.min.css.map?e7e03f","styles/katex.min.css":"styles/katex.min.css?921c28","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?706585","styles/sidebar.css":"styles/sidebar.css?77e586","styles/ui-playground.css":"styles/ui-playground.css?8f1882","styles/ui-playground.css.map":"styles/ui-playground.css.map?af04ff","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?53f11e","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?66746b","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?f3e15d","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?56dc30"};function e(s){s.setAttribute("data-hypothesis-asset","")}function t(s,t){var r=s.createElement("link");r.rel="stylesheet",r.type="text/css",r.href=t,e(r),s.head.appendChild(r)}function r(s,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.esModule,o=void 0===n||n,i=r.forceReload,a=void 0!==i&&i,l=s.createElement("script");o&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function n(s,t,r,n){var o=s.createElement("link");o.rel=t,o.href=n,o.type="application/annotator+".concat(r),e(o),s.head.appendChild(o)}function o(s,t,r){var n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).crossOrigin,o=s.createElement("link");o.rel="preload",o.as=t,o.href=r,n&&(o.crossOrigin="anonymous"),"fetch"===t&&(o.crossOrigin="anonymous"),e(o),s.head.appendChild(o)}function i(s,e){return s.assetRoot+"build/"+s.manifest[e]}function a(s){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===s.indexOf("{"))return s;var t=function(){var s,e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).currentScript;return t?(s=t.src,(e=s.match(/(https?):\/\/([^:/]+)/))?{protocol:e[1],hostname:e[2]}:null):null}(e);if(!t)throw new Error("Could not process URL template because script origin is unknown");return s=(s=s.replace("{current_host}",t.hostname)).replace("{current_scheme}",t.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 e={},t=s.querySelectorAll("script.js-hypothesis-config"),r=0;r<t.length;r++){var n=void 0;try{n=JSON.parse(t[r].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),n={}}Object.assign(e,n)}return e}(document),c=a(l.assetRoot||"__ASSET_ROOT__");if(document.querySelector("hypothesis-app")){!function(s,e){o(s,"fetch",e.apiUrl),o(s,"fetch",e.apiUrl+"links");for(var n=0,a=["scripts/sidebar.bundle.js"];n<a.length;n++)r(s,i(e,a[n]),{esModule:!0});for(var l=0,c=["styles/katex.min.css","styles/sidebar.css"];l<c.length;l++)t(s,i(e,c[l]))}(document,{assetRoot:c,manifest:s,apiUrl:l.apiUrl})}else{var p=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(p&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(p))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,u=a(d.notebookAppUrl||"__NOTEBOOK_APP_URL__"),h=a(d.profileAppUrl||"__PROFILE_APP_URL__"),y=a(d.sidebarAppUrl||"__SIDEBAR_APP_URL__");!function(s,e){if(!s.querySelector('link[type="application/annotator+html"]')){n(s,"sidebar","html",e.sidebarAppUrl),n(s,"notebook","html",e.notebookAppUrl),n(s,"profile","html",e.profileAppUrl),o(s,"style",i(e,"styles/annotator.css"),{crossOrigin:!0}),n(s,"hypothesis-client","javascript",e.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)r(s,i(e,l[a]),{esModule:!1});var c=[];void 0!==window.PDFViewerApplication&&c.push("styles/pdfjs-overrides.css"),c.push("styles/highlights.css");for(var p=0,d=c;p<d.length;p++)t(s,i(e,d[p]))}}(document,{assetRoot:c,manifest:s,notebookAppUrl:u,profileAppUrl:h,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?ca9b6b","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?203fea","styles/annotator.css":"styles/annotator.css?151b37","styles/annotator.css.map":"styles/annotator.css.map?aeb98c","styles/highlights.css":"styles/highlights.css?ef86d1","styles/highlights.css.map":"styles/highlights.css.map?6ce8dd","styles/katex.min.css":"styles/katex.min.css?7fbc4d","styles/katex.min.css.map":"styles/katex.min.css.map?6974c9","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?1e1216","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?5a12c5","styles/sidebar.css":"styles/sidebar.css?425998","styles/sidebar.css.map":"styles/sidebar.css.map?3f0aaf","styles/ui-playground.css":"styles/ui-playground.css?1dc863","styles/ui-playground.css.map":"styles/ui-playground.css.map?c54101","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?661ed3","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?b7580a","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?1dd224","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?a8f546"};function e(s){s.setAttribute("data-hypothesis-asset","")}function t(s,t){var r=s.createElement("link");r.rel="stylesheet",r.type="text/css",r.href=t,e(r),s.head.appendChild(r)}function r(s,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.esModule,o=void 0===n||n,i=r.forceReload,a=void 0!==i&&i,l=s.createElement("script");o&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function n(s,t,r,n){var o=s.createElement("link");o.rel=t,o.href=n,o.type="application/annotator+".concat(r),e(o),s.head.appendChild(o)}function o(s,t,r){var n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).crossOrigin,o=s.createElement("link");o.rel="preload",o.as=t,o.href=r,n&&(o.crossOrigin="anonymous"),"fetch"===t&&(o.crossOrigin="anonymous"),e(o),s.head.appendChild(o)}function i(s,e){return s.assetRoot+"build/"+s.manifest[e]}function a(s){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===s.indexOf("{"))return s;var t=function(){var s,e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).currentScript;return t?(s=t.src,(e=s.match(/(https?):\/\/([^:/]+)/))?{protocol:e[1],hostname:e[2]}:null):null}(e);if(!t)throw new Error("Could not process URL template because script origin is unknown");return s=(s=s.replace("{current_host}",t.hostname)).replace("{current_scheme}",t.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 e={},t=s.querySelectorAll("script.js-hypothesis-config"),r=0;r<t.length;r++){var n=void 0;try{n=JSON.parse(t[r].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),n={}}Object.assign(e,n)}return e}(document),c=a(l.assetRoot||"__ASSET_ROOT__");if(document.querySelector("hypothesis-app")){!function(s,e){o(s,"fetch",e.apiUrl),o(s,"fetch",e.apiUrl+"links");for(var n=0,a=["scripts/sidebar.bundle.js"];n<a.length;n++)r(s,i(e,a[n]),{esModule:!0});for(var l=0,c=["styles/katex.min.css","styles/sidebar.css"];l<c.length;l++)t(s,i(e,c[l]))}(document,{assetRoot:c,manifest:s,apiUrl:l.apiUrl})}else{var p=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(p&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(p))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,u=a(d.notebookAppUrl||"__NOTEBOOK_APP_URL__"),h=a(d.profileAppUrl||"__PROFILE_APP_URL__"),y=a(d.sidebarAppUrl||"__SIDEBAR_APP_URL__");!function(s,e){if(!s.querySelector('link[type="application/annotator+html"]')){n(s,"sidebar","html",e.sidebarAppUrl),n(s,"notebook","html",e.notebookAppUrl),n(s,"profile","html",e.profileAppUrl),o(s,"style",i(e,"styles/annotator.css"),{crossOrigin:!0}),n(s,"hypothesis-client","javascript",e.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)r(s,i(e,l[a]),{esModule:!1});var c=[];void 0!==window.PDFViewerApplication&&c.push("styles/pdfjs-overrides.css"),c.push("styles/highlights.css");for(var p=0,d=c;p<d.length;p++)t(s,i(e,d[p]))}}(document,{assetRoot:c,manifest:s,notebookAppUrl:u,profileAppUrl:h,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/.")}();
package/build/boot.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?15da73","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?ee8f84","styles/annotator.css":"styles/annotator.css?d8c51f","styles/annotator.css.map":"styles/annotator.css.map?4a856f","styles/highlights.css":"styles/highlights.css?470b72","styles/highlights.css.map":"styles/highlights.css.map?d94fe5","styles/katex.min.css.map":"styles/katex.min.css.map?e7e03f","styles/katex.min.css":"styles/katex.min.css?921c28","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?706585","styles/sidebar.css":"styles/sidebar.css?77e586","styles/ui-playground.css":"styles/ui-playground.css?8f1882","styles/ui-playground.css.map":"styles/ui-playground.css.map?af04ff","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?53f11e","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?66746b","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?f3e15d","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?56dc30"};function e(s){s.setAttribute("data-hypothesis-asset","")}function t(s,t){var r=s.createElement("link");r.rel="stylesheet",r.type="text/css",r.href=t,e(r),s.head.appendChild(r)}function r(s,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.esModule,o=void 0===n||n,i=r.forceReload,a=void 0!==i&&i,l=s.createElement("script");o&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function n(s,t,r,n){var o=s.createElement("link");o.rel=t,o.href=n,o.type="application/annotator+".concat(r),e(o),s.head.appendChild(o)}function o(s,t,r){var n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).crossOrigin,o=s.createElement("link");o.rel="preload",o.as=t,o.href=r,n&&(o.crossOrigin="anonymous"),"fetch"===t&&(o.crossOrigin="anonymous"),e(o),s.head.appendChild(o)}function i(s,e){return s.assetRoot+"build/"+s.manifest[e]}function a(s){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===s.indexOf("{"))return s;var t=function(){var s,e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).currentScript;return t?(s=t.src,(e=s.match(/(https?):\/\/([^:/]+)/))?{protocol:e[1],hostname:e[2]}:null):null}(e);if(!t)throw new Error("Could not process URL template because script origin is unknown");return s=(s=s.replace("{current_host}",t.hostname)).replace("{current_scheme}",t.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 e={},t=s.querySelectorAll("script.js-hypothesis-config"),r=0;r<t.length;r++){var n=void 0;try{n=JSON.parse(t[r].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),n={}}Object.assign(e,n)}return e}(document),c=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1689.0/");if(document.querySelector("hypothesis-app")){!function(s,e){o(s,"fetch",e.apiUrl),o(s,"fetch",e.apiUrl+"links");for(var n=0,a=["scripts/sidebar.bundle.js"];n<a.length;n++)r(s,i(e,a[n]),{esModule:!0});for(var l=0,c=["styles/katex.min.css","styles/sidebar.css"];l<c.length;l++)t(s,i(e,c[l]))}(document,{assetRoot:c,manifest:s,apiUrl:l.apiUrl})}else{var p=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(p&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(p))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,u=a(d.notebookAppUrl||"https://hypothes.is/notebook"),h=a(d.profileAppUrl||"https://hypothes.is/user-profile"),y=a(d.sidebarAppUrl||"https://hypothes.is/app.html");!function(s,e){if(!s.querySelector('link[type="application/annotator+html"]')){n(s,"sidebar","html",e.sidebarAppUrl),n(s,"notebook","html",e.notebookAppUrl),n(s,"profile","html",e.profileAppUrl),o(s,"style",i(e,"styles/annotator.css"),{crossOrigin:!0}),n(s,"hypothesis-client","javascript",e.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)r(s,i(e,l[a]),{esModule:!1});var c=[];void 0!==window.PDFViewerApplication&&c.push("styles/pdfjs-overrides.css"),c.push("styles/highlights.css");for(var p=0,d=c;p<d.length;p++)t(s,i(e,d[p]))}}(document,{assetRoot:c,manifest:s,notebookAppUrl:u,profileAppUrl:h,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?ca9b6b","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?203fea","styles/annotator.css":"styles/annotator.css?151b37","styles/annotator.css.map":"styles/annotator.css.map?aeb98c","styles/highlights.css":"styles/highlights.css?ef86d1","styles/highlights.css.map":"styles/highlights.css.map?6ce8dd","styles/katex.min.css":"styles/katex.min.css?7fbc4d","styles/katex.min.css.map":"styles/katex.min.css.map?6974c9","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?1e1216","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?5a12c5","styles/sidebar.css":"styles/sidebar.css?425998","styles/sidebar.css.map":"styles/sidebar.css.map?3f0aaf","styles/ui-playground.css":"styles/ui-playground.css?1dc863","styles/ui-playground.css.map":"styles/ui-playground.css.map?c54101","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?661ed3","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?b7580a","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?1dd224","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?a8f546"};function e(s){s.setAttribute("data-hypothesis-asset","")}function t(s,t){var r=s.createElement("link");r.rel="stylesheet",r.type="text/css",r.href=t,e(r),s.head.appendChild(r)}function r(s,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.esModule,o=void 0===n||n,i=r.forceReload,a=void 0!==i&&i,l=s.createElement("script");o&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function n(s,t,r,n){var o=s.createElement("link");o.rel=t,o.href=n,o.type="application/annotator+".concat(r),e(o),s.head.appendChild(o)}function o(s,t,r){var n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).crossOrigin,o=s.createElement("link");o.rel="preload",o.as=t,o.href=r,n&&(o.crossOrigin="anonymous"),"fetch"===t&&(o.crossOrigin="anonymous"),e(o),s.head.appendChild(o)}function i(s,e){return s.assetRoot+"build/"+s.manifest[e]}function a(s){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===s.indexOf("{"))return s;var t=function(){var s,e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).currentScript;return t?(s=t.src,(e=s.match(/(https?):\/\/([^:/]+)/))?{protocol:e[1],hostname:e[2]}:null):null}(e);if(!t)throw new Error("Could not process URL template because script origin is unknown");return s=(s=s.replace("{current_host}",t.hostname)).replace("{current_scheme}",t.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 e={},t=s.querySelectorAll("script.js-hypothesis-config"),r=0;r<t.length;r++){var n=void 0;try{n=JSON.parse(t[r].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),n={}}Object.assign(e,n)}return e}(document),c=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1691.0/");if(document.querySelector("hypothesis-app")){!function(s,e){o(s,"fetch",e.apiUrl),o(s,"fetch",e.apiUrl+"links");for(var n=0,a=["scripts/sidebar.bundle.js"];n<a.length;n++)r(s,i(e,a[n]),{esModule:!0});for(var l=0,c=["styles/katex.min.css","styles/sidebar.css"];l<c.length;l++)t(s,i(e,c[l]))}(document,{assetRoot:c,manifest:s,apiUrl:l.apiUrl})}else{var p=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(p&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(p))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,u=a(d.notebookAppUrl||"https://hypothes.is/notebook"),h=a(d.profileAppUrl||"https://hypothes.is/user-profile"),y=a(d.sidebarAppUrl||"https://hypothes.is/app.html");!function(s,e){if(!s.querySelector('link[type="application/annotator+html"]')){n(s,"sidebar","html",e.sidebarAppUrl),n(s,"notebook","html",e.notebookAppUrl),n(s,"profile","html",e.profileAppUrl),o(s,"style",i(e,"styles/annotator.css"),{crossOrigin:!0}),n(s,"hypothesis-client","javascript",e.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)r(s,i(e,l[a]),{esModule:!1});var c=[];void 0!==window.PDFViewerApplication&&c.push("styles/pdfjs-overrides.css"),c.push("styles/highlights.css");for(var p=0,d=c;p<d.length;p++)t(s,i(e,d[p]))}}(document,{assetRoot:c,manifest:s,notebookAppUrl:u,profileAppUrl:h,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?15da73",
3
- "scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?ee8f84",
4
- "styles/annotator.css": "styles/annotator.css?d8c51f",
5
- "styles/annotator.css.map": "styles/annotator.css.map?4a856f",
6
- "styles/highlights.css": "styles/highlights.css?470b72",
7
- "styles/highlights.css.map": "styles/highlights.css.map?d94fe5",
8
- "styles/katex.min.css.map": "styles/katex.min.css.map?e7e03f",
9
- "styles/katex.min.css": "styles/katex.min.css?921c28",
10
- "styles/pdfjs-overrides.css": "styles/pdfjs-overrides.css?c95edf",
11
- "styles/pdfjs-overrides.css.map": "styles/pdfjs-overrides.css.map?1d8ac6",
12
- "styles/sidebar.css.map": "styles/sidebar.css.map?706585",
13
- "styles/sidebar.css": "styles/sidebar.css?77e586",
14
- "styles/ui-playground.css": "styles/ui-playground.css?8f1882",
15
- "styles/ui-playground.css.map": "styles/ui-playground.css.map?af04ff",
16
- "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?53f11e",
17
- "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?66746b",
18
- "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?f3e15d",
19
- "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?56dc30"
2
+ "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?ca9b6b",
3
+ "scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?203fea",
4
+ "styles/annotator.css": "styles/annotator.css?151b37",
5
+ "styles/annotator.css.map": "styles/annotator.css.map?aeb98c",
6
+ "styles/highlights.css": "styles/highlights.css?ef86d1",
7
+ "styles/highlights.css.map": "styles/highlights.css.map?6ce8dd",
8
+ "styles/katex.min.css": "styles/katex.min.css?7fbc4d",
9
+ "styles/katex.min.css.map": "styles/katex.min.css.map?6974c9",
10
+ "styles/pdfjs-overrides.css": "styles/pdfjs-overrides.css?1e1216",
11
+ "styles/pdfjs-overrides.css.map": "styles/pdfjs-overrides.css.map?5a12c5",
12
+ "styles/sidebar.css": "styles/sidebar.css?425998",
13
+ "styles/sidebar.css.map": "styles/sidebar.css.map?3f0aaf",
14
+ "styles/ui-playground.css": "styles/ui-playground.css?1dc863",
15
+ "styles/ui-playground.css.map": "styles/ui-playground.css.map?c54101",
16
+ "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?661ed3",
17
+ "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?b7580a",
18
+ "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?1dd224",
19
+ "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?a8f546"
20
20
  }
@@ -29,21 +29,21 @@ function $e(e){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",he
29
29
  "data-component":"PinIcon",...e,children:Se("g",{"fill-rule":"evenodd",children:[Se("path",{fill:"none",d:"M0 0h16v16H0z"}),Se("path",{fill:"currentColor",d:"M3 1a1 1 0 0 1 1-1h8a1 1 0 1 1 0 2 .5.5 0 0 0-.5.5v.146a.5.5 0 0 0 .053.224l1.341 2.683c.07.139.106.292.106.447v3a1 1 0 0 1-1 1H9.024l.093 4.977a1 1 0 0 1-2 .046L7.024 10H4a1 1 0 0 1-1-1V6a1 1 0 0 1 .106-.447L4.447 2.87a.5.5 0 0 0 .053-.224V2.5A.5.5 0 0 0 4 2a1 1 0 0 1-1-1m4 1a.5.5 0 0 0-.5.5V3a1 1 0 0 1-.106.447L5.053 6.13A.5.5 0 0 0 5 6.355V7.5a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5V6.354a.5.5 0 0 0-.053-.224L9.606 3.448A1 1 0 0 1 9.5 3v-.5A.5.5 0 0 0 9 2z","clip-rule":"evenodd"})]})})}function Ke(e){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"9","data-component":"PointerDownIcon",...e,children:Se("path",{stroke:"currentColor",d:"m15.5 0-7 8-8-8"})})}function Ge(e){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"9","data-component":"PointerUpIcon",...e,children:Se("path",{stroke:"currentColor",
30
30
  d:"m.5 9 7-8 8 8"})})}function Qe(e){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"RadioIcon",...e,children:Se("g",{"fill-rule":"evenodd",children:[Se("path",{fill:"none",d:"M0 0h16v16H0z"}),Se("path",{fill:"currentColor",d:"M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8","clip-rule":"evenodd"})]})})}function Je(e){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"RadioCheckedIcon",...e,children:Se("g",{"fill-rule":"evenodd",children:[Se("path",{fill:"none",d:"M0 0h16v16H0z"}),Se("path",{fill:"currentColor",d:"M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8","clip-rule":"evenodd"}),Se("path",{fill:"currentColor",d:"M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0"})]})})}function Ze(e){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16",
31
31
  "data-component":"SelectionIcon",...e,children:Se("g",{"fill-rule":"evenodd",children:[Se("path",{fill:"none",d:"M0 0h16v16H0z"}),Se("path",{fill:"currentColor",d:"M2.5 0h-1A1.5 1.5 0 0 0 0 1.5v1a1.5 1.5 0 0 0 1 1.415v8.17A1.5 1.5 0 0 0 0 13.5v1A1.5 1.5 0 0 0 1.5 16h1a1.5 1.5 0 0 0 1.415-1h8.17a1.5 1.5 0 0 0 1.415 1h1a1.5 1.5 0 0 0 1.5-1.5v-1a1.5 1.5 0 0 0-1-1.415v-8.17A1.5 1.5 0 0 0 16 2.5v-1A1.5 1.5 0 0 0 14.5 0h-1a1.5 1.5 0 0 0-1.415 1h-8.17A1.5 1.5 0 0 0 2.5 0m9.585 13c.151-.426.489-.764.915-.915v-8.17A1.5 1.5 0 0 1 12.085 3h-8.17c-.151.426-.489.764-.915.915v8.17c.426.151.764.489.915.915zM1 1.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zM1.5 13a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM13 1.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 11.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z","clip-rule":"evenodd"})]})})}function et(e){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",
32
- width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ShowIcon",...e,children:Se("g",{"fill-rule":"evenodd",children:[Se("path",{fill:"none",d:"M0 0h16v16H0z"}),Se("path",{fill:"currentColor",d:"M8 2c4.36 0 8 2.6 8 6s-3.64 6-8 6-8-2.6-8-6 3.64-6 8-6m0 2C4.628 4 2 5.877 2 8s2.628 4 6 4 6-1.877 6-4-2.628-4-6-4m2 4a2 2 0 1 0-4 0 2 2 0 0 0 4 0"})]})})}function tt({children:e,classes:t,elementRef:n,expanded:o,pressed:i,title:r,icon:s,size:a="md",variant:l="secondary",unstyled:c=!1,role:h,...d}){const u=!c,f=u&&"custom"!==l,p=u&&"custom"!==a,g={"aria-label":r};return"tab"===h?g["aria-selected"]=i:(g["aria-pressed"]=i,g["aria-expanded"]=o),Se("button",{role:null!=h?h:"button","data-component":"Button",type:"button",...g,...d,className:Ne({"focus-visible-ring transition-colors whitespace-nowrap flex items-center":u},f&&{"font-semibold rounded":!0,"text-grey-7 bg-grey-1 enabled:hover:text-grey-9 enabled:hover:bg-grey-2 aria-pressed:text-grey-9 aria-expanded:text-grey-9":"secondary"===l,
33
- "text-grey-1 bg-grey-7 enabled:hover:bg-grey-8 disabled:text-grey-4":"primary"===l},p&&{"p-2 gap-x-2":"md"===a,"p-1 gap-x-1":"xs"===a,"p-1.5 gap-x-1.5":"sm"===a,"p-2.5 gap-x-1.5":"lg"===a},t),ref:n,title:r,children:[s&&Se(s,{className:"w-em h-em"}),e]})}V({}),V({});const nt=Ne("input-group:border input-group:rounded-none","input-group:first:rounded-l input-group:last:rounded-r","input-group:ml-[-1px] input-group:first:ml-0","focus:z-1");function ot({children:e,classes:t,elementRef:n,pressed:o,expanded:i,icon:r,size:s="md",title:a,variant:l="secondary",unstyled:c=!1,...h}){const d=!c;return Se(tt,{"data-component":"IconButton",...h,classes:Ne({"focus-visible-ring transition-colors rounded whitespace-nowrap":d,"flex items-center justify-center":d},d&&nt,d&&"custom"!==l&&{"text-grey-7 bg-transparent enabled:hover:text-grey-9 aria-pressed:text-brand aria-expanded:text-brand":"secondary"===l,"text-brand bg-transparent enabled:hover:text-grey-9 disabled:text-grey-7":"primary"===l,
34
- "text-grey-7 bg-grey-2 enabled:hover:text-grey-9 enabled:hover:bg-grey-3 disabled:text-grey-5 aria-pressed:bg-grey-3 aria-expanded:bg-grey-3":"dark"===l},d&&"custom"!==s&&{"gap-x-2 touch:min-w-touch-minimum touch:min-h-touch-minimum":!0,"p-2":"md"===s,"p-1":"xs"===s,"p-1.5":"sm"===s,"p-2.5":"lg"===s},t),elementRef:n,title:a,pressed:o,expanded:i,unstyled:!0,children:[r&&Se(r,{className:"w-em h-em"}),e]})}function it({children:e,elementRef:t,containerRef:n,checked:o,icon:i,checkedIcon:r,disabled:s,onChange:a,id:l,type:c,containerClasses:h,...d}){const u=o?r:i;return Se("label",{className:Ne("relative flex items-center gap-x-1.5",{"cursor-pointer":!s,"opacity-70":s},h),htmlFor:l,"data-composite-component":"checkbox"===c?"Checkbox":"RadioButton",ref:n,children:[Se("input",{...d,type:c,ref:t,className:Ne("peer","absolute w-em h-em","opacity-[.00001]",{"cursor-pointer":!s}),checked:o,disabled:s,id:l,onChange:a}),Se(u,{className:Ne("peer-focus-visible:ring","w-em h-em","min-w-min min-h-min")}),Se("span",{children:e
35
- })]})}function rt({checked:e,defaultChecked:t=!1,icon:n=Ue,checkedIcon:o=ze,onChange:i,...r}){const s="boolean"==typeof e,[a,l]=te(t);return Se(it,{icon:n,checkedIcon:o,type:"checkbox",checked:s?e:a,onChange:function(e){null==i||i.call(this,e),s||l(e.target.checked)},...r})}const st=V(null);function at({value:e,children:t,subtitle:n,disabled:o}){const i=ae(st);if(!i)throw new Error("RadioGroup.Radio can only be used as RadioGroup child");const{selected:r,disabled:s=o,onChange:a}=i,l=!s&&r===e;return Se("div",{role:"radio","aria-checked":l,"aria-disabled":s,className:Ne("focus-visible-ring rounded-lg px-3 py-2 flex-1 group",{"hover:bg-grey-3/25 aria-checked:bg-grey-3/50 cursor-pointer":!s,"opacity-70":s}),"data-value":e,onClick:s?void 0:()=>a(e),onKeyDown:s?void 0:t=>{["Enter"," "].includes(t.key)&&(t.preventDefault(),a(e))},tabIndex:-1,children:[Se("div",{className:"flex items-center gap-x-1.5",children:[Se(l?Je:Qe,{}),Se("span",{className:Ne("flex items-center gap-x-1.5",{
36
- "text-grey-7 group-hover:text-grey-8 group-aria-checked:text-grey-8":!s}),children:t})]}),n&&Se("div",{className:Ne("pl-4 ml-1.5 mt-1 text-sm",{"text-grey-6 group-hover:text-grey-7 group-aria-checked:text-grey-7":!s}),children:n})]})}at.displayName="RadioGroup.Radio",Object.assign((function({direction:e="horizontal",children:t,selected:n,onChange:o,disabled:i,"aria-label":r,"aria-labelledby":s,name:a}){const l=ie(null);return be(l,{loop:!1,selector:'[role="radio"]:not([aria-disabled="true"])',focusElement:e=>{o(e.dataset.value),e.focus()}}),Se(st.Provider,{value:{selected:n,disabled:i,onChange:o},children:[Se("div",{"aria-label":r,"aria-labelledby":s,ref:l,role:"radiogroup",className:Ne("w-full flex gap-1.5",{"flex-col":"vertical"===e}),children:t}),a&&Se("input",{type:"hidden","data-testid":"hidden-input",name:a,value:n,disabled:i})]})}),{Radio:at,displayName:"RadioGroup"});const lt=3,ct=8;function ht(e,t,n,o,i){ne((()=>{if(!i)return()=>{};const t=e.current,o=e=>{
37
- "open"===e.oldState&&"closed"===e.newState&&n()};return t.addEventListener("toggle",o),()=>t.removeEventListener("toggle",o)}),[i,n,e]);const r=o&&!i;!function(e,t,{enabled:n=!0}={}){ne((()=>{if(!n)return()=>{};const o=document.body,i=new me,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])}(e,(e=>{e.composedPath().includes(t.current)||n()}),{enabled:r}),function(e,t,{enabled:n=!0}={}){ne((()=>{if(!n)return()=>{};const o=document.body,i=new me;return i.add(o,"keydown",(n=>{e.includes(n.key)&&t(n)})),()=>{i.removeAll()}}),[n,t,e])}(["Escape"],n,{enabled:r})}function dt({anchorElementRef:e,children:t,open:n,onClose:o,align:i="left",placement:r="below",arrow:s=!1,classes:a,variant:l="panel",onScroll:c,elementRef:h,asNativePopover:d=HTMLElement.prototype.hasOwnProperty("popover")}){const u=xe(h),f=function(e,t,{open:n,asNativePopover:o,alignToRight:i,placement:r,arrow:s}){const[a,l]=te(r),c=se((()=>{
38
- const n=e.current,a=t.current,c=e=>{Object.assign(n.style,e);const t=Object.keys(e);return()=>t.map((e=>n.style[e]=""))},h=window.innerHeight,{top:d,bottom:u,left:f,height:p,width:g}=a.getBoundingClientRect(),_=h-u,{height:m,width:w}=n.getBoundingClientRect(),b="above"===r&&(d>m||_<d)||"below"===r&&_<m&&d>_;l(b?"above":"below");const y=s?lt+8:lt;if(!o)return c(b?{bottom:"100%",marginBottom:`${y}px`}:{top:"100%",marginTop:`${y}px`});const{top:v,width:x}=document.body.getBoundingClientRect(),C=Math.abs(v),S=(i?f+g:x-f)-ct;let A=f;return w>S?A=i?ct:A-(w-S):i&&w>g&&(A-=w-g),c({minWidth:`${g}px`,top:b?C+d-m-y+"px":`${C+d+p+y}px`,left:`${Math.max(ct,A)}px`})}),[e,t,r,s,o,i]);return oe((()=>{if(!n)return()=>{};const t=e.current;o&&t.togglePopover(!0);const i=c();if(!o)return i;const r=new me;r.add(document.body,"scroll",c,{capture:!0});const s=new ResizeObserver(c);return s.observe(t),()=>{o&&(null==t||t.togglePopover(!1)),i(),r.removeAll(),s.disconnect()}}),[c,o,n,e]),a}(u,e,{open:n,placement:r,arrow:s,
39
- alignToRight:"right"===i,asNativePopover:d});return ht(u,e,o,n,d),function({popoverRef:e,open:t}){oe((()=>{const n=e.current,o=t?document.activeElement:null;return n&&o?()=>{const e=document.activeElement;e&&!n.contains(e)&&e!==document.body||o.focus()}:()=>{}}),[e,t])}({open:n,popoverRef:u}),Se("div",{className:Ne("absolute z-5","panel"===l&&["max-h-80 ","rounded border bg-white shadow hover:shadow-md focus-within:shadow-md",!s&&"overflow-y-auto overflow-x-hidden"],s&&"overflow-visible",d&&["max-w-[calc(100%-16px)]","p-0 m-0"],!d&&{hidden:!n,"right-0":"right"===i,"min-w-full":!0},a),ref:u,popover:d&&"auto",onScroll:c,"data-testid":"popover","data-component":"Popover",children:[n&&s&&Se("div",{className:Ne("absolute z-10","fill-white text-grey-3",{"top-full":"above"===f,"bottom-full":"below"===f,"left-2":"left"===i,"right-2":"right"===i}),"data-testid":"arrow",children:Se("below"===f?Ge:Ke,{})}),n&&t]})}const ut=V(null);function ft(e,t){return"function"==typeof e?e(t):e}
40
- function pt({value:e,children:t,disabled:n=!1,classes:o,elementRef:i,title:r}){const s=ie(null),a=ie(null),l=xe(i),c=e=>e.target===s.current||e.target===a.current,h=ae(ut);if(!h)throw new Error("Select.Option can only be used as Select or MultiSelect child");const{selectValue:d,value:u,multiple:f}=h,p=re((()=>!n&&(f?u.includes(e)||0===u.length&&void 0===e:u===e)),[u,n,f,e]),g=se((()=>{const t={closeListbox:!0};d(f?void 0!==e?[e]:[]:e,t)}),[f,d,e]),_=se((()=>{if(!f)return;const t={closeListbox:void 0===e};if(void 0===e)return void d([],t);const n=u.indexOf(e);if(-1===n)d([...u,e],t);else{const e=[...u];e.splice(n,1),d(e,t)}}),[u,f,d,e]);return Se("li",{className:Ne("w-full ring-inset outline-none rounded-none select-none","px-1 mb-1 first:mt-1 whitespace-nowrap group",{"text-grey-4":n,"cursor-pointer":!n},o),onClick:e=>{n||c(e)||g()},onKeyDown:e=>{n||(["Enter"," "].includes(e.key)&&!c(e)?(e.preventDefault(),g()):s.current&&"ArrowRight"===e.key&&(e.preventDefault(),s.current.focus()))},role:"option",
41
- "aria-disabled":n,"aria-selected":p,tabIndex:p?0:-1,ref:l,title:r,children:Se("div",{className:Ne("flex justify-between items-center","w-full rounded",{"hover:bg-grey-1 group-focus-visible:ring":!n,"bg-grey-1 hover:bg-grey-2":p}),children:[Se("div",{className:Ne("py-2 pl-3",{truncate:"truncate"===h.listboxOverflow,"whitespace-normal":"wrap"===h.listboxOverflow}),children:ft(t,{selected:p,disabled:n})}),!f&&Se("div",{className:"px-3",children:Se(Ve,{className:Ne("text-grey-6 scale-125",{"opacity-0":!p})})}),f&&Se(rt,{containerClasses:Ne("self-stretch px-3","text-lg",{"text-grey-6":p,"text-grey-3 hover:text-grey-6":!p}),checked:p,checkedIcon:ze,elementRef:s,containerRef:a,onChange:_,onKeyDown:e=>{var t;"ArrowLeft"===e.key&&(e.preventDefault(),null===(t=l.current)||void 0===t||t.focus())}})]})})}
42
- function gt({buttonContent:e,value:t,onChange:n,children:o,disabled:i,elementRef:r,buttonId:s,buttonClasses:a,popoverClasses:l,containerClasses:c,onPopoverScroll:h,alignListbox:d="left",multiple:u,listboxOverflow:f="truncate","aria-label":p,"aria-labelledby":g,listboxAsPopover:_}){const m=ie(null),w=ie(null),[b,y]=te(!1),v=se((()=>y(!1)),[y]),x=le(),C=xe(r),S=le(),A=se(((e,t)=>{n(e),t.closeListbox&&v()}),[n,v]);return function(e,t,{enabled:n=!0}={}){ne((()=>{if(!n||!e.current)return()=>{};const o=new me;return o.add(e.current,"focusout",(n=>{const o=n;e.current&&!e.current.contains(o.relatedTarget)&&t(o)})),()=>{o.removeAll()}}),[e,n,t])}(m,v),be(w,{horizontal:!1,loop:!1,autofocus:!0,containerVisible:b,selector:'[role="option"]:not([aria-disabled="true"])'}),Se("div",{className:Ne("relative w-full border rounded",{"border-grey-5":b},nt,c),ref:m,children:[Se("button",{id:null!=s?s:S,
43
- className:Ne("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":b,"aria-haspopup":"listbox","aria-controls":x,"aria-label":p,"aria-labelledby":g,ref:C,onClick:()=>y((e=>!e)),onKeyDown:e=>{"ArrowDown"!==e.key||b||(e.preventDefault(),y(!0))},"data-testid":"select-toggle-button",children:[Se("div",{className:"pl-2 py-2 truncate grow",children:e}),Se("div",{className:"pr-2 py-2 text-grey-6",children:Se(b?We:je,{})})]}),Se(ut.Provider,{value:{value:t,selectValue:A,multiple:u,listboxOverflow:f},children:Se(dt,{anchorElementRef:m,open:b,onClose:v,asNativePopover:_,align:d,classes:l,onScroll:h,children:Se("ul",{role:"listbox",id:x,ref:w,"aria-multiselectable":u,"aria-labelledby":null!=s?s:S,"aria-orientation":"vertical",children:o})})})]})}
32
+ width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ShowIcon",...e,children:Se("g",{"fill-rule":"evenodd",children:[Se("path",{fill:"none",d:"M0 0h16v16H0z"}),Se("path",{fill:"currentColor",d:"M8 2c4.36 0 8 2.6 8 6s-3.64 6-8 6-8-2.6-8-6 3.64-6 8-6m0 2C4.628 4 2 5.877 2 8s2.628 4 6 4 6-1.877 6-4-2.628-4-6-4m2 4a2 2 0 1 0-4 0 2 2 0 0 0 4 0"})]})})}function tt({children:e,classes:t,elementRef:n,expanded:o,pressed:i,title:r,icon:s,size:a="md",variant:l="secondary",unstyled:c=!1,role:h,...d}){const u=!c,f=u&&"custom"!==l,p=u&&"custom"!==a,g={"aria-label":r};return"tab"===h?g["aria-selected"]=i:(g["aria-pressed"]=i,g["aria-expanded"]=o),Se("button",{role:null!=h?h:"button","data-component":"Button",type:"button",...g,...d,className:Ne({"focus-visible:ring focus-visible:outline-none transition-colors whitespace-nowrap flex items-center":u},f&&{"font-semibold rounded":!0,
33
+ "text-grey-7 bg-grey-1 enabled:hover:text-grey-9 enabled:hover:bg-grey-2 aria-pressed:text-grey-9 aria-expanded:text-grey-9":"secondary"===l,"text-grey-1 bg-grey-7 enabled:hover:bg-grey-8 disabled:text-grey-4":"primary"===l},p&&{"p-2 gap-x-2":"md"===a,"p-1 gap-x-1":"xs"===a,"p-1.5 gap-x-1.5":"sm"===a,"p-2.5 gap-x-1.5":"lg"===a},t),ref:n,title:r,children:[s&&Se(s,{className:"w-em h-em"}),e]})}V({}),V({});const nt=Ne("input-group:border input-group:rounded-none","input-group:first:rounded-l input-group:last:rounded-r","input-group:ml-[-1px] input-group:first:ml-0","focus:z-1");function ot({children:e,classes:t,elementRef:n,pressed:o,expanded:i,icon:r,size:s="md",title:a,variant:l="secondary",unstyled:c=!1,...h}){const d=!c;return Se(tt,{"data-component":"IconButton",...h,classes:Ne({"focus-visible:ring focus-visible:outline-none transition-colors rounded whitespace-nowrap":d,"flex items-center justify-center":d},d&&nt,d&&"custom"!==l&&{
34
+ "text-grey-7 bg-transparent enabled:hover:text-grey-9 aria-pressed:text-brand aria-expanded:text-brand":"secondary"===l,"text-brand bg-transparent enabled:hover:text-grey-9 disabled:text-grey-7":"primary"===l,"text-grey-7 bg-grey-2 enabled:hover:text-grey-9 enabled:hover:bg-grey-3 disabled:text-grey-5 aria-pressed:bg-grey-3 aria-expanded:bg-grey-3":"dark"===l},d&&"custom"!==s&&{"gap-x-2 touch:min-w-touch-minimum touch:min-h-touch-minimum":!0,"p-2":"md"===s,"p-1":"xs"===s,"p-1.5":"sm"===s,"p-2.5":"lg"===s},t),elementRef:n,title:a,pressed:o,expanded:i,unstyled:!0,children:[r&&Se(r,{className:"w-em h-em"}),e]})}function it({children:e,elementRef:t,containerRef:n,checked:o,icon:i,checkedIcon:r,disabled:s,onChange:a,id:l,type:c,containerClasses:h,...d}){const u=o?r:i;return Se("label",{className:Ne("relative flex items-center gap-x-1.5",{"cursor-pointer":!s,"opacity-70":s},h),htmlFor:l,"data-composite-component":"checkbox"===c?"Checkbox":"RadioButton",ref:n,children:[Se("input",{...d,type:c,ref:t,
35
+ className:Ne("peer","absolute w-em h-em","opacity-[.00001]",{"cursor-pointer":!s}),checked:o,disabled:s,id:l,onChange:a}),Se(u,{className:Ne("peer-focus-visible:ring","w-em h-em","min-w-min min-h-min")}),Se("span",{children:e})]})}function rt({checked:e,defaultChecked:t=!1,icon:n=Ue,checkedIcon:o=ze,onChange:i,...r}){const s="boolean"==typeof e,[a,l]=te(t);return Se(it,{icon:n,checkedIcon:o,type:"checkbox",checked:s?e:a,onChange:function(e){null==i||i.call(this,e),s||l(e.target.checked)},...r})}const st=V(null);function at({value:e,children:t,subtitle:n,disabled:o}){const i=ae(st);if(!i)throw new Error("RadioGroup.Radio can only be used as RadioGroup child");const{selected:r,disabled:s=o,onChange:a}=i,l=!s&&r===e;return Se("div",{role:"radio","aria-checked":l,"aria-disabled":s,className:Ne("focus-visible:ring focus-visible:outline-none rounded-lg px-3 py-2 flex-1 group",{"hover:bg-grey-3/25 aria-checked:bg-grey-3/50 cursor-pointer":!s,"opacity-70":s}),"data-value":e,onClick:s?void 0:()=>a(e),
36
+ onKeyDown:s?void 0:t=>{["Enter"," "].includes(t.key)&&(t.preventDefault(),a(e))},tabIndex:-1,children:[Se("div",{className:"flex items-center gap-x-1.5",children:[Se(l?Je:Qe,{}),Se("span",{className:Ne("flex items-center gap-x-1.5",{"text-grey-7 group-hover:text-grey-8 group-aria-checked:text-grey-8":!s}),children:t})]}),n&&Se("div",{className:Ne("pl-4 ml-1.5 mt-1 text-sm",{"text-grey-6 group-hover:text-grey-7 group-aria-checked:text-grey-7":!s}),children:n})]})}at.displayName="RadioGroup.Radio",Object.assign((function({direction:e="horizontal",children:t,selected:n,onChange:o,disabled:i,"aria-label":r,"aria-labelledby":s,name:a}){const l=ie(null);return be(l,{loop:!1,selector:'[role="radio"]:not([aria-disabled="true"])',focusElement:e=>{o(e.dataset.value),e.focus()}}),Se(st.Provider,{value:{selected:n,disabled:i,onChange:o},children:[Se("div",{"aria-label":r,"aria-labelledby":s,ref:l,role:"radiogroup",className:Ne("w-full flex gap-1.5",{"flex-col":"vertical"===e}),children:t}),a&&Se("input",{type:"hidden",
37
+ "data-testid":"hidden-input",name:a,value:n,disabled:i})]})}),{Radio:at,displayName:"RadioGroup"});const lt=3,ct=8;function ht(e,t,n,o,i){ne((()=>{if(!i)return()=>{};const t=e.current,o=e=>{"open"===e.oldState&&"closed"===e.newState&&n()};return t.addEventListener("toggle",o),()=>t.removeEventListener("toggle",o)}),[i,n,e]);const r=o&&!i;!function(e,t,{enabled:n=!0}={}){ne((()=>{if(!n)return()=>{};const o=document.body,i=new me,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])}(e,(e=>{e.composedPath().includes(t.current)||n()}),{enabled:r}),function(e,t,{enabled:n=!0}={}){ne((()=>{if(!n)return()=>{};const o=document.body,i=new me;return i.add(o,"keydown",(n=>{e.includes(n.key)&&t(n)})),()=>{i.removeAll()}}),[n,t,e])}(["Escape"],n,{enabled:r})}
38
+ function dt({anchorElementRef:e,children:t,open:n,onClose:o,align:i="left",placement:r="below",arrow:s=!1,classes:a,variant:l="panel",onScroll:c,elementRef:h,asNativePopover:d=HTMLElement.prototype.hasOwnProperty("popover")}){const u=xe(h),f=function(e,t,{open:n,asNativePopover:o,alignToRight:i,placement:r,arrow:s}){const[a,l]=te(r),c=se((()=>{const n=e.current,a=t.current,c=e=>{Object.assign(n.style,e);const t=Object.keys(e);return()=>t.map((e=>n.style[e]=""))},h=window.innerHeight,{top:d,bottom:u,left:f,height:p,width:g}=a.getBoundingClientRect(),_=h-u,{height:m,width:w}=n.getBoundingClientRect(),b="above"===r&&(d>m||_<d)||"below"===r&&_<m&&d>_;l(b?"above":"below");const y=s?lt+8:lt;if(!o)return c(b?{bottom:"100%",marginBottom:`${y}px`}:{top:"100%",marginTop:`${y}px`});const{top:v,width:x}=document.body.getBoundingClientRect(),C=Math.abs(v),S=(i?f+g:x-f)-ct;let A=f;return w>S?A=i?ct:A-(w-S):i&&w>g&&(A-=w-g),c({minWidth:`${g}px`,top:b?C+d-m-y+"px":`${C+d+p+y}px`,left:`${Math.max(ct,A)}px`})}),[e,t,r,s,o,i])
39
+ ;return oe((()=>{if(!n)return()=>{};const t=e.current;o&&t.togglePopover(!0);const i=c();if(!o)return i;const r=new me;r.add(document.body,"scroll",c,{capture:!0});const s=new ResizeObserver(c);return s.observe(t),()=>{o&&(null==t||t.togglePopover(!1)),i(),r.removeAll(),s.disconnect()}}),[c,o,n,e]),a}(u,e,{open:n,placement:r,arrow:s,alignToRight:"right"===i,asNativePopover:d});return ht(u,e,o,n,d),function({popoverRef:e,open:t}){oe((()=>{const n=e.current,o=t?document.activeElement:null;return n&&o?()=>{const e=document.activeElement;e&&!n.contains(e)&&e!==document.body||o.focus()}:()=>{}}),[e,t])}({open:n,popoverRef:u}),Se("div",{className:Ne("absolute z-5","panel"===l&&["max-h-80 ","rounded border bg-white shadow hover:shadow-md focus-within:shadow-md",!s&&"overflow-y-auto overflow-x-hidden"],s&&"overflow-visible",d&&["max-w-[calc(100%-16px)]","p-0 m-0"],!d&&{hidden:!n,"right-0":"right"===i,"min-w-full":!0},a),ref:u,popover:d&&"auto",onScroll:c,"data-testid":"popover","data-component":"Popover",
40
+ children:[n&&s&&Se("div",{className:Ne("absolute z-10","fill-white text-grey-3",{"top-full":"above"===f,"bottom-full":"below"===f,"left-2":"left"===i,"right-2":"right"===i}),"data-testid":"arrow",children:Se("below"===f?Ge:Ke,{})}),n&&t]})}const ut=V(null);function ft(e,t){return"function"==typeof e?e(t):e}function pt({value:e,children:t,disabled:n=!1,classes:o,elementRef:i,title:r}){const s=ie(null),a=ie(null),l=xe(i),c=e=>e.target===s.current||e.target===a.current,h=ae(ut);if(!h)throw new Error("Select.Option can only be used as Select or MultiSelect child");const{selectValue:d,value:u,multiple:f}=h,p=re((()=>!n&&(f?u.includes(e)||0===u.length&&void 0===e:u===e)),[u,n,f,e]),g=se((()=>{const t={closeListbox:!0};d(f?void 0!==e?[e]:[]:e,t)}),[f,d,e]),_=se((()=>{if(!f)return;const t={closeListbox:void 0===e};if(void 0===e)return void d([],t);const n=u.indexOf(e);if(-1===n)d([...u,e],t);else{const e=[...u];e.splice(n,1),d(e,t)}}),[u,f,d,e]);return Se("li",{
41
+ className:Ne("w-full ring-inset outline-none rounded-none select-none","px-1 mb-1 first:mt-1 whitespace-nowrap group",{"text-grey-4":n,"cursor-pointer":!n},o),onClick:e=>{n||c(e)||g()},onKeyDown:e=>{n||(["Enter"," "].includes(e.key)&&!c(e)?(e.preventDefault(),g()):s.current&&"ArrowRight"===e.key&&(e.preventDefault(),s.current.focus()))},role:"option","aria-disabled":n,"aria-selected":p,tabIndex:p?0:-1,ref:l,title:r,children:Se("div",{className:Ne("flex justify-between items-center","w-full rounded",{"hover:bg-grey-1 group-focus-visible:ring":!n,"bg-grey-1 hover:bg-grey-2":p}),children:[Se("div",{className:Ne("py-2 pl-3",{truncate:"truncate"===h.listboxOverflow,"whitespace-normal":"wrap"===h.listboxOverflow}),children:ft(t,{selected:p,disabled:n})}),!f&&Se("div",{className:"px-3",children:Se(Ve,{className:Ne("text-grey-6 scale-125",{"opacity-0":!p})})}),f&&Se(rt,{containerClasses:Ne("self-stretch px-3","text-lg",{"text-grey-6":p,"text-grey-3 hover:text-grey-6":!p}),checked:p,checkedIcon:ze,elementRef:s,
42
+ containerRef:a,onChange:_,onKeyDown:e=>{var t;"ArrowLeft"===e.key&&(e.preventDefault(),null===(t=l.current)||void 0===t||t.focus())}})]})})}function gt({buttonContent:e,value:t,onChange:n,children:o,disabled:i,elementRef:r,buttonId:s,buttonClasses:a,popoverClasses:l,containerClasses:c,onPopoverScroll:h,alignListbox:d="left",multiple:u,listboxOverflow:f="truncate","aria-label":p,"aria-labelledby":g,listboxAsPopover:_}){const m=ie(null),w=ie(null),[b,y]=te(!1),v=se((()=>y(!1)),[y]),x=le(),C=xe(r),S=le(),A=se(((e,t)=>{n(e),t.closeListbox&&v()}),[n,v]);return function(e,t,{enabled:n=!0}={}){ne((()=>{if(!n||!e.current)return()=>{};const o=new me;return o.add(e.current,"focusout",(n=>{const o=n;e.current&&!e.current.contains(o.relatedTarget)&&t(o)})),()=>{o.removeAll()}}),[e,n,t])}(m,v),be(w,{horizontal:!1,loop:!1,autofocus:!0,containerVisible:b,selector:'[role="option"]:not([aria-disabled="true"])'}),Se("div",{className:Ne("relative w-full border rounded",{"border-grey-5":b},nt,c),ref:m,children:[Se("button",{
43
+ id:null!=s?s:S,className:Ne("focus-visible:ring focus-visible:outline-none 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":b,"aria-haspopup":"listbox","aria-controls":x,"aria-label":p,"aria-labelledby":g,ref:C,onClick:()=>y((e=>!e)),onKeyDown:e=>{"ArrowDown"!==e.key||b||(e.preventDefault(),y(!0))},"data-testid":"select-toggle-button",children:[Se("div",{className:"pl-2 py-2 truncate grow",children:e}),Se("div",{className:"pr-2 py-2 text-grey-6",children:Se(b?We:je,{})})]}),Se(ut.Provider,{value:{value:t,selectValue:A,multiple:u,listboxOverflow:f},children:Se(dt,{anchorElementRef:m,open:b,onClose:v,asNativePopover:_,align:d,classes:l,onScroll:h,children:Se("ul",{role:"listbox",id:x,ref:w,"aria-multiselectable":u,"aria-labelledby":null!=s?s:S,"aria-orientation":"vertical",children:o})})})]})}
44
44
  function _t({children:e,classes:t,elementRef:n,icon:o,status:i="notice",size:r="md",variant:s="outlined",unstyled:a=!1,...l}){const c=!a,h=c&&"custom"!==s,d=c&&"custom"!==r;let u=o;if(!u)switch(i){case"success":u=Ve;break;case"error":u=Le;break;default:u=De}const f=h&&d;return Se("div",{"data-component":"Callout",...l,ref:n,className:Ne(c&&"flex items-center border",h&&{"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},h&&{"bg-yellow-notice":"notice"===i&&f,"bg-green-success":"success"===i&&f,"bg-red-error":"error"===i&&f,"bg-white":!f},t),children:[f&&Se("div",{className:Ne({"p-2":"md"===r,"p-1.5":"sm"===r,"p-3":"lg"===r}),children:Se(u,{"data-testid":"callout-icon",className:Ne("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})})}),Se("div",{className:Ne(d&&{"p-2":"md"===r,"py-1.5 px-2":"sm"===r,"p-3":"lg"===r
45
45
  },c&&"grow",h&&"bg-white rounded-r"),children:e})]})}function mt({message:e,onDismiss:t}){return Se(_t,{classes:Ne({"sr-only":e.visuallyHidden}),status:e.type,onClick:()=>t(e.id),variant:"raised",children:e.message})}pt.displayName="Select.Option",Object.assign((function(e){return gt({...e,multiple:!1})}),{Option:pt,displayName:"Select"}),Object.assign((function(e){return gt({...e,multiple:!0})}),{Option:pt,displayName:"MultiSelect"}),V({}),V(null);const wt=({direction:e,onTransitionEnd:t,children:n,transitionClasses:o={}})=>{const i="out"===e,r=ie(null),s=re((()=>{const{transitionIn:e="animate-fade-in",transitionOut:t="animate-fade-out"}=o;return{[e]:!i,[t]:i}}),[i,o]);return Se("div",{"data-testid":"animation-container",onAnimationEnd:n=>{n.target===r.current&&(null==t||t(null!=e?e:"in"))},ref:r,className:Ne("relative w-full container",s),children:n})};function bt({messages:e,onMessageDismiss:t,transitionClasses:n,setTimeout_:o=setTimeout}){
46
- const[i,r]=te([]),s=ie(new Map),a=se((e=>r((t=>[...t,e]))),[]),l=se((e=>{const t=o((()=>{a(e),s.current.delete(e)}),5e3);s.current.set(e,t)}),[a,o]),c=se(((e,n)=>{var o;const i=null===(o=n.autoDismiss)||void 0===o||o;"in"===e&&i&&l(n.id),"out"===e&&(t(n.id),r((e=>e.filter((e=>e!==n.id)))))}),[l,t]);return oe((()=>{const e=s.current;return()=>{e.forEach((e=>clearTimeout(e)))}}),[]),Se("ul",{"aria-live":"polite","aria-relevant":"additions",className:"w-full space-y-2","data-component":"ToastMessages",children:e.map((e=>{const t=i.includes(e.id);return Se("li",{className:Ne({"mb-2":!e.visuallyHidden}),children:Se(wt,{direction:t?"out":"in",onTransitionEnd:t=>c(t,e),transitionClasses:n,children:Se(mt,{message:e,onDismiss:a})})},e.id)}))})}function yt({children:e,classes:t,elementRef:n,underline:o="none",unstyled:i=!1,variant:r="brand",...s}){const a=!i;return Se("a",{"data-component":"Link",rel:"noopener noreferrer",...s,className:Ne(a&&{"focus-visible-ring rounded":!0,
46
+ const[i,r]=te([]),s=ie(new Map),a=se((e=>r((t=>[...t,e]))),[]),l=se((e=>{const t=o((()=>{a(e),s.current.delete(e)}),5e3);s.current.set(e,t)}),[a,o]),c=se(((e,n)=>{var o;const i=null===(o=n.autoDismiss)||void 0===o||o;"in"===e&&i&&l(n.id),"out"===e&&(t(n.id),r((e=>e.filter((e=>e!==n.id)))))}),[l,t]);return oe((()=>{const e=s.current;return()=>{e.forEach((e=>clearTimeout(e)))}}),[]),Se("ul",{"aria-live":"polite","aria-relevant":"additions",className:"w-full space-y-2","data-component":"ToastMessages",children:e.map((e=>{const t=i.includes(e.id);return Se("li",{className:Ne({"mb-2":!e.visuallyHidden}),children:Se(wt,{direction:t?"out":"in",onTransitionEnd:t=>c(t,e),transitionClasses:n,children:Se(mt,{message:e,onDismiss:a})})},e.id)}))})}function yt({children:e,classes:t,elementRef:n,underline:o="none",unstyled:i=!1,variant:r="brand",...s}){const a=!i;return Se("a",{"data-component":"Link",rel:"noopener noreferrer",...s,className:Ne(a&&{"focus-visible:ring focus-visible:outline-none rounded":!0,
47
47
  "no-underline hover:no-underline":"none"===o,"underline hover:underline":"always"===o,"no-underline hover:underline":"hover"===o},a&&"custom"!==r&&{"text-brand hover:text-brand-dark":"brand"===r,"text-color-text-light hover:text-brand":"text-light"===r,"text-color-text hover:text-brand-dark":"text"===r},t),ref:n,children:e})}function vt({children:e,classes:t,elementRef:n,expanded:o,pressed:i,title:r,direction:s,...a}){return Se(tt,{"data-component":"PointerButton",...a,elementRef:n,classes:Ne("relative w-[26px] h-[16px]","flex items-center justify-center","bg-white rounded-[4px] border","before:absolute before:border-transparent","after:absolute after:border-transparent","text-[10px] text-color-text-light leading-none font-semibold",{"shadow-[1px_1px_1px_rgba(0,0,0,0.1)]":"down"!==s,"shadow-[1px_0px_1px_rgba(0,0,0,0.1)]":"down"===s},{"rounded-r-[4px] rounded-l-[2px]":"left"===s,"before:right-full before:top-1/2 after:right-full after:top-1/2":"left"===s,
48
48
  "before:mt-[-8px] before:border-8 before:border-r-[5px] before:border-r-grey-3":"left"===s,"after:mt-[-7px] after:border-[7px] after:border-r-[4px] after:border-r-white":"left"===s},{"z-1 rounded-t-px-sm rounded-b-px":"up"===s,"before:top-auto before:left-1/2 before:bottom-full after:top-auto after:left-1/2 after:bottom-full":"up"===s,"before:ml-[-13px] before:border-[13px] before:border-b-[6px] before:border-b-grey-3":"up"===s,"after:ml-[-12px] after:border-[12px] after:border-b-[5px] after:border-b-white":"up"===s},{"z-1 rounded-t-px rounded-b-px-sm":"down"===s,"before:top-full before:left-1/2 after:top-full after:left-1/2":"down"===s,"before:ml-[-13px] before:border-[13px] before:border-t-[6px] before:border-t-grey-3":"down"===s,"after:ml-[-12px] after:border-[12px] after:border-t-[5px] after:border-t-white":"down"===s},t),expanded:o,pressed:i,title:r,variant:"custom",size:"custom",children:e})}function xt(e){const t=e.toString(16);return 1===t.length?"0"+t:t}function Ct(e){const t=new Uint8Array(e/2)
49
49
  ;return window.crypto.getRandomValues(t),Array.from(t).map(xt).join("")}function St(e){if(null===e||"object"!=typeof e)return!1;for(const t of["frame1","frame2","type","requestId"])if("string"!=typeof e[t])return!1;return!0}class At extends Error{constructor(e){super(e)}}class Rt{constructor({hostFrame:e,source:t,sourceId:n}){this._hostFrame=e,this._source=t,this._sourceId=n,this._listeners=new me}destroy(){this._listeners.removeAll()}async discover(e){const t=Ct(6);return new Promise(((n,o)=>{const i=()=>{this._hostFrame.postMessage({frame1:this._source,frame2:e,type:"request",requestId:t,sourceId:this._sourceId},"*")},r=setInterval(i,250),s=setTimeout((()=>{clearInterval(r),o(new At(`Unable to establish ${this._source}-${e} communication channel`))}),2e4),a=this._listeners.add(window,"message",(i=>{const{data:l,ports:c}=i;St(l)&&l.requestId===t&&"request"!==l.type&&(clearInterval(r),clearTimeout(s),this._listeners.remove(a),
@@ -149,8 +149,8 @@ this._contentReady&&(await this._contentReady,this._contentReady=void 0);const t
149
149
  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&&this._highlighter.removeHighlights(t.highlights);this._updateAnchors(n,t)}_updateAnchors(e,t){this.anchors=e,this._clusterToolbar?.scheduleClusterUpdates(),t&&this._bucketBarClient.update(this.anchors)}async createAnnotation(e){if("selection"===e)return this.createAnnotationFromSelection();if(!["rect","point"].includes(e))throw new Error("Unsupported annotation tool");{let t=!1;try{this._hostRPC.call("activeToolChanged",e);const t=await this._drawTool.draw(e),n=await this.getDocumentInfo(),o=[{source:n.uri,selector:await this._integration.describe(this.element,t)}],i={uri:n.uri,document:n.metadata,target:o,$tag:"a:"+Ct(8)};return this._sidebarRPC.call("createAnnotation",i),this.anchor(i),i}catch(e){if(e instanceof oo&&["canceled","restarted"].includes(e.kind))return t="restarted"===e.kind,
150
150
  null;throw e}finally{t||this._hostRPC.call("activeToolChanged",null)}}}async createAnnotationFromSelection({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}))),r={uri:n.uri,document:n.metadata,target:i,$highlight:e,$cluster:e?"user-highlights":"user-annotations",$tag:"a:"+Ct(8)};return this._sidebarRPC.call("createAnnotation",r),this.anchor(r),ir(),r}_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);this._highlighter.setHighlightsFocused(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=Hn(n),i=Un(n);i?(this.selectedRanges=[t],
151
151
  this._hostRPC.call("textSelected"),this._adder.annotationsForSelection=tr(),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}={}){t?this._sidebarRPC.call("toggleAnnotationSelection",e):this._sidebarRPC.call("showAnnotations",e,n),this._sidebarRPC.call("openSidebar")}setHighlightsVisible(e,t=!0){this._highlighter.setHighlightsVisible(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){dn(e,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}_setOutsideAssignmentNoticeVisible(e){
152
- this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new Ji(this.element)),this._outsideAssignmentNotice.setVisible(e)}}function ar(e,t){const n=new URL(e),o=new URLSearchParams;return o.append("config",JSON.stringify(t)),n.hash=o.toString(),n.toString()}function lr(e,t){const n={};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.1689.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 cr({closed:e,onClose:t,children:n,"data-testid":o,"aria-label":i}){const r=ie(null);return ne((()=>{e?r.current?.close():r.current?.showModal()}),[e]),ne((()=>{const e=r.current
153
- ;return e?.addEventListener("cancel",t),()=>{e?.removeEventListener("cancel",t)}}),[t]),Se("dialog",{ref:r,className:"relative w-full h-full backdrop:bg-black/50","data-testid":o,"aria-label":i,children:n})}function hr({closed:e,children:t,...n}){return Se("div",{...n,className:Ne("fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50",{hidden:e}),children:Se("div",{className:"relative w-full h-full",children:t})})}function dr({document_:e=document,...t}){return Se(re((()=>function(e){return"function"==typeof e.createElement("dialog").showModal}(e)?cr:hr),[e]),{...t})}function ur({config:e,groupId:t}){return Se("iframe",{title:"Hypothesis annotation notebook",className:"h-full w-full border-0",allow:"fullscreen; clipboard-write",src:ar(e.notebookAppUrl,{...lr(e.notebookAppUrl,e),group:t})})}function fr({eventBus:e,config:t}){const[n,o]=te(0),[i,r]=te(!0),[s,a]=te(null),l=ie(""),c=ie(null);ne((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),ne((()=>{
152
+ this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new Ji(this.element)),this._outsideAssignmentNotice.setVisible(e)}}function ar(e,t){const n=new URL(e),o=new URLSearchParams;return o.append("config",JSON.stringify(t)),n.hash=o.toString(),n.toString()}function lr(e,t){const n={};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.1691.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 cr({closed:e,onClose:t,children:n,"data-testid":o,"aria-label":i}){const r=ie(null);return ne((()=>{e?r.current?.close():r.current?.showModal()}),[e]),ne((()=>{const e=r.current
153
+ ;return e?.addEventListener("cancel",t),()=>{e?.removeEventListener("cancel",t)}}),[t]),Se("dialog",{ref:r,className:"relative m-5 w-full h-full backdrop:bg-black/50","data-testid":o,"aria-label":i,children:n})}function hr({closed:e,children:t,...n}){return Se("div",{...n,className:Ne("fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50",{hidden:e}),children:Se("div",{className:"relative w-full h-full",children:t})})}function dr({document_:e=document,...t}){return Se(re((()=>function(e){return"function"==typeof e.createElement("dialog").showModal}(e)?cr:hr),[e]),{...t})}function ur({config:e,groupId:t}){return Se("iframe",{title:"Hypothesis annotation notebook",className:"h-full w-full border-0",allow:"fullscreen; clipboard-write",src:ar(e.notebookAppUrl,{...lr(e.notebookAppUrl,e),group:t})})}function fr({eventBus:e,config:t}){const[n,o]=te(0),[i,r]=te(!0),[s,a]=te(null),l=ie(""),c=ie(null);ne((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),ne((()=>{
154
154
  document.body.style.overflow=i?l.current:"hidden"}),[i]),ne((()=>{const t=e.createEmitter();return t.subscribe("openNotebook",(e=>{r(!1),o((e=>e+1)),a(e)})),c.current=t,()=>{t.destroy()}}),[e]);const h=se((()=>{r(!0),c.current?.publish("closeNotebook")}),[]);return null===s?null:Se(dr,{closed:i,onClose:h,"data-testid":"notebook-outer","aria-label":"Hypothesis notebook",children:[Se("div",{className:"absolute right-0 m-3",children:Se(ot,{title:"Close notebook",onClick:h,variant:"dark",classes:Ne("!bg-transparent enabled:hover:!bg-grey-3"),"data-testid":"close-button",children:Se(Le,{className:"w-4 h-4"})})}),Se(ur,{config:t,groupId:s},n)]})}class pr{constructor(e,t,n){this._container=new vn("notebook",(()=>Se(fr,{eventBus:t,config:n}))),e.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function gr({eventBus:e,config:t}){const[n,o]=te(!0),i=ie(null);ne((()=>{const t=e.createEmitter();return t.subscribe("openProfile",(()=>{o(!1)})),i.current=t,()=>{t.destroy()}
155
155
  }),[e]);const r=()=>{o(!0),i.current?.publish("closeProfile")};return n?null:Se(dr,{closed:n,onClose:r,"data-testid":"profile-outer","aria-label":"Hypothesis profile",children:[Se("div",{className:"absolute right-0 m-3",children:Se(ot,{title:"Close profile dialog",onClick:r,variant:"dark",classes:Ne("!bg-transparent enabled:hover:!bg-grey-3"),children:Se(Le,{className:"w-4 h-4"})})}),Se("iframe",{title:"Hypothesis profile",className:"h-full w-full border-0",src:t.profileAppUrl})]})}class _r{constructor(e,t,n){this._container=new vn("profile",(()=>Se(gr,{eventBus:t,config:n}))),e.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function mr({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 Se("ul",{className:"relative",children:[s&&Se("li",{className:"absolute right-0 pointer-events-auto mt-[-11px]",style:{top:e.position},children:Se(vt,{
156
156
  "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([]),title:`Go up to next annotations (${e.anchors.length})`,children:e.anchors.length})}),n.map(((e,t)=>Se("li",{className:"absolute right-0 pointer-events-auto mt-[-8px]",style:{top:e.position},children:Se(vt,{direction:"left",onClick:t=>r(l(e),t.metaKey||t.ctrlKey),onBlur:()=>o([]),onFocus:()=>o(l(e)),onMouseEnter:()=>o(l(e)),onMouseOut:()=>o([]),title:`Select nearby annotations (${e.anchors.length})`,children:e.anchors.length})},t))),a&&Se("li",{className:"absolute right-0 pointer-events-auto",style:{top:t.position},children:Se(vt,{"data-testid":"down-navigation-button",direction:"down",onClick:()=>{const e=[...t.anchors].sort(((e,t)=>e.top-t.top)),n=e[0];i(n.tag)},onBlur:()=>o([]),onFocus:()=>o(l(t)),onMouseEnter:()=>o(l(t)),onMouseOut:()=>o([]),