text: /*! For license information please see 7.b4050565.chunk.js.LICENSE.txt */
  (this.webpackJsonpkabeersdrive=this.webpackJsonpkabeersdrive||[]).push([[7],{136:function(e,t,n){"use strict";n.r(t);var r=n(105);n.d(t,"default",(function(){return r.a}))},246:function(e,t,n){"use strict";var r=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=i.default.memo(i.default.forwardRef((function(t,n){return i.default.createElement(o.default,(0,a.default)({ref:n},t),e)})));0;return n.muiName=o.default.muiName,n};var a=r(n(42)),i=r(n(0)),o=r(n(136))},251:function(e,t,n){e.exports=n(274)},253:function(module,exports,__webpack_require__){(function(process,Buffer){var _assertThisInitialized=__webpack_require__(297),_get=__webpack_require__(356),_getPrototypeOf=__webpack_require__(267),_slicedToArray=__webpack_require__(298),_regeneratorRuntime=__webpack_require__(238),_asyncToGenerator=__webpack_require__(300),_toConsumableArray=__webpack_require__(361),_createForOfIteratorHelper=__webpack_require__(365),_createClass=__webpack_require__(269),_classCallCheck=__webpack_require__(270),_inherits=__webpack_require__(366),_createSuper=__webpack_require__(368),factory;factory=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},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=0)}([function(e,t,n){"use strict";var r=n(1),a=n(3),i=n(16),o=n(17),s=n(4),c=n(18),l=n(10),u=n(6);if(n(7).isNodeJS){var h=n(19).PDFNodeStream;a.setPDFNetworkStreamFactory((function(e){return new h(e)}))}else{var d,f=n(22).PDFNetworkStream;s.isFetchSupported()&&(d=n(23).PDFFetchStream),a.setPDFNetworkStreamFactory((function(e){return d&&s.isValidFetchUrl(e.url)?new d(e):new f(e)}))}t.build=a.build,t.version=a.version,t.getDocument=a.getDocument,t.LoopbackPort=a.LoopbackPort,t.PDFDataRangeTransport=a.PDFDataRangeTransport,t.PDFWorker=a.PDFWorker,t.renderTextLayer=i.renderTextLayer,t.AnnotationLayer=o.AnnotationLayer,t.createPromiseCapability=r.createPromiseCapability,t.PasswordResponses=r.PasswordResponses,t.InvalidPDFException=r.InvalidPDFException,t.MissingPDFException=r.MissingPDFException,t.SVGGraphics=c.SVGGraphics,t.NativeImageDecoding=r.NativeImageDecoding,t.CMapCompressionType=r.CMapCompressionType,t.PermissionFlag=r.PermissionFlag,t.UnexpectedResponseException=r.UnexpectedResponseException,t.OPS=r.OPS,t.VerbosityLevel=r.VerbosityLevel,t.UNSUPPORTED_FEATURES=r.UNSUPPORTED_FEATURES,t.createValidAbsoluteUrl=r.createValidAbsoluteUrl,t.createObjectURL=r.createObjectURL,t.removeNullCharacters=r.removeNullCharacters,t.shadow=r.shadow,t.Util=r.Util,t.RenderingCancelledException=s.RenderingCancelledException,t.getFilenameFromUrl=s.getFilenameFromUrl,t.LinkTarget=s.LinkTarget,t.addLinkAttributes=s.addLinkAttributes,t.loadScript=s.loadScript,t.PDFDateString=s.PDFDateString,t.GlobalWorkerOptions=l.GlobalWorkerOptions,t.apiCompatibilityParams=u.apiCompatibilityParams},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=b,t.arraysToBytes=function(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var n=0,r=0;r<t;r++)n+=b(e[r]);for(var a=0,i=new Uint8Array(n),o=0;o<t;o++){var s=e[o];s instanceof Uint8Array||(s="string"===typeof s?y(s):new Uint8Array(s));var c=s.byteLength;i.set(s,a),a+=c}return i},t.assert=s,t.bytesToString=function(e){s(null!==e&&"object"===typeof e&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var n=[],r=0;r<t;r+=8192){var a=Math.min(r+8192,t),i=e.subarray(r,a);n.push(String.fromCharCode.apply(null,i))}return n.join("")},t.createPromiseCapability=function(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise((function(n,r){e.resolve=function(e){t=!0,n(e)},e.reject=function(e){t=!0,r(e)}})),e},t.getVerbosityLevel=function(){return a},t.info=function(e){a>=r.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){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))},t.isBool=function(e){return"boolean"===typeof e},t.isEmptyObj=function(e){for(var t in e)return!1;return!0},t.isNum=function(e){return"number"===typeof e},t.isString=function(e){return"string"===typeof e},t.isSameOrigin=function(e,t){var n;try{if(!(n=new URL(e)).origin||"null"===n.origin)return!1}catch(a){return!1}var r=new URL(t,n);return n.origin===r.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var n=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}}(n))return n}catch(r){}return null},t.removeNullCharacters=function(e){return"string"!==typeof e?(i("The argument for removeNullCharacters must be a string."),e):e.replace(m,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(a=e)},t.shadow=c,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=y,t.stringToPDFString=function(e){var t=e.length,n=[];if("\xfe"===e[0]&&"\xff"===e[1])for(var r=2;r<t;r+=2)n.push(String.fromCharCode(e.charCodeAt(r)<<8|e.charCodeAt(r+1)));else if("\xff"===e[0]&&"\xfe"===e[1])for(var a=2;a<t;a+=2)n.push(String.fromCharCode(e.charCodeAt(a+1)<<8|e.charCodeAt(a)));else for(var i=0;i<t;++i){var o=x[e.charCodeAt(i)];n.push(o?String.fromCharCode(o):e.charAt(i))}return n.join("")},t.stringToUTF8String=function(e){return decodeURIComponent(escape(e))},t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=i,t.unreachable=o,t.IsEvalSupportedCached=t.IsLittleEndianCached=t.createObjectURL=t.FormatError=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.NativeImageDecoding=t.MissingPDFException=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VerbosityLevel=t.OPS=t.IDENTITY_MATRIX=t.FONT_IDENTITY_MATRIX=t.BaseException=void 0,n(2),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.NativeImageDecoding={NONE:"none",DECODE:"decode",DISPLAY:"display"},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.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",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var r={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=r,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",smask:"smask",shadingPattern:"shadingPattern",font:"font"},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var a=r.WARNINGS;function i(e){a>=r.WARNINGS&&console.log("Warning: ".concat(e))}function o(e){throw new Error(e)}function s(e,t){e||o(t)}function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!1}),n}var l=function(){function e(t){this.constructor===e&&o("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=l;var u=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).code=r,a}return n}(l);t.PasswordException=u;var h=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).details=r,a}return n}(l);t.UnknownErrorException=h;var d=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return n}(l);t.InvalidPDFException=d;var f=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return n}(l);t.MissingPDFException=f;var p=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).status=r,a}return n}(l);t.UnexpectedResponseException=p;var g=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return n}(l);t.FormatError=g;var v=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return n}(l);t.AbortException=v;var m=/\x00/g;function y(e){s("string"===typeof e,"Invalid argument for stringToBytes");for(var t=e.length,n=new Uint8Array(t),r=0;r<t;++r)n[r]=255&e.charCodeAt(r);return n}function b(e){return void 0!==e.length?e.length:(s(void 0!==e.byteLength),e.byteLength)}var _={get value(){return c(this,"value",function(){var e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}};t.IsLittleEndianCached=_;var k={get value(){return c(this,"value",function(){try{return new Function(""),!0}catch(e){return!1}}())}};t.IsEvalSupportedCached=k;var C=["rgb(",0,",",0,",",0,")"],A=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"makeCssRgb",value:function(e,t,n){return C[1]=e,C[3]=t,C[5]=n,C.join("")}},{key:"transform",value:function(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]]}},{key:"applyTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var 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]}},{key:"getAxialAlignedBoundingBox",value:function(t,n){var r=e.applyTransform(t,n),a=e.applyTransform(t.slice(2,4),n),i=e.applyTransform([t[0],t[3]],n),o=e.applyTransform([t[2],t[1]],n);return[Math.min(r[0],a[0],i[0],o[0]),Math.min(r[1],a[1],i[1],o[1]),Math.max(r[0],a[0],i[0],o[0]),Math.max(r[1],a[1],i[1],o[1])]}},{key:"inverseTransform",value:function(e){var 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]}},{key:"apply3dTransform",value:function(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]]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],n=e[0]*t[0]+e[1]*t[2],r=e[0]*t[1]+e[1]*t[3],a=e[2]*t[0]+e[3]*t[2],i=e[2]*t[1]+e[3]*t[3],o=(n+i)/2,s=Math.sqrt((n+i)*(n+i)-4*(n*i-a*r))/2,c=o+s||1,l=o-s||1;return[Math.sqrt(c),Math.sqrt(l)]}},{key:"normalizeRect",value:function(e){var 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}},{key:"intersect",value:function(t,n){function r(e,t){return e-t}var a=[t[0],t[2],n[0],n[2]].sort(r),i=[t[1],t[3],n[1],n[3]].sort(r),o=[];return t=e.normalizeRect(t),n=e.normalizeRect(n),a[0]===t[0]&&a[1]===n[0]||a[0]===n[0]&&a[1]===t[0]?(o[0]=a[1],o[2]=a[2],i[0]===t[1]&&i[1]===n[1]||i[0]===n[1]&&i[1]===t[1]?(o[1]=i[1],o[3]=i[2],o):null):null}}]),e}();t.Util=A;var x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364],E=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!r&&URL.createObjectURL){var a=new Blob([t],{type:n});return URL.createObjectURL(a)}for(var i="data:".concat(n,";base64,"),o=0,s=t.length;o<s;o+=3){var c=255&t[o],l=255&t[o+1],u=255&t[o+2],h=c>>2,d=(3&c)<<4|l>>4,f=o+1<s?(15&l)<<2|u>>6:64,p=o+2<s?63&u:64;i+=e[h]+e[d]+e[f]+e[p]}return i}}();t.createObjectURL=E},function(e,t,n){},function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.build=exports.version=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFWorker=exports.PDFDataRangeTransport=exports.LoopbackPort=void 0;var _util=__w_pdfjs_require__(1),_display_utils=__w_pdfjs_require__(4),_font_loader=__w_pdfjs_require__(5),_api_compatibility=__w_pdfjs_require__(6),_canvas=__w_pdfjs_require__(8),_worker_options=__w_pdfjs_require__(10),_is_node=__w_pdfjs_require__(7),_message_handler=__w_pdfjs_require__(11),_metadata=__w_pdfjs_require__(12),_transport_stream=__w_pdfjs_require__(14),_webgl=__w_pdfjs_require__(15),DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,createPDFNetworkStream;function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){var t,n=new PDFDocumentLoadingTask;if("string"===typeof e)t={url:e};else if((0,_util.isArrayBuffer)(e))t={data:e};else if(e instanceof PDFDataRangeTransport)t={range:e};else{if("object"!==typeof e)throw new Error("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");t=e}var r=Object.create(null),a=null,i=null;for(var o in t)if("url"!==o||"undefined"===typeof window)if("range"!==o)if("worker"!==o)if("data"!==o||t[o]instanceof Uint8Array)r[o]=t[o];else{var s=t[o];if("string"===typeof s)r[o]=(0,_util.stringToBytes)(s);else if("object"!==typeof s||null===s||isNaN(s.length)){if(!(0,_util.isArrayBuffer)(s))throw new Error("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property.");r[o]=new Uint8Array(s)}else r[o]=new Uint8Array(s)}else i=t[o];else a=t[o];else r[o]=new URL(t[o],window.location).href;r.rangeChunkSize=r.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,r.CMapReaderFactory=r.CMapReaderFactory||_display_utils.DOMCMapReaderFactory,r.ignoreErrors=!0!==r.stopAtErrors,r.pdfBug=!0===r.pdfBug;var c=Object.values(_util.NativeImageDecoding);if(void 0!==r.nativeImageDecoderSupport&&c.includes(r.nativeImageDecoderSupport)||(r.nativeImageDecoderSupport=_api_compatibility.apiCompatibilityParams.nativeImageDecoderSupport||_util.NativeImageDecoding.DECODE),Number.isInteger(r.maxImageSize)||(r.maxImageSize=-1),"boolean"!==typeof r.isEvalSupported&&(r.isEvalSupported=!0),"boolean"!==typeof r.disableFontFace&&(r.disableFontFace=_api_compatibility.apiCompatibilityParams.disableFontFace||!1),"boolean"!==typeof r.disableRange&&(r.disableRange=!1),"boolean"!==typeof r.disableStream&&(r.disableStream=!1),"boolean"!==typeof r.disableAutoFetch&&(r.disableAutoFetch=!1),"boolean"!==typeof r.disableCreateObjectURL&&(r.disableCreateObjectURL=_api_compatibility.apiCompatibilityParams.disableCreateObjectURL||!1),(0,_util.setVerbosityLevel)(r.verbosity),!i){var l={verbosity:r.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};i=l.port?PDFWorker.fromPort(l):new PDFWorker(l),n._worker=i}var u=n.docId;return i.promise.then((function(){if(n.destroyed)throw new Error("Loading aborted");return _fetchDocument(i,r,a,u).then((function(e){if(n.destroyed)throw new Error("Loading aborted");var t;a?t=new _transport_stream.PDFDataTransportStream({length:r.length,initialData:r.initialData,progressiveDone:r.progressiveDone,disableRange:r.disableRange,disableStream:r.disableStream},a):r.data||(t=createPDFNetworkStream({url:r.url,length:r.length,httpHeaders:r.httpHeaders,withCredentials:r.withCredentials,rangeChunkSize:r.rangeChunkSize,disableRange:r.disableRange,disableStream:r.disableStream}));var o=new _message_handler.MessageHandler(u,e,i.port);o.postMessageTransfers=i.postMessageTransfers;var s=new WorkerTransport(o,n,t,r);n._transport=s,o.send("Ready",null)}))})).catch(n._capability.reject),n}function _fetchDocument(e,t,n,r){return e.destroyed?Promise.reject(new Error("Worker was destroyed")):(n&&(t.length=n.length,t.initialData=n.initialData,t.progressiveDone=n.progressiveDone),e.messageHandler.sendWithPromise("GetDocRequest",{docId:r,apiVersion:"2.4.456",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,disableCreateObjectURL:t.disableCreateObjectURL,postMessageTransfers:e.postMessageTransfers,docBaseUrl:t.docBaseUrl,nativeImageDecoderSupport:t.nativeImageDecoderSupport,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported}).then((function(t){if(e.destroyed)throw new Error("Worker was destroyed");return t})))}var PDFDocumentLoadingTask=function(){var e=0;return function(){function t(){_classCallCheck(this,t),this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+e++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}return _createClass(t,[{key:"destroy",value:function(){var e=this;return this.destroyed=!0,(this._transport?this._transport.destroy():Promise.resolve()).then((function(){e._transport=null,e._worker&&(e._worker.destroy(),e._worker=null)}))}},{key:"then",value:function(e,t){throw new Error("Removed API method: PDFDocumentLoadingTask.then, use the `promise` getter instead.")}},{key:"promise",get:function(){return this._capability.promise}}]),t}()}(),PDFDataRangeTransport=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,e),this.length=t,this.initialData=n,this.progressiveDone=r,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}return _createClass(e,[{key:"addRangeListener",value:function(e){this._rangeListeners.push(e)}},{key:"addProgressListener",value:function(e){this._progressListeners.push(e)}},{key:"addProgressiveReadListener",value:function(e){this._progressiveReadListeners.push(e)}},{key:"addProgressiveDoneListener",value:function(e){this._progressiveDoneListeners.push(e)}},{key:"onDataRange",value:function(e,t){var n,r=_createForOfIteratorHelper(this._rangeListeners);try{for(r.s();!(n=r.n()).done;)(0,n.value)(e,t)}catch(a){r.e(a)}finally{r.f()}}},{key:"onDataProgress",value:function(e,t){var n=this;this._readyCapability.promise.then((function(){var r,a=_createForOfIteratorHelper(n._progressListeners);try{for(a.s();!(r=a.n()).done;)(0,r.value)(e,t)}catch(i){a.e(i)}finally{a.f()}}))}},{key:"onDataProgressiveRead",value:function(e){var t=this;this._readyCapability.promise.then((function(){var n,r=_createForOfIteratorHelper(t._progressiveReadListeners);try{for(r.s();!(n=r.n()).done;)(0,n.value)(e)}catch(a){r.e(a)}finally{r.f()}}))}},{key:"onDataProgressiveDone",value:function(){var e=this;this._readyCapability.promise.then((function(){var t,n=_createForOfIteratorHelper(e._progressiveDoneListeners);try{for(n.s();!(t=n.n()).done;)(0,t.value)()}catch(r){n.e(r)}finally{n.f()}}))}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}]),e}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function e(t,n){_classCallCheck(this,e),this._pdfInfo=t,this._transport=n}return _createClass(e,[{key:"getPage",value:function(e){return this._transport.getPage(e)}},{key:"getPageIndex",value:function(e){return this._transport.getPageIndex(e)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(e){return this._transport.getDestination(e)}},{key:"getPageLabels",value:function(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function(){return this._transport.getOpenAction()}},{key:"getOpenActionDestination",value:function(){return(0,_display_utils.deprecated)("getOpenActionDestination, use getOpenAction instead."),this.getOpenAction().then((function(e){return e&&e.dest?e.dest:null}))}},{key:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function(){return this._transport.getJavaScript()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"getStats",value:function(){return this._transport.getStats()}},{key:"cleanup",value:function(){return this._transport.startCleanup()}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprint",get:function(){return this._pdfInfo.fingerprint}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}}]),e}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function e(t,n,r){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];_classCallCheck(this,e),this._pageIndex=t,this._pageInfo=n,this._transport=r,this._stats=a?new _display_utils.StatTimer:null,this._pdfBug=a,this.commonObjs=r.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates=Object.create(null),this.destroyed=!1}return _createClass(e,[{key:"getViewport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scale,n=e.rotation,r=void 0===n?this.rotate:n,a=e.offsetX,i=void 0===a?0:a,o=e.offsetY,s=void 0===o?0:o,c=e.dontFlip,l=void 0!==c&&c;if(arguments.length>1||"number"===typeof arguments[0])throw new Error("PDFPageProxy.getViewport is called with obsolete arguments.");return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:r,offsetX:i,offsetY:s,dontFlip:l})}},{key:"getAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.intent,n=void 0===t?null:t;return this.annotationsPromise&&this.annotationsIntent===n||(this.annotationsPromise=this._transport.getAnnotations(this._pageIndex,n),this.annotationsIntent=n),this.annotationsPromise}},{key:"render",value:function(e){var t=this,n=e.canvasContext,r=e.viewport,a=e.intent,i=void 0===a?"display":a,o=e.enableWebGL,s=void 0!==o&&o,c=e.renderInteractiveForms,l=void 0!==c&&c,u=e.transform,h=void 0===u?null:u,d=e.imageLayer,f=void 0===d?null:d,p=e.canvasFactory,g=void 0===p?null:p,v=e.background,m=void 0===v?null:v;this._stats&&this._stats.time("Overall");var y="print"===i?"print":"display";this.pendingCleanup=!1,this.intentStates[y]||(this.intentStates[y]=Object.create(null));var b=this.intentStates[y];b.streamReaderCancelTimeout&&(clearTimeout(b.streamReaderCancelTimeout),b.streamReaderCancelTimeout=null);var _=g||new _display_utils.DOMCanvasFactory,k=new _webgl.WebGLContext({enable:s});b.displayReadyCapability||(b.displayReadyCapability=(0,_util.createPromiseCapability)(),b.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:y,renderInteractiveForms:!0===l}));var C=function(e){var n=b.renderTasks.indexOf(A);n>=0&&b.renderTasks.splice(n,1),(t.cleanupAfterRender||"print"===y)&&(t.pendingCleanup=!0),t._tryCleanup(),e?(A.capability.reject(e),t._abortOperatorList({intentState:b,reason:e})):A.capability.resolve(),t._stats&&(t._stats.timeEnd("Rendering"),t._stats.timeEnd("Overall"))},A=new InternalRenderTask({callback:C,params:{canvasContext:n,viewport:r,transform:h,imageLayer:f,background:m},objs:this.objs,commonObjs:this.commonObjs,operatorList:b.operatorList,pageIndex:this._pageIndex,canvasFactory:_,webGLContext:k,useRequestAnimationFrame:"print"!==y,pdfBug:this._pdfBug});b.renderTasks||(b.renderTasks=[]),b.renderTasks.push(A);var x=A.task;return b.displayReadyCapability.promise.then((function(e){t.pendingCleanup?C():(t._stats&&t._stats.time("Rendering"),A.initializeGraphics(e),A.operatorListChanged())})).catch(C),x}},{key:"getOperatorList",value:function(){this.intentStates.oplist||(this.intentStates.oplist=Object.create(null));var e,t=this.intentStates.oplist;return t.opListReadCapability||((e={}).operatorListChanged=function(){if(t.operatorList.lastChunk){t.opListReadCapability.resolve(t.operatorList);var n=t.renderTasks.indexOf(e);n>=0&&t.renderTasks.splice(n,1)}},t.opListReadCapability=(0,_util.createPromiseCapability)(),t.renderTasks=[],t.renderTasks.push(e),t.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:"oplist"})),t.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.normalizeWhitespace,n=void 0!==t&&t,r=e.disableCombineTextItems,a=void 0!==r&&r,i=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===n,combineTextItems:!0!==a},{highWaterMark:i,size:function(e){return e.items.length}})}},{key:"getTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.streamTextContent(e);return new Promise((function(e,n){var r=t.getReader(),a={items:[],styles:Object.create(null)};!function t(){r.read().then((function(n){var r,i=n.value;n.done?e(a):(Object.assign(a.styles,i.styles),(r=a.items).push.apply(r,_toConsumableArray(i.items)),t())}),n)}()}))}},{key:"_destroy",value:function(){var e=this;this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;var t=[];return Object.keys(this.intentStates).forEach((function(n){var r=e.intentStates[n];e._abortOperatorList({intentState:r,reason:new Error("Page was destroyed."),force:!0}),"oplist"!==n&&r.renderTasks.forEach((function(e){var n=e.capability.promise.catch((function(){}));t.push(n),e.cancel()}))})),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(t)}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.pendingCleanup=!0,this._tryCleanup(e)}},{key:"_tryCleanup",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!(!this.pendingCleanup||Object.keys(this.intentStates).some((function(t){var n=e.intentStates[t];return 0!==n.renderTasks.length||!n.operatorList.lastChunk})))&&(Object.keys(this.intentStates).forEach((function(t){delete e.intentStates[t]})),this.objs.clear(),this.annotationsPromise=null,t&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0)}},{key:"_startRenderPage",value:function(e,t){var n=this.intentStates[t];n&&(this._stats&&this._stats.timeEnd("Page Request"),n.displayReadyCapability&&n.displayReadyCapability.resolve(e))}},{key:"_renderPageChunk",value:function(e,t){for(var n=0,r=e.length;n<r;n++)t.operatorList.fnArray.push(e.fnArray[n]),t.operatorList.argsArray.push(e.argsArray[n]);t.operatorList.lastChunk=e.lastChunk;for(var a=0;a<t.renderTasks.length;a++)t.renderTasks[a].operatorListChanged();e.lastChunk&&this._tryCleanup()}},{key:"_pumpOperatorList",value:function(e){var t=this;(0,_util.assert)(e.intent,'PDFPageProxy._pumpOperatorList: Expected "intent" argument.');var n=this._transport.messageHandler.sendWithStream("GetOperatorList",e).getReader(),r=this.intentStates[e.intent];r.streamReader=n,function e(){n.read().then((function(n){var a=n.value;n.done?r.streamReader=null:t._transport.destroyed||(t._renderPageChunk(a,r),e())}),(function(e){if(r.streamReader=null,!t._transport.destroyed){if(r.operatorList){r.operatorList.lastChunk=!0;for(var n=0;n<r.renderTasks.length;n++)r.renderTasks[n].operatorListChanged();t._tryCleanup()}if(r.displayReadyCapability)r.displayReadyCapability.reject(e);else{if(!r.opListReadCapability)throw e;r.opListReadCapability.reject(e)}}}))}()}},{key:"_abortOperatorList",value:function(e){var t=this,n=e.intentState,r=e.reason,a=e.force,i=void 0!==a&&a;if((0,_util.assert)(r instanceof Error||"object"===typeof r&&null!==r,'PDFPageProxy._abortOperatorList: Expected "reason" argument.'),n.streamReader){if(!i){if(0!==n.renderTasks.length)return;if(r instanceof _display_utils.RenderingCancelledException)return void(n.streamReaderCancelTimeout=setTimeout((function(){t._abortOperatorList({intentState:n,reason:r,force:!0}),n.streamReaderCancelTimeout=null}),RENDERING_CANCELLED_TIMEOUT))}n.streamReader.cancel(new _util.AbortException(r&&r.message)),n.streamReader=null,this._transport.destroyed||(Object.keys(this.intentStates).some((function(e){return t.intentStates[e]===n&&(delete t.intentStates[e],!0)})),this.cleanup())}}},{key:"pageNumber",get:function(){return this._pageIndex+1}},{key:"rotate",get:function(){return this._pageInfo.rotate}},{key:"ref",get:function(){return this._pageInfo.ref}},{key:"userUnit",get:function(){return this._pageInfo.userUnit}},{key:"view",get:function(){return this._pageInfo.view}},{key:"stats",get:function(){return this._stats}}]),e}();exports.PDFPageProxy=PDFPageProxy;var LoopbackPort=function(){function e(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];_classCallCheck(this,e),this._listeners=[],this._defer=t,this._deferred=Promise.resolve(void 0)}return _createClass(e,[{key:"postMessage",value:function(e,t){var n=this;if(this._defer){var r=new WeakMap,a={data:function e(n){if("object"!==typeof n||null===n)return n;if(r.has(n))return r.get(n);var a,i;if((a=n.buffer)&&(0,_util.isArrayBuffer)(a))return i=t&&t.includes(a)?new n.constructor(a,n.byteOffset,n.byteLength):new n.constructor(n),r.set(n,i),i;for(var o in i=Array.isArray(n)?[]:{},r.set(n,i),n){for(var s=void 0,c=n;!(s=Object.getOwnPropertyDescriptor(c,o));)c=Object.getPrototypeOf(c);if("undefined"!==typeof s.value)if("function"!==typeof s.value)i[o]=e(s.value);else if(n.hasOwnProperty&&n.hasOwnProperty(o))throw new Error("LoopbackPort.postMessage - cannot clone: ".concat(n[o]))}return i}(e)};this._deferred.then((function(){n._listeners.forEach((function(e){e.call(n,a)}))}))}else this._listeners.forEach((function(t){t.call(n,{data:e})}))}},{key:"addEventListener",value:function(e,t){this._listeners.push(t)}},{key:"removeEventListener",value:function(e,t){var n=this._listeners.indexOf(t);this._listeners.splice(n,1)}},{key:"terminate",value:function(){this._listeners.length=0}}]),e}();exports.LoopbackPort=LoopbackPort;var PDFWorker=function PDFWorkerClosure(){var pdfWorkerPorts=new WeakMap,isWorkerDisabled=!1,fallbackWorkerSrc,nextFakeWorkerId=0,fakeWorkerCapability;if(_is_node.isNodeJS)isWorkerDisabled=!0,fallbackWorkerSrc="./pdf.worker.js";else if("object"===typeof document&&"currentScript"in document){var pdfjsFilePath=document.currentScript&&document.currentScript.src;pdfjsFilePath&&(fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}function _getWorkerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if("undefined"!==typeof fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}function getMainThreadWorkerMessageHandler(){var e;try{e=globalThis.pdfjsWorker&&globalThis.pdfjsWorker.WorkerMessageHandler}catch(t){}return e||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();var loader=function(){var _ref8=_asyncToGenerator(_regeneratorRuntime.mark((function _callee(){var mainWorkerMessageHandler,worker;return _regeneratorRuntime.wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(mainWorkerMessageHandler=getMainThreadWorkerMessageHandler(),!mainWorkerMessageHandler){_context.next=3;break}return _context.abrupt("return",mainWorkerMessageHandler);case 3:if(!_is_node.isNodeJS){_context.next=6;break}return worker=eval("require")(_getWorkerSrc()),_context.abrupt("return",worker.WorkerMessageHandler);case 6:return _context.next=8,(0,_display_utils.loadScript)(_getWorkerSrc());case 8:return _context.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context.stop()}}),_callee)})));return function(){return _ref8.apply(this,arguments)}}();return loader().then(fakeWorkerCapability.resolve,fakeWorkerCapability.reject),fakeWorkerCapability.promise}function createCDNWrapper(e){var t="importScripts('"+e+"');";return URL.createObjectURL(new Blob([t]))}var PDFWorker=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.name,r=void 0===n?null:n,a=t.port,i=void 0===a?null:a,o=t.verbosity,s=void 0===o?(0,_util.getVerbosityLevel)():o;if(_classCallCheck(this,e),i&&pdfWorkerPorts.has(i))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=r,this.destroyed=!1,this.postMessageTransfers=!0,this.verbosity=s,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,i)return pdfWorkerPorts.set(i,this),void this._initializeFromPort(i);this._initialize()}return _createClass(e,[{key:"_initializeFromPort",value:function(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve()}},{key:"_initialize",value:function(){var e=this;if("undefined"!==typeof Worker&&!isWorkerDisabled&&!getMainThreadWorkerMessageHandler()){var t=_getWorkerSrc();try{(0,_util.isSameOrigin)(window.location.href,t)||(t=createCDNWrapper(new URL(t,window.location).href));var n=new Worker(t),r=new _message_handler.MessageHandler("main","worker",n),a=function(){n.removeEventListener("error",i),r.destroy(),n.terminate(),e.destroyed?e._readyCapability.reject(new Error("Worker was destroyed")):e._setupFakeWorker()},i=function(){e._webWorker||a()};n.addEventListener("error",i),r.on("test",(function(t){n.removeEventListener("error",i),e.destroyed?a():t?(e._messageHandler=r,e._port=n,e._webWorker=n,t.supportTransfers||(e.postMessageTransfers=!1),e._readyCapability.resolve(),r.send("configure",{verbosity:e.verbosity})):(e._setupFakeWorker(),r.destroy(),n.terminate())})),r.on("ready",(function(t){if(n.removeEventListener("error",i),e.destroyed)a();else try{o()}catch(r){e._setupFakeWorker()}}));var o=function(){var t=new Uint8Array([e.postMessageTransfers?255:0]);try{r.send("test",t,[t.buffer])}catch(n){(0,_util.warn)("Cannot use postMessage transfers."),t[0]=0,r.send("test",t)}};return void o()}catch(s){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var e=this;isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),isWorkerDisabled=!0),setupFakeWorkerGlobal().then((function(t){if(e.destroyed)e._readyCapability.reject(new Error("Worker was destroyed"));else{var n=new LoopbackPort;e._port=n;var r="fake"+nextFakeWorkerId++,a=new _message_handler.MessageHandler(r+"_worker",r,n);t.setup(a,n);var i=new _message_handler.MessageHandler(r,r+"_worker",n);e._messageHandler=i,e._readyCapability.resolve(),i.send("configure",{verbosity:e.verbosity})}})).catch((function(t){e._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(t.message,'".')))}))}},{key:"destroy",value:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),pdfWorkerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}},{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}}],[{key:"fromPort",value:function(t){if(!t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pdfWorkerPorts.has(t.port)?pdfWorkerPorts.get(t.port):new e(t)}},{key:"getWorkerSrc",value:function(){return _getWorkerSrc()}}]),e}();return PDFWorker}();exports.PDFWorker=PDFWorker;var WorkerTransport=function(){function e(t,n,r,a){_classCallCheck(this,e),this.messageHandler=t,this.loadingTask=n,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:n.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this)}),this._params=a,this.CMapReaderFactory=new a.CMapReaderFactory({baseUrl:a.cMapUrl,isCompressed:a.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}return _createClass(e,[{key:"destroy",value:function(){var e=this;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"));var t=[];this.pageCache.forEach((function(e){e&&t.push(e._destroy())})),this.pageCache.length=0,this.pagePromises.length=0;var n=this.messageHandler.sendWithPromise("Terminate",null);return t.push(n),Promise.all(t).then((function(){e.fontLoader.clear(),e._networkStream&&e._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var e=this,t=this.messageHandler,n=this.loadingTask;t.on("GetReader",(function(t,n){(0,_util.assert)(e._networkStream),e._fullReader=e._networkStream.getFullReader(),e._fullReader.onProgress=function(t){e._lastProgress={loaded:t.loaded,total:t.total}},n.onPull=function(){e._fullReader.read().then((function(e){var t=e.value;e.done?n.close():((0,_util.assert)((0,_util.isArrayBuffer)(t)),n.enqueue(new Uint8Array(t),1,[t]))})).catch((function(e){n.error(e)}))},n.onCancel=function(t){e._fullReader.cancel(t)}})),t.on("ReaderHeadersReady",(function(t){var r=(0,_util.createPromiseCapability)(),a=e._fullReader;return a.headersReady.then((function(){a.isStreamingSupported&&a.isRangeSupported||(e._lastProgress&&n.onProgress&&n.onProgress(e._lastProgress),a.onProgress=function(e){n.onProgress&&n.onProgress({loaded:e.loaded,total:e.total})}),r.resolve({isStreamingSupported:a.isStreamingSupported,isRangeSupported:a.isRangeSupported,contentLength:a.contentLength})}),r.reject),r.promise})),t.on("GetRangeReader",(function(t,n){(0,_util.assert)(e._networkStream);var r=e._networkStream.getRangeReader(t.begin,t.end);r?(n.onPull=function(){r.read().then((function(e){var t=e.value;e.done?n.close():((0,_util.assert)((0,_util.isArrayBuffer)(t)),n.enqueue(new Uint8Array(t),1,[t]))})).catch((function(e){n.error(e)}))},n.onCancel=function(e){r.cancel(e)}):n.close()})),t.on("GetDoc",(function(t){var r=t.pdfInfo;e._numPages=r.numPages,n._capability.resolve(new PDFDocumentProxy(r,e))})),t.on("DocException",(function(e){var t;switch(e.name){case"PasswordException":t=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":t=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":t=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":t=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":t=new _util.UnknownErrorException(e.message,e.details)}n._capability.reject(t)})),t.on("PasswordRequest",(function(t){if(e._passwordCapability=(0,_util.createPromiseCapability)(),n.onPassword)try{n.onPassword((function(t){e._passwordCapability.resolve({password:t})}),t.code)}catch(r){e._passwordCapability.reject(r)}else e._passwordCapability.reject(new _util.PasswordException(t.message,t.code));return e._passwordCapability.promise})),t.on("DataLoaded",(function(t){n.onProgress&&n.onProgress({loaded:t.length,total:t.length}),e.downloadInfoCapability.resolve(t)})),t.on("StartRenderPage",(function(t){e.destroyed||e.pageCache[t.pageIndex]._startRenderPage(t.transparency,t.intent)})),t.on("commonobj",(function(n){if(!e.destroyed){var r=_slicedToArray(n,3),a=r[0],i=r[1],o=r[2];if(!e.commonObjs.has(a))switch(i){case"Font":var s=e._params;if("error"in o){var c=o.error;(0,_util.warn)("Error during font loading: ".concat(c)),e.commonObjs.resolve(a,c);break}var l=null;s.pdfBug&&globalThis.FontInspector&&globalThis.FontInspector.enabled&&(l={registerFont:function(e,t){globalThis.FontInspector.fontAdded(e,t)}});var u=new _font_loader.FontFaceObject(o,{isEvalSupported:s.isEvalSupported,disableFontFace:s.disableFontFace,ignoreErrors:s.ignoreErrors,onUnsupportedFeature:e._onUnsupportedFeature.bind(e),fontRegistry:l});e.fontLoader.bind(u).then((function(){e.commonObjs.resolve(a,u)}),(function(n){t.sendWithPromise("FontFallback",{id:a}).finally((function(){e.commonObjs.resolve(a,u)}))}));break;case"FontPath":case"FontType3Res":e.commonObjs.resolve(a,o);break;default:throw new Error("Got unknown common object type ".concat(i))}}})),t.on("obj",(function(t){if(!e.destroyed){var n=_slicedToArray(t,4),r=n[0],a=n[1],i=n[2],o=n[3],s=e.pageCache[a];if(!s.objs.has(r))switch(i){case"JpegStream":return new Promise((function(e,t){var n=new Image;n.onload=function(){e(n)},n.onerror=function(){t(new Error("Error during JPEG image loading")),(0,_display_utils.releaseImageResources)(n)},n.src=o})).then((function(e){s.objs.resolve(r,e)}));case"Image":s.objs.resolve(r,o),o&&"data"in o&&o.data.length>8e6&&(s.cleanupAfterRender=!0);break;default:throw new Error("Got unknown object type ".concat(i))}}})),t.on("DocProgress",(function(t){e.destroyed||n.onProgress&&n.onProgress({loaded:t.loaded,total:t.total})})),t.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),t.on("JpegDecode",(function(t){if(e.destroyed)return Promise.reject(new Error("Worker was destroyed"));if("undefined"===typeof document)return Promise.reject(new Error('"document" is not defined.'));var n=_slicedToArray(t,2),r=n[0],a=n[1];return 3!==a&&1!==a?Promise.reject(new Error("Only 3 components or 1 component can be returned")):new Promise((function(e,t){var n=new Image;n.onload=function(){var t=n.width,r=n.height,i=t*r,o=4*i,s=new Uint8ClampedArray(i*a),c=document.createElement("canvas");c.width=t,c.height=r;var l=c.getContext("2d");l.drawImage(n,0,0);var u=l.getImageData(0,0,t,r).data;if(3===a)for(var h=0,d=0;h<o;h+=4,d+=3)s[d]=u[h],s[d+1]=u[h+1],s[d+2]=u[h+2];else if(1===a)for(var f=0,p=0;f<o;f+=4,p++)s[p]=u[f];e({data:s,width:t,height:r}),(0,_display_utils.releaseImageResources)(n),c.width=0,c.height=0,c=null,l=null},n.onerror=function(){t(new Error("JpegDecode failed to load image")),(0,_display_utils.releaseImageResources)(n)},n.src=r}))})),t.on("FetchBuiltInCMap",(function(t,n){if(e.destroyed)n.error(new Error("Worker was destroyed"));else{var r=!1;n.onPull=function(){r?n.close():(r=!0,e.CMapReaderFactory.fetch(t).then((function(e){n.enqueue(e,1,[e.cMapData.buffer])})).catch((function(e){n.error(e)})))}}}))}},{key:"_onUnsupportedFeature",value:function(e){var t=e.featureId;this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(t)}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function(e){var t=this;if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request"));var n=e-1;if(n in this.pagePromises)return this.pagePromises[n];var r=this.messageHandler.sendWithPromise("GetPage",{pageIndex:n}).then((function(e){if(t.destroyed)throw new Error("Transport destroyed");var r=new PDFPageProxy(n,e,t,t._params.pdfBug);return t.pageCache[n]=r,r}));return this.pagePromises[n]=r,r}},{key:"getPageIndex",value:function(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch((function(e){return Promise.reject(new Error(e))}))}},{key:"getAnnotations",value:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(e){return"string"!==typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}},{key:"getPageLabels",value:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getJavaScript",value:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var e=this;return this.messageHandler.sendWithPromise("GetMetadata",null).then((function(t){return{info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:e._fullReader?e._fullReader.filename:null}}))}},{key:"getStats",value:function(){return this.messageHandler.sendWithPromise("GetStats",null)}},{key:"startCleanup",value:function(){var e=this;return this.messageHandler.sendWithPromise("Cleanup",null).then((function(){for(var t=0,n=e.pageCache.length;t<n;t++){var r=e.pageCache[t];if(r&&!r.cleanup())throw new Error("startCleanup: Page ".concat(t+1," is currently rendering."))}e.commonObjs.clear(),e.fontLoader.clear()}))}},{key:"loadingParams",get:function(){var e=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,disableCreateObjectURL:e.disableCreateObjectURL,disableFontFace:e.disableFontFace,nativeImageDecoderSupport:e.nativeImageDecoderSupport})}}]),e}(),PDFObjects=function(){function e(){_classCallCheck(this,e),this._objs=Object.create(null)}return _createClass(e,[{key:"_ensureObj",value:function(e){return this._objs[e]?this._objs[e]:this._objs[e]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return this._ensureObj(e).capability.promise.then(t),null;var n=this._objs[e];if(!n||!n.resolved)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return n.data}},{key:"has",value:function(e){var t=this._objs[e];return!!t&&t.resolved}},{key:"resolve",value:function(e,t){var n=this._ensureObj(e);n.resolved=!0,n.data=t,n.capability.resolve(t)}},{key:"clear",value:function(){for(var e in this._objs){var t=this._objs[e].data;"undefined"!==typeof Image&&t instanceof Image&&(0,_display_utils.releaseImageResources)(t)}this._objs=Object.create(null)}}]),e}(),RenderTask=function(){function e(t){_classCallCheck(this,e),this._internalRenderTask=t,this.onContinue=null}return _createClass(e,[{key:"cancel",value:function(){this._internalRenderTask.cancel()}},{key:"then",value:function(e,t){throw new Error("Removed API method: RenderTask.then, use the `promise` getter instead.")}},{key:"promise",get:function(){return this._internalRenderTask.capability.promise}}]),e}(),InternalRenderTask=function(){var e=new WeakSet;return function(){function t(e){var n=e.callback,r=e.params,a=e.objs,i=e.commonObjs,o=e.operatorList,s=e.pageIndex,c=e.canvasFactory,l=e.webGLContext,u=e.useRequestAnimationFrame,h=void 0!==u&&u,d=e.pdfBug,f=void 0!==d&&d;_classCallCheck(this,t),this.callback=n,this.params=r,this.objs=a,this.commonObjs=i,this.operatorListIdx=null,this.operatorList=o,this._pageIndex=s,this.canvasFactory=c,this.webGLContext=l,this._pdfBug=f,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===h&&"undefined"!==typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=r.canvasContext.canvas}return _createClass(t,[{key:"initializeGraphics",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.cancelled){if(this._canvas){if(e.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.");e.add(this._canvas)}this._pdfBug&&globalThis.StepperManager&&globalThis.StepperManager.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var n=this.params,r=n.canvasContext,a=n.viewport,i=n.transform,o=n.imageLayer,s=n.background;this.gfx=new _canvas.CanvasGraphics(r,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,o),this.gfx.beginDrawing({transform:i,viewport:a,transparency:t,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&e.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var e=this;this._useRequestAnimationFrame?window.requestAnimationFrame((function(){e._nextBound().catch(e.cancel.bind(e))})):Promise.resolve().then(this._nextBound).catch(this.cancel.bind(this))}},{key:"_next",value:function(){var t=_asyncToGenerator(_regeneratorRuntime.mark((function t(){return _regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cancelled){t.next=2;break}return t.abrupt("return");case 2: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&&e.delete(this._canvas),this.callback()));case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),t}()}(),version="2.4.456";exports.version=version;var build="228a591c";exports.build=build},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.url,a=t.target,i=t.rel,o=t.enabled,s=void 0===o||o;(0,r.assert)(n&&"string"===typeof n,'addLinkAttributes: A valid "url" parameter must provided.');var c=(0,r.removeNullCharacters)(n);s?e.href=e.title=c:(e.href="",e.title="Disabled: ".concat(c),e.onclick=function(){return!1});var l="";switch(a){case u.NONE:break;case u.SELF:l="_self";break;case u.BLANK:l="_blank";break;case u.PARENT:l="_parent";break;case u.TOP:l="_top"}e.target=l,e.rel="string"===typeof i?i:"noopener noreferrer nofollow"},t.getFilenameFromUrl=function(e){var t=e.indexOf("#"),n=e.indexOf("?"),r=Math.min(t>0?t:e.length,n>0?n:e.length);return e.substring(e.lastIndexOf("/",r)+1,r)},t.isFetchSupported=f,t.isValidFetchUrl=p,t.loadScript=function(e){return new Promise((function(t,n){var r=document.createElement("script");r.src=e,r.onload=t,r.onerror=function(){n(new Error("Cannot load script at: ".concat(r.src)))},(document.head||document.documentElement).appendChild(r)}))},t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.releaseImageResources=function(e){(0,r.assert)(e instanceof Image,"Invalid `img` parameter.");var t=e.src;"string"===typeof t&&t.startsWith("blob:")&&URL.revokeObjectURL&&URL.revokeObjectURL(t),e.removeAttribute("src")},t.PDFDateString=t.StatTimer=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.LinkTarget=t.RenderingCancelledException=t.PageViewport=void 0;var r=n(1);t.DEFAULT_LINK_REL="noopener noreferrer nofollow";var a="http://www.w3.org/2000/svg",i=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var n=document.createElement("canvas"),r=n.getContext("2d");return n.width=e,n.height=t,{canvas:n,context:r}}},{key:"reset",value:function(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}},{key:"destroy",value:function(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}}]),e}();t.DOMCanvasFactory=i;var o=function(){function e(t){var n=t.baseUrl,r=void 0===n?null:n,a=t.isCompressed,i=void 0!==a&&a;_classCallCheck(this,e),this.baseUrl=r,this.isCompressed=i}return _createClass(e,[{key:"fetch",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){var n,a,i,o=this;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.name,this.baseUrl){e.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(n){e.next=5;break}throw new Error("CMap name must be specified.");case 5:if(a=this.baseUrl+n+(this.isCompressed?".bcmap":""),i=this.isCompressed?r.CMapCompressionType.BINARY:r.CMapCompressionType.NONE,!f()||!p(a,document.baseURI)){e.next=9;break}return e.abrupt("return",fetch(a).then(function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){var n;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.ok){e.next=2;break}throw new Error(t.statusText);case 2:if(!o.isCompressed){e.next=10;break}return e.t0=Uint8Array,e.next=6,t.arrayBuffer();case 6:e.t1=e.sent,n=new e.t0(e.t1),e.next=15;break;case 10:return e.t2=r.stringToBytes,e.next=13,t.text();case 13:e.t3=e.sent,n=(0,e.t2)(e.t3);case 15:return e.abrupt("return",{cMapData:n,compressionType:i});case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){throw new Error("Unable to load ".concat(o.isCompressed?"binary ":"")+"CMap at: ".concat(a))})));case 9:return e.abrupt("return",new Promise((function(e,t){var n=new XMLHttpRequest;n.open("GET",a,!0),o.isCompressed&&(n.responseType="arraybuffer"),n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE){var a;if((200===n.status||0===n.status)&&(o.isCompressed&&n.response?a=new Uint8Array(n.response):!o.isCompressed&&n.responseText&&(a=(0,r.stringToBytes)(n.responseText)),a))return void e({cMapData:a,compressionType:i});t(new Error(n.statusText))}},n.send(null)})).catch((function(e){throw new Error("Unable to load ".concat(o.isCompressed?"binary ":"")+"CMap at: ".concat(a))})));case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}())}]),e}();t.DOMCMapReaderFactory=o;var s=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"create",value:function(e,t){(0,r.assert)(e>0&&t>0,"Invalid SVG dimensions");var n=document.createElementNS(a,"svg:svg");return n.setAttribute("version","1.1"),n.setAttribute("width",e+"px"),n.setAttribute("height",t+"px"),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox","0 0 "+e+" "+t),n}},{key:"createElement",value:function(e){return(0,r.assert)("string"===typeof e,"Invalid SVG element type"),document.createElementNS(a,e)}}]),e}();t.DOMSVGFactory=s;var c=function(){function e(t){var n=t.viewBox,r=t.scale,a=t.rotation,i=t.offsetX,o=void 0===i?0:i,s=t.offsetY,c=void 0===s?0:s,l=t.dontFlip,u=void 0!==l&&l;_classCallCheck(this,e),this.viewBox=n,this.scale=r,this.rotation=a,this.offsetX=o,this.offsetY=c;var h,d,f,p,g,v,m,y,b=(n[2]+n[0])/2,_=(n[3]+n[1])/2;switch(a=(a%=360)<0?a+360:a){case 180:h=-1,d=0,f=0,p=1;break;case 90:h=0,d=1,f=1,p=0;break;case 270:h=0,d=-1,f=-1,p=0;break;default:h=1,d=0,f=0,p=-1}u&&(f=-f,p=-p),0===h?(g=Math.abs(_-n[1])*r+o,v=Math.abs(b-n[0])*r+c,m=Math.abs(n[3]-n[1])*r,y=Math.abs(n[2]-n[0])*r):(g=Math.abs(b-n[0])*r+o,v=Math.abs(_-n[1])*r+c,m=Math.abs(n[2]-n[0])*r,y=Math.abs(n[3]-n[1])*r),this.transform=[h*r,d*r,f*r,p*r,g-h*r*b-f*r*_,v-d*r*b-p*r*_],this.width=m,this.height=y}return _createClass(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.scale,r=void 0===n?this.scale:n,a=t.rotation,i=void 0===a?this.rotation:a,o=t.offsetX,s=void 0===o?this.offsetX:o,c=t.offsetY,l=void 0===c?this.offsetY:c,u=t.dontFlip,h=void 0!==u&&u;return new e({viewBox:this.viewBox.slice(),scale:r,rotation:i,offsetX:s,offsetY:l,dontFlip:h})}},{key:"convertToViewportPoint",value:function(e,t){return r.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=r.Util.applyTransform([e[0],e[1]],this.transform),n=r.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],n[0],n[1]]}},{key:"convertToPdfPoint",value:function(e,t){return r.Util.applyInverseTransform([e,t],this.transform)}}]),e}();t.PageViewport=c;var l=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r){var a;return _classCallCheck(this,n),(a=t.call(this,e)).type=r,a}return n}(r.BaseException);t.RenderingCancelledException=l;var u={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};t.LinkTarget=u;var h,d=function(){function e(){_classCallCheck(this,e),this.started=Object.create(null),this.times=[]}return _createClass(e,[{key:"time",value:function(e){e in this.started&&(0,r.warn)("Timer is already running for ".concat(e)),this.started[e]=Date.now()}},{key:"timeEnd",value:function(e){e in this.started||(0,r.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]}},{key:"toString",value:function(){var e,t=[],n=0,r=_createForOfIteratorHelper(this.times);try{for(r.s();!(e=r.n()).done;){var a=e.value.name;a.length>n&&(n=a.length)}}catch(l){r.e(l)}finally{r.f()}var i,o=_createForOfIteratorHelper(this.times);try{for(o.s();!(i=o.n()).done;){var s=i.value,c=s.end-s.start;t.push("".concat(s.name.padEnd(n)," ").concat(c,"ms\n"))}}catch(l){o.e(l)}finally{o.f()}return t.join("")}}]),e}();function f(){return"undefined"!==typeof fetch&&"undefined"!==typeof Response&&"body"in Response.prototype&&"undefined"!==typeof ReadableStream}function p(e,t){try{var n=(t?new URL(e,t):new URL(e)).protocol;return"http:"===n||"https:"===n}catch(r){return!1}}t.StatTimer=d;var g=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,r.isString)(e))return null;h||(h=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=h.exec(e);if(!t)return null;var n=parseInt(t[1],10),a=parseInt(t[2],10);a=a>=1&&a<=12?a-1:0;var i=parseInt(t[3],10);i=i>=1&&i<=31?i:1;var o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;var s=parseInt(t[5],10);s=s>=0&&s<=59?s:0;var c=parseInt(t[6],10);c=c>=0&&c<=59?c:0;var l=t[7]||"Z",u=parseInt(t[8],10);u=u>=0&&u<=23?u:0;var d=parseInt(t[9],10)||0;return d=d>=0&&d<=59?d:0,"-"===l?(o+=u,s+=d):"+"===l&&(o-=u,s-=d),new Date(Date.UTC(n,a,i,o,s,c))}}]),e}();t.PDFDateString=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var r,a=n(1),i=function(){function e(t){var n=t.docId,r=t.onUnsupportedFeature;_classCallCheck(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseFontLoader."),this.docId=n,this._onUnsupportedFeature=r,this.nativeFontFaces=[],this.styleElement=null}return _createClass(e,[{key:"addNativeFontFace",value:function(e){this.nativeFontFaces.push(e),document.fonts.add(e)}},{key:"insertRule",value:function(e){var t=this.styleElement;t||((t=this.styleElement=document.createElement("style")).id="PDFJS_FONT_STYLE_TAG_".concat(this.docId),document.documentElement.getElementsByTagName("head")[0].appendChild(t));var n=t.sheet;n.insertRule(e,n.cssRules.length)}},{key:"clear",value:function(){this.nativeFontFaces.forEach((function(e){document.fonts.delete(e)})),this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"bind",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){var n,r,i=this;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.attached&&!t.missingFile){e.next=2;break}return e.abrupt("return");case 2:if(t.attached=!0,!this.isFontLoadingAPISupported){e.next=19;break}if(!(n=t.createNativeFontFace())){e.next=18;break}return this.addNativeFontFace(n),e.prev=7,e.next=10,n.loaded;case 10:e.next=18;break;case 12:throw e.prev=12,e.t0=e.catch(7),this._onUnsupportedFeature({featureId:a.UNSUPPORTED_FEATURES.font}),(0,a.warn)("Failed to load font '".concat(n.family,"': '").concat(e.t0,"'.")),t.disableFontFace=!0,e.t0;case 18:return e.abrupt("return");case 19:if(!(r=t.createFontFaceRule())){e.next=26;break}if(this.insertRule(r),!this.isSyncFontLoadingSupported){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,new Promise((function(e){var n=i._queueLoadingCallback(e);i._prepareFontLoadEvent([r],[t],n)}));case 26:case"end":return e.stop()}}),e,this,[[7,12]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_queueLoadingCallback",value:function(e){(0,a.unreachable)("Abstract method `_queueLoadingCallback`.")}},{key:"_prepareFontLoadEvent",value:function(e,t,n){(0,a.unreachable)("Abstract method `_prepareFontLoadEvent`.")}},{key:"isFontLoadingAPISupported",get:function(){var e="undefined"!==typeof document&&!!document.fonts;return(0,a.shadow)(this,"isFontLoadingAPISupported",e)}},{key:"isSyncFontLoadingSupported",get:function(){(0,a.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}},{key:"_loadTestFont",get:function(){(0,a.unreachable)("Abstract method `_loadTestFont`.")}}]),e}();t.FontLoader=r,t.FontLoader=r=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r;return _classCallCheck(this,n),(r=t.call(this,e)).loadingContext={requests:[],nextRequestId:0},r.loadTestFontId=0,r}return _createClass(n,[{key:"_queueLoadingCallback",value:function(e){var t=this.loadingContext,n={id:"pdfjs-font-loading-".concat(t.nextRequestId++),done:!1,complete:function(){for((0,a.assert)(!n.done,"completeRequest() cannot be called twice."),n.done=!0;t.requests.length>0&&t.requests[0].done;){var e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(n),n}},{key:"_prepareFontLoadEvent",value:function(e,t,n){function r(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function i(e,t,n,r){return e.substring(0,t)+r+e.substring(t+n)}var o,s,c=document.createElement("canvas");c.width=1,c.height=1;var l=c.getContext("2d"),u=0,h="lt".concat(Date.now()).concat(this.loadTestFontId++),d=this._loadTestFont,f=r(d=i(d,976,h.length,h),16);for(o=0,s=h.length-3;o<s;o+=4)f=f-1482184792+r(h,o)|0;o<h.length&&(f=f-1482184792+r(h+"XXX",o)|0),d=i(d,16,4,(0,a.string32)(f));var p="url(data:font/opentype;base64,".concat(btoa(d),");"),g='@font-face {font-family:"'.concat(h,'";src:').concat(p,"}");this.insertRule(g);var v=[];for(o=0,s=t.length;o<s;o++)v.push(t[o].loadedName);v.push(h);var m=document.createElement("div");for(m.style.visibility="hidden",m.style.width=m.style.height="10px",m.style.position="absolute",m.style.top=m.style.left="0px",o=0,s=v.length;o<s;++o){var y=document.createElement("span");y.textContent="Hi",y.style.fontFamily=v[o],m.appendChild(y)}document.body.appendChild(m),function e(t,n){if(++u>30)return(0,a.warn)("Load test font never loaded."),void n();l.font="30px "+t,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?n():setTimeout(e.bind(null,t,n))}(h,(function(){document.body.removeChild(m),n.complete()}))}},{key:"isSyncFontLoadingSupported",get:function(){var e=!1;if("undefined"===typeof navigator)e=!0;else{var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);t&&t[1]>=14&&(e=!0)}return(0,a.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_loadTestFont",get:function(){return(0,a.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}}]),n}(i);var o=function(){function e(t,n){var r=n.isEvalSupported,a=void 0===r||r,i=n.disableFontFace,o=void 0!==i&&i,s=n.ignoreErrors,c=void 0!==s&&s,l=n.onUnsupportedFeature,u=void 0===l?null:l,h=n.fontRegistry,d=void 0===h?null:h;for(var f in _classCallCheck(this,e),this.compiledGlyphs=Object.create(null),t)this[f]=t[f];this.isEvalSupported=!1!==a,this.disableFontFace=!0===o,this.ignoreErrors=!0===c,this._onUnsupportedFeature=u,this.fontRegistry=d}return _createClass(e,[{key:"createNativeFontFace",value:function(){if(!this.data||this.disableFontFace)return null;var e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}},{key:"createFontFaceRule",value:function(){if(!this.data||this.disableFontFace)return null;var e=(0,a.bytesToString)(new Uint8Array(this.data)),t="url(data:".concat(this.mimetype,";base64,").concat(btoa(e),");"),n='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(t,"}");return this.fontRegistry&&this.fontRegistry.registerFont(this,t),n}},{key:"getPathGenerator",value:function(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];var n,r;try{n=e.get(this.loadedName+"_path_"+t)}catch(l){if(!this.ignoreErrors)throw l;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:a.UNSUPPORTED_FEATURES.font}),(0,a.warn)('getPathGenerator - ignoring character: "'.concat(l,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&a.IsEvalSupportedCached.value){for(var i,o="",s=0,c=n.length;s<c;s++)i=void 0!==(r=n[s]).args?r.args.join(","):"",o+="c."+r.cmd+"("+i+");\n";return this.compiledGlyphs[t]=new Function("c","size",o)}return this.compiledGlyphs[t]=function(e,t){for(var a=0,i=n.length;a<i;a++)"scale"===(r=n[a]).cmd&&(r.args=[t,-t]),e[r.cmd].apply(e,r.args)}}}]),e}();t.FontFaceObject=o},function(e,t,n){"use strict";var r=Object.create(null),a=n(7).isNodeJS,i="undefined"!==typeof navigator&&navigator.userAgent||"",o=/Trident/.test(i),s=/CriOS/.test(i);(o||s)&&(r.disableCreateObjectURL=!0),a&&(r.disableFontFace=!0,r.nativeImageDecoderSupport="none"),t.apiCompatibilityParams=Object.freeze(r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;var r="object"===typeof process&&process+""==="[object process]"&&!process.versions.nw&&!process.versions.electron;t.isNodeJS=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var r=n(1),a=n(9);function i(e){e.mozCurrentTransform||(e._originalSave=e.save,e._originalRestore=e.restore,e._originalRotate=e.rotate,e._originalScale=e.scale,e._originalTranslate=e.translate,e._originalTransform=e.transform,e._originalSetTransform=e.setTransform,e._transformMatrix=e._transformMatrix||[1,0,0,1,0,0],e._transformStack=[],Object.defineProperty(e,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(e,"mozCurrentTransformInverse",{get:function(){var e=this._transformMatrix,t=e[0],n=e[1],r=e[2],a=e[3],i=e[4],o=e[5],s=t*a-n*r,c=n*r-t*a;return[a/s,n/c,r/c,t/s,(a*i-r*o)/c,(n*i-t*o)/s]}}),e.save=function(){var e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},e.restore=function(){var e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},e.translate=function(e,t){var n=this._transformMatrix;n[4]=n[0]*e+n[2]*t+n[4],n[5]=n[1]*e+n[3]*t+n[5],this._originalTranslate(e,t)},e.scale=function(e,t){var n=this._transformMatrix;n[0]=n[0]*e,n[1]=n[1]*e,n[2]=n[2]*t,n[3]=n[3]*t,this._originalScale(e,t)},e.transform=function(t,n,r,a,i,o){var s=this._transformMatrix;this._transformMatrix=[s[0]*t+s[2]*n,s[1]*t+s[3]*n,s[0]*r+s[2]*a,s[1]*r+s[3]*a,s[0]*i+s[2]*o+s[4],s[1]*i+s[3]*o+s[5]],e._originalTransform(t,n,r,a,i,o)},e.setTransform=function(t,n,r,a,i,o){this._transformMatrix=[t,n,r,a,i,o],e._originalSetTransform(t,n,r,a,i,o)},e.rotate=function(e){var t=Math.cos(e),n=Math.sin(e),r=this._transformMatrix;this._transformMatrix=[r[0]*t+r[2]*n,r[1]*t+r[3]*n,r[0]*-n+r[2]*t,r[1]*-n+r[3]*t,r[4],r[5]],this._originalRotate(e)})}var o=function(){function e(e){this.canvasFactory=e,this.cache=Object.create(null)}return e.prototype={getCanvas:function(e,t,n,r){var a;return void 0!==this.cache[e]?(a=this.cache[e],this.canvasFactory.reset(a,t,n),a.context.setTransform(1,0,0,1,0,0)):(a=this.canvasFactory.create(t,n),this.cache[e]=a),r&&i(a.context),a},clear:function(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}},e}(),s=function(){function e(){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=r.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=r.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=r.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.resumeSMaskCtx=null}return e.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(e,t){this.x=e,this.y=t}},e}(),c=function(){function e(e,t,n,r,a,c){this.ctx=e,this.current=new s,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=n,this.canvasFactory=r,this.webGLContext=a,this.imageLayer=c,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.cachedCanvases=new o(this.canvasFactory),e&&i(e),this._cachedGetSinglePixelWidth=null}function t(e,t){if("undefined"!==typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var n,a,i,o,s,c=t.height,l=t.width,u=c%16,h=(c-u)/16,d=0===u?h:h+1,f=e.createImageData(l,16),p=0,g=t.data,v=f.data;if(t.kind===r.ImageKind.GRAYSCALE_1BPP){var m=g.byteLength,y=new Uint32Array(v.buffer,0,v.byteLength>>2),b=y.length,_=l+7>>3,k=4294967295,C=r.IsLittleEndianCached.value?4278190080:255;for(a=0;a<d;a++){for(o=a<h?16:u,n=0,i=0;i<o;i++){for(var A=m-p,x=0,E=A>_?l:8*A-7,w=-8&E,S=0,P=0;x<w;x+=8)P=g[p++],y[n++]=128&P?k:C,y[n++]=64&P?k:C,y[n++]=32&P?k:C,y[n++]=16&P?k:C,y[n++]=8&P?k:C,y[n++]=4&P?k:C,y[n++]=2&P?k:C,y[n++]=1&P?k:C;for(;x<E;x++)0===S&&(P=g[p++],S=128),y[n++]=P&S?k:C,S>>=1}for(;n<b;)y[n++]=0;e.putImageData(f,0,16*a)}}else if(t.kind===r.ImageKind.RGBA_32BPP){for(i=0,s=16*l*4,a=0;a<h;a++)v.set(g.subarray(p,p+s)),p+=s,e.putImageData(f,0,i),i+=16;a<d&&(s=l*u*4,v.set(g.subarray(p,p+s)),e.putImageData(f,0,i))}else{if(t.kind!==r.ImageKind.RGB_24BPP)throw new Error("bad image kind: ".concat(t.kind));for(s=l*(o=16),a=0;a<d;a++){for(a>=h&&(s=l*(o=u)),n=0,i=s;i--;)v[n++]=g[p++],v[n++]=g[p++],v[n++]=g[p++],v[n++]=255;e.putImageData(f,0,16*a)}}}}function n(e,t){for(var n=t.height,r=t.width,a=n%16,i=(n-a)/16,o=0===a?i:i+1,s=e.createImageData(r,16),c=0,l=t.data,u=s.data,h=0;h<o;h++){for(var d=h<i?16:a,f=3,p=0;p<d;p++)for(var g=0,v=0;v<r;v++){if(!g){var m=l[c++];g=128}u[f]=m&g?0:255,f+=4,g>>=1}e.putImageData(s,0,16*h)}}function c(e,t){for(var n=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],r=0,a=n.length;r<a;r++){var i=n[r];void 0!==e[i]&&(t[i]=e[i])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function l(e){e.strokeStyle="#000000",e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0)}function u(e,t,n,r){for(var a=e.length,i=3;i<a;i+=4){var o=e[i];if(0===o)e[i-3]=t,e[i-2]=n,e[i-1]=r;else if(o<255){var s=255-o;e[i-3]=e[i-3]*o+t*s>>8,e[i-2]=e[i-2]*o+n*s>>8,e[i-1]=e[i-1]*o+r*s>>8}}}function h(e,t,n){for(var r=e.length,a=3;a<r;a+=4){var i=n?n[e[a]]:e[a];t[a]=t[a]*i*(1/255)|0}}function d(e,t,n){for(var r=e.length,a=3;a<r;a+=4){var i=77*e[a-3]+152*e[a-2]+28*e[a-1];t[a]=n?t[a]*n[i>>8]>>8:t[a]*i>>16}}function f(e,t,n,r){var a=t.canvas,i=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY);var o=t.backdrop||null;if(!t.transferMap&&r.isEnabled){var s=r.composeSMask({layer:n.canvas,mask:a,properties:{subtype:t.subtype,backdrop:o}});return e.setTransform(1,0,0,1,0,0),void e.drawImage(s,t.offsetX,t.offsetY)}!function(e,t,n,r,a,i,o){var s,c=!!i,l=c?i[0]:0,f=c?i[1]:0,p=c?i[2]:0;s="Luminosity"===a?d:h;for(var g=Math.min(r,Math.ceil(1048576/n)),v=0;v<r;v+=g){var m=Math.min(g,r-v),y=e.getImageData(0,v,n,m),b=t.getImageData(0,v,n,m);c&&u(y.data,l,f,p),s(y.data,b.data,o),e.putImageData(b,0,v)}}(i,n,a.width,a.height,t.subtype,o,t.transferMap),e.drawImage(a,0,0)}var p=["butt","round","square"],g=["miter","round","bevel"],v={},m={};for(var y in e.prototype={beginDrawing:function(e){var t=e.transform,n=e.viewport,r=e.transparency,a=void 0!==r&&r,i=e.background,o=void 0===i?null:i,s=this.ctx.canvas.width,c=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=o||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,s,c),this.ctx.restore(),a){var u=this.cachedCanvases.getCanvas("transparent",s,c,!0);this.compositeCtx=this.ctx,this.transparentCanvas=u.canvas,this.ctx=u.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),l(this.ctx),t&&this.ctx.transform.apply(this.ctx,t),this.ctx.transform.apply(this.ctx,n.transform),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(e,t,n,a){var i=e.argsArray,o=e.fnArray,s=t||0,c=i.length;if(c===s)return s;for(var l,u=c-s>10&&"function"===typeof n,h=u?Date.now()+15:0,d=0,f=this.commonObjs,p=this.objs;;){if(void 0!==a&&s===a.nextBreakPoint)return a.breakIt(s,n),s;if((l=o[s])!==r.OPS.dependency)this[l].apply(this,i[s]);else{var g,v=_createForOfIteratorHelper(i[s]);try{for(v.s();!(g=v.n()).done;){var m=g.value,y=m.startsWith("g_")?f:p;if(!y.has(m))return y.get(m,n),s}}catch(b){v.e(b)}finally{v.f()}}if(++s===c)return s;if(u&&++d>10){if(Date.now()>h)return n(),s;d=0}}},endDrawing:function(){null!==this.current.activeSMask&&this.endSMaskGroup(),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),this.cachedCanvases.clear(),this.webGLContext.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e},setLineCap:function(e){this.ctx.lineCap=p[e]},setLineJoin:function(e){this.ctx.lineJoin=g[e]},setMiterLimit:function(e){this.ctx.miterLimit=e},setDash:function(e,t){var n=this.ctx;void 0!==n.setLineDash&&(n.setLineDash(e),n.lineDashOffset=t)},setRenderingIntent:function(e){},setFlatness:function(e){},setGState:function(e){for(var t=0,n=e.length;t<n;t++){var r=e[t],a=r[0],i=r[1];switch(a){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i[0],i[1]);break;case"CA":this.current.strokeAlpha=r[1];break;case"ca":this.current.fillAlpha=r[1],this.ctx.globalAlpha=r[1];break;case"BM":this.ctx.globalCompositeOperation=i;break;case"SMask":this.current.activeSMask&&(this.stateStack.length>0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup()),this.current.activeSMask=i?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var e=this.current.activeSMask,t=e.canvas.width,n=e.canvas.height,r="smaskGroupAt"+this.groupLevel,a=this.cachedCanvases.getCanvas(r,t,n,!0),i=this.ctx,o=i.mozCurrentTransform;this.ctx.save();var s=a.context;s.scale(1/e.scaleX,1/e.scaleY),s.translate(-e.offsetX,-e.offsetY),s.transform.apply(s,o),e.startTransformInverse=s.mozCurrentTransformInverse,c(i,s),this.ctx=s,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(i),this.groupLevel++},suspendSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),f(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),this.ctx.save(),c(e,this.ctx),this.current.resumeSMaskCtx=e;var t=r.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t),e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.restore()},resumeSMaskGroup:function(){var e=this.current.resumeSMaskCtx,t=this.ctx;this.ctx=e,this.groupStack.push(t),this.groupLevel++},endSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),f(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),c(e,this.ctx);var t=r.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t)},save:function(){this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone(),this.current.resumeSMaskCtx=null},restore:function(){this.current.resumeSMaskCtx&&this.resumeSMaskGroup(),null===this.current.activeSMask||0!==this.stateStack.length&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask||this.endSMaskGroup(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null)},transform:function(e,t,n,r,a,i){this.ctx.transform(e,t,n,r,a,i),this._cachedGetSinglePixelWidth=null},constructPath:function(e,t){for(var n=this.ctx,a=this.current,i=a.x,o=a.y,s=0,c=0,l=e.length;s<l;s++)switch(0|e[s]){case r.OPS.rectangle:i=t[c++],o=t[c++];var u=t[c++],h=t[c++];0===u&&(u=this.getSinglePixelWidth()),0===h&&(h=this.getSinglePixelWidth());var d=i+u,f=o+h;this.ctx.moveTo(i,o),this.ctx.lineTo(d,o),this.ctx.lineTo(d,f),this.ctx.lineTo(i,f),this.ctx.lineTo(i,o),this.ctx.closePath();break;case r.OPS.moveTo:i=t[c++],o=t[c++],n.moveTo(i,o);break;case r.OPS.lineTo:i=t[c++],o=t[c++],n.lineTo(i,o);break;case r.OPS.curveTo:i=t[c+4],o=t[c+5],n.bezierCurveTo(t[c],t[c+1],t[c+2],t[c+3],i,o),c+=6;break;case r.OPS.curveTo2:n.bezierCurveTo(i,o,t[c],t[c+1],t[c+2],t[c+3]),i=t[c+2],o=t[c+3],c+=4;break;case r.OPS.curveTo3:i=t[c+2],o=t[c+3],n.bezierCurveTo(t[c],t[c+1],i,o,i,o),c+=4;break;case r.OPS.closePath:n.closePath()}a.setCurrentPoint(i,o)},closePath:function(){this.ctx.closePath()},stroke:function(e){e="undefined"===typeof e||e;var t=this.ctx,n=this.current.strokeColor;if(t.globalAlpha=this.current.strokeAlpha,n&&n.hasOwnProperty("type")&&"Pattern"===n.type){t.save();var a=t.mozCurrentTransform,i=r.Util.singularValueDecompose2dScale(a)[0];t.strokeStyle=n.getPattern(t,this),t.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth*i),t.stroke(),t.restore()}else t.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth),t.stroke();e&&this.consumePath(),t.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(e){e="undefined"===typeof e||e;var t=this.ctx,n=this.current.fillColor,r=!1;this.current.patternFill&&(t.save(),this.baseTransform&&t.setTransform.apply(t,this.baseTransform),t.fillStyle=n.getPattern(t,this),r=!0),this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill(),r&&t.restore(),e&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=v},eoClip:function(){this.pendingClip=m},beginText:function(){this.current.textMatrix=r.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){var e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(var n=0;n<e.length;n++){var r=e[n];t.setTransform.apply(t,r.transform),t.translate(r.x,r.y),r.addToPath(t,r.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()},setCharSpacing:function(e){this.current.charSpacing=e},setWordSpacing:function(e){this.current.wordSpacing=e},setHScale:function(e){this.current.textHScale=e/100},setLeading:function(e){this.current.leading=-e},setFont:function(e,t){var n=this.commonObjs.get(e),a=this.current;if(!n)throw new Error("Can't find font for ".concat(e));if(a.fontMatrix=n.fontMatrix?n.fontMatrix:r.FONT_IDENTITY_MATRIX,0!==a.fontMatrix[0]&&0!==a.fontMatrix[3]||(0,r.warn)("Invalid font matrix for font "+e),t<0?(t=-t,a.fontDirection=-1):a.fontDirection=1,this.current.font=n,this.current.fontSize=t,!n.isType3Font){var i=n.loadedName||"sans-serif",o="normal";n.black?o="900":n.bold&&(o="bold");var s=n.italic?"italic":"normal",c='"'.concat(i,'", ').concat(n.fallbackName),l=t;t<16?l=16:t>100&&(l=100),this.current.fontSizeScale=t/l,this.ctx.font="".concat(s," ").concat(o," ").concat(l,"px ").concat(c)}},setTextRenderingMode:function(e){this.current.textRenderingMode=e},setTextRise:function(e){this.current.textRise=e},moveText:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t},setLeadingMoveText:function(e,t){this.setLeading(-t),this.moveText(e,t)},setTextMatrix:function(e,t,n,r,a,i){this.current.textMatrix=[e,t,n,r,a,i],this.current.textMatrixScale=Math.sqrt(e*e+t*t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar:function(e,t,n,a){var i,o=this.ctx,s=this.current,c=s.font,l=s.textRenderingMode,u=s.fontSize/s.fontSizeScale,h=l&r.TextRenderingMode.FILL_STROKE_MASK,d=!!(l&r.TextRenderingMode.ADD_TO_PATH_FLAG),f=s.patternFill&&c.data;(c.disableFontFace||d||f)&&(i=c.getPathGenerator(this.commonObjs,e)),c.disableFontFace||f?(o.save(),o.translate(t,n),o.beginPath(),i(o,u),a&&o.setTransform.apply(o,a),h!==r.TextRenderingMode.FILL&&h!==r.TextRenderingMode.FILL_STROKE||o.fill(),h!==r.TextRenderingMode.STROKE&&h!==r.TextRenderingMode.FILL_STROKE||o.stroke(),o.restore()):(h!==r.TextRenderingMode.FILL&&h!==r.TextRenderingMode.FILL_STROKE||o.fillText(e,t,n),h!==r.TextRenderingMode.STROKE&&h!==r.TextRenderingMode.FILL_STROKE||o.strokeText(e,t,n)),d&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:o.mozCurrentTransform,x:t,y:n,fontSize:u,addToPath:i})},get isFontSubpixelAAEnabled(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,n=!1,a=3;a<t.length;a+=4)if(t[a]>0&&t[a]<255){n=!0;break}return(0,r.shadow)(this,"isFontSubpixelAAEnabled",n)},showText:function(e){var t=this.current,n=t.font;if(n.isType3Font)return this.showType3Text(e);var a=t.fontSize;if(0!==a){var i,o=this.ctx,s=t.fontSizeScale,c=t.charSpacing,l=t.wordSpacing,u=t.fontDirection,h=t.textHScale*u,d=e.length,f=n.vertical,p=f?1:-1,g=n.defaultVMetrics,v=a*t.fontMatrix[0],m=t.textRenderingMode===r.TextRenderingMode.FILL&&!n.disableFontFace&&!t.patternFill;if(o.save(),t.patternFill){o.save();var y=t.fillColor.getPattern(o,this);i=o.mozCurrentTransform,o.restore(),o.fillStyle=y}o.transform.apply(o,t.textMatrix),o.translate(t.x,t.y+t.textRise),u>0?o.scale(h,-1):o.scale(h,1);var b=t.lineWidth,_=t.textMatrixScale;if(0===_||0===b){var k=t.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;k!==r.TextRenderingMode.STROKE&&k!==r.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,b=.65*this.getSinglePixelWidth())}else b/=_;1!==s&&(o.scale(s,s),b/=s),o.lineWidth=b;var C,A=0;for(C=0;C<d;++C){var x=e[C];if((0,r.isNum)(x))A+=p*x*a/1e3;else{var E,w,S,P,R,T,O,L=!1,F=(x.isSpace?l:0)+c,M=x.fontChar,N=x.accent,I=x.width;if(f?(R=x.vmetric||g,T=-(T=x.vmetric?R[1]:.5*I)*v,O=R[2]*v,I=R?-R[0]:I,E=T/s,w=(A+O)/s):(E=A/s,w=0),n.remeasure&&I>0){var D=1e3*o.measureText(M).width/a*s;if(I<D&&this.isFontSubpixelAAEnabled){var j=I/D;L=!0,o.save(),o.scale(j,1),E/=j}else I!==D&&(E+=(I-D)/2e3*a/s)}(x.isInFont||n.missingFile)&&(m&&!N?o.fillText(M,E,w):(this.paintChar(M,E,w,i),N&&(S=E+N.offset.x/s,P=w-N.offset.y/s,this.paintChar(N.fontChar,S,P,i)))),A+=f?I*v-F*u:I*v+F*u,L&&o.restore()}}f?t.y-=A:t.x+=A*h,o.restore()}},showType3Text:function(e){var t,n,a,i,o=this.ctx,s=this.current,c=s.font,l=s.fontSize,u=s.fontDirection,h=c.vertical?1:-1,d=s.charSpacing,f=s.wordSpacing,p=s.textHScale*u,g=s.fontMatrix||r.FONT_IDENTITY_MATRIX,v=e.length;if(s.textRenderingMode!==r.TextRenderingMode.INVISIBLE&&0!==l){for(this._cachedGetSinglePixelWidth=null,o.save(),o.transform.apply(o,s.textMatrix),o.translate(s.x,s.y),o.scale(p,u),t=0;t<v;++t)if(n=e[t],(0,r.isNum)(n))i=h*n*l/1e3,this.ctx.translate(i,0),s.x+=i*p;else{var m=(n.isSpace?f:0)+d,y=c.charProcOperatorList[n.operatorListId];y?(this.processingType3=n,this.save(),o.scale(l,l),o.transform.apply(o,g),this.executeOperatorList(y),this.restore(),a=r.Util.applyTransform([n.width,0],g)[0]*l+m,o.translate(a,0),s.x+=a*p):(0,r.warn)('Type3 character "'.concat(n.operatorListId,'" is not available.'))}o.restore(),this.processingType3=null}},setCharWidth:function(e,t){},setCharWidthAndBounds:function(e,t,n,r,a,i){this.ctx.rect(n,r,a-n,i-r),this.clip(),this.endPath()},getColorN_Pattern:function(t){var n,r=this;if("TilingPattern"===t[0]){var i=t[1],o=this.baseTransform||this.ctx.mozCurrentTransform.slice(),s={createCanvasGraphics:function(t){return new e(t,r.commonObjs,r.objs,r.canvasFactory,r.webGLContext)}};n=new a.TilingPattern(t,i,this.ctx,s,o)}else n=(0,a.getShadingPatternFromIR)(t);return n},setStrokeColorN:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0},setStrokeRGBColor:function(e,t,n){var a=r.Util.makeCssRgb(e,t,n);this.ctx.strokeStyle=a,this.current.strokeColor=a},setFillRGBColor:function(e,t,n){var a=r.Util.makeCssRgb(e,t,n);this.ctx.fillStyle=a,this.current.fillColor=a,this.current.patternFill=!1},shadingFill:function(e){var t=this.ctx;this.save();var n=(0,a.getShadingPatternFromIR)(e);t.fillStyle=n.getPattern(t,this,!0);var i=t.mozCurrentTransformInverse;if(i){var o=t.canvas,s=o.width,c=o.height,l=r.Util.applyTransform([0,0],i),u=r.Util.applyTransform([0,c],i),h=r.Util.applyTransform([s,0],i),d=r.Util.applyTransform([s,c],i),f=Math.min(l[0],u[0],h[0],d[0]),p=Math.min(l[1],u[1],h[1],d[1]),g=Math.max(l[0],u[0],h[0],d[0]),v=Math.max(l[1],u[1],h[1],d[1]);this.ctx.fillRect(f,p,g-f,v-p)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){(0,r.unreachable)("Should not call beginInlineImage")},beginImageData:function(){(0,r.unreachable)("Should not call beginImageData")},paintFormXObjectBegin:function(e,t){if(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,t){var n=t[2]-t[0],r=t[3]-t[1];this.ctx.rect(t[0],t[1],n,r),this.clip(),this.endPath()}},paintFormXObjectEnd:function(){this.restore(),this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(e){this.save();var t=this.ctx;e.isolated||(0,r.info)("TODO: Support non-isolated groups."),e.knockout&&(0,r.warn)("Knockout groups not supported.");var n=t.mozCurrentTransform;if(e.matrix&&t.transform.apply(t,e.matrix),!e.bbox)throw new Error("Bounding box is required.");var a=r.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform),i=[0,0,t.canvas.width,t.canvas.height];a=r.Util.intersect(a,i)||[0,0,0,0];var o=Math.floor(a[0]),s=Math.floor(a[1]),l=Math.max(Math.ceil(a[2])-o,1),u=Math.max(Math.ceil(a[3])-s,1),h=1,d=1;l>4096&&(h=l/4096,l=4096),u>4096&&(d=u/4096,u=4096);var f="groupAt"+this.groupLevel;e.smask&&(f+="_smask_"+this.smaskCounter++%2);var p=this.cachedCanvases.getCanvas(f,l,u,!0),g=p.context;g.scale(1/h,1/d),g.translate(-o,-s),g.transform.apply(g,n),e.smask?this.smaskStack.push({canvas:p.canvas,context:g,offsetX:o,offsetY:s,scaleX:h,scaleY:d,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,s),t.scale(h,d)),c(t,g),this.ctx=g,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++,this.current.activeSMask=null},endGroup:function(e){this.groupLevel--;var t=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,e.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(t.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function(){this.restore()},beginAnnotation:function(e,t,n){if(this.save(),l(this.ctx),this.current=new s,Array.isArray(e)&&4===e.length){var r=e[2]-e[0],a=e[3]-e[1];this.ctx.rect(e[0],e[1],r,a),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,n)},endAnnotation:function(){this.restore()},paintJpegXObject:function(e,t,n){var a=this.processingType3?this.commonObjs.get(e):this.objs.get(e);if(a){this.save();var i=this.ctx;if(i.scale(1/t,-1/n),i.drawImage(a,0,0,a.width,a.height,0,-n,t,n),this.imageLayer){var o=i.mozCurrentTransformInverse,s=this.getCanvasPosition(0,0);this.imageLayer.appendImage({objId:e,left:s[0],top:s[1],width:t/o[0],height:n/o[3]})}this.restore()}else(0,r.warn)("Dependent image isn't ready yet")},paintImageMaskXObject:function(e){var t=this.ctx,r=e.width,a=e.height,i=this.current.fillColor,o=this.current.patternFill,s=this.processingType3;if(s&&void 0===s.compiled&&(s.compiled=r<=1e3&&a<=1e3?function(e){var t,n,r,a,i=e.width,o=e.height,s=i+1,c=new Uint8Array(s*(o+1)),l=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),u=i+7&-8,h=e.data,d=new Uint8Array(u*o),f=0;for(t=0,a=h.length;t<a;t++)for(var p=128,g=h[t];p>0;)d[f++]=g&p?0:255,p>>=1;var v=0;for(0!==d[f=0]&&(c[0]=1,++v),n=1;n<i;n++)d[f]!==d[f+1]&&(c[n]=d[f]?2:1,++v),f++;for(0!==d[f]&&(c[n]=2,++v),t=1;t<o;t++){r=t*s,d[(f=t*u)-u]!==d[f]&&(c[r]=d[f]?1:8,++v);var m=(d[f]?4:0)+(d[f-u]?8:0);for(n=1;n<i;n++)l[m=(m>>2)+(d[f+1]?4:0)+(d[f-u+1]?8:0)]&&(c[r+n]=l[m],++v),f++;if(d[f-u]!==d[f]&&(c[r+n]=d[f]?2:4,++v),v>1e3)return null}for(r=t*s,0!==d[f=u*(o-1)]&&(c[r]=8,++v),n=1;n<i;n++)d[f]!==d[f+1]&&(c[r+n]=d[f]?4:8,++v),f++;if(0!==d[f]&&(c[r+n]=4,++v),v>1e3)return null;var y=new Int32Array([0,s,-1,0,-s,0,0,0,1]),b=[];for(t=0;v&&t<=o;t++){for(var _=t*s,k=_+i;_<k&&!c[_];)_++;if(_!==k){var C,A=[_%s,t],x=c[_],E=_;do{var w=y[x];do{_+=w}while(!c[_]);5!==(C=c[_])&&10!==C?(x=C,c[_]=0):(x=C&51*x>>4,c[_]&=x>>2|x<<2),A.push(_%s),A.push(_/s|0),c[_]||--v}while(E!==_);b.push(A),--t}}return function(e){e.save(),e.scale(1/i,-1/o),e.translate(0,-o),e.beginPath();for(var t=0,n=b.length;t<n;t++){var r=b[t];e.moveTo(r[0],r[1]);for(var a=2,s=r.length;a<s;a+=2)e.lineTo(r[a],r[a+1])}e.fill(),e.beginPath(),e.restore()}}({data:e.data,width:r,height:a}):null),s&&s.compiled)s.compiled(t);else{var c=this.cachedCanvases.getCanvas("maskCanvas",r,a),l=c.context;l.save(),n(l,e),l.globalCompositeOperation="source-in",l.fillStyle=o?i.getPattern(l,this):i,l.fillRect(0,0,r,a),l.restore(),this.paintInlineImageXObject(c.canvas)}},paintImageMaskXObjectRepeat:function(e,t,r,a){var i=e.width,o=e.height,s=this.current.fillColor,c=this.current.patternFill,l=this.cachedCanvases.getCanvas("maskCanvas",i,o),u=l.context;u.save(),n(u,e),u.globalCompositeOperation="source-in",u.fillStyle=c?s.getPattern(u,this):s,u.fillRect(0,0,i,o),u.restore();for(var h=this.ctx,d=0,f=a.length;d<f;d+=2)h.save(),h.transform(t,0,0,r,a[d],a[d+1]),h.scale(1,-1),h.drawImage(l.canvas,0,0,i,o,0,-1,1,1),h.restore()},paintImageMaskXObjectGroup:function(e){for(var t=this.ctx,r=this.current.fillColor,a=this.current.patternFill,i=0,o=e.length;i<o;i++){var s=e[i],c=s.width,l=s.height,u=this.cachedCanvases.getCanvas("maskCanvas",c,l),h=u.context;h.save(),n(h,s),h.globalCompositeOperation="source-in",h.fillStyle=a?r.getPattern(h,this):r,h.fillRect(0,0,c,l),h.restore(),t.save(),t.transform.apply(t,s.transform),t.scale(1,-1),t.drawImage(u.canvas,0,0,c,l,0,-1,1,1),t.restore()}},paintImageXObject:function(e){var t=this.processingType3?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,r.warn)("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(e,t,n,a){var i=this.processingType3?this.commonObjs.get(e):this.objs.get(e);if(i){for(var o=i.width,s=i.height,c=[],l=0,u=a.length;l<u;l+=2)c.push({transform:[t,0,0,n,a[l],a[l+1]],x:0,y:0,w:o,h:s});this.paintInlineImageXObjectGroup(i,c)}else(0,r.warn)("Dependent image isn't ready yet")},paintInlineImageXObject:function(e){var n=e.width,r=e.height,a=this.ctx;this.save(),a.scale(1/n,-1/r);var i,o,s=a.mozCurrentTransformInverse,c=s[0],l=s[1],u=Math.max(Math.sqrt(c*c+l*l),1),h=s[2],d=s[3],f=Math.max(Math.sqrt(h*h+d*d),1);if("function"===typeof HTMLElement&&e instanceof HTMLElement||!e.data)i=e;else{var p=(o=this.cachedCanvases.getCanvas("inlineImage",n,r)).context;t(p,e),i=o.canvas}for(var g=n,v=r,m="prescale1";u>2&&g>1||f>2&&v>1;){var y=g,b=v;u>2&&g>1&&(u/=g/(y=Math.ceil(g/2))),f>2&&v>1&&(f/=v/(b=Math.ceil(v/2))),(p=(o=this.cachedCanvases.getCanvas(m,y,b)).context).clearRect(0,0,y,b),p.drawImage(i,0,0,g,v,0,0,y,b),i=o.canvas,g=y,v=b,m="prescale1"===m?"prescale2":"prescale1"}if(a.drawImage(i,0,0,g,v,0,-r,n,r),this.imageLayer){var _=this.getCanvasPosition(0,-r);this.imageLayer.appendImage({imgData:e,left:_[0],top:_[1],width:n/s[0],height:r/s[3]})}this.restore()},paintInlineImageXObjectGroup:function(e,n){var r=this.ctx,a=e.width,i=e.height,o=this.cachedCanvases.getCanvas("inlineImage",a,i);t(o.context,e);for(var s=0,c=n.length;s<c;s++){var l=n[s];if(r.save(),r.transform.apply(r,l.transform),r.scale(1,-1),r.drawImage(o.canvas,l.x,l.y,l.w,l.h,0,-1,1,1),this.imageLayer){var u=this.getCanvasPosition(l.x,l.y);this.imageLayer.appendImage({imgData:e,left:u[0],top:u[1],width:a,height:i})}r.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){(0,r.warn)("Unsupported 'paintXObject' command.")},markPoint:function(e){},markPointProps:function(e,t){},beginMarkedContent:function(e){},beginMarkedContentProps:function(e,t){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){var e=this.ctx;this.pendingClip&&(this.pendingClip===m?e.clip("evenodd"):e.clip(),this.pendingClip=null),e.beginPath()},getSinglePixelWidth:function(e){if(null===this._cachedGetSinglePixelWidth){var t=this.ctx.mozCurrentTransformInverse;this._cachedGetSinglePixelWidth=Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1],t[2]*t[2]+t[3]*t[3]))}return this._cachedGetSinglePixelWidth},getCanvasPosition:function(e,t){var n=this.ctx.mozCurrentTransform;return[n[0]*e+n[2]*t+n[4],n[1]*e+n[3]*t+n[5]]}},r.OPS)e.prototype[r.OPS[y]]=e.prototype[y];return e}();t.CanvasGraphics=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadingPatternFromIR=function(e){var t=a[e[0]];if(!t)throw new Error("Unknown IR type: ".concat(e[0]));return t.fromIR(e)},t.TilingPattern=void 0;var r=n(1),a={};function i(e,t){if(t&&"undefined"!==typeof Path2D){var n=t[2]-t[0],r=t[3]-t[1],a=new Path2D;a.rect(t[0],t[1],n,r),e.clip(a)}}a.RadialAxial={fromIR:function(e){var t=e[1],n=e[2],r=e[3],a=e[4],o=e[5],s=e[6],c=e[7];return{type:"Pattern",getPattern:function(e){var l;i(e,n),"axial"===t?l=e.createLinearGradient(a[0],a[1],o[0],o[1]):"radial"===t&&(l=e.createRadialGradient(a[0],a[1],s,o[0],o[1],c));for(var u=0,h=r.length;u<h;++u){var d=r[u];l.addColorStop(d[0],d[1])}return l}}}};var o=function(){function e(e,t,n,r,a,i,o,s){var c,l=t.coords,u=t.colors,h=e.data,d=4*e.width;l[n+1]>l[r+1]&&(c=n,n=r,r=c,c=i,i=o,o=c),l[r+1]>l[a+1]&&(c=r,r=a,a=c,c=o,o=s,s=c),l[n+1]>l[r+1]&&(c=n,n=r,r=c,c=i,i=o,o=c);var f=(l[n]+t.offsetX)*t.scaleX,p=(l[n+1]+t.offsetY)*t.scaleY,g=(l[r]+t.offsetX)*t.scaleX,v=(l[r+1]+t.offsetY)*t.scaleY,m=(l[a]+t.offsetX)*t.scaleX,y=(l[a+1]+t.offsetY)*t.scaleY;if(!(p>=y))for(var b,_,k,C,A,x,E,w,S=u[i],P=u[i+1],R=u[i+2],T=u[o],O=u[o+1],L=u[o+2],F=u[s],M=u[s+1],N=u[s+2],I=Math.round(p),D=Math.round(y),j=I;j<=D;j++){if(j<v){var B=void 0;b=f-(f-g)*(B=j<p?0:p===v?1:(p-j)/(p-v)),_=S-(S-T)*B,k=P-(P-O)*B,C=R-(R-L)*B}else{var U=void 0;b=g-(g-m)*(U=j>y?1:v===y?0:(v-j)/(v-y)),_=T-(T-F)*U,k=O-(O-M)*U,C=L-(L-N)*U}var H=void 0;A=f-(f-m)*(H=j<p?0:j>y?1:(p-j)/(p-y)),x=S-(S-F)*H,E=P-(P-M)*H,w=R-(R-N)*H;for(var W=Math.round(Math.min(b,A)),q=Math.round(Math.max(b,A)),z=d*j+4*W,G=W;G<=q;G++){var V=(b-G)/(b-A);V<0?V=0:V>1&&(V=1),h[z++]=_-(_-x)*V|0,h[z++]=k-(k-E)*V|0,h[z++]=C-(C-w)*V|0,h[z++]=255}}}function t(t,n,r){var a,i,o=n.coords,s=n.colors;switch(n.type){case"lattice":var c=n.verticesPerRow,l=Math.floor(o.length/c)-1,u=c-1;for(a=0;a<l;a++)for(var h=a*c,d=0;d<u;d++,h++)e(t,r,o[h],o[h+1],o[h+c],s[h],s[h+1],s[h+c]),e(t,r,o[h+c+1],o[h+1],o[h+c],s[h+c+1],s[h+1],s[h+c]);break;case"triangles":for(a=0,i=o.length;a<i;a+=3)e(t,r,o[a],o[a+1],o[a+2],s[a],s[a+1],s[a+2]);break;default:throw new Error("illegal figure")}}return function(e,n,r,a,i,o,s,c){var l,u,h,d,f=Math.floor(e[0]),p=Math.floor(e[1]),g=Math.ceil(e[2])-f,v=Math.ceil(e[3])-p,m=Math.min(Math.ceil(Math.abs(g*n[0]*1.1)),3e3),y=Math.min(Math.ceil(Math.abs(v*n[1]*1.1)),3e3),b=g/m,_=v/y,k={coords:r,colors:a,offsetX:-f,offsetY:-p,scaleX:1/b,scaleY:1/_},C=m+4,A=y+4;if(c.isEnabled)l=c.drawFigures({width:m,height:y,backgroundColor:o,figures:i,context:k}),(u=s.getCanvas("mesh",C,A,!1)).context.drawImage(l,2,2),l=u.canvas;else{var x=(u=s.getCanvas("mesh",C,A,!1)).context,E=x.createImageData(m,y);if(o){var w=E.data;for(h=0,d=w.length;h<d;h+=4)w[h]=o[0],w[h+1]=o[1],w[h+2]=o[2],w[h+3]=255}for(h=0;h<i.length;h++)t(E,i[h],k);x.putImageData(E,2,2),l=u.canvas}return{canvas:l,offsetX:f-2*b,offsetY:p-2*_,scaleX:b,scaleY:_}}}();a.Mesh={fromIR:function(e){var t=e[2],n=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8];return{type:"Pattern",getPattern:function(e,h,d){var f;if(i(e,l),d)f=r.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(f=r.Util.singularValueDecompose2dScale(h.baseTransform),c){var p=r.Util.singularValueDecompose2dScale(c);f=[f[0]*p[0],f[1]*p[1]]}var g=o(s,f,t,n,a,d?null:u,h.cachedCanvases,h.webGLContext);return d||(e.setTransform.apply(e,h.baseTransform),c&&e.transform.apply(e,c)),e.translate(g.offsetX,g.offsetY),e.scale(g.scaleX,g.scaleY),e.createPattern(g.canvas,"no-repeat")}}}},a.Dummy={fromIR:function(){return{type:"Pattern",getPattern:function(){return"hotpink"}}}};var s=function(){var e=1,t=2;function n(e,t,n,r,a){this.operatorList=e[2],this.matrix=e[3]||[1,0,0,1,0,0],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.canvasGraphicsFactory=r,this.baseTransform=a,this.type="Pattern",this.ctx=n}return n.prototype={createPatternCanvas:function(e){var t=this.operatorList,n=this.bbox,a=this.xstep,i=this.ystep,o=this.paintType,s=this.tilingType,c=this.color,l=this.canvasGraphicsFactory;(0,r.info)("TilingType: "+s);var u=n[0],h=n[1],d=n[2],f=n[3],p=r.Util.singularValueDecompose2dScale(this.matrix),g=r.Util.singularValueDecompose2dScale(this.baseTransform),v=[p[0]*g[0],p[1]*g[1]],m=this.getSizeAndScale(a,this.ctx.canvas.width,v[0]),y=this.getSizeAndScale(i,this.ctx.canvas.height,v[1]),b=e.cachedCanvases.getCanvas("pattern",m.size,y.size,!0),_=b.context,k=l.createCanvasGraphics(_);return k.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(k,o,c),k.transform(m.scale,0,0,y.scale,0,0),k.transform(1,0,0,1,-u,-h),this.clipBbox(k,n,u,h,d,f),k.executeOperatorList(t),this.ctx.transform(1,0,0,1,u,h),this.ctx.scale(1/m.scale,1/y.scale),b.canvas},getSizeAndScale:function(e,t,n){e=Math.abs(e);var r=Math.max(3e3,t),a=Math.ceil(e*n);return a>=r?a=r:n=a/e,{scale:n,size:a}},clipBbox:function(e,t,n,r,a,i){if(Array.isArray(t)&&4===t.length){var o=a-n,s=i-r;e.ctx.rect(n,r,o,s),e.clip(),e.endPath()}},setFillAndStrokeStyleToContext:function(n,a,i){var o=n.ctx,s=n.current;switch(a){case e:var c=this.ctx;o.fillStyle=c.fillStyle,o.strokeStyle=c.strokeStyle,s.fillColor=c.fillStyle,s.strokeColor=c.strokeStyle;break;case t:var l=r.Util.makeCssRgb(i[0],i[1],i[2]);o.fillStyle=l,o.strokeStyle=l,s.fillColor=l,s.strokeColor=l;break;default:throw new r.FormatError("Unsupported paint type: ".concat(a))}},getPattern:function(e,t){(e=this.ctx).setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix);var n=this.createPatternCanvas(t);return e.createPattern(n,"repeat")}},n}();t.TilingPattern=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;var r=Object.create(null);t.GlobalWorkerOptions=r,r.workerPort=void 0===r.workerPort?null:r.workerPort,r.workerSrc=void 0===r.workerSrc?"":r.workerSrc},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var r=n(1),a=1,i=2,o=1,s=2,c=3,l=4,u=5,h=6,d=7,f=8;function p(e){if("object"!==typeof e||null===e)return e;switch(e.name){case"AbortException":return new r.AbortException(e.message);case"MissingPDFException":return new r.MissingPDFException(e.message);case"UnexpectedResponseException":return new r.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new r.UnknownErrorException(e.message,e.details);default:return new r.UnknownErrorException(e.message,e.toString())}}var g=function(){function e(t,n,r){var o=this;_classCallCheck(this,e),this.sourceName=t,this.targetName=n,this.comObj=r,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===o.sourceName)if(t.stream)o._processStreamMessage(t);else if(t.callback){var n=t.callbackId,s=o.callbackCapabilities[n];if(!s)throw new Error("Cannot resolve callback ".concat(n));if(delete o.callbackCapabilities[n],t.callback===a)s.resolve(t.data);else{if(t.callback!==i)throw new Error("Unexpected callback case");s.reject(p(t.reason))}}else{var c=o.actionHandler[t.action];if(!c)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){var l=o.sourceName,u=t.sourceName;new Promise((function(e){e(c(t.data))})).then((function(e){r.postMessage({sourceName:l,targetName:u,callback:a,callbackId:t.callbackId,data:e})}),(function(e){r.postMessage({sourceName:l,targetName:u,callback:i,callbackId:t.callbackId,reason:p(e)})}))}else t.streamId?o._createStreamSink(t):c(t.data)}},r.addEventListener("message",this._onComObjOnMessage)}return _createClass(e,[{key:"on",value:function(e,t){var n=this.actionHandler;if(n[e])throw new Error('There is already an actionName called "'.concat(e,'"'));n[e]=t}},{key:"send",value:function(e,t,n){this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}},{key:"sendWithPromise",value:function(e,t,n){var a=this.callbackId++,i=(0,r.createPromiseCapability)();this.callbackCapabilities[a]=i;try{this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:a,data:t},n)}catch(o){i.reject(o)}return i.promise}},{key:"sendWithStream",value:function(e,t,n,a){var i=this,s=this.streamId++,c=this.sourceName,l=this.targetName,u=this.comObj;return new ReadableStream({start:function(n){var o=(0,r.createPromiseCapability)();return i.streamControllers[s]={controller:n,startCall:o,pullCall:null,cancelCall:null,isClosed:!1},i._postMessage({sourceName:c,targetName:l,action:e,streamId:s,data:t,desiredSize:n.desiredSize},a),o.promise},pull:function(e){var t=(0,r.createPromiseCapability)();return i.streamControllers[s].pullCall=t,u.postMessage({sourceName:c,targetName:l,stream:h,streamId:s,desiredSize:e.desiredSize}),t.promise},cancel:function(e){(0,r.assert)(e instanceof Error,"cancel must have a valid reason");var t=(0,r.createPromiseCapability)();return i.streamControllers[s].cancelCall=t,i.streamControllers[s].isClosed=!0,u.postMessage({sourceName:c,targetName:l,stream:o,streamId:s,reason:p(e)}),t.promise}},n)}},{key:"_createStreamSink",value:function(e){var t=this,n=this.actionHandler[e.action],a=e.streamId,i=this.sourceName,o=e.sourceName,s=this.comObj,h={enqueue:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var c=this.desiredSize;this.desiredSize-=n,c>0&&this.desiredSize<=0&&(this.sinkCapability=(0,r.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:i,targetName:o,stream:l,streamId:a,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:o,stream:c,streamId:a}),delete t.streamSinks[a])},error:function(e){(0,r.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,s.postMessage({sourceName:i,targetName:o,stream:u,streamId:a,reason:p(e)}))},sinkCapability:(0,r.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};h.sinkCapability.resolve(),h.ready=h.sinkCapability.promise,this.streamSinks[a]=h,new Promise((function(t){t(n(e.data,h))})).then((function(){s.postMessage({sourceName:i,targetName:o,stream:f,streamId:a,success:!0})}),(function(e){s.postMessage({sourceName:i,targetName:o,stream:f,streamId:a,reason:p(e)})}))}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,n=this.sourceName,a=e.sourceName,i=this.comObj;switch(e.stream){case f:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(p(e.reason));break;case d:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(p(e.reason));break;case h:if(!this.streamSinks[t]){i.postMessage({sourceName:n,targetName:a,stream:d,streamId:t,success:!0});break}this.streamSinks[t].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[t].sinkCapability.resolve(),this.streamSinks[t].desiredSize=e.desiredSize;var g=this.streamSinks[e.streamId].onPull;new Promise((function(e){e(g&&g())})).then((function(){i.postMessage({sourceName:n,targetName:a,stream:d,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:n,targetName:a,stream:d,streamId:t,reason:p(e)})}));break;case l:if((0,r.assert)(this.streamControllers[t],"enqueue should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].controller.enqueue(e.chunk);break;case c:if((0,r.assert)(this.streamControllers[t],"close should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].isClosed=!0,this.streamControllers[t].controller.close(),this._deleteStreamController(t);break;case u:(0,r.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(p(e.reason)),this._deleteStreamController(t);break;case s:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(p(e.reason)),this._deleteStreamController(t);break;case o:if(!this.streamSinks[t])break;var v=this.streamSinks[e.streamId].onCancel;new Promise((function(t){t(v&&v(p(e.reason)))})).then((function(){i.postMessage({sourceName:n,targetName:a,stream:s,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:n,targetName:a,stream:s,streamId:t,reason:p(e)})})),this.streamSinks[t].sinkCapability.reject(p(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(t){return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.allSettled([this.streamControllers[t].startCall,this.streamControllers[t].pullCall,this.streamControllers[t].cancelCall].map((function(e){return e&&e.promise})));case 2:delete this.streamControllers[t];case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_postMessage",value:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)}},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]),e}();t.MessageHandler=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var r=n(1),a=n(13),i=function(){function e(t){_classCallCheck(this,e),(0,r.assert)("string"===typeof t,"Metadata: input is not a string"),t=this._repair(t);var n=(new a.SimpleXMLParser).parseFromString(t);this._metadataMap=new Map,n&&this._parse(n)}return _createClass(e,[{key:"_repair",value:function(e){return e.replace(/^[^<]+/,"").replace(/>\\376\\377([^<]+)/g,(function(e,t){for(var n=t.replace(/\\([0-3])([0-7])([0-7])/g,(function(e,t,n,r){return String.fromCharCode(64*t+8*n+1*r)})).replace(/&(amp|apos|gt|lt|quot);/g,(function(e,t){switch(t){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error("_repair: ".concat(t," isn't defined."))})),r="",a=0,i=n.length;a<i;a+=2){var o=256*n.charCodeAt(a)+n.charCodeAt(a+1);r+=o>=32&&o<127&&60!==o&&62!==o&&38!==o?String.fromCharCode(o):"&#x"+(65536+o).toString(16).substring(1)+";"}return">"+r}))}},{key:"_parse",value:function(e){var t=e.documentElement;if("rdf:rdf"!==t.nodeName.toLowerCase())for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName.toLowerCase();)t=t.nextSibling;var n=t?t.nodeName.toLowerCase():null;if(t&&"rdf:rdf"===n&&t.hasChildNodes())for(var r=t.childNodes,a=0,i=r.length;a<i;a++){var o=r[a];if("rdf:description"===o.nodeName.toLowerCase())for(var s=0,c=o.childNodes.length;s<c;s++)if("#text"!==o.childNodes[s].nodeName.toLowerCase()){var l=o.childNodes[s],u=l.nodeName.toLowerCase();this._metadataMap.set(u,l.textContent.trim())}}}},{key:"get",value:function(e){return this._metadataMap.has(e)?this._metadataMap.get(e):null}},{key:"getAll",value:function(){var e,t=Object.create(null),n=_createForOfIteratorHelper(this._metadataMap);try{for(n.s();!(e=n.n()).done;){var r=_slicedToArray(e.value,2),a=r[0],i=r[1];t[a]=i}}catch(o){n.e(o)}finally{n.f()}return t}},{key:"has",value:function(e){return this._metadataMap.has(e)}}]),e}();t.Metadata=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleXMLParser=void 0;var r=0,a=-2,i=-3,o=-4,s=-5,c=-6,l=-9;function u(e,t){var n=e[t];return" "===n||"\n"===n||"\r"===n||"\t"===n}var h=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"_resolveEntities",value:function(e){var t=this;return e.replace(/&([^;]+);/g,(function(e,n){if("#x"===n.substring(0,2))return String.fromCharCode(parseInt(n.substring(2),16));if("#"===n.substring(0,1))return String.fromCharCode(parseInt(n.substring(1),10));switch(n){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"'}return t.onResolveEntity(n)}))}},{key:"_parseContent",value:function(e,t){var n=[],r=t;function a(){for(;r<e.length&&u(e,r);)++r}for(;r<e.length&&!u(e,r)&&">"!==e[r]&&"/"!==e[r];)++r;var i=e.substring(t,r);for(a();r<e.length&&">"!==e[r]&&"/"!==e[r]&&"?"!==e[r];){a();for(var o,s="";r<e.length&&!u(e,r)&&"="!==e[r];)s+=e[r],++r;if(a(),"="!==e[r])return null;++r,a();var c=e[r];if('"'!==c&&"'"!==c)return null;var l=e.indexOf(c,++r);if(l<0)return null;o=e.substring(r,l),n.push({name:s,value:this._resolveEntities(o)}),r=l+1,a()}return{name:i,attributes:n,parsed:r-t}}},{key:"_parseProcessingInstruction",value:function(e,t){for(var n=t;n<e.length&&!u(e,n)&&">"!==e[n]&&"/"!==e[n];)++n;var r=e.substring(t,n);!function(){for(;n<e.length&&u(e,n);)++n}();for(var a=n;n<e.length&&("?"!==e[n]||">"!==e[n+1]);)++n;return{name:r,value:e.substring(a,n),parsed:n-t}}},{key:"parseXml",value:function(e){for(var t=0;t<e.length;){var n=t;if("<"===e[t]){var r=void 0;switch(e[++n]){case"/":if(++n,(r=e.indexOf(">",n))<0)return void this.onError(l);this.onEndElement(e.substring(n,r)),n=r+1;break;case"?":++n;var u=this._parseProcessingInstruction(e,n);if("?>"!==e.substring(n+u.parsed,n+u.parsed+2))return void this.onError(i);this.onPi(u.name,u.value),n+=u.parsed+2;break;case"!":if("--"===e.substring(n+1,n+3)){if((r=e.indexOf("--\x3e",n+3))<0)return void this.onError(s);this.onComment(e.substring(n+3,r)),n=r+3}else if("[CDATA["===e.substring(n+1,n+8)){if((r=e.indexOf("]]>",n+8))<0)return void this.onError(a);this.onCdata(e.substring(n+8,r)),n=r+3}else{if("DOCTYPE"!==e.substring(n+1,n+8))return void this.onError(c);var h=e.indexOf("[",n+8),d=!1;if((r=e.indexOf(">",n+8))<0)return void this.onError(o);if(h>0&&r>h){if((r=e.indexOf("]>",n+8))<0)return void this.onError(o);d=!0}var f=e.substring(n+8,r+(d?1:0));this.onDoctype(f),n=r+(d?2:1)}break;default:var p=this._parseContent(e,n);if(null===p)return void this.onError(c);var g=!1;if("/>"===e.substring(n+p.parsed,n+p.parsed+2))g=!0;else if(">"!==e.substring(n+p.parsed,n+p.parsed+1))return void this.onError(l);this.onBeginElement(p.name,p.attributes,g),n+=p.parsed+(g?2:1)}}else{for(;n<e.length&&"<"!==e[n];)n++;var v=e.substring(t,n);this.onText(this._resolveEntities(v))}t=n}}},{key:"onResolveEntity",value:function(e){return"&".concat(e,";")}},{key:"onPi",value:function(e,t){}},{key:"onComment",value:function(e){}},{key:"onCdata",value:function(e){}},{key:"onDoctype",value:function(e){}},{key:"onText",value:function(e){}},{key:"onBeginElement",value:function(e,t,n){}},{key:"onEndElement",value:function(e){}},{key:"onError",value:function(e){}}]),e}(),d=function(){function e(t,n){_classCallCheck(this,e),this.nodeName=t,this.nodeValue=n,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}return _createClass(e,[{key:"hasChildNodes",value:function(){return this.childNodes&&this.childNodes.length>0}},{key:"firstChild",get:function(){return this.childNodes&&this.childNodes[0]}},{key:"nextSibling",get:function(){var e=this.parentNode.childNodes;if(e){var t=e.indexOf(this);if(-1!==t)return e[t+1]}}},{key:"textContent",get:function(){return this.childNodes?this.childNodes.map((function(e){return e.textContent})).join(""):this.nodeValue||""}}]),e}(),f=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e;return _classCallCheck(this,n),(e=t.call(this))._currentFragment=null,e._stack=null,e._errorCode=r,e}return _createClass(n,[{key:"parseFromString",value:function(e){if(this._currentFragment=[],this._stack=[],this._errorCode=r,this.parseXml(e),this._errorCode===r){var t=_slicedToArray(this._currentFragment,1)[0];if(t)return{documentElement:t}}}},{key:"onResolveEntity",value:function(e){switch(e){case"apos":return"'"}return _get(_getPrototypeOf(n.prototype),"onResolveEntity",this).call(this,e)}},{key:"onText",value:function(e){if(!function(e){for(var t=0,n=e.length;t<n;t++)if(!u(e,t))return!1;return!0}(e)){var t=new d("#text",e);this._currentFragment.push(t)}}},{key:"onCdata",value:function(e){var t=new d("#text",e);this._currentFragment.push(t)}},{key:"onBeginElement",value:function(e,t,n){var r=new d(e);r.childNodes=[],this._currentFragment.push(r),n||(this._stack.push(this._currentFragment),this._currentFragment=r.childNodes)}},{key:"onEndElement",value:function(e){this._currentFragment=this._stack.pop()||[];var t=this._currentFragment[this._currentFragment.length-1];if(t)for(var n=0,r=t.childNodes.length;n<r;n++)t.childNodes[n].parentNode=t}},{key:"onError",value:function(e){this._errorCode=e}}]),n}(h);t.SimpleXMLParser=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var r=n(1),a=function(){function e(t,n){var a=this;_classCallCheck(this,e),(0,r.assert)(n),this._queuedChunks=[],this._progressiveDone=t.progressiveDone||!1;var i=t.initialData;if(i&&i.length>0){var o=new Uint8Array(i).buffer;this._queuedChunks.push(o)}this._pdfDataRangeTransport=n,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._contentLength=t.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((function(e,t){a._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener((function(e,t){a._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((function(e){a._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((function(){a._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}return _createClass(e,[{key:"_onReceiveData",value:function(e){var t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{var n=this._rangeReaders.some((function(n){return n._begin===e.begin&&(n._enqueue(t),!0)}));(0,r.assert)(n)}}},{key:"_onProgress",value:function(e){if(void 0===e.total){var t=this._rangeReaders[0];t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{var n=this._fullRequestReader;n&&n.onProgress&&n.onProgress({loaded:e.loaded,total:e.total})}}},{key:"_onProgressiveDone",value:function(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(e){var t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}},{key:"getFullReader",value:function(){(0,r.assert)(!this._fullRequestReader);var e=this._queuedChunks;return this._queuedChunks=null,new i(this,e,this._progressiveDone)}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var n=new o(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(n),n}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeReaders.slice(0).forEach((function(t){t.cancel(e)})),this._pdfDataRangeTransport.abort()}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFDataTransportStream=a;var i=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,e),this._stream=t,this._done=r||!1,this._filename=null,this._queuedChunks=n||[],this._loaded=0;var a,i=_createForOfIteratorHelper(this._queuedChunks);try{for(i.s();!(a=i.n()).done;){var o=a.value;this._loaded+=o.byteLength}}catch(s){i.e(s)}finally{i.f()}this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}return _createClass(e,[{key:"_enqueue",value:function(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}},{key:"read",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(){var t,n;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._queuedChunks.length>0)){e.next=3;break}return t=this._queuedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 3:if(!this._done){e.next=5;break}return e.abrupt("return",{value:void 0,done:!0});case 5:return n=(0,r.createPromiseCapability)(),this._requests.push(n),e.abrupt("return",n.promise);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}},{key:"headersReady",get:function(){return this._headersReady}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function(){return this._stream._contentLength}}]),e}(),o=function(){function e(t,n,r){_classCallCheck(this,e),this._stream=t,this._begin=n,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}return _createClass(e,[{key:"_enqueue",value:function(e){this._done||(0===this._requests.length?this._queuedChunk=e:(this._requests.shift().resolve({value:e,done:!1}),this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]),this._done=!0,this._stream._removeRangeReader(this))}},{key:"read",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(){var t,n;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return n=(0,r.createPromiseCapability)(),this._requests.push(n),e.abrupt("return",n.promise);case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._stream._removeRangeReader(this)}},{key:"isStreamingSupported",get:function(){return!1}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLContext=void 0;var r=n(1),a=function(){function e(t){var n=t.enable,r=void 0!==n&&n;_classCallCheck(this,e),this._enabled=!0===r}return _createClass(e,[{key:"composeSMask",value:function(e){var t=e.layer,n=e.mask,r=e.properties;return i.composeSMask(t,n,r)}},{key:"drawFigures",value:function(e){var t=e.width,n=e.height,r=e.backgroundColor,a=e.figures,o=e.context;return i.drawFigures(t,n,r,a,o)}},{key:"clear",value:function(){i.cleanup()}},{key:"isEnabled",get:function(){var e=this._enabled;return e&&(e=i.tryInitGL()),(0,r.shadow)(this,"isEnabled",e)}}]),e}();t.WebGLContext=a;var i=function(){function e(e,t,n){var r=e.createShader(n);if(e.shaderSource(r,t),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS)){var a=e.getShaderInfoLog(r);throw new Error("Error during shader compilation: "+a)}return r}function t(t,n){return e(t,n,t.VERTEX_SHADER)}function n(t,n){return e(t,n,t.FRAGMENT_SHADER)}function r(e,t){for(var n=e.createProgram(),r=0,a=t.length;r<a;++r)e.attachShader(n,t[r]);if(e.linkProgram(n),!e.getProgramParameter(n,e.LINK_STATUS)){var i=e.getProgramInfoLog(n);throw new Error("Error during program linking: "+i)}return n}function a(e,t,n){e.activeTexture(n);var r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),r}var i,o;function s(){i||(o=document.createElement("canvas"),i=o.getContext("webgl",{premultipliedalpha:!1}))}var c=null,l=null;return{tryInitGL:function(){try{return s(),!!i}catch(e){}return!1},composeSMask:function(e,l,u){var h=e.width,d=e.height;c||function(){var e,a;s(),e=o,o=null,a=i,i=null;var l=r(a,[t(a,"  attribute vec2 a_position;                                      attribute vec2 a_texCoord;                                                                                                      uniform vec2 u_resolution;                                                                                                      varying vec2 v_texCoord;                                                                                                        void main() {                                                     vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0;       gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);                                                                              v_texCoord = a_texCoord;                                      }                                                             "),n(a,"  precision mediump float;                                                                                                        uniform vec4 u_backdrop;                                        uniform int u_subtype;                                          uniform sampler2D u_image;                                      uniform sampler2D u_mask;                                                                                                       varying vec2 v_texCoord;                                                                                                        void main() {                                                     vec4 imageColor = texture2D(u_image, v_texCoord);               vec4 maskColor = texture2D(u_mask, v_texCoord);                 if (u_backdrop.a > 0.0) {                                         maskColor.rgb = maskColor.rgb * maskColor.a +                                   u_backdrop.rgb * (1.0 - maskColor.a);         }                                                               float lum;                                                      if (u_subtype == 0) {                                             lum = maskColor.a;                                            } else {                                                          lum = maskColor.r * 0.3 + maskColor.g * 0.59 +                        maskColor.b * 0.11;                                     }                                                               imageColor.a *= lum;                                            imageColor.rgb *= imageColor.a;                                 gl_FragColor = imageColor;                                    }                                                             ")]);a.useProgram(l);var u={};u.gl=a,u.canvas=e,u.resolutionLocation=a.getUniformLocation(l,"u_resolution"),u.positionLocation=a.getAttribLocation(l,"a_position"),u.backdropLocation=a.getUniformLocation(l,"u_backdrop"),u.subtypeLocation=a.getUniformLocation(l,"u_subtype");var h=a.getAttribLocation(l,"a_texCoord"),d=a.getUniformLocation(l,"u_image"),f=a.getUniformLocation(l,"u_mask"),p=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,p),a.bufferData(a.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),a.STATIC_DRAW),a.enableVertexAttribArray(h),a.vertexAttribPointer(h,2,a.FLOAT,!1,0,0),a.uniform1i(d,0),a.uniform1i(f,1),c=u}();var f=c,p=f.canvas,g=f.gl;p.width=h,p.height=d,g.viewport(0,0,g.drawingBufferWidth,g.drawingBufferHeight),g.uniform2f(f.resolutionLocation,h,d),u.backdrop?g.uniform4f(f.resolutionLocation,u.backdrop[0],u.backdrop[1],u.backdrop[2],1):g.uniform4f(f.resolutionLocation,0,0,0,0),g.uniform1i(f.subtypeLocation,"Luminosity"===u.subtype?1:0);var v=a(g,e,g.TEXTURE0),m=a(g,l,g.TEXTURE1),y=g.createBuffer();return g.bindBuffer(g.ARRAY_BUFFER,y),g.bufferData(g.ARRAY_BUFFER,new Float32Array([0,0,h,0,0,d,0,d,h,0,h,d]),g.STATIC_DRAW),g.enableVertexAttribArray(f.positionLocation),g.vertexAttribPointer(f.positionLocation,2,g.FLOAT,!1,0,0),g.clearColor(0,0,0,0),g.enable(g.BLEND),g.blendFunc(g.ONE,g.ONE_MINUS_SRC_ALPHA),g.clear(g.COLOR_BUFFER_BIT),g.drawArrays(g.TRIANGLES,0,6),g.flush(),g.deleteTexture(v),g.deleteTexture(m),g.deleteBuffer(y),p},drawFigures:function(e,a,c,u,h){l||function(){var e,a;s(),e=o,o=null,a=i,i=null;var c=r(a,[t(a,"  attribute vec2 a_position;                                      attribute vec3 a_color;                                                                                                         uniform vec2 u_resolution;                                      uniform vec2 u_scale;                                           uniform vec2 u_offset;                                                                                                          varying vec4 v_color;                                                                                                           void main() {                                                     vec2 position = (a_position + u_offset) * u_scale;              vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0;         gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);                                                                              v_color = vec4(a_color / 255.0, 1.0);                         }                                                             "),n(a,"  precision mediump float;                                                                                                        varying vec4 v_color;                                                                                                           void main() {                                                     gl_FragColor = v_color;                                       }                                                             ")]);a.useProgram(c);var u={};u.gl=a,u.canvas=e,u.resolutionLocation=a.getUniformLocation(c,"u_resolution"),u.scaleLocation=a.getUniformLocation(c,"u_scale"),u.offsetLocation=a.getUniformLocation(c,"u_offset"),u.positionLocation=a.getAttribLocation(c,"a_position"),u.colorLocation=a.getAttribLocation(c,"a_color"),l=u}();var d=l,f=d.canvas,p=d.gl;f.width=e,f.height=a,p.viewport(0,0,p.drawingBufferWidth,p.drawingBufferHeight),p.uniform2f(d.resolutionLocation,e,a);var g,v,m,y=0;for(g=0,v=u.length;g<v;g++)switch(u[g].type){case"lattice":y+=((m=u[g].coords.length/u[g].verticesPerRow|0)-1)*(u[g].verticesPerRow-1)*6;break;case"triangles":y+=u[g].coords.length}var b=new Float32Array(2*y),_=new Uint8Array(3*y),k=h.coords,C=h.colors,A=0,x=0;for(g=0,v=u.length;g<v;g++){var E=u[g],w=E.coords,S=E.colors;switch(E.type){case"lattice":var P=E.verticesPerRow;m=w.length/P|0;for(var R=1;R<m;R++)for(var T=R*P+1,O=1;O<P;O++,T++)b[A]=k[w[T-P-1]],b[A+1]=k[w[T-P-1]+1],b[A+2]=k[w[T-P]],b[A+3]=k[w[T-P]+1],b[A+4]=k[w[T-1]],b[A+5]=k[w[T-1]+1],_[x]=C[S[T-P-1]],_[x+1]=C[S[T-P-1]+1],_[x+2]=C[S[T-P-1]+2],_[x+3]=C[S[T-P]],_[x+4]=C[S[T-P]+1],_[x+5]=C[S[T-P]+2],_[x+6]=C[S[T-1]],_[x+7]=C[S[T-1]+1],_[x+8]=C[S[T-1]+2],b[A+6]=b[A+2],b[A+7]=b[A+3],b[A+8]=b[A+4],b[A+9]=b[A+5],b[A+10]=k[w[T]],b[A+11]=k[w[T]+1],_[x+9]=_[x+3],_[x+10]=_[x+4],_[x+11]=_[x+5],_[x+12]=_[x+6],_[x+13]=_[x+7],_[x+14]=_[x+8],_[x+15]=C[S[T]],_[x+16]=C[S[T]+1],_[x+17]=C[S[T]+2],A+=12,x+=18;break;case"triangles":for(var L=0,F=w.length;L<F;L++)b[A]=k[w[L]],b[A+1]=k[w[L]+1],_[x]=C[S[L]],_[x+1]=C[S[L]+1],_[x+2]=C[S[L]+2],A+=2,x+=3}}c?p.clearColor(c[0]/255,c[1]/255,c[2]/255,1):p.clearColor(0,0,0,0),p.clear(p.COLOR_BUFFER_BIT);var M=p.createBuffer();p.bindBuffer(p.ARRAY_BUFFER,M),p.bufferData(p.ARRAY_BUFFER,b,p.STATIC_DRAW),p.enableVertexAttribArray(d.positionLocation),p.vertexAttribPointer(d.positionLocation,2,p.FLOAT,!1,0,0);var N=p.createBuffer();return p.bindBuffer(p.ARRAY_BUFFER,N),p.bufferData(p.ARRAY_BUFFER,_,p.STATIC_DRAW),p.enableVertexAttribArray(d.colorLocation),p.vertexAttribPointer(d.colorLocation,3,p.UNSIGNED_BYTE,!1,0,0),p.uniform2f(d.scaleLocation,h.scaleX,h.scaleY),p.uniform2f(d.offsetLocation,h.offsetX,h.offsetY),p.drawArrays(p.TRIANGLES,0,y),p.flush(),p.deleteBuffer(M),p.deleteBuffer(N),f},cleanup:function(){c&&c.canvas&&(c.canvas.width=0,c.canvas.height=0),l&&l.canvas&&(l.canvas.width=0,l.canvas.height=0),c=null,l=null}}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=void 0;var r=n(1),a=function(){var e=/\S/;function t(t,n,a){var i,o=document.createElement("span"),s={angle:0,canvasWidth:0,isWhitespace:!1,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1};if(t._textDivs.push(o),i=n.str,!e.test(i))return s.isWhitespace=!0,void t._textDivProperties.set(o,s);var c=r.Util.transform(t._viewport.transform,n.transform),l=Math.atan2(c[1],c[0]),u=a[n.fontName];u.vertical&&(l+=Math.PI/2);var h,d,f=Math.sqrt(c[2]*c[2]+c[3]*c[3]),p=f;if(u.ascent?p=u.ascent*p:u.descent&&(p=(1+u.descent)*p),0===l?(h=c[4],d=c[5]-p):(h=c[4]+p*Math.sin(l),d=c[5]-p*Math.cos(l)),o.style.left="".concat(h,"px"),o.style.top="".concat(d,"px"),o.style.fontSize="".concat(f,"px"),o.style.fontFamily=u.fontFamily,o.textContent=n.str,t._fontInspectorEnabled&&(o.dataset.fontName=n.fontName),0!==l&&(s.angle=l*(180/Math.PI)),n.str.length>1&&(u.vertical?s.canvasWidth=n.height*t._viewport.scale:s.canvasWidth=n.width*t._viewport.scale),t._textDivProperties.set(o,s),t._textContentStream&&t._layoutText(o),t._enhanceTextSelection){var g=1,v=0;0!==l&&(g=Math.cos(l),v=Math.sin(l));var m,y,b=(u.vertical?n.height:n.width)*t._viewport.scale,_=f;0!==l?(m=[g,v,-v,g,h,d],y=r.Util.getAxialAlignedBoundingBox([0,0,b,_],m)):y=[h,d,h+b,d+_],t._bounds.push({left:y[0],top:y[1],right:y[2],bottom:y[3],div:o,size:[b,_],m:m})}}function n(e){if(!e._canceled){var t=e._textDivs,n=e._capability,r=t.length;if(r>1e5)return e._renderingDone=!0,void n.resolve();if(!e._textContentStream)for(var a=0;a<r;a++)e._layoutText(t[a]);e._renderingDone=!0,n.resolve()}}function a(e){for(var t=e._bounds,n=e._viewport,a=function(e,t,n){var r=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}}));i(e,r);var a=new Array(n.length);return r.forEach((function(e){var t=e.index;a[t]={left:e.x1New,top:0,right:e.x2New,bottom:0}})),n.map((function(t,n){var i=a[n],o=r[n];o.x1=t.top,o.y1=e-i.right,o.x2=t.bottom,o.y2=e-i.left,o.index=n,o.x1New=void 0,o.x2New=void 0})),i(t,r),r.forEach((function(e){var t=e.index;a[t].top=e.x1New,a[t].bottom=e.x2New})),a}(n.width,n.height,t),o=0;o<a.length;o++){var s=t[o].div,c=e._textDivProperties.get(s);if(0!==c.angle){var l=a[o],u=t[o],h=u.m,d=h[0],f=h[1],p=[[0,0],[0,u.size[1]],[u.size[0],0],u.size],g=new Float64Array(64);p.forEach((function(e,t){var n=r.Util.applyTransform(e,h);g[t+0]=d&&(l.left-n[0])/d,g[t+4]=f&&(l.top-n[1])/f,g[t+8]=d&&(l.right-n[0])/d,g[t+12]=f&&(l.bottom-n[1])/f,g[t+16]=f&&(l.left-n[0])/-f,g[t+20]=d&&(l.top-n[1])/d,g[t+24]=f&&(l.right-n[0])/-f,g[t+28]=d&&(l.bottom-n[1])/d,g[t+32]=d&&(l.left-n[0])/-d,g[t+36]=f&&(l.top-n[1])/-f,g[t+40]=d&&(l.right-n[0])/-d,g[t+44]=f&&(l.bottom-n[1])/-f,g[t+48]=f&&(l.left-n[0])/f,g[t+52]=d&&(l.top-n[1])/-d,g[t+56]=f&&(l.right-n[0])/f,g[t+60]=d&&(l.bottom-n[1])/-d}));var v=function(e,t,n){for(var r=0,a=0;a<n;a++){var i=e[t++];i>0&&(r=r?Math.min(i,r):i)}return r},m=1+Math.min(Math.abs(d),Math.abs(f));c.paddingLeft=v(g,32,16)/m,c.paddingTop=v(g,48,16)/m,c.paddingRight=v(g,0,16)/m,c.paddingBottom=v(g,16,16)/m,e._textDivProperties.set(s,c)}else c.paddingLeft=t[o].left-a[o].left,c.paddingTop=t[o].top-a[o].top,c.paddingRight=a[o].right-t[o].right,c.paddingBottom=a[o].bottom-t[o].bottom,e._textDivProperties.set(s,c)}}function i(e,t){t.sort((function(e,t){return e.x1-t.x1||e.index-t.index}));var n=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];t.forEach((function(e){for(var t=0;t<n.length&&n[t].end<=e.y1;)t++;for(var r,a,i=n.length-1;i>=0&&n[i].start>=e.y2;)i--;var o,s,c=-1/0;for(o=t;o<=i;o++){var l;(l=(a=(r=n[o]).boundary).x2>e.x1?a.index>e.index?a.x1New:e.x1:void 0===a.x2New?(a.x2+e.x1)/2:a.x2New)>c&&(c=l)}for(e.x1New=c,o=t;o<=i;o++)void 0===(a=(r=n[o]).boundary).x2New?a.x2>e.x1?a.index>e.index&&(a.x2New=a.x2):a.x2New=c:a.x2New>c&&(a.x2New=Math.max(c,a.x2));var u=[],h=null;for(o=t;o<=i;o++){var d=(a=(r=n[o]).boundary).x2>e.x2?a:e;h===d?u[u.length-1].end=r.end:(u.push({start:r.start,end:r.end,boundary:d}),h=d)}for(n[t].start<e.y1&&(u[0].start=e.y1,u.unshift({start:n[t].start,end:e.y1,boundary:n[t].boundary})),e.y2<n[i].end&&(u[u.length-1].end=e.y2,u.push({start:e.y2,end:n[i].end,boundary:n[i].boundary})),o=t;o<=i;o++)if(void 0===(a=(r=n[o]).boundary).x2New){var f=!1;for(s=t-1;!f&&s>=0&&n[s].start>=a.y1;s--)f=n[s].boundary===a;for(s=i+1;!f&&s<n.length&&n[s].end<=a.y2;s++)f=n[s].boundary===a;for(s=0;!f&&s<u.length;s++)f=u[s].boundary===a;f||(a.x2New=c)}Array.prototype.splice.apply(n,[t,i-t+1].concat(u))})),n.forEach((function(t){var n=t.boundary;void 0===n.x2New&&(n.x2New=Math.max(e,n.x2))}))}function o(e){var t=this,n=e.textContent,a=e.textContentStream,i=e.container,o=e.viewport,s=e.textDivs,c=e.textContentItemsStr,l=e.enhanceTextSelection;this._textContent=n,this._textContentStream=a,this._container=i,this._viewport=o,this._textDivs=s||[],this._textContentItemsStr=c||[],this._enhanceTextSelection=!!l,this._fontInspectorEnabled=!(!globalThis.FontInspector||!globalThis.FontInspector.enabled),this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,r.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally((function(){t._layoutTextCtx&&(t._layoutTextCtx.canvas.width=0,t._layoutTextCtx.canvas.height=0,t._layoutTextCtx=null)})).catch((function(){}))}return o.prototype={get promise(){return this._capability.promise},cancel:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new r.AbortException("TextLayer task cancelled.")),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))},_processItems:function(e,n){for(var r=0,a=e.length;r<a;r++)this._textContentItemsStr.push(e[r].str),t(this,e[r],n)},_layoutText:function(e){var t=this._textDivProperties.get(e);if(!t.isWhitespace){var n="";if(0!==t.canvasWidth){var r=e.style,a=r.fontSize,i=r.fontFamily;a===this._layoutTextLastFontSize&&i===this._layoutTextLastFontFamily||(this._layoutTextCtx.font="".concat(a," ").concat(i),this._layoutTextLastFontSize=a,this._layoutTextLastFontFamily=i);var o=this._layoutTextCtx.measureText(e.textContent).width;o>0&&(t.scale=t.canvasWidth/o,n="scaleX(".concat(t.scale,")"))}0!==t.angle&&(n="rotate(".concat(t.angle,"deg) ").concat(n)),n.length>0&&(this._enhanceTextSelection&&(t.originalTransform=n),e.style.transform=n),this._textDivProperties.set(e,t),this._container.appendChild(e)}},_render:function(e){var t=this,a=(0,r.createPromiseCapability)(),i=Object.create(null),o=document.createElement("canvas");if(o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent){var s=this._textContent.items,c=this._textContent.styles;this._processItems(s,c),a.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');this._reader=this._textContentStream.getReader(),function e(){t._reader.read().then((function(n){var r=n.value;n.done?a.resolve():(Object.assign(i,r.styles),t._processItems(r.items,i),e())}),a.reject)}()}a.promise.then((function(){i=null,e?t._renderTimer=setTimeout((function(){n(t),t._renderTimer=null}),e):n(t)}),this._capability.reject)},expandTextDivs:function(e){if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(a(this),this._bounds=null);for(var t=[],n=[],r=0,i=this._textDivs.length;r<i;r++){var o=this._textDivs[r],s=this._textDivProperties.get(o);s.isWhitespace||(e?(t.length=0,n.length=0,s.originalTransform&&t.push(s.originalTransform),s.paddingTop>0?(n.push("".concat(s.paddingTop,"px")),t.push("translateY(".concat(-s.paddingTop,"px)"))):n.push(0),s.paddingRight>0?n.push("".concat(s.paddingRight/s.scale,"px")):n.push(0),s.paddingBottom>0?n.push("".concat(s.paddingBottom,"px")):n.push(0),s.paddingLeft>0?(n.push("".concat(s.paddingLeft/s.scale,"px")),t.push("translateX(".concat(-s.paddingLeft/s.scale,"px)"))):n.push(0),o.style.padding=n.join(" "),t.length&&(o.style.transform=t.join(" "))):(o.style.padding=null,o.style.transform=s.originalTransform))}}}},function(e){var t=new o({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}}();t.renderTextLayer=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var r=n(4),a=n(1),i=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"create",value:function(e){switch(e.data.annotationType){case a.AnnotationType.LINK:return new s(e);case a.AnnotationType.TEXT:return new c(e);case a.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new u(e);case"Btn":return e.data.radioButton?new d(e):e.data.checkBox?new h(e):new f(e);case"Ch":return new p(e)}return new l(e);case a.AnnotationType.POPUP:return new g(e);case a.AnnotationType.FREETEXT:return new m(e);case a.AnnotationType.LINE:return new y(e);case a.AnnotationType.SQUARE:return new b(e);case a.AnnotationType.CIRCLE:return new _(e);case a.AnnotationType.POLYLINE:return new k(e);case a.AnnotationType.CARET:return new A(e);case a.AnnotationType.INK:return new x(e);case a.AnnotationType.POLYGON:return new C(e);case a.AnnotationType.HIGHLIGHT:return new E(e);case a.AnnotationType.UNDERLINE:return new w(e);case a.AnnotationType.SQUIGGLY:return new S(e);case a.AnnotationType.STRIKEOUT:return new P(e);case a.AnnotationType.STAMP:return new R(e);case a.AnnotationType.FILEATTACHMENT:return new T(e);default:return new o(e)}}}]),e}(),o=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,e),this.isRenderable=n,this.data=t.data,this.layer=t.layer,this.page=t.page,this.viewport=t.viewport,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderInteractiveForms=t.renderInteractiveForms,this.svgFactory=t.svgFactory,n&&(this.container=this._createContainer(r))}return _createClass(e,[{key:"_createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data,n=this.page,r=this.viewport,i=document.createElement("section"),o=t.rect[2]-t.rect[0],s=t.rect[3]-t.rect[1];i.setAttribute("data-annotation-id",t.id);var c=a.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(i.style.transform="matrix(".concat(r.transform.join(","),")"),i.style.transformOrigin="-".concat(c[0],"px -").concat(c[1],"px"),!e&&t.borderStyle.width>0){i.style.borderWidth="".concat(t.borderStyle.width,"px"),t.borderStyle.style!==a.AnnotationBorderStyleType.UNDERLINE&&(o-=2*t.borderStyle.width,s-=2*t.borderStyle.width);var l=t.borderStyle.horizontalCornerRadius,u=t.borderStyle.verticalCornerRadius;if(l>0||u>0){var h="".concat(l,"px / ").concat(u,"px");i.style.borderRadius=h}switch(t.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:i.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:i.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:i.style.borderBottomStyle="solid"}t.color?i.style.borderColor=a.Util.makeCssRgb(0|t.color[0],0|t.color[1],0|t.color[2]):i.style.borderWidth=0}return i.style.left="".concat(c[0],"px"),i.style.top="".concat(c[1],"px"),i.style.width="".concat(o,"px"),i.style.height="".concat(s,"px"),i}},{key:"_createPopup",value:function(e,t,n){t||((t=document.createElement("div")).style.height=e.style.height,t.style.width=e.style.width,e.appendChild(t));var r=new v({container:e,trigger:t,color:n.color,title:n.title,modificationDate:n.modificationDate,contents:n.contents,hideWrapper:!0}).render();r.style.left=e.style.width,e.appendChild(r)}},{key:"render",value:function(){(0,a.unreachable)("Abstract method `AnnotationElement.render` called")}}]),e}(),s=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!!(e.data.url||e.data.dest||e.data.action);return t.call(this,e,r)}return _createClass(n,[{key:"render",value:function(){this.container.className="linkAnnotation";var e=this.data,t=this.linkService,n=document.createElement("a");return e.url?(0,r.addLinkAttributes)(n,{url:e.url,target:e.newWindow?r.LinkTarget.BLANK:t.externalLinkTarget,rel:t.externalLinkRel,enabled:t.externalLinkEnabled}):e.action?this._bindNamedAction(n,e.action):this._bindLink(n,e.dest),this.container.appendChild(n),this.container}},{key:"_bindLink",value:function(e,t){var n=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&n.linkService.navigateTo(t),!1},t&&(e.className="internalLink")}},{key:"_bindNamedAction",value:function(e,t){var n=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return n.linkService.executeNamedAction(t),!1},e.className="internalLink"}}]),n}(o),c=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,r)}return _createClass(n,[{key:"render",value:function(){this.container.className="textAnnotation";var e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,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(this.container,e,this.data),this.container.appendChild(e),this.container}}]),n}(o),l=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"render",value:function(){return this.container}}]),n}(o),u=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue;return t.call(this,e,r)}return _createClass(n,[{key:"render",value:function(){this.container.className="textWidgetAnnotation";var e=null;if(this.renderInteractiveForms){if(this.data.multiLine?(e=document.createElement("textarea")).textContent=this.data.fieldValue:((e=document.createElement("input")).type="text",e.setAttribute("value",this.data.fieldValue)),e.disabled=this.data.readOnly,null!==this.data.maxLen&&(e.maxLength=this.data.maxLen),this.data.comb){var t=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;e.classList.add("comb"),e.style.letterSpacing="calc(".concat(t,"px - 1ch)")}}else{(e=document.createElement("div")).textContent=this.data.fieldValue,e.style.verticalAlign="middle",e.style.display="table-cell";var n=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(n=this.page.commonObjs.get(this.data.fontRefName)),this._setTextStyle(e,n)}return null!==this.data.textAlignment&&(e.style.textAlign=["left","center","right"][this.data.textAlignment]),this.container.appendChild(e),this.container}},{key:"_setTextStyle",value:function(e,t){var n=e.style;if(n.fontSize="".concat(this.data.fontSize,"px"),n.direction=this.data.fontDirection<0?"rtl":"ltr",t){var r="normal";t.black?r="900":t.bold&&(r="bold"),n.fontWeight=r,n.fontStyle=t.italic?"italic":"normal";var a=t.loadedName?'"'.concat(t.loadedName,'", '):"",i=t.fallbackName||"Helvetica, sans-serif";n.fontFamily=a+i}}}]),n}(l),h=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,e.renderInteractiveForms)}return _createClass(n,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation checkBox";var e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="checkbox",this.data.fieldValue&&"Off"!==this.data.fieldValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}]),n}(l),d=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,e.renderInteractiveForms)}return _createClass(n,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation radioButton";var e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="radio",e.name=this.data.fieldName,this.data.fieldValue===this.data.buttonValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}]),n}(l),f=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"render",value:function(){var e=_get(_getPrototypeOf(n.prototype),"render",this).call(this);return e.className="buttonWidgetAnnotation pushButton",e}}]),n}(s),p=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,e.renderInteractiveForms)}return _createClass(n,[{key:"render",value:function(){this.container.className="choiceWidgetAnnotation";var e=document.createElement("select");e.disabled=this.data.readOnly,this.data.combo||(e.size=this.data.options.length,this.data.multiSelect&&(e.multiple=!0));var t,n=_createForOfIteratorHelper(this.data.options);try{for(n.s();!(t=n.n()).done;){var r=t.value,a=document.createElement("option");a.textContent=r.displayValue,a.value=r.exportValue,this.data.fieldValue.includes(r.displayValue)&&a.setAttribute("selected",!0),e.appendChild(a)}}catch(i){n.e(i)}finally{n.f()}return this.container.appendChild(e),this.container}}]),n}(l),g=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!(!e.data.title&&!e.data.contents);return t.call(this,e,r)}return _createClass(n,[{key:"render",value:function(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;var e='[data-annotation-id="'.concat(this.data.parentId,'"]'),t=this.layer.querySelector(e);if(!t)return this.container;var n=new v({container:this.container,trigger:t,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),r=parseFloat(t.style.left),a=parseFloat(t.style.width);return this.container.style.transformOrigin="-".concat(r+a,"px -").concat(t.style.top),this.container.style.left="".concat(r+a,"px"),this.container.appendChild(n.render()),this.container}}]),n}(o),v=function(){function e(t){_classCallCheck(this,e),this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.title=t.title,this.modificationDate=t.modificationDate,this.contents=t.contents,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}return _createClass(e,[{key:"render",value:function(){var e=document.createElement("div");e.className="popupWrapper",this.hideElement=this.hideWrapper?e:this.container,this.hideElement.setAttribute("hidden",!0);var t=document.createElement("div");t.className="popup";var n=this.color;if(n){var i=.7*(255-n[0])+n[0],o=.7*(255-n[1])+n[1],s=.7*(255-n[2])+n[2];t.style.backgroundColor=a.Util.makeCssRgb(0|i,0|o,0|s)}var c=document.createElement("h1");c.textContent=this.title,t.appendChild(c);var l=r.PDFDateString.toDateObject(this.modificationDate);if(l){var u=document.createElement("span");u.textContent="{{date}}, {{time}}",u.dataset.l10nId="annotation_date_string",u.dataset.l10nArgs=JSON.stringify({date:l.toLocaleDateString(),time:l.toLocaleTimeString()}),t.appendChild(u)}var h=this._formatContents(this.contents);return t.appendChild(h),this.trigger.addEventListener("click",this._toggle.bind(this)),this.trigger.addEventListener("mouseover",this._show.bind(this,!1)),this.trigger.addEventListener("mouseout",this._hide.bind(this,!1)),t.addEventListener("click",this._hide.bind(this,!0)),e.appendChild(t),e}},{key:"_formatContents",value:function(e){for(var t=document.createElement("p"),n=e.split(/(?:\r\n?|\n)/),r=0,a=n.length;r<a;++r){var i=n[r];t.appendChild(document.createTextNode(i)),r<a-1&&t.appendChild(document.createElement("br"))}return t}},{key:"_toggle",value:function(){this.pinned?this._hide(!0):this._show(!0)}},{key:"_show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}},{key:"_hide",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}]),e}(),m=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,r,!0)}return _createClass(n,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),n}(o),y=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,r,!0)}return _createClass(n,[{key:"render",value:function(){this.container.className="lineAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],n=e.rect[3]-e.rect[1],r=this.svgFactory.create(t,n),a=this.svgFactory.createElement("svg:line");return a.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),a.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),a.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),a.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),r.appendChild(a),this.container.append(r),this._createPopup(this.container,a,e),this.container}}]),n}(o),b=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,r,!0)}return _createClass(n,[{key:"render",value:function(){this.container.className="squareAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],n=e.rect[3]-e.rect[1],r=this.svgFactory.create(t,n),a=e.borderStyle.width,i=this.svgFactory.createElement("svg:rect");return i.setAttribute("x",a/2),i.setAttribute("y",a/2),i.setAttribute("width",t-a),i.setAttribute("height",n-a),i.setAttribute("stroke-width",a||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","none"),r.appendChild(i),this.container.append(r),this._createPopup(this.container,i,e),this.container}}]),n}(o),_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,r,!0)}return _createClass(n,[{key:"render",value:function(){this.container.className="circleAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],n=e.rect[3]-e.rect[1],r=this.svgFactory.create(t,n),a=e.borderStyle.width,i=this.svgFactory.createElement("svg:ellipse");return i.setAttribute("cx",t/2),i.setAttribute("cy",n/2),i.setAttribute("rx",t/2-a/2),i.setAttribute("ry",n/2-a/2),i.setAttribute("stroke-width",a||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","none"),r.appendChild(i),this.container.append(r),this._createPopup(this.container,i,e),this.container}}]),n}(o),k=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r;_classCallCheck(this,n);var a=!!(e.data.hasPopup||e.data.title||e.data.contents);return(r=t.call(this,e,a,!0)).containerClassName="polylineAnnotation",r.svgElementName="svg:polyline",r}return _createClass(n,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,n=t.rect[2]-t.rect[0],r=t.rect[3]-t.rect[1],a=this.svgFactory.create(n,r),i=[],o=_createForOfIteratorHelper(t.vertices);try{for(o.s();!(e=o.n()).done;){var s=e.value,c=s.x-t.rect[0],l=t.rect[3]-s.y;i.push(c+","+l)}}catch(h){o.e(h)}finally{o.f()}i=i.join(" ");var u=this.svgFactory.createElement(this.svgElementName);return u.setAttribute("points",i),u.setAttribute("stroke-width",t.borderStyle.width||1),u.setAttribute("stroke","transparent"),u.setAttribute("fill","none"),a.appendChild(u),this.container.append(a),this._createPopup(this.container,u,t),this.container}}]),n}(o),C=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r;return _classCallCheck(this,n),(r=t.call(this,e)).containerClassName="polygonAnnotation",r.svgElementName="svg:polygon",r}return n}(k),A=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,r,!0)}return _createClass(n,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),n}(o),x=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r;_classCallCheck(this,n);var a=!!(e.data.hasPopup||e.data.title||e.data.contents);return(r=t.call(this,e,a,!0)).containerClassName="inkAnnotation",r.svgElementName="svg:polyline",r}return _createClass(n,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,n=t.rect[2]-t.rect[0],r=t.rect[3]-t.rect[1],a=this.svgFactory.create(n,r),i=_createForOfIteratorHelper(t.inkLists);try{for(i.s();!(e=i.n()).done;){var o,s=e.value,c=[],l=_createForOfIteratorHelper(s);try{for(l.s();!(o=l.n()).done;){var u=o.value,h=u.x-t.rect[0],d=t.rect[3]-u.y;c.push("".concat(h,",").concat(d))}}catch(p){l.e(p)}finally{l.f()}c=c.join(" ");var f=this.svgFactory.createElement(this.svgElementName);f.setAttribute("points",c),f.setAttribute("stroke-width",t.borderStyle.width||1),f.setAttribute("stroke","transparent"),f.setAttribute("fill","none"),this._createPopup(this.container,f,t),a.appendChild(f)}}catch(p){i.e(p)}finally{i.f()}return this.container.append(a),this.container}}]),n}(o),E=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,r,!0)}return _createClass(n,[{key:"render",value:function(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),n}(o),w=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,r,!0)}return _createClass(n,[{key:"render",value:function(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),n}(o),S=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,r,!0)}return _createClass(n,[{key:"render",value:function(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),n}(o),P=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,r,!0)}return _createClass(n,[{key:"render",value:function(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),n}(o),R=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){_classCallCheck(this,n);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return t.call(this,e,r,!0)}return _createClass(n,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),n}(o),T=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;_classCallCheck(this,n);var o=(i=t.call(this,e,!0)).data.file,s=o.filename,c=o.content;return i.filename=(0,r.getFilenameFromUrl)(s),i.content=c,i.linkService.eventBus&&i.linkService.eventBus.dispatch("fileattachmentannotation",{source:_assertThisInitialized(i),id:(0,a.stringToPDFString)(s),filename:s,content:c}),i}return _createClass(n,[{key:"render",value:function(){this.container.className="fileAttachmentAnnotation";var e=document.createElement("div");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.addEventListener("dblclick",this._download.bind(this)),this.data.hasPopup||!this.data.title&&!this.data.contents||this._createPopup(this.container,e,this.data),this.container.appendChild(e),this.container}},{key:"_download",value:function(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,a.warn)("Download cannot be started due to unavailable download manager")}}]),n}(o),O=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"render",value:function(e){var t,n=[],o=[],s=_createForOfIteratorHelper(e.annotations);try{for(s.s();!(t=s.n()).done;){var c=t.value;c&&(c.annotationType!==a.AnnotationType.POPUP?n.push(c):o.push(c))}}catch(f){s.e(f)}finally{s.f()}o.length&&n.push.apply(n,o);for(var l=0,u=n;l<u.length;l++){var h=u[l],d=i.create({data:h,layer:e.div,page:e.page,viewport:e.viewport,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderInteractiveForms:e.renderInteractiveForms||!1,svgFactory:new r.DOMSVGFactory});d.isRenderable&&e.div.appendChild(d.render())}}},{key:"update",value:function(e){var t,n=_createForOfIteratorHelper(e.annotations);try{for(n.s();!(t=n.n()).done;){var r=t.value,a=e.div.querySelector('[data-annotation-id="'.concat(r.id,'"]'));a&&(a.style.transform="matrix(".concat(e.viewport.transform.join(","),")"))}}catch(i){n.e(i)}finally{n.f()}e.div.removeAttribute("hidden")}}]),e}();t.AnnotationLayer=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var r=n(1),a=n(4),i=n(7),o=function(){throw new Error("Not implemented: SVGGraphics")};t.SVGGraphics=o;var s=function(e){if(Number.isInteger(e))return e.toString();var t=e.toFixed(10),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)},c=function(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":"scale(".concat(s(e[0])," ").concat(s(e[3]),")");if(e[0]===e[3]&&e[1]===-e[2]){var t=180*Math.acos(e[0])/Math.PI;return"rotate(".concat(s(t),")")}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return"translate(".concat(s(e[4])," ").concat(s(e[5]),")");return"matrix(".concat(s(e[0])," ").concat(s(e[1])," ").concat(s(e[2])," ").concat(s(e[3])," ").concat(s(e[4])," ")+"".concat(s(e[5]),")")},l={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},u="http://www.w3.org/1999/xlink",h=["butt","round","square"],d=["miter","round","bevel"],f=function(){for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),t=new Int32Array(256),n=0;n<256;n++){for(var a=n,o=0;o<8;o++)a=1&a?3988292384^a>>1&2147483647:a>>1&2147483647;t[n]=a}function s(e,n,r,a){var i=a,o=n.length;r[i]=o>>24&255,r[i+1]=o>>16&255,r[i+2]=o>>8&255,r[i+3]=255&o,r[i+=4]=255&e.charCodeAt(0),r[i+1]=255&e.charCodeAt(1),r[i+2]=255&e.charCodeAt(2),r[i+3]=255&e.charCodeAt(3),i+=4,r.set(n,i);var s=function(e,n,r){for(var a=-1,i=n;i<r;i++){var o=255&(a^e[i]);a=a>>>8^t[o]}return-1^a}(r,a+4,i+=n.length);r[i]=s>>24&255,r[i+1]=s>>16&255,r[i+2]=s>>8&255,r[i+3]=255&s}function c(e){var t=e.length,n=Math.ceil(t/65535),r=new Uint8Array(2+t+5*n+4),a=0;r[a++]=120,r[a++]=156;for(var i=0;t>65535;)r[a++]=0,r[a++]=255,r[a++]=255,r[a++]=0,r[a++]=0,r.set(e.subarray(i,i+65535),a),a+=65535,i+=65535,t-=65535;r[a++]=1,r[a++]=255&t,r[a++]=t>>8&255,r[a++]=255&~t,r[a++]=(65535&~t)>>8&255,r.set(e.subarray(i),a),a+=e.length-i;var o=function(e,t,n){for(var r=1,a=0,i=t;i<n;++i)a=(a+(r=(r+(255&e[i]))%65521))%65521;return a<<16|r}(e,0,e.length);return r[a++]=o>>24&255,r[a++]=o>>16&255,r[a++]=o>>8&255,r[a++]=255&o,r}function l(t,n,a,o){var l,u,h,d=t.width,f=t.height,p=t.data;switch(n){case r.ImageKind.GRAYSCALE_1BPP:u=0,l=1,h=d+7>>3;break;case r.ImageKind.RGB_24BPP:u=2,l=8,h=3*d;break;case r.ImageKind.RGBA_32BPP:u=6,l=8,h=4*d;break;default:throw new Error("invalid format")}for(var g=new Uint8Array((1+h)*f),v=0,m=0,y=0;y<f;++y)g[v++]=0,g.set(p.subarray(m,m+h),v),m+=h,v+=h;if(n===r.ImageKind.GRAYSCALE_1BPP&&o){v=0;for(var b=0;b<f;b++){v++;for(var _=0;_<h;_++)g[v++]^=255}}var k=new Uint8Array([d>>24&255,d>>16&255,d>>8&255,255&d,f>>24&255,f>>16&255,f>>8&255,255&f,l,u,0,0,0]),C=function(e){if(!i.isNodeJS)return c(e);try{var t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);var n=__webpack_require__(372).deflateSync(t,{level:9});return n instanceof Uint8Array?n:new Uint8Array(n)}catch(a){(0,r.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+a)}return c(e)}(g),A=e.length+36+k.length+C.length,x=new Uint8Array(A),E=0;return x.set(e,E),s("IHDR",k,x,E+=e.length),s("IDATA",C,x,E+=12+k.length),E+=12+C.length,s("IEND",new Uint8Array(0),x,E),(0,r.createObjectURL)(x,"image/png",a)}return function(e,t,n){return l(e,void 0===e.kind?r.ImageKind.GRAYSCALE_1BPP:e.kind,t,n)}}(),p=function(){function e(){_classCallCheck(this,e),this.fontSizeScale=1,this.fontWeight=l.fontWeight,this.fontSize=0,this.textMatrix=r.IDENTITY_MATRIX,this.fontMatrix=r.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=r.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=l.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=""}return _createClass(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),g=0,v=0,m=0;t.SVGGraphics=o=function(){function e(t,n,i){for(var o in _classCallCheck(this,e),this.svgFactory=new a.DOMSVGFactory,this.current=new p,this.transformMatrix=r.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=t,this.objs=n,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!i,this._operatorIdMapping=[],r.OPS)this._operatorIdMapping[r.OPS[o]]=o}return _createClass(e,[{key:"save",value:function(){this.transformStack.push(this.transformMatrix);var e=this.current;this.extraStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}},{key:"group",value:function(e){this.save(),this.executeOpTree(e),this.restore()}},{key:"loadDependencies",value:function(e){for(var t=this,n=e.fnArray,a=e.argsArray,i=0,o=n.length;i<o;i++)if(n[i]===r.OPS.dependency){var s,c=_createForOfIteratorHelper(a[i]);try{var l=function(){var e=s.value,n=e.startsWith("g_")?t.commonObjs:t.objs,r=new Promise((function(t){n.get(e,t)}));t.current.dependencies.push(r)};for(c.s();!(s=c.n()).done;)l()}catch(u){c.e(u)}finally{c.f()}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function(e,t,n,a,i,o){var s=[e,t,n,a,i,o];this.transformMatrix=r.Util.transform(this.transformMatrix,s),this.tgrp=null}},{key:"getSVG",value:function(e,t){var n=this;this.viewport=t;var a=this._initialize(t);return this.loadDependencies(e).then((function(){return n.transformMatrix=r.IDENTITY_MATRIX,n.executeOpTree(n.convertOpList(e)),a}))}},{key:"convertOpList",value:function(e){for(var t=this._operatorIdMapping,n=e.argsArray,r=e.fnArray,a=[],i=0,o=r.length;i<o;i++){var s=r[i];a.push({fnId:s,fn:t[s],args:n[i]})}return function(e){var t,n=[],r=[],a=_createForOfIteratorHelper(e);try{for(a.s();!(t=a.n()).done;){var i=t.value;"save"!==i.fn?"restore"===i.fn?n=r.pop():n.push(i):(n.push({fnId:92,fn:"group",items:[]}),r.push(n),n=n[n.length-1].items)}}catch(o){a.e(o)}finally{a.f()}return n}(a)}},{key:"executeOpTree",value:function(e){var t,n=_createForOfIteratorHelper(e);try{for(n.s();!(t=n.n()).done;){var a=t.value,i=a.fn,o=a.fnId,s=a.args;switch(0|o){case r.OPS.beginText:this.beginText();break;case r.OPS.dependency:break;case r.OPS.setLeading:this.setLeading(s);break;case r.OPS.setLeadingMoveText:this.setLeadingMoveText(s[0],s[1]);break;case r.OPS.setFont:this.setFont(s);break;case r.OPS.showText:case r.OPS.showSpacedText:this.showText(s[0]);break;case r.OPS.endText:this.endText();break;case r.OPS.moveText:this.moveText(s[0],s[1]);break;case r.OPS.setCharSpacing:this.setCharSpacing(s[0]);break;case r.OPS.setWordSpacing:this.setWordSpacing(s[0]);break;case r.OPS.setHScale:this.setHScale(s[0]);break;case r.OPS.setTextMatrix:this.setTextMatrix(s[0],s[1],s[2],s[3],s[4],s[5]);break;case r.OPS.setTextRise:this.setTextRise(s[0]);break;case r.OPS.setTextRenderingMode:this.setTextRenderingMode(s[0]);break;case r.OPS.setLineWidth:this.setLineWidth(s[0]);break;case r.OPS.setLineJoin:this.setLineJoin(s[0]);break;case r.OPS.setLineCap:this.setLineCap(s[0]);break;case r.OPS.setMiterLimit:this.setMiterLimit(s[0]);break;case r.OPS.setFillRGBColor:this.setFillRGBColor(s[0],s[1],s[2]);break;case r.OPS.setStrokeRGBColor:this.setStrokeRGBColor(s[0],s[1],s[2]);break;case r.OPS.setStrokeColorN:this.setStrokeColorN(s);break;case r.OPS.setFillColorN:this.setFillColorN(s);break;case r.OPS.shadingFill:this.shadingFill(s[0]);break;case r.OPS.setDash:this.setDash(s[0],s[1]);break;case r.OPS.setRenderingIntent:this.setRenderingIntent(s[0]);break;case r.OPS.setFlatness:this.setFlatness(s[0]);break;case r.OPS.setGState:this.setGState(s[0]);break;case r.OPS.fill:this.fill();break;case r.OPS.eoFill:this.eoFill();break;case r.OPS.stroke:this.stroke();break;case r.OPS.fillStroke:this.fillStroke();break;case r.OPS.eoFillStroke:this.eoFillStroke();break;case r.OPS.clip:this.clip("nonzero");break;case r.OPS.eoClip:this.clip("evenodd");break;case r.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case r.OPS.paintJpegXObject:this.paintJpegXObject(s[0],s[1],s[2]);break;case r.OPS.paintImageXObject:this.paintImageXObject(s[0]);break;case r.OPS.paintInlineImageXObject:this.paintInlineImageXObject(s[0]);break;case r.OPS.paintImageMaskXObject:this.paintImageMaskXObject(s[0]);break;case r.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(s[0],s[1]);break;case r.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case r.OPS.closePath:this.closePath();break;case r.OPS.closeStroke:this.closeStroke();break;case r.OPS.closeFillStroke:this.closeFillStroke();break;case r.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case r.OPS.nextLine:this.nextLine();break;case r.OPS.transform:this.transform(s[0],s[1],s[2],s[3],s[4],s[5]);break;case r.OPS.constructPath:this.constructPath(s[0],s[1]);break;case r.OPS.endPath:this.endPath();break;case 92:this.group(a.items);break;default:(0,r.warn)("Unimplemented operator ".concat(i))}}}catch(c){n.e(c)}finally{n.f()}}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function(e,t,n,r,a,i){var o=this.current;o.textMatrix=o.lineMatrix=[e,t,n,r,a,i],o.textMatrixScale=Math.sqrt(e*e+t*t),o.x=o.lineX=0,o.y=o.lineY=0,o.xcoords=[],o.tspan=this.svgFactory.createElement("svg:tspan"),o.tspan.setAttributeNS(null,"font-family",o.fontFamily),o.tspan.setAttributeNS(null,"font-size","".concat(s(o.fontSize),"px")),o.tspan.setAttributeNS(null,"y",s(-o.y)),o.txtElement=this.svgFactory.createElement("svg:text"),o.txtElement.appendChild(o.tspan)}},{key:"beginText",value:function(){var e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=r.IDENTITY_MATRIX,e.lineMatrix=r.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[]}},{key:"moveText",value:function(e,t){var n=this.current;n.x=n.lineX+=e,n.y=n.lineY+=t,n.xcoords=[],n.tspan=this.svgFactory.createElement("svg:tspan"),n.tspan.setAttributeNS(null,"font-family",n.fontFamily),n.tspan.setAttributeNS(null,"font-size","".concat(s(n.fontSize),"px")),n.tspan.setAttributeNS(null,"y",s(-n.y))}},{key:"showText",value:function(e){var t=this.current,n=t.font,a=t.fontSize;if(0!==a){var i,o=t.charSpacing,u=t.wordSpacing,h=t.fontDirection,d=t.textHScale*h,f=n.vertical,p=a*t.fontMatrix[0],g=0,v=_createForOfIteratorHelper(e);try{for(v.s();!(i=v.n()).done;){var m=i.value;if(null!==m)if((0,r.isNum)(m))g+=-m*a*.001;else{var y=m.width,b=m.fontChar,_=y*p+((m.isSpace?u:0)+o)*h;m.isInFont||n.missingFile?(t.xcoords.push(t.x+g),t.tspan.textContent+=b,g+=_):g+=_}else g+=h*u}}catch(x){v.e(x)}finally{v.f()}f?t.y-=g*d:t.x+=g*d,t.tspan.setAttributeNS(null,"x",t.xcoords.map(s).join(" ")),t.tspan.setAttributeNS(null,"y",s(-t.y)),t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size","".concat(s(t.fontSize),"px")),t.fontStyle!==l.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==l.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);var k=t.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;if(k===r.TextRenderingMode.FILL||k===r.TextRenderingMode.FILL_STROKE?(t.fillColor!==l.fillColor&&t.tspan.setAttributeNS(null,"fill",t.fillColor),t.fillAlpha<1&&t.tspan.setAttributeNS(null,"fill-opacity",t.fillAlpha)):t.textRenderingMode===r.TextRenderingMode.ADD_TO_PATH?t.tspan.setAttributeNS(null,"fill","transparent"):t.tspan.setAttributeNS(null,"fill","none"),k===r.TextRenderingMode.STROKE||k===r.TextRenderingMode.FILL_STROKE){var C=1/(t.textMatrixScale||1);this._setStrokeAttributes(t.tspan,C)}var A=t.textMatrix;0!==t.textRise&&((A=A.slice())[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform","".concat(c(A)," scale(").concat(s(d),", -1)")),t.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.txtElement.appendChild(t.tspan),t.txtgrp.appendChild(t.txtElement),this._ensureTransformGroup().appendChild(t.txtElement)}}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"addFontStyle",value:function(e){this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var t=(0,r.createObjectURL)(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(e.loadedName,'";')+" src: url(".concat(t,"); }\n")}},{key:"setFont",value:function(e){var t=this.current,n=this.commonObjs.get(e[0]),a=e[1];t.font=n,this.embedFonts&&n.data&&!this.embeddedFonts[n.loadedName]&&(this.addFontStyle(n),this.embeddedFonts[n.loadedName]=n),t.fontMatrix=n.fontMatrix?n.fontMatrix:r.FONT_IDENTITY_MATRIX;var i="normal";n.black?i="900":n.bold&&(i="bold");var o=n.italic?"italic":"normal";a<0?(a=-a,t.fontDirection=-1):t.fontDirection=1,t.fontSize=a,t.fontFamily=n.loadedName,t.fontWeight=i,t.fontStyle=o,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",s(-t.y)),t.xcoords=[]}},{key:"endText",value:function(){var e=this.current;e.textRenderingMode&r.TextRenderingMode.ADD_TO_PATH_FLAG&&e.txtElement&&e.txtElement.hasChildNodes()&&(e.element=e.txtElement,this.clip("nonzero"),this.endPath())}},{key:"setLineWidth",value:function(e){e>0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=h[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=d[e]}},{key:"setMiterLimit",value:function(e){this.current.miterLimit=e}},{key:"setStrokeAlpha",value:function(e){this.current.strokeAlpha=e}},{key:"setStrokeRGBColor",value:function(e,t,n){this.current.strokeColor=r.Util.makeCssRgb(e,t,n)}},{key:"setFillAlpha",value:function(e){this.current.fillAlpha=e}},{key:"setFillRGBColor",value:function(e,t,n){this.current.fillColor=r.Util.makeCssRgb(e,t,n),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[]}},{key:"setStrokeColorN",value:function(e){this.current.strokeColor=this._makeColorN_Pattern(e)}},{key:"setFillColorN",value:function(e){this.current.fillColor=this._makeColorN_Pattern(e)}},{key:"shadingFill",value:function(e){var t=this.viewport.width,n=this.viewport.height,a=r.Util.inverseTransform(this.transformMatrix),i=r.Util.applyTransform([0,0],a),o=r.Util.applyTransform([0,n],a),s=r.Util.applyTransform([t,0],a),c=r.Util.applyTransform([t,n],a),l=Math.min(i[0],o[0],s[0],c[0]),u=Math.min(i[1],o[1],s[1],c[1]),h=Math.max(i[0],o[0],s[0],c[0]),d=Math.max(i[1],o[1],s[1],c[1]),f=this.svgFactory.createElement("svg:rect");f.setAttributeNS(null,"x",l),f.setAttributeNS(null,"y",u),f.setAttributeNS(null,"width",h-l),f.setAttributeNS(null,"height",d-u),f.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this._ensureTransformGroup().appendChild(f)}},{key:"_makeColorN_Pattern",value:function(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}},{key:"_makeTilingPattern",value:function(e){var t=e[1],n=e[2],a=e[3]||r.IDENTITY_MATRIX,i=_slicedToArray(e[4],4),o=i[0],s=i[1],c=i[2],l=i[3],u=e[5],h=e[6],d=e[7],f="shading".concat(m++),p=r.Util.applyTransform([o,s],a),g=_slicedToArray(p,2),v=g[0],y=g[1],b=r.Util.applyTransform([c,l],a),_=_slicedToArray(b,2),k=_[0],C=_[1],A=r.Util.singularValueDecompose2dScale(a),x=_slicedToArray(A,2),E=u*x[0],w=h*x[1],S=this.svgFactory.createElement("svg:pattern");S.setAttributeNS(null,"id",f),S.setAttributeNS(null,"patternUnits","userSpaceOnUse"),S.setAttributeNS(null,"width",E),S.setAttributeNS(null,"height",w),S.setAttributeNS(null,"x","".concat(v)),S.setAttributeNS(null,"y","".concat(y));var P=this.svg,R=this.transformMatrix,T=this.current.fillColor,O=this.current.strokeColor,L=this.svgFactory.create(k-v,C-y);if(this.svg=L,this.transformMatrix=a,2===d){var F,M=(F=r.Util).makeCssRgb.apply(F,_toConsumableArray(t));this.current.fillColor=M,this.current.strokeColor=M}return this.executeOpTree(this.convertOpList(n)),this.svg=P,this.transformMatrix=R,this.current.fillColor=T,this.current.strokeColor=O,S.appendChild(L.childNodes[0]),this.defs.appendChild(S),"url(#".concat(f,")")}},{key:"_makeShadingPattern",value:function(e){switch(e[0]){case"RadialAxial":var t,n="shading".concat(m++),a=e[3];switch(e[1]){case"axial":var i=e[4],o=e[5];(t=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",n),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",i[0]),t.setAttributeNS(null,"y1",i[1]),t.setAttributeNS(null,"x2",o[0]),t.setAttributeNS(null,"y2",o[1]);break;case"radial":var s=e[4],c=e[5],l=e[6],u=e[7];(t=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",n),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",c[0]),t.setAttributeNS(null,"cy",c[1]),t.setAttributeNS(null,"r",u),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",l);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var h,d=_createForOfIteratorHelper(a);try{for(d.s();!(h=d.n()).done;){var f=h.value,p=this.svgFactory.createElement("svg:stop");p.setAttributeNS(null,"offset",f[0]),p.setAttributeNS(null,"stop-color",f[1]),t.appendChild(p)}}catch(g){d.e(g)}finally{d.f()}return this.defs.appendChild(t),"url(#".concat(n,")");case"Mesh":return(0,r.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}},{key:"setDash",value:function(e,t){this.current.dashArray=e,this.current.dashPhase=t}},{key:"constructPath",value:function(e,t){var n,a=this.current,i=a.x,o=a.y,c=[],l=0,u=_createForOfIteratorHelper(e);try{for(u.s();!(n=u.n()).done;)switch(0|n.value){case r.OPS.rectangle:i=t[l++],o=t[l++];var h=t[l++],d=t[l++],f=i+h,p=o+d;c.push("M",s(i),s(o),"L",s(f),s(o),"L",s(f),s(p),"L",s(i),s(p),"Z");break;case r.OPS.moveTo:i=t[l++],o=t[l++],c.push("M",s(i),s(o));break;case r.OPS.lineTo:i=t[l++],o=t[l++],c.push("L",s(i),s(o));break;case r.OPS.curveTo:i=t[l+4],o=t[l+5],c.push("C",s(t[l]),s(t[l+1]),s(t[l+2]),s(t[l+3]),s(i),s(o)),l+=6;break;case r.OPS.curveTo2:c.push("C",s(i),s(o),s(t[l]),s(t[l+1]),s(t[l+2]),s(t[l+3])),i=t[l+2],o=t[l+3],l+=4;break;case r.OPS.curveTo3:i=t[l+2],o=t[l+3],c.push("C",s(t[l]),s(t[l+1]),s(i),s(o),s(i),s(o)),l+=4;break;case r.OPS.closePath:c.push("Z")}}catch(g){u.e(g)}finally{u.f()}c=c.join(" "),a.path&&e.length>0&&e[0]!==r.OPS.rectangle&&e[0]!==r.OPS.moveTo?c=a.path.getAttributeNS(null,"d")+c:(a.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(a.path)),a.path.setAttributeNS(null,"d",c),a.path.setAttributeNS(null,"fill","none"),a.element=a.path,a.setCurrentPoint(i,o)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(g++),n=this.svgFactory.createElement("svg:clipPath");n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"transform",c(this.transformMatrix));var r=e.element.cloneNode(!0);"evenodd"===this.pendingClip?r.setAttributeNS(null,"clip-rule","evenodd"):r.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,n.appendChild(r),this.defs.appendChild(n),e.activeClipUrl&&(e.clipGroup=null,this.extraStack.forEach((function(e){e.clipGroup=null})),n.setAttributeNS(null,"clip-path",e.activeClipUrl)),e.activeClipUrl="url(#".concat(t,")"),this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function(e){this.pendingClip=e}},{key:"closePath",value:function(){var e=this.current;if(e.path){var t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){var t,n=_createForOfIteratorHelper(e);try{for(n.s();!(t=n.n()).done;){var a=_slicedToArray(t.value,2),i=a[0],o=a[1];switch(i){case"LW":this.setLineWidth(o);break;case"LC":this.setLineCap(o);break;case"LJ":this.setLineJoin(o);break;case"ML":this.setMiterLimit(o);break;case"D":this.setDash(o[0],o[1]);break;case"RI":this.setRenderingIntent(o);break;case"FL":this.setFlatness(o);break;case"Font":this.setFont(o);break;case"CA":this.setStrokeAlpha(o);break;case"ca":this.setFillAlpha(o);break;default:(0,r.warn)("Unimplemented graphic state operator ".concat(i))}}}catch(s){n.e(s)}finally{n.f()}}},{key:"fill",value:function(){var e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}},{key:"stroke",value:function(){var e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.current,r=n.dashArray;1!==t&&r.length>0&&(r=r.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",n.strokeColor),e.setAttributeNS(null,"stroke-opacity",n.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",s(n.miterLimit)),e.setAttributeNS(null,"stroke-linecap",n.lineCap),e.setAttributeNS(null,"stroke-linejoin",n.lineJoin),e.setAttributeNS(null,"stroke-width",s(t*n.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",r.map(s).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",s(t*n.dashPhase)+"px")}},{key:"eoFill",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.closePath(),this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function(){var 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().appendChild(e)}},{key:"paintJpegXObject",value:function(e,t,n){var r=this.objs.get(e),a=this.svgFactory.createElement("svg:image");a.setAttributeNS(u,"xlink:href",r.src),a.setAttributeNS(null,"width",s(t)),a.setAttributeNS(null,"height",s(n)),a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y",s(-n)),a.setAttributeNS(null,"transform","scale(".concat(s(1/t)," ").concat(s(-1/n),")")),this._ensureTransformGroup().appendChild(a)}},{key:"paintImageXObject",value:function(e){var t=this.objs.get(e);t?this.paintInlineImageXObject(t):(0,r.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}},{key:"paintInlineImageXObject",value:function(e,t){var n=e.width,r=e.height,a=f(e,this.forceDataSchema,!!t),i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",s(n)),i.setAttributeNS(null,"height",s(r)),this.current.element=i,this.clip("nonzero");var o=this.svgFactory.createElement("svg:image");o.setAttributeNS(u,"xlink:href",a),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",s(-r)),o.setAttributeNS(null,"width",s(n)+"px"),o.setAttributeNS(null,"height",s(r)+"px"),o.setAttributeNS(null,"transform","scale(".concat(s(1/n)," ").concat(s(-1/r),")")),t?t.appendChild(o):this._ensureTransformGroup().appendChild(o)}},{key:"paintImageMaskXObject",value:function(e){var t=this.current,n=e.width,r=e.height,a=t.fillColor;t.maskId="mask".concat(v++);var i=this.svgFactory.createElement("svg:mask");i.setAttributeNS(null,"id",t.maskId);var o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",s(n)),o.setAttributeNS(null,"height",s(r)),o.setAttributeNS(null,"fill",a),o.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(i),this._ensureTransformGroup().appendChild(o),this.paintInlineImageXObject(e,i)}},{key:"paintFormXObjectBegin",value:function(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){var n=t[2]-t[0],r=t[3]-t[1],a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x",t[0]),a.setAttributeNS(null,"y",t[1]),a.setAttributeNS(null,"width",s(n)),a.setAttributeNS(null,"height",s(r)),this.current.element=a,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){}},{key:"_initialize",value:function(e){var t=this.svgFactory.create(e.width,e.height),n=this.svgFactory.createElement("svg:defs");t.appendChild(n),this.defs=n;var r=this.svgFactory.createElement("svg:g");return r.setAttributeNS(null,"transform",c(e.transform)),t.appendChild(r),this.svg=r,t}},{key:"_ensureClipGroup",value:function(){if(!this.current.clipGroup){var e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(e),this.current.clipGroup=e}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",c(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var r=n(1),a=n(20),i=__webpack_require__(373),o=__webpack_require__(374),s=__webpack_require__(375),c=__webpack_require__(376),l=/^file:\/\/\/[a-zA-Z]:\//,u=function(){function e(t){_classCallCheck(this,e),this.source=t,this.url=function(e){var t=c.parse(e);return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?c.parse("file:///".concat(e)):(t.host||(t.protocol="file:"),t)}(t.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return _createClass(e,[{key:"getFullReader",value:function(){return(0,r.assert)(!this._fullRequestReader),this._fullRequestReader=this.isFsUrl?new v(this):new p(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var n=this.isFsUrl?new m(this,e,t):new g(this,e,t);return this._rangeRequestReaders.push(n),n}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach((function(t){t.cancel(e)}))}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFNodeStream=u;var h=function(){function e(t){_classCallCheck(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;var n=t.source;this._contentLength=n.length,this._loaded=0,this._filename=null,this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._readableStream=null,this._readCapability=(0,r.createPromiseCapability)(),this._headersCapability=(0,r.createPromiseCapability)()}return _createClass(e,[{key:"read",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(){var t,n;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,r.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),n=new Uint8Array(t).buffer,e.abrupt("return",{value:n,done:!1});case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",(function(){t._readCapability.resolve()})),e.on("end",(function(){e.destroy(),t._done=!0,t._readCapability.resolve()})),e.on("error",(function(e){t._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new r.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}},{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}(),d=function(){function e(t){_classCallCheck(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,r.createPromiseCapability)();var n=t.source;this._isStreamingSupported=!n.disableStream}return _createClass(e,[{key:"read",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(){var t,n;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,r.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded}),n=new Uint8Array(t).buffer,e.abrupt("return",{value:n,done:!1});case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",(function(){t._readCapability.resolve()})),e.on("end",(function(){e.destroy(),t._done=!0,t._readCapability.resolve()})),e.on("error",(function(e){t._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}();function f(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}var p=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var i;_classCallCheck(this,n);var c=function(t){if(404===t.statusCode){var n=new r.MissingPDFException('Missing PDF "'.concat(i._url,'".'));return i._storedError=n,void i._headersCapability.reject(n)}i._headersCapability.resolve(),i._setReadableStream(t);var o=function(e){return i._readableStream.headers[e.toLowerCase()]},s=(0,a.validateRangeRequestCapabilities)({getResponseHeader:o,isHttp:e.isHttp,rangeChunkSize:i._rangeChunkSize,disableRange:i._disableRange}),c=s.allowRangeRequests,l=s.suggestedLength;i._isRangeSupported=c,i._contentLength=l||i._contentLength,i._filename=(0,a.extractFilenameFromHeader)(o)};return(i=t.call(this,e))._request=null,"http:"===i._url.protocol?i._request=o.request(f(i._url,e.httpHeaders),c):i._request=s.request(f(i._url,e.httpHeaders),c),i._request.on("error",(function(e){i._storedError=e,i._headersCapability.reject(e)})),i._request.end(),i}return n}(h),g=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,a,i){var c;for(var l in _classCallCheck(this,n),(c=t.call(this,e))._httpHeaders={},e.httpHeaders){var u=e.httpHeaders[l];"undefined"!==typeof u&&(c._httpHeaders[l]=u)}c._httpHeaders.Range="bytes=".concat(a,"-").concat(i-1);var h=function(e){if(404!==e.statusCode)c._setReadableStream(e);else{var t=new r.MissingPDFException('Missing PDF "'.concat(c._url,'".'));c._storedError=t}};return c._request=null,"http:"===c._url.protocol?c._request=o.request(f(c._url,c._httpHeaders),h):c._request=s.request(f(c._url,c._httpHeaders),h),c._request.on("error",(function(e){c._storedError=e})),c._request.end(),c}return n}(d),v=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var a;_classCallCheck(this,n),a=t.call(this,e);var o=decodeURIComponent(a._url.path);return l.test(a._url.href)&&(o=o.replace(/^\//,"")),i.lstat(o,(function(e,t){if(e)return"ENOENT"===e.code&&(e=new r.MissingPDFException('Missing PDF "'.concat(o,'".'))),a._storedError=e,void a._headersCapability.reject(e);a._contentLength=t.size,a._setReadableStream(i.createReadStream(o)),a._headersCapability.resolve()})),a}return n}(h),m=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r,a){var o;_classCallCheck(this,n),o=t.call(this,e);var s=decodeURIComponent(o._url.path);return l.test(o._url.href)&&(s=s.replace(/^\//,"")),o._setReadableStream(i.createReadStream(s,{start:r,end:a-1})),o}return n}(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new r.MissingPDFException('Missing PDF "'+t+'".'):new r.UnexpectedResponseException("Unexpected server response ("+e+') while retrieving PDF "'+t+'".',e)},t.extractFilenameFromHeader=function(e){var t=e("Content-Disposition");if(t){var n=(0,a.getFilenameFromContentDispositionHeader)(t);if(n.includes("%"))try{n=decodeURIComponent(n)}catch(r){}if(/\.pdf$/i.test(n))return n}return null},t.validateRangeRequestCapabilities=function(e){var t=e.getResponseHeader,n=e.isHttp,a=e.rangeChunkSize,i=e.disableRange;(0,r.assert)(a>0,"Range chunk size must be larger than zero");var o={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10);return Number.isInteger(s)?(o.suggestedLength=s,s<=2*a||i||!n||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(o.allowRangeRequests=!0),o):o},t.validateResponseStatus=function(e){return 200===e||206===e};var r=n(1),a=n(21)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){var t=!0,n=i("filename\\*","i").exec(e);if(n){var r=c(n=n[1]);return s(r=u(r=l(r=unescape(r))))}if(n=function(e){for(var t,n=[],r=i("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(t=r.exec(e));){var a=_slicedToArray(t,4),o=a[1],s=a[2],u=a[3];if((o=parseInt(o,10))in n){if(0===o)break}else n[o]=[s,u]}for(var h=[],d=0;d<n.length&&d in n;++d){var f=_slicedToArray(n[d],2),p=f[0],g=f[1];g=c(g),p&&(g=unescape(g),0===d&&(g=l(g))),h.push(g)}return h.join("")}(e))return s(u(n));if(n=i("filename","i").exec(e)){var a=c(n=n[1]);return s(a=u(a))}function i(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function o(e,n){if(e){if(!/^[\x00-\xFF]+$/.test(n))return n;try{var r=new TextDecoder(e,{fatal:!0}),a=Array.from(n,(function(e){return 255&e.charCodeAt(0)}));n=r.decode(new Uint8Array(a)),t=!1}catch(i){if(/^utf-?8$/i.test(e))try{n=decodeURIComponent(escape(n)),t=!1}catch(o){}}}return n}function s(e){return t&&/[\x80-\xff]/.test(e)&&(e=o("utf-8",e),t&&(e=o("iso-8859-1",e))),e}function c(e){if(e.startsWith('"')){for(var t=e.slice(1).split('\\"'),n=0;n<t.length;++n){var r=t[n].indexOf('"');-1!==r&&(t[n]=t[n].slice(0,r),t.length=n+1),t[n]=t[n].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function l(e){var t=e.indexOf("'");return-1===t?e:o(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function u(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,n,r){if("q"===n||"Q"===n)return o(t,r=(r=r.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})));try{r=atob(r)}catch(a){}return o(t,r)}))}return""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var r=n(1),a=n(20),i=function(){function e(t,n){_classCallCheck(this,e),this.url=t,n=n||{},this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&n.httpHeaders||{},this.withCredentials=n.withCredentials||!1,this.getXhr=n.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}return _createClass(e,[{key:"requestRange",value:function(e,t,n){var r={begin:e,end:t};for(var a in n)r[a]=n[a];return this.request(r)}},{key:"requestFull",value:function(e){return this.request(e)}},{key:"request",value:function(e){var t=this.getXhr(),n=this.currXhrId++,r=this.pendingRequests[n]={xhr:t};for(var a in t.open("GET",this.url),t.withCredentials=this.withCredentials,this.httpHeaders){var i=this.httpHeaders[a];"undefined"!==typeof i&&t.setRequestHeader(a,i)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range","bytes=".concat(e.begin,"-").concat(e.end-1)),r.expectedStatus=206):r.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),r.onHeadersReceived=e.onHeadersReceived,r.onDone=e.onDone,r.onError=e.onError,r.onProgress=e.onProgress,t.send(null),n}},{key:"onProgress",value:function(e,t){var n=this.pendingRequests[e];n&&n.onProgress&&n.onProgress(t)}},{key:"onStateChange",value:function(e,t){var n=this.pendingRequests[e];if(n){var a=n.xhr;if(a.readyState>=2&&n.onHeadersReceived&&(n.onHeadersReceived(),delete n.onHeadersReceived),4===a.readyState&&e in this.pendingRequests)if(delete this.pendingRequests[e],0===a.status&&this.isHttp)n.onError&&n.onError(a.status);else{var i=a.status||200;if(200===i&&206===n.expectedStatus||i===n.expectedStatus){var o=function(e){var t=e.response;return"string"!==typeof t?t:(0,r.stringToBytes)(t).buffer}(a);if(206===i){var s=a.getResponseHeader("Content-Range"),c=/bytes (\d+)-(\d+)\/(\d+)/.exec(s);n.onDone({begin:parseInt(c[1],10),chunk:o})}else o?n.onDone({begin:0,chunk:o}):n.onError&&n.onError(a.status)}else n.onError&&n.onError(a.status)}}}},{key:"hasPendingRequests",value:function(){for(var e in this.pendingRequests)return!0;return!1}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{key:"abortAllRequests",value:function(){for(var e in this.pendingRequests)this.abortRequest(0|e)}},{key:"abortRequest",value:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}]),e}(),o=function(){function e(t){_classCallCheck(this,e),this._source=t,this._manager=new i(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return _createClass(e,[{key:"_onRangeRequestReaderClosed",value:function(e){var t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}},{key:"getFullReader",value:function(){return(0,r.assert)(!this._fullRequestReader),this._fullRequestReader=new s(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var n=new c(this._manager,e,t);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach((function(t){t.cancel(e)}))}}]),e}();t.PDFNetworkStream=o;var s=function(){function e(t,n){_classCallCheck(this,e),this._manager=t;var a={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=n.url,this._fullRequestId=t.requestFull(a),this._headersReceivedCapability=(0,r.createPromiseCapability)(),this._disableRange=n.disableRange||!1,this._contentLength=n.length,this._rangeChunkSize=n.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}return _createClass(e,[{key:"_onHeadersReceived",value:function(){var e=this._fullRequestId,t=this._manager.getRequestXhr(e),n=function(e){return t.getResponseHeader(e)},r=(0,a.validateRangeRequestCapabilities)({getResponseHeader:n,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),i=r.allowRangeRequests,o=r.suggestedLength;i&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(n),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){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||(this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[])}},{key:"_onError",value:function(e){var t=this._url,n=(0,a.createResponseStatusError)(e,t);this._storedError=n,this._headersReceivedCapability.reject(n),this._requests.forEach((function(e){e.reject(n)})),this._requests=[],this._cachedChunks=[]}},{key:"_onProgress",value:function(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}},{key:"read",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(){var t,n;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){e.next=5;break}return t=this._cachedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 5:if(!this._done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return n=(0,r.createPromiseCapability)(),this._requests.push(n),e.abrupt("return",n.promise);case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0,this._headersReceivedCapability.reject(e),this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersReceivedCapability.promise}}]),e}(),c=function(){function e(t,n,r){_classCallCheck(this,e),this._manager=t;var a={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=t.requestRange(n,r,a),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}return _createClass(e,[{key:"_close",value:function(){this.onClosed&&this.onClosed(this)}},{key:"_onDone",value:function(e){var t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._close()}},{key:"_onProgress",value:function(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}},{key:"read",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(){var t,n;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return n=(0,r.createPromiseCapability)(),this._requests.push(n),e.abrupt("return",n.promise);case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}},{key:"isStreamingSupported",get:function(){return!1}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var r=n(1),a=n(20);function i(e,t,n){return{method:"GET",headers:e,signal:n&&n.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function o(e){var t=new Headers;for(var n in e){var r=e[n];"undefined"!==typeof r&&t.append(n,r)}return t}var s=function(){function e(t){_classCallCheck(this,e),this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return _createClass(e,[{key:"getFullReader",value:function(){return(0,r.assert)(!this._fullRequestReader),this._fullRequestReader=new c(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var n=new l(this,e,t);return this._rangeRequestReaders.push(n),n}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach((function(t){t.cancel(e)}))}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFFetchStream=s;var c=function(){function e(t){var n=this;_classCallCheck(this,e),this._stream=t,this._reader=null,this._loaded=0,this._filename=null;var s=t.source;this._withCredentials=s.withCredentials||!1,this._contentLength=s.length,this._headersCapability=(0,r.createPromiseCapability)(),this._disableRange=s.disableRange||!1,this._rangeChunkSize=s.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!==typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!s.disableStream,this._isRangeSupported=!s.disableRange,this._headers=o(this._stream.httpHeaders);var c=s.url;fetch(c,i(this._headers,this._withCredentials,this._abortController)).then((function(e){if(!(0,a.validateResponseStatus)(e.status))throw(0,a.createResponseStatusError)(e.status,c);n._reader=e.body.getReader(),n._headersCapability.resolve();var t=function(t){return e.headers.get(t)},i=(0,a.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:n._stream.isHttp,rangeChunkSize:n._rangeChunkSize,disableRange:n._disableRange}),o=i.allowRangeRequests,s=i.suggestedLength;n._isRangeSupported=o,n._contentLength=s||n._contentLength,n._filename=(0,a.extractFilenameFromHeader)(t),!n._isStreamingSupported&&n._isRangeSupported&&n.cancel(new r.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}return _createClass(e,[{key:"read",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(){var t,n,r,a;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._headersCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,n=t.value,!(r=t.done)){e.next=9;break}return e.abrupt("return",{value:n,done:r});case 9:return this._loaded+=n.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),a=new Uint8Array(n).buffer,e.abrupt("return",{value:a,done:!1});case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}},{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}(),l=function(){function e(t,n,s){var c=this;_classCallCheck(this,e),this._stream=t,this._reader=null,this._loaded=0;var l=t.source;this._withCredentials=l.withCredentials||!1,this._readCapability=(0,r.createPromiseCapability)(),this._isStreamingSupported=!l.disableStream,"undefined"!==typeof AbortController&&(this._abortController=new AbortController),this._headers=o(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(n,"-").concat(s-1));var u=l.url;fetch(u,i(this._headers,this._withCredentials,this._abortController)).then((function(e){if(!(0,a.validateResponseStatus)(e.status))throw(0,a.createResponseStatusError)(e.status,u);c._readCapability.resolve(),c._reader=e.body.getReader()})),this.onProgress=null}return _createClass(e,[{key:"read",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark((function e(){var t,n,r,a;return _regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,n=t.value,!(r=t.done)){e.next=9;break}return e.abrupt("return",{value:n,done:r});case 9:return this._loaded+=n.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),a=new Uint8Array(n).buffer,e.abrupt("return",{value:a,done:!1});case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}()}])},module.exports=factory()}).call(this,__webpack_require__(351),__webpack_require__(352).Buffer)},256:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(){return!t&&n.apply(void 0,arguments)})).catch((function(e){return!t&&r(e)}))})),cancel:function(){t=!0}}}},260:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.focusEvents=t.keyboardEvents=t.touchEvents=t.mouseEvents=void 0;var r=["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"];t.mouseEvents=r;var a=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"];t.touchEvents=a;var i=["onKeyDown","onKeyPress","onKeyUp"];t.keyboardEvents=i;var o=["onFocus","onBlur"];t.focusEvents=o;var s=function(e,t){var n={};return[].concat(r,a,i,o).forEach((function(r){e[r]&&(n[r]=function(n){return t?e[r](n,t(r)):e[r](n)})})),n};t.default=s},264:function(e,t,n){"use strict";var r=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(0)),i=(0,r(n(246)).default)(a.default.createElement("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");t.default=i},265:function(e,t,n){"use strict";var r=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(0)),i=(0,r(n(246)).default)(a.default.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");t.default=i},267:function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},268:function(e,t,n){var r=n(299);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},269:function(e,t){function n(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,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},270:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},271:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n.d(t,"a",(function(){return r}))},284:function(e,t,n){"use strict";var r=n(1),a=n(2),i=n(12),o=n(0),s=(n(5),n(3)),c=n(6),l=n(8),u=o.forwardRef((function(e,t){var n=e.classes,i=e.className,c=e.component,u=void 0===c?"div":c,h=e.disableGutters,d=void 0!==h&&h,f=e.fixed,p=void 0!==f&&f,g=e.maxWidth,v=void 0===g?"lg":g,m=Object(a.a)(e,["classes","className","component","disableGutters","fixed","maxWidth"]);return o.createElement(u,Object(r.a)({className:Object(s.a)(n.root,i,p&&n.fixed,d&&n.disableGutters,!1!==v&&n["maxWidth".concat(Object(l.a)(String(v)))]),ref:t},m))}));t.a=Object(c.a)((function(e){return{root:Object(i.a)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),display:"block"},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),disableGutters:{paddingLeft:0,paddingRight:0},fixed:Object.keys(e.breakpoints.values).reduce((function(t,n){var r=e.breakpoints.values[n];return 0!==r&&(t[e.breakpoints.up(n)]={maxWidth:r}),t}),{}),maxWidthXs:Object(i.a)({},e.breakpoints.up("xs"),{maxWidth:Math.max(e.breakpoints.values.xs,444)}),maxWidthSm:Object(i.a)({},e.breakpoints.up("sm"),{maxWidth:e.breakpoints.values.sm}),maxWidthMd:Object(i.a)({},e.breakpoints.up("md"),{maxWidth:e.breakpoints.values.md}),maxWidthLg:Object(i.a)({},e.breakpoints.up("lg"),{maxWidth:e.breakpoints.values.lg}),maxWidthXl:Object(i.a)({},e.breakpoints.up("xl"),{maxWidth:e.breakpoints.values.xl})}}),{name:"MuiContainer"})(u)},286:function(e,t,n){"use strict";var r=n(0),a=n.n(r),i=n(236);t.a=Object(i.a)(a.a.createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}),"Image")},287:function(e,t,n){"use strict";var r=n(0),a=n.n(r),i=n(236);t.a=Object(i.a)(a.a.createElement("path",{d:"M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"}),"Movie")},288:function(e,t,n){"use strict";var r=n(0),a=n.n(r),i=n(236);t.a=Object(i.a)(a.a.createElement("path",{d:"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"}),"Code")},289:function(e,t,n){"use strict";var r=n(0),a=n.n(r),i=n(236);t.a=Object(i.a)(a.a.createElement("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"}),"InsertDriveFile")},290:function(e,t,n){"use strict";var r=n(0),a=n.n(r),i=n(236);t.a=Object(i.a)(a.a.createElement("path",{d:"M14 17H4v2h10v-2zm6-8H4v2h16V9zM4 15h16v-2H4v2zM4 5v2h16V5H4z"}),"Subject")},291:function(e,t,n){"use strict";var r=n(0),a=n.n(r),i=n(236);t.a=Object(i.a)(a.a.createElement("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"}),"PictureAsPdf")},292:function(e,t,n){"use strict";var r=n(0),a=n.n(r),i=n(236);t.a=Object(i.a)(a.a.createElement("path",{d:"M21 5v6.59l-3-3.01-4 4.01-4-4-4 4-3-3.01V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2zm-3 6.42l3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l3 2.99 4-4 4 4 4-3.99z"}),"BrokenImage")},297:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},298:function(e,t,n){var r=n(358),a=n(359),i=n(268),o=n(360);e.exports=function(e,t){return r(e)||a(e,t)||i(e,t)||o()}},299:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},300:function(e,t){function n(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(a,i){var o=e.apply(t,r);function s(e){n(o,a,i,s,c,"next",e)}function c(e){n(o,a,i,s,c,"throw",e)}s(void 0)}))}}},301:function(e,t,n){"use strict";var r=n(270),a=n(269),i=n(298),o=n(238),s=n(300);Object.defineProperty(t,"__esModule",{value:!0}),t.isValidRotation=function(e){return Number.isInteger(e)&&e%90===0},t.isValidScrollMode=function(e){return Number.isInteger(e)&&Object.values(c).includes(e)&&e!==c.UNKNOWN},t.isValidSpreadMode=function(e){return Number.isInteger(e)&&Object.values(l).includes(e)&&e!==l.UNKNOWN},t.isPortraitOrientation=function(e){return e.width<=e.height},t.getGlobalEventBus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];console.error("getGlobalEventBus is deprecated, use a manually created EventBus instance instead."),b||(b=new y({dispatchToDOM:e}));return b},t.clamp=_,t.getPDFFileNameFromURL=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!==typeof e)return t;if(p(e))return console.warn('getPDFFileNameFromURL: ignoring "data:" URL for performance reasons.'),t;var n=/^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,r=/[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i,a=n.exec(e),i=r.exec(a[1])||r.exec(a[2])||r.exec(a[3]);if(i&&(i=i[0]).includes("%"))try{i=r.exec(decodeURIComponent(i))[0]}catch(o){}return i||t},t.noContextMenuHandler=function(e){e.preventDefault()},t.parseQueryString=function(e){for(var t=e.split("&"),n=Object.create(null),r=0,a=t.length;r<a;++r){var i=t[r].split("="),o=i[0].toLowerCase(),s=i.length>1?i[1]:null;n[decodeURIComponent(o)]=decodeURIComponent(s)}return n},t.backtrackBeforeAllVisibleElements=f,t.getVisibleElements=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=e.scrollTop,i=a+e.clientHeight,o=e.scrollLeft,s=o+e.clientWidth;function c(e){var t=e.div;return t.offsetTop+t.clientTop+t.clientHeight>a}function l(e){var t=e.div;return t.offsetLeft+t.clientLeft+t.clientWidth>o}var u=[],h=t.length,p=0===h?0:d(t,r?l:c);p>0&&p<h&&!r&&(p=f(p,t,a));for(var g=r?s:-1,v=p;v<h;v++){var m=t[v],y=m.div,b=y.offsetLeft+y.clientLeft,_=y.offsetTop+y.clientTop,k=y.clientWidth,C=y.clientHeight,A=b+k,x=_+C;if(-1===g)x>=i&&(g=x);else if((r?b:_)>g)break;if(!(x<=a||_>=i||A<=o||b>=s)){var E=Math.max(0,a-_)+Math.max(0,x-i),w=Math.max(0,o-b)+Math.max(0,A-s),S=(C-E)*(k-w)*100/C/k|0;u.push({id:m.id,x:b,y:_,view:m,percent:S})}}var P=u[0],R=u[u.length-1];n&&u.sort((function(e,t){var n=e.percent-t.percent;return Math.abs(n)>.001?-n:e.id-t.id}));return{first:P,last:R,views:u}},t.roundToDivide=function(e,t){var n=e%t;return 0===n?e:Math.round(e-n+t)},t.getPageSizeInches=function(e){var t=e.view,n=e.userUnit,r=e.rotate,a=i(t,4),o=a[0],s=a[1],c=a[2],l=a[3],u=r%180!==0,h=(c-o)/72*n,d=(l-s)/72*n;return{width:u?d:h,height:u?h:d}},t.approximateFraction=function(e){if(Math.floor(e)===e)return[e,1];var t=1/e;if(t>8)return[1,8];if(Math.floor(t)===t)return[1,t];var n,r=e>1?t:e,a=0,i=1,o=1,s=1;for(;;){var c=a+o,l=i+s;if(l>8)break;r<=c/l?(o=c,s=l):(a=c,i=l)}n=r-a/i<o/s-r?r===e?[a,i]:[i,a]:r===e?[o,s]:[s,o];return n},t.getOutputScale=function(e){var t=window.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1,r=t/n;return{sx:r,sy:r,scaled:1!==r}},t.scrollIntoView=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.offsetParent;if(!r)return void console.error("offsetParent is not set -- cannot scroll");var a=e.offsetTop+e.clientTop,i=e.offsetLeft+e.clientLeft;for(;r.clientHeight===r.scrollHeight&&r.clientWidth===r.scrollWidth||n&&"hidden"===getComputedStyle(r).overflow;)if(r.dataset._scaleY&&(a/=r.dataset._scaleY,i/=r.dataset._scaleX),a+=r.offsetTop,i+=r.offsetLeft,!(r=r.offsetParent))return;t&&(void 0!==t.top&&(a+=t.top),void 0!==t.left&&(i+=t.left,r.scrollLeft=i));r.scrollTop=a},t.watchScroll=function(e,t){var n=function(n){a||(a=window.requestAnimationFrame((function(){a=null;var n=e.scrollLeft,i=r.lastX;n!==i&&(r.right=n>i),r.lastX=n;var o=e.scrollTop,s=r.lastY;o!==s&&(r.down=o>s),r.lastY=o,t(r)})))},r={right:!0,down:!0,lastX:e.scrollLeft,lastY:e.scrollTop,_eventHandler:n},a=null;return e.addEventListener("scroll",n,!0),r},t.binarySearchFirstItem=d,t.normalizeWheelEventDelta=function(e){var t=Math.sqrt(e.deltaX*e.deltaX+e.deltaY*e.deltaY),n=Math.atan2(e.deltaY,e.deltaX);-.25*Math.PI<n&&n<.75*Math.PI&&(t=-t);0===e.deltaMode?t/=900:1===e.deltaMode&&(t/=30);return t},t.waitOnEventOrTimeout=function(e){var t=e.target,n=e.name,r=e.delay,a=void 0===r?0:r;return new Promise((function(e,r){if("object"!==typeof t||!n||"string"!==typeof n||!(Number.isInteger(a)&&a>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function i(r){t instanceof y?t._off(n,o):t.removeEventListener(n,o),c&&clearTimeout(c),e(r)}var o=i.bind(null,g.EVENT);t instanceof y?t._on(n,o):t.addEventListener(n,o);var s=i.bind(null,g.TIMEOUT),c=setTimeout(s,a)}))},t.moveToEndOfArray=function(e,t){for(var n=[],r=e.length,a=0,i=0;i<r;++i)t(e[i])?n.push(e[i]):(e[a]=e[i],++a);for(var o=0;a<r;++o,++a)e[a]=n[o]},t.WaitOnType=t.animationStarted=t.ProgressBar=t.EventBus=t.NullL10n=t.SpreadMode=t.ScrollMode=t.TextLayerMode=t.RendererType=t.PresentationModeState=t.VERTICAL_PADDING=t.SCROLLBAR_PADDING=t.MAX_AUTO_SCALE=t.UNKNOWN_SCALE=t.MAX_SCALE=t.MIN_SCALE=t.DEFAULT_SCALE=t.DEFAULT_SCALE_VALUE=t.CSS_UNITS=t.AutoPrintRegExp=void 0;t.CSS_UNITS=96/72;t.DEFAULT_SCALE_VALUE="auto";t.DEFAULT_SCALE=1;t.MIN_SCALE=.1;t.MAX_SCALE=10;t.UNKNOWN_SCALE=0;t.MAX_AUTO_SCALE=1.25;t.SCROLLBAR_PADDING=40;t.VERTICAL_PADDING=5;t.PresentationModeState={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};t.RendererType={CANVAS:"canvas",SVG:"svg"};t.TextLayerMode={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2};var c={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2};t.ScrollMode=c;var l={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};t.SpreadMode=l;function u(e,t){return t?e.replace(/\{\{\s*(\w+)\s*\}\}/g,(function(e,n){return n in t?t[n]:"{{"+n+"}}"})):e}t.AutoPrintRegExp=/\bprint\s*\(/;var h={getLanguage:function(){return s(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return","en-us");case 1:case"end":return e.stop()}}),e)})))()},getDirection:function(){return s(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return","ltr");case 1:case"end":return e.stop()}}),e)})))()},get:function(e,t,n){return s(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u(n,t));case 1:case"end":return e.stop()}}),e)})))()},translate:function(e){return s(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()}};function d(e,t){var n=0,r=e.length-1;if(0===e.length||!t(e[r]))return e.length;if(t(e[n]))return n;for(;n<r;){var a=n+r>>1;t(e[a])?r=a:n=a+1}return n}function f(e,t,n){if(e<2)return e;var r=t[e].div,a=r.offsetTop+r.clientTop;a>=n&&(a=(r=t[e-1].div).offsetTop+r.clientTop);for(var i=e-2;i>=0&&!((r=t[i].div).offsetTop+r.clientTop+r.clientHeight<=a);--i)e=i;return e}function p(e){for(var t=0,n=e.length;t<n&&""===e[t].trim();)t++;return"data:"===e.substring(t,t+5).toLowerCase()}t.NullL10n=h;var g={EVENT:"event",TIMEOUT:"timeout"};t.WaitOnType=g;var v=new Promise((function(e){window.requestAnimationFrame(e)}));function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object.create(null);if(t&&t.length>0){var r=t[0];for(var a in r){var i=r[a];if("source"!==a)n[a]=i;else if(i===window||i===document)return}}var o=document.createEvent("CustomEvent");o.initCustomEvent(e,!0,!0,n),document.dispatchEvent(o)}t.animationStarted=v;var y=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.dispatchToDOM,a=void 0!==n&&n;r(this,e),this._listeners=Object.create(null),this._dispatchToDOM=!0===a,a&&console.error("The `eventBusDispatchToDOM` option/preference is deprecated, add event listeners to the EventBus instance rather than the DOM.")}return a(e,[{key:"on",value:function(e,t){this._on(e,t,{external:!0})}},{key:"off",value:function(e,t){this._off(e,t,{external:!0})}},{key:"dispatch",value:function(e){var t=this._listeners[e];if(t&&0!==t.length){var n,r=Array.prototype.slice.call(arguments,1);t.slice(0).forEach((function(e){var t=e.listener;if(e.external)return n||(n=[]),void n.push(t);t.apply(null,r)})),n&&(n.forEach((function(e){e.apply(null,r)})),n=null),this._dispatchToDOM&&m(e,r)}else if(this._dispatchToDOM){var a=Array.prototype.slice.call(arguments,1);m(e,a)}}},{key:"_on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this._listeners[e];r||(this._listeners[e]=r=[]),r.push({listener:t,external:!0===(n&&n.external)})}},{key:"_off",value:function(e,t){var n=this._listeners[e];if(n)for(var r=0,a=n.length;r<a;r++)if(n[r].listener===t)return void n.splice(r,1)}}]),e}();t.EventBus=y;var b=null;function _(e,t,n){return Math.min(Math.max(e,t),n)}var k=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.height,i=n.width,o=n.units;r(this,e),this.visible=!0,this.div=document.querySelector(t+" .progress"),this.bar=this.div.parentNode,this.height=a||100,this.width=i||100,this.units=o||"%",this.div.style.height=this.height+this.units,this.percent=0}return a(e,[{key:"_updateBar",value:function(){if(this._indeterminate)return this.div.classList.add("indeterminate"),void(this.div.style.width=this.width+this.units);this.div.classList.remove("indeterminate");var e=this.width*this._percent/100;this.div.style.width=e+this.units}},{key:"setWidth",value:function(e){if(e){var t=e.parentNode.offsetWidth-e.offsetWidth;t>0&&(this.bar.style.width="calc(100% - ".concat(t,"px)"))}}},{key:"hide",value:function(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"),document.body.classList.remove("loadingInProgress"))}},{key:"show",value:function(){this.visible||(this.visible=!0,document.body.classList.add("loadingInProgress"),this.bar.classList.remove("hidden"))}},{key:"percent",get:function(){return this._percent},set:function(e){this._indeterminate=isNaN(e),this._percent=_(e,0,100),this._updateBar()}}]),e}();t.ProgressBar=k},302:function(e,t,n){"use strict";var r=n(1),a=n(2),i=n(12),o=n(0),s=(n(5),n(3)),c=n(6),l=o.forwardRef((function(e,t){var n=e.classes,i=e.className,c=e.component,l=void 0===c?"div":c,u=e.disableGutters,h=void 0!==u&&u,d=e.variant,f=void 0===d?"regular":d,p=Object(a.a)(e,["classes","className","component","disableGutters","variant"]);return o.createElement(l,Object(r.a)({className:Object(s.a)(n.root,n[f],i,!h&&n.gutters),ref:t},p))}));t.a=Object(c.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Object(i.a)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(l)},303:function(e,t,n){"use strict";var r=n(0),a=n.n(r),i=n(236);t.a=Object(i.a)(a.a.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert")},346:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),a=n(2),i=n(0);function o(e,t){var n=t.disableHysteresis,r=void 0!==n&&n,a=t.threshold,i=void 0===a?100:a,o=t.target,s=e.current;return o&&(e.current=void 0!==o.pageYOffset?o.pageYOffset:o.scrollTop),!(!r&&void 0!==s&&e.current<s)&&e.current>i}var s="undefined"!==typeof window?window:null;function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getTrigger,n=void 0===t?o:t,c=e.target,l=void 0===c?s:c,u=Object(a.a)(e,["getTrigger","target"]),h=i.useRef(),d=i.useState((function(){return n(h,u)})),f=d[0],p=d[1];return i.useEffect((function(){var e=function(){p(n(h,Object(r.a)({target:l},u)))};return e(),l.addEventListener("scroll",e),function(){l.removeEventListener("scroll",e)}}),[l,n,JSON.stringify(u)]),f}},351:function(e,t){var n,r,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"===typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var c,l=[],u=!1,h=-1;function d(){u&&c&&(u=!1,c.length?l=c.concat(l):h=-1,l.length&&f())}function f(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||u||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=g,a.addListener=g,a.once=g,a.off=g,a.removeListener=g,a.removeAllListeners=g,a.emit=g,a.prependListener=g,a.prependOnceListener=g,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},352:function(e,t,n){"use strict";(function(e){var r=n(353),a=n(354),i=n(355);function o(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(e,t,n);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=d(e,t);return e}(e,t,n,r):"string"===typeof t?function(e,t,n){"string"===typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),a=(e=s(e,r)).write(t,n);a!==r&&(e=e.slice(0,a));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|f(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||(r=t.length)!==r?s(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t){if(u(t),e=s(e,t<0?0:0|f(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|f(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return w(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,a){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"===typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,a);if("number"===typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,a){var i,o=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var u=-1;for(i=n;i<s;i++)if(l(e,i)===l(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===c)return u*o}else-1!==u&&(i-=i-u),u=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){for(var h=!0,d=0;d<c;d++)if(l(e,i+d)!==l(t,d)){h=!1;break}if(h)return i}return-1}function b(e,t,n,r){n=Number(n)||0;var a=e.length-n;r?(r=Number(r))>a&&(r=a):r=a;var i=t.length;if(i%2!==0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function _(e,t,n,r){return W(U(t,e.length-n),e,n,r)}function k(e,t,n,r){return W(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function C(e,t,n,r){return k(e,t,n,r)}function A(e,t,n,r){return W(H(t),e,n,r)}function x(e,t,n,r){return W(function(e,t){for(var n,r,a,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,a=n%256,i.push(a),i.push(r);return i}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function w(e,t,n){n=Math.min(e.length,n);for(var r=[],a=t;a<n;){var i,o,s,c,l=e[a],u=null,h=l>239?4:l>223?3:l>191?2:1;if(a+h<=n)switch(h){case 1:l<128&&(u=l);break;case 2:128===(192&(i=e[a+1]))&&(c=(31&l)<<6|63&i)>127&&(u=c);break;case 3:i=e[a+1],o=e[a+2],128===(192&i)&&128===(192&o)&&(c=(15&l)<<12|(63&i)<<6|63&o)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:i=e[a+1],o=e[a+2],s=e[a+3],128===(192&i)&&128===(192&o)&&128===(192&s)&&(c=(15&l)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),a+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}(),t.kMaxLength=o(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return l(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?s(e,t):void 0!==n?"string"===typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return h(null,e)},c.allocUnsafeSlow=function(e){return h(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,a=0,i=Math.min(n,r);a<i;++a)if(e[a]!==t[a]){n=e[a],r=t[a];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),a=0;for(n=0;n<e.length;++n){var o=e[n];if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,a),a+=o.length}return r},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?w(this,0,e):g.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,a){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(i,o),l=this.slice(r,a),u=e.slice(t,n),h=0;h<s;++h)if(l[h]!==u[h]){i=l[h],o=u[h];break}return i<o?-1:o<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return k(this,e,t,n);case"latin1":case"binary":return C(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;a<n;++a)r+=String.fromCharCode(127&e[a]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;a<n;++a)r+=String.fromCharCode(e[a]);return r}function R(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var a="",i=t;i<n;++i)a+=B(e[i]);return a}function T(e,t,n){for(var r=e.slice(t,n),a="",i=0;i<r.length;i+=2)a+=String.fromCharCode(r[i]+256*r[i+1]);return a}function O(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,a,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function F(e,t,n,r){t<0&&(t=65535+t+1);for(var a=0,i=Math.min(e.length-n,2);a<i;++a)e[n+a]=(t&255<<8*(r?a:1-a))>>>8*(r?a:1-a)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var a=0,i=Math.min(e.length-n,4);a<i;++a)e[n+a]=t>>>8*(r?a:3-a)&255}function N(e,t,n,r,a,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function I(e,t,n,r,i){return i||N(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function D(e,t,n,r,i){return i||N(e,0,n,8),a.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var a=t-e;n=new c(a,void 0);for(var i=0;i<a;++i)n[i]=this[i+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],a=1,i=0;++i<t&&(a*=256);)r+=this[e+i]*a;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e+--t],a=1;t>0&&(a*=256);)r+=this[e+--t]*a;return r},c.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],a=1,i=0;++i<t&&(a*=256);)r+=this[e+i]*a;return r>=(a*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=t,a=1,i=this[e+--r];r>0&&(a*=256);)i+=this[e+--r]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),a.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,i=0;for(this[t]=255&e;++i<n&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var a=n-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);L(this,e,t,n,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);L(this,e,t,n,a-1,-a)}var i=n-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return I(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return I(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return D(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return D(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var a,i=r-n;if(this===e&&n<t&&t<r)for(a=i-1;a>=0;--a)e[a+t]=this[a+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(a=0;a<i;++a)e[a+t]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},c.prototype.fill=function(e,t,n,r){if("string"===typeof e){if("string"===typeof t?(r=t,t=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),1===e.length){var a=e.charCodeAt(0);a<256&&(e=a)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i<n;++i)this[i]=e;else{var o=c.isBuffer(e)?e:U(new c(e,r).toString()),s=o.length;for(i=0;i<n-t;++i)this[i+t]=o[i%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,t){var n;t=t||1/0;for(var r=e.length,a=null,i=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function W(e,t,n,r){for(var a=0;a<r&&!(a+n>=t.length||a>=e.length);++a)t[a+n]=e[a];return a}}).call(this,n(109))},353:function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=l(e),o=r[0],s=r[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,s)),u=0,h=s>0?o-4:o;for(n=0;n<h;n+=4)t=a[e.charCodeAt(n)]<<18|a[e.charCodeAt(n+1)]<<12|a[e.charCodeAt(n+2)]<<6|a[e.charCodeAt(n+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;2===s&&(t=a[e.charCodeAt(n)]<<2|a[e.charCodeAt(n+1)]>>4,c[u++]=255&t);1===s&&(t=a[e.charCodeAt(n)]<<10|a[e.charCodeAt(n+1)]<<4|a[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,i=[],o=0,s=n-a;o<s;o+=16383)i.push(u(e,o,o+16383>s?s:o+16383));1===a?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===a&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],a=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=o.length;s<c;++s)r[s]=o[s],a[o.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var a,i,o=[],s=t;s<n;s+=3)a=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(r[(i=a)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},354:function(e,t){t.read=function(e,t,n,r,a){var i,o,s=8*a-r-1,c=(1<<s)-1,l=c>>1,u=-7,h=n?a-1:0,d=n?-1:1,f=e[t+h];for(h+=d,i=f&(1<<-u)-1,f>>=-u,u+=s;u>0;i=256*i+e[t+h],h+=d,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=r;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===i)i=1-l;else{if(i===c)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),i-=l}return(f?-1:1)*o*Math.pow(2,i-r)},t.write=function(e,t,n,r,a,i){var o,s,c,l=8*i-a-1,u=(1<<l)-1,h=u>>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:i-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(o++,c/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*c-1)*Math.pow(2,a),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,a),o=0));a>=8;e[n+f]=255&s,f+=p,s/=256,a-=8);for(o=o<<a|s,l+=a;l>0;e[n+f]=255&o,f+=p,o/=256,l-=8);e[n+f-p]|=128*g}},355:function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},356:function(e,t,n){var r=n(357);function a(t,n,i){return"undefined"!==typeof Reflect&&Reflect.get?e.exports=a=Reflect.get:e.exports=a=function(e,t,n){var a=r(e,t);if(a){var i=Object.getOwnPropertyDescriptor(a,t);return i.get?i.get.call(n):i.value}},a(t,n,i||t)}e.exports=a},357:function(e,t,n){var r=n(267);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}},358:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},359:function(e,t){e.exports=function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(c){a=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}}},360:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},361:function(e,t,n){var r=n(362),a=n(363),i=n(268),o=n(364);e.exports=function(e){return r(e)||a(e)||i(e)||o()}},362:function(e,t,n){var r=n(299);e.exports=function(e){if(Array.isArray(e))return r(e)}},363:function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},364:function(e,t){e.exports=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.")}},365:function(e,t,n){var r=n(268);e.exports=function(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=r(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i,o=!0,s=!1;return{s:function(){a=e[Symbol.iterator]()},n:function(){var e=a.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==a.return||a.return()}finally{if(s)throw i}}}}},366:function(e,t,n){var r=n(367);e.exports=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}}),t&&r(e,t)}},367:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},368:function(e,t,n){var r=n(267),a=n(369),i=n(370);e.exports=function(e){return function(){var t,n=r(e);if(a()){var o=r(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return i(this,t)}}},369:function(e,t){e.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},370:function(e,t,n){var r=n(371),a=n(297);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?a(e):t}},371:function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},377:function(e,t,n){"use strict";var r=n(270),a=n(269);Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleLinkService=t.PDFLinkService=void 0;var i=n(301),o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventBus,a=t.externalLinkTarget,o=void 0===a?null:a,s=t.externalLinkRel,c=void 0===s?null:s,l=t.externalLinkEnabled,u=void 0===l||l,h=t.ignoreDestinationZoom,d=void 0!==h&&h;r(this,e),this.eventBus=n||(0,i.getGlobalEventBus)(),this.externalLinkTarget=o,this.externalLinkRel=c,this.externalLinkEnabled=u,this._ignoreDestinationZoom=d,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null,this._pagesRefCache=null}return a(e,[{key:"setDocument",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.baseUrl=t,this.pdfDocument=e,this._pagesRefCache=Object.create(null)}},{key:"setViewer",value:function(e){this.pdfViewer=e}},{key:"setHistory",value:function(e){this.pdfHistory=e}},{key:"navigateTo",value:function(e){var t=this;new Promise((function(n,r){"string"!==typeof e?n({namedDest:"",explicitDest:e}):t.pdfDocument.getDestination(e).then((function(t){n({namedDest:e,explicitDest:t})}))})).then((function(n){Array.isArray(n.explicitDest)?function n(r){var a,i=r.namedDest,o=r.explicitDest,s=o[0];if(s instanceof Object){if(null===(a=t._cachedPageNumber(s)))return void t.pdfDocument.getPageIndex(s).then((function(e){t.cachePageRef(e+1,s),n({namedDest:i,explicitDest:o})})).catch((function(){console.error('PDFLinkService.navigateTo: "'.concat(s,'" is not ')+'a valid page reference, for dest="'.concat(e,'".'))}))}else{if(!Number.isInteger(s))return void console.error('PDFLinkService.navigateTo: "'.concat(s,'" is not ')+'a valid destination reference, for dest="'.concat(e,'".'));a=s+1}!a||a<1||a>t.pagesCount?console.error('PDFLinkService.navigateTo: "'.concat(a,'" is not ')+'a valid page number, for dest="'.concat(e,'".')):(t.pdfHistory&&(t.pdfHistory.pushCurrentPosition(),t.pdfHistory.push({namedDest:i,explicitDest:o,pageNumber:a})),t.pdfViewer.scrollPageIntoView({pageNumber:a,destArray:o,ignoreDestinationZoom:t._ignoreDestinationZoom}))}(n):console.error('PDFLinkService.navigateTo: "'.concat(n.explicitDest,'" is')+' not a valid destination array, for dest="'.concat(e,'".'))}))}},{key:"getDestinationHash",value:function(e){if("string"===typeof e)return this.getAnchorUrl("#"+escape(e));if(Array.isArray(e)){var t=JSON.stringify(e);return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}},{key:"getAnchorUrl",value:function(e){return(this.baseUrl||"")+e}},{key:"setHash",value:function(e){var t,n;if(e.includes("=")){var r=(0,i.parseQueryString)(e);if("search"in r&&this.eventBus.dispatch("findfromurlhash",{source:this,query:r.search.replace(/"/g,""),phraseSearch:"true"===r.phrase}),"nameddest"in r)return void this.navigateTo(r.nameddest);if("page"in r&&(t=0|r.page||1),"zoom"in r){var a=r.zoom.split(","),o=a[0],s=parseFloat(o);o.includes("Fit")?"Fit"===o||"FitB"===o?n=[null,{name:o}]:"FitH"===o||"FitBH"===o||"FitV"===o||"FitBV"===o?n=[null,{name:o},a.length>1?0|a[1]:null]:"FitR"===o?5!==a.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):n=[null,{name:o},0|a[1],0|a[2],0|a[3],0|a[4]]:console.error('PDFLinkService.setHash: "'.concat(o,'" is not ')+"a valid zoom value."):n=[null,{name:"XYZ"},a.length>1?0|a[1]:null,a.length>2?0|a[2]:null,s?s/100:o]}n?this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:n,allowNegativeOffset:!0}):t&&(this.page=t),"pagemode"in r&&this.eventBus.dispatch("pagemode",{source:this,mode:r.pagemode})}else{n=unescape(e);try{n=JSON.parse(n),Array.isArray(n)||(n=n.toString())}catch(c){}if("string"===typeof n||function(e){if(!Array.isArray(e))return!1;var t=e.length;if(t<2)return!1;var n=e[0];if(("object"!==typeof n||!Number.isInteger(n.num)||!Number.isInteger(n.gen))&&!(Number.isInteger(n)&&n>=0))return!1;var r=e[1];if("object"!==typeof r||"string"!==typeof r.name)return!1;var a=!0;switch(r.name){case"XYZ":if(5!==t)return!1;break;case"Fit":case"FitB":return 2===t;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==t)return!1;break;case"FitR":if(6!==t)return!1;a=!1;break;default:return!1}for(var i=2;i<t;i++){var o=e[i];if(!("number"===typeof o||a&&null===o))return!1}return!0}(n))return void this.navigateTo(n);console.error('PDFLinkService.setHash: "'.concat(unescape(e),'" is not ')+"a valid destination.")}}},{key:"executeNamedAction",value:function(e){switch(e){case"GoBack":this.pdfHistory&&this.pdfHistory.back();break;case"GoForward":this.pdfHistory&&this.pdfHistory.forward();break;case"NextPage":this.page<this.pagesCount&&this.page++;break;case"PrevPage":this.page>1&&this.page--;break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}this.eventBus.dispatch("namedaction",{source:this,action:e})}},{key:"cachePageRef",value:function(e,t){if(t){var n=0===t.gen?"".concat(t.num,"R"):"".concat(t.num,"R").concat(t.gen);this._pagesRefCache[n]=e}}},{key:"_cachedPageNumber",value:function(e){var t=0===e.gen?"".concat(e.num,"R"):"".concat(e.num,"R").concat(e.gen);return this._pagesRefCache&&this._pagesRefCache[t]||null}},{key:"isPageVisible",value:function(e){return this.pdfViewer.isPageVisible(e)}},{key:"pagesCount",get:function(){return this.pdfDocument?this.pdfDocument.numPages:0}},{key:"page",get:function(){return this.pdfViewer.currentPageNumber},set:function(e){this.pdfViewer.currentPageNumber=e}},{key:"rotation",get:function(){return this.pdfViewer.pagesRotation},set:function(e){this.pdfViewer.pagesRotation=e}}]),e}();t.PDFLinkService=o;var s=function(){function e(){r(this,e),this.externalLinkTarget=null,this.externalLinkRel=null,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=!1}return a(e,[{key:"navigateTo",value:function(e){}},{key:"getDestinationHash",value:function(e){return"#"}},{key:"getAnchorUrl",value:function(e){return"#"}},{key:"setHash",value:function(e){}},{key:"executeNamedAction",value:function(e){}},{key:"cachePageRef",value:function(e,t){}},{key:"isPageVisible",value:function(e){return!0}},{key:"pagesCount",get:function(){return 0}},{key:"page",get:function(){return 0},set:function(e){}},{key:"rotation",get:function(){return 0},set:function(e){}}]),e}();t.SimpleLinkService=s},378:function(e,t,n){"use strict";e.exports=n(379)},379:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(0),i=(r=a)&&"object"==typeof r&&"default"in r?r.default:r,o=n(253),s=n(11),c=i.createContext({prefixClass:"viewer"}),l=function(e){var t=[];return Object.keys(e).forEach((function(n){n&&e[n]&&t.push(n)})),t.join(" ")},u=function(e){var t,n=e.children,r=e.isSelected,o=void 0!==r&&r,s=e.onClick,u=a.useContext(c);return i.createElement("button",{className:l((t={},t[u.prefixClass+"-button"]=!0,t[u.prefixClass+"-button-selected"]=o,t)),onClick:s},n)},h=function(){var e=a.useContext(c);return i.createElement("li",{className:e.prefixClass+"-menu-divider"})},d=function(e){var t=e.children,n=e.size,r=void 0===n?24:n,o=a.useContext(c),s=(r||24)+"px";return i.createElement("svg",{className:o.prefixClass+"-icon",height:s,viewBox:"0 0 24 24",width:s},t)},f=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M23.5,0.499l-16.5,23l-6.5-6.5"}))},p=function(e){var t=e.checked,n=void 0!==t&&t,r=e.children,o=e.icon,s=void 0===o?null:o,l=e.onClick,u=a.useContext(c);return i.createElement("li",{className:u.prefixClass+"-menu-item",onClick:l},i.createElement("div",{className:u.prefixClass+"-menu-item-icon"},s),i.createElement("div",{className:u.prefixClass+"-menu-item-label"},r),i.createElement("div",{className:u.prefixClass+"-menu-item-check"},n&&i.createElement(f,null)))},g=function(e){var t=e.children,n=e.onClick,r=a.useContext(c);return i.createElement("button",{className:r.prefixClass+"-primary-button",onClick:n},t)},v=function(e){var t=e.progress,n=a.useContext(c);return i.createElement("div",{className:n.prefixClass+"-progress-bar"},i.createElement("div",{className:n.prefixClass+"-progress-bar-inner",style:{width:t+"%"}},t,"%"))},m=function(){var e=a.useContext(c);return i.createElement("div",{className:e.prefixClass+"-separator"})},y=function(){var e=a.useContext(c);return i.createElement("svg",{className:e.prefixClass+"-spinner",width:"64px",height:"64px",viewBox:"0 0 32 32"},i.createElement("circle",{className:e.prefixClass+"-spinner-circle",cx:"16",cy:"16",r:"12",strokeDasharray:2*Math.PI*9}))},b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function _(e,t){function n(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var k,C=function(){return(C=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},A=function(e,t,n,r,o){var s,u=a.useContext(c);return i.createElement("div",C({},t.attrs,{className:l((s={},s[u.prefixClass+"-layout-container"]=!0,s[u.prefixClass+"-layout-with-sidebar"]=e,s)),style:t.attrs.style}),t.children,i.createElement("div",{className:u.prefixClass+"-layout-toolbar"},r),i.createElement("div",{className:u.prefixClass+"-layout-sidebar"},o.children),i.createElement("div",C({},n.attrs,{className:u.prefixClass+"-layout-main",style:n.attrs.style}),n.children))},x=function(e){var t=a.useContext(c);return i.createElement("div",{className:t.prefixClass+"-toolbar"},i.createElement("div",{className:t.prefixClass+"-toolbar-left"},i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.toggleSidebarButton),i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.searchPopover),i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.previousPageButton),i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.currentPageInput," / ",e.numPages),i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.nextPageButton)),i.createElement("div",{className:t.prefixClass+"-toolbar-center"},i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.zoomOutButton),i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.zoomPopover),i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.zoomInButton)),i.createElement("div",{className:t.prefixClass+"-toolbar-right"},i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.fullScreenButton),i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.openFileButton),i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.downloadButton),i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.printButton),i.createElement("div",{className:t.prefixClass+"-toolbar-item"},e.moreActionsPopover)))},E=function(e,t,n){var r=function(e){var r=t.current;r&&!r.contains(e.target)&&n()};a.useEffect((function(){if(e)return document.addEventListener("click",r),function(){document.removeEventListener("click",r)}}),[])},w=function(e,t){var n=function(n){n.keyCode===e&&t()};a.useEffect((function(){return document.addEventListener("keyup",n),function(){document.removeEventListener("keyup",n)}}),[])},S=function(e){var t=e.children,n=e.closeOnClickOutside,r=e.closeOnEscape,o=e.onToggle,s=a.useContext(c),l=a.createRef();return a.useEffect((function(){var e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=e}}),[]),w(27,(function(){return r&&o()})),E(n,l,o),i.createElement("div",{className:s.prefixClass+"-modal-body",ref:l},t)},P=function(e){var t=e.children,n=a.useContext(c);return i.createElement("div",{className:n.prefixClass+"-modal-overlay"},t)};!function(e){e.Close="Close",e.Open="Open",e.Toggle="Toggle"}(k||(k={}));var R,T=function(){var e=a.useState(!1),t=e[0],n=e[1];return{opened:t,toggle:function(e){switch(e){case k.Close:n(!1);break;case k.Open:n(!0);break;case k.Toggle:default:n((function(e){return!e}))}}}},O=function(e){var t=e.content,n=e.target,r=T(),a=r.opened,o=r.toggle;return i.createElement(i.Fragment,null,n(o,a),a&&t(o))},L=function(e){var t=e.closeOnClickOutside,n=e.closeOnEscape,r=e.content,a=e.target;return i.createElement(O,{target:a,content:function(e){return i.createElement(P,null,i.createElement(S,{closeOnClickOutside:t,closeOnEscape:n,onToggle:e},r(e)))}})};!function(e){e.TopLeft="TOP_LEFT",e.TopCenter="TOP_CENTER",e.TopRight="TOP_RIGHT",e.RightTop="RIGHT_TOP",e.RightCenter="RIGHT_CENTER",e.RightBottom="RIGHT_BOTTOM",e.BottomLeft="BOTTOM_LEFT",e.BottomCenter="BOTTOM_CENTER",e.BottomRight="BOTTOM_RIGHT",e.LeftTop="LEFT_TOP",e.LeftCenter="LEFT_CENTER",e.LeftBottom="LEFT_BOTTOM"}(R||(R={}));var F,M=R,N=function(e,t,n,r,i){a.useLayoutEffect((function(){var a=t.current,o=e.current,s=n.current;if(o&&a&&s){var c=s.getBoundingClientRect(),l=function(e,t,n,r){var a=t.getBoundingClientRect(),i=e.getBoundingClientRect(),o=i.height,s=i.width,c=0,l=0;switch(n){case M.TopLeft:c=a.top-o,l=a.left;break;case M.TopCenter:c=a.top-o,l=a.left+a.width/2-s/2;break;case M.TopRight:c=a.top-o,l=a.left+a.width-s;break;case M.RightTop:c=a.top,l=a.left+a.width;break;case M.RightCenter:c=a.top+a.height/2-o/2,l=a.left+a.width;break;case M.RightBottom:c=a.top+a.height-o,l=a.left+a.width;break;case M.BottomLeft:c=a.top+a.height,l=a.left;break;case M.BottomCenter:c=a.top+a.height,l=a.left+a.width/2-s/2;break;case M.BottomRight:c=a.top+a.height,l=a.left+a.width-s;break;case M.LeftTop:c=a.top,l=a.left-s;break;case M.LeftCenter:c=a.top+a.height/2-o/2,l=a.left-s;break;case M.LeftBottom:c=a.top+a.height-o,l=a.left-s}return{left:l+(r.left||0),top:c+(r.top||0)}}(o,a,r,i),u=l.top,h=l.left;o.style.top=u-c.top+"px",o.style.left=h-c.left+"px"}}),[])},I=function(e){var t,n=e.customClassName,r=e.position,o=a.useContext(c);return i.createElement("div",{className:l((t={},t[o.prefixClass+"-arrow"]=!0,t[o.prefixClass+"-arrow-tl"]=r===M.TopLeft,t[o.prefixClass+"-arrow-tc"]=r===M.TopCenter,t[o.prefixClass+"-arrow-tr"]=r===M.TopRight,t[o.prefixClass+"-arrow-rt"]=r===M.RightTop,t[o.prefixClass+"-arrow-rc"]=r===M.RightCenter,t[o.prefixClass+"-arrow-rb"]=r===M.RightBottom,t[o.prefixClass+"-arrow-bl"]=r===M.BottomLeft,t[o.prefixClass+"-arrow-bc"]=r===M.BottomCenter,t[o.prefixClass+"-arrow-br"]=r===M.BottomRight,t[o.prefixClass+"-arrow-lt"]=r===M.LeftTop,t[o.prefixClass+"-arrow-lc"]=r===M.LeftCenter,t[o.prefixClass+"-arrow-lb"]=r===M.LeftBottom,t[""+n]=""!==n,t))})},D=function(e){var t=e.children,n=e.closeOnClickOutside,r=e.offset,o=e.position,s=e.targetRef,l=e.onClose,u=a.useContext(c),h=a.createRef(),d=a.createRef();return E(n,h,l),N(h,s,d,o,r),i.createElement(i.Fragment,null,i.createElement("div",{ref:d,style:{left:0,position:"absolute",top:0}}),i.createElement("div",{className:u.prefixClass+"-popover-body",ref:h},i.createElement(I,{customClassName:u.prefixClass+"-popover-body-arrow",position:o}),t))},j=function(e){var t=e.closeOnEscape,n=e.onClose,r=a.useContext(c);return w(27,(function(){return t&&n()})),i.createElement("div",{className:r.prefixClass+"-popover-overlay"})},B=function(e){var t=e.closeOnClickOutside,n=e.closeOnEscape,r=e.content,a=e.offset,o=e.position,s=e.target,c=i.createRef();return i.createElement(O,{content:function(e){return i.createElement(i.Fragment,null,i.createElement(j,{closeOnEscape:n,onClose:e}),i.createElement(D,{closeOnClickOutside:t,offset:a,position:o,targetRef:c,onClose:e},r(e)))},target:function(e,t){return i.createElement("div",{ref:c},s(e,t))}})},U=function(e){var t=e.children,n=e.offset,r=e.position,o=e.targetRef,s=a.useContext(c),l=a.createRef(),u=a.createRef();return N(l,o,u,r,n),i.createElement(i.Fragment,null,i.createElement("div",{ref:u,style:{left:0,position:"absolute",top:0}}),i.createElement("div",{className:s.prefixClass+"-tooltip-body",ref:l},i.createElement(I,{customClassName:s.prefixClass+"-tooltip-body-arrow",position:r}),i.createElement("div",{className:s.prefixClass+"-tooltip-body-content"},t)))},H=function(e){var t=e.content,n=e.offset,r=e.position,a=e.target,o=i.createRef();return i.createElement(O,{target:function(e){return i.createElement("div",{ref:o,onMouseEnter:function(){e(k.Open)},onMouseLeave:function(){e(k.Close)}},a)},content:function(){return i.createElement(U,{offset:n,position:r,targetRef:o},t())}})};!function(e){e.Horizontal="Horizontal",e.Vertical="Vertical",e.Wrapped="Wrapped"}(F||(F={}));var W,q=F;!function(e){e[e.Hand=0]="Hand",e[e.Text=1]="Text"}(W||(W={}));var z,G=W;!function(e){e.ActualSize="ActualSize",e.PageFit="PageFit",e.PageWidth="PageWidth"}(z||(z={}));var V,Y=z;!function(e){e[e.ExitFullScreen=0]="ExitFullScreen",e[e.FullScreenChange=1]="FullScreenChange",e[e.FullScreenElement=2]="FullScreenElement",e[e.FullScreenEnabled=3]="FullScreenEnabled",e[e.RequestFullScreen=4]="RequestFullScreen"}(V||(V={}));var X,J={ExitFullScreen:"exitFullscreen",FullScreenChange:"fullscreenchange",FullScreenElement:"fullscreenElement",FullScreenEnabled:"fullscreenEnabled",RequestFullScreen:"requestFullscreen"},K={ExitFullScreen:"webkitExitFullscreen",FullScreenChange:"webkitfullscreenchange",FullScreenElement:"webkitFullscreenElement",FullScreenEnabled:"webkitFullscreenEnabled",RequestFullScreen:"webkitRequestFullscreen"},Q={ExitFullScreen:"msExitFullscreen",FullScreenChange:"MSFullscreenChange",FullScreenElement:"msFullscreenElement",FullScreenEnabled:"msFullscreenEnabled",RequestFullScreen:"msRequestFullscreen"},Z="undefined"!=typeof window,$=Z&&(V.FullScreenEnabled in document&&J||K.FullScreenEnabled in document&&K||Q.FullScreenEnabled in document&&Q)||J,ee=function(e){return Z?e[$.ExitFullScreen]():Promise.resolve({})},te=function(){return Z?document[$.FullScreenElement]:null},ne=function(e){var t=a.useState(!1),n=t[0],r=t[1],i=function(){var t=te();r(t===e.current)};return a.useEffect((function(){var e;return e=i,Z&&document.addEventListener($.FullScreenChange,e),function(){!function(e){Z&&document.removeEventListener($.FullScreenChange,e)}(i)}}),[e.current]),{closeFullScreen:function(){var t=te();n&&t&&t===e.current&&ee(document)},isFullScreen:n,openFullScreen:function(){var t;(t=te(),t&&t!==e.current?ee(t):Promise.resolve()).then((function(){var t;e.current&&(t=e.current,Z&&t[$.RequestFullScreen]())}))}}},re=function(e){var t=e.page,n=e.renderAnnotations,r=a.useState(!0),o=r[0],s=r[1],c=a.useState([]),l=c[0],u=c[1];return a.useEffect((function(){t.getAnnotations({intent:"display"}).then((function(e){s(!1),u(e)}))}),[]),o?i.createElement(i.Fragment,null):n(l)};!function(e){e[e.Text=1]="Text",e[e.Link=2]="Link",e[e.FreeText=3]="FreeText",e[e.Line=4]="Line",e[e.Square=5]="Square",e[e.Circle=6]="Circle",e[e.Polygon=7]="Polygon",e[e.Polyline=8]="Polyline",e[e.Highlight=9]="Highlight",e[e.Underline=10]="Underline",e[e.Squiggly=11]="Squiggly",e[e.StrikeOut=12]="StrikeOut",e[e.Stamp=13]="Stamp",e[e.Caret=14]="Caret",e[e.Ink=15]="Ink",e[e.Popup=16]="Popup",e[e.FileAttachment=17]="FileAttachment"}(X||(X={}));var ae,ie=X;!function(e){e[e.Solid=1]="Solid",e[e.Dashed=2]="Dashed",e[e.Beveled=3]="Beveled",e[e.Inset=4]="Inset",e[e.Underline=5]="Underline"}(ae||(ae={}));var oe,se=ae,ce=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"),le=function(e,t,n,r){var a=parseInt(e,10);return a>=t&&a<=n?a:r},ue=function(e){var t=ce.exec(e);if(!t)return null;var n=parseInt(t[1],10),r=le(t[2],1,12,1)-1,a=le(t[3],1,31,1),i=le(t[4],0,23,0),o=le(t[5],0,59,0),s=le(t[6],0,59,0),c=t[7]||"Z",l=le(t[8],0,23,0),u=le(t[9],0,59,0);switch(c){case"-":i+=l,o+=u;break;case"+":i-=l,o-=u}return new Date(Date.UTC(n,r,a,i,o,s))},he=function(e){var t=e.annotation,n=a.useContext(c),r="";if(t.modificationDate){var o=ue(t.modificationDate);r=o?o.toLocaleDateString()+", "+o.toLocaleTimeString():""}return i.createElement("div",{className:n.prefixClass+"-annotation-popup-wrapper",style:{top:t.annotationType===ie.Popup?"":"100%"}},t.title&&i.createElement("div",{className:n.prefixClass+"-annotation-popup-wrapper-header"},i.createElement("div",{className:n.prefixClass+"-annotation-popup-wrapper-title"},t.title),i.createElement("span",{className:n.prefixClass+"-annotation-popup-wrapper-date"},r)),t.contents&&i.createElement("div",{className:n.prefixClass+"-annotation-popup-wrapper-content"},t.contents.split("\n").map((function(e,t){return i.createElement(a.Fragment,{key:t},e,i.createElement("br",null))}))))};!function(e){e.Click="Click",e.Hover="Hover"}(oe||(oe={}));var de,fe=function(e){var t,n=e.annotation,r=e.children,o=e.ignoreBorder,s=e.hasPopup,c=e.isRenderable,l=e.page,u=e.viewport,h=n.rect,d=function(){var e=T(),t=e.opened,n=e.toggle,r=a.useState(oe.Hover),i=r[0],o=r[1];return{opened:t,closeOnHover:function(){i===oe.Hover&&n(k.Close)},openOnHover:function(){i===oe.Hover&&n(k.Open)},toggleOnClick:function(){switch(i){case oe.Click:t&&o(oe.Hover),n(k.Toggle);break;case oe.Hover:o(oe.Click),n(k.Open)}}}}(),f=d.closeOnHover,p=d.opened,g=d.openOnHover,v=d.toggleOnClick,m=(t=[h[0],l.view[3]+l.view[1]-h[1],h[2],l.view[3]+l.view[1]-h[3]],[Math.min(t[0],t[2]),Math.min(t[1],t[3]),Math.max(t[0],t[2]),Math.max(t[1],t[3])]),y=h[2]-h[0],b=h[3]-h[1],_={borderColor:"",borderRadius:"",borderStyle:"",borderWidth:""};if(!o&&n.borderStyle.width>0){switch(n.borderStyle.style){case se.Dashed:_.borderStyle="dashed";break;case se.Solid:_.borderStyle="solid";break;case se.Underline:_=Object.assign({borderBottomStyle:"solid"},_);break;case se.Beveled:case se.Inset:}var C=n.borderStyle.width;_.borderWidth=C+"px",n.borderStyle.style!==se.Underline&&(y-=2*C,b-=2*C);var A=n.borderStyle,x=A.horizontalCornerRadius,E=A.verticalCornerRadius;(x>0||E>0)&&(_.borderRadius=x+"px / "+E+"px"),n.color?_.borderColor="rgb("+(0|n.color[0])+", "+(0|n.color[1])+", "+(0|n.color[2])+")":_.borderWidth="0"}return i.createElement(i.Fragment,null,c&&r({popup:{opened:p,closeOnHover:f,openOnHover:g,toggleOnClick:v},slot:{attrs:{style:Object.assign({height:b+"px",left:m[0]+"px",top:m[1]+"px",transform:"matrix("+u.transform.join(",")+")",transformOrigin:"-"+m[0]+"px -"+m[1]+"px",width:y+"px"},_)},children:i.createElement(i.Fragment,null,s&&p&&i.createElement(he,{annotation:n}))}}))},pe=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents);return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-caret","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)}))},ge=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents),u=t.rect,h=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-circle","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),i.createElement("svg",{height:d+"px",preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 "+h+" "+d,width:h+"px"},i.createElement("circle",{cy:d/2,fill:"none",rx:h/2-f/2,ry:d/2-f/2,stroke:"transparent",strokeWidth:f||1})),e.slot.children)}))},ve=function(e){var t=e.split("/").pop();return t?t.split("#")[0].split("?")[0]:e},me=function(e,t){var n="string"==typeof t?"":URL.createObjectURL(new Blob([t],{type:""})),r=document.createElement("a");r.style.display="none",r.href=n||e,r.setAttribute("download",ve(e)),document.body.appendChild(r),r.click(),document.body.removeChild(r),n&&URL.revokeObjectURL(n)},ye=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!(!1!==t.hasPopup||!t.title&&!t.contents),l=function(){var e=t.file;e&&me(e.filename,e.content)};return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:!0,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-file-attachment","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onDoubleClick:l,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)}))},be=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents);return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-free-text","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)}))},_e=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents);return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-highlight","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)}))},ke=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents),u=t.rect,h=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-ink","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),t.inkLists&&t.inkLists.length&&i.createElement("svg",{height:d+"px",preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 "+h+" "+d,width:h+"px"},t.inkLists.map((function(e,t){return i.createElement("polyline",{key:t,fill:"none",stroke:"transparent",strokeWidth:f||1,points:e.map((function(e){return e.x-u[0]+","+(u[3]-e.y)})).join(" ")})}))),e.slot.children)}))},Ce=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents),u=t.rect,h=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-line","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),i.createElement("svg",{height:d+"px",preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 "+h+" "+d,width:h+"px"},i.createElement("line",{stroke:"transparent",strokeWidth:f||1,x1:u[2]-t.lineCoordinates[0],x2:u[2]-t.lineCoordinates[2],y1:u[3]-t.lineCoordinates[1],y2:u[3]-t.lineCoordinates[3]})),e.slot.children)}))},Ae=function(e,t){return new Promise((function(n){new Promise((function(n){"string"==typeof t?e.getDestination(t).then((function(e){n(e)})):n(t)})).then((function(t){e.getPageIndex(t[0]).then((function(e){var r=function(e,t){switch(t[1].name){case"XYZ":return{bottomOffset:t[3],pageIndex:e-1,scaleTo:t[4]};case"Fit":return{bottomOffset:0,pageIndex:e-1,scaleTo:Y.PageFit};default:return{bottomOffset:0,pageIndex:e-1,scaleTo:1}}}(e,t);n(r)}))}))}))},xe=function(e){var t=e.annotation,n=e.doc,r=e.page,o=e.viewport,s=e.onExecuteNamedAction,l=e.onJumpToDest,u=a.useContext(c),h=!!(t.url||t.dest||t.action),d=t.url?{href:t.url,rel:"noopener noreferrer nofollow",target:t.newWindow?"_blank":"",title:t.url}:{href:"",onClick:function(e){e.preventDefault(),t.action?s(t.action):Ae(n,t.dest).then((function(e){var t=e.pageIndex,n=e.bottomOffset,r=e.scaleTo;l(t+1,n,r)}))}};return i.createElement(fe,{annotation:t,hasPopup:!1,ignoreBorder:!1,isRenderable:h,page:r,viewport:o},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:u.prefixClass+"-annotation "+u.prefixClass+"-annotation-link","data-annotation-id":t.id}),i.createElement("a",C({},d)))}))},Ee=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents),u=t.rect,h=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-polygon","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),t.vertices&&t.vertices.length&&i.createElement("svg",{height:d+"px",preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 "+h+" "+d,width:h+"px"},i.createElement("polygon",{fill:"none",stroke:"transparent",strokeWidth:f||1,points:t.vertices.map((function(e){return e.x-u[0]+","+(u[3]-e.y)})).join(" ")})),e.slot.children)}))},we=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents),u=t.rect,h=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-polyline","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),t.vertices&&t.vertices.length&&i.createElement("svg",{height:d+"px",preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 "+h+" "+d,width:h+"px"},i.createElement("polyline",{fill:"none",stroke:"transparent",strokeWidth:f||1,points:t.vertices.map((function(e){return e.x-u[0]+","+(u[3]-e.y)})).join(" ")})),e.slot.children)}))},Se=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!(!t.title&&!t.contents),l=!t.parentType||-1!==["Circle","Ink","Line","Polygon","PolyLine","Square"].indexOf(t.parentType);return a.useLayoutEffect((function(){if(t.parentId){var e=document.querySelector('[data-annotation-id="'+t.parentId+'"]'),n=document.querySelector('[data-annotation-id="'+t.id+'"]');if(e&&n){var r=parseFloat(e.style.left),a=parseFloat(e.style.top)+parseFloat(e.style.height);n.style.left=r+"px",n.style.top=a+"px",n.style.transformOrigin="-"+r+"px -"+a+"px"}}}),[]),i.createElement(fe,{annotation:t,hasPopup:l,ignoreBorder:!1,isRenderable:s,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-popup","data-annotation-id":t.id}),i.createElement(he,{annotation:t}))}))},Pe=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents),u=t.rect,h=u[2]-u[0],d=u[3]-u[1],f=t.borderStyle.width;return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-square","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),i.createElement("svg",{height:d+"px",preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 "+h+" "+d,width:h+"px"},i.createElement("rect",{height:d-f,fill:"none",stroke:"transparent",strokeWidth:f||1,x:f/2,y:f/2,width:h-f})),e.slot.children)}))},Re=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents);return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-squiggly","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)}))},Te=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents);return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-stamp","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)}))},Oe=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents);return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-strike-out","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)}))},Le=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M.5,16.5a1,1,0,0,0,1,1h2v4l4-4h15a1,1,0,0,0,1-1V3.5a1,1,0,0,0-1-1H1.5a1,1,0,0,0-1,1Z"}),i.createElement("path",{d:"M7.25,9.75A.25.25,0,1,1,7,10a.25.25,0,0,1,.25-.25"}),i.createElement("path",{d:"M12,9.75a.25.25,0,1,1-.25.25A.25.25,0,0,1,12,9.75"}),i.createElement("path",{d:"M16.75,9.75a.25.25,0,1,1-.25.25.25.25,0,0,1,.25-.25"}))},Fe=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M0.500 12.001 A11.500 11.500 0 1 0 23.500 12.001 A11.500 11.500 0 1 0 0.500 12.001 Z"}),i.createElement("path",{d:"M6.000 12.001 A6.000 6.000 0 1 0 18.000 12.001 A6.000 6.000 0 1 0 6.000 12.001 Z"}),i.createElement("path",{d:"M21.423 5.406L17.415 9.414"}),i.createElement("path",{d:"M14.587 6.585L18.607 2.565"}),i.createElement("path",{d:"M5.405 21.424L9.413 17.416"}),i.createElement("path",{d:"M6.585 14.588L2.577 18.596"}),i.createElement("path",{d:"M18.602 21.419L14.595 17.412"}),i.createElement("path",{d:"M17.419 14.58L21.428 18.589"}),i.createElement("path",{d:"M2.582 5.399L6.588 9.406"}),i.createElement("path",{d:"M9.421 6.581L5.412 2.572"}))},Me=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M4.000 18.500 A1.500 1.500 0 1 0 7.000 18.500 A1.500 1.500 0 1 0 4.000 18.500 Z"}),i.createElement("path",{d:"M20.5.5l-9.782,9.783a7,7,0,1,0,3,3L17,10h1.5V8.5L19,8h1.5V6.5L21,6h1.5V4.5l1-1V.5Z"}))},Ne=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M2.000 2.500 L22.000 2.500 L22.000 23.500 L2.000 23.500 Z"}),i.createElement("path",{d:"M6 4.5L6 0.5"}),i.createElement("path",{d:"M18 4.5L18 0.5"}),i.createElement("path",{d:"M10 4.5L10 0.5"}),i.createElement("path",{d:"M14 4.5L14 0.5"}))},Ie=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M17.5 0.498L17.5 23.498"}),i.createElement("path",{d:"M10.5 0.498L10.5 23.498"}),i.createElement("path",{d:"M23.5.5H6.5a6,6,0,0,0,0,12h4"}))},De=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M2.5 22.995L12 6.005 21.5 22.995 2.5 22.995z"}))},je=function(e){var t=e.annotation,n=e.childAnnotation,r=e.page,o=e.viewport,s=a.useContext(c),l=!1===t.hasPopup,u=!!(t.hasPopup||t.title||t.contents),h=t.name?t.name.toLowerCase():"";return i.createElement(fe,{annotation:t,hasPopup:l,ignoreBorder:!1,isRenderable:u,page:r,viewport:o},(function(e){return i.createElement(i.Fragment,null,i.createElement("div",C({},e.slot.attrs,{className:s.prefixClass+"-annotation "+s.prefixClass+"-annotation-text","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),h&&i.createElement("div",{className:s.prefixClass+"-annotation-text-icon"},"check"===h&&i.createElement(f,null),"comment"===h&&i.createElement(Le,null),"help"===h&&i.createElement(Fe,null),"insert"===h&&i.createElement(De,null),"key"===h&&i.createElement(Me,null),"note"===h&&i.createElement(Ne,null),("newparagraph"===h||"paragraph"===h)&&i.createElement(Ie,null)),e.slot.children),n&&n.annotationType===ie.Popup&&e.popup.opened&&i.createElement(Se,{annotation:n,page:r,viewport:o}))}))},Be=function(e){var t=e.annotation,n=e.page,r=e.viewport,o=a.useContext(c),s=!1===t.hasPopup,l=!!(t.hasPopup||t.title||t.contents);return i.createElement(fe,{annotation:t,hasPopup:s,ignoreBorder:!0,isRenderable:l,page:n,viewport:r},(function(e){return i.createElement("div",C({},e.slot.attrs,{className:o.prefixClass+"-annotation "+o.prefixClass+"-annotation-underline","data-annotation-id":t.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)}))},Ue=function(e){var t=e.doc,n=e.page,r=e.rotation,o=e.scale,s=e.onExecuteNamedAction,l=e.onJumpToDest,u=a.useContext(c);return i.createElement("div",{className:u.prefixClass+"-annotation-layer"},i.createElement(re,{page:n,renderAnnotations:function(e){var c=n.getViewport({rotation:r,scale:o}).clone({dontFlip:!0});return i.createElement(i.Fragment,null,e.filter((function(e){return!e.parentId})).map((function(r){var o=e.find((function(e){return e.parentId===r.id}));switch(r.annotationType){case ie.Caret:return i.createElement(pe,{key:r.id,annotation:r,page:n,viewport:c});case ie.Circle:return i.createElement(ge,{key:r.id,annotation:r,page:n,viewport:c});case ie.FileAttachment:return i.createElement(ye,{key:r.id,annotation:r,page:n,viewport:c});case ie.FreeText:return i.createElement(be,{key:r.id,annotation:r,page:n,viewport:c});case ie.Highlight:return i.createElement(_e,{key:r.id,annotation:r,page:n,viewport:c});case ie.Ink:return i.createElement(ke,{key:r.id,annotation:r,page:n,viewport:c});case ie.Line:return i.createElement(Ce,{key:r.id,annotation:r,page:n,viewport:c});case ie.Link:return i.createElement(xe,{key:r.id,annotation:r,doc:t,page:n,viewport:c,onExecuteNamedAction:s,onJumpToDest:l});case ie.Polygon:return i.createElement(Ee,{key:r.id,annotation:r,page:n,viewport:c});case ie.Polyline:return i.createElement(we,{key:r.id,annotation:r,page:n,viewport:c});case ie.Popup:return i.createElement(Se,{key:r.id,annotation:r,page:n,viewport:c});case ie.Square:return i.createElement(Pe,{key:r.id,annotation:r,page:n,viewport:c});case ie.Squiggly:return i.createElement(Re,{key:r.id,annotation:r,page:n,viewport:c});case ie.Stamp:return i.createElement(Te,{key:r.id,annotation:r,page:n,viewport:c});case ie.StrikeOut:return i.createElement(Oe,{key:r.id,annotation:r,page:n,viewport:c});case ie.Text:return i.createElement(je,{key:r.id,annotation:r,childAnnotation:o,page:n,viewport:c});case ie.Underline:return i.createElement(Be,{key:r.id,annotation:r,page:n,viewport:c});default:return i.createElement(a.Fragment,{key:r.id})}})))}}))},He=function(e){var t=e.children,n=e.threshold,r=e.onVisibilityChanged,o=a.useRef(null);return a.useEffect((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){var t=e.isIntersecting,n=e.intersectionRatio;r({isVisible:t,ratio:n})}))}),{threshold:n||0}),t=o.current;if(t)return e.observe(t),function(){e.unobserve(t)}}),[]),i.createElement("div",{ref:o},t)},We=function(e){var t=e.callback,n=e.children,r=e.rotation,o=e.scale;return a.useLayoutEffect((function(){t()}),[r,o]),i.createElement(i.Fragment,null,n)},qe=function(e){var t=e.height,n=e.page,r=e.pageIndex,o=e.rotation,s=e.scale,l=e.width,u=e.onCanvasLayerRender,h=a.useContext(c),d=a.createRef(),f=a.useRef(),p=window.devicePixelRatio||1;return i.createElement(We,{callback:function(){var e=f.current;e&&e.cancel();var a=d.current;a.height=t*p,a.width=l*p;var i=a.getContext("2d",{alpha:!1}),c=n.getViewport({rotation:o,scale:s*p});f.current=n.render({canvasContext:i,viewport:c}),f.current.promise.then((function(){u({ele:a,pageIndex:r,rotation:o,scale:s})}),(function(){}))},rotation:o,scale:s},i.createElement("div",{className:h.prefixClass+"-canvas-layer",style:{height:t+"px",width:l+"px"}},i.createElement("canvas",{ref:d,style:{transform:"scale("+1/p+")",transformOrigin:"top left"}})))},ze=function(e){var t=e.height,n=e.page,r=e.rotation,s=e.scale,l=e.width,u=a.useContext(c),h=a.createRef();return i.createElement(We,{callback:function(){var e=h.current,a=n.getViewport({rotation:r,scale:s});n.getOperatorList().then((function(r){!function(){var e=h.current;e&&(e.innerHTML="")}(),new o.SVGGraphics(n.commonObjs,n.objs).getSVG(r,a).then((function(n){n.style.height=t+"px",n.style.width=l+"px",e.appendChild(n)}))}))},rotation:r,scale:s},i.createElement("div",{className:u.prefixClass+"-svg-layer",ref:h}))},Ge=function(e){var t=e.parentNode;t&&t.removeChild(e)},Ve=function(e){var t=e.parentNode;if(t){var n=document.createRange();n.selectNodeContents(e),function(e,t){Ge(e);var n=t.parentNode;n&&n.insertBefore(e,t),Ge(t)}(n.extractContents(),e),t.normalize()}},Ye=function(e){var t=e.keywordRegexp,n=e.match,r=e.page,s=e.pageIndex,l=e.rotation,u=e.scale,h=e.onJumpToMatch,d=e.onTextLayerRender,f=a.useContext(c),p=a.createRef(),g=a.useRef(),v=a.useRef(!1),m=function(e){var n=e.textContent;if(t.source.trim()&&n){var r=n.search(t),a=e.firstChild;-1!==r&&a&&function(e,t,n){var r=new Range;r.setStart(e,t),r.setEnd(e,n);var a=document.createElement("span");return r.surroundContents(a),a}(a,r,r+t.source.length).classList.add(f.prefixClass+"-text-highlight")}},y=function(){var e=p.current;if(e)for(var t=e.querySelectorAll("span."+f.prefixClass+"-text-highlight"),n=t.length,r=0;r<n;r++)Ve(t[r])},b=function(){var e=p.current;if(n.pageIndex===s&&e){var t=e.querySelectorAll("span."+f.prefixClass+"-text-highlight");if(n.matchIndex<t.length){var r=function(e,t){for(var n=e.offsetTop,r=e.offsetLeft,a=e.parentElement;a&&a!==t;)n+=a.offsetTop,r+=a.offsetLeft,a=a.parentElement;return{left:r,top:n}}(t[n.matchIndex],e),a=r.top,i=r.left;h(s,a/u,i/u)}}};return a.useEffect((function(){var e=p.current;if(t&&v.current&&e&&(y(),t.source.trim()))for(var n=e.querySelectorAll("span."+f.prefixClass+"-text"),r=n.length,a=0;a<r;a++)m(n[a])}),[t,v.current]),a.useEffect((function(){v.current&&b()}),[n]),i.createElement(We,{callback:function(){var e=g.current;e&&e.cancel();var n=p.current;if(n){var a=r.getViewport({rotation:l,scale:u});v.current=!1,r.getTextContent().then((function(e){!function(){var e=p.current;if(e)for(var t=e.querySelectorAll("span."+f.prefixClass+"-text"),n=t.length,r=0;r<n;r++){var a=t[r];e.removeChild(a)}}(),g.current=o.renderTextLayer({container:n,textContent:e,viewport:a}),g.current.promise.then((function(){v.current=!0;var e=n.childNodes,r=e.length;t&&y();for(var a=0;a<r;a++){var i=e[a];i.classList.add(f.prefixClass+"-text"),t&&m(i)}b(),d({ele:n})}),(function(){}))}))}},rotation:l,scale:u},i.createElement("div",{className:f.prefixClass+"-text-layer",ref:p}))},Xe=function(e){var t=e.doc,n=e.height,r=e.keywordRegexp,o=e.match,s=e.pageIndex,l=e.renderPage,u=e.rotation,h=e.scale,d=e.width,f=e.onCanvasLayerRender,p=e.onExecuteNamedAction,g=e.onJumpToDest,v=e.onPageVisibilityChanged,m=e.onTextLayerRender,b=a.useContext(c),_=a.useState({isCalculated:!1,page:null,pageHeight:n,pageWidth:d,viewportRotation:0}),k=_[0],C=_[1],A=k.isCalculated,x=k.page,E=k.pageHeight,w=k.pageWidth,S=Array(10).fill(null).map((function(e,t){return t/10})),P=w*h,R=E*h,T=Math.abs(u)%180==0,O=T?P:R,L=T?R:P,F=l||function(e){return i.createElement(i.Fragment,null,e.canvasLayer.children,e.textLayer.children,e.annotationLayer.children)},M=(u+k.viewportRotation)%360;return i.createElement(He,{onVisibilityChanged:function(e){var n=e.isVisible?e.ratio:0;v(s,n),e.isVisible&&!A&&t.getPage(s+1).then((function(e){var t=e.getViewport({scale:1});C({isCalculated:!0,page:e,pageHeight:t.height,pageWidth:t.width,viewportRotation:t.rotation})}))},threshold:S},i.createElement("div",{className:b.prefixClass+"-page-layer",style:{height:L+"px",width:O+"px"}},x?F({annotationLayer:{attrs:{},children:i.createElement(Ue,{doc:t,page:x,rotation:M,scale:h,onExecuteNamedAction:p,onJumpToDest:g})},canvasLayer:{attrs:{},children:i.createElement(qe,{height:L,page:x,pageIndex:s,rotation:M,scale:h,width:O,onCanvasLayerRender:f})},doc:t,height:L,pageIndex:s,rotation:u,scale:h,svgLayer:{attrs:{},children:i.createElement(ze,{height:L,page:x,rotation:M,scale:h,width:O})},textLayer:{attrs:{},children:i.createElement(Ye,{keywordRegexp:r,match:o,page:x,pageIndex:s,rotation:M,scale:h,onJumpToMatch:function(e,t,n){g(e,E-t,h)},onTextLayerRender:m})},width:O}):i.createElement(y,null)))},Je=i.createContext({}),Ke=function(){var e=a.useContext(Je),t=a.useContext(c);return i.createElement("div",{className:t.prefixClass+"-drop-area"},e.main.dragDropFile)},Qe=function(e){var t=e.numLoadedPages,n=e.numPages,r=e.onCancel,o=e.onStartPrinting,s=a.useContext(Je),l=a.useContext(c),u=Math.floor(100*t/n);return a.useEffect((function(){t===n&&o()}),[t]),i.createElement("div",{className:l.prefixClass+"-print-progress"},i.createElement("div",{className:l.prefixClass+"-print-progress-inner"},i.createElement("div",{className:l.prefixClass+"-print-progress-message"},s.printProgress.preparingDocument),i.createElement("div",{className:l.prefixClass+"-print-progress-bar"},i.createElement(v,{progress:u})),i.createElement(g,{onClick:r},s.printProgress.cancel)))};!function(e){e.Inactive="Inactive",e.Preparing="Preparing",e.Cancelled="Cancelled",e.Ready="Ready"}(de||(de={}));var Ze,$e=de,et=function(e){var t=e.page,n=e.pageHeight,r=e.pageWidth,o=e.rotation,s=e.onLoad,l=a.useContext(c),u=a.useRef(),h=a.useState(""),d=h[0],f=h[1];return a.useEffect((function(){var e=u.current;e&&e.cancel();var a=document.createElement("canvas");a.height=Math.floor(n*(150/72)),a.width=Math.floor(r*(150/72));var i=a.getContext("2d");i.save(),i.fillStyle="rgb(255, 255, 255)",i.fillRect(0,0,a.width,a.height),i.restore();var s=t.getViewport({rotation:o,scale:1});u.current=t.render({canvasContext:i,intent:"print",transform:[150/72,0,0,150/72,0,0],viewport:s}),u.current.promise.then((function(){"toBlob"in a?a.toBlob((function(e){f(URL.createObjectURL(e))})):f(a.toDataURL())}),(function(){}))}),[]),d?i.createElement("div",{className:l.prefixClass+"-print-page-thumbnail",style:{height:Math.floor(96*n/72)+"px",width:Math.floor(96*r/72)+"px"}},i.createElement("img",{src:d,style:{height:Math.floor(96*n/72)+"px",width:Math.floor(96*r/72)+"px"},onLoad:s})):i.createElement(y,null)},tt=function(e){var t=e.doc,n=e.pageHeight,r=e.pageIndex,o=e.pageWidth,s=e.rotation,c=e.onLoad,l=a.useState({height:n,page:null,viewportRotation:0,width:o}),u=l[0],h=l[1],d=u.page,f=u.height,p=u.width,g=Math.abs(s)%180==0;a.useEffect((function(){t.getPage(r+1).then((function(e){var t=e.getViewport({scale:1});h({height:t.height,page:e,viewportRotation:t.rotation,width:t.width})}))}),[]);var v=(s+u.viewportRotation)%360;return d?i.createElement(et,{page:d,pageHeight:g?f:p,pageWidth:g?p:f,rotation:v,onLoad:c}):i.createElement(y,null)},nt=function(e){var t=e.doc,n=e.pageHeight,r=e.pageWidth,o=e.printStatus,l=e.rotation,u=e.onCancel,h=e.onLoad,d=a.useContext(c),f=a.useState(0),p=f[0],g=f[1];a.useEffect((function(){o===$e.Ready&&(document.body.classList.add(d.prefixClass+"-body-printing"),window.print());var e=function(){o===$e.Ready&&(document.body.classList.remove(d.prefixClass+"-body-printing"),u())};return document.addEventListener("mousemove",e),function(){return document.removeEventListener("mousemove",e)}}),[o]);var v=t.numPages,m=function(){var e=p+1;g(e),h(e)};return s.createPortal(i.createElement(i.Fragment,null,i.createElement("div",{className:d.prefixClass+"-print-zone"},Array(v).fill(0).map((function(e,a){return i.createElement(tt,{key:a,doc:t,pageHeight:n,pageIndex:a,pageWidth:r,rotation:l,onLoad:m})}))),i.createElement("style",{dangerouslySetInnerHTML:{__html:"\n                            @supports ((size:A4) and (size:1pt 1pt)) {\n                                @page { size: "+r+"pt "+n+"pt }\n                            }\n                        "}})),document.body)},rt=function(e){var t=e.doc,n=e.pageHeight,r=e.pageWidth,o=e.printStatus,s=e.rotation,c=e.onCancel,l=e.onStartPrinting,u=a.useState(0),h=u[0],d=u[1],f=function(){d(0),c()};return i.createElement(i.Fragment,null,o===$e.Preparing&&i.createElement(Qe,{numLoadedPages:h,numPages:t.numPages,onCancel:f,onStartPrinting:function(){d(0),l()}}),(o===$e.Preparing||o===$e.Ready)&&i.createElement(nt,{doc:t,pageHeight:n,pageWidth:r,printStatus:o,rotation:s,onCancel:f,onLoad:d}))},at=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M10.515,9.514h3c0.552,0,1,0.448,1,1v3c0,0.552-0.448,1-1,1h-3c-0.552,0-1-0.448-1-1v-3\n                C9.515,9.962,9.963,9.514,10.515,9.514z\n                M0.531,23.499l6.984-6.985\n                M16.515,7.514L23.5,0.529\n                M21.515,7.514h-5v-5\n                M7.515,21.514v-5 h-5\n                M0.523,0.521l6.992,6.993\n                M16.515,16.514l6.985,6.985\n                M16.515,21.514v-5h5\n                M2.515,7.514h5v-5"}))},it=function(e){var t=e.onClick,n=a.useContext(c);return i.createElement("div",{className:n.prefixClass+"-exit-fullscreen"},i.createElement("div",{className:n.prefixClass+"-exit-fullscreen-inner"},i.createElement(u,{onClick:t},i.createElement(at,null))))},ot=function(e){var t=e.files,n=a.useContext(Je),r=a.useContext(c);return 0===t.length?i.createElement("div",{className:r.prefixClass+"-attachment-list-empty"},n.attachment.noAttachment):i.createElement("ul",{className:r.prefixClass+"-attachment-list"},t.map((function(e){return i.createElement("li",{className:r.prefixClass+"-attachment-item",key:"attachment-"+e.fileName,title:""+n.attachment.clickToDownload,onClick:function(){return me(e.fileName,e.data)}},e.fileName)})))},st=function(e){var t=e.doc,n=a.useState({files:[],isLoaded:!1}),r=n[0],o=n[1];return a.useEffect((function(){t.getAttachments().then((function(e){var t=e?Object.keys(e).map((function(t){return{data:e[t].content,fileName:e[t].filename}})):[];o({files:t,isLoaded:!0})}))}),[]),r.isLoaded?i.createElement(ot,{files:r.files}):i.createElement(y,null)},ct=function(e){var t=e.bookmark,n=e.depth,r=e.doc,o=e.onClick,s=e.onJumpToDest,l=a.useContext(c),u=a.createRef(),h=a.createRef(),d=a.useRef(!0),f=t.items&&t.items.length>0;return i.createElement(i.Fragment,null,i.createElement("div",{className:l.prefixClass+"-bookmark-item",style:{paddingLeft:20*n+4+"px"},onClick:function(){!f&&t.dest&&o(t.dest)}},f&&i.createElement("span",{ref:u,className:l.prefixClass+"-bookmark-toggle",onClick:function(){d.current=!d.current;var e=h.current,t=u.current;e&&t&&(e.style.display=d.current?"block":"none",t.classList.toggle(l.prefixClass+"-bookmark-toggle-expanded"))}},"\u25ba"),t.url?i.createElement("a",{className:l.prefixClass+"-bookmark-title",href:t.url,rel:"noopener noreferrer nofollow",target:t.newWindow?"_blank":""},t.title):i.createElement("div",{className:l.prefixClass+"-bookmark-title",onClick:function(){f&&t.dest&&o(t.dest)}},t.title)),f&&i.createElement("div",{ref:h},i.createElement(lt,{bookmarks:t.items,depth:n+1,doc:r,onJumpToDest:s})))},lt=function(e){var t=e.bookmarks,n=e.depth,r=void 0===n?0:n,o=e.doc,s=e.onJumpToDest,l=a.useContext(c),u=function(e){Ae(o,e).then((function(e){var t=e.pageIndex,n=e.bottomOffset,r=e.scaleTo;s(t+1,n,r)}))};return i.createElement("ul",{className:l.prefixClass+"-bookmark-list"},t.map((function(e,t){return i.createElement("li",{key:t},i.createElement(ct,{bookmark:e,depth:r,doc:o,onClick:u,onJumpToDest:s}))})))},ut=function(e){var t=e.doc,n=e.onJumpToDest,r=a.useContext(Je),o=a.useContext(c),s=a.useState({isLoaded:!1,items:[]}),l=s[0],u=s[1];return a.useEffect((function(){t.getOutline().then((function(e){u({isLoaded:!0,items:e||[]})}))}),[]),l.isLoaded?0===l.items.length?i.createElement("div",{className:o.prefixClass+"-bookmark-empty"},r.bookmark.noBookmark):i.createElement(lt,{bookmarks:l.items,depth:0,doc:t,onJumpToDest:n}):i.createElement(y,null)},ht=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M11.5,1.5h11c0.552,0,1,0.448,1,1v20c0,0.552-0.448,1-1,1h-21c-0.552,0-1-0.448-1-1v-20c0-0.552,0.448-1,1-1h3\n                M11.5,10.5c0,0.55-0.3,0.661-0.659,0.248L8,7.5l-2.844,3.246c-0.363,0.414-0.659,0.3-0.659-0.247v-9c0-0.552,0.448-1,1-1h5\n                c0.552,0,1,0.448,1,1L11.5,10.5z\n                M14.5,6.499h6\n                M14.5,10.499h6\n                M3.5,14.499h17\n                M3.5,18.499h16.497"}))},dt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M7.618,15.345l8.666-8.666c0.78-0.812,2.071-0.838,2.883-0.058s0.838,2.071,0.058,2.883\n                c-0.019,0.02-0.038,0.039-0.058,0.058L7.461,21.305c-1.593,1.593-4.175,1.592-5.767,0s-1.592-4.175,0-5.767c0,0,0,0,0,0\n                L13.928,3.305c2.189-2.19,5.739-2.19,7.929-0.001s2.19,5.739,0,7.929l0,0L13.192,19.9"}))},ft=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M10.5,9.5c0,0.552-0.448,1-1,1h-8c-0.552,0-1-0.448-1-1v-8c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1V9.5z\n                M23.5,9.5c0,0.552-0.448,1-1,1h-8c-0.552,0-1-0.448-1-1v-8c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1V9.5z\n                M10.5,22.5 c0,0.552-0.448,1-1,1h-8c-0.552,0-1-0.448-1-1v-8c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1V22.5z\n                M23.5,22.5c0,0.552-0.448,1-1,1 h-8c-0.552,0-1-0.448-1-1v-8c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1V22.5z"}))},pt=function(e){var t=e.page,n=e.pageHeight,r=e.pageWidth,o=e.rotation,s=e.thumbnailHeight,c=e.thumbnailWidth,l=a.useRef(),u=a.useState(""),h=u[0],d=u[1];return a.useEffect((function(){var e=l.current;e&&e.cancel();var a=document.createElement("canvas"),i=a.getContext("2d",{alpha:!1}),s=c,u=s/(r/n),h=s/r;a.height=u,a.width=s,a.style.height=u+"px",a.style.width=s+"px";var f=t.getViewport({rotation:o,scale:h});l.current=t.render({canvasContext:i,viewport:f}),l.current.promise.then((function(){return d(a.toDataURL())}),(function(){}))}),[o]),h?i.createElement("img",{src:h,height:s+"px",width:c+"px"}):i.createElement(y,null)},gt=function(e){var t=e.doc,n=e.pageHeight,r=e.pageIndex,o=e.pageWidth,s=e.rotation,l=a.useContext(c),u=a.useState({height:n,isCalculated:!1,page:null,viewportRotation:0,width:o}),h=u[0],d=u[1],f=h.isCalculated,p=h.page,g=h.height,v=h.width,m=v/g,b=Math.abs(s)%180==0,_=b?100:100/m,k=b?100/m:100,C=(s+h.viewportRotation)%360;return i.createElement(He,{onVisibilityChanged:function(e){e.isVisible&&!f&&t.getPage(r+1).then((function(e){var t=e.getViewport({scale:1});d({height:t.height,isCalculated:!0,page:e,viewportRotation:t.rotation,width:t.width})}))}},i.createElement("div",{className:l.prefixClass+"-thumbnail-container",style:{height:k+"px",width:_+"px"}},p?i.createElement(pt,{page:p,pageHeight:b?g:v,pageWidth:b?v:g,rotation:C,thumbnailHeight:k,thumbnailWidth:_}):i.createElement(y,null)))},vt=function(e){var t=e.currentPage,n=e.doc,r=e.pageHeight,o=e.pageWidth,s=e.rotation,u=e.onJumpToPage,h=a.useContext(c),d=n.numPages;return i.createElement(i.Fragment,null,Array(d).fill(0).map((function(e,a){var c;return i.createElement("div",{key:"thumbnail-"+a},i.createElement("div",{className:l((c={},c[h.prefixClass+"-thumbnail"]=!0,c[h.prefixClass+"-thumbnail-selected"]=t===a,c)),onClick:function(){return u(a)}},i.createElement(gt,{doc:n,pageHeight:r,pageIndex:a,pageWidth:o,rotation:s})))})))};!function(e){e.Attachment="Attachment",e.Bookmark="Bookmark",e.Thumbnail="Thumbnail"}(Ze||(Ze={}));var mt={left:0,top:8},yt=function(e){var t,n=e.currentPage,r=e.doc,o=e.height,s=e.rotation,h=e.width,d=e.onJumpToDest,f=e.onJumpToPage,p=a.useContext(Je),g=a.useContext(c),v=a.useState(Ze.Thumbnail),m=v[0],y=v[1];return i.createElement("div",{className:g.prefixClass+"-sidebar"},i.createElement("div",{className:g.prefixClass+"-sidebar-tabs"},i.createElement("div",{className:g.prefixClass+"-sidebar-tab"},i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:function(){return y(Ze.Thumbnail)},isSelected:m===Ze.Thumbnail},i.createElement(ft,null)),content:function(){return p.sidebar.thumbnail},offset:mt})),i.createElement("div",{className:g.prefixClass+"-sidebar-tab"},i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:function(){return y(Ze.Bookmark)},isSelected:m===Ze.Bookmark},i.createElement(ht,null)),content:function(){return p.sidebar.bookmark},offset:mt})),i.createElement("div",{className:g.prefixClass+"-sidebar-tab"},i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:function(){return y(Ze.Attachment)},isSelected:m===Ze.Attachment},i.createElement(dt,null)),content:function(){return p.sidebar.attachment},offset:mt}))),i.createElement("div",{className:l((t={},t[g.prefixClass+"-sidebar-content"]=!0,t[g.prefixClass+"-sidebar-thumbnails"]=m===Ze.Thumbnail,t))},m===Ze.Thumbnail&&i.createElement(vt,{currentPage:n,doc:r,pageHeight:o,pageWidth:h,rotation:s,onJumpToPage:f}),m===Ze.Bookmark&&i.createElement(ut,{doc:r,onJumpToDest:d}),m===Ze.Attachment&&i.createElement(st,{doc:r})))},bt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M2.32,2.966h19.452c0.552,0.001,1,0.449,0.999,1.001c0,0.182-0.05,0.36-0.144,0.516L12.9,20.552\n                c-0.286,0.472-0.901,0.624-1.373,0.338c-0.138-0.084-0.254-0.2-0.338-0.338L1.465,4.483C1.179,4.01,1.331,3.396,1.804,3.11\n                C1.96,3.016,2.138,2.966,2.32,2.966z"}))},_t=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M17.5,11.5c3.314,0,6,2.686,6,6s-2.686,6-6,6s-6-2.686-6-6S14.186,11.5,17.5,11.5z\n                M17.5,14.5v6\n                M17.5,20.5\n                l-2.25-2.25\n                M17.5,20.5l2.25-2.25\n                M10.5,23.5h-9c-0.552,0-1-0.448-1-1v-21c0-0.552,0.448-1,1-1h13.293\n                c0.265,0,0.52,0.105,0.707,0.293L19.207,4.5C19.395,4.687,19.5,4.942,19.5,5.207V8.5"}))},kt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M15.5,8.499l8-8\n                M0.5,23.499l8-8\n                M5.5,23.499h-5v-5\n                M23.5,5.499v-5h-5\n                M15.5,15.499l8,8\n                M0.5,0.499l8,8\n                M0.5,5.499v-5h5\n                M18.5,23.499h5v-5"}))},Ct=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M11.5,5.5v-2C11.5,2.672,12.172,2,13,2s1.5,0.672,1.5,1.5v2 M14.5,11.5v-6C14.5,4.672,15.172,4,16,4\n                c0.828,0,1.5,0.672,1.5,1.5v3 M17.5,13V8.5C17.5,7.672,18.172,7,19,7s1.5,0.672,1.5,1.5v10c0,2.761-2.239,5-5,5h-3.335\n                c-1.712-0.001-3.305-0.876-4.223-2.321C6.22,18.467,4.083,14,4.083,14c-0.378-0.545-0.242-1.292,0.303-1.67\n                c0.446-0.309,1.044-0.281,1.458,0.07L8.5,15.5v-10C8.5,4.672,9.172,4,10,4s1.5,0.672,1.5,1.5v6"}))},At=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M6.5,21.5c0,0.552-0.448,1-1,1h-4c-0.552,0-1-0.448-1-1v-20c0-0.552,0.448-1,1-1h4c0.552,0,1,0.448,1,1V21.5z\n                M14.5,21.5c0,0.552-0.448,1-1,1h-4c-0.552,0-1-0.448-1-1v-20c0-0.552,0.448-1,1-1h4c0.552,0,1,0.448,1,1V21.5z\n                M22.5,21.5 c0,0.552-0.448,1-1,1h-4c-0.552,0-1-0.448-1-1v-20c0-0.552,0.448-1,1-1h4c0.552,0,1,0.448,1,1V21.5z"}))},xt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M12,1.001c6.075,0,11,4.925,11,11s-4.925,11-11,11s-11-4.925-11-11S5.925,1.001,12,1.001z\n                M14.5,17.005H13\n                c-0.552,0-1-0.448-1-1v-6.5c0-0.276-0.224-0.5-0.5-0.5H10\n                M11.745,6.504L11.745,6.504\n                M11.745,6.5c-0.138,0-0.25,0.112-0.25,0.25\n                S11.607,7,11.745,7s0.25-0.112,0.25-0.25S11.883,6.5,11.745,6.5"}))},Et=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M1.5,0.497h20c0.552,0,1,0.448,1,1v20c0,0.552-0.448,1-1,1h-20c-0.552,0-1-0.448-1-1v-20\n                C0.5,0.945,0.948,0.497,1.5,0.497z\n                M7.5,0.497v22"}))},wt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M0.541,5.627L11.666,18.2c0.183,0.207,0.499,0.226,0.706,0.043c0.015-0.014,0.03-0.028,0.043-0.043\n                L23.541,5.627"}))},St=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M23.535,18.373L12.409,5.8c-0.183-0.207-0.499-0.226-0.706-0.043C11.688,5.77,11.674,5.785,11.66,5.8\n                L0.535,18.373"}))},Pt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M7.5,19.499h9 M7.5,16.499h9 M5.5,16.5h-3c-1.103-0.003-1.997-0.897-2-2v-6c0.003-1.103,0.897-1.997,2-2h19\n                c1.103,0.003,1.997,0.897,2,2v6c-0.003,1.103-0.897,1.997-2,2h-3\n                M5.5,4.5v-4h9.586c0.265,0,0.52,0.105,0.707,0.293l2.414,2.414\n                C18.395,3.394,18.5,3.649,18.5,3.914V4.5\n                M18.5,22.5c0,0.552-0.448,1-1,1h-11c-0.552,0-1-0.448-1-1v-9h13V22.5z\n                M3.5,8.499\n                c0.552,0,1,0.448,1,1s-0.448,1-1,1s-1-0.448-1-1S2.948,8.499,3.5,8.499z\n                M14.5,0.499v4h4"}))},Rt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M3.434,10.537c0.141-0.438,0.316-0.864,0.523-1.274\n                M3.069,14.425C3.023,14.053,3,13.679,3,13.305 c0-0.291,0.014-0.579,0.041-0.863\n                M4.389,18.111c-0.341-0.539-0.623-1.112-0.843-1.711\n                M7.163,20.9 c-0.543-0.345-1.048-0.747-1.506-1.2\n                M10.98,22.248c-0.65-0.074-1.29-0.218-1.909-0.431\n                M10,4.25h2 c4.987,0.015,9.017,4.069,9.003,9.055c-0.013,4.581-3.456,8.426-8.008,8.945\n                M13.5,1.75L10,4.25l3.5,2.5"}))},Tt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M20.566,10.537c-0.141-0.438-0.316-0.864-0.523-1.274\n                M20.931,14.425C20.977,14.053,21,13.679,21,13.305 c0-0.291-0.014-0.579-0.041-0.863\n                M19.611,18.111c0.341-0.539,0.624-1.114,0.843-1.713\n                M16.837,20.9 c0.543-0.345,1.048-0.747,1.506-1.2\n                M13.02,22.248c0.65-0.074,1.29-0.218,1.909-0.431\n                M14,4.25h-2 c-4.987,0.015-9.017,4.069-9.003,9.055c0.013,4.581,3.456,8.426,8.008,8.945\n                M10.5,1.75l3.5,2.5l-3.5,2.5"}))},Ot=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M13.675,11.671l2.941-2.941c0.195-0.196,0.195-0.512-0.001-0.707C16.563,7.971,16.5,7.931,16.43,7.906\n                L4.168,3.527C3.908,3.434,3.622,3.57,3.529,3.83c-0.039,0.109-0.039,0.228,0,0.336l4.379,12.262\n                c0.093,0.26,0.379,0.396,0.639,0.303c0.07-0.025,0.133-0.065,0.185-0.117l2.943-2.943l6.146,6.146c0.195,0.195,0.512,0.195,0.707,0\n                l1.293-1.293c0.195-0.195,0.195-0.512,0-0.707L13.675,11.671z"}))},Lt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M21.783,21.034H2.332c-0.552,0-1-0.448-1-1c0-0.182,0.05-0.361,0.144-0.517L11.2,3.448\n                c0.286-0.472,0.901-0.624,1.373-0.338c0.138,0.084,0.254,0.2,0.338,0.338l9.726,16.069c0.286,0.473,0.134,1.087-0.339,1.373\n                C22.143,20.984,21.965,21.034,21.783,21.034z"}))},Ft=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M23.5,5.5c0,0.552-0.448,1-1,1h-21c-0.552,0-1-0.448-1-1v-3c0-0.552,0.448-1,1-1h21c0.552,0,1,0.448,1,1V5.5z\n                M23.5,13.5c0,0.552-0.448,1-1,1h-21c-0.552,0-1-0.448-1-1v-3c0-0.552,0.448-1,1-1h21c0.552,0,1,0.448,1,1V13.5z\n                M23.5,21.5 c0,0.552-0.448,1-1,1h-21c-0.552,0-1-0.448-1-1v-3c0-0.552,0.448-1,1-1h21c0.552,0,1,0.448,1,1V21.5z"}))},Mt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M10.5,0.499c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.499,10.5,0.499z\n                M23.5,23.499\n                l-5.929-5.929\n                M5.5,10.499h10\n                M10.5,5.499v10"}))},Nt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M10.5,0.499c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.499,10.5,0.499z\n                M23.5,23.499\n                l-5.929-5.929\n                M5.5,10.499h10"}))},It=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M4.5,8.5H14\n                M4.5,11.5h6\n                M4.5,5.5h7\n                M4.5,14.5h4\n                M4.5,17.5h4\n                M10.5,23.5h-9c-0.552,0-1-0.448-1-1v-21\n                c0-0.552,0.448-1,1-1h13.293c0.265,0,0.52,0.105,0.707,0.293L19.207,4.5C19.395,4.687,19.5,4.942,19.5,5.207V8.5\n                M17.5,11.5\n                c3.314,0,6,2.686,6,6s-2.686,6-6,6s-6-2.686-6-6S14.186,11.5,17.5,11.5z\n                M17.5,20.5v-6\n                M17.5,14.5l-2.25,2.25\n                M17.5,14.5l2.25,2.25"}))},Dt={left:0,top:8},jt=function(e){var t=e.onOpenFiles,n=a.useContext(Je),r=a.useContext(c);return i.createElement(H,{position:M.BottomCenter,target:i.createElement("div",{className:r.prefixClass+"-open-file"},i.createElement("input",{className:r.prefixClass+"-open-file-input",multiple:!1,type:"file",title:"",onChange:function(e){var n=e.target.files;n&&t(n)}}),i.createElement(It,null)),content:function(){return n.toolbar.openFile},offset:Dt})},Bt=function(e){var t=e.doc,n=e.render,r=a.useContext(c),o=a.useState(),s=o[0],l=o[1];return a.useEffect((function(){t.getMetadata().then((function(e){return Promise.resolve(e)})).then((function(e){return t.getDownloadInfo().then((function(t){return Promise.resolve({fileName:e.contentDispositionFilename||"",info:e.info,length:t.length})}))})).then((function(e){l(e)}))}),[]),s?n(s):i.createElement("div",{className:r.prefixClass+"-properties-loader"},i.createElement(y,null))},Ut=function(e){var t=e.label,n=e.value,r=a.useContext(c);return i.createElement("dl",{className:r.prefixClass+"-property-item"},i.createElement("dt",{className:r.prefixClass+"-property-item-label"},t,":"),i.createElement("dd",{className:r.prefixClass+"-property-item-value"},n||"-"))},Ht=function(e){var t=e.doc,n=e.fileName,r=e.onToggle,o=a.useContext(Je),s=a.useContext(c),l=function(e){var t=ue(e);return t?t.toLocaleDateString()+", "+t.toLocaleTimeString():""};return i.createElement("div",{className:s.prefixClass+"-properties-modal"},i.createElement(Bt,{doc:t,render:function(e){return i.createElement(i.Fragment,null,i.createElement("div",{className:s.prefixClass+"-properties-modal-group"},i.createElement(Ut,{label:""+o.property.fileName,value:e.fileName||ve(n)}),i.createElement(Ut,{label:""+o.property.fileSize,value:(r=e.length,a=Math.floor(Math.log(r)/Math.log(1024)),(r/Math.pow(1024,a)).toFixed(2)+" "+["B","kB","MB","GB","TB"][a])})),i.createElement(m,null),i.createElement("div",{className:s.prefixClass+"-properties-modal-group"},i.createElement(Ut,{label:""+o.property.title,value:e.info.Title}),i.createElement(Ut,{label:""+o.property.author,value:e.info.Author}),i.createElement(Ut,{label:""+o.property.subject,value:e.info.Subject}),i.createElement(Ut,{label:""+o.property.keywords,value:e.info.Keywords}),i.createElement(Ut,{label:""+o.property.creator,value:e.info.Creator}),i.createElement(Ut,{label:""+o.property.creationDate,value:l(e.info.CreationDate)}),i.createElement(Ut,{label:""+o.property.modificationDate,value:l(e.info.ModDate)})),i.createElement(m,null),i.createElement("div",{className:s.prefixClass+"-properties-modal-group"},i.createElement(Ut,{label:""+o.property.pdfProducer,value:e.info.Producer}),i.createElement(Ut,{label:""+o.property.pdfVersion,value:e.info.PDFFormatVersion}),i.createElement(Ut,{label:""+o.property.pageCount,value:""+t.numPages})));var r,a}}),i.createElement("div",{className:s.prefixClass+"-properties-modal-footer"},i.createElement(g,{onClick:r},o.property.close)))},Wt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M10.5,0.5c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.5,10.5,0.5z\n                M23.5,23.5\n                l-5.929-5.929"}))},qt=new RegExp(" "),zt={left:0,top:8},Gt=function(e){var t=e.doc,n=e.onJumpToMatch,r=e.onSearchFor,o=a.useContext(c),s=t.numPages,l=Array(s).fill(0).map((function(e,t){return t})),h=a.useContext(Je),d=a.useState(""),f=d[0],p=d[1],v=a.useState([]),m=v[0],y=v[1],b=a.useState(0),_=b[0],k=b[1],C=a.useState(!1),A=C[0],x=C[1],E=a.useState(!1),w=E[0],S=E[1],P=a.useRef([]),R=function(e){p(e.target.value)},T=function(e,a,i){var o,s=function(e,t,n){return new RegExp(n?" "+e+" ":e,t?"g":"gi")}(e,a,i);r(s),k(0),y([]),(0===P.current.length?(o=l.map((function(e){return t.getPage(e+1).then((function(e){return e.getTextContent()})).then((function(t){var n=t.items.map((function(e){return e.str||""})).join("");return Promise.resolve({pageContent:n,pageIndex:e})}))})),Promise.all(o).then((function(e){return e.sort((function(e,t){return e.pageIndex-t.pageIndex})),Promise.resolve(e.map((function(e){return e.pageContent})))}))).then((function(e){return P.current=e,Promise.resolve(e)})):Promise.resolve(P.current)).then((function(e){var t=[];e.forEach((function(e,n){for(var r=(e.match(s)||[]).length,a=0;a<r;a++)t.push({matchIndex:a,pageIndex:n})})),y(t),t.length>0&&(k(1),n(t[0]))}))},O=function(e){13===e.keyCode&&f&&T(f,A,w)},L=function(){var e=_-1,t=e>0?e:m.length;k(t),n(m[t-1])},F=function(){var e=_+1,t=e<=m.length?e:1;k(t),n(m[t-1])},N=function(e){var t=e.target.checked;x(t),f&&T(f,t,w)},I=function(e){var t=e.target.checked;S(t),f&&T(f,A,t)},D=function(){return h.toolbar.search},j=function(){return h.search.previousMatch},U=function(){return h.search.nextMatch};return i.createElement(B,{position:M.BottomLeft,target:function(e,t){return i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:e,isSelected:t},i.createElement(Wt,null)),content:D,offset:zt})},content:function(e){return i.createElement("div",{className:o.prefixClass+"-search-popover"},i.createElement("div",{className:o.prefixClass+"-search-popover-input-counter"},i.createElement("input",{className:o.prefixClass+"-search-popover-input",placeholder:""+h.search.enterToSearch,type:"text",value:f,onChange:R,onKeyDown:O}),i.createElement("div",{className:o.prefixClass+"-search-popover-counter"},_,"/",m.length)),i.createElement("label",{className:o.prefixClass+"-search-popover-label"},i.createElement("input",{className:o.prefixClass+"-search-popover-label-checkbox",checked:A,type:"checkbox",onChange:N})," ",h.search.matchCase),i.createElement("label",{className:o.prefixClass+"-search-popover-label"},i.createElement("input",{className:o.prefixClass+"-search-popover-label-checkbox",checked:w,type:"checkbox",onChange:I})," ",h.search.wholeWords),i.createElement("div",{className:o.prefixClass+"-search-popover-footer"},i.createElement("div",{className:o.prefixClass+"-search-popover-footer-item"},i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:L},i.createElement(St,null)),content:j,offset:zt})),i.createElement("div",{className:o.prefixClass+"-search-popover-footer-item"},i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:F},i.createElement(wt,null)),content:U,offset:zt})),i.createElement("div",{className:o.prefixClass+"-search-popover-footer-button"},i.createElement(g,{onClick:function(){e(),r(qt),p(""),k(0),y([]),x(!1),S(!1)}},h.search.close))))},offset:zt,closeOnClickOutside:!1,closeOnEscape:!0})},Vt=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.3,1.5,1.7,1.9,2.1,2.4,2.7,3,3.3,3.7,4.1,4.6,5.1,5.7,6.3,7,7.7,8.5,9.4,10],Yt=function(e){var t=Vt.findIndex((function(t){return t>=e}));return-1===t||0===t?e:Vt[t-1]},Xt=function(e){var t=e.children,n=a.useContext(c);return i.createElement("ul",{className:n.prefixClass+"-menu"},t)},Jt=[.5,.75,1,1.25,1.5,2,3,4],Kt={left:0,top:8},Qt=function(e){var t=e.scale,n=e.onZoom,r=a.useContext(Je),o=a.useContext(c);return i.createElement(B,{position:M.BottomCenter,target:function(e){return i.createElement("span",{className:o.prefixClass+"-zoom-popover-target",onClick:function(){e()}},i.createElement("span",{className:o.prefixClass+"-zoom-popover-target-scale"},Math.round(100*t),"%"),i.createElement("span",{className:o.prefixClass+"-zoom-popover-target-arrow"}))},content:function(e){return i.createElement(Xt,null,Object.keys(Y).map((function(t){var a=t;return i.createElement(p,{key:a,onClick:function(){e(),n(a)}},function(e){switch(e){case Y.ActualSize:return r.zoom.actualSize;case Y.PageFit:return r.zoom.pageFit;case Y.PageWidth:return r.zoom.pageWidth}}(a))})),i.createElement(h,null),Jt.map((function(t){return i.createElement(p,{key:t,onClick:function(){e(),n(t)}},Math.round(100*t)+"%")})))},offset:Kt,closeOnClickOutside:!0,closeOnEscape:!0})},Zt=function(){return i.createElement(d,{size:16},i.createElement("path",{d:"M12,0.5c1.381,0,2.5,1.119,2.5,2.5S13.381,5.5,12,5.5S9.5,4.381,9.5,3S10.619,0.5,12,0.5z\n                M12,9.5\n                c1.381,0,2.5,1.119,2.5,2.5s-1.119,2.5-2.5,2.5S9.5,13.381,9.5,12S10.619,9.5,12,9.5z\n                M12,18.5c1.381,0,2.5,1.119,2.5,2.5\n                s-1.119,2.5-2.5,2.5S9.5,22.381,9.5,21S10.619,18.5,12,18.5z"}))},$t={left:0,top:8},en=function(e){var t=e.doc,n=e.fileName,r=e.scrollMode,o=e.selectionMode,s=e.onChangeScrollMode,c=e.onChangeSelectionMode,l=e.onJumpToFirstPage,d=e.onJumpToLastPage,f=e.onRotate,g=a.useContext(Je),v=function(){return g.toolbar.moreActions},m=function(e){return i.createElement(p,{icon:i.createElement(xt,null),onClick:e},g.toolbar.documentProperties)},y=function(e){return i.createElement(Ht,{doc:t,fileName:n,onToggle:e})};return i.createElement(B,{position:M.BottomRight,target:function(e,t){return i.createElement(H,{position:M.BottomRight,target:i.createElement(u,{onClick:e,isSelected:t},i.createElement(Zt,null)),content:v,offset:$t})},content:function(e){var t=function(t){e(),s(t)};return i.createElement(Xt,null,i.createElement(p,{icon:i.createElement(Lt,null),onClick:function(){e(),l()}},g.toolbar.goToFirstPage),i.createElement(p,{icon:i.createElement(bt,null),onClick:function(){e(),d()}},g.toolbar.goToLastPage),i.createElement(h,null),i.createElement(p,{icon:i.createElement(Tt,null),onClick:function(){e(),f(90)}},g.toolbar.rotateForward),i.createElement(p,{icon:i.createElement(Rt,null),onClick:function(){e(),f(-90)}},g.toolbar.rotateBackward),i.createElement(h,null),i.createElement(p,{checked:o===G.Text,icon:i.createElement(Ot,null),onClick:function(){e(),c(G.Text)}},g.toolbar.textSelectionTool),i.createElement(p,{checked:o===G.Hand,icon:i.createElement(Ct,null),onClick:function(){e(),c(G.Hand)}},g.toolbar.handTool),i.createElement(h,null),i.createElement(p,{checked:r===q.Vertical,icon:i.createElement(Ft,null),onClick:function(){return t(q.Vertical)}},g.toolbar.verticalScrolling),i.createElement(p,{checked:r===q.Horizontal,icon:i.createElement(At,null),onClick:function(){return t(q.Horizontal)}},g.toolbar.horizontalScrolling),i.createElement(p,{checked:r===q.Wrapped,icon:i.createElement(ft,null),onClick:function(){return t(q.Wrapped)}},g.toolbar.wrappedScrolling),i.createElement(h,null),i.createElement(L,{target:m,content:y,closeOnClickOutside:!0,closeOnEscape:!0}))},offset:$t,closeOnClickOutside:!0,closeOnEscape:!0})},tn={left:0,top:8},nn=function(e){var t=e.currentPage,n=e.doc,r=e.fileName,o=e.scale,s=e.scrollMode,l=e.selectionMode,h=e.onChangeScrollMode,d=e.onChangeSelectionMode,f=e.onDownload,p=e.onFullScreen,g=e.onJumpTo,v=e.onJumpToMatch,m=e.onOpenFiles,y=e.onPrint,b=e.onRotate,_=e.onSearchFor,k=e.onToggleSidebar,C=e.onZoom,A=e.renderToolbar,x=a.useContext(Je),E=a.useContext(c),w=a.useState(!1),S=w[0],P=w[1],R=a.useState(t),T=R[0],O=R[1],F=a.useState(!1),N=F[0],I=F[1],D=n.numPages,j=function(){var e=t+1;e<D&&(O(e),g(e))},B=function(){var e=t-1;e>=0&&(O(e),g(e))},U=function(){return g(0)},W=function(){return g(D-1)},z=function(){return x.toolbar.documentProperties};return A({currentPage:t,currentPageInput:i.createElement("input",{className:E.prefixClass+"-toolbar-current-page-input",type:"text",value:S?T+1:t+1,onChange:function(e){var t=parseInt(e.target.value,10);t>0&&t<=D&&O(t-1)},onFocus:function(){P(!0),O(t)},onBlur:function(){P(!1)},onKeyDown:function(e){switch(e.keyCode){case 38:B();break;case 40:j();break;case 13:g(T)}}}),documentPropertiesButton:i.createElement(L,{target:function(e){return i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:e},i.createElement(xt,null)),content:z,offset:tn})},content:function(e){return i.createElement(Ht,{doc:n,fileName:r,onToggle:e})},closeOnClickOutside:!0,closeOnEscape:!0}),downloadButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:f},i.createElement(_t,null)),content:function(){return x.toolbar.download},offset:tn}),fullScreenButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:p},i.createElement(kt,null)),content:function(){return x.toolbar.fullScreen},offset:tn}),goToFirstPageButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:U},i.createElement(Lt,null)),content:function(){return x.toolbar.goToFirstPage},offset:tn}),goToLastPageButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:W},i.createElement(bt,null)),content:function(){return x.toolbar.goToLastPage},offset:tn}),handToolButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:function(){return d(G.Hand)},isSelected:l===G.Hand},i.createElement(Ct,null)),content:function(){return x.toolbar.handTool},offset:tn}),horizontalScrollingButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:function(){return h(q.Horizontal)},isSelected:s===q.Horizontal},i.createElement(At,null)),content:function(){return x.toolbar.horizontalScrolling},offset:tn}),moreActionsPopover:i.createElement(en,{doc:n,fileName:r,scrollMode:s,selectionMode:l,onChangeScrollMode:h,onChangeSelectionMode:d,onJumpToFirstPage:U,onJumpToLastPage:W,onRotate:b}),nextPageButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:j},i.createElement(wt,null)),content:function(){return x.toolbar.nextPage},offset:tn}),numPages:D,openFileButton:i.createElement(jt,{onOpenFiles:m}),previousPageButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:B},i.createElement(St,null)),content:function(){return x.toolbar.previousPage},offset:tn}),printButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:y},i.createElement(Pt,null)),content:function(){return x.toolbar.print},offset:tn}),rotateClockwiseButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:function(){return b(90)}},i.createElement(Tt,null)),content:function(){return x.toolbar.rotateForward},offset:tn}),rotateCounterclockwiseButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:function(){return b(-90)}},i.createElement(Rt,null)),content:function(){return x.toolbar.rotateBackward},offset:tn}),searchPopover:i.createElement(Gt,{doc:n,onJumpToMatch:v,onSearchFor:_}),textSelectionButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:function(){return d(G.Text)},isSelected:l===G.Text},i.createElement(Ot,null)),content:function(){return x.toolbar.textSelectionTool},offset:tn}),toggleSidebarButton:i.createElement(H,{position:M.BottomLeft,target:i.createElement(u,{onClick:function(){I(!N),k()},isSelected:N},i.createElement(Et,null)),content:function(){return x.toolbar.toggleSidebar},offset:tn}),verticalScrollingButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:function(){return h(q.Vertical)},isSelected:s===q.Vertical},i.createElement(Ft,null)),content:function(){return x.toolbar.verticalScrolling},offset:tn}),zoomInButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:function(){var e,t=(e=o,Vt.find((function(t){return t>e}))||e);C(t)}},i.createElement(Mt,null)),content:function(){return x.toolbar.zoomIn},offset:tn}),zoomOutButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:function(){var e=Yt(o);C(e)}},i.createElement(Nt,null)),content:function(){return x.toolbar.zoomOut},offset:tn}),zoomPopover:i.createElement(Qt,{scale:o,onZoom:C}),wrappedScrollingButton:i.createElement(H,{position:M.BottomCenter,target:i.createElement(u,{onClick:function(){return h(q.Wrapped)},isSelected:s===q.Wrapped},i.createElement(ft,null)),content:function(){return x.toolbar.wrappedScrolling},offset:tn})})},rn=new RegExp(" "),an=function(e){var t=e.defaultScale,n=e.doc,r=e.file,o=e.initialPage,s=e.keyword,l=e.layout,u=e.pageSize,h=e.render,d=e.renderPage,f=e.selectionMode,p=e.onCanvasLayerRender,g=e.onDocumentLoad,v=e.onOpenFile,m=e.onPageChange,y=e.onTextLayerRender,b=e.onZoom,_=a.useContext(c),k=a.useRef(null),C=a.useRef(null),A=a.useState(u.scale),x=A[0],E=A[1],w=a.useState(0),S=w[0],P=w[1],R=a.useState(0),O=R[0],L=R[1],F=a.useState(s?"string"==typeof s?new RegExp(s):s:rn),M=F[0],N=F[1],I=a.useState({matchIndex:-1,pageIndex:-1}),D=I[0],j=I[1],B=a.useState(q.Vertical),U=B[0],H=B[1],W=a.useState(f),z=W[0],V=W[1],X=function(e){var t=a.useContext(c),n=a.useState(!1),r=n[0],i=n[1],o=a.useRef({top:0,left:0,x:0,y:0}),s=function(t){var n=e.current;n&&(n.scrollTop=o.current.top-(t.clientY-o.current.y),n.scrollLeft=o.current.left-(t.clientX-o.current.x))},l=function n(){var r=e.current;r&&(r.classList.add(t.prefixClass+"-grab"),r.classList.remove(t.prefixClass+"-grabbing"),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",n))},u=function(n){var a=e.current;r&&a&&(a.classList.remove(t.prefixClass+"-grab"),a.classList.add(t.prefixClass+"-grabbing"),n.preventDefault(),n.stopPropagation(),o.current={left:a.scrollLeft,top:a.scrollTop,x:n.clientX,y:n.clientY},document.addEventListener("mousemove",s),document.addEventListener("mouseup",l))};return a.useEffect((function(){var n=e.current;if(n)return r?n.classList.add(t.prefixClass+"-grab"):n.classList.remove(t.prefixClass+"-grab"),n.addEventListener("mousedown",u),function(){n.removeEventListener("mousedown",u)}}),[r]),{toggleDragScroll:i}}(C).toggleDragScroll,J=ne(C),K=J.isFullScreen,Q=J.openFullScreen,Z=J.closeFullScreen,$=T(),ee=n.numPages,te=u.pageWidth,re=u.pageHeight,ae=Array(ee).fill(null),ie=ae.map((function(){return 0})),oe=ae.map((function(){return a.useRef()})),se=function(e){if(0!==e.length){var t,n,r=e[0];"pdf"===(t=r.name,n=t.split(/\./).pop(),n?n.toLowerCase():"").toLowerCase()&&new Promise((function(e){var t=new FileReader;t.readAsArrayBuffer(r),t.onload=function(){var n=new Uint8Array(t.result);e(n)}})).then((function(e){v(r.name,e)}))}},ce=function(e,t){var n=a.useRef(0),r=a.useState(!1),i=r[0],o=r[1],s=function(e){e.preventDefault(),o(!1),n.current=0,e.dataTransfer&&function(e){se(e)}(e.dataTransfer.files)},c=function(e){e.preventDefault()},l=function(e){e.preventDefault(),n.current+=1,n.current<=1&&o(!0)},u=function(e){e.preventDefault(),n.current-=1,n.current<=0&&o(!1)};return a.useEffect((function(){var t=e.current;if(t)return t.addEventListener("drop",s),t.addEventListener("dragover",c),t.addEventListener("dragenter",l),t.addEventListener("dragleave",u),function(){t.removeEventListener("drop",s),t.removeEventListener("dragover",c),t.removeEventListener("dragenter",l),t.removeEventListener("dragleave",u)}}),[e.current]),{isDragging:i}}(k).isDragging,le=a.useState($e.Inactive),ue=le[0],he=le[1],de=function(e){if(!(e<0||e>=ee)){P(e);var t=C.current,n=oe[e].current;t&&n&&(t.scrollTop=n.offsetTop)}};a.useEffect((function(){g({doc:n}),o&&de(o)}),[]),a.useEffect((function(){m({currentPage:S,doc:n})}),[S]);var fe=function(e){X(e===G.Hand),V(e)},pe=function(){me(r.name,r.data)},ge=function(e){var t=C.current;if(t){var r=1;switch(e){case Y.ActualSize:r=1;break;case Y.PageFit:r=Math.min((t.offsetWidth-17)/te,(t.offsetHeight-16)/re);break;case Y.PageWidth:r=(t.offsetWidth-17)/te;break;default:r=e}E(r),b({doc:n,scale:r})}};a.useEffect((function(){f===G.Hand&&X(!0),t&&ge(t)}),[]);var ve=function(e,t){ie[e]=t;var n=ie.reduce((function(e,t,n,r){return t>r[e]?n:e}),0);P(n)},ye=function(e){L(360===O||-360===O?e:O+e)},be=function(e){var t=C.current;if(t){switch(e){case q.Vertical:t.classList.add(_.prefixClass+"-inner-pages-vertical"),t.classList.remove(_.prefixClass+"-inner-pages-horizontal"),t.classList.remove(_.prefixClass+"-inner-pages-wrapped");break;case q.Horizontal:t.classList.add(_.prefixClass+"-inner-pages-horizontal"),t.classList.remove(_.prefixClass+"-inner-pages-vertical"),t.classList.remove(_.prefixClass+"-inner-pages-wrapped");break;case q.Wrapped:t.classList.add(_.prefixClass+"-inner-pages-wrapped"),t.classList.remove(_.prefixClass+"-inner-pages-vertical"),t.classList.remove(_.prefixClass+"-inner-pages-horizontal")}H(e)}},_e=function(e){de(e.pageIndex),j(e)},ke=function(e,t,r){var a=C.current;if(a){var i=e+1;n.getPage(i).then((function(n){var i=n.getViewport({scale:1}),o=0,s=t||0;switch(r){case Y.PageFit:o=0,ge(Y.PageFit);break;default:o=(i.height-s)*x}var c=oe[e].current;c&&(a.scrollTop=c.offsetTop+o)}))}},Ce=function(e){var t=S-1,n=S+1;switch(e){case"FirstPage":de(0);break;case"LastPage":de(ee-1);break;case"NextPage":n<ee&&de(n);break;case"PrevPage":t>=0&&de(t)}},Ae=function(){return he($e.Preparing)};return h({viewer:l($.opened,{attrs:{ref:k,style:{position:"relative"}},children:i.createElement(i.Fragment,null,i.createElement(rt,{doc:n,pageHeight:re,pageWidth:te,printStatus:ue,rotation:O,onCancel:function(){return he($e.Inactive)},onStartPrinting:function(){return he($e.Ready)}}),ce&&i.createElement(Ke,null))},{attrs:{ref:C,style:{position:"relative"}},children:i.createElement(i.Fragment,null,K&&i.createElement(it,{onClick:Z}),Array(ee).fill(0).map((function(e,t){return i.createElement("div",{className:_.prefixClass+"-inner-page",key:"pagelayer-"+t,ref:function(e){oe[t].current=e}},i.createElement(Xe,{doc:n,keywordRegexp:M,height:re,match:D,pageIndex:t,renderPage:d,rotation:O,scale:x,width:te,onCanvasLayerRender:p,onExecuteNamedAction:Ce,onJumpToDest:ke,onPageVisibilityChanged:ve,onTextLayerRender:y}))})))},(function(e){return i.createElement(nn,{currentPage:S,doc:n,fileName:r.name,scale:x,scrollMode:U,selectionMode:z,onChangeScrollMode:be,onChangeSelectionMode:fe,onDownload:pe,onFullScreen:Q,onJumpTo:de,onJumpToMatch:_e,onOpenFiles:se,onPrint:Ae,onRotate:ye,onSearchFor:N,onToggleSidebar:$.toggle,onZoom:ge,renderToolbar:e})}),{attrs:{},children:i.createElement(yt,{currentPage:S,doc:n,height:re,rotation:O,width:te,onJumpToDest:ke,onJumpToPage:de})}),doc:n,download:pe,changeScrollMode:be,changeSelectionMode:fe,jumpToPage:de,print:Ae,rotate:ye,zoom:ge})},on=function(e){var t=e.doc,n=e.render,r=a.useContext(c),o=a.useRef(null),s=a.useState({pageHeight:0,pageWidth:0,scale:1}),l=s[0],u=s[1];return a.useEffect((function(){t.getPage(1).then((function(e){var t=e.getViewport({scale:1}),n=t.width,r=t.height,a=o.current;if(a){var i=a.offsetWidth/n,s=Yt(Math.max(1,i));u({pageHeight:r,pageWidth:n,scale:s})}}))}),[t]),0===l.pageWidth?i.createElement("div",{className:r.prefixClass+"-page-size-calculator",ref:o},i.createElement(y,null)):n(l)},sn=function(){},cn=function(e){function t(t){var n=e.call(this)||this;return n.verifyPasswordFn=t,n}return _(t,e),t}(sn),ln=function(e){var t=e.verifyPasswordFn,n=a.useContext(Je),r=a.useContext(c),o=a.useState(""),s=o[0],l=o[1];return i.createElement("div",{className:r.prefixClass+"-asking-password"},i.createElement("div",null,i.createElement("div",{className:r.prefixClass+"-asking-password-message"},n.askingPassword.requirePasswordToOpen,":"),i.createElement("div",{className:r.prefixClass+"-asking-password-input-container"},i.createElement("input",{className:r.prefixClass+"-asking-password-input",type:"password",onChange:function(e){return l(e.target.value)}}),i.createElement("button",{className:r.prefixClass+"-asking-password-button",onClick:function(){return t(s)}},n.askingPassword.submit))))},un=function(e){function t(t){var n=e.call(this)||this;return n.doc=t,n}return _(t,e),t}(sn),hn=function(e){function t(t){var n=e.call(this)||this;return n.error=t,n}return _(t,e),t}(sn),dn=function(e){function t(t){var n=e.call(this)||this;return n.percentages=t,n}return _(t,e),t}(sn),fn=function(e){var t=e.verifyPasswordFn,n=a.useContext(Je),r=a.useContext(c),o=a.useState(""),s=o[0],l=o[1];return i.createElement("div",{className:r.prefixClass+"-asking-password"},i.createElement("div",null,i.createElement("div",{className:r.prefixClass+"-asking-password-message"},n.wrongPassword.tryAgain,":"),i.createElement("div",{className:r.prefixClass+"-asking-password-input-container"},i.createElement("input",{className:r.prefixClass+"-asking-password-input",type:"password",onChange:function(e){return l(e.target.value)}}),i.createElement("button",{className:r.prefixClass+"-asking-password-button",onClick:function(){return t(s)}},n.wrongPassword.submit))))},pn=function(e){function t(t){var n=e.call(this)||this;return n.verifyPasswordFn=t,n}return _(t,e),t}(sn),gn=function(e){var t=e.characterMap,n=e.file,r=e.render,s=e.renderError,l=a.useContext(c),u=a.useState(new dn(0)),h=u[0],d=u[1];switch(a.useEffect((function(){d(new dn(0));var e=Object.assign({},"string"==typeof n?{url:n}:{data:n},t?{cMapUrl:t.url,cMapPacked:t.isCompressed}:{}),r=o.getDocument(e);return r.onPassword=function(e,t){switch(t){case o.PasswordResponses.NEED_PASSWORD:d(new cn(e));break;case o.PasswordResponses.INCORRECT_PASSWORD:d(new pn(e))}},r.promise.then((function(e){return d(new un(e))}),(function(e){return d(new hn({message:e.message||"Cannot load document",name:e.name}))})),function(){r.destroy()}}),[n]),!0){case h instanceof cn:return i.createElement(ln,{verifyPasswordFn:h.verifyPasswordFn});case h instanceof pn:return i.createElement(fn,{verifyPasswordFn:h.verifyPasswordFn});case h instanceof un:return r(h.doc);case h instanceof hn:return s?s(h.error):i.createElement("div",{className:l.prefixClass+"-doc-error"},i.createElement("div",{className:l.prefixClass+"-doc-error-text"},h.error.message));case h instanceof dn:default:return i.createElement("div",{className:l.prefixClass+"-doc-loading"},i.createElement(y,null))}},vn={askingPassword:{requirePasswordToOpen:"This document requires a password to open",submit:"Submit"},attachment:{clickToDownload:"Click to download",noAttachment:"There is no attachment"},bookmark:{noBookmark:"There is no bookmark"},main:{dragDropFile:"Drag and drop a PDF document here"},printProgress:{cancel:"Cancel",preparingDocument:"Preparing document ..."},property:{author:"Author",close:"Close",creationDate:"Creation date",creator:"Creator",fileName:"File name",fileSize:"File size",keywords:"Keywords",modificationDate:"Modification date",pageCount:"Page count",pdfProducer:"PDF producer",pdfVersion:"PDF Version",subject:"Subject",title:"Title"},search:{close:"Close",enterToSearch:"Enter to search",matchCase:"Match case",nextMatch:"Next match",previousMatch:"Previous match",wholeWords:"Whole words"},sidebar:{attachment:"Attachment",bookmark:"Bookmark",thumbnail:"Thumbnail"},toolbar:{documentProperties:"Document properties",download:"Download",fullScreen:"Full screen",goToFirstPage:"Go to first page",goToLastPage:"Go to last page",handTool:"Hand tool",horizontalScrolling:"Horizontal scrolling",moreActions:"More actions",nextPage:"Next page",openFile:"Open file",previousPage:"Previous page",print:"Print",rotateBackward:"Rotate counterclockwise",rotateForward:"Rotate clockwise",search:"Search",textSelectionTool:"Text selection tool",toggleSidebar:"Toggle sidebar",verticalScrolling:"Vertical scrolling",zoomIn:"Zoom in",zoomOut:"Zoom out",wrappedScrolling:"Wrapped scrolling"},wrongPassword:{submit:"Submit",tryAgain:"The password is wrong. Please try again"},zoom:{actualSize:"Actual size",pageFit:"Page fit",pageWidth:"Page width"}},mn=function(e){var t=e.children,n=e.localization||vn;return i.createElement(Je.Provider,{value:n},t)},yn=function(e){var t=e.children,n=e.prefixClass;return i.createElement(c.Provider,{value:{prefixClass:n||"viewer"}},t)};t.Button=u,t.Icon=d,t.MenuDivider=h,t.MenuItem=p,t.Modal=L,t.Popover=B,t.Position=M,t.PrimaryButton=g,t.ProgressBar=v,t.ScrollMode=q,t.SelectionMode=G,t.Separator=m,t.SpecialZoomLevel=Y,t.Spinner=y,t.Tooltip=H,t.Worker=function(e){var t=e.children,n=e.workerUrl;return o.GlobalWorkerOptions.workerSrc=n,i.createElement(i.Fragment,null,t)},t.default=function(e){var t=e.characterMap,n=e.defaultScale,r=e.fileUrl,o=e.initialPage,s=e.keyword,c=e.layout,l=e.localization,u=e.prefixClass,h=e.render,d=e.renderError,f=e.renderPage,p=e.selectionMode,g=void 0===p?G.Text:p,v=e.onCanvasLayerRender,m=void 0===v?function(){}:v,y=e.onDocumentLoad,b=void 0===y?function(){}:y,_=e.onPageChange,k=void 0===_?function(){}:_,C=e.onTextLayerRender,E=void 0===C?function(){}:C,w=e.onZoom,S=void 0===w?function(){}:w,P=a.useState({data:r,name:"string"==typeof r?r:""}),R=P[0],T=P[1],O=function(e,t,n,r,a){return A(e,t,n,r(x),a)},L=function(e,t){T({data:t,name:e})};a.useEffect((function(){T({data:r,name:"string"==typeof r?r:""})}),[r]);var F,M=h||function(e){return e.viewer};return i.createElement(yn,{prefixClass:u},i.createElement(mn,{localization:l},i.createElement(gn,{characterMap:t,file:R.data,render:(F=M,function(e){return i.createElement(on,{doc:e,render:function(t){var r=t;return i.createElement(an,{defaultScale:n,doc:e,file:R,initialPage:o,keyword:s,layout:c||O,pageSize:r,render:F,renderPage:f,selectionMode:g,onCanvasLayerRender:m,onDocumentLoad:b,onOpenFile:L,onPageChange:k,onTextLayerRender:E,onZoom:S})}})}),renderError:d})))},t.defaultLayout=A,t.defaultToolbar=x},380:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return W}));var r=n(108),a=n(271),i=n(386),o=n(48),s=n(81),c=n(280),l=n(278),u=n(275),h=n(305),d=n(50),f=n(279),p=n(0),g=n.n(p),v="object"===typeof self&&self.self===self?self:"object"===typeof e&&e.global===e||"object"===typeof e&&e.GLOBAL===e?e:{};v.__REACT_ASYNC__=v.__REACT_ASYNC__||{};var m,y=function(){},b=function e(){Object(f.a)(this,e),this.abort=y,this.signal={}};try{m=n(5)}catch(q){}var _,k=m&&m.oneOfType([m.node,m.func]),C=m&&m.shape({initialValue:m.any,data:m.any,error:m.instanceOf(Error),value:m.any,startedAt:m.instanceOf(Date),finishedAt:m.instanceOf(Date),status:m.oneOf(["initial","pending","fulfilled","rejected"]),isInitial:m.bool,isPending:m.bool,isLoading:m.bool,isFulfilled:m.bool,isResolved:m.bool,isRejected:m.bool,isSettled:m.bool,counter:m.number,promise:m.instanceOf(Promise),run:m.func,reload:m.func,cancel:m.func,setData:m.func,setError:m.func}),A=m&&{Async:{children:k,promise:m.instanceOf(Promise),promiseFn:m.func,deferFn:m.func,watch:m.any,watchFn:m.func,initialValue:m.any,onResolve:m.func,onReject:m.func,reducer:m.func,dispatcher:m.func,debugLabel:m.string,suspense:m.bool},Initial:{children:k,state:C.isRequired,persist:m.bool},Pending:{children:k,state:C.isRequired,initial:m.bool},Fulfilled:{children:k,state:C.isRequired,persist:m.bool},Rejected:{children:k,state:C.isRequired,persist:m.bool},Settled:{children:k,state:C.isRequired,persist:m.bool}},x=function(e){if("function"===typeof e){for(var t=e,n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return t.apply(void 0,r)}return e},E=function(e){var t=e.children,n=e.persist,r=e.state,a=void 0===r?{}:r;return g.a.createElement(g.a.Fragment,null,a.isInitial||n&&!a.data?x(t,a):null)},w=function(e){var t=e.children,n=e.initial,r=e.state,a=void 0===r?{}:r;return g.a.createElement(g.a.Fragment,null,!a.isPending||n&&a.value?null:x(t,a))},S=function(e){var t=e.children,n=e.persist,r=e.state,a=void 0===r?{}:r;return g.a.createElement(g.a.Fragment,null,a.isFulfilled||n&&a.data?x(t,a.data,a):null)},P=function(e){var t=e.children,n=e.persist,r=e.state,a=void 0===r?{}:r;return g.a.createElement(g.a.Fragment,null,a.isRejected||n&&a.error?x(t,a.error,a):null)},R=function(e){var t=e.children,n=e.persist,r=e.state,a=void 0===r?{}:r;return g.a.createElement(g.a.Fragment,null,a.isSettled||n&&a.value?x(t,a):null)};A&&(E.propTypes=A.Initial,w.propTypes=A.Pending,S.propTypes=A.Fulfilled,P.propTypes=A.Rejected,R.propTypes=A.Settled),function(e){e.initial="initial",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected"}(_||(_={}));var T=function(e){return{status:e,isInitial:e===_.initial,isPending:e===_.pending,isLoading:e===_.pending,isFulfilled:e===_.fulfilled,isResolved:e===_.fulfilled,isRejected:e===_.rejected,isSettled:e===_.fulfilled||e===_.rejected}},O=function(){};Object.setPrototypeOf?Object.setPrototypeOf(O,Promise):O.__proto__=Promise,O.prototype=Object.assign(Object.create(Promise.prototype),{finally:function(){return this},catch:function(){return this},then:function(){return this}});var L,F=new O;!function(e){e.start="start",e.cancel="cancel",e.fulfill="fulfill",e.reject="reject"}(L||(L={}));var M=function(e){var t=e.initialValue,n=e.promise,r=e.promiseFn;return Object(d.a)(Object(d.a)({initialValue:t,data:t instanceof Error?void 0:t,error:t instanceof Error?t:void 0,value:t,startedAt:n||r?new Date:void 0,finishedAt:t?new Date:void 0},T(function(e,t){return e instanceof Error?_.rejected:void 0!==e?_.fulfilled:t?_.pending:_.initial}(t,n||r))),{},{counter:0,promise:F})},N=function(e,t){switch(t.type){case L.start:return Object(d.a)(Object(d.a)(Object(d.a)({},e),{},{startedAt:new Date,finishedAt:void 0},T(_.pending)),{},{counter:t.meta.counter,promise:t.meta.promise});case L.cancel:return Object(d.a)(Object(d.a)(Object(d.a)({},e),{},{startedAt:void 0,finishedAt:void 0},T((n=e.error||e.data)instanceof Error?_.rejected:void 0!==n?_.fulfilled:_.initial)),{},{counter:t.meta.counter,promise:t.meta.promise});case L.fulfill:return Object(d.a)(Object(d.a)(Object(d.a)({},e),{},{data:t.payload,value:t.payload,error:void 0,finishedAt:new Date},T(_.fulfilled)),{},{promise:t.meta.promise});case L.reject:return Object(d.a)(Object(d.a)(Object(d.a)({},e),{},{error:t.payload,value:t.payload,finishedAt:new Date},T(_.rejected)),{},{promise:t.meta.promise});default:return e}var n},I=function(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];e.apply(void 0,[t].concat(r)),t.type===L.start&&"function"===typeof t.payload&&t.payload()}};g.a.Component;!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Async",n=g.a.createContext(void 0),r=n.Consumer,a=n.Provider;function i(e){var t=e.children;return g.a.createElement(r,null,(function(e){if(!e)throw new Error("this component should only be used within an associated <Async> component!");return t(e)}))}var o=function(t){Object(u.a)(r,t);var n=Object(h.a)(r);function r(t){var a;Object(f.a)(this,r),(a=n.call(this,t)).mounted=!1,a.counter=0,a.args=[],a.promise=F,a.abortController=new b,a.start=a.start.bind(Object(l.a)(a)),a.load=a.load.bind(Object(l.a)(a)),a.run=a.run.bind(Object(l.a)(a)),a.cancel=a.cancel.bind(Object(l.a)(a)),a.onResolve=a.onResolve.bind(Object(l.a)(a)),a.onReject=a.onReject.bind(Object(l.a)(a)),a.setData=a.setData.bind(Object(l.a)(a)),a.setError=a.setError.bind(Object(l.a)(a));var i=t.promise,o=t.promiseFn||e.promiseFn,c=t.initialValue||e.initialValue;a.state=Object(d.a)(Object(d.a)({},M({initialValue:c,promise:i,promiseFn:o})),{},{cancel:a.cancel,run:a.run,reload:function(){var e;a.load(),(e=a).run.apply(e,Object(s.a)(a.args))},setData:a.setData,setError:a.setError}),a.debugLabel=t.debugLabel||e.debugLabel;var u=v.__REACT_ASYNC__.devToolsDispatcher,h=t.reducer||e.reducer,p=t.dispatcher||e.dispatcher||u,g=h?function(e,t){return h(e,t,N)}:N,m=I((function(e,t){a.setState((function(t){return g(t,e)}),t)}));return a.dispatch=p?function(e){return p(e,m,t)}:m,a}return Object(c.a)(r,[{key:"componentDidMount",value:function(){this.mounted=!0,!this.props.promise&&this.state.initialValue||this.load()}},{key:"componentDidUpdate",value:function(t){var n=this.props,r=n.watch,a=n.watchFn,i=void 0===a?e.watchFn:a,o=n.promise,s=n.promiseFn;return r!==t.watch||i&&i(Object(d.a)(Object(d.a)({},e),this.props),Object(d.a)(Object(d.a)({},e),t))?(this.counter&&this.cancel(),this.load()):o!==t.promise&&(this.counter&&this.cancel(),o)||s!==t.promiseFn&&(this.counter&&this.cancel(),s)?this.load():void 0}},{key:"componentWillUnmount",value:function(){this.cancel(),this.mounted=!1}},{key:"getMeta",value:function(e){return Object(d.a)({counter:this.counter,promise:this.promise,debugLabel:this.debugLabel},e)}},{key:"start",value:function(e){var t=this;return"AbortController"in v&&(this.abortController.abort(),this.abortController=new v.AbortController),this.counter++,this.promise=new Promise((function(n,r){if(t.mounted){t.dispatch({type:L.start,payload:function(){return e().then(n,r)},meta:t.getMeta()})}}))}},{key:"load",value:function(){var t=this,n=this.props.promise,r=this.props.promiseFn||e.promiseFn;if(n)this.start((function(){return n})).then(this.onResolve(this.counter)).catch(this.onReject(this.counter));else if(r){var a=Object(d.a)(Object(d.a)({},e),this.props);this.start((function(){return r(a,t.abortController)})).then(this.onResolve(this.counter)).catch(this.onReject(this.counter))}}},{key:"run",value:function(){for(var t=this,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];var i=this.props.deferFn||e.deferFn;if(i){this.args=r;var o=Object(d.a)(Object(d.a)({},e),this.props);return this.start((function(){return i(r,o,t.abortController)})).then(this.onResolve(this.counter),this.onReject(this.counter))}}},{key:"cancel",value:function(){var t=this.props.onCancel||e.onCancel;t&&t(),this.counter++,this.abortController.abort(),this.mounted&&this.dispatch({type:L.cancel,meta:this.getMeta()})}},{key:"onResolve",value:function(t){var n=this;return function(r){if(n.counter===t){var a=n.props.onResolve||e.onResolve;n.setData(r,(function(){return a&&a(r)}))}return r}}},{key:"onReject",value:function(t){var n=this;return function(r){if(n.counter===t){var a=n.props.onReject||e.onReject;n.setError(r,(function(){return a&&a(r)}))}return r}}},{key:"setData",value:function(e,t){return this.mounted&&this.dispatch({type:L.fulfill,payload:e,meta:this.getMeta()},t),e}},{key:"setError",value:function(e,t){return this.mounted&&this.dispatch({type:L.reject,payload:e,error:!0,meta:this.getMeta()},t),e}},{key:"render",value:function(){var e=this.props,t=e.children;if(e.suspense&&this.state.isPending&&this.promise!==F)throw this.promise;if("function"===typeof t){var n=t;return g.a.createElement(a,{value:this.state},n(this.state))}return void 0!==t&&null!==t?g.a.createElement(a,{value:this.state},t):null}}]),r}(g.a.Component);A&&(o.propTypes=A.Async);var p=function(e){return g.a.createElement(i,null,(function(t){return g.a.createElement(E,Object.assign({},e,{state:t}))}))},m=function(e){return g.a.createElement(i,null,(function(t){return g.a.createElement(w,Object.assign({},e,{state:t}))}))},y=function(e){return g.a.createElement(i,null,(function(t){return g.a.createElement(S,Object.assign({},e,{state:t}))}))},_=function(e){return g.a.createElement(i,null,(function(t){return g.a.createElement(P,Object.assign({},e,{state:t}))}))},k=function(e){return g.a.createElement(i,null,(function(t){return g.a.createElement(R,Object.assign({},e,{state:t}))}))};p.displayName="".concat(t,".Initial"),m.displayName="".concat(t,".Pending"),y.displayName="".concat(t,".Fulfilled"),_.displayName="".concat(t,".Rejected"),k.displayName="".concat(t,".Settled"),Object.assign(o,{displayName:t,Initial:p,Pending:m,Loading:m,Fulfilled:y,Resolved:y,Rejected:_,Settled:k})}();function D(e,t){var n="function"===typeof e?Object(d.a)(Object(d.a)({},t),{},{promiseFn:e}):e,r=Object(p.useRef)(0),a=Object(p.useRef)(!0),i=Object(p.useRef)(void 0),c=Object(p.useRef)(n),l=Object(p.useRef)(F),u=Object(p.useRef)(new b),h=v.__REACT_ASYNC__.devToolsDispatcher,f=n.reducer,g=n.dispatcher,m=void 0===g?h:g,_=Object(p.useReducer)(f?function(e,t){return f(e,t,N)}:N,n,M),k=Object(o.a)(_,2),C=k[0],A=k[1],x=Object(p.useCallback)(m?function(e){return m(e,I(A),c.current)}:I(A),[m]),E=n.debugLabel,w=Object(p.useCallback)((function(e){return Object(d.a)({counter:r.current,promise:l.current,debugLabel:E},e)}),[E]),S=Object(p.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y;return a.current&&(x({type:L.fulfill,payload:e,meta:w()}),t()),e}),[x,w]),P=Object(p.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y;return a.current&&(x({type:L.reject,payload:e,error:!0,meta:w()}),t()),e}),[x,w]),R=n.onResolve,T=n.onReject,O=Object(p.useCallback)((function(e){return function(t){return e===r.current&&S(t,(function(){return R&&R(t)}))}}),[S,R]),D=Object(p.useCallback)((function(e){return function(t){return e===r.current&&P(t,(function(){return T&&T(t)}))}}),[P,T]),j=Object(p.useCallback)((function(e){return"AbortController"in v&&(u.current.abort(),u.current=new v.AbortController),r.current++,l.current=new Promise((function(t,n){if(a.current){x({type:L.start,payload:function(){return e().then(t,n)},meta:w()})}}))}),[x,w]),B=n.promise,U=n.promiseFn,H=n.initialValue,W=Object(p.useCallback)((function(){var e=H&&0===r.current;B?j((function(){return B})).then(O(r.current)).catch(D(r.current)):U&&!e&&j((function(){return U(c.current,u.current)})).then(O(r.current)).catch(D(r.current))}),[j,B,U,H,O,D]),q=n.deferFn,z=Object(p.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];q&&(i.current=t,j((function(){return q(t,c.current,u.current)})).then(O(r.current)).catch(D(r.current)))}),[j,q,O,D]),G=Object(p.useCallback)((function(){i.current?z.apply(void 0,Object(s.a)(i.current)):W()}),[z,W]),V=n.onCancel,Y=Object(p.useCallback)((function(){V&&V(),r.current++,u.current.abort(),a.current&&x({type:L.cancel,meta:w()})}),[V,x,w]),X=n.watch,J=n.watchFn;if(Object(p.useEffect)((function(){J&&c.current&&J(n,c.current)&&(c.current=n,W())})),Object(p.useEffect)((function(){c.current=n}),[n]),Object(p.useEffect)((function(){r.current&&Y(),(B||U)&&W()}),[B,U,X]),Object(p.useEffect)((function(){return function(){a.current=!1}}),[]),Object(p.useEffect)((function(){return function(){return Y()}}),[]),Object(p.useDebugValue)(C,(function(e){var t=e.status;return"[".concat(r.current,"] ").concat(t)})),n.suspense&&C.isPending&&l.current!==F)throw l.current;return Object(p.useMemo)((function(){return Object(d.a)(Object(d.a)({},C),{},{run:z,reload:G,cancel:Y,setData:S,setError:P})}),[C,z,G,Y,S,P])}var j=function(e){Object(u.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this,"".concat(e.status," ").concat(e.statusText))).response=e,Object.setPrototypeOf&&Object.setPrototypeOf(Object(l.a)(r),n.prototype),r}return n}(Object(i.a)(Error)),B=function(e,t){return function(n){return n.ok?"boolean"===typeof t?t?n.json():n:"application/json"===e?n.json():n:Promise.reject(new j(n))}};function U(e){return"object"===typeof e&&"preventDefault"in e}var H=function(){throw new Error("useAsync requires React v16.8 or up. Upgrade your React version or use the <Async> component instead.")},W=p.useEffect?D:H;p.useEffect}).call(this,n(109))},385:function(e,t,n){"use strict";n.d(t,"a",(function(){return ue})),n.d(t,"b",(function(){return We}));var r=n(253),a=n.n(r),i=n(1),o=n(2),s=n(31),c=n(251),l=n.n(c);function u(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){u(i,r,a,o,s,"next",e)}function s(e){u(i,r,a,o,s,"throw",e)}o(void 0)}))}}var d=n(56),f=n(33),p=n(49);function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(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}}),t&&g(e,t)}function m(e,t){return!t||"object"!==Object(s.a)(t)&&"function"!==typeof t?Object(p.a)(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=n(12),_=n(0),k=n.n(_),C=n(5),A=n.n(C),x=n(260),E=n.n(x),w=n(256),S=n.n(w);function P(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return"string"===typeof t||t instanceof Array?e.concat(t):e}),[]).filter(Boolean).join(" ")}var R=Object(_.createContext)(null);function T(e){var t=e.children,n=e.type;return k.a.createElement("div",{className:"react-pdf__message react-pdf__message--".concat(n)},t)}T.propTypes={children:A.a.node,type:A.a.oneOf(["error","loading","no-data"]).isRequired};var O=n(377).PDFLinkService,L={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},F=new(n(301).EventBus),M="undefined"!==typeof window,N=M&&"file:"===window.location.protocol,I=function(e){return"undefined"!==typeof e},D=function(e){return I(e)&&null!==e},j=function(e){return e instanceof ArrayBuffer},B=function(e){if(!M)throw new Error("Attempted to check if a variable is a Blob on a non-browser environment.");return e instanceof Blob},U=function(e){if(!M)throw new Error("Attempted to check if a variable is a File on a non-browser environment.");return e instanceof File},H=function(e){return"string"===typeof e&&/^data:/.test(e)},W=function(e){if(!H(e))throw new Error("dataURItoUint8Array was provided with an argument which is not a valid data URI.");var t;t=e.split(",")[0].indexOf("base64")>=0?atob(e.split(",")[1]):unescape(e.split(",")[1]);for(var n=new Uint8Array(t.length),r=0;r<t.length;r+=1)n[r]=t.charCodeAt(r);return n},q=function(e){},z=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return q.apply(void 0,["warn"].concat(t))},G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return q.apply(void 0,["error"].concat(t))},V=function(){N&&z("Loading PDF as base64 strings/URLs might not work on protocols other than HTTP/HTTPS. On Google Chrome, you can use --allow-file-access-from-files flag for debugging purposes.")},Y=function(e){e&&e.cancel&&e.cancel()},X=function(e,t){return Object.defineProperty(e,"width",{get:function(){return this.view[2]*t},configurable:!0}),Object.defineProperty(e,"height",{get:function(){return this.view[3]*t},configurable:!0}),Object.defineProperty(e,"originalWidth",{get:function(){return this.view[2]},configurable:!0}),Object.defineProperty(e,"originalHeight",{get:function(){return this.view[3]},configurable:!0}),e},J=function(e){return"RenderingCancelledException"===e.name},K=function(e){return new Promise((function(t,n){var r=new FileReader;return r.onload=function(){return t(new Uint8Array(r.result))},r.onerror=function(e){switch(e.target.error.code){case e.target.error.NOT_FOUND_ERR:return n(new Error("Error while reading a file: File not found."));case e.target.error.NOT_READABLE_ERR:return n(new Error("Error while reading a file: File not readable."));case e.target.error.SECURITY_ERR:return n(new Error("Error while reading a file: Security error."));case e.target.error.ABORT_ERR:return n(new Error("Error while reading a file: Aborted."));default:return n(new Error("Error while reading a file."))}},r.readAsArrayBuffer(e),null}))},Q=n(28),Z=function(){var e={};return[].concat(Object(Q.a)(x.mouseEvents),Object(Q.a)(x.touchEvents),Object(Q.a)(x.keyboardEvents)).forEach((function(t){e[t]=A.a.func})),e}(),$=[A.a.string,A.a.instanceOf(ArrayBuffer),A.a.shape({data:A.a.object,httpHeaders:A.a.object,range:A.a.object,url:A.a.string,withCredentials:A.a.bool})];"undefined"!==typeof File&&$.push(A.a.instanceOf(File)),"undefined"!==typeof Blob&&$.push(A.a.instanceOf(Blob));var ee=A.a.oneOfType([A.a.string,A.a.arrayOf(A.a.string)]),te=(A.a.oneOfType($),A.a.instanceOf(O)),ne=(A.a.oneOf(["_self","_blank","_parent","_top"]),A.a.shape({_transport:A.a.shape({fontLoader:A.a.object.isRequired}).isRequired,commonObjs:A.a.shape({_objs:A.a.object.isRequired}).isRequired,getAnnotations:A.a.func.isRequired,getTextContent:A.a.func.isRequired,getViewport:A.a.func.isRequired,render:A.a.func.isRequired})),re=A.a.oneOfType([A.a.shape({getDestination:A.a.func.isRequired,getOutline:A.a.func.isRequired,getPage:A.a.func.isRequired,numPages:A.a.number.isRequired}),A.a.bool]),ae=A.a.oneOf(["canvas","none","svg"]),ie=A.a.oneOf([0,90,180,270]);function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){Object(b.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ce(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var le=a.a.PDFDataRangeTransport,ue=function(e){v(r,e);var t,n=(t=r,function(){var e,n=y(t);if(ce()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return m(this,e)});function r(){var e;Object(d.a)(this,r);for(var t=arguments.length,i=new Array(t),c=0;c<t;c++)i[c]=arguments[c];return e=n.call.apply(n,[this].concat(i)),Object(b.a)(Object(p.a)(e),"state",{pdf:null}),Object(b.a)(Object(p.a)(e),"viewer",{scrollPageIntoView:function(t){var n=t.pageNumber,r=e.props.onItemClick;if(r)r({pageNumber:n});else{var a=e.pages[n-1];a?a.scrollIntoView():z("Warning: An internal link leading to page ".concat(n," was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>."))}}}),Object(b.a)(Object(p.a)(e),"linkService",new O({eventBus:F})),Object(b.a)(Object(p.a)(e),"loadDocument",h(l.a.mark((function t(){var n,r,i,o,s,c,u;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=null,t.prev=1,t.next=4,e.findDocumentSource();case 4:n=t.sent,e.onSourceSuccess(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),e.onSourceError(t.t0);case 11:if(n){t.next=13;break}return t.abrupt("return");case 13:return e.setState((function(e){return e.pdf?{pdf:null}:null})),r=e.props,i=r.options,o=r.onLoadProgress,s=r.onPassword,t.prev=15,Y(e.runningTask),e.loadingTask=a.a.getDocument(se({},n,{},i)),e.loadingTask.onPassword=s,o&&(e.loadingTask.onProgress=o),c=S()(e.loadingTask.promise),e.runningTask=c,t.next=24,c.promise;case 24:u=t.sent,e.setState((function(e){return e.pdf&&e.pdf.fingerprint===u.fingerprint?null:{pdf:u}}),e.onLoadSuccess),t.next=31;break;case 28:t.prev=28,t.t1=t.catch(15),e.onLoadError(t.t1);case 31:case"end":return t.stop()}}),t,null,[[1,8],[15,28]])})))),Object(b.a)(Object(p.a)(e),"setupLinkService",(function(){e.linkService.setViewer(e.viewer);var t=Object(p.a)(e);Object.defineProperty(e.linkService,"externalLinkTarget",{get:function(){switch(t.props.externalLinkTarget){case"_self":return 1;case"_blank":return 2;case"_parent":return 3;case"_top":return 4;default:return 0}}})})),Object(b.a)(Object(p.a)(e),"onSourceSuccess",(function(){var t=e.props.onSourceSuccess;t&&t()})),Object(b.a)(Object(p.a)(e),"onSourceError",(function(t){G(t);var n=e.props.onSourceError;n&&n(t)})),Object(b.a)(Object(p.a)(e),"onLoadSuccess",(function(){var t=e.props.onLoadSuccess,n=e.state.pdf;t&&t(n),e.pages=new Array(n.numPages),e.linkService.setDocument(n)})),Object(b.a)(Object(p.a)(e),"onLoadError",(function(t){e.setState({pdf:!1}),G(t);var n=e.props.onLoadError;n&&n(t)})),Object(b.a)(Object(p.a)(e),"findDocumentSource",h(l.a.mark((function t(){var n,r,a,i,c;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.props.file){t.next=3;break}return t.abrupt("return",null);case 3:if("string"!==typeof n){t.next=9;break}if(!H(n)){t.next=7;break}return r=W(n),t.abrupt("return",{data:r});case 7:return V(),t.abrupt("return",{url:n});case 9:if(!(n instanceof le)){t.next=11;break}return t.abrupt("return",{range:n});case 11:if(!j(n)){t.next=13;break}return t.abrupt("return",{data:n});case 13:if(!M){t.next=19;break}if(!B(n)&&!U(n)){t.next=19;break}return t.next=17,K(n);case 17:return t.t0=t.sent,t.abrupt("return",{data:t.t0});case 19:if("object"===Object(s.a)(n)){t.next=21;break}throw new Error("Invalid parameter in file, need either Uint8Array, string or a parameter object");case 21:if(n.url||n.data||n.range){t.next=23;break}throw new Error("Invalid parameter object: need either .data, .range or .url");case 23:if("string"!==typeof n.url){t.next=29;break}if(!H(n.url)){t.next=28;break}return a=n.url,i=Object(o.a)(n,["url"]),c=W(a),t.abrupt("return",se({data:c},i));case 28:V();case 29:return t.abrupt("return",n);case 30:case"end":return t.stop()}}),t)})))),Object(b.a)(Object(p.a)(e),"registerPage",(function(t,n){e.pages[t]=n})),Object(b.a)(Object(p.a)(e),"unregisterPage",(function(t){delete e.pages[t]})),e}return Object(f.a)(r,[{key:"componentDidMount",value:function(){this.loadDocument(),this.setupLinkService()}},{key:"componentDidUpdate",value:function(e){this.props.file!==e.file&&this.loadDocument()}},{key:"componentWillUnmount",value:function(){this.loadingTask&&this.loadingTask.destroy(),Y(this.runningTask)}},{key:"renderChildren",value:function(){var e=this.props.children;return k.a.createElement(R.Provider,{value:this.childContext},e)}},{key:"renderContent",value:function(){var e=this.props.file,t=this.state.pdf;if(!e){var n=this.props.noData;return k.a.createElement(T,{type:"no-data"},"function"===typeof n?n():n)}if(null===t){var r=this.props.loading;return k.a.createElement(T,{type:"loading"},"function"===typeof r?r():r)}if(!1===t){var a=this.props.error;return k.a.createElement(T,{type:"error"},"function"===typeof a?a():a)}return this.renderChildren()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.inputRef;return k.a.createElement("div",Object(i.a)({className:P("react-pdf__Document",t),ref:n},this.eventProps),this.renderContent())}},{key:"childContext",get:function(){var e=this.linkService,t=this.registerPage,n=this.unregisterPage,r=this.props,a=r.renderMode,i=r.rotate;return{linkService:e,pdf:this.state.pdf,registerPage:t,renderMode:a,rotate:i,unregisterPage:n}}},{key:"eventProps",get:function(){var e=this;return E()(this.props,(function(){return e.state.pdf}))}}]),r}(_.PureComponent);ue.defaultProps={error:"Failed to load PDF file.",loading:"Loading PDF\u2026",noData:"No PDF file specified.",onPassword:function(e,t){switch(t){case L.NEED_PASSWORD:e(prompt("Enter the password to open this PDF file."));break;case L.INCORRECT_PASSWORD:e(prompt("Invalid password. Please try again."))}}};var he=A.a.oneOfType([A.a.func,A.a.node]);ue.propTypes=se({},Z,{children:A.a.node,className:ee,error:he,file:U,inputRef:A.a.func,loading:he,noData:he,onItemClick:A.a.func,onLoadError:A.a.func,onLoadProgress:A.a.func,onLoadSuccess:A.a.func,onPassword:A.a.func,onSourceError:A.a.func,onSourceSuccess:A.a.func,rotate:A.a.number});var de=Object(_.createContext)(null),fe=n(27),pe=function(){function e(t){var n=t.num,r=t.gen;Object(d.a)(this,e),this.num=n,this.gen=r}return Object(f.a)(e,[{key:"toString",value:function(){var e="".concat(this.num,"R");return 0!==this.gen&&(e+=this.gen),e}}]),e}();function ge(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var ve=function(e){v(r,e);var t,n=(t=r,function(){var e,n=y(t);if(ge()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return m(this,e)});function r(){var e;Object(d.a)(this,r);for(var t=arguments.length,a=new Array(t),i=0;i<t;i++)a[i]=arguments[i];return e=n.call.apply(n,[this].concat(a)),Object(b.a)(Object(p.a)(e),"getDestination",h(l.a.mark((function t(){var n,r,a;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.props,r=n.item,a=n.pdf,I(e.destination)){t.next=9;break}if("string"!==typeof r.dest){t.next=8;break}return t.next=5,a.getDestination(r.dest);case 5:e.destination=t.sent,t.next=9;break;case 8:e.destination=r.dest;case 9:return t.abrupt("return",e.destination);case 10:case"end":return t.stop()}}),t)})))),Object(b.a)(Object(p.a)(e),"getPageIndex",h(l.a.mark((function t(){var n,r,a,i;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.props.pdf,I(e.pageIndex)){t.next=10;break}return t.next=4,e.getDestination();case 4:if(!(r=t.sent)){t.next=10;break}return a=Object(fe.a)(r,1),i=a[0],t.next=9,n.getPageIndex(new pe(i));case 9:e.pageIndex=t.sent;case 10:return t.abrupt("return",e.pageIndex);case 11:case"end":return t.stop()}}),t)})))),Object(b.a)(Object(p.a)(e),"getPageNumber",h(l.a.mark((function t(){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(I(e.pageNumber)){t.next=5;break}return t.next=3,e.getPageIndex();case 3:t.t0=t.sent,e.pageNumber=t.t0+1;case 5:return t.abrupt("return",e.pageNumber);case 6:case"end":return t.stop()}}),t)})))),Object(b.a)(Object(p.a)(e),"onClick",function(){var t=h(l.a.mark((function t(n){var r,a,i;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.props.onClick,n.preventDefault(),t.next=4,e.getPageIndex();case 4:return a=t.sent,t.next=7,e.getPageNumber();case 7:i=t.sent,r&&r({pageIndex:a,pageNumber:i});case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return Object(f.a)(r,[{key:"renderSubitems",value:function(){var e=this.props,t=e.item,n=Object(o.a)(e,["item"]);if(!t.items||!t.items.length)return null;var a=t.items;return k.a.createElement("ul",null,a.map((function(e,t){return k.a.createElement(r,Object(i.a)({key:"string"===typeof e.destination?e.destination:t,item:e},n))})))}},{key:"render",value:function(){var e=this.props.item;return k.a.createElement("li",null,k.a.createElement("a",{href:"#",onClick:this.onClick},e.title),this.renderSubitems())}}]),r}(_.PureComponent),me=A.a.oneOfType([A.a.string,A.a.arrayOf(A.a.any)]);ve.propTypes={item:A.a.shape({dest:me,items:A.a.arrayOf(A.a.shape({dest:me,title:A.a.string})),title:A.a.string}).isRequired,onClick:A.a.func,pdf:re.isRequired};var ye=function(e){return k.a.createElement(R.Consumer,null,(function(t){return k.a.createElement(de.Consumer,null,(function(n){return k.a.createElement(ve,Object(i.a)({},t,n,e))}))}))};function be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var ke=function(e){v(r,e);var t,n=(t=r,function(){var e,n=y(t);if(_e()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return m(this,e)});function r(){var e;Object(d.a)(this,r);for(var t=arguments.length,a=new Array(t),i=0;i<t;i++)a[i]=arguments[i];return e=n.call.apply(n,[this].concat(a)),Object(b.a)(Object(p.a)(e),"state",{outline:null}),Object(b.a)(Object(p.a)(e),"loadOutline",h(l.a.mark((function t(){var n,r,a;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.pdf,e.setState((function(e){return e.outline?{outline:null}:null})),t.prev=2,r=S()(n.getOutline()),e.runningTask=r,t.next=7,r.promise;case 7:a=t.sent,e.setState({outline:a},e.onLoadSuccess),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(2),e.onLoadError(t.t0);case 14:case"end":return t.stop()}}),t,null,[[2,11]])})))),Object(b.a)(Object(p.a)(e),"onLoadSuccess",(function(){var t=e.props.onLoadSuccess,n=e.state.outline;t&&t(n)})),Object(b.a)(Object(p.a)(e),"onLoadError",(function(t){e.setState({outline:!1}),G(t);var n=e.props.onLoadError;n&&n(t)})),Object(b.a)(Object(p.a)(e),"onItemClick",(function(t){var n=t.pageIndex,r=t.pageNumber,a=e.props.onItemClick;a&&a({pageIndex:n,pageNumber:r})})),e}return Object(f.a)(r,[{key:"componentDidMount",value:function(){if(!this.props.pdf)throw new Error("Attempted to load an outline, but no document was specified.");this.loadOutline()}},{key:"componentDidUpdate",value:function(e){var t=this.props.pdf;e.pdf&&t!==e.pdf&&this.loadOutline()}},{key:"componentWillUnmount",value:function(){Y(this.runningTask)}},{key:"renderOutline",value:function(){var e=this.state.outline;return k.a.createElement("ul",null,e.map((function(e,t){return k.a.createElement(ye,{key:"string"===typeof e.destination?e.destination:t,item:e})})))}},{key:"render",value:function(){var e=this.props.pdf,t=this.state.outline;if(!e||!t)return null;var n=this.props,r=n.className,a=n.inputRef;return k.a.createElement("div",Object(i.a)({className:P("react-pdf__Outline",r),ref:a},this.eventProps),k.a.createElement(de.Provider,{value:this.childContext},this.renderOutline()))}},{key:"childContext",get:function(){return{onClick:this.onItemClick}}},{key:"eventProps",get:function(){var e=this;return E()(this.props,(function(){return e.state.outline}))}}]),r}(_.PureComponent);ke.propTypes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?be(Object(n),!0).forEach((function(t){Object(b.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:ee,inputRef:A.a.func,onItemClick:A.a.func,onLoadError:A.a.func,onLoadSuccess:A.a.func,pdf:re},Z);k.a.forwardRef((function(e,t){return k.a.createElement(R.Consumer,null,(function(n){return k.a.createElement(ke,Object(i.a)({ref:t},n,e))}))}));var Ce=Object(_.createContext)(null);function Ae(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var xe=function(e){v(r,e);var t,n=(t=r,function(){var e,n=y(t);if(Ae()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return m(this,e)});function r(){var e;Object(d.a)(this,r);for(var t=arguments.length,a=new Array(t),i=0;i<t;i++)a[i]=arguments[i];return e=n.call.apply(n,[this].concat(a)),Object(b.a)(Object(p.a)(e),"onRenderSuccess",(function(){e.renderer=null;var t=e.props,n=t.onRenderSuccess,r=t.page,a=t.scale;n&&n(X(r,a))})),Object(b.a)(Object(p.a)(e),"onRenderError",(function(t){if(!J(t)){G(t);var n=e.props.onRenderError;n&&n(t)}})),Object(b.a)(Object(p.a)(e),"drawPageOnCanvas",(function(){var t=Object(p.a)(e).canvasLayer;if(!t)return null;var n=Object(p.a)(e),r=n.renderViewport,a=n.viewport,i=e.props,o=i.page,s=i.renderInteractiveForms;t.width=r.width,t.height=r.height,t.style.width="".concat(Math.floor(a.width),"px"),t.style.height="".concat(Math.floor(a.height),"px");var c={get canvasContext(){return t.getContext("2d")},viewport:r,renderInteractiveForms:s};return e.cancelRenderingTask(),e.renderer=o.render(c),e.renderer.promise.then(e.onRenderSuccess).catch(e.onRenderError)})),e}return Object(f.a)(r,[{key:"componentDidMount",value:function(){this.drawPageOnCanvas()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.page;t.renderInteractiveForms!==e.renderInteractiveForms&&(n.cleanup(),this.drawPageOnCanvas())}},{key:"componentWillUnmount",value:function(){this.cancelRenderingTask(),this.canvasLayer&&(this.canvasLayer.width=0,this.canvasLayer.height=0,this.canvasLayer=null)}},{key:"cancelRenderingTask",value:function(){this.renderer&&this.renderer._internalRenderTask.running&&this.renderer._internalRenderTask.cancel()}},{key:"render",value:function(){var e=this;return k.a.createElement("canvas",{className:"react-pdf__Page__canvas",dir:"ltr",ref:function(t){e.canvasLayer=t},style:{display:"block",userSelect:"none"}})}},{key:"renderViewport",get:function(){var e=this.props,t=e.page,n=e.rotate,r=e.scale,a=M&&window.devicePixelRatio||1;return t.getViewport({scale:r*a,rotation:n})}},{key:"viewport",get:function(){var e=this.props,t=e.page,n=e.rotate,r=e.scale;return t.getViewport({scale:r,rotation:n})}}]),r}(_.PureComponent);function Ee(e){return k.a.createElement(Ce.Consumer,null,(function(t){return k.a.createElement(xe,Object(i.a)({},t,e))}))}function we(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}xe.propTypes={onRenderError:A.a.func,onRenderSuccess:A.a.func,page:ne.isRequired,renderInteractiveForms:A.a.bool,rotate:ie,scale:A.a.number};var Se=function(e){v(r,e);var t,n=(t=r,function(){var e,n=y(t);if(we()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return m(this,e)});function r(){var e;Object(d.a)(this,r);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return e=n.call.apply(n,[this].concat(i)),Object(b.a)(Object(p.a)(e),"state",{svg:null}),Object(b.a)(Object(p.a)(e),"onRenderSuccess",(function(){e.renderer=null;var t=e.props,n=t.onRenderSuccess,r=t.page,a=t.scale;n&&n(X(r,a))})),Object(b.a)(Object(p.a)(e),"onRenderError",(function(t){if(!J(t)){G(t);var n=e.props.onRenderError;n&&n(t)}})),Object(b.a)(Object(p.a)(e),"renderSVG",(function(){var t=e.props.page;return e.renderer=t.getOperatorList(),e.renderer.then((function(n){var r=new a.a.SVGGraphics(t.commonObjs,t.objs);e.renderer=r.getSVG(n,e.viewport).then((function(t){e.setState({svg:t},e.onRenderSuccess)})).catch(e.onRenderError)})).catch(e.onRenderError)})),Object(b.a)(Object(p.a)(e),"drawPageOnContainer",(function(t){var n=e.state.svg;if(t&&n){t.firstElementChild||t.appendChild(n);var r=e.viewport,a=r.width,i=r.height;n.setAttribute("width",a),n.setAttribute("height",i)}})),e}return Object(f.a)(r,[{key:"componentDidMount",value:function(){this.renderSVG()}},{key:"render",value:function(){var e=this,t=this.viewport,n=t.width,r=t.height;return k.a.createElement("div",{className:"react-pdf__Page__svg",ref:function(t){return e.drawPageOnContainer(t)},style:{display:"block",backgroundColor:"white",overflow:"hidden",width:n,height:r,userSelect:"none"}})}},{key:"viewport",get:function(){var e=this.props,t=e.page,n=e.rotate,r=e.scale;return t.getViewport({scale:r,rotation:n})}}]),r}(_.PureComponent);function Pe(e){return k.a.createElement(Ce.Consumer,null,(function(t){return k.a.createElement(Se,Object(i.a)({},t,e))}))}function Re(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}Se.propTypes={onRenderError:A.a.func,onRenderSuccess:A.a.func,page:ne.isRequired,rotate:ie,scale:A.a.number};var Te=function(e){v(r,e);var t,n=(t=r,function(){var e,n=y(t);if(Re()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return m(this,e)});function r(){var e;Object(d.a)(this,r);for(var t=arguments.length,a=new Array(t),i=0;i<t;i++)a[i]=arguments[i];return e=n.call.apply(n,[this].concat(a)),Object(b.a)(Object(p.a)(e),"getElementWidth",(function(t){var n=Object(p.a)(e).sideways;return t.getBoundingClientRect()[n?"height":"width"]})),e}return Object(f.a)(r,[{key:"componentDidMount",value:function(){this.alignTextItem()}},{key:"componentDidUpdate",value:function(){this.alignTextItem()}},{key:"getFontData",value:function(){var e=h(l.a.mark((function e(t){var n,r;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props.page,e.next=3,new Promise((function(e){n.commonObjs.get(t,e)}));case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"alignTextItem",value:function(){var e=h(l.a.mark((function e(){var t,n,r,a,i,o,s,c,u,h,d;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.item){e.next=3;break}return e.abrupt("return");case 3:return t.style.transform="",n=this.props,r=n.fontName,a=n.scale,i=n.width,t.style.fontFamily="".concat(r,", sans-serif"),e.next=8,this.getFontData(r);case 8:o=e.sent,s=o?o.fallbackName:"sans-serif",t.style.fontFamily="".concat(r,", ").concat(s),c=i*a,u=this.getElementWidth(t),h="scaleX(".concat(c/u,")"),(d=o?o.ascent:0)&&(h+=" translateY(".concat(100*(1-d),"%)")),t.style.transform=h,t.style.WebkitTransform=h;case 18:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this,t=this.fontSize,n=this.top,r=this.left,a=this.props,i=a.customTextRenderer,o=a.scale,s=a.str;return k.a.createElement("span",{ref:function(t){e.item=t},style:{height:"1em",fontFamily:"sans-serif",fontSize:"".concat(t*o,"px"),position:"absolute",top:"".concat(n*o,"px"),left:"".concat(r*o,"px"),transformOrigin:"left bottom",whiteSpace:"pre",pointerEvents:"all"}},i?i(this.props):s)}},{key:"unrotatedViewport",get:function(){var e=this.props,t=e.page,n=e.scale;return t.getViewport({scale:n})}},{key:"rotate",get:function(){var e=this.props,t=e.page;return e.rotate-t.rotate}},{key:"sideways",get:function(){return this.rotate%180!==0}},{key:"defaultSideways",get:function(){return this.unrotatedViewport.rotation%180!==0}},{key:"fontSize",get:function(){var e=this.props.transform,t=this.defaultSideways,n=Object(fe.a)(e,2),r=n[0],a=n[1];return t?a:r}},{key:"top",get:function(){var e=this.props.transform,t=this.unrotatedViewport,n=this.defaultSideways,r=Object(fe.a)(e,6),a=r[2],i=r[3],o=r[4],s=r[5],c=Object(fe.a)(t.viewBox,4),l=c[1],u=c[3];return n?o+a+l:u-(s+i)}},{key:"left",get:function(){var e=this.props.transform,t=this.unrotatedViewport,n=this.defaultSideways,r=Object(fe.a)(e,6),a=r[4],i=r[5],o=Object(fe.a)(t.viewBox,1)[0];return n?i-o:a-o}}]),r}(_.PureComponent);function Oe(e){return k.a.createElement(Ce.Consumer,null,(function(t){return k.a.createElement(Te,Object(i.a)({},t,e))}))}function Le(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}Te.propTypes={customTextRenderer:A.a.func,fontName:A.a.string.isRequired,itemIndex:A.a.number.isRequired,page:ne.isRequired,rotate:ie,scale:A.a.number,str:A.a.string.isRequired,transform:A.a.arrayOf(A.a.number).isRequired,width:A.a.number.isRequired};var Fe=function(e){v(r,e);var t,n=(t=r,function(){var e,n=y(t);if(Le()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return m(this,e)});function r(){var e;Object(d.a)(this,r);for(var t=arguments.length,a=new Array(t),i=0;i<t;i++)a[i]=arguments[i];return e=n.call.apply(n,[this].concat(a)),Object(b.a)(Object(p.a)(e),"state",{textItems:null}),Object(b.a)(Object(p.a)(e),"loadTextItems",h(l.a.mark((function t(){var n,r,a,i;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.page,t.prev=1,r=S()(n.getTextContent()),e.runningTask=r,t.next=6,r.promise;case 6:a=t.sent,i=a.items,e.setState({textItems:i},e.onLoadSuccess),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.onLoadError(t.t0);case 14:case"end":return t.stop()}}),t,null,[[1,11]])})))),Object(b.a)(Object(p.a)(e),"onLoadSuccess",(function(){var t=e.props.onGetTextSuccess,n=e.state.textItems;t&&t(n)})),Object(b.a)(Object(p.a)(e),"onLoadError",(function(t){e.setState({textItems:!1}),G(t);var n=e.props.onGetTextError;n&&n(t)})),e}return Object(f.a)(r,[{key:"componentDidMount",value:function(){if(!this.props.page)throw new Error("Attempted to load page text content, but no page was specified.");this.loadTextItems()}},{key:"componentDidUpdate",value:function(e){var t=this.props.page;e.page&&t!==e.page&&this.loadTextItems()}},{key:"componentWillUnmount",value:function(){Y(this.runningTask)}},{key:"renderTextItems",value:function(){var e=this.state.textItems;return e?e.map((function(e,t){return k.a.createElement(Oe,Object(i.a)({key:t,itemIndex:t},e))})):null}},{key:"render",value:function(){var e=this.unrotatedViewport,t=this.rotate;return k.a.createElement("div",{className:"react-pdf__Page__textContent",style:{position:"absolute",top:"50%",left:"50%",width:"".concat(e.width,"px"),height:"".concat(e.height,"px"),color:"transparent",transform:"translate(-50%, -50%) rotate(".concat(t,"deg)"),WebkitTransform:"translate(-50%, -50%) rotate(".concat(t,"deg)"),pointerEvents:"none"}},this.renderTextItems())}},{key:"unrotatedViewport",get:function(){var e=this.props,t=e.page,n=e.scale;return t.getViewport({scale:n})}},{key:"rotate",get:function(){var e=this.props,t=e.page;return e.rotate-t.rotate}}]),r}(_.PureComponent);function Me(e){return k.a.createElement(Ce.Consumer,null,(function(t){return k.a.createElement(Fe,Object(i.a)({},t,e))}))}function Ne(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}Fe.propTypes={onGetTextError:A.a.func,onGetTextSuccess:A.a.func,page:ne.isRequired,rotate:ie,scale:A.a.number};var Ie=function(e){v(r,e);var t,n=(t=r,function(){var e,n=y(t);if(Ne()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return m(this,e)});function r(){var e;Object(d.a)(this,r);for(var t=arguments.length,a=new Array(t),i=0;i<t;i++)a[i]=arguments[i];return e=n.call.apply(n,[this].concat(a)),Object(b.a)(Object(p.a)(e),"state",{annotations:null}),Object(b.a)(Object(p.a)(e),"loadAnnotations",h(l.a.mark((function t(){var n,r,a;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.page,t.prev=1,r=S()(n.getAnnotations()),e.runningTask=r,t.next=6,r.promise;case 6:a=t.sent,e.setState({annotations:a},e.onLoadSuccess),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),e.onLoadError(t.t0);case 13:case"end":return t.stop()}}),t,null,[[1,10]])})))),Object(b.a)(Object(p.a)(e),"onLoadSuccess",(function(){var t=e.props.onGetAnnotationsSuccess,n=e.state.annotations;t&&t(n)})),Object(b.a)(Object(p.a)(e),"onLoadError",(function(t){e.setState({annotations:!1}),G(t);var n=e.props.onGetAnnotationsError;n&&n(t)})),Object(b.a)(Object(p.a)(e),"onRenderSuccess",(function(){var t=e.props.onRenderAnnotationLayerSuccess;t&&t()})),Object(b.a)(Object(p.a)(e),"onRenderError",(function(t){G(t);var n=e.props.onRenderAnnotationLayerError;n&&n(t)})),e}return Object(f.a)(r,[{key:"componentDidMount",value:function(){if(!this.props.page)throw new Error("Attempted to load page annotations, but no page was specified.");this.loadAnnotations()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.page,r=t.renderInteractiveForms;(e.page&&n!==e.page||r!==e.renderInteractiveForms)&&this.loadAnnotations()}},{key:"componentWillUnmount",value:function(){Y(this.runningTask)}},{key:"renderAnnotationLayer",value:function(){var e=this.state.annotations;if(e){var t=this.props,n=t.linkService,r=t.page,i=t.renderInteractiveForms,o=this.viewport.clone({dontFlip:!0}),s={annotations:e,div:this.annotationLayer,linkService:n,page:r,renderInteractiveForms:i,viewport:o};this.annotationLayer.innerHTML="";try{a.a.AnnotationLayer.render(s),this.onRenderSuccess()}catch(c){this.onRenderError(c)}}}},{key:"render",value:function(){var e=this;return k.a.createElement("div",{className:"react-pdf__Page__annotations annotationLayer",ref:function(t){e.annotationLayer=t}},this.renderAnnotationLayer())}},{key:"viewport",get:function(){var e=this.props,t=e.page,n=e.rotate,r=e.scale;return t.getViewport({scale:r,rotation:n})}}]),r}(_.PureComponent);Ie.propTypes={linkService:te.isRequired,onGetAnnotationsError:A.a.func,onGetAnnotationsSuccess:A.a.func,onRenderAnnotationLayerError:A.a.func,onRenderAnnotationLayerSuccess:A.a.func,page:ne,renderInteractiveForms:A.a.bool,rotate:ie,scale:A.a.number};var De=function(e){return k.a.createElement(R.Consumer,null,(function(t){return k.a.createElement(Ce.Consumer,null,(function(n){return k.a.createElement(Ie,Object(i.a)({},t,n,e))}))}))};function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Be(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Ue=function(e){v(r,e);var t,n=(t=r,function(){var e,n=y(t);if(Be()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return m(this,e)});function r(){var e;Object(d.a)(this,r);for(var t=arguments.length,a=new Array(t),i=0;i<t;i++)a[i]=arguments[i];return e=n.call.apply(n,[this].concat(a)),Object(b.a)(Object(p.a)(e),"state",{page:null}),Object(b.a)(Object(p.a)(e),"onLoadSuccess",(function(){var t=e.props,n=t.onLoadSuccess,r=t.registerPage,a=e.state.page;n&&n(X(a,e.scale)),r&&r(e.pageIndex,e.ref)})),Object(b.a)(Object(p.a)(e),"onLoadError",(function(t){G(t);var n=e.props.onLoadError;n&&n(t)})),Object(b.a)(Object(p.a)(e),"loadPage",h(l.a.mark((function t(){var n,r,a,i;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.props.pdf,r=e.getPageNumber()){t.next=4;break}return t.abrupt("return");case 4:return e.setState((function(e){return e.page?{page:null}:null})),t.prev=5,a=S()(n.getPage(r)),e.runningTask=a,t.next=10,a.promise;case 10:i=t.sent,e.setState({page:i},e.onLoadSuccess),t.next=18;break;case 14:t.prev=14,t.t0=t.catch(5),e.setState({page:!1}),e.onLoadError(t.t0);case 18:case"end":return t.stop()}}),t,null,[[5,14]])})))),e}return Object(f.a)(r,[{key:"componentDidMount",value:function(){if(!this.props.pdf)throw new Error("Attempted to load a page, but no document was specified.");this.loadPage()}},{key:"componentDidUpdate",value:function(e){var t=this.props.pdf;if(e.pdf&&t!==e.pdf||this.getPageNumber()!==this.getPageNumber(e)){var n=this.props.unregisterPage;n&&n(this.getPageIndex(e)),this.loadPage()}}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterPage;e&&e(this.pageIndex),Y(this.runningTask)}},{key:"getPageIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return D(e.pageNumber)?e.pageNumber-1:D(e.pageIndex)?e.pageIndex:null}},{key:"getPageNumber",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return D(e.pageNumber)?e.pageNumber:D(e.pageIndex)?e.pageIndex+1:null}},{key:"renderMainLayer",value:function(){switch(this.props.renderMode){case"none":return null;case"svg":return k.a.createElement(Pe,{key:"".concat(this.pageKeyNoScale,"_svg")});case"canvas":default:return k.a.createElement(Ee,{key:"".concat(this.pageKey,"_canvas")})}}},{key:"renderTextLayer",value:function(){var e=this.props.renderTextLayer;return e?k.a.createElement(Me,{key:"".concat(this.pageKey,"_text")}):null}},{key:"renderAnnotationLayer",value:function(){var e=this.props.renderAnnotationLayer;return e?k.a.createElement(De,{key:"".concat(this.pageKey,"_annotations")}):null}},{key:"renderChildren",value:function(){var e=this.props.children;return k.a.createElement(Ce.Provider,{value:this.childContext},this.renderMainLayer(),this.renderTextLayer(),this.renderAnnotationLayer(),e)}},{key:"renderContent",value:function(){var e=this.pageNumber,t=this.props.pdf,n=this.state.page;if(!e){var r=this.props.noData;return k.a.createElement(T,{type:"no-data"},"function"===typeof r?r():r)}if(null===t||null===n){var a=this.props.loading;return k.a.createElement(T,{type:"loading"},"function"===typeof a?a():a)}if(!1===t||!1===n){var i=this.props.error;return k.a.createElement(T,{type:"error"},"function"===typeof i?i():i)}return this.renderChildren()}},{key:"render",value:function(){var e=this,t=this.pageNumber,n=this.props.className;return k.a.createElement("div",Object(i.a)({className:P("react-pdf__Page",n),"data-page-number":t,ref:function(t){var n=e.props.inputRef;n&&n(t),e.ref=t},style:{position:"relative"}},this.eventProps),this.renderContent())}},{key:"childContext",get:function(){var e=this.state.page;if(!e)return{};var t=this.props;return{customTextRenderer:t.customTextRenderer,onGetAnnotationsError:t.onGetAnnotationsError,onGetAnnotationsSuccess:t.onGetAnnotationsSuccess,onGetTextError:t.onGetTextError,onGetTextSuccess:t.onGetTextSuccess,onRenderAnnotationLayerError:t.onRenderAnnotationLayerError,onRenderAnnotationLayerSuccess:t.onRenderAnnotationLayerSuccess,onRenderError:t.onRenderError,onRenderSuccess:t.onRenderSuccess,page:e,renderInteractiveForms:t.renderInteractiveForms,rotate:this.rotate,scale:this.scale}}},{key:"pageIndex",get:function(){return this.getPageIndex()}},{key:"pageNumber",get:function(){return this.getPageNumber()}},{key:"rotate",get:function(){var e=this.props.rotate;if(D(e))return e;var t=this.state.page;return t?t.rotate:null}},{key:"scale",get:function(){var e=this.state.page;if(!e)return null;var t=this.props,n=t.scale,r=t.width,a=t.height,i=this.rotate,o=1,s=null===n?1:n;if(r||a){var c=e.getViewport({scale:1,rotation:i});o=r?r/c.width:a/c.height}return s*o}},{key:"eventProps",get:function(){var e=this;return E()(this.props,(function(){var t=e.state.page;return t?X(t,e.scale):t}))}},{key:"pageKey",get:function(){var e=this.state.page;return"".concat(e.pageIndex,"@").concat(this.scale,"/").concat(this.rotate)}},{key:"pageKeyNoScale",get:function(){var e=this.state.page;return"".concat(e.pageIndex,"/").concat(this.rotate)}}]),r}(_.PureComponent);Ue.defaultProps={error:"Failed to load the page.",loading:"Loading page\u2026",noData:"No page specified.",renderAnnotationLayer:!0,renderInteractiveForms:!1,renderMode:"canvas",renderTextLayer:!0,scale:1};var He=A.a.oneOfType([A.a.func,A.a.node]);Ue.propTypes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){Object(b.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Z,{children:A.a.node,className:ee,customTextRenderer:A.a.func,error:He,height:A.a.number,inputRef:A.a.func,loading:He,noData:He,onGetTextError:A.a.func,onGetTextSuccess:A.a.func,onLoadError:A.a.func,onLoadSuccess:A.a.func,onRenderError:A.a.func,onRenderSuccess:A.a.func,pageIndex:function(e,t,n){var r=e[t],a=e.pageNumber,i=e.pdf;if(!I(i))return null;if(I(r)){if("number"!==typeof r)return new Error("`".concat(t,"` of type `").concat(Object(s.a)(r),"` supplied to `").concat(n,"`, expected `number`."));if(r<0)return new Error("Expected `".concat(t,"` to be greater or equal to 0."));var o=i.numPages;if(r+1>o)return new Error("Expected `".concat(t,"` to be less or equal to ").concat(o-1,"."))}else if(!I(a))return new Error("`".concat(t,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(n,"`."));return null},pageNumber:function(e,t,n){var r=e[t],a=e.pageIndex,i=e.pdf;if(!I(i))return null;if(I(r)){if("number"!==typeof r)return new Error("`".concat(t,"` of type `").concat(Object(s.a)(r),"` supplied to `").concat(n,"`, expected `number`."));if(r<1)return new Error("Expected `".concat(t,"` to be greater or equal to 1."));var o=i.numPages;if(r>o)return new Error("Expected `".concat(t,"` to be less or equal to ").concat(o,"."))}else if(!I(a))return new Error("`".concat(t,"` not supplied. Either pageIndex or pageNumber must be supplied to `").concat(n,"`."));return null},pdf:re,registerPage:A.a.func,renderAnnotationLayer:A.a.bool,renderInteractiveForms:A.a.bool,renderMode:ae,renderTextLayer:A.a.bool,rotate:ie,scale:A.a.number,unregisterPage:A.a.func,width:A.a.number});var We=k.a.forwardRef((function(e,t){return k.a.createElement(R.Consumer,null,(function(n){return k.a.createElement(Ue,Object(i.a)({ref:t},n,e))}))}));N&&z("You are running React-PDF from your local file system. PDF.js Worker may fail to load due to browser's security policies. If you're on Google Chrome, you can use --allow-file-access-from-files flag for debugging purposes."),a.a.GlobalWorkerOptions.workerSrc="pdf.worker.js"},386:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(276),a=n(262);var i=n(277);function o(e,t,n){return(o=Object(i.a)()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Object(a.a)(i,n.prototype),i}).apply(null,arguments)}function s(e){var t="function"===typeof Map?new Map:void 0;return(s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return o(e,arguments,Object(r.a)(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Object(a.a)(i,e)})(e)}},412:function(e,t,n){"use strict";var r=n(1),a=n(2),i=n(0),o=(n(5),n(3)),s=n(8),c=n(6),l=n(21),u=n(23),h=i.forwardRef((function(e,t){var n=e.classes,c=e.className,l=e.color,h=void 0===l?"primary":l,d=e.value,f=e.valueBuffer,p=e.variant,g=void 0===p?"indeterminate":p,v=Object(a.a)(e,["classes","className","color","value","valueBuffer","variant"]),m=Object(u.a)(),y={},b={bar1:{},bar2:{}};if("determinate"===g||"buffer"===g)if(void 0!==d){y["aria-valuenow"]=Math.round(d),y["aria-valuemin"]=0,y["aria-valuemax"]=100;var _=d-100;"rtl"===m.direction&&(_=-_),b.bar1.transform="translateX(".concat(_,"%)")}else 0;if("buffer"===g)if(void 0!==f){var k=(f||0)-100;"rtl"===m.direction&&(k=-k),b.bar2.transform="translateX(".concat(k,"%)")}else 0;return i.createElement("div",Object(r.a)({className:Object(o.a)(n.root,n["color".concat(Object(s.a)(h))],c,{determinate:n.determinate,indeterminate:n.indeterminate,buffer:n.buffer,query:n.query}[g]),role:"progressbar"},y,{ref:t},v),"buffer"===g?i.createElement("div",{className:Object(o.a)(n.dashed,n["dashedColor".concat(Object(s.a)(h))])}):null,i.createElement("div",{className:Object(o.a)(n.bar,n["barColor".concat(Object(s.a)(h))],("indeterminate"===g||"query"===g)&&n.bar1Indeterminate,{determinate:n.bar1Determinate,buffer:n.bar1Buffer}[g]),style:b.bar1}),"determinate"===g?null:i.createElement("div",{className:Object(o.a)(n.bar,("indeterminate"===g||"query"===g)&&n.bar2Indeterminate,"buffer"===g?[n["color".concat(Object(s.a)(h))],n.bar2Buffer]:n["barColor".concat(Object(s.a)(h))]),style:b.bar2}))}));t.a=Object(c.a)((function(e){var t=function(t){return"light"===e.palette.type?Object(l.e)(t,.62):Object(l.a)(t,.5)},n=t(e.palette.primary.main),r=t(e.palette.secondary.main);return{root:{position:"relative",overflow:"hidden",height:4,"@media print":{colorAdjust:"exact"}},colorPrimary:{backgroundColor:n},colorSecondary:{backgroundColor:r},determinate:{},indeterminate:{},buffer:{backgroundColor:"transparent"},query:{transform:"rotate(180deg)"},dashed:{position:"absolute",marginTop:0,height:"100%",width:"100%",animation:"$buffer 3s infinite linear"},dashedColorPrimary:{backgroundImage:"radial-gradient(".concat(n," 0%, ").concat(n," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},dashedColorSecondary:{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},bar:{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},barColorPrimary:{backgroundColor:e.palette.primary.main},barColorSecondary:{backgroundColor:e.palette.secondary.main},bar1Indeterminate:{width:"auto",animation:"$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"},bar1Determinate:{transition:"transform .".concat(4,"s linear")},bar1Buffer:{zIndex:1,transition:"transform .".concat(4,"s linear")},bar2Indeterminate:{width:"auto",animation:"$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite"},bar2Buffer:{transition:"transform .".concat(4,"s linear")},"@keyframes indeterminate1":{"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}},"@keyframes indeterminate2":{"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}},"@keyframes buffer":{"0%":{opacity:1,backgroundPosition:"0 -23px"},"50%":{opacity:0,backgroundPosition:"0 -23px"},"100%":{opacity:1,backgroundPosition:"-200px -23px"}}}}),{name:"MuiLinearProgress"})(h)}}]);
  //# sourceMappingURL=7.b4050565.chunk.js.map