For license information please see main.38a93a94.js.LICENSE.txt */ (()=>{var __webpack_modules__={208:e=>{var t="undefined"!==typeof Element,n="function"===typeof Map,s="function"===typeof Set,i="function"===typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var o,l,c,d;if(Array.isArray(e)){if((o=e.length)!=r.length)return!1;for(l=o;0!==l--;)if(!a(e[l],r[l]))return!1;return!0}if(n&&e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(d=e.entries();!(l=d.next()).done;)if(!r.has(l.value[0]))return!1;for(d=e.entries();!(l=d.next()).done;)if(!a(l.value[1],r.get(l.value[0])))return!1;return!0}if(s&&e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(d=e.entries();!(l=d.next()).done;)if(!r.has(l.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if((o=e.length)!=r.length)return!1;for(l=o;0!==l--;)if(e[l]!==r[l])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"===typeof e.valueOf&&"function"===typeof r.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString&&"function"===typeof e.toString&&"function"===typeof r.toString)return e.toString()===r.toString();if((o=(c=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(l=o;0!==l--;)if(!Object.prototype.hasOwnProperty.call(r,c[l]))return!1;if(t&&e instanceof Element)return!1;for(l=o;0!==l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!e.$$typeof)&&!a(e[c[l]],r[c[l]]))return!1;return!0}return e!==e&&r!==r}e.exports=function(e,t){try{return a(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},376:function(e,t,n){var s,i,a;i=[],void 0===(a="function"===typeof(s=function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function s(e,t,n){var s=new XMLHttpRequest;s.open("GET",e),s.responseType="blob",s.onload=function(){l(s.response,t,n)},s.onerror=function(){console.error("could not download file")},s.send()}function i(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(s){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,o=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(e,t,n){var o=r.URL||r.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?a(l):i(l.href)?s(e,t,n):a(l,l.target="_blank")):(l.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(l.href)},4e4),setTimeout(function(){a(l)},0))}:"msSaveOrOpenBlob"in navigator?function(e,n,r){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,r),n);else if(i(e))s(e,n,r);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){a(o)})}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return s(e,t,n);var a="application/octet-stream"===e.type,l=/constructor/i.test(r.HTMLElement)||r.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&l||o)&&"undefined"!=typeof FileReader){var d=new FileReader;d.onloadend=function(){var e=d.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},d.readAsDataURL(e)}else{var u=r.URL||r.webkitURL,p=u.createObjectURL(e);i?i.location=p:location.href=p,i=null,setTimeout(function(){u.revokeObjectURL(p)},4e4)}});r.saveAs=l.saveAs=l,e.exports=l})?s.apply(t,i):s)||(e.exports=a)},380:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var s=n(8298);function i(e){if("string"!==typeof e)throw new Error((0,s.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},393:(e,t,n)=>{"use strict";e.exports=n(9019)},456:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var s=n(8168),i=n(8587),a=n(2882),r=n(7316);const o=["sx"],l=e=>{var t,n;const s={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:r.A;return Object.keys(e).forEach(t=>{i[t]?s.systemProps[t]=e[t]:s.otherProps[t]=e[t]}),s};function c(e){const{sx:t}=e,n=(0,i.A)(e,o),{systemProps:r,otherProps:c}=l(n);let d;return d=Array.isArray(t)?[r,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,a.Q)(e)?(0,s.A)({},r,e):r}:(0,s.A)({},r,t),(0,s.A)({},c,{sx:d})}},466:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))}},668:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function i(e,t){return e===t||!(!s(e)||!s(t))}function a(e,t){if(e.length!==t.length)return!1;for(var n=0;n{"use strict";var s;n.d(t,{i:()=>o,s:()=>r});var i=n(5917),a=!!(s||(s=n.t(i,2))).useInsertionEffect&&(s||(s=n.t(i,2))).useInsertionEffect,r=a||function(e){return e()},o=a||i.useLayoutEffect},719:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s.A,private_createBreakpoints:()=>i.A,unstable_applyStyles:()=>a.A});var s=n(5172),i=n(1107),a=n(9765)},780:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s.A,isPlainObject:()=>s.Q});var s=n(2882)},846:e=>{!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,s=0;n>>5]|=e[n]<<24-s%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],s=0,i=0;s>>6-2*i);return n}};e.exports=n}()},933:()=>{},1107:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var s=n(8587),i=n(8168);const a=["values","unit","step"],r=e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,i.A)({},e,{[t.key]:t.val}),{})};function o(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,l=(0,s.A)(e,a),c=r(t),d=Object.keys(c);function u(e){const s="number"===typeof t[e]?t[e]:e;return"@media (min-width:".concat(s).concat(n,")")}function p(e){const s="number"===typeof t[e]?t[e]:e;return"@media (max-width:".concat(s-o/100).concat(n,")")}function h(e,s){const i=d.indexOf(s);return"@media (min-width:".concat("number"===typeof t[e]?t[e]:e).concat(n,") and ")+"(max-width:".concat((-1!==i&&"number"===typeof t[d[i]]?t[d[i]]:s)-o/100).concat(n,")")}return(0,i.A)({keys:d,values:c,up:u,down:p,between:h,only:function(e){return d.indexOf(e)+1{"use strict";n.r(t),n.d(t,{default:()=>s.A});var s=n(466)},1429:function(e){e.exports=function(e){function t(s){if(n[s])return n[s].exports;var i=n[s]={exports:{},id:s,loaded:!1};return e[s].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0]&&(x=!0),x)return h=(0,u.default)(h,f),(0,d.default)(h,f.once),h},g=function(){h=(0,p.default)(),m()},b=function(){h.forEach(function(e,t){e.node.removeAttribute("data-aos"),e.node.removeAttribute("data-aos-easing"),e.node.removeAttribute("data-aos-duration"),e.node.removeAttribute("data-aos-delay")})},v=function(e){return!0===e||"mobile"===e&&c.default.mobile()||"phone"===e&&c.default.phone()||"tablet"===e&&c.default.tablet()||"function"==typeof e&&!0===e()},w=function(e){f=i(f,e),h=(0,p.default)();var t=document.all&&!window.atob;return v(f.disable)||t?b():(f.disableMutationObserver||l.default.isSupported()||(console.info('\n aos: MutationObserver is not supported on this browser,\n code mutations observing has been disabled.\n You may have to call "refreshHard()" by yourself.\n '),f.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",f.easing),document.querySelector("body").setAttribute("data-aos-duration",f.duration),document.querySelector("body").setAttribute("data-aos-delay",f.delay),"DOMContentLoaded"===f.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1?m(!0):"load"===f.startEvent?window.addEventListener(f.startEvent,function(){m(!0)}):document.addEventListener(f.startEvent,function(){m(!0)}),window.addEventListener("resize",(0,o.default)(m,f.debounceDelay,!0)),window.addEventListener("orientationchange",(0,o.default)(m,f.debounceDelay,!0)),window.addEventListener("scroll",(0,r.default)(function(){(0,d.default)(h,f.once)},f.throttleDelay)),f.disableMutationObserver||l.default.ready("[data-aos]",g),h)};e.exports={init:w,refresh:m,refreshHard:g}},function(e,t){},,,,,function(e,t){(function(t){"use strict";function n(e,t,n){function s(t){var n=f,s=m;return f=m=void 0,k=t,b=e.apply(s,n)}function a(e){return k=e,v=setTimeout(d,t),_?s(e):b}function r(e){var n=t-(e-w);return N?y(n,g-(e-k)):n}function l(e){var n=e-w;return void 0===w||n>=t||n<0||N&&e-k>=g}function d(){var e=j();return l(e)?u(e):void(v=setTimeout(d,r(e)))}function u(e){return v=void 0,L&&f?s(e):(f=m=void 0,b)}function p(){void 0!==v&&clearTimeout(v),k=0,f=w=m=v=void 0}function h(){return void 0===v?b:u(j())}function x(){var e=j(),n=l(e);if(f=arguments,m=this,w=e,n){if(void 0===v)return a(w);if(N)return v=setTimeout(d,t),s(w)}return void 0===v&&(v=setTimeout(d,t)),b}var f,m,g,b,v,w,k=0,_=!1,N=!1,L=!0;if("function"!=typeof e)throw new TypeError(c);return t=o(t)||0,i(n)&&(_=!!n.leading,g=(N="maxWait"in n)?C(o(n.maxWait)||0,t):g,L="trailing"in n?!!n.trailing:L),x.cancel=p,x.flush=h,x}function s(e,t,s){var a=!0,r=!0;if("function"!=typeof e)throw new TypeError(c);return i(s)&&(a="leading"in s?!!s.leading:a,r="trailing"in s?!!s.trailing:r),n(e,t,{leading:a,maxWait:t,trailing:r})}function i(e){var t="undefined"==typeof e?"undefined":l(e);return!!e&&("object"==t||"function"==t)}function a(e){return!!e&&"object"==("undefined"==typeof e?"undefined":l(e))}function r(e){return"symbol"==("undefined"==typeof e?"undefined":l(e))||a(e)&&w.call(e)==u}function o(e){if("number"==typeof e)return e;if(r(e))return d;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=x.test(e);return n||f.test(e)?m(e.slice(2),n?2:8):h.test(e)?d:+e}var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c="Expected a function",d=NaN,u="[object Symbol]",p=/^\s+|\s+$/g,h=/^[-+]0x[0-9a-f]+$/i,x=/^0b[01]+$/i,f=/^0o[0-7]+$/i,m=parseInt,g="object"==("undefined"==typeof t?"undefined":l(t))&&t&&t.Object===Object&&t,b="object"==("undefined"==typeof self?"undefined":l(self))&&self&&self.Object===Object&&self,v=g||b||Function("return this")(),w=Object.prototype.toString,C=Math.max,y=Math.min,j=function(){return v.Date.now()};e.exports=s}).call(t,function(){return this}())},function(e,t){(function(t){"use strict";function n(e,t,n){function i(t){var n=f,s=m;return f=m=void 0,k=t,b=e.apply(s,n)}function a(e){return k=e,v=setTimeout(d,t),_?i(e):b}function o(e){var n=t-(e-j);return N?C(n,g-(e-k)):n}function c(e){var n=e-j;return void 0===j||n>=t||n<0||N&&e-k>=g}function d(){var e=y();return c(e)?u(e):void(v=setTimeout(d,o(e)))}function u(e){return v=void 0,L&&f?i(e):(f=m=void 0,b)}function p(){void 0!==v&&clearTimeout(v),k=0,f=j=m=v=void 0}function h(){return void 0===v?b:u(y())}function x(){var e=y(),n=c(e);if(f=arguments,m=this,j=e,n){if(void 0===v)return a(j);if(N)return v=setTimeout(d,t),i(j)}return void 0===v&&(v=setTimeout(d,t)),b}var f,m,g,b,v,j,k=0,_=!1,N=!1,L=!0;if("function"!=typeof e)throw new TypeError(l);return t=r(t)||0,s(n)&&(_=!!n.leading,g=(N="maxWait"in n)?w(r(n.maxWait)||0,t):g,L="trailing"in n?!!n.trailing:L),x.cancel=p,x.flush=h,x}function s(e){var t="undefined"==typeof e?"undefined":o(e);return!!e&&("object"==t||"function"==t)}function i(e){return!!e&&"object"==("undefined"==typeof e?"undefined":o(e))}function a(e){return"symbol"==("undefined"==typeof e?"undefined":o(e))||i(e)&&v.call(e)==d}function r(e){if("number"==typeof e)return e;if(a(e))return c;if(s(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=s(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(u,"");var n=h.test(e);return n||x.test(e)?f(e.slice(2),n?2:8):p.test(e)?c:+e}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l="Expected a function",c=NaN,d="[object Symbol]",u=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,x=/^0o[0-7]+$/i,f=parseInt,m="object"==("undefined"==typeof t?"undefined":o(t))&&t&&t.Object===Object&&t,g="object"==("undefined"==typeof self?"undefined":o(self))&&self&&self.Object===Object&&self,b=m||g||Function("return this")(),v=Object.prototype.toString,w=Math.max,C=Math.min,y=function(){return b.Date.now()};e.exports=n}).call(t,function(){return this}())},function(e,t){"use strict";function n(e){var t=void 0,s=void 0;for(t=0;te.position?e.node.classList.add("aos-animate"):"undefined"!=typeof s&&("false"===s||!n&&"true"!==s)&&e.node.classList.remove("aos-animate")},s=function(e,t){var s=window.pageYOffset,i=window.innerHeight;e.forEach(function(e,a){n(e,i+s,t)})};t.default=s},function(e,t,n){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(12)),a=function(e,t){return e.forEach(function(e,n){e.node.classList.add("aos-init"),e.position=(0,i.default)(e.node,t.offset)}),e};t.default=a},function(e,t,n){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(13)),a=function(e,t){var n=0,s=0,a=window.innerHeight,r={offset:e.getAttribute("data-aos-offset"),anchor:e.getAttribute("data-aos-anchor"),anchorPlacement:e.getAttribute("data-aos-anchor-placement")};switch(r.offset&&!isNaN(r.offset)&&(s=parseInt(r.offset)),r.anchor&&document.querySelectorAll(r.anchor)&&(e=document.querySelectorAll(r.anchor)[0]),n=(0,i.default)(e).top,r.anchorPlacement){case"top-bottom":break;case"center-bottom":n+=e.offsetHeight/2;break;case"bottom-bottom":n+=e.offsetHeight;break;case"top-center":n+=a/2;break;case"bottom-center":n+=a/2+e.offsetHeight;break;case"center-center":n+=a/2+e.offsetHeight/2;break;case"top-top":n+=a;break;case"bottom-top":n+=e.offsetHeight+a;break;case"center-top":n+=e.offsetHeight/2+a}return r.anchorPlacement||r.offset||isNaN(t)||(s=t),n+s};t.default=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-("BODY"!=e.tagName?e.scrollLeft:0),n+=e.offsetTop-("BODY"!=e.tagName?e.scrollTop:0),e=e.offsetParent;return{top:n,left:t}};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e=e||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(e,function(e){return{node:e}})};t.default=n}])},1494:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},1693:(e,t,n)=>{var s,i=Object.create,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,s)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let i of o(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(s=r(t,i))||s.enumerable});return e},u={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(u,{default:()=>f}),e.exports=(s=u,d(a({},"__esModule",{value:!0}),s));var p=((e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)))(n(3004)),h=n(8355);const x=p.default[p.default.length-1];var f=(0,h.createReactPlayer)(p.default,x)},1756:e=>{e.exports=function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")},e.exports.__esModule=!0,e.exports.default=e.exports},2447:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(5917);var s=n(4224),i=n(393);function a(e){const{styles:t,defaultTheme:n={}}=e,a="function"===typeof t?e=>{return t(void 0===(s=e)||null===s||0===Object.keys(s).length?n:e);var s}:t;return(0,i.jsx)(s.mL,{styles:a})}},2459:(e,t,n)=>{var s=n(7101);e.exports=function(e,t,n){s(e,t),t.set(e,n)},e.exports.__esModule=!0,e.exports.default=e.exports},2533:(e,t,n)=>{"use strict";var s=n(8540);t.createRoot=s.createRoot,t.hydrateRoot=s.hydrateRoot},2882:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,Q:()=>a});var s=n(8168),i=n(5917);function a(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function r(e){if(i.isValidElement(e)||!a(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=r(e[n])}),t}function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const l=n.clone?(0,s.A)({},e):e;return a(e)&&a(t)&&Object.keys(t).forEach(s=>{i.isValidElement(t[s])?l[s]=t[s]:a(t[s])&&Object.prototype.hasOwnProperty.call(e,s)&&a(e[s])?l[s]=o(e[s],t[s],n):n.clone?l[s]=a(t[s])?r(t[s]):t[s]:l[s]=t[s]}),l}},2897:(e,t,n)=>{var s=n(3693);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,s)}return n}e.exports=function(e){for(var t=1;t{Object.create;var s,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,o=(Object.getPrototypeOf,Object.prototype.hasOwnProperty),l=(e,t,n,s)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let l of r(t))o.call(e,l)||l===n||i(e,l,{get:()=>t[l],enumerable:!(s=a(t,l))||s.enumerable});return e},c={};((e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})})(c,{default:()=>p}),e.exports=(s=c,l(i({},"__esModule",{value:!0}),s));var d=n(5992),u=n(9190),p=[{key:"youtube",name:"YouTube",canPlay:u.canPlay.youtube,lazyPlayer:(0,d.lazy)(()=>n.e(446).then(n.t.bind(n,8981,23)))},{key:"soundcloud",name:"SoundCloud",canPlay:u.canPlay.soundcloud,lazyPlayer:(0,d.lazy)(()=>n.e(979).then(n.t.bind(n,8682,23)))},{key:"vimeo",name:"Vimeo",canPlay:u.canPlay.vimeo,lazyPlayer:(0,d.lazy)(()=>n.e(173).then(n.t.bind(n,8652,23)))},{key:"mux",name:"Mux",canPlay:u.canPlay.mux,lazyPlayer:(0,d.lazy)(()=>n.e(723).then(n.t.bind(n,6762,23)))},{key:"facebook",name:"Facebook",canPlay:u.canPlay.facebook,lazyPlayer:(0,d.lazy)(()=>n.e(887).then(n.t.bind(n,166,23)))},{key:"streamable",name:"Streamable",canPlay:u.canPlay.streamable,lazyPlayer:(0,d.lazy)(()=>n.e(627).then(n.t.bind(n,3122,23)))},{key:"wistia",name:"Wistia",canPlay:u.canPlay.wistia,lazyPlayer:(0,d.lazy)(()=>n.e(340).then(n.t.bind(n,7315,23)))},{key:"twitch",name:"Twitch",canPlay:u.canPlay.twitch,lazyPlayer:(0,d.lazy)(()=>n.e(42).then(n.t.bind(n,7289,23)))},{key:"dailymotion",name:"DailyMotion",canPlay:u.canPlay.dailymotion,lazyPlayer:(0,d.lazy)(()=>n.e(328).then(n.t.bind(n,8719,23)))},{key:"mixcloud",name:"Mixcloud",canPlay:u.canPlay.mixcloud,lazyPlayer:(0,d.lazy)(()=>n.e(570).then(n.t.bind(n,561,23)))},{key:"vidyard",name:"Vidyard",canPlay:u.canPlay.vidyard,lazyPlayer:(0,d.lazy)(()=>n.e(392).then(n.t.bind(n,5431,23)))},{key:"kaltura",name:"Kaltura",canPlay:u.canPlay.kaltura,lazyPlayer:(0,d.lazy)(()=>n.e(463).then(n.t.bind(n,7566,23)))},{key:"file",name:"FilePlayer",canPlay:u.canPlay.file,canEnablePIP:e=>u.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,d.supportsWebKitPresentationMode)())&&!u.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,d.lazy)(()=>n.e(458).then(n.t.bind(n,7457,23)))}]},3312:(e,t,n)=>{var s=n(7101);e.exports=function(e,t){s(e,t),t.add(e)},e.exports.__esModule=!0,e.exports.default=e.exports},3352:(e,t,n)=>{"use strict";function s(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>s})},3388:e=>{e.exports=function(e){var t={};function n(s){if(t[s])return t[s].exports;var i=t[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:s})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";var s={MOBILE:"mobile",TABLET:"tablet",SMART_TV:"smarttv",CONSOLE:"console",WEARABLE:"wearable",BROWSER:void 0};e.exports={BROWSER_TYPES:{CHROME:"Chrome",FIREFOX:"Firefox",OPERA:"Opera",YANDEX:"Yandex",SAFARI:"Safari",INTERNET_EXPLORER:"Internet Explorer",EDGE:"Edge",CHROMIUM:"Chromium",IE:"IE",MOBILE_SAFARI:"Mobile Safari",EDGE_CHROMIUM:"Edge Chromium"},DEVICE_TYPES:s,OS_TYPES:{IOS:"iOS",ANDROID:"Android",WINDOWS_PHONE:"Windows Phone",WINDOWS:"Windows",MAC_OS:"Mac OS"},defaultData:{isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1}}},function(e,t,n){"use strict";var s=n(2),i=n(0),a=i.BROWSER_TYPES,r=i.OS_TYPES,o=i.DEVICE_TYPES,l=n(4),c=l.checkType,d=l.broPayload,u=l.mobilePayload,p=l.wearPayload,h=l.consolePayload,x=l.stvPayload,f=l.getNavigatorInstance,m=l.isIOS13Check,g=new s,b=g.getBrowser(),v=g.getDevice(),w=g.getEngine(),C=g.getOS(),y=g.getUA(),j=a.CHROME,k=a.CHROMIUM,_=a.IE,N=a.INTERNET_EXPLORER,L=a.OPERA,S=a.FIREFOX,A=a.SAFARI,M=a.EDGE,T=a.YANDEX,E=a.MOBILE_SAFARI,F=o.MOBILE,R=o.TABLET,P=o.SMART_TV,O=o.BROWSER,D=o.WEARABLE,I=o.CONSOLE,B=r.ANDROID,H=r.WINDOWS_PHONE,Z=r.IOS,V=r.WINDOWS,z=r.MAC_OS,Y=function(){return C.name===r.WINDOWS&&"10"===C.version&&("string"===typeof y&&-1!==y.indexOf("Edg/"))},U=function(){return b.name===M},W=function(){return m("iPad")},G=v.type===P,q=v.type===I,X=v.type===D,K=b.name===E||W(),Q=b.name===k,$=function(){switch(v.type){case F:case R:return!0;default:return!1}}()||W(),J=v.type===F,ee=v.type===R||W(),te=v.type===O,ne=C.name===B,se=C.name===H,ie=C.name===Z||W(),ae=b.name===j,re=b.name===S,oe=b.name===A||b.name===E,le=b.name===L,ce=b.name===N||b.name===_,de=C.version?C.version:"none",ue=C.name?C.name:"none",pe=b.major,he=b.version,xe=b.name,fe=v.vendor?v.vendor:"none",me=v.model?v.model:"none",ge=w.name,be=w.version,ve=y,we=U()||Y(),Ce=b.name===T,ye=v.type,je=function(){var e=f();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream}(),ke=W(),_e=m("iPhone"),Ne=m("iPod"),Le=function(){var e=f(),t=e&&e.userAgent.toLowerCase();return"string"===typeof t&&/electron/.test(t)}(),Se=Y(),Ae=U(),Me=C.name===V,Te=C.name===z,Ee=c(v.type);e.exports={deviceDetect:function(){var e=Ee.isBrowser,t=Ee.isMobile,n=Ee.isTablet,s=Ee.isSmartTV,i=Ee.isConsole,a=Ee.isWearable;return e?d(e,b,w,C,y):s?x(s,w,C,y):i?h(i,w,C,y):t||n?u(Ee,v,C,y):a?p(a,w,C,y):void 0},isSmartTV:G,isConsole:q,isWearable:X,isMobileSafari:K,isChromium:Q,isMobile:$,isMobileOnly:J,isTablet:ee,isBrowser:te,isAndroid:ne,isWinPhone:se,isIOS:ie,isChrome:ae,isFirefox:re,isSafari:oe,isOpera:le,isIE:ce,osVersion:de,osName:ue,fullBrowserVersion:pe,browserVersion:he,browserName:xe,mobileVendor:fe,mobileModel:me,engineName:ge,engineVersion:be,getUA:ve,isEdge:we,isYandex:Ce,deviceType:ye,isIOS13:je,isIPad13:ke,isIPhone13:_e,isIPod13:Ne,isElectron:Le,isEdgeChromium:Se,isLegacyEdge:Ae,isWindows:Me,isMacOs:Te}},function(e,t,n){var s;!function(i,a){"use strict";var r="function",o="undefined",l="object",c="model",d="name",u="type",p="vendor",h="version",x="architecture",f="console",m="mobile",g="tablet",b="smarttv",v="wearable",w={extend:function(e,t){var n={};for(var s in e)t[s]&&t[s].length%2===0?n[s]=t[s].concat(e[s]):n[s]=e[s];return n},has:function(e,t){return"string"===typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"===typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:a},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},C={rgx:function(e,t){for(var n,s,i,o,c,d,u=0;u0?2==o.length?typeof o[1]==r?this[o[0]]=o[1].call(this,d):this[o[0]]=o[1]:3==o.length?typeof o[1]!==r||o[1].exec&&o[1].test?this[o[0]]=d?d.replace(o[1],o[2]):a:this[o[0]]=d?o[1].call(this,d,o[2]):a:4==o.length&&(this[o[0]]=d?o[3].call(this,d.replace(o[1],o[2])):a):this[o]=d||a;u+=2}},str:function(e,t){for(var n in t)if(typeof t[n]===l&&t[n].length>0){for(var s=0;s1&&!window.MSStream)};e.exports={checkType:function(e){switch(e){case a.MOBILE:return{isMobile:!0};case a.TABLET:return{isTablet:!0};case a.SMART_TV:return{isSmartTV:!0};case a.CONSOLE:return{isConsole:!0};case a.WEARABLE:return{isWearable:!0};case a.BROWSER:return{isBrowser:!0};default:return r}},broPayload:function(e,t,n,s,i){return{isBrowser:e,browserMajorVersion:t.major,browserFullVersion:t.version,browserName:t.name,engineName:n.name||!1,engineVersion:n.version,osName:s.name,osVersion:s.version,userAgent:i}},mobilePayload:function(e,t,n,i){return s({},e,{vendor:t.vendor,model:t.model,os:n.name,osVersion:n.version,ua:i})},stvPayload:function(e,t,n,s){return{isSmartTV:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:s}},consolePayload:function(e,t,n,s){return{isConsole:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:s}},wearPayload:function(e,t,n,s){return{isWearable:e,engineName:t.name,engineVersion:t.version,osName:n.name,osVersion:n.version,userAgent:s}},getNavigatorInstance:o,isIOS13Check:l}}])},3419:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map(function(e){return s(e,n)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function r(e,t){try{return t in e}catch(n){return!1}}function o(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=s(e[t],n)}),a(t).forEach(function(a){(function(e,t){return r(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(r(e,a)&&n.isMergeableObject(t[a])?i[a]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"===typeof n?n:l}(a,n)(e[a],t[a],n):i[a]=s(t[a],n))}),i}function l(e,n,a){(a=a||{}).arrayMerge=a.arrayMerge||i,a.isMergeableObject=a.isMergeableObject||t,a.cloneUnlessOtherwiseSpecified=s;var r=Array.isArray(n);return r===Array.isArray(e)?r?a.arrayMerge(e,n,a):o(e,n,a):s(n,a)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})};var c=l;e.exports=c},3556:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[s];if(!(0>>1;sa(l,n))ca(d,l)?(e[s]=d,e[c]=n,s=c):(e[s]=l,e[o]=n,s=o);else{if(!(ca(d,n)))break e;e[s]=d,e[c]=n,s=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var r=performance;t.unstable_now=function(){return r.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],d=[],u=1,p=null,h=3,x=!1,f=!1,m=!1,g="function"===typeof setTimeout?setTimeout:null,b="function"===typeof clearTimeout?clearTimeout:null,v="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=s(d);null!==t;){if(null===t.callback)i(d);else{if(!(t.startTime<=e))break;i(d),t.sortIndex=t.expirationTime,n(c,t)}t=s(d)}}function C(e){if(m=!1,w(e),!f)if(null!==s(c))f=!0,F(y);else{var t=s(d);null!==t&&R(C,t.startTime-e)}}function y(e,n){f=!1,m&&(m=!1,b(N),N=-1),x=!0;var a=h;try{for(w(n),p=s(c);null!==p&&(!(p.expirationTime>n)||e&&!A());){var r=p.callback;if("function"===typeof r){p.callback=null,h=p.priorityLevel;var o=r(p.expirationTime<=n);n=t.unstable_now(),"function"===typeof o?p.callback=o:p===s(c)&&i(c),w(n)}else i(c);p=s(c)}if(null!==p)var l=!0;else{var u=s(d);null!==u&&R(C,u.startTime-n),l=!1}return l}finally{p=null,h=a,x=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var j,k=!1,_=null,N=-1,L=5,S=-1;function A(){return!(t.unstable_now()-Se||125r?(e.sortIndex=a,n(d,e),null===s(c)&&e===s(d)&&(m?(b(N),N=-1):m=!0,R(C,a-r))):(e.sortIndex=o,n(c,e),f||x||(f=!0,F(y))),e},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},3693:(e,t,n)=>{var s=n(7736);e.exports=function(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},3702:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,getFunctionName:()=>a});var s=n(9586);const i=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function a(e){const t="".concat(e).match(i);return t&&t[1]||""}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||a(e)||t}function o(e,t,n){const s=r(t);return e.displayName||(""!==s?"".concat(n,"(").concat(s,")"):n)}function l(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return r(e,"Component");if("object"===typeof e)switch(e.$$typeof){case s.vM:return o(e,e.render,"ForwardRef");case s.lD:return o(e,e.type,"memo");default:return}}}},3738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3773:(e,t,n)=>{"use strict";n.d(t,{LX:()=>x,MA:()=>h,_W:()=>f,Lc:()=>b,Ms:()=>v});var s=n(9425),i=n(7184),a=n(7801);const r={m:"margin",p:"padding"},o={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),s=r[t],i=o[n]||"";return Array.isArray(i)?i.map(e=>s+e):[s+i]}),d=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],u=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],p=[...d,...u];function h(e,t,n,s){var a;const r=null!=(a=(0,i.Yn)(e,t,!1))?a:n;return"number"===typeof r?e=>"string"===typeof e?e:r*e:Array.isArray(r)?e=>"string"===typeof e?e:r[e]:"function"===typeof r?r:()=>{}}function x(e){return h(e,"spacing",8)}function f(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function m(e,t,n,i){if(-1===t.indexOf(n))return null;const a=function(e,t){return n=>e.reduce((e,s)=>(e[s]=f(t,n),e),{})}(c(n),i),r=e[n];return(0,s.NI)(e,r,a)}function g(e,t){const n=x(e.theme);return Object.keys(e).map(s=>m(e,t,s,n)).reduce(a.A,{})}function b(e){return g(e,d)}function v(e){return g(e,u)}function w(e){return g(e,p)}b.propTypes={},b.filterProps=d,v.propTypes={},v.filterProps=u,w.propTypes={},w.filterProps=p},4224:(e,t,n)=>{"use strict";n.d(t,{AH:()=>d,i7:()=>u,mL:()=>c});var s=n(4839),i=n(5917),a=n(7216),r=n(714),o=n(8295),l=(n(6519),n(7749),function(e,t){var n=arguments;if(null==t||!s.h.call(t,"css"))return i.createElement.apply(void 0,n);var a=n.length,r=new Array(a);r[0]=s.E,r[1]=(0,s.c)(e,t);for(var o=2;o{"use strict";n.r(t),n.d(t,{default:()=>s.A});var s=n(8298)},4634:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{"use strict";n.d(t,{C:()=>c,E:()=>m,T:()=>u,c:()=>x,h:()=>p,w:()=>d});var s=n(5917),i=n(6519),a=n(7216),r=n(8295),o=n(714),l=s.createContext("undefined"!==typeof HTMLElement?(0,i.A)({key:"css"}):null),c=l.Provider,d=function(e){return(0,s.forwardRef)(function(t,n){var i=(0,s.useContext)(l);return e(t,i,n)})},u=s.createContext({});var p={}.hasOwnProperty,h="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",x=function(e,t){var n={};for(var s in t)p.call(t,s)&&(n[s]=t[s]);return n[h]=e,n},f=function(e){var t=e.cache,n=e.serialized,s=e.isStringTag;return(0,a.SF)(t,n,s),(0,o.s)(function(){return(0,a.sk)(t,n,s)}),null},m=d(function(e,t,n){var i=e.css;"string"===typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var o=e[h],l=[i],c="";"string"===typeof e.className?c=(0,a.Rk)(t.registered,l,e.className):null!=e.className&&(c=e.className+" ");var d=(0,r.J)(l,void 0,s.useContext(u));c+=t.key+"-"+d.name;var x={};for(var m in e)p.call(e,m)&&"css"!==m&&m!==h&&(x[m]=e[m]);return x.className=c,n&&(x.ref=n),s.createElement(s.Fragment,null,s.createElement(f,{cache:t,serialized:d,isStringTag:"string"===typeof o}),s.createElement(o,x))})},4893:e=>{e.exports=function(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;n[s]=e[s]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},4933:(e,t,n)=>{"use strict";e.exports=n(5097)},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},5019:(e,t,n)=>{"use strict";var s=n(5436);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,r){if(r!==s){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},5097:(e,t)=>{"use strict";var n="function"===typeof Symbol&&Symbol.for,s=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,r=n?Symbol.for("react.strict_mode"):60108,o=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,x=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function C(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case s:switch(e=e.type){case d:case u:case a:case o:case r:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case m:case f:case l:return e;default:return t}}case i:return t}}}function y(e){return C(e)===u}t.AsyncMode=d,t.ConcurrentMode=u,t.ContextConsumer=c,t.ContextProvider=l,t.Element=s,t.ForwardRef=p,t.Fragment=a,t.Lazy=m,t.Memo=f,t.Portal=i,t.Profiler=o,t.StrictMode=r,t.Suspense=h,t.isAsyncMode=function(e){return y(e)||C(e)===d},t.isConcurrentMode=y,t.isContextConsumer=function(e){return C(e)===c},t.isContextProvider=function(e){return C(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===s},t.isForwardRef=function(e){return C(e)===p},t.isFragment=function(e){return C(e)===a},t.isLazy=function(e){return C(e)===m},t.isMemo=function(e){return C(e)===f},t.isPortal=function(e){return C(e)===i},t.isProfiler=function(e){return C(e)===o},t.isStrictMode=function(e){return C(e)===r},t.isSuspense=function(e){return C(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===u||e===o||e===r||e===h||e===x||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===v||e.$$typeof===w||e.$$typeof===g)},t.typeOf=C},5172:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var s=n(8168),i=n(8587),a=n(2882),r=n(1107);const o={borderRadius:4};var l=n(3773);var c=n(8810),d=n(7316),u=n(9765);const p=["breakpoints","palette","spacing","shape"];const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:h,shape:x={}}=e,f=(0,i.A)(e,p),m=(0,r.A)(t),g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),s=0;s{const n=t(e);return"number"===typeof n?"".concat(n,"px"):n}).join(" ")};return n.mui=!0,n}(h);let b=(0,a.A)({breakpoints:m,direction:"ltr",components:{},palette:(0,s.A)({mode:"light"},n),spacing:g,shape:(0,s.A)({},o,x)},f);b.applyStyles=u.A;for(var v=arguments.length,w=new Array(v>1?v-1:0),C=1;C(0,a.A)(e,t),b),b.unstable_sxConfig=(0,s.A)({},d.A,null==f?void 0:f.unstable_sxConfig),b.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},b}},5418:(e,t,n)=>{!function(){var t=n(846),s=n(6234).utf8,i=n(6419),a=n(6234).bin,r=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?a.stringToBytes(e):s.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var o=t.bytesToWords(e),l=8*e.length,c=1732584193,d=-271733879,u=-1732584194,p=271733878,h=0;h>>24)|4278255360&(o[h]<<24|o[h]>>>8);o[l>>>5]|=128<>>9<<4)]=l;var x=r._ff,f=r._gg,m=r._hh,g=r._ii;for(h=0;h>>0,d=d+v>>>0,u=u+w>>>0,p=p+C>>>0}return t.endian([c,d,u,p])};r._ff=function(e,t,n,s,i,a,r){var o=e+(t&n|~t&s)+(i>>>0)+r;return(o<>>32-a)+t},r._gg=function(e,t,n,s,i,a,r){var o=e+(t&s|n&~s)+(i>>>0)+r;return(o<>>32-a)+t},r._hh=function(e,t,n,s,i,a,r){var o=e+(t^n^s)+(i>>>0)+r;return(o<>>32-a)+t},r._ii=function(e,t,n,s,i,a,r){var o=e+(n^(t|~s))+(i>>>0)+r;return(o<>>32-a)+t},r._blocksize=16,r._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var s=t.wordsToBytes(r(e,n));return n&&n.asBytes?s:n&&n.asString?a.bytesToString(s):t.bytesToHex(s)}}()},5436:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5484:(e,t)=>{"use strict";var n=Symbol.for("react.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||x}function b(){}function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||x}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=g.prototype;var w=v.prototype=new b;w.constructor=v,f(w,g.prototype),w.isPureReactComponent=!0;var C=Array.isArray,y=Object.prototype.hasOwnProperty,j={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,s){var i,a={},r=null,o=null;if(null!=t)for(i in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(r=""+t.key),t)y.call(t,i)&&!k.hasOwnProperty(i)&&(a[i]=t[i]);var l=arguments.length-2;if(1===l)a.children=s;else if(1{var n;!function(){"use strict";var s={}.hasOwnProperty;function i(){for(var e="",t=0;t>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var O=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,D=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},B={};function H(e,t,n,s){var i=s;"string"===typeof s&&(i=function(){return this[s]()}),e&&(B[e]=i),t&&(B[t[0]]=function(){return P(i.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function Z(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function V(e){var t,n,s=e.match(O);for(t=0,n=s.length;t=0&&D.test(e);)e=e.replace(D,s),D.lastIndex=0,n-=1;return e}var U={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function W(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(O).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])}var G="Invalid date";function q(){return this._invalidDate}var X="%d",K=/\d{1,2}/;function Q(e){return this._ordinal.replace("%d",e)}var $={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function J(e,t,n,s){var i=this._relativeTime[n];return A(i)?i(e,t,n,s):i.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return A(n)?n(t):n.replace(/%s/i,t)}var te={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function se(e){var t,n,s={};for(n in e)o(e,n)&&(t=ne(n))&&(s[t]=e[n]);return s}var ie={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ae(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:ie[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}var re,oe=/\d/,le=/\d\d/,ce=/\d{3}/,de=/\d{4}/,ue=/[+-]?\d{6}/,pe=/\d\d?/,he=/\d\d\d\d?/,xe=/\d\d\d\d\d\d?/,fe=/\d{1,3}/,me=/\d{1,4}/,ge=/[+-]?\d{1,6}/,be=/\d+/,ve=/[+-]?\d+/,we=/Z|[+-]\d\d:?\d\d/gi,Ce=/Z|[+-]\d\d(?::?\d\d)?/gi,ye=/[+-]?\d+(\.\d{1,3})?/,je=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ke=/^[1-9]\d?/,_e=/^([1-9]\d|\d)/;function Ne(e,t,n){re[e]=A(t)?t:function(e,s){return e&&n?n:t}}function Le(e,t){return o(re,e)?re[e](t._strict,t._locale):new RegExp(Se(e))}function Se(e){return Ae(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i}))}function Ae(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Me(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Te(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Me(t)),n}re={};var Ee={};function Fe(e,t){var n,s,i=t;for("string"===typeof e&&(e=[e]),d(t)&&(i=function(e,n){n[t]=Te(e)}),s=e.length,n=0;n68?1900:2e3)};var Ge,qe=Ke("FullYear",!0);function Xe(){return Oe(this.year())}function Ke(e,t){return function(n){return null!=n?($e(this,e,n),s.updateOffset(this,t),this):Qe(this,e)}}function Qe(e,t){if(!e.isValid())return NaN;var n=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return s?n.getUTCSeconds():n.getSeconds();case"Minutes":return s?n.getUTCMinutes():n.getMinutes();case"Hours":return s?n.getUTCHours():n.getHours();case"Date":return s?n.getUTCDate():n.getDate();case"Day":return s?n.getUTCDay():n.getDay();case"Month":return s?n.getUTCMonth():n.getMonth();case"FullYear":return s?n.getUTCFullYear():n.getFullYear();default:return NaN}}function $e(e,t,n){var s,i,a,r,o;if(e.isValid()&&!isNaN(n)){switch(s=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?s.setUTCMilliseconds(n):s.setMilliseconds(n));case"Seconds":return void(i?s.setUTCSeconds(n):s.setSeconds(n));case"Minutes":return void(i?s.setUTCMinutes(n):s.setMinutes(n));case"Hours":return void(i?s.setUTCHours(n):s.setHours(n));case"Date":return void(i?s.setUTCDate(n):s.setDate(n));case"FullYear":break;default:return}a=n,r=e.month(),o=29!==(o=e.date())||1!==r||Oe(a)?o:28,i?s.setUTCFullYear(a,r,o):s.setFullYear(a,r,o)}}function Je(e){return A(this[e=ne(e)])?this[e]():this}function et(e,t){if("object"===typeof e){var n,s=ae(e=se(e)),i=s.length;for(n=0;n=0?(o=new Date(e+400,t,n,s,i,a,r),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,a,r),o}function vt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function wt(e,t,n){var s=7+t-n;return-(7+vt(e,0,s).getUTCDay()-t)%7+s-1}function Ct(e,t,n,s,i){var a,r,o=1+7*(t-1)+(7+n-s)%7+wt(e,s,i);return o<=0?r=We(a=e-1)+o:o>We(e)?(a=e+1,r=o-We(e)):(a=e,r=o),{year:a,dayOfYear:r}}function yt(e,t,n){var s,i,a=wt(e.year(),t,n),r=Math.floor((e.dayOfYear()-a-1)/7)+1;return r<1?s=r+jt(i=e.year()-1,t,n):r>jt(e.year(),t,n)?(s=r-jt(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function jt(e,t,n){var s=wt(e,t,n),i=wt(e+1,t,n);return(We(e)-s+i)/7}function kt(e){return yt(e,this._week.dow,this._week.doy).week}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),Ne("w",pe,ke),Ne("ww",pe,le),Ne("W",pe,ke),Ne("WW",pe,le),Re(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=Te(e)});var _t={dow:0,doy:6};function Nt(){return this._week.dow}function Lt(){return this._week.doy}function St(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function At(e){var t=yt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Mt(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Tt(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Et(e,t){return e.slice(t,7).concat(e.slice(0,t))}H("d",0,"do","day"),H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),Ne("d",pe),Ne("e",pe),Ne("E",pe),Ne("dd",function(e,t){return t.weekdaysMinRegex(e)}),Ne("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Ne("dddd",function(e,t){return t.weekdaysRegex(e)}),Re(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:m(n).invalidWeekday=e}),Re(["d","e","E"],function(e,t,n,s){t[s]=Te(e)});var Ft="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Pt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ot=je,Dt=je,It=je;function Bt(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Et(n,this._week.dow):e?n[e.day()]:n}function Ht(e){return!0===e?Et(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Zt(e){return!0===e?Et(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Vt(e,t,n){var s,i,a,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)a=x([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ge.call(this._weekdaysParse,r))?i:null:"ddd"===t?-1!==(i=Ge.call(this._shortWeekdaysParse,r))?i:null:-1!==(i=Ge.call(this._minWeekdaysParse,r))?i:null:"dddd"===t?-1!==(i=Ge.call(this._weekdaysParse,r))||-1!==(i=Ge.call(this._shortWeekdaysParse,r))||-1!==(i=Ge.call(this._minWeekdaysParse,r))?i:null:"ddd"===t?-1!==(i=Ge.call(this._shortWeekdaysParse,r))||-1!==(i=Ge.call(this._weekdaysParse,r))||-1!==(i=Ge.call(this._minWeekdaysParse,r))?i:null:-1!==(i=Ge.call(this._minWeekdaysParse,r))||-1!==(i=Ge.call(this._weekdaysParse,r))||-1!==(i=Ge.call(this._shortWeekdaysParse,r))?i:null}function zt(e,t,n){var s,i,a;if(this._weekdaysParseExact)return Vt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=x([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}}function Yt(e){if(!this.isValid())return null!=e?this:NaN;var t=Qe(this,"Day");return null!=e?(e=Mt(e,this.localeData()),this.add(e-t,"d")):t}function Ut(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Wt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Tt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Gt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Ot),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Dt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Xt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=It),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kt(){function e(e,t){return t.length-e.length}var t,n,s,i,a,r=[],o=[],l=[],c=[];for(t=0;t<7;t++)n=x([2e3,1]).day(t),s=Ae(this.weekdaysMin(n,"")),i=Ae(this.weekdaysShort(n,"")),a=Ae(this.weekdays(n,"")),r.push(s),o.push(i),l.push(a),c.push(s),c.push(i),c.push(a);r.sort(e),o.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Qt(){return this.hours()%12||12}function $t(){return this.hours()||24}function Jt(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,Qt),H("k",["kk",2],0,$t),H("hmm",0,0,function(){return""+Qt.apply(this)+P(this.minutes(),2)}),H("hmmss",0,0,function(){return""+Qt.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+P(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)}),Jt("a",!0),Jt("A",!1),Ne("a",en),Ne("A",en),Ne("H",pe,_e),Ne("h",pe,ke),Ne("k",pe,ke),Ne("HH",pe,le),Ne("hh",pe,le),Ne("kk",pe,le),Ne("hmm",he),Ne("hmmss",xe),Ne("Hmm",he),Ne("Hmmss",xe),Fe(["H","HH"],He),Fe(["k","kk"],function(e,t,n){var s=Te(e);t[He]=24===s?0:s}),Fe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),Fe(["h","hh"],function(e,t,n){t[He]=Te(e),m(n).bigHour=!0}),Fe("hmm",function(e,t,n){var s=e.length-2;t[He]=Te(e.substr(0,s)),t[Ze]=Te(e.substr(s)),m(n).bigHour=!0}),Fe("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[He]=Te(e.substr(0,s)),t[Ze]=Te(e.substr(s,2)),t[Ve]=Te(e.substr(i)),m(n).bigHour=!0}),Fe("Hmm",function(e,t,n){var s=e.length-2;t[He]=Te(e.substr(0,s)),t[Ze]=Te(e.substr(s))}),Fe("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[He]=Te(e.substr(0,s)),t[Ze]=Te(e.substr(s,2)),t[Ve]=Te(e.substr(i))});var nn=/[ap]\.?m?\.?/i,sn=Ke("Hours",!0);function an(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var rn,on={calendar:F,longDateFormat:U,invalidDate:G,ordinal:X,dayOfMonthOrdinalParse:K,relativeTime:$,months:st,monthsShort:it,week:_t,weekdays:Ft,weekdaysMin:Pt,weekdaysShort:Rt,meridiemParse:nn},ln={},cn={};function dn(e,t){var n,s=Math.min(e.length,t.length);for(n=0;n0;){if(s=xn(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&dn(i,n)>=t-1)break;t--}a++}return rn}function hn(e){return!(!e||!e.match("^[^/\\\\]*$"))}function xn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&hn(t))try{n=rn._abbr,Object(function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}()),fn(n)}catch(s){ln[t]=null}return ln[t]}function fn(e,t){var n;return e&&((n=c(t)?bn(e):mn(e,t))?rn=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rn._abbr}function mn(e,t){if(null!==t){var n,s=on;if(t.abbr=e,null!=ln[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])s=ln[t.parentLocale]._config;else{if(null==(n=xn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;s=n._config}return ln[e]=new E(T(s,t)),cn[e]&&cn[e].forEach(function(e){mn(e.name,e.config)}),fn(e),ln[e]}return delete ln[e],null}function gn(e,t){if(null!=t){var n,s,i=on;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(T(ln[e]._config,t)):(null!=(s=xn(e))&&(i=s._config),t=T(i,t),null==s&&(t.abbr=e),(n=new E(t)).parentLocale=ln[e],ln[e]=n),fn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===fn()&&fn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function bn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rn;if(!a(e)){if(t=xn(e))return t;e=[e]}return pn(e)}function vn(){return N(ln)}function wn(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[Ie]<0||n[Ie]>11?Ie:n[Be]<1||n[Be]>nt(n[De],n[Ie])?Be:n[He]<0||n[He]>24||24===n[He]&&(0!==n[Ze]||0!==n[Ve]||0!==n[ze])?He:n[Ze]<0||n[Ze]>59?Ze:n[Ve]<0||n[Ve]>59?Ve:n[ze]<0||n[ze]>999?ze:-1,m(e)._overflowDayOfYear&&(tBe)&&(t=Be),m(e)._overflowWeeks&&-1===t&&(t=Ye),m(e)._overflowWeekday&&-1===t&&(t=Ue),m(e).overflow=t),e}var Cn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,jn=/Z|[+-]\d\d(?::?\d\d)?/,kn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],_n=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Nn=/^\/?Date\((-?\d+)/i,Ln=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Sn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function An(e){var t,n,s,i,a,r,o=e._i,l=Cn.exec(o)||yn.exec(o),c=kn.length,d=_n.length;if(l){for(m(e).iso=!0,t=0,n=c;tWe(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=vt(a,0,e._dayOfYear),e._a[Ie]=n.getUTCMonth(),e._a[Be]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[He]&&0===e._a[Ze]&&0===e._a[Ve]&&0===e._a[ze]&&(e._nextDay=!0,e._a[He]=0),e._d=(e._useUTC?vt:bt).apply(null,r),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[He]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(m(e).weekdayMismatch=!0)}}function Hn(e){var t,n,s,i,a,r,o,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,r=4,n=Dn(t.GG,e._a[De],yt(Xn(),1,4).year),s=Dn(t.W,1),((i=Dn(t.E,1))<1||i>7)&&(l=!0)):(a=e._locale._week.dow,r=e._locale._week.doy,c=yt(Xn(),a,r),n=Dn(t.gg,e._a[De],c.year),s=Dn(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+a,(t.e<0||t.e>6)&&(l=!0)):i=a),s<1||s>jt(n,a,r)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(o=Ct(n,s,i,a,r),e._a[De]=o.year,e._dayOfYear=o.dayOfYear)}function Zn(e){if(e._f!==s.ISO_8601)if(e._f!==s.RFC_2822){e._a=[],m(e).empty=!0;var t,n,i,a,r,o,l,c=""+e._i,d=c.length,u=0;for(l=(i=Y(e._f,e._locale).match(O)||[]).length,t=0;t0&&m(e).unusedInput.push(r),c=c.slice(c.indexOf(n)+n.length),u+=n.length),B[a]?(n?m(e).empty=!1:m(e).unusedTokens.push(a),Pe(a,n,e)):e._strict&&!n&&m(e).unusedTokens.push(a);m(e).charsLeftOver=d-u,c.length>0&&m(e).unusedInput.push(c),e._a[He]<=12&&!0===m(e).bigHour&&e._a[He]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[He]=Vn(e._locale,e._a[He],e._meridiem),null!==(o=m(e).era)&&(e._a[De]=e._locale.erasConvertYear(o,e._a[De])),Bn(e),wn(e)}else Pn(e);else An(e)}function Vn(e,t,n){var s;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0),t):t}function zn(e){var t,n,s,i,a,r,o=!1,l=e._f.length;if(0===l)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:b()});function $n(e,t){var n,s;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Xn();for(n=t[0],s=1;sthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ys(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return C(t,this),(t=Wn(t))._a?(e=t._isUTC?x(t._a):Xn(t._a),this._isDSTShifted=this.isValid()&&cs(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function js(){return!!this.isValid()&&!this._isUTC}function ks(){return!!this.isValid()&&this._isUTC}function _s(){return!!this.isValid()&&this._isUTC&&0===this._offset}s.updateOffset=function(){};var Ns=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ls=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ss(e,t){var n,s,i,a=e,r=null;return os(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(r=Ns.exec(e))?(n="-"===r[1]?-1:1,a={y:0,d:Te(r[Be])*n,h:Te(r[He])*n,m:Te(r[Ze])*n,s:Te(r[Ve])*n,ms:Te(ls(1e3*r[ze]))*n}):(r=Ls.exec(e))?(n="-"===r[1]?-1:1,a={y:As(r[2],n),M:As(r[3],n),w:As(r[4],n),d:As(r[5],n),h:As(r[6],n),m:As(r[7],n),s:As(r[8],n)}):null==a?a={}:"object"===typeof a&&("from"in a||"to"in a)&&(i=Ts(Xn(a.from),Xn(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),s=new rs(a),os(e)&&o(e,"_locale")&&(s._locale=e._locale),os(e)&&o(e,"_isValid")&&(s._isValid=e._isValid),s}function As(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ms(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ts(e,t){var n;return e.isValid()&&t.isValid()?(t=hs(t,e),e.isBefore(t)?n=Ms(e,t):((n=Ms(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Es(e,t){return function(n,s){var i;return null===s||isNaN(+s)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=s,s=i),Fs(this,Ss(n,s),e),this}}function Fs(e,t,n,i){var a=t._milliseconds,r=ls(t._days),o=ls(t._months);e.isValid()&&(i=null==i||i,o&&pt(e,Qe(e,"Month")+o*n),r&&$e(e,"Date",Qe(e,"Date")+r*n),a&&e._d.setTime(e._d.valueOf()+a*n),i&&s.updateOffset(e,r||o))}Ss.fn=rs.prototype,Ss.invalid=as;var Rs=Es(1,"add"),Ps=Es(-1,"subtract");function Os(e){return"string"===typeof e||e instanceof String}function Ds(e){return j(e)||u(e)||Os(e)||d(e)||Bs(e)||Is(e)||null===e||void 0===e}function Is(e){var t,n,s=r(e)&&!l(e),i=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=a.length;for(t=0;tn.valueOf():n.valueOf()9999?z(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(n,"Z")):z(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,s,i="moment",a="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",s=a+'[")]',this.format(e+t+n+s)}function ti(e){e||(e=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var t=z(this,e);return this.localeData().postformat(t)}function ni(e,t){return this.isValid()&&(j(e)&&e.isValid()||Xn(e).isValid())?Ss({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function si(e){return this.from(Xn(),e)}function ii(e,t){return this.isValid()&&(j(e)&&e.isValid()||Xn(e).isValid())?Ss({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ai(e){return this.to(Xn(),e)}function ri(e){var t;return void 0===e?this._locale._abbr:(null!=(t=bn(e))&&(this._locale=t),this)}s.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",s.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var oi=_("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function li(){return this._locale}var ci=1e3,di=60*ci,ui=60*di,pi=3506328*ui;function hi(e,t){return(e%t+t)%t}function xi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-pi:new Date(e,t,n).valueOf()}function fi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-pi:Date.UTC(e,t,n)}function mi(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?fi:xi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hi(t+(this._isUTC?0:this.utcOffset()*di),ui);break;case"minute":t=this._d.valueOf(),t-=hi(t,di);break;case"second":t=this._d.valueOf(),t-=hi(t,ci)}return this._d.setTime(t),s.updateOffset(this,!0),this}function gi(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?fi:xi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ui-hi(t+(this._isUTC?0:this.utcOffset()*di),ui)-1;break;case"minute":t=this._d.valueOf(),t+=di-hi(t,di)-1;break;case"second":t=this._d.valueOf(),t+=ci-hi(t,ci)-1}return this._d.setTime(t),s.updateOffset(this,!0),this}function bi(){return this._d.valueOf()-6e4*(this._offset||0)}function vi(){return Math.floor(this.valueOf()/1e3)}function wi(){return new Date(this.valueOf())}function Ci(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function yi(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function ji(){return this.isValid()?this.toISOString():null}function ki(){return g(this)}function _i(){return h({},m(this))}function Ni(){return m(this).overflow}function Li(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Si(e,t){var n,i,a,r=this._eras||bn("en")._eras;for(n=0,i=r.length;n=0)return l[s]}function Mi(e,t){var n=e.since<=e.until?1:-1;return void 0===t?s(e.since).year():s(e.since).year()+(t-e.offset)*n}function Ti(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e(a=jt(e,s,i))&&(t=a),Qi.call(this,e,t,n,s,i))}function Qi(e,t,n,s,i){var a=Ct(e,t,n,s,i),r=vt(a.year,0,a.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function $i(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),Ne("N",Ii),Ne("NN",Ii),Ne("NNN",Ii),Ne("NNNN",Bi),Ne("NNNNN",Hi),Fe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){var i=n._locale.erasParse(e,s,n._strict);i?m(n).era=i:m(n).invalidEra=e}),Ne("y",be),Ne("yy",be),Ne("yyy",be),Ne("yyyy",be),Ne("yo",Zi),Fe(["y","yy","yyy","yyyy"],De),Fe(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[De]=n._locale.eraYearOrdinalParse(e,i):t[De]=parseInt(e,10)}),H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),zi("gggg","weekYear"),zi("ggggg","weekYear"),zi("GGGG","isoWeekYear"),zi("GGGGG","isoWeekYear"),Ne("G",ve),Ne("g",ve),Ne("GG",pe,le),Ne("gg",pe,le),Ne("GGGG",me,de),Ne("gggg",me,de),Ne("GGGGG",ge,ue),Ne("ggggg",ge,ue),Re(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=Te(e)}),Re(["gg","GG"],function(e,t,n,i){t[i]=s.parseTwoDigitYear(e)}),H("Q",0,"Qo","quarter"),Ne("Q",oe),Fe("Q",function(e,t){t[Ie]=3*(Te(e)-1)}),H("D",["DD",2],"Do","date"),Ne("D",pe,ke),Ne("DD",pe,le),Ne("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Fe(["D","DD"],Be),Fe("Do",function(e,t){t[Be]=Te(e.match(pe)[0])});var Ji=Ke("Date",!0);function ea(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}H("DDD",["DDDD",3],"DDDo","dayOfYear"),Ne("DDD",fe),Ne("DDDD",ce),Fe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Te(e)}),H("m",["mm",2],0,"minute"),Ne("m",pe,_e),Ne("mm",pe,le),Fe(["m","mm"],Ze);var ta=Ke("Minutes",!1);H("s",["ss",2],0,"second"),Ne("s",pe,_e),Ne("ss",pe,le),Fe(["s","ss"],Ve);var na,sa,ia=Ke("Seconds",!1);for(H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Ne("S",fe,oe),Ne("SS",fe,le),Ne("SSS",fe,ce),na="SSSS";na.length<=9;na+="S")Ne(na,be);function aa(e,t){t[ze]=Te(1e3*("0."+e))}for(na="S";na.length<=9;na+="S")Fe(na,aa);function ra(){return this._isUTC?"UTC":""}function oa(){return this._isUTC?"Coordinated Universal Time":""}sa=Ke("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var la=y.prototype;function ca(e){return Xn(1e3*e)}function da(){return Xn.apply(null,arguments).parseZone()}function ua(e){return e}la.add=Rs,la.calendar=Vs,la.clone=zs,la.diff=Ks,la.endOf=gi,la.format=ti,la.from=ni,la.fromNow=si,la.to=ii,la.toNow=ai,la.get=Je,la.invalidAt=Ni,la.isAfter=Ys,la.isBefore=Us,la.isBetween=Ws,la.isSame=Gs,la.isSameOrAfter=qs,la.isSameOrBefore=Xs,la.isValid=ki,la.lang=oi,la.locale=ri,la.localeData=li,la.max=Qn,la.min=Kn,la.parsingFlags=_i,la.set=et,la.startOf=mi,la.subtract=Ps,la.toArray=Ci,la.toObject=yi,la.toDate=wi,la.toISOString=Js,la.inspect=ei,"undefined"!==typeof Symbol&&null!=Symbol.for&&(la[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),la.toJSON=ji,la.toString=$s,la.unix=vi,la.valueOf=bi,la.creationData=Li,la.eraName=Ti,la.eraNarrow=Ei,la.eraAbbr=Fi,la.eraYear=Ri,la.year=qe,la.isLeapYear=Xe,la.weekYear=Yi,la.isoWeekYear=Ui,la.quarter=la.quarters=$i,la.month=ht,la.daysInMonth=xt,la.week=la.weeks=St,la.isoWeek=la.isoWeeks=At,la.weeksInYear=qi,la.weeksInWeekYear=Xi,la.isoWeeksInYear=Wi,la.isoWeeksInISOWeekYear=Gi,la.date=Ji,la.day=la.days=Yt,la.weekday=Ut,la.isoWeekday=Wt,la.dayOfYear=ea,la.hour=la.hours=sn,la.minute=la.minutes=ta,la.second=la.seconds=ia,la.millisecond=la.milliseconds=sa,la.utcOffset=fs,la.utc=gs,la.local=bs,la.parseZone=vs,la.hasAlignedHourOffset=ws,la.isDST=Cs,la.isLocal=js,la.isUtcOffset=ks,la.isUtc=_s,la.isUTC=_s,la.zoneAbbr=ra,la.zoneName=oa,la.dates=_("dates accessor is deprecated. Use date instead.",Ji),la.months=_("months accessor is deprecated. Use month instead",ht),la.years=_("years accessor is deprecated. Use year instead",qe),la.zone=_("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",ms),la.isDSTShifted=_("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ys);var pa=E.prototype;function ha(e,t,n,s){var i=bn(),a=x().set(s,t);return i[n](a,e)}function xa(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return ha(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=ha(e,s,n,"month");return i}function fa(e,t,n,s){"boolean"===typeof e?(d(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,d(t)&&(n=t,t=void 0),t=t||"");var i,a=bn(),r=e?a._week.dow:0,o=[];if(null!=n)return ha(t,(n+r)%7,s,"day");for(i=0;i<7;i++)o[i]=ha(t,(i+r)%7,s,"day");return o}function ma(e,t){return xa(e,t,"months")}function ga(e,t){return xa(e,t,"monthsShort")}function ba(e,t,n){return fa(e,t,n,"weekdays")}function va(e,t,n){return fa(e,t,n,"weekdaysShort")}function wa(e,t,n){return fa(e,t,n,"weekdaysMin")}pa.calendar=R,pa.longDateFormat=W,pa.invalidDate=q,pa.ordinal=Q,pa.preparse=ua,pa.postformat=ua,pa.relativeTime=J,pa.pastFuture=ee,pa.set=M,pa.eras=Si,pa.erasParse=Ai,pa.erasConvertYear=Mi,pa.erasAbbrRegex=Oi,pa.erasNameRegex=Pi,pa.erasNarrowRegex=Di,pa.months=lt,pa.monthsShort=ct,pa.monthsParse=ut,pa.monthsRegex=mt,pa.monthsShortRegex=ft,pa.week=kt,pa.firstDayOfYear=Lt,pa.firstDayOfWeek=Nt,pa.weekdays=Bt,pa.weekdaysMin=Zt,pa.weekdaysShort=Ht,pa.weekdaysParse=zt,pa.weekdaysRegex=Gt,pa.weekdaysShortRegex=qt,pa.weekdaysMinRegex=Xt,pa.isPM=tn,pa.meridiem=an,fn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Te(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),s.lang=_("moment.lang is deprecated. Use moment.locale instead.",fn),s.langData=_("moment.langData is deprecated. Use moment.localeData instead.",bn);var Ca=Math.abs;function ya(){var e=this._data;return this._milliseconds=Ca(this._milliseconds),this._days=Ca(this._days),this._months=Ca(this._months),e.milliseconds=Ca(e.milliseconds),e.seconds=Ca(e.seconds),e.minutes=Ca(e.minutes),e.hours=Ca(e.hours),e.months=Ca(e.months),e.years=Ca(e.years),this}function ja(e,t,n,s){var i=Ss(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function ka(e,t){return ja(this,e,t,1)}function _a(e,t){return ja(this,e,t,-1)}function Na(e){return e<0?Math.floor(e):Math.ceil(e)}function La(){var e,t,n,s,i,a=this._milliseconds,r=this._days,o=this._months,l=this._data;return a>=0&&r>=0&&o>=0||a<=0&&r<=0&&o<=0||(a+=864e5*Na(Aa(o)+r),r=0,o=0),l.milliseconds=a%1e3,e=Me(a/1e3),l.seconds=e%60,t=Me(e/60),l.minutes=t%60,n=Me(t/60),l.hours=n%24,r+=Me(n/24),o+=i=Me(Sa(r)),r-=Na(Aa(i)),s=Me(o/12),o%=12,l.days=r,l.months=o,l.years=s,this}function Sa(e){return 4800*e/146097}function Aa(e){return 146097*e/4800}function Ma(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+Sa(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Aa(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}}function Ta(e){return function(){return this.as(e)}}var Ea=Ta("ms"),Fa=Ta("s"),Ra=Ta("m"),Pa=Ta("h"),Oa=Ta("d"),Da=Ta("w"),Ia=Ta("M"),Ba=Ta("Q"),Ha=Ta("y"),Za=Ea;function Va(){return Ss(this)}function za(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Ya(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ua=Ya("milliseconds"),Wa=Ya("seconds"),Ga=Ya("minutes"),qa=Ya("hours"),Xa=Ya("days"),Ka=Ya("months"),Qa=Ya("years");function $a(){return Me(this.days()/7)}var Ja=Math.round,er={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function tr(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}function nr(e,t,n,s){var i=Ss(e).abs(),a=Ja(i.as("s")),r=Ja(i.as("m")),o=Ja(i.as("h")),l=Ja(i.as("d")),c=Ja(i.as("M")),d=Ja(i.as("w")),u=Ja(i.as("y")),p=a<=n.ss&&["s",a]||a0,p[4]=s,tr.apply(null,p)}function sr(e){return void 0===e?Ja:"function"===typeof e&&(Ja=e,!0)}function ir(e,t){return void 0!==er[e]&&(void 0===t?er[e]:(er[e]=t,"s"===e&&(er.ss=t-1),!0))}function ar(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,s,i=!1,a=er;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(a=Object.assign({},er,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),s=nr(this,!i,a,n=this.localeData()),i&&(s=n.pastFuture(+this,s)),n.postformat(s)}var rr=Math.abs;function or(e){return(e>0)-(e<0)||+e}function lr(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,i,a,r,o,l=rr(this._milliseconds)/1e3,c=rr(this._days),d=rr(this._months),u=this.asSeconds();return u?(e=Me(l/60),t=Me(e/60),l%=60,e%=60,n=Me(d/12),d%=12,s=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=u<0?"-":"",a=or(this._months)!==or(u)?"-":"",r=or(this._days)!==or(u)?"-":"",o=or(this._milliseconds)!==or(u)?"-":"",i+"P"+(n?a+n+"Y":"")+(d?a+d+"M":"")+(c?r+c+"D":"")+(t||e||l?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(l?o+s+"S":"")):"P0D"}var cr=rs.prototype;return cr.isValid=is,cr.abs=ya,cr.add=ka,cr.subtract=_a,cr.as=Ma,cr.asMilliseconds=Ea,cr.asSeconds=Fa,cr.asMinutes=Ra,cr.asHours=Pa,cr.asDays=Oa,cr.asWeeks=Da,cr.asMonths=Ia,cr.asQuarters=Ba,cr.asYears=Ha,cr.valueOf=Za,cr._bubble=La,cr.clone=Va,cr.get=za,cr.milliseconds=Ua,cr.seconds=Wa,cr.minutes=Ga,cr.hours=qa,cr.days=Xa,cr.weeks=$a,cr.months=Ka,cr.years=Qa,cr.humanize=ar,cr.toISOString=lr,cr.toString=lr,cr.toJSON=lr,cr.locale=ri,cr.localeData=li,cr.toIsoString=_("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lr),cr.lang=oi,H("X",0,0,"unix"),H("x",0,0,"valueOf"),Ne("x",ve),Ne("X",ye),Fe("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),Fe("x",function(e,t,n){n._d=new Date(Te(e))}),s.version="2.30.1",i(Xn),s.fn=la,s.min=Jn,s.max=es,s.now=ts,s.utc=x,s.unix=ca,s.months=ma,s.isDate=u,s.locale=fn,s.invalid=b,s.duration=Ss,s.isMoment=j,s.weekdays=ba,s.parseZone=da,s.localeData=bn,s.isDuration=os,s.monthsShort=ga,s.weekdaysMin=wa,s.defineLocale=mn,s.updateLocale=gn,s.locales=vn,s.weekdaysShort=va,s.normalizeUnits=ne,s.relativeTimeRounding=sr,s.relativeTimeThreshold=ir,s.calendarFormat=Zs,s.prototype=la,s.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},s}()},5917:(e,t,n)=>{"use strict";e.exports=n(5484)},5992:(e,t,n)=>{var s,i=Object.create,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,s)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let i of o(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(s=r(t,i))||s.enumerable});return e},u=(e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)),p={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(p,{callPlayer:()=>T,getConfig:()=>A,getSDK:()=>S,isBlobUrl:()=>F,isMediaStream:()=>E,lazy:()=>m,omit:()=>M,parseEndTime:()=>j,parseStartTime:()=>y,queryString:()=>_,randomString:()=>k,supportsWebKitPresentationMode:()=>R}),e.exports=(s=p,d(a({},"__esModule",{value:!0}),s));var h=u(n(5917)),x=u(n(8734)),f=u(n(3419));const m=e=>h.default.lazy(async()=>{const t=await e();return"function"===typeof t.default?t:t.default}),g=/[?&#](?:start|t)=([0-9hms]+)/,b=/[?&#]end=([0-9hms]+)/,v=/(\d+)(h|m|s)/g,w=/^\d+$/;function C(e,t){if(e instanceof Array)return;const n=e.match(t);if(n){const e=n[1];if(e.match(v))return function(e){let t=0,n=v.exec(e);for(;null!==n;){const[,s,i]=n;"h"===i&&(t+=60*parseInt(s,10)*60),"m"===i&&(t+=60*parseInt(s,10)),"s"===i&&(t+=parseInt(s,10)),n=v.exec(e)}return t}(e);if(w.test(e))return parseInt(e)}}function y(e){return C(e,g)}function j(e){return C(e,b)}function k(){return Math.random().toString(36).substr(2,5)}function _(e){return Object.keys(e).map(t=>"".concat(t,"=").concat(e[t])).join("&")}function N(e){return window[e]?window[e]:window.exports&&window.exports[e]?window.exports[e]:window.module&&window.module.exports&&window.module.exports[e]?window.module.exports[e]:null}const L={},S=function(e){0;return e}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>!0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:x.default;const a=N(t);return a&&s(a)?Promise.resolve(a):new Promise((s,a)=>{if(L[e])return void L[e].push({resolve:s,reject:a});L[e]=[{resolve:s,reject:a}];const r=t=>{L[e].forEach(e=>e.resolve(t))};if(n){const e=window[n];window[n]=function(){e&&e(),r(N(t))}}i(e,s=>{s?(L[e].forEach(e=>e.reject(s)),L[e]=null):n||r(N(t))})})});function A(e,t){return(0,f.default)(t.config,e.config)}function M(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s1?t-1:0),s=1;s0&&void 0!==arguments[0]?arguments[0]:document.createElement("video");const t=!1===/iPhone|iPod/.test(navigator.userAgent);return e.webkitSupportsPresentationMode&&"function"===typeof e.webkitSetPresentationMode&&t}},6060:(e,t,n)=>{var s,i=n(2897).default,a=Object.create,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,c=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,u=(e,t,n,s)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let i of l(t))d.call(e,i)||i===n||r(e,i,{get:()=>t[i],enumerable:!(s=o(t,i))||s.enumerable});return e},p=(e,t,n)=>(n=null!=e?a(c(e)):{},u(!t&&e&&e.__esModule?n:r(n,"default",{value:e,enumerable:!0}),e)),h=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!==typeof t?t+"":t,n),n),x={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(x,{default:()=>v}),e.exports=(s=x,u(r({},"__esModule",{value:!0}),s));var f=p(n(5917)),m=p(n(208)),g=n(6627),b=n(5992);class v extends f.Component{constructor(){var e;super(...arguments),e=this,h(this,"mounted",!1),h(this,"isReady",!1),h(this,"isPlaying",!1),h(this,"isLoading",!0),h(this,"loadOnReady",null),h(this,"startOnPlay",!0),h(this,"seekOnPlay",null),h(this,"onDurationCalled",!1),h(this,"handlePlayerMount",e=>{this.player||(this.player=e,this.player.load(this.props.url)),this.progress()}),h(this,"getInternalPlayer",e=>this.player?this.player[e]:null),h(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){const e=this.getCurrentTime()||0,t=this.getSecondsLoaded(),n=this.getDuration();if(n){const s={playedSeconds:e,played:e/n};null!==t&&(s.loadedSeconds=t,s.loaded=t/n),s.playedSeconds===this.prevPlayed&&s.loadedSeconds===this.prevLoaded||this.props.onProgress(s),this.prevPlayed=s.playedSeconds,this.prevLoaded=s.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),h(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:e,playing:t,volume:n,muted:s}=this.props;e(),s||null===n||this.player.setVolume(n),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):t&&this.player.play(),this.handleDurationCheck()}),h(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:e,onPlay:t,playbackRate:n}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&1!==n&&this.player.setPlaybackRate(n),e(),this.startOnPlay=!1),t(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),h(this,"handlePause",e=>{this.isPlaying=!1,this.isLoading||this.props.onPause(e)}),h(this,"handleEnded",()=>{const{activePlayer:e,loop:t,onEnded:n}=this.props;e.loopOnEnded&&t&&this.seekTo(0),t||(this.isPlaying=!1,n())}),h(this,"handleError",function(){e.isLoading=!1,e.props.onError(...arguments)}),h(this,"handleDurationCheck",()=>{clearTimeout(this.durationCheckTimeout);const e=this.getDuration();e?this.onDurationCalled||(this.props.onDuration(e),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)}),h(this,"handleLoaded",()=>{this.isLoading=!1})}componentDidMount(){this.mounted=!0}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}componentDidUpdate(e){if(!this.player)return;const{url:t,playing:n,volume:s,muted:i,playbackRate:a,pip:r,loop:o,activePlayer:l,disableDeferredLoading:c}=this.props;if(!(0,m.default)(e.url,t)){if(this.isLoading&&!l.forceLoad&&!c&&!(0,b.isMediaStream)(t))return console.warn("ReactPlayer: the attempt to load ".concat(t," is being deferred until the player has loaded")),void(this.loadOnReady=t);this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(t,this.isReady)}e.playing||!n||this.isPlaying||this.player.play(),e.playing&&!n&&this.isPlaying&&this.player.pause(),!e.pip&&r&&this.player.enablePIP&&this.player.enablePIP(),e.pip&&!r&&this.player.disablePIP&&this.player.disablePIP(),e.volume!==s&&null!==s&&this.player.setVolume(s),e.muted!==i&&(i?this.player.mute():(this.player.unmute(),null!==s&&setTimeout(()=>this.player.setVolume(s)))),e.playbackRate!==a&&this.player.setPlaybackRate&&this.player.setPlaybackRate(a),e.loop!==o&&this.player.setLoop&&this.player.setLoop(o)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(e,t,n){if(!this.isReady)return void(0!==e&&(this.seekOnPlay=e,setTimeout(()=>{this.seekOnPlay=null},5e3)));if(t?"fraction"===t:e>0&&e<1){const t=this.player.getDuration();return t?void this.player.seekTo(t*e,n):void console.warn("ReactPlayer: could not seek using fraction \u2013\xa0duration not yet available")}this.player.seekTo(e,n)}render(){const e=this.props.activePlayer;return e?f.default.createElement(e,i(i({},this.props),{},{onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError})):null}}h(v,"displayName","Player"),h(v,"propTypes",g.propTypes),h(v,"defaultProps",g.defaultProps)},6149:()=>{},6234:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n{function t(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},6519:(e,t,n)=>{"use strict";n.d(t,{A:()=>ie});var s=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?d(w,--b):0,m--,10===v&&(m=1,f--),v}function k(){return v=b2||S(v)>3?"":" "}function F(e,t){for(;--t&&k()&&!(v<48||v>102||v>57&&v<65||v>70&&v<97););return L(e,N()+(t<6&&32==_()&&32==k()))}function R(e){for(;k();)switch(v){case e:return b;case 34:case 39:34!==e&&39!==e&&R(v);break;case 40:41===e&&R(e);break;case 92:k()}return b}function P(e,t){for(;k()&&e+v!==57&&(e+v!==84||47!==_()););return"/*"+L(t,b-1)+"*"+a(47===e?e:k())}function O(e){for(;!S(_());)k();return L(e,b)}var D="-ms-",I="-moz-",B="-webkit-",H="comm",Z="rule",V="decl",z="@keyframes";function Y(e,t){for(var n="",s=h(e),i=0;i0&&p(I)-g&&x(v>32?K(I+";",s,n,g-1):K(l(I," ","")+";",s,n,g-2),h);break;case 59:I+=";";default:if(x(D=q(I,t,n,f,m,i,u,A,M=[],R=[],g),r),123===S)if(0===m)G(I,t,D,D,M,r,g,u,R);else switch(99===b&&110===d(I,3)?100:b){case 100:case 108:case 109:case 115:G(e,D,D,s&&x(q(e,D,D,0,0,i,u,A,i,M=[],g),R),i,R,g,u,s?M:R);break;default:G(I,D,D,D,[""],R,0,u,R)}}f=m=v=0,C=L=1,A=I="",g=o;break;case 58:g=1+p(I),v=w;default:if(C<1)if(123==S)--C;else if(125==S&&0==C++&&125==j())continue;switch(I+=a(S),S*C){case 38:L=m>0?1:(I+="\f",-1);break;case 44:u[f++]=(p(I)-1)*L,L=1;break;case 64:45===_()&&(I+=T(k())),b=_(),m=g=p(A=I+=O(N())),S++;break;case 45:45===w&&2==p(I)&&(C=0)}}return r}function q(e,t,n,s,a,r,c,d,p,x,f){for(var m=a-1,g=0===a?r:[""],b=h(g),v=0,w=0,y=0;v0?g[j]+" "+k:l(k,/&\f/g,g[j])))&&(p[y++]=_);return C(e,t,n,0===a?Z:d,p,x,f)}function X(e,t,n){return C(e,t,n,H,a(v),u(e,2,-2),0)}function K(e,t,n,s){return C(e,t,n,V,u(e,0,s),u(e,s+1,-1),s)}var Q=function(e,t,n){for(var s=0,i=0;s=i,i=_(),38===s&&12===i&&(t[n]=1),!S(i);)k();return L(e,b)},$=function(e,t){return M(function(e,t){var n=-1,s=44;do{switch(S(s)){case 0:38===s&&12===_()&&(t[n]=1),e[n]+=Q(b-1,t,n);break;case 2:e[n]+=T(s);break;case 4:if(44===s){e[++n]=58===_()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=a(s)}}while(s=k());return e}(A(e),t))},J=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,s=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||J.get(n))&&!s){J.set(e,!0);for(var i=[],a=$(t,i),r=n.props,o=0,l=0;o6)switch(d(e,t+1)){case 109:if(45!==d(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+I+(108==d(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==d(e,t+1))break;case 6444:switch(d(e,p(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+B)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===d(e,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+D+"$2box$3")+e}break;case 5936:switch(d(e,t+11)){case 114:return B+e+D+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+D+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+D+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+D+e+e}return e}var se=[function(e,t,n,s){if(e.length>-1&&!e.return)switch(e.type){case V:e.return=ne(e.value,e.length);break;case z:return Y([y(e,{value:l(e.value,"@","@"+B)})],s);case Z:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Y([y(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],s);case"::placeholder":return Y([y(e,{props:[l(t,/:(plac\w+)/,":"+B+"input-$1")]}),y(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),y(e,{props:[l(t,/:(plac\w+)/,D+"input-$1")]})],s)}return""})}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var i,a,r=e.stylisPlugins||se,o={},l=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n{var s,i=Object.create,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,s)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let i of o(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(s=r(t,i))||s.enumerable});return e},u={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(u,{defaultProps:()=>k,propTypes:()=>y}),e.exports=(s=u,d(a({},"__esModule",{value:!0}),s));var p=((e,t,n)=>(n=null!=e?i(l(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)))(n(8087));const{string:h,bool:x,number:f,array:m,oneOfType:g,shape:b,object:v,func:w,node:C}=p.default,y={url:g([h,m,v]),playing:x,loop:x,controls:x,volume:f,muted:x,playbackRate:f,width:g([h,f]),height:g([h,f]),style:v,progressInterval:f,playsinline:x,pip:x,stopOnUnmount:x,light:g([x,h,v]),playIcon:C,previewTabIndex:f,previewAriaLabel:h,fallback:C,oEmbedUrl:h,wrapper:g([h,w,b({render:w.isRequired})]),config:b({soundcloud:b({options:v}),youtube:b({playerVars:v,embedOptions:v,onUnstarted:w}),facebook:b({appId:h,version:h,playerId:h,attributes:v}),dailymotion:b({params:v}),vimeo:b({playerOptions:v,title:h}),mux:b({attributes:v,version:h}),file:b({attributes:v,tracks:m,forceVideo:x,forceAudio:x,forceHLS:x,forceSafariHLS:x,forceDisableHls:x,forceDASH:x,forceFLV:x,hlsOptions:v,hlsVersion:h,dashVersion:h,flvVersion:h}),wistia:b({options:v,playerId:h,customControls:m}),mixcloud:b({options:v}),twitch:b({options:v,playerId:h}),vidyard:b({options:v})}),onReady:w,onStart:w,onPlay:w,onPause:w,onBuffer:w,onBufferEnd:w,onEnded:w,onError:w,onDuration:w,onSeek:w,onPlaybackRateChange:w,onPlaybackQualityChange:w,onProgress:w,onClickPreview:w,onEnablePIP:w,onDisablePIP:w},j=()=>{},k={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,previewAriaLabel:"",oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:j},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},mux:{attributes:{},version:"2"},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:j,onStart:j,onPlay:j,onPause:j,onBuffer:j,onBufferEnd:j,onEnded:j,onError:j,onDuration:j,onSeek:j,onPlaybackRateChange:j,onPlaybackQualityChange:j,onProgress:j,onClickPreview:j,onEnablePIP:j,onDisablePIP:j}},6668:(e,t,n)=>{var s=n(1756);e.exports=function(e,t){return e.get(s(e,t))},e.exports.__esModule=!0,e.exports.default=e.exports},7088:(e,t,n)=>{var s=n(1756);e.exports=function(e,t,n){return e.set(s(e,t),n),n},e.exports.__esModule=!0,e.exports.default=e.exports},7101:e=>{e.exports=function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")},e.exports.__esModule=!0,e.exports.default=e.exports},7119:(module,__unused_webpack_exports,__webpack_require__)=>{var _objectSpread=__webpack_require__(2897).default,_defineProperty=__webpack_require__(3693).default,_classPrivateMethodInitSpec=__webpack_require__(3312).default,_classPrivateFieldInitSpec=__webpack_require__(2459).default,_classPrivateFieldSet=__webpack_require__(7088).default,_classPrivateFieldGet=__webpack_require__(6668).default,_assertClassBrand=__webpack_require__(1756).default,factory;globalThis,factory=()=>(()=>{"use strict";var __webpack_modules__=[,(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.UNSUPPORTED_FEATURES=t.TextRenderingMode=t.StreamType=t.RenderingIntentFlag=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.LINE_FACTOR=t.LINE_DESCENT_FACTOR=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FontType=t.FeatureTest=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMode=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationEditorType=t.AnnotationEditorPrefix=t.AnnotationEditorParamsType=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.arrayByteLength=d,t.arraysToBytes=function(e){const t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];let n=0;for(let a=0;at}),e.promise=new Promise(function(n,s){e.resolve=function(e){t=!0,n(e)},e.reject=function(e){t=!0,s(e)}}),e},t.createValidAbsoluteUrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;try{if(n&&"string"===typeof e){if(n.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);t&&t.length>=2&&(e="http://".concat(e))}if(n.tryConvertEncoding)try{e=x(e)}catch(s){}}const i=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(i))return i}catch(s){}return null},t.escapeString=function(e){return e.replace(/([()\\\n\r])/g,e=>"\n"===e?"\\n":"\r"===e?"\\r":"\\".concat(e))},t.getModificationDate=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")},t.getVerbosityLevel=function(){return i},t.info=function(e){i>=s.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===typeof e&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(let n=0,s=e.length;n>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=c,t.stringToPDFString=function(e){if(e[0]>="\xef"){let t;if("\xfe"===e[0]&&"\xff"===e[1]?t="utf-16be":"\xff"===e[0]&&"\xfe"===e[1]?t="utf-16le":"\xef"===e[0]&&"\xbb"===e[1]&&"\xbf"===e[2]&&(t="utf-8"),t)try{const n=new TextDecoder(t,{fatal:!0}),s=c(e);return n.decode(s)}catch(n){a('stringToPDFString: "'.concat(n,'".'))}}const t=[];for(let s=0,i=e.length;s>8&255),String.fromCharCode(255&s))}return t.join("")},t.stringToUTF8String=x,t.unreachable=r,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=a,n(2),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.LINE_FACTOR=1.35,t.LINE_DESCENT_FACTOR=.35,t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},t.AnnotationEditorPrefix="pdfjs_internal_editor_",t.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,INK:15},t.AnnotationEditorParamsType={FREETEXT_SIZE:1,FREETEXT_COLOR:2,FREETEXT_OPACITY:3,INK_COLOR:11,INK_THICKNESS:12,INK_OPACITY:13},t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"},t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};const s={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=s,t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",signatures:"signatures",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontBuildPath:"errorFontBuildPath",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent",errorContentSubStream:"errorContentSubStream"},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let i=s.WARNINGS;function a(e){i>=s.WARNINGS&&console.log("Warning: ".concat(e))}function r(e){throw new Error(e)}function o(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!1}),n}const l=function(){function e(t,n){this.constructor===e&&r("Cannot initialize BaseException."),this.message=t,this.name=n}return e.prototype=new Error,e.constructor=e,e}();function c(e){"string"!==typeof e&&r("Invalid argument for stringToBytes");const t=e.length,n=new Uint8Array(t);for(let s=0;se.toString(16).padStart(2,"0"));class p{static makeHexColor(e,t,n){return"#".concat(u[e]).concat(u[t]).concat(u[n])}static scaleMinMax(e,t){let n;e[0]?(e[0]<0&&(n=t[0],t[0]=t[1],t[1]=n),t[0]*=e[0],t[1]*=e[0],e[3]<0&&(n=t[2],t[2]=t[3],t[3]=n),t[2]*=e[3],t[3]*=e[3]):(n=t[0],t[0]=t[2],t[2]=n,n=t[1],t[1]=t[3],t[3]=n,e[1]<0&&(n=t[2],t[2]=t[3],t[3]=n),t[2]*=e[1],t[3]*=e[1],e[2]<0&&(n=t[0],t[0]=t[1],t[1]=n),t[0]*=e[2],t[1]*=e[2]),t[0]+=e[4],t[1]+=e[4],t[2]+=e[5],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const n=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/n,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/n]}static getAxialAlignedBoundingBox(e,t){const n=p.applyTransform(e,t),s=p.applyTransform(e.slice(2,4),t),i=p.applyTransform([e[0],e[3]],t),a=p.applyTransform([e[2],e[1]],t);return[Math.min(n[0],s[0],i[0],a[0]),Math.min(n[1],s[1],i[1],a[1]),Math.max(n[0],s[0],i[0],a[0]),Math.max(n[1],s[1],i[1],a[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static apply3dTransform(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],n=e[0]*t[0]+e[1]*t[2],s=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],r=(n+a)/2,o=Math.sqrt((n+a)**2-4*(n*a-i*s))/2,l=r+o||1,c=r-o||1;return[Math.sqrt(l),Math.sqrt(c)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const n=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),s=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(n>s)return null;const i=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),a=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return i>a?null:[n,i,s,a]}static bezierBoundingBox(e,t,n,s,i,a,r,o){const l=[],c=[[],[]];let d,u,p,h,x,f,m,g;for(let C=0;C<2;++C)if(0===C?(u=6*e-12*n+6*i,d=-3*e+9*n-9*i+3*r,p=3*n-3*e):(u=6*t-12*s+6*a,d=-3*t+9*s-9*a+3*o,p=3*s-3*t),Math.abs(d)<1e-12){if(Math.abs(u)<1e-12)continue;h=-p/u,0{n(3)},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;const n="object"===typeof process&&process+""==="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=n},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(5),_display_utils=__w_pdfjs_require__(8),_font_loader=__w_pdfjs_require__(11),_canvas=__w_pdfjs_require__(12),_worker_options=__w_pdfjs_require__(15),_is_node=__w_pdfjs_require__(3),_message_handler=__w_pdfjs_require__(16),_metadata=__w_pdfjs_require__(17),_optional_content_config=__w_pdfjs_require__(18),_transport_stream=__w_pdfjs_require__(19),_xfa_text=__w_pdfjs_require__(20);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100;let DefaultCanvasFactory=_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;let DefaultCMapReaderFactory=_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;let DefaultStandardFontDataFactory=_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream;if(exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory,_is_node.isNodeJS){const{NodeCanvasFactory:e,NodeCMapReaderFactory:t,NodeStandardFontDataFactory:n}=__w_pdfjs_require__(21);exports.DefaultCanvasFactory=DefaultCanvasFactory=e,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=t,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=n}function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){const t=new PDFDocumentLoadingTask;let n;if("string"===typeof e||e instanceof URL)n={url:e};else if((0,_util.isArrayBuffer)(e))n={data:e};else if(e instanceof PDFDataRangeTransport)n={range:e};else{if("object"!==typeof e)throw new Error("Invalid parameter in getDocument, need either string, URL, TypedArray, or parameter object.");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");n=e}const s=Object.create(null);let i=null,a=null;for(const l in n){const e=n[l];switch(l){case"url":if("undefined"!==typeof window)try{s[l]=new URL(e,window.location).href;continue}catch(o){(0,_util.warn)('Cannot create valid URL: "'.concat(o,'".'))}else if("string"===typeof e||e instanceof URL){s[l]=e.toString();continue}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":i=e;continue;case"worker":a=e;continue;case"data":if(_is_node.isNodeJS&&"undefined"!==typeof Buffer&&e instanceof Buffer)s[l]=new Uint8Array(e);else{if(e instanceof Uint8Array)break;if("string"===typeof e)s[l]=(0,_util.stringToBytes)(e);else if("object"!==typeof e||null===e||isNaN(e.length)){if(!(0,_util.isArrayBuffer)(e))throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.");s[l]=new Uint8Array(e)}else s[l]=new Uint8Array(e)}continue}s[l]=e}if(s.CMapReaderFactory=s.CMapReaderFactory||DefaultCMapReaderFactory,s.StandardFontDataFactory=s.StandardFontDataFactory||DefaultStandardFontDataFactory,s.ignoreErrors=!0!==s.stopAtErrors,s.fontExtraProperties=!0===s.fontExtraProperties,s.pdfBug=!0===s.pdfBug,s.enableXfa=!0===s.enableXfa,(!Number.isInteger(s.rangeChunkSize)||s.rangeChunkSize<1)&&(s.rangeChunkSize=DEFAULT_RANGE_CHUNK_SIZE),("string"!==typeof s.docBaseUrl||(0,_display_utils.isDataScheme)(s.docBaseUrl))&&(s.docBaseUrl=null),(!Number.isInteger(s.maxImageSize)||s.maxImageSize<-1)&&(s.maxImageSize=-1),"string"!==typeof s.cMapUrl&&(s.cMapUrl=null),"string"!==typeof s.standardFontDataUrl&&(s.standardFontDataUrl=null),"boolean"!==typeof s.useWorkerFetch&&(s.useWorkerFetch=s.CMapReaderFactory===_display_utils.DOMCMapReaderFactory&&s.StandardFontDataFactory===_display_utils.DOMStandardFontDataFactory),"boolean"!==typeof s.isEvalSupported&&(s.isEvalSupported=!0),"boolean"!==typeof s.disableFontFace&&(s.disableFontFace=_is_node.isNodeJS),"boolean"!==typeof s.useSystemFonts&&(s.useSystemFonts=!_is_node.isNodeJS&&!s.disableFontFace),"object"===typeof s.ownerDocument&&null!==s.ownerDocument||(s.ownerDocument=globalThis.document),"boolean"!==typeof s.disableRange&&(s.disableRange=!1),"boolean"!==typeof s.disableStream&&(s.disableStream=!1),"boolean"!==typeof s.disableAutoFetch&&(s.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(s.verbosity),!a){const e={verbosity:s.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};a=e.port?PDFWorker.fromPort(e):new PDFWorker(e),t._worker=a}const r=t.docId;return a.promise.then(function(){if(t.destroyed)throw new Error("Loading aborted");const e=_fetchDocument(a,s,i,r),n=new Promise(function(e){let t;i?t=new _transport_stream.PDFDataTransportStream({length:s.length,initialData:s.initialData,progressiveDone:s.progressiveDone,contentDispositionFilename:s.contentDispositionFilename,disableRange:s.disableRange,disableStream:s.disableStream},i):s.data||(t=createPDFNetworkStream({url:s.url,length:s.length,httpHeaders:s.httpHeaders,withCredentials:s.withCredentials,rangeChunkSize:s.rangeChunkSize,disableRange:s.disableRange,disableStream:s.disableStream})),e(t)});return Promise.all([e,n]).then(function(e){let[n,i]=e;if(t.destroyed)throw new Error("Loading aborted");const o=new _message_handler.MessageHandler(r,n,a.port),l=new WorkerTransport(o,t,i,s);t._transport=l,o.send("Ready",null)})}).catch(t._capability.reject),t}async function _fetchDocument(e,t,n,s){if(e.destroyed)throw new Error("Worker was destroyed");n&&(t.length=n.length,t.initialData=n.initialData,t.progressiveDone=n.progressiveDone,t.contentDispositionFilename=n.contentDispositionFilename);const i=await e.messageHandler.sendWithPromise("GetDocRequest",{docId:s,apiVersion:"2.16.105",source:{data:t.data,url:t.url,password:t.password,disableAutoFetch:t.disableAutoFetch,rangeChunkSize:t.rangeChunkSize,length:t.length},maxImageSize:t.maxImageSize,disableFontFace:t.disableFontFace,docBaseUrl:t.docBaseUrl,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported,fontExtraProperties:t.fontExtraProperties,enableXfa:t.enableXfa,useSystemFonts:t.useSystemFonts,cMapUrl:t.useWorkerFetch?t.cMapUrl:null,standardFontDataUrl:t.useWorkerFetch?t.standardFontDataUrl:null});if(t.data&&(t.data=null),e.destroyed)throw new Error("Worker was destroyed");return i}class PDFDocumentLoadingTask{constructor(){var e,t;this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d".concat((_docId._=(e=_docId._,t=e++,e),t)),this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}get promise(){return this._capability.promise}async destroy(){var e;this.destroyed=!0,await(null===(e=this._transport)||void 0===e?void 0:e.destroy()),this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}var _docId={_:0};exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.length=e,this.initialData=t,this.progressiveDone=n,this.contentDispositionFilename=s,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const n of this._rangeListeners)n(e,t)}onDataProgress(e,t){this._readyCapability.promise.then(()=>{for(const n of this._progressListeners)n(e,t)})}onDataProgressiveRead(e){this._readyCapability.promise.then(()=>{for(const t of this._progressiveReadListeners)t(e)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const e of this._progressiveDoneListeners)e()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(e,t){this._pdfInfo=e,this._transport=t,Object.defineProperty(this,"fingerprint",{get(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, please use `PDFDocumentProxy.fingerprints` instead."),this.fingerprints[0]}}),Object.defineProperty(this,"getStats",{value:async()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getStats`, please use the `PDFDocumentProxy.stats`-getter instead."),this.stats||{streamTypes:{},fontTypes:{}})})}get annotationStorage(){return this._transport.annotationStorage}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get stats(){return this._transport.stats}get isPureXfa(){return!!this._transport._htmlForXfa}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJavaScript(){return this._transport.getJavaScript()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}saveDocument(){return this._transport.annotationStorage.size<=0&&(0,_display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this._transport.saveDocument()}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(e,t,n,s){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this._pageIndex=e,this._pageInfo=t,this._ownerDocument=s,this._transport=n,this._stats=i?new _display_utils.StatTimer:null,this._pdfBug=i,this.commonObjs=n.commonObjs,this.objs=new PDFObjects,this._bitmaps=new Set,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this._annotationPromises=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport(){let{scale:e,rotation:t=this.rotate,offsetX:n=0,offsetY:s=0,dontFlip:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:n,offsetY:s,dontFlip:i})}getAnnotations(){let{intent:e="display"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this._transport.getRenderingIntent(e);let n=this._annotationPromises.get(t.cacheKey);return n||(n=this._transport.getAnnotations(this._pageIndex,t.renderingIntent),this._annotationPromises.set(t.cacheKey,n),n=n.then(e=>{for(const t of e)void 0!==t.titleObj&&Object.defineProperty(t,"title",{get:()=>((0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead."),t.titleObj.str)}),void 0!==t.contentsObj&&Object.defineProperty(t,"contents",{get:()=>((0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead."),t.contentsObj.str)});return e})),n}getJSActions(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}async getXfa(){var e;return(null===(e=this._transport._htmlForXfa)||void 0===e?void 0:e.children[this._pageIndex])||null}render(e){var t,n,s;let{canvasContext:i,viewport:a,intent:r="display",annotationMode:o=_util.AnnotationMode.ENABLE,transform:l=null,imageLayer:c=null,canvasFactory:d=null,background:u=null,optionalContentConfigPromise:p=null,annotationCanvasMap:h=null,pageColors:x=null,printAnnotationStorage:f=null}=e;void 0!==(null===(t=arguments[0])||void 0===t?void 0:t.renderInteractiveForms)&&((0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead."),!0===arguments[0].renderInteractiveForms&&o===_util.AnnotationMode.ENABLE&&(o=_util.AnnotationMode.ENABLE_FORMS)),void 0!==(null===(n=arguments[0])||void 0===n?void 0:n.includeAnnotationStorage)&&((0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead."),!0===arguments[0].includeAnnotationStorage&&o===_util.AnnotationMode.ENABLE&&(o=_util.AnnotationMode.ENABLE_STORAGE)),this._stats&&this._stats.time("Overall");const m=this._transport.getRenderingIntent(r,o,f);this.pendingCleanup=!1,p||(p=this._transport.getOptionalContentConfig());let g=this._intentStates.get(m.cacheKey);g||(g=Object.create(null),this._intentStates.set(m.cacheKey,g)),g.streamReaderCancelTimeout&&(clearTimeout(g.streamReaderCancelTimeout),g.streamReaderCancelTimeout=null);const b=d||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),v=!!(m.renderingIntent&_util.RenderingIntentFlag.PRINT);g.displayReadyCapability||(g.displayReadyCapability=(0,_util.createPromiseCapability)(),g.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(m));const w=e=>{g.renderTasks.delete(C),(this.cleanupAfterRender||v)&&(this.pendingCleanup=!0),this._tryCleanup(),e?(C.capability.reject(e),this._abortOperatorList({intentState:g,reason:e instanceof Error?e:new Error(e)})):C.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"))},C=new InternalRenderTask({callback:w,params:{canvasContext:i,viewport:a,transform:l,imageLayer:c,background:u},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:h,operatorList:g.operatorList,pageIndex:this._pageIndex,canvasFactory:b,useRequestAnimationFrame:!v,pdfBug:this._pdfBug,pageColors:x});((s=g).renderTasks||(s.renderTasks=new Set)).add(C);const y=C.task;return Promise.all([g.displayReadyCapability.promise,p]).then(e=>{let[t,n]=e;this.pendingCleanup?w():(this._stats&&this._stats.time("Rendering"),C.initializeGraphics({transparency:t,optionalContentConfig:n}),C.operatorListChanged())}).catch(w),y}getOperatorList(){let{intent:e="display",annotationMode:t=_util.AnnotationMode.ENABLE,printAnnotationStorage:n=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=this._transport.getRenderingIntent(e,t,n,!0);let i,a=this._intentStates.get(s.cacheKey);var r;return a||(a=Object.create(null),this._intentStates.set(s.cacheKey,a)),a.opListReadCapability||(i=Object.create(null),i.operatorListChanged=function(){a.operatorList.lastChunk&&(a.opListReadCapability.resolve(a.operatorList),a.renderTasks.delete(i))},a.opListReadCapability=(0,_util.createPromiseCapability)(),((r=a).renderTasks||(r.renderTasks=new Set)).add(i),a.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(s)),a.opListReadCapability.promise}streamTextContent(){let{disableCombineTextItems:e=!1,includeMarkedContent:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,combineTextItems:!0!==e,includeMarkedContent:!0===t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(e=>_xfa_text.XfaText.textContent(e));const t=this.streamTextContent(e);return new Promise(function(e,n){const s=t.getReader(),i={items:[],styles:Object.create(null)};!function t(){s.read().then(function(n){let{value:s,done:a}=n;a?e(i):(Object.assign(i.styles,s.styles),i.items.push(...s.items),t())},n)}()})}getStructTree(){return this._structTreePromise||(this._structTreePromise=this._transport.getStructTree(this._pageIndex))}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const n of t.renderTasks)e.push(n.completed),n.cancel();this.objs.clear();for(const t of this._bitmaps)t.close();return this._bitmaps.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,this.pendingCleanup=!1,Promise.all(e)}cleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.pendingCleanup=!0,this._tryCleanup(e)}_tryCleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.pendingCleanup)return!1;for(const{renderTasks:t,operatorList:n}of this._intentStates.values())if(t.size>0||!n.lastChunk)return!1;this._intentStates.clear(),this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer);for(const t of this._bitmaps)t.close();return this._bitmaps.clear(),this.pendingCleanup=!1,!0}_startRenderPage(e,t){const n=this._intentStates.get(t);n&&(this._stats&&this._stats.timeEnd("Page Request"),n.displayReadyCapability&&n.displayReadyCapability.resolve(e))}_renderPageChunk(e,t){for(let n=0,s=e.length;n{i.read().then(e=>{let{value:t,done:n}=e;n?a.streamReader=null:this._transport.destroyed||(this._renderPageChunk(t,a),r())},e=>{if(a.streamReader=null,!this._transport.destroyed){if(a.operatorList){a.operatorList.lastChunk=!0;for(const e of a.renderTasks)e.operatorListChanged();this._tryCleanup()}if(a.displayReadyCapability)a.displayReadyCapability.reject(e);else{if(!a.opListReadCapability)throw e;a.opListReadCapability.reject(e)}}})};r()}_abortOperatorList(e){let{intentState:t,reason:n,force:s=!1}=e;if(t.streamReader){if(!s){if(t.renderTasks.size>0)return;if(n instanceof _display_utils.RenderingCancelledException)return void(t.streamReaderCancelTimeout=setTimeout(()=>{this._abortOperatorList({intentState:t,reason:n,force:!0}),t.streamReaderCancelTimeout=null},RENDERING_CANCELLED_TIMEOUT))}if(t.streamReader.cancel(new _util.AbortException(n.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[e,n]of this._intentStates)if(n===t){this._intentStates.delete(e);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){this._listeners=[],this._deferred=Promise.resolve()}postMessage(e,t){const n={data:structuredClone(e,t)};this._deferred.then(()=>{for(const e of this._listeners)e.call(this,n)})}addEventListener(e,t){this._listeners.push(t)}removeEventListener(e,t){const n=this._listeners.indexOf(t);this._listeners.splice(n,1)}terminate(){this._listeners.length=0}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_is_node.isNodeJS)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"===typeof document){var _document;const e=null===(_document=document)||void 0===_document||null===(_document=_document.currentScript)||void 0===_document?void 0:_document.src;e&&(PDFWorkerUtil.fallbackWorkerSrc=e.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(e,t){let n;try{if(n=new URL(e),!n.origin||"null"===n.origin)return!1}catch(i){return!1}const s=new URL(t,n);return n.origin===s.origin},PDFWorkerUtil.createCDNWrapper=function(e){const t='importScripts("'.concat(e,'");');return URL.createObjectURL(new Blob([t]))};class PDFWorker{constructor(){let{name:e=null,port:t=null,verbosity:n=(0,_util.getVerbosityLevel)()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t&&_workerPorts._.has(t))throw new Error("Cannot use more than one PDFWorker per port.");if(this.name=e,this.destroyed=!1,this.verbosity=n,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,t)return _workerPorts._.set(t,this),void this._initializeFromPort(t);this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:t}=PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,t)||(t=PDFWorkerUtil.createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t),n=new _message_handler.MessageHandler("main","worker",e),s=()=>{e.removeEventListener("error",i),n.destroy(),e.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},i=()=>{this._webWorker||s()};e.addEventListener("error",i),n.on("test",t=>{e.removeEventListener("error",i),this.destroyed?s():t?(this._messageHandler=n,this._port=e,this._webWorker=e,this._readyCapability.resolve(),n.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),n.destroy(),e.terminate())}),n.on("ready",t=>{if(e.removeEventListener("error",i),this.destroyed)s();else try{a()}catch(n){this._setupFakeWorker()}});const a=()=>{const e=new Uint8Array;n.send("test",e,[e.buffer])};return void a()}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then(e=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const t=new LoopbackPort;this._port=t;const n="fake".concat(PDFWorkerUtil.fakeWorkerId++),s=new _message_handler.MessageHandler(n+"_worker",n,t);e.setup(s,t);const i=new _message_handler.MessageHandler(n,n+"_worker",t);this._messageHandler=i,this._readyCapability.resolve(),i.send("configure",{verbosity:this.verbosity})}).catch(e=>{this._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(e.message,'".')))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),_workerPorts._.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(null===e||void 0===e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return _assertClassBrand(PDFWorker,this,_workerPorts)._.has(e.port)?_assertClassBrand(PDFWorker,this,_workerPorts)._.get(e.port):new PDFWorker(e)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{var e;return(null===(e=globalThis.pdfjsWorker)||void 0===e?void 0:e.WorkerMessageHandler)||null}catch(t){return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}var _workerPorts={_:new WeakMap};exports.PDFWorker=PDFWorker,PDFWorker.getWorkerSrc=function(){return(0,_display_utils.deprecated)("`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead."),this.workerSrc};var _docStats=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_metadataPromise=new WeakMap;class WorkerTransport{constructor(e,t,n,s){_classPrivateFieldInitSpec(this,_docStats,null),_classPrivateFieldInitSpec(this,_pageCache,new Map),_classPrivateFieldInitSpec(this,_pagePromises,new Map),_classPrivateFieldInitSpec(this,_metadataPromise,null),this.messageHandler=e,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:t.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:s.ownerDocument,styleElement:s.styleElement}),this._params=s,s.useWorkerFetch||(this.CMapReaderFactory=new s.CMapReaderFactory({baseUrl:s.cMapUrl,isCompressed:s.cMapPacked}),this.StandardFontDataFactory=new s.StandardFontDataFactory({baseUrl:s.standardFontDataUrl})),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}get stats(){return _classPrivateFieldGet(_docStats,this)}getRenderingIntent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=_util.RenderingIntentFlag.DISPLAY,a=null;switch(e){case"any":i=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":i=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(e))}switch(t){case _util.AnnotationMode.DISABLE:i+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:i+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:i+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,a=(i&_util.RenderingIntentFlag.PRINT&&n instanceof _annotation_storage.PrintAnnotationStorage?n:this.annotationStorage).serializable;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(t))}return s&&(i+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:i,cacheKey:"".concat(i,"_").concat(_annotation_storage.AnnotationStorage.getHash(a)),annotationStorageMap:a}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const n of _classPrivateFieldGet(_pageCache,this).values())e.push(n._destroy());_classPrivateFieldGet(_pageCache,this).clear(),_classPrivateFieldGet(_pagePromises,this).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),_classPrivateFieldSet(_metadataPromise,this,null),this._getFieldObjectsPromise=null,this._hasJSActionsPromise=null,this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",(e,t)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then(function(e){let{value:n,done:s}=e;s?t.close():((0,_util.assert)((0,_util.isArrayBuffer)(n),"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(n),1,[n]))}).catch(e=>{t.error(e)})},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch(e=>{if(!this.destroyed)throw e})}}),e.on("ReaderHeadersReady",e=>{const n=(0,_util.createPromiseCapability)(),s=this._fullReader;return s.headersReady.then(()=>{var e;s.isStreamingSupported&&s.isRangeSupported||(this._lastProgress&&(null===(e=t.onProgress)||void 0===e||e.call(t,this._lastProgress)),s.onProgress=e=>{var n;null===(n=t.onProgress)||void 0===n||n.call(t,{loaded:e.loaded,total:e.total})});n.resolve({isStreamingSupported:s.isStreamingSupported,isRangeSupported:s.isRangeSupported,contentLength:s.contentLength})},n.reject),n.promise}),e.on("GetRangeReader",(e,t)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const n=this._networkStream.getRangeReader(e.begin,e.end);n?(t.onPull=()=>{n.read().then(function(e){let{value:n,done:s}=e;s?t.close():((0,_util.assert)((0,_util.isArrayBuffer)(n),"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(n),1,[n]))}).catch(e=>{t.error(e)})},t.onCancel=e=>{n.cancel(e),t.ready.catch(e=>{if(!this.destroyed)throw e})}):t.close()}),e.on("GetDoc",e=>{let{pdfInfo:n}=e;this._numPages=n.numPages,this._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,t._capability.resolve(new PDFDocumentProxy(n,this))}),e.on("DocException",function(e){let n;switch(e.name){case"PasswordException":n=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":n=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":n=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":n=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":n=new _util.UnknownErrorException(e.message,e.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}t._capability.reject(n)}),e.on("PasswordRequest",e=>{if(this._passwordCapability=(0,_util.createPromiseCapability)(),t.onPassword){const s=e=>{e instanceof Error?this._passwordCapability.reject(e):this._passwordCapability.resolve({password:e})};try{t.onPassword(s,e.code)}catch(n){this._passwordCapability.reject(n)}}else this._passwordCapability.reject(new _util.PasswordException(e.message,e.code));return this._passwordCapability.promise}),e.on("DataLoaded",e=>{var n;null===(n=t.onProgress)||void 0===n||n.call(t,{loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)}),e.on("StartRenderPage",e=>{this.destroyed||_classPrivateFieldGet(_pageCache,this).get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)}),e.on("commonobj",t=>{var n;let[s,i,a]=t;if(!this.destroyed&&!this.commonObjs.has(s))switch(i){case"Font":const t=this._params;if("error"in a){const e=a.error;(0,_util.warn)("Error during font loading: ".concat(e)),this.commonObjs.resolve(s,e);break}let r=null;t.pdfBug&&null!==(n=globalThis.FontInspector)&&void 0!==n&&n.enabled&&(r={registerFont(e,t){globalThis.FontInspector.fontAdded(e,t)}});const o=new _font_loader.FontFaceObject(a,{isEvalSupported:t.isEvalSupported,disableFontFace:t.disableFontFace,ignoreErrors:t.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:r});this.fontLoader.bind(o).catch(t=>e.sendWithPromise("FontFallback",{id:s})).finally(()=>{!t.fontExtraProperties&&o.data&&(o.data=null),this.commonObjs.resolve(s,o)});break;case"FontPath":case"Image":this.commonObjs.resolve(s,a);break;default:throw new Error("Got unknown common object type ".concat(i))}}),e.on("obj",e=>{let[t,n,s,i]=e;if(this.destroyed)return;const a=_classPrivateFieldGet(_pageCache,this).get(n);if(!a.objs.has(t))switch(s){case"Image":a.objs.resolve(t,i);const e=8e6;if(i){let t;if(i.bitmap){const{bitmap:e,width:n,height:s}=i;t=n*s*4,a._bitmaps.add(e)}else{var r;t=(null===(r=i.data)||void 0===r?void 0:r.length)||0}t>e&&(a.cleanupAfterRender=!0)}break;case"Pattern":a.objs.resolve(t,i);break;default:throw new Error("Got unknown object type ".concat(s))}}),e.on("DocProgress",e=>{var n;this.destroyed||null===(n=t.onProgress)||void 0===n||n.call(t,{loaded:e.loaded,total:e.total})}),e.on("DocStats",e=>{this.destroyed||_classPrivateFieldSet(_docStats,this,Object.freeze({streamTypes:Object.freeze(e.streamTypes),fontTypes:Object.freeze(e.fontTypes)}))}),e.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),e.on("FetchBuiltInCMap",e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.CMapReaderFactory?this.CMapReaderFactory.fetch(e):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),e.on("FetchStandardFontData",e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.StandardFontDataFactory?this.StandardFontDataFactory.fetch(e):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}_onUnsupportedFeature(e){var t,n;let{featureId:s}=e;this.destroyed||null===(t=(n=this.loadingTask).onUnsupportedFeature)||void 0===t||t.call(n,s)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,n=_classPrivateFieldGet(_pagePromises,this).get(t);if(n)return n;const s=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then(e=>{if(this.destroyed)throw new Error("Transport destroyed");const n=new PDFPageProxy(t,e,this,this._params.ownerDocument,this._params.pdfBug);return _classPrivateFieldGet(_pageCache,this).set(t,n),n});return _classPrivateFieldGet(_pagePromises,this).set(t,s),s}getPageIndex(e){return"object"!==typeof e||null===e||!Number.isInteger(e.num)||e.num<0||!Number.isInteger(e.gen)||e.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen})}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}saveDocument(){var e,t;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:null!==(e=null===(t=this._fullReader)||void 0===t?void 0:t.filename)&&void 0!==e?e:null}).finally(()=>{this.annotationStorage.resetModified()})}getFieldObjects(){return this._getFieldObjectsPromise||(this._getFieldObjectsPromise=this.messageHandler.sendWithPromise("GetFieldObjects",null))}hasJSActions(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!==typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(e=>new _optional_content_config.OptionalContentConfig(e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){return _classPrivateFieldGet(_metadataPromise,this)||_classPrivateFieldSet(_metadataPromise,this,this.messageHandler.sendWithPromise("GetMetadata",null).then(e=>{var t,n,s,i;return{info:e[0],metadata:e[1]?new _metadata.Metadata(e[1]):null,contentDispositionFilename:null!==(t=null===(n=this._fullReader)||void 0===n?void 0:n.filename)&&void 0!==t?t:null,contentLength:null!==(s=null===(i=this._fullReader)||void 0===i?void 0:i.contentLength)&&void 0!==s?s:null}}))}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(await this.messageHandler.sendWithPromise("Cleanup",null),!this.destroyed){for(const e of _classPrivateFieldGet(_pageCache,this).values())if(!e.cleanup())throw new Error("startCleanup: Page ".concat(e.pageNumber," is currently rendering."));this.commonObjs.clear(),e||this.fontLoader.clear(),_classPrivateFieldSet(_metadataPromise,this,null),this._getFieldObjectsPromise=null,this._hasJSActionsPromise=null}}get loadingParams(){const e=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,enableXfa:e.enableXfa})}}var _objs=new WeakMap,_PDFObjects_brand=new WeakSet;class PDFObjects{constructor(){_classPrivateMethodInitSpec(this,_PDFObjects_brand),_classPrivateFieldInitSpec(this,_objs,Object.create(null))}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t){const n=_assertClassBrand(_PDFObjects_brand,this,_ensureObj).call(this,e);return n.capability.promise.then(()=>t(n.data)),null}const n=_classPrivateFieldGet(_objs,this)[e];if(null===n||void 0===n||!n.capability.settled)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return n.data}has(e){const t=_classPrivateFieldGet(_objs,this)[e];return(null===t||void 0===t?void 0:t.capability.settled)||!1}resolve(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=_assertClassBrand(_PDFObjects_brand,this,_ensureObj).call(this,e);n.data=t,n.capability.resolve()}clear(){_classPrivateFieldSet(_objs,this,Object.create(null))}}function _ensureObj(e){const t=_classPrivateFieldGet(_objs,this)[e];return t||(_classPrivateFieldGet(_objs,this)[e]={capability:(0,_util.createPromiseCapability)(),data:null})}var _internalRenderTask=new WeakMap;class RenderTask{constructor(e){_classPrivateFieldInitSpec(this,_internalRenderTask,null),_classPrivateFieldSet(_internalRenderTask,this,e),this.onContinue=null}get promise(){return _classPrivateFieldGet(_internalRenderTask,this).capability.promise}cancel(){_classPrivateFieldGet(_internalRenderTask,this).cancel()}get separateAnnots(){const{separateAnnots:e}=_classPrivateFieldGet(_internalRenderTask,this).operatorList;if(!e)return!1;const{annotationCanvasMap:t}=_classPrivateFieldGet(_internalRenderTask,this);return e.form||e.canvas&&(null===t||void 0===t?void 0:t.size)>0}}exports.RenderTask=RenderTask;class InternalRenderTask{constructor(e){let{callback:t,params:n,objs:s,commonObjs:i,annotationCanvasMap:a,operatorList:r,pageIndex:o,canvasFactory:l,useRequestAnimationFrame:c=!1,pdfBug:d=!1,pageColors:u=null}=e;this.callback=t,this.params=n,this.objs=s,this.commonObjs=i,this.annotationCanvasMap=a,this.operatorListIdx=null,this.operatorList=r,this._pageIndex=o,this.canvasFactory=l,this._pdfBug=d,this.pageColors=u,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===c&&"undefined"!==typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=n.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics(e){var t;let{transparency:n=!1,optionalContentConfig:s}=e;if(this.cancelled)return;if(this._canvas){if(_canvasInUse._.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");_canvasInUse._.add(this._canvas)}this._pdfBug&&null!==(t=globalThis.StepperManager)&&void 0!==t&&t.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:i,viewport:a,transform:r,imageLayer:o,background:l}=this.params;this.gfx=new _canvas.CanvasGraphics(i,this.commonObjs,this.objs,this.canvasFactory,o,s,this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:r,viewport:a,transparency:n,background:l}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}cancel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&_canvasInUse._.delete(this._canvas),this.callback(e||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}operatorListChanged(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&_canvasInUse._.delete(this._canvas),this.callback())))}}var _canvasInUse={_:new WeakSet};const version="2.16.105";exports.version=version;const build="172ccdbe5";exports.build=build},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PrintAnnotationStorage=t.AnnotationStorage=void 0;var s=n(1),i=n(6),a=n(10),r=new WeakSet;class o{constructor(){_classPrivateMethodInitSpec(this,r),this._storage=new Map,this._modified=!1,this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const n=this._storage.get(e);return void 0===n?t:Object.assign(t,n)}getRawValue(e){return this._storage.get(e)}remove(e){if(this._storage.delete(e),0===this._storage.size&&this.resetModified(),"function"===typeof this.onAnnotationEditor){for(const e of this._storage.values())if(e instanceof i.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(e,t){const n=this._storage.get(e);let s=!1;if(void 0!==n)for(const[i,a]of Object.entries(t))n[i]!==a&&(s=!0,n[i]=a);else s=!0,this._storage.set(e,t);s&&_assertClassBrand(r,this,l).call(this),t instanceof i.AnnotationEditor&&"function"===typeof this.onAnnotationEditor&&this.onAnnotationEditor(t.constructor._type)}has(e){return this._storage.has(e)}getAll(){return this._storage.size>0?(0,s.objectFromMap)(this._storage):null}get size(){return this._storage.size}resetModified(){this._modified&&(this._modified=!1,"function"===typeof this.onResetModified&&this.onResetModified())}get print(){return new d(this)}get serializable(){if(0===this._storage.size)return null;const e=new Map;for(const[t,n]of this._storage){const s=n instanceof i.AnnotationEditor?n.serialize():n;s&&e.set(t,s)}return e}static getHash(e){if(!e)return"";const t=new a.MurmurHash3_64;for(const[n,s]of e)t.update("".concat(n,":").concat(JSON.stringify(s)));return t.hexdigest()}}function l(){this._modified||(this._modified=!0,"function"===typeof this.onSetModified&&this.onSetModified())}t.AnnotationStorage=o;var c=new WeakMap;class d extends o{constructor(e){super(),_classPrivateFieldInitSpec(this,c,null),_classPrivateFieldSet(c,this,structuredClone(e.serializable))}get print(){(0,s.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return _classPrivateFieldGet(c,this)}}t.PrintAnnotationStorage=d},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditor=void 0;var s=n(7),i=n(1),a=new WeakMap,r=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap;class u{constructor(e){_classPrivateFieldInitSpec(this,a,this.focusin.bind(this)),_classPrivateFieldInitSpec(this,r,this.focusout.bind(this)),_classPrivateFieldInitSpec(this,o,!1),_classPrivateFieldInitSpec(this,l,!1),_classPrivateFieldInitSpec(this,c,!1),_classPrivateFieldInitSpec(this,d,u._zIndex++),this.constructor===u&&(0,i.unreachable)("Cannot initialize AnnotationEditor."),this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null;const[t,n]=this.parent.viewportBaseDimensions;this.x=e.x/t,this.y=e.y/n,this.rotation=this.parent.viewport.rotation,this.isAttachedToDOM=!1}static get _defaultLineColor(){return(0,i.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=_classPrivateFieldGet(d,this)}focusin(e){_classPrivateFieldGet(o,this)?_classPrivateFieldSet(o,this,!1):this.parent.setSelected(this)}focusout(e){if(!this.isAttachedToDOM)return;const t=e.relatedTarget;null!==t&&void 0!==t&&t.closest("#".concat(this.id))||(e.preventDefault(),this.parent.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.parent.addToAnnotationStorage(this)}dragstart(e){const t=this.parent.div.getBoundingClientRect();this.startX=e.clientX-t.x,this.startY=e.clientY-t.y,e.dataTransfer.setData("text/plain",this.id),e.dataTransfer.effectAllowed="move"}setAt(e,t,n,s){const[i,a]=this.parent.viewportBaseDimensions;[n,s]=this.screenToPageTranslation(n,s),this.x=(e+n)/i,this.y=(t+s)/a,this.div.style.left="".concat(100*this.x,"%"),this.div.style.top="".concat(100*this.y,"%")}translate(e,t){const[n,s]=this.parent.viewportBaseDimensions;[e,t]=this.screenToPageTranslation(e,t),this.x+=e/n,this.y+=t/s,this.div.style.left="".concat(100*this.x,"%"),this.div.style.top="".concat(100*this.y,"%")}screenToPageTranslation(e,t){const{rotation:n}=this.parent.viewport;switch(n){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}}setDims(e,t){const[n,s]=this.parent.viewportBaseDimensions;this.div.style.width="".concat(100*e/n,"%"),this.div.style.height="".concat(100*t/s,"%")}getInitialTranslation(){return[0,0]}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",_classPrivateFieldGet(a,this)),this.div.addEventListener("focusout",_classPrivateFieldGet(r,this));const[e,t]=this.getInitialTranslation();return this.translate(e,t),(0,s.bindEvents)(this,this.div,["dragstart","pointerdown"]),this.div}pointerdown(e){const t=s.KeyboardManager.platform.isMac;0!==e.button||e.ctrlKey&&t?e.preventDefault():(e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this),_classPrivateFieldSet(o,this,!0))}getRect(e,t){const[n,s]=this.parent.viewportBaseDimensions,[i,a]=this.parent.pageDimensions,r=i*e/n,o=a*t/s,l=this.x*i,c=this.y*a,d=this.width*i,u=this.height*a;switch(this.rotation){case 0:return[l+r,a-c-o-u,l+r+d,a-c-o];case 90:return[l+o,a-c+r,l+o+u,a-c+r+d];case 180:return[l-r-d,a-c+o,l-r,a-c+o+u];case 270:return[l-o-u,a-c-r-d,l-o,a-c-r];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[n,s,i,a]=e,r=i-n,o=a-s;switch(this.rotation){case 0:return[n,t-a,r,o];case 90:return[n,t-s,o,r];case 180:return[i,t-s,r,o];case 270:return[i,t-a,o,r];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){_classPrivateFieldSet(c,this,!0)}disableEditMode(){_classPrivateFieldSet(c,this,!1)}isInEditMode(){return _classPrivateFieldGet(c,this)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var e;null===(e=this.div)||void 0===e||e.addEventListener("focusin",_classPrivateFieldGet(a,this))}serialize(){(0,i.unreachable)("An editor must be serializable")}static deserialize(e,t){const n=new this.prototype.constructor({parent:t,id:t.getNextId()});n.rotation=e.rotation;const[s,i]=t.pageDimensions,[a,r,o,l]=n.getRectInCurrentCoords(e.rect,i);return n.x=a/s,n.y=r/i,n.width=o/s,n.height=l/i,n}remove(){this.div.removeEventListener("focusin",_classPrivateFieldGet(a,this)),this.div.removeEventListener("focusout",_classPrivateFieldGet(r,this)),this.isEmpty()||this.commit(),this.parent.remove(this)}select(){var e;null===(e=this.div)||void 0===e||e.classList.add("selectedEditor")}unselect(){var e;null===(e=this.div)||void 0===e||e.classList.remove("selectedEditor")}updateParams(e,t){}disableEditing(){}enableEditing(){}get propertiesToUpdate(){return{}}get contentDiv(){return this.div}get isEditing(){return _classPrivateFieldGet(l,this)}set isEditing(e){_classPrivateFieldSet(l,this,e),e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null)}}_defineProperty(u,"_colorManager",new s.ColorManager),_defineProperty(u,"_zIndex",1),t.AnnotationEditor=u},(e,t,n)=>{var s;Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardManager=t.CommandManager=t.ColorManager=t.AnnotationEditorUIManager=void 0,t.bindEvents=function(e,t,n){for(const s of n)t.addEventListener(s,e[s].bind(e))},t.opacityToHex=function(e){return Math.round(Math.min(255,Math.max(1,255*e))).toString(16).padStart(2,"0")};var i=n(1),a=n(8),r=new WeakMap;class o{constructor(){_classPrivateFieldInitSpec(this,r,0)}getId(){var e,t;return"".concat(i.AnnotationEditorPrefix).concat((_classPrivateFieldSet(r,this,(e=_classPrivateFieldGet(r,this),t=e++,e)),t))}}var l=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap;class p{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;_classPrivateFieldInitSpec(this,l,[]),_classPrivateFieldInitSpec(this,c,!1),_classPrivateFieldInitSpec(this,d,void 0),_classPrivateFieldInitSpec(this,u,-1),_classPrivateFieldSet(d,this,e)}add(e){let{cmd:t,undo:n,mustExec:s,type:i=NaN,overwriteIfSameType:a=!1,keepUndo:r=!1}=e;if(s&&t(),_classPrivateFieldGet(c,this))return;const o={cmd:t,undo:n,type:i};if(-1===_classPrivateFieldGet(u,this))return _classPrivateFieldGet(l,this).length>0&&(_classPrivateFieldGet(l,this).length=0),_classPrivateFieldSet(u,this,0),void _classPrivateFieldGet(l,this).push(o);if(a&&_classPrivateFieldGet(l,this)[_classPrivateFieldGet(u,this)].type===i)return r&&(o.undo=_classPrivateFieldGet(l,this)[_classPrivateFieldGet(u,this)].undo),void(_classPrivateFieldGet(l,this)[_classPrivateFieldGet(u,this)]=o);const p=_classPrivateFieldGet(u,this)+1;p===_classPrivateFieldGet(d,this)?_classPrivateFieldGet(l,this).splice(0,1):(_classPrivateFieldSet(u,this,p),p<_classPrivateFieldGet(l,this).length&&_classPrivateFieldGet(l,this).splice(p)),_classPrivateFieldGet(l,this).push(o)}undo(){-1!==_classPrivateFieldGet(u,this)&&(_classPrivateFieldSet(c,this,!0),_classPrivateFieldGet(l,this)[_classPrivateFieldGet(u,this)].undo(),_classPrivateFieldSet(c,this,!1),_classPrivateFieldSet(u,this,_classPrivateFieldGet(u,this)-1))}redo(){_classPrivateFieldGet(u,this)<_classPrivateFieldGet(l,this).length-1&&(_classPrivateFieldSet(u,this,_classPrivateFieldGet(u,this)+1),_classPrivateFieldSet(c,this,!0),_classPrivateFieldGet(l,this)[_classPrivateFieldGet(u,this)].cmd(),_classPrivateFieldSet(c,this,!1))}hasSomethingToUndo(){return-1!==_classPrivateFieldGet(u,this)}hasSomethingToRedo(){return _classPrivateFieldGet(u,this)<_classPrivateFieldGet(l,this).length-1}destroy(){_classPrivateFieldSet(l,this,null)}}t.CommandManager=p;var h=new WeakSet;class x{constructor(e){_classPrivateMethodInitSpec(this,h),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const t=x.platform.isMac;for(const[n,s]of e)for(const e of n){const n=e.startsWith("mac+");t&&n?(this.callbacks.set(e.slice(4),s),this.allKeys.add(e.split("+").at(-1))):t||n||(this.callbacks.set(e,s),this.allKeys.add(e.split("+").at(-1)))}}static get platform(){const e="undefined"!==typeof navigator?navigator.platform:"";return(0,i.shadow)(this,"platform",{isWin:e.includes("Win"),isMac:e.includes("Mac")})}exec(e,t){if(!this.allKeys.has(t.key))return;const n=this.callbacks.get(_assertClassBrand(h,this,f).call(this,t));n&&(n.bind(e)(),t.stopPropagation(),t.preventDefault())}}function f(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t}t.KeyboardManager=x;var m=new WeakMap;class g{constructor(){_classPrivateFieldInitSpec(this,m,null)}copy(e){e&&(Array.isArray(e)?_classPrivateFieldSet(m,this,e.map(e=>e.serialize())):_classPrivateFieldSet(m,this,[e.serialize()]),_classPrivateFieldSet(m,this,_classPrivateFieldGet(m,this).filter(e=>!!e)),0===_classPrivateFieldGet(m,this).length&&_classPrivateFieldSet(m,this,null))}paste(){return _classPrivateFieldGet(m,this)}isEmpty(){return null===_classPrivateFieldGet(m,this)}destroy(){_classPrivateFieldSet(m,this,null)}}class b{get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return(0,a.getColorValues)(e),(0,i.shadow)(this,"_colors",e)}convert(e){const t=(0,a.getRGB)(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(const[n,s]of this._colors)if(s.every((e,n)=>e===t[n]))return b._colorsMapping.get(n);return t}getHexCode(e){const t=this._colors.get(e);return t?i.Util.makeHexColor(...t):e}}_defineProperty(b,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]])),t.ColorManager=b;var v=new WeakMap,w=new WeakMap,C=new WeakMap,y=new WeakMap,j=new WeakMap,k=new WeakMap,_=new WeakMap,N=new WeakMap,L=new WeakMap,S=new WeakMap,A=new WeakMap,M=new WeakMap,T=new WeakMap,E=new WeakMap,F=new WeakMap,R=new WeakMap,P=new WeakMap,O=new WeakSet;class D{constructor(e,t){_classPrivateMethodInitSpec(this,O),_classPrivateFieldInitSpec(this,v,null),_classPrivateFieldInitSpec(this,w,new Map),_classPrivateFieldInitSpec(this,C,new Map),_classPrivateFieldInitSpec(this,y,new g),_classPrivateFieldInitSpec(this,j,new p),_classPrivateFieldInitSpec(this,k,0),_classPrivateFieldInitSpec(this,_,null),_classPrivateFieldInitSpec(this,N,null),_classPrivateFieldInitSpec(this,L,new o),_classPrivateFieldInitSpec(this,S,!1),_classPrivateFieldInitSpec(this,A,i.AnnotationEditorType.NONE),_classPrivateFieldInitSpec(this,M,new Set),_classPrivateFieldInitSpec(this,T,this.keydown.bind(this)),_classPrivateFieldInitSpec(this,E,this.onEditingAction.bind(this)),_classPrivateFieldInitSpec(this,F,this.onPageChanging.bind(this)),_classPrivateFieldInitSpec(this,R,{isEditing:!1,isEmpty:!0,hasEmptyClipboard:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}),_classPrivateFieldInitSpec(this,P,null),_classPrivateFieldSet(P,this,e),_classPrivateFieldSet(N,this,t),_classPrivateFieldGet(N,this)._on("editingaction",_classPrivateFieldGet(E,this)),_classPrivateFieldGet(N,this)._on("pagechanging",_classPrivateFieldGet(F,this))}destroy(){_assertClassBrand(O,this,B).call(this),_classPrivateFieldGet(N,this)._off("editingaction",_classPrivateFieldGet(E,this)),_classPrivateFieldGet(N,this)._off("pagechanging",_classPrivateFieldGet(F,this));for(const e of _classPrivateFieldGet(C,this).values())e.destroy();_classPrivateFieldGet(C,this).clear(),_classPrivateFieldGet(w,this).clear(),_classPrivateFieldSet(v,this,null),_classPrivateFieldGet(M,this).clear(),_classPrivateFieldGet(y,this).destroy(),_classPrivateFieldGet(j,this).destroy()}onPageChanging(e){let{pageNumber:t}=e;_classPrivateFieldSet(k,this,t-1)}focusMainContainer(){_classPrivateFieldGet(P,this).focus()}keydown(e){var t;null!==(t=this.getActive())&&void 0!==t&&t.shouldGetKeyboardEvents()||D._keyboardManager.exec(this,e)}onEditingAction(e){["undo","redo","cut","copy","paste","delete","selectAll"].includes(e.name)&&this[e.name]()}setEditingState(e){e?(_assertClassBrand(O,this,I).call(this),_assertClassBrand(O,this,H).call(this,{isEditing:_classPrivateFieldGet(A,this)!==i.AnnotationEditorType.NONE,isEmpty:_assertClassBrand(O,this,U).call(this),hasSomethingToUndo:_classPrivateFieldGet(j,this).hasSomethingToUndo(),hasSomethingToRedo:_classPrivateFieldGet(j,this).hasSomethingToRedo(),hasSelectedEditor:!1,hasEmptyClipboard:_classPrivateFieldGet(y,this).isEmpty()})):(_assertClassBrand(O,this,B).call(this),_assertClassBrand(O,this,H).call(this,{isEditing:!1}))}registerEditorTypes(e){_classPrivateFieldSet(_,this,e);for(const t of _classPrivateFieldGet(_,this))_assertClassBrand(O,this,Z).call(this,t.defaultPropertiesToUpdate)}getId(){return _classPrivateFieldGet(L,this).getId()}addLayer(e){_classPrivateFieldGet(C,this).set(e.pageIndex,e),_classPrivateFieldGet(S,this)?e.enable():e.disable()}removeLayer(e){_classPrivateFieldGet(C,this).delete(e.pageIndex)}updateMode(e){if(_classPrivateFieldSet(A,this,e),e===i.AnnotationEditorType.NONE)this.setEditingState(!1),_assertClassBrand(O,this,z).call(this);else{this.setEditingState(!0),_assertClassBrand(O,this,V).call(this);for(const t of _classPrivateFieldGet(C,this).values())t.updateMode(e)}}updateToolbar(e){e!==_classPrivateFieldGet(A,this)&&_classPrivateFieldGet(N,this).dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){for(const n of _classPrivateFieldGet(M,this))n.updateParams(e,t);for(const n of _classPrivateFieldGet(_,this))n.updateDefaultParams(e,t)}getEditors(e){const t=[];for(const n of _classPrivateFieldGet(w,this).values())n.pageIndex===e&&t.push(n);return t}getEditor(e){return _classPrivateFieldGet(w,this).get(e)}addEditor(e){_classPrivateFieldGet(w,this).set(e.id,e)}removeEditor(e){_classPrivateFieldGet(w,this).delete(e.id),this.unselect(e)}setActiveEditor(e){_classPrivateFieldGet(v,this)!==e&&(_classPrivateFieldSet(v,this,e),e&&_assertClassBrand(O,this,Z).call(this,e.propertiesToUpdate))}toggleSelected(e){if(_classPrivateFieldGet(M,this).has(e))return _classPrivateFieldGet(M,this).delete(e),e.unselect(),void _assertClassBrand(O,this,H).call(this,{hasSelectedEditor:this.hasSelection});_classPrivateFieldGet(M,this).add(e),e.select(),_assertClassBrand(O,this,Z).call(this,e.propertiesToUpdate),_assertClassBrand(O,this,H).call(this,{hasSelectedEditor:!0})}setSelected(e){for(const t of _classPrivateFieldGet(M,this))t!==e&&t.unselect();_classPrivateFieldGet(M,this).clear(),_classPrivateFieldGet(M,this).add(e),e.select(),_assertClassBrand(O,this,Z).call(this,e.propertiesToUpdate),_assertClassBrand(O,this,H).call(this,{hasSelectedEditor:!0})}isSelected(e){return _classPrivateFieldGet(M,this).has(e)}unselect(e){e.unselect(),_classPrivateFieldGet(M,this).delete(e),_assertClassBrand(O,this,H).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==_classPrivateFieldGet(M,this).size}undo(){_classPrivateFieldGet(j,this).undo(),_assertClassBrand(O,this,H).call(this,{hasSomethingToUndo:_classPrivateFieldGet(j,this).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:_assertClassBrand(O,this,U).call(this)})}redo(){_classPrivateFieldGet(j,this).redo(),_assertClassBrand(O,this,H).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:_classPrivateFieldGet(j,this).hasSomethingToRedo(),isEmpty:_assertClassBrand(O,this,U).call(this)})}addCommands(e){_classPrivateFieldGet(j,this).add(e),_assertClassBrand(O,this,H).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:_assertClassBrand(O,this,U).call(this)})}delete(){if(_classPrivateFieldGet(v,this)&&_classPrivateFieldGet(v,this).commitOrRemove(),!this.hasSelection)return;const e=[..._classPrivateFieldGet(M,this)];this.addCommands({cmd:()=>{for(const t of e)t.remove()},undo:()=>{for(const t of e)_assertClassBrand(O,this,Y).call(this,t)},mustExec:!0})}copy(){if(_classPrivateFieldGet(v,this)&&_classPrivateFieldGet(v,this).commitOrRemove(),this.hasSelection){const e=[];for(const t of _classPrivateFieldGet(M,this))t.isEmpty()||e.push(t);if(0===e.length)return;_classPrivateFieldGet(y,this).copy(e),_assertClassBrand(O,this,H).call(this,{hasEmptyClipboard:!1})}}cut(){this.copy(),this.delete()}paste(){if(_classPrivateFieldGet(y,this).isEmpty())return;this.unselectAll();const e=_classPrivateFieldGet(C,this).get(_classPrivateFieldGet(k,this)),t=_classPrivateFieldGet(y,this).paste().map(t=>e.deserialize(t));this.addCommands({cmd:()=>{for(const e of t)_assertClassBrand(O,this,Y).call(this,e);_assertClassBrand(O,this,W).call(this,t)},undo:()=>{for(const e of t)e.remove()},mustExec:!0})}selectAll(){for(const e of _classPrivateFieldGet(M,this))e.commit();_assertClassBrand(O,this,W).call(this,_classPrivateFieldGet(w,this).values())}unselectAll(){if(_classPrivateFieldGet(v,this))_classPrivateFieldGet(v,this).commitOrRemove();else if(0!==_assertClassBrand(O,this,W).size){for(const e of _classPrivateFieldGet(M,this))e.unselect();_classPrivateFieldGet(M,this).clear(),_assertClassBrand(O,this,H).call(this,{hasSelectedEditor:!1})}}isActive(e){return _classPrivateFieldGet(v,this)===e}getActive(){return _classPrivateFieldGet(v,this)}getMode(){return _classPrivateFieldGet(A,this)}}function I(){_classPrivateFieldGet(P,this).addEventListener("keydown",_classPrivateFieldGet(T,this))}function B(){_classPrivateFieldGet(P,this).removeEventListener("keydown",_classPrivateFieldGet(T,this))}function H(e){Object.entries(e).some(e=>{let[t,n]=e;return _classPrivateFieldGet(R,this)[t]!==n})&&_classPrivateFieldGet(N,this).dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(_classPrivateFieldGet(R,this),e)})}function Z(e){_classPrivateFieldGet(N,this).dispatch("annotationeditorparamschanged",{source:this,details:e})}function V(){if(!_classPrivateFieldGet(S,this)){_classPrivateFieldSet(S,this,!0);for(const e of _classPrivateFieldGet(C,this).values())e.enable()}}function z(){if(this.unselectAll(),_classPrivateFieldGet(S,this)){_classPrivateFieldSet(S,this,!1);for(const e of _classPrivateFieldGet(C,this).values())e.disable()}}function Y(e){const t=_classPrivateFieldGet(C,this).get(e.pageIndex);t?t.addOrRebuild(e):this.addEditor(e)}function U(){if(0===_classPrivateFieldGet(w,this).size)return!0;if(1===_classPrivateFieldGet(w,this).size)for(const e of _classPrivateFieldGet(w,this).values())return e.isEmpty();return!1}function W(e){_classPrivateFieldGet(M,this).clear();for(const t of e)t.isEmpty()||(_classPrivateFieldGet(M,this).add(t),t.select());_assertClassBrand(O,this,H).call(this,{hasSelectedEditor:!0})}_defineProperty(D,"_keyboardManager",new x([[["ctrl+a","mac+meta+a"],(s=D).prototype.selectAll],[["ctrl+c","mac+meta+c"],s.prototype.copy],[["ctrl+v","mac+meta+v"],s.prototype.paste],[["ctrl+x","mac+meta+x"],s.prototype.cut],[["ctrl+z","mac+meta+z"],s.prototype.undo],[["ctrl+y","ctrl+shift+Z","mac+meta+shift+Z"],s.prototype.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete"],s.prototype.delete],[["Escape","mac+Escape"],s.prototype.unselectAll]])),t.AnnotationEditorUIManager=D},(e,t,n)=>{var s;Object.defineProperty(t,"__esModule",{value:!0}),t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PageViewport=t.PDFDateString=t.DOMStandardFontDataFactory=t.DOMSVGFactory=t.DOMCanvasFactory=t.DOMCMapReaderFactory=t.AnnotationPrefix=void 0,t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getColorValues=function(e){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const n of e.keys()){t.style.color=n;const s=window.getComputedStyle(t).color;e.set(n,g(s))}t.remove()},t.getCurrentTransform=function(e){const{a:t,b:n,c:s,d:i,e:a,f:r}=e.getTransform();return[t,n,s,i,a,r]},t.getCurrentTransformInverse=function(e){const{a:t,b:n,c:s,d:i,e:a,f:r}=e.getTransform().invertSelf();return[t,n,s,i,a,r]},t.getFilenameFromUrl=function(e){const t=e.indexOf("#"),n=e.indexOf("?"),s=Math.min(t>0?t:e.length,n>0?n:e.length);return e.substring(e.lastIndexOf("/",s)+1,s)},t.getPdfFilenameFromUrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!==typeof e)return t;if(x(e))return(0,a.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const n=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,s=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let i=n.exec(s[1])||n.exec(s[2])||n.exec(s[3]);if(i&&(i=i[0],i.includes("%")))try{i=n.exec(decodeURIComponent(i))[0]}catch(r){}return i||t},t.getRGB=g,t.getXfaPageViewport=function(e,t){let{scale:n=1,rotation:s=0}=t;const{width:i,height:a}=e.attributes.style,r=[0,0,parseInt(i),parseInt(a)];return new p({viewBox:r,scale:n,rotation:s})},t.isDataScheme=x,t.isPdfFile=function(e){return"string"===typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=f,t.loadScript=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((n,s)=>{const i=document.createElement("script");i.src=e,i.onload=function(e){t&&i.remove(),n(e)},i.onerror=function(){s(new Error("Cannot load script at: ".concat(i.src)))},(document.head||document.documentElement).append(i)})};var i=n(9),a=n(1);t.AnnotationPrefix="pdfjs_internal_id_";class r{}s=r,_defineProperty(r,"CSS",96),_defineProperty(r,"PDF",72),_defineProperty(r,"PDF_TO_CSS_UNITS",s.CSS/s.PDF),t.PixelsPerInch=r;class o extends i.BaseCanvasFactory{constructor(){let{ownerDocument:e=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._document=e}_createCanvas(e,t){const n=this._document.createElement("canvas");return n.width=e,n.height=t,n}}async function l(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(f(e,document.baseURI)){const n=await fetch(e);if(!n.ok)throw new Error(n.statusText);return t?new Uint8Array(await n.arrayBuffer()):(0,a.stringToBytes)(await n.text())}return new Promise((n,s)=>{const i=new XMLHttpRequest;i.open("GET",e,!0),t&&(i.responseType="arraybuffer"),i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(200===i.status||0===i.status){let e;if(t&&i.response?e=new Uint8Array(i.response):!t&&i.responseText&&(e=(0,a.stringToBytes)(i.responseText)),e)return void n(e)}s(new Error(i.statusText))}},i.send(null)})}t.DOMCanvasFactory=o;class c extends i.BaseCMapReaderFactory{_fetchData(e,t){return l(e,this.isCompressed).then(e=>({cMapData:e,compressionType:t}))}}t.DOMCMapReaderFactory=c;class d extends i.BaseStandardFontDataFactory{_fetchData(e){return l(e,!0)}}t.DOMStandardFontDataFactory=d;class u extends i.BaseSVGFactory{_createSVG(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}}t.DOMSVGFactory=u;class p{constructor(e){let{viewBox:t,scale:n,rotation:s,offsetX:i=0,offsetY:a=0,dontFlip:r=!1}=e;this.viewBox=t,this.scale=n,this.rotation=s,this.offsetX=i,this.offsetY=a;const o=(t[2]+t[0])/2,l=(t[3]+t[1])/2;let c,d,u,p,h,x,f,m;switch(s%=360,s<0&&(s+=360),s){case 180:c=-1,d=0,u=0,p=1;break;case 90:c=0,d=1,u=1,p=0;break;case 270:c=0,d=-1,u=-1,p=0;break;case 0:c=1,d=0,u=0,p=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}r&&(u=-u,p=-p),0===c?(h=Math.abs(l-t[1])*n+i,x=Math.abs(o-t[0])*n+a,f=Math.abs(t[3]-t[1])*n,m=Math.abs(t[2]-t[0])*n):(h=Math.abs(o-t[0])*n+i,x=Math.abs(l-t[1])*n+a,f=Math.abs(t[2]-t[0])*n,m=Math.abs(t[3]-t[1])*n),this.transform=[c*n,d*n,u*n,p*n,h-c*n*o-u*n*l,x-d*n*o-p*n*l],this.width=f,this.height=m}clone(){let{scale:e=this.scale,rotation:t=this.rotation,offsetX:n=this.offsetX,offsetY:s=this.offsetY,dontFlip:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new p({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:n,offsetY:s,dontFlip:i})}convertToViewportPoint(e,t){return a.Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=a.Util.applyTransform([e[0],e[1]],this.transform),n=a.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],n[0],n[1]]}convertToPdfPoint(e,t){return a.Util.applyInverseTransform([e,t],this.transform)}}t.PageViewport=p;class h extends a.BaseException{constructor(e,t){super(e,"RenderingCancelledException"),this.type=t}}function x(e){const t=e.length;let n=0;for(;n>16,(65280&t)>>8,255&t]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map(e=>parseInt(e)):e.startsWith("rgba(")?e.slice(5,-1).split(",").map(e=>parseInt(e)).slice(0,3):((0,a.warn)('Not a valid color format: "'.concat(e,'"')),[0,0,0])}t.RenderingCancelledException=h,t.StatTimer=class{constructor(){this.started=Object.create(null),this.times=[]}time(e){e in this.started&&(0,a.warn)("Timer is already running for ".concat(e)),this.started[e]=Date.now()}timeEnd(e){e in this.started||(0,a.warn)("Timer has not been started for ".concat(e)),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const n of this.times){const e=n.name;e.length>t&&(t=e.length)}for(const n of this.times){const s=n.end-n.start;e.push("".concat(n.name.padEnd(t)," ").concat(s,"ms\n"))}return e.join("")}},t.PDFDateString=class{static toDateObject(e){if(!e||"string"!==typeof e)return null;m||(m=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=m.exec(e);if(!t)return null;const n=parseInt(t[1],10);let s=parseInt(t[2],10);s=s>=1&&s<=12?s-1:0;let i=parseInt(t[3],10);i=i>=1&&i<=31?i:1;let a=parseInt(t[4],10);a=a>=0&&a<=23?a:0;let r=parseInt(t[5],10);r=r>=0&&r<=59?r:0;let o=parseInt(t[6],10);o=o>=0&&o<=59?o:0;const l=t[7]||"Z";let c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;let d=parseInt(t[9],10)||0;return d=d>=0&&d<=59?d:0,"-"===l?(a+=c,r+=d):"+"===l&&(a-=c,r-=d),new Date(Date.UTC(n,s,i,a,r,o))}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0;var s=n(1);class i{constructor(){this.constructor===i&&(0,s.unreachable)("Cannot initialize BaseCanvasFactory.")}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const n=this._createCanvas(e,t);return{canvas:n,context:n.getContext("2d")}}reset(e,t,n){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||n<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=n}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){(0,s.unreachable)("Abstract method `_createCanvas` called.")}}t.BaseCanvasFactory=i;class a{constructor(e){let{baseUrl:t=null,isCompressed:n=!1}=e;this.constructor===a&&(0,s.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=t,this.isCompressed=n}async fetch(e){let{name:t}=e;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!t)throw new Error("CMap name must be specified.");const n=this.baseUrl+t+(this.isCompressed?".bcmap":""),i=this.isCompressed?s.CMapCompressionType.BINARY:s.CMapCompressionType.NONE;return this._fetchData(n,i).catch(e=>{throw new Error("Unable to load ".concat(this.isCompressed?"binary ":"","CMap at: ").concat(n))})}_fetchData(e,t){(0,s.unreachable)("Abstract method `_fetchData` called.")}}t.BaseCMapReaderFactory=a;class r{constructor(e){let{baseUrl:t=null}=e;this.constructor===r&&(0,s.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=t}async fetch(e){let{filename:t}=e;if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!t)throw new Error("Font filename must be specified.");const n="".concat(this.baseUrl).concat(t);return this._fetchData(n).catch(e=>{throw new Error("Unable to load font data at: ".concat(n))})}_fetchData(e){(0,s.unreachable)("Abstract method `_fetchData` called.")}}t.BaseStandardFontDataFactory=r;class o{constructor(){this.constructor===o&&(0,s.unreachable)("Cannot initialize BaseSVGFactory.")}create(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const s=this._createSVG("svg:svg");return s.setAttribute("version","1.1"),n||(s.setAttribute("width","".concat(e,"px")),s.setAttribute("height","".concat(t,"px"))),s.setAttribute("preserveAspectRatio","none"),s.setAttribute("viewBox","0 0 ".concat(e," ").concat(t)),s}createElement(e){if("string"!==typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){(0,s.unreachable)("Abstract method `_createSVG` called.")}}t.BaseSVGFactory=o},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var s=n(1);const i=3285377520,a=4294901760,r=65535;t.MurmurHash3_64=class{constructor(e){this.h1=e?4294967295&e:i,this.h2=e?4294967295&e:i}update(e){let t,n;if("string"===typeof e){t=new Uint8Array(2*e.length),n=0;for(let s=0,i=e.length;s>>8,t[n++]=255&i)}}else{if(!(0,s.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");t=e.slice(),n=t.byteLength}const i=n>>2,o=n-4*i,l=new Uint32Array(t.buffer,0,i);let c=0,d=0,u=this.h1,p=this.h2;const h=3432918353,x=461845907,f=11601,m=13715;for(let s=0;s>>17,c=c*x&a|c*m&r,u^=c,u=u<<13|u>>>19,u=5*u+3864292196):(d=l[s],d=d*h&a|d*f&r,d=d<<15|d>>>17,d=d*x&a|d*m&r,p^=d,p=p<<13|p>>>19,p=5*p+3864292196);switch(c=0,o){case 3:c^=t[4*i+2]<<16;case 2:c^=t[4*i+1]<<8;case 1:c^=t[4*i],c=c*h&a|c*f&r,c=c<<15|c>>>17,c=c*x&a|c*m&r,1&i?u^=c:p^=c}this.h1=u,this.h2=p}hexdigest(){let e=this.h1,t=this.h2;e^=t>>>1,e=3981806797*e&a|36045*e&r,t=4283543511*t&a|(2950163797*(t<<16|e>>>16)&a)>>>16,e^=t>>>1,e=444984403*e&a|60499*e&r,t=3301882366*t&a|(3120437893*(t<<16|e>>>16)&a)>>>16,e^=t>>>1;const n=(e>>>0).toString(16),s=(t>>>0).toString(16);return n.padStart(8,"0")+s.padStart(8,"0")}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var s=n(1);class i{constructor(e){let{docId:t,onUnsupportedFeature:n,ownerDocument:a=globalThis.document,styleElement:r=null}=e;this.constructor===i&&(0,s.unreachable)("Cannot initialize BaseFontLoader."),this.docId=t,this._onUnsupportedFeature=n,this._document=a,this.nativeFontFaces=[],this.styleElement=null}addNativeFontFace(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}insertRule(e){let t=this.styleElement;t||(t=this.styleElement=this._document.createElement("style"),t.id="PDFJS_FONT_STYLE_TAG_".concat(this.docId),this._document.documentElement.getElementsByTagName("head")[0].append(t));const n=t.sheet;n.insertRule(e,n.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async bind(e){if(e.attached||e.missingFile)return;if(e.attached=!0,this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(n){throw this._onUnsupportedFeature({featureId:s.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,s.warn)("Failed to load font '".concat(t.family,"': '").concat(n,"'.")),e.disableFontFace=!0,n}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise(n=>{const s=this._queueLoadingCallback(n);this._prepareFontLoadEvent([t],[e],s)})}}_queueLoadingCallback(e){(0,s.unreachable)("Abstract method `_queueLoadingCallback`.")}get isFontLoadingAPISupported(){var e;const t=!(null===(e=this._document)||void 0===e||!e.fonts);return(0,s.shadow)(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){(0,s.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}get _loadTestFont(){(0,s.unreachable)("Abstract method `_loadTestFont`.")}_prepareFontLoadEvent(e,t,n){(0,s.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}let a;t.FontLoader=a,t.FontLoader=a=class extends i{constructor(e){super(e),this.loadingContext={requests:[],nextRequestId:0},this.loadTestFontId=0}get isSyncFontLoadingSupported(){let e=!1;if("undefined"===typeof navigator)e=!0;else{const t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);(null===t||void 0===t?void 0:t[1])>=14&&(e=!0)}return(0,s.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const t=this.loadingContext,n={id:"pdfjs-font-loading-".concat(t.nextRequestId++),done:!1,complete:function(){for((0,s.assert)(!n.done,"completeRequest() cannot be called twice."),n.done=!0;t.requests.length>0&&t.requests[0].done;){const e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(n),n}get _loadTestFont(){return(0,s.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t,n){function i(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,n,s){return e.substring(0,t)+s+e.substring(t+n)}let r,o;const l=this._document.createElement("canvas");l.width=1,l.height=1;const c=l.getContext("2d");let d=0;const u="lt".concat(Date.now()).concat(this.loadTestFontId++);let p=this._loadTestFont;p=a(p,976,u.length,u);const h=1482184792;let x=i(p,16);for(r=0,o=u.length-3;r30)return(0,s.warn)("Load test font never loaded."),void n();c.font="30px "+t,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0?n():setTimeout(e.bind(null,t,n))}(u,()=>{b.remove(),n.complete()})}},t.FontFaceObject=class{constructor(e,t){let{isEvalSupported:n=!0,disableFontFace:s=!1,ignoreErrors:i=!1,onUnsupportedFeature:a,fontRegistry:r=null}=t;this.compiledGlyphs=Object.create(null);for(const o in e)this[o]=e[o];this.isEvalSupported=!1!==n,this.disableFontFace=!0===s,this.ignoreErrors=!0===i,this._onUnsupportedFeature=a,this.fontRegistry=r}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e;if(this.cssFontInfo){const t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const e=(0,s.bytesToString)(this.data),t="url(data:".concat(this.mimetype,";base64,").concat(btoa(e),");");let n;if(this.cssFontInfo){let e="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(e+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),n='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(e,"src:").concat(t,"}")}else n='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(t,"}");return this.fontRegistry&&this.fontRegistry.registerFont(this,t),n}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let n;try{n=e.get(this.loadedName+"_path_"+t)}catch(i){if(!this.ignoreErrors)throw i;return this._onUnsupportedFeature({featureId:s.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,s.warn)('getPathGenerator - ignoring character: "'.concat(i,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&s.FeatureTest.isEvalSupported){const e=[];for(const t of n){const n=void 0!==t.args?t.args.join(","):"";e.push("c.",t.cmd,"(",n,");\n")}return this.compiledGlyphs[t]=new Function("c","size",e.join(""))}return this.compiledGlyphs[t]=function(e,t){for(const s of n)"scale"===s.cmd&&(s.args=[t,-t]),e[s.cmd].apply(e,s.args)}}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var s=n(8),i=n(1),a=n(13),r=n(14),o=n(3);const l=4096,c=o.isNodeJS&&"undefined"===typeof Path2D?-1:1e3,d=16;class u{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,n){let s;return void 0!==this.cache[e]?(s=this.cache[e],this.canvasFactory.reset(s,t,n)):(s=this.canvasFactory.create(t,n),this.cache[e]=s),s}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function p(e,t,n,i,a,r,o,l,c,d){const[u,p,h,x,f,m]=(0,s.getCurrentTransform)(e);if(0===p&&0===h){const s=o*u+f,g=Math.round(s),b=l*x+m,v=Math.round(b),w=(o+c)*u+f,C=Math.abs(Math.round(w)-g)||1,y=(l+d)*x+m,j=Math.abs(Math.round(y)-v)||1;return e.setTransform(Math.sign(u),0,0,Math.sign(x),g,v),e.drawImage(t,n,i,a,r,0,0,C,j),e.setTransform(u,p,h,x,f,m),[C,j]}if(0===u&&0===x){const s=l*h+f,g=Math.round(s),b=o*p+m,v=Math.round(b),w=(l+d)*h+f,C=Math.abs(Math.round(w)-g)||1,y=(o+c)*p+m,j=Math.abs(Math.round(y)-v)||1;return e.setTransform(0,Math.sign(p),Math.sign(h),0,g,v),e.drawImage(t,n,i,a,r,0,0,j,C),e.setTransform(u,p,h,x,f,m),[j,C]}return e.drawImage(t,n,i,a,r,o,l,c,d),[Math.hypot(u,p)*c,Math.hypot(h,x)*d]}class h{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=i.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=i.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=i.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps=null,this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,n){[t,n]=i.Util.applyTransform([t,n],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,n),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,n)}updateRectMinMax(e,t){const n=i.Util.applyTransform(t,e),s=i.Util.applyTransform(t.slice(2),e);this.minX=Math.min(this.minX,n[0],s[0]),this.minY=Math.min(this.minY,n[1],s[1]),this.maxX=Math.max(this.maxX,n[0],s[0]),this.maxY=Math.max(this.maxY,n[1],s[1])}updateScalingPathMinMax(e,t){i.Util.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.maxX=Math.max(this.maxX,t[1]),this.minY=Math.min(this.minY,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,n,s,a,r,o,l,c,d){const u=i.Util.bezierBoundingBox(t,n,s,a,r,o,l,c);if(d)return d[0]=Math.min(d[0],u[0],u[2]),d[1]=Math.max(d[1],u[0],u[2]),d[2]=Math.min(d[2],u[1],u[3]),void(d[3]=Math.max(d[3],u[1],u[3]));this.updateRectMinMax(e,u)}getPathBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[this.minX,this.minY,this.maxX,this.maxY];if(e===a.PathType.STROKE){t||(0,i.unreachable)("Stroke bounding box must include transform.");const e=i.Util.singularValueDecompose2dScale(t),s=e[0]*this.lineWidth/2,a=e[1]*this.lineWidth/2;n[0]-=s,n[1]-=a,n[2]+=s,n[3]+=a}return n}updateClipFromPath(){const e=i.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return i.Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function x(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("undefined"!==typeof ImageData&&t instanceof ImageData)return void e.putImageData(t,0,0);const s=t.height,a=t.width,r=s%d,o=(s-r)/d,l=0===r?o:o+1,c=e.createImageData(a,d);let u,p=0;const h=t.data,x=c.data;let f,m,g,b,v,w,C,y;if(n)switch(n.length){case 1:v=n[0],w=n[0],C=n[0],y=n[0];break;case 4:v=n[0],w=n[1],C=n[2],y=n[3]}if(t.kind===i.ImageKind.GRAYSCALE_1BPP){const t=h.byteLength,n=new Uint32Array(x.buffer,0,x.byteLength>>2),s=n.length,b=a+7>>3;let v=4294967295,w=i.FeatureTest.isLittleEndian?4278190080:255;for(y&&255===y[0]&&0===y[255]&&([v,w]=[w,v]),f=0;fb?a:8*e-7,r=-8&i;let o=0,l=0;for(;s>=1}for(;u=o&&(g=r,b=a*g),u=0,m=b;m--;)x[u++]=h[p++],x[u++]=h[p++],x[u++]=h[p++],x[u++]=255;if(t)for(let e=0;e>8,e[a-2]=e[a-2]*i+n*r>>8,e[a-1]=e[a-1]*i+s*r>>8}}}function v(e,t,n){const s=e.length,i=1/255;for(let a=3;a>8]>>8:t[i]*s>>16}}function C(e,t,n,s){const i=s[0],a=s[1],r=s[2]-i,o=s[3]-a;0!==r&&0!==o&&(function(e,t,n,s,i,a,r,o,l,c,d){const u=!!a,p=u?a[0]:0,h=u?a[1]:0,x=u?a[2]:0;let f;f="Luminosity"===i?w:v;const m=Math.min(s,Math.ceil(1048576/n));for(let g=0;g1&&void 0!==arguments[1]?arguments[1]:null;return"string"===typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing(e){let{transform:t,viewport:n,transparency:i=!1,background:a=null}=e;const r=this.ctx.canvas.width,o=this.ctx.canvas.height,l=a||"#ffffff";if(this.ctx.save(),this.foregroundColor&&this.backgroundColor){this.ctx.fillStyle=this.foregroundColor;const e=this.foregroundColor=this.ctx.fillStyle;this.ctx.fillStyle=this.backgroundColor;const t=this.backgroundColor=this.ctx.fillStyle;let n=!0,i=l;if(this.ctx.fillStyle=l,i=this.ctx.fillStyle,n="string"===typeof i&&/^#[0-9A-Fa-f]{6}$/.test(i),"#000000"===e&&"#ffffff"===t||e===t||!n)this.foregroundColor=this.backgroundColor=null;else{const[n,a,r]=(0,s.getRGB)(i),o=e=>(e/=255)<=.03928?e/12.92:((e+.055)/1.055)**2.4,l=Math.round(.2126*o(n)+.7152*o(a)+.0722*o(r));this.selectColor=(n,s,i)=>{const a=.2126*o(n)+.7152*o(s)+.0722*o(i);return Math.round(a)===l?t:e}}}if(this.ctx.fillStyle=this.backgroundColor||l,this.ctx.fillRect(0,0,r,o),this.ctx.restore(),i){const e=this.cachedCanvases.getCanvas("transparent",r,o);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...(0,s.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),g(this.ctx,this.foregroundColor),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform(...n.transform),this.viewportScale=n.scale,this.baseTransform=(0,s.getCurrentTransform)(this.ctx),this.imageLayer&&((0,s.deprecated)("The `imageLayer` functionality will be removed in the future."),this.imageLayer.beginLayout())}executeOperatorList(e,t,n,s){const a=e.argsArray,r=e.fnArray;let o=t||0;const l=a.length;if(l===o)return o;const c=l-o>10&&"function"===typeof n,d=c?Date.now()+15:0;let u=0;const p=this.commonObjs,h=this.objs;let x;for(;;){if(void 0!==s&&o===s.nextBreakPoint)return s.breakIt(o,n),o;if(x=r[o],x!==i.OPS.dependency)this[x].apply(this,a[o]);else for(const e of a[o]){const t=e.startsWith("g_")?p:h;if(!t.has(e))return t.get(e,n),o}if(o++,o===l)return o;if(c&&++u>10){if(Date.now()>d)return n(),o;u=0}}}endDrawing(){_assertClassBrand(L,this,A).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())"undefined"!==typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),this.imageLayer&&this.imageLayer.endLayout()}_scaleImage(e,t){const n=e.width,s=e.height;let i,a,r=Math.max(Math.hypot(t[0],t[1]),1),o=Math.max(Math.hypot(t[2],t[3]),1),l=n,c=s,d="prescale1";for(;r>2&&l>1||o>2&&c>1;){let t=l,n=c;r>2&&l>1&&(t=Math.ceil(l/2),r/=l/t),o>2&&c>1&&(n=Math.ceil(c/2),o/=c/n),i=this.cachedCanvases.getCanvas(d,t,n),a=i.context,a.clearRect(0,0,t,n),a.drawImage(e,0,0,l,c,0,0,t,n),e=i.canvas,l=t,c=n,d="prescale1"===d?"prescale2":"prescale1"}return{img:e,paintWidth:l,paintHeight:c}}_createMaskCanvas(e){const t=this.ctx,{width:n,height:r}=e,o=this.current.fillColor,l=this.current.patternFill,c=(0,s.getCurrentTransform)(t);let d,u,h,x;if((e.bitmap||e.data)&&e.count>1){const t=e.bitmap||e.data.buffer,n=c.slice(0,4);u=JSON.stringify(l?n:[n,o]),d=this._cachedBitmapsMap.get(t),d||(d=new Map,this._cachedBitmapsMap.set(t,d));const s=d.get(u);if(s&&!l)return{canvas:s,offsetX:Math.round(Math.min(c[0],c[2])+c[4]),offsetY:Math.round(Math.min(c[1],c[3])+c[5])};h=s}h||(x=this.cachedCanvases.getCanvas("maskCanvas",n,r),f(x.context,e));let m=i.Util.transform(c,[1/n,0,0,-1/r,0,0]);m=i.Util.transform(m,[1,0,0,1,0,-r]);const g=i.Util.applyTransform([0,0],m),b=i.Util.applyTransform([n,r],m),v=i.Util.normalizeRect([g[0],g[1],b[0],b[1]]),w=Math.round(v[2]-v[0])||1,C=Math.round(v[3]-v[1])||1,j=this.cachedCanvases.getCanvas("fillCanvas",w,C),k=j.context,_=Math.min(g[0],b[0]),N=Math.min(g[1],b[1]);k.translate(-_,-N),k.transform(...m),h||(h=this._scaleImage(x.canvas,(0,s.getCurrentTransformInverse)(k)),h=h.img,d&&l&&d.set(u,h)),k.imageSmoothingEnabled=y((0,s.getCurrentTransform)(k),e.interpolate),p(k,h,0,0,h.width,h.height,0,0,n,r),k.globalCompositeOperation="source-in";const L=i.Util.transform((0,s.getCurrentTransformInverse)(k),[1,0,0,1,-_,-N]);return k.fillStyle=l?o.getPattern(t,this,L,a.PathType.FILL):o,k.fillRect(0,0,n,r),d&&!l&&(this.cachedCanvases.delete("fillCanvas"),d.set(u,j.canvas)),{canvas:j.canvas,offsetX:Math.round(_),offsetY:Math.round(N)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking=null),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=j[e]}setLineJoin(e){this.ctx.lineJoin=k[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const n=this.ctx;void 0!==n.setLineDash&&(n.setLineDash(e),n.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(let t=0,n=e.length;t{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,n){t.translate(e,n),this.__originalTranslate(e,n)},e.scale=function(e,n){t.scale(e,n),this.__originalScale(e,n)},e.transform=function(e,n,s,i,a,r){t.transform(e,n,s,i,a,r),this.__originalTransform(e,n,s,i,a,r)},e.setTransform=function(e,n,s,i,a,r){t.setTransform(e,n,s,i,a,r),this.__originalSetTransform(e,n,s,i,a,r)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,n){t.moveTo(e,n),this.__originalMoveTo(e,n)},e.lineTo=function(e,n){t.lineTo(e,n),this.__originalLineTo(e,n)},e.bezierCurveTo=function(e,n,s,i,a,r){t.bezierCurveTo(e,n,s,i,a,r),this.__originalBezierCurveTo(e,n,s,i,a,r)},e.rect=function(e,n,s,i){t.rect(e,n,s,i),this.__originalRect(e,n,s,i)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(a,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),m(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask;C(this.suspendedCtx,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}save(){this.inSMaskMode?(m(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),m(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null)}transform(e,t,n,s,i,a){this.ctx.transform(e,t,n,s,i,a),this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null}constructPath(e,t,n){const a=this.ctx,r=this.current;let o,l,c=r.x,d=r.y;const u=(0,s.getCurrentTransform)(a),p=0===u[0]&&0===u[3]||0===u[1]&&0===u[2],h=p?n.slice(0):null;for(let s=0,x=0,f=e.length;s100&&(c=100),this.current.fontSizeScale=t/c,this.ctx.font="".concat(o," ").concat(r," ").concat(c,"px ").concat(l)}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,n,s,i,a){this.current.textMatrix=[e,t,n,s,i,a],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,n,a){const r=this.ctx,o=this.current,l=o.font,c=o.textRenderingMode,d=o.fontSize/o.fontSizeScale,u=c&i.TextRenderingMode.FILL_STROKE_MASK,p=!!(c&i.TextRenderingMode.ADD_TO_PATH_FLAG),h=o.patternFill&&!l.missingFile;let x;(l.disableFontFace||p||h)&&(x=l.getPathGenerator(this.commonObjs,e)),l.disableFontFace||h?(r.save(),r.translate(t,n),r.beginPath(),x(r,d),a&&r.setTransform(...a),u!==i.TextRenderingMode.FILL&&u!==i.TextRenderingMode.FILL_STROKE||r.fill(),u!==i.TextRenderingMode.STROKE&&u!==i.TextRenderingMode.FILL_STROKE||r.stroke(),r.restore()):(u!==i.TextRenderingMode.FILL&&u!==i.TextRenderingMode.FILL_STROKE||r.fillText(e,t,n),u!==i.TextRenderingMode.STROKE&&u!==i.TextRenderingMode.FILL_STROKE||r.strokeText(e,t,n)),p&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,s.getCurrentTransform)(r),x:t,y:n,fontSize:d,addToPath:x})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let n=!1;for(let s=3;s0&&t[s]<255){n=!0;break}return(0,i.shadow)(this,"isFontSubpixelAAEnabled",n)}showText(e){const t=this.current,n=t.font;if(n.isType3Font)return this.showType3Text(e);const r=t.fontSize;if(0===r)return;const o=this.ctx,l=t.fontSizeScale,c=t.charSpacing,d=t.wordSpacing,u=t.fontDirection,p=t.textHScale*u,h=e.length,x=n.vertical,f=x?1:-1,m=n.defaultVMetrics,g=r*t.fontMatrix[0],b=t.textRenderingMode===i.TextRenderingMode.FILL&&!n.disableFontFace&&!t.patternFill;let v;if(o.save(),o.transform(...t.textMatrix),o.translate(t.x,t.y+t.textRise),u>0?o.scale(p,-1):o.scale(p,1),t.patternFill){o.save();const e=t.fillColor.getPattern(o,this,(0,s.getCurrentTransformInverse)(o),a.PathType.FILL);v=(0,s.getCurrentTransform)(o),o.restore(),o.fillStyle=e}let w=t.lineWidth;const C=t.textMatrixScale;if(0===C||0===w){const e=t.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK;e!==i.TextRenderingMode.STROKE&&e!==i.TextRenderingMode.FILL_STROKE||(w=this.getSinglePixelWidth())}else w/=C;1!==l&&(o.scale(l,l),w/=l),o.lineWidth=w;let y,j=0;for(y=0;y0){const e=1e3*o.measureText(a).width/r*l;if(knew S(e,this.commonObjs,this.objs,this.canvasFactory)};t=new a.TilingPattern(e,n,this.ctx,r,i)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,n){var s;const a=(null===(s=this.selectColor)||void 0===s?void 0:s.call(this,e,t,n))||i.Util.makeHexColor(e,t,n);this.ctx.strokeStyle=a,this.current.strokeColor=a}setFillRGBColor(e,t,n){var s;const a=(null===(s=this.selectColor)||void 0===s?void 0:s.call(this,e,t,n))||i.Util.makeHexColor(e,t,n);this.ctx.fillStyle=a,this.current.fillColor=a,this.current.patternFill=!1}_getPattern(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(e)?t=this.cachedPatterns.get(e):(t=(0,a.getShadingPattern)(this.objs.get(e)),this.cachedPatterns.set(e,t)),n&&(t.matrix=n),t}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const n=this._getPattern(e);t.fillStyle=n.getPattern(t,this,(0,s.getCurrentTransformInverse)(t),a.PathType.SHADING);const r=(0,s.getCurrentTransformInverse)(t);if(r){const e=t.canvas,n=e.width,s=e.height,a=i.Util.applyTransform([0,0],r),o=i.Util.applyTransform([0,s],r),l=i.Util.applyTransform([n,0],r),c=i.Util.applyTransform([n,s],r),d=Math.min(a[0],o[0],l[0],c[0]),u=Math.min(a[1],o[1],l[1],c[1]),p=Math.max(a[0],o[0],l[0],c[0]),h=Math.max(a[1],o[1],l[1],c[1]);this.ctx.fillRect(d,u,p-d,h-u)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,i.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,i.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform(...e),this.baseTransform=(0,s.getCurrentTransform)(this.ctx),t)){const e=t[2]-t[0],n=t[3]-t[1];this.ctx.rect(t[0],t[1],e,n),this.current.updateRectMinMax((0,s.getCurrentTransform)(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||(0,i.info)("TODO: Support non-isolated groups."),e.knockout&&(0,i.warn)("Knockout groups not supported.");const n=(0,s.getCurrentTransform)(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let a=i.Util.getAxialAlignedBoundingBox(e.bbox,(0,s.getCurrentTransform)(t));const r=[0,0,t.canvas.width,t.canvas.height];a=i.Util.intersect(a,r)||[0,0,0,0];const o=Math.floor(a[0]),c=Math.floor(a[1]);let d=Math.max(Math.ceil(a[2])-o,1),u=Math.max(Math.ceil(a[3])-c,1),p=1,h=1;d>l&&(p=d/l,d=l),u>l&&(h=u/l,u=l),this.current.startNewPathAndClipBox([0,0,d,u]);let x="groupAt"+this.groupLevel;e.smask&&(x+="_smask_"+this.smaskCounter++%2);const f=this.cachedCanvases.getCanvas(x,d,u),g=f.context;g.scale(1/p,1/h),g.translate(-o,-c),g.transform(...n),e.smask?this.smaskStack.push({canvas:f.canvas,context:g,offsetX:o,offsetY:c,scaleX:p,scaleY:h,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(o,c),t.scale(p,h),t.save()),m(t,g),this.ctx=g,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,n=this.groupStack.pop();if(this.ctx=n,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const e=(0,s.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...e);const n=i.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(n)}}beginAnnotation(e,t,n,a,r){if(_assertClassBrand(L,this,A).call(this),g(this.ctx,this.foregroundColor),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(t)&&4===t.length){const a=t[2]-t[0],o=t[3]-t[1];if(r&&this.annotationCanvasMap){(n=n.slice())[4]-=t[0],n[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=a,t[3]=o;const[r,l]=i.Util.singularValueDecompose2dScale((0,s.getCurrentTransform)(this.ctx)),{viewportScale:c}=this,d=Math.ceil(a*this.outputScaleX*c),u=Math.ceil(o*this.outputScaleY*c);this.annotationCanvas=this.canvasFactory.create(d,u);const{canvas:p,context:h}=this.annotationCanvas;this.annotationCanvasMap.set(e,p),this.annotationCanvas.savedCtx=this.ctx,this.ctx=h,this.ctx.setTransform(r,0,0,-l,0,o*l),g(this.ctx,this.foregroundColor)}else g(this.ctx,this.foregroundColor),this.ctx.rect(t[0],t[1],a,o),this.ctx.clip(),this.endPath()}this.current=new h(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...n),this.transform(...a)}endAnnotation(){this.annotationCanvas&&(this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const n=this.ctx,s=this.processingType3;if(s&&(void 0===s.compiled&&(s.compiled=function(e){const{width:t,height:n}=e;if(t>c||n>c)return null;const s=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),i=t+1;let a,r,o,l=new Uint8Array(i*(n+1));const d=t+7&-8;let u=new Uint8Array(d*n),p=0;for(const c of e.data){let e=128;for(;e>0;)u[p++]=c&e?0:255,e>>=1}let h=0;for(p=0,0!==u[p]&&(l[0]=1,++h),r=1;r>2)+(u[p+1]?4:0)+(u[p-d+1]?8:0),s[e]&&(l[o+r]=s[e],++h),p++;if(u[p-d]!==u[p]&&(l[o+r]=u[p]?2:4,++h),h>1e3)return null}for(p=d*(n-1),o=a*i,0!==u[p]&&(l[o]=8,++h),r=1;r1e3)return null;const x=new Int32Array([0,i,-1,0,-i,0,0,0,1]),f=new Path2D;for(a=0;h&&a<=n;a++){let e=a*i;const n=e+t;for(;e>4,l[e]&=r>>2|r<<2),f.lineTo(e%i,e/i|0),l[e]||--h}while(s!==e);--a}return u=null,l=null,function(e){e.save(),e.scale(1/t,-1/n),e.translate(0,-n),e.fill(f),e.beginPath(),e.restore()}}(e)),s.compiled))return void s.compiled(n);const i=this._createMaskCanvas(e),a=i.canvas;n.save(),n.setTransform(1,0,0,1,0,0),n.drawImage(a,i.offsetX,i.offsetY),n.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0;if(!this.contentVisible)return;e=this.getObject(e.data,e);const l=this.ctx;l.save();const c=(0,s.getCurrentTransform)(l);l.transform(t,n,a,r,0,0);const d=this._createMaskCanvas(e);l.setTransform(1,0,0,1,0,0);for(let s=0,u=o.length;st?r/t:1,i=a>t?a/t:1}}this._cachedScaleForStroking=[n,i]}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:n}=this.current,[i,a]=this.getScaleForStroking();if(t.lineWidth=n||1,1===i&&1===a)return void t.stroke();let r,o,l;e&&(r=(0,s.getCurrentTransform)(t),o=t.getLineDash().slice(),l=t.lineDashOffset),t.scale(i,a);const c=Math.max(i,a);t.setLineDash(t.getLineDash().map(e=>e/c)),t.lineDashOffset/=c,t.stroke(),e&&(t.setTransform(...r),t.setLineDash(o),t.lineDashOffset=l)}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}function A(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}t.CanvasGraphics=S;for(const M in i.OPS)void 0!==S.prototype[M]&&(S.prototype[i.OPS[M]]=S.prototype[M])},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=function(e){switch(e[0]){case"RadialAxial":return new c(e);case"Mesh":return new p(e);case"Dummy":return new h}throw new Error("Unknown IR type: ".concat(e[0]))};var s=n(1),i=n(8),a=n(3);const r={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function o(e,t){if(!t||a.isNodeJS)return;const n=t[2]-t[0],s=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],n,s),e.clip(i)}t.PathType=r;class l{constructor(){this.constructor===l&&(0,s.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,s.unreachable)("Abstract method `getPattern` called.")}}class c extends l{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const n of this._colorStops)t.addColorStop(n[0],n[1]);return t}getPattern(e,t,n,a){let l;if(a===r.STROKE||a===r.FILL){const r=t.current.getClippedPathBoundingBox(a,(0,i.getCurrentTransform)(e))||[0,0,0,0],d=Math.ceil(r[2]-r[0])||1,u=Math.ceil(r[3]-r[1])||1,p=t.cachedCanvases.getCanvas("pattern",d,u,!0),h=p.context;h.clearRect(0,0,h.canvas.width,h.canvas.height),h.beginPath(),h.rect(0,0,h.canvas.width,h.canvas.height),h.translate(-r[0],-r[1]),n=s.Util.transform(n,[1,0,0,1,r[0],r[1]]),h.transform(...t.baseTransform),this.matrix&&h.transform(...this.matrix),o(h,this._bbox),h.fillStyle=this._createGradient(h),h.fill(),l=e.createPattern(p.canvas,"no-repeat");const x=new DOMMatrix(n);try{l.setTransform(x)}catch(c){(0,s.warn)('RadialAxialShadingPattern.getPattern: "'.concat(null===c||void 0===c?void 0:c.message,'".'))}}else o(e,this._bbox),l=this._createGradient(e);return l}}function d(e,t,n,s,i,a,r,o){const l=t.coords,c=t.colors,d=e.data,u=4*e.width;let p;l[n+1]>l[s+1]&&(p=n,n=s,s=p,p=a,a=r,r=p),l[s+1]>l[i+1]&&(p=s,s=i,i=p,p=r,r=o,o=p),l[n+1]>l[s+1]&&(p=n,n=s,s=p,p=a,a=r,r=p);const h=(l[n]+t.offsetX)*t.scaleX,x=(l[n+1]+t.offsetY)*t.scaleY,f=(l[s]+t.offsetX)*t.scaleX,m=(l[s+1]+t.offsetY)*t.scaleY,g=(l[i]+t.offsetX)*t.scaleX,b=(l[i+1]+t.offsetY)*t.scaleY;if(x>=b)return;const v=c[a],w=c[a+1],C=c[a+2],y=c[r],j=c[r+1],k=c[r+2],_=c[o],N=c[o+1],L=c[o+2],S=Math.round(x),A=Math.round(b);let M,T,E,F,R,P,O,D;for(let I=S;I<=A;I++){if(Ib?1:m===b?0:(m-I)/(m-b),M=f-(f-g)*e,T=y-(y-_)*e,E=j-(j-N)*e,F=k-(k-L)*e}let e;e=Ib?1:(x-I)/(x-b),R=h-(h-g)*e,P=v-(v-_)*e,O=w-(w-N)*e,D=C-(C-L)*e;const t=Math.round(Math.min(M,R)),n=Math.round(Math.max(M,R));let s=u*I+4*t;for(let i=t;i<=n;i++)e=(M-i)/(M-R),e<0?e=0:e>1&&(e=1),d[s++]=T-(T-P)*e|0,d[s++]=E-(E-O)*e|0,d[s++]=F-(F-D)*e|0,d[s++]=255}}function u(e,t,n){const s=t.coords,i=t.colors;let a,r;switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(s.length/o)-1,c=o-1;for(a=0;a=s?i=s:n=i/e,{scale:n,size:i}}clipBbox(e,t,n,s,a){const r=s-t,o=a-n;e.ctx.rect(t,n,r,o),e.current.updateRectMinMax((0,i.getCurrentTransform)(e.ctx),[t,n,s,a]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,n){const i=e.ctx,a=e.current;switch(t){case x:const e=this.ctx;i.fillStyle=e.fillStyle,i.strokeStyle=e.strokeStyle,a.fillColor=e.fillStyle,a.strokeColor=e.strokeStyle;break;case f:const r=s.Util.makeHexColor(n[0],n[1],n[2]);i.fillStyle=r,i.strokeStyle=r,a.fillColor=r,a.strokeColor=r;break;default:throw new s.FormatError("Unsupported paint type: ".concat(t))}}getPattern(e,t,n,i){let a=n;i!==r.SHADING&&(a=s.Util.transform(a,t.baseTransform),this.matrix&&(a=s.Util.transform(a,this.matrix)));const o=this.createPatternCanvas(t);let l=new DOMMatrix(a);l=l.translate(o.offsetX,o.offsetY),l=l.scale(1/o.scaleX,1/o.scaleY);const c=e.createPattern(o.canvas,"repeat");try{c.setTransform(l)}catch(d){(0,s.warn)('TilingPattern.getPattern: "'.concat(null===d||void 0===d?void 0:d.message,'".'))}return c}}t.TilingPattern=m},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.applyMaskImageData=function(e){let{src:t,srcPos:n=0,dest:i,destPos:a=0,width:r,height:o,inverseDecode:l=!1}=e;const c=s.FeatureTest.isLittleEndian?4278190080:255,[d,u]=l?[0,c]:[c,0],p=r>>3,h=7&r,x=t.length;i=new Uint32Array(i.buffer);for(let s=0;s{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;const n=Object.create(null);t.GlobalWorkerOptions=n,n.workerPort=void 0===n.workerPort?null:n.workerPort,n.workerSrc=void 0===n.workerSrc?"":n.workerSrc},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var s=n(1);const i=1,a=2,r=1,o=2,l=3,c=4,d=5,u=6,p=7,h=8;function x(e){switch(e instanceof Error||"object"===typeof e&&null!==e||(0,s.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new s.AbortException(e.message);case"MissingPDFException":return new s.MissingPDFException(e.message);case"PasswordException":return new s.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new s.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new s.UnknownErrorException(e.message,e.details);default:return new s.UnknownErrorException(e.message,e.toString())}}t.MessageHandler=class{constructor(e,t,n){this.sourceName=e,this.targetName=t,this.comObj=n,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void this._processStreamMessage(t);if(t.callback){const e=t.callbackId,n=this.callbackCapabilities[e];if(!n)throw new Error("Cannot resolve callback ".concat(e));if(delete this.callbackCapabilities[e],t.callback===i)n.resolve(t.data);else{if(t.callback!==a)throw new Error("Unexpected callback case");n.reject(x(t.reason))}return}const s=this.actionHandler[t.action];if(!s)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){const e=this.sourceName,r=t.sourceName;return void new Promise(function(e){e(s(t.data))}).then(function(s){n.postMessage({sourceName:e,targetName:r,callback:i,callbackId:t.callbackId,data:s})},function(s){n.postMessage({sourceName:e,targetName:r,callback:a,callbackId:t.callbackId,reason:x(s)})})}t.streamId?this._createStreamSink(t):s(t.data)},n.addEventListener("message",this._onComObjOnMessage)}on(e,t){const n=this.actionHandler;if(n[e])throw new Error('There is already an actionName called "'.concat(e,'"'));n[e]=t}send(e,t,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}sendWithPromise(e,t,n){const i=this.callbackId++,a=(0,s.createPromiseCapability)();this.callbackCapabilities[i]=a;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:t},n)}catch(r){a.reject(r)}return a.promise}sendWithStream(e,t,n,i){const a=this.streamId++,o=this.sourceName,l=this.targetName,c=this.comObj;return new ReadableStream({start:n=>{const r=(0,s.createPromiseCapability)();return this.streamControllers[a]={controller:n,startCall:r,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:o,targetName:l,action:e,streamId:a,data:t,desiredSize:n.desiredSize},i),r.promise},pull:e=>{const t=(0,s.createPromiseCapability)();return this.streamControllers[a].pullCall=t,c.postMessage({sourceName:o,targetName:l,stream:u,streamId:a,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,s.assert)(e instanceof Error,"cancel must have a valid reason");const t=(0,s.createPromiseCapability)();return this.streamControllers[a].cancelCall=t,this.streamControllers[a].isClosed=!0,c.postMessage({sourceName:o,targetName:l,stream:r,streamId:a,reason:x(e)}),t.promise}},n)}_createStreamSink(e){const t=e.streamId,n=this.sourceName,i=e.sourceName,a=this.comObj,r=this,o=this.actionHandler[e.action],u={enqueue(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const l=this.desiredSize;this.desiredSize-=r,l>0&&this.desiredSize<=0&&(this.sinkCapability=(0,s.createPromiseCapability)(),this.ready=this.sinkCapability.promise),a.postMessage({sourceName:n,targetName:i,stream:c,streamId:t,chunk:e},o)},close(){this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:n,targetName:i,stream:l,streamId:t}),delete r.streamSinks[t])},error(e){(0,s.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:n,targetName:i,stream:d,streamId:t,reason:x(e)}))},sinkCapability:(0,s.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};u.sinkCapability.resolve(),u.ready=u.sinkCapability.promise,this.streamSinks[t]=u,new Promise(function(t){t(o(e.data,u))}).then(function(){a.postMessage({sourceName:n,targetName:i,stream:h,streamId:t,success:!0})},function(e){a.postMessage({sourceName:n,targetName:i,stream:h,streamId:t,reason:x(e)})})}_processStreamMessage(e){const t=e.streamId,n=this.sourceName,i=e.sourceName,a=this.comObj,f=this.streamControllers[t],m=this.streamSinks[t];switch(e.stream){case h:e.success?f.startCall.resolve():f.startCall.reject(x(e.reason));break;case p:e.success?f.pullCall.resolve():f.pullCall.reject(x(e.reason));break;case u:if(!m){a.postMessage({sourceName:n,targetName:i,stream:p,streamId:t,success:!0});break}m.desiredSize<=0&&e.desiredSize>0&&m.sinkCapability.resolve(),m.desiredSize=e.desiredSize,new Promise(function(e){e(m.onPull&&m.onPull())}).then(function(){a.postMessage({sourceName:n,targetName:i,stream:p,streamId:t,success:!0})},function(e){a.postMessage({sourceName:n,targetName:i,stream:p,streamId:t,reason:x(e)})});break;case c:if((0,s.assert)(f,"enqueue should have stream controller"),f.isClosed)break;f.controller.enqueue(e.chunk);break;case l:if((0,s.assert)(f,"close should have stream controller"),f.isClosed)break;f.isClosed=!0,f.controller.close(),this._deleteStreamController(f,t);break;case d:(0,s.assert)(f,"error should have stream controller"),f.controller.error(x(e.reason)),this._deleteStreamController(f,t);break;case o:e.success?f.cancelCall.resolve():f.cancelCall.reject(x(e.reason)),this._deleteStreamController(f,t);break;case r:if(!m)break;new Promise(function(t){t(m.onCancel&&m.onCancel(x(e.reason)))}).then(function(){a.postMessage({sourceName:n,targetName:i,stream:o,streamId:t,success:!0})},function(e){a.postMessage({sourceName:n,targetName:i,stream:o,streamId:t,reason:x(e)})}),m.sinkCapability.reject(x(e.reason)),m.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async _deleteStreamController(e,t){await Promise.allSettled([e.startCall&&e.startCall.promise,e.pullCall&&e.pullCall.promise,e.cancelCall&&e.cancelCall.promise]),delete this.streamControllers[t]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var s=n(1),i=new WeakMap,a=new WeakMap;t.Metadata=class{constructor(e){let{parsedData:t,rawData:n}=e;_classPrivateFieldInitSpec(this,i,void 0),_classPrivateFieldInitSpec(this,a,void 0),_classPrivateFieldSet(i,this,t),_classPrivateFieldSet(a,this,n)}getRaw(){return _classPrivateFieldGet(a,this)}get(e){var t;return null!==(t=_classPrivateFieldGet(i,this).get(e))&&void 0!==t?t:null}getAll(){return(0,s.objectFromMap)(_classPrivateFieldGet(i,this))}has(e){return _classPrivateFieldGet(i,this).has(e)}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var s=n(1);const i=Symbol("INTERNAL");var a=new WeakMap;class r{constructor(e,t){_classPrivateFieldInitSpec(this,a,!0),this.name=e,this.intent=t}get visible(){return _classPrivateFieldGet(a,this)}_setVisible(e,t){e!==i&&(0,s.unreachable)("Internal method `_setVisible` called."),_classPrivateFieldSet(a,this,t)}}var o=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakSet;function p(e){const t=e.length;if(t<2)return!0;const n=e[0];for(let i=1;i1&&void 0!==arguments[1])||arguments[1];_classPrivateFieldGet(l,this).has(e)?(_classPrivateFieldGet(l,this).get(e)._setVisible(i,!!t),_classPrivateFieldSet(o,this,null)):(0,s.warn)("Optional content group not found: ".concat(e))}get hasInitialVisibility(){if(null!==_classPrivateFieldGet(o,this))return _classPrivateFieldGet(o,this);for(const[e,t]of _classPrivateFieldGet(l,this)){const n=_classPrivateFieldGet(c,this).get(e);if(t.visible!==n)return _classPrivateFieldSet(o,this,!1)}return _classPrivateFieldSet(o,this,!0)}getOrder(){return _classPrivateFieldGet(l,this).size?_classPrivateFieldGet(d,this)?_classPrivateFieldGet(d,this).slice():[..._classPrivateFieldGet(l,this).keys()]:null}getGroups(){return _classPrivateFieldGet(l,this).size>0?(0,s.objectFromMap)(_classPrivateFieldGet(l,this)):null}getGroup(e){return _classPrivateFieldGet(l,this).get(e)||null}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var s=n(1),i=n(8);t.PDFDataTransportStream=class{constructor(e,t){(0,s.assert)(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=e.progressiveDone||!1,this._contentDispositionFilename=e.contentDispositionFilename||null;const n=e.initialData;if((null===n||void 0===n?void 0:n.length)>0){const e=new Uint8Array(n).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._contentLength=e.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((e,t)=>{this._onReceiveData({begin:e,chunk:t})}),this._pdfDataRangeTransport.addProgressListener((e,t)=>{this._onProgress({loaded:e,total:t})}),this._pdfDataRangeTransport.addProgressiveReadListener(e=>{this._onReceiveData({chunk:e})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(e){const t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{const n=this._rangeReaders.some(function(n){return n._begin===e.begin&&(n._enqueue(t),!0)});(0,s.assert)(n,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}_onProgress(e){if(void 0===e.total){const t=this._rangeReaders[0];null!==t&&void 0!==t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{const t=this._fullRequestReader;null!==t&&void 0!==t&&t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}}_onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){(0,s.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new a(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=new r(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);for(const t of this._rangeReaders.slice(0))t.cancel(e);this._pdfDataRangeTransport.abort()}};class a{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this._stream=e,this._done=n||!1,this._filename=(0,i.isPdfFile)(s)?s:null,this._queuedChunks=t||[],this._loaded=0;for(const i of this._queuedChunks)this._loaded+=i.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=(0,s.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class r{constructor(e,t,n){this._stream=e,this._begin=t,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,s.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;class n{static textContent(e){const t=[],s={items:t,styles:Object.create(null)};return function e(s){var i;if(!s)return;let a=null;const r=s.name;if("#text"===r)a=s.value;else{if(!n.shouldBuildText(r))return;null!==s&&void 0!==s&&null!==(i=s.attributes)&&void 0!==i&&i.textContent?a=s.attributes.textContent:s.value&&(a=s.value)}if(null!==a&&t.push({str:a}),s.children)for(const t of s.children)e(t)}(e),s}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}t.XfaText=n},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var s=n(9);const i=function(e){return new Promise((t,n)=>{__webpack_require__(9851).readFile(e,(e,s)=>{!e&&s?t(new Uint8Array(s)):n(new Error(e))})})};class a extends s.BaseCanvasFactory{_createCanvas(e,t){return __webpack_require__(7406).createCanvas(e,t)}}t.NodeCanvasFactory=a;class r extends s.BaseCMapReaderFactory{_fetchData(e,t){return i(e).then(e=>({cMapData:e,compressionType:t}))}}t.NodeCMapReaderFactory=r;class o extends s.BaseStandardFontDataFactory{_fetchData(e){return i(e)}}t.NodeStandardFontDataFactory=o},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayer=void 0;var s=n(7),i=n(1),a=n(23),r=n(24),o=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,p=new WeakMap,h=new WeakMap,x=new WeakMap,f=new WeakSet;class m{constructor(e){_classPrivateMethodInitSpec(this,f),_classPrivateFieldInitSpec(this,o,void 0),_classPrivateFieldInitSpec(this,l,!1),_classPrivateFieldInitSpec(this,c,this.pointerup.bind(this)),_classPrivateFieldInitSpec(this,d,this.pointerdown.bind(this)),_classPrivateFieldInitSpec(this,u,new Map),_classPrivateFieldInitSpec(this,p,!1),_classPrivateFieldInitSpec(this,h,!1),_classPrivateFieldInitSpec(this,x,void 0),m._initialized||(m._initialized=!0,a.FreeTextEditor.initialize(e.l10n),r.InkEditor.initialize(e.l10n),e.uiManager.registerEditorTypes([a.FreeTextEditor,r.InkEditor])),_classPrivateFieldSet(x,this,e.uiManager),this.annotationStorage=e.annotationStorage,this.pageIndex=e.pageIndex,this.div=e.div,_classPrivateFieldSet(o,this,e.accessibilityManager),_classPrivateFieldGet(x,this).addLayer(this)}updateToolbar(e){_classPrivateFieldGet(x,this).updateToolbar(e)}updateMode(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_classPrivateFieldGet(x,this).getMode();_assertClassBrand(f,this,w).call(this),e===i.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),_classPrivateFieldGet(x,this).unselectAll()}addInkEditorIfNeeded(e){if(e||_classPrivateFieldGet(x,this).getMode()===i.AnnotationEditorType.INK){if(!e)for(const e of _classPrivateFieldGet(u,this).values())if(e.isEmpty())return void e.setInBackground();_assertClassBrand(f,this,v).call(this,{offsetX:0,offsetY:0}).setInBackground()}}setEditingState(e){_classPrivateFieldGet(x,this).setEditingState(e)}addCommands(e){_classPrivateFieldGet(x,this).addCommands(e)}enable(){this.div.style.pointerEvents="auto";for(const e of _classPrivateFieldGet(u,this).values())e.enableEditing()}disable(){this.div.style.pointerEvents="none";for(const e of _classPrivateFieldGet(u,this).values())e.disableEditing()}setActiveEditor(e){_classPrivateFieldGet(x,this).getActive()!==e&&_classPrivateFieldGet(x,this).setActiveEditor(e)}enableClick(){this.div.addEventListener("pointerdown",_classPrivateFieldGet(d,this)),this.div.addEventListener("pointerup",_classPrivateFieldGet(c,this))}disableClick(){this.div.removeEventListener("pointerdown",_classPrivateFieldGet(d,this)),this.div.removeEventListener("pointerup",_classPrivateFieldGet(c,this))}attach(e){_classPrivateFieldGet(u,this).set(e.id,e)}detach(e){var t;_classPrivateFieldGet(u,this).delete(e.id),null===(t=_classPrivateFieldGet(o,this))||void 0===t||t.removePointerInTextLayer(e.contentDiv)}remove(e){_classPrivateFieldGet(x,this).removeEditor(e),this.detach(e),this.annotationStorage.remove(e.id),e.div.style.display="none",setTimeout(()=>{e.div.style.display="",e.div.remove(),e.isAttachedToDOM=!1,document.activeElement===document.body&&_classPrivateFieldGet(x,this).focusMainContainer()},0),_classPrivateFieldGet(h,this)||this.addInkEditorIfNeeded(!1)}add(e){if(_assertClassBrand(f,this,g).call(this,e),_classPrivateFieldGet(x,this).addEditor(e),this.attach(e),!e.isAttachedToDOM){const t=e.render();this.div.append(t),e.isAttachedToDOM=!0}this.moveEditorInDOM(e),e.onceAdded(),this.addToAnnotationStorage(e)}moveEditorInDOM(e){var t;null===(t=_classPrivateFieldGet(o,this))||void 0===t||t.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addToAnnotationStorage(e){e.isEmpty()||this.annotationStorage.has(e.id)||this.annotationStorage.setValue(e.id,e)}addOrRebuild(e){e.needsToBeRebuilt()?e.rebuild():this.add(e)}addANewEditor(e){this.addCommands({cmd:()=>{this.addOrRebuild(e)},undo:()=>{e.remove()},mustExec:!0})}addUndoableEditor(e){this.addCommands({cmd:()=>{this.addOrRebuild(e)},undo:()=>{e.remove()},mustExec:!1})}getNextId(){return _classPrivateFieldGet(x,this).getId()}deserialize(e){switch(e.annotationType){case i.AnnotationEditorType.FREETEXT:return a.FreeTextEditor.deserialize(e,this);case i.AnnotationEditorType.INK:return r.InkEditor.deserialize(e,this)}return null}setSelected(e){_classPrivateFieldGet(x,this).setSelected(e)}toggleSelected(e){_classPrivateFieldGet(x,this).toggleSelected(e)}isSelected(e){return _classPrivateFieldGet(x,this).isSelected(e)}unselect(e){_classPrivateFieldGet(x,this).unselect(e)}pointerup(e){const t=s.KeyboardManager.platform.isMac;0!==e.button||e.ctrlKey&&t||e.target===this.div&&_classPrivateFieldGet(p,this)&&(_classPrivateFieldSet(p,this,!1),_classPrivateFieldGet(l,this)?_assertClassBrand(f,this,v).call(this,e):_classPrivateFieldSet(l,this,!0))}pointerdown(e){const t=s.KeyboardManager.platform.isMac;if(0!==e.button||e.ctrlKey&&t)return;if(e.target!==this.div)return;_classPrivateFieldSet(p,this,!0);const n=_classPrivateFieldGet(x,this).getActive();_classPrivateFieldSet(l,this,!n||n.isEmpty())}drop(e){const t=e.dataTransfer.getData("text/plain"),n=_classPrivateFieldGet(x,this).getEditor(t);if(!n)return;e.preventDefault(),e.dataTransfer.dropEffect="move",_assertClassBrand(f,this,g).call(this,n);const s=this.div.getBoundingClientRect(),i=e.clientX-s.x,a=e.clientY-s.y;n.translate(i-n.startX,a-n.startY),this.moveEditorInDOM(n),n.div.focus()}dragover(e){e.preventDefault()}destroy(){var e;(null===(e=_classPrivateFieldGet(x,this).getActive())||void 0===e?void 0:e.parent)===this&&_classPrivateFieldGet(x,this).setActiveEditor(null);for(const n of _classPrivateFieldGet(u,this).values()){var t;null===(t=_classPrivateFieldGet(o,this))||void 0===t||t.removePointerInTextLayer(n.contentDiv),n.isAttachedToDOM=!1,n.div.remove(),n.parent=null}this.div=null,_classPrivateFieldGet(u,this).clear(),_classPrivateFieldGet(x,this).removeLayer(this)}render(e){this.viewport=e.viewport,(0,s.bindEvents)(this,this.div,["dragover","drop"]),this.setDimensions();for(const t of _classPrivateFieldGet(x,this).getEditors(this.pageIndex))this.add(t);this.updateMode()}update(e){this.viewport=e.viewport,this.setDimensions(),this.updateMode()}get scaleFactor(){return this.viewport.scale}get pageDimensions(){const[e,t,n,s]=this.viewport.viewBox;return[n-e,s-t]}get viewportBaseDimensions(){const{width:e,height:t,rotation:n}=this.viewport;return n%180===0?[e,t]:[t,e]}setDimensions(){const{width:e,height:t,rotation:n}=this.viewport,s=n%180!==0,i=Math.floor(e)+"px",a=Math.floor(t)+"px";this.div.style.width=s?a:i,this.div.style.height=s?i:a,this.div.setAttribute("data-main-rotation",n)}}function g(e){var t;e.parent!==this&&(this.attach(e),e.pageIndex=this.pageIndex,null===(t=e.parent)||void 0===t||t.detach(e),e.parent=this,e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}function b(e){switch(_classPrivateFieldGet(x,this).getMode()){case i.AnnotationEditorType.FREETEXT:return new a.FreeTextEditor(e);case i.AnnotationEditorType.INK:return new r.InkEditor(e)}return null}function v(e){const t=this.getNextId(),n=_assertClassBrand(f,this,b).call(this,{parent:this,id:t,x:e.offsetX,y:e.offsetY});return n&&this.add(n),n}function w(){_classPrivateFieldSet(h,this,!0);for(const e of _classPrivateFieldGet(u,this).values())e.isEmpty()&&e.remove();_classPrivateFieldSet(h,this,!1)}_defineProperty(m,"_initialized",!1),t.AnnotationEditorLayer=m},(e,t,n)=>{var s;Object.defineProperty(t,"__esModule",{value:!0}),t.FreeTextEditor=void 0;var i=n(1),a=n(7),r=n(6),o=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,p=new WeakMap,h=new WeakMap,x=new WeakSet;class f extends r.AnnotationEditor{constructor(e){super(_objectSpread(_objectSpread({},e),{},{name:"freeTextEditor"})),_classPrivateMethodInitSpec(this,x),_classPrivateFieldInitSpec(this,o,this.editorDivBlur.bind(this)),_classPrivateFieldInitSpec(this,l,this.editorDivFocus.bind(this)),_classPrivateFieldInitSpec(this,c,this.editorDivKeydown.bind(this)),_classPrivateFieldInitSpec(this,d,void 0),_classPrivateFieldInitSpec(this,u,""),_classPrivateFieldInitSpec(this,p,!1),_classPrivateFieldInitSpec(this,h,void 0),_classPrivateFieldSet(d,this,e.color||f._defaultColor||r.AnnotationEditor._defaultLineColor),_classPrivateFieldSet(h,this,e.fontSize||f._defaultFontSize)}static initialize(e){this._l10nPromise=new Map(["free_text_default_content","editor_free_text_aria_label"].map(t=>[t,e.get(t)]));const t=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(t.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,t){switch(e){case i.AnnotationEditorParamsType.FREETEXT_SIZE:f._defaultFontSize=t;break;case i.AnnotationEditorParamsType.FREETEXT_COLOR:f._defaultColor=t}}updateParams(e,t){switch(e){case i.AnnotationEditorParamsType.FREETEXT_SIZE:_assertClassBrand(x,this,m).call(this,t);break;case i.AnnotationEditorParamsType.FREETEXT_COLOR:_assertClassBrand(x,this,g).call(this,t)}}static get defaultPropertiesToUpdate(){return[[i.AnnotationEditorParamsType.FREETEXT_SIZE,f._defaultFontSize],[i.AnnotationEditorParamsType.FREETEXT_COLOR,f._defaultColor||r.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[i.AnnotationEditorParamsType.FREETEXT_SIZE,_classPrivateFieldGet(h,this)],[i.AnnotationEditorParamsType.FREETEXT_COLOR,_classPrivateFieldGet(d,this)]]}getInitialTranslation(){return[-f._internalPadding*this.parent.scaleFactor,-(f._internalPadding+_classPrivateFieldGet(h,this))*this.parent.scaleFactor]}rebuild(){super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(i.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.enableEditing(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this.div.draggable=!1,this.editorDiv.addEventListener("keydown",_classPrivateFieldGet(c,this)),this.editorDiv.addEventListener("focus",_classPrivateFieldGet(l,this)),this.editorDiv.addEventListener("blur",_classPrivateFieldGet(o,this)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.disableEditing(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.draggable=!0,this.editorDiv.removeEventListener("keydown",_classPrivateFieldGet(c,this)),this.editorDiv.removeEventListener("focus",_classPrivateFieldGet(l,this)),this.editorDiv.removeEventListener("blur",_classPrivateFieldGet(o,this)),this.div.focus(),this.isEditing=!1)}focusin(e){super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus()}onceAdded(){this.width||(this.enableEditMode(),this.editorDiv.focus())}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent.setEditingState(!0),super.remove()}commit(){super.commit(),_classPrivateFieldGet(p,this)||(_classPrivateFieldSet(p,this,!0),this.parent.addUndoableEditor(this)),this.disableEditMode(),_classPrivateFieldSet(u,this,_assertClassBrand(x,this,b).call(this).trimEnd()),_assertClassBrand(x,this,v).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}dblclick(e){this.enableEditMode(),this.editorDiv.focus()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enableEditMode(),this.editorDiv.focus())}editorDivKeydown(e){f._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id","".concat(this.id,"-editor")),this.enableEditing(),f._l10nPromise.get("editor_free_text_aria_label").then(e=>{var t;return null===(t=this.editorDiv)||void 0===t?void 0:t.setAttribute("aria-label",e)}),f._l10nPromise.get("free_text_default_content").then(e=>{var t;return null===(t=this.editorDiv)||void 0===t?void 0:t.setAttribute("default-content",e)}),this.editorDiv.contentEditable=!0;const{style:n}=this.editorDiv;if(n.fontSize="calc(".concat(_classPrivateFieldGet(h,this),"px * var(--scale-factor))"),n.color=_classPrivateFieldGet(d,this),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,a.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[n,s]=this.parent.viewportBaseDimensions;this.setAt(e*n,t*s,this.width*n,this.height*s);for(const e of _classPrivateFieldGet(u,this).split("\n")){const t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(t)}this.div.draggable=!0,this.editorDiv.contentEditable=!1}else this.div.draggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(e,t){const n=super.deserialize(e,t);return _classPrivateFieldSet(h,n,e.fontSize),_classPrivateFieldSet(d,n,i.Util.makeHexColor(...e.color)),_classPrivateFieldSet(u,n,e.value),n}serialize(){if(this.isEmpty())return null;const e=f._internalPadding*this.parent.scaleFactor,t=this.getRect(e,e),n=r.AnnotationEditor._colorManager.convert(getComputedStyle(this.editorDiv).color);return{annotationType:i.AnnotationEditorType.FREETEXT,color:n,fontSize:_classPrivateFieldGet(h,this),value:_classPrivateFieldGet(u,this),pageIndex:this.parent.pageIndex,rect:t,rotation:this.rotation}}}function m(e){const t=e=>{this.editorDiv.style.fontSize="calc(".concat(e,"px * var(--scale-factor))"),this.translate(0,-(e-_classPrivateFieldGet(h,this))*this.parent.scaleFactor),_classPrivateFieldSet(h,this,e),_assertClassBrand(x,this,v).call(this)},n=_classPrivateFieldGet(h,this);this.parent.addCommands({cmd:()=>{t(e)},undo:()=>{t(n)},mustExec:!0,type:i.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}function g(e){const t=_classPrivateFieldGet(d,this);this.parent.addCommands({cmd:()=>{_classPrivateFieldSet(d,this,e),this.editorDiv.style.color=e},undo:()=>{_classPrivateFieldSet(d,this,t),this.editorDiv.style.color=t},mustExec:!0,type:i.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function b(){const e=this.editorDiv.getElementsByTagName("div");if(0===e.length)return this.editorDiv.innerText;const t=[];for(let n=0,s=e.length;n{var s;Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0,Object.defineProperty(t,"fitCurve",{enumerable:!0,get:function(){return r.fitCurve}});var i=n(1),a=n(6),r=n(25),o=n(7);const l=16;var c=new WeakMap,d=new WeakMap,u=new WeakMap,p=new WeakMap,h=new WeakMap,x=new WeakMap,f=new WeakMap,m=new WeakMap,g=new WeakMap,b=new WeakMap,v=new WeakMap,w=new WeakMap,C=new WeakMap,y=new WeakMap,j=new WeakSet;class k extends a.AnnotationEditor{constructor(e){super(_objectSpread(_objectSpread({},e),{},{name:"inkEditor"})),_classPrivateMethodInitSpec(this,j),_classPrivateFieldInitSpec(this,c,0),_classPrivateFieldInitSpec(this,d,0),_classPrivateFieldInitSpec(this,u,0),_classPrivateFieldInitSpec(this,p,this.canvasPointermove.bind(this)),_classPrivateFieldInitSpec(this,h,this.canvasPointerleave.bind(this)),_classPrivateFieldInitSpec(this,x,this.canvasPointerup.bind(this)),_classPrivateFieldInitSpec(this,f,this.canvasPointerdown.bind(this)),_classPrivateFieldInitSpec(this,m,!1),_classPrivateFieldInitSpec(this,g,!1),_classPrivateFieldInitSpec(this,b,null),_classPrivateFieldInitSpec(this,v,null),_classPrivateFieldInitSpec(this,w,0),_classPrivateFieldInitSpec(this,C,0),_classPrivateFieldInitSpec(this,y,null),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0}static initialize(e){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink_aria_label"].map(t=>[t,e.get(t)]))}static updateDefaultParams(e,t){switch(e){case i.AnnotationEditorParamsType.INK_THICKNESS:k._defaultThickness=t;break;case i.AnnotationEditorParamsType.INK_COLOR:k._defaultColor=t;break;case i.AnnotationEditorParamsType.INK_OPACITY:k._defaultOpacity=t/100}}updateParams(e,t){switch(e){case i.AnnotationEditorParamsType.INK_THICKNESS:_assertClassBrand(j,this,_).call(this,t);break;case i.AnnotationEditorParamsType.INK_COLOR:_assertClassBrand(j,this,N).call(this,t);break;case i.AnnotationEditorParamsType.INK_OPACITY:_assertClassBrand(j,this,L).call(this,t)}}static get defaultPropertiesToUpdate(){return[[i.AnnotationEditorParamsType.INK_THICKNESS,k._defaultThickness],[i.AnnotationEditorParamsType.INK_COLOR,k._defaultColor||a.AnnotationEditor._defaultLineColor],[i.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*k._defaultOpacity)]]}get propertiesToUpdate(){var e;return[[i.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||k._defaultThickness],[i.AnnotationEditorParamsType.INK_COLOR,this.color||k._defaultColor||a.AnnotationEditor._defaultLineColor],[i.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(null!==(e=this.opacity)&&void 0!==e?e:k._defaultOpacity))]]}rebuild(){super.rebuild(),null!==this.div&&(this.canvas||(_assertClassBrand(j,this,P).call(this),_assertClassBrand(j,this,O).call(this)),this.isAttachedToDOM||(this.parent.add(this),_assertClassBrand(j,this,D).call(this)),_assertClassBrand(j,this,W).call(this))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,_classPrivateFieldGet(v,this).disconnect(),_classPrivateFieldSet(v,this,null),super.remove())}enableEditMode(){_classPrivateFieldGet(m,this)||null===this.canvas||(super.enableEditMode(),this.div.draggable=!1,this.canvas.addEventListener("pointerdown",_classPrivateFieldGet(f,this)),this.canvas.addEventListener("pointerup",_classPrivateFieldGet(x,this)))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this.div.draggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",_classPrivateFieldGet(f,this)),this.canvas.removeEventListener("pointerup",_classPrivateFieldGet(x,this)))}onceAdded(){this.div.draggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}commit(){_classPrivateFieldGet(m,this)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),_classPrivateFieldSet(m,this,!0),this.div.classList.add("disabled"),_assertClassBrand(j,this,W).call(this,!0),this.parent.addInkEditorIfNeeded(!0),this.parent.moveEditorInDOM(this),this.div.focus())}focusin(e){super.focusin(e),this.enableEditMode()}canvasPointerdown(e){0===e.button&&this.isInEditMode()&&!_classPrivateFieldGet(m,this)&&(this.setInForeground(),"mouse"!==e.type&&this.div.focus(),e.stopPropagation(),this.canvas.addEventListener("pointerleave",_classPrivateFieldGet(h,this)),this.canvas.addEventListener("pointermove",_classPrivateFieldGet(p,this)),_assertClassBrand(j,this,M).call(this,e.offsetX,e.offsetY))}canvasPointermove(e){e.stopPropagation(),_assertClassBrand(j,this,T).call(this,e.offsetX,e.offsetY)}canvasPointerup(e){0===e.button&&this.isInEditMode()&&0!==this.currentPath.length&&(e.stopPropagation(),_assertClassBrand(j,this,R).call(this,e),this.setInBackground())}canvasPointerleave(e){_assertClassBrand(j,this,R).call(this,e),this.setInBackground()}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),k._l10nPromise.get("editor_ink_aria_label").then(e=>{var t;return null===(t=this.div)||void 0===t?void 0:t.setAttribute("aria-label",e)});const[n,s,i,a]=_assertClassBrand(j,this,S).call(this);if(this.setAt(n,s,0,0),this.setDims(i,a),_assertClassBrand(j,this,P).call(this),this.width){const[n,s]=this.parent.viewportBaseDimensions;this.setAt(e*n,t*s,this.width*n,this.height*s),_classPrivateFieldSet(g,this,!0),_assertClassBrand(j,this,D).call(this),this.setDims(this.width*n,this.height*s),_assertClassBrand(j,this,F).call(this),_assertClassBrand(j,this,G).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return _assertClassBrand(j,this,O).call(this),this.div}setDimensions(e,t){const n=Math.round(e),s=Math.round(t);if(_classPrivateFieldGet(w,this)===n&&_classPrivateFieldGet(C,this)===s)return;_classPrivateFieldSet(w,this,n),_classPrivateFieldSet(C,this,s),this.canvas.style.visibility="hidden",_classPrivateFieldGet(c,this)&&Math.abs(_classPrivateFieldGet(c,this)-e/t)>.01&&(t=Math.ceil(e/_classPrivateFieldGet(c,this)),this.setDims(e,t));const[i,a]=this.parent.viewportBaseDimensions;this.width=e/i,this.height=t/a,_classPrivateFieldGet(m,this)&&_assertClassBrand(j,this,I).call(this,e,t),_assertClassBrand(j,this,D).call(this),_assertClassBrand(j,this,F).call(this),this.canvas.style.visibility="visible"}static deserialize(e,t){const n=super.deserialize(e,t);n.thickness=e.thickness,n.color=i.Util.makeHexColor(...e.color),n.opacity=e.opacity;const[s,a]=t.pageDimensions,r=n.width*s,o=n.height*a,p=t.scaleFactor,h=e.thickness/2;_classPrivateFieldSet(c,n,r/o),_classPrivateFieldSet(m,n,!0),_classPrivateFieldSet(w,n,Math.round(r)),_classPrivateFieldSet(C,n,Math.round(o));for(const{bezier:i}of e.paths){const e=[];n.paths.push(e);let t=p*(i[0]-h),s=p*(o-i[1]-h);for(let n=2,r=i.length;n{this.thickness=e,_assertClassBrand(j,this,W).call(this)},undo:()=>{this.thickness=t,_assertClassBrand(j,this,W).call(this)},mustExec:!0,type:i.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}function N(e){const t=this.color;this.parent.addCommands({cmd:()=>{this.color=e,_assertClassBrand(j,this,F).call(this)},undo:()=>{this.color=t,_assertClassBrand(j,this,F).call(this)},mustExec:!0,type:i.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function L(e){e/=100;const t=this.opacity;this.parent.addCommands({cmd:()=>{this.opacity=e,_assertClassBrand(j,this,F).call(this)},undo:()=>{this.opacity=t,_assertClassBrand(j,this,F).call(this)},mustExec:!0,type:i.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}function S(){const{width:e,height:t,rotation:n}=this.parent.viewport;switch(n){case 90:return[0,e,e,t];case 180:return[e,t,e,t];case 270:return[t,0,e,t];default:return[0,0,e,t]}}function A(){this.ctx.lineWidth=this.thickness*this.parent.scaleFactor/this.scaleFactor,this.ctx.lineCap="round",this.ctx.lineJoin="round",this.ctx.miterLimit=10,this.ctx.strokeStyle="".concat(this.color).concat((0,o.opacityToHex)(this.opacity))}function M(e,t){var n;this.isEditing=!0,_classPrivateFieldGet(g,this)||(_classPrivateFieldSet(g,this,!0),_assertClassBrand(j,this,D).call(this),this.thickness||(this.thickness=s._defaultThickness),this.color||(this.color=s._defaultColor||a.AnnotationEditor._defaultLineColor),null!==(n=this.opacity)&&void 0!==n||(this.opacity=s._defaultOpacity)),this.currentPath.push([e,t]),_classPrivateFieldSet(b,this,null),_assertClassBrand(j,this,A).call(this),this.ctx.beginPath(),this.ctx.moveTo(e,t),_classPrivateFieldSet(y,this,()=>{_classPrivateFieldGet(y,this)&&(_classPrivateFieldGet(b,this)&&(this.isEmpty()?(this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height)):_assertClassBrand(j,this,F).call(this),this.ctx.lineTo(..._classPrivateFieldGet(b,this)),_classPrivateFieldSet(b,this,null),this.ctx.stroke()),window.requestAnimationFrame(_classPrivateFieldGet(y,this)))}),window.requestAnimationFrame(_classPrivateFieldGet(y,this))}function T(e,t){const[n,s]=this.currentPath.at(-1);e===n&&t===s||(this.currentPath.push([e,t]),_classPrivateFieldSet(b,this,[e,t]))}function E(e,t){this.ctx.closePath(),_classPrivateFieldSet(y,this,null),e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height);const[n,i]=this.currentPath.at(-1);let a;if(e===n&&t===i||this.currentPath.push([e,t]),1!==this.currentPath.length)a=(0,r.fitCurve)(this.currentPath,30,null);else{const n=[e,t];a=[[n,n.slice(),n.slice(),n]]}const o=H.call(s,a);this.currentPath.length=0,this.parent.addCommands({cmd:()=>{this.paths.push(a),this.bezierPath2D.push(o),this.rebuild()},undo:()=>{this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(_assertClassBrand(j,this,P).call(this),_assertClassBrand(j,this,O).call(this)),_assertClassBrand(j,this,W).call(this))},mustExec:!0})}function F(){if(this.isEmpty())return void _assertClassBrand(j,this,B).call(this);_assertClassBrand(j,this,A).call(this);const{canvas:e,ctx:t}=this;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),_assertClassBrand(j,this,B).call(this);for(const n of this.bezierPath2D)t.stroke(n)}function R(e){_assertClassBrand(j,this,E).call(this,e.offsetX,e.offsetY),this.canvas.removeEventListener("pointerleave",_classPrivateFieldGet(h,this)),this.canvas.removeEventListener("pointermove",_classPrivateFieldGet(p,this)),this.parent.addToAnnotationStorage(this)}function P(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",s._l10nPromise.get("editor_ink_canvas_aria_label").then(e=>{var t;return null===(t=this.canvas)||void 0===t?void 0:t.setAttribute("aria-label",e)}),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}function O(){_classPrivateFieldSet(v,this,new ResizeObserver(e=>{const t=e[0].contentRect;t.width&&t.height&&this.setDimensions(t.width,t.height)})),_classPrivateFieldGet(v,this).observe(this.div)}function D(){if(!_classPrivateFieldGet(g,this))return;const[e,t]=this.parent.viewportBaseDimensions;this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),_assertClassBrand(j,this,B).call(this)}function I(e,t){const n=_assertClassBrand(j,this,U).call(this),s=(e-n)/_classPrivateFieldGet(u,this),i=(t-n)/_classPrivateFieldGet(d,this);this.scaleFactor=Math.min(s,i)}function B(){const e=_assertClassBrand(j,this,U).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)}function H(e){const t=new Path2D;for(let n=0,s=e.length;n0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return;if(!_classPrivateFieldGet(m,this))return void _assertClassBrand(j,this,F).call(this);const t=_assertClassBrand(j,this,Y).call(this),n=_assertClassBrand(j,this,U).call(this);_classPrivateFieldSet(u,this,Math.max(l,t[2]-t[0])),_classPrivateFieldSet(d,this,Math.max(l,t[3]-t[1]));const s=Math.ceil(n+_classPrivateFieldGet(u,this)*this.scaleFactor),i=Math.ceil(n+_classPrivateFieldGet(d,this)*this.scaleFactor),[a,r]=this.parent.viewportBaseDimensions;this.width=s/a,this.height=i/r,_classPrivateFieldSet(c,this,s/i),_assertClassBrand(j,this,G).call(this);const o=this.translationX,p=this.translationY;this.translationX=-t[0],this.translationY=-t[1],_assertClassBrand(j,this,D).call(this),_assertClassBrand(j,this,F).call(this),_classPrivateFieldSet(w,this,s),_classPrivateFieldSet(C,this,i),this.setDims(s,i);const h=e?n/this.scaleFactor/2:0;this.translate(o-this.translationX-h,p-this.translationY-h)}function G(){const{style:e}=this.div;_classPrivateFieldGet(c,this)>=1?(e.minHeight="".concat(l,"px"),e.minWidth="".concat(Math.round(_classPrivateFieldGet(c,this)*l),"px")):(e.minWidth="".concat(l,"px"),e.minHeight="".concat(Math.round(l/_classPrivateFieldGet(c,this)),"px"))}s=k,_defineProperty(k,"_defaultColor",null),_defineProperty(k,"_defaultOpacity",1),_defineProperty(k,"_defaultThickness",1),_defineProperty(k,"_l10nPromise",void 0),_defineProperty(k,"_type","ink"),t.InkEditor=k},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fitCurve=void 0;const s=n(26);t.fitCurve=s},e=>{function t(e,i,a,r,o){var c,d,u,p,h,x,f,m,g,b,v,w,C;if(2===e.length)return w=l.vectorLen(l.subtract(e[0],e[1]))/3,[c=[e[0],l.addArrays(e[0],l.mulItems(i,w)),l.addArrays(e[1],l.mulItems(a,w)),e[1]]];if(d=function(e){var t,n,s,i=[];return e.forEach((e,a)=>{t=a?n+l.vectorLen(l.subtract(e,s)):0,i.push(t),n=t,s=e}),i=i.map(e=>e/n)}(e),[c,p,x]=n(e,d,d,i,a,o),0===p||p.9999&&e<1.0001)break}h=p,f=x}return v=[],(m=l.subtract(e[x-1],e[x+1])).every(e=>0===e)&&(m=l.subtract(e[x-1],e[x]),[m[0],m[1]]=[-m[1],m[0]]),g=l.normalize(m),b=l.mulItems(g,-1),v=(v=v.concat(t(e.slice(0,x+1),i,g,r,o))).concat(t(e.slice(x),b,a,r,o))}function n(e,t,n,s,i,o){var d,u,p;return d=function(e,t,n,s){var i,a,r,o,d,u,p,h,x,f,m,g,b,v,w,C,y,j=e[0],k=e[e.length-1];for(i=[j,null,null,k],a=l.zeros_Xx2x2(t.length),b=0,v=t.length;bi&&(i=s,o=u);return[i,o]}(e,d,t),o&&o({bez:d,points:e,params:t,maxErr:u,maxPoint:p}),[d,u,p]}function s(e,t,n){return n.map((n,s)=>i(e,t[s],n))}function i(e,t,n){var s=l.subtract(c.q(e,n),t),i=c.qprime(e,n),a=l.mulMatrix(s,i),r=l.sum(l.squareItems(i))+2*l.mulMatrix(s,c.qprimeprime(e,n));return 0===r?n:n-a/r}var a=function(e,t){for(var n,s=[0],i=e[0],a=0,r=1;r<=t;r++)n=c.q(e,r/t),a+=l.vectorLen(l.subtract(n,i)),s.push(a),i=n;return s=s.map(e=>e/a)};function r(e,t,n,s){if(t<0)return 0;if(t>1)return 1;for(var i,a,r,o,l=1;l<=s;l++)if(t<=n[l]){r=(l-1)/s,a=l/s,o=(t-(i=n[l-1]))/(n[l]-i)*(a-r)+r;break}return o}function o(e,t){return l.normalize(l.subtract(e,t))}class l{static zeros_Xx2x2(e){for(var t=[];e--;)t.push([0,0]);return t}static mulItems(e,t){return e.map(e=>e*t)}static mulMatrix(e,t){return e.reduce((e,n,s)=>e+n*t[s],0)}static subtract(e,t){return e.map((e,n)=>e-t[n])}static addArrays(e,t){return e.map((e,n)=>e+t[n])}static addItems(e,t){return e.map(e=>e+t)}static sum(e){return e.reduce((e,t)=>e+t)}static dot(e,t){return l.mulMatrix(e,t)}static vectorLen(e){return Math.hypot(...e)}static divItems(e,t){return e.map(e=>e/t)}static squareItems(e){return e.map(e=>e*e)}static normalize(e){return this.divItems(e,this.vectorLen(e))}}class c{static q(e,t){var n=1-t,s=l.mulItems(e[0],n*n*n),i=l.mulItems(e[1],3*n*n*t),a=l.mulItems(e[2],3*n*t*t),r=l.mulItems(e[3],t*t*t);return l.addArrays(l.addArrays(s,i),l.addArrays(a,r))}static qprime(e,t){var n=1-t,s=l.mulItems(l.subtract(e[1],e[0]),3*n*n),i=l.mulItems(l.subtract(e[2],e[1]),6*n*t),a=l.mulItems(l.subtract(e[3],e[2]),3*t*t);return l.addArrays(l.addArrays(s,i),a)}static qprimeprime(e,t){return l.addArrays(l.mulItems(l.addArrays(l.subtract(e[2],l.mulItems(e[1],2)),e[0]),6*(1-t)),l.mulItems(l.addArrays(l.subtract(e[3],l.mulItems(e[2],2)),e[1]),6*t))}}e.exports=function(e,n,s){if(!Array.isArray(e))throw new TypeError("First argument should be an array");if(e.forEach(t=>{if(!Array.isArray(t)||t.some(e=>"number"!==typeof e)||t.length!==e[0].length)throw Error("Each point should be an array of numbers. Each point should have the same amount of numbers.")}),(e=e.filter((t,n)=>0===n||!t.every((t,s)=>t===e[n-1][s]))).length<2)return[];const i=e.length,a=o(e[1],e[0]),r=o(e[i-2],e[i-1]);return t(e,a,r,n,s)},e.exports.fitCubic=t,e.exports.createTangent=o},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var s=n(1),i=n(8),a=n(5),r=n(28),o=n(29);const l=1e3,c=new WeakSet;function d(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class u{static create(e){switch(e.data.annotationType){case s.AnnotationType.LINK:return new h(e);case s.AnnotationType.TEXT:return new x(e);case s.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new m(e);case"Btn":return e.data.radioButton?new b(e):e.data.checkBox?new g(e):new v(e);case"Ch":return new w(e)}return new f(e);case s.AnnotationType.POPUP:return new C(e);case s.AnnotationType.FREETEXT:return new j(e);case s.AnnotationType.LINE:return new k(e);case s.AnnotationType.SQUARE:return new _(e);case s.AnnotationType.CIRCLE:return new N(e);case s.AnnotationType.POLYLINE:return new L(e);case s.AnnotationType.CARET:return new A(e);case s.AnnotationType.INK:return new M(e);case s.AnnotationType.POLYGON:return new S(e);case s.AnnotationType.HIGHLIGHT:return new T(e);case s.AnnotationType.UNDERLINE:return new E(e);case s.AnnotationType.SQUIGGLY:return new F(e);case s.AnnotationType.STRIKEOUT:return new R(e);case s.AnnotationType.STAMP:return new P(e);case s.AnnotationType.FILEATTACHMENT:return new O(e);default:return new p(e)}}}class p{constructor(e){let{isRenderable:t=!1,ignoreBorder:n=!1,createQuadrilaterals:s=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.page=e.page,this.viewport=e.viewport,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this._mouseState=e.mouseState,t&&(this.container=this._createContainer(n)),s&&(this.quadrilaterals=this._createQuadrilaterals(n))}_createContainer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.data,n=this.page,i=this.viewport,a=document.createElement("section"),{width:r,height:o}=d(t.rect),[l,c,u,p]=i.viewBox,h=u-l,x=p-c;a.setAttribute("data-annotation-id",t.id);const f=s.Util.normalizeRect([t.rect[0],n.view[3]-t.rect[1]+n.view[1],t.rect[2],n.view[3]-t.rect[3]+n.view[1]]);if(!e&&t.borderStyle.width>0){a.style.borderWidth="".concat(t.borderStyle.width,"px");const e=t.borderStyle.horizontalCornerRadius,n=t.borderStyle.verticalCornerRadius;if(e>0||n>0){const t="calc(".concat(e,"px * var(--scale-factor)) / calc(").concat(n,"px * var(--scale-factor))");a.style.borderRadius=t}else if(this instanceof b){const e="calc(".concat(r,"px * var(--scale-factor)) / calc(").concat(o,"px * var(--scale-factor))");a.style.borderRadius=e}switch(t.borderStyle.style){case s.AnnotationBorderStyleType.SOLID:a.style.borderStyle="solid";break;case s.AnnotationBorderStyleType.DASHED:a.style.borderStyle="dashed";break;case s.AnnotationBorderStyleType.BEVELED:(0,s.warn)("Unimplemented border style: beveled");break;case s.AnnotationBorderStyleType.INSET:(0,s.warn)("Unimplemented border style: inset");break;case s.AnnotationBorderStyleType.UNDERLINE:a.style.borderBottomStyle="solid"}const i=t.borderColor||null;i?a.style.borderColor=s.Util.makeHexColor(0|i[0],0|i[1],0|i[2]):a.style.borderWidth=0}a.style.left="".concat(100*(f[0]-l)/h,"%"),a.style.top="".concat(100*(f[1]-c)/x,"%");const{rotation:m}=t;return t.hasOwnCanvas||0===m?(a.style.width="".concat(100*r/h,"%"),a.style.height="".concat(100*o/x,"%")):this.setRotation(m,a),a}setRotation(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;const[n,s,i,a]=this.viewport.viewBox,r=i-n,o=a-s,{width:l,height:c}=d(this.data.rect);let u,p;e%180===0?(u=100*l/r,p=100*c/o):(u=100*c/r,p=100*l/o),t.style.width="".concat(u,"%"),t.style.height="".concat(p,"%"),t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(e,t,n)=>{const s=n.detail[e];n.target.style[t]=r.ColorConverters["".concat(s[0],"_HTML")](s.slice(1))};return(0,s.shadow)(this,"_commonActions",{display:e=>{const t=e.detail.display%2===1;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:t,print:0===e.detail.display||3===e.detail.display})},print:e=>{this.annotationStorage.setValue(this.data.id,{print:e.detail.print})},hidden:e=>{this.container.style.visibility=e.detail.hidden?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:e.detail.hidden})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.detail.readonly?e.target.setAttribute("readonly",""):e.target.removeAttribute("readonly")},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:e=>{const t=e.detail.rotation;this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(e,t){const n=this._commonActions;for(const s of Object.keys(t.detail)){const i=e[s]||n[s];i&&i(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const n=this._commonActions;for(const[s,i]of Object.entries(t)){const a=n[s];a&&(a({detail:{[s]:i},target:e}),delete t[s])}}_createQuadrilaterals(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.data.quadPoints)return null;const t=[],n=this.data.rect;for(const s of this.data.quadPoints)this.data.rect=[s[2].x,s[2].y,s[1].x,s[1].y],t.push(this._createContainer(e));return this.data.rect=n,t}_createPopup(e,t){let n=this.container;this.quadrilaterals&&(e=e||this.quadrilaterals,n=this.quadrilaterals[0]),e||((e=document.createElement("div")).className="popupTriggerArea",n.append(e));const s=new y({container:n,trigger:e,color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,hideWrapper:!0}).render();s.style.left="100%",n.append(s)}_renderQuadrilaterals(e){for(const t of this.quadrilaterals)t.className=e;return this.quadrilaterals}render(){(0,s.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[];if(this._fieldObjects){const i=this._fieldObjects[e];if(i)for(const{page:e,id:a,exportValues:r}of i){if(-1===e)continue;if(a===t)continue;const i="string"===typeof r?r:null,o=document.querySelector('[data-element-id="'.concat(a,'"]'));!o||c.has(o)?n.push({id:a,exportValue:i,domElement:o}):(0,s.warn)("_getElementsByName - element not allowed: ".concat(a))}return n}for(const s of document.getElementsByName(e)){const{id:e,exportValue:i}=s;e!==t&&c.has(s)&&n.push({id:e,exportValue:i,domElement:s})}return n}static get platform(){const e="undefined"!==typeof navigator?navigator.platform:"";return(0,s.shadow)(this,"platform",{isWin:e.includes("Win"),isMac:e.includes("Mac")})}}class h extends p{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(e,{isRenderable:!0,ignoreBorder:!(null===t||void 0===t||!t.ignoreBorder),createQuadrilaterals:!0}),this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:t}=this,n=document.createElement("a");n.setAttribute("data-element-id",e.id);let s=!1;return e.url?(t.addLinkAttributes(n,e.url,e.newWindow),s=!0):e.action?(this._bindNamedAction(n,e.action),s=!0):e.dest?(this._bindLink(n,e.dest),s=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(n,e),s=!0),e.resetForm?(this._bindResetFormAction(n,e.resetForm),s=!0):this.isTooltipOnly&&!s&&(this._bindLink(n,""),s=!0)),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map((e,t)=>{const s=0===t?n:n.cloneNode();return e.append(s),e}):(this.container.className="linkAnnotation",s&&this.container.append(n),this.container)}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&(e.className="internalLink")}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),e.className="internalLink"}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");const n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const s of Object.keys(t.actions)){const i=n.get(s);i&&(e[i]=()=>{var e;return null===(e=this.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:s}}),!1})}e.onclick||(e.onclick=()=>!1),e.className="internalLink"}_bindResetFormAction(e,t){const n=e.onclick;if(n||(e.href=this.linkService.getAnchorUrl("")),e.className="internalLink",!this._fieldObjects)return(0,s.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(n||(e.onclick=()=>!1));e.onclick=()=>{n&&n();const{fields:e,refs:i,include:a}=t,r=[];if(0!==e.length||0!==i.length){const t=new Set(i);for(const n of e){const e=this._fieldObjects[n]||[];for(const{id:n}of e)t.add(n)}for(const e of Object.values(this._fieldObjects))for(const n of e)t.has(n.id)===a&&r.push(n)}else for(const t of Object.values(this._fieldObjects))r.push(...t);const o=this.annotationStorage,l=[];for(const t of r){const{id:e}=t;switch(l.push(e),t.type){case"text":{const n=t.defaultValue||"";o.setValue(e,{value:n});break}case"checkbox":case"radiobutton":{const n=t.defaultValue===t.exportValues;o.setValue(e,{value:n});break}case"combobox":case"listbox":{const n=t.defaultValue||"";o.setValue(e,{value:n});break}default:continue}const n=document.querySelector('[data-element-id="'.concat(e,'"]'));n&&(c.has(n)?n.dispatchEvent(new Event("resetform")):(0,s.warn)("_bindResetFormAction - element not allowed: ".concat(e)))}var d;return this.enableScripting&&(null===(d=this.linkService.eventBus)||void 0===d||d.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:l,name:"ResetForm"}})),!1}}}class x extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str)})}render(){this.container.className="textAnnotation";const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(e,this.data),this.container.append(e),this.container}}class f extends p{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}_getKeyModifier(e){const{isWin:t,isMac:n}=p.platform;return t&&e.ctrlKey||n&&e.metaKey}_setEventListener(e,t,n,s){t.includes("mouse")?e.addEventListener(t,e=>{var t;null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:s(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})}):e.addEventListener(t,e=>{var t;null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:s(e)}})})}_setEventListeners(e,t,n){for(const[i,a]of t){var s;("Action"===a||null!==(s=this.data.actions)&&void 0!==s&&s[a])&&this._setEventListener(e,i,a,n)}}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":s.Util.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],{fontColor:n}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||9,a=e.style;let r;if(this.data.multiLine){const e=Math.abs(this.data.rect[3]-this.data.rect[1]),t=e/(Math.round(e/(s.LINE_FACTOR*i))||1);r=Math.min(i,Math.round(t/s.LINE_FACTOR))}else{const e=Math.abs(this.data.rect[3]-this.data.rect[1]);r=Math.min(i,Math.round(e/s.LINE_FACTOR))}a.fontSize="calc(".concat(r,"px * var(--scale-factor))"),a.color=s.Util.makeHexColor(n[0],n[1],n[2]),null!==this.data.textAlignment&&(a.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class m extends f{constructor(e){super(e,{isRenderable:e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,n,s){const i=this.annotationStorage;for(const a of this._getElementsByName(e.name,e.id))a.domElement&&(a.domElement[t]=n),i.setValue(a.id,{[s]:n})}render(){const e=this.annotationStorage,t=this.data.id;this.container.className="textWidgetAnnotation";let n=null;if(this.renderForms){const i=e.getValue(t,{value:this.data.fieldValue});let a=i.formattedValue||i.value||"";const r=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;r&&a.length>r&&(a=a.slice(0,r));const o={userValue:a,formattedValue:null,valueOnFocus:""};this.data.multiLine?(n=document.createElement("textarea"),n.textContent=a,this.data.doNotScroll&&(n.style.overflowY="hidden")):(n=document.createElement("input"),n.type="text",n.setAttribute("value",a),this.data.doNotScroll&&(n.style.overflowX="hidden")),c.add(n),n.setAttribute("data-element-id",t),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=l,this._setRequired(n,this.data.required),r&&(n.maxLength=r),n.addEventListener("input",s=>{e.setValue(t,{value:s.target.value}),this.setPropertyOnSiblings(n,"value",s.target.value,"value")}),n.addEventListener("resetform",e=>{var t;const s=null!==(t=this.data.defaultFieldValue)&&void 0!==t?t:"";n.value=o.userValue=s,o.formattedValue=null});let d=e=>{const{formattedValue:t}=o;null!==t&&void 0!==t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var s;n.addEventListener("focus",e=>{o.userValue&&(e.target.value=o.userValue),o.valueOnFocus=e.target.value}),n.addEventListener("updatefromsandbox",n=>{const s={value(n){var s;o.userValue=null!==(s=n.detail.value)&&void 0!==s?s:"",e.setValue(t,{value:o.userValue.toString()}),n.target.value=o.userValue},formattedValue(n){const{formattedValue:s}=n.detail;o.formattedValue=s,null!==s&&void 0!==s&&n.target!==document.activeElement&&(n.target.value=s),e.setValue(t,{formattedValue:s})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:n=>{var s;const{charLimit:i}=n.detail,{target:a}=n;if(0===i)return void a.removeAttribute("maxLength");a.setAttribute("maxLength",i);let r=o.userValue;!r||r.length<=i||(r=r.slice(0,i),a.value=o.userValue=r,e.setValue(t,{value:r}),null===(s=this.linkService.eventBus)||void 0===s||s.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:r,willCommit:!0,commitKey:1,selStart:a.selectionStart,selEnd:a.selectionEnd}}))}};this._dispatchEventFromSandbox(s,n)}),n.addEventListener("keydown",e=>{var n;let s=-1;if("Escape"===e.key?s=0:"Enter"===e.key?s=2:"Tab"===e.key&&(s=3),-1===s)return;const{value:i}=e.target;o.valueOnFocus!==i&&(o.userValue=i,null===(n=this.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:i,willCommit:!0,commitKey:s,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))});const i=d;d=null,n.addEventListener("blur",e=>{const{value:n}=e.target;var s;o.userValue=n,this._mouseState.isDown&&o.valueOnFocus!==n&&(null===(s=this.linkService.eventBus)||void 0===s||s.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:n,willCommit:!0,commitKey:1,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}})),i(e)}),null!==(s=this.data.actions)&&void 0!==s&&s.Keystroke&&n.addEventListener("beforeinput",e=>{var n;const{data:s,target:i}=e,{value:a,selectionStart:r,selectionEnd:o}=i;let l=r,c=o;switch(e.inputType){case"deleteWordBackward":{const e=a.substring(0,r).match(/\w*[^\w]*$/);e&&(l-=e[0].length);break}case"deleteWordForward":{const e=a.substring(r).match(/^[^\w]*\w*/);e&&(c+=e[0].length);break}case"deleteContentBackward":r===o&&(l-=1);break;case"deleteContentForward":r===o&&(c+=1)}e.preventDefault(),null===(n=this.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:a,change:s||"",willCommit:!1,selStart:l,selEnd:c}})}),this._setEventListeners(n,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.value)}if(d&&n.addEventListener("blur",d),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/r;n.classList.add("comb"),n.style.letterSpacing="calc(".concat(e,"px * var(--scale-factor) - 1ch)")}}else n=document.createElement("div"),n.textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell";return this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class g extends f{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,n=t.id;let s=e.getValue(n,{value:t.exportValue===t.fieldValue}).value;"string"===typeof s&&(s="Off"!==s,e.setValue(n,{value:s})),this.container.className="buttonWidgetAnnotation checkBox";const i=document.createElement("input");return c.add(i),i.setAttribute("data-element-id",n),i.disabled=t.readOnly,this._setRequired(i,this.data.required),i.type="checkbox",i.name=t.fieldName,s&&i.setAttribute("checked",!0),i.setAttribute("exportValue",t.exportValue),i.tabIndex=l,i.addEventListener("change",s=>{const{name:i,checked:a}=s.target;for(const r of this._getElementsByName(i,n)){const n=a&&r.exportValue===t.exportValue;r.domElement&&(r.domElement.checked=n),e.setValue(r.id,{value:n})}e.setValue(n,{value:a})}),i.addEventListener("resetform",e=>{const n=t.defaultFieldValue||"Off";e.target.checked=n===t.exportValue}),this.enableScripting&&this.hasJSActions&&(i.addEventListener("updatefromsandbox",t=>{const s={value(t){t.target.checked="Off"!==t.detail.value,e.setValue(n,{value:t.target.checked})}};this._dispatchEventFromSandbox(s,t)}),this._setEventListeners(i,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.checked)),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class b extends f{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.className="buttonWidgetAnnotation radioButton";const e=this.annotationStorage,t=this.data,n=t.id;let s=e.getValue(n,{value:t.fieldValue===t.buttonValue}).value;"string"===typeof s&&(s=s!==t.buttonValue,e.setValue(n,{value:s}));const i=document.createElement("input");if(c.add(i),i.setAttribute("data-element-id",n),i.disabled=t.readOnly,this._setRequired(i,this.data.required),i.type="radio",i.name=t.fieldName,s&&i.setAttribute("checked",!0),i.tabIndex=l,i.addEventListener("change",t=>{const{name:s,checked:i}=t.target;for(const a of this._getElementsByName(s,n))e.setValue(a.id,{value:!1});e.setValue(n,{value:i})}),i.addEventListener("resetform",e=>{const n=t.defaultFieldValue;e.target.checked=null!==n&&void 0!==n&&n===t.buttonValue}),this.enableScripting&&this.hasJSActions){const s=t.buttonValue;i.addEventListener("updatefromsandbox",t=>{const i={value:t=>{const i=s===t.detail.value;for(const s of this._getElementsByName(t.target.name)){const t=i&&s.id===n;s.domElement&&(s.domElement.checked=t),e.setValue(s.id,{value:t})}}};this._dispatchEventFromSandbox(i,t)}),this._setEventListeners(i,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.checked)}return this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class v extends h{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(e.title=this.data.alternativeText);const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",e=>{this._dispatchEventFromSandbox({},e)})),e}}class w extends f{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.className="choiceWidgetAnnotation";const e=this.annotationStorage,t=this.data.id,n=e.getValue(t,{value:this.data.fieldValue}),s=document.createElement("select");c.add(s),s.setAttribute("data-element-id",t),s.disabled=this.data.readOnly,this._setRequired(s,this.data.required),s.name=this.data.fieldName,s.tabIndex=l;let i=this.data.combo&&this.data.options.length>0;this.data.combo||(s.size=this.data.options.length,this.data.multiSelect&&(s.multiple=!0)),s.addEventListener("resetform",e=>{const t=this.data.defaultFieldValue;for(const n of s.options)n.selected=n.value===t});for(const l of this.data.options){const e=document.createElement("option");e.textContent=l.displayValue,e.value=l.exportValue,n.value.includes(l.exportValue)&&(e.setAttribute("selected",!0),i=!1),s.append(e)}let a=null;if(i){const e=document.createElement("option");e.value=" ",e.setAttribute("hidden",!0),e.setAttribute("selected",!0),s.prepend(e),a=()=>{e.remove(),s.removeEventListener("input",a),a=null},s.addEventListener("input",a)}const r=(e,t)=>{const n=t?"value":"textContent",s=e.target.options;return e.target.multiple?Array.prototype.filter.call(s,e=>e.selected).map(e=>e[n]):-1===s.selectedIndex?null:s[s.selectedIndex][n]},o=e=>{const t=e.target.options;return Array.prototype.map.call(t,e=>({displayValue:e.textContent,exportValue:e.value}))};return this.enableScripting&&this.hasJSActions?(s.addEventListener("updatefromsandbox",n=>{const i={value(n){var i;null===(i=a)||void 0===i||i();const o=n.detail.value,l=new Set(Array.isArray(o)?o:[o]);for(const e of s.options)e.selected=l.has(e.value);e.setValue(t,{value:r(n,!0)})},multipleSelection(e){s.multiple=!0},remove(n){const i=s.options,a=n.detail.remove;i[a].selected=!1,s.remove(a),i.length>0&&-1===Array.prototype.findIndex.call(i,e=>e.selected)&&(i[0].selected=!0),e.setValue(t,{value:r(n,!0),items:o(n)})},clear(n){for(;0!==s.length;)s.remove(0);e.setValue(t,{value:null,items:[]})},insert(n){const{index:i,displayValue:a,exportValue:l}=n.detail.insert,c=s.children[i],d=document.createElement("option");d.textContent=a,d.value=l,c?c.before(d):s.append(d),e.setValue(t,{value:r(n,!0),items:o(n)})},items(n){const{items:i}=n.detail;for(;0!==s.length;)s.remove(0);for(const e of i){const{displayValue:t,exportValue:n}=e,i=document.createElement("option");i.textContent=t,i.value=n,s.append(i)}s.options.length>0&&(s.options[0].selected=!0),e.setValue(t,{value:r(n,!0),items:o(n)})},indices(n){const s=new Set(n.detail.indices);for(const e of n.target.options)e.selected=s.has(e.index);e.setValue(t,{value:r(n,!0)})},editable(e){e.target.disabled=!e.detail.editable}};this._dispatchEventFromSandbox(i,n)}),s.addEventListener("input",n=>{var s;const i=r(n,!0),a=r(n,!1);e.setValue(t,{value:i}),null===(s=this.linkService.eventBus)||void 0===s||s.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:a,changeEx:i,willCommit:!0,commitKey:1,keyDown:!1}})}),this._setEventListeners(s,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],e=>e.target.checked)):s.addEventListener("input",function(n){e.setValue(t,{value:r(n,!0)})}),this.data.combo&&this._setTextStyle(s),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class C extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str)})}render(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;const e='[data-annotation-id="'.concat(this.data.parentId,'"]'),t=this.layer.querySelectorAll(e);if(0===t.length)return this.container;const n=new y({container:this.container,trigger:Array.from(t),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),i=this.page,a=s.Util.normalizeRect([this.data.parentRect[0],i.view[3]-this.data.parentRect[1]+i.view[1],this.data.parentRect[2],i.view[3]-this.data.parentRect[3]+i.view[1]]),r=a[0]+this.data.parentRect[2]-this.data.parentRect[0],o=a[1],[l,c,d,u]=this.viewport.viewBox,p=d-l,h=u-c;return this.container.style.left="".concat(100*(r-l)/p,"%"),this.container.style.top="".concat(100*(o-c)/h,"%"),this.container.append(n.render()),this.container}}class y{constructor(e){this.container=e.container,this.trigger=e.trigger,this.color=e.color,this.titleObj=e.titleObj,this.modificationDate=e.modificationDate,this.contentsObj=e.contentsObj,this.richText=e.richText,this.hideWrapper=e.hideWrapper||!1,this.pinned=!1}render(){var e,t;const n=document.createElement("div");n.className="popupWrapper",this.hideElement=this.hideWrapper?n:this.container,this.hideElement.hidden=!0;const a=document.createElement("div");a.className="popup";const r=this.color;if(r){const e=.7*(255-r[0])+r[0],t=.7*(255-r[1])+r[1],n=.7*(255-r[2])+r[2];a.style.backgroundColor=s.Util.makeHexColor(0|e,0|t,0|n)}const l=document.createElement("h1");l.dir=this.titleObj.dir,l.textContent=this.titleObj.str,a.append(l);const c=i.PDFDateString.toDateObject(this.modificationDate);if(c){const e=document.createElement("span");e.className="popupDate",e.textContent="{{date}}, {{time}}",e.dataset.l10nId="annotation_date_string",e.dataset.l10nArgs=JSON.stringify({date:c.toLocaleDateString(),time:c.toLocaleTimeString()}),a.append(e)}if(null===(e=this.richText)||void 0===e||!e.str||null!==(t=this.contentsObj)&&void 0!==t&&t.str&&this.contentsObj.str!==this.richText.str){const e=this._formatContents(this.contentsObj);a.append(e)}else o.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:a}),a.lastChild.className="richText popupContent";Array.isArray(this.trigger)||(this.trigger=[this.trigger]);for(const s of this.trigger)s.addEventListener("click",this._toggle.bind(this)),s.addEventListener("mouseover",this._show.bind(this,!1)),s.addEventListener("mouseout",this._hide.bind(this,!1));return a.addEventListener("click",this._hide.bind(this,!0)),n.append(a),n}_formatContents(e){let{str:t,dir:n}=e;const s=document.createElement("p");s.className="popupContent",s.dir=n;const i=t.split(/(?:\r\n?|\n)/);for(let a=0,r=i.length;a0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex=parseInt(this.container.style.zIndex)+1e3)}_hide(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hidden||this.pinned||(this.hideElement.hidden=!0,this.container.style.zIndex=parseInt(this.container.style.zIndex)-1e3)}}class j extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str),ignoreBorder:!0}),this.textContent=e.data.textContent}render(){if(this.container.className="freeTextAnnotation",this.textContent){const e=document.createElement("div");e.className="annotationTextContent",e.setAttribute("role","comment");for(const t of this.textContent){const n=document.createElement("span");n.textContent=t,e.append(n)}this.container.append(e)}return this.data.hasPopup||this._createPopup(null,this.data),this.container}}class k extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str),ignoreBorder:!0})}render(){this.container.className="lineAnnotation";const e=this.data,{width:t,height:n}=d(e.rect),s=this.svgFactory.create(t,n,!0),i=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),i.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),i.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),i.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),s.append(i),this.container.append(s),this._createPopup(i,e),this.container}}class _ extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str),ignoreBorder:!0})}render(){this.container.className="squareAnnotation";const e=this.data,{width:t,height:n}=d(e.rect),s=this.svgFactory.create(t,n,!0),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:rect");return a.setAttribute("x",i/2),a.setAttribute("y",i/2),a.setAttribute("width",t-i),a.setAttribute("height",n-i),a.setAttribute("stroke-width",i||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),s.append(a),this.container.append(s),this._createPopup(a,e),this.container}}class N extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str),ignoreBorder:!0})}render(){this.container.className="circleAnnotation";const e=this.data,{width:t,height:n}=d(e.rect),s=this.svgFactory.create(t,n,!0),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:ellipse");return a.setAttribute("cx",t/2),a.setAttribute("cy",n/2),a.setAttribute("rx",t/2-i/2),a.setAttribute("ry",n/2-i/2),a.setAttribute("stroke-width",i||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),s.append(a),this.container.append(s),this._createPopup(a,e),this.container}}class L extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str),ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const e=this.data,{width:t,height:n}=d(e.rect),s=this.svgFactory.create(t,n,!0);let i=[];for(const r of e.vertices){const t=r.x-e.rect[0],n=e.rect[3]-r.y;i.push(t+","+n)}i=i.join(" ");const a=this.svgFactory.createElement(this.svgElementName);return a.setAttribute("points",i),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),s.append(a),this.container.append(s),this._createPopup(a,e),this.container}}class S extends L{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class A extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str),ignoreBorder:!0})}render(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class M extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str),ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const e=this.data,{width:t,height:n}=d(e.rect),s=this.svgFactory.create(t,n,!0);for(const i of e.inkLists){let t=[];for(const s of i){const n=s.x-e.rect[0],i=e.rect[3]-s.y;t.push("".concat(n,",").concat(i))}t=t.join(" ");const n=this.svgFactory.createElement(this.svgElementName);n.setAttribute("points",t),n.setAttribute("stroke-width",e.borderStyle.width||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),this._createPopup(n,e),s.append(n)}return this.container.append(s),this.container}}class T extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}class E extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}class F extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}class R extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}class P extends p{constructor(e){var t,n,s;super(e,{isRenderable:!!(e.data.hasPopup||null!==(t=e.data.titleObj)&&void 0!==t&&t.str||null!==(n=e.data.contentsObj)&&void 0!==n&&n.str||null!==(s=e.data.richText)&&void 0!==s&&s.str),ignoreBorder:!0})}render(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class O extends p{constructor(e){var t;super(e,{isRenderable:!0});const{filename:n,content:s}=this.data.file;this.filename=(0,i.getFilenameFromUrl)(n),this.content=s,null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("fileattachmentannotation",{source:this,filename:n,content:s})}render(){var e,t;this.container.className="fileAttachmentAnnotation";const n=document.createElement("div");return n.className="popupTriggerArea",n.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&(null!==(e=this.data.titleObj)&&void 0!==e&&e.str||null!==(t=this.data.contentsObj)&&void 0!==t&&t.str||this.data.richText)&&this._createPopup(n,this.data),this.container.append(n),this.container}_download(){var e;null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,this.content,this.filename)}}class D{static render(e){const{annotations:t,div:n,viewport:r,accessibilityManager:o}=e;_assertClassBrand(D,this,B).call(this,n,r);let l=0;for(const c of t){if(c.annotationType!==s.AnnotationType.POPUP){const{width:e,height:t}=d(c.rect);if(e<=0||t<=0)continue}const t=u.create({data:c,layer:n,page:e.page,viewport:r,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new i.DOMSVGFactory,annotationStorage:e.annotationStorage||new a.AnnotationStorage,enableScripting:e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,mouseState:e.mouseState||{isDown:!1}});if(t.isRenderable){const e=t.render();if(c.hidden&&(e.style.visibility="hidden"),Array.isArray(e))for(const t of e)t.style.zIndex=l++,I.call(D,t,c.id,n,o);else e.style.zIndex=l++,t instanceof C?n.prepend(e):I.call(D,e,c.id,n,o)}}_assertClassBrand(D,this,H).call(this,n,e.annotationCanvasMap)}static update(e){const{annotationCanvasMap:t,div:n,viewport:s}=e;_assertClassBrand(D,this,B).call(this,n,s),_assertClassBrand(D,this,H).call(this,n,t),n.hidden=!1}}function I(e,t,n,s){const a=e.firstChild||e;a.id="".concat(i.AnnotationPrefix).concat(t),n.append(e),null===s||void 0===s||s.moveElementInDOM(n,e,a,!1)}function B(e,t){let{width:n,height:s,rotation:i}=t;const{style:a}=e,r=i%180!==0,o=Math.floor(n)+"px",l=Math.floor(s)+"px";a.width=r?l:o,a.height=r?o:l,e.setAttribute("data-main-rotation",i)}function H(e,t){if(t){for(const[n,s]of t){const t=e.querySelector('[data-annotation-id="'.concat(n,'"]'));if(!t)continue;const{firstChild:i}=t;i?"CANVAS"===i.nodeName?i.replaceWith(s):i.before(s):t.append(s)}t.clear()}}t.AnnotationLayer=D},(e,t)=>{function n(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0,t.ColorConverters=class{static CMYK_G(e){let[t,n,s,i]=e;return["G",1-Math.min(1,.3*t+.59*s+.11*n+i)]}static G_CMYK(e){let[t]=e;return["CMYK",0,0,0,1-t]}static G_RGB(e){let[t]=e;return["RGB",t,t,t]}static G_HTML(e){let[t]=e;const s=n(t);return"#".concat(s).concat(s).concat(s)}static RGB_G(e){let[t,n,s]=e;return["G",.3*t+.59*n+.11*s]}static RGB_HTML(e){let[t,s,i]=e;const a=n(t),r=n(s),o=n(i);return"#".concat(a).concat(r).concat(o)}static T_HTML(){return"#00000000"}static CMYK_RGB(e){let[t,n,s,i]=e;return["RGB",1-Math.min(1,t+i),1-Math.min(1,s+i),1-Math.min(1,n+i)]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK(e){let[t,n,s]=e;const i=1-t,a=1-n,r=1-s;return["CMYK",i,a,r,Math.min(i,a,r)]}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var s=n(20);t.XfaLayer=class{static setupStorage(e,t,n,s,i){const a=s.getValue(t,{value:null});switch(n.name){case"textarea":if(null!==a.value&&(e.textContent=a.value),"print"===i)break;e.addEventListener("input",e=>{s.setValue(t,{value:e.target.value})});break;case"input":if("radio"===n.attributes.type||"checkbox"===n.attributes.type){if(a.value===n.attributes.xfaOn?e.setAttribute("checked",!0):a.value===n.attributes.xfaOff&&e.removeAttribute("checked"),"print"===i)break;e.addEventListener("change",e=>{s.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})})}else{if(null!==a.value&&e.setAttribute("value",a.value),"print"===i)break;e.addEventListener("input",e=>{s.setValue(t,{value:e.target.value})})}break;case"select":if(null!==a.value)for(const e of n.children)e.attributes.value===a.value&&(e.attributes.selected=!0);e.addEventListener("input",e=>{const n=e.target.options,i=-1===n.selectedIndex?"":n[n.selectedIndex].value;s.setValue(t,{value:i})})}}static setAttributes(e){let{html:t,element:n,storage:s=null,intent:i,linkService:a}=e;const{attributes:r}=n,o=t instanceof HTMLAnchorElement;"radio"===r.type&&(r.name="".concat(r.name,"-").concat(i));for(const[l,c]of Object.entries(r))if(null!==c&&void 0!==c)switch(l){case"class":c.length&&t.setAttribute(l,c.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",c);break;case"style":Object.assign(t.style,c);break;case"textContent":t.textContent=c;break;default:(!o||"href"!==l&&"newWindow"!==l)&&t.setAttribute(l,c)}o&&a.addLinkAttributes(t,r.href,r.newWindow),s&&r.dataId&&this.setupStorage(t,r.dataId,n,s)}static render(e){const t=e.annotationStorage,n=e.linkService,i=e.xfaHtml,a=e.intent||"display",r=document.createElement(i.name);i.attributes&&this.setAttributes({html:r,element:i,intent:a,linkService:n});const o=[[i,-1,r]],l=e.div;if(l.append(r),e.viewport){const t="matrix(".concat(e.viewport.transform.join(","),")");l.style.transform=t}"richText"!==a&&l.setAttribute("class","xfaLayer xfaFont");const c=[];for(;o.length>0;){var d;const[e,i,r]=o.at(-1);if(i+1===e.children.length){o.pop();continue}const l=e.children[++o.at(-1)[1]];if(null===l)continue;const{name:u}=l;if("#text"===u){const e=document.createTextNode(l.value);c.push(e),r.append(e);continue}let p;if(p=null!==l&&void 0!==l&&null!==(d=l.attributes)&&void 0!==d&&d.xmlns?document.createElementNS(l.attributes.xmlns,u):document.createElement(u),r.append(p),l.attributes&&this.setAttributes({html:p,element:l,storage:t,intent:a,linkService:n}),l.children&&l.children.length>0)o.push([l,-1,p]);else if(l.value){const e=document.createTextNode(l.value);s.XfaText.shouldBuildText(u)&&c.push(e),p.append(e)}}for(const s of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))s.setAttribute("readOnly",!0);return{textDivs:c}}static update(e){const t="matrix(".concat(e.viewport.transform.join(","),")");e.div.style.transform=t,e.div.hidden=!1}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=function(e){const t=new h({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t};var s=n(1),i=n(8);const a=30,r=new Map,o=/^\s+$/g;function l(e,t,n,i){const l=document.createElement("span"),c=e._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1,fontSize:0}:{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0};e._textDivs.push(l);const d=s.Util.transform(e._viewport.transform,t.transform);let u=Math.atan2(d[1],d[0]);const p=n[t.fontName];p.vertical&&(u+=Math.PI/2);const h=Math.hypot(d[2],d[3]),x=h*function(e,t){const n=r.get(e);if(n)return n;t.save(),t.font="".concat(a,"px ").concat(e);const s=t.measureText("");let i=s.fontBoundingBoxAscent,o=Math.abs(s.fontBoundingBoxDescent);if(i){t.restore();const n=i/(i+o);return r.set(e,n),n}t.strokeStyle="red",t.clearRect(0,0,a,a),t.strokeText("g",0,0);let l=t.getImageData(0,0,a,a).data;o=0;for(let r=l.length-1-3;r>=0;r-=4)if(l[r]>0){o=Math.ceil(r/4/a);break}t.clearRect(0,0,a,a),t.strokeText("A",0,a),l=t.getImageData(0,0,a,a).data,i=0;for(let r=0,c=l.length;r0){i=a-Math.floor(r/4/a);break}if(t.restore(),i){const t=i/(i+o);return r.set(e,t),t}return r.set(e,.8),.8}(p.fontFamily,i);let f,m;0===u?(f=d[4],m=d[5]-x):(f=d[4]+x*Math.sin(u),m=d[5]-x*Math.cos(u)),l.style.left="".concat(f,"px"),l.style.top="".concat(m,"px"),l.style.fontSize="".concat(h,"px"),l.style.fontFamily=p.fontFamily,c.fontSize=h,l.setAttribute("role","presentation"),l.textContent=t.str,l.dir=t.dir,e._fontInspectorEnabled&&(l.dataset.fontName=t.fontName),0!==u&&(c.angle=u*(180/Math.PI));let g=!1;if(t.str.length>1||e._enhanceTextSelection&&o.test(t.str))g=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){const e=Math.abs(t.transform[0]),n=Math.abs(t.transform[3]);e!==n&&Math.max(e,n)/Math.min(e,n)>1.5&&(g=!0)}if(g&&(p.vertical?c.canvasWidth=t.height*e._viewport.scale:c.canvasWidth=t.width*e._viewport.scale),e._textDivProperties.set(l,c),e._textContentStream&&e._layoutText(l),e._enhanceTextSelection&&c.hasText){let n=1,i=0;0!==u&&(n=Math.cos(u),i=Math.sin(u));const a=(p.vertical?t.height:t.width)*e._viewport.scale,r=h;let o,c;0!==u?(o=[n,i,-i,n,f,m],c=s.Util.getAxialAlignedBoundingBox([0,0,a,r],o)):c=[f,m,f+a,m+r],e._bounds.push({left:c[0],top:c[1],right:c[2],bottom:c[3],div:l,size:[a,r],m:o})}}function c(e){if(e._canceled)return;const t=e._textDivs,n=e._capability,s=t.length;if(s>1e5)return e._renderingDone=!0,void n.resolve();if(!e._textContentStream)for(let i=0;i0&&(s=s?Math.min(n,s):n)}return s}function u(e){const t=e._bounds,n=e._viewport,i=function(e,t,n){const s=n.map(function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}});p(e,s);const i=new Array(n.length);for(const a of s){const e=a.index;i[e]={left:a.x1New,top:0,right:a.x2New,bottom:0}}n.map(function(t,n){const a=i[n],r=s[n];r.x1=t.top,r.y1=e-a.right,r.x2=t.bottom,r.y2=e-a.left,r.index=n,r.x1New=void 0,r.x2New=void 0}),p(t,s);for(const a of s){const e=a.index;i[e].top=a.x1New,i[e].bottom=a.x2New}return i}(n.width,n.height,t);for(let a=0;a=0&&n[a].start>=s.y2;)a--;let r,o,l=-1/0;for(r=e;r<=a;r++){let e;t=n[r],i=t.boundary,e=i.x2>s.x1?i.index>s.index?i.x1New:s.x1:void 0===i.x2New?(i.x2+s.x1)/2:i.x2New,e>l&&(l=e)}for(s.x1New=l,r=e;r<=a;r++)t=n[r],i=t.boundary,void 0===i.x2New?i.x2>s.x1?i.index>s.index&&(i.x2New=i.x2):i.x2New=l:i.x2New>l&&(i.x2New=Math.max(l,i.x2));const c=[];let d=null;for(r=e;r<=a;r++){t=n[r],i=t.boundary;const e=i.x2>s.x2?i:s;d===e?c.at(-1).end=t.end:(c.push({start:t.start,end:t.end,boundary:e}),d=e)}for(n[e].start=0&&n[o].start>=i.y1;o--)s=n[o].boundary===i;for(o=a+1;!s&&o{this._enhanceTextSelection||(this._textDivProperties=null),this._layoutTextCtx&&(this._layoutTextCtx.canvas.width=0,this._layoutTextCtx.canvas.height=0,this._layoutTextCtx=null)}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new s.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))}_processItems(e,t){for(let n=0,s=e.length;n0){const e=this._devicePixelRatio*t.canvasWidth/a;this._enhanceTextSelection&&(t.scale=e),n="scaleX(".concat(e,")")}}if(0!==t.angle&&(n="rotate(".concat(t.angle,"deg) ").concat(n)),n.length>0&&(this._enhanceTextSelection&&(t.originalTransform=n),e.style.transform=n),t.hasText&&this._container.append(e),t.hasEOL){const e=document.createElement("br");e.setAttribute("role","presentation"),this._container.append(e)}}_render(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=(0,s.createPromiseCapability)();let n=Object.create(null);const i=this._document.createElement("canvas");if(i.height=i.width=a,this._layoutTextCtx=i.getContext("2d",{alpha:!1}),this._textContent){const e=this._textContent.items,n=this._textContent.styles;this._processItems(e,n),t.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');{const e=()=>{this._reader.read().then(s=>{let{value:i,done:a}=s;a?t.resolve():(Object.assign(n,i.styles),this._processItems(i.items,n),e())},t.reject)};this._reader=this._textContentStream.getReader(),e()}}t.promise.then(()=>{n=null,e?this._renderTimer=setTimeout(()=>{c(this),this._renderTimer=null},e):c(this)},this._capability.reject)}expandTextDivs(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._enhanceTextSelection||!this._renderingDone)return;null!==this._bounds&&(u(this),this._bounds=null);const t=[],n=[];for(let s=0,i=this._textDivs.length;s0?(n.push("".concat(a.paddingTop,"px")),t.push("translateY(".concat(-a.paddingTop,"px)"))):n.push(0),a.paddingRight>0?n.push("".concat(a.paddingRight/a.scale,"px")):n.push(0),a.paddingBottom>0?n.push("".concat(a.paddingBottom,"px")):n.push(0),a.paddingLeft>0?(n.push("".concat(a.paddingLeft/a.scale,"px")),t.push("translateX(".concat(-a.paddingLeft/a.scale,"px)"))):n.push(0),i.style.padding=n.join(" "),t.length&&(i.style.transform=t.join(" "))):(i.style.padding=null,i.style.transform=a.originalTransform))}}}t.TextLayerRenderTask=h},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var s=n(8),i=n(1),a=n(3);let r=class{constructor(){(0,i.unreachable)("Not implemented: SVGGraphics")}};t.SVGGraphics=r;{const o={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},l="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/1999/xlink",d=["butt","round","square"],u=["miter","round","bevel"],p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&"undefined"!==typeof Blob&&!n)return URL.createObjectURL(new Blob([e],{type:t}));const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let i="data:".concat(t,";base64,");for(let a=0,r=e.length;a>2]+s[(3&t)<<4|n>>4]+s[a+1>6:64]+s[a+2>1&2147483647:e>>1&2147483647;t[i]=e}function n(e,n,s,i){let a=i;const r=n.length;s[a]=r>>24&255,s[a+1]=r>>16&255,s[a+2]=r>>8&255,s[a+3]=255&r,a+=4,s[a]=255&e.charCodeAt(0),s[a+1]=255&e.charCodeAt(1),s[a+2]=255&e.charCodeAt(2),s[a+3]=255&e.charCodeAt(3),a+=4,s.set(n,a),a+=n.length;const o=function(e,n,s){let i=-1;for(let a=n;a>>8^t[n]}return-1^i}(s,i+4,a);s[a]=o>>24&255,s[a+1]=o>>16&255,s[a+2]=o>>8&255,s[a+3]=255&o}function s(e){let t=e.length;const n=65535,s=Math.ceil(t/n),i=new Uint8Array(2+t+5*s+4);let a=0;i[a++]=120,i[a++]=156;let r=0;for(;t>n;)i[a++]=0,i[a++]=255,i[a++]=255,i[a++]=0,i[a++]=0,i.set(e.subarray(r,r+n),a),a+=n,r+=n,t-=n;i[a++]=1,i[a++]=255&t,i[a++]=t>>8&255,i[a++]=255&~t,i[a++]=(65535&~t)>>8&255,i.set(e.subarray(r),a),a+=e.length-r;const o=function(e,t,n){let s=1,i=0;for(let a=t;a>24&255,i[a++]=o>>16&255,i[a++]=o>>8&255,i[a++]=255&o,i}function r(t,r,o,l){const c=t.width,d=t.height;let u,h,x;const f=t.data;switch(r){case i.ImageKind.GRAYSCALE_1BPP:h=0,u=1,x=c+7>>3;break;case i.ImageKind.RGB_24BPP:h=2,u=8,x=3*c;break;case i.ImageKind.RGBA_32BPP:h=6,u=8,x=4*c;break;default:throw new Error("invalid format")}const m=new Uint8Array((1+x)*d);let g=0,b=0;for(let e=0;e>24&255,c>>16&255,c>>8&255,255&c,d>>24&255,d>>16&255,d>>8&255,255&d,u,h,0,0,0]),w=function(e){if(!a.isNodeJS)return s(e);try{let t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);const n=__webpack_require__(9193).deflateSync(t,{level:9});return n instanceof Uint8Array?n:new Uint8Array(n)}catch(t){(0,i.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+t)}return s(e)}(m),C=e.length+36+v.length+w.length,y=new Uint8Array(C);let j=0;return y.set(e,j),j+=e.length,n("IHDR",v,y,j),j+=12+v.length,n("IDATA",w,y,j),j+=12+w.length,n("IEND",new Uint8Array(0),y,j),p(y,"image/png",o)}return function(e,t,n){return r(e,void 0===e.kind?i.ImageKind.GRAYSCALE_1BPP:e.kind,t,n)}}();class x{constructor(){this.fontSizeScale=1,this.fontWeight=o.fontWeight,this.fontSize=0,this.textMatrix=i.IDENTITY_MATRIX,this.fontMatrix=i.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=i.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=o.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(e,t){this.x=e,this.y=t}}function f(e){let t=[];const n=[];for(const s of e)"save"!==s.fn?"restore"===s.fn?t=n.pop():t.push(s):(t.push({fnId:92,fn:"group",items:[]}),n.push(t),t=t.at(-1).items);return t}function m(e){if(Number.isInteger(e))return e.toString();const t=e.toFixed(10);let n=t.length-1;if("0"!==t[n])return t;do{n--}while("0"===t[n]);return t.substring(0,"."===t[n]?n:n+1)}function g(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":"scale(".concat(m(e[0])," ").concat(m(e[3]),")");if(e[0]===e[3]&&e[1]===-e[2]){const t=180*Math.acos(e[0])/Math.PI;return"rotate(".concat(m(t),")")}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return"translate(".concat(m(e[4])," ").concat(m(e[5]),")");return"matrix(".concat(m(e[0])," ").concat(m(e[1])," ").concat(m(e[2])," ").concat(m(e[3])," ").concat(m(e[4])," ")+"".concat(m(e[5]),")")}let b=0,v=0,w=0;t.SVGGraphics=r=class{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,s.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new s.DOMSVGFactory,this.current=new x,this.transformMatrix=i.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=e,this.objs=t,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!n,this._operatorIdMapping=[];for(const s in i.OPS)this._operatorIdMapping[i.OPS[s]]=s}save(){this.transformStack.push(this.transformMatrix);const e=this.current;this.extraStack.push(e),this.current=e.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(e){this.save(),this.executeOpTree(e),this.restore()}loadDependencies(e){const t=e.fnArray,n=e.argsArray;for(let s=0,a=t.length;s{t.get(e,n)});this.current.dependencies.push(n)}return Promise.all(this.current.dependencies)}transform(e,t,n,s,a,r){const o=[e,t,n,s,a,r];this.transformMatrix=i.Util.transform(this.transformMatrix,o),this.tgrp=null}getSVG(e,t){this.viewport=t;const n=this._initialize(t);return this.loadDependencies(e).then(()=>(this.transformMatrix=i.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(e)),n))}convertOpList(e){const t=this._operatorIdMapping,n=e.argsArray,s=e.fnArray,i=[];for(let a=0,r=s.length;a0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=d[e]}setLineJoin(e){this.current.lineJoin=u[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,n){this.current.strokeColor=i.Util.makeHexColor(e,t,n)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,n){this.current.fillColor=i.Util.makeHexColor(e,t,n),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){const t=this.viewport.width,n=this.viewport.height,s=i.Util.inverseTransform(this.transformMatrix),a=i.Util.applyTransform([0,0],s),r=i.Util.applyTransform([0,n],s),o=i.Util.applyTransform([t,0],s),l=i.Util.applyTransform([t,n],s),c=Math.min(a[0],r[0],o[0],l[0]),d=Math.min(a[1],r[1],o[1],l[1]),u=Math.max(a[0],r[0],o[0],l[0]),p=Math.max(a[1],r[1],o[1],l[1]),h=this.svgFactory.createElement("svg:rect");h.setAttributeNS(null,"x",c),h.setAttributeNS(null,"y",d),h.setAttributeNS(null,"width",u-c),h.setAttributeNS(null,"height",p-d),h.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&h.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(h)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){const t=e[1],n=e[2],s=e[3]||i.IDENTITY_MATRIX,[a,r,o,l]=e[4],c=e[5],d=e[6],u=e[7],p="shading".concat(w++),[h,x,f,m]=i.Util.normalizeRect([...i.Util.applyTransform([a,r],s),...i.Util.applyTransform([o,l],s)]),[g,b]=i.Util.singularValueDecompose2dScale(s),v=c*g,C=d*b,y=this.svgFactory.createElement("svg:pattern");y.setAttributeNS(null,"id",p),y.setAttributeNS(null,"patternUnits","userSpaceOnUse"),y.setAttributeNS(null,"width",v),y.setAttributeNS(null,"height",C),y.setAttributeNS(null,"x","".concat(h)),y.setAttributeNS(null,"y","".concat(x));const j=this.svg,k=this.transformMatrix,_=this.current.fillColor,N=this.current.strokeColor,L=this.svgFactory.create(f-h,m-x);if(this.svg=L,this.transformMatrix=s,2===u){const e=i.Util.makeHexColor(...t);this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(n)),this.svg=j,this.transformMatrix=k,this.current.fillColor=_,this.current.strokeColor=N,y.append(L.childNodes[0]),this.defs.append(y),"url(#".concat(p,")")}_makeShadingPattern(e){switch("string"===typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":const t="shading".concat(w++),n=e[3];let s;switch(e[1]){case"axial":const n=e[4],i=e[5];s=this.svgFactory.createElement("svg:linearGradient"),s.setAttributeNS(null,"id",t),s.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),s.setAttributeNS(null,"x1",n[0]),s.setAttributeNS(null,"y1",n[1]),s.setAttributeNS(null,"x2",i[0]),s.setAttributeNS(null,"y2",i[1]);break;case"radial":const a=e[4],r=e[5],o=e[6],l=e[7];s=this.svgFactory.createElement("svg:radialGradient"),s.setAttributeNS(null,"id",t),s.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),s.setAttributeNS(null,"cx",r[0]),s.setAttributeNS(null,"cy",r[1]),s.setAttributeNS(null,"r",l),s.setAttributeNS(null,"fx",a[0]),s.setAttributeNS(null,"fy",a[1]),s.setAttributeNS(null,"fr",o);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}for(const e of n){const t=this.svgFactory.createElement("svg:stop");t.setAttributeNS(null,"offset",e[0]),t.setAttributeNS(null,"stop-color",e[1]),s.append(t)}return this.defs.append(s),"url(#".concat(t,")");case"Mesh":return(0,i.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){const n=this.current;let s=n.x,a=n.y,r=[],o=0;for(const l of e)switch(0|l){case i.OPS.rectangle:s=t[o++],a=t[o++];const e=s+t[o++],n=a+t[o++];r.push("M",m(s),m(a),"L",m(e),m(a),"L",m(e),m(n),"L",m(s),m(n),"Z");break;case i.OPS.moveTo:s=t[o++],a=t[o++],r.push("M",m(s),m(a));break;case i.OPS.lineTo:s=t[o++],a=t[o++],r.push("L",m(s),m(a));break;case i.OPS.curveTo:s=t[o+4],a=t[o+5],r.push("C",m(t[o]),m(t[o+1]),m(t[o+2]),m(t[o+3]),m(s),m(a)),o+=6;break;case i.OPS.curveTo2:r.push("C",m(s),m(a),m(t[o]),m(t[o+1]),m(t[o+2]),m(t[o+3])),s=t[o+2],a=t[o+3],o+=4;break;case i.OPS.curveTo3:s=t[o+2],a=t[o+3],r.push("C",m(t[o]),m(t[o+1]),m(s),m(a),m(s),m(a)),o+=4;break;case i.OPS.closePath:r.push("Z")}r=r.join(" "),n.path&&e.length>0&&e[0]!==i.OPS.rectangle&&e[0]!==i.OPS.moveTo?r=n.path.getAttributeNS(null,"d")+r:(n.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(n.path)),n.path.setAttributeNS(null,"d",r),n.path.setAttributeNS(null,"fill","none"),n.element=n.path,n.setCurrentPoint(s,a)}endPath(){const e=this.current;if(e.path=null,!this.pendingClip)return;if(!e.element)return void(this.pendingClip=null);const t="clippath".concat(b++),n=this.svgFactory.createElement("svg:clipPath");n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"transform",g(this.transformMatrix));const s=e.element.cloneNode(!0);if("evenodd"===this.pendingClip?s.setAttributeNS(null,"clip-rule","evenodd"):s.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,n.append(s),this.defs.append(n),e.activeClipUrl){e.clipGroup=null;for(const e of this.extraStack)e.clipGroup=null;n.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl="url(#".concat(t,")"),this.tgrp=null}clip(e){this.pendingClip=e}closePath(){const e=this.current;if(e.path){const t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,n]of e)switch(t){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n);break;case"CA":this.setStrokeAlpha(n);break;case"ca":this.setFillAlpha(n);break;default:(0,i.warn)("Unimplemented graphic state operator ".concat(t))}}fill(){const e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){const e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=this.current;let s=n.dashArray;1!==t&&s.length>0&&(s=s.map(function(e){return t*e})),e.setAttributeNS(null,"stroke",n.strokeColor),e.setAttributeNS(null,"stroke-opacity",n.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",m(n.miterLimit)),e.setAttributeNS(null,"stroke-linecap",n.lineCap),e.setAttributeNS(null,"stroke-linejoin",n.lineJoin),e.setAttributeNS(null,"stroke-width",m(t*n.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",s.map(m).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",m(t*n.dashPhase)+"px")}eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(e)}paintImageXObject(e){const t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,i.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}paintInlineImageXObject(e,t){const n=e.width,s=e.height,i=h(e,this.forceDataSchema,!!t),a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y","0"),a.setAttributeNS(null,"width",m(n)),a.setAttributeNS(null,"height",m(s)),this.current.element=a,this.clip("nonzero");const r=this.svgFactory.createElement("svg:image");r.setAttributeNS(c,"xlink:href",i),r.setAttributeNS(null,"x","0"),r.setAttributeNS(null,"y",m(-s)),r.setAttributeNS(null,"width",m(n)+"px"),r.setAttributeNS(null,"height",m(s)+"px"),r.setAttributeNS(null,"transform","scale(".concat(m(1/n)," ").concat(m(-1/s),")")),t?t.append(r):this._ensureTransformGroup().append(r)}paintImageMaskXObject(e){const t=this.current,n=e.width,s=e.height,i=t.fillColor;t.maskId="mask".concat(v++);const a=this.svgFactory.createElement("svg:mask");a.setAttributeNS(null,"id",t.maskId);const r=this.svgFactory.createElement("svg:rect");r.setAttributeNS(null,"x","0"),r.setAttributeNS(null,"y","0"),r.setAttributeNS(null,"width",m(n)),r.setAttributeNS(null,"height",m(s)),r.setAttributeNS(null,"fill",i),r.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.append(a),this._ensureTransformGroup().append(r),this.paintInlineImageXObject(e,a)}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){const e=t[2]-t[0],n=t[3]-t[1],s=this.svgFactory.createElement("svg:rect");s.setAttributeNS(null,"x",t[0]),s.setAttributeNS(null,"y",t[1]),s.setAttributeNS(null,"width",m(e)),s.setAttributeNS(null,"height",m(n)),this.current.element=s,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){const t=this.svgFactory.create(e.width,e.height),n=this.svgFactory.createElement("svg:defs");t.append(n),this.defs=n;const s=this.svgFactory.createElement("svg:g");return s.setAttributeNS(null,"transform",g(e.transform)),t.append(s),this.svg=s,t}_ensureClipGroup(){if(!this.current.clipGroup){const e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(e),this.current.clipGroup=e}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",g(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var s=n(1),i=n(33);const a=__webpack_require__(9851),r=__webpack_require__(8586),o=__webpack_require__(6149),l=__webpack_require__(933),c=/^file:\/\/\/[a-zA-Z]:\//;t.PDFNodeStream=class{constructor(e){this.source=e,this.url=function(e){const t=l.parse(e);return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?l.parse("file:///".concat(e)):(t.host||(t.protocol="file:"),t)}(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}getFullReader(){return(0,s.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new f(this):new h(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=this.isFsUrl?new m(this,e,t):new x(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class d{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=(0,s.createPromiseCapability)(),this._headersCapability=(0,s.createPromiseCapability)()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return null===e?(this._readCapability=(0,s.createPromiseCapability)(),this.read()):(this._loaded+=e.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",e=>{this._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new s.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class u{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,s.createPromiseCapability)();const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return null===e?(this._readCapability=(0,s.createPromiseCapability)(),this.read()):(this._loaded+=e.length,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",e=>{this._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function p(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class h extends d{constructor(e){super(e);const t=t=>{if(404===t.statusCode){const e=new s.MissingPDFException('Missing PDF "'.concat(this._url,'".'));return this._storedError=e,void this._headersCapability.reject(e)}this._headersCapability.resolve(),this._setReadableStream(t);const n=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:a,suggestedLength:r}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:n,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=a,this._contentLength=r||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(n)};this._request=null,"http:"===this._url.protocol?this._request=r.request(p(this._url,e.httpHeaders),t):this._request=o.request(p(this._url,e.httpHeaders),t),this._request.on("error",e=>{this._storedError=e,this._headersCapability.reject(e)}),this._request.end()}}class x extends u{constructor(e,t,n){super(e),this._httpHeaders={};for(const s in e.httpHeaders){const t=e.httpHeaders[s];"undefined"!==typeof t&&(this._httpHeaders[s]=t)}this._httpHeaders.Range="bytes=".concat(t,"-").concat(n-1);const i=e=>{if(404===e.statusCode){const e=new s.MissingPDFException('Missing PDF "'.concat(this._url,'".'));return void(this._storedError=e)}this._setReadableStream(e)};this._request=null,"http:"===this._url.protocol?this._request=r.request(p(this._url,this._httpHeaders),i):this._request=o.request(p(this._url,this._httpHeaders),i),this._request.on("error",e=>{this._storedError=e}),this._request.end()}}class f extends d{constructor(e){super(e);let t=decodeURIComponent(this._url.path);c.test(this._url.href)&&(t=t.replace(/^\//,"")),a.lstat(t,(e,n)=>{if(e)return"ENOENT"===e.code&&(e=new s.MissingPDFException('Missing PDF "'.concat(t,'".'))),this._storedError=e,void this._headersCapability.reject(e);this._contentLength=n.size,this._setReadableStream(a.createReadStream(t)),this._headersCapability.resolve()})}}class m extends u{constructor(e,t,n){super(e);let s=decodeURIComponent(this._url.path);c.test(this._url.href)&&(s=s.replace(/^\//,"")),this._setReadableStream(a.createReadStream(s,{start:t,end:n-1}))}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new s.MissingPDFException('Missing PDF "'+t+'".'):new s.UnexpectedResponseException("Unexpected server response (".concat(e,') while retrieving PDF "').concat(t,'".'),e)},t.extractFilenameFromHeader=function(e){const t=e("Content-Disposition");if(t){let e=(0,i.getFilenameFromContentDispositionHeader)(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch(n){}if((0,a.isPdfFile)(e))return e}return null},t.validateRangeRequestCapabilities=function(e){let{getResponseHeader:t,isHttp:n,rangeChunkSize:s,disableRange:i}=e;const a={allowRangeRequests:!1,suggestedLength:void 0},r=parseInt(t("Content-Length"),10);return Number.isInteger(r)?(a.suggestedLength=r,r<=2*s||i||!n||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(a.allowRangeRequests=!0),a):a},t.validateResponseStatus=function(e){return 200===e||206===e};var s=n(1),i=n(34),a=n(8)},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){let t=!0,n=i("filename\\*","i").exec(e);if(n){n=n[1];let e=o(n);return e=unescape(e),e=l(e),e=c(e),r(e)}if(n=function(e){const t=[];let n;const s=i("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(n=s.exec(e));){let[,e,s,i]=n;if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[s,i]}const a=[];for(let i=0;i{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var s=n(1),i=n(33);class a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.getXhr=t.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,n){const s={begin:e,end:t};for(const i in n)s[i]=n[i];return this.request(s)}requestFull(e){return this.request(e)}request(e){const t=this.getXhr(),n=this.currXhrId++,s=this.pendingRequests[n]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const i in this.httpHeaders){const e=this.httpHeaders[i];"undefined"!==typeof e&&t.setRequestHeader(i,e)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range","bytes=".concat(e.begin,"-").concat(e.end-1)),s.expectedStatus=206):s.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(n){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,n),t.onprogress=this.onProgress.bind(this,n),s.onHeadersReceived=e.onHeadersReceived,s.onDone=e.onDone,s.onError=e.onError,s.onProgress=e.onProgress,t.send(null),n}onProgress(e,t){var n;const s=this.pendingRequests[e];s&&(null===(n=s.onProgress)||void 0===n||n.call(s,t))}onStateChange(e,t){const n=this.pendingRequests[e];if(!n)return;const i=n.xhr;if(i.readyState>=2&&n.onHeadersReceived&&(n.onHeadersReceived(),delete n.onHeadersReceived),4!==i.readyState)return;if(!(e in this.pendingRequests))return;var a;if(delete this.pendingRequests[e],0===i.status&&this.isHttp)return void(null===(a=n.onError)||void 0===a||a.call(n,i.status));const r=i.status||200;var o;if((200!==r||206!==n.expectedStatus)&&r!==n.expectedStatus)return void(null===(o=n.onError)||void 0===o||o.call(n,i.status));const l=function(e){const t=e.response;return"string"!==typeof t?t:(0,s.stringToBytes)(t).buffer}(i);if(206===r){const e=i.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);n.onDone({begin:parseInt(t[1],10),chunk:l})}else if(l)n.onDone({begin:0,chunk:l});else{var c;null===(c=n.onError)||void 0===c||c.call(n,i.status)}}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}t.PDFNetworkStream=class{constructor(e){this._source=e,this._manager=new a(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return(0,s.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new r(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const n=new o(this._manager,e,t);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}cancelAllRequests(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);for(const n of this._rangeRequestReaders.slice(0))n.cancel(e)}};class r{constructor(e,t){this._manager=e;const n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(n),this._headersReceivedCapability=(0,s.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e),n=e=>t.getResponseHeader(e),{allowRangeRequests:s,suggestedLength:a}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:n,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});s&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(n),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=(0,i.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){var t;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=(0,s.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class o{constructor(e,t,n){this._manager=e;const s={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,n,s),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var e;null===(e=this.onClosed)||void 0===e||e.call(this,this)}_onDone(e){const t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=(0,i.createResponseStatusError)(e,this._url);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){var t;this.isStreamingSupported||null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,s.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var s=n(1),i=n(33);function a(e,t,n){return{method:"GET",headers:e,signal:n.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function r(e){const t=new Headers;for(const n in e){const s=e[n];"undefined"!==typeof s&&t.append(n,s)}return t}t.PDFFetchStream=class{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}getFullReader(){return(0,s.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new o(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=new l(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class o{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=(0,s.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=r(this._stream.httpHeaders);const n=t.url;fetch(n,a(this._headers,this._withCredentials,this._abortController)).then(e=>{if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,n);this._reader=e.body.getReader(),this._headersCapability.resolve();const t=t=>e.headers.get(t),{allowRangeRequests:a,suggestedLength:r}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=a,this._contentLength=r||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(t),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new s.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._reader&&this._reader.cancel(e),this._abortController.abort()}}class l{constructor(e,t,n){this._stream=e,this._reader=null,this._loaded=0;const o=e.source;this._withCredentials=o.withCredentials||!1,this._readCapability=(0,s.createPromiseCapability)(),this._isStreamingSupported=!o.disableStream,this._abortController=new AbortController,this._headers=r(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(t,"-").concat(n-1));const l=o.url;fetch(l,a(this._headers,this._withCredentials,this._abortController)).then(e=>{if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,l);this._readCapability.resolve(),this._reader=e.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._reader&&this._reader.cancel(e),this._abortController.abort()}}}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__w_pdfjs_require__),n.exports}var __nested_webpack_exports__={};return(()=>{var e=__nested_webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AnnotationEditorLayer",{enumerable:!0,get:function(){return i.AnnotationEditorLayer}}),Object.defineProperty(e,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return t.AnnotationEditorParamsType}}),Object.defineProperty(e,"AnnotationEditorType",{enumerable:!0,get:function(){return t.AnnotationEditorType}}),Object.defineProperty(e,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return a.AnnotationEditorUIManager}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return r.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return o.GlobalWorkerOptions}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(e,"LoopbackPort",{enumerable:!0,get:function(){return n.LoopbackPort}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return n.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return s.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return n.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return s.PixelsPerInch}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return s.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return d.SVGGraphics}}),Object.defineProperty(e,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return t.UNSUPPORTED_FEATURES}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return u.XfaLayer}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return n.build}}),Object.defineProperty(e,"createPromiseCapability",{enumerable:!0,get:function(){return t.createPromiseCapability}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return n.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return s.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return s.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return s.getXfaPageViewport}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return s.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return s.loadScript}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return c.renderTextLayer}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return n.version}});var t=__w_pdfjs_require__(1),n=__w_pdfjs_require__(4),s=__w_pdfjs_require__(8),i=__w_pdfjs_require__(22),a=__w_pdfjs_require__(7),r=__w_pdfjs_require__(27),o=__w_pdfjs_require__(15),l=__w_pdfjs_require__(3),c=__w_pdfjs_require__(30),d=__w_pdfjs_require__(31),u=__w_pdfjs_require__(29);if(l.isNodeJS){const{PDFNodeStream:e}=__w_pdfjs_require__(32);(0,n.setPDFNetworkStreamFactory)(t=>new e(t))}else{const{PDFNetworkStream:e}=__w_pdfjs_require__(35),{PDFFetchStream:t}=__w_pdfjs_require__(36);(0,n.setPDFNetworkStreamFactory)(n=>(0,s.isValidFetchUrl)(n.url)?new t(n):new e(n))}})(),__nested_webpack_exports__})(),module.exports=factory()},7184:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>o,BO:()=>r,Yn:()=>a});var s=n(380),i=n(9425);function a(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n="vars.".concat(t).split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function r(e,t,n){let s,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return s="function"===typeof e?e(n):Array.isArray(e)?e[n]||i:a(e,n)||i,t&&(s=t(s,i,e)),s}const o=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:o,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],d=a(e.theme,o)||{};return(0,i.NI)(e,c,e=>{let i=r(d,l,e);return e===i&&"string"===typeof e&&(i=r(d,l,"".concat(t).concat("default"===e?"":(0,s.A)(e)),e)),!1===n?i:{[n]:i}})};return c.propTypes={},c.filterProps=[t],c}},7216:(e,t,n)=>{"use strict";n.d(t,{Rk:()=>s,SF:()=>i,sk:()=>a});function s(e,t,n){var s="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(s+=n+" ")}),s}var i=function(e,t,n){var s=e.key+"-"+t.name;!1===n&&void 0===e.registered[s]&&(e.registered[s]=t.styles)},a=function(e,t,n){i(e,t,n);var s=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+s:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}}},7316:(e,t,n)=>{"use strict";n.d(t,{A:()=>R});var s=n(3773),i=n(7184),a=n(7801);const r=function(){for(var e=arguments.length,t=new Array(e),n=0;n(t.filterProps.forEach(n=>{e[n]=t}),e),{}),i=e=>Object.keys(e).reduce((t,n)=>s[n]?(0,a.A)(t,s[n](e)):t,{});return i.propTypes={},i.filterProps=t.reduce((e,t)=>e.concat(t.filterProps),[]),i};var o=n(9425);function l(e){return"number"!==typeof e?e:"".concat(e,"px solid")}function c(e,t){return(0,i.Ay)({prop:e,themeKey:"borders",transform:t})}const d=c("border",l),u=c("borderTop",l),p=c("borderRight",l),h=c("borderBottom",l),x=c("borderLeft",l),f=c("borderColor"),m=c("borderTopColor"),g=c("borderRightColor"),b=c("borderBottomColor"),v=c("borderLeftColor"),w=c("outline",l),C=c("outlineColor"),y=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,s.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,s._W)(t,e)});return(0,o.NI)(e,e.borderRadius,n)}return null};y.propTypes={},y.filterProps=["borderRadius"];r(d,u,p,h,x,f,m,g,b,v,y,w,C);const j=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,s.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,s._W)(t,e)});return(0,o.NI)(e,e.gap,n)}return null};j.propTypes={},j.filterProps=["gap"];const k=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,s.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,s._W)(t,e)});return(0,o.NI)(e,e.columnGap,n)}return null};k.propTypes={},k.filterProps=["columnGap"];const _=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,s.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,s._W)(t,e)});return(0,o.NI)(e,e.rowGap,n)}return null};_.propTypes={},_.filterProps=["rowGap"];r(j,k,_,(0,i.Ay)({prop:"gridColumn"}),(0,i.Ay)({prop:"gridRow"}),(0,i.Ay)({prop:"gridAutoFlow"}),(0,i.Ay)({prop:"gridAutoColumns"}),(0,i.Ay)({prop:"gridAutoRows"}),(0,i.Ay)({prop:"gridTemplateColumns"}),(0,i.Ay)({prop:"gridTemplateRows"}),(0,i.Ay)({prop:"gridTemplateAreas"}),(0,i.Ay)({prop:"gridArea"}));function N(e,t){return"grey"===t?t:e}r((0,i.Ay)({prop:"color",themeKey:"palette",transform:N}),(0,i.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:N}),(0,i.Ay)({prop:"backgroundColor",themeKey:"palette",transform:N}));function L(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const S=(0,i.Ay)({prop:"width",transform:L}),A=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,s;const i=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||o.zu[t];return i?"px"!==(null==(s=e.theme)||null==(s=s.breakpoints)?void 0:s.unit)?{maxWidth:"".concat(i).concat(e.theme.breakpoints.unit)}:{maxWidth:i}:{maxWidth:L(t)}};return(0,o.NI)(e,e.maxWidth,t)}return null};A.filterProps=["maxWidth"];const M=(0,i.Ay)({prop:"minWidth",transform:L}),T=(0,i.Ay)({prop:"height",transform:L}),E=(0,i.Ay)({prop:"maxHeight",transform:L}),F=(0,i.Ay)({prop:"minHeight",transform:L}),R=((0,i.Ay)({prop:"size",cssProperty:"width",transform:L}),(0,i.Ay)({prop:"size",cssProperty:"height",transform:L}),r(S,A,M,T,E,F,(0,i.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:y},color:{themeKey:"palette",transform:N},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:N},backgroundColor:{themeKey:"palette",transform:N},p:{style:s.Ms},pt:{style:s.Ms},pr:{style:s.Ms},pb:{style:s.Ms},pl:{style:s.Ms},px:{style:s.Ms},py:{style:s.Ms},padding:{style:s.Ms},paddingTop:{style:s.Ms},paddingRight:{style:s.Ms},paddingBottom:{style:s.Ms},paddingLeft:{style:s.Ms},paddingX:{style:s.Ms},paddingY:{style:s.Ms},paddingInline:{style:s.Ms},paddingInlineStart:{style:s.Ms},paddingInlineEnd:{style:s.Ms},paddingBlock:{style:s.Ms},paddingBlockStart:{style:s.Ms},paddingBlockEnd:{style:s.Ms},m:{style:s.Lc},mt:{style:s.Lc},mr:{style:s.Lc},mb:{style:s.Lc},ml:{style:s.Lc},mx:{style:s.Lc},my:{style:s.Lc},margin:{style:s.Lc},marginTop:{style:s.Lc},marginRight:{style:s.Lc},marginBottom:{style:s.Lc},marginLeft:{style:s.Lc},marginX:{style:s.Lc},marginY:{style:s.Lc},marginInline:{style:s.Lc},marginInlineStart:{style:s.Lc},marginInlineEnd:{style:s.Lc},marginBlock:{style:s.Lc},marginBlockStart:{style:s.Lc},marginBlockEnd:{style:s.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:j},rowGap:{style:_},columnGap:{style:k},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:L},maxWidth:{style:A},minWidth:{transform:L},height:{transform:L},maxHeight:{transform:L},minHeight:{transform:L},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},7406:()=>{},7476:(e,t,n)=>{"use strict";var s=n(4994);t.X4=h,t.e$=x,t.eM=function(e,t){const n=p(e),s=p(t);return(Math.max(n,s)+.05)/(Math.min(n,s)+.05)},t.a=f;var i=s(n(4315)),a=s(n(1265));function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,a.default)(e,t,n)}function o(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", "),")"):""}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(o(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,i.default)(9,e));let s,a=e.substring(t+1,e.length-1);if("color"===n){if(a=a.split(" "),s=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(s))throw new Error((0,i.default)(10,s))}else a=a.split(",");return a=a.map(e=>parseFloat(e)),{type:n,values:a,colorSpace:s}}const c=e=>{const t=l(e);return t.values.slice(0,3).map((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?"".concat(e,"%"):e).join(" ")};function d(e){const{type:t,colorSpace:n}=e;let{values:s}=e;return-1!==t.indexOf("rgb")?s=s.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(s[1]="".concat(s[1],"%"),s[2]="".concat(s[2],"%")),s=-1!==t.indexOf("color")?"".concat(n," ").concat(s.join(" ")):"".concat(s.join(", ")),"".concat(t,"(").concat(s,")")}function u(e){e=l(e);const{values:t}=e,n=t[0],s=t[1]/100,i=t[2]/100,a=s*Math.min(i,1-i),r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-a*Math.max(Math.min(t-3,9-t,1),-1)};let o="rgb";const c=[Math.round(255*r(0)),Math.round(255*r(8)),Math.round(255*r(4))];return"hsla"===e.type&&(o+="a",c.push(t[3])),d({type:o,values:c})}function p(e){let t="hsl"===(e=l(e)).type||"hsla"===e.type?l(u(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function h(e,t){return e=l(e),t=r(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,d(e)}function x(e,t){if(e=l(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return d(e)}function f(e,t){if(e=l(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return d(e)}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return p(e)>.5?x(e,t):f(e,t)}},7518:(e,t,n)=>{"use strict";var s=n(4994);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=m,rootShouldForwardProp:s=x,slotShouldForwardProp:l=x}=e,d=e=>(0,c.default)((0,i.default)({},e,{theme:b((0,i.default)({},e,{defaultTheme:n,themeId:t}))}));return d.__mui_systemSx=!0,function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:u,slot:h,skipVariantsResolver:f,skipSx:m,overridesResolver:C=v(g(h))}=c,y=(0,a.default)(c,p),j=u&&u.startsWith("Mui")||h?"components":"custom",k=void 0!==f?f:h&&"Root"!==h&&"root"!==h||!1,_=m||!1;let N=x;"Root"===h||"root"===h?N=s:h?N=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(N=void 0);const L=(0,r.default)(e,(0,i.default)({shouldForwardProp:N,label:undefined},y)),S=e=>"function"===typeof e&&e.__emotion_real!==e||(0,o.isPlainObject)(e)?s=>{const a=b({theme:s.theme,defaultTheme:n,themeId:t});return w(e,(0,i.default)({},s,{theme:a}),a.modularCssLayers?j:void 0)}:e,A=function(s){let a=S(s);for(var r=arguments.length,o=new Array(r>1?r-1:0),l=1;l{const s=b((0,i.default)({},e,{defaultTheme:n,themeId:t}));if(!s.components||!s.components[u]||!s.components[u].styleOverrides)return null;const a=s.components[u].styleOverrides,r={};return Object.entries(a).forEach(t=>{let[n,a]=t;r[n]=w(a,(0,i.default)({},e,{theme:s}),s.modularCssLayers?"theme":void 0)}),C(e,r)}),u&&!k&&c.push(e=>{var s;const a=b((0,i.default)({},e,{defaultTheme:n,themeId:t}));return w({variants:null==a||null==(s=a.components)||null==(s=s[u])?void 0:s.variants},(0,i.default)({},e,{theme:a}),a.modularCssLayers?"theme":void 0)}),_||c.push(d);const p=c.length-o.length;if(Array.isArray(s)&&p>0){const e=new Array(p).fill("");a=[...s,...e],a.raw=[...s.raw,...e]}const h=L(a,...c);return e.muiName&&(h.muiName=e.muiName),h};return L.withConfig&&(A.withConfig=L.withConfig),A}};var i=s(n(4634)),a=s(n(4893)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var r=i?Object.getOwnPropertyDescriptor(e,a):null;r&&(r.get||r.set)?Object.defineProperty(s,a,r):s[a]=e[a]}return s.default=e,n&&n.set(e,s),s}(n(7635)),o=n(780),l=(s(n(9028)),s(n(3702)),s(n(719))),c=s(n(8584));const d=["ownerState"],u=["variants"],p=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function x(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function f(e,t){return t&&e&&"object"===typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles="@layer ".concat(t,"{").concat(String(e.styles),"}")),e}const m=(0,l.default)(),g=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function b(e){let{defaultTheme:t,theme:n,themeId:s}=e;return i=n,0===Object.keys(i).length?t:n[s]||n;var i}function v(e){return e?(t,n)=>n[e]:null}function w(e,t,n){let{ownerState:s}=t,o=(0,a.default)(t,d);const l="function"===typeof e?e((0,i.default)({ownerState:s},o)):e;if(Array.isArray(l))return l.flatMap(e=>w(e,(0,i.default)({ownerState:s},o),n));if(l&&"object"===typeof l&&Array.isArray(l.variants)){const{variants:e=[]}=l;let t=(0,a.default)(l,u);return e.forEach(e=>{let a=!0;if("function"===typeof e.props?a=e.props((0,i.default)({ownerState:s},o,s)):Object.keys(e.props).forEach(t=>{(null==s?void 0:s[t])!==e.props[t]&&o[t]!==e.props[t]&&(a=!1)}),a){Array.isArray(t)||(t=[t]);const a="function"===typeof e.style?e.style((0,i.default)({ownerState:s},o,s)):e.style;t.push(n?f((0,r.internal_serializeStyles)(a),n):a)}}),t}return n?f((0,r.internal_serializeStyles)(l),n):l}},7635:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GlobalStyles:()=>y.A,StyledEngineProvider:()=>C,ThemeContext:()=>i.T,css:()=>g.AH,default:()=>j,internal_processStyles:()=>k,internal_serializeStyles:()=>N,keyframes:()=>g.i7});var s=n(8168),i=n(4839),a=n(8295),r=n(714),o=n(7216),l=n(5917),c=n(3352),d=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,u=(0,c.A)(function(e){return d.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),p=function(e){return"theme"!==e},h=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?u:p},x=function(e,t,n){var s;if(t){var i=t.shouldForwardProp;s=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof s&&n&&(s=e.__emotion_forwardProp),s},f=function(e){var t=e.cache,n=e.serialized,s=e.isStringTag;return(0,o.SF)(t,n,s),(0,r.s)(function(){return(0,o.sk)(t,n,s)}),null},m=function e(t,n){var r,c,d=t.__emotion_real===t,u=d&&t.__emotion_base||t;void 0!==n&&(r=n.label,c=n.target);var p=x(t,n,d),m=p||h(u),g=!m("as");return function(){var b=arguments,v=d&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&v.push("label:"+r+";"),null==b[0]||void 0===b[0].raw)v.push.apply(v,b);else{var w=b[0];v.push(w[0]);for(var C=b.length,y=1;y{const e="".concat(t,"-").concat(n);if("object"===typeof document&&w.has(e))return w.get(e);const s=function(e,t){const n=(0,b.A)({key:"css",prepend:e});if(t){const e=n.insert;n.insert=function(){for(var t=arguments.length,n=new Array(t),s=0;s{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},_=[];function N(e){return _[0]=e,(0,a.J)(_)}},7736:(e,t,n)=>{var s=n(3738).default,i=n(9045);e.exports=function(e){var t=i(e,"string");return"symbol"==s(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},7749:(e,t,n)=>{"use strict";var s=n(4933),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function l(e){return s.isMemo(e)?r:o[e.$$typeof]||i}o[s.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[s.Memo]=r;var c=Object.defineProperty,d=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,x=Object.prototype;e.exports=function e(t,n,s){if("string"!==typeof n){if(x){var i=h(n);i&&i!==x&&e(t,i,s)}var r=d(n);u&&(r=r.concat(u(n)));for(var o=l(t),f=l(n),m=0;m{"use strict";n.d(t,{A:()=>i});var s=n(2882);const i=function(e,t){return t?(0,s.A)(e,t,{clone:!1}):e}},7830:(e,t,n)=>{var s;!function(){function i(e,t,n){return e.call.apply(e.bind,arguments)}function a(e,t,n){if(!e)throw Error();if(2=t.f?i():e.fonts.load(function(e){return _(e)+" "+e.f+"00 300px "+j(e.c)}(t.a),t.h).then(function(e){1<=e.length?s():setTimeout(a,25)},function(){i()})}()}),i=null,a=new Promise(function(e,n){i=setTimeout(n,t.f)});Promise.race([a,s]).then(function(){i&&(clearTimeout(i),i=null),t.g(t.a)},function(){t.j(t.a)})};var O={D:"serif",C:"sans-serif"},D=null;function I(){if(null===D){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);D=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return D}function B(e,t,n){for(var s in O)if(O.hasOwnProperty(s)&&t===e.f[O[s]]&&n===e.f[O[s]])return!0;return!1}function H(e){var t,n=e.g.a.offsetWidth,s=e.h.a.offsetWidth;(t=n===e.f.serif&&s===e.f["sans-serif"])||(t=I()&&B(e,n,s)),t?o()-e.A>=e.w?I()&&B(e,n,s)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?Z(e,e.v):Z(e,e.B):function(e){setTimeout(r(function(){H(this)},e),50)}(e):Z(e,e.v)}function Z(e,t){setTimeout(r(function(){p(this.g.a),p(this.h.a),p(this.j.a),p(this.m.a),t(this.a)},e),0)}function V(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}P.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=o(),H(this)};var z=null;function Y(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&h(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),A(e,"active")):S(e.a))}function U(e){this.j=e,this.a=new M,this.h=0,this.f=this.g=!0}function W(e,t,n,s,i){var a=0==--e.h;(e.f||e.g)&&setTimeout(function(){var e=i||null,o=s||{};if(0===n.length&&a)S(t.a);else{t.f+=n.length,a&&(t.j=a);var l,c=[];for(l=0;l{e.exports=n(5019)()},8168:(e,t,n)=>{"use strict";function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ts})},8295:(e,t,n)=>{"use strict";n.d(t,{J:()=>m});var s={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(3352),a=!1,r=/[A-Z]|^ms/g,o=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},d=(0,i.A)(function(e){return l(e)?e:e.replace(r,"-$&").toLowerCase()}),u=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(o,function(e,t,n){return x={name:t,styles:n,next:x},t})}return 1===s[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"},p="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function h(e,t,n){if(null==n)return"";var s=n;if(void 0!==s.__emotion_styles)return s;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return x={name:i.name,styles:i.styles,next:x},i.name;var r=n;if(void 0!==r.styles){var o=r.next;if(void 0!==o)for(;void 0!==o;)x={name:o.name,styles:o.styles,next:x},o=o.next;return r.styles+";"}return function(e,t,n){var s="";if(Array.isArray(n))for(var i=0;i=4;++s,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(s)|(255&e.charCodeAt(++s))<<8|(255&e.charCodeAt(++s))<<16|(255&e.charCodeAt(++s))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(s+2))<<16;case 2:n^=(255&e.charCodeAt(s+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(s)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:x}}},8298:(e,t,n)=>{"use strict";function s(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;ns})},8355:(e,t,n)=>{var s,i=n(2897).default,a=Object.create,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,c=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,u=(e,t,n,s)=>{if(t&&"object"===typeof t||"function"===typeof t)for(let i of l(t))d.call(e,i)||i===n||r(e,i,{get:()=>t[i],enumerable:!(s=o(t,i))||s.enumerable});return e},p=(e,t,n)=>(n=null!=e?a(c(e)):{},u(!t&&e&&e.__esModule?n:r(n,"default",{value:e,enumerable:!0}),e)),h=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!==typeof t?t+"":t,n),n),x={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(x,{createReactPlayer:()=>S}),e.exports=(s=x,u(r({},"__esModule",{value:!0}),s));var f=p(n(5917)),m=p(n(3419)),g=p(n(668)),b=p(n(208)),v=n(6627),w=n(5992),C=p(n(6060));const y=(0,w.lazy)(()=>n.e(353).then(n.t.bind(n,6117,23))),j="undefined"!==typeof window&&window.document&&"undefined"!==typeof document,k="undefined"!==typeof n.g&&n.g.window&&n.g.window.document,_=Object.keys(v.propTypes),N=j||k?f.Suspense:()=>null,L=[],S=(e,t)=>{var n;return n=class extends f.Component{constructor(){var n;super(...arguments),n=this,h(this,"state",{showPreview:!!this.props.light}),h(this,"references",{wrapper:e=>{this.wrapper=e},player:e=>{this.player=e}}),h(this,"handleClickPreview",e=>{this.setState({showPreview:!1}),this.props.onClickPreview(e)}),h(this,"showPreview",()=>{this.setState({showPreview:!0})}),h(this,"getDuration",()=>this.player?this.player.getDuration():null),h(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),h(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),h(this,"getInternalPlayer",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"player";return n.player?n.player.getInternalPlayer(e):null}),h(this,"seekTo",(e,t,n)=>{if(!this.player)return null;this.player.seekTo(e,t,n)}),h(this,"handleReady",()=>{this.props.onReady(this)}),h(this,"getActivePlayer",(0,g.default)(n=>{for(const t of[...L,...e])if(t.canPlay(n))return t;return t||null})),h(this,"getConfig",(0,g.default)((e,t)=>{const{config:n}=this.props;return m.default.all([v.defaultProps.config,v.defaultProps.config[t]||{},n,n[t]||{}])})),h(this,"getAttributes",(0,g.default)(e=>(0,w.omit)(this.props,_))),h(this,"renderActivePlayer",e=>{if(!e)return null;const t=this.getActivePlayer(e);if(!t)return null;const n=this.getConfig(e,t.key);return f.default.createElement(C.default,i(i({},this.props),{},{key:t.key,ref:this.references.player,config:n,activePlayer:t.lazyPlayer||t,onReady:this.handleReady}))})}shouldComponentUpdate(e,t){return!(0,b.default)(this.props,e)||!(0,b.default)(this.state,t)}componentDidUpdate(e){const{light:t}=this.props;!e.light&&t&&this.setState({showPreview:!0}),e.light&&!t&&this.setState({showPreview:!1})}renderPreview(e){if(!e)return null;const{light:t,playIcon:n,previewTabIndex:s,oEmbedUrl:i,previewAriaLabel:a}=this.props;return f.default.createElement(y,{url:e,light:t,playIcon:n,previewTabIndex:s,previewAriaLabel:a,oEmbedUrl:i,onClick:this.handleClickPreview})}render(){const{url:e,style:t,width:n,height:s,fallback:a,wrapper:r}=this.props,{showPreview:o}=this.state,l=this.getAttributes(e),c="string"===typeof r?this.references.wrapper:void 0;return f.default.createElement(r,i({ref:c,style:i(i({},t),{},{width:n,height:s})},l),f.default.createElement(N,{fallback:a},o?this.renderPreview(e):this.renderActivePlayer(e)))}},h(n,"displayName","ReactPlayer"),h(n,"propTypes",v.propTypes),h(n,"defaultProps",v.defaultProps),h(n,"addCustomPlayer",e=>{L.push(e)}),h(n,"removeCustomPlayers",()=>{L.length=0}),h(n,"canPlay",t=>{for(const n of[...L,...e])if(n.canPlay(t))return!0;return!1}),h(n,"canEnablePIP",t=>{for(const n of[...L,...e])if(n.canEnablePIP&&n.canEnablePIP(t))return!0;return!1}),n}},8540:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(8772)},8584:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s.A,extendSxProp:()=>i.A,unstable_createStyleFunctionSx:()=>s.k,unstable_defaultSxConfig:()=>a.A});var s=n(8810),i=n(456),a=n(7316)},8586:()=>{},8587:(e,t,n)=>{"use strict";function s(e,t){if(null==e)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;n[s]=e[s]}return n}n.d(t,{A:()=>s})},8734:e=>{function t(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function n(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,s,i){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("script");"function"===typeof s&&(i=s,s={}),s=s||{},i=i||function(){},r.type=s.type||"text/javascript",r.charset=s.charset||"utf8",r.async=!("async"in s)||!!s.async,r.src=e,s.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(r,s.attrs),s.text&&(r.text=""+s.text),("onload"in r?t:n)(r,i),r.onload||t(r,i),a.appendChild(r)}},8772:(e,t,n)=>{"use strict";var s=n(5917),i=n(9547);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n