hypothesis 1.992.0 → 1.993.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/boot.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";function t(t,e){for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t}function e(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];return s.every((function(e){return"function"==typeof t[e]}))}var s={es2017:function(){return!e(Object,"entries","values")},es2018:function(){return"function"!=typeof Promise||!e(Promise.prototype,"finally")}};function n(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);"Object"===s&&t.constructor&&(s=t.constructor.name);if("Map"===s||"Set"===s)return Array.from(t);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return r(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,n=new Array(e);s<e;s++)n[s]=t[s];return n}var o=["es2017","es2018"];function a(t){t.setAttribute("data-hypothesis-asset","")}function i(t,e){var s=t.createElement("link");s.rel="stylesheet",s.type="text/css",s.href=e,a(s),t.head.appendChild(s)}function c(t,e){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.createElement("script");n.type="module",s&&(e+="#ts=".concat(Date.now())),n.src=e,n.async=!1,a(n),t.head.appendChild(n)}function l(t,e,s,n){var r=t.createElement("link");r.rel=e,r.href=n,r.type="application/annotator+".concat(s),a(r),t.head.appendChild(r)}function u(t,e,s){var n=t.createElement("link");n.rel="preload",n.as=e,n.href=s,"fetch"===e&&(n.crossOrigin="anonymous"),a(n),t.head.appendChild(n)}function p(t,e){return t.assetRoot+"build/"+t.manifest[e]}function d(t,e,s){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.forceModuleReload;s.forEach((function(s){var n=p(e,s);n.match(/\.css/)?i(t,n):c(t,n,r)}))}function h(t){return function(t){return t.filter((function(t){var e=s[t];if(!e)throw new Error('Unknown polyfill set "'.concat(t,'"'));return e()}))}(t).map((function(t){return"scripts/polyfills-".concat(t,".bundle.js")}))}function f(t){var e=t.match(/(https?):\/\/([^:/]+)/);return e?{protocol:e[1],hostname:e[2]}:null}function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=t.currentScript;return e?f(e.src):null}function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===t.indexOf("{"))return t;var s=y(e);if(!s)throw new Error("Could not process URL template because script origin is unknown");return t=(t=t.replace("{current_host}",s.hostname)).replace("{current_scheme}",s.protocol)}var b={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?1f6dc6","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?ca5bf9","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?33e08f","styles/annotator.css":"styles/annotator.css?f84ca0","styles/annotator.css.map":"styles/annotator.css.map?33fa1b","styles/highlights.css":"styles/highlights.css?c308d0","styles/highlights.css.map":"styles/highlights.css.map?5be890","styles/katex.min.css":"styles/katex.min.css?28919c","styles/katex.min.css.map":"styles/katex.min.css.map?4daef7","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?ed2cb3","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?13b830","styles/sidebar.css":"styles/sidebar.css?1e23e3","styles/sidebar.css.map":"styles/sidebar.css.map?ef1cc9","styles/ui-playground.css":"styles/ui-playground.css?240d82","styles/ui-playground.css.map":"styles/ui-playground.css.map?91ed0c","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?159c58","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?c5bf1d","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?baabbc"};if(function(){var t=[function(){return Promise.resolve()},function(){return new Map},function(){return new URL(document.location.href)},function(){return new Request("https://hypothes.is")},function(){return Element.prototype.attachShadow},function(){return CSS.supports("display: grid")},function(){return document.evaluate("/html/body",document,null,XPathResult.ANY_TYPE,null),!0}];try{return t.every((function(t){return t()}))}catch(t){return!1}}()){var v=function(e){for(var s={},n=e.querySelectorAll("script.js-hypothesis-config"),r=0;r<n.length;r++){var o=void 0;try{o=JSON.parse(n[r].textContent||"")}catch(t){console.warn("Could not parse settings from js-hypothesis-config tags",t),o={}}t(s,o)}return s}(document),g=m(v.assetRoot||"https://cdn.hypothes.is/hypothesis/1.992.0/");if(document.querySelector("hypothesis-app"))!function(t,e){u(t,"fetch",e.apiUrl),u(t,"fetch",e.apiUrl+"links");var s=h(o);d(t,e,[].concat(n(s),["scripts/sidebar.bundle.js","styles/katex.min.css","styles/sidebar.css"]))}(document,{assetRoot:g,manifest:b,apiUrl:v.apiUrl});else{var j=m(v.notebookAppUrl||"https://hypothes.is/notebook"),w=m(v.sidebarAppUrl||"https://hypothes.is/app.html");!function(t,e){if(!t.querySelector('link[type="application/annotator+html"]')){l(t,"sidebar","html",e.sidebarAppUrl),l(t,"notebook","html",e.notebookAppUrl),u(t,"style",p(e,"styles/annotator.css")),l(t,"hypothesis-client","javascript",e.assetRoot+"build/boot.js");var s=h(o),r=[];void 0!==window.PDFViewerApplication&&r.push("styles/pdfjs-overrides.css"),d(t,e,[].concat(n(s),r,["scripts/annotator.bundle.js","styles/highlights.css"]),{forceModuleReload:!0})}}(document,{assetRoot:g,manifest:b,notebookAppUrl:j,sidebarAppUrl:w})}}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";function t(t,e){for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t}function e(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];return s.every((function(e){return"function"==typeof t[e]}))}var s={es2017:function(){return!e(Object,"entries","values")},es2018:function(){return"function"!=typeof Promise||!e(Promise.prototype,"finally")}};function n(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);"Object"===s&&t.constructor&&(s=t.constructor.name);if("Map"===s||"Set"===s)return Array.from(t);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return r(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,n=new Array(e);s<e;s++)n[s]=t[s];return n}var o=["es2017","es2018"];function a(t){t.setAttribute("data-hypothesis-asset","")}function i(t,e){var s=t.createElement("link");s.rel="stylesheet",s.type="text/css",s.href=e,a(s),t.head.appendChild(s)}function c(t,e){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.createElement("script");n.type="module",s&&(e+="#ts=".concat(Date.now())),n.src=e,n.async=!1,a(n),t.head.appendChild(n)}function l(t,e,s,n){var r=t.createElement("link");r.rel=e,r.href=n,r.type="application/annotator+".concat(s),a(r),t.head.appendChild(r)}function u(t,e,s){var n=t.createElement("link");n.rel="preload",n.as=e,n.href=s,"fetch"===e&&(n.crossOrigin="anonymous"),a(n),t.head.appendChild(n)}function p(t,e){return t.assetRoot+"build/"+t.manifest[e]}function d(t,e,s){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.forceModuleReload;s.forEach((function(s){var n=p(e,s);n.match(/\.css/)?i(t,n):c(t,n,r)}))}function h(t){return function(t){return t.filter((function(t){var e=s[t];if(!e)throw new Error('Unknown polyfill set "'.concat(t,'"'));return e()}))}(t).map((function(t){return"scripts/polyfills-".concat(t,".bundle.js")}))}function f(t){var e=t.match(/(https?):\/\/([^:/]+)/);return e?{protocol:e[1],hostname:e[2]}:null}function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=t.currentScript;return e?f(e.src):null}function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===t.indexOf("{"))return t;var s=y(e);if(!s)throw new Error("Could not process URL template because script origin is unknown");return t=(t=t.replace("{current_host}",s.hostname)).replace("{current_scheme}",s.protocol)}var b={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?32d9ff","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?ca5bf9","styles/annotator.css":"styles/annotator.css?f84ca0","styles/annotator.css.map":"styles/annotator.css.map?554aea","styles/highlights.css":"styles/highlights.css?c308d0","styles/highlights.css.map":"styles/highlights.css.map?5be890","styles/katex.min.css":"styles/katex.min.css?28919c","styles/katex.min.css.map":"styles/katex.min.css.map?4daef7","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?ed2cb3","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?13b830","styles/sidebar.css":"styles/sidebar.css?1e23e3","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?33e08f","styles/sidebar.css.map":"styles/sidebar.css.map?53933a","styles/ui-playground.css.map":"styles/ui-playground.css.map?babd6d","styles/ui-playground.css":"styles/ui-playground.css?240d82","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?159c58","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?700495","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?efe522"};if(function(){var t=[function(){return Promise.resolve()},function(){return new Map},function(){return new URL(document.location.href)},function(){return new Request("https://hypothes.is")},function(){return Element.prototype.attachShadow},function(){return CSS.supports("display: grid")},function(){return document.evaluate("/html/body",document,null,XPathResult.ANY_TYPE,null),!0}];try{return t.every((function(t){return t()}))}catch(t){return!1}}()){var v=function(e){for(var s={},n=e.querySelectorAll("script.js-hypothesis-config"),r=0;r<n.length;r++){var o=void 0;try{o=JSON.parse(n[r].textContent||"")}catch(t){console.warn("Could not parse settings from js-hypothesis-config tags",t),o={}}t(s,o)}return s}(document),g=m(v.assetRoot||"https://cdn.hypothes.is/hypothesis/1.993.0/");if(document.querySelector("hypothesis-app"))!function(t,e){u(t,"fetch",e.apiUrl),u(t,"fetch",e.apiUrl+"links");var s=h(o);d(t,e,[].concat(n(s),["scripts/sidebar.bundle.js","styles/katex.min.css","styles/sidebar.css"]))}(document,{assetRoot:g,manifest:b,apiUrl:v.apiUrl});else{var j=m(v.notebookAppUrl||"https://hypothes.is/notebook"),w=m(v.sidebarAppUrl||"https://hypothes.is/app.html");!function(t,e){if(!t.querySelector('link[type="application/annotator+html"]')){l(t,"sidebar","html",e.sidebarAppUrl),l(t,"notebook","html",e.notebookAppUrl),u(t,"style",p(e,"styles/annotator.css")),l(t,"hypothesis-client","javascript",e.assetRoot+"build/boot.js");var s=h(o),r=[];void 0!==window.PDFViewerApplication&&r.push("styles/pdfjs-overrides.css"),d(t,e,[].concat(n(s),r,["scripts/annotator.bundle.js","styles/highlights.css"]),{forceModuleReload:!0})}}(document,{assetRoot:g,manifest:b,notebookAppUrl:j,sidebarAppUrl:w})}}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,9 +1,8 @@
1
1
  {
2
- "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?1f6dc6",
2
+ "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?32d9ff",
3
3
  "scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?ca5bf9",
4
- "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?33e08f",
5
4
  "styles/annotator.css": "styles/annotator.css?f84ca0",
6
- "styles/annotator.css.map": "styles/annotator.css.map?33fa1b",
5
+ "styles/annotator.css.map": "styles/annotator.css.map?554aea",
7
6
  "styles/highlights.css": "styles/highlights.css?c308d0",
8
7
  "styles/highlights.css.map": "styles/highlights.css.map?5be890",
9
8
  "styles/katex.min.css": "styles/katex.min.css?28919c",
@@ -11,10 +10,11 @@
11
10
  "styles/pdfjs-overrides.css": "styles/pdfjs-overrides.css?ed2cb3",
12
11
  "styles/pdfjs-overrides.css.map": "styles/pdfjs-overrides.css.map?13b830",
13
12
  "styles/sidebar.css": "styles/sidebar.css?1e23e3",
14
- "styles/sidebar.css.map": "styles/sidebar.css.map?ef1cc9",
13
+ "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?33e08f",
14
+ "styles/sidebar.css.map": "styles/sidebar.css.map?53933a",
15
+ "styles/ui-playground.css.map": "styles/ui-playground.css.map?babd6d",
15
16
  "styles/ui-playground.css": "styles/ui-playground.css?240d82",
16
- "styles/ui-playground.css.map": "styles/ui-playground.css.map?91ed0c",
17
17
  "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?159c58",
18
- "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?c5bf1d",
19
- "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?baabbc"
18
+ "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?700495",
19
+ "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?efe522"
20
20
  }
