hypothesis 1.1738.0 → 1.1740.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?2824d8","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?bf10cf","styles/annotator.css":"styles/annotator.css?728e30","styles/annotator.css.map":"styles/annotator.css.map?11ce1b","styles/highlights.css":"styles/highlights.css?ef86d1","styles/highlights.css.map":"styles/highlights.css.map?6ce8dd","styles/katex.min.css":"styles/katex.min.css?027dee","styles/katex.min.css.map":"styles/katex.min.css.map?f4f041","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?d58df4","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?5a12c5","styles/sidebar.css":"styles/sidebar.css?556d6b","styles/sidebar.css.map":"styles/sidebar.css.map?f7c41c","styles/ui-playground.css":"styles/ui-playground.css?f10b88","styles/ui-playground.css.map":"styles/ui-playground.css.map?e5bb19","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?1534b4","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?36e542","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?659eb2","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?c0e75a"};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]:{},o=r.esModule,n=void 0===o||o,i=r.forceReload,a=void 0!==i&&i,l=s.createElement("script");n&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function o(s,t,r,o){var n=s.createElement("link");n.rel=t,n.href=o,n.type="application/annotator+".concat(r),e(n),s.head.appendChild(n)}function n(s,t,r){var o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).crossOrigin,n=s.createElement("link");n.rel="preload",n.as=t,n.href=r,(o||"fetch"===t)&&(n.crossOrigin="anonymous",n.removeAttribute=()=>{}),e(n),s.head.appendChild(n)}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 o=void 0;try{o=JSON.parse(t[r].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),o={}}Object.assign(e,o)}return e}(document),c=a(l.assetRoot||"__ASSET_ROOT__");if(document.querySelector("hypothesis-app")){!function(s,e){n(s,"fetch",e.apiUrl),n(s,"fetch",e.apiUrl+"links");for(var o=0,a=["scripts/sidebar.bundle.js"];o<a.length;o++)r(s,i(e,a[o]),{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"]')){o(s,"sidebar","html",e.sidebarAppUrl),o(s,"notebook","html",e.notebookAppUrl),o(s,"profile","html",e.profileAppUrl),n(s,"style",i(e,"styles/annotator.css"),{crossOrigin:!0}),o(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?49b983","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?bf10cf","styles/annotator.css":"styles/annotator.css?728e30","styles/annotator.css.map":"styles/annotator.css.map?11ce1b","styles/highlights.css":"styles/highlights.css?ef86d1","styles/highlights.css.map":"styles/highlights.css.map?6ce8dd","styles/katex.min.css":"styles/katex.min.css?027dee","styles/katex.min.css.map":"styles/katex.min.css.map?f4f041","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?d58df4","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?5a12c5","styles/sidebar.css":"styles/sidebar.css?556d6b","styles/sidebar.css.map":"styles/sidebar.css.map?f7c41c","styles/ui-playground.css":"styles/ui-playground.css?f10b88","styles/ui-playground.css.map":"styles/ui-playground.css.map?e5bb19","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?8fff8b","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?fbcee9","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?659eb2","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?993c9b"};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]:{},o=r.esModule,n=void 0===o||o,i=r.forceReload,a=void 0!==i&&i,l=s.createElement("script");n&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function o(s,t,r,o){var n=s.createElement("link");n.rel=t,n.href=o,n.type="application/annotator+".concat(r),e(n),s.head.appendChild(n)}function n(s,t,r){var o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).crossOrigin,n=s.createElement("link");n.rel="preload",n.as=t,n.href=r,(o||"fetch"===t)&&(n.crossOrigin="anonymous",n.removeAttribute=()=>{}),e(n),s.head.appendChild(n)}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 o=void 0;try{o=JSON.parse(t[r].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),o={}}Object.assign(e,o)}return e}(document),c=a(l.assetRoot||"__ASSET_ROOT__");if(document.querySelector("hypothesis-app")){!function(s,e){n(s,"fetch",e.apiUrl),n(s,"fetch",e.apiUrl+"links");for(var o=0,a=["scripts/sidebar.bundle.js"];o<a.length;o++)r(s,i(e,a[o]),{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"]')){o(s,"sidebar","html",e.sidebarAppUrl),o(s,"notebook","html",e.notebookAppUrl),o(s,"profile","html",e.profileAppUrl),n(s,"style",i(e,"styles/annotator.css"),{crossOrigin:!0}),o(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?2824d8","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?bf10cf","styles/annotator.css":"styles/annotator.css?728e30","styles/annotator.css.map":"styles/annotator.css.map?11ce1b","styles/highlights.css":"styles/highlights.css?ef86d1","styles/highlights.css.map":"styles/highlights.css.map?6ce8dd","styles/katex.min.css":"styles/katex.min.css?027dee","styles/katex.min.css.map":"styles/katex.min.css.map?f4f041","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?d58df4","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?5a12c5","styles/sidebar.css":"styles/sidebar.css?556d6b","styles/sidebar.css.map":"styles/sidebar.css.map?f7c41c","styles/ui-playground.css":"styles/ui-playground.css?f10b88","styles/ui-playground.css.map":"styles/ui-playground.css.map?e5bb19","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?1534b4","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?36e542","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?659eb2","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?c0e75a"};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]:{},o=r.esModule,n=void 0===o||o,i=r.forceReload,a=void 0!==i&&i,l=s.createElement("script");n&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function o(s,t,r,o){var n=s.createElement("link");n.rel=t,n.href=o,n.type="application/annotator+".concat(r),e(n),s.head.appendChild(n)}function n(s,t,r){var o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).crossOrigin,n=s.createElement("link");n.rel="preload",n.as=t,n.href=r,(o||"fetch"===t)&&(n.crossOrigin="anonymous",n.removeAttribute=()=>{}),e(n),s.head.appendChild(n)}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 o=void 0;try{o=JSON.parse(t[r].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),o={}}Object.assign(e,o)}return e}(document),c=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1738.0/");if(document.querySelector("hypothesis-app")){!function(s,e){n(s,"fetch",e.apiUrl),n(s,"fetch",e.apiUrl+"links");for(var o=0,a=["scripts/sidebar.bundle.js"];o<a.length;o++)r(s,i(e,a[o]),{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"]')){o(s,"sidebar","html",e.sidebarAppUrl),o(s,"notebook","html",e.notebookAppUrl),o(s,"profile","html",e.profileAppUrl),n(s,"style",i(e,"styles/annotator.css"),{crossOrigin:!0}),o(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?49b983","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?bf10cf","styles/annotator.css":"styles/annotator.css?728e30","styles/annotator.css.map":"styles/annotator.css.map?11ce1b","styles/highlights.css":"styles/highlights.css?ef86d1","styles/highlights.css.map":"styles/highlights.css.map?6ce8dd","styles/katex.min.css":"styles/katex.min.css?027dee","styles/katex.min.css.map":"styles/katex.min.css.map?f4f041","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?d58df4","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?5a12c5","styles/sidebar.css":"styles/sidebar.css?556d6b","styles/sidebar.css.map":"styles/sidebar.css.map?f7c41c","styles/ui-playground.css":"styles/ui-playground.css?f10b88","styles/ui-playground.css.map":"styles/ui-playground.css.map?e5bb19","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?8fff8b","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?fbcee9","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?659eb2","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?993c9b"};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]:{},o=r.esModule,n=void 0===o||o,i=r.forceReload,a=void 0!==i&&i,l=s.createElement("script");n&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function o(s,t,r,o){var n=s.createElement("link");n.rel=t,n.href=o,n.type="application/annotator+".concat(r),e(n),s.head.appendChild(n)}function n(s,t,r){var o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).crossOrigin,n=s.createElement("link");n.rel="preload",n.as=t,n.href=r,(o||"fetch"===t)&&(n.crossOrigin="anonymous",n.removeAttribute=()=>{}),e(n),s.head.appendChild(n)}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 o=void 0;try{o=JSON.parse(t[r].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),o={}}Object.assign(e,o)}return e}(document),c=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1740.0/");if(document.querySelector("hypothesis-app")){!function(s,e){n(s,"fetch",e.apiUrl),n(s,"fetch",e.apiUrl+"links");for(var o=0,a=["scripts/sidebar.bundle.js"];o<a.length;o++)r(s,i(e,a[o]),{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"]')){o(s,"sidebar","html",e.sidebarAppUrl),o(s,"notebook","html",e.notebookAppUrl),o(s,"profile","html",e.profileAppUrl),n(s,"style",i(e,"styles/annotator.css"),{crossOrigin:!0}),o(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,5 +1,5 @@
1
1
  {
2
- "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?2824d8",
2
+ "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?49b983",
3
3
  "scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?bf10cf",
4
4
  "styles/annotator.css": "styles/annotator.css?728e30",
5
5
  "styles/annotator.css.map": "styles/annotator.css.map?11ce1b",
@@ -13,8 +13,8 @@
13
13
  "styles/sidebar.css.map": "styles/sidebar.css.map?f7c41c",
14
14
  "styles/ui-playground.css": "styles/ui-playground.css?f10b88",
15
15
  "styles/ui-playground.css.map": "styles/ui-playground.css.map?e5bb19",
16
- "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?1534b4",
17
- "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?36e542",
16
+ "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?8fff8b",
17
+ "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?fbcee9",
18
18
  "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?659eb2",
19
- "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?c0e75a"
19
+ "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?993c9b"
20
20
  }
