From 00b18b4a85517829a5a96897ea27faf94de0c6ce Mon Sep 17 00:00:00 2001 From: David Garcia Date: Mon, 23 Dec 2024 18:57:05 -0600 Subject: [PATCH] Updates --- asset-manifest.json | 12 ++++++------ index.html | 2 +- static/css/main.0767e86d.css | 2 ++ static/css/main.0767e86d.css.map | 1 + static/css/main.6007bd12.css | 2 -- static/css/main.6007bd12.css.map | 1 - static/js/{main.5ea2698e.js => main.51d8dcc4.js} | 6 +++--- ...e.js.LICENSE.txt => main.51d8dcc4.js.LICENSE.txt} | 0 static/js/main.51d8dcc4.js.map | 1 + static/js/main.5ea2698e.js.map | 1 - 10 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 static/css/main.0767e86d.css create mode 100644 static/css/main.0767e86d.css.map delete mode 100644 static/css/main.6007bd12.css delete mode 100644 static/css/main.6007bd12.css.map rename static/js/{main.5ea2698e.js => main.51d8dcc4.js} (56%) rename static/js/{main.5ea2698e.js.LICENSE.txt => main.51d8dcc4.js.LICENSE.txt} (100%) create mode 100644 static/js/main.51d8dcc4.js.map delete mode 100644 static/js/main.5ea2698e.js.map diff --git a/asset-manifest.json b/asset-manifest.json index 88635fe..d964af4 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,16 +1,16 @@ { "files": { - "main.css": "/davidgarcia/static/css/main.6007bd12.css", - "main.js": "/davidgarcia/static/js/main.5ea2698e.js", + "main.css": "/davidgarcia/static/css/main.0767e86d.css", + "main.js": "/davidgarcia/static/js/main.51d8dcc4.js", "static/js/787.d54456cf.chunk.js": "/davidgarcia/static/js/787.d54456cf.chunk.js", "static/media/me.jpg": "/davidgarcia/static/media/me.481f33e84f2efc007f4f.jpg", "index.html": "/davidgarcia/index.html", - "main.6007bd12.css.map": "/davidgarcia/static/css/main.6007bd12.css.map", - "main.5ea2698e.js.map": "/davidgarcia/static/js/main.5ea2698e.js.map", + "main.0767e86d.css.map": "/davidgarcia/static/css/main.0767e86d.css.map", + "main.51d8dcc4.js.map": "/davidgarcia/static/js/main.51d8dcc4.js.map", "787.d54456cf.chunk.js.map": "/davidgarcia/static/js/787.d54456cf.chunk.js.map" }, "entrypoints": [ - "static/css/main.6007bd12.css", - "static/js/main.5ea2698e.js" + "static/css/main.0767e86d.css", + "static/js/main.51d8dcc4.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index e60f68a..8158850 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -David Garcia
\ No newline at end of file +David Garcia
\ No newline at end of file diff --git a/static/css/main.0767e86d.css b/static/css/main.0767e86d.css new file mode 100644 index 0000000..e751e22 --- /dev/null +++ b/static/css/main.0767e86d.css @@ -0,0 +1,2 @@ +body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.post-card,a.nav-link.navbar-brand{transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}@media (min-width:768px){a.nav-link.navbar-brand:hover{-webkit-transform:scale(1.2);transform:scale(1.2)}.post-card:hover{-webkit-transform:scale(1.05);transform:scale(1.05)}}body{font-family:sans-serif}.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion:no-preference){.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite}}.App-header{align-items:center;background-color:#282c34;color:#fff;display:flex;flex-direction:column;font-size:calc(10px + 2vmin);justify-content:center;min-height:100vh}.App-link{color:#61dafb}div.blog-content p:empty{height:1.5em}.email-signup{margin:auto;max-width:750px}@-webkit-keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.my-resume .react-pdf__Page__textContent,.my-resume canvas{height:auto!important;width:100%!important}.my-resume .react-pdf__Page__annotations{height:100%!important;width:100%!important}:root{--react-pdf-annotation-layer:1;--annotation-unfocused-field-background:url('data:image/svg+xml;charset=utf-8,');--input-focus-border-color:Highlight;--input-focus-outline:1px solid Canvas;--input-unfocused-border-color:transparent;--input-disabled-border-color:transparent;--input-hover-border-color:#000;--link-outline:none}@media screen and (forced-colors:active){:root{--input-focus-border-color:CanvasText;--input-unfocused-border-color:ActiveText;--input-disabled-border-color:GrayText;--input-hover-border-color:Highlight;--link-outline:1.5px solid LinkText}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .textWidgetAnnotation :is(input,textarea):required{outline:1.5px solid selectedItem}.annotationLayer .linkAnnotation:hover{-webkit-backdrop-filter:invert(100%);backdrop-filter:invert(100%)}}.annotationLayer{left:0;pointer-events:none;position:absolute;top:0;-webkit-transform-origin:0 0;transform-origin:0 0;z-index:3}.annotationLayer[data-main-rotation="90"] .norotate{-webkit-transform:rotate(270deg) translateX(-100%);transform:rotate(270deg) translateX(-100%)}.annotationLayer[data-main-rotation="180"] .norotate{-webkit-transform:rotate(180deg) translate(-100%,-100%);transform:rotate(180deg) translate(-100%,-100%)}.annotationLayer[data-main-rotation="270"] .norotate{-webkit-transform:rotate(90deg) translateY(-100%);transform:rotate(90deg) translateY(-100%)}.annotationLayer canvas{height:100%;position:absolute;width:100%}.annotationLayer section{box-sizing:border-box;margin:0;pointer-events:auto;position:absolute;text-align:left;text-align:initial;-webkit-transform-origin:0 0;transform-origin:0 0}.annotationLayer .linkAnnotation{outline:none;outline:var(--link-outline)}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a{font-size:1em;height:100%;left:0;position:absolute;top:0;width:100%}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a:hover{background:#ff0;box-shadow:0 2px 10px #ff0;opacity:.2}.annotationLayer .textAnnotation img{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input,.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .textWidgetAnnotation :is(input,textarea){background-image:url('data:image/svg+xml;charset=utf-8,');background-image:var(--annotation-unfocused-field-background);border:2px solid transparent;border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px*var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .textWidgetAnnotation :is(input,textarea):required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select option{padding:0}.annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.annotationLayer .textWidgetAnnotation textarea{resize:none}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input[disabled],.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .textWidgetAnnotation :is(input,textarea)[disabled]{background:none;border:2px solid transparent;border:2px solid var(--input-disabled-border-color);cursor:not-allowed}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .textWidgetAnnotation :is(input,textarea):hover{border:2px solid #000;border:2px solid var(--input-hover-border-color)}.annotationLayer .buttonWidgetAnnotation.checkBox input:hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .textWidgetAnnotation :is(input,textarea):hover{border-radius:2px}.annotationLayer .choiceWidgetAnnotation select:focus,.annotationLayer .textWidgetAnnotation :is(input,textarea):focus{background:none;border:2px solid Highlight;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:1px solid Canvas;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) :focus{background-color:initial;background-image:none}.annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid Highlight;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:1px solid Canvas;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid Highlight;border:2px solid var(--input-focus-border-color);outline:1px solid Canvas;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:"";display:block;position:absolute}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{height:80%;left:45%;width:1px}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}.annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{-webkit-appearance:none;appearance:none}.annotationLayer .popupTriggerArea{height:100%;width:100%}.annotationLayer .fileAttachmentAnnotation .popupTriggerArea{position:absolute}.annotationLayer .popupWrapper{font-size:calc(9px*var(--scale-factor));min-width:calc(180px*var(--scale-factor));pointer-events:none;position:absolute;width:100%}.annotationLayer .popup{word-wrap:break-word;background-color:#ff9;border-radius:calc(2px*var(--scale-factor));box-shadow:0 calc(2px*var(--scale-factor)) calc(5px*var(--scale-factor)) #888;cursor:pointer;font:message-box;margin-left:calc(5px*var(--scale-factor));max-width:calc(180px*var(--scale-factor));padding:calc(6px*var(--scale-factor));pointer-events:auto;position:absolute;white-space:normal}.annotationLayer .popup>*{font-size:calc(9px*var(--scale-factor))}.annotationLayer .popup h1{display:inline-block}.annotationLayer .popupDate{display:inline-block;margin-left:calc(5px*var(--scale-factor))}.annotationLayer .popupContent{border-top:1px solid #333;margin-top:calc(2px*var(--scale-factor));padding-top:calc(2px*var(--scale-factor))}.annotationLayer .richText>*{font-size:calc(9px*var(--scale-factor));white-space:pre-wrap}.annotationLayer .caretAnnotation,.annotationLayer .circleAnnotation svg ellipse,.annotationLayer .fileAttachmentAnnotation,.annotationLayer .freeTextAnnotation,.annotationLayer .highlightAnnotation,.annotationLayer .inkAnnotation svg polyline,.annotationLayer .lineAnnotation svg line,.annotationLayer .polygonAnnotation svg polygon,.annotationLayer .polylineAnnotation svg polyline,.annotationLayer .squareAnnotation svg rect,.annotationLayer .squigglyAnnotation,.annotationLayer .stampAnnotation,.annotationLayer .strikeoutAnnotation,.annotationLayer .underlineAnnotation{cursor:pointer}.annotationLayer section svg{height:100%;left:0;position:absolute;top:0;width:100%}.annotationLayer .annotationTextContent{color:transparent;height:100%;opacity:0;pointer-events:none;position:absolute;-webkit-user-select:none;user-select:none;width:100%}.annotationLayer .annotationTextContent span{display:inline-block;width:100%}:root{--react-pdf-text-layer:1;--highlight-bg-color:#b400aa;--highlight-selected-bg-color:#006400}@media screen and (forced-colors:active){:root{--highlight-bg-color:Highlight;--highlight-selected-bg-color:ButtonText}}[data-main-rotation="90"]{-webkit-transform:rotate(90deg) translateY(-100%);transform:rotate(90deg) translateY(-100%)}[data-main-rotation="180"]{-webkit-transform:rotate(180deg) translate(-100%,-100%);transform:rotate(180deg) translate(-100%,-100%)}[data-main-rotation="270"]{-webkit-transform:rotate(270deg) translateX(-100%);transform:rotate(270deg) translateX(-100%)}.textLayer{-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none;inset:0;line-height:1;overflow:hidden;position:absolute;text-align:left;text-align:initial;-webkit-transform-origin:0 0;transform-origin:0 0;z-index:2}.textLayer :is(span,br){color:transparent;cursor:text;margin:0;position:absolute;-webkit-transform-origin:0 0;transform-origin:0 0;white-space:pre}.textLayer span.markedContent{height:0;top:0}.textLayer .highlight{background-color:#b400aa;background-color:var(--highlight-bg-color);border-radius:4px;margin:-1px;padding:1px}.textLayer .highlight.appended{position:static}.textLayer .highlight.begin{border-radius:4px 0 0 4px}.textLayer .highlight.end{border-radius:0 4px 4px 0}.textLayer .highlight.middle{border-radius:0}.textLayer .highlight.selected{background-color:#006400;background-color:var(--highlight-selected-bg-color)}.textLayer br::selection{background:transparent}.textLayer .endOfContent{cursor:default;display:block;inset:100% 0 0;position:absolute;-webkit-user-select:none;user-select:none;z-index:-1}.textLayer .endOfContent.active{top:0} +/*# sourceMappingURL=main.0767e86d.css.map*/ \ No newline at end of file diff --git a/static/css/main.0767e86d.css.map b/static/css/main.0767e86d.css.map new file mode 100644 index 0000000..27c7ec5 --- /dev/null +++ b/static/css/main.0767e86d.css.map @@ -0,0 +1 @@ +{"version":3,"file":"static/css/main.0767e86d.css","mappings":"AAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAEY,CAHZ,QAMF,CAEA,KACE,uEAEF,CAEA,mCAEE,4CAAsC,CAAtC,oCAAsC,CAAtC,sEACF,CAEA,yBAEE,8BACE,4BAAqB,CAArB,oBAEF,CAEA,iBACE,6BAAsB,CAAtB,qBACF,CACF,CAEA,KACE,sBACF,CCjCA,KACE,iBACF,CAEA,UACE,aAAc,CACd,mBACF,CAEA,8CACE,UACE,mDAA4C,CAA5C,2CACF,CACF,CAEA,YAKE,kBAAmB,CAJnB,wBAAyB,CAOzB,UAAY,CALZ,YAAa,CACb,qBAAsB,CAGtB,4BAA6B,CAD7B,sBAAuB,CAJvB,gBAOF,CAEA,UACE,aACF,CAEA,yBACE,YACF,CAEA,cAEE,WAAY,CADZ,eAEF,CAEA,iCACE,GACE,8BAAuB,CAAvB,sBACF,CAEA,GACE,+BAAyB,CAAzB,uBACF,CACF,CARA,yBACE,GACE,8BAAuB,CAAvB,sBACF,CAEA,GACE,+BAAyB,CAAzB,uBACF,CACF,CAEA,2DAEE,qBAAuB,CADvB,oBAEF,CAEA,yCAEE,qBAAuB,CADvB,oBAEF,CC1CA,MACE,8BAA+B,CAC/B,qNAA+N,CAC/N,oCAAqC,CACrC,sCAAuC,CACvC,0CAA2C,CAC3C,yCAA0C,CAC1C,+BAAiC,CACjC,mBACF,CAEA,yCACE,MACE,qCAAsC,CACtC,yCAA0C,CAC1C,sCAAuC,CACvC,oCAAqC,CACrC,mCACF,CACA,gNAGE,gCACF,CAEA,uCACE,oCAA6B,CAA7B,4BACF,CACF,CAEA,iBAGE,MAAO,CACP,mBAAoB,CAHpB,iBAAkB,CAClB,KAAM,CAGN,4BAAqB,CAArB,oBAAqB,CACrB,SACF,CAEA,oDACE,kDAA2C,CAA3C,0CACF,CACA,qDACE,uDAAiD,CAAjD,+CACF,CACA,qDACE,iDAA0C,CAA1C,yCACF,CAEA,wBAGE,WAAY,CAFZ,iBAAkB,CAClB,UAEF,CAEA,yBAIE,qBAAsB,CACtB,QAAS,CAFT,mBAAoB,CAFpB,iBAAkB,CAClB,eAAmB,CAAnB,kBAAmB,CAInB,4BAAqB,CAArB,oBACF,CAEA,iCACE,YAA4B,CAA5B,2BACF,CAEA,2EAEE,aAAc,CAId,WAAY,CAFZ,MAAO,CAHP,iBAAkB,CAElB,KAAM,CAEN,UAEF,CAEA,iFAEE,eAAgC,CAChC,0BAA2C,CAF3C,UAGF,CAEA,qCAEE,cAAe,CAEf,WAAY,CAEZ,MAAO,CALP,iBAAkB,CAIlB,KAAM,CAFN,UAIF,CAEA,qLAGE,8LAA8D,CAA9D,6DAA8D,CAC9D,4BAAqD,CAArD,oDAAqD,CACrD,qBAAsB,CACtB,6CAAgD,CAChD,WAAY,CACZ,QAAS,CACT,kBAAmB,CACnB,UACF,CAEA,gNAGE,uBACF,CAEA,uDACE,SACF,CAEA,2DACE,iBACF,CAEA,gDACE,WACF,CAEA,mNAGE,eAAgB,CAChB,4BAAoD,CAApD,mDAAoD,CACpD,kBACF,CAEA,uMAGE,qBAAiD,CAAjD,gDACF,CACA,qLAGE,iBACF,CAEA,uHAEE,eAAgB,CAChB,0BAAiD,CAAjD,gDAAiD,CACjD,iBAAkB,CAClB,wBAAmC,CAAnC,kCACF,CAEA,2EAEE,wBAA6B,CAD7B,qBAEF,CAEA,yDACE,0BAAiD,CAAjD,gDAAiD,CACjD,iBAAkB,CAClB,wBAAmC,CAAnC,kCACF,CAEA,4DACE,0BAAiD,CAAjD,gDAAiD,CACjD,wBAAmC,CAAnC,kCACF,CAEA,uNAGE,2BAA4B,CAC5B,UAAW,CACX,aAAc,CACd,iBACF,CAEA,6IAEE,UAAW,CACX,QAAS,CACT,SACF,CAEA,uEACE,+BAAwB,CAAxB,uBACF,CAEA,sEACE,gCAAyB,CAAzB,wBACF,CAEA,0EACE,iBAAkB,CAClB,UAAW,CACX,QAAS,CACT,OAAQ,CACR,SACF,CAEA,kDACE,qBAAsB,CACtB,gBAAiB,CACjB,eACF,CAEA,wDAOE,UACF,CAEA,0EACE,uBAAgB,CAAhB,eACF,CAEA,mCACE,WAAY,CACZ,UACF,CAEA,6DACE,iBACF,CAEA,+BAEE,uCAA0C,CAE1C,yCAA4C,CAC5C,mBAAoB,CAJpB,iBAAkB,CAElB,UAGF,CAEA,wBAYE,oBAAqB,CATrB,qBAAwC,CAGxC,2CAA8C,CAF9C,6EACwB,CAIxB,cAAe,CACf,gBAAiB,CAFjB,yCAA4C,CAN5C,yCAA4C,CAK5C,qCAAwC,CAMxC,mBAAoB,CAZpB,iBAAkB,CAUlB,kBAGF,CAEA,0BACE,uCACF,CAEA,2BACE,oBACF,CAEA,4BACE,oBAAqB,CACrB,yCACF,CAEA,+BACE,yBAAyC,CACzC,wCAA2C,CAC3C,yCACF,CAEA,6BAEE,uCAA0C,CAD1C,oBAEF,CAEA,+jBAcE,cACF,CAEA,6BAGE,WAAY,CAEZ,MAAO,CAJP,iBAAkB,CAGlB,KAAM,CAFN,UAIF,CAEA,wCAKE,iBAAkB,CAFlB,WAAY,CACZ,SAAU,CAGV,mBAAoB,CANpB,iBAAkB,CAKlB,wBAAiB,CAAjB,gBAAiB,CAJjB,UAMF,CAEA,6CAEE,oBAAqB,CADrB,UAEF,CCzTA,MACE,wBAAyB,CACzB,4BAA0C,CAC1C,qCACF,CAEA,yCACE,MACE,8BAA+B,CAC/B,wCACF,CACF,CAEA,0BACE,iDAA0C,CAA1C,yCACF,CACA,2BACE,uDAAiD,CAAjD,+CACF,CACA,2BACE,kDAA2C,CAA3C,0CACF,CAEA,WAME,6BAAsB,CAAtB,0BAAsB,CAAtB,qBAAsB,CACtB,wBAAyB,CAJzB,OAAQ,CAER,aAAc,CADd,eAAgB,CAHhB,iBAAkB,CAClB,eAAmB,CAAnB,kBAAmB,CAMnB,4BAAqB,CAArB,oBAAqB,CACrB,SACF,CAEA,wBACE,iBAAkB,CAGlB,WAAY,CACZ,QAAS,CAHT,iBAAkB,CAIlB,4BAAqB,CAArB,oBAAqB,CAHrB,eAIF,CAIA,8BAEE,QAAS,CADT,KAEF,CAEA,sBAGE,wBAA2C,CAA3C,0CAA2C,CAC3C,iBAAkB,CAHlB,WAAY,CACZ,WAGF,CAEA,+BACE,eACF,CAEA,4BACE,yBACF,CAEA,0BACE,yBACF,CAEA,6BACE,eACF,CAEA,+BACE,wBAAoD,CAApD,mDACF,CAGA,yBACE,sBACF,CAEA,yBAKE,cAAe,CAJf,aAAc,CAEd,cAAe,CADf,iBAAkB,CAIlB,wBAAiB,CAAjB,gBAAiB,CAFjB,UAGF,CAEA,gCACE,KACF","sources":["index.css","App.css","../node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css","../node_modules/react-pdf/dist/esm/Page/TextLayer.css"],"sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n\na.nav-link.navbar-brand,\n.post-card {\n transition: transform 0.2s ease-in-out;\n}\n\n@media (min-width: 768px) {\n\n a.nav-link.navbar-brand:hover {\n transform: scale(1.2);\n /* font-size: 1.5rem; */\n }\n\n .post-card:hover {\n transform: scale(1.05);\n }\n}\n\nbody {\n font-family: sans-serif;\n}\n\n/* .home-greeting {\n transition: opacity 0.2s ease-in-out;\n opacity: 0;\n} */\n",".App {\n text-align: center;\n}\n\n.App-logo {\n height: 40vmin;\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .App-logo {\n animation: App-logo-spin infinite 20s linear;\n }\n}\n\n.App-header {\n background-color: #282c34;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: calc(10px + 2vmin);\n color: white;\n}\n\n.App-link {\n color: #61dafb;\n}\n\ndiv.blog-content p:empty {\n height: 1.5em;\n}\n\n.email-signup {\n max-width: 750px;\n margin: auto;\n}\n\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n\n.my-resume canvas, .my-resume .react-pdf__Page__textContent {\n width: 100% !important;\n height: auto !important;\n}\n\n.my-resume .react-pdf__Page__annotations {\n width: 100% !important;\n height: 100% !important;\n}\n","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n:root {\n --react-pdf-annotation-layer: 1;\n --annotation-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,\");\n --input-focus-border-color: Highlight;\n --input-focus-outline: 1px solid Canvas;\n --input-unfocused-border-color: transparent;\n --input-disabled-border-color: transparent;\n --input-hover-border-color: black;\n --link-outline: none;\n}\n\n@media screen and (forced-colors: active) {\n :root {\n --input-focus-border-color: CanvasText;\n --input-unfocused-border-color: ActiveText;\n --input-disabled-border-color: GrayText;\n --input-hover-border-color: Highlight;\n --link-outline: 1.5px solid LinkText;\n }\n .annotationLayer .textWidgetAnnotation :is(input, textarea):required,\n .annotationLayer .choiceWidgetAnnotation select:required,\n .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required {\n outline: 1.5px solid selectedItem;\n }\n\n .annotationLayer .linkAnnotation:hover {\n backdrop-filter: invert(100%);\n }\n}\n\n.annotationLayer {\n position: absolute;\n top: 0;\n left: 0;\n pointer-events: none;\n transform-origin: 0 0;\n z-index: 3;\n}\n\n.annotationLayer[data-main-rotation='90'] .norotate {\n transform: rotate(270deg) translateX(-100%);\n}\n.annotationLayer[data-main-rotation='180'] .norotate {\n transform: rotate(180deg) translate(-100%, -100%);\n}\n.annotationLayer[data-main-rotation='270'] .norotate {\n transform: rotate(90deg) translateY(-100%);\n}\n\n.annotationLayer canvas {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n\n.annotationLayer section {\n position: absolute;\n text-align: initial;\n pointer-events: auto;\n box-sizing: border-box;\n margin: 0;\n transform-origin: 0 0;\n}\n\n.annotationLayer .linkAnnotation {\n outline: var(--link-outline);\n}\n\n.annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a {\n position: absolute;\n font-size: 1em;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a:hover {\n opacity: 0.2;\n background: rgba(255, 255, 0, 1);\n box-shadow: 0 2px 10px rgba(255, 255, 0, 1);\n}\n\n.annotationLayer .textAnnotation img {\n position: absolute;\n cursor: pointer;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea),\n.annotationLayer .choiceWidgetAnnotation select,\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input {\n background-image: var(--annotation-unfocused-field-background);\n border: 2px solid var(--input-unfocused-border-color);\n box-sizing: border-box;\n font: calc(9px * var(--scale-factor)) sans-serif;\n height: 100%;\n margin: 0;\n vertical-align: top;\n width: 100%;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea):required,\n.annotationLayer .choiceWidgetAnnotation select:required,\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required {\n outline: 1.5px solid red;\n}\n\n.annotationLayer .choiceWidgetAnnotation select option {\n padding: 0;\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton input {\n border-radius: 50%;\n}\n\n.annotationLayer .textWidgetAnnotation textarea {\n resize: none;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea)[disabled],\n.annotationLayer .choiceWidgetAnnotation select[disabled],\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input[disabled] {\n background: none;\n border: 2px solid var(--input-disabled-border-color);\n cursor: not-allowed;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea):hover,\n.annotationLayer .choiceWidgetAnnotation select:hover,\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:hover {\n border: 2px solid var(--input-hover-border-color);\n}\n.annotationLayer .textWidgetAnnotation :is(input, textarea):hover,\n.annotationLayer .choiceWidgetAnnotation select:hover,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:hover {\n border-radius: 2px;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea):focus,\n.annotationLayer .choiceWidgetAnnotation select:focus {\n background: none;\n border: 2px solid var(--input-focus-border-color);\n border-radius: 2px;\n outline: var(--input-focus-outline);\n}\n\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) :focus {\n background-image: none;\n background-color: transparent;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox :focus {\n border: 2px solid var(--input-focus-border-color);\n border-radius: 2px;\n outline: var(--input-focus-outline);\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton :focus {\n border: 2px solid var(--input-focus-border-color);\n outline: var(--input-focus-outline);\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after,\n.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before {\n background-color: CanvasText;\n content: '';\n display: block;\n position: absolute;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after {\n height: 80%;\n left: 45%;\n width: 1px;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before {\n transform: rotate(45deg);\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after {\n transform: rotate(-45deg);\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before {\n border-radius: 50%;\n height: 50%;\n left: 30%;\n top: 20%;\n width: 50%;\n}\n\n.annotationLayer .textWidgetAnnotation input.comb {\n font-family: monospace;\n padding-left: 2px;\n padding-right: 0;\n}\n\n.annotationLayer .textWidgetAnnotation input.comb:focus {\n /*\n * Letter spacing is placed on the right side of each character. Hence, the\n * letter spacing of the last character may be placed outside the visible\n * area, causing horizontal scrolling. We avoid this by extending the width\n * when the element has focus and revert this when it loses focus.\n */\n width: 103%;\n}\n\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input {\n appearance: none;\n}\n\n.annotationLayer .popupTriggerArea {\n height: 100%;\n width: 100%;\n}\n\n.annotationLayer .fileAttachmentAnnotation .popupTriggerArea {\n position: absolute;\n}\n\n.annotationLayer .popupWrapper {\n position: absolute;\n font-size: calc(9px * var(--scale-factor));\n width: 100%;\n min-width: calc(180px * var(--scale-factor));\n pointer-events: none;\n}\n\n.annotationLayer .popup {\n position: absolute;\n max-width: calc(180px * var(--scale-factor));\n background-color: rgba(255, 255, 153, 1);\n box-shadow: 0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor))\n rgba(136, 136, 136, 1);\n border-radius: calc(2px * var(--scale-factor));\n padding: calc(6px * var(--scale-factor));\n margin-left: calc(5px * var(--scale-factor));\n cursor: pointer;\n font: message-box;\n white-space: normal;\n word-wrap: break-word;\n pointer-events: auto;\n}\n\n.annotationLayer .popup > * {\n font-size: calc(9px * var(--scale-factor));\n}\n\n.annotationLayer .popup h1 {\n display: inline-block;\n}\n\n.annotationLayer .popupDate {\n display: inline-block;\n margin-left: calc(5px * var(--scale-factor));\n}\n\n.annotationLayer .popupContent {\n border-top: 1px solid rgba(51, 51, 51, 1);\n margin-top: calc(2px * var(--scale-factor));\n padding-top: calc(2px * var(--scale-factor));\n}\n\n.annotationLayer .richText > * {\n white-space: pre-wrap;\n font-size: calc(9px * var(--scale-factor));\n}\n\n.annotationLayer .highlightAnnotation,\n.annotationLayer .underlineAnnotation,\n.annotationLayer .squigglyAnnotation,\n.annotationLayer .strikeoutAnnotation,\n.annotationLayer .freeTextAnnotation,\n.annotationLayer .lineAnnotation svg line,\n.annotationLayer .squareAnnotation svg rect,\n.annotationLayer .circleAnnotation svg ellipse,\n.annotationLayer .polylineAnnotation svg polyline,\n.annotationLayer .polygonAnnotation svg polygon,\n.annotationLayer .caretAnnotation,\n.annotationLayer .inkAnnotation svg polyline,\n.annotationLayer .stampAnnotation,\n.annotationLayer .fileAttachmentAnnotation {\n cursor: pointer;\n}\n\n.annotationLayer section svg {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n.annotationLayer .annotationTextContent {\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0;\n color: transparent;\n user-select: none;\n pointer-events: none;\n}\n\n.annotationLayer .annotationTextContent span {\n width: 100%;\n display: inline-block;\n}\n","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n:root {\n --react-pdf-text-layer: 1;\n --highlight-bg-color: rgba(180, 0, 170, 1);\n --highlight-selected-bg-color: rgba(0, 100, 0, 1);\n}\n\n@media screen and (forced-colors: active) {\n :root {\n --highlight-bg-color: Highlight;\n --highlight-selected-bg-color: ButtonText;\n }\n}\n\n[data-main-rotation='90'] {\n transform: rotate(90deg) translateY(-100%);\n}\n[data-main-rotation='180'] {\n transform: rotate(180deg) translate(-100%, -100%);\n}\n[data-main-rotation='270'] {\n transform: rotate(270deg) translateX(-100%);\n}\n\n.textLayer {\n position: absolute;\n text-align: initial;\n inset: 0;\n overflow: hidden;\n line-height: 1;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n z-index: 2;\n}\n\n.textLayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n margin: 0;\n transform-origin: 0 0;\n}\n\n/* Only necessary in Google Chrome, see issue 14205, and most unfortunately\n * the problem doesn't show up in \"text\" reference tests. */\n.textLayer span.markedContent {\n top: 0;\n height: 0;\n}\n\n.textLayer .highlight {\n margin: -1px;\n padding: 1px;\n background-color: var(--highlight-bg-color);\n border-radius: 4px;\n}\n\n.textLayer .highlight.appended {\n position: initial;\n}\n\n.textLayer .highlight.begin {\n border-radius: 4px 0 0 4px;\n}\n\n.textLayer .highlight.end {\n border-radius: 0 4px 4px 0;\n}\n\n.textLayer .highlight.middle {\n border-radius: 0;\n}\n\n.textLayer .highlight.selected {\n background-color: var(--highlight-selected-bg-color);\n}\n\n/* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */\n.textLayer br::selection {\n background: transparent;\n}\n\n.textLayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: -1;\n cursor: default;\n user-select: none;\n}\n\n.textLayer .endOfContent.active {\n top: 0;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/static/css/main.6007bd12.css b/static/css/main.6007bd12.css deleted file mode 100644 index 35e0365..0000000 --- a/static/css/main.6007bd12.css +++ /dev/null @@ -1,2 +0,0 @@ -body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.post-card,a.nav-link.navbar-brand{transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}@media (min-width:768px){a.nav-link.navbar-brand:hover{-webkit-transform:scale(1.2);transform:scale(1.2)}.post-card:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}}body{font-family:sans-serif}.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion:no-preference){.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite}}.App-header{align-items:center;background-color:#282c34;color:#fff;display:flex;flex-direction:column;font-size:calc(10px + 2vmin);justify-content:center;min-height:100vh}.App-link{color:#61dafb}div.blog-content p:empty{height:1.5em}.email-signup{margin:auto;max-width:750px}@-webkit-keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.my-resume .react-pdf__Page__textContent,.my-resume canvas{height:auto!important;width:100%!important}.my-resume .react-pdf__Page__annotations{height:100%!important;width:100%!important}:root{--react-pdf-annotation-layer:1;--annotation-unfocused-field-background:url('data:image/svg+xml;charset=utf-8,');--input-focus-border-color:Highlight;--input-focus-outline:1px solid Canvas;--input-unfocused-border-color:transparent;--input-disabled-border-color:transparent;--input-hover-border-color:#000;--link-outline:none}@media screen and (forced-colors:active){:root{--input-focus-border-color:CanvasText;--input-unfocused-border-color:ActiveText;--input-disabled-border-color:GrayText;--input-hover-border-color:Highlight;--link-outline:1.5px solid LinkText}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .textWidgetAnnotation :is(input,textarea):required{outline:1.5px solid selectedItem}.annotationLayer .linkAnnotation:hover{-webkit-backdrop-filter:invert(100%);backdrop-filter:invert(100%)}}.annotationLayer{left:0;pointer-events:none;position:absolute;top:0;-webkit-transform-origin:0 0;transform-origin:0 0;z-index:3}.annotationLayer[data-main-rotation="90"] .norotate{-webkit-transform:rotate(270deg) translateX(-100%);transform:rotate(270deg) translateX(-100%)}.annotationLayer[data-main-rotation="180"] .norotate{-webkit-transform:rotate(180deg) translate(-100%,-100%);transform:rotate(180deg) translate(-100%,-100%)}.annotationLayer[data-main-rotation="270"] .norotate{-webkit-transform:rotate(90deg) translateY(-100%);transform:rotate(90deg) translateY(-100%)}.annotationLayer canvas{height:100%;position:absolute;width:100%}.annotationLayer section{box-sizing:border-box;margin:0;pointer-events:auto;position:absolute;text-align:left;text-align:initial;-webkit-transform-origin:0 0;transform-origin:0 0}.annotationLayer .linkAnnotation{outline:none;outline:var(--link-outline)}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a{font-size:1em;height:100%;left:0;position:absolute;top:0;width:100%}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a:hover{background:#ff0;box-shadow:0 2px 10px #ff0;opacity:.2}.annotationLayer .textAnnotation img{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input,.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .textWidgetAnnotation :is(input,textarea){background-image:url('data:image/svg+xml;charset=utf-8,');background-image:var(--annotation-unfocused-field-background);border:2px solid transparent;border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px*var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .textWidgetAnnotation :is(input,textarea):required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select option{padding:0}.annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.annotationLayer .textWidgetAnnotation textarea{resize:none}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input[disabled],.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .textWidgetAnnotation :is(input,textarea)[disabled]{background:none;border:2px solid transparent;border:2px solid var(--input-disabled-border-color);cursor:not-allowed}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .textWidgetAnnotation :is(input,textarea):hover{border:2px solid #000;border:2px solid var(--input-hover-border-color)}.annotationLayer .buttonWidgetAnnotation.checkBox input:hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .textWidgetAnnotation :is(input,textarea):hover{border-radius:2px}.annotationLayer .choiceWidgetAnnotation select:focus,.annotationLayer .textWidgetAnnotation :is(input,textarea):focus{background:none;border:2px solid Highlight;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:1px solid Canvas;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) :focus{background-color:initial;background-image:none}.annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid Highlight;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:1px solid Canvas;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid Highlight;border:2px solid var(--input-focus-border-color);outline:1px solid Canvas;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:"";display:block;position:absolute}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{height:80%;left:45%;width:1px}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}.annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{-webkit-appearance:none;appearance:none}.annotationLayer .popupTriggerArea{height:100%;width:100%}.annotationLayer .fileAttachmentAnnotation .popupTriggerArea{position:absolute}.annotationLayer .popupWrapper{font-size:calc(9px*var(--scale-factor));min-width:calc(180px*var(--scale-factor));pointer-events:none;position:absolute;width:100%}.annotationLayer .popup{word-wrap:break-word;background-color:#ff9;border-radius:calc(2px*var(--scale-factor));box-shadow:0 calc(2px*var(--scale-factor)) calc(5px*var(--scale-factor)) #888;cursor:pointer;font:message-box;margin-left:calc(5px*var(--scale-factor));max-width:calc(180px*var(--scale-factor));padding:calc(6px*var(--scale-factor));pointer-events:auto;position:absolute;white-space:normal}.annotationLayer .popup>*{font-size:calc(9px*var(--scale-factor))}.annotationLayer .popup h1{display:inline-block}.annotationLayer .popupDate{display:inline-block;margin-left:calc(5px*var(--scale-factor))}.annotationLayer .popupContent{border-top:1px solid #333;margin-top:calc(2px*var(--scale-factor));padding-top:calc(2px*var(--scale-factor))}.annotationLayer .richText>*{font-size:calc(9px*var(--scale-factor));white-space:pre-wrap}.annotationLayer .caretAnnotation,.annotationLayer .circleAnnotation svg ellipse,.annotationLayer .fileAttachmentAnnotation,.annotationLayer .freeTextAnnotation,.annotationLayer .highlightAnnotation,.annotationLayer .inkAnnotation svg polyline,.annotationLayer .lineAnnotation svg line,.annotationLayer .polygonAnnotation svg polygon,.annotationLayer .polylineAnnotation svg polyline,.annotationLayer .squareAnnotation svg rect,.annotationLayer .squigglyAnnotation,.annotationLayer .stampAnnotation,.annotationLayer .strikeoutAnnotation,.annotationLayer .underlineAnnotation{cursor:pointer}.annotationLayer section svg{height:100%;left:0;position:absolute;top:0;width:100%}.annotationLayer .annotationTextContent{color:transparent;height:100%;opacity:0;pointer-events:none;position:absolute;-webkit-user-select:none;user-select:none;width:100%}.annotationLayer .annotationTextContent span{display:inline-block;width:100%}:root{--react-pdf-text-layer:1;--highlight-bg-color:#b400aa;--highlight-selected-bg-color:#006400}@media screen and (forced-colors:active){:root{--highlight-bg-color:Highlight;--highlight-selected-bg-color:ButtonText}}[data-main-rotation="90"]{-webkit-transform:rotate(90deg) translateY(-100%);transform:rotate(90deg) translateY(-100%)}[data-main-rotation="180"]{-webkit-transform:rotate(180deg) translate(-100%,-100%);transform:rotate(180deg) translate(-100%,-100%)}[data-main-rotation="270"]{-webkit-transform:rotate(270deg) translateX(-100%);transform:rotate(270deg) translateX(-100%)}.textLayer{-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none;inset:0;line-height:1;overflow:hidden;position:absolute;text-align:left;text-align:initial;-webkit-transform-origin:0 0;transform-origin:0 0;z-index:2}.textLayer :is(span,br){color:transparent;cursor:text;margin:0;position:absolute;-webkit-transform-origin:0 0;transform-origin:0 0;white-space:pre}.textLayer span.markedContent{height:0;top:0}.textLayer .highlight{background-color:#b400aa;background-color:var(--highlight-bg-color);border-radius:4px;margin:-1px;padding:1px}.textLayer .highlight.appended{position:static}.textLayer .highlight.begin{border-radius:4px 0 0 4px}.textLayer .highlight.end{border-radius:0 4px 4px 0}.textLayer .highlight.middle{border-radius:0}.textLayer .highlight.selected{background-color:#006400;background-color:var(--highlight-selected-bg-color)}.textLayer br::selection{background:transparent}.textLayer .endOfContent{cursor:default;display:block;inset:100% 0 0;position:absolute;-webkit-user-select:none;user-select:none;z-index:-1}.textLayer .endOfContent.active{top:0} -/*# sourceMappingURL=main.6007bd12.css.map*/ \ No newline at end of file diff --git a/static/css/main.6007bd12.css.map b/static/css/main.6007bd12.css.map deleted file mode 100644 index 0e173e2..0000000 --- a/static/css/main.6007bd12.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/css/main.6007bd12.css","mappings":"AAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAEY,CAHZ,QAMF,CAEA,KACE,uEAEF,CAEA,mCAEE,4CAAsC,CAAtC,oCAAsC,CAAtC,sEACF,CAEA,yBAEE,8BACE,4BAAqB,CAArB,oBAEF,CAEA,iBACE,4BAAqB,CAArB,oBACF,CACF,CAEA,KACE,sBACF,CCjCA,KACE,iBACF,CAEA,UACE,aAAc,CACd,mBACF,CAEA,8CACE,UACE,mDAA4C,CAA5C,2CACF,CACF,CAEA,YAKE,kBAAmB,CAJnB,wBAAyB,CAOzB,UAAY,CALZ,YAAa,CACb,qBAAsB,CAGtB,4BAA6B,CAD7B,sBAAuB,CAJvB,gBAOF,CAEA,UACE,aACF,CAEA,yBACE,YACF,CAEA,cAEE,WAAY,CADZ,eAEF,CAEA,iCACE,GACE,8BAAuB,CAAvB,sBACF,CAEA,GACE,+BAAyB,CAAzB,uBACF,CACF,CARA,yBACE,GACE,8BAAuB,CAAvB,sBACF,CAEA,GACE,+BAAyB,CAAzB,uBACF,CACF,CAEA,2DAEE,qBAAuB,CADvB,oBAEF,CAEA,yCAEE,qBAAuB,CADvB,oBAEF,CC1CA,MACE,8BAA+B,CAC/B,qNAA+N,CAC/N,oCAAqC,CACrC,sCAAuC,CACvC,0CAA2C,CAC3C,yCAA0C,CAC1C,+BAAiC,CACjC,mBACF,CAEA,yCACE,MACE,qCAAsC,CACtC,yCAA0C,CAC1C,sCAAuC,CACvC,oCAAqC,CACrC,mCACF,CACA,gNAGE,gCACF,CAEA,uCACE,oCAA6B,CAA7B,4BACF,CACF,CAEA,iBAGE,MAAO,CACP,mBAAoB,CAHpB,iBAAkB,CAClB,KAAM,CAGN,4BAAqB,CAArB,oBAAqB,CACrB,SACF,CAEA,oDACE,kDAA2C,CAA3C,0CACF,CACA,qDACE,uDAAiD,CAAjD,+CACF,CACA,qDACE,iDAA0C,CAA1C,yCACF,CAEA,wBAGE,WAAY,CAFZ,iBAAkB,CAClB,UAEF,CAEA,yBAIE,qBAAsB,CACtB,QAAS,CAFT,mBAAoB,CAFpB,iBAAkB,CAClB,eAAmB,CAAnB,kBAAmB,CAInB,4BAAqB,CAArB,oBACF,CAEA,iCACE,YAA4B,CAA5B,2BACF,CAEA,2EAEE,aAAc,CAId,WAAY,CAFZ,MAAO,CAHP,iBAAkB,CAElB,KAAM,CAEN,UAEF,CAEA,iFAEE,eAAgC,CAChC,0BAA2C,CAF3C,UAGF,CAEA,qCAEE,cAAe,CAEf,WAAY,CAEZ,MAAO,CALP,iBAAkB,CAIlB,KAAM,CAFN,UAIF,CAEA,qLAGE,8LAA8D,CAA9D,6DAA8D,CAC9D,4BAAqD,CAArD,oDAAqD,CACrD,qBAAsB,CACtB,6CAAgD,CAChD,WAAY,CACZ,QAAS,CACT,kBAAmB,CACnB,UACF,CAEA,gNAGE,uBACF,CAEA,uDACE,SACF,CAEA,2DACE,iBACF,CAEA,gDACE,WACF,CAEA,mNAGE,eAAgB,CAChB,4BAAoD,CAApD,mDAAoD,CACpD,kBACF,CAEA,uMAGE,qBAAiD,CAAjD,gDACF,CACA,qLAGE,iBACF,CAEA,uHAEE,eAAgB,CAChB,0BAAiD,CAAjD,gDAAiD,CACjD,iBAAkB,CAClB,wBAAmC,CAAnC,kCACF,CAEA,2EAEE,wBAA6B,CAD7B,qBAEF,CAEA,yDACE,0BAAiD,CAAjD,gDAAiD,CACjD,iBAAkB,CAClB,wBAAmC,CAAnC,kCACF,CAEA,4DACE,0BAAiD,CAAjD,gDAAiD,CACjD,wBAAmC,CAAnC,kCACF,CAEA,uNAGE,2BAA4B,CAC5B,UAAW,CACX,aAAc,CACd,iBACF,CAEA,6IAEE,UAAW,CACX,QAAS,CACT,SACF,CAEA,uEACE,+BAAwB,CAAxB,uBACF,CAEA,sEACE,gCAAyB,CAAzB,wBACF,CAEA,0EACE,iBAAkB,CAClB,UAAW,CACX,QAAS,CACT,OAAQ,CACR,SACF,CAEA,kDACE,qBAAsB,CACtB,gBAAiB,CACjB,eACF,CAEA,wDAOE,UACF,CAEA,0EACE,uBAAgB,CAAhB,eACF,CAEA,mCACE,WAAY,CACZ,UACF,CAEA,6DACE,iBACF,CAEA,+BAEE,uCAA0C,CAE1C,yCAA4C,CAC5C,mBAAoB,CAJpB,iBAAkB,CAElB,UAGF,CAEA,wBAYE,oBAAqB,CATrB,qBAAwC,CAGxC,2CAA8C,CAF9C,6EACwB,CAIxB,cAAe,CACf,gBAAiB,CAFjB,yCAA4C,CAN5C,yCAA4C,CAK5C,qCAAwC,CAMxC,mBAAoB,CAZpB,iBAAkB,CAUlB,kBAGF,CAEA,0BACE,uCACF,CAEA,2BACE,oBACF,CAEA,4BACE,oBAAqB,CACrB,yCACF,CAEA,+BACE,yBAAyC,CACzC,wCAA2C,CAC3C,yCACF,CAEA,6BAEE,uCAA0C,CAD1C,oBAEF,CAEA,+jBAcE,cACF,CAEA,6BAGE,WAAY,CAEZ,MAAO,CAJP,iBAAkB,CAGlB,KAAM,CAFN,UAIF,CAEA,wCAKE,iBAAkB,CAFlB,WAAY,CACZ,SAAU,CAGV,mBAAoB,CANpB,iBAAkB,CAKlB,wBAAiB,CAAjB,gBAAiB,CAJjB,UAMF,CAEA,6CAEE,oBAAqB,CADrB,UAEF,CCzTA,MACE,wBAAyB,CACzB,4BAA0C,CAC1C,qCACF,CAEA,yCACE,MACE,8BAA+B,CAC/B,wCACF,CACF,CAEA,0BACE,iDAA0C,CAA1C,yCACF,CACA,2BACE,uDAAiD,CAAjD,+CACF,CACA,2BACE,kDAA2C,CAA3C,0CACF,CAEA,WAME,6BAAsB,CAAtB,0BAAsB,CAAtB,qBAAsB,CACtB,wBAAyB,CAJzB,OAAQ,CAER,aAAc,CADd,eAAgB,CAHhB,iBAAkB,CAClB,eAAmB,CAAnB,kBAAmB,CAMnB,4BAAqB,CAArB,oBAAqB,CACrB,SACF,CAEA,wBACE,iBAAkB,CAGlB,WAAY,CACZ,QAAS,CAHT,iBAAkB,CAIlB,4BAAqB,CAArB,oBAAqB,CAHrB,eAIF,CAIA,8BAEE,QAAS,CADT,KAEF,CAEA,sBAGE,wBAA2C,CAA3C,0CAA2C,CAC3C,iBAAkB,CAHlB,WAAY,CACZ,WAGF,CAEA,+BACE,eACF,CAEA,4BACE,yBACF,CAEA,0BACE,yBACF,CAEA,6BACE,eACF,CAEA,+BACE,wBAAoD,CAApD,mDACF,CAGA,yBACE,sBACF,CAEA,yBAKE,cAAe,CAJf,aAAc,CAEd,cAAe,CADf,iBAAkB,CAIlB,wBAAiB,CAAjB,gBAAiB,CAFjB,UAGF,CAEA,gCACE,KACF","sources":["index.css","App.css","../node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css","../node_modules/react-pdf/dist/esm/Page/TextLayer.css"],"sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n\na.nav-link.navbar-brand,\n.post-card {\n transition: transform 0.2s ease-in-out;\n}\n\n@media (min-width: 768px) {\n\n a.nav-link.navbar-brand:hover {\n transform: scale(1.2);\n /* font-size: 1.5rem; */\n }\n\n .post-card:hover {\n transform: scale(1.1);\n }\n}\n\nbody {\n font-family: sans-serif;\n}\n\n/* .home-greeting {\n transition: opacity 0.2s ease-in-out;\n opacity: 0;\n} */",".App {\n text-align: center;\n}\n\n.App-logo {\n height: 40vmin;\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .App-logo {\n animation: App-logo-spin infinite 20s linear;\n }\n}\n\n.App-header {\n background-color: #282c34;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: calc(10px + 2vmin);\n color: white;\n}\n\n.App-link {\n color: #61dafb;\n}\n\ndiv.blog-content p:empty {\n height: 1.5em;\n}\n\n.email-signup {\n max-width: 750px;\n margin: auto;\n}\n\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n\n.my-resume canvas, .my-resume .react-pdf__Page__textContent {\n width: 100% !important;\n height: auto !important;\n}\n\n.my-resume .react-pdf__Page__annotations {\n width: 100% !important;\n height: 100% !important;\n}\n","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n:root {\n --react-pdf-annotation-layer: 1;\n --annotation-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,\");\n --input-focus-border-color: Highlight;\n --input-focus-outline: 1px solid Canvas;\n --input-unfocused-border-color: transparent;\n --input-disabled-border-color: transparent;\n --input-hover-border-color: black;\n --link-outline: none;\n}\n\n@media screen and (forced-colors: active) {\n :root {\n --input-focus-border-color: CanvasText;\n --input-unfocused-border-color: ActiveText;\n --input-disabled-border-color: GrayText;\n --input-hover-border-color: Highlight;\n --link-outline: 1.5px solid LinkText;\n }\n .annotationLayer .textWidgetAnnotation :is(input, textarea):required,\n .annotationLayer .choiceWidgetAnnotation select:required,\n .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required {\n outline: 1.5px solid selectedItem;\n }\n\n .annotationLayer .linkAnnotation:hover {\n backdrop-filter: invert(100%);\n }\n}\n\n.annotationLayer {\n position: absolute;\n top: 0;\n left: 0;\n pointer-events: none;\n transform-origin: 0 0;\n z-index: 3;\n}\n\n.annotationLayer[data-main-rotation='90'] .norotate {\n transform: rotate(270deg) translateX(-100%);\n}\n.annotationLayer[data-main-rotation='180'] .norotate {\n transform: rotate(180deg) translate(-100%, -100%);\n}\n.annotationLayer[data-main-rotation='270'] .norotate {\n transform: rotate(90deg) translateY(-100%);\n}\n\n.annotationLayer canvas {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n\n.annotationLayer section {\n position: absolute;\n text-align: initial;\n pointer-events: auto;\n box-sizing: border-box;\n margin: 0;\n transform-origin: 0 0;\n}\n\n.annotationLayer .linkAnnotation {\n outline: var(--link-outline);\n}\n\n.annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a {\n position: absolute;\n font-size: 1em;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a:hover {\n opacity: 0.2;\n background: rgba(255, 255, 0, 1);\n box-shadow: 0 2px 10px rgba(255, 255, 0, 1);\n}\n\n.annotationLayer .textAnnotation img {\n position: absolute;\n cursor: pointer;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea),\n.annotationLayer .choiceWidgetAnnotation select,\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input {\n background-image: var(--annotation-unfocused-field-background);\n border: 2px solid var(--input-unfocused-border-color);\n box-sizing: border-box;\n font: calc(9px * var(--scale-factor)) sans-serif;\n height: 100%;\n margin: 0;\n vertical-align: top;\n width: 100%;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea):required,\n.annotationLayer .choiceWidgetAnnotation select:required,\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required {\n outline: 1.5px solid red;\n}\n\n.annotationLayer .choiceWidgetAnnotation select option {\n padding: 0;\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton input {\n border-radius: 50%;\n}\n\n.annotationLayer .textWidgetAnnotation textarea {\n resize: none;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea)[disabled],\n.annotationLayer .choiceWidgetAnnotation select[disabled],\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input[disabled] {\n background: none;\n border: 2px solid var(--input-disabled-border-color);\n cursor: not-allowed;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea):hover,\n.annotationLayer .choiceWidgetAnnotation select:hover,\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:hover {\n border: 2px solid var(--input-hover-border-color);\n}\n.annotationLayer .textWidgetAnnotation :is(input, textarea):hover,\n.annotationLayer .choiceWidgetAnnotation select:hover,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:hover {\n border-radius: 2px;\n}\n\n.annotationLayer .textWidgetAnnotation :is(input, textarea):focus,\n.annotationLayer .choiceWidgetAnnotation select:focus {\n background: none;\n border: 2px solid var(--input-focus-border-color);\n border-radius: 2px;\n outline: var(--input-focus-outline);\n}\n\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) :focus {\n background-image: none;\n background-color: transparent;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox :focus {\n border: 2px solid var(--input-focus-border-color);\n border-radius: 2px;\n outline: var(--input-focus-outline);\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton :focus {\n border: 2px solid var(--input-focus-border-color);\n outline: var(--input-focus-outline);\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after,\n.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before {\n background-color: CanvasText;\n content: '';\n display: block;\n position: absolute;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after {\n height: 80%;\n left: 45%;\n width: 1px;\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before {\n transform: rotate(45deg);\n}\n\n.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after {\n transform: rotate(-45deg);\n}\n\n.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before {\n border-radius: 50%;\n height: 50%;\n left: 30%;\n top: 20%;\n width: 50%;\n}\n\n.annotationLayer .textWidgetAnnotation input.comb {\n font-family: monospace;\n padding-left: 2px;\n padding-right: 0;\n}\n\n.annotationLayer .textWidgetAnnotation input.comb:focus {\n /*\n * Letter spacing is placed on the right side of each character. Hence, the\n * letter spacing of the last character may be placed outside the visible\n * area, causing horizontal scrolling. We avoid this by extending the width\n * when the element has focus and revert this when it loses focus.\n */\n width: 103%;\n}\n\n.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input {\n appearance: none;\n}\n\n.annotationLayer .popupTriggerArea {\n height: 100%;\n width: 100%;\n}\n\n.annotationLayer .fileAttachmentAnnotation .popupTriggerArea {\n position: absolute;\n}\n\n.annotationLayer .popupWrapper {\n position: absolute;\n font-size: calc(9px * var(--scale-factor));\n width: 100%;\n min-width: calc(180px * var(--scale-factor));\n pointer-events: none;\n}\n\n.annotationLayer .popup {\n position: absolute;\n max-width: calc(180px * var(--scale-factor));\n background-color: rgba(255, 255, 153, 1);\n box-shadow: 0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor))\n rgba(136, 136, 136, 1);\n border-radius: calc(2px * var(--scale-factor));\n padding: calc(6px * var(--scale-factor));\n margin-left: calc(5px * var(--scale-factor));\n cursor: pointer;\n font: message-box;\n white-space: normal;\n word-wrap: break-word;\n pointer-events: auto;\n}\n\n.annotationLayer .popup > * {\n font-size: calc(9px * var(--scale-factor));\n}\n\n.annotationLayer .popup h1 {\n display: inline-block;\n}\n\n.annotationLayer .popupDate {\n display: inline-block;\n margin-left: calc(5px * var(--scale-factor));\n}\n\n.annotationLayer .popupContent {\n border-top: 1px solid rgba(51, 51, 51, 1);\n margin-top: calc(2px * var(--scale-factor));\n padding-top: calc(2px * var(--scale-factor));\n}\n\n.annotationLayer .richText > * {\n white-space: pre-wrap;\n font-size: calc(9px * var(--scale-factor));\n}\n\n.annotationLayer .highlightAnnotation,\n.annotationLayer .underlineAnnotation,\n.annotationLayer .squigglyAnnotation,\n.annotationLayer .strikeoutAnnotation,\n.annotationLayer .freeTextAnnotation,\n.annotationLayer .lineAnnotation svg line,\n.annotationLayer .squareAnnotation svg rect,\n.annotationLayer .circleAnnotation svg ellipse,\n.annotationLayer .polylineAnnotation svg polyline,\n.annotationLayer .polygonAnnotation svg polygon,\n.annotationLayer .caretAnnotation,\n.annotationLayer .inkAnnotation svg polyline,\n.annotationLayer .stampAnnotation,\n.annotationLayer .fileAttachmentAnnotation {\n cursor: pointer;\n}\n\n.annotationLayer section svg {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n.annotationLayer .annotationTextContent {\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0;\n color: transparent;\n user-select: none;\n pointer-events: none;\n}\n\n.annotationLayer .annotationTextContent span {\n width: 100%;\n display: inline-block;\n}\n","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n:root {\n --react-pdf-text-layer: 1;\n --highlight-bg-color: rgba(180, 0, 170, 1);\n --highlight-selected-bg-color: rgba(0, 100, 0, 1);\n}\n\n@media screen and (forced-colors: active) {\n :root {\n --highlight-bg-color: Highlight;\n --highlight-selected-bg-color: ButtonText;\n }\n}\n\n[data-main-rotation='90'] {\n transform: rotate(90deg) translateY(-100%);\n}\n[data-main-rotation='180'] {\n transform: rotate(180deg) translate(-100%, -100%);\n}\n[data-main-rotation='270'] {\n transform: rotate(270deg) translateX(-100%);\n}\n\n.textLayer {\n position: absolute;\n text-align: initial;\n inset: 0;\n overflow: hidden;\n line-height: 1;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n z-index: 2;\n}\n\n.textLayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n margin: 0;\n transform-origin: 0 0;\n}\n\n/* Only necessary in Google Chrome, see issue 14205, and most unfortunately\n * the problem doesn't show up in \"text\" reference tests. */\n.textLayer span.markedContent {\n top: 0;\n height: 0;\n}\n\n.textLayer .highlight {\n margin: -1px;\n padding: 1px;\n background-color: var(--highlight-bg-color);\n border-radius: 4px;\n}\n\n.textLayer .highlight.appended {\n position: initial;\n}\n\n.textLayer .highlight.begin {\n border-radius: 4px 0 0 4px;\n}\n\n.textLayer .highlight.end {\n border-radius: 0 4px 4px 0;\n}\n\n.textLayer .highlight.middle {\n border-radius: 0;\n}\n\n.textLayer .highlight.selected {\n background-color: var(--highlight-selected-bg-color);\n}\n\n/* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */\n.textLayer br::selection {\n background: transparent;\n}\n\n.textLayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: -1;\n cursor: default;\n user-select: none;\n}\n\n.textLayer .endOfContent.active {\n top: 0;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/main.5ea2698e.js b/static/js/main.51d8dcc4.js similarity index 56% rename from static/js/main.5ea2698e.js rename to static/js/main.51d8dcc4.js index 66ffb99..349d88d 100644 --- a/static/js/main.5ea2698e.js +++ b/static/js/main.51d8dcc4.js @@ -1,3 +1,3 @@ -/*! For license information please see main.5ea2698e.js.LICENSE.txt */ -(function(){var __webpack_modules__={3661:function(module,__unused_webpack_exports,__webpack_require__){var _classStaticPrivateMethodGet=__webpack_require__(5764).default,_objectSpread=__webpack_require__(2122).default,_get=__webpack_require__(1588).default,_getPrototypeOf=__webpack_require__(3808).default,_defineProperty=__webpack_require__(8416).default,_assertThisInitialized=__webpack_require__(6115).default,_classPrivateMethodInitSpec=__webpack_require__(1860).default,_classPrivateMethodGet=__webpack_require__(4467).default,_regeneratorRuntime=__webpack_require__(7061).default,_classStaticPrivateFieldSpecSet=__webpack_require__(2306).default,_classStaticPrivateFieldSpecGet=__webpack_require__(1280).default,_asyncToGenerator=__webpack_require__(7156).default,_classPrivateFieldInitSpec=__webpack_require__(9159).default,_classPrivateFieldGet=__webpack_require__(468).default,_classPrivateFieldSet=__webpack_require__(5661).default,_toConsumableArray=__webpack_require__(861).default,_slicedToArray=__webpack_require__(7424).default,_createForOfIteratorHelper=__webpack_require__(4704).default,_createClass=__webpack_require__(9728).default,_classCallCheck=__webpack_require__(6690).default,_inherits=__webpack_require__(1655).default,_createSuper=__webpack_require__(6389).default,factory;globalThis,factory=function(){return function(){"use strict";var __webpack_modules__=[,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.RenderingIntentFlag=t.PromiseCapability=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.MAX_IMAGE_SIZE_TO_CACHE=t.LINE_FACTOR=t.LINE_DESCENT_FACTOR=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FeatureTest=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.BASELINE_FACTOR=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMode=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationEditorType=t.AnnotationEditorPrefix=t.AnnotationEditorParamsType=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.assert=function(e,t){e||i(t)},t.bytesToString=function(e){"object"===typeof e&&void 0!==(null===e||void 0===e?void 0:e.length)||i("Invalid argument for bytesToString");var t=e.length,n=8192;if(t1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;try{if(n&&"string"===typeof e){if(n.addDefaultProtocol&&e.startsWith("www.")){var r=e.match(/\./g);(null===r||void 0===r?void 0:r.length)>=2&&(e="http://".concat(e))}if(n.tryConvertEncoding)try{e=b(e)}catch(i){}}var a=t?new URL(e,t):new URL(e);if(function(e){switch(null===e||void 0===e?void 0:e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(a))return a}catch(i){}return null},t.getModificationDate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")},t.getVerbosityLevel=function(){return r},t.info=function(e){r>=n.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===typeof e&&void 0!==(null===e||void 0===e?void 0:e.byteLength)},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=v,t.stringToPDFString=function(e){var t;if(e[0]>="\xef"&&("\xfe"===e[0]&&"\xff"===e[1]?t="utf-16be":"\xff"===e[0]&&"\xfe"===e[1]?t="utf-16le":"\xef"===e[0]&&"\xbb"===e[1]&&"\xbf"===e[2]&&(t="utf-8"),t))try{var n=new TextDecoder(t,{fatal:!0}),r=v(e);return n.decode(r)}catch(c){a('stringToPDFString: "'.concat(c,'".'))}for(var i=[],o=0,s=e.length;o=n.WARNINGS&&console.log("Warning: ".concat(e))}function i(e){throw new Error(e)}function o(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!0,writable:!1}),n}var s=function(){function e(t,n){this.constructor===e&&i("Cannot initialize BaseException."),this.message=t,this.name=n}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=s;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,"PasswordException")).code=r,a}return _createClass(n)}(s);t.PasswordException=l;var c=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r){var a;return _classCallCheck(this,n),(a=t.call(this,e,"UnknownErrorException")).details=r,a}return _createClass(n)}(s);t.UnknownErrorException=c;var u=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,"InvalidPDFException")}return _createClass(n)}(s);t.InvalidPDFException=u;var d=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,"MissingPDFException")}return _createClass(n)}(s);t.MissingPDFException=d;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,"UnexpectedResponseException")).status=r,a}return _createClass(n)}(s);t.UnexpectedResponseException=h;var f=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,"FormatError")}return _createClass(n)}(s);t.FormatError=f;var p=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,"AbortException")}return _createClass(n)}(s);function v(e){"string"!==typeof e&&i("Invalid argument for stringToBytes");for(var t=e.length,n=new Uint8Array(t),r=0;re[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(e,t){var n=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),r=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(n>r)return null;var a=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),i=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return a>i?null:[n,a,r,i]}},{key:"bezierBoundingBox",value:function(e,t,n,r,a,i,o,s){for(var l,c,u,d,h,f,p,v,m=[],g=[[],[]],y=0;y<2;++y)if(0===y?(c=6*e-12*n+6*a,l=-3*e+9*n-9*a+3*o,u=3*n-3*e):(c=6*t-12*r+6*i,l=-3*t+9*r-9*i+3*s,u=3*r-3*t),Math.abs(l)<1e-12){if(Math.abs(c)<1e-12)continue;0<(d=-u/c)&&d<1&&m.push(d)}else p=c*c-4*u*l,v=Math.sqrt(p),p<0||(0<(h=(-c+v)/(2*l))&&h<1&&m.push(h),0<(f=(-c-v)/(2*l))&&f<1&&m.push(f));for(var _,b=m.length,k=b;b--;)_=1-(d=m[b]),g[0][b]=_*_*_*e+3*_*_*d*n+3*_*d*d*a+d*d*d*o,g[1][b]=_*_*_*t+3*_*_*d*r+3*_*d*d*i+d*d*d*s;return g[0][k]=e,g[1][k]=t,g[0][k+1]=o,g[1][k+1]=s,g[0].length=g[1].length=k+2,[Math.min.apply(Math,_toConsumableArray(g[0])),Math.min.apply(Math,_toConsumableArray(g[1])),Math.max.apply(Math,_toConsumableArray(g[0])),Math.max.apply(Math,_toConsumableArray(g[1]))]}}]),e}();t.Util=y;var _=[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];function b(e){return decodeURIComponent(escape(e))}var k=new WeakMap,S=function(){function e(){var t=this;_classCallCheck(this,e),_classPrivateFieldInitSpec(this,k,{writable:!0,value:!1}),this.promise=new Promise((function(e,n){t.resolve=function(n){_classPrivateFieldSet(t,k,!0),e(n)},t.reject=function(e){_classPrivateFieldSet(t,k,!0),n(e)}}))}return _createClass(e,[{key:"settled",get:function(){return _classPrivateFieldGet(this,k)}}]),e}();t.PromiseCapability=S;var w=null,P=null},function(__unused_webpack_module,exports,__w_pdfjs_require__){Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,exports.getDocument=getDocument,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(3),_display_utils=__w_pdfjs_require__(6),_font_loader=__w_pdfjs_require__(9),_canvas=__w_pdfjs_require__(11),_worker_options=__w_pdfjs_require__(14),_is_node=__w_pdfjs_require__(10),_message_handler=__w_pdfjs_require__(15),_metadata=__w_pdfjs_require__(16),_optional_content_config=__w_pdfjs_require__(17),_transport_stream=__w_pdfjs_require__(18),_xfa_text=__w_pdfjs_require__(19),DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;var DefaultCMapReaderFactory=_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;var DefaultFilterFactory=_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;var DefaultStandardFontDataFactory=_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream;if(exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory,_is_node.isNodeJS){var _w_pdfjs_require__=__w_pdfjs_require__(20),NodeCanvasFactory=_w_pdfjs_require__.NodeCanvasFactory,NodeCMapReaderFactory=_w_pdfjs_require__.NodeCMapReaderFactory,NodeFilterFactory=_w_pdfjs_require__.NodeFilterFactory,NodeStandardFontDataFactory=_w_pdfjs_require__.NodeStandardFontDataFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory=NodeCanvasFactory,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=NodeCMapReaderFactory,exports.DefaultFilterFactory=DefaultFilterFactory=NodeFilterFactory,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=NodeStandardFontDataFactory}if(_is_node.isNodeJS){var _w_pdfjs_require__2=__w_pdfjs_require__(21),PDFNodeStream=_w_pdfjs_require__2.PDFNodeStream;createPDFNetworkStream=function(e){return new PDFNodeStream(e)}}else{var _w_pdfjs_require__3=__w_pdfjs_require__(24),PDFNetworkStream=_w_pdfjs_require__3.PDFNetworkStream,_w_pdfjs_require__4=__w_pdfjs_require__(25),PDFFetchStream=_w_pdfjs_require__4.PDFFetchStream;createPDFNetworkStream=function(e){return(0,_display_utils.isValidFetchUrl)(e.url)?new PDFFetchStream(e):new PDFNetworkStream(e)}}function getDocument(e){var t,n;if("string"===typeof e||e instanceof URL?e={url:e}:(0,_util.isArrayBuffer)(e)&&(e={data:e}),"object"!==typeof e)throw new Error("Invalid parameter in getDocument, need parameter object.");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");var r=new PDFDocumentLoadingTask,a=r.docId,i=e.url?getUrlProp(e.url):null,o=e.data?getDataProp(e.data):null,s=e.httpHeaders||null,l=!0===e.withCredentials,c=null!==(t=e.password)&&void 0!==t?t:null,u=e.range instanceof PDFDataRangeTransport?e.range:null,d=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE,h=e.worker instanceof PDFWorker?e.worker:null,f=e.verbosity,p="string"!==typeof e.docBaseUrl||(0,_display_utils.isDataScheme)(e.docBaseUrl)?null:e.docBaseUrl,v="string"===typeof e.cMapUrl?e.cMapUrl:null,m=!1!==e.cMapPacked,g=e.CMapReaderFactory||DefaultCMapReaderFactory,y="string"===typeof e.standardFontDataUrl?e.standardFontDataUrl:null,_=e.StandardFontDataFactory||DefaultStandardFontDataFactory,b=!0!==e.stopAtErrors,k=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,S=!1!==e.isEvalSupported,w="boolean"===typeof e.isOffscreenCanvasSupported?e.isOffscreenCanvasSupported:!_is_node.isNodeJS,P=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,x="boolean"===typeof e.disableFontFace?e.disableFontFace:_is_node.isNodeJS,A=!0===e.fontExtraProperties,C=!0===e.enableXfa,F=e.ownerDocument||globalThis.document,E=!0===e.disableRange,T=!0===e.disableStream,M=!0===e.disableAutoFetch,R=!0===e.pdfBug,I=u?u.length:null!==(n=e.length)&&void 0!==n?n:NaN,O="boolean"===typeof e.useSystemFonts?e.useSystemFonts:!_is_node.isNodeJS&&!x,D="boolean"===typeof e.useWorkerFetch?e.useWorkerFetch:g===_display_utils.DOMCMapReaderFactory&&_===_display_utils.DOMStandardFontDataFactory&&(0,_display_utils.isValidFetchUrl)(v,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(y,document.baseURI),L=e.canvasFactory||new DefaultCanvasFactory({ownerDocument:F}),N=e.filterFactory||new DefaultFilterFactory({docId:a,ownerDocument:F});(0,_util.setVerbosityLevel)(f);var j={canvasFactory:L,filterFactory:N};if(D||(j.cMapReaderFactory=new g({baseUrl:v,isCompressed:m}),j.standardFontDataFactory=new _({baseUrl:y})),!h){var G={verbosity:f,port:_worker_options.GlobalWorkerOptions.workerPort};h=G.port?PDFWorker.fromPort(G):new PDFWorker(G),r._worker=h}var z={docId:a,apiVersion:"3.6.172",data:o,password:c,disableAutoFetch:M,rangeChunkSize:d,length:I,docBaseUrl:p,enableXfa:C,evaluatorOptions:{maxImageSize:k,disableFontFace:x,ignoreErrors:b,isEvalSupported:S,isOffscreenCanvasSupported:w,canvasMaxAreaInBytes:P,fontExtraProperties:A,useSystemFonts:O,cMapUrl:D?v:null,standardFontDataUrl:D?y:null}},B={ignoreErrors:b,isEvalSupported:S,disableFontFace:x,fontExtraProperties:A,enableXfa:C,ownerDocument:F,disableAutoFetch:M,pdfBug:R,styleElement:null};return h.promise.then((function(){if(r.destroyed)throw new Error("Loading aborted");var e=_fetchDocument(h,z),t=new Promise((function(e){var t;u?t=new _transport_stream.PDFDataTransportStream({length:I,initialData:u.initialData,progressiveDone:u.progressiveDone,contentDispositionFilename:u.contentDispositionFilename,disableRange:E,disableStream:T},u):o||(t=createPDFNetworkStream({url:i,length:I,httpHeaders:s,withCredentials:l,rangeChunkSize:d,disableRange:E,disableStream:T})),e(t)}));return Promise.all([e,t]).then((function(e){var t=_slicedToArray(e,2),n=t[0],i=t[1];if(r.destroyed)throw new Error("Loading aborted");var o=new _message_handler.MessageHandler(a,n,h.port),s=new WorkerTransport(o,r,i,B,j);r._transport=s,o.send("Ready",null)}))})).catch(r._capability.reject),r}function _fetchDocument(e,t){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){return(_fetchDocument2=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,n){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.destroyed){e.next=2;break}throw new Error("Worker was destroyed");case 2:return e.next=4,t.messageHandler.sendWithPromise("GetDocRequest",n,n.data?[n.data.buffer]:null);case 4:if(r=e.sent,!t.destroyed){e.next=7;break}throw new Error("Worker was destroyed");case 7:return e.abrupt("return",r);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function getUrlProp(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch(t){if(_is_node.isNodeJS&&"string"===typeof e)return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(e){if(_is_node.isNodeJS&&"undefined"!==typeof Buffer&&e instanceof Buffer)return(0,_display_utils.deprecated)("Please provide binary data as `Uint8Array`, rather than `Buffer`."),new Uint8Array(e);if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if("string"===typeof e)return(0,_util.stringToBytes)(e);if("object"===typeof e&&!isNaN(null===e||void 0===e?void 0:e.length)||(0,_util.isArrayBuffer)(e))return new Uint8Array(e);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}var PDFDocumentLoadingTask=function(){function e(){var t,n;_classCallCheck(this,e),this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId="d".concat((_classStaticPrivateFieldSpecSet(e,e,_docId,(t=_classStaticPrivateFieldSpecGet(e,e,_docId),n=t++,t)),n)),this.destroyed=!1,this.onPassword=null,this.onProgress=null}return _createClass(e,[{key:"promise",get:function(){return this._capability.promise}},{key:"destroy",value:function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.destroyed=!0,e.next=3,null===(t=this._transport)||void 0===t?void 0:t.destroy();case 3:this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),_docId={writable:!0,value:0};exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;var PDFDataRangeTransport=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,e),this.length=t,this.initialData=n,this.progressiveDone=r,this.contentDispositionFilename=a,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}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:"annotationStorage",get:function(){return this._transport.annotationStorage}},{key:"filterFactory",get:function(){return this._transport.filterFactory}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function(){return this._pdfInfo.fingerprints}},{key:"isPureXfa",get:function(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"allXfaHtml",get:function(){return this._transport._htmlForXfa}},{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:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function(){return this._transport.getJavaScript()}},{key:"getJSActions",value:function(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function(){return this._transport.getMarkInfo()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"saveDocument",value:function(){return this._transport.saveDocument()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(e||this.isPureXfa)}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}},{key:"getFieldObjects",value:function(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function(){return this._transport.getCalculationOrderIds()}}]),e}();exports.PDFDocumentProxy=PDFDocumentProxy;var _delayedCleanupTimeout=new WeakMap,_pendingCleanup=new WeakMap,_tryCleanup=new WeakSet,_abortDelayedCleanup=new WeakSet,PDFPageProxy=function(){function e(t,n,r){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];_classCallCheck(this,e),_classPrivateMethodInitSpec(this,_abortDelayedCleanup),_classPrivateMethodInitSpec(this,_tryCleanup),_classPrivateFieldInitSpec(this,_delayedCleanupTimeout,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,_pendingCleanup,{writable:!0,value:!1}),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._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}return _createClass(e,[{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:"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,l=e.dontFlip,c=void 0!==l&&l;return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:r,offsetX:i,offsetY:s,dontFlip:c})}},{key:"getAnnotations",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,t=void 0===e?"display":e,n=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,n.renderingIntent)}},{key:"getJSActions",value:function(){return this._transport.getPageJSActions(this._pageIndex)}},{key:"isPureXfa",get:function(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"getXfa",value:function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(null===(t=this._transport._htmlForXfa)||void 0===t?void 0:t.children[this._pageIndex])||null);case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(e){var t,n,r,a=this,i=e.canvasContext,o=e.viewport,s=e.intent,l=void 0===s?"display":s,c=e.annotationMode,u=void 0===c?_util.AnnotationMode.ENABLE:c,d=e.transform,h=void 0===d?null:d,f=e.background,p=void 0===f?null:f,v=e.optionalContentConfigPromise,m=void 0===v?null:v,g=e.annotationCanvasMap,y=void 0===g?null:g,_=e.pageColors,b=void 0===_?null:_,k=e.printAnnotationStorage,S=void 0===k?null:k;if(null!==(t=arguments[0])&&void 0!==t&&t.canvasFactory)throw new Error("render no longer accepts the `canvasFactory`-option, please pass it to the `getDocument`-function instead.");null===(n=this._stats)||void 0===n||n.time("Overall");var w=this._transport.getRenderingIntent(l,u,S);_classPrivateFieldSet(this,_pendingCleanup,!1),_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this),m||(m=this._transport.getOptionalContentConfig());var P=this._intentStates.get(w.cacheKey);P||(P=Object.create(null),this._intentStates.set(w.cacheKey,P)),P.streamReaderCancelTimeout&&(clearTimeout(P.streamReaderCancelTimeout),P.streamReaderCancelTimeout=null);var x,A=!!(w.renderingIntent&_util.RenderingIntentFlag.PRINT);P.displayReadyCapability||(P.displayReadyCapability=new _util.PromiseCapability,P.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null===(x=this._stats)||void 0===x||x.time("Page Request"),this._pumpOperatorList(w));var C=function(e){var t,n;P.renderTasks.delete(F),(a._maybeCleanupAfterRender||A)&&_classPrivateFieldSet(a,_pendingCleanup,!0),_classPrivateMethodGet(a,_tryCleanup,_tryCleanup2).call(a,!A),e?(F.capability.reject(e),a._abortOperatorList({intentState:P,reason:e instanceof Error?e:new Error(e)})):F.capability.resolve(),null===(t=a._stats)||void 0===t||t.timeEnd("Rendering"),null===(n=a._stats)||void 0===n||n.timeEnd("Overall")},F=new InternalRenderTask({callback:C,params:{canvasContext:i,viewport:o,transform:h,background:p},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:y,operatorList:P.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!A,pdfBug:this._pdfBug,pageColors:b});((r=P).renderTasks||(r.renderTasks=new Set)).add(F);var E=F.task;return Promise.all([P.displayReadyCapability.promise,m]).then((function(e){var t,n=_slicedToArray(e,2),r=n[0],i=n[1];_classPrivateFieldGet(a,_pendingCleanup)?C():(null===(t=a._stats)||void 0===t||t.time("Rendering"),F.initializeGraphics({transparency:r,optionalContentConfig:i}),F.operatorListChanged())})).catch(C),E}},{key:"getOperatorList",value:function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=r.intent,i=void 0===a?"display":a,o=r.annotationMode,s=void 0===o?_util.AnnotationMode.ENABLE:o,l=r.printAnnotationStorage,c=void 0===l?null:l,u=this._transport.getRenderingIntent(i,s,c,!0),d=this._intentStates.get(u.cacheKey);return d||(d=Object.create(null),this._intentStates.set(u.cacheKey,d)),d.opListReadCapability||((e=Object.create(null)).operatorListChanged=function(){d.operatorList.lastChunk&&(d.opListReadCapability.resolve(d.operatorList),d.renderTasks.delete(e))},d.opListReadCapability=new _util.PromiseCapability,((t=d).renderTasks||(t.renderTasks=new Set)).add(e),d.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null===(n=this._stats)||void 0===n||n.time("Page Request"),this._pumpOperatorList(u)),d.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.includeMarkedContent,n=void 0!==t&&t,r=e.disableNormalization,a=void 0!==r&&r;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===n,disableNormalization:!0===a},{highWaterMark:100,size:function(e){return e.items.length}})}},{key:"getTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((function(e){return _xfa_text.XfaText.textContent(e)}));var 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:"getStructTree",value:function(){return this._transport.getStructTree(this._pageIndex)}},{key:"_destroy",value:function(){this.destroyed=!0;var e,t=[],n=_createForOfIteratorHelper(this._intentStates.values());try{for(n.s();!(e=n.n()).done;){var r=e.value;if(this._abortOperatorList({intentState:r,reason:new Error("Page was destroyed."),force:!0}),!r.opListReadCapability){var a,i=_createForOfIteratorHelper(r.renderTasks);try{for(i.s();!(a=i.n()).done;){var o=a.value;t.push(o.completed),o.cancel()}}catch(s){i.e(s)}finally{i.f()}}}}catch(s){n.e(s)}finally{n.f()}return this.objs.clear(),_classPrivateFieldSet(this,_pendingCleanup,!1),_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this),Promise.all(t)}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_classPrivateFieldSet(this,_pendingCleanup,!0);var t=_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!1);return e&&t&&this._stats&&(this._stats=new _display_utils.StatTimer),t}},{key:"_startRenderPage",value:function(e,t){var n,r,a=this._intentStates.get(t);a&&(null===(n=this._stats)||void 0===n||n.timeEnd("Page Request"),null===(r=a.displayReadyCapability)||void 0===r||r.resolve(e))}},{key:"_renderPageChunk",value:function(e,t){for(var n=0,r=e.length;n0)return;if(r instanceof _display_utils.RenderingCancelledException){var o=RENDERING_CANCELLED_TIMEOUT;return r.extraDelay>0&&r.extraDelay<1e3&&(o+=r.extraDelay),void(n.streamReaderCancelTimeout=setTimeout((function(){n.streamReaderCancelTimeout=null,t._abortOperatorList({intentState:n,reason:r,force:!0})}),o))}}if(n.streamReader.cancel(new _util.AbortException(r.message)).catch((function(){})),n.streamReader=null,!this._transport.destroyed){var s,l=_createForOfIteratorHelper(this._intentStates);try{for(l.s();!(s=l.n()).done;){var c=_slicedToArray(s.value,2),u=c[0];if(c[1]===n){this._intentStates.delete(u);break}}}catch(d){l.e(d)}finally{l.f()}this.cleanup()}}}},{key:"stats",get:function(){return this._stats}}]),e}();function _tryCleanup2(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this),!_classPrivateFieldGet(this,_pendingCleanup))return!1;if(t)return _classPrivateFieldSet(this,_delayedCleanupTimeout,setTimeout((function(){_classPrivateFieldSet(e,_delayedCleanupTimeout,null),_classPrivateMethodGet(e,_tryCleanup,_tryCleanup2).call(e,!1)}),DELAYED_CLEANUP_TIMEOUT)),!1;var n,r=_createForOfIteratorHelper(this._intentStates.values());try{for(r.s();!(n=r.n()).done;){var a=n.value,i=a.renderTasks,o=a.operatorList;if(i.size>0||!o.lastChunk)return!1}}catch(s){r.e(s)}finally{r.f()}return this._intentStates.clear(),this.objs.clear(),_classPrivateFieldSet(this,_pendingCleanup,!1),!0}function _abortDelayedCleanup2(){_classPrivateFieldGet(this,_delayedCleanupTimeout)&&(clearTimeout(_classPrivateFieldGet(this,_delayedCleanupTimeout)),_classPrivateFieldSet(this,_delayedCleanupTimeout,null))}exports.PDFPageProxy=PDFPageProxy;var _listeners=new WeakMap,_deferred=new WeakMap,LoopbackPort=function(){function e(){_classCallCheck(this,e),_classPrivateFieldInitSpec(this,_listeners,{writable:!0,value:new Set}),_classPrivateFieldInitSpec(this,_deferred,{writable:!0,value:Promise.resolve()})}return _createClass(e,[{key:"postMessage",value:function(e,t){var n=this,r={data:structuredClone(e,t?{transfer:t}:null)};_classPrivateFieldGet(this,_deferred).then((function(){var e,t=_createForOfIteratorHelper(_classPrivateFieldGet(n,_listeners));try{for(t.s();!(e=t.n()).done;)e.value.call(n,r)}catch(a){t.e(a)}finally{t.f()}}))}},{key:"addEventListener",value:function(e,t){_classPrivateFieldGet(this,_listeners).add(t)}},{key:"removeEventListener",value:function(e,t){_classPrivateFieldGet(this,_listeners).delete(t)}},{key:"terminate",value:function(){_classPrivateFieldGet(this,_listeners).clear()}}]),e}();exports.LoopbackPort=LoopbackPort;var PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_is_node.isNodeJS)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"===typeof document){var _document,_document$currentScri,pdfjsFilePath=null===(_document=document)||void 0===_document||null===(_document$currentScri=_document.currentScript)||void 0===_document$currentScri?void 0:_document$currentScri.src;pdfjsFilePath&&(PDFWorkerUtil.fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.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},PDFWorkerUtil.createCDNWrapper=function(e){var t='importScripts("'.concat(e,'");');return URL.createObjectURL(new Blob([t]))};var PDFWorker=function(){function PDFWorker(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=void 0===t?null:t,r=e.port,a=void 0===r?null:r,i=e.verbosity,o=void 0===i?(0,_util.getVerbosityLevel)():i;if(_classCallCheck(this,PDFWorker),a&&_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts).has(a))throw new Error("Cannot use more than one PDFWorker per port.");if(this.name=n,this.destroyed=!1,this.verbosity=o,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,a)return _classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts).set(a,this),void this._initializeFromPort(a);this._initialize()}return _createClass(PDFWorker,[{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}},{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(),this._messageHandler.send("configure",{verbosity:this.verbosity})}},{key:"_initialize",value:function(){var e=this;if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){var t=PDFWorker.workerSrc;try{PDFWorkerUtil.isSameOrigin(window.location.href,t)||(t=PDFWorkerUtil.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,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 e=new Uint8Array;r.send("test",e,[e.buffer])};return void o()}catch(s){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var e=this;PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._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".concat(PDFWorkerUtil.fakeWorkerId++),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),_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts).delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}}],[{key:"fromPort",value:function(e){if(null===e||void 0===e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return _classStaticPrivateFieldSpecGet(this,PDFWorker,_workerPorts).has(e.port)?_classStaticPrivateFieldSpecGet(this,PDFWorker,_workerPorts).get(e.port):new PDFWorker(e)}},{key:"workerSrc",get:function(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}},{key:"_mainThreadWorkerMessageHandler",get:function(){try{var e;return(null===(e=globalThis.pdfjsWorker)||void 0===e?void 0:e.WorkerMessageHandler)||null}catch(t){return null}}},{key:"_setupFakeWorkerGlobal",get:function get(){var _this14=this,loader=function(){var _ref15=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var mainWorkerMessageHandler,worker;return _regeneratorRuntime().wrap((function _callee3$(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:if(mainWorkerMessageHandler=_this14._mainThreadWorkerMessageHandler,!mainWorkerMessageHandler){_context3.next=3;break}return _context3.abrupt("return",mainWorkerMessageHandler);case 3:if(!_is_node.isNodeJS){_context3.next=6;break}return worker=eval("require")(_this14.workerSrc),_context3.abrupt("return",worker.WorkerMessageHandler);case 6:return _context3.next=8,(0,_display_utils.loadScript)(_this14.workerSrc);case 8:return _context3.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context3.stop()}}),_callee3)})));return function(){return _ref15.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}]),PDFWorker}(),_workerPorts={writable:!0,value:new WeakMap};exports.PDFWorker=PDFWorker;var _methodPromises=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_cacheSimpleMethod=new WeakSet,WorkerTransport=function(){function e(t,n,r,a,i){_classCallCheck(this,e),_classPrivateMethodInitSpec(this,_cacheSimpleMethod),_classPrivateFieldInitSpec(this,_methodPromises,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_pageCache,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_pagePromises,{writable:!0,value:new Map}),this.messageHandler=t,this.loadingTask=n,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:a.ownerDocument,styleElement:a.styleElement}),this._params=a,this.canvasFactory=i.canvasFactory,this.filterFactory=i.filterFactory,this.cMapReaderFactory=i.cMapReaderFactory,this.standardFontDataFactory=i.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}return _createClass(e,[{key:"annotationStorage",get:function(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"getRenderingIntent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=_util.RenderingIntentFlag.DISPLAY,i=null;switch(e){case"any":a=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":a=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(e))}switch(t){case _util.AnnotationMode.DISABLE:a+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:a+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:i=((a+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE)&_util.RenderingIntentFlag.PRINT&&n instanceof _annotation_storage.PrintAnnotationStorage?n:this.annotationStorage).serializable;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(t))}return r&&(a+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:a,cacheKey:"".concat(a,"_").concat(_annotation_storage.AnnotationStorage.getHash(i)),annotationStorageMap:i}}},{key:"destroy",value:function(){var e=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));var t,n=[],r=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values());try{for(r.s();!(t=r.n()).done;){var a=t.value;n.push(a._destroy())}}catch(o){r.e(o)}finally{r.f()}_classPrivateFieldGet(this,_pageCache).clear(),_classPrivateFieldGet(this,_pagePromises).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var i=this.messageHandler.sendWithPromise("Terminate",null);return n.push(i),Promise.all(n).then((function(){e.commonObjs.clear(),e.fontLoader.clear(),_classPrivateFieldGet(e,_methodPromises).clear(),e.filterFactory.destroy(),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,"GetReader - no `IPDFStream` instance available."),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)(t instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),n.enqueue(new Uint8Array(t),1,[t]))})).catch((function(e){n.error(e)}))},n.onCancel=function(t){e._fullReader.cancel(t),n.ready.catch((function(t){if(!e.destroyed)throw t}))}})),t.on("ReaderHeadersReady",(function(t){var r=new _util.PromiseCapability,a=e._fullReader;return a.headersReady.then((function(){var t;a.isStreamingSupported&&a.isRangeSupported||(e._lastProgress&&(null===(t=n.onProgress)||void 0===t||t.call(n,e._lastProgress)),a.onProgress=function(e){var t;null===(t=n.onProgress)||void 0===t||t.call(n,{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,"GetRangeReader - no `IPDFStream` instance available.");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)(t instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),n.enqueue(new Uint8Array(t),1,[t]))})).catch((function(e){n.error(e)}))},n.onCancel=function(t){r.cancel(t),n.ready.catch((function(t){if(!e.destroyed)throw t}))}):n.close()})),t.on("GetDoc",(function(t){var r=t.pdfInfo;e._numPages=r.numPages,e._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,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);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}n._capability.reject(t)})),t.on("PasswordRequest",(function(t){if(e._passwordCapability=new _util.PromiseCapability,n.onPassword)try{n.onPassword((function(t){t instanceof Error?e._passwordCapability.reject(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){var r;null===(r=n.onProgress)||void 0===r||r.call(n,{loaded:t.length,total:t.length}),e.downloadInfoCapability.resolve(t)})),t.on("StartRenderPage",(function(t){e.destroyed||_classPrivateFieldGet(e,_pageCache).get(t.pageIndex)._startRenderPage(t.transparency,t.cacheKey)})),t.on("commonobj",(function(n){var r,a=_slicedToArray(n,3),i=a[0],o=a[1],s=a[2];if(!e.destroyed&&!e.commonObjs.has(i))switch(o){case"Font":var l=e._params;if("error"in s){var c=s.error;(0,_util.warn)("Error during font loading: ".concat(c)),e.commonObjs.resolve(i,c);break}var u=l.pdfBug&&null!==(r=globalThis.FontInspector)&&void 0!==r&&r.enabled?function(e,t){return globalThis.FontInspector.fontAdded(e,t)}:null,d=new _font_loader.FontFaceObject(s,{isEvalSupported:l.isEvalSupported,disableFontFace:l.disableFontFace,ignoreErrors:l.ignoreErrors,inspectFont:u});e.fontLoader.bind(d).catch((function(e){return t.sendWithPromise("FontFallback",{id:i})})).finally((function(){!l.fontExtraProperties&&d.data&&(d.data=null),e.commonObjs.resolve(i,d)}));break;case"FontPath":case"Image":case"Pattern":e.commonObjs.resolve(i,s);break;default:throw new Error("Got unknown common object type ".concat(o))}})),t.on("obj",(function(t){var n=_slicedToArray(t,4),r=n[0],a=n[1],i=n[2],o=n[3];if(!e.destroyed){var s=_classPrivateFieldGet(e,_pageCache).get(a);if(!s.objs.has(r))switch(i){case"Image":var l;if(s.objs.resolve(r,o),o)(o.bitmap?o.width*o.height*4:(null===(l=o.data)||void 0===l?void 0:l.length)||0)>_util.MAX_IMAGE_SIZE_TO_CACHE&&(s._maybeCleanupAfterRender=!0);break;case"Pattern":s.objs.resolve(r,o);break;default:throw new Error("Got unknown object type ".concat(i))}}})),t.on("DocProgress",(function(t){var r;e.destroyed||null===(r=n.onProgress)||void 0===r||r.call(n,{loaded:t.loaded,total:t.total})})),t.on("FetchBuiltInCMap",(function(t){return e.destroyed?Promise.reject(new Error("Worker was destroyed.")):e.cMapReaderFactory?e.cMapReaderFactory.fetch(t):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))})),t.on("FetchStandardFontData",(function(t){return e.destroyed?Promise.reject(new Error("Worker was destroyed.")):e.standardFontDataFactory?e.standardFontDataFactory.fetch(t):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))}))}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"saveDocument",value:function(){var e,t,n=this;return this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:null!==(e=null===(t=this._fullReader)||void 0===t?void 0:t.filename)&&void 0!==e?e:null}).finally((function(){n.annotationStorage.resetModified()}))}},{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,r=_classPrivateFieldGet(this,_pagePromises).get(n);if(r)return r;var a=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 _classPrivateFieldGet(t,_pageCache).set(n,r),r}));return _classPrivateFieldGet(this,_pagePromises).set(n,a),a}},{key:"getPageIndex",value:function(e){return"object"!==typeof e||null===e||!Number.isInteger(e.num)||e.num<0||!Number.isInteger(e.gen)||e.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen})}},{key:"getAnnotations",value:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}},{key:"getFieldObjects",value:function(){return _classPrivateMethodGet(this,_cacheSimpleMethod,_cacheSimpleMethod2).call(this,"GetFieldObjects")}},{key:"hasJSActions",value:function(){return _classPrivateMethodGet(this,_cacheSimpleMethod,_cacheSimpleMethod2).call(this,"HasJSActions")}},{key:"getCalculationOrderIds",value:function(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{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:"getDocJSActions",value:function(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}},{key:"getPageJSActions",value:function(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}},{key:"getStructTree",value:function(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((function(e){return new _optional_content_config.OptionalContentConfig(e)}))}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var e=this,t="GetMetadata",n=_classPrivateFieldGet(this,_methodPromises).get(t);if(n)return n;var r=this.messageHandler.sendWithPromise(t,null).then((function(t){var n,r,a,i;return{info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:null!==(n=null===(r=e._fullReader)||void 0===r?void 0:r.filename)&&void 0!==n?n:null,contentLength:null!==(a=null===(i=e._fullReader)||void 0===i?void 0:i.contentLength)&&void 0!==a?a:null}}));return _classPrivateFieldGet(this,_methodPromises).set(t,r),r}},{key:"getMarkInfo",value:function(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,n,r,a,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=i.length>0&&void 0!==i[0]&&i[0],!this.destroyed){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this.messageHandler.sendWithPromise("Cleanup",null);case 5:n=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values()),e.prev=6,n.s();case 8:if((r=n.n()).done){e.next=15;break}if((a=r.value).cleanup()){e.next=13;break}throw new Error("startCleanup: Page ".concat(a.pageNumber," is currently rendering."));case 13:e.next=8;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(6),n.e(e.t0);case 20:return e.prev=20,n.f(),e.finish(20);case 23:this.commonObjs.clear(),t||this.fontLoader.clear(),_classPrivateFieldGet(this,_methodPromises).clear(),this.filterFactory.destroy(!0);case 27:case"end":return e.stop()}}),e,this,[[6,17,20,23]])})));return function(){return e.apply(this,arguments)}}()},{key:"loadingParams",get:function(){var e=this._params,t=e.disableAutoFetch,n=e.enableXfa;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:t,enableXfa:n})}}]),e}();function _cacheSimpleMethod2(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=_classPrivateFieldGet(this,_methodPromises).get(e);if(n)return n;var r=this.messageHandler.sendWithPromise(e,t);return _classPrivateFieldGet(this,_methodPromises).set(e,r),r}var _objs=new WeakMap,_ensureObj=new WeakSet,PDFObjects=function(){function e(){_classCallCheck(this,e),_classPrivateMethodInitSpec(this,_ensureObj),_classPrivateFieldInitSpec(this,_objs,{writable:!0,value:Object.create(null)})}return _createClass(e,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t){var n=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,e);return n.capability.promise.then((function(){return t(n.data)})),null}var r=_classPrivateFieldGet(this,_objs)[e];if(null===r||void 0===r||!r.capability.settled)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return r.data}},{key:"has",value:function(e){var t=_classPrivateFieldGet(this,_objs)[e];return(null===t||void 0===t?void 0:t.capability.settled)||!1}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,e);n.data=t,n.capability.resolve()}},{key:"clear",value:function(){for(var e in _classPrivateFieldGet(this,_objs)){var t,n=_classPrivateFieldGet(this,_objs)[e].data;null===n||void 0===n||null===(t=n.bitmap)||void 0===t||t.close()}_classPrivateFieldSet(this,_objs,Object.create(null))}}]),e}();function _ensureObj2(e){var t=_classPrivateFieldGet(this,_objs)[e];return t||(_classPrivateFieldGet(this,_objs)[e]={capability:new _util.PromiseCapability,data:null})}var _internalRenderTask=new WeakMap,RenderTask=function(){function e(t){_classCallCheck(this,e),_classPrivateFieldInitSpec(this,_internalRenderTask,{writable:!0,value:null}),_classPrivateFieldSet(this,_internalRenderTask,t),this.onContinue=null}return _createClass(e,[{key:"promise",get:function(){return _classPrivateFieldGet(this,_internalRenderTask).capability.promise}},{key:"cancel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;_classPrivateFieldGet(this,_internalRenderTask).cancel(null,e)}},{key:"separateAnnots",get:function(){var e=_classPrivateFieldGet(this,_internalRenderTask).operatorList.separateAnnots;if(!e)return!1;var t=_classPrivateFieldGet(this,_internalRenderTask).annotationCanvasMap;return e.form||e.canvas&&(null===t||void 0===t?void 0:t.size)>0}}]),e}();exports.RenderTask=RenderTask;var InternalRenderTask=function(){function e(t){var n=t.callback,r=t.params,a=t.objs,i=t.commonObjs,o=t.annotationCanvasMap,s=t.operatorList,l=t.pageIndex,c=t.canvasFactory,u=t.filterFactory,d=t.useRequestAnimationFrame,h=void 0!==d&&d,f=t.pdfBug,p=void 0!==f&&f,v=t.pageColors,m=void 0===v?null:v;_classCallCheck(this,e),this.callback=n,this.params=r,this.objs=a,this.commonObjs=i,this.annotationCanvasMap=o,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=l,this.canvasFactory=c,this.filterFactory=u,this._pdfBug=p,this.pageColors=m,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===h&&"undefined"!==typeof window,this.cancelled=!1,this.capability=new _util.PromiseCapability,this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=r.canvasContext.canvas}return _createClass(e,[{key:"completed",get:function(){return this.capability.promise.catch((function(){}))}},{key:"initializeGraphics",value:function(t){var n,r,a=t.transparency,i=void 0!==a&&a,o=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(_classStaticPrivateFieldSpecGet(e,e,_canvasInUse).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");_classStaticPrivateFieldSpecGet(e,e,_canvasInUse).add(this._canvas)}this._pdfBug&&null!==(n=globalThis.StepperManager)&&void 0!==n&&n.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var s=this.params,l=s.canvasContext,c=s.viewport,u=s.transform,d=s.background;this.gfx=new _canvas.CanvasGraphics(l,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:o},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:u,viewport:c,transparency:i,background:d}),this.operatorListIdx=0,this.graphicsReady=!0,null===(r=this.graphicsReadyCallback)||void 0===r||r.call(this)}}},{key:"cancel",value:function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.running=!1,this.cancelled=!0,null===(t=this.gfx)||void 0===t||t.endDrawing(),this._canvas&&_classStaticPrivateFieldSpecGet(e,e,_canvasInUse).delete(this._canvas),this.callback(n||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas",r))}},{key:"operatorListChanged",value:function(){var e;this.graphicsReady?(null===(e=this.stepper)||void 0===e||e.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._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}},{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.pageColors),this._canvas&&_classStaticPrivateFieldSpecGet(e,e,_canvasInUse).delete(this._canvas),this.callback()));case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),e}(),_canvasInUse={writable:!0,value:new WeakSet},version="3.6.172";exports.version=version;var build="4d3dfe254";exports.build=build},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PrintAnnotationStorage=t.AnnotationStorage=void 0;var r=n(1),a=n(4),i=n(8),o=new WeakMap,s=new WeakMap,l=new WeakSet,c=function(){function e(){_classCallCheck(this,e),_classPrivateMethodInitSpec(this,l),_classPrivateFieldInitSpec(this,o,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,s,{writable:!0,value:new Map}),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}return _createClass(e,[{key:"getValue",value:function(e,t){var n=_classPrivateFieldGet(this,s).get(e);return void 0===n?t:Object.assign(t,n)}},{key:"getRawValue",value:function(e){return _classPrivateFieldGet(this,s).get(e)}},{key:"remove",value:function(e){if(_classPrivateFieldGet(this,s).delete(e),0===_classPrivateFieldGet(this,s).size&&this.resetModified(),"function"===typeof this.onAnnotationEditor){var t,n=_createForOfIteratorHelper(_classPrivateFieldGet(this,s).values());try{for(n.s();!(t=n.n()).done;)if(t.value instanceof a.AnnotationEditor)return}catch(r){n.e(r)}finally{n.f()}this.onAnnotationEditor(null)}}},{key:"setValue",value:function(e,t){var n=_classPrivateFieldGet(this,s).get(e),r=!1;if(void 0!==n)for(var i=0,o=Object.entries(t);i0?(0,r.objectFromMap)(_classPrivateFieldGet(this,s)):null}},{key:"setAll",value:function(e){for(var t=0,n=Object.entries(e);t0&&void 0!==arguments[0]?arguments[0]:128;_classCallCheck(this,e),_classPrivateFieldInitSpec(this,s,{writable:!0,value:[]}),_classPrivateFieldInitSpec(this,l,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,c,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,u,{writable:!0,value:-1}),_classPrivateFieldSet(this,c,t)}return _createClass(e,[{key:"add",value:function(e){var t=e.cmd,n=e.undo,r=e.mustExec,a=e.type,i=void 0===a?NaN:a,o=e.overwriteIfSameType,d=void 0!==o&&o,h=e.keepUndo,f=void 0!==h&&h;if(r&&t(),!_classPrivateFieldGet(this,l)){var p={cmd:t,undo:n,type:i};if(-1===_classPrivateFieldGet(this,u))return _classPrivateFieldGet(this,s).length>0&&(_classPrivateFieldGet(this,s).length=0),_classPrivateFieldSet(this,u,0),void _classPrivateFieldGet(this,s).push(p);if(d&&_classPrivateFieldGet(this,s)[_classPrivateFieldGet(this,u)].type===i)return f&&(p.undo=_classPrivateFieldGet(this,s)[_classPrivateFieldGet(this,u)].undo),void(_classPrivateFieldGet(this,s)[_classPrivateFieldGet(this,u)]=p);var v=_classPrivateFieldGet(this,u)+1;v===_classPrivateFieldGet(this,c)?_classPrivateFieldGet(this,s).splice(0,1):(_classPrivateFieldSet(this,u,v),v<_classPrivateFieldGet(this,s).length&&_classPrivateFieldGet(this,s).splice(v)),_classPrivateFieldGet(this,s).push(p)}}},{key:"undo",value:function(){-1!==_classPrivateFieldGet(this,u)&&(_classPrivateFieldSet(this,l,!0),_classPrivateFieldGet(this,s)[_classPrivateFieldGet(this,u)].undo(),_classPrivateFieldSet(this,l,!1),_classPrivateFieldSet(this,u,_classPrivateFieldGet(this,u)-1))}},{key:"redo",value:function(){_classPrivateFieldGet(this,u)<_classPrivateFieldGet(this,s).length-1&&(_classPrivateFieldSet(this,u,_classPrivateFieldGet(this,u)+1),_classPrivateFieldSet(this,l,!0),_classPrivateFieldGet(this,s)[_classPrivateFieldGet(this,u)].cmd(),_classPrivateFieldSet(this,l,!1))}},{key:"hasSomethingToUndo",value:function(){return-1!==_classPrivateFieldGet(this,u)}},{key:"hasSomethingToRedo",value:function(){return _classPrivateFieldGet(this,u)<_classPrivateFieldGet(this,s).length-1}},{key:"destroy",value:function(){_classPrivateFieldSet(this,s,null)}}]),e}();t.CommandManager=d;var h=new WeakSet,f=function(){function e(t){_classCallCheck(this,e),_classPrivateMethodInitSpec(this,h),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;var n,a=r.FeatureTest.platform.isMac,i=_createForOfIteratorHelper(t);try{for(i.s();!(n=i.n()).done;){var o,s=_slicedToArray(n.value,2),l=s[0],c=s[1],u=_createForOfIteratorHelper(l);try{for(u.s();!(o=u.n()).done;){var d=o.value,f=d.startsWith("mac+");a&&f?(this.callbacks.set(d.slice(4),c),this.allKeys.add(d.split("+").at(-1))):a||f||(this.callbacks.set(d,c),this.allKeys.add(d.split("+").at(-1)))}}catch(p){u.e(p)}finally{u.f()}}}catch(p){i.e(p)}finally{i.f()}}return _createClass(e,[{key:"exec",value:function(e,t){if(this.allKeys.has(t.key)){var n=this.callbacks.get(_classPrivateMethodGet(this,h,p).call(this,t));n&&(n.bind(e)(),t.stopPropagation(),t.preventDefault())}}}]),e}();function p(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);var t=this.buffer.join("+");return this.buffer.length=0,t}t.KeyboardManager=f;var v=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"_colors",get:function(){var e=new Map([["CanvasText",null],["Canvas",null]]);return(0,a.getColorValues)(e),(0,r.shadow)(this,"_colors",e)}},{key:"convert",value:function(t){var n=(0,a.getRGB)(t);if(!window.matchMedia("(forced-colors: active)").matches)return n;var r,i=_createForOfIteratorHelper(this._colors);try{for(i.s();!(r=i.n()).done;){var o=_slicedToArray(r.value,2),s=o[0];if(o[1].every((function(e,t){return e===n[t]})))return e._colorsMapping.get(s)}}catch(l){i.e(l)}finally{i.f()}return n}},{key:"getHexCode",value:function(e){var t,n=this._colors.get(e);return n?(t=r.Util).makeHexColor.apply(t,_toConsumableArray(n)):e}}]),e}();_defineProperty(v,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]])),t.ColorManager=v;var m=new WeakMap,g=new WeakMap,y=new WeakMap,_=new WeakMap,b=new WeakMap,k=new WeakMap,S=new WeakMap,w=new WeakMap,P=new WeakMap,x=new WeakMap,A=new WeakMap,C=new WeakMap,F=new WeakMap,E=new WeakMap,T=new WeakMap,M=new WeakMap,R=new WeakMap,I=new WeakMap,O=new WeakMap,D=new WeakMap,L=new WeakMap,N=new WeakMap,j=new WeakMap,G=new WeakSet,z=new WeakSet,B=new WeakSet,U=new WeakSet,W=new WeakSet,H=new WeakSet,q=new WeakSet,V=new WeakSet,X=new WeakSet,Y=new WeakSet,K=new WeakSet,Q=function(){function e(t,n,i){_classCallCheck(this,e),_classPrivateMethodInitSpec(this,K),_classPrivateMethodInitSpec(this,Y),_classPrivateMethodInitSpec(this,X),_classPrivateMethodInitSpec(this,V),_classPrivateMethodInitSpec(this,q),_classPrivateMethodInitSpec(this,H),_classPrivateMethodInitSpec(this,W),_classPrivateMethodInitSpec(this,U),_classPrivateMethodInitSpec(this,B),_classPrivateMethodInitSpec(this,z),_classPrivateMethodInitSpec(this,G),_classPrivateFieldInitSpec(this,m,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,g,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,y,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,b,{writable:!0,value:new d}),_classPrivateFieldInitSpec(this,k,{writable:!0,value:0}),_classPrivateFieldInitSpec(this,S,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,w,{writable:!0,value:new Set}),_classPrivateFieldInitSpec(this,P,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,x,{writable:!0,value:new o}),_classPrivateFieldInitSpec(this,A,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,C,{writable:!0,value:r.AnnotationEditorType.NONE}),_classPrivateFieldInitSpec(this,F,{writable:!0,value:new Set}),_classPrivateFieldInitSpec(this,E,{writable:!0,value:this.copy.bind(this)}),_classPrivateFieldInitSpec(this,T,{writable:!0,value:this.cut.bind(this)}),_classPrivateFieldInitSpec(this,M,{writable:!0,value:this.paste.bind(this)}),_classPrivateFieldInitSpec(this,R,{writable:!0,value:this.keydown.bind(this)}),_classPrivateFieldInitSpec(this,I,{writable:!0,value:this.onEditingAction.bind(this)}),_classPrivateFieldInitSpec(this,O,{writable:!0,value:this.onPageChanging.bind(this)}),_classPrivateFieldInitSpec(this,D,{writable:!0,value:this.onScaleChanging.bind(this)}),_classPrivateFieldInitSpec(this,L,{writable:!0,value:this.onRotationChanging.bind(this)}),_classPrivateFieldInitSpec(this,N,{writable:!0,value:{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}}),_classPrivateFieldInitSpec(this,j,{writable:!0,value:null}),_classPrivateFieldSet(this,j,t),_classPrivateFieldSet(this,P,n),_classPrivateFieldGet(this,P)._on("editingaction",_classPrivateFieldGet(this,I)),_classPrivateFieldGet(this,P)._on("pagechanging",_classPrivateFieldGet(this,O)),_classPrivateFieldGet(this,P)._on("scalechanging",_classPrivateFieldGet(this,D)),_classPrivateFieldGet(this,P)._on("rotationchanging",_classPrivateFieldGet(this,L)),_classPrivateFieldSet(this,_,i),this.viewParameters={realScale:a.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}return _createClass(e,[{key:"destroy",value:function(){_classPrivateMethodGet(this,z,$).call(this),_classPrivateFieldGet(this,P)._off("editingaction",_classPrivateFieldGet(this,I)),_classPrivateFieldGet(this,P)._off("pagechanging",_classPrivateFieldGet(this,O)),_classPrivateFieldGet(this,P)._off("scalechanging",_classPrivateFieldGet(this,D)),_classPrivateFieldGet(this,P)._off("rotationchanging",_classPrivateFieldGet(this,L));var e,t=_createForOfIteratorHelper(_classPrivateFieldGet(this,y).values());try{for(t.s();!(e=t.n()).done;)e.value.destroy()}catch(n){t.e(n)}finally{t.f()}_classPrivateFieldGet(this,y).clear(),_classPrivateFieldGet(this,g).clear(),_classPrivateFieldGet(this,w).clear(),_classPrivateFieldSet(this,m,null),_classPrivateFieldGet(this,F).clear(),_classPrivateFieldGet(this,b).destroy()}},{key:"onPageChanging",value:function(e){var t=e.pageNumber;_classPrivateFieldSet(this,k,t-1)}},{key:"focusMainContainer",value:function(){_classPrivateFieldGet(this,j).focus()}},{key:"addShouldRescale",value:function(e){_classPrivateFieldGet(this,w).add(e)}},{key:"removeShouldRescale",value:function(e){_classPrivateFieldGet(this,w).delete(e)}},{key:"onScaleChanging",value:function(e){var t=e.scale;this.commitOrRemove(),this.viewParameters.realScale=t*a.PixelsPerInch.PDF_TO_CSS_UNITS;var n,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,w));try{for(r.s();!(n=r.n()).done;)n.value.onScaleChanging()}catch(i){r.e(i)}finally{r.f()}}},{key:"onRotationChanging",value:function(e){var t=e.pagesRotation;this.commitOrRemove(),this.viewParameters.rotation=t}},{key:"addToAnnotationStorage",value:function(e){e.isEmpty()||!_classPrivateFieldGet(this,_)||_classPrivateFieldGet(this,_).has(e.id)||_classPrivateFieldGet(this,_).setValue(e.id,e)}},{key:"copy",value:function(e){if(e.preventDefault(),_classPrivateFieldGet(this,m)&&_classPrivateFieldGet(this,m).commitOrRemove(),this.hasSelection){var t,n=[],r=_createForOfIteratorHelper(_classPrivateFieldGet(this,F));try{for(r.s();!(t=r.n()).done;){var a=t.value;a.isEmpty()||n.push(a.serialize())}}catch(i){r.e(i)}finally{r.f()}0!==n.length&&e.clipboardData.setData("application/pdfjs",JSON.stringify(n))}}},{key:"cut",value:function(e){this.copy(e),this.delete()}},{key:"paste",value:function(e){var t=this;e.preventDefault();var n=e.clipboardData.getData("application/pdfjs");if(n){try{n=JSON.parse(n)}catch(u){return void(0,r.warn)('paste: "'.concat(u.message,'".'))}if(Array.isArray(n)){this.unselectAll();var a=_classPrivateFieldGet(this,y).get(_classPrivateFieldGet(this,k));try{var i,o=[],s=_createForOfIteratorHelper(n);try{for(s.s();!(i=s.n()).done;){var l=i.value,c=a.deserialize(l);if(!c)return;o.push(c)}}catch(d){s.e(d)}finally{s.f()}this.addCommands({cmd:function(){for(var e=0,n=o;e1&&void 0!==arguments[1]&&arguments[1];if(!t){var n=e.split(/[#?]/,1);e=_slicedToArray(n,1)[0]}return e.substring(e.lastIndexOf("/")+1)},t.getPdfFilenameFromUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!==typeof e)return t;if(T(e))return(0,a.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;var n=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,r=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e),i=n.exec(r[1])||n.exec(r[2])||n.exec(r[3]);if(i&&(i=i[0]).includes("%"))try{i=n.exec(decodeURIComponent(i))[0]}catch(o){}return i||t},t.getRGB=D,t.getXfaPageViewport=function(e,t){var n=t.scale,r=void 0===n?1:n,a=t.rotation,i=void 0===a?0:a,o=e.attributes.style,s=o.width,l=o.height,c=[0,0,parseInt(s),parseInt(l)];return new F({viewBox:c,scale:r,rotation:i})},t.isDataScheme=T,t.isPdfFile=function(e){return"string"===typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=I,t.loadScript=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(n,r){var a=document.createElement("script");a.src=e,a.onload=function(e){t&&a.remove(),n(e)},a.onerror=function(){r(new Error("Cannot load script at: ".concat(a.src)))},(document.head||document.documentElement).append(a)}))},t.setLayerDimensions=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t instanceof F){var a=t.rawDims,i=a.pageWidth,o=a.pageHeight,s=e.style,l="calc(var(--scale-factor) * ".concat(i,"px)"),c="calc(var(--scale-factor) * ".concat(o,"px)");n&&t.rotation%180!==0?(s.width=c,s.height=l):(s.width=l,s.height=c)}r&&e.setAttribute("data-main-rotation",t.rotation)};var r=n(7),a=n(1),i="http://www.w3.org/2000/svg";t.AnnotationPrefix="pdfjs_internal_id_";var o=_createClass((function e(){_classCallCheck(this,e)}));_defineProperty(o,"CSS",96),_defineProperty(o,"PDF",72),_defineProperty(o,"PDF_TO_CSS_UNITS",o.CSS/o.PDF),t.PixelsPerInch=o;var s=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,v=new WeakMap,m=new WeakMap,g=new WeakSet,y=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=r.docId,i=r.ownerDocument,o=void 0===i?globalThis.document:i;return _classCallCheck(this,n),e=t.call(this),_classPrivateMethodInitSpec(_assertThisInitialized(e),g),_classPrivateFieldInitSpec(_assertThisInitialized(e),m,{get:b,set:void 0}),_classPrivateFieldInitSpec(_assertThisInitialized(e),v,{get:_,set:void 0}),_classPrivateFieldInitSpec(_assertThisInitialized(e),s,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(_assertThisInitialized(e),l,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(_assertThisInitialized(e),c,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(_assertThisInitialized(e),u,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(_assertThisInitialized(e),d,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(_assertThisInitialized(e),h,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(_assertThisInitialized(e),f,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(_assertThisInitialized(e),p,{writable:!0,value:0}),_classPrivateFieldSet(_assertThisInitialized(e),c,a),_classPrivateFieldSet(_assertThisInitialized(e),u,o),e}return _createClass(n,[{key:"addFilter",value:function(e){var t,n;if(!e)return"none";var r,a,o,s,l=_classPrivateFieldGet(this,v).get(e);if(l)return l;if(1===e.length){for(var d=e[0],h=new Array(256),f=0;f<256;f++)h[f]=d[f]/255;s=r=a=o=h.join(",")}else{for(var y=_slicedToArray(e,3),_=y[0],b=y[1],S=y[2],w=new Array(256),P=new Array(256),x=new Array(256),A=0;A<256;A++)w[A]=_[A]/255,P[A]=b[A]/255,x[A]=S[A]/255;r=w.join(","),a=P.join(","),o=x.join(","),s="".concat(r).concat(a).concat(o)}if(l=_classPrivateFieldGet(this,v).get(s))return _classPrivateFieldGet(this,v).set(e,l),l;var C="g_".concat(_classPrivateFieldGet(this,c),"_transfer_map_").concat((_classPrivateFieldSet(this,p,(t=_classPrivateFieldGet(this,p),n=t++,t)),n)),F="url(#".concat(C,")");_classPrivateFieldGet(this,v).set(e,F),_classPrivateFieldGet(this,v).set(s,F);var E=_classPrivateFieldGet(this,u).createElementNS(i,"filter",i);E.setAttribute("id",C),E.setAttribute("color-interpolation-filters","sRGB");var T=_classPrivateFieldGet(this,u).createElementNS(i,"feComponentTransfer");return E.append(T),_classPrivateMethodGet(this,g,k).call(this,T,"feFuncR",r),_classPrivateMethodGet(this,g,k).call(this,T,"feFuncG",a),_classPrivateMethodGet(this,g,k).call(this,T,"feFuncB",o),_classPrivateFieldGet(this,m).append(E),F}},{key:"addHCMFilter",value:function(e,t){var n,r,o,s="".concat(e,"-").concat(t);if(_classPrivateFieldGet(this,h)===s)return _classPrivateFieldGet(this,f);if(_classPrivateFieldSet(this,h,s),_classPrivateFieldSet(this,f,"none"),null===(n=_classPrivateFieldGet(this,d))||void 0===n||n.remove(),!e||!t)return _classPrivateFieldGet(this,f);_classPrivateFieldGet(this,m).style.color=e;var l=D(e=getComputedStyle(_classPrivateFieldGet(this,m)).getPropertyValue("color"));e=(r=a.Util).makeHexColor.apply(r,_toConsumableArray(l)),_classPrivateFieldGet(this,m).style.color=t;var p=D(t=getComputedStyle(_classPrivateFieldGet(this,m)).getPropertyValue("color"));if(t=(o=a.Util).makeHexColor.apply(o,_toConsumableArray(p)),_classPrivateFieldGet(this,m).style.color="","#000000"===e&&"#ffffff"===t||e===t)return _classPrivateFieldGet(this,f);for(var v=new Array(256),y=0;y<=255;y++){var _=y/255;v[y]=_<=.03928?_/12.92:Math.pow((_+.055)/1.055,2.4)}var b=v.join(","),S="g_".concat(_classPrivateFieldGet(this,c),"_hcm_filter"),w=_classPrivateFieldSet(this,d,_classPrivateFieldGet(this,u).createElementNS(i,"filter",i));w.setAttribute("id",S),w.setAttribute("color-interpolation-filters","sRGB");var P=_classPrivateFieldGet(this,u).createElementNS(i,"feComponentTransfer");w.append(P),_classPrivateMethodGet(this,g,k).call(this,P,"feFuncR",b),_classPrivateMethodGet(this,g,k).call(this,P,"feFuncG",b),_classPrivateMethodGet(this,g,k).call(this,P,"feFuncB",b);var x=_classPrivateFieldGet(this,u).createElementNS(i,"feColorMatrix");x.setAttribute("type","matrix"),x.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),w.append(x),P=_classPrivateFieldGet(this,u).createElementNS(i,"feComponentTransfer"),w.append(P);var A=function(e,t){for(var n=l[e]/255,r=p[e]/255,a=new Array(t+1),i=0;i<=t;i++)a[i]=n+i/t*(r-n);return a.join(",")};return _classPrivateMethodGet(this,g,k).call(this,P,"feFuncR",A(0,5)),_classPrivateMethodGet(this,g,k).call(this,P,"feFuncG",A(1,5)),_classPrivateMethodGet(this,g,k).call(this,P,"feFuncB",A(2,5)),_classPrivateFieldGet(this,m).append(w),_classPrivateFieldSet(this,f,"url(#".concat(S,")")),_classPrivateFieldGet(this,f)}},{key:"destroy",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&_classPrivateFieldGet(this,f)||(_classPrivateFieldGet(this,l)&&(_classPrivateFieldGet(this,l).parentNode.parentNode.remove(),_classPrivateFieldSet(this,l,null)),_classPrivateFieldGet(this,s)&&(_classPrivateFieldGet(this,s).clear(),_classPrivateFieldSet(this,s,null)),_classPrivateFieldSet(this,p,0))}}]),n}(r.BaseFilterFactory);function _(){return _classPrivateFieldGet(this,s)||_classPrivateFieldSet(this,s,new Map)}function b(){if(!_classPrivateFieldGet(this,l)){var e=_classPrivateFieldGet(this,u).createElement("div"),t=e.style;t.visibility="hidden",t.contain="strict",t.width=t.height=0,t.position="absolute",t.top=t.left=0,t.zIndex=-1;var n=_classPrivateFieldGet(this,u).createElementNS(i,"svg");n.setAttribute("width",0),n.setAttribute("height",0),_classPrivateFieldSet(this,l,_classPrivateFieldGet(this,u).createElementNS(i,"defs")),e.append(n),n.append(_classPrivateFieldGet(this,l)),_classPrivateFieldGet(this,u).body.append(e)}return _classPrivateFieldGet(this,l)}function k(e,t,n){var r=_classPrivateFieldGet(this,u).createElementNS(i,t);r.setAttribute("type","discrete"),r.setAttribute("tableValues",n),e.append(r)}t.DOMFilterFactory=y;var S=function(e){_inherits(n,e);var t=_createSuper(n);function n(){var e,r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ownerDocument,a=void 0===r?globalThis.document:r;return _classCallCheck(this,n),(e=t.call(this))._document=a,e}return _createClass(n,[{key:"_createCanvas",value:function(e,t){var n=this._document.createElement("canvas");return n.width=e,n.height=t,n}}]),n}(r.BaseCanvasFactory);function w(e){return P.apply(this,arguments)}function P(){return P=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var n,r,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],!I(t,document.baseURI)){e.next=21;break}return e.next=4,fetch(t);case 4:if((r=e.sent).ok){e.next=7;break}throw new Error(r.statusText);case 7:if(!n){e.next=15;break}return e.t1=Uint8Array,e.next=11,r.arrayBuffer();case 11:e.t2=e.sent,e.t0=new e.t1(e.t2),e.next=20;break;case 15:return e.t3=a.stringToBytes,e.next=18,r.text();case 18:e.t4=e.sent,e.t0=(0,e.t3)(e.t4);case 20:return e.abrupt("return",e.t0);case 21:return e.abrupt("return",new Promise((function(e,r){var i=new XMLHttpRequest;i.open("GET",t,!0),n&&(i.responseType="arraybuffer"),i.onreadystatechange=function(){if(i.readyState===XMLHttpRequest.DONE){var t;if((200===i.status||0===i.status)&&(n&&i.response?t=new Uint8Array(i.response):!n&&i.responseText&&(t=(0,a.stringToBytes)(i.responseText)),t))return void e(t);r(new Error(i.statusText))}},i.send(null)})));case 22:case"end":return e.stop()}}),e)}))),P.apply(this,arguments)}t.DOMCanvasFactory=S;var x=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"_fetchData",value:function(e,t){return w(e,this.isCompressed).then((function(e){return{cMapData:e,compressionType:t}}))}}]),n}(r.BaseCMapReaderFactory);t.DOMCMapReaderFactory=x;var A=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"_fetchData",value:function(e){return w(e,!0)}}]),n}(r.BaseStandardFontDataFactory);t.DOMStandardFontDataFactory=A;var C=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"_createSVG",value:function(e){return document.createElementNS(i,e)}}]),n}(r.BaseSVGFactory);t.DOMSVGFactory=C;var F=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,l=void 0===s?0:s,c=t.dontFlip,u=void 0!==c&&c;_classCallCheck(this,e),this.viewBox=n,this.scale=r,this.rotation=a,this.offsetX=o,this.offsetY=l;var d,h,f,p,v,m,g,y,_=(n[2]+n[0])/2,b=(n[3]+n[1])/2;switch((a%=360)<0&&(a+=360),a){case 180:d=-1,h=0,f=0,p=1;break;case 90:d=0,h=1,f=1,p=0;break;case 270:d=0,h=-1,f=-1,p=0;break;case 0:d=1,h=0,f=0,p=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}u&&(f=-f,p=-p),0===d?(v=Math.abs(b-n[1])*r+o,m=Math.abs(_-n[0])*r+l,g=(n[3]-n[1])*r,y=(n[2]-n[0])*r):(v=Math.abs(_-n[0])*r+o,m=Math.abs(b-n[1])*r+l,g=(n[2]-n[0])*r,y=(n[3]-n[1])*r),this.transform=[d*r,h*r,f*r,p*r,v-d*r*_-f*r*b,m-h*r*_-p*r*b],this.width=g,this.height=y}return _createClass(e,[{key:"rawDims",get:function(){var e=this.viewBox;return(0,a.shadow)(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}},{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,l=t.offsetY,c=void 0===l?this.offsetY:l,u=t.dontFlip,d=void 0!==u&&u;return new e({viewBox:this.viewBox.slice(),scale:r,rotation:i,offsetX:s,offsetY:c,dontFlip:d})}},{key:"convertToViewportPoint",value:function(e,t){return a.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=a.Util.applyTransform([e[0],e[1]],this.transform),n=a.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],n[0],n[1]]}},{key:"convertToPdfPoint",value:function(e,t){return a.Util.applyInverseTransform([e,t],this.transform)}}]),e}();t.PageViewport=F;var E=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,r){var a,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return _classCallCheck(this,n),(a=t.call(this,e,"RenderingCancelledException")).type=r,a.extraDelay=i,a}return _createClass(n)}(a.BaseException);function T(e){for(var t=e.length,n=0;n=1&&r<=12?r-1:0;var a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;var i=parseInt(t[4],10);i=i>=0&&i<=23?i:0;var o=parseInt(t[5],10);o=o>=0&&o<=59?o:0;var s=parseInt(t[6],10);s=s>=0&&s<=59?s:0;var l=t[7]||"Z",c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;var u=parseInt(t[9],10)||0;return u=u>=0&&u<=59?u:0,"-"===l?(i+=c,o+=u):"+"===l&&(i-=c,o-=u),new Date(Date.UTC(n,r,a,i,o,s))}}]),e}();function D(e){if(e.startsWith("#")){var t=parseInt(e.slice(1),16);return[(16711680&t)>>16,(65280&t)>>8,255&t]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map((function(e){return parseInt(e)})):e.startsWith("rgba(")?e.slice(5,-1).split(",").map((function(e){return parseInt(e)})).slice(0,3):((0,a.warn)('Not a valid color format: "'.concat(e,'"')),[0,0,0])}t.PDFDateString=O},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseFilterFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0;var r=n(1),a=function(){function e(){_classCallCheck(this,e),this.constructor===e&&(0,r.unreachable)("Cannot initialize BaseFilterFactory.")}return _createClass(e,[{key:"addFilter",value:function(e){return"none"}},{key:"addHCMFilter",value:function(e,t){return"none"}},{key:"destroy",value:function(){}}]),e}();t.BaseFilterFactory=a;var i=function(){function e(){_classCallCheck(this,e),this.constructor===e&&(0,r.unreachable)("Cannot initialize BaseCanvasFactory.")}return _createClass(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var n=this._createCanvas(e,t);return{canvas:n,context:n.getContext("2d")}}},{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}},{key:"_createCanvas",value:function(e,t){(0,r.unreachable)("Abstract method `_createCanvas` called.")}}]),e}();t.BaseCanvasFactory=i;var o=function(){function e(t){var n=t.baseUrl,a=void 0===n?null:n,i=t.isCompressed,o=void 0===i||i;_classCallCheck(this,e),this.constructor===e&&(0,r.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=a,this.isCompressed=o}return _createClass(e,[{key:"fetch",value: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:return a=this.baseUrl+n+(this.isCompressed?".bcmap":""),i=this.isCompressed?r.CMapCompressionType.BINARY:r.CMapCompressionType.NONE,e.abrupt("return",this._fetchData(a,i).catch((function(e){throw new Error("Unable to load ".concat(o.isCompressed?"binary ":"","CMap at: ").concat(a))})));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_fetchData",value:function(e,t){(0,r.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseCMapReaderFactory=o;var s=function(){function e(t){var n=t.baseUrl,a=void 0===n?null:n;_classCallCheck(this,e),this.constructor===e&&(0,r.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=a}return _createClass(e,[{key:"fetch",value:function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var n,r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.filename,this.baseUrl){e.next=3;break}throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');case 3:if(n){e.next=5;break}throw new Error("Font filename must be specified.");case 5:return r="".concat(this.baseUrl).concat(n),e.abrupt("return",this._fetchData(r).catch((function(e){throw new Error("Unable to load font data at: ".concat(r))})));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_fetchData",value:function(e){(0,r.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseStandardFontDataFactory=s;var l=function(){function e(){_classCallCheck(this,e),this.constructor===e&&(0,r.unreachable)("Cannot initialize BaseSVGFactory.")}return _createClass(e,[{key:"create",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");var r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),n||(r.setAttribute("width","".concat(e,"px")),r.setAttribute("height","".concat(t,"px"))),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox","0 0 ".concat(e," ").concat(t)),r}},{key:"createElement",value:function(e){if("string"!==typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}},{key:"_createSVG",value:function(e){(0,r.unreachable)("Abstract method `_createSVG` called.")}}]),e}();t.BaseSVGFactory=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var r=n(1),a=3285377520,i=4294901760,o=65535,s=function(){function e(t){_classCallCheck(this,e),this.h1=t?4294967295&t:a,this.h2=t?4294967295&t:a}return _createClass(e,[{key:"update",value:function(e){var t,n;if("string"===typeof e){t=new Uint8Array(2*e.length),n=0;for(var a=0,s=e.length;a>>8,t[n++]=255&l)}}else{if(!(0,r.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");n=(t=e.slice()).byteLength}for(var c=n>>2,u=n-4*c,d=new Uint32Array(t.buffer,0,c),h=0,f=0,p=this.h1,v=this.h2,m=3432918353,g=461845907,y=11601,_=13715,b=0;b>>17)*g&i|h*_&o)<<13|p>>>19)+3864292196:v=5*(v=(v^=f=(f=(f=(f=d[b])*m&i|f*y&o)<<15|f>>>17)*g&i|f*_&o)<<13|v>>>19)+3864292196;switch(h=0,u){case 3:h^=t[4*c+2]<<16;case 2:h^=t[4*c+1]<<8;case 1:h=(h=(h=(h^=t[4*c])*m&i|h*y&o)<<15|h>>>17)*g&i|h*_&o,1&c?p^=h:v^=h}this.h1=p,this.h2=v}},{key:"hexdigest",value:function(){var e=this.h1,t=this.h2;return e=3981806797*(e^=t>>>1)&i|36045*e&o,e=444984403*(e^=(t=4283543511*t&i|(2950163797*(t<<16|e>>>16)&i)>>>16)>>>1)&i|60499*e&o,((e^=(t=3301882366*t&i|(3120437893*(t<<16|e>>>16)&i)>>>16)>>>1)>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}]),e}();t.MurmurHash3_64=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var r=n(1),a=n(10),i=function(){function e(t){var n=t.ownerDocument,r=void 0===n?globalThis.document:n;t.styleElement,_classCallCheck(this,e),this._document=r,this.nativeFontFaces=[],this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}return _createClass(e,[{key:"addNativeFontFace",value:function(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}},{key:"insertRule",value:function(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));var t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}},{key:"clear",value:function(){var e,t=_createForOfIteratorHelper(this.nativeFontFaces);try{for(t.s();!(e=t.n()).done;){var n=e.value;this._document.fonts.delete(n)}}catch(r){t.e(r)}finally{t.f()}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,a,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=18;break}if(!(n=t.createNativeFontFace())){e.next=17;break}return this.addNativeFontFace(n),e.prev=7,e.next=10,n.loaded;case 10:e.next=17;break;case 12:throw e.prev=12,e.t0=e.catch(7),(0,r.warn)("Failed to load font '".concat(n.family,"': '").concat(e.t0,"'.")),t.disableFontFace=!0,e.t0;case 17:return e.abrupt("return");case 18:if(!(a=t.createFontFaceRule())){e.next=25;break}if(this.insertRule(a),!this.isSyncFontLoadingSupported){e.next=23;break}return e.abrupt("return");case 23:return e.next=25,new Promise((function(e){var n=i._queueLoadingCallback(e);i._prepareFontLoadEvent(t,n)}));case 25:case"end":return e.stop()}}),e,this,[[7,12]])})));return function(t){return e.apply(this,arguments)}}()},{key:"isFontLoadingAPISupported",get:function(){var e,t=!(null===(e=this._document)||void 0===e||!e.fonts);return(0,r.shadow)(this,"isFontLoadingAPISupported",t)}},{key:"isSyncFontLoadingSupported",get:function(){var e=!1;return(a.isNodeJS||"undefined"!==typeof navigator&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),(0,r.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_queueLoadingCallback",value:function(e){var t=this.loadingRequests,n={done:!1,complete:function(){for((0,r.assert)(!n.done,"completeRequest() cannot be called twice."),n.done=!0;t.length>0&&t[0].done;){var e=t.shift();setTimeout(e.callback,0)}},callback:e};return t.push(n),n}},{key:"_loadTestFont",get:function(){var e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,r.shadow)(this,"_loadTestFont",e)}},{key:"_prepareFontLoadEvent",value:function(e,t){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,n,r){return e.substring(0,t)+r+e.substring(t+n)}var i,o,s=this._document.createElement("canvas");s.width=1,s.height=1;var l=s.getContext("2d"),c=0,u="lt".concat(Date.now()).concat(this.loadTestFontId++),d=this._loadTestFont,h=1482184792,f=n(d=a(d,976,u.length,u),16);for(i=0,o=u.length-3;i30)return(0,r.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))}(u,(function(){m.remove(),t.complete()}))}}]),e}();t.FontLoader=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,l=void 0!==s&&s,c=n.inspectFont,u=void 0===c?null:c;for(var d in _classCallCheck(this,e),this.compiledGlyphs=Object.create(null),t)this[d]=t[d];this.isEvalSupported=!1!==a,this.disableFontFace=!0===o,this.ignoreErrors=!0===l,this._inspectFont=u}return _createClass(e,[{key:"createNativeFontFace",value:function(){var e,t;if(!this.data||this.disableFontFace)return null;if(this.cssFontInfo){var n={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(n.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),t=new FontFace(this.cssFontInfo.fontFamily,this.data,n)}else t=new FontFace(this.loadedName,this.data,{});return null===(e=this._inspectFont)||void 0===e||e.call(this,this),t}},{key:"createFontFaceRule",value:function(){var e;if(!this.data||this.disableFontFace)return null;var t,n=(0,r.bytesToString)(this.data),a="url(data:".concat(this.mimetype,";base64,").concat(btoa(n),");");if(this.cssFontInfo){var i="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(i+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),t='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(i,"src:").concat(a,"}")}else t='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(a,"}");return null===(e=this._inspectFont)||void 0===e||e.call(this,this,a),t}},{key:"getPathGenerator",value:function(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];var n;try{n=e.get(this.loadedName+"_path_"+t)}catch(c){if(!this.ignoreErrors)throw c;return(0,r.warn)('getPathGenerator - ignoring character: "'.concat(c,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&r.FeatureTest.isEvalSupported){var a,i=[],o=_createForOfIteratorHelper(n);try{for(o.s();!(a=o.n()).done;){var s=a.value,l=void 0!==s.args?s.args.join(","):"";i.push("c.",s.cmd,"(",l,");\n")}}catch(u){o.e(u)}finally{o.f()}return this.compiledGlyphs[t]=new Function("c","size",i.join(""))}return this.compiledGlyphs[t]=function(e,t){var r,a=_createForOfIteratorHelper(n);try{for(a.s();!(r=a.n()).done;){var i=r.value;"scale"===i.cmd&&(i.args=[t,-t]),e[i.cmd].apply(e,i.args)}}catch(u){a.e(u)}finally{a.f()}}}}]),e}();t.FontFaceObject=o},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;var n="object"===typeof process&&process+""==="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var r=n(1),a=n(6),i=n(12),o=n(13),s=n(10),l=4096,c=16,u=function(){function e(t){_classCallCheck(this,e),this.canvasFactory=t,this.cache=Object.create(null)}return _createClass(e,[{key:"getCanvas",value:function(e,t,n){var r;return void 0!==this.cache[e]?(r=this.cache[e],this.canvasFactory.reset(r,t,n)):(r=this.canvasFactory.create(t,n),this.cache[e]=r),r}},{key:"delete",value:function(e){delete this.cache[e]}},{key:"clear",value:function(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}]),e}();function d(e,t,n,r,i,o,s,l,c,u){var d=(0,a.getCurrentTransform)(e),h=_slicedToArray(d,6),f=h[0],p=h[1],v=h[2],m=h[3],g=h[4],y=h[5];if(0===p&&0===v){var _=s*f+g,b=Math.round(_),k=l*m+y,S=Math.round(k),w=(s+c)*f+g,P=Math.abs(Math.round(w)-b)||1,x=(l+u)*m+y,A=Math.abs(Math.round(x)-S)||1;return e.setTransform(Math.sign(f),0,0,Math.sign(m),b,S),e.drawImage(t,n,r,i,o,0,0,P,A),e.setTransform(f,p,v,m,g,y),[P,A]}if(0===f&&0===m){var C=l*v+g,F=Math.round(C),E=s*p+y,T=Math.round(E),M=(l+u)*v+g,R=Math.abs(Math.round(M)-F)||1,I=(s+c)*p+y,O=Math.abs(Math.round(I)-T)||1;return e.setTransform(0,Math.sign(p),Math.sign(v),0,F,T),e.drawImage(t,n,r,i,o,0,0,O,R),e.setTransform(f,p,v,m,g,y),[O,R]}return e.drawImage(t,n,r,i,o,s,l,c,u),[Math.hypot(f,p)*c,Math.hypot(v,m)*u]}var h=function(){function e(t,n){_classCallCheck(this,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.transferMaps="none",this.startNewPathAndClipBox([0,0,t,n])}return _createClass(e,[{key:"clone",value:function(){var e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}},{key:"updatePathMinMax",value:function(e,t,n){var a=r.Util.applyTransform([t,n],e),i=_slicedToArray(a,2);t=i[0],n=i[1],this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,n),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,n)}},{key:"updateRectMinMax",value:function(e,t){var n=r.Util.applyTransform(t,e),a=r.Util.applyTransform(t.slice(2),e);this.minX=Math.min(this.minX,n[0],a[0]),this.minY=Math.min(this.minY,n[1],a[1]),this.maxX=Math.max(this.maxX,n[0],a[0]),this.maxY=Math.max(this.maxY,n[1],a[1])}},{key:"updateScalingPathMinMax",value:function(e,t){r.Util.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.maxX=Math.max(this.maxX,t[1]),this.minY=Math.min(this.minY,t[2]),this.maxY=Math.max(this.maxY,t[3])}},{key:"updateCurvePathMinMax",value:function(e,t,n,a,i,o,s,l,c,u){var d=r.Util.bezierBoundingBox(t,n,a,i,o,s,l,c);if(u)return u[0]=Math.min(u[0],d[0],d[2]),u[1]=Math.max(u[1],d[0],d[2]),u[2]=Math.min(u[2],d[1],d[3]),void(u[3]=Math.max(u[3],d[1],d[3]));this.updateRectMinMax(e,d)}},{key:"getPathBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[this.minX,this.minY,this.maxX,this.maxY];if(e===i.PathType.STROKE){t||(0,r.unreachable)("Stroke bounding box must include transform.");var a=r.Util.singularValueDecompose2dScale(t),o=a[0]*this.lineWidth/2,s=a[1]*this.lineWidth/2;n[0]-=o,n[1]-=s,n[2]+=o,n[3]+=s}return n}},{key:"updateClipFromPath",value:function(){var e=r.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}},{key:"isEmptyClip",value:function(){return this.minX===1/0}},{key:"startNewPathAndClipBox",value:function(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}},{key:"getClippedPathBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return r.Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}]),e}();function f(e,t){if("undefined"!==typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var n,a,i,o,s,l=t.height,u=t.width,d=l%c,h=(l-d)/c,f=0===d?h:h+1,p=e.createImageData(u,c),v=0,m=t.data,g=p.data;if(t.kind===r.ImageKind.GRAYSCALE_1BPP){var y=m.byteLength,_=new Uint32Array(g.buffer,0,g.byteLength>>2),b=_.length,k=u+7>>3,S=4294967295,w=r.FeatureTest.isLittleEndian?4278190080:255;for(a=0;ak?u:8*P-7,C=-8&A,F=0,E=0;x>=1}for(;n=h&&(s=u*(o=d)),n=0,i=s;i--;)g[n++]=m[v++],g[n++]=m[v++],g[n++]=m[v++],g[n++]=255;e.putImageData(p,0,a*c)}}}}function p(e,t){if(t.bitmap)e.drawImage(t.bitmap,0,0);else for(var n=t.height,r=t.width,a=n%c,i=(n-a)/c,s=0===a?i:i+1,l=e.createImageData(r,c),u=0,d=t.data,h=l.data,f=0;f>8,e[i-2]=e[i-2]*o+n*s>>8,e[i-1]=e[i-1]*o+r*s>>8}}}function y(e,t,n){for(var r=e.length,a=3;a>8]>>8:t[a]*i>>16}}function b(e,t,n,r){var a=r[0],i=r[1],o=r[2]-a,s=r[3]-i;0!==o&&0!==s&&(function(e,t,n,r,a,i,o,s,l,c,u){var d,h=!!i,f=h?i[0]:0,p=h?i[1]:0,v=h?i[2]:0;d="Luminosity"===a?_:y;for(var m=Math.min(r,Math.ceil(1048576/n)),b=0;b1&&void 0!==arguments[1]?arguments[1]:null;return"string"===typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}},{key:"beginDrawing",value:function(e){var t,n,r=e.transform,i=e.viewport,o=e.transparency,s=void 0!==o&&o,l=e.background,c=void 0===l?null:l,u=this.ctx.canvas.width,d=this.ctx.canvas.height,h=this.ctx.fillStyle;if(this.ctx.fillStyle=c||"#ffffff",this.ctx.fillRect(0,0,u,d),this.ctx.fillStyle=h,s){var f,p=this.cachedCanvases.getCanvas("transparent",u,d);this.compositeCtx=this.ctx,this.transparentCanvas=p.canvas,this.ctx=p.context,this.ctx.save(),(f=this.ctx).transform.apply(f,_toConsumableArray((0,a.getCurrentTransform)(this.compositeCtx)))}this.ctx.save(),m(this.ctx),r&&((n=this.ctx).transform.apply(n,_toConsumableArray(r)),this.outputScaleX=r[0],this.outputScaleY=r[0]),(t=this.ctx).transform.apply(t,_toConsumableArray(i.transform)),this.viewportScale=i.scale,this.baseTransform=(0,a.getCurrentTransform)(this.ctx)}},{key:"executeOperatorList",value:function(e,t,n,a){var i=e.argsArray,o=e.fnArray,s=t||0,l=i.length;if(l===s)return s;for(var c,u=l-s>10&&"function"===typeof n,d=u?Date.now()+15:0,h=0,f=this.commonObjs,p=this.objs;;){if(void 0!==a&&s===a.nextBreakPoint)return a.breakIt(s,n),s;if((c=o[s])!==r.OPS.dependency)this[c].apply(this,i[s]);else{var v,m=_createForOfIteratorHelper(i[s]);try{for(m.s();!(v=m.n()).done;){var g=v.value,y=g.startsWith("g_")?f:p;if(!y.has(g))return y.get(g,n),s}}catch(_){m.e(_)}finally{m.f()}}if(++s===l)return s;if(u&&++h>10){if(Date.now()>d)return n(),s;h=0}}}},{key:"endDrawing",value:function(){_classPrivateMethodGet(this,A,E).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();var e,t=_createForOfIteratorHelper(this._cachedBitmapsMap.values());try{for(t.s();!(e=t.n()).done;){var n,r=e.value,a=_createForOfIteratorHelper(r.values());try{for(a.s();!(n=a.n()).done;){var i=n.value;"undefined"!==typeof HTMLCanvasElement&&i instanceof HTMLCanvasElement&&(i.width=i.height=0)}}catch(o){a.e(o)}finally{a.f()}r.clear()}}catch(o){t.e(o)}finally{t.f()}this._cachedBitmapsMap.clear(),_classPrivateMethodGet(this,C,T).call(this)}},{key:"_scaleImage",value:function(e,t){for(var n,r,a=e.width,i=e.height,o=Math.max(Math.hypot(t[0],t[1]),1),s=Math.max(Math.hypot(t[2],t[3]),1),l=a,c=i,u="prescale1";o>2&&l>1||s>2&&c>1;){var d=l,h=c;o>2&&l>1&&(o/=l/(d=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l/2))),s>2&&c>1&&(s/=c/(h=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c)/2)),(r=(n=this.cachedCanvases.getCanvas(u,d,h)).context).clearRect(0,0,d,h),r.drawImage(e,0,0,l,c,0,0,d,h),e=n.canvas,l=d,c=h,u="prescale1"===u?"prescale2":"prescale1"}return{img:e,paintWidth:l,paintHeight:c}}},{key:"_createMaskCanvas",value:function(e){var t,n,o,s,l=this.ctx,c=e.width,u=e.height,h=this.current.fillColor,f=this.current.patternFill,v=(0,a.getCurrentTransform)(l);if((e.bitmap||e.data)&&e.count>1){var m=e.bitmap||e.data.buffer;n=JSON.stringify(f?v:[v.slice(0,4),h]),(t=this._cachedBitmapsMap.get(m))||(t=new Map,this._cachedBitmapsMap.set(m,t));var g=t.get(n);if(g&&!f)return{canvas:g,offsetX:Math.round(Math.min(v[0],v[2])+v[4]),offsetY:Math.round(Math.min(v[1],v[3])+v[5])};o=g}o||p((s=this.cachedCanvases.getCanvas("maskCanvas",c,u)).context,e);var y=r.Util.transform(v,[1/c,0,0,-1/u,0,0]);y=r.Util.transform(y,[1,0,0,1,0,-u]);var _=r.Util.applyTransform([0,0],y),b=r.Util.applyTransform([c,u],y),S=r.Util.normalizeRect([_[0],_[1],b[0],b[1]]),w=Math.round(S[2]-S[0])||1,P=Math.round(S[3]-S[1])||1,x=this.cachedCanvases.getCanvas("fillCanvas",w,P),A=x.context,C=Math.min(_[0],b[0]),F=Math.min(_[1],b[1]);A.translate(-C,-F),A.transform.apply(A,_toConsumableArray(y)),o||(o=(o=this._scaleImage(s.canvas,(0,a.getCurrentTransformInverse)(A))).img,t&&f&&t.set(n,o)),A.imageSmoothingEnabled=k((0,a.getCurrentTransform)(A),e.interpolate),d(A,o,0,0,o.width,o.height,0,0,c,u),A.globalCompositeOperation="source-in";var E=r.Util.transform((0,a.getCurrentTransformInverse)(A),[1,0,0,1,-C,-F]);return A.fillStyle=f?h.getPattern(l,this,E,i.PathType.FILL):h,A.fillRect(0,0,c,u),t&&!f&&(this.cachedCanvases.delete("fillCanvas"),t.set(n,x.canvas)),{canvas:x.canvas,offsetX:Math.round(C),offsetY:Math.round(F)}}},{key:"setLineWidth",value:function(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking=null),this.current.lineWidth=e,this.ctx.lineWidth=e}},{key:"setLineCap",value:function(e){this.ctx.lineCap=S[e]}},{key:"setLineJoin",value:function(e){this.ctx.lineJoin=w[e]}},{key:"setMiterLimit",value:function(e){this.ctx.miterLimit=e}},{key:"setDash",value:function(e,t){var n=this.ctx;void 0!==n.setLineDash&&(n.setLineDash(e),n.lineDashOffset=t)}},{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 r=_slicedToArray(t.value,2),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=i;break;case"ca":this.current.fillAlpha=i,this.ctx.globalAlpha=i;break;case"BM":this.ctx.globalCompositeOperation=i;break;case"SMask":this.current.activeSMask=i?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(i)}}}catch(o){n.e(o)}finally{n.f()}}},{key:"inSMaskMode",get:function(){return!!this.suspendedCtx}},{key:"checkSMaskState",value:function(){var e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");var e=this.ctx.canvas.width,t=this.ctx.canvas.height,n="smaskGroupAt"+this.groupLevel,r=this.cachedCanvases.getCanvas(n,e,t);this.suspendedCtx=this.ctx,this.ctx=r.context;var i=this.ctx;i.setTransform.apply(i,_toConsumableArray((0,a.getCurrentTransform)(this.suspendedCtx))),v(this.suspendedCtx,i),function(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");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.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=function(){e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,n){t.translate(e,n),this.__originalTranslate(e,n)},e.scale=function(e,n){t.scale(e,n),this.__originalScale(e,n)},e.transform=function(e,n,r,a,i,o){t.transform(e,n,r,a,i,o),this.__originalTransform(e,n,r,a,i,o)},e.setTransform=function(e,n,r,a,i,o){t.setTransform(e,n,r,a,i,o),this.__originalSetTransform(e,n,r,a,i,o)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,n){t.moveTo(e,n),this.__originalMoveTo(e,n)},e.lineTo=function(e,n){t.lineTo(e,n),this.__originalLineTo(e,n)},e.bezierCurveTo=function(e,n,r,a,i,o){t.bezierCurveTo(e,n,r,a,i,o),this.__originalBezierCurveTo(e,n,r,a,i,o)},e.rect=function(e,n,r,a){t.rect(e,n,r,a),this.__originalRect(e,n,r,a)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(i,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}},{key:"endSMaskMode",value:function(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),v(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}},{key:"compose",value:function(e){if(this.current.activeSMask){e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var t=this.current.activeSMask;b(this.suspendedCtx,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}}},{key:"save",value:function(){this.inSMaskMode?(v(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),v(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null)}},{key:"transform",value:function(e,t,n,r,a,i){this.ctx.transform(e,t,n,r,a,i),this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function(e,t,n){for(var i,o,s=this.ctx,l=this.current,c=l.x,u=l.y,d=(0,a.getCurrentTransform)(s),h=0===d[0]&&0===d[3]||0===d[1]&&0===d[2],f=h?n.slice(0):null,p=0,v=0,m=e.length;p0&&void 0!==arguments[0])||arguments[0],t=this.ctx,n=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"===typeof n&&null!==n&&void 0!==n&&n.getPattern?(t.save(),t.strokeStyle=n.getPattern(t,this,(0,a.getCurrentTransformInverse)(t),i.PathType.STROKE),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"fill",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.ctx,n=this.current.fillColor,r=!1;this.current.patternFill&&(t.save(),t.fillStyle=n.getPattern(t,this,(0,a.getCurrentTransformInverse)(t),i.PathType.FILL),r=!0);var o=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==o&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),r&&t.restore(),e&&this.consumePath(o)}},{key:"eoFill",value:function(){this.pendingEOFill=!0,this.fill()}},{key:"fillStroke",value:function(){this.fill(!1),this.stroke(!1),this.consumePath()}},{key:"eoFillStroke",value:function(){this.pendingEOFill=!0,this.fillStroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}},{key:"endPath",value:function(){this.consumePath()}},{key:"clip",value:function(){this.pendingClip=P}},{key:"eoClip",value:function(){this.pendingClip=x}},{key:"beginText",value: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}},{key:"endText",value:function(){var e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();var n,r=_createForOfIteratorHelper(e);try{for(r.s();!(n=r.n()).done;){var a=n.value;t.setTransform.apply(t,_toConsumableArray(a.transform)),t.translate(a.x,a.y),a.addToPath(t,a.fontSize)}}catch(i){r.e(i)}finally{r.f()}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setFont",value: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||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",l='"'.concat(i,'", ').concat(n.fallbackName),c=t;t<16?c=16:t>100&&(c=100),this.current.fontSizeScale=t/c,this.ctx.font="".concat(s," ").concat(o," ").concat(c,"px ").concat(l)}}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"moveText",value:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"setTextMatrix",value:function(e,t,n,r,a,i){this.current.textMatrix=[e,t,n,r,a,i],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function(e,t,n,i){var o,s=this.ctx,l=this.current,c=l.font,u=l.textRenderingMode,d=l.fontSize/l.fontSizeScale,h=u&r.TextRenderingMode.FILL_STROKE_MASK,f=!!(u&r.TextRenderingMode.ADD_TO_PATH_FLAG),p=l.patternFill&&!c.missingFile;(c.disableFontFace||f||p)&&(o=c.getPathGenerator(this.commonObjs,e)),c.disableFontFace||p?(s.save(),s.translate(t,n),s.beginPath(),o(s,d),i&&s.setTransform.apply(s,_toConsumableArray(i)),h!==r.TextRenderingMode.FILL&&h!==r.TextRenderingMode.FILL_STROKE||s.fill(),h!==r.TextRenderingMode.STROKE&&h!==r.TextRenderingMode.FILL_STROKE||s.stroke(),s.restore()):(h!==r.TextRenderingMode.FILL&&h!==r.TextRenderingMode.FILL_STROKE||s.fillText(e,t,n),h!==r.TextRenderingMode.STROKE&&h!==r.TextRenderingMode.FILL_STROKE||s.strokeText(e,t,n)),f&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,a.getCurrentTransform)(s),x:t,y:n,fontSize:d,addToPath:o})}},{key:"isFontSubpixelAAEnabled",get:function(){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;a0&&t[a]<255){n=!0;break}return(0,r.shadow)(this,"isFontSubpixelAAEnabled",n)}},{key:"showText",value:function(e){var t=this.current,n=t.font;if(n.isType3Font)return this.showType3Text(e);var o=t.fontSize;if(0!==o){var s,l=this.ctx,c=t.fontSizeScale,u=t.charSpacing,d=t.wordSpacing,h=t.fontDirection,f=t.textHScale*h,p=e.length,v=n.vertical,m=v?1:-1,g=n.defaultVMetrics,y=o*t.fontMatrix[0],_=t.textRenderingMode===r.TextRenderingMode.FILL&&!n.disableFontFace&&!t.patternFill;if(l.save(),l.transform.apply(l,_toConsumableArray(t.textMatrix)),l.translate(t.x,t.y+t.textRise),h>0?l.scale(f,-1):l.scale(f,1),t.patternFill){l.save();var b=t.fillColor.getPattern(l,this,(0,a.getCurrentTransformInverse)(l),i.PathType.FILL);s=(0,a.getCurrentTransform)(l),l.restore(),l.fillStyle=b}var k=t.lineWidth,S=t.textMatrixScale;if(0===S||0===k){var w=t.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;w!==r.TextRenderingMode.STROKE&&w!==r.TextRenderingMode.FILL_STROKE||(k=this.getSinglePixelWidth())}else k/=S;if(1!==c&&(l.scale(c,c),k/=c),l.lineWidth=k,n.isInvalidPDFjsFont){var P,x=[],A=0,C=_createForOfIteratorHelper(e);try{for(C.s();!(P=C.n()).done;){var F=P.value;x.push(F.unicode),A+=F.width}}catch(V){C.e(V)}finally{C.f()}return l.fillText(x.join(""),0,0),t.x+=A*y*f,l.restore(),void this.compose()}var E,T=0;for(E=0;E0){var U=1e3*l.measureText(O).width/o*c;if(j1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(e)?t=this.cachedPatterns.get(e):(t=(0,i.getShadingPattern)(this.getObject(e)),this.cachedPatterns.set(e,t)),n&&(t.matrix=n),t}},{key:"shadingFill",value:function(e){if(this.contentVisible){var t=this.ctx;this.save();var n=this._getPattern(e);t.fillStyle=n.getPattern(t,this,(0,a.getCurrentTransformInverse)(t),i.PathType.SHADING);var o=(0,a.getCurrentTransformInverse)(t);if(o){var s=t.canvas,l=s.width,c=s.height,u=r.Util.applyTransform([0,0],o),d=r.Util.applyTransform([0,c],o),h=r.Util.applyTransform([l,0],o),f=r.Util.applyTransform([l,c],o),p=Math.min(u[0],d[0],h[0],f[0]),v=Math.min(u[1],d[1],h[1],f[1]),m=Math.max(u[0],d[0],h[0],f[0]),g=Math.max(u[1],d[1],h[1],f[1]);this.ctx.fillRect(p,v,m-p,g-v)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}}},{key:"beginInlineImage",value:function(){(0,r.unreachable)("Should not call beginInlineImage")}},{key:"beginImageData",value:function(){(0,r.unreachable)("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform.apply(this,_toConsumableArray(e)),this.baseTransform=(0,a.getCurrentTransform)(this.ctx),t)){var n=t[2]-t[0],r=t[3]-t[1];this.ctx.rect(t[0],t[1],n,r),this.current.updateRectMinMax((0,a.getCurrentTransform)(this.ctx),t),this.clip(),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}},{key:"beginGroup",value:function(e){if(this.contentVisible){this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);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=(0,a.getCurrentTransform)(t);if(e.matrix&&t.transform.apply(t,_toConsumableArray(e.matrix)),!e.bbox)throw new Error("Bounding box is required.");var i=r.Util.getAxialAlignedBoundingBox(e.bbox,(0,a.getCurrentTransform)(t)),o=[0,0,t.canvas.width,t.canvas.height];i=r.Util.intersect(i,o)||[0,0,0,0];var s=Math.floor(i[0]),c=Math.floor(i[1]),u=Math.max(Math.ceil(i[2])-s,1),d=Math.max(Math.ceil(i[3])-c,1),h=1,f=1;u>l&&(h=u/l,u=l),d>l&&(f=d/l,d=l),this.current.startNewPathAndClipBox([0,0,u,d]);var p="groupAt"+this.groupLevel;e.smask&&(p+="_smask_"+this.smaskCounter++%2);var m=this.cachedCanvases.getCanvas(p,u,d),g=m.context;g.scale(1/h,1/f),g.translate(-s,-c),g.transform.apply(g,_toConsumableArray(n)),e.smask?this.smaskStack.push({canvas:m.canvas,context:g,offsetX:s,offsetY:c,scaleX:h,scaleY:f,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(s,c),t.scale(h,f),t.save()),v(t,g),this.ctx=g,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}}},{key:"endGroup",value:function(e){if(this.contentVisible){this.groupLevel--;var t=this.ctx,n=this.groupStack.pop();if(this.ctx=n,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{var i;this.ctx.restore();var o=(0,a.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),(i=this.ctx).setTransform.apply(i,_toConsumableArray(o));var s=r.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],o);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(s)}}}},{key:"beginAnnotation",value:function(e,t,n,i,o){var s;if(_classPrivateMethodGet(this,A,E).call(this),m(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&(s=this.ctx).setTransform.apply(s,_toConsumableArray(this.baseTransform)),Array.isArray(t)&&4===t.length){var l=t[2]-t[0],c=t[3]-t[1];if(o&&this.annotationCanvasMap){(n=n.slice())[4]-=t[0],n[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=l,t[3]=c;var u=r.Util.singularValueDecompose2dScale((0,a.getCurrentTransform)(this.ctx)),d=_slicedToArray(u,2),f=d[0],p=d[1],v=this.viewportScale,g=Math.ceil(l*this.outputScaleX*v),y=Math.ceil(c*this.outputScaleY*v);this.annotationCanvas=this.canvasFactory.create(g,y);var _=this.annotationCanvas,b=_.canvas,k=_.context;this.annotationCanvasMap.set(e,b),this.annotationCanvas.savedCtx=this.ctx,this.ctx=k,this.ctx.save(),this.ctx.setTransform(f,0,0,-p,0,c*p),m(this.ctx)}else m(this.ctx),this.ctx.rect(t[0],t[1],l,c),this.ctx.clip(),this.endPath()}this.current=new h(this.ctx.canvas.width,this.ctx.canvas.height),this.transform.apply(this,_toConsumableArray(n)),this.transform.apply(this,_toConsumableArray(i))}},{key:"endAnnotation",value:function(){this.annotationCanvas&&(this.ctx.restore(),_classPrivateMethodGet(this,C,T).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}},{key:"paintImageMaskXObject",value:function(e){if(this.contentVisible){var t=e.count;(e=this.getObject(e.data,e)).count=t;var n=this.ctx,r=this.processingType3;if(r&&(void 0===r.compiled&&(r.compiled=function(e){var t=e.width,n=e.height;if(t>1e3||n>1e3)return null;var r,a,i,o,s=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),l=t+1,c=new Uint8Array(l*(n+1)),u=t+7&-8,d=new Uint8Array(u*n),h=0,f=_createForOfIteratorHelper(e.data);try{for(f.s();!(o=f.n()).done;)for(var p=o.value,v=128;v>0;)d[h++]=p&v?0:255,v>>=1}catch(A){f.e(A)}finally{f.f()}var m=0;for(0!==d[h=0]&&(c[0]=1,++m),a=1;a>2)+(d[h+1]?4:0)+(d[h-u+1]?8:0)]&&(c[i+a]=s[g],++m),h++;if(d[h-u]!==d[h]&&(c[i+a]=d[h]?2:4,++m),m>1e3)return null}for(i=r*l,0!==d[h=u*(n-1)]&&(c[i]=8,++m),a=1;a1e3)return null;var y=new Int32Array([0,l,-1,0,-l,0,0,0,1]),_=new Path2D;for(r=0;m&&r<=n;r++){for(var b=r*l,k=b+t;b>4,c[b]&=w>>2|w<<2),_.lineTo(b%l,b/l|0),c[b]||--m}while(S!==b);--r}}return d=null,c=null,function(e){e.save(),e.scale(1/t,-1/n),e.translate(0,-n),e.fill(_),e.beginPath(),e.restore()}}(e)),r.compiled))r.compiled(n);else{var a=this._createMaskCanvas(e),i=a.canvas;n.save(),n.setTransform(1,0,0,1,0,0),n.drawImage(i,a.offsetX,a.offsetY),n.restore(),this.compose()}}}},{key:"paintImageMaskXObjectRepeat",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){e=this.getObject(e.data,e);var l=this.ctx;l.save();var c=(0,a.getCurrentTransform)(l);l.transform(t,n,i,o,0,0);var u=this._createMaskCanvas(e);l.setTransform(1,0,0,1,u.offsetX-c[4],u.offsetY-c[5]);for(var d=0,h=s.length;dh?d/h:1,t=u>h?u/h:1}}this._cachedScaleForStroking=[e,t]}return this._cachedScaleForStroking}},{key:"rescaleAndStroke",value:function(e){var t=this.ctx,n=this.current.lineWidth,r=this.getScaleForStroking(),i=_slicedToArray(r,2),o=i[0],s=i[1];if(t.lineWidth=n||1,1!==o||1!==s){var l,c,u;e&&(l=(0,a.getCurrentTransform)(t),c=t.getLineDash().slice(),u=t.lineDashOffset),t.scale(o,s);var d=Math.max(o,s);t.setLineDash(t.getLineDash().map((function(e){return e/d}))),t.lineDashOffset/=d,t.stroke(),e&&(t.setTransform.apply(t,_toConsumableArray(l)),t.setLineDash(c),t.lineDashOffset=u)}else t.stroke()}},{key:"isContentVisible",value:function(){for(var e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}]),e}();function E(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}function T(){if(this.pageColors){var e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==e){var t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}}for(var M in t.CanvasGraphics=F,r.OPS)void 0!==F.prototype[M]&&(F.prototype[r.OPS[M]]=F.prototype[M])},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=function(e){switch(e[0]){case"RadialAxial":return new l(e);case"Mesh":return new d(e);case"Dummy":return new h}throw new Error("Unknown IR type: ".concat(e[0]))};var r=n(1),a=n(6),i={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function o(e,t){if(t){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)}}t.PathType=i;var s=function(){function e(){_classCallCheck(this,e),this.constructor===e&&(0,r.unreachable)("Cannot initialize BaseShadingPattern.")}return _createClass(e,[{key:"getPattern",value:function(){(0,r.unreachable)("Abstract method `getPattern` called.")}}]),e}(),l=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r;return _classCallCheck(this,n),(r=t.call(this))._type=e[1],r._bbox=e[2],r._colorStops=e[3],r._p0=e[4],r._p1=e[5],r._r0=e[6],r._r1=e[7],r.matrix=null,r}return _createClass(n,[{key:"_createGradient",value:function(e){var t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));var n,r=_createForOfIteratorHelper(this._colorStops);try{for(r.s();!(n=r.n()).done;){var a=n.value;t.addColorStop(a[0],a[1])}}catch(i){r.e(i)}finally{r.f()}return t}},{key:"getPattern",value:function(e,t,n,s){var l;if(s===i.STROKE||s===i.FILL){var c=t.current.getClippedPathBoundingBox(s,(0,a.getCurrentTransform)(e))||[0,0,0,0],u=Math.ceil(c[2]-c[0])||1,d=Math.ceil(c[3]-c[1])||1,h=t.cachedCanvases.getCanvas("pattern",u,d,!0),f=h.context;f.clearRect(0,0,f.canvas.width,f.canvas.height),f.beginPath(),f.rect(0,0,f.canvas.width,f.canvas.height),f.translate(-c[0],-c[1]),n=r.Util.transform(n,[1,0,0,1,c[0],c[1]]),f.transform.apply(f,_toConsumableArray(t.baseTransform)),this.matrix&&f.transform.apply(f,_toConsumableArray(this.matrix)),o(f,this._bbox),f.fillStyle=this._createGradient(f),f.fill(),l=e.createPattern(h.canvas,"no-repeat");var p=new DOMMatrix(n);l.setTransform(p)}else o(e,this._bbox),l=this._createGradient(e);return l}}]),n}(s);function c(e,t,n,r,a,i,o,s){var l,c=t.coords,u=t.colors,d=e.data,h=4*e.width;c[n+1]>c[r+1]&&(l=n,n=r,r=l,l=i,i=o,o=l),c[r+1]>c[a+1]&&(l=r,r=a,a=l,l=o,o=s,s=l),c[n+1]>c[r+1]&&(l=n,n=r,r=l,l=i,i=o,o=l);var f=(c[n]+t.offsetX)*t.scaleX,p=(c[n+1]+t.offsetY)*t.scaleY,v=(c[r]+t.offsetX)*t.scaleX,m=(c[r+1]+t.offsetY)*t.scaleY,g=(c[a]+t.offsetX)*t.scaleX,y=(c[a+1]+t.offsetY)*t.scaleY;if(!(p>=y))for(var _,b,k,S,w,P,x,A,C=u[i],F=u[i+1],E=u[i+2],T=u[o],M=u[o+1],R=u[o+2],I=u[s],O=u[s+1],D=u[s+2],L=Math.round(p),N=Math.round(y),j=L;j<=N;j++){if(jy?1:m===y?0:(m-j)/(m-y)),b=T-(T-I)*z,k=M-(M-O)*z,S=R-(R-D)*z}var B=void 0;w=f-(f-g)*(B=jy?1:(p-j)/(p-y)),P=C-(C-I)*B,x=F-(F-O)*B,A=E-(E-D)*B;for(var U=Math.round(Math.min(_,w)),W=Math.round(Math.max(_,w)),H=h*j+4*U,q=U;q<=W;q++)(B=(_-q)/(_-w))<0?B=0:B>1&&(B=1),d[H++]=b-(b-P)*B|0,d[H++]=k-(k-x)*B|0,d[H++]=S-(S-A)*B|0,d[H++]=255}}function u(e,t,n){var r,a,i=t.coords,o=t.colors;switch(t.type){case"lattice":var s=t.verticesPerRow,l=Math.floor(i.length/s)-1,u=s-1;for(r=0;r=a?i=a:r=i/t,{scale:r,size:i}}},{key:"clipBbox",value:function(e,t,n,r,i){var o=r-t,s=i-n;e.ctx.rect(t,n,o,s),e.current.updateRectMinMax((0,a.getCurrentTransform)(e.ctx),[t,n,r,i]),e.clip(),e.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function(e,t,n){var a=e.ctx,i=e.current;switch(t){case f:var o=this.ctx;a.fillStyle=o.fillStyle,a.strokeStyle=o.strokeStyle,i.fillColor=o.fillStyle,i.strokeColor=o.strokeStyle;break;case p:var s=r.Util.makeHexColor(n[0],n[1],n[2]);a.fillStyle=s,a.strokeStyle=s,i.fillColor=s,i.strokeColor=s;break;default:throw new r.FormatError("Unsupported paint type: ".concat(t))}}},{key:"getPattern",value:function(e,t,n,a){var o=n;a!==i.SHADING&&(o=r.Util.transform(o,t.baseTransform),this.matrix&&(o=r.Util.transform(o,this.matrix)));var s=this.createPatternCanvas(t),l=new DOMMatrix(o);l=(l=l.translate(s.offsetX,s.offsetY)).scale(1/s.scaleX,1/s.scaleY);var c=e.createPattern(s.canvas,"repeat");return c.setTransform(l),c}}]),e}();_defineProperty(v,"MAX_PATTERN_SIZE",3e3),t.TilingPattern=v},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.convertBlackAndWhiteToRGBA=a,t.convertToRGBA=function(e){switch(e.kind){case r.ImageKind.GRAYSCALE_1BPP:return a(e);case r.ImageKind.RGB_24BPP:return function(e){var t=e.src,n=e.srcPos,a=void 0===n?0:n,i=e.dest,o=e.destPos,s=void 0===o?0:o,l=(e.width,e.height,0),c=t.length>>2,u=new Uint32Array(t.buffer,a,c);if(r.FeatureTest.isLittleEndian){for(;l>>24|h<<8|4278190080,i[s+2]=h>>>16|f<<16|4278190080,i[s+3]=f>>>8|4278190080}for(var p=4*l,v=t.length;p>>8|255,i[s+2]=g<<16|y>>>16|255,i[s+3]=y<<8|255}for(var _=4*l,b=t.length;_>3,g=7&o,y=t.length;i=new Uint32Array(i.buffer);for(var _=0,b=0;b1&&void 0!==arguments[1]?arguments[1]:1,s=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var l=this.desiredSize;this.desiredSize-=o,l>0&&this.desiredSize<=0&&(this.sinkCapability=new r.PromiseCapability,this.ready=this.sinkCapability.promise),i.postMessage({sourceName:n,targetName:a,stream:c,streamId:t,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:a,stream:l,streamId:t}),delete o.streamSinks[t])},error:function(e){(0,r.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:a,stream:u,streamId:t,reason:p(e)}))},sinkCapability:new r.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};d.sinkCapability.resolve(),d.ready=d.sinkCapability.promise,this.streamSinks[t]=d,new Promise((function(t){t(s(e.data,d))})).then((function(){i.postMessage({sourceName:n,targetName:a,stream:f,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:n,targetName:a,stream:f,streamId:t,reason:p(e)})}))}function b(e){var t=e.streamId,n=this.sourceName,a=e.sourceName,i=this.comObj,v=this.streamControllers[t],m=this.streamSinks[t];switch(e.stream){case f:e.success?v.startCall.resolve():v.startCall.reject(p(e.reason));break;case h:e.success?v.pullCall.resolve():v.pullCall.reject(p(e.reason));break;case d:if(!m){i.postMessage({sourceName:n,targetName:a,stream:h,streamId:t,success:!0});break}m.desiredSize<=0&&e.desiredSize>0&&m.sinkCapability.resolve(),m.desiredSize=e.desiredSize,new Promise((function(e){var t;e(null===(t=m.onPull)||void 0===t?void 0:t.call(m))})).then((function(){i.postMessage({sourceName:n,targetName:a,stream:h,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:n,targetName:a,stream:h,streamId:t,reason:p(e)})}));break;case c:if((0,r.assert)(v,"enqueue should have stream controller"),v.isClosed)break;v.controller.enqueue(e.chunk);break;case l:if((0,r.assert)(v,"close should have stream controller"),v.isClosed)break;v.isClosed=!0,v.controller.close(),_classPrivateMethodGet(this,g,k).call(this,v,t);break;case u:(0,r.assert)(v,"error should have stream controller"),v.controller.error(p(e.reason)),_classPrivateMethodGet(this,g,k).call(this,v,t);break;case s:e.success?v.cancelCall.resolve():v.cancelCall.reject(p(e.reason)),_classPrivateMethodGet(this,g,k).call(this,v,t);break;case o:if(!m)break;new Promise((function(t){var n;t(null===(n=m.onCancel)||void 0===n?void 0:n.call(m,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)})})),m.sinkCapability.reject(p(e.reason)),m.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}function k(e,t){return S.apply(this,arguments)}function S(){return(S=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,n){var r,a,i;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.allSettled([null===(r=t.startCall)||void 0===r?void 0:r.promise,null===(a=t.pullCall)||void 0===a?void 0:a.promise,null===(i=t.cancelCall)||void 0===i?void 0:i.promise]);case 2:delete this.streamControllers[n];case 3:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}t.MessageHandler=y},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var r=n(1),a=new WeakMap,i=new WeakMap,o=function(){function e(t){var n=t.parsedData,r=t.rawData;_classCallCheck(this,e),_classPrivateFieldInitSpec(this,a,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,i,{writable:!0,value:void 0}),_classPrivateFieldSet(this,a,n),_classPrivateFieldSet(this,i,r)}return _createClass(e,[{key:"getRaw",value:function(){return _classPrivateFieldGet(this,i)}},{key:"get",value:function(e){var t;return null!==(t=_classPrivateFieldGet(this,a).get(e))&&void 0!==t?t:null}},{key:"getAll",value:function(){return(0,r.objectFromMap)(_classPrivateFieldGet(this,a))}},{key:"has",value:function(e){return _classPrivateFieldGet(this,a).has(e)}}]),e}();t.Metadata=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var r=n(1),a=n(8),i=Symbol("INTERNAL"),o=new WeakMap,s=function(){function e(t,n){_classCallCheck(this,e),_classPrivateFieldInitSpec(this,o,{writable:!0,value:!0}),this.name=t,this.intent=n}return _createClass(e,[{key:"visible",get:function(){return _classPrivateFieldGet(this,o)}},{key:"_setVisible",value:function(e,t){e!==i&&(0,r.unreachable)("Internal method `_setVisible` called."),_classPrivateFieldSet(this,o,t)}}]),e}(),l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,h=new WeakSet,f=function(){function e(t){if(_classCallCheck(this,e),_classPrivateMethodInitSpec(this,h),_classPrivateFieldInitSpec(this,l,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,c,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,u,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,d,{writable:!0,value:null}),this.name=null,this.creator=null,null!==t){this.name=t.name,this.creator=t.creator,_classPrivateFieldSet(this,d,t.order);var n,r=_createForOfIteratorHelper(t.groups);try{for(r.s();!(n=r.n()).done;){var a=n.value;_classPrivateFieldGet(this,c).set(a.id,new s(a.name,a.intent))}}catch(b){r.e(b)}finally{r.f()}if("OFF"===t.baseState){var o,f=_createForOfIteratorHelper(_classPrivateFieldGet(this,c).values());try{for(f.s();!(o=f.n()).done;)o.value._setVisible(i,!1)}catch(b){f.e(b)}finally{f.f()}}var p,v=_createForOfIteratorHelper(t.on);try{for(v.s();!(p=v.n()).done;){var m=p.value;_classPrivateFieldGet(this,c).get(m)._setVisible(i,!0)}}catch(b){v.e(b)}finally{v.f()}var g,y=_createForOfIteratorHelper(t.off);try{for(y.s();!(g=y.n()).done;){var _=g.value;_classPrivateFieldGet(this,c).get(_)._setVisible(i,!1)}}catch(b){y.e(b)}finally{y.f()}_classPrivateFieldSet(this,u,this.getHash())}}return _createClass(e,[{key:"isVisible",value:function(e){if(0===_classPrivateFieldGet(this,c).size)return!0;if(!e)return(0,r.warn)("Optional content group not defined."),!0;if("OCG"===e.type)return _classPrivateFieldGet(this,c).has(e.id)?_classPrivateFieldGet(this,c).get(e.id).visible:((0,r.warn)("Optional content group not found: ".concat(e.id)),!0);if("OCMD"===e.type){if(e.expression)return _classPrivateMethodGet(this,h,p).call(this,e.expression);if(!e.policy||"AnyOn"===e.policy){var t,n=_createForOfIteratorHelper(e.ids);try{for(n.s();!(t=n.n()).done;){var a=t.value;if(!_classPrivateFieldGet(this,c).has(a))return(0,r.warn)("Optional content group not found: ".concat(a)),!0;if(_classPrivateFieldGet(this,c).get(a).visible)return!0}}catch(g){n.e(g)}finally{n.f()}return!1}if("AllOn"===e.policy){var i,o=_createForOfIteratorHelper(e.ids);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!_classPrivateFieldGet(this,c).has(s))return(0,r.warn)("Optional content group not found: ".concat(s)),!0;if(!_classPrivateFieldGet(this,c).get(s).visible)return!1}}catch(g){o.e(g)}finally{o.f()}return!0}if("AnyOff"===e.policy){var l,u=_createForOfIteratorHelper(e.ids);try{for(u.s();!(l=u.n()).done;){var d=l.value;if(!_classPrivateFieldGet(this,c).has(d))return(0,r.warn)("Optional content group not found: ".concat(d)),!0;if(!_classPrivateFieldGet(this,c).get(d).visible)return!0}}catch(g){u.e(g)}finally{u.f()}return!1}if("AllOff"===e.policy){var f,v=_createForOfIteratorHelper(e.ids);try{for(v.s();!(f=v.n()).done;){var m=f.value;if(!_classPrivateFieldGet(this,c).has(m))return(0,r.warn)("Optional content group not found: ".concat(m)),!0;if(_classPrivateFieldGet(this,c).get(m).visible)return!1}}catch(g){v.e(g)}finally{v.f()}return!0}return(0,r.warn)("Unknown optional content policy ".concat(e.policy,".")),!0}return(0,r.warn)("Unknown group type ".concat(e.type,".")),!0}},{key:"setVisibility",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];_classPrivateFieldGet(this,c).has(e)?(_classPrivateFieldGet(this,c).get(e)._setVisible(i,!!t),_classPrivateFieldSet(this,l,null)):(0,r.warn)("Optional content group not found: ".concat(e))}},{key:"hasInitialVisibility",get:function(){return this.getHash()===_classPrivateFieldGet(this,u)}},{key:"getOrder",value:function(){return _classPrivateFieldGet(this,c).size?_classPrivateFieldGet(this,d)?_classPrivateFieldGet(this,d).slice():_toConsumableArray(_classPrivateFieldGet(this,c).keys()):null}},{key:"getGroups",value:function(){return _classPrivateFieldGet(this,c).size>0?(0,r.objectFromMap)(_classPrivateFieldGet(this,c)):null}},{key:"getGroup",value:function(e){return _classPrivateFieldGet(this,c).get(e)||null}},{key:"getHash",value:function(){if(null!==_classPrivateFieldGet(this,l))return _classPrivateFieldGet(this,l);var e,t=new a.MurmurHash3_64,n=_createForOfIteratorHelper(_classPrivateFieldGet(this,c));try{for(n.s();!(e=n.n()).done;){var r=_slicedToArray(e.value,2),i=r[0],o=r[1];t.update("".concat(i,":").concat(o.visible))}}catch(s){n.e(s)}finally{n.f()}return _classPrivateFieldSet(this,l,t.hexdigest())}}]),e}();function p(e){var t=e.length;if(t<2)return!0;for(var n=e[0],a=1;a0){var v=o instanceof Uint8Array&&o.byteLength===o.buffer.byteLength?o.buffer:new Uint8Array(o).buffer;this._queuedChunks.push(v)}this._pdfDataRangeTransport=n,this._isStreamingSupported=!p,this._isRangeSupported=!h,this._contentLength=i,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=e.begin,n=e.chunk,a=n instanceof Uint8Array&&n.byteLength===n.buffer.byteLength?n.buffer:new Uint8Array(n).buffer;if(void 0===t)this._fullRequestReader?this._fullRequestReader._enqueue(a):this._queuedChunks.push(a);else{var i=this._rangeReaders.some((function(e){return e._begin===t&&(e._enqueue(a),!0)}));(0,r.assert)(i,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"_onProgress",value:function(e){var t,n,r,a;void 0===e.total?null===(t=this._rangeReaders[0])||void 0===t||null===(n=t.onProgress)||void 0===n||n.call(t,{loaded:e.loaded}):null===(r=this._fullRequestReader)||void 0===r||null===(a=r.onProgress)||void 0===a||a.call(r,{loaded:e.loaded,total:e.total})}},{key:"_onProgressiveDone",value:function(){var e;null===(e=this._fullRequestReader)||void 0===e||e.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,"PDFDataTransportStream.getFullReader can only be called once.");var e=this._queuedChunks;return this._queuedChunks=null,new o(this,e,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var n=new s(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(n),n}},{key:"cancelAllRequests",value:function(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);var n,r=_createForOfIteratorHelper(this._rangeReaders.slice(0));try{for(r.s();!(n=r.n()).done;)n.value.cancel(e)}catch(a){r.e(a)}finally{r.f()}this._pdfDataRangeTransport.abort()}}]),e}();t.PDFDataTransportStream=i;var o=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,e),this._stream=t,this._done=r||!1,this._filename=(0,a.isPdfFile)(i)?i:null,this._queuedChunks=n||[],this._loaded=0;var o,s=_createForOfIteratorHelper(this._queuedChunks);try{for(s.s();!(o=s.n()).done;){var l=o.value;this._loaded+=l.byteLength}}catch(c){s.e(c)}finally{s.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:"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}},{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=new r.PromiseCapability,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;var t,n=_createForOfIteratorHelper(this._requests);try{for(n.s();!(t=n.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(r){n.e(r)}finally{n.f()}this._requests.length=0}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}}]),e}(),s=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){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});var t,n=_createForOfIteratorHelper(this._requests);try{for(n.s();!(t=n.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(r){n.e(r)}finally{n.f()}this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function(){return!1}},{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=new r.PromiseCapability,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;var t,n=_createForOfIteratorHelper(this._requests);try{for(n.s();!(t=n.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(r){n.e(r)}finally{n.f()}this._requests.length=0,this._stream._removeRangeReader(this)}}]),e}()},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;var n=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"textContent",value:function(t){var n=[],r={items:n,styles:Object.create(null)};return function t(r){var a;if(r){var i=null,o=r.name;if("#text"===o)i=r.value;else{if(!e.shouldBuildText(o))return;null!==r&&void 0!==r&&null!==(a=r.attributes)&&void 0!==a&&a.textContent?i=r.attributes.textContent:r.value&&(i=r.value)}if(null!==i&&n.push({str:i}),r.children){var s,l=_createForOfIteratorHelper(r.children);try{for(l.s();!(s=l.n()).done;)t(s.value)}catch(c){l.e(c)}finally{l.f()}}}}(t),r}},{key:"shouldBuildText",value:function(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}]),e}();t.XfaText=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeFilterFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var r=n(7),a=function(e){return new Promise((function(t,n){__webpack_require__(172).readFile(e,(function(e,r){!e&&r?t(new Uint8Array(r)):n(new Error(e))}))}))},i=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n)}(r.BaseFilterFactory);t.NodeFilterFactory=i;var o=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"_createCanvas",value:function(e,t){return __webpack_require__(3414).createCanvas(e,t)}}]),n}(r.BaseCanvasFactory);t.NodeCanvasFactory=o;var s=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"_fetchData",value:function(e,t){return a(e).then((function(e){return{cMapData:e,compressionType:t}}))}}]),n}(r.BaseCMapReaderFactory);t.NodeCMapReaderFactory=s;var l=function(e){_inherits(n,e);var t=_createSuper(n);function n(){return _classCallCheck(this,n),t.apply(this,arguments)}return _createClass(n,[{key:"_fetchData",value:function(e){return a(e)}}]),n}(r.BaseStandardFontDataFactory);t.NodeStandardFontDataFactory=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var r=n(1),a=n(22),i=__webpack_require__(172),o=__webpack_require__(2001),s=__webpack_require__(3779),l=__webpack_require__(6558),c=/^file:\/\/\/[a-zA-Z]:\//,u=function(){function e(t){_classCallCheck(this,e),this.source=t,this.url=function(e){var t=l.parse(e);return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?l.parse("file:///".concat(e)):(t.host||(t.protocol="file:"),t)}(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:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,r.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new m(this):new p(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var n=this.isFsUrl?new g(this,e,t):new v(this,e,t);return this._rangeRequestReaders.push(n),n}},{key:"cancelAllRequests",value:function(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);var n,r=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(r.s();!(n=r.n()).done;)n.value.cancel(e)}catch(a){r.e(a)}finally{r.f()}}}]),e}();t.PDFNodeStream=u;var d=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=new r.PromiseCapability,this._headersCapability=new r.PromiseCapability}return _createClass(e,[{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}},{key:"read",value:function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,n,a;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!==(n=this._readableStream.read())){e.next=10;break}return this._readCapability=new r.PromiseCapability,e.abrupt("return",this.read());case 10:return this._loaded+=n.length,null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded,total:this._contentLength}),a=new Uint8Array(n).buffer,e.abrupt("return",{value:a,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)}}]),e}(),h=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=new r.PromiseCapability;var n=t.source;this._isStreamingSupported=!n.disableStream}return _createClass(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,n,a;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!==(n=this._readableStream.read())){e.next=10;break}return this._readCapability=new r.PromiseCapability,e.abrupt("return",this.read());case 10:return this._loaded+=n.length,null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded}),a=new Uint8Array(n).buffer,e.abrupt("return",{value:a,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)}}]),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 l=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}),l=s.allowRangeRequests,c=s.suggestedLength;i._isRangeSupported=l,i._contentLength=c||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),l):i._request=s.request(f(i._url,e.httpHeaders),l),i._request.on("error",(function(e){i._storedError=e,i._headersCapability.reject(e)})),i._request.end(),i}return _createClass(n)}(d),v=function(e){_inherits(n,e);var t=_createSuper(n);function n(e,a,i){var l;for(var c in _classCallCheck(this,n),(l=t.call(this,e))._httpHeaders={},e.httpHeaders){var u=e.httpHeaders[c];void 0!==u&&(l._httpHeaders[c]=u)}l._httpHeaders.Range="bytes=".concat(a,"-").concat(i-1);var d=function(e){if(404!==e.statusCode)l._setReadableStream(e);else{var t=new r.MissingPDFException('Missing PDF "'.concat(l._url,'".'));l._storedError=t}};return l._request=null,"http:"===l._url.protocol?l._request=o.request(f(l._url,l._httpHeaders),d):l._request=s.request(f(l._url,l._httpHeaders),d),l._request.on("error",(function(e){l._storedError=e})),l._request.end(),l}return _createClass(n)}(h),m=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 c.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 _createClass(n)}(d),g=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 c.test(o._url.href)&&(s=s.replace(/^\//,"")),o._setReadableStream(i.createReadStream(s,{start:r,end:a-1})),o}return _createClass(n)}(h)},function(e,t,n){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 (".concat(e,') while retrieving PDF "').concat(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((0,i.isPdfFile)(n))return n}return null},t.validateRangeRequestCapabilities=function(e){var t=e.getResponseHeader,n=e.isHttp,r=e.rangeChunkSize,a=e.disableRange,i={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(t("Content-Length"),10);return Number.isInteger(o)?(i.suggestedLength=o,o<=2*r||a||!n||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(i.allowRangeRequests=!0),i):i},t.validateResponseStatus=function(e){return 200===e||206===e};var r=n(1),a=n(23),i=n(6)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){var t=!0,n=o("filename\\*","i").exec(e);if(n){var a=c(n=n[1]);return l(a=d(a=u(a=unescape(a))))}if(n=function(e){for(var t,n=[],r=o("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(t=r.exec(e));){var a=_slicedToArray(t,4),i=a[1],s=a[2],l=a[3];if((i=parseInt(i,10))in n){if(0===i)break}else n[i]=[s,l]}for(var d=[],h=0;h1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,e),this.url=t,this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&n.httpHeaders||Object.create(null),this.withCredentials=n.withCredentials||!1,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=new XMLHttpRequest,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];void 0!==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,r=this.pendingRequests[e];r&&(null===(n=r.onProgress)||void 0===n||n.call(r,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){var i;null===(i=n.onError)||void 0===i||i.call(n,a.status)}else{var o=a.status||200;if(200===o&&206===n.expectedStatus||o===n.expectedStatus){var s=function(e){var t=e.response;return"string"!==typeof t?t:(0,r.stringToBytes)(t).buffer}(a);if(206===o){var l=a.getResponseHeader("Content-Range"),c=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);n.onDone({begin:parseInt(c[1],10),chunk:s})}else if(s)n.onDone({begin:0,chunk:s});else{var u;null===(u=n.onError)||void 0===u||u.call(n,a.status)}}else{var d;null===(d=n.onError)||void 0===d||d.call(n,a.status)}}}}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{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,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new s(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var n=new l(this._manager,e,t);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}},{key:"cancelAllRequests",value:function(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);var n,r=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(r.s();!(n=r.n()).done;)n.value.cancel(e)}catch(a){r.e(a)}finally{r.f()}}}]),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=new r.PromiseCapability,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){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){var t,n=_createForOfIteratorHelper(this._requests);try{for(n.s();!(t=n.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(r){n.e(r)}finally{n.f()}this._requests.length=0}}},{key:"_onError",value:function(e){this._storedError=(0,a.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError);var t,n=_createForOfIteratorHelper(this._requests);try{for(n.s();!(t=n.n()).done;)t.value.reject(this._storedError)}catch(r){n.e(r)}finally{n.f()}this._requests.length=0,this._cachedChunks.length=0}},{key:"_onProgress",value:function(e){var t;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}},{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}},{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=new r.PromiseCapability,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);var t,n=_createForOfIteratorHelper(this._requests);try{for(n.s();!(t=n.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(r){n.e(r)}finally{n.f()}this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}]),e}(),l=function(){function e(t,n,r){_classCallCheck(this,e),this._manager=t;var a={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._requestId=t.requestRange(n,r,a),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}return _createClass(e,[{key:"_close",value:function(){var e;null===(e=this.onClosed)||void 0===e||e.call(this,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;var n,r=_createForOfIteratorHelper(this._requests);try{for(r.s();!(n=r.n()).done;)n.value.resolve({value:void 0,done:!0})}catch(a){r.e(a)}finally{r.f()}this._requests.length=0,this._close()}},{key:"_onError",value:function(e){this._storedError=(0,a.createResponseStatusError)(e,this._url);var t,n=_createForOfIteratorHelper(this._requests);try{for(n.s();!(t=n.n()).done;)t.value.reject(this._storedError)}catch(r){n.e(r)}finally{n.f()}this._requests.length=0,this._queuedChunk=null}},{key:"_onProgress",value:function(e){var t;this.isStreamingSupported||null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded})}},{key:"isStreamingSupported",get:function(){return!1}},{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(null===this._queuedChunk){e.next=6;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 6:if(!this._done){e.next=8;break}return e.abrupt("return",{value:void 0,done:!0});case 8:return n=new r.PromiseCapability,this._requests.push(n),e.abrupt("return",n.promise);case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0;var t,n=_createForOfIteratorHelper(this._requests);try{for(n.s();!(t=n.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(r){n.e(r)}finally{n.f()}this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var r=n(1),a=n(22);function i(e,t,n){return{method:"GET",headers:e,signal: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];void 0!==r&&t.append(n,r)}return t}function s(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:((0,r.warn)("getArrayBuffer - unexpected data format: ".concat(e)),new Uint8Array(e).buffer)}var l=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:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,r.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new c(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var n=new u(this,e,t);return this._rangeRequestReaders.push(n),n}},{key:"cancelAllRequests",value:function(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);var n,r=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(r.s();!(n=r.n()).done;)n.value.cancel(e)}catch(a){r.e(a)}finally{r.f()}}}]),e}();t.PDFFetchStream=l;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=new r.PromiseCapability,this._disableRange=s.disableRange||!1,this._rangeChunkSize=s.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!s.disableStream,this._isRangeSupported=!s.disableRange,this._headers=o(this._stream.httpHeaders);var l=s.url;fetch(l,i(this._headers,this._withCredentials,this._abortController)).then((function(e){if(!(0,a.validateResponseStatus)(e.status))throw(0,a.createResponseStatusError)(e.status,l);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:"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}},{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(n=e.sent,r=n.value,!(a=n.done)){e.next=9;break}return e.abrupt("return",{value:r,done:a});case 9:return this._loaded+=r.byteLength,null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded,total:this._contentLength}),e.abrupt("return",{value:s(r),done:!1});case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){var t;null===(t=this._reader)||void 0===t||t.cancel(e),this._abortController.abort()}}]),e}(),u=function(){function e(t,n,s){var l=this;_classCallCheck(this,e),this._stream=t,this._reader=null,this._loaded=0;var c=t.source;this._withCredentials=c.withCredentials||!1,this._readCapability=new r.PromiseCapability,this._isStreamingSupported=!c.disableStream,this._abortController=new AbortController,this._headers=o(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(n,"-").concat(s-1));var u=c.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);l._readCapability.resolve(),l._reader=e.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}return _createClass(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{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(n=e.sent,r=n.value,!(a=n.done)){e.next=9;break}return e.abrupt("return",{value:r,done:a});case 9:return this._loaded+=r.byteLength,null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded}),e.abrupt("return",{value:s(r),done:!1});case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){var t;null===(t=this._reader)||void 0===t||t.cancel(e),this._abortController.abort()}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=function(e){e.textContentSource||!e.textContent&&!e.textContentStream||((0,a.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),e.textContentSource=e.textContent||e.textContentStream);var t=e.container,n=e.viewport,r=getComputedStyle(t),i=r.getPropertyValue("visibility"),o=parseFloat(r.getPropertyValue("--scale-factor"));"visible"===i&&(!o||Math.abs(o-n.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");var s=new d(e);return s._render(),s},t.updateTextLayer=function(e){var t=e.container,n=e.viewport,r=e.textDivs,i=e.textDivProperties,o=e.isOffscreenCanvasSupported,s=e.mustRotate,c=void 0===s||s,d=e.mustRescale,h=void 0===d||d;if(c&&(0,a.setLayerDimensions)(t,{rotation:n.rotation}),h){var f,p=l(0,o),v={prevFontSize:null,prevFontFamily:null,div:null,scale:n.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:p},m=_createForOfIteratorHelper(r);try{for(m.s();!(f=m.n()).done;){var g=f.value;v.properties=i.get(g),v.div=g,u(v)}}catch(y){m.e(y)}finally{m.f()}}};var r=n(1),a=n(6),i=30,o=.8,s=new Map;function l(e,t){var n;if(t&&r.FeatureTest.isOffscreenCanvasSupported)n=new OffscreenCanvas(e,e).getContext("2d",{alpha:!1});else{var a=document.createElement("canvas");a.width=a.height=e,n=a.getContext("2d",{alpha:!1})}return n}function c(e,t,n){var a=document.createElement("span"),c={angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0};e._textDivs.push(a);var u=r.Util.transform(e._transform,t.transform),d=Math.atan2(u[1],u[0]),h=n[t.fontName];h.vertical&&(d+=Math.PI/2);var f,p,v=Math.hypot(u[2],u[3]),m=v*function(e,t){var n=s.get(e);if(n)return n;var r=l(i,t);r.font="".concat(i,"px ").concat(e);var a=r.measureText(""),c=a.fontBoundingBoxAscent,u=Math.abs(a.fontBoundingBoxDescent);if(c){var d=c/(c+u);return s.set(e,d),r.canvas.width=r.canvas.height=0,d}r.strokeStyle="red",r.clearRect(0,0,i,i),r.strokeText("g",0,0);var h=r.getImageData(0,0,i,i).data;u=0;for(var f=h.length-1-3;f>=0;f-=4)if(h[f]>0){u=Math.ceil(f/4/i);break}r.clearRect(0,0,i,i),r.strokeText("A",0,i),c=0;for(var p=0,v=(h=r.getImageData(0,0,i,i).data).length;p0){c=i-Math.floor(p/4/i);break}if(r.canvas.width=r.canvas.height=0,c){var m=c/(c+u);return s.set(e,m),m}return s.set(e,o),o}(h.fontFamily,e._isOffscreenCanvasSupported);0===d?(f=u[4],p=u[5]-m):(f=u[4]+m*Math.sin(d),p=u[5]-m*Math.cos(d));var g="calc(var(--scale-factor)*",y=a.style;e._container===e._rootContainer?(y.left="".concat((100*f/e._pageWidth).toFixed(2),"%"),y.top="".concat((100*p/e._pageHeight).toFixed(2),"%")):(y.left="".concat(g).concat(f.toFixed(2),"px)"),y.top="".concat(g).concat(p.toFixed(2),"px)")),y.fontSize="".concat(g).concat(v.toFixed(2),"px)"),y.fontFamily=h.fontFamily,c.fontSize=v,a.setAttribute("role","presentation"),a.textContent=t.str,a.dir=t.dir,e._fontInspectorEnabled&&(a.dataset.fontName=t.fontName),0!==d&&(c.angle=d*(180/Math.PI));var _=!1;if(t.str.length>1)_=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){var b=Math.abs(t.transform[0]),k=Math.abs(t.transform[3]);b!==k&&Math.max(b,k)/Math.min(b,k)>1.5&&(_=!0)}_&&(c.canvasWidth=h.vertical?t.height:t.width),e._textDivProperties.set(a,c),e._isReadableStream&&e._layoutText(a)}function u(e){var t=e.div,n=e.scale,r=e.properties,a=e.ctx,i=e.prevFontSize,o=e.prevFontFamily,s=t.style,l="";if(0!==r.canvasWidth&&r.hasText){var c=s.fontFamily,u=r.canvasWidth,d=r.fontSize;i===d&&o===c||(a.font="".concat(d*n,"px ").concat(c),e.prevFontSize=d,e.prevFontFamily=c);var h=a.measureText(t.textContent).width;h>0&&(l="scaleX(".concat(u*n/h,")"))}0!==r.angle&&(l="rotate(".concat(r.angle,"deg) ").concat(l)),l.length>0&&(s.transform=l)}var d=function(){function e(t){var n,i=this,o=t.textContentSource,s=t.container,c=t.viewport,u=t.textDivs,d=t.textDivProperties,h=t.textContentItemsStr,f=t.isOffscreenCanvasSupported;_classCallCheck(this,e),this._textContentSource=o,this._isReadableStream=o instanceof ReadableStream,this._container=this._rootContainer=s,this._textDivs=u||[],this._textContentItemsStr=h||[],this._isOffscreenCanvasSupported=f,this._fontInspectorEnabled=!(null===(n=globalThis.FontInspector)||void 0===n||!n.enabled),this._reader=null,this._textDivProperties=d||new WeakMap,this._canceled=!1,this._capability=new r.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:c.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:l(0,f)};var p=c.rawDims,v=p.pageWidth,m=p.pageHeight,g=p.pageX,y=p.pageY;this._transform=[1,0,0,-1,-g,y+m],this._pageWidth=v,this._pageHeight=m,(0,a.setLayerDimensions)(s,c),this._capability.promise.finally((function(){i._layoutTextParams=null})).catch((function(){}))}return _createClass(e,[{key:"promise",get:function(){return this._capability.promise}},{key:"cancel",value:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new r.AbortException("TextLayer task cancelled.")).catch((function(){})),this._reader=null),this._capability.reject(new r.AbortException("TextLayer task cancelled."))}},{key:"_processItems",value:function(e,t){var n,r=_createForOfIteratorHelper(e);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(void 0!==a.str)this._textContentItemsStr.push(a.str),c(this,a,t);else if("beginMarkedContentProps"===a.type||"beginMarkedContent"===a.type){var i=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==a.id&&this._container.setAttribute("id","".concat(a.id)),i.append(this._container)}else"endMarkedContent"===a.type&&(this._container=this._container.parentNode)}}catch(o){r.e(o)}finally{r.f()}}},{key:"_layoutText",value:function(e){var t=this._layoutTextParams.properties=this._textDivProperties.get(e);if(this._layoutTextParams.div=e,u(this._layoutTextParams),t.hasText&&this._container.append(e),t.hasEOL){var n=document.createElement("br");n.setAttribute("role","presentation"),this._container.append(n)}}},{key:"_render",value:function(){var e=this,t=new r.PromiseCapability,n=Object.create(null);if(this._isReadableStream)this._reader=this._textContentSource.getReader(),function r(){e._reader.read().then((function(a){var i=a.value;a.done?t.resolve():(Object.assign(n,i.styles),e._processItems(i.items,n),r())}),t.reject)}();else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');var a=this._textContentSource,i=a.items,o=a.styles;this._processItems(i,o),t.resolve()}t.promise.then((function(){n=null,function(e){if(!e._canceled){var t=e._textDivs,n=e._capability;if(t.length>1e5)n.resolve();else{if(!e._isReadableStream){var r,a=_createForOfIteratorHelper(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;e._layoutText(i)}}catch(o){a.e(o)}finally{a.f()}}n.resolve()}}}(e)}),this._capability.reject)}}]),e}();t.TextLayerRenderTask=d},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayer=void 0;var r=n(1),a=n(5),i=n(28),o=n(29),s=n(6),l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,v=new WeakMap,m=new WeakSet,g=new WeakSet,y=new WeakSet,_=new WeakSet,b=function(){function e(t){_classCallCheck(this,e),_classPrivateMethodInitSpec(this,_),_classPrivateMethodInitSpec(this,y),_classPrivateMethodInitSpec(this,g),_classPrivateMethodInitSpec(this,m),_classPrivateFieldInitSpec(this,l,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(this,c,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,u,{writable:!0,value:this.pointerup.bind(this)}),_classPrivateFieldInitSpec(this,d,{writable:!0,value:this.pointerdown.bind(this)}),_classPrivateFieldInitSpec(this,h,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,f,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,p,{writable:!0,value:!1}),_classPrivateFieldInitSpec(this,v,{writable:!0,value:void 0}),e._initialized||(e._initialized=!0,i.FreeTextEditor.initialize(t.l10n),o.InkEditor.initialize(t.l10n)),t.uiManager.registerEditorTypes([i.FreeTextEditor,o.InkEditor]),_classPrivateFieldSet(this,v,t.uiManager),this.pageIndex=t.pageIndex,this.div=t.div,_classPrivateFieldSet(this,l,t.accessibilityManager),_classPrivateFieldGet(this,v).addLayer(this)}return _createClass(e,[{key:"isEmpty",get:function(){return 0===_classPrivateFieldGet(this,h).size}},{key:"updateToolbar",value:function(e){_classPrivateFieldGet(this,v).updateToolbar(e)}},{key:"updateMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_classPrivateFieldGet(this,v).getMode();_classPrivateMethodGet(this,_,P).call(this),e===r.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),_classPrivateFieldGet(this,v).unselectAll(),e!==r.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",e===r.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",e===r.AnnotationEditorType.INK),this.div.hidden=!1)}},{key:"addInkEditorIfNeeded",value:function(e){if(e||_classPrivateFieldGet(this,v).getMode()===r.AnnotationEditorType.INK){if(!e){var t,n=_createForOfIteratorHelper(_classPrivateFieldGet(this,h).values());try{for(n.s();!(t=n.n()).done;){var a=t.value;if(a.isEmpty())return void a.setInBackground()}}catch(i){n.e(i)}finally{n.f()}}_classPrivateMethodGet(this,y,w).call(this,{offsetX:0,offsetY:0}).setInBackground()}}},{key:"setEditingState",value:function(e){_classPrivateFieldGet(this,v).setEditingState(e)}},{key:"addCommands",value:function(e){_classPrivateFieldGet(this,v).addCommands(e)}},{key:"enable",value:function(){this.div.style.pointerEvents="auto";var e,t=_createForOfIteratorHelper(_classPrivateFieldGet(this,h).values());try{for(t.s();!(e=t.n()).done;)e.value.enableEditing()}catch(n){t.e(n)}finally{t.f()}}},{key:"disable",value:function(){this.div.style.pointerEvents="none";var e,t=_createForOfIteratorHelper(_classPrivateFieldGet(this,h).values());try{for(t.s();!(e=t.n()).done;)e.value.disableEditing()}catch(n){t.e(n)}finally{t.f()}_classPrivateMethodGet(this,_,P).call(this),this.isEmpty&&(this.div.hidden=!0)}},{key:"setActiveEditor",value:function(e){_classPrivateFieldGet(this,v).getActive()!==e&&_classPrivateFieldGet(this,v).setActiveEditor(e)}},{key:"enableClick",value:function(){this.div.addEventListener("pointerdown",_classPrivateFieldGet(this,d)),this.div.addEventListener("pointerup",_classPrivateFieldGet(this,u))}},{key:"disableClick",value:function(){this.div.removeEventListener("pointerdown",_classPrivateFieldGet(this,d)),this.div.removeEventListener("pointerup",_classPrivateFieldGet(this,u))}},{key:"attach",value:function(e){_classPrivateFieldGet(this,h).set(e.id,e)}},{key:"detach",value:function(e){var t;_classPrivateFieldGet(this,h).delete(e.id),null===(t=_classPrivateFieldGet(this,l))||void 0===t||t.removePointerInTextLayer(e.contentDiv)}},{key:"remove",value:function(e){var t=this;_classPrivateFieldGet(this,v).removeEditor(e),this.detach(e),e.div.style.display="none",setTimeout((function(){e.div.style.display="",e.div.remove(),e.isAttachedToDOM=!1,document.activeElement===document.body&&_classPrivateFieldGet(t,v).focusMainContainer()}),0),_classPrivateFieldGet(this,p)||this.addInkEditorIfNeeded(!1)}},{key:"add",value:function(e){if(_classPrivateMethodGet(this,m,k).call(this,e),_classPrivateFieldGet(this,v).addEditor(e),this.attach(e),!e.isAttachedToDOM){var t=e.render();this.div.append(t),e.isAttachedToDOM=!0}this.moveEditorInDOM(e),e.onceAdded(),_classPrivateFieldGet(this,v).addToAnnotationStorage(e)}},{key:"moveEditorInDOM",value:function(e){var t;null===(t=_classPrivateFieldGet(this,l))||void 0===t||t.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}},{key:"addOrRebuild",value:function(e){e.needsToBeRebuilt()?e.rebuild():this.add(e)}},{key:"addANewEditor",value:function(e){var t=this;this.addCommands({cmd:function(){t.addOrRebuild(e)},undo:function(){e.remove()},mustExec:!0})}},{key:"addUndoableEditor",value:function(e){var t=this;this.addCommands({cmd:function(){t.addOrRebuild(e)},undo:function(){e.remove()},mustExec:!1})}},{key:"getNextId",value:function(){return _classPrivateFieldGet(this,v).getId()}},{key:"deserialize",value:function(e){switch(e.annotationType){case r.AnnotationEditorType.FREETEXT:return i.FreeTextEditor.deserialize(e,this,_classPrivateFieldGet(this,v));case r.AnnotationEditorType.INK:return o.InkEditor.deserialize(e,this,_classPrivateFieldGet(this,v))}return null}},{key:"setSelected",value:function(e){_classPrivateFieldGet(this,v).setSelected(e)}},{key:"toggleSelected",value:function(e){_classPrivateFieldGet(this,v).toggleSelected(e)}},{key:"isSelected",value:function(e){return _classPrivateFieldGet(this,v).isSelected(e)}},{key:"unselect",value:function(e){_classPrivateFieldGet(this,v).unselect(e)}},{key:"pointerup",value:function(e){var t=r.FeatureTest.platform.isMac;0!==e.button||e.ctrlKey&&t||e.target===this.div&&_classPrivateFieldGet(this,f)&&(_classPrivateFieldSet(this,f,!1),_classPrivateFieldGet(this,c)?_classPrivateMethodGet(this,y,w).call(this,e):_classPrivateFieldSet(this,c,!0))}},{key:"pointerdown",value:function(e){var t=r.FeatureTest.platform.isMac;if(!(0!==e.button||e.ctrlKey&&t)&&e.target===this.div){_classPrivateFieldSet(this,f,!0);var n=_classPrivateFieldGet(this,v).getActive();_classPrivateFieldSet(this,c,!n||n.isEmpty())}}},{key:"drop",value:function(e){var t=e.dataTransfer.getData("text/plain"),n=_classPrivateFieldGet(this,v).getEditor(t);if(n){e.preventDefault(),e.dataTransfer.dropEffect="move",_classPrivateMethodGet(this,m,k).call(this,n);var r=this.div.getBoundingClientRect(),a=e.clientX-r.x,i=e.clientY-r.y;n.translate(a-n.startX,i-n.startY),this.moveEditorInDOM(n),n.div.focus()}}},{key:"dragover",value:function(e){e.preventDefault()}},{key:"destroy",value:function(){var e;(null===(e=_classPrivateFieldGet(this,v).getActive())||void 0===e?void 0:e.parent)===this&&_classPrivateFieldGet(this,v).setActiveEditor(null);var t,n=_createForOfIteratorHelper(_classPrivateFieldGet(this,h).values());try{for(n.s();!(t=n.n()).done;){var r,a=t.value;null===(r=_classPrivateFieldGet(this,l))||void 0===r||r.removePointerInTextLayer(a.contentDiv),a.setParent(null),a.isAttachedToDOM=!1,a.div.remove()}}catch(i){n.e(i)}finally{n.f()}this.div=null,_classPrivateFieldGet(this,h).clear(),_classPrivateFieldGet(this,v).removeLayer(this)}},{key:"render",value:function(e){var t=e.viewport;this.viewport=t,(0,s.setLayerDimensions)(this.div,t),(0,a.bindEvents)(this,this.div,["dragover","drop"]);var n,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,v).getEditors(this.pageIndex));try{for(r.s();!(n=r.n()).done;){var i=n.value;this.add(i)}}catch(o){r.e(o)}finally{r.f()}this.updateMode()}},{key:"update",value:function(e){var t=e.viewport;_classPrivateFieldGet(this,v).commitOrRemove(),this.viewport=t,(0,s.setLayerDimensions)(this.div,{rotation:t.rotation}),this.updateMode()}},{key:"pageDimensions",get:function(){var e=this.viewport.rawDims;return[e.pageWidth,e.pageHeight]}}]),e}();function k(e){var t;e.parent!==this&&(this.attach(e),null===(t=e.parent)||void 0===t||t.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}function S(e){switch(_classPrivateFieldGet(this,v).getMode()){case r.AnnotationEditorType.FREETEXT:return new i.FreeTextEditor(e);case r.AnnotationEditorType.INK:return new o.InkEditor(e)}return null}function w(e){var t=this.getNextId(),n=_classPrivateMethodGet(this,g,S).call(this,{parent:this,id:t,x:e.offsetX,y:e.offsetY,uiManager:_classPrivateFieldGet(this,v)});return n&&this.add(n),n}function P(){_classPrivateFieldSet(this,p,!0);var e,t=_createForOfIteratorHelper(_classPrivateFieldGet(this,h).values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n.isEmpty()&&n.remove()}}catch(r){t.e(r)}finally{t.f()}_classPrivateFieldSet(this,p,!1)}_defineProperty(b,"_initialized",!1),t.AnnotationEditorLayer=b},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FreeTextEditor=void 0;var r=n(1),a=n(5),i=n(4),o=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,v=new WeakSet,m=new WeakSet,g=new WeakSet,y=new WeakSet,_=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r;return _classCallCheck(this,n),r=t.call(this,_objectSpread(_objectSpread({},e),{},{name:"freeTextEditor"})),_classPrivateMethodInitSpec(_assertThisInitialized(r),y),_classPrivateMethodInitSpec(_assertThisInitialized(r),g),_classPrivateMethodInitSpec(_assertThisInitialized(r),m),_classPrivateMethodInitSpec(_assertThisInitialized(r),v),_classPrivateFieldInitSpec(_assertThisInitialized(r),o,{writable:!0,value:r.editorDivBlur.bind(_assertThisInitialized(r))}),_classPrivateFieldInitSpec(_assertThisInitialized(r),s,{writable:!0,value:r.editorDivFocus.bind(_assertThisInitialized(r))}),_classPrivateFieldInitSpec(_assertThisInitialized(r),l,{writable:!0,value:r.editorDivInput.bind(_assertThisInitialized(r))}),_classPrivateFieldInitSpec(_assertThisInitialized(r),c,{writable:!0,value:r.editorDivKeydown.bind(_assertThisInitialized(r))}),_classPrivateFieldInitSpec(_assertThisInitialized(r),u,{writable:!0,value:void 0}),_classPrivateFieldInitSpec(_assertThisInitialized(r),d,{writable:!0,value:""}),_classPrivateFieldInitSpec(_assertThisInitialized(r),h,{writable:!0,value:"".concat(r.id,"-editor")}),_classPrivateFieldInitSpec(_assertThisInitialized(r),f,{writable:!0,value:!1}),_classPrivateFieldInitSpec(_assertThisInitialized(r),p,{writable:!0,value:void 0}),_classPrivateFieldSet(_assertThisInitialized(r),u,e.color||n._defaultColor||i.AnnotationEditor._defaultLineColor),_classPrivateFieldSet(_assertThisInitialized(r),p,e.fontSize||n._defaultFontSize),r}return _createClass(n,[{key:"updateParams",value:function(e,t){switch(e){case r.AnnotationEditorParamsType.FREETEXT_SIZE:_classPrivateMethodGet(this,v,b).call(this,t);break;case r.AnnotationEditorParamsType.FREETEXT_COLOR:_classPrivateMethodGet(this,m,k).call(this,t)}}},{key:"propertiesToUpdate",get:function(){return[[r.AnnotationEditorParamsType.FREETEXT_SIZE,_classPrivateFieldGet(this,p)],[r.AnnotationEditorParamsType.FREETEXT_COLOR,_classPrivateFieldGet(this,u)]]}},{key:"getInitialTranslation",value:function(){var e=this.parentScale;return[-n._internalPadding*e,-(n._internalPadding+_classPrivateFieldGet(this,p))*e]}},{key:"rebuild",value:function(){_get(_getPrototypeOf(n.prototype),"rebuild",this).call(this),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this))}},{key:"enableEditMode",value:function(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(r.AnnotationEditorType.FREETEXT),_get(_getPrototypeOf(n.prototype),"enableEditMode",this).call(this),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this.div.draggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",_classPrivateFieldGet(this,c)),this.editorDiv.addEventListener("focus",_classPrivateFieldGet(this,s)),this.editorDiv.addEventListener("blur",_classPrivateFieldGet(this,o)),this.editorDiv.addEventListener("input",_classPrivateFieldGet(this,l)))}},{key:"disableEditMode",value:function(){this.isInEditMode()&&(this.parent.setEditingState(!0),_get(_getPrototypeOf(n.prototype),"disableEditMode",this).call(this),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",_classPrivateFieldGet(this,h)),this.div.draggable=!0,this.editorDiv.removeEventListener("keydown",_classPrivateFieldGet(this,c)),this.editorDiv.removeEventListener("focus",_classPrivateFieldGet(this,s)),this.editorDiv.removeEventListener("blur",_classPrivateFieldGet(this,o)),this.editorDiv.removeEventListener("input",_classPrivateFieldGet(this,l)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}},{key:"focusin",value:function(e){_get(_getPrototypeOf(n.prototype),"focusin",this).call(this,e),e.target!==this.editorDiv&&this.editorDiv.focus()}},{key:"onceAdded",value:function(){this.width||(this.enableEditMode(),this.editorDiv.focus())}},{key:"isEmpty",value:function(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}},{key:"remove",value:function(){this.isEditing=!1,this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing"),_get(_getPrototypeOf(n.prototype),"remove",this).call(this)}},{key:"commit",value:function(){this.isInEditMode()&&(_get(_getPrototypeOf(n.prototype),"commit",this).call(this),_classPrivateFieldGet(this,f)||(_classPrivateFieldSet(this,f,!0),this.parent.addUndoableEditor(this)),this.disableEditMode(),_classPrivateFieldSet(this,d,_classPrivateMethodGet(this,g,S).call(this).trimEnd()),_classPrivateMethodGet(this,y,w).call(this))}},{key:"shouldGetKeyboardEvents",value:function(){return this.isInEditMode()}},{key:"dblclick",value:function(e){this.enableEditMode(),this.editorDiv.focus()}},{key:"keydown",value:function(e){e.target===this.div&&"Enter"===e.key&&(this.enableEditMode(),this.editorDiv.focus())}},{key:"editorDivKeydown",value:function(e){n._keyboardManager.exec(this,e)}},{key:"editorDivFocus",value:function(e){this.isEditing=!0}},{key:"editorDivBlur",value:function(e){this.isEditing=!1}},{key:"editorDivInput",value:function(e){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}},{key:"disableEditing",value:function(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}},{key:"enableEditing",value:function(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}},{key:"render",value:function(){var e,t,r=this;if(this.div)return this.div;this.width&&(e=this.x,t=this.y),_get(_getPrototypeOf(n.prototype),"render",this).call(this),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",_classPrivateFieldGet(this,h)),this.enableEditing(),n._l10nPromise.get("editor_free_text2_aria_label").then((function(e){var t;return null===(t=r.editorDiv)||void 0===t?void 0:t.setAttribute("aria-label",e)})),n._l10nPromise.get("free_text2_default_content").then((function(e){var t;return null===(t=r.editorDiv)||void 0===t?void 0:t.setAttribute("default-content",e)})),this.editorDiv.contentEditable=!0;var i=this.editorDiv.style;if(i.fontSize="calc(".concat(_classPrivateFieldGet(this,p),"px * var(--scale-factor))"),i.color=_classPrivateFieldGet(this,u),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,a.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){var o=_slicedToArray(this.parentDimensions,2),s=o[0],l=o[1];this.setAt(e*s,t*l,this.width*s,this.height*l);var c,f=_createForOfIteratorHelper(_classPrivateFieldGet(this,d).split("\n"));try{for(f.s();!(c=f.n()).done;){var v=c.value,m=document.createElement("div");m.append(v?document.createTextNode(v):document.createElement("br")),this.editorDiv.append(m)}}catch(g){f.e(g)}finally{f.f()}this.div.draggable=!0,this.editorDiv.contentEditable=!1}else this.div.draggable=!1,this.editorDiv.contentEditable=!0;return this.div}},{key:"contentDiv",get:function(){return this.editorDiv}},{key:"serialize",value:function(){if(this.isEmpty())return null;var e=n._internalPadding*this.parentScale,t=this.getRect(e,e),a=i.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:_classPrivateFieldGet(this,u));return{annotationType:r.AnnotationEditorType.FREETEXT,color:a,fontSize:_classPrivateFieldGet(this,p),value:_classPrivateFieldGet(this,d),pageIndex:this.pageIndex,rect:t,rotation:this.rotation}}}],[{key:"initialize",value:function(e){this._l10nPromise=new Map(["free_text2_default_content","editor_free_text2_aria_label"].map((function(t){return[t,e.get(t)]})));var t=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(t.getPropertyValue("--freetext-padding"))}},{key:"updateDefaultParams",value:function(e,t){switch(e){case r.AnnotationEditorParamsType.FREETEXT_SIZE:n._defaultFontSize=t;break;case r.AnnotationEditorParamsType.FREETEXT_COLOR:n._defaultColor=t}}},{key:"defaultPropertiesToUpdate",get:function(){return[[r.AnnotationEditorParamsType.FREETEXT_SIZE,n._defaultFontSize],[r.AnnotationEditorParamsType.FREETEXT_COLOR,n._defaultColor||i.AnnotationEditor._defaultLineColor]]}},{key:"deserialize",value:function(e,t,a){var i,o=_get(_getPrototypeOf(n),"deserialize",this).call(this,e,t,a);return _classPrivateFieldSet(o,p,e.fontSize),_classPrivateFieldSet(o,u,(i=r.Util).makeHexColor.apply(i,_toConsumableArray(e.color))),_classPrivateFieldSet(o,d,e.value),o}}]),n}(i.AnnotationEditor);function b(e){var t=this,n=function(e){t.editorDiv.style.fontSize="calc(".concat(e,"px * var(--scale-factor))"),t.translate(0,-(e-_classPrivateFieldGet(t,p))*t.parentScale),_classPrivateFieldSet(t,p,e),_classPrivateMethodGet(t,y,w).call(t)},a=_classPrivateFieldGet(this,p);this.addCommands({cmd:function(){n(e)},undo:function(){n(a)},mustExec:!0,type:r.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}function k(e){var t=this,n=_classPrivateFieldGet(this,u);this.addCommands({cmd:function(){_classPrivateFieldSet(t,u,t.editorDiv.style.color=e)},undo:function(){_classPrivateFieldSet(t,u,t.editorDiv.style.color=n)},mustExec:!0,type:r.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function S(){var e=this.editorDiv.getElementsByTagName("div");if(0===e.length)return this.editorDiv.innerText;var t,n=[],r=_createForOfIteratorHelper(e);try{for(r.s();!(t=r.n()).done;){var a=t.value;n.push(a.innerText.replace(/\r\n?|\n/,""))}}catch(i){r.e(i)}finally{r.f()}return n.join("\n")}function w(){var e,t=_slicedToArray(this.parentDimensions,2),n=t[0],r=t[1];if(this.isAttachedToDOM)e=this.div.getBoundingClientRect();else{var a=this.currentLayer,i=this.div,o=i.style.display;i.style.display="hidden",a.div.append(this.div),e=i.getBoundingClientRect(),i.remove(),i.style.display=o}this.width=e.width/n,this.height=e.height/r}_defineProperty(_,"_freeTextDefaultContent",""),_defineProperty(_,"_l10nPromise",void 0),_defineProperty(_,"_internalPadding",0),_defineProperty(_,"_defaultColor",null),_defineProperty(_,"_defaultFontSize",10),_defineProperty(_,"_keyboardManager",new a.KeyboardManager([[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],_.prototype.commitOrRemove]])),_defineProperty(_,"_type","freetext"),t.FreeTextEditor=_},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0,Object.defineProperty(t,"fitCurve",{enumerable:!0,get:function(){return i.fitCurve}});var r=n(1),a=n(4),i=n(30),o=n(5),s=16,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,v=new WeakMap,m=new WeakMap,g=new WeakMap,y=new WeakMap,_=new WeakMap,b=new WeakMap,k=new WeakMap,S=new WeakSet,w=new WeakSet,P=new WeakSet,x=new WeakSet,A=new WeakSet,C=new WeakSet,F=new WeakSet,E=new WeakSet,T=new WeakSet,M=new WeakSet,R=new WeakSet,I=new WeakSet,O=new WeakSet,D=new WeakSet,L=new WeakSet,N=new WeakSet,j=new WeakSet,G=new WeakSet,z=new WeakSet,B=new WeakSet,U=new WeakSet,W=new WeakSet,H=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r;return _classCallCheck(this,n),r=t.call(this,_objectSpread(_objectSpread({},e),{},{name:"inkEditor"})),_classPrivateMethodInitSpec(_assertThisInitialized(r),W),_classPrivateMethodInitSpec(_assertThisInitialized(r),U),_classPrivateMethodInitSpec(_assertThisInitialized(r),B),_classPrivateMethodInitSpec(_assertThisInitialized(r),z),_classPrivateMethodInitSpec(_assertThisInitialized(r),G),_classPrivateMethodInitSpec(_assertThisInitialized(r),j),_classPrivateMethodInitSpec(_assertThisInitialized(r),N),_classPrivateMethodInitSpec(_assertThisInitialized(r),L),_classPrivateMethodInitSpec(_assertThisInitialized(r),D),_classPrivateMethodInitSpec(_assertThisInitialized(r),O),_classPrivateMethodInitSpec(_assertThisInitialized(r),I),_classPrivateMethodInitSpec(_assertThisInitialized(r),R),_classPrivateMethodInitSpec(_assertThisInitialized(r),M),_classPrivateMethodInitSpec(_assertThisInitialized(r),T),_classPrivateMethodInitSpec(_assertThisInitialized(r),E),_classPrivateMethodInitSpec(_assertThisInitialized(r),F),_classPrivateMethodInitSpec(_assertThisInitialized(r),C),_classPrivateMethodInitSpec(_assertThisInitialized(r),A),_classPrivateMethodInitSpec(_assertThisInitialized(r),x),_classPrivateMethodInitSpec(_assertThisInitialized(r),P),_classPrivateMethodInitSpec(_assertThisInitialized(r),w),_classPrivateMethodInitSpec(_assertThisInitialized(r),S),_classPrivateFieldInitSpec(_assertThisInitialized(r),l,{writable:!0,value:0}),_classPrivateFieldInitSpec(_assertThisInitialized(r),c,{writable:!0,value:0}),_classPrivateFieldInitSpec(_assertThisInitialized(r),u,{writable:!0,value:0}),_classPrivateFieldInitSpec(_assertThisInitialized(r),d,{writable:!0,value:r.canvasPointermove.bind(_assertThisInitialized(r))}),_classPrivateFieldInitSpec(_assertThisInitialized(r),h,{writable:!0,value:r.canvasPointerleave.bind(_assertThisInitialized(r))}),_classPrivateFieldInitSpec(_assertThisInitialized(r),f,{writable:!0,value:r.canvasPointerup.bind(_assertThisInitialized(r))}),_classPrivateFieldInitSpec(_assertThisInitialized(r),p,{writable:!0,value:r.canvasPointerdown.bind(_assertThisInitialized(r))}),_classPrivateFieldInitSpec(_assertThisInitialized(r),v,{writable:!0,value:!1}),_classPrivateFieldInitSpec(_assertThisInitialized(r),m,{writable:!0,value:!1}),_classPrivateFieldInitSpec(_assertThisInitialized(r),g,{writable:!0,value:null}),_classPrivateFieldInitSpec(_assertThisInitialized(r),y,{writable:!0,value:null}),_classPrivateFieldInitSpec(_assertThisInitialized(r),_,{writable:!0,value:0}),_classPrivateFieldInitSpec(_assertThisInitialized(r),b,{writable:!0,value:0}),_classPrivateFieldInitSpec(_assertThisInitialized(r),k,{writable:!0,value:null}),r.color=e.color||null,r.thickness=e.thickness||null,r.opacity=e.opacity||null,r.paths=[],r.bezierPath2D=[],r.currentPath=[],r.scaleFactor=1,r.translationX=r.translationY=0,r.x=0,r.y=0,r}return _createClass(n,[{key:"updateParams",value:function(e,t){switch(e){case r.AnnotationEditorParamsType.INK_THICKNESS:_classPrivateMethodGet(this,S,q).call(this,t);break;case r.AnnotationEditorParamsType.INK_COLOR:_classPrivateMethodGet(this,w,V).call(this,t);break;case r.AnnotationEditorParamsType.INK_OPACITY:_classPrivateMethodGet(this,P,X).call(this,t)}}},{key:"propertiesToUpdate",get:function(){var e;return[[r.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||n._defaultThickness],[r.AnnotationEditorParamsType.INK_COLOR,this.color||n._defaultColor||a.AnnotationEditor._defaultLineColor],[r.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(null!==(e=this.opacity)&&void 0!==e?e:n._defaultOpacity))]]}},{key:"rebuild",value:function(){_get(_getPrototypeOf(n.prototype),"rebuild",this).call(this),null!==this.div&&(this.canvas||(_classPrivateMethodGet(this,R,te).call(this),_classPrivateMethodGet(this,I,ne).call(this)),this.isAttachedToDOM||(this.parent.add(this),_classPrivateMethodGet(this,O,re).call(this)),_classPrivateMethodGet(this,U,he).call(this))}},{key:"remove",value:function(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,_classPrivateFieldGet(this,y).disconnect(),_classPrivateFieldSet(this,y,null),_get(_getPrototypeOf(n.prototype),"remove",this).call(this))}},{key:"setParent",value:function(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&null===e&&this._uiManager.addShouldRescale(this),_get(_getPrototypeOf(n.prototype),"setParent",this).call(this,e)}},{key:"onScaleChanging",value:function(){var e=_slicedToArray(this.parentDimensions,2),t=e[0],n=e[1],r=this.width*t,a=this.height*n;this.setDimensions(r,a)}},{key:"enableEditMode",value:function(){_classPrivateFieldGet(this,v)||null===this.canvas||(_get(_getPrototypeOf(n.prototype),"enableEditMode",this).call(this),this.div.draggable=!1,this.canvas.addEventListener("pointerdown",_classPrivateFieldGet(this,p)),this.canvas.addEventListener("pointerup",_classPrivateFieldGet(this,f)))}},{key:"disableEditMode",value:function(){this.isInEditMode()&&null!==this.canvas&&(_get(_getPrototypeOf(n.prototype),"disableEditMode",this).call(this),this.div.draggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",_classPrivateFieldGet(this,p)),this.canvas.removeEventListener("pointerup",_classPrivateFieldGet(this,f)))}},{key:"onceAdded",value:function(){this.div.draggable=!this.isEmpty()}},{key:"isEmpty",value:function(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}},{key:"commit",value:function(){_classPrivateFieldGet(this,v)||(_get(_getPrototypeOf(n.prototype),"commit",this).call(this),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),_classPrivateFieldSet(this,v,!0),this.div.classList.add("disabled"),_classPrivateMethodGet(this,U,he).call(this,!0),this.parent.addInkEditorIfNeeded(!0),this.parent.moveEditorInDOM(this),this.div.focus({preventScroll:!0}))}},{key:"focusin",value:function(e){_get(_getPrototypeOf(n.prototype),"focusin",this).call(this,e),this.enableEditMode()}},{key:"canvasPointerdown",value:function(e){0===e.button&&this.isInEditMode()&&!_classPrivateFieldGet(this,v)&&(this.setInForeground(),"mouse"!==e.type&&this.div.focus(),e.stopPropagation(),this.canvas.addEventListener("pointerleave",_classPrivateFieldGet(this,h)),this.canvas.addEventListener("pointermove",_classPrivateFieldGet(this,d)),_classPrivateMethodGet(this,C,Q).call(this,e.offsetX,e.offsetY))}},{key:"canvasPointermove",value:function(e){e.stopPropagation(),_classPrivateMethodGet(this,F,J).call(this,e.offsetX,e.offsetY)}},{key:"canvasPointerup",value:function(e){0===e.button&&this.isInEditMode()&&0!==this.currentPath.length&&(e.stopPropagation(),_classPrivateMethodGet(this,M,ee).call(this,e),this.setInBackground())}},{key:"canvasPointerleave",value:function(e){_classPrivateMethodGet(this,M,ee).call(this,e),this.setInBackground()}},{key:"render",value:function(){var e,t,r=this;if(this.div)return this.div;this.width&&(e=this.x,t=this.y),_get(_getPrototypeOf(n.prototype),"render",this).call(this),n._l10nPromise.get("editor_ink2_aria_label").then((function(e){var t;return null===(t=r.div)||void 0===t?void 0:t.setAttribute("aria-label",e)}));var a=_classPrivateMethodGet(this,x,Y).call(this),i=_slicedToArray(a,4),o=i[0],s=i[1],l=i[2],c=i[3];if(this.setAt(o,s,0,0),this.setDims(l,c),_classPrivateMethodGet(this,R,te).call(this),this.width){var u=_slicedToArray(this.parentDimensions,2),d=u[0],h=u[1];this.setAt(e*d,t*h,this.width*d,this.height*h),_classPrivateFieldSet(this,m,!0),_classPrivateMethodGet(this,O,re).call(this),this.setDims(this.width*d,this.height*h),_classPrivateMethodGet(this,T,Z).call(this),_classPrivateMethodGet(this,W,fe).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return _classPrivateMethodGet(this,I,ne).call(this),this.div}},{key:"setDimensions",value:function(e,t){var n=Math.round(e),r=Math.round(t);if(_classPrivateFieldGet(this,_)!==n||_classPrivateFieldGet(this,b)!==r){_classPrivateFieldSet(this,_,n),_classPrivateFieldSet(this,b,r),this.canvas.style.visibility="hidden",_classPrivateFieldGet(this,l)&&Math.abs(_classPrivateFieldGet(this,l)-e/t)>.01&&(t=Math.ceil(e/_classPrivateFieldGet(this,l)),this.setDims(e,t));var a=_slicedToArray(this.parentDimensions,2),i=a[0],o=a[1];this.width=e/i,this.height=t/o,_classPrivateFieldGet(this,v)&&_classPrivateMethodGet(this,D,ae).call(this,e,t),_classPrivateMethodGet(this,O,re).call(this),_classPrivateMethodGet(this,T,Z).call(this),this.canvas.style.visibility="visible",this.fixDims()}}},{key:"serialize",value:function(){if(this.isEmpty())return null;var e=this.getRect(0,0),t=this.rotation%180===0?e[3]-e[1]:e[2]-e[0],n=a.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:r.AnnotationEditorType.INK,color:n,thickness:this.thickness,opacity:this.opacity,paths:_classPrivateMethodGet(this,N,se).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,t),pageIndex:this.pageIndex,rect:e,rotation:this.rotation}}}],[{key:"initialize",value:function(e){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink2_aria_label"].map((function(t){return[t,e.get(t)]})))}},{key:"updateDefaultParams",value:function(e,t){switch(e){case r.AnnotationEditorParamsType.INK_THICKNESS:n._defaultThickness=t;break;case r.AnnotationEditorParamsType.INK_COLOR:n._defaultColor=t;break;case r.AnnotationEditorParamsType.INK_OPACITY:n._defaultOpacity=t/100}}},{key:"defaultPropertiesToUpdate",get:function(){return[[r.AnnotationEditorParamsType.INK_THICKNESS,n._defaultThickness],[r.AnnotationEditorParamsType.INK_COLOR,n._defaultColor||a.AnnotationEditor._defaultLineColor],[r.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*n._defaultOpacity)]]}},{key:"deserialize",value:function(e,t,a){var i,o=_get(_getPrototypeOf(n),"deserialize",this).call(this,e,t,a);o.thickness=e.thickness,o.color=(i=r.Util).makeHexColor.apply(i,_toConsumableArray(e.color)),o.opacity=e.opacity;var d=_slicedToArray(o.pageDimensions,2),h=d[0],f=d[1],p=o.width*h,m=o.height*f,g=o.parentScale,y=e.thickness/2;_classPrivateFieldSet(o,l,p/m),_classPrivateFieldSet(o,v,!0),_classPrivateFieldSet(o,_,Math.round(p)),_classPrivateFieldSet(o,b,Math.round(m));var k,S=_createForOfIteratorHelper(e.paths);try{for(S.s();!(k=S.n()).done;){var w=k.value.bezier,P=[];o.paths.push(P);for(var x=g*(w[0]-y),A=g*(m-w[1]-y),C=2,F=w.length;C0&&void 0!==arguments[0]&&arguments[0];if(!this.isEmpty())if(_classPrivateFieldGet(this,v)){var t=_classPrivateMethodGet(this,z,ue).call(this),n=_classPrivateMethodGet(this,B,de).call(this);_classPrivateFieldSet(this,u,Math.max(s,t[2]-t[0])),_classPrivateFieldSet(this,c,Math.max(s,t[3]-t[1]));var r=Math.ceil(n+_classPrivateFieldGet(this,u)*this.scaleFactor),a=Math.ceil(n+_classPrivateFieldGet(this,c)*this.scaleFactor),i=_slicedToArray(this.parentDimensions,2),o=i[0],d=i[1];this.width=r/o,this.height=a/d,_classPrivateFieldSet(this,l,r/a),_classPrivateMethodGet(this,W,fe).call(this);var h=this.translationX,f=this.translationY;this.translationX=-t[0],this.translationY=-t[1],_classPrivateMethodGet(this,O,re).call(this),_classPrivateMethodGet(this,T,Z).call(this),_classPrivateFieldSet(this,_,r),_classPrivateFieldSet(this,b,a),this.setDims(r,a);var p=e?n/this.scaleFactor/2:0;this.translate(h-this.translationX-p,f-this.translationY-p)}else _classPrivateMethodGet(this,T,Z).call(this)}function fe(){var e=this.div.style;_classPrivateFieldGet(this,l)>=1?(e.minHeight="".concat(s,"px"),e.minWidth="".concat(Math.round(_classPrivateFieldGet(this,l)*s),"px")):(e.minWidth="".concat(s,"px"),e.minHeight="".concat(Math.round(s/_classPrivateFieldGet(this,l)),"px"))}_defineProperty(H,"_defaultColor",null),_defineProperty(H,"_defaultOpacity",1),_defineProperty(H,"_defaultThickness",1),_defineProperty(H,"_l10nPromise",void 0),_defineProperty(H,"_type","ink"),t.InkEditor=H},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.fitCurve=void 0;var r=n(31);t.fitCurve=r},function(e){function t(e,a,i,o,s){var c,u,d,h,f,p,v,m,g,y,_,b,k;if(2===e.length)return b=l.vectorLen(l.subtract(e[0],e[1]))/3,[c=[e[0],l.addArrays(e[0],l.mulItems(a,b)),l.addArrays(e[1],l.mulItems(i,b)),e[1]]];u=function(e){var t,n,r,a=[];return e.forEach((function(e,i){t=i?n+l.vectorLen(l.subtract(e,r)):0,a.push(t),n=t,r=e})),a=a.map((function(e){return e/n}))}(e);var S=n(e,u,u,a,i,s),w=_slicedToArray(S,3);if(c=w[0],h=w[1],p=w[2],0===h||h.9999&&A<1.0001)break}f=h,v=p}if(_=[],(m=l.subtract(e[p-1],e[p+1])).every((function(e){return 0===e}))){var C=[-(m=l.subtract(e[p-1],e[p]))[1],m[0]];m[0]=C[0],m[1]=C[1]}return g=l.normalize(m),y=l.mulItems(g,-1),_=(_=_.concat(t(e.slice(0,p+1),a,g,o,s))).concat(t(e.slice(p),y,i,o,s))}function n(e,t,n,r,a,s){var u,d,h;u=function(e,t,n,r){var a,i,o,s,u,d,h,f,p,v,m,g,y,_,b,k,S,w=e[0],P=e[e.length-1];for(a=[w,null,null,P],i=l.zeros_Xx2x2(t.length),y=0,_=t.length;y<_;y++)S=1-(k=t[y]),(o=i[y])[0]=l.mulItems(n,3*k*(S*S)),o[1]=l.mulItems(r,3*S*(k*k));for(s=[[0,0],[0,0]],u=[0,0],y=0,_=e.length;y<_;y++)k=t[y],o=i[y],s[0][0]+=l.dot(o[0],o[0]),s[0][1]+=l.dot(o[0],o[1]),s[1][0]+=l.dot(o[0],o[1]),s[1][1]+=l.dot(o[1],o[1]),b=l.subtract(e[y],c.q([w,w,P,P],k)),u[0]+=l.dot(o[0],b),u[1]+=l.dot(o[1],b);return d=s[0][0]*s[1][1]-s[1][0]*s[0][1],h=s[0][0]*u[1]-s[1][0]*u[0],f=u[0]*s[1][1]-u[1]*s[0][1],p=0===d?0:f/d,v=0===d?0:h/d,g=l.vectorLen(l.subtract(w,P)),p<(m=1e-6*g)||va&&(a=r,s=d);return[a,s]}(e,u,t),p=_slicedToArray(f,2);return d=p[0],h=p[1],s&&s({bez:u,points:e,params:t,maxErr:d,maxPoint:h}),[u,d,h]}function r(e,t,n){return n.map((function(n,r){return a(e,t[r],n)}))}function a(e,t,n){var r=l.subtract(c.q(e,n),t),a=c.qprime(e,n),i=l.mulMatrix(r,a),o=l.sum(l.squareItems(a))+2*l.mulMatrix(r,c.qprimeprime(e,n));return 0===o?n:n-i/o}var i=function(e,t){for(var n,r=[0],a=e[0],i=0,o=1;o<=t;o++)n=c.q(e,o/t),i+=l.vectorLen(l.subtract(n,a)),r.push(i),a=n;return r=r.map((function(e){return e/i}))};function o(e,t,n,r){if(t<0)return 0;if(t>1)return 1;for(var a,i,o,s,l=1;l<=r;l++)if(t<=n[l]){o=(l-1)/r,i=l/r,s=(t-(a=n[l-1]))/(n[l]-a)*(i-o)+o;break}return s}function s(e,t){return l.normalize(l.subtract(e,t))}var l=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"zeros_Xx2x2",value:function(e){for(var t=[];e--;)t.push([0,0]);return t}},{key:"mulItems",value:function(e,t){return e.map((function(e){return e*t}))}},{key:"mulMatrix",value:function(e,t){return e.reduce((function(e,n,r){return e+n*t[r]}),0)}},{key:"subtract",value:function(e,t){return e.map((function(e,n){return e-t[n]}))}},{key:"addArrays",value:function(e,t){return e.map((function(e,n){return e+t[n]}))}},{key:"addItems",value:function(e,t){return e.map((function(e){return e+t}))}},{key:"sum",value:function(e){return e.reduce((function(e,t){return e+t}))}},{key:"dot",value:function(t,n){return e.mulMatrix(t,n)}},{key:"vectorLen",value:function(e){return Math.hypot.apply(Math,_toConsumableArray(e))}},{key:"divItems",value:function(e,t){return e.map((function(e){return e/t}))}},{key:"squareItems",value:function(e){return e.map((function(e){return e*e}))}},{key:"normalize",value:function(e){return this.divItems(e,this.vectorLen(e))}}]),e}(),c=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"q",value:function(e,t){var n=1-t,r=l.mulItems(e[0],n*n*n),a=l.mulItems(e[1],3*n*n*t),i=l.mulItems(e[2],3*n*t*t),o=l.mulItems(e[3],t*t*t);return l.addArrays(l.addArrays(r,a),l.addArrays(i,o))}},{key:"qprime",value:function(e,t){var n=1-t,r=l.mulItems(l.subtract(e[1],e[0]),3*n*n),a=l.mulItems(l.subtract(e[2],e[1]),6*n*t),i=l.mulItems(l.subtract(e[3],e[2]),3*t*t);return l.addArrays(l.addArrays(r,a),i)}},{key:"qprimeprime",value:function(e,t){return l.addArrays(l.mulItems(l.addArrays(l.subtract(e[2],l.mulItems(e[1],2)),e[0]),6*(1-t)),l.mulItems(l.addArrays(l.subtract(e[3],l.mulItems(e[2],2)),e[1]),6*t))}}]),e}();e.exports=function(e,n,r){if(!Array.isArray(e))throw new TypeError("First argument should be an array");if(e.forEach((function(t){if(!Array.isArray(t)||t.some((function(e){return"number"!==typeof e}))||t.length!==e[0].length)throw Error("Each point should be an array of numbers. Each point should have the same amount of numbers.")})),(e=e.filter((function(t,n){return 0===n||!t.every((function(t,r){return t===e[n-1][r]}))}))).length<2)return[];var a=e.length,i=s(e[1],e[0]),o=s(e[a-2],e[a-1]);return t(e,i,o,n,r)},e.exports.fitCubic=t,e.exports.createTangent=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var r=n(1),a=n(6),i=n(3),o=n(33),s=n(34),l=1e3,c=new WeakSet;function u(e){return{width:e[2]-e[0],height:e[3]-e[1]}}var d=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"create",value:function(e){switch(e.data.annotationType){case r.AnnotationType.LINK:return new v(e);case r.AnnotationType.TEXT:return new y(e);case r.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new b(e);case"Btn":return e.data.radioButton?new S(e):e.data.checkBox?new k(e):new w(e);case"Ch":return new P(e)}return new _(e);case r.AnnotationType.POPUP:return new x(e);case r.AnnotationType.FREETEXT:return new C(e);case r.AnnotationType.LINE:return new F(e);case r.AnnotationType.SQUARE:return new E(e);case r.AnnotationType.CIRCLE:return new T(e);case r.AnnotationType.POLYLINE:return new M(e);case r.AnnotationType.CARET:return new I(e);case r.AnnotationType.INK:return new O(e);case r.AnnotationType.POLYGON:return new R(e);case r.AnnotationType.HIGHLIGHT:return new D(e);case r.AnnotationType.UNDERLINE:return new L(e);case r.AnnotationType.SQUIGGLY:return new N(e);case r.AnnotationType.STRIKEOUT:return new j(e);case r.AnnotationType.STAMP:return new G(e);case r.AnnotationType.FILEATTACHMENT:return new z(e);default:return new h(e)}}}]),e}(),h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.isRenderable,a=void 0!==r&&r,i=n.ignoreBorder,o=void 0!==i&&i,s=n.createQuadrilaterals,l=void 0!==s&&s;_classCallCheck(this,e),this.isRenderable=a,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.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,a&&(this.container=this._createContainer(o)),l&&(this.quadrilaterals=this._createQuadrilaterals(o))}return _createClass(e,[{key:"_createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data,n=this.page,a=this.viewport,i=document.createElement("section");i.setAttribute("data-annotation-id",t.id),t.noRotate&&i.classList.add("norotate");var o=a.rawDims,s=o.pageWidth,l=o.pageHeight,c=o.pageX,d=o.pageY,h=u(t.rect),f=h.width,p=h.height,v=r.Util.normalizeRect([t.rect[0],n.view[3]-t.rect[1]+n.view[1],t.rect[2],n.view[3]-t.rect[3]+n.view[1]]);if(!e&&t.borderStyle.width>0){i.style.borderWidth="".concat(t.borderStyle.width,"px");var m=t.borderStyle.horizontalCornerRadius,g=t.borderStyle.verticalCornerRadius;if(m>0||g>0){var y="calc(".concat(m,"px * var(--scale-factor)) / calc(").concat(g,"px * var(--scale-factor))");i.style.borderRadius=y}else if(this instanceof S){var _="calc(".concat(f,"px * var(--scale-factor)) / calc(").concat(p,"px * var(--scale-factor))");i.style.borderRadius=_}switch(t.borderStyle.style){case r.AnnotationBorderStyleType.SOLID:i.style.borderStyle="solid";break;case r.AnnotationBorderStyleType.DASHED:i.style.borderStyle="dashed";break;case r.AnnotationBorderStyleType.BEVELED:(0,r.warn)("Unimplemented border style: beveled");break;case r.AnnotationBorderStyleType.INSET:(0,r.warn)("Unimplemented border style: inset");break;case r.AnnotationBorderStyleType.UNDERLINE:i.style.borderBottomStyle="solid"}var b=t.borderColor||null;b?i.style.borderColor=r.Util.makeHexColor(0|b[0],0|b[1],0|b[2]):i.style.borderWidth=0}i.style.left="".concat(100*(v[0]-c)/s,"%"),i.style.top="".concat(100*(v[1]-d)/l,"%");var k=t.rotation;return t.hasOwnCanvas||0===k?(i.style.width="".concat(100*f/s,"%"),i.style.height="".concat(100*p/l,"%")):this.setRotation(k,i),i}},{key:"setRotation",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container,a=this.viewport.rawDims,i=a.pageWidth,o=a.pageHeight,s=u(this.data.rect),l=s.width,c=s.height;e%180===0?(t=100*l/i,n=100*c/o):(t=100*c/i,n=100*l/o),r.style.width="".concat(t,"%"),r.style.height="".concat(n,"%"),r.setAttribute("data-main-rotation",(360-e)%360)}},{key:"_commonActions",get:function(){var e=this,t=function(e,t,n){var r=n.detail[e];n.target.style[t]=o.ColorConverters["".concat(r[0],"_HTML")](r.slice(1))};return(0,r.shadow)(this,"_commonActions",{display:function(t){var n=t.detail.display%2===1;e.container.style.visibility=n?"hidden":"visible",e.annotationStorage.setValue(e.data.id,{hidden:n,print:0===t.detail.display||3===t.detail.display})},print:function(t){e.annotationStorage.setValue(e.data.id,{print:t.detail.print})},hidden:function(t){e.container.style.visibility=t.detail.hidden?"hidden":"visible",e.annotationStorage.setValue(e.data.id,{hidden:t.detail.hidden})},focus:function(e){setTimeout((function(){return e.target.focus({preventScroll:!1})}),0)},userName:function(e){e.target.title=e.detail.userName},readonly:function(e){e.detail.readonly?e.target.setAttribute("readonly",""):e.target.removeAttribute("readonly")},required:function(t){e._setRequired(t.target,t.detail.required)},bgColor:function(e){t("bgColor","backgroundColor",e)},fillColor:function(e){t("fillColor","backgroundColor",e)},fgColor:function(e){t("fgColor","color",e)},textColor:function(e){t("textColor","color",e)},borderColor:function(e){t("borderColor","borderColor",e)},strokeColor:function(e){t("strokeColor","borderColor",e)},rotation:function(t){var n=t.detail.rotation;e.setRotation(n),e.annotationStorage.setValue(e.data.id,{rotation:n})}})}},{key:"_dispatchEventFromSandbox",value:function(e,t){for(var n=this._commonActions,r=0,a=Object.keys(t.detail);r0&&void 0!==arguments[0]&&arguments[0];if(!this.data.quadPoints)return null;var t,n=[],r=this.data.rect,a=_createForOfIteratorHelper(this.data.quadPoints);try{for(a.s();!(t=a.n()).done;){var i=t.value;this.data.rect=[i[2].x,i[2].y,i[1].x,i[1].y],n.push(this._createContainer(e))}}catch(o){a.e(o)}finally{a.f()}return this.data.rect=r,n}},{key:"_createPopup",value:function(e,t){var n=this.container;this.quadrilaterals&&(e||(e=this.quadrilaterals),n=this.quadrilaterals[0]),e||((e=document.createElement("div")).classList.add("popupTriggerArea"),n.append(e));var r=new A({container:n,trigger:e,color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,hideWrapper:!0}).render();r.style.left="100%",n.append(r)}},{key:"_renderQuadrilaterals",value:function(e){var t,n=_createForOfIteratorHelper(this.quadrilaterals);try{for(n.s();!(t=n.n()).done;)t.value.classList.add(e)}catch(r){n.e(r)}finally{n.f()}return this.quadrilaterals}},{key:"render",value:function(){(0,r.unreachable)("Abstract method `AnnotationElement.render` called")}},{key:"_getElementsByName",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];if(this._fieldObjects){var a=this._fieldObjects[e];if(a){var i,o=_createForOfIteratorHelper(a);try{for(o.s();!(i=o.n()).done;){var s=i.value,l=s.page,u=s.id,d=s.exportValues;if(-1!==l&&u!==t){var h="string"===typeof d?d:null,f=document.querySelector('[data-element-id="'.concat(u,'"]'));!f||c.has(f)?n.push({id:u,exportValue:h,domElement:f}):(0,r.warn)("_getElementsByName - element not allowed: ".concat(u))}}}catch(_){o.e(_)}finally{o.f()}}return n}var p,v=_createForOfIteratorHelper(document.getElementsByName(e));try{for(v.s();!(p=v.n()).done;){var m=p.value,g=m.exportValue,y=m.getAttribute("data-element-id");y!==t&&c.has(m)&&n.push({id:y,exportValue:g,domElement:m})}}catch(_){v.e(_)}finally{v.f()}return n}}]),e}(),f=new WeakSet,p=new WeakSet,v=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return _classCallCheck(this,n),r=t.call(this,e,{isRenderable:!0,ignoreBorder:!(null===a||void 0===a||!a.ignoreBorder),createQuadrilaterals:!0}),_classPrivateMethodInitSpec(_assertThisInitialized(r),p),_classPrivateMethodInitSpec(_assertThisInitialized(r),f),r.isTooltipOnly=e.data.isTooltipOnly,r}return _createClass(n,[{key:"render",value:function(){var e=this.data,t=this.linkService,n=document.createElement("a");n.setAttribute("data-element-id",e.id);var r=!1;return e.url?(t.addLinkAttributes(n,e.url,e.newWindow),r=!0):e.action?(this._bindNamedAction(n,e.action),r=!0):e.attachment?(this._bindAttachment(n,e.attachment),r=!0):e.setOCGState?(_classPrivateMethodGet(this,p,g).call(this,n,e.setOCGState),r=!0):e.dest?(this._bindLink(n,e.dest),r=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(n,e),r=!0),e.resetForm?(this._bindResetFormAction(n,e.resetForm),r=!0):this.isTooltipOnly&&!r&&(this._bindLink(n,""),r=!0)),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map((function(e,t){var r=0===t?n:n.cloneNode();return e.append(r),e})):(this.container.classList.add("linkAnnotation"),r&&this.container.append(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.goToDestination(t),!1},(t||""===t)&&_classPrivateMethodGet(this,f,m).call(this)}},{key:"_bindNamedAction",value:function(e,t){var n=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return n.linkService.executeNamedAction(t),!1},_classPrivateMethodGet(this,f,m).call(this)}},{key:"_bindAttachment",value:function(e,t){var n=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){var e;return null===(e=n.downloadManager)||void 0===e||e.openOrDownloadData(n.container,t.content,t.filename),!1},_classPrivateMethodGet(this,f,m).call(this)}},{key:"_bindJSAction",value:function(e,t){var n=this;e.href=this.linkService.getAnchorUrl("");for(var r=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),a=function(){var a=o[i],s=r.get(a);if(!s)return"continue";e[s]=function(){var e;return null===(e=n.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:n,detail:{id:t.id,name:a}}),!1}},i=0,o=Object.keys(t.actions);io&&(i=i.slice(0,o));var s={userValue:i,formattedValue:null,lastCommittedValue:null,commitKey:1};this.data.multiLine?((r=document.createElement("textarea")).textContent=i,this.data.doNotScroll&&(r.style.overflowY="hidden")):((r=document.createElement("input")).type="text",r.setAttribute("value",i),this.data.doNotScroll&&(r.style.overflowX="hidden")),this.data.hasOwnCanvas&&(r.hidden=!0),c.add(r),r.setAttribute("data-element-id",n),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=l,this._setRequired(r,this.data.required),o&&(r.maxLength=o),r.addEventListener("input",(function(a){t.setValue(n,{value:a.target.value}),e.setPropertyOnSiblings(r,"value",a.target.value,"value")})),r.addEventListener("resetform",(function(t){var n,a=null!==(n=e.data.defaultFieldValue)&&void 0!==n?n:"";r.value=s.userValue=a,s.formattedValue=null}));var u=function(e){var t=s.formattedValue;null!==t&&void 0!==t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var d;r.addEventListener("focus",(function(e){var t=e.target;s.userValue&&(t.value=s.userValue),s.lastCommittedValue=t.value,s.commitKey=1})),r.addEventListener("updatefromsandbox",(function(r){e.showElementAndHideCanvas(r.target);var a={value:function(e){var r;s.userValue=null!==(r=e.detail.value)&&void 0!==r?r:"",t.setValue(n,{value:s.userValue.toString()}),e.target.value=s.userValue},formattedValue:function(e){var r=e.detail.formattedValue;s.formattedValue=r,null!==r&&void 0!==r&&e.target!==document.activeElement&&(e.target.value=r),t.setValue(n,{formattedValue:r})},selRange:function(e){var t;(t=e.target).setSelectionRange.apply(t,_toConsumableArray(e.detail.selRange))},charLimit:function(r){var a,i=r.detail.charLimit,o=r.target;if(0!==i){o.setAttribute("maxLength",i);var l=s.userValue;!l||l.length<=i||(l=l.slice(0,i),o.value=s.userValue=l,t.setValue(n,{value:l}),null===(a=e.linkService.eventBus)||void 0===a||a.dispatch("dispatcheventinsandbox",{source:e,detail:{id:n,name:"Keystroke",value:l,willCommit:!0,commitKey:1,selStart:o.selectionStart,selEnd:o.selectionEnd}}))}else o.removeAttribute("maxLength")}};e._dispatchEventFromSandbox(a,r)})),r.addEventListener("keydown",(function(t){var r;s.commitKey=1;var a=-1;if("Escape"===t.key?a=0:"Enter"!==t.key||e.data.multiLine?"Tab"===t.key&&(s.commitKey=3):a=2,-1!==a){var i=t.target.value;s.lastCommittedValue!==i&&(s.lastCommittedValue=i,s.userValue=i,null===(r=e.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:e,detail:{id:n,name:"Keystroke",value:i,willCommit:!0,commitKey:a,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}))}}));var h=u;u=null,r.addEventListener("blur",(function(t){if(t.relatedTarget){var r,a=t.target.value;s.userValue=a,s.lastCommittedValue!==a&&(null===(r=e.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:e,detail:{id:n,name:"Keystroke",value:a,willCommit:!0,commitKey:s.commitKey,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}})),h(t)}})),null!==(d=this.data.actions)&&void 0!==d&&d.Keystroke&&r.addEventListener("beforeinput",(function(t){var r;s.lastCommittedValue=null;var a=t.data,i=t.target,o=i.value,l=i.selectionStart,c=i.selectionEnd,u=l,d=c;switch(t.inputType){case"deleteWordBackward":var h=o.substring(0,l).match(/\w*[^\w]*$/);h&&(u-=h[0].length);break;case"deleteWordForward":var f=o.substring(l).match(/^[^\w]*\w*/);f&&(d+=f[0].length);break;case"deleteContentBackward":l===c&&(u-=1);break;case"deleteContentForward":l===c&&(d+=1)}t.preventDefault(),null===(r=e.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:e,detail:{id:n,name:"Keystroke",value:o,change:a||"",willCommit:!1,selStart:u,selEnd:d}})})),this._setEventListeners(r,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(e){return e.target.value}))}if(u&&r.addEventListener("blur",u),this.data.comb){var f=(this.data.rect[2]-this.data.rect[0])/o;r.classList.add("comb"),r.style.letterSpacing="calc(".concat(f,"px * var(--scale-factor) - 1ch)")}}else(r=document.createElement("div")).textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell";return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}]),n}(_),k=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:e.renderForms})}return _createClass(n,[{key:"render",value:function(){var e=this,t=this.annotationStorage,n=this.data,r=n.id,a=t.getValue(r,{value:n.exportValue===n.fieldValue}).value;"string"===typeof a&&(a="Off"!==a,t.setValue(r,{value:a})),this.container.classList.add("buttonWidgetAnnotation","checkBox");var i=document.createElement("input");return c.add(i),i.setAttribute("data-element-id",r),i.disabled=n.readOnly,this._setRequired(i,this.data.required),i.type="checkbox",i.name=n.fieldName,a&&i.setAttribute("checked",!0),i.setAttribute("exportValue",n.exportValue),i.tabIndex=l,i.addEventListener("change",(function(a){var i,o=a.target,s=o.name,l=o.checked,c=_createForOfIteratorHelper(e._getElementsByName(s,r));try{for(c.s();!(i=c.n()).done;){var u=i.value,d=l&&u.exportValue===n.exportValue;u.domElement&&(u.domElement.checked=d),t.setValue(u.id,{value:d})}}catch(h){c.e(h)}finally{c.f()}t.setValue(r,{value:l})})),i.addEventListener("resetform",(function(e){var t=n.defaultFieldValue||"Off";e.target.checked=t===n.exportValue})),this.enableScripting&&this.hasJSActions&&(i.addEventListener("updatefromsandbox",(function(n){var a={value:function(e){e.target.checked="Off"!==e.detail.value,t.setValue(r,{value:e.target.checked})}};e._dispatchEventFromSandbox(a,n)})),this._setEventListeners(i,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(e){return e.target.checked}))),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}]),n}(_),S=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:e.renderForms})}return _createClass(n,[{key:"render",value:function(){var e=this;this.container.classList.add("buttonWidgetAnnotation","radioButton");var t=this.annotationStorage,n=this.data,r=n.id,a=t.getValue(r,{value:n.fieldValue===n.buttonValue}).value;"string"===typeof a&&(a=a!==n.buttonValue,t.setValue(r,{value:a}));var i=document.createElement("input");if(c.add(i),i.setAttribute("data-element-id",r),i.disabled=n.readOnly,this._setRequired(i,this.data.required),i.type="radio",i.name=n.fieldName,a&&i.setAttribute("checked",!0),i.tabIndex=l,i.addEventListener("change",(function(n){var a,i=n.target,o=i.name,s=i.checked,l=_createForOfIteratorHelper(e._getElementsByName(o,r));try{for(l.s();!(a=l.n()).done;){var c=a.value;t.setValue(c.id,{value:!1})}}catch(u){l.e(u)}finally{l.f()}t.setValue(r,{value:s})})),i.addEventListener("resetform",(function(e){var t=n.defaultFieldValue;e.target.checked=null!==t&&void 0!==t&&t===n.buttonValue})),this.enableScripting&&this.hasJSActions){var o=n.buttonValue;i.addEventListener("updatefromsandbox",(function(n){var a={value:function(n){var a,i=o===n.detail.value,s=_createForOfIteratorHelper(e._getElementsByName(n.target.name));try{for(s.s();!(a=s.n()).done;){var l=a.value,c=i&&l.id===r;l.domElement&&(l.domElement.checked=c),t.setValue(l.id,{value:c})}}catch(u){s.e(u)}finally{s.f()}}};e._dispatchEventFromSandbox(a,n)})),this._setEventListeners(i,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(e){return e.target.checked}))}return this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}]),n}(_),w=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{ignoreBorder:e.data.hasAppearance})}return _createClass(n,[{key:"render",value:function(){var e=this,t=_get(_getPrototypeOf(n.prototype),"render",this).call(this);t.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(t.title=this.data.alternativeText);var r=t.lastChild;return this.enableScripting&&this.hasJSActions&&r&&(this._setDefaultPropertiesFromJS(r),r.addEventListener("updatefromsandbox",(function(t){e._dispatchEventFromSandbox({},t)}))),t}}]),n}(v),P=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){return _classCallCheck(this,n),t.call(this,e,{isRenderable:e.renderForms})}return _createClass(n,[{key:"render",value:function(){var e=this;this.container.classList.add("choiceWidgetAnnotation");var t=this.annotationStorage,n=this.data.id,r=t.getValue(n,{value:this.data.fieldValue}),a=document.createElement("select");c.add(a),a.setAttribute("data-element-id",n),a.disabled=this.data.readOnly,this._setRequired(a,this.data.required),a.name=this.data.fieldName,a.tabIndex=l;var i=this.data.combo&&this.data.options.length>0;this.data.combo||(a.size=this.data.options.length,this.data.multiSelect&&(a.multiple=!0)),a.addEventListener("resetform",(function(t){var n,r=e.data.defaultFieldValue,i=_createForOfIteratorHelper(a.options);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.selected=o.value===r}}catch(s){i.e(s)}finally{i.f()}}));var o,s=_createForOfIteratorHelper(this.data.options);try{for(s.s();!(o=s.n()).done;){var u=o.value,d=document.createElement("option");d.textContent=u.displayValue,d.value=u.exportValue,r.value.includes(u.exportValue)&&(d.setAttribute("selected",!0),i=!1),a.append(d)}}catch(g){s.e(g)}finally{s.f()}var h=null;if(i){var f=document.createElement("option");f.value=" ",f.setAttribute("hidden",!0),f.setAttribute("selected",!0),a.prepend(f),h=function(){f.remove(),a.removeEventListener("input",h),h=null},a.addEventListener("input",h)}var p=function(e){var t=e?"value":"textContent",n=a.options;return a.multiple?Array.prototype.filter.call(n,(function(e){return e.selected})).map((function(e){return e[t]})):-1===n.selectedIndex?null:n[n.selectedIndex][t]},v=p(!1),m=function(e){var t=e.target.options;return Array.prototype.map.call(t,(function(e){return{displayValue:e.textContent,exportValue:e.value}}))};return this.enableScripting&&this.hasJSActions?(a.addEventListener("updatefromsandbox",(function(r){var i={value:function(e){var r;null===(r=h)||void 0===r||r();var i,o=e.detail.value,s=new Set(Array.isArray(o)?o:[o]),l=_createForOfIteratorHelper(a.options);try{for(l.s();!(i=l.n()).done;){var c=i.value;c.selected=s.has(c.value)}}catch(g){l.e(g)}finally{l.f()}t.setValue(n,{value:p(!0)}),v=p(!1)},multipleSelection:function(e){a.multiple=!0},remove:function(e){var r=a.options,i=e.detail.remove;if(r[i].selected=!1,a.remove(i),r.length>0){var o=Array.prototype.findIndex.call(r,(function(e){return e.selected}));-1===o&&(r[0].selected=!0)}t.setValue(n,{value:p(!0),items:m(e)}),v=p(!1)},clear:function(e){for(;0!==a.length;)a.remove(0);t.setValue(n,{value:null,items:[]}),v=p(!1)},insert:function(e){var r=e.detail.insert,i=r.index,o=r.displayValue,s=r.exportValue,l=a.children[i],c=document.createElement("option");c.textContent=o,c.value=s,l?l.before(c):a.append(c),t.setValue(n,{value:p(!0),items:m(e)}),v=p(!1)},items:function(e){for(var r=e.detail.items;0!==a.length;)a.remove(0);var i,o=_createForOfIteratorHelper(r);try{for(o.s();!(i=o.n()).done;){var s=i.value,l=s.displayValue,c=s.exportValue,u=document.createElement("option");u.textContent=l,u.value=c,a.append(u)}}catch(g){o.e(g)}finally{o.f()}a.options.length>0&&(a.options[0].selected=!0),t.setValue(n,{value:p(!0),items:m(e)}),v=p(!1)},indices:function(e){var r,a=new Set(e.detail.indices),i=_createForOfIteratorHelper(e.target.options);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.selected=a.has(o.index)}}catch(g){i.e(g)}finally{i.f()}t.setValue(n,{value:p(!0)}),v=p(!1)},editable:function(e){e.target.disabled=!e.detail.editable}};e._dispatchEventFromSandbox(i,r)})),a.addEventListener("input",(function(r){var a,i=p(!0);t.setValue(n,{value:i}),r.preventDefault(),null===(a=e.linkService.eventBus)||void 0===a||a.dispatch("dispatcheventinsandbox",{source:e,detail:{id:n,name:"Keystroke",value:v,changeEx:i,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(a,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(function(e){return e.target.value}))):a.addEventListener("input",(function(e){t.setValue(n,{value:p(!0)})})),this.data.combo&&this._setTextStyle(a),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}]),n}(_),x=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i;_classCallCheck(this,n);var o=e.data,s=!n.IGNORE_TYPES.has(o.parentType)&&!!(null!==(r=o.titleObj)&&void 0!==r&&r.str||null!==(a=o.contentsObj)&&void 0!==a&&a.str||null!==(i=o.richText)&&void 0!==i&&i.str);return t.call(this,e,{isRenderable:s})}return _createClass(n,[{key:"render",value:function(){this.container.classList.add("popupAnnotation");var e=this.layer.querySelectorAll('[data-annotation-id="'.concat(this.data.parentId,'"]'));if(0===e.length)return this.container;var t=new A({container:this.container,trigger:Array.from(e),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),n=this.page,a=r.Util.normalizeRect([this.data.parentRect[0],n.view[3]-this.data.parentRect[1]+n.view[1],this.data.parentRect[2],n.view[3]-this.data.parentRect[3]+n.view[1]]),i=a[0]+this.data.parentRect[2]-this.data.parentRect[0],o=a[1],s=this.viewport.rawDims,l=s.pageWidth,c=s.pageHeight,u=s.pageX,d=s.pageY;return this.container.style.left="".concat(100*(i-u)/l,"%"),this.container.style.top="".concat(100*(o-d)/c,"%"),this.container.append(t.render()),this.container}}]),n}(h);_defineProperty(x,"IGNORE_TYPES",new Set(["Line","Square","Circle","PolyLine","Polygon","Ink"]));var A=function(){function e(t){_classCallCheck(this,e),this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.titleObj=t.titleObj,this.modificationDate=t.modificationDate,this.contentsObj=t.contentsObj,this.richText=t.richText,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}return _createClass(e,[{key:"render",value:function(){var e,t,n=document.createElement("div");n.classList.add("popupWrapper"),this.hideElement=this.hideWrapper?n:this.container,this.hideElement.hidden=!0;var i=document.createElement("div");i.classList.add("popup");var o=this.color;if(o){var l=.7*(255-o[0])+o[0],c=.7*(255-o[1])+o[1],u=.7*(255-o[2])+o[2];i.style.backgroundColor=r.Util.makeHexColor(0|l,0|c,0|u)}var d=document.createElement("h1");d.dir=this.titleObj.dir,d.textContent=this.titleObj.str,i.append(d);var h=a.PDFDateString.toDateObject(this.modificationDate);if(h){var f=document.createElement("span");f.classList.add("popupDate"),f.textContent="{{date}}, {{time}}",f.dataset.l10nId="annotation_date_string",f.dataset.l10nArgs=JSON.stringify({date:h.toLocaleDateString(),time:h.toLocaleTimeString()}),i.append(f)}if(null===(e=this.richText)||void 0===e||!e.str||null!==(t=this.contentsObj)&&void 0!==t&&t.str&&this.contentsObj.str!==this.richText.str){var p=this._formatContents(this.contentsObj);i.append(p)}else s.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:i}),i.lastChild.classList.add("richText","popupContent");Array.isArray(this.trigger)||(this.trigger=[this.trigger]);var v,m=_createForOfIteratorHelper(this.trigger);try{for(m.s();!(v=m.n()).done;){var g=v.value;g.addEventListener("click",this._toggle.bind(this)),g.addEventListener("mouseover",this._show.bind(this,!1)),g.addEventListener("mouseout",this._hide.bind(this,!1))}}catch(y){m.e(y)}finally{m.f()}return i.addEventListener("click",this._hide.bind(this,!0)),n.append(i),n}},{key:"_formatContents",value:function(e){var t=e.str,n=e.dir,r=document.createElement("p");r.classList.add("popupContent"),r.dir=n;for(var a=t.split(/(?:\r\n?|\n)/),i=0,o=a.length;i0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex=parseInt(this.container.style.zIndex)+1e3)}},{key:"_hide",value:function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hidden||this.pinned||(this.hideElement.hidden=!0,this.container.style.zIndex=parseInt(this.container.style.zIndex)-1e3)}}]),e}(),C=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i,o;_classCallCheck(this,n);var s=!!(e.data.hasPopup||null!==(r=e.data.titleObj)&&void 0!==r&&r.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(i=e.data.richText)&&void 0!==i&&i.str);return(o=t.call(this,e,{isRenderable:s,ignoreBorder:!0})).textContent=e.data.textContent,o}return _createClass(n,[{key:"render",value:function(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){var e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");var t,n=_createForOfIteratorHelper(this.textContent);try{for(n.s();!(t=n.n()).done;){var r=t.value,a=document.createElement("span");a.textContent=r,e.append(a)}}catch(i){n.e(i)}finally{n.f()}this.container.append(e)}return this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),n}(h),F=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i;_classCallCheck(this,n);var o=!!(e.data.hasPopup||null!==(r=e.data.titleObj)&&void 0!==r&&r.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(i=e.data.richText)&&void 0!==i&&i.str);return t.call(this,e,{isRenderable:o,ignoreBorder:!0})}return _createClass(n,[{key:"render",value:function(){this.container.classList.add("lineAnnotation");var e=this.data,t=u(e.rect),n=t.width,r=t.height,a=this.svgFactory.create(n,r,!0),i=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),i.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),i.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),i.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),a.append(i),this.container.append(a),this._createPopup(i,e),this.container}}]),n}(h),E=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i;_classCallCheck(this,n);var o=!!(e.data.hasPopup||null!==(r=e.data.titleObj)&&void 0!==r&&r.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(i=e.data.richText)&&void 0!==i&&i.str);return t.call(this,e,{isRenderable:o,ignoreBorder:!0})}return _createClass(n,[{key:"render",value:function(){this.container.classList.add("squareAnnotation");var e=this.data,t=u(e.rect),n=t.width,r=t.height,a=this.svgFactory.create(n,r,!0),i=e.borderStyle.width,o=this.svgFactory.createElement("svg:rect");return o.setAttribute("x",i/2),o.setAttribute("y",i/2),o.setAttribute("width",n-i),o.setAttribute("height",r-i),o.setAttribute("stroke-width",i||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),a.append(o),this.container.append(a),this._createPopup(o,e),this.container}}]),n}(h),T=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i;_classCallCheck(this,n);var o=!!(e.data.hasPopup||null!==(r=e.data.titleObj)&&void 0!==r&&r.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(i=e.data.richText)&&void 0!==i&&i.str);return t.call(this,e,{isRenderable:o,ignoreBorder:!0})}return _createClass(n,[{key:"render",value:function(){this.container.classList.add("circleAnnotation");var e=this.data,t=u(e.rect),n=t.width,r=t.height,a=this.svgFactory.create(n,r,!0),i=e.borderStyle.width,o=this.svgFactory.createElement("svg:ellipse");return o.setAttribute("cx",n/2),o.setAttribute("cy",r/2),o.setAttribute("rx",n/2-i/2),o.setAttribute("ry",r/2-i/2),o.setAttribute("stroke-width",i||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),a.append(o),this.container.append(a),this._createPopup(o,e),this.container}}]),n}(h),M=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i,o;_classCallCheck(this,n);var s=!!(e.data.hasPopup||null!==(r=e.data.titleObj)&&void 0!==r&&r.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(i=e.data.richText)&&void 0!==i&&i.str);return(o=t.call(this,e,{isRenderable:s,ignoreBorder:!0})).containerClassName="polylineAnnotation",o.svgElementName="svg:polyline",o}return _createClass(n,[{key:"render",value:function(){this.container.classList.add(this.containerClassName);var e,t=this.data,n=u(t.rect),r=n.width,a=n.height,i=this.svgFactory.create(r,a,!0),o=[],s=_createForOfIteratorHelper(t.vertices);try{for(s.s();!(e=s.n()).done;){var l=e.value,c=l.x-t.rect[0],d=t.rect[3]-l.y;o.push(c+","+d)}}catch(f){s.e(f)}finally{s.f()}o=o.join(" ");var h=this.svgFactory.createElement(this.svgElementName);return h.setAttribute("points",o),h.setAttribute("stroke-width",t.borderStyle.width||1),h.setAttribute("stroke","transparent"),h.setAttribute("fill","transparent"),i.append(h),this.container.append(i),this._createPopup(h,t),this.container}}]),n}(h),R=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 _createClass(n)}(M),I=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i;_classCallCheck(this,n);var o=!!(e.data.hasPopup||null!==(r=e.data.titleObj)&&void 0!==r&&r.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(i=e.data.richText)&&void 0!==i&&i.str);return t.call(this,e,{isRenderable:o,ignoreBorder:!0})}return _createClass(n,[{key:"render",value:function(){return this.container.classList.add("caretAnnotation"),this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),n}(h),O=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i,o;_classCallCheck(this,n);var s=!!(e.data.hasPopup||null!==(r=e.data.titleObj)&&void 0!==r&&r.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(i=e.data.richText)&&void 0!==i&&i.str);return(o=t.call(this,e,{isRenderable:s,ignoreBorder:!0})).containerClassName="inkAnnotation",o.svgElementName="svg:polyline",o}return _createClass(n,[{key:"render",value:function(){this.container.classList.add(this.containerClassName);var e,t=this.data,n=u(t.rect),r=n.width,a=n.height,i=this.svgFactory.create(r,a,!0),o=_createForOfIteratorHelper(t.inkLists);try{for(o.s();!(e=o.n()).done;){var s,l=e.value,c=[],d=_createForOfIteratorHelper(l);try{for(d.s();!(s=d.n()).done;){var h=s.value,f=h.x-t.rect[0],p=t.rect[3]-h.y;c.push("".concat(f,",").concat(p))}}catch(m){d.e(m)}finally{d.f()}c=c.join(" ");var v=this.svgFactory.createElement(this.svgElementName);v.setAttribute("points",c),v.setAttribute("stroke-width",t.borderStyle.width||1),v.setAttribute("stroke","transparent"),v.setAttribute("fill","transparent"),this._createPopup(v,t),i.append(v)}}catch(m){o.e(m)}finally{o.f()}return this.container.append(i),this.container}}]),n}(h),D=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i;_classCallCheck(this,n);var o=!!(e.data.hasPopup||null!==(r=e.data.titleObj)&&void 0!==r&&r.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(i=e.data.richText)&&void 0!==i&&i.str);return t.call(this,e,{isRenderable:o,ignoreBorder:!0,createQuadrilaterals:!0})}return _createClass(n,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.classList.add("highlightAnnotation"),this.container)}}]),n}(h),L=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i;_classCallCheck(this,n);var o=!!(e.data.hasPopup||null!==(r=e.data.titleObj)&&void 0!==r&&r.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(i=e.data.richText)&&void 0!==i&&i.str);return t.call(this,e,{isRenderable:o,ignoreBorder:!0,createQuadrilaterals:!0})}return _createClass(n,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.classList.add("underlineAnnotation"),this.container)}}]),n}(h),N=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i;_classCallCheck(this,n);var o=!!(e.data.hasPopup||null!==(r=e.data.titleObj)&&void 0!==r&&r.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(i=e.data.richText)&&void 0!==i&&i.str);return t.call(this,e,{isRenderable:o,ignoreBorder:!0,createQuadrilaterals:!0})}return _createClass(n,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.classList.add("squigglyAnnotation"),this.container)}}]),n}(h),j=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i;_classCallCheck(this,n);var o=!!(e.data.hasPopup||null!==(r=e.data.titleObj)&&void 0!==r&&r.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(i=e.data.richText)&&void 0!==i&&i.str);return t.call(this,e,{isRenderable:o,ignoreBorder:!0,createQuadrilaterals:!0})}return _createClass(n,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.classList.add("strikeoutAnnotation"),this.container)}}]),n}(h),G=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,a,i;_classCallCheck(this,n);var o=!!(e.data.hasPopup||null!==(r=e.data.titleObj)&&void 0!==r&&r.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(i=e.data.richText)&&void 0!==i&&i.str);return t.call(this,e,{isRenderable:o,ignoreBorder:!0})}return _createClass(n,[{key:"render",value:function(){return this.container.classList.add("stampAnnotation"),this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),n}(h),z=function(e){_inherits(n,e);var t=_createSuper(n);function n(e){var r,i;_classCallCheck(this,n);var o=(i=t.call(this,e,{isRenderable:!0})).data.file,s=o.filename,l=o.content;return i.filename=(0,a.getFilenameFromUrl)(s,!0),i.content=l,null===(r=i.linkService.eventBus)||void 0===r||r.dispatch("fileattachmentannotation",{source:_assertThisInitialized(i),filename:s,content:l}),i}return _createClass(n,[{key:"render",value:function(){var e,t,n;return this.container.classList.add("fileAttachmentAnnotation"),this.data.hasAppearance?n=document.createElement("div"):(n=document.createElement("img")).src="".concat(this.imageResourcesPath,"annotation-").concat(/paperclip/i.test(this.data.name)?"paperclip":"pushpin",".svg"),n.classList.add("popupTriggerArea"),n.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&(null!==(e=this.data.titleObj)&&void 0!==e&&e.str||null!==(t=this.data.contentsObj)&&void 0!==t&&t.str||this.data.richText)&&this._createPopup(n,this.data),this.container.append(n),this.container}},{key:"_download",value:function(){var e;null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,this.content,this.filename)}}]),n}(h),B=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"render",value:function(t){var n=t.annotations,o=t.div,s=t.viewport,l=t.accessibilityManager;(0,a.setLayerDimensions)(o,s);var c,h={data:null,layer:o,page:t.page,viewport:s,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new a.DOMSVGFactory,annotationStorage:t.annotationStorage||new i.AnnotationStorage,enableScripting:!0===t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects},f=0,p=_createForOfIteratorHelper(n);try{for(p.s();!(c=p.n()).done;){var v=c.value;if(!v.noHTML){if(v.annotationType!==r.AnnotationType.POPUP){var m=u(v.rect),g=m.width,y=m.height;if(g<=0||y<=0)continue}h.data=v;var _=d.create(h);if(_.isRenderable){var b=_.render();if(v.hidden&&(b.style.visibility="hidden"),Array.isArray(b)){var k,S=_createForOfIteratorHelper(b);try{for(S.s();!(k=S.n()).done;){var w=k.value;w.style.zIndex=f++,_classStaticPrivateMethodGet(e,e,U).call(e,w,v.id,o,l)}}catch(P){S.e(P)}finally{S.f()}}else b.style.zIndex=f++,_ instanceof x?o.prepend(b):_classStaticPrivateMethodGet(e,e,U).call(e,b,v.id,o,l)}}}}catch(P){p.e(P)}finally{p.f()}_classStaticPrivateMethodGet(this,e,W).call(this,o,t.annotationCanvasMap)}},{key:"update",value:function(t){var n=t.annotationCanvasMap,r=t.div,i=t.viewport;(0,a.setLayerDimensions)(r,{rotation:i.rotation}),_classStaticPrivateMethodGet(this,e,W).call(this,r,n),r.hidden=!1}}]),e}();function U(e,t,n,r){var i=e.firstChild||e;i.id="".concat(a.AnnotationPrefix).concat(t),n.append(e),null===r||void 0===r||r.moveElementInDOM(n,e,i,!1)}function W(e,t){if(t){var n,r=_createForOfIteratorHelper(t);try{for(r.s();!(n=r.n()).done;){var a=_slicedToArray(n.value,2),i=a[0],o=a[1],s=e.querySelector('[data-annotation-id="'.concat(i,'"]'));if(s){var l=s.firstChild;l?"CANVAS"===l.nodeName?l.replaceWith(o):l.before(o):s.append(o)}}}catch(c){r.e(c)}finally{r.f()}t.clear()}}t.AnnotationLayer=B},function(e,t){function n(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0;var r=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"CMYK_G",value:function(e){var t=_slicedToArray(e,4),n=t[0],r=t[1],a=t[2],i=t[3];return["G",1-Math.min(1,.3*n+.59*a+.11*r+i)]}},{key:"G_CMYK",value:function(e){return["CMYK",0,0,0,1-_slicedToArray(e,1)[0]]}},{key:"G_RGB",value:function(e){var t=_slicedToArray(e,1)[0];return["RGB",t,t,t]}},{key:"G_HTML",value:function(e){var t=n(_slicedToArray(e,1)[0]);return"#".concat(t).concat(t).concat(t)}},{key:"RGB_G",value:function(e){var t=_slicedToArray(e,3);return["G",.3*t[0]+.59*t[1]+.11*t[2]]}},{key:"RGB_HTML",value:function(e){var t=_slicedToArray(e,3),r=t[0],a=t[1],i=t[2],o=n(r),s=n(a),l=n(i);return"#".concat(o).concat(s).concat(l)}},{key:"T_HTML",value:function(){return"#00000000"}},{key:"CMYK_RGB",value:function(e){var t=_slicedToArray(e,4),n=t[0],r=t[1],a=t[2],i=t[3];return["RGB",1-Math.min(1,n+i),1-Math.min(1,a+i),1-Math.min(1,r+i)]}},{key:"CMYK_HTML",value:function(e){var t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}},{key:"RGB_CMYK",value:function(e){var t=_slicedToArray(e,3),n=1-t[0],r=1-t[1],a=1-t[2];return["CMYK",n,r,a,Math.min(n,r,a)]}}]),e}();t.ColorConverters=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var r=n(19),a=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"setupStorage",value:function(e,t,n,r,a){var i=r.getValue(t,{value:null});switch(n.name){case"textarea":if(null!==i.value&&(e.textContent=i.value),"print"===a)break;e.addEventListener("input",(function(e){r.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===n.attributes.type||"checkbox"===n.attributes.type){if(i.value===n.attributes.xfaOn?e.setAttribute("checked",!0):i.value===n.attributes.xfaOff&&e.removeAttribute("checked"),"print"===a)break;e.addEventListener("change",(function(e){r.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==i.value&&e.setAttribute("value",i.value),"print"===a)break;e.addEventListener("input",(function(e){r.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==i.value){var o,s=_createForOfIteratorHelper(n.children);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.attributes.value===i.value&&(l.attributes.selected=!0)}}catch(c){s.e(c)}finally{s.f()}}e.addEventListener("input",(function(e){var n=e.target.options,a=-1===n.selectedIndex?"":n[n.selectedIndex].value;r.setValue(t,{value:a})}))}}},{key:"setAttributes",value:function(e){var t=e.html,n=e.element,r=e.storage,a=void 0===r?null:r,i=e.intent,o=e.linkService,s=n.attributes,l=t instanceof HTMLAnchorElement;"radio"===s.type&&(s.name="".concat(s.name,"-").concat(i));for(var c=0,u=Object.entries(s);c0;){var d,h=s.at(-1),f=_slicedToArray(h,3),p=f[0],v=f[1],m=f[2];if(v+1!==p.children.length){var g=p.children[++s.at(-1)[1]];if(null!==g){var y=g.name;if("#text"!==y){var _=void 0;if(_=null!==g&&void 0!==g&&null!==(d=g.attributes)&&void 0!==d&&d.xmlns?document.createElementNS(g.attributes.xmlns,y):document.createElement(y),m.append(_),g.attributes&&this.setAttributes({html:_,element:g,storage:t,intent:i,linkService:n}),g.children&&g.children.length>0)s.push([g,-1,_]);else if(g.value){var b=document.createTextNode(g.value);r.XfaText.shouldBuildText(y)&&u.push(b),_.append(b)}}else{var k=document.createTextNode(g.value);u.push(k),m.append(k)}}}else s.pop()}var S,w=_createForOfIteratorHelper(l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"));try{for(w.s();!(S=w.n()).done;)S.value.setAttribute("readOnly",!0)}catch(P){w.e(P)}finally{w.f()}return{textDivs:u}}},{key:"update",value:function(e){var t="matrix(".concat(e.viewport.transform.join(","),")");e.div.style.transform=t,e.div.hidden=!1}}]),e}();t.XfaLayer=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var r=n(6),a=n(1),i=n(10),o=_createClass((function e(){_classCallCheck(this,e),(0,a.unreachable)("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)},l=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]),")")},c={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},u=["butt","round","square"],d=["miter","round","bevel"],h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&"undefined"!==typeof Blob&&!n)return URL.createObjectURL(new Blob([e],{type:t}));for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a="data:".concat(t,";base64,"),i=0,o=e.length;i>2]+r[(3&s)<<4|l>>4]+r[i+1>6:64]+r[i+2>1&2147483647:r>>1&2147483647;t[n]=r}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>>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 l(e){var t=e.length,n=65535,r=Math.ceil(t/n),a=new Uint8Array(2+t+5*r+4),i=0;a[i++]=120,a[i++]=156;for(var o=0;t>n;)a[i++]=0,a[i++]=255,a[i++]=255,a[i++]=0,a[i++]=0,a.set(e.subarray(o,o+n),i),i+=n,o+=n,t-=n;a[i++]=1,a[i++]=255&t,a[i++]=t>>8&255,a[i++]=255&~t,a[i++]=(65535&~t)>>8&255,a.set(e.subarray(o),i),i+=e.length-o;var s=function(e,t,n){for(var r=1,a=0,i=t;i>24&255,a[i++]=s>>16&255,a[i++]=s>>8&255,a[i++]=255&s,a}function c(t,n,r,o){var c,u,d,f=t.width,p=t.height,v=t.data;switch(n){case a.ImageKind.GRAYSCALE_1BPP:u=0,c=1,d=f+7>>3;break;case a.ImageKind.RGB_24BPP:u=2,c=8,d=3*f;break;case a.ImageKind.RGBA_32BPP:u=6,c=8,d=4*f;break;default:throw new Error("invalid format")}for(var m=new Uint8Array((1+d)*p),g=0,y=0,_=0;_>24&255,f>>16&255,f>>8&255,255&f,p>>24&255,p>>16&255,p>>8&255,255&p,c,u,0,0,0]),w=function(e){if(!i.isNodeJS)return l(e);try{var t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);var n=__webpack_require__(2258).deflateSync(t,{level:9});return n instanceof Uint8Array?n:new Uint8Array(n)}catch(r){(0,a.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+r)}return l(e)}(m),P=e.length+36+S.length+w.length,x=new Uint8Array(P),A=0;return x.set(e,A),s("IHDR",S,x,A+=e.length),s("IDATA",w,x,A+=12+S.length),A+=12+w.length,s("IEND",new Uint8Array(0),x,A),h(x,"image/png",r)}return function(e,t,n){return c(e,void 0===e.kind?a.ImageKind.GRAYSCALE_1BPP:e.kind,t,n)}}(),p=function(){function e(){_classCallCheck(this,e),this.fontSizeScale=1,this.fontWeight=c.fontWeight,this.fontSize=0,this.textMatrix=a.IDENTITY_MATRIX,this.fontMatrix=a.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=a.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=c.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}(),v=0,m=0,g=0;t.SVGGraphics=o=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var o in _classCallCheck(this,e),(0,r.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new r.DOMSVGFactory,this.current=new p,this.transformMatrix=a.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=[],a.OPS)this._operatorIdMapping[a.OPS[o]]=o}return _createClass(e,[{key:"getObject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"===typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}},{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,r=e.argsArray,i=0,o=n.length;i0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=u[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=a.Util.makeHexColor(e,t,n)}},{key:"setFillAlpha",value:function(e){this.current.fillAlpha=e}},{key:"setFillRGBColor",value:function(e,t,n){this.current.fillColor=a.Util.makeHexColor(e,t,n),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}},{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,r=a.Util.inverseTransform(this.transformMatrix),i=a.Util.applyTransform([0,0],r),o=a.Util.applyTransform([0,n],r),s=a.Util.applyTransform([t,0],r),l=a.Util.applyTransform([t,n],r),c=Math.min(i[0],o[0],s[0],l[0]),u=Math.min(i[1],o[1],s[1],l[1]),d=Math.max(i[0],o[0],s[0],l[0]),h=Math.max(i[1],o[1],s[1],l[1]),f=this.svgFactory.createElement("svg:rect");f.setAttributeNS(null,"x",c),f.setAttributeNS(null,"y",u),f.setAttributeNS(null,"width",d-c),f.setAttributeNS(null,"height",h-u),f.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&f.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(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],r=e[3]||a.IDENTITY_MATRIX,i=_slicedToArray(e[4],4),o=i[0],s=i[1],l=i[2],c=i[3],u=e[5],d=e[6],h=e[7],f="shading".concat(g++),p=a.Util.normalizeRect([].concat(_toConsumableArray(a.Util.applyTransform([o,s],r)),_toConsumableArray(a.Util.applyTransform([l,c],r)))),v=_slicedToArray(p,4),m=v[0],y=v[1],_=v[2],b=v[3],k=a.Util.singularValueDecompose2dScale(r),S=_slicedToArray(k,2),w=u*S[0],P=d*S[1],x=this.svgFactory.createElement("svg:pattern");x.setAttributeNS(null,"id",f),x.setAttributeNS(null,"patternUnits","userSpaceOnUse"),x.setAttributeNS(null,"width",w),x.setAttributeNS(null,"height",P),x.setAttributeNS(null,"x","".concat(m)),x.setAttributeNS(null,"y","".concat(y));var A=this.svg,C=this.transformMatrix,F=this.current.fillColor,E=this.current.strokeColor,T=this.svgFactory.create(_-m,b-y);if(this.svg=T,this.transformMatrix=r,2===h){var M,R=(M=a.Util).makeHexColor.apply(M,_toConsumableArray(t));this.current.fillColor=R,this.current.strokeColor=R}return this.executeOpTree(this.convertOpList(n)),this.svg=A,this.transformMatrix=C,this.current.fillColor=F,this.current.strokeColor=E,x.append(T.childNodes[0]),this.defs.append(x),"url(#".concat(f,")")}},{key:"_makeShadingPattern",value:function(e){switch("string"===typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":var t,n="shading".concat(g++),r=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],l=e[5],c=e[6],u=e[7];(t=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",n),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",l[0]),t.setAttributeNS(null,"cy",l[1]),t.setAttributeNS(null,"r",u),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",c);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var d,h=_createForOfIteratorHelper(r);try{for(h.s();!(d=h.n()).done;){var f=d.value,p=this.svgFactory.createElement("svg:stop");p.setAttributeNS(null,"offset",f[0]),p.setAttributeNS(null,"stop-color",f[1]),t.append(p)}}catch(v){h.e(v)}finally{h.f()}return this.defs.append(t),"url(#".concat(n,")");case"Mesh":return(0,a.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,r=this.current,i=r.x,o=r.y,l=[],c=0,u=_createForOfIteratorHelper(e);try{for(u.s();!(n=u.n()).done;)switch(0|n.value){case a.OPS.rectangle:i=t[c++],o=t[c++];var d=t[c++],h=t[c++],f=i+d,p=o+h;l.push("M",s(i),s(o),"L",s(f),s(o),"L",s(f),s(p),"L",s(i),s(p),"Z");break;case a.OPS.moveTo:i=t[c++],o=t[c++],l.push("M",s(i),s(o));break;case a.OPS.lineTo:i=t[c++],o=t[c++],l.push("L",s(i),s(o));break;case a.OPS.curveTo:i=t[c+4],o=t[c+5],l.push("C",s(t[c]),s(t[c+1]),s(t[c+2]),s(t[c+3]),s(i),s(o)),c+=6;break;case a.OPS.curveTo2:l.push("C",s(i),s(o),s(t[c]),s(t[c+1]),s(t[c+2]),s(t[c+3])),i=t[c+2],o=t[c+3],c+=4;break;case a.OPS.curveTo3:i=t[c+2],o=t[c+3],l.push("C",s(t[c]),s(t[c+1]),s(i),s(o),s(i),s(o)),c+=4;break;case a.OPS.closePath:l.push("Z")}}catch(v){u.e(v)}finally{u.f()}l=l.join(" "),r.path&&e.length>0&&e[0]!==a.OPS.rectangle&&e[0]!==a.OPS.moveTo?l=r.path.getAttributeNS(null,"d")+l:(r.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(r.path)),r.path.setAttributeNS(null,"d",l),r.path.setAttributeNS(null,"fill","none"),r.element=r.path,r.setCurrentPoint(i,o)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(v++),n=this.svgFactory.createElement("svg:clipPath");n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"transform",l(this.transformMatrix));var r=e.element.cloneNode(!0);if("evenodd"===this.pendingClip?r.setAttributeNS(null,"clip-rule","evenodd"):r.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,n.append(r),this.defs.append(n),e.activeClipUrl){e.clipGroup=null;var a,i=_createForOfIteratorHelper(this.extraStack);try{for(i.s();!(a=i.n()).done;)a.value.clipGroup=null}catch(o){i.e(o)}finally{i.f()}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 r=_slicedToArray(t.value,2),i=r[0],o=r[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,a.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(){var e;null===(e=this.current.element)||void 0===e||e.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function(){var e;null===(e=this.current.element)||void 0===e||e.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().append(e)}},{key:"paintImageXObject",value:function(e){var t=this.getObject(e);t?this.paintInlineImageXObject(t):(0,a.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("http://www.w3.org/1999/xlink","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.append(o):this._ensureTransformGroup().append(o)}},{key:"paintImageMaskXObject",value:function(e){var t=this.getObject(e.data,e);if(t.bitmap)(0,a.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");else{var n=this.current,r=t.width,i=t.height,o=n.fillColor;n.maskId="mask".concat(m++);var l=this.svgFactory.createElement("svg:mask");l.setAttributeNS(null,"id",n.maskId);var c=this.svgFactory.createElement("svg:rect");c.setAttributeNS(null,"x","0"),c.setAttributeNS(null,"y","0"),c.setAttributeNS(null,"width",s(r)),c.setAttributeNS(null,"height",s(i)),c.setAttributeNS(null,"fill",o),c.setAttributeNS(null,"mask","url(#".concat(n.maskId,")")),this.defs.append(l),this._ensureTransformGroup().append(c),this.paintInlineImageXObject(t,l)}}},{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.append(n),this.defs=n;var r=this.svgFactory.createElement("svg:g");return r.setAttributeNS(null,"transform",l(e.transform)),t.append(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.append(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",l(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}]),e}()}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__w_pdfjs_require__),n.exports}var __nested_webpack_exports__={};return function(){var e=__nested_webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AbortException",{enumerable:!0,get:function(){return t.AbortException}}),Object.defineProperty(e,"AnnotationEditorLayer",{enumerable:!0,get:function(){return i.AnnotationEditorLayer}}),Object.defineProperty(e,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return t.AnnotationEditorParamsType}}),Object.defineProperty(e,"AnnotationEditorType",{enumerable:!0,get:function(){return t.AnnotationEditorType}}),Object.defineProperty(e,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return o.AnnotationEditorUIManager}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return s.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(e,"FeatureTest",{enumerable:!0,get:function(){return t.FeatureTest}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return n.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return r.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return n.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return r.PixelsPerInch}}),Object.defineProperty(e,"PromiseCapability",{enumerable:!0,get:function(){return t.PromiseCapability}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return r.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return c.SVGGraphics}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return u.XfaLayer}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return n.build}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return n.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return r.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return r.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return r.getXfaPageViewport}}),Object.defineProperty(e,"isDataScheme",{enumerable:!0,get:function(){return r.isDataScheme}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return r.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"normalizeUnicode",{enumerable:!0,get:function(){return t.normalizeUnicode}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return a.renderTextLayer}}),Object.defineProperty(e,"setLayerDimensions",{enumerable:!0,get:function(){return r.setLayerDimensions}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"updateTextLayer",{enumerable:!0,get:function(){return a.updateTextLayer}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return n.version}});var t=__w_pdfjs_require__(1),n=__w_pdfjs_require__(2),r=__w_pdfjs_require__(6),a=__w_pdfjs_require__(26),i=__w_pdfjs_require__(27),o=__w_pdfjs_require__(5),s=__w_pdfjs_require__(32),l=__w_pdfjs_require__(14),c=__w_pdfjs_require__(35),u=__w_pdfjs_require__(34)}(),__nested_webpack_exports__}()},module.exports=factory()},888:function(e,t,n){"use strict";var r=n(9047);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},2007:function(e,t,n){e.exports=n(888)()},9047:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4463:function(e,t,n){"use strict";var r=n(2791),a=n(5296);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n