@@ -98,7 +98,7 @@ this._sidebarRPC.on("deleteAnnotation",(t=>this.detach(t))),this._sidebarRPC.on(
98
98
  target:e};let n;try{const o=await this._integration.anchor(this.element,e.selector),i=fe.fromRange(o);n={annotation:t,target:e,range:i}}catch(o){n={annotation:t,target:e}}return n})));if(!this._annotations.has(t.$tag))return[];for(let t of n)e(t);return t.$orphan=n.length>0&&n.every((t=>t.target.selector&&!t.range)),this._updateAnchors(this.anchors.concat(n),!0),this._sidebarRPC.call("syncAnchoringStatus",t),n}detach(t,e=!0){this._annotations.delete(t);const n=[];for(let e of this.anchors)e.annotation.$tag!==t?n.push(e):e.highlights&&be(e.highlights);this._updateAnchors(n,e)}_updateAnchors(t,e){this.anchors=t,e&&this._bucketBarClient.update(this.anchors)}async createAnnotation({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,$tag:"a:"+Rt(8)}
99
99
  ;return this._sidebarRPC.call("createAnnotation",r),this.anchor(r),po(),r}_focusAnnotations(t){this._focusedAnnotations.clear(),t.forEach((t=>this._focusedAnnotations.add(t)));for(let e of this.anchors)if(e.highlights){const n=t.includes(e.annotation.$tag);Ce(e.highlights,n)}this._sidebarRPC.call("focusAnnotations",t)}_scrollToClosestOffScreenAnchor(t,e){const n=function(t,e){let n=null,o=0;for(let r of t){var i;if(null===(i=r.highlights)||void 0===i||!i.length)continue;const t=Ee(r.highlights).top;"up"===e&&t>=137||"down"===e&&t<=window.innerHeight-22||(!n||"up"===e&&t>o||"down"===e&&t<o)&&(n=r,o=t)}return n}(this.anchors.filter((({annotation:e})=>t.includes(e.$tag))),e);n&&this._integration.scrollToAnchor(n)}_onSelection(t){if(!this._integration.canAnnotate(t))return void this._onClearSelection();const e=document.getSelection(),n=ge(e),o=ve(e);o?(this.selectedRanges=[t],this._hostRPC.call("textSelected"),this._adder.annotationsForSelection=ho(),this._isAdderVisible=!0,
100
100
  this._adder.show(o,n)):this._onClearSelection()}_onClearSelection(){this._isAdderVisible=!1,this._adder.hide(),this.selectedRanges=[],this._informHostOnNextSelectionClear&&this._hostRPC.call("textUnselected"),this._informHostOnNextSelectionClear=!0}selectAnnotations(t,e=!1){e?this._sidebarRPC.call("toggleAnnotationSelection",t):this._sidebarRPC.call("showAnnotations",t),this._sidebarRPC.call("openSidebar")}setHighlightsVisible(t){!function(t,e){t.classList.toggle("hypothesis-highlights-always-on",e)}(this.element,t),this._highlightsVisible=t}fitSideBySide(t){this._sideBySideActive=this._integration.fitSideBySide(t)}get sideBySideActive(){return this._sideBySideActive}get focusedAnnotationTags(){return this._focusedAnnotations}}function mo(t,e){const n=new URL(t),o=new URLSearchParams;return o.append("config",JSON.stringify(e)),n.hash=o.toString(),n.toString()}function _o(t,e){var n;const o={};for(let[t,n]of Object.entries(e))"notebookAppUrl"!==t&&"sidebarAppUrl"!==t&&null!=n&&(o[t]=n)
101
- ;o.origin=new URL(t).origin,o.version="1.992.0";const i=new URL(window.location.href);if(i.hash="",o.hostURL=i.toString(),(null===(n=o.services)||void 0===n?void 0:n.length)>0){const t=o.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 o}function vo({config:t,groupId:e}){return mt("iframe",{title:"Hypothesis annotation notebook",className:"NotebookIframe",allowFullScreen:!0,src:mo(t.notebookAppUrl,{..._o(t.notebookAppUrl,t),group:e})})}function yo({eventBus:t,config:e}){const[n,o]=rt(0),[i,r]=rt(!0),[s,a]=rt(null),l=lt(""),c=lt(null);st((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),st((()=>{document.body.style.overflow=i?l.current:"hidden"}),[i]),st((()=>{const e=t.createEmitter();return e.subscribe("openNotebook",(t=>{r(!1),o((t=>t+1)),a(t)})),
101
+ ;o.origin=new URL(t).origin,o.version="1.993.0";const i=new URL(window.location.href);if(i.hash="",o.hostURL=i.toString(),(null===(n=o.services)||void 0===n?void 0:n.length)>0){const t=o.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 o}function vo({config:t,groupId:e}){return mt("iframe",{title:"Hypothesis annotation notebook",className:"NotebookIframe",allowFullScreen:!0,src:mo(t.notebookAppUrl,{..._o(t.notebookAppUrl,t),group:e})})}function yo({eventBus:t,config:e}){const[n,o]=rt(0),[i,r]=rt(!0),[s,a]=rt(null),l=lt(""),c=lt(null);st((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),st((()=>{document.body.style.overflow=i?l.current:"hidden"}),[i]),st((()=>{const e=t.createEmitter();return e.subscribe("openNotebook",(t=>{r(!1),o((t=>t+1)),a(t)})),
102
102
  c.current=e,()=>{e.destroy()}}),[t]);return null===s?null:mt("div",{className:G("NotebookModal__outer",{"is-hidden":i}),children:mt("div",{className:"NotebookModal__inner",children:[mt("div",{className:"NotebookModal__close-button-container",children:mt(Ct,{icon:"cancel",title:"Close the Notebook",onClick:()=>{var t;r(!0),null===(t=c.current)||void 0===t||t.publish("closeNotebook")},variant:"dark"})}),mt(vo,{config:e,groupId:s},n)]})})}class wo{constructor(t,e,n={}){this._outerContainer=document.createElement("hypothesis-notebook"),t.appendChild(this._outerContainer),this.shadowRoot=se(this._outerContainer),L(mt(yo,{eventBus:e,config:n}),this.shadowRoot)}destroy(){L(null,this.shadowRoot),this._outerContainer.remove()}}var bo={exports:{}};!function(t){!function(e,n,o,i){var r,s=["","webkit","Moz","MS","ms","o"],a=n.createElement("div"),l=Math.round,c=Math.abs,h=Date.now;function u(t,e,n){return setTimeout(v(t,n),e)}function d(t,e,n){return!!Array.isArray(t)&&(f(t,n[e],n),!0)}function f(t,e,n){var o
103
103
  ;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==i)for(o=0;o<t.length;)e.call(n,t[o],o,t),o++;else for(o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function p(t,n,o){var i="DEPRECATED METHOD: "+n+"\n"+o+" AT \n";return function(){var n=new Error("get-stack-trace"),o=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=e.console&&(e.console.warn||e.console.log);return r&&r.call(e.console,i,o),t.apply(this,arguments)}}r="function"!=typeof Object.assign?function(t){if(t===i||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var o=arguments[n];if(o!==i&&null!==o)for(var r in o)o.hasOwnProperty(r)&&(e[r]=o[r])}return e}:Object.assign;var g=p((function(t,e,n){for(var o=Object.keys(e),r=0;r<o.length;)(!n||n&&t[o[r]]===i)&&(t[o[r]]=e[o[r]]),r++;return t}),"extend","Use `assign`."),m=p((function(t,e){return g(t,e,!0)
104
104
  }),"merge","Use `assign`.");function _(t,e,n){var o,i=e.prototype;(o=t.prototype=Object.create(i)).constructor=t,o._super=i,n&&r(o,n)}function v(t,e){return function(){return t.apply(e,arguments)}}function y(t,e){return"function"==typeof t?t.apply(e&&e[0]||i,e):t}function w(t,e){return t===i?e:t}function b(t,e,n){f(x(e),(function(e){t.addEventListener(e,n,!1)}))}function C(t,e,n){f(x(e),(function(e){t.removeEventListener(e,n,!1)}))}function E(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function S(t,e){return t.indexOf(e)>-1}function x(t){return t.trim().split(/\s+/g)}function T(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var o=0;o<t.length;){if(n&&t[o][n]==e||!n&&t[o]===e)return o;o++}return-1}function A(t){return Array.prototype.slice.call(t,0)}function k(t,e,n){for(var o=[],i=[],r=0;r<t.length;){var s=e?t[r][e]:t[r];T(i,s)<0&&o.push(t[r]),i[r]=s,r++}return n&&(o=e?o.sort((function(t,n){return t[e]>n[e]})):o.sort()),o}function R(t,e){
@@ -39,33 +39,33 @@ this._transactionName&&(e.transaction=this._transactionName),this._span){e.conte
39
39
  ;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(t){t(e)})),this._notifyingListeners=!1)},e.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e}();function It(){var e=ce();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}function Rt(e){It().push(e)}var Pt=function(){function e(e){this.errors=0,this.sid=gt(),this.duration=0,this.status="ok",this.init=!0,this.ignoreDuration=!1;var t=zt();this.timestamp=t,this.started=t,e&&this.update(e)}return e.prototype.update=function(e){if(void 0===e&&(e={}),e.user&&(!this.ipAddress&&e.user.ip_address&&(this.ipAddress=e.user.ip_address),this.did||e.did||(this.did=e.user.id||e.user.email||e.user.username)),
40
40
  this.timestamp=e.timestamp||zt(),e.ignoreDuration&&(this.ignoreDuration=e.ignoreDuration),e.sid&&(this.sid=32===e.sid.length?e.sid:gt()),void 0!==e.init&&(this.init=e.init),!this.did&&e.did&&(this.did=""+e.did),"number"==typeof e.started&&(this.started=e.started),this.ignoreDuration)this.duration=void 0;else if("number"==typeof e.duration)this.duration=e.duration;else{var t=this.timestamp-this.started;this.duration=t>=0?t:0}e.release&&(this.release=e.release),e.environment&&(this.environment=e.environment),!this.ipAddress&&e.ipAddress&&(this.ipAddress=e.ipAddress),!this.userAgent&&e.userAgent&&(this.userAgent=e.userAgent),"number"==typeof e.errors&&(this.errors=e.errors),e.status&&(this.status=e.status)},e.prototype.close=function(e){e?this.update({status:e}):"ok"===this.status?this.update({status:"exited"}):this.update()},e.prototype.toJSON=function(){return Je({sid:""+this.sid,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*this.timestamp).toISOString(),
41
41
  status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:{release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent}})},e}(),Dt=function(){function e(e,t,n){void 0===t&&(t=new Ot),void 0===n&&(n=4),this._version=n,this._stack=[{}],this.getStackTop().scope=t,e&&this.bindClient(e)}return e.prototype.isOlderThan=function(e){return this._version<e},e.prototype.bindClient=function(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()},e.prototype.pushScope=function(){var e=Ot.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e},e.prototype.popScope=function(){return!(this.getStack().length<=1)&&!!this.getStack().pop()},e.prototype.withScope=function(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}},e.prototype.getClient=function(){return this.getStackTop().client},e.prototype.getScope=function(){
42
- return this.getStackTop().scope},e.prototype.getStack=function(){return this._stack},e.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},e.prototype.captureException=function(e,t){var n=this._lastEventId=gt(),r=t;if(!t){var o=void 0;try{throw new Error("Sentry syntheticException")}catch(e){o=e}r={originalException:e,syntheticException:o}}return this._invokeClient("captureException",e,ne(ne({},r),{event_id:n})),n},e.prototype.captureMessage=function(e,t,n){var r=this._lastEventId=gt(),o=n;if(!n){var i=void 0;try{throw new Error(e)}catch(e){i=e}o={originalException:e,syntheticException:i}}return this._invokeClient("captureMessage",e,t,ne(ne({},o),{event_id:r})),r},e.prototype.captureEvent=function(e,t){var n=gt();return"transaction"!==e.type&&(this._lastEventId=n),this._invokeClient("captureEvent",e,ne(ne({},t),{event_id:n})),n},e.prototype.lastEventId=function(){return this._lastEventId},e.prototype.addBreadcrumb=function(e,t){var n=this.getStackTop(),r=n.scope,o=n.client;if(r&&o){
43
- var i=o.getOptions&&o.getOptions()||{},a=i.beforeBreadcrumb,s=void 0===a?null:a,l=i.maxBreadcrumbs,c=void 0===l?100:l;if(!(c<=0)){var u=Lt(),h=ne({timestamp:u},e),d=s?Oe((function(){return s(h,t)})):h;null!==d&&r.addBreadcrumb(d,c)}}},e.prototype.setUser=function(e){var t=this.getScope();t&&t.setUser(e)},e.prototype.setTags=function(e){var t=this.getScope();t&&t.setTags(e)},e.prototype.setExtras=function(e){var t=this.getScope();t&&t.setExtras(e)},e.prototype.setTag=function(e,t){var n=this.getScope();n&&n.setTag(e,t)},e.prototype.setExtra=function(e,t){var n=this.getScope();n&&n.setExtra(e,t)},e.prototype.setContext=function(e,t){var n=this.getScope();n&&n.setContext(e,t)},e.prototype.configureScope=function(e){var t=this.getStackTop(),n=t.scope,r=t.client;n&&r&&e(n)},e.prototype.run=function(e){var t=Ft(this);try{e(this)}finally{Ft(t)}},e.prototype.getIntegration=function(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){
44
- return Re.warn("Cannot retrieve integration "+e.id+" from the current Hub"),null}},e.prototype.startSpan=function(e){return this._callExtensionMethod("startSpan",e)},e.prototype.startTransaction=function(e,t){return this._callExtensionMethod("startTransaction",e,t)},e.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},e.prototype.captureSession=function(e){if(void 0===e&&(e=!1),e)return this.endSession();this._sendSessionUpdate()},e.prototype.endSession=function(){var e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&n.close(),this._sendSessionUpdate(),t&&t.setSession()},e.prototype.startSession=function(e){var t=this.getStackTop(),n=t.scope,r=t.client,o=r&&r.getOptions()||{},i=o.release,a=o.environment,s=(ce().navigator||{}).userAgent,l=new Pt(ne(ne(ne({release:i,environment:a},n&&{user:n.getUser()}),s&&{userAgent:s}),e));if(n){var c=n.getSession&&n.getSession();c&&"ok"===c.status&&c.update({status:"exited"}),this.endSession(),n.setSession(l)}return l},
45
- e.prototype._sendSessionUpdate=function(){var e=this.getStackTop(),t=e.scope,n=e.client;if(t){var r=t.getSession&&t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}},e.prototype._invokeClient=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=this.getStackTop(),i=o.scope,a=o.client;a&&a[e]&&(t=a)[e].apply(t,ie(n,[i]))},e.prototype._callExtensionMethod=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Bt(),o=r.__SENTRY__;if(o&&o.extensions&&"function"==typeof o.extensions[e])return o.extensions[e].apply(this,t);Re.warn("Extension method "+e+" couldn't be found, doing nothing.")},e}();function Bt(){var e=ce();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Ft(e){var t=Bt(),n=qt(t);return Ut(t,e),n}function jt(){var e=Bt();return Ht(e)&&!qt(e).isOlderThan(4)||Ut(e,new Dt),se()?function(e){try{var t=Bt().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return qt(e)
46
- ;if(!Ht(n)||qt(n).isOlderThan(4)){var r=qt(e).getStackTop();Ut(n,new Dt(r.client,Ot.clone(r.scope)))}return qt(n)}catch(t){return qt(e)}}(e):qt(e)}function Ht(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function qt(e){return e&&e.__SENTRY__&&e.__SENTRY__.hub||(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=new Dt),e.__SENTRY__.hub}function Ut(e,t){return!!e&&(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=t,!0)}function $t(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=jt();if(r&&r[e])return r[e].apply(r,ie(t));throw new Error("No hub defined or "+e+" was not found on the hub, please open a bug report.")}function Gt(e,t){var n;try{throw new Error("Sentry syntheticException")}catch(e){n=e}return $t("captureException",e,{captureContext:t,originalException:e,syntheticException:n})}function Vt(e,t){$t("setExtra",e,t)}function Wt(e){$t("withScope",e)}function Yt(e){var t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return t+"//"+e.host+n+(e.path?"/"+e.path:"")+"/api/"}
47
- function Kt(e,t){return""+Yt(e)+e.projectId+"/"+t+"/"}function Xt(e){return t={sentry_key:e.publicKey,sentry_version:"7"},Object.keys(t).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])})).join("&");var t}function Zt(e){return function(e){return Kt(e,"store")}(e)+"?"+Xt(e)}function Jt(e,t){return t||function(e){return Kt(e,"envelope")}(e)+"?"+Xt(e)}var Qt=[];function en(e){return e.reduce((function(e,t){return e.every((function(e){return t.name!==e.name}))&&e.push(t),e}),[])}function tn(e){var t={};return function(e){var t=e.defaultIntegrations&&ie(e.defaultIntegrations)||[],n=e.integrations,r=ie(en(t));Array.isArray(n)?r=ie(r.filter((function(e){return n.every((function(t){return t.name!==e.name}))})),en(n)):"function"==typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);var o=r.map((function(e){return e.name})),i="Debug";return-1!==o.indexOf(i)&&r.push.apply(r,ie(r.splice(o.indexOf(i),1))),r}(e).forEach((function(e){t[e.name]=e,function(e){-1===Qt.indexOf(e.name)&&(e.setupOnce(Rt,jt),
48
- Qt.push(e.name),Re.log("Integration installed: "+e.name))}(e)})),qe(t,"initialized",!0),t}var nn="Not capturing exception because it's already been captured.",rn=function(){function e(e,t){this._integrations={},this._numProcessing=0,this._backend=new e(t),this._options=t,t.dsn&&(this._dsn=Ne(t.dsn))}return e.prototype.captureException=function(e,t,n){var r=this;if(!xt(e)){var o=t&&t.event_id;return this._process(this._getBackend().eventFromException(e,t).then((function(e){return r._captureEvent(e,t,n)})).then((function(e){o=e}))),o}Re.log(nn)},e.prototype.captureMessage=function(e,t,n,r){var o=this,i=n&&n.event_id,a=ge(e)?this._getBackend().eventFromMessage(String(e),t,n):this._getBackend().eventFromException(e,n);return this._process(a.then((function(e){return o._captureEvent(e,n,r)})).then((function(e){i=e}))),i},e.prototype.captureEvent=function(e,t,n){if(!(t&&t.originalException&&xt(t.originalException))){var r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((function(e){r=e}))),r}
49
- Re.log(nn)},e.prototype.captureSession=function(e){this._isEnabled()?"string"!=typeof e.release?ae()&&Re.warn("Discarded session because of missing or non-string release"):(this._sendSession(e),e.update({init:!1})):ae()&&Re.warn("SDK not enabled, will not capture session.")},e.prototype.getDsn=function(){return this._dsn},e.prototype.getOptions=function(){return this._options},e.prototype.getTransport=function(){return this._getBackend().getTransport()},e.prototype.flush=function(e){var t=this;return this._isClientDoneProcessing(e).then((function(n){return t.getTransport().close(e).then((function(e){return n&&e}))}))},e.prototype.close=function(e){var t=this;return this.flush(e).then((function(e){return t.getOptions().enabled=!1,e}))},e.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=tn(this._options))},e.prototype.getIntegration=function(e){try{return this._integrations[e.id]||null}catch(t){
50
- return Re.warn("Cannot retrieve integration "+e.id+" from the current Client"),null}},e.prototype._updateSessionFromEvent=function(e,t){var n,r,o=!1,i=!1,a=t.exception&&t.exception.values;if(a){i=!0;try{for(var s=re(a),l=s.next();!l.done;l=s.next()){var c=l.value.mechanism;if(c&&!1===c.handled){o=!0;break}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}var u="ok"===e.status;(u&&0===e.errors||u&&o)&&(e.update(ne(ne({},o&&{status:"crashed"}),{errors:e.errors||Number(i||o)})),this.captureSession(e))},e.prototype._sendSession=function(e){this._getBackend().sendSession(e)},e.prototype._isClientDoneProcessing=function(e){var t=this;return new Ct((function(n){var r=0,o=setInterval((function(){0==t._numProcessing?(clearInterval(o),n(!0)):(r+=1,e&&r>=e&&(clearInterval(o),n(!1)))}),1)}))},e.prototype._getBackend=function(){return this._backend},e.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},
51
- e.prototype._prepareEvent=function(e,t,n){var r=this,o=this.getOptions().normalizeDepth,i=void 0===o?3:o,a=ne(ne({},e),{event_id:e.event_id||(n&&n.event_id?n.event_id:gt()),timestamp:e.timestamp||Lt()});this._applyClientOptions(a),this._applyIntegrationsMetadata(a);var s=t;n&&n.captureContext&&(s=Ot.clone(s).update(n.captureContext));var l=kt(a);return s&&(l=s.applyToEvent(a,n)),l.then((function(e){return e&&(e.sdkProcessingMetadata=ne(ne({},e.sdkProcessingMetadata),{normalizeDepth:Xe(i)})),"number"==typeof i&&i>0?r._normalizeEvent(e,i):e}))},e.prototype._normalizeEvent=function(e,t){if(!e)return null;var n=ne(ne(ne(ne(ne({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((function(e){return ne(ne({},e),e.data&&{data:Xe(e.data,t)})}))}),e.user&&{user:Xe(e.user,t)}),e.contexts&&{contexts:Xe(e.contexts,t)}),e.extra&&{extra:Xe(e.extra,t)});return e.contexts&&e.contexts.trace&&(n.contexts.trace=e.contexts.trace),e.sdkProcessingMetadata=ne(ne({},e.sdkProcessingMetadata),{baseClientNormalized:!0}),n},
52
- e.prototype._applyClientOptions=function(e){var t=this.getOptions(),n=t.environment,r=t.release,o=t.dist,i=t.maxValueLength,a=void 0===i?250:i;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==o&&(e.dist=o),e.message&&(e.message=Be(e.message,a));var s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Be(s.value,a));var l=e.request;l&&l.url&&(l.url=Be(l.url,a))},e.prototype._applyIntegrationsMetadata=function(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=ie(e.sdk.integrations||[],t))},e.prototype._sendEvent=function(e){this._getBackend().sendEvent(e)},e.prototype._captureEvent=function(e,t,n){return this._processEvent(e,t,n).then((function(e){return e.event_id}),(function(e){Re.error(e)}))},e.prototype._processEvent=function(e,t,n){var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate,s=this.getTransport();function l(e,t){
53
- s.recordLostEvent&&s.recordLostEvent(e,t)}if(!this._isEnabled())return St(new Ce("SDK not enabled, will not capture event."));var c="transaction"===e.type;return!c&&"number"==typeof a&&Math.random()>a?(l("sample_rate","event"),St(new Ce("Discarding event because it's not included in the random sample (sampling rate = "+a+")"))):this._prepareEvent(e,n,t).then((function(n){if(null===n)throw l("event_processor",e.type||"event"),new Ce("An event processor returned null, will not send event.");return t&&t.data&&!0===t.data.__sentry__||c||!i?n:function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(be(e))return e.then((function(e){if(!ve(e)&&null!==e)throw new Ce(t);return e}),(function(e){throw new Ce("beforeSend rejected with "+e)}));if(!ve(e)&&null!==e)throw new Ce(t);return e}(i(n,t))})).then((function(t){if(null===t)throw l("before_send",e.type||"event"),new Ce("`beforeSend` returned `null`, will not send event.");var o=n&&n.getSession&&n.getSession()
54
- ;return!c&&o&&r._updateSessionFromEvent(o,t),r._sendEvent(t),t})).then(null,(function(e){if(e instanceof Ce)throw e;throw r.captureException(e,{data:{__sentry__:!0},originalException:e}),new Ce("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+e)}))},e.prototype._process=function(e){var t=this;this._numProcessing+=1,e.then((function(e){return t._numProcessing-=1,e}),(function(e){return t._numProcessing-=1,e}))},e}();var on=function(){function e(){}return e.prototype.sendEvent=function(e){return kt({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:"skipped"})},e.prototype.close=function(e){return kt(!0)},e}(),an=function(){function e(e){this._options=e,this._options.dsn||Re.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return e.prototype.eventFromException=function(e,t){throw new Ce("Backend has to implement `eventFromException` method")},
55
- e.prototype.eventFromMessage=function(e,t,n){throw new Ce("Backend has to implement `eventFromMessage` method")},e.prototype.sendEvent=function(e){this._transport.sendEvent(e).then(null,(function(e){ae()&&Re.error("Error while sending event: "+e)}))},e.prototype.sendSession=function(e){this._transport.sendSession?this._transport.sendSession(e).then(null,(function(e){ae()&&Re.error("Error while sending session: "+e)})):ae()&&Re.warn("Dropping session because custom transport doesn't implement sendSession")},e.prototype.getTransport=function(){return this._transport},e.prototype._setupTransport=function(){return new on},e}();function sn(e){if(e.metadata&&e.metadata.sdk){var t=e.metadata.sdk;return{name:t.name,version:t.version}}}function ln(e,t){var n,r=sn(t),o=e.type||"event",i="transaction"===o||!!t.tunnel,a=(e.sdkProcessingMetadata||{}).transactionSampling||{},s=a.method,l=a.rate;!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,
56
- e.sdk.integrations=ie(e.sdk.integrations||[],t.integrations||[]),e.sdk.packages=ie(e.sdk.packages||[],t.packages||[]))}(e,t.metadata.sdk),e.tags=e.tags||{},e.extra=e.extra||{},e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baseClientNormalized||(e.tags.skippedNormalization=!0,e.extra.normalizeDepth=e.sdkProcessingMetadata?e.sdkProcessingMetadata.normalizeDepth:"unset"),delete e.sdkProcessingMetadata;try{n=JSON.stringify(e)}catch(t){e.tags.JSONStringifyError=!0,e.extra.JSONStringifyError=t;try{n=JSON.stringify(Xe(e))}catch(e){var c=e;n=JSON.stringify({message:"JSON.stringify error after renormalization",extra:{message:c.message,stack:c.stack}})}}var u={body:n,type:o,url:i?Jt(t.dsn,t.tunnel):Zt(t.dsn)};if(i){var h=JSON.stringify(ne(ne({event_id:e.event_id,sent_at:(new Date).toISOString()},r&&{sdk:r}),!!t.tunnel&&{dsn:Ee(t.dsn)}))+"\n"+JSON.stringify({type:o,sample_rates:[{id:s,rate:l}]})+"\n"+u.body;u.body=h}return u}var cn,un=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){
57
- cn=Function.prototype.toString,Function.prototype.toString=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=$e(this)||this;return cn.apply(n,e)}},e.id="FunctionToString",e}(),hn=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],dn=function(){function e(t){void 0===t&&(t={}),this._options=t,this.name=e.id}return e.prototype.setupOnce=function(){Rt((function(t){var n=jt();if(!n)return t;var r=n.getIntegration(e);if(r){var o=n.getClient(),i=o?o.getOptions():{},a="function"==typeof r._mergeOptions?r._mergeOptions(i):{};return"function"!=typeof r._shouldDropEvent?t:r._shouldDropEvent(t,a)?null:t}return t}))},e.prototype._shouldDropEvent=function(e,t){return this._isSentryError(e,t)?(ae()&&Re.warn("Event dropped due to being internal Sentry Error.\nEvent: "+_t(e)),!0):this._isIgnoredError(e,t)?(ae()&&Re.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+_t(e)),
58
- !0):this._isDeniedUrl(e,t)?(ae()&&Re.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+_t(e)+".\nUrl: "+this._getEventFilterUrl(e)),!0):!this._isAllowedUrl(e,t)&&(ae()&&Re.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+_t(e)+".\nUrl: "+this._getEventFilterUrl(e)),!0)},e.prototype._isSentryError=function(e,t){if(!t.ignoreInternal)return!1;try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1},e.prototype._isIgnoredError=function(e,t){return!(!t.ignoreErrors||!t.ignoreErrors.length)&&this._getPossibleEventMessages(e).some((function(e){return t.ignoreErrors.some((function(t){return je(e,t)}))}))},e.prototype._isDeniedUrl=function(e,t){if(!t.denyUrls||!t.denyUrls.length)return!1;var n=this._getEventFilterUrl(e);return!!n&&t.denyUrls.some((function(e){return je(n,e)}))},e.prototype._isAllowedUrl=function(e,t){if(!t.allowUrls||!t.allowUrls.length)return!0;var n=this._getEventFilterUrl(e);return!n||t.allowUrls.some((function(e){return je(n,e)}))
59
- },e.prototype._mergeOptions=function(e){return void 0===e&&(e={}),{allowUrls:ie(this._options.whitelistUrls||[],this._options.allowUrls||[],e.whitelistUrls||[],e.allowUrls||[]),denyUrls:ie(this._options.blacklistUrls||[],this._options.denyUrls||[],e.blacklistUrls||[],e.denyUrls||[]),ignoreErrors:ie(this._options.ignoreErrors||[],e.ignoreErrors||[],hn),ignoreInternal:void 0===this._options.ignoreInternal||this._options.ignoreInternal}},e.prototype._getPossibleEventMessages=function(e){if(e.message)return[e.message];if(e.exception)try{var t=e.exception.values&&e.exception.values[0]||{},n=t.type,r=void 0===n?"":n,o=t.value,i=void 0===o?"":o;return[""+i,r+": "+i]}catch(t){return ae()&&Re.error("Cannot extract message for event "+_t(e)),[]}return[]},e.prototype._getLastValidUrl=function(e){void 0===e&&(e=[]);for(var t=e.length-1;t>=0;t--){var n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null},e.prototype._getEventFilterUrl=function(e){try{
60
- if(e.stacktrace)return this._getLastValidUrl(e.stacktrace.frames);var t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?this._getLastValidUrl(t):null}catch(t){return ae()&&Re.error("Cannot extract url for event "+_t(e)),null}},e.id="InboundFilters",e}();function pn(e,t,n,r){var o={filename:e,function:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}var mn=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,fn=/\((\S*)(?::(\d+))(?::(\d+))\)/,gn=function(e){var t=mn.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){var n=fn.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}var r=oe(An(t[1]||"?",t[2]),2),o=r[0];return pn(r[1],o,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}
42
+ return this.getStackTop().scope},e.prototype.getStack=function(){return this._stack},e.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},e.prototype.captureException=function(e,t){var n=this._lastEventId=t&&t.event_id?t.event_id:gt(),r=t;if(!t){var o=void 0;try{throw new Error("Sentry syntheticException")}catch(e){o=e}r={originalException:e,syntheticException:o}}return this._invokeClient("captureException",e,ne(ne({},r),{event_id:n})),n},e.prototype.captureMessage=function(e,t,n){var r=this._lastEventId=n&&n.event_id?n.event_id:gt(),o=n;if(!n){var i=void 0;try{throw new Error(e)}catch(e){i=e}o={originalException:e,syntheticException:i}}return this._invokeClient("captureMessage",e,t,ne(ne({},o),{event_id:r})),r},e.prototype.captureEvent=function(e,t){var n=t&&t.event_id?t.event_id:gt();return"transaction"!==e.type&&(this._lastEventId=n),this._invokeClient("captureEvent",e,ne(ne({},t),{event_id:n})),n},e.prototype.lastEventId=function(){return this._lastEventId},
43
+ e.prototype.addBreadcrumb=function(e,t){var n=this.getStackTop(),r=n.scope,o=n.client;if(r&&o){var i=o.getOptions&&o.getOptions()||{},a=i.beforeBreadcrumb,s=void 0===a?null:a,l=i.maxBreadcrumbs,c=void 0===l?100:l;if(!(c<=0)){var u=Lt(),h=ne({timestamp:u},e),d=s?Oe((function(){return s(h,t)})):h;null!==d&&r.addBreadcrumb(d,c)}}},e.prototype.setUser=function(e){var t=this.getScope();t&&t.setUser(e)},e.prototype.setTags=function(e){var t=this.getScope();t&&t.setTags(e)},e.prototype.setExtras=function(e){var t=this.getScope();t&&t.setExtras(e)},e.prototype.setTag=function(e,t){var n=this.getScope();n&&n.setTag(e,t)},e.prototype.setExtra=function(e,t){var n=this.getScope();n&&n.setExtra(e,t)},e.prototype.setContext=function(e,t){var n=this.getScope();n&&n.setContext(e,t)},e.prototype.configureScope=function(e){var t=this.getStackTop(),n=t.scope,r=t.client;n&&r&&e(n)},e.prototype.run=function(e){var t=Ft(this);try{e(this)}finally{Ft(t)}},e.prototype.getIntegration=function(e){var t=this.getClient()
44
+ ;if(!t)return null;try{return t.getIntegration(e)}catch(t){return Re.warn("Cannot retrieve integration "+e.id+" from the current Hub"),null}},e.prototype.startSpan=function(e){return this._callExtensionMethod("startSpan",e)},e.prototype.startTransaction=function(e,t){return this._callExtensionMethod("startTransaction",e,t)},e.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},e.prototype.captureSession=function(e){if(void 0===e&&(e=!1),e)return this.endSession();this._sendSessionUpdate()},e.prototype.endSession=function(){var e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&n.close(),this._sendSessionUpdate(),t&&t.setSession()},e.prototype.startSession=function(e){var t=this.getStackTop(),n=t.scope,r=t.client,o=r&&r.getOptions()||{},i=o.release,a=o.environment,s=(ce().navigator||{}).userAgent,l=new Pt(ne(ne(ne({release:i,environment:a},n&&{user:n.getUser()}),s&&{userAgent:s}),e));if(n){var c=n.getSession&&n.getSession();c&&"ok"===c.status&&c.update({status:"exited"}),
45
+ this.endSession(),n.setSession(l)}return l},e.prototype._sendSessionUpdate=function(){var e=this.getStackTop(),t=e.scope,n=e.client;if(t){var r=t.getSession&&t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}},e.prototype._invokeClient=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=this.getStackTop(),i=o.scope,a=o.client;a&&a[e]&&(t=a)[e].apply(t,ie(n,[i]))},e.prototype._callExtensionMethod=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Bt(),o=r.__SENTRY__;if(o&&o.extensions&&"function"==typeof o.extensions[e])return o.extensions[e].apply(this,t);Re.warn("Extension method "+e+" couldn't be found, doing nothing.")},e}();function Bt(){var e=ce();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Ft(e){var t=Bt(),n=qt(t);return Ut(t,e),n}function jt(){var e=Bt();return Ht(e)&&!qt(e).isOlderThan(4)||Ut(e,new Dt),se()?function(e){try{var t=Bt().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active
46
+ ;if(!n)return qt(e);if(!Ht(n)||qt(n).isOlderThan(4)){var r=qt(e).getStackTop();Ut(n,new Dt(r.client,Ot.clone(r.scope)))}return qt(n)}catch(t){return qt(e)}}(e):qt(e)}function Ht(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function qt(e){return e&&e.__SENTRY__&&e.__SENTRY__.hub||(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=new Dt),e.__SENTRY__.hub}function Ut(e,t){return!!e&&(e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.hub=t,!0)}function $t(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=jt();if(r&&r[e])return r[e].apply(r,ie(t));throw new Error("No hub defined or "+e+" was not found on the hub, please open a bug report.")}function Gt(e,t){var n;try{throw new Error("Sentry syntheticException")}catch(e){n=e}return $t("captureException",e,{captureContext:t,originalException:e,syntheticException:n})}function Vt(e,t){$t("setExtra",e,t)}function Wt(e){$t("withScope",e)}function Yt(e){var t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:""
47
+ ;return t+"//"+e.host+n+(e.path?"/"+e.path:"")+"/api/"}function Kt(e,t){return""+Yt(e)+e.projectId+"/"+t+"/"}function Xt(e){return t={sentry_key:e.publicKey,sentry_version:"7"},Object.keys(t).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])})).join("&");var t}function Zt(e){return function(e){return Kt(e,"store")}(e)+"?"+Xt(e)}function Jt(e,t){return t||function(e){return Kt(e,"envelope")}(e)+"?"+Xt(e)}var Qt=[];function en(e){return e.reduce((function(e,t){return e.every((function(e){return t.name!==e.name}))&&e.push(t),e}),[])}function tn(e){var t={};return function(e){var t=e.defaultIntegrations&&ie(e.defaultIntegrations)||[],n=e.integrations,r=ie(en(t));Array.isArray(n)?r=ie(r.filter((function(e){return n.every((function(t){return t.name!==e.name}))})),en(n)):"function"==typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);var o=r.map((function(e){return e.name})),i="Debug";return-1!==o.indexOf(i)&&r.push.apply(r,ie(r.splice(o.indexOf(i),1))),r}(e).forEach((function(e){t[e.name]=e,
48
+ function(e){-1===Qt.indexOf(e.name)&&(e.setupOnce(Rt,jt),Qt.push(e.name),Re.log("Integration installed: "+e.name))}(e)})),qe(t,"initialized",!0),t}var nn="Not capturing exception because it's already been captured.",rn=function(){function e(e,t){this._integrations={},this._numProcessing=0,this._backend=new e(t),this._options=t,t.dsn&&(this._dsn=Ne(t.dsn))}return e.prototype.captureException=function(e,t,n){var r=this;if(!xt(e)){var o=t&&t.event_id;return this._process(this._getBackend().eventFromException(e,t).then((function(e){return r._captureEvent(e,t,n)})).then((function(e){o=e}))),o}Re.log(nn)},e.prototype.captureMessage=function(e,t,n,r){var o=this,i=n&&n.event_id,a=ge(e)?this._getBackend().eventFromMessage(String(e),t,n):this._getBackend().eventFromException(e,n);return this._process(a.then((function(e){return o._captureEvent(e,n,r)})).then((function(e){i=e}))),i},e.prototype.captureEvent=function(e,t,n){if(!(t&&t.originalException&&xt(t.originalException))){var r=t&&t.event_id
49
+ ;return this._process(this._captureEvent(e,t,n).then((function(e){r=e}))),r}Re.log(nn)},e.prototype.captureSession=function(e){this._isEnabled()?"string"!=typeof e.release?ae()&&Re.warn("Discarded session because of missing or non-string release"):(this._sendSession(e),e.update({init:!1})):ae()&&Re.warn("SDK not enabled, will not capture session.")},e.prototype.getDsn=function(){return this._dsn},e.prototype.getOptions=function(){return this._options},e.prototype.getTransport=function(){return this._getBackend().getTransport()},e.prototype.flush=function(e){var t=this;return this._isClientDoneProcessing(e).then((function(n){return t.getTransport().close(e).then((function(e){return n&&e}))}))},e.prototype.close=function(e){var t=this;return this.flush(e).then((function(e){return t.getOptions().enabled=!1,e}))},e.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=tn(this._options))},e.prototype.getIntegration=function(e){try{
50
+ return this._integrations[e.id]||null}catch(t){return Re.warn("Cannot retrieve integration "+e.id+" from the current Client"),null}},e.prototype._updateSessionFromEvent=function(e,t){var n,r,o=!1,i=!1,a=t.exception&&t.exception.values;if(a){i=!0;try{for(var s=re(a),l=s.next();!l.done;l=s.next()){var c=l.value.mechanism;if(c&&!1===c.handled){o=!0;break}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}var u="ok"===e.status;(u&&0===e.errors||u&&o)&&(e.update(ne(ne({},o&&{status:"crashed"}),{errors:e.errors||Number(i||o)})),this.captureSession(e))},e.prototype._sendSession=function(e){this._getBackend().sendSession(e)},e.prototype._isClientDoneProcessing=function(e){var t=this;return new Ct((function(n){var r=0,o=setInterval((function(){0==t._numProcessing?(clearInterval(o),n(!0)):(r+=1,e&&r>=e&&(clearInterval(o),n(!1)))}),1)}))},e.prototype._getBackend=function(){return this._backend},e.prototype._isEnabled=function(){
51
+ return!1!==this.getOptions().enabled&&void 0!==this._dsn},e.prototype._prepareEvent=function(e,t,n){var r=this,o=this.getOptions().normalizeDepth,i=void 0===o?3:o,a=ne(ne({},e),{event_id:e.event_id||(n&&n.event_id?n.event_id:gt()),timestamp:e.timestamp||Lt()});this._applyClientOptions(a),this._applyIntegrationsMetadata(a);var s=t;n&&n.captureContext&&(s=Ot.clone(s).update(n.captureContext));var l=kt(a);return s&&(l=s.applyToEvent(a,n)),l.then((function(e){return e&&(e.sdkProcessingMetadata=ne(ne({},e.sdkProcessingMetadata),{normalizeDepth:Xe(i)})),"number"==typeof i&&i>0?r._normalizeEvent(e,i):e}))},e.prototype._normalizeEvent=function(e,t){if(!e)return null;var n=ne(ne(ne(ne(ne({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((function(e){return ne(ne({},e),e.data&&{data:Xe(e.data,t)})}))}),e.user&&{user:Xe(e.user,t)}),e.contexts&&{contexts:Xe(e.contexts,t)}),e.extra&&{extra:Xe(e.extra,t)});return e.contexts&&e.contexts.trace&&(n.contexts.trace=e.contexts.trace),
52
+ e.sdkProcessingMetadata=ne(ne({},e.sdkProcessingMetadata),{baseClientNormalized:!0}),n},e.prototype._applyClientOptions=function(e){var t=this.getOptions(),n=t.environment,r=t.release,o=t.dist,i=t.maxValueLength,a=void 0===i?250:i;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==o&&(e.dist=o),e.message&&(e.message=Be(e.message,a));var s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Be(s.value,a));var l=e.request;l&&l.url&&(l.url=Be(l.url,a))},e.prototype._applyIntegrationsMetadata=function(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=ie(e.sdk.integrations||[],t))},e.prototype._sendEvent=function(e){this._getBackend().sendEvent(e)},e.prototype._captureEvent=function(e,t,n){return this._processEvent(e,t,n).then((function(e){return e.event_id}),(function(e){Re.error(e)}))},e.prototype._processEvent=function(e,t,n){
53
+ var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate,s=this.getTransport();function l(e,t){s.recordLostEvent&&s.recordLostEvent(e,t)}if(!this._isEnabled())return St(new Ce("SDK not enabled, will not capture event."));var c="transaction"===e.type;return!c&&"number"==typeof a&&Math.random()>a?(l("sample_rate","event"),St(new Ce("Discarding event because it's not included in the random sample (sampling rate = "+a+")"))):this._prepareEvent(e,n,t).then((function(n){if(null===n)throw l("event_processor",e.type||"event"),new Ce("An event processor returned null, will not send event.");return t&&t.data&&!0===t.data.__sentry__||c||!i?n:function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(be(e))return e.then((function(e){if(!ve(e)&&null!==e)throw new Ce(t);return e}),(function(e){throw new Ce("beforeSend rejected with "+e)}));if(!ve(e)&&null!==e)throw new Ce(t);return e}(i(n,t))})).then((function(t){if(null===t)throw l("before_send",e.type||"event"),
54
+ new Ce("`beforeSend` returned `null`, will not send event.");var o=n&&n.getSession&&n.getSession();return!c&&o&&r._updateSessionFromEvent(o,t),r._sendEvent(t),t})).then(null,(function(e){if(e instanceof Ce)throw e;throw r.captureException(e,{data:{__sentry__:!0},originalException:e}),new Ce("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+e)}))},e.prototype._process=function(e){var t=this;this._numProcessing+=1,e.then((function(e){return t._numProcessing-=1,e}),(function(e){return t._numProcessing-=1,e}))},e}();var on=function(){function e(){}return e.prototype.sendEvent=function(e){return kt({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:"skipped"})},e.prototype.close=function(e){return kt(!0)},e}(),an=function(){function e(e){this._options=e,this._options.dsn||Re.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}
55
+ return e.prototype.eventFromException=function(e,t){throw new Ce("Backend has to implement `eventFromException` method")},e.prototype.eventFromMessage=function(e,t,n){throw new Ce("Backend has to implement `eventFromMessage` method")},e.prototype.sendEvent=function(e){this._transport.sendEvent(e).then(null,(function(e){ae()&&Re.error("Error while sending event: "+e)}))},e.prototype.sendSession=function(e){this._transport.sendSession?this._transport.sendSession(e).then(null,(function(e){ae()&&Re.error("Error while sending session: "+e)})):ae()&&Re.warn("Dropping session because custom transport doesn't implement sendSession")},e.prototype.getTransport=function(){return this._transport},e.prototype._setupTransport=function(){return new on},e}();function sn(e){if(e.metadata&&e.metadata.sdk){var t=e.metadata.sdk;return{name:t.name,version:t.version}}}function ln(e,t){var n,r=sn(t),o=e.type||"event",i="transaction"===o||!!t.tunnel,a=(e.sdkProcessingMetadata||{}).transactionSampling||{},s=a.method,l=a.rate
56
+ ;!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=ie(e.sdk.integrations||[],t.integrations||[]),e.sdk.packages=ie(e.sdk.packages||[],t.packages||[]))}(e,t.metadata.sdk),e.tags=e.tags||{},e.extra=e.extra||{},e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baseClientNormalized||(e.tags.skippedNormalization=!0,e.extra.normalizeDepth=e.sdkProcessingMetadata?e.sdkProcessingMetadata.normalizeDepth:"unset"),delete e.sdkProcessingMetadata;try{n=JSON.stringify(e)}catch(t){e.tags.JSONStringifyError=!0,e.extra.JSONStringifyError=t;try{n=JSON.stringify(Xe(e))}catch(e){var c=e;n=JSON.stringify({message:"JSON.stringify error after renormalization",extra:{message:c.message,stack:c.stack}})}}var u={body:n,type:o,url:i?Jt(t.dsn,t.tunnel):Zt(t.dsn)};if(i){var h=JSON.stringify(ne(ne({event_id:e.event_id,sent_at:(new Date).toISOString()},r&&{sdk:r}),!!t.tunnel&&{dsn:Ee(t.dsn)}))+"\n"+JSON.stringify({type:o,sample_rates:[{id:s,rate:l}]})+"\n"+u.body
57
+ ;u.body=h}return u}var cn,un=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){cn=Function.prototype.toString,Function.prototype.toString=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=$e(this)||this;return cn.apply(n,e)}},e.id="FunctionToString",e}(),hn=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],dn=function(){function e(t){void 0===t&&(t={}),this._options=t,this.name=e.id}return e.prototype.setupOnce=function(){Rt((function(t){var n=jt();if(!n)return t;var r=n.getIntegration(e);if(r){var o=n.getClient(),i=o?o.getOptions():{},a="function"==typeof r._mergeOptions?r._mergeOptions(i):{};return"function"!=typeof r._shouldDropEvent?t:r._shouldDropEvent(t,a)?null:t}return t}))},e.prototype._shouldDropEvent=function(e,t){return this._isSentryError(e,t)?(ae()&&Re.warn("Event dropped due to being internal Sentry Error.\nEvent: "+_t(e)),
58
+ !0):this._isIgnoredError(e,t)?(ae()&&Re.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+_t(e)),!0):this._isDeniedUrl(e,t)?(ae()&&Re.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+_t(e)+".\nUrl: "+this._getEventFilterUrl(e)),!0):!this._isAllowedUrl(e,t)&&(ae()&&Re.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+_t(e)+".\nUrl: "+this._getEventFilterUrl(e)),!0)},e.prototype._isSentryError=function(e,t){if(!t.ignoreInternal)return!1;try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1},e.prototype._isIgnoredError=function(e,t){return!(!t.ignoreErrors||!t.ignoreErrors.length)&&this._getPossibleEventMessages(e).some((function(e){return t.ignoreErrors.some((function(t){return je(e,t)}))}))},e.prototype._isDeniedUrl=function(e,t){if(!t.denyUrls||!t.denyUrls.length)return!1;var n=this._getEventFilterUrl(e);return!!n&&t.denyUrls.some((function(e){return je(n,e)}))},e.prototype._isAllowedUrl=function(e,t){
59
+ if(!t.allowUrls||!t.allowUrls.length)return!0;var n=this._getEventFilterUrl(e);return!n||t.allowUrls.some((function(e){return je(n,e)}))},e.prototype._mergeOptions=function(e){return void 0===e&&(e={}),{allowUrls:ie(this._options.whitelistUrls||[],this._options.allowUrls||[],e.whitelistUrls||[],e.allowUrls||[]),denyUrls:ie(this._options.blacklistUrls||[],this._options.denyUrls||[],e.blacklistUrls||[],e.denyUrls||[]),ignoreErrors:ie(this._options.ignoreErrors||[],e.ignoreErrors||[],hn),ignoreInternal:void 0===this._options.ignoreInternal||this._options.ignoreInternal}},e.prototype._getPossibleEventMessages=function(e){if(e.message)return[e.message];if(e.exception)try{var t=e.exception.values&&e.exception.values[0]||{},n=t.type,r=void 0===n?"":n,o=t.value,i=void 0===o?"":o;return[""+i,r+": "+i]}catch(t){return ae()&&Re.error("Cannot extract message for event "+_t(e)),[]}return[]},e.prototype._getLastValidUrl=function(e){void 0===e&&(e=[]);for(var t=e.length-1;t>=0;t--){var n=e[t]
60
+ ;if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null},e.prototype._getEventFilterUrl=function(e){try{if(e.stacktrace)return this._getLastValidUrl(e.stacktrace.frames);var t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?this._getLastValidUrl(t):null}catch(t){return ae()&&Re.error("Cannot extract url for event "+_t(e)),null}},e.id="InboundFilters",e}();function pn(e,t,n,r){var o={filename:e,function:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}var mn=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,fn=/\((\S*)(?::(\d+))(?::(\d+))\)/,gn=function(e){var t=mn.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){var n=fn.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}var r=oe(An(t[1]||"?",t[2]),2),o=r[0];return pn(r[1],o,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}
61
61
  },vn=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,yn=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,_n=function(e){var t,n=vn.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=yn.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var o=n[3],i=n[1]||"?";return i=(t=oe(An(i,o),2))[0],pn(o=t[1],i,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},bn=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,wn=function(e){var t=bn.exec(e);return t?pn(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0},xn=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,kn=function(e){var t=xn.exec(e);return t?pn(t[2],t[3]||"?",+t[1]):void 0},Sn=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Cn=function(e){var t=Sn.exec(e)
62
62
  ;return t?pn(t[5],t[3]||t[4]||"?",+t[1],+t[2]):void 0},An=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]};function En(e){var t=Nn(e),n={type:e&&e.name,value:Ln(e)};return t&&t.length&&(n.stacktrace={frames:t}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function Tn(e){return{exception:{values:[En(e)]}}}function Nn(e){var t=e.stacktrace||e.stack||"",n=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(Mn.test(e.message))return 1}return 0}(e);try{return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n){var r,o,i,a;void 0===n&&(n=0);var s=[];try{for(var l=re(t.split("\n").slice(n)),c=l.next();!c.done;c=l.next()){var u=c.value;try{for(var h=(i=void 0,re(e)),d=h.next();!d.done;d=h.next()){var p=(0,d.value)(u);if(p){s.push(p);break}}}catch(e){i={error:e}}finally{try{
63
- d&&!d.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}return Pe(s)}}(kn,Cn,gn,wn,_n)(t,n)}catch(e){}return[]}var Mn=/Minified React error #\d+;/i;function Ln(e){var t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function zn(e,t,n){var r;if(void 0===n&&(n={}),pe(e)&&e.error)return Tn(e.error);if(me(e)||de(e,"DOMException")){var o=e;if("stack"in e)r=Tn(e);else{var i=o.name||(me(o)?"DOMError":"DOMException"),a=o.message?i+": "+o.message:i;bt(r=On(a,t,n),a)}return"code"in o&&(r.tags=ne(ne({},r.tags),{"DOMException.code":""+o.code})),r}return he(e)?Tn(e):ve(e)||ye(e)?(r=function(e,t,n){var r={exception:{values:[{type:ye(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+Ze(e)}]},extra:{__serialized__:We(e)}};return t&&(r.stacktrace={frames:Nn(t)}),r}(e,t,n.isRejection),
64
- wt(r,{synthetic:!0}),r):(bt(r=On(e,t,n),""+e,void 0),wt(r,{synthetic:!0}),r)}function On(e,t,n){void 0===n&&(n={});var r={message:e};return n.attachStacktrace&&t&&(r.stacktrace={frames:Nn(t)}),r}var In,Rn=ce();function Pn(){if(In)return In;if(et(Rn.fetch))return In=Rn.fetch.bind(Rn);var e=Rn.document,t=Rn.fetch;if(e&&"function"==typeof e.createElement)try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){ae()&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return In=t.bind(Rn)}function Dn(e,t){if("[object Navigator]"===Object.prototype.toString.call(Rn&&Rn.navigator)&&"function"==typeof Rn.navigator.sendBeacon)return Rn.navigator.sendBeacon.bind(Rn.navigator)(e,t);if(Qe()){var n=Pn();n(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,(function(e){console.error(e)}))}else;}function Bn(e){return"event"===e?"error":e}var Fn=ce(),jn=function(){function e(e){
65
- var t,n,r,o=this;this.options=e,this._buffer=At(30),this._rateLimits={},this._outcomes={},this._api=(t=e.dsn,n=e._metadata,r=e.tunnel,{initDsn:t,metadata:n||{},dsn:Ne(t),tunnel:r}),this.url=Zt(this._api.dsn),this.options.sendClientReports&&Fn.document&&Fn.document.addEventListener("visibilitychange",(function(){"hidden"===Fn.document.visibilityState&&o._flushOutcomes()}))}return e.prototype.sendEvent=function(e){return this._sendRequest(ln(e,this._api),e)},e.prototype.sendSession=function(e){return this._sendRequest(function(e,t){var n=sn(t),r="aggregates"in e?"sessions":"session";return{body:JSON.stringify(ne(ne({sent_at:(new Date).toISOString()},n&&{sdk:n}),!!t.tunnel&&{dsn:Ee(t.dsn)}))+"\n"+JSON.stringify({type:r})+"\n"+JSON.stringify(e),type:r,url:Jt(t.dsn,t.tunnel)}}(e,this._api),e)},e.prototype.close=function(e){return this._buffer.drain(e)},e.prototype.recordLostEvent=function(e,t){var n;if(this.options.sendClientReports){var r=Bn(t)+":"+e;Re.log("Adding outcome: "+r),
66
- this._outcomes[r]=(null!=(n=this._outcomes[r])?n:0)+1}},e.prototype._flushOutcomes=function(){if(this.options.sendClientReports){var e=this._outcomes;if(this._outcomes={},Object.keys(e).length){Re.log("Flushing outcomes:\n"+JSON.stringify(e,null,2));var t=Jt(this._api.dsn,this._api.tunnel),n=JSON.stringify(ne({},this._api.tunnel&&{dsn:Ee(this._api.dsn)}))+"\n"+JSON.stringify({type:"client_report"})+"\n"+JSON.stringify({timestamp:Lt(),discarded_events:Object.keys(e).map((function(t){var n=oe(t.split(":"),2),r=n[0];return{reason:n[1],category:r,quantity:e[t]}}))});try{Dn(t,n)}catch(e){Re.error(e)}}else Re.log("No outcomes to flush")}},e.prototype._handleResponse=function(e){var t,n=e.requestType,r=e.response,o=e.headers,i=e.resolve,a=e.reject,s=(t=r.status)>=200&&t<300?"success":429===t?"rate_limit":t>=400&&t<500?"invalid":t>=500?"failed":"unknown";this._handleRateLimit(o)&&ae()&&Re.warn("Too many "+n+" requests, backing off until: "+this._disabledUntil(n)),"success"!==s?a(r):i({status:s})},
67
- e.prototype._disabledUntil=function(e){var t=Bn(e);return this._rateLimits[t]||this._rateLimits.all},e.prototype._isRateLimited=function(e){return this._disabledUntil(e)>new Date(Date.now())},e.prototype._handleRateLimit=function(e){var t,n,r,o,i=Date.now(),a=e["x-sentry-rate-limits"],s=e["retry-after"];if(a){try{for(var l=re(a.trim().split(",")),c=l.next();!c.done;c=l.next()){var u=c.value.split(":",2),h=parseInt(u[0],10),d=1e3*(isNaN(h)?60:h);try{for(var p=(r=void 0,re(u[1].split(";"))),m=p.next();!m.done;m=p.next()){var f=m.value;this._rateLimits[f||"all"]=new Date(i+d)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return!0}return!!s&&(this._rateLimits.all=new Date(i+function(e,t){if(!t)return 6e4;var n=parseInt(""+t,10);if(!isNaN(n))return 1e3*n;var r=Date.parse(""+t);return isNaN(r)?6e4:r-e}(i,s)),!0)},e}(),Hn=function(e){function t(t,n){
68
- void 0===n&&(n=Pn());var r=e.call(this,t)||this;return r._fetch=n,r}return ee(t,e),t.prototype._sendRequest=function(e,t){var n=this;if(this._isRateLimited(e.type))return this.recordLostEvent("ratelimit_backoff",e.type),Promise.reject({event:t,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429});var r={body:e.body,method:"POST",referrerPolicy:tt()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add((function(){return new Ct((function(t,o){n._fetch(e.url,r).then((function(r){var i={"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")};n._handleResponse({requestType:e.type,response:r,headers:i,resolve:t,reject:o})})).catch(o)}))})).then(void 0,(function(t){
63
+ d&&!d.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}return Pe(s)}}(kn,Cn,gn,wn,_n)(t,n)}catch(e){}return[]}var Mn=/Minified React error #\d+;/i;function Ln(e){var t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function zn(e,t,n){var r;if(void 0===n&&(n={}),pe(e)&&e.error)return Tn(e.error);if(me(e)||de(e,"DOMException")){var o=e;if("stack"in e)r=Tn(e);else{var i=o.name||(me(o)?"DOMError":"DOMException"),a=o.message?i+": "+o.message:i;bt(r=On(a,t,n),a)}return"code"in o&&(r.tags=ne(ne({},r.tags),{"DOMException.code":""+o.code})),r}return he(e)?Tn(e):ve(e)||ye(e)?(r=function(e,t,n){var r={exception:{values:[{type:ye(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+Ze(e)}]},extra:{__serialized__:We(e)}};if(t){var o=Nn(t);o.length&&(r.stacktrace={frames:o})}return r
64
+ }(e,t,n.isRejection),wt(r,{synthetic:!0}),r):(bt(r=On(e,t,n),""+e,void 0),wt(r,{synthetic:!0}),r)}function On(e,t,n){void 0===n&&(n={});var r={message:e};if(n.attachStacktrace&&t){var o=Nn(t);o.length&&(r.stacktrace={frames:o})}return r}var In,Rn=ce();function Pn(){if(In)return In;if(et(Rn.fetch))return In=Rn.fetch.bind(Rn);var e=Rn.document,t=Rn.fetch;if(e&&"function"==typeof e.createElement)try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){ae()&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return In=t.bind(Rn)}function Dn(e,t){if("[object Navigator]"===Object.prototype.toString.call(Rn&&Rn.navigator)&&"function"==typeof Rn.navigator.sendBeacon)return Rn.navigator.sendBeacon.bind(Rn.navigator)(e,t);if(Qe()){var n=Pn();n(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,(function(e){console.error(e)}))}else;}function Bn(e){
65
+ return"event"===e?"error":e}var Fn=ce(),jn=function(){function e(e){var t,n,r,o=this;this.options=e,this._buffer=At(30),this._rateLimits={},this._outcomes={},this._api=(t=e.dsn,n=e._metadata,r=e.tunnel,{initDsn:t,metadata:n||{},dsn:Ne(t),tunnel:r}),this.url=Zt(this._api.dsn),this.options.sendClientReports&&Fn.document&&Fn.document.addEventListener("visibilitychange",(function(){"hidden"===Fn.document.visibilityState&&o._flushOutcomes()}))}return e.prototype.sendEvent=function(e){return this._sendRequest(ln(e,this._api),e)},e.prototype.sendSession=function(e){return this._sendRequest(function(e,t){var n=sn(t),r="aggregates"in e?"sessions":"session";return{body:JSON.stringify(ne(ne({sent_at:(new Date).toISOString()},n&&{sdk:n}),!!t.tunnel&&{dsn:Ee(t.dsn)}))+"\n"+JSON.stringify({type:r})+"\n"+JSON.stringify(e),type:r,url:Jt(t.dsn,t.tunnel)}}(e,this._api),e)},e.prototype.close=function(e){return this._buffer.drain(e)},e.prototype.recordLostEvent=function(e,t){var n;if(this.options.sendClientReports){
66
+ var r=Bn(t)+":"+e;Re.log("Adding outcome: "+r),this._outcomes[r]=(null!=(n=this._outcomes[r])?n:0)+1}},e.prototype._flushOutcomes=function(){if(this.options.sendClientReports){var e=this._outcomes;if(this._outcomes={},Object.keys(e).length){Re.log("Flushing outcomes:\n"+JSON.stringify(e,null,2));var t=Jt(this._api.dsn,this._api.tunnel),n=JSON.stringify(ne({},this._api.tunnel&&{dsn:Ee(this._api.dsn)}))+"\n"+JSON.stringify({type:"client_report"})+"\n"+JSON.stringify({timestamp:Lt(),discarded_events:Object.keys(e).map((function(t){var n=oe(t.split(":"),2),r=n[0];return{reason:n[1],category:r,quantity:e[t]}}))});try{Dn(t,n)}catch(e){Re.error(e)}}else Re.log("No outcomes to flush")}},e.prototype._handleResponse=function(e){var t,n=e.requestType,r=e.response,o=e.headers,i=e.resolve,a=e.reject,s=(t=r.status)>=200&&t<300?"success":429===t?"rate_limit":t>=400&&t<500?"invalid":t>=500?"failed":"unknown";this._handleRateLimit(o)&&ae()&&Re.warn("Too many "+n+" requests, backing off until: "+this._disabledUntil(n)),
67
+ "success"!==s?a(r):i({status:s})},e.prototype._disabledUntil=function(e){var t=Bn(e);return this._rateLimits[t]||this._rateLimits.all},e.prototype._isRateLimited=function(e){return this._disabledUntil(e)>new Date(Date.now())},e.prototype._handleRateLimit=function(e){var t,n,r,o,i=Date.now(),a=e["x-sentry-rate-limits"],s=e["retry-after"];if(a){try{for(var l=re(a.trim().split(",")),c=l.next();!c.done;c=l.next()){var u=c.value.split(":",2),h=parseInt(u[0],10),d=1e3*(isNaN(h)?60:h);try{for(var p=(r=void 0,re(u[1].split(";"))),m=p.next();!m.done;m=p.next()){var f=m.value;this._rateLimits[f||"all"]=new Date(i+d)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return!0}return!!s&&(this._rateLimits.all=new Date(i+function(e,t){if(!t)return 6e4;var n=parseInt(""+t,10);if(!isNaN(n))return 1e3*n;var r=Date.parse(""+t);return isNaN(r)?6e4:r-e}(i,s)),!0)},e}(),Hn=function(e){
68
+ function t(t,n){void 0===n&&(n=Pn());var r=e.call(this,t)||this;return r._fetch=n,r}return ee(t,e),t.prototype._sendRequest=function(e,t){var n=this;if(this._isRateLimited(e.type))return this.recordLostEvent("ratelimit_backoff",e.type),Promise.reject({event:t,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429});var r={body:e.body,method:"POST",referrerPolicy:tt()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add((function(){return new Ct((function(t,o){n._fetch(e.url,r).then((function(r){var i={"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")};n._handleResponse({requestType:e.type,response:r,headers:i,resolve:t,reject:o})})).catch(o)}))})).then(void 0,(function(t){
69
69
  throw t instanceof Ce?n.recordLostEvent("queue_overflow",e.type):n.recordLostEvent("network_error",e.type),t}))},t}(jn),qn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ee(t,e),t.prototype._sendRequest=function(e,t){var n=this;return this._isRateLimited(e.type)?(this.recordLostEvent("ratelimit_backoff",e.type),Promise.reject({event:t,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429})):this._buffer.add((function(){return new Ct((function(t,r){var o=new XMLHttpRequest;for(var i in o.onreadystatechange=function(){if(4===o.readyState){var i={"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")};n._handleResponse({requestType:e.type,response:o,headers:i,resolve:t,reject:r})}},o.open("POST",e.url),n.options.headers)Object.prototype.hasOwnProperty.call(n.options.headers,i)&&o.setRequestHeader(i,n.options.headers[i]);o.send(e.body)}))
70
70
  })).then(void 0,(function(t){throw t instanceof Ce?n.recordLostEvent("queue_overflow",e.type):n.recordLostEvent("network_error",e.type),t}))},t}(jn),Un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ee(t,e),t.prototype.eventFromException=function(e,t){return function(e,t,n){var r=zn(t,n&&n.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return wt(r),r.level=te.Error,n&&n.event_id&&(r.event_id=n.event_id),kt(r)}(this._options,e,t)},t.prototype.eventFromMessage=function(e,t,n){return void 0===t&&(t=te.Info),function(e,t,n,r){void 0===n&&(n=te.Info);var o=On(t,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),kt(o)}(this._options,e,t,n)},t.prototype._setupTransport=function(){if(!this._options.dsn)return e.prototype._setupTransport.call(this);var t=ne(ne({},this._options.transportOptions),{dsn:this._options.dsn,tunnel:this._options.tunnel,
71
71
  sendClientReports:this._options.sendClientReports,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(t):Qe()?new Hn(t):new qn(t)},t}(an),$n=ce(),Gn=0;function Vn(){return Gn>0}function Wn(){Gn+=1,setTimeout((function(){Gn-=1}))}function Yn(e,t,n){if(void 0===t&&(t={}),"function"!=typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if($e(e))return e}catch(t){return e}var o=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var o=r.map((function(e){return Yn(e,t)}));return e.apply(this,o)}catch(e){throw Wn(),Wt((function(n){n.addEventProcessor((function(e){return t.mechanism&&(bt(e,void 0,void 0),wt(e,t.mechanism)),e.extra=ne(ne({},e.extra),{arguments:r}),e})),Gt(e)})),e}};try{for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=e[i])}catch(e){}Ue(o,e),qe(e,"__sentry_wrapped__",o);try{Object.getOwnPropertyDescriptor(o,"name").configurable&&Object.defineProperty(o,"name",{get:function(){
@@ -79,7 +79,7 @@ mechanism:{data:{function:"handleEvent",handler:De(r),target:e},handled:!0,type:
79
79
  category:"fetch",data:e.fetchData,level:te.Error,type:"http"},{data:e.error,input:e.args}):jt().addBreadcrumb({category:"fetch",data:ne(ne({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}function pr(e){var t=ce(),n=e.from,r=e.to,o=vt(t.location.href),i=vt(n),a=vt(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),jt().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}var mr=function(){function e(t){void 0===t&&(t={}),this.name=e.id,this._key=t.key||"cause",this._limit=t.limit||5}return e.prototype.setupOnce=function(){Rt((function(t,n){var r=jt().getIntegration(e);return r?function(e,t,n,r){if(!(n.exception&&n.exception.values&&r&&we(r.originalException,Error)))return n;var o=fr(t,r.originalException,e);return n.exception.values=ie(o,n.exception.values),n}(r._key,r._limit,t,n):t}))},e.id="LinkedErrors",e}();function fr(e,t,n,r){if(void 0===r&&(r=[]),
80
80
  !we(t[n],Error)||r.length+1>=e)return r;var o=En(t[n]);return fr(e,t[n],n,ie([o],r))}var gr=ce(),vr=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){Rt((function(t){if(jt().getIntegration(e)){if(!gr.navigator&&!gr.location&&!gr.document)return t;var n=t.request&&t.request.url||gr.location&&gr.location.href,r=(gr.document||{}).referrer,o=(gr.navigator||{}).userAgent,i=ne(ne(ne({},t.request&&t.request.headers),r&&{Referer:r}),o&&{"User-Agent":o}),a=ne(ne({},n&&{url:n}),{headers:i});return ne(ne({},t),{request:a})}return t}))},e.id="UserAgent",e}(),yr=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(t,n){t((function(t){var r=n().getIntegration(e);if(r){try{if(function(e,t){if(!t)return!1;if(function(e,t){var n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!br(e,t))return!1;if(!_r(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){var n=wr(t),r=wr(e);if(!n||!r)return!1
81
81
  ;if(n.type!==r.type||n.value!==r.value)return!1;if(!br(e,t))return!1;if(!_r(e,t))return!1;return!0}(e,t))return!0;return!1}(t,r._previousEvent))return Re.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){return r._previousEvent=t}return r._previousEvent=t}return t}))},e.id="Dedupe",e}();function _r(e,t){var n=xr(e),r=xr(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,(r=r).length!==n.length)return!1;for(var o=0;o<r.length;o++){var i=r[o],a=n[o];if(i.filename!==a.filename||i.lineno!==a.lineno||i.colno!==a.colno||i.function!==a.function)return!1}return!0}function br(e,t){var n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function wr(e){return e.exception&&e.exception.values&&e.exception.values[0]}function xr(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(e){return}else if(e.stacktrace)return e.stacktrace.frames}var kr=function(e){function t(t){
82
- void 0===t&&(t={});return t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:"6.17.9"}],version:"6.17.9"},e.call(this,Un,t)||this}return ee(t,e),t.prototype.showReportDialog=function(e){void 0===e&&(e={}),ce().document&&(this._isEnabled()?Kn(ne(ne({},e),{dsn:e.dsn||this.getDsn()})):Re.error("Trying to call showReportDialog with Sentry Client disabled"))},t.prototype._prepareEvent=function(t,n,r){return t.platform=t.platform||"javascript",e.prototype._prepareEvent.call(this,t,n,r)},t.prototype._sendEvent=function(t){var n=this.getIntegration(cr);n&&n.addSentryBreadcrumb(t),e.prototype._sendEvent.call(this,t)},t}(rn),Sr=[new dn,new un,new or,new cr,new Xn,new mr,new yr,new vr];function Cr(e){if(void 0===e&&(e={}),void 0===e.defaultIntegrations&&(e.defaultIntegrations=Sr),void 0===e.release){var t=ce();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}
82
+ void 0===t&&(t={});return t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:"6.18.0"}],version:"6.18.0"},e.call(this,Un,t)||this}return ee(t,e),t.prototype.showReportDialog=function(e){void 0===e&&(e={}),ce().document&&(this._isEnabled()?Kn(ne(ne({},e),{dsn:e.dsn||this.getDsn()})):Re.error("Trying to call showReportDialog with Sentry Client disabled"))},t.prototype._prepareEvent=function(t,n,r){return t.platform=t.platform||"javascript",e.prototype._prepareEvent.call(this,t,n,r)},t.prototype._sendEvent=function(t){var n=this.getIntegration(cr);n&&n.addSentryBreadcrumb(t),e.prototype._sendEvent.call(this,t)},t}(rn),Sr=[new dn,new un,new or,new cr,new Xn,new mr,new yr,new vr];function Cr(e){if(void 0===e&&(e={}),void 0===e.defaultIntegrations&&(e.defaultIntegrations=Sr),void 0===e.release){var t=ce();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}
83
83
  void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0),function(e,t){!0===t.debug&&Re.enable();var n=jt(),r=n.getScope();r&&r.update(t.initialScope);var o=new e(t);n.bindClient(o)}(kr,e),e.autoSessionTracking&&function(){if(void 0===ce().document)return void(ae()&&Re.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));var e=jt();if(!e.captureSession)return;Ar(e),st("history",(function(e){var t=e.from,n=e.to;void 0!==t&&t!==n&&Ar(jt())}))}()}function Ar(e){e.startSession({ignoreDuration:!0}),e.captureSession()}function Er(e){const t=t=>{const{data:n}=t;if(n&&"hypothesis-error"===(null==n?void 0:n.type)){const{context:t,error:r}=n;e(r instanceof Error?r:function(e){const t=new Error(e.message);return t.stack=e.stack,t}(r),t)}};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)}let Tr=0;function Nr(e){!function(e){$t("setUser",e)}(e)}!function(){function e(e){
84
84
  var t=!0,n=!1,r=null,o={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function i(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function a(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!o[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function l(e){e.hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added"))}function c(n){n.metaKey||n.altKey||n.ctrlKey||(i(e.activeElement)&&s(e.activeElement),t=!0)}function u(e){t=!1}function h(e){i(e.target)&&(t||a(e.target))&&s(e.target)}function d(e){i(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(r),
85
85
  r=window.setTimeout((function(){n=!1}),100),l(e.target))}function p(e){"hidden"===document.visibilityState&&(n&&(t=!0),m())}function m(){document.addEventListener("mousemove",g),document.addEventListener("mousedown",g),document.addEventListener("mouseup",g),document.addEventListener("pointermove",g),document.addEventListener("pointerdown",g),document.addEventListener("pointerup",g),document.addEventListener("touchmove",g),document.addEventListener("touchstart",g),document.addEventListener("touchend",g)}function f(){document.removeEventListener("mousemove",g),document.removeEventListener("mousedown",g),document.removeEventListener("mouseup",g),document.removeEventListener("pointermove",g),document.removeEventListener("pointerdown",g),document.removeEventListener("pointerup",g),document.removeEventListener("touchmove",g),document.removeEventListener("touchstart",g),document.removeEventListener("touchend",g)}function g(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,f())}
@@ -557,7 +557,7 @@ t.addEventListener("touchstart",i,c),t.addEventListener("wheel",i,c)),a&&Pp(t),i
557
557
  },s=t>0?`${o} (${t} available)`:o;return vo(So,{classes:Vr("text-color-text","SelectionTab",{"is-selected":r}),onClick:a,onMouseDown:a,pressed:!!r,role:"tab",tabIndex:0,title:s,children:vo(m,{children:[e,t>0&&!n&&vo("span",{className:"text-tiny",style:"position:relative;bottom:3px;left:2px",children:t})]})})}var Gp=si((function({annotationsService:e,isLoading:t,settings:n}){const r=ci(),o=r.selectedTab(),i=r.noteCount(),a=r.annotationCount(),s=r.orphanCount(),l=r.isWaitingToAnchorAnnotations(),c=e=>{r.clearSelection(),r.selectTab(e)},u="annotation"===o&&0===a&&!l,h="note"===o&&0===i;return vo("div",{className:"hyp-u-vertical-spacing--4 SelectionTabs__container",children:[vo("div",{className:"hyp-u-layout-row hyp-u-horizontal-spacing--6 SelectionTabs",role:"tablist",children:[vo($p,{count:a,isWaitingToAnchor:l,isSelected:"annotation"===o,label:"Annotations",onSelect:()=>c("annotation"),children:"Annotations"}),vo($p,{count:i,isWaitingToAnchor:l,isSelected:"note"===o,label:"Page notes",onSelect:()=>c("note"),
558
558
  children:"Page Notes"}),s>0&&vo($p,{count:s,isWaitingToAnchor:l,isSelected:"orphan"===o,label:"Orphans",onSelect:()=>c("orphan"),children:"Orphans"})]}),"note"===o&&n.enableExperimentalNewNoteButton&&vo("div",{className:"hyp-u-layout-row--justify-right",children:vo(So,{"data-testid":"new-note-button",icon:"add",onClick:()=>e.createPageNote(),variant:"primary",style:ii(["ctaBackgroundColor"],n),children:"New note"})}),!t&&h&&vo(Eo,{classes:"text-center",children:vo("span",{"data-testid":"notes-unavailable-message",children:"There are no page notes in this group."})}),!t&&u&&vo(Eo,{classes:"text-center",children:vo("span",{"data-testid":"annotations-unavailable-message",children:["There are no annotations in this group.",vo("br",{}),"Create one by selecting some text and clicking the"," ",vo(Ro,{classes:"m-0.5 inline -mt-0.5",name:"annotate",title:"Annotate"})," ","button."]})})]})}),["annotationsService","settings"]);var Vp=si((function({frameSync:e,onLogin:t,onSignUp:n,loadAnnotationsService:r,streamer:o}){
559
559
  const i=ea(),a=ci(),s=a.focusedGroupId(),l=a.hasAppliedFilter()||a.hasSelectedAnnotations(),c=a.isLoading(),u=a.isLoggedIn(),h=a.directLinkedAnnotationId(),d=h?a.findAnnotationByID(h):void 0,p=d?Gi(d):"annotation",m=a.searchUris(),f=a.hasSidebarOpened(),g=a.profile().userid,v=d&&!1===d.$orphan?d.$tag:null,y=!(c||!h)&&!d,_=a.directLinkedGroupFetchFailed(),b=y||_,w=!b,x=!b&&!l,k=h&&!u&&!y&&!c,S=io(s);ro((()=>{if(!S.current||S.current!==s){if(S.current){let e=a.focusState().active;a.clearSelection(),e&&a.toggleFocusMode(!0)}S.current=s}s&&m.length&&r.load({groupId:s,uris:m})}),[a,r,s,g,m]),ro((()=>{v?(e.focusAnnotations([v]),e.scrollToAnnotation(v),a.selectTab(p)):d&&a.selectTab(p)}),[p,e,d,v,a]);const C=a.hasFetchedProfile();return ro((()=>{C&&(f||u)&&o.connect({applyUpdatesImmediately:!1})}),[C,u,f,o]),vo("div",{children:[vo("h2",{className:"sr-only",children:"Annotations"}),w&&vo(Op,{}),vo(Up,{onLogin:t,onSignUp:n}),y&&vo(Ep,{errorType:"annotation",onLoginRequest:t,showClearSelection:!0}),_&&vo(Ep,{
560
- errorType:"group",onLoginRequest:t}),x&&vo(Gp,{isLoading:c}),vo(Ap,{threads:i.children}),k&&vo(Ip,{onLogin:t})]})}),["frameSync","loadAnnotationsService","streamer"]);var Wp=si((function({api:e,toastMessenger:t}){const n=ci(),r=n.routeParams().q,o=so((async t=>{const r={_separate_replies:!0,offset:0,limit:20,...xi(t)};try{n.annotationFetchStarted();const t=await e.search(r);n.addAnnotations([...t.rows,...t.replies])}finally{n.annotationFetchFinished()}}),[e,n]);return ro((()=>{n.setSortKey("Newest"),n.clearAnnotations(),o(r).catch((e=>{t.error(`Unable to fetch annotations: ${e.message}`)}))}),[r,o,n,t]),vo(Ap,{threads:ea().children})}),["api","toastMessenger"]);class Yp{constructor(e,t,n=window){var r,o,i;const a="N/A";let s=a;e.userid&&(s=e.userid,e.displayName&&(s=`${e.displayName} (${s})`)),this.version="1.992.0",this.userAgent=n.navigator.userAgent,this.urls=t.map((e=>e.uri)).join(", ")||a,
560
+ errorType:"group",onLoginRequest:t}),x&&vo(Gp,{isLoading:c}),vo(Ap,{threads:i.children}),k&&vo(Ip,{onLogin:t})]})}),["frameSync","loadAnnotationsService","streamer"]);var Wp=si((function({api:e,toastMessenger:t}){const n=ci(),r=n.routeParams().q,o=so((async t=>{const r={_separate_replies:!0,offset:0,limit:20,...xi(t)};try{n.annotationFetchStarted();const t=await e.search(r);n.addAnnotations([...t.rows,...t.replies])}finally{n.annotationFetchFinished()}}),[e,n]);return ro((()=>{n.setSortKey("Newest"),n.clearAnnotations(),o(r).catch((e=>{t.error(`Unable to fetch annotations: ${e.message}`)}))}),[r,o,n,t]),vo(Ap,{threads:ea().children})}),["api","toastMessenger"]);class Yp{constructor(e,t,n=window){var r,o,i;const a="N/A";let s=a;e.userid&&(s=e.userid,e.displayName&&(s=`${e.displayName} (${s})`)),this.version="1.993.0",this.userAgent=n.navigator.userAgent,this.urls=t.map((e=>e.uri)).join(", ")||a,
561
561
  this.fingerprint=null!==(r=null===(o=t[0])||void 0===o||null===(i=o.metadata)||void 0===i?void 0:i.documentFingerprint)&&void 0!==r?r:a,this.account=s,this.timestamp=(new Date).toString()}asFormattedString(){return`Version: ${this.version}\nUser Agent: ${this.userAgent}\nURL: ${this.urls}\nFingerprint: ${this.fingerprint}\nAccount: ${this.account}\nDate: ${this.timestamp}\n`}asEncodedURLString(){return encodeURIComponent(this.asFormattedString())}}function Kp(e){const t=P(e);return!(null==t||!t.authority)&&t.authority!==e.authDomain}function Xp({commandName:e,iconName:t}){return vo("span",{className:"whitespace-nowrap",children:[vo(Ro,{name:t,classes:Vr("mx-1 -mt-1","text-color-text-light inline")}),vo("em",{children:e})]})}var Zp=si((function({settings:e}){const t=!Kp(e);return vo("ol",{className:"list-decimal pl-10 space-y-2",children:[vo("li",{children:["To create an annotation, select text and then select the"," ",vo(Xp,{iconName:"annotate",commandName:"Annotate"})," ","button."]}),vo("li",{
562
562
  children:["To create a highlight (",vo(Po,{classes:"underline hover:underline",href:"https://web.hypothes.is/help/why-are-highlights-private-by-default/",target:"_blank",children:"visible only to you"}),"), select text and then select the"," ",vo(Xp,{iconName:"highlight",commandName:"Highlight"})," ","button."]}),t&&vo("li",{children:["To annotate in a private group, select the group from the groups dropdown. Don't see your group? Ask the group creator to send a"," ",vo(Po,{classes:"underline hover:underline",href:"https://web.hypothes.is/help/how-to-join-a-private-group/",target:"_blank",children:"join link"}),")."]}),vo("li",{children:["To reply to an annotation, select the"," ",vo(Xp,{iconName:"reply",commandName:"Reply"})," button."]})]})}),["settings"]);var Jp=si((function({toastMessenger:e,versionData:t}){return vo("div",{className:"hyp-u-vertical-spacing",children:[vo("dl",{className:"VersionInfo",children:[vo("dt",{className:"VersionInfo__key",children:"Version"}),vo("dd",{
563
563
  className:"VersionInfo__value",children:t.version}),vo("dt",{className:"VersionInfo__key",children:"User Agent"}),vo("dd",{className:"VersionInfo__value",children:t.userAgent}),vo("dt",{className:"VersionInfo__key",children:"URL"}),vo("dd",{className:"VersionInfo__value",children:t.urls}),vo("dt",{className:"VersionInfo__key",children:"Fingerprint"}),vo("dd",{className:"VersionInfo__value",children:t.fingerprint}),vo("dt",{className:"VersionInfo__key",children:"Account"}),vo("dd",{className:"VersionInfo__value",children:t.account}),vo("dt",{className:"VersionInfo__key",children:"Date"}),vo("dd",{className:"VersionInfo__value",children:t.timestamp})]}),vo("div",{className:"hyp-u-layout-row--justify-center",children:vo(So,{onClick:()=>{try{Ca(t.asFormattedString()),e.success("Copied version info to clipboard")}catch(t){e.error("Unable to copy version info")}},icon:"copy",children:"Copy version details"})})]})}),["toastMessenger"]);function Qp({children:e,onClick:t}){return vo(Co,{
@@ -585,7 +585,7 @@ className:Vr("HypothesisApp","js-thread-list-scroll-root",{"theme-clean":h,"Hypo
585
585
  ;function Mm({error:e}){return vo("div",{className:"LaunchErrorPanel",children:vo(Go,{title:"Unable to start Hypothesis",children:e.message})})}class Lm{constructor(e,t){this._api=e,this._store=t}_applyDraftChanges(e){const t={},n=this._store.getDraft(e);return n&&(t.tags=n.tags,t.text=n.text,t.permissions=n.isPrivate?ba(e.user):wa(e.user,e.group)),{...e,...t}}_initialize(e,t=new Date){const n=this._store.getDefault("annotationPrivacy"),r=this._store.focusedGroupId(),o=this._store.profile();if(!r)throw new Error("Cannot create annotation without a group");const i=o.userid,a=o.user_info,s="s:"+H(8),l=Object.assign({created:t.toISOString(),group:r,permissions:xa(i,r,n),tags:[],text:"",updated:t.toISOString(),user:i,user_info:a,$tag:s,hidden:!1,links:{},document:{title:""}},e);return Ii(l)&&(l.permissions=ba(i)),l}create(e,t=new Date){const n=this._initialize(e,t);this._store.addAnnotations([n]),this._store.deleteNewAndEmptyDrafts(),Ii(n)||this._store.createDraft(n,{tags:n.tags,text:n.text,isPrivate:!Mi(n)}),
586
586
  Pi(n)?this._store.selectTab("note"):Di(n)&&this._store.selectTab("annotation"),(n.references||[]).forEach((e=>{this._store.setExpanded(e,!0)}))}createPageNote(){const e=this._store.mainFrame();if(!this._store.isLoggedIn())return void this._store.openSidebarPanel("loginPrompt");if(!e)return;const t={target:[],uri:e.uri};this.create(t)}async delete(e){await this._api.annotation.delete({id:e.id}),this._store.removeAnnotations([e])}async flag(e){await this._api.annotation.flag({id:e.id}),this._store.updateFlagStatus(e.id,!0)}reply(e,t){const n={group:e.group,permissions:Mi(e)?wa(t,e.group):ba(t),references:(e.references||[]).concat(e.id),target:[{source:e.target[0].source}],uri:e.uri};this.create(n)}async save(e){let t;const n=this._applyDraftChanges(e);let r;t=Ti(e)?this._api.annotation.update({id:e.id},n):this._api.annotation.create({},n),this._store.annotationSaveStarted(e);try{r=await t}finally{this._store.annotationSaveFinished(e)}return Object.keys(e).forEach((t=>{"$"===t[0]&&(r[t]=e[t])})),
587
587
  this._store.removeDraft(e),this._store.addAnnotations([r]),r}}Lm.$inject=["api","store"];class zm extends Error{constructor(e,t,n=""){let r="Network request failed";t&&(r+=` (${t.status})`),n&&(r+=`: ${n}`),super(r),this.url=e,this.response=t,this.reason=n}}async function Om(e,t){let n,r;try{n=await fetch(e,t)}catch(t){throw new zm(e,null,t.message)}if(204===n.status)return null;try{r=await n.json()}catch(t){throw new zm(e,n,"Failed to parse response")}var o;if(!n.ok)throw new zm(e,n,null===(o=r)||void 0===o?void 0:o.reason);return r}function Im(e,t){const n={};for(const r in t)if(t.hasOwnProperty(r)){const o=t[r],i=":"+r;-1!==e.indexOf(i)?e=e.replace(i,encodeURIComponent(String(o))):n[r]=o}return{url:e,unusedParams:n}}function Rm(e){const t={};for(const n in e)e.hasOwnProperty(n)&&"$"!==n[0]&&(t[n]=e[n]);return t}class Pm{constructor(e,t,n){const r=e.routes();this._clientId=null;const o=()=>this._clientId,i=e=>function(e,t,{getAccessToken:n,getClientId:r,onRequestStarted:o,onRequestFinished:i}){
588
- return async(a,s)=>{o();try{const[o,l]=await Promise.all([e,n()]),c=function(e,t){let n=e;return t.split(".").forEach((e=>{n=n[e]})),n}(o,t),u={"Content-Type":"application/json","Hypothesis-Client-Version":"1.992.0"};l&&(u.Authorization="Bearer "+l);const h=r();h&&(u["X-Client-Id"]=h);const{url:d,unusedParams:p}=Im(c.url,a),m=new URL(d);for(let[e,t]of Object.entries(p)){Array.isArray(t)||(t=[t]);for(let n of t)null!=n&&m.searchParams.append(e,n.toString())}return await Om(m.toString(),{body:s?JSON.stringify(Rm(s)):null,headers:u,method:c.method})}finally{i()}}}(r,e,{getAccessToken:t.getAccessToken,getClientId:o,onRequestStarted:n.apiRequestStarted,onRequestFinished:n.apiRequestFinished});this.search=i("search"),this.annotation={create:i("annotation.create"),delete:i("annotation.delete"),get:i("annotation.read"),update:i("annotation.update"),flag:i("annotation.flag"),hide:i("annotation.hide"),unhide:i("annotation.unhide")},this.group={member:{delete:i("group.member.delete")},read:i("group.read")},this.groups={
588
+ return async(a,s)=>{o();try{const[o,l]=await Promise.all([e,n()]),c=function(e,t){let n=e;return t.split(".").forEach((e=>{n=n[e]})),n}(o,t),u={"Content-Type":"application/json","Hypothesis-Client-Version":"1.993.0"};l&&(u.Authorization="Bearer "+l);const h=r();h&&(u["X-Client-Id"]=h);const{url:d,unusedParams:p}=Im(c.url,a),m=new URL(d);for(let[e,t]of Object.entries(p)){Array.isArray(t)||(t=[t]);for(let n of t)null!=n&&m.searchParams.append(e,n.toString())}return await Om(m.toString(),{body:s?JSON.stringify(Rm(s)):null,headers:u,method:c.method})}finally{i()}}}(r,e,{getAccessToken:t.getAccessToken,getClientId:o,onRequestStarted:n.apiRequestStarted,onRequestFinished:n.apiRequestFinished});this.search=i("search"),this.annotation={create:i("annotation.create"),delete:i("annotation.delete"),get:i("annotation.read"),update:i("annotation.update"),flag:i("annotation.flag"),hide:i("annotation.hide"),unhide:i("annotation.unhide")},this.group={member:{delete:i("group.member.delete")},read:i("group.read")},this.groups={
589
589
  list:i("groups.read")},this.profile={groups:{read:i("profile.groups.read")},read:i("profile.read"),update:i("profile.update")}}setClientId(e){this._clientId=e}}Pm.$inject=["apiRoutes","auth","store"];var Dm={};function Bm(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var Fm=Bm;Bm.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},Bm.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},Bm.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=(new Date).getTime()
590
590
  ;if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(void 0===n){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1)}var r=this;return this._timer=setTimeout((function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout((function(){r._operationTimeoutCb(r._attempts)}),r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)}),n),this._options.unref&&this._timer.unref(),!0},Bm.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){n._operationTimeoutCb()}),n._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},Bm.prototype.try=function(e){
591
591
  console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},Bm.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},Bm.prototype.start=Bm.prototype.try,Bm.prototype.errors=function(){return this._errors},Bm.prototype.attempts=function(){return this._attempts},Bm.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var o=this._errors[r],i=o.message,a=(e[i]||0)+1;e[i]=a,a>=n&&(t=o,n=a)}return t},function(e){var t=Fm;e.operation=function(n){var r=e.timeouts(n);return new t(r,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],o=0;o<t.retries;o++)r.push(this.createTimeout(o,t))
@@ -648,8 +648,8 @@ return e.expanded}const sv=Yf((e=>e.forcedVisible),(e=>Zf(e))),lv=Yf((e=>e.selec
648
648
  type:iv.SET_SORT_KEY,key:e}},toggleSelectedAnnotations:function(e){return{type:iv.TOGGLE_SELECTED_ANNOTATIONS,toggleIds:e}}},selectors:{expandedMap:av,forcedVisibleThreads:sv,hasSelectedAnnotations:lv,selectedAnnotations:cv,selectedTab:uv,selectionState:hv,sortKey:dv,sortKeys:pv}}),fv={OPEN_SIDEBAR_PANEL:function(e,t){return{activePanelName:t.panelName}},CLOSE_SIDEBAR_PANEL:function(e,t){let n=e.activePanelName;return t.panelName===n&&(n=null),{activePanelName:n}},TOGGLE_SIDEBAR_PANEL:function(e,t){let n;const r=e.activePanelName===t.panelName,o=void 0!==t.panelState?t.panelState:!r;return n=o?t.panelName:r&&!o?null:e.activePanelName,{activePanelName:n}}},gv=of(fv);const vv=Ff({activePanelName:null},{namespace:"sidebarPanels",reducers:fv,actionCreators:{openSidebarPanel:function(e){return{type:gv.OPEN_SIDEBAR_PANEL,panelName:e}},closeSidebarPanel:function(e){return{type:gv.CLOSE_SIDEBAR_PANEL,panelName:e}},toggleSidebarPanel:function(e,t){return{type:gv.TOGGLE_SIDEBAR_PANEL,panelName:e,panelState:t}}},
649
649
  selectors:{isSidebarPanelOpen:function(e,t){return e.activePanelName===t}}}),yv={ADD_MESSAGE:function(e,t){return{messages:e.messages.concat({...t.message})}},REMOVE_MESSAGE:function(e,t){return{messages:e.messages.filter((e=>e.id!==t.id))}},UPDATE_MESSAGE:function(e,t){return{messages:e.messages.map((e=>e.id&&e.id===t.message.id?{...t.message}:e))}}},_v=of(yv);const bv=Ff({messages:[]},{namespace:"toastMessages",reducers:yv,actionCreators:{addToastMessage:function(e){return{type:_v.ADD_MESSAGE,message:e}},removeToastMessage:function(e){return{type:_v.REMOVE_MESSAGE,id:e}},updateToastMessage:function(e){return{type:_v.UPDATE_MESSAGE,message:e}}},selectors:{getToastMessage:function(e,t){return e.messages.find((e=>e.id===t))},getToastMessages:function(e){return e.messages},hasToastMessage:function(e,t,n){return e.messages.some((e=>e.type===t&&e.message===n))}}}),wv={SET_SIDEBAR_OPENED:(e,t)=>!0===t.opened?{sidebarHasOpened:!0}:{}},xv=of(wv);const kv=Ff({sidebarHasOpened:!1},{namespace:"viewer",reducers:wv,
650
650
  actionCreators:{setSidebarOpened:function(e){return{type:xv.SET_SIDEBAR_OPENED,opened:e}}},selectors:{hasSidebarOpened:function(e){return e.sidebarHasOpened}}});function Sv(e){return Bf([Uf,sg,ug,pg,wg,Ng,Ig,Xg,Wg,ev,eg,mv,Bg,vv,bv,kv],[e],[jf])}Sv.$inject=["settings"];class Cv{constructor(){this._providers=new Map,this._instances=new Map,this._constructing=new Set}get(e){if(this._instances.has(e))return this._instances.get(e);const t=this._providers.get(e);if(!t)throw new Error(`"${e}" is not registered`);if("value"in t)return this._instances.set(e,t.value),t.value;if(this._constructing.has(e))throw new Error(`Encountered a circular dependency when constructing "${e}"`);this._constructing.add(e);try{const n=[],r="class"in t&&t.class.$inject||"factory"in t&&t.factory.$inject||[];for(const t of r)try{n.push(this.get(t))}catch(n){const r=new Error(`Failed to construct dependency "${t}" of "${e}": ${n.message}`);throw r.cause=n,r}let o;if(t.class)o=new t.class(...n);else{o=(0,t.factory)(...n)}
651
- return this._instances.set(e,o),o}finally{this._constructing.delete(e)}}register(e,t){if("function"==typeof t)t={class:t};else if(!function(e){return"object"==typeof e&&null!==e&&("value"in e||"function"==typeof e.class||"function"==typeof e.factory)}(t))throw new Error(`Invalid provider for "${e}"`);return this._providers.set(e,t),this}run(e){const t="Injector.run";this.register(t,{factory:e});try{return this.get(t)}finally{this._instances.delete(t),this._providers.delete(t)}}}const Av=function(t){for(var n={},r=t.querySelectorAll("script.js-hypothesis-config"),o=0;o<r.length;o++){var i=void 0;try{i=JSON.parse(r[o].textContent||"")}catch(e){console.warn("Could not parse settings from js-hypothesis-config tags",e),i={}}e(n,i)}return n}(document),Ev=function(e){const{version:t,origin:n}=R(e.location.href);return"1.992.0"!==t?(console.warn(`The Hypothesis sidebar is using a different version (1.992.0) than the host page (${t}). It may not work.`),
652
- !1):"null"===e.origin?(console.warn("Hypothesis has been loaded in a sandboxed frame. This is not supported."),!1):e.origin===n||(console.warn(`The Hypothesis sidebar is running in a different origin (${e.origin}) than expected (${n}). It may not work.`),!1)}(window);function Tv(e,t){e.setClientId(t.clientId)}function Nv(e,t,n){e.load(),t.load(),n.sync()}function Mv(e,t,n,r){e.init(),t.init(),n.init(),r.init()}function Lv(e,t){"sidebar"===t.route()&&e.connect()}Av.sentry&&Ev&&function(e){const t=function(){let e=import.meta.url;return e?new URL(e).origin:null}(),n=t?[t]:void 0;Cr({dsn:e.dsn,environment:e.environment,allowUrls:n,ignoreErrors:["Network request failed","Object Not Found Matching Id"],release:"1.992.0",beforeSend:(e,t)=>{if(Tr>=5)return V("Client-side Sentry quota reached. No further Sentry events will be sent"),null;++Tr;try{const n=t&&t.originalException;n instanceof Event&&Object.assign(e.extra,{type:n.type,detail:n.detail,isTrusted:n.isTrusted})}catch(e){}return e}});try{
651
+ return this._instances.set(e,o),o}finally{this._constructing.delete(e)}}register(e,t){if("function"==typeof t)t={class:t};else if(!function(e){return"object"==typeof e&&null!==e&&("value"in e||"function"==typeof e.class||"function"==typeof e.factory)}(t))throw new Error(`Invalid provider for "${e}"`);return this._providers.set(e,t),this}run(e){const t="Injector.run";this.register(t,{factory:e});try{return this.get(t)}finally{this._instances.delete(t),this._providers.delete(t)}}}const Av=function(t){for(var n={},r=t.querySelectorAll("script.js-hypothesis-config"),o=0;o<r.length;o++){var i=void 0;try{i=JSON.parse(r[o].textContent||"")}catch(e){console.warn("Could not parse settings from js-hypothesis-config tags",e),i={}}e(n,i)}return n}(document),Ev=function(e){const{version:t,origin:n}=R(e.location.href);return"1.993.0"!==t?(console.warn(`The Hypothesis sidebar is using a different version (1.993.0) than the host page (${t}). It may not work.`),
652
+ !1):"null"===e.origin?(console.warn("Hypothesis has been loaded in a sandboxed frame. This is not supported."),!1):e.origin===n||(console.warn(`The Hypothesis sidebar is running in a different origin (${e.origin}) than expected (${n}). It may not work.`),!1)}(window);function Tv(e,t){e.setClientId(t.clientId)}function Nv(e,t,n){e.load(),t.load(),n.sync()}function Mv(e,t,n,r){e.init(),t.init(),n.init(),r.init()}function Lv(e,t){"sidebar"===t.route()&&e.connect()}Av.sentry&&Ev&&function(e){const t=function(){let e=import.meta.url;return e?new URL(e).origin:null}(),n=t?[t]:void 0;Cr({dsn:e.dsn,environment:e.environment,allowUrls:n,ignoreErrors:["Network request failed","Object Not Found Matching Id"],release:"1.993.0",beforeSend:(e,t)=>{if(Tr>=5)return V("Client-side Sentry quota reached. No further Sentry events will be sent"),null;++Tr;try{const n=t&&t.originalException;n instanceof Event&&Object.assign(e.extra,{type:n.type,detail:n.detail,isTrusted:n.isTrusted})}catch(e){}return e}});try{
653
653
  Vt("host_config",R(window.location.href))}catch(e){}Vt("loaded_scripts",Array.from(document.querySelectorAll("script")).filter((e=>!e.type||e.type.match(/javascript|module/))).map((e=>e.src||"<inline>"))),Er(((e,t)=>{Gt(e,{tags:{context:t}})}))}(Av.sentry),function(e){e.addEventListener("click",(e=>{const t=e.target;if("A"===t.tagName){const e=t;"_blank"===e.target&&(e.rel="noopener")}}))}(document.body),function(e=n){let t=!1;try{document.createElement("div").dir="auto"}catch(e){t=!0}if(t){const t=e.vnode;e.vnode=e=>{if("string"==typeof e.type){const t=e.props;"dir"in t&&"auto"===t.dir&&(t.dir="")}t&&t(e)}}}(),Tv.$inject=["api","streamer"],Nv.$inject=["groups","session","router"],Mv.$inject=["autosaveService","features","persistedDefaults","serviceURL"],Lv.$inject=["frameSync","store"],function(e,{reset:t=!1}={}){t&&yo.clear();for(let[t,n]of Object.entries(e))yo.set(t,n)}(Qo);const zv=document.querySelector("hypothesis-app");!function(e=window){e.addEventListener("message",J)}(),async function(e,t=window){
654
654
  const n=function(e){const t=R(e.location.href),n=["annotations","group","query","appType","openSidebar","showHighlights","services","branding","enableExperimentalNewNoteButton","focus","requestConfigFromFrame","theme","usernameUrl"],r={openSidebar:D,requestConfigFromFrame:e=>{if("string"==typeof e)return e;const t=function(e){return"object"==typeof e&&null!==e?e:{}}(e);return{origin:F(t.origin),ancestorLevel:B(t.ancestorLevel)}}};return Object.keys(t).reduce(((e,o)=>(-1!==n.indexOf(o)&&null!==t[o]&&(r[o]?e[o]=r[o](t[o]):e[o]=t[o]),e)),{})}(window),r=n.requestConfigFromFrame;if(!r)return U(e,n);if("number"==typeof r.ancestorLevel&&"string"==typeof r.origin){const o=function(e,t=window){let n=t;for(let t=0;t<e;t++){if(n===n.top)throw new Error("The target parent frame has exceeded the ancestor tree. Try reducing the `requestConfigFromFrame.ancestorLevel` value in the `hypothesisConfig`");n=n.parent}return n}(r.ancestorLevel,t);return{...await $(e,o,r.origin),...n.group?{group:n.group}:{}}}
655
655
  throw new Error("Improper `requestConfigFromFrame` object. Both `ancestorLevel` and `origin` need to be specified")}(Av).then((e=>{!function(e,t){const n=new Cv;n.register("annotationsService",Lm).register("api",Pm).register("apiRoutes",Um).register("auth",Vm).register("autosaveService",Wm).register("features",Xm).register("frameSync",rf).register("groups",lf).register("loadAnnotationsService",cf).register("localStorage",hf).register("persistedDefaults",pf).register("router",mf).register("serviceURL",ff).register("session",gf).register("streamer",_f).register("streamFilter",vf).register("tags",bf).register("threadsService",wf).register("toastMessenger",xf).register("store",{factory:Sv}),n.register("$window",{value:window}).register("settings",{value:e}),n.run(Mv),n.run(Tv),n.run(Nv),n.run(Z),n.run(Lv),I(vo(ai.Provider,{value:n,children:vo(Nm,{})}),t)}(e,zv)})).catch((e=>function(e,t){console.error("Failed to start Hypothesis client: ",e),I(vo(Mm,{error:e}),t)}(e,zv)));