@@ -150,7 +150,7 @@ this._portFinder.discover("sidebar").then((t=>{this._sidebarRPC.connect(t)})),th
150
150
  if(!e.selector||!e.selector.some((t=>"TextQuoteSelector"===t.type||"ShapeSelector"===t.type)))return{annotation:t,target:e};let n;try{const o=await this._integration.anchor(this.element,e.selector);if(o instanceof Range){const i=On.fromRange(o);n={annotation:t,target:e,region:i}}else n={annotation:t,target:e,region:o}}catch{n={annotation:t,target:e}}return n})));if(!this._annotations.has(t.$tag))return[];for(const t of n)e(t);return t.$orphan=n.length>0&&n.every((t=>t.target.selector&&!t.region)),this._updateAnchors(this.anchors.concat(n),!0),this._sidebarRPC.call("syncAnchoringStatus",t),n}detach(t,e=!0){this._annotations.delete(t);const n=[];for(const e of this.anchors)e.annotation.$tag!==t?n.push(e):e.highlights&&this._highlighter.removeHighlights(e.highlights);this._updateAnchors(n,e)}_updateAnchors(t,e){this.anchors=t,this._clusterToolbar?.scheduleClusterUpdates(),e&&this._bucketBarClient.update(this.anchors)}async createAnnotation(t){if("selection"===t)return this.createAnnotationFromSelection()
151
151
  ;if(!["rect","point"].includes(t))throw new Error("Unsupported annotation tool");{let e=!1;try{this._hostRPC.call("activeToolChanged",t);const e=await this._drawTool.draw(t),n=await this.getDocumentInfo(),o=[{source:n.uri,selector:await this._integration.describe(this.element,e)}],i={uri:n.uri,document:n.metadata,target:o,$tag:"a:"+Ce(8)};return this._sidebarRPC.call("createAnnotation",i),this.anchor(i),i}catch(t){if(t instanceof oo&&["canceled","restarted"].includes(t.kind))return e="restarted"===t.kind,null;throw t}finally{e||this._hostRPC.call("activeToolChanged",null)}}}async createAnnotationFromSelection({highlight:t=!1}={}){const e=this.selectedRanges;this.selectedRanges=[];const n=await this.getDocumentInfo(),o=this.element,i=(await Promise.all(e.map((t=>this._integration.describe(o,t))))).map((t=>({source:n.uri,selector:t}))),r={uri:n.uri,document:n.metadata,target:i,$highlight:t,$cluster:t?"user-highlights":"user-annotations",$tag:"a:"+Ce(8)};return this._sidebarRPC.call("createAnnotation",r),
152
152
  this.anchor(r),ir(),r}_hoverAnnotations(t){this._hoveredAnnotations.clear(),t.forEach((t=>this._hoveredAnnotations.add(t)));for(const e of this.anchors)if(e.highlights){const n=t.includes(e.annotation.$tag);this._highlighter.setHighlightsFocused(e.highlights,n)}this._sidebarRPC.call("hoverAnnotations",t)}_onSelection(t){const e=this._integration.getAnnotatableRange(t);if(!e)return void this._onClearSelection();const n=document.getSelection(),o=Hn(n),i=Un(n);i?(this.selectedRanges=[e],this._hostRPC.call("textSelected"),this._commentsMode||(this._adder.annotationsForSelection=er(),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(t,{toggle:e=!1,focusInSidebar:n=!1}={}){e?this._sidebarRPC.call("toggleAnnotationSelection",t):this._sidebarRPC.call("showAnnotations",t,n),
153
- this._sidebarRPC.call("openSidebar")}setHighlightsVisible(t,e=!0){this._highlighter.setHighlightsVisible(t),this._highlightsVisible=t,e&&this._hostRPC.call("highlightsVisibleChanged",t)}get highlightsVisible(){return this._highlightsVisible}fitSideBySide(t){this._sidebarLayout=t,this._integration.fitSideBySide(t)}get hoveredAnnotationTags(){return this._hoveredAnnotations}_handleShortcut(t){dn(t,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible&&!this._commentsMode)}_setOutsideAssignmentNoticeVisible(t){this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new Ji(this.element)),this._outsideAssignmentNotice.setVisible(t)}}function ar(t,e){const n=new URL(t),o=new URLSearchParams;return o.append("config",JSON.stringify(e)),n.hash=o.toString(),n.toString()}function lr(t,e){const n={};for(const[t,o]of Object.entries(e))"notebookAppUrl"!==t&&"sidebarAppUrl"!==t&&null!=o&&(n[t]=o);n.origin=new URL(t).origin,n.version="1.1738.0";const o=new URL(window.location.href);if(o.hash="",
153
+ this._sidebarRPC.call("openSidebar")}setHighlightsVisible(t,e=!0){this._highlighter.setHighlightsVisible(t),this._highlightsVisible=t,e&&this._hostRPC.call("highlightsVisibleChanged",t)}get highlightsVisible(){return this._highlightsVisible}fitSideBySide(t){this._sidebarLayout=t,this._integration.fitSideBySide(t)}get hoveredAnnotationTags(){return this._hoveredAnnotations}_handleShortcut(t){dn(t,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible&&!this._commentsMode)}_setOutsideAssignmentNoticeVisible(t){this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new Ji(this.element)),this._outsideAssignmentNotice.setVisible(t)}}function ar(t,e){const n=new URL(t),o=new URLSearchParams;return o.append("config",JSON.stringify(e)),n.hash=o.toString(),n.toString()}function lr(t,e){const n={};for(const[t,o]of Object.entries(e))"notebookAppUrl"!==t&&"sidebarAppUrl"!==t&&null!=o&&(n[t]=o);n.origin=new URL(t).origin,n.version="1.1740.0";const o=new URL(window.location.href);if(o.hash="",
154
154
  n.hostURL=o.toString(),Array.isArray(n.services)&&n.services?.length>0){const t=n.services[0];t.onLoginRequest&&(t.onLoginRequestProvided=!0),t.onLogoutRequest&&(t.onLogoutRequestProvided=!0),t.onSignupRequest&&(t.onSignupRequestProvided=!0),t.onProfileRequest&&(t.onProfileRequestProvided=!0),t.onHelpRequest&&(t.onHelpRequestProvided=!0)}return n}function cr({closed:t,onClose:e,children:n,"data-testid":o,"aria-label":i}){const r=it(null);return nt((()=>{t?r.current?.close():r.current?.showModal()}),[t]),nt((()=>{const t=r.current;return t?.addEventListener("cancel",e),()=>{t?.removeEventListener("cancel",e)}}),[e]),St("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:t,children:e,...n}){return St("div",{...n,className:Tt("fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50",{hidden:t}),children:St("div",{className:"relative w-full h-full",children:e})})}function dr({document_:t=document,...e}){
155
155
  return St(rt((()=>function(t){return"function"==typeof t.createElement("dialog").showModal}(t)?cr:hr),[t]),{...e})}function ur({config:t,groupId:e}){return St("iframe",{title:"Hypothesis annotation notebook",className:"h-full w-full border-0",allow:"fullscreen; clipboard-write",src:ar(t.notebookAppUrl,{...lr(t.notebookAppUrl,t),group:e})})}function fr({eventBus:t,config:e}){const[n,o]=et(0),[i,r]=et(!0),[s,a]=et(null),l=it(""),c=it(null);nt((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),nt((()=>{document.body.style.overflow=i?l.current:"hidden"}),[i]),nt((()=>{const e=t.createEmitter();return e.subscribe("openNotebook",(t=>{r(!1),o((t=>t+1)),a(t)})),c.current=e,()=>{e.destroy()}}),[t]);const h=st((()=>{r(!0),c.current?.publish("closeNotebook")}),[]);return null===s?null:St(dr,{closed:i,onClose:h,"data-testid":"notebook-outer","aria-label":"Hypothesis notebook",children:[St("div",{className:"absolute right-0 m-3",children:St(oe,{title:"Close notebook",onClick:h,
156
156
  variant:"dark",classes:Tt("!bg-transparent enabled:hover:!bg-grey-3"),"data-testid":"close-button",children:St(Lt,{className:"w-4 h-4"})})}),St(ur,{config:e,groupId:s},n)]})}class pr{constructor(t,e,n){this._container=new vn("notebook",(()=>St(fr,{eventBus:e,config:n}))),t.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function gr({eventBus:t,config:e}){const[n,o]=et(!0),i=it(null);nt((()=>{const e=t.createEmitter();return e.subscribe("openProfile",(()=>{o(!1)})),i.current=e,()=>{e.destroy()}}),[t]);const r=()=>{o(!0),i.current?.publish("closeProfile")};return n?null:St(dr,{closed:n,onClose:r,"data-testid":"profile-outer","aria-label":"Hypothesis profile",children:[St("div",{className:"absolute right-0 m-3",children:St(oe,{title:"Close profile dialog",onClick:r,variant:"dark",classes:Tt("!bg-transparent enabled:hover:!bg-grey-3"),children:St(Lt,{className:"w-4 h-4"})})}),St("iframe",{title:"Hypothesis profile",className:"h-full w-full border-0",
@@ -158,7 +158,7 @@ src:e.profileAppUrl})]})}class _r{constructor(t,e,n){this._container=new vn("pro
158
158
  onClick:e=>r(l(t),e.metaKey||e.ctrlKey),onBlur:()=>o([]),onFocus:()=>o(l(t)),onMouseEnter:()=>o(l(t)),onMouseOut:()=>o([]),title:`Select nearby annotations (${t.anchors.length})`,children:t.anchors.length})},e))),a&&St("li",{className:"absolute right-0 pointer-events-auto",style:{top:e.position},children:St(ve,{"data-testid":"down-navigation-button",direction:"down",onClick:()=>{const t=[...e.anchors].sort(((t,e)=>t.top-e.top)),n=t[0];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})})]})}class wr{constructor(t,{onFocusAnnotations:e,onScrollToAnnotation:n,onSelectAnnotations:o}){this._positions=[],this._container=new vn("bucket-bar",(()=>this._render())),Object.assign(this._container.element.style,{display:"block",flexGrow:"1",width:"100%"}),t.appendChild(this._container.element),this._onFocusAnnotations=e,this._onScrollToAnnotation=n,this._onSelectAnnotations=o,
159
159
  this._container.render()}destroy(){this._container.destroy()}update(t){this._positions=t,this._container.render()}_render(){const t=function(t,e){const n=[],o=[],i=[];let r=null;function s(t){const{bottom:e,top:n}=t;return{bottom:e,position:n+(e-n)/2,anchors:[t],top:n}}const a=e.getBoundingClientRect(),l=t.map((t=>({tag:t.tag,top:t.top-a.top,bottom:t.bottom-a.top})));for(const t of l){const e=(t.top+t.bottom)/2;if(e<30){n.push(t);continue}if(e>a.height-30){o.push(t);continue}if(!r){r=s(t);continue}const l=t.top>r.top&&t.bottom<r.bottom;if(t.top-r.bottom>60&&!l)i.push(r),r=s(t);else{const e=t.bottom>r.bottom?t.bottom:r.bottom,n=e-r.top;r.anchors.push(t),r.bottom=e,r.position=r.top+n/2}}return r&&i.push(r),{above:{anchors:n,position:25},below:{anchors:o,position:a.height-30},buckets:i}}(this._positions,this._container.element);return St(mr,{above:t.above,below:t.below,buckets:t.buckets,onFocusAnnotations:t=>this._onFocusAnnotations(t),onScrollToAnnotation:t=>this._onScrollToAnnotation(t),
160
160
  onSelectAnnotations:(t,e)=>this._onSelectAnnotations(t,e)})}}function br({emitter:t}){const[e,n]=et([]),o=st((t=>n((e=>[...e,t]))),[]),i=st((t=>n((e=>e.filter((e=>e.id!==t))))),[]);return nt((()=>(t.subscribe("toastMessageAdded",o),t.subscribe("toastMessageDismissed",i),()=>{t.unsubscribe("toastMessageAdded",o),t.unsubscribe("toastMessageDismissed",i)})),[t,i,o]),St(be,{messages:e,onMessageDismiss:i})}function yr({icon:t,pressedBackground:e=!0,...n}){return St(ee,{classes:Tt("justify-center rounded","w-[30px] h-[30px] touch:h-[40px]","shadow border bg-white text-grey-6 hover:text-grey-9",e&&"aria-pressed:bg-grey-3"),...n,size:"custom",variant:"custom",children:St(t,{})})}function vr({highlightsVisible:t}){return St("div",{className:"sr-only",role:"status","data-testid":"toolbar-status",children:t?"Highlights visible":"Highlights hidden"})}
161
- function xr({activeTool:t=null,closeSidebar:e,createAnnotation:n,isSidebarOpen:o,sidebarContainerId:i,newAnnotationType:r,showHighlights:s,supportedTools:a=["selection"],toggleHighlights:l,toggleSidebar:c,toggleSidebarRef:h,useMinimalControls:d=!1}){return St("div",{className:Tt({"absolute right-full":d,"relative right-[11px]":!d},"w-[33px] z-2","text-px-base leading-none"),children:[d&&o&&St(ee,{classes:Tt("transition-colors focus-visible-ring ring-inset","w-[27px] h-[27px] mt-[140px] ml-[6px]","flex items-center justify-center bg-white border","text-grey-6 hover:text-grey-9 transition-colors","border-r-0","shadow-sidebar"),title:"Close annotation sidebar",onClick:e,unstyled:!0,children:St(Lt,{})}),!d&&St(b,{children:[St(ee,{classes:Tt("transition-colors focus-visible-ring ring-inset","h-[40px] w-[33px] pl-[6px] rounded-bl","bg-white text-grey-5 hover:text-grey-9","border-l border-b"),elementRef:h,title:"Annotation sidebar",expanded:o,"aria-controls":i,onClick:c,unstyled:!0,children:St(o?Ht:Ft,{})
161
+ function xr({activeTool:t=null,closeSidebar:e,createAnnotation:n,isSidebarOpen:o,sidebarContainerId:i,newAnnotationType:r,showHighlights:s,supportedTools:a=["selection"],toggleHighlights:l,toggleSidebar:c,toggleSidebarRef:h,useMinimalControls:d=!1}){return St("div",{className:Tt({"absolute right-full":d,"relative right-[11px]":!d},"w-[33px] z-2","text-px-base leading-none"),children:[d&&o&&St(ee,{classes:Tt("transition-colors focus-visible-ring ring-inset","w-[27px] h-[27px] mt-[140px] ml-[6px]","flex items-center justify-center bg-white border","text-grey-6 hover:text-grey-9 transition-colors","border-r-0","shadow-sidebar"),title:"Close annotation sidebar",onClick:e,unstyled:!0,children:St(Lt,{})}),!d&&St(b,{children:[St(ee,{classes:Tt("transition-colors focus-visible-ring ring-inset","h-[40px] w-[33px] pl-[6px] rounded-bl","bg-white text-grey-6 hover:text-grey-9","border-l border-b"),elementRef:h,title:"Annotation sidebar",expanded:o,"aria-controls":i,onClick:c,unstyled:!0,children:St(o?Ht:Ft,{})
162
162
  }),St("div",{className:"space-y-[6px] mt-[8px]",children:[St(yr,{title:"Show highlights",icon:s?te:qt,pressed:s,pressedBackground:!1,onClick:l}),a.includes("selection")&&St(yr,{"data-testid":"text-annotation",title:"note"===r?"New page note":"New annotation",icon:"note"===r?Xt:It,onClick:()=>n("selection")}),a.includes("rect")&&St(yr,{"data-testid":"rect-annotation",pressed:"rect"===t,title:"Rectangle annotation",icon:Zt,onClick:()=>n("rect"===t?null:"rect")}),a.includes("point")&&St(yr,{"data-testid":"point-annotation",pressed:"point"===t,title:"Pin annotation",icon:Yt,onClick:()=>n("point"===t?null:"point")})]}),St(vr,{highlightsVisible:s})]})]})}class Cr{constructor(t,e){const{createAnnotation:n,setSidebarOpen:o,setHighlightsVisible:i}=e;this.container=t,this._activeTool=null,this._useMinimalControls=!1,this._newAnnotationType="note",this._highlightsVisible=!1,this._sidebarOpen=!1,this._sidebarContainerId=e.sidebarContainerId,this._supportedAnnotationTools=["selection"],this._closeSidebar=()=>o(!1),
163
163
  this._toggleSidebar=()=>o(!this._sidebarOpen),this._toggleHighlights=()=>i(!this._highlightsVisible),this._createAnnotation=t=>{n(t),"selection"===t&&o(!0)},this._sidebarToggleButton={current:null},this.render()}getWidth(){return this.container.firstChild.getBoundingClientRect().width}set activeTool(t){this._activeTool=t,this.render()}get activeTool(){return this._activeTool}set useMinimalControls(t){this._useMinimalControls=t,this.render()}get useMinimalControls(){return this._useMinimalControls}set sidebarOpen(t){this._sidebarOpen=t,this.render()}get sidebarOpen(){return this._sidebarOpen}set newAnnotationType(t){this._newAnnotationType=t,this.render()}get newAnnotationType(){return this._newAnnotationType}set highlightsVisible(t){this._highlightsVisible=t,this.render()}get highlightsVisible(){return this._highlightsVisible}get sidebarToggleButton(){return this._sidebarToggleButton.current}set supportedAnnotationTools(t){this._supportedAnnotationTools=t,this.render()}get supportedAnnotationTools(){
164
164
  return this._supportedAnnotationTools}render(){D(St(xr,{activeTool:this._activeTool,closeSidebar:this._closeSidebar,createAnnotation:this._createAnnotation,newAnnotationType:this._newAnnotationType,isSidebarOpen:this._sidebarOpen,sidebarContainerId:this._sidebarContainerId,showHighlights:this._highlightsVisible,supportedTools:this._supportedAnnotationTools,toggleHighlights:this._toggleHighlights,toggleSidebar:this._toggleSidebar,toggleSidebarRef:this._sidebarToggleButton,useMinimalControls:this.useMinimalControls}),this.container)}}class Sr{constructor({target:t,threshold:e=10,onDrag:n}){t.style.touchAction="none",this._listeners=new mt,this._startX=null,this._dragActive=!1,this._threshold=e,this._listeners.add(t,"pointerdown",(t=>{this._startX=t.clientX}));const o=t=>{if(null!==this._startX&&this._dragActive){const e=t.clientX-this._startX;n({type:"dragend",deltaX:e})}this._startX=null,this._dragActive=!1};this._listeners.add(window,"pointercancel",o),this._listeners.add(window,"pointerup",o),