UNPKG

@pdftron/webviewer-reading-mode

Version:

WebViewer reading mode for viewing PDF files.

2 lines 277 kB
/*! For license information please see webviewer-reading-mode.js.LICENSE.txt */ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("react-dom"));else if("function"==typeof define&&define.amd)define(["React","ReactDOM"],t);else{var n="object"==typeof exports?t(require("react"),require("react-dom")):t(e.React,e.ReactDOM);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(e,t)=>(()=>{var n={929(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(314),o=n.n(r)()(function(e){return e[1]});o.push([e.id,"div#wv-read-mode {\n height: 100%;\n width: inherit;\n position: relative;\n}\n\ndiv#wv-read-mode.reading-mode--continuous {\n overflow: hidden;\n position: relative;\n}\n\ndiv#wv-read-mode.reading-mode--single {\n overflow-y: scroll;\n}\n\n.reader-mode-page-list {\n display: flex;\n flex-direction: column;\n}\n\n.reader-mode-spinner-wrapper {\n position: absolute;\n inset: 0;\n z-index: 10;\n background-color: white;\n display: flex;\n justify-content: center;\n align-items: center;\n}",""]);const i=o},314(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n}).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var l=0;l<e.length;l++){var s=[].concat(e[l]);r&&o[s[0]]||(n&&(s[2]?s[2]="".concat(n," and ").concat(s[2]):s[2]=n),t.push(s))}},t}},146(e,t,n){"use strict";var r=n(363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?a:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var l=s(t),v=s(n),m=0;m<a.length;++m){var g=a[m];if(!(i[g]||r&&r[g]||v&&v[g]||l&&l[g])){var y=f(n,g);try{c(t,g,y)}catch(e){}}}}return t}},694(e,t,n){"use strict";var r=n(925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=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 l.name="Invariant Violation",l}}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:i,resetWarningCache:o};return n.PropTypes=n,n}},556(e,t,n){e.exports=n(694)()},925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},799(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,S=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case l:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case f:case m:case v:case s:return e;default:return t}}case o:return t}}}function _(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=m,t.Memo=v,t.Portal=o,t.Profiler=l,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return _(e)||w(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===m},t.isMemo=function(e){return w(e)===v},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===l||e===a||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===s||e.$$typeof===c||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===S||e.$$typeof===g)},t.typeOf=w},363(e,t,n){"use strict";e.exports=n(799)},452(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),l=new z(r||[]);return o(a,"_invoke",{value:R(e,n,l)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",h="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var S={};c(S,a,function(){return this});var w=Object.getPrototypeOf,_=w&&w(w(I([])));_&&_!==n&&r.call(_,a)&&(S=_);var x=b.prototype=g.prototype=Object.create(S);function C(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e)})})}function O(e,t){function n(o,i,a,l){var s=d(e[o],e,i);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,a,l)},function(e){n("throw",e,a,l)}):t.resolve(u).then(function(e){c.value=e,a(c)},function(e){return n("throw",e,a,l)})}l(s.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return i=i?i.then(o,o):o()}})}function R(e,n,r){var o=f;return function(i,a){if(o===p)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var s=T(l,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var c=d(e,n,r);if("normal"===c.type){if(o=r.done?v:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=v,r.method="throw",r.arg=c.arg)}}}function T(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function z(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function I(e){if(null!=e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(typeof e+" is not iterable")}return y.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,s,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},C(O.prototype),c(O.prototype,l,function(){return this}),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(x),c(x,s,"Generator"),c(x,a,function(){return this}),c(x,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=I,z.prototype={constructor:z,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return l.type="throw",l.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},72(e,t,n){"use strict";var r,o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],o=0;o<e.length;o++){var l=e[o],s=t.base?l[0]+t.base:l[0],c=n[s]||0,u="".concat(s," ").concat(c);n[s]=c+1;var d=a(u),f={css:l[1],media:l[2],sourceMap:l[3]};-1!==d?(i[d].references++,i[d].updater(f)):i.push({identifier:u,updater:v(f,t),references:1}),r.push(u)}return r}function s(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach(function(e){t.setAttribute(e,r[e])}),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var c,u=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function d(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function f(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,p=0;function v(e,t){var n,r,o;if(t.singleton){var i=p++;n=h||(h=s(t)),r=d.bind(null,n,i,!1),o=d.bind(null,n,i,!0)}else n=s(t),r=f.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=a(n[r]);i[o].references--}for(var s=l(e,t),c=0;c<n.length;c++){var u=a(n[c]);0===i[u].references&&(i[u].updater(),i.splice(u,1))}n=s}}}},156(t){"use strict";t.exports=e},318(e){"use strict";e.exports=t}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={id:e,exports:{}};return n[e](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var i={};return(()=>{"use strict";o.r(i),o.d(i,{default:()=>ws}),o(452);var e=o(156),t=o.n(e),n=o(318),r=o.n(n);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(null,arguments)}function l(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var c=o(556),u=o.n(c),d=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),f="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,h=void 0!==o.g&&o.g.Math===Math?o.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),p="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(h):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},v=["top","right","bottom","left","width","height","size","weight"],m="undefined"!=typeof MutationObserver,g=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,r=0;function o(){t&&(t=!1,e()),n&&a()}function i(){p(o)}function a(){var e=Date.now();if(t){if(e-r<2)return;n=!0}else t=!0,n=!1,setTimeout(i,20);r=e}return a}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){f&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),m?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){f&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;v.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),y=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},b=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||h},S=R(0,0,0,0);function w(e){return parseFloat(e)||0}function x(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+w(e["border-"+n+"-width"])},0)}var C="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof b(e).SVGGraphicsElement}:function(e){return e instanceof b(e).SVGElement&&"function"==typeof e.getBBox};function O(e){return f?C(e)?function(e){var t=e.getBBox();return R(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return S;var r=b(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=w(i)}return t}(r),i=o.left+o.right,a=o.top+o.bottom,l=w(r.width),s=w(r.height);if("border-box"===r.boxSizing&&(Math.round(l+i)!==t&&(l-=x(r,"left","right")+i),Math.round(s+a)!==n&&(s-=x(r,"top","bottom")+a)),!function(e){return e===b(e).document.documentElement}(e)){var c=Math.round(l+i)-t,u=Math.round(s+a)-n;1!==Math.abs(c)&&(l-=c),1!==Math.abs(u)&&(s-=u)}return R(o.left,o.top,l,s)}(e):S}function R(e,t,n,r){return{x:e,y:t,width:n,height:r}}var T=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=R(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=O(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),k=function(e,t){var n,r,o,i,a,l,s,c=(r=(n=t).x,o=n.y,i=n.width,a=n.height,l="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(l.prototype),y(s,{x:r,y:o,width:i,height:a,top:o,right:r+i,bottom:a+o,left:r}),s);y(this,{target:e,contentRect:c})},P=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new d,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof b(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new T(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof b(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new k(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),z="undefined"!=typeof WeakMap?new WeakMap:new d,I=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=g.getInstance(),r=new P(t,n,this);z.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){I.prototype[e]=function(){var t;return(t=z.get(this))[e].apply(t,arguments)}});const E=void 0!==h.ResizeObserver?h.ResizeObserver:I;var A=["client","offset","scroll","bounds","margin"];function M(e){var t=[];return A.forEach(function(n){e[n]&&t.push(n)}),t}function j(e,t){var n={};if(t.indexOf("client")>-1&&(n.client={top:e.clientTop,left:e.clientLeft,width:e.clientWidth,height:e.clientHeight}),t.indexOf("offset")>-1&&(n.offset={top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight}),t.indexOf("scroll")>-1&&(n.scroll={top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}),t.indexOf("bounds")>-1){var r=e.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(t.indexOf("margin")>-1){var o=getComputedStyle(e);n.margin={top:o?parseInt(o.marginTop):0,right:o?parseInt(o.marginRight):0,bottom:o?parseInt(o.marginBottom):0,left:o?parseInt(o.marginLeft):0}}return n}var L=function(t){var n,r;return r=n=function(n){var r,o;function i(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))||this).state={contentRect:{entry:{},client:{},offset:{},scroll:{},bounds:{},margin:{}}},e._animationFrameID=null,e._resizeObserver=null,e._node=null,e._window=null,e.measure=function(t){var n=j(e._node,M(e.props));t&&(n.entry=t[0].contentRect),e._animationFrameID=e._window.requestAnimationFrame(function(){null!==e._resizeObserver&&(e.setState({contentRect:n}),"function"==typeof e.props.onResize&&e.props.onResize(n))})},e._handleRef=function(t){var n;null!==e._resizeObserver&&null!==e._node&&e._resizeObserver.unobserve(e._node),e._node=t,e._window=(n=e._node)&&n.ownerDocument&&n.ownerDocument.defaultView||window;var r=e.props.innerRef;r&&("function"==typeof r?r(e._node):r.current=e._node),null!==e._resizeObserver&&null!==e._node&&e._resizeObserver.observe(e._node)},e}o=n,(r=i).prototype=Object.create(o.prototype),r.prototype.constructor=r,s(r,o);var c=i.prototype;return c.componentDidMount=function(){this._resizeObserver=null!==this._window&&this._window.ResizeObserver?new this._window.ResizeObserver(this.measure):new E(this.measure),null!==this._node&&(this._resizeObserver.observe(this._node),"function"==typeof this.props.onResize&&this.props.onResize(j(this._node,M(this.props))))},c.componentWillUnmount=function(){null!==this._window&&this._window.cancelAnimationFrame(this._animationFrameID),null!==this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},c.render=function(){var n=this.props,r=(n.innerRef,n.onResize,l(n,["innerRef","onResize"]));return(0,e.createElement)(t,a({},r,{measureRef:this._handleRef,measure:this.measure,contentRect:this.state.contentRect}))},i}(e.Component),n.propTypes={client:u().bool,offset:u().bool,scroll:u().bool,bounds:u().bool,margin:u().bool,innerRef:u().oneOfType([u().object,u().func]),onResize:u().func},r}(function(e){var t=e.measure,n=e.measureRef,r=e.contentRect;return(0,e.children)({measure:t,measureRef:n,contentRect:r})});L.displayName="Measure",L.propTypes.children=u().func;const N=L;var H=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;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),D=Math.abs,G=String.fromCharCode,W=Object.assign;function F(e){return e.trim()}function U(e,t,n){return e.replace(t,n)}function B(e,t){return e.indexOf(t)}function V(e,t){return 0|e.charCodeAt(t)}function $(e,t,n){return e.slice(t,n)}function q(e){return e.length}function Z(e){return e.length}function Y(e,t){return t.push(e),e}var X=1,J=1,K=0,Q=0,ee=0,te="";function ne(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:X,column:J,length:a,return:""}}function re(e,t){return W(ne("",null,null,"",null,null,0),e,{length:-e.length},t)}function oe(){return ee=Q>0?V(te,--Q):0,J--,10===ee&&(J=1,X--),ee}function ie(){return ee=Q<K?V(te,Q++):0,J++,10===ee&&(J=1,X++),ee}function ae(){return V(te,Q)}function le(){return Q}function se(e,t){return $(te,e,t)}function ce(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ue(e){return X=J=1,K=q(te=e),Q=0,[]}function de(e){return te="",e}function fe(e){return F(se(Q-1,ve(91===e?e+2:40===e?e+1:e)))}function he(e){for(;(ee=ae())&&ee<33;)ie();return ce(e)>2||ce(ee)>3?"":" "}function pe(e,t){for(;--t&&ie()&&!(ee<48||ee>102||ee>57&&ee<65||ee>70&&ee<97););return se(e,le()+(t<6&&32==ae()&&32==ie()))}function ve(e){for(;ie();)switch(ee){case e:return Q;case 34:case 39:34!==e&&39!==e&&ve(ee);break;case 40:41===e&&ve(e);break;case 92:ie()}return Q}function me(e,t){for(;ie()&&e+ee!==57&&(e+ee!==84||47!==ae()););return"/*"+se(t,Q-1)+"*"+G(47===e?e:ie())}function ge(e){for(;!ce(ae());)ie();return se(e,Q)}var ye="-ms-",be="-moz-",Se="-webkit-",we="comm",_e="rule",xe="decl",Ce="@keyframes";function Oe(e,t){for(var n="",r=Z(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Re(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case xe:return e.return=e.return||e.value;case we:return"";case Ce:return e.return=e.value+"{"+Oe(e.children,r)+"}";case _e:e.value=e.props.join(",")}return q(n=Oe(e.children,r))?e.return=e.value+"{"+n+"}":""}function Te(e){return de(ke("",null,null,null,[""],e=ue(e),0,[0],e))}function ke(e,t,n,r,o,i,a,l,s){for(var c=0,u=0,d=a,f=0,h=0,p=0,v=1,m=1,g=1,y=0,b="",S=o,w=i,_=r,x=b;m;)switch(p=y,y=ie()){case 40:if(108!=p&&58==V(x,d-1)){-1!=B(x+=U(fe(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:x+=fe(y);break;case 9:case 10:case 13:case 32:x+=he(p);break;case 92:x+=pe(le()-1,7);continue;case 47:switch(ae()){case 42:case 47:Y(ze(me(ie(),le()),t,n),s);break;default:x+="/"}break;case 123*v:l[c++]=q(x)*g;case 125*v:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+u:-1==g&&(x=U(x,/\f/g,"")),h>0&&q(x)-d&&Y(h>32?Ie(x+";",r,n,d-1):Ie(U(x," ","")+";",r,n,d-2),s);break;case 59:x+=";";default:if(Y(_=Pe(x,t,n,c,u,o,l,b,S=[],w=[],d),i),123===y)if(0===u)ke(x,t,_,_,S,i,d,l,w);else switch(99===f&&110===V(x,3)?100:f){case 100:case 108:case 109:case 115:ke(e,_,_,r&&Y(Pe(e,_,_,0,0,o,l,b,o,S=[],d),w),o,w,d,l,r?S:w);break;default:ke(x,_,_,_,[""],w,0,l,w)}}c=u=h=0,v=g=1,b=x="",d=a;break;case 58:d=1+q(x),h=p;default:if(v<1)if(123==y)--v;else if(125==y&&0==v++&&125==oe())continue;switch(x+=G(y),y*v){case 38:g=u>0?1:(x+="\f",-1);break;case 44:l[c++]=(q(x)-1)*g,g=1;break;case 64:45===ae()&&(x+=fe(ie())),f=ae(),u=d=q(b=x+=ge(le())),y++;break;case 45:45===p&&2==q(x)&&(v=0)}}return i}function Pe(e,t,n,r,o,i,a,l,s,c,u){for(var d=o-1,f=0===o?i:[""],h=Z(f),p=0,v=0,m=0;p<r;++p)for(var g=0,y=$(e,d+1,d=D(v=a[p])),b=e;g<h;++g)(b=F(v>0?f[g]+" "+y:U(y,/&\f/g,f[g])))&&(s[m++]=b);return ne(e,t,n,0===o?_e:l,s,c,u)}function ze(e,t,n){return ne(e,t,n,we,G(ee),$(e,2,-2),0)}function Ie(e,t,n,r){return ne(e,t,n,xe,$(e,0,r),$(e,r+1,-1),r)}var Ee=function(e,t,n){for(var r=0,o=0;r=o,o=ae(),38===r&&12===o&&(t[n]=1),!ce(o);)ie();return se(e,Q)},Ae=new WeakMap,Me=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=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)||Ae.get(n))&&!r){Ae.set(e,!0);for(var o=[],i=function(e,t){return de(function(e,t){var n=-1,r=44;do{switch(ce(r)){case 0:38===r&&12===ae()&&(t[n]=1),e[n]+=Ee(Q-1,t,n);break;case 2:e[n]+=fe(r);break;case 4:if(44===r){e[++n]=58===ae()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=G(r)}}while(r=ie());return e}(ue(e),t))}(t,o),a=n.props,l=0,s=0;l<i.length;l++)for(var c=0;c<a.length;c++,s++)e.props[s]=o[l]?i[l].replace(/&\f/g,a[c]):a[c]+" "+i[l]}}},je=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Le(e,t){switch(function(e,t){return 45^V(e,0)?(((t<<2^V(e,0))<<2^V(e,1))<<2^V(e,2))<<2^V(e,3):0}(e,t)){case 5103:return Se+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Se+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Se+e+be+e+ye+e+e;case 6828:case 4268:return Se+e+ye+e+e;case 6165:return Se+e+ye+"flex-"+e+e;case 5187:return Se+e+U(e,/(\w+).+(:[^]+)/,Se+"box-$1$2"+ye+"flex-$1$2")+e;case 5443:return Se+e+ye+"flex-item-"+U(e,/flex-|-self/,"")+e;case 4675:return Se+e+ye+"flex-line-pack"+U(e,/align-content|flex-|-self/,"")+e;case 5548:return Se+e+ye+U(e,"shrink","negative")+e;case 5292:return Se+e+ye+U(e,"basis","preferred-size")+e;case 6060:return Se+"box-"+U(e,"-grow","")+Se+e+ye+U(e,"grow","positive")+e;case 4554:return Se+U(e,/([^-])(transform)/g,"$1"+Se+"$2")+e;case 6187:return U(U(U(e,/(zoom-|grab)/,Se+"$1"),/(image-set)/,Se+"$1"),e,"")+e;case 5495:case 3959:return U(e,/(image-set\([^]*)/,Se+"$1$`$1");case 4968:return U(U(e,/(.+:)(flex-)?(.*)/,Se+"box-pack:$3"+ye+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Se+e+e;case 4095:case 3583:case 4068:case 2532:return U(e,/(.+)-inline(.+)/,Se+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(q(e)-1-t>6)switch(V(e,t+1)){case 109:if(45!==V(e,t+4))break;case 102:return U(e,/(.+:)(.+)-([^]+)/,"$1"+Se+"$2-$3$1"+be+(108==V(e,t+3)?"$3":"$2-$3"))+e;case 115:return~B(e,"stretch")?Le(U(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==V(e,t+1))break;case 6444:switch(V(e,q(e)-3-(~B(e,"!important")&&10))){case 107:return U(e,":",":"+Se)+e;case 101:return U(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Se+(45===V(e,14)?"inline-":"")+"box$3$1"+Se+"$2$3$1"+ye+"$2box$3")+e}break;case 5936:switch(V(e,t+11)){case 114:return Se+e+ye+U(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Se+e+ye+U(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Se+e+ye+U(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Se+e+ye+e+e}return e}var Ne=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case xe:e.return=Le(e.value,e.length);break;case Ce:return Oe([re(e,{value:U(e.value,"@","@"+Se)})],r);case _e:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Oe([re(e,{props:[U(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Oe([re(e,{props:[U(t,/:(plac\w+)/,":"+Se+"input-$1")]}),re(e,{props:[U(t,/:(plac\w+)/,":-moz-$1")]}),re(e,{props:[U(t,/:(plac\w+)/,ye+"input-$1")]})],r)}return""})}}],He=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 r,o,i=e.stylisPlugins||Ne,a={},l=[];r=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<t.length;n++)a[t[n]]=!0;l.push(e)});var s,c,u,d,f=[Re,(d=function(e){s.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],h=(c=[Me,je].concat(i,f),u=Z(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});o=function(e,t,n,r){s=n,Oe(Te(e?e+"{"+t.styles+"}":t.styles),h),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new H({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return p.sheet.hydrate(l),p};function De(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var Ge=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},We=function(e,t,n){Ge(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}},Fe={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};function Ue(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Be=/[A-Z]|^ms/g,Ve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,$e=function(e){return 45===e.charCodeAt(1)},qe=function(e){return null!=e&&"boolean"!=typeof e},Ze=Ue(function(e){return $e(e)?e:e.replace(Be,"-$&").toLowerCase()}),Ye=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Ve,function(e,t,n){return Je={name:t,styles:n,next:Je},t})}return 1===Fe[e]||$e(e)||"number"!=typeof t||0===t?t:t+"px"};function Xe(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Je={name:o.name,styles:o.styles,next:Je},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)Je={name:a.name,styles:a.styles,next:Je},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Xe(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var l=a;null!=t&&void 0!==t[l]?r+=i+"{"+t[l]+"}":qe(l)&&(r+=Ze(i)+":"+Ye(i,l)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Xe(e,t,a);switch(i){case"animation":case"animationName":r+=Ze(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var c=0;c<a.length;c++)qe(a[c])&&(r+=Ze(i)+":"+Ye(i,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var l=Je,s=n(e);return Je=l,Xe(e,t,s)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var Je,Ke=/label:\s*([^\s;{]+)\s*(;|$)/g;function Qe(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Je=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Xe(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Xe(n,t,e[a]),r&&(o+=i[a]);Ke.lastIndex=0;for(var l,s="";null!==(l=Ke.exec(o));)s+="-"+l[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+s;return{name:c,styles:o,next:Je}}var et,tt,nt=!!e.useInsertionEffect&&e.useInsertionEffect,rt=nt||function(e){return e()},ot=nt||e.useLayoutEffect,it=e.createContext("undefined"!=typeof HTMLElement?He({key:"css"}):null),at=it.Provider,lt=function(t){return(0,e.forwardRef)(function(n,r){var o=(0,e.useContext)(it);return t(n,o,r)})},st=e.createContext({}),ct={}.hasOwnProperty,ut="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",dt=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ge(t,n,r),rt(function(){return We(t,n,r)}),null},ft=lt(function(t,n,r){var o=t.css;"string"==typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var i=t[ut],a=[o],l="";"string"==typeof t.className?l=De(n.registered,a,t.className):null!=t.className&&(l=t.className+" ");var s=Qe(a,void 0,e.useContext(st));l+=n.key+"-"+s.name;var c={};for(var u in t)ct.call(t,u)&&"css"!==u&&u!==ut&&(c[u]=t[u]);return c.className=l,r&&(c.ref=r),e.createElement(e.Fragment,null,e.createElement(dt,{cache:n,serialized:s,isStringTag:"string"==typeof i}),e.createElement(i,c))}),ht=(o(146),function(t,n){var r=arguments;if(null==n||!ct.call(n,"css"))return e.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=ft,i[1]=function(e,t){var n={};for(var r in t)ct.call(t,r)&&(n[r]=t[r]);return n[ut]=e,n}(t,n);for(var a=2;a<o;a++)i[a]=r[a];return e.createElement.apply(null,i)});et=ht||(ht={}),tt||(tt=et.JSX||(et.JSX={}));var pt=lt(function(t,n){var r=Qe([t.styles],void 0,e.useContext(st)),o=e.useRef();return ot(function(){var e=n.key+"-global",t=new n.sheet.constructor({key:e,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy}),i=!1,a=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return n.sheet.tags.length&&(t.before=n.sheet.tags[0]),null!==a&&(i=!0,a.setAttribute("data-emotion",e),t.hydrate([a])),o.current=[t,i],function(){t.flush()}},[n]),ot(function(){var e=o.current,t=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&We(n,r.next,!0),t.tags.length){var i=t.tags[t.tags.length-1].nextElementSibling;t.before=i,t.flush()}n.insert("",r,t,!1)}},[n,r.name]),null});function vt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Qe(t)}var mt,gt=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var l in a="",i)i[l]&&l&&(a&&(a+=" "),a+=l);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o},yt=function(e){var t=e.cache,n=e.serializedArr;return rt(function(){for(var e=0;e<n.length;e++)We(t,n[e],!1)}),null},bt=lt(function(t,n){var r=[],o=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var i=Qe(t,n.registered);return r.push(i),Ge(n,i,!1),n.key+"-"+i.name},i={css:o,cx:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,t,n){var r=[],o=De(e,r,n);return r.length<2?n:o+t(r)}(n.registered,o,gt(t))},theme:e.useContext(st)},a=t.children(i);return e.createElement(e.Fragment,null,e.createElement(yt,{cache:n,serializedArr:r}),a)}),St="wv-read-mode",wt="resize",_t="pageNumberUpdated",xt="zoomUpdated",Ct="addAnnotConfigUpdated",Ot=o(72),Rt=o.n(Ot),Tt=o(929);function kt(e){return kt="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},kt(e)}function Pt(e){return function(e){if(Array.isArray(e))return zt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return zt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function It(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(kt(e)+" is not iterable")}function Et(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return At(c,"_invoke",function(n,r,o){var i,l,s,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,l=0,s=e,f.n=n,a}};function h(n,r){for(l=n,s=r,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],h=f.p,p=i[2];n>3?(o=p===r)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=h&&((o=n<2&&h<i[1])?(l=0,f.v=r,f.n=i[1]):h<p&&(o=n<3||i[0]>r||r>p)&&(i[4]=n,i[5]=r,f.n=p,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),l=u,s=p;(t=l<2?e:s)||!d;){i||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:d}}}(n,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(At(t={},r,function(){return this}),t),d=c.prototype=l.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,At(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=c,At(d,"constructor",c),At(c,"constructor",s),s.displayName="GeneratorFunction",At(c,o,"GeneratorFunction"),At(d),At(d,o,"Generator"),At(d,r,function(){return this}),At(d,"toString",function(){return"[object Generator]"}),(Et=function(){return{w:i,m:f}})()}function At(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}At=function(e,t,n,r){function i(t,n){At(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},At(e,t,n,r)}function Mt(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function jt(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){Mt(i,r,o,a,l,"next",e)}function l(e){Mt(i,r,o,a,l,"throw",e)}a(void 0)})}}function Lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wt(r.key),r)}}function Nt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nt=function(){return!!e})()}function Ht(e){return Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ht(e)}function Dt(e,t){return Dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dt(e,t)}function Gt(e,t,n){return(t=Wt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(e){var t=function(e){if("object"!=kt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kt(t)?t:t+""}Rt()(Tt.A,{insert:"head",singleton:!1}),Tt.A.locals;var Ft=new WeakMap,Ut=0,Bt=function(e){function n(e){var t,r,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),Gt((r=this,i=[e],o=Ht(o=n),t=function(e,t){if(t&&("object"==kt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Nt()?Reflect.construct(o,i||[],Ht(r).constructor):o.apply(r,i))),"handleLinkClicked",function(e){if(e.match(/^\d+\-0\.html$/)){var n=Number(e.split("-")[0]);if(t.pageObjNumMap.has(n)){var r=t.pageObjNumMap.get(n);t.jumpToPage(r)}else{var o=function(){var e=jt(Et().m(function e(){var r,o,i;return Et().w(function(e){for(;;)switch(e.n){case 0:t.setState({showSpinner:!0}),r=0;case 1:if(!(r<t.state.pages.length)){e.n=5;break}if(!t.state.pages[r].loaded){e.n=2;break}return e.a(3,4);case 2:return e.n=3,t.getPageContent(r,!0);case 3:if(o=e.v,i=o.objNum,n!==i){e.n=4;break}return t.jumpToPage(r),t.setState({showSpinner:!1}),e.a(3,5);case 4:r++,e.n=1;break;case 5:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();t.runPdfNetTask(o)}}else{var i;null===(i=window)||void 0===i||i.open(e)}}),Gt(t,"getViewerElement",function(){return t.viewerElement}),Gt(t,"handleAddAnnotConfigUpdated",function(e){}),t.state={pages:[],zoom:"1",showSpinner:!0,addAnnotConfig:void 0},t.initialized=!1,t.doc=void 0,t.pageObjNumMap=new Map,t.preloadPagesNum=1,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dt(e,t)}(n,e),function(e,t){return t&&Lt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(n,[{key:"componentDidMount",value:function(){var e=this.props.options.rootNode;e?(this.viewerElement=e.getElementById(St),this.viewerElement.clientHeight||(this.viewerElem