1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1648],{89469:function(e,a,u){"use strict";var b,y=u(67294),_=u(99299);function n(e){var a=Object.create(null);return e&&Object.keys(e).forEach(function(u){if("default"!==u){var b=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(a,u,b.get?b:{enumerable:!0,get:function(){return e[u]}})}}),a.default=e,Object.freeze(a)}var E,S=n(y),P=n(_);a.AnnotationType=void 0,(E=a.AnnotationType||(a.AnnotationType={}))[E.Text=1]="Text",E[E.Link=2]="Link",E[E.FreeText=3]="FreeText",E[E.Line=4]="Line",E[E.Square=5]="Square",E[E.Circle=6]="Circle",E[E.Polygon=7]="Polygon",E[E.Polyline=8]="Polyline",E[E.Highlight=9]="Highlight",E[E.Underline=10]="Underline",E[E.Squiggly=11]="Squiggly",E[E.StrikeOut=12]="StrikeOut",E[E.Stamp=13]="Stamp",E[E.Caret=14]="Caret",E[E.Ink=15]="Ink",E[E.Popup=16]="Popup",E[E.FileAttachment=17]="FileAttachment";var i=function(e,a){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(e[u]=a[u])})(e,a)};function c(e,a){if("function"!=typeof a&&null!==a)throw TypeError("Class extends value "+String(a)+" is not a constructor or null");function n(){this.constructor=e}i(e,a),e.prototype=null===a?Object.create(a):(n.prototype=a.prototype,new n)}var O,l=function(){return(l=Object.assign||function(e){for(var a,u=1,b=arguments.length;u<b;u++)for(var y in a=arguments[u])Object.prototype.hasOwnProperty.call(a,y)&&(e[y]=a[y]);return e}).apply(this,arguments)};a.TextDirection=void 0,(O=a.TextDirection||(a.TextDirection={})).RightToLeft="RTL",O.LeftToRight="LTR";var F,I=S.createContext({currentTheme:"light",direction:a.TextDirection.LeftToRight,setCurrentTheme:function(){}}),d=function(e){var a=[];return Object.keys(e).forEach(function(u){u&&e[u]&&a.push(u)}),a.join(" ")},A="undefined"!=typeof window?S.useLayoutEffect:S.useEffect,g=function(e){var a=S.useRef(null),u=e.once,b=e.threshold,y=e.onVisibilityChanged;return A(function(){var e=a.current;if(e){var _=new IntersectionObserver(function(a){a.forEach(function(a){var b=a.isIntersecting;y({isVisible:b,ratio:a.intersectionRatio}),b&&u&&(_.unobserve(e),_.disconnect())})},{threshold:b||0});return _.observe(e),function(){_.unobserve(e),_.disconnect()}}},[]),a},v=function(e){var u=e.children,b=e.ignoreDirection,y=e.size,_=S.useContext(I).direction,E=!(void 0!==b&&b)&&_===a.TextDirection.RightToLeft,P="".concat((void 0===y?24:y)||24,"px");return S.createElement("svg",{"aria-hidden":"true",className:d({"rpv-core__icon":!0,"rpv-core__icon--rtl":E}),focusable:"false",height:P,viewBox:"0 0 24 24",width:P},u)},h=function(){return S.createElement(v,{size:16},S.createElement("path",{d:"M23.5,0.499l-16.5,23l-6.5-6.5"}))},m=function(e){var u=e.children,b=e.testId,y=e.onClick,_=S.useContext(I).direction===a.TextDirection.RightToLeft,E=b?{"data-testid":b}:{};return S.createElement("button",l({className:d({"rpv-core__primary-button":!0,"rpv-core__primary-button--rtl":_}),type:"button",onClick:y},E),u)},x=function(e){var a=e.size,u=void 0===a?"4rem":a,b=e.testId,y=S.useState(!1),_=y[0],E=y[1],P=b?{"data-testid":b}:{},O=g({onVisibilityChanged:function(e){E(e.isVisible)}});return S.createElement("div",l({},P,{className:d({"rpv-core__spinner":!0,"rpv-core__spinner--animating":_}),ref:O,style:{height:u,width:u}}))},w=function(e){var u=e.ariaLabel,b=e.autoFocus,y=void 0!==b&&b,_=e.placeholder,E=e.testId,P=e.type,O=e.value,F=e.onChange,H=e.onKeyDown,j=S.useContext(I).direction,Z=S.useRef(),J={ref:Z,"data-testid":"","aria-label":void 0===u?"":u,className:d({"rpv-core__textbox":!0,"rpv-core__textbox--rtl":j===a.TextDirection.RightToLeft}),placeholder:void 0===_?"":_,value:void 0===O?"":O,onChange:function(e){return F(e.target.value)},onKeyDown:void 0===H?function(){}:H};return E&&(J["data-testid"]=E),A(function(){if(y){var e=Z.current;if(e){var a=window.scrollX,u=window.scrollY;e.focus(),window.scrollTo(a,u)}}},[]),"text"===(void 0===P?"text":P)?S.createElement("input",l({type:"text"},J)):S.createElement("input",l({type:"password"},J))};(H=F||(F={}))[H.ExitFullScreen=0]="ExitFullScreen",H[H.FullScreenChange=1]="FullScreenChange",H[H.FullScreenElement=2]="FullScreenElement",H[H.FullScreenEnabled=3]="FullScreenEnabled",H[H.RequestFullScreen=4]="RequestFullScreen";var H,j,Z={ExitFullScreen:"exitFullscreen",FullScreenChange:"fullscreenchange",FullScreenElement:"fullscreenElement",FullScreenEnabled:"fullscreenEnabled",RequestFullScreen:"requestFullscreen"},J={ExitFullScreen:"webkitExitFullscreen",FullScreenChange:"webkitfullscreenchange",FullScreenElement:"webkitFullscreenElement",FullScreenEnabled:"webkitFullscreenEnabled",RequestFullScreen:"webkitRequestFullscreen"},G={ExitFullScreen:"msExitFullscreen",FullScreenChange:"msFullscreenChange",FullScreenElement:"msFullscreenElement",FullScreenEnabled:"msFullscreenEnabled",RequestFullScreen:"msRequestFullscreen"},Y="undefined"!=typeof window,K=Y&&(F.FullScreenEnabled in document&&Z||J.FullScreenEnabled in document&&J||G.FullScreenEnabled in document&&G)||Z,R=function(){return Y&&K.FullScreenEnabled in document&&!0===document[K.FullScreenEnabled]},M=function(e){return Y?e[K.ExitFullScreen]():Promise.resolve({})},k=function(){return Y?document[K.FullScreenElement]:null},C=function(e,a){var u=S.useRef(),r=function(){u.current&&clearTimeout(u.current)};return S.useEffect(function(){return function(){return r()}},[]),S.useCallback(function(){for(var b=[],y=0;y<arguments.length;y++)b[y]=arguments[y];r(),u.current=setTimeout(function(){e.apply(void 0,b)},a)},[e,a])},T=function(){var e=S.useRef(!1);return S.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),e},L=function(e){var a=S.useRef(e);return S.useEffect(function(){a.current=e},[e]),a.current};(X=j||(j={})).NotRenderedYet="NotRenderedYet",X.Rendering="Rendering",X.Rendered="Rendered";var X,Q,D=function(e){var a=e.doc,u=a.numPages,b=a.loadingTask.docId,y=S.useMemo(function(){return Array(u).fill(null).map(function(e,a){return{pageIndex:a,renderStatus:j.NotRenderedYet,visibility:-9999}})},[b]),_=S.useRef({currentRenderingPage:-1,startRange:0,endRange:u-1,visibilities:y}),c=function(e,a){_.current.visibilities[e].visibility=a};return{getHighestPriorityPage:function(){var e=_.current.visibilities.slice(_.current.startRange,_.current.endRange+1).filter(function(e){return e.visibility>-9999});if(!e.length)return -1;for(var a=e[0].pageIndex,b=e[e.length-1].pageIndex,y=e.length,E=0;E<y;E++){if(e[E].renderStatus===j.Rendering)return -1;if(e[E].renderStatus===j.NotRenderedYet)return e[E].pageIndex}return b+1<u&&_.current.visibilities[b+1].renderStatus!==j.Rendered?b+1:a-1>=0&&_.current.visibilities[a-1].renderStatus!==j.Rendered?a-1:-1},isInRange:function(e){return e>=_.current.startRange&&e<=_.current.endRange},markNotRendered:function(){for(var e=0;e<u;e++)_.current.visibilities[e].renderStatus=j.NotRenderedYet},markRendered:function(e){_.current.visibilities[e].renderStatus=j.Rendered},markRendering:function(e){-1!==_.current.currentRenderingPage&&_.current.currentRenderingPage!==e&&_.current.visibilities[_.current.currentRenderingPage].renderStatus===j.Rendering&&(_.current.visibilities[_.current.currentRenderingPage].renderStatus=j.NotRenderedYet),_.current.visibilities[e].renderStatus=j.Rendering,_.current.currentRenderingPage=e},setOutOfRange:function(e){c(e,-9999)},setRange:function(e,a){_.current.startRange=e,_.current.endRange=a;for(var b=0;b<u;b++)(b<e||b>a)&&(_.current.visibilities[b].visibility=-9999,_.current.visibilities[b].renderStatus=j.NotRenderedYet)},setVisibility:c}
1},en={core:{askingPassword:{requirePasswordToOpen:"This document requires a password to open",submit:"Submit"},wrongPassword:{tryAgain:"The password is wrong. Please try again"},pageLabel:"Page {{pageIndex}}"}},er=S.createContext({l10n:en,setL10n:function(){}}),eo=0,N=function(){return eo++},V=function(e,a,u){var r=function(e){var b=a.current;if(b){var y=e.target;if(y instanceof Element&&y.shadowRoot){var _=e.composedPath();_.length>0&&!b.contains(_[0])&&u()}else b.contains(y)||u()}};S.useEffect(function(){if(e){var a={capture:!0};return document.addEventListener("click",r,a),function(){document.removeEventListener("click",r,a)}}},[])},z=function(e){var t=function(a){"Escape"===a.key&&e()};S.useEffect(function(){return document.addEventListener("keyup",t),function(){document.removeEventListener("keyup",t)}},[])},B=function(e){var u=e.ariaControlsSuffix,b=e.children,y=e.closeOnClickOutside,_=e.closeOnEscape,E=e.onToggle,P=S.useRef(),O=S.useContext(I).direction===a.TextDirection.RightToLeft;return S.useEffect(function(){var e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=e}},[]),z(function(){P.current&&_&&E()}),V(y,P,E),A(function(){var e=P.current;if(e){var a=.75*document.body.clientHeight;e.getBoundingClientRect().height>=a&&(e.style.overflow="auto",e.style.maxHeight="".concat(a,"px"))}},[]),S.createElement("div",{"aria-modal":"true",className:d({"rpv-core__modal-body":!0,"rpv-core__modal-body--rtl":O}),id:"rpv-core__modal-body-".concat(u),ref:P,role:"dialog",tabIndex:-1},b)},W=function(e){var a=e.children;return S.createElement("div",{className:"rpv-core__modal-overlay"},a)};a.ToggleStatus=void 0,(Q=a.ToggleStatus||(a.ToggleStatus={})).Close="Close",Q.Open="Open",Q.Toggle="Toggle";var ea,q=function(e){var u=S.useState(e),b=u[0],y=u[1];return{opened:b,toggle:function(e){switch(e){case a.ToggleStatus.Close:y(!1);break;case a.ToggleStatus.Open:y(!0);break;case a.ToggleStatus.Toggle:default:y(function(e){return!e})}}}},U=function(e){var a=e.content,u=e.isOpened,b=e.target,y=q(void 0!==u&&u),_=y.opened,E=y.toggle;return S.createElement(S.Fragment,null,b&&b(E,_),_&&a(E))};a.Position=void 0,(ea=a.Position||(a.Position={})).TopLeft="TOP_LEFT",ea.TopCenter="TOP_CENTER",ea.TopRight="TOP_RIGHT",ea.RightTop="RIGHT_TOP",ea.RightCenter="RIGHT_CENTER",ea.RightBottom="RIGHT_BOTTOM",ea.BottomLeft="BOTTOM_LEFT",ea.BottomCenter="BOTTOM_CENTER",ea.BottomRight="BOTTOM_RIGHT",ea.LeftTop="LEFT_TOP",ea.LeftCenter="LEFT_CENTER",ea.LeftBottom="LEFT_BOTTOM";var ei,ec,el,eu,es,ed,ep,ef,ee=function(e,u,b,y,_){A(function(){var E=u.current,S=e.current,P=b.current;if(S&&E&&P){var O=P.getBoundingClientRect(),F=function(e,u,b,y){var _=u.getBoundingClientRect(),E=e.getBoundingClientRect(),S=E.height,P=E.width,O=0,F=0;switch(b){case a.Position.TopLeft:O=_.top-S,F=_.left;break;case a.Position.TopCenter:O=_.top-S,F=_.left+_.width/2-P/2;break;case a.Position.TopRight:O=_.top-S,F=_.left+_.width-P;break;case a.Position.RightTop:O=_.top,F=_.left+_.width;break;case a.Position.RightCenter:O=_.top+_.height/2-S/2,F=_.left+_.width;break;case a.Position.RightBottom:O=_.top+_.height-S,F=_.left+_.width;break;case a.Position.BottomLeft:O=_.top+_.height,F=_.left;break;case a.Position.BottomCenter:O=_.top+_.height,F=_.left+_.width/2-P/2;break;case a.Position.BottomRight:O=_.top+_.height,F=_.left+_.width-P;break;case a.Position.LeftTop:O=_.top,F=_.left-P;break;case a.Position.LeftCenter:O=_.top+_.height/2-S/2,F=_.left-P;break;case a.Position.LeftBottom:O=_.top+_.height-S,F=_.left-P}return{left:F+(y.left||0),top:O+(y.top||0)}}(S,E,y,_),I=F.top,A=F.left;S.style.top="".concat(I-O.top,"px"),S.style.left="".concat(A-O.left,"px")}},[])},te=function(e){var u,b=e.customClassName,y=e.position;return S.createElement("div",{className:d(((u={"rpv-core__arrow":!0,"rpv-core__arrow--tl":y===a.Position.TopLeft,"rpv-core__arrow--tc":y===a.Position.TopCenter,"rpv-core__arrow--tr":y===a.Position.TopRight,"rpv-core__arrow--rt":y===a.Position.RightTop,"rpv-core__arrow--rc":y===a.Position.RightCenter,"rpv-core__arrow--rb":y===a.Position.RightBottom,"rpv-core__arrow--bl":y===a.Position.BottomLeft,"rpv-core__arrow--bc":y===a.Position.BottomCenter,"rpv-core__arrow--br":y===a.Position.BottomRight,"rpv-core__arrow--lt":y===a.Position.LeftTop,"rpv-core__arrow--lc":y===a.Position.LeftCenter,"rpv-core__arrow--lb":y===a.Position.LeftBottom})["".concat(b)]=""!==b,u))})}
1,ne=function(e){var u=e.ariaControlsSuffix,b=e.children,y=e.closeOnClickOutside,_=e.offset,E=e.position,P=e.targetRef,O=e.onClose,F=S.useRef(),H=S.useRef(),j=S.useRef(),Z=S.useContext(I).direction===a.TextDirection.RightToLeft;V(y,F,O),ee(F,P,j,E,_),A(function(){var e=H.current;if(e){var a=.75*document.body.clientHeight;e.getBoundingClientRect().height>=a&&(e.style.overflow="auto",e.style.maxHeight="".concat(a,"px"))}},[]);var J="rpv-core__popover-body-inner-".concat(u);return S.createElement(S.Fragment,null,S.createElement("div",{ref:j,style:{left:0,position:"absolute",top:0}}),S.createElement("div",{"aria-describedby":J,className:d({"rpv-core__popover-body":!0,"rpv-core__popover-body--rtl":Z}),id:"rpv-core__popover-body-".concat(u),ref:F,role:"dialog",tabIndex:-1},S.createElement(te,{customClassName:"rpv-core__popover-body-arrow",position:E}),S.createElement("div",{id:J,ref:H},b)))},re=function(e){var a=e.closeOnEscape,u=e.onClose,b=S.useRef();return z(function(){b.current&&a&&u()}),S.createElement("div",{className:"rpv-core__popover-overlay",ref:b})},oe=function(e){var u=e.ariaControlsSuffix,b=e.children,y=e.contentRef,_=e.offset,E=e.position,P=e.targetRef,O=S.useRef(),F=S.useContext(I).direction===a.TextDirection.RightToLeft;return ee(y,P,O,E,_),S.createElement(S.Fragment,null,S.createElement("div",{ref:O,style:{left:0,position:"absolute",top:0}}),S.createElement("div",{className:d({"rpv-core__tooltip-body":!0,"rpv-core__tooltip-body--rtl":F}),id:"rpv-core__tooltip-body-".concat(u),ref:y,role:"tooltip"},S.createElement(te,{customClassName:"rpv-core__tooltip-body-arrow",position:E}),S.createElement("div",{className:"rpv-core__tooltip-body-content"},b)))};a.FullScreenMode=void 0,(ei=a.FullScreenMode||(a.FullScreenMode={})).Normal="Normal",ei.Entering="Entering",ei.Entered="Entered",ei.EnteredCompletely="EnteredCompletely",ei.Exitting="Exitting",ei.Exited="Exited",a.LayerRenderStatus=void 0,(ec=a.LayerRenderStatus||(a.LayerRenderStatus={}))[ec.PreRender=0]="PreRender",ec[ec.DidRender=1]="DidRender",a.PageMode=void 0,(el=a.PageMode||(a.PageMode={})).Attachments="UseAttachments",el.Bookmarks="UseOutlines",el.ContentGroup="UseOC",el.Default="UserNone",el.FullScreen="FullScreen",el.Thumbnails="UseThumbs",a.PasswordStatus=void 0,(eu=a.PasswordStatus||(a.PasswordStatus={})).RequiredPassword="RequiredPassword",eu.WrongPassword="WrongPassword",a.RotateDirection=void 0,(es=a.RotateDirection||(a.RotateDirection={})).Backward="Backward",es.Forward="Forward",a.ScrollMode=void 0,(ed=a.ScrollMode||(a.ScrollMode={})).Page="Page",ed.Horizontal="Horizontal",ed.Vertical="Vertical",ed.Wrapped="Wrapped",a.SpecialZoomLevel=void 0,(ep=a.SpecialZoomLevel||(a.SpecialZoomLevel={})).ActualSize="ActualSize",ep.PageFit="PageFit",ep.PageWidth="PageWidth",a.ViewMode=void 0,(ef=a.ViewMode||(a.ViewMode={})).DualPage="DualPage",ef.DualPageWithCover="DualPageWithCover",ef.SinglePage="SinglePage";var eg,ie=function(e,a){return e.reduce(function(e,u,b){return b%a?e[e.length-1].push(u):e.push([u]),e},[])},ce=function(e,u){switch(u[1].name){case"XYZ":return{bottomOffset:function(e,a){return null===u[3]?a:u[3]},leftOffset:function(e,a){return null===u[2]?0:u[2]},pageIndex:e,scaleTo:u[4]};case"Fit":case"FitB":return{bottomOffset:0,leftOffset:0,pageIndex:e,scaleTo:a.SpecialZoomLevel.PageFit};case"FitH":case"FitBH":return{bottomOffset:u[2],leftOffset:0,pageIndex:e,scaleTo:a.SpecialZoomLevel.PageWidth};default:return{bottomOffset:0,leftOffset:0,pageIndex:e,scaleTo:1}}},eh=new Map,ev=new Map,ue=function(e,a){return"".concat(e.loadingTask.docId,"___").concat(a.num,"R").concat(0===a.gen?"":a.gen)},pe=function(e,a,u){eh.set(ue(e,a),u)},de=function(e,a){if(!e)return Promise.reject("The document is not loaded yet");var u="".concat(e.loadingTask.docId,"___").concat(a),b=ev.get(u);return b?Promise.resolve(b):new Promise(function(b,y){e.getPage(a+1).then(function(y){ev.set(u,y),y.ref&&pe(e,y.ref,a),b(y)})})},fe=function(e,a){return new Promise(function(u){new Promise(function(u){"string"==typeof a?e.getDestination(a).then(function(e){u(e)}):u(a)}).then(function(b){if("object"==typeof b[0]&&null!==b[0]){var y,_=b[0],E=(y=ue(e,_),eh.has(y)?eh.get(y):null);null===E?e.getPageIndex(_).then(function(b){pe(e,_,b),fe(e,a).then(function(e){return u(e)})}):u(ce(E,b))}else u(ce(b[0],b))})})};(em=eg||(eg={}))[em.Solid=1]="Solid",em[em.Dashed=2]="Dashed",em[em.Beveled=3]="Beveled",em[em.Inset=4]="Inset",em[em.Underline=5]="Underline";
1var em,ew,eb=RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"),he=function(e,a,u,b){var y=parseInt(e,10);return y>=a&&y<=u?y:b},me=function(e){return e.contentsObj?e.contentsObj.str:e.contents||""},xe=function(e){return e.titleObj?e.titleObj.str:e.title||""},we=function(e){var u=e.annotation,b=S.useContext(I).direction,y=xe(u),_=me(u),E=b===a.TextDirection.RightToLeft,P=S.useRef(),O="";if(u.modificationDate){var F=function(e){var a=eb.exec(e);if(!a)return null;var u=parseInt(a[1],10),b=he(a[2],1,12,1)-1,y=he(a[3],1,31,1),_=he(a[4],0,23,0),E=he(a[5],0,59,0),S=he(a[6],0,59,0),P=a[7]||"Z",O=he(a[8],0,23,0),F=he(a[9],0,59,0);switch(P){case"-":_+=O,E+=F;break;case"+":_-=O,E-=F}return new Date(Date.UTC(u,b,y,_,E,S))}(u.modificationDate);O=F?"".concat(F.toLocaleDateString(),", ").concat(F.toLocaleTimeString()):""}return S.useLayoutEffect(function(){if(P.current){var e=document.querySelector('[data-annotation-id="'.concat(u.id,'"]'));if(e)return e.style.zIndex+=1,function(){e.style.zIndex="".concat(parseInt(e.style.zIndex,10)-1)}}},[]),S.createElement("div",{ref:P,className:d({"rpv-core__annotation-popup-wrapper":!0,"rpv-core__annotation-popup-wrapper--rtl":E}),style:{top:u.annotationType===a.AnnotationType.Popup?"":"100%"}},y&&S.createElement(S.Fragment,null,S.createElement("div",{className:d({"rpv-core__annotation-popup-title":!0,"rpv-core__annotation-popup-title--ltr":!E,"rpv-core__annotation-popup-title--rtl":E})},y),S.createElement("div",{className:"rpv-core__annotation-popup-date"},O)),_&&S.createElement("div",{className:"rpv-core__annotation-popup-content"},_.split("\n").map(function(e,a){return S.createElement(S.Fragment,{key:a},e,S.createElement("br",null))})))};(ey=ew||(ew={})).Click="Click",ey.Hover="Hover";var ey,e_,be=function(e){var u,b,y,_,E,P,O,F=e.annotation,I=e.children,A=e.ignoreBorder,H=e.hasPopup,j=e.isRenderable,Z=e.page,J=e.viewport,G=F.rect,Y=(b=(u=q(!1)).opened,y=u.toggle,E=(_=S.useState(ew.Hover))[0],P=_[1],{opened:b,closeOnHover:function(){E===ew.Hover&&y(a.ToggleStatus.Close)},openOnHover:function(){E===ew.Hover&&y(a.ToggleStatus.Open)},toggleOnClick:function(){switch(E){case ew.Click:b&&P(ew.Hover),y(a.ToggleStatus.Toggle);break;case ew.Hover:P(ew.Click),y(a.ToggleStatus.Open)}}}),K=Y.closeOnHover,X=Y.opened,Q=Y.openOnHover,en=Y.toggleOnClick,er=[Math.min((O=[G[0],Z.view[3]+Z.view[1]-G[1],G[2],Z.view[3]+Z.view[1]-G[3]])[0],O[2]),Math.min(O[1],O[3]),Math.max(O[0],O[2]),Math.max(O[1],O[3])],eo=G[2]-G[0],ea=G[3]-G[1],ei={borderColor:"",borderRadius:"",borderStyle:"",borderWidth:""};if(!A&&F.borderStyle.width>0){switch(F.borderStyle.style){case eg.Dashed:ei.borderStyle="dashed";break;case eg.Solid:ei.borderStyle="solid";break;case eg.Underline:ei=Object.assign({borderBottomStyle:"solid"},ei);case eg.Beveled:case eg.Inset:}var ec=F.borderStyle.width;ei.borderWidth="".concat(ec,"px"),F.borderStyle.style!==eg.Underline&&(eo-=2*ec,ea-=2*ec);var el=F.borderStyle,eu=el.horizontalCornerRadius,es=el.verticalCornerRadius;(eu>0||es>0)&&(ei.borderRadius="".concat(eu,"px / ").concat(es,"px")),F.color?ei.borderColor="rgb(".concat(0|F.color[0],", ").concat(0|F.color[1],", ").concat(0|F.color[2],")"):ei.borderWidth="0"}return S.createElement(S.Fragment,null,j&&I({popup:{opened:X,closeOnHover:K,openOnHover:Q,toggleOnClick:en}
1,slot:{attrs:{style:Object.assign({height:"".concat(ea,"px"),left:"".concat(er[0],"px"),top:"".concat(er[1],"px"),transform:"matrix(".concat(J.transform.join(","),")"),transformOrigin:"-".concat(er[0],"px -").concat(er[1],"px"),width:"".concat(eo,"px")},ei)},children:S.createElement(S.Fragment,null,H&&X&&S.createElement(we,{annotation:F}))}}))},ye=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=!1===a.hasPopup,_=xe(a),E=me(a),P=!!(a.hasPopup||_||E);return S.createElement(be,{annotation:a,hasPopup:y,ignoreBorder:!0,isRenderable:P,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--caret","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},Se=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=!1===a.hasPopup,_=xe(a),E=me(a),P=!!(a.hasPopup||_||E),O=a.rect,F=O[2]-O[0],I=O[3]-O[1],A=a.borderStyle.width;return S.createElement(be,{annotation:a,hasPopup:y,ignoreBorder:!0,isRenderable:P,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--circle","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),S.createElement("svg",{height:"".concat(I,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(F," ").concat(I),width:"".concat(F,"px")},S.createElement("circle",{cy:I/2,fill:"none",rx:F/2-A/2,ry:I/2-A/2,stroke:"transparent",strokeWidth:A||1})),e.slot.children)})},_e=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=xe(a),_=me(a),E=!(!1!==a.hasPopup||!y&&!_),s=function(){var e,u,b,y,_,E=a.file;E&&(u=E.filename,y="string"==typeof(b=E.content)?"":URL.createObjectURL(new Blob([b],{type:""})),(_=document.createElement("a")).style.display="none",_.href=y||u,_.setAttribute("download",(e=u.split("/").pop())?e.split("#")[0].split("?")[0]:u),document.body.appendChild(_),_.click(),document.body.removeChild(_),y&&URL.revokeObjectURL(y))};return S.createElement(be,{annotation:a,hasPopup:E,ignoreBorder:!0,isRenderable:!0,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--file-attachment","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onDoubleClick:s,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},Pe=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=!1===a.hasPopup,_=xe(a),E=me(a),P=!!(a.hasPopup||_||E);return S.createElement(be,{annotation:a,hasPopup:y,ignoreBorder:!0,isRenderable:P,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--free-text","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},Re=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=xe(a),_=me(a),E=!a.parentType||-1!==["Circle","Ink","Line","Polygon","PolyLine","Square"].indexOf(a.parentType);return A(function(){if(a.parentId){var e=document.querySelector('[data-annotation-id="'.concat(a.parentId,'"]')),u=document.querySelector('[data-annotation-id="'.concat(a.id,'"]'));if(e&&u){var b=parseFloat(e.style.left),y=parseFloat(e.style.top)+parseFloat(e.style.height);u.style.left="".concat(b,"px"),u.style.top="".concat(y,"px"),u.style.transformOrigin="-".concat(b,"px -").concat(y,"px")}}},[]),S.createElement(be,{annotation:a,hasPopup:E,ignoreBorder:!1,isRenderable:!(!y&&!_),page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--popup","data-annotation-id":a.id}),S.createElement(we,{annotation:a}))})},Me=function(e){var u=e.annotation,b=e.childAnnotation,y=e.page,_=e.viewport,E=!1===u.hasPopup,P=xe(u),O=me(u),F=!!(u.hasPopup||P||O);if(u.quadPoints&&u.quadPoints.length>0){var I=u.quadPoints.map(function(e){return Object.assign({},u,{rect:[e[2].x,e[2].y,e[1].x,e[1].y],quadPoints:[]})});return S.createElement(S.Fragment,null,I.map(function(e,a){return S.createElement(Me,{key:a,annotation:e,childAnnotation:b,page:y,viewport:_})}))}return S.createElement(be,{annotation:u,hasPopup:E,ignoreBorder:!0,isRenderable:F,page:y,viewport:_},function(e){return S.createElement(S.Fragment,null,S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--highlight","data-annotation-id":u.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children),b&&b.annotationType===a.AnnotationType.Popup&&e.popup.opened&&S.createElement(Re,{annotation:b,page:y,viewport:_}))})},ke=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=!1===a.hasPopup,_=xe(a),E=me(a),P=!!(a.hasPopup||_||E),O=a.rect,F=O[2]-O[0],I=O[3]-O[1],A=a.borderStyle.width;return S.createElement(be,{annotation:a,hasPopup:y,ignoreBorder:!0,isRenderable:P,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--ink","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),a.inkLists&&a.inkLists.length&&S.createElement("svg",{height:"".concat(I,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(F," ").concat(I
1),width:"".concat(F,"px")},a.inkLists.map(function(e,a){return S.createElement("polyline",{key:a,fill:"none",stroke:"transparent",strokeWidth:A||1,points:e.map(function(e){return"".concat(e.x-O[0],",").concat(O[3]-e.y)}).join(" ")})})),e.slot.children)})},Ce=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=!1===a.hasPopup,_=xe(a),E=me(a),P=!!(a.hasPopup||_||E),O=a.rect,F=O[2]-O[0],I=O[3]-O[1],A=a.borderStyle.width;return S.createElement(be,{annotation:a,hasPopup:y,ignoreBorder:!0,isRenderable:P,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--line","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),S.createElement("svg",{height:"".concat(I,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(F," ").concat(I),width:"".concat(F,"px")},S.createElement("line",{stroke:"transparent",strokeWidth:A||1,x1:O[2]-a.lineCoordinates[0],x2:O[2]-a.lineCoordinates[2],y1:O[3]-a.lineCoordinates[1],y2:O[3]-a.lineCoordinates[3]})),e.slot.children)})},eE=/^([^\w]*)(javascript|data|vbscript)/im,ex=/&#(\w+)(^\w|;)?/g,eS=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,eP=/^([^:]+):/gm,De=function(e,a){void 0===a&&(a="about:blank");var u=(e||"").replace(ex,function(e,a){return String.fromCharCode(a)}).replace(eS,"").trim();if(!u)return a;var b=u[0];if("."===b||"/"===b)return u;var y=u.match(eP);if(!y)return u;var _=y[0];return eE.test(_)?a:u},Ie=function(e){var a,u=e.annotation,b=e.annotationContainerRef,y=e.doc,_=e.outlines,E=e.page,P=e.pageIndex,O=e.scale,F=e.viewport,I=e.onExecuteNamedAction,A=e.onJumpFromLinkAnnotation,H=e.onJumpToDest,j=S.useRef(),Z=_&&_.length&&u.dest&&"string"==typeof u.dest?null===(a=_.find(function(e){return e.dest===u.dest}))||void 0===a?void 0:a.title:"",J=!!(u.url||u.dest||u.action||u.unsafeUrl),G={};if(u.url||u.unsafeUrl){var Y=De(u.url||u.unsafeUrl,"");Y?G={"data-target":"external",href:Y,rel:"noopener noreferrer nofollow",target:u.newWindow?"_blank":"",title:Y}:J=!1}else G={href:"","data-annotation-link":u.id,onClick:function(e){e.preventDefault(),u.action?I(u.action):fe(y,u.dest).then(function(e){var a=j.current,u=b.current;if(a&&u){var y=a.getBoundingClientRect();u.style.setProperty("height","100%"),u.style.setProperty("width","100%");var _=u.getBoundingClientRect();u.style.removeProperty("height"),u.style.removeProperty("width");var E=(y.left-_.left)/O;A({bottomOffset:(_.bottom-y.bottom+y.height)/O,label:Z,leftOffset:E,pageIndex:P})}H(e)})}};return Z&&(G=Object.assign({},G,{title:Z,"aria-label":Z})),S.createElement(be,{annotation:u,hasPopup:!1,ignoreBorder:!1,isRenderable:J,page:E,viewport:F},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--link","data-annotation-id":u.id,"data-testid":"core__annotation--link-".concat(u.id)}),S.createElement("a",l({ref:j},G)))})},Ae=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=!1===a.hasPopup,_=xe(a),E=me(a),P=!!(a.hasPopup||_||E),O=a.rect,F=O[2]-O[0],I=O[3]-O[1],A=a.borderStyle.width;return S.createElement(be,{annotation:a,hasPopup:y,ignoreBorder:!0,isRenderable:P,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--polygon","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),a.vertices&&a.vertices.length&&S.createElement("svg",{height:"".concat(I,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(F," ").concat(I),width:"".concat(F,"px")},S.createElement("polygon",{fill:"none",stroke:"transparent",strokeWidth:A||1,points:a.vertices.map(function(e){return"".concat(e.x-O[0],",").concat(O[3]-e.y)}).join(" ")})),e.slot.children)})},He=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=!1===a.hasPopup,_=xe(a),E=me(a),P=!!(a.hasPopup||_||E),O=a.rect,F=O[2]-O[0],I=O[3]-O[1],A=a.borderStyle.width;return S.createElement(be,{annotation:a,hasPopup:y,ignoreBorder:!0,isRenderable:P,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--polyline","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),a.vertices&&a.vertices.length&&S.createElement("svg",{height:"".concat(I,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(F," ").concat(I
1),width:"".concat(F,"px")},S.createElement("polyline",{fill:"none",stroke:"transparent",strokeWidth:A||1,points:a.vertices.map(function(e){return"".concat(e.x-O[0],",").concat(O[3]-e.y)}).join(" ")})),e.slot.children)})},Ne=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=!1===a.hasPopup,_=xe(a),E=me(a),P=!!(a.hasPopup||_||E),O=a.rect,F=O[2]-O[0],I=O[3]-O[1],A=a.borderStyle.width;return S.createElement(be,{annotation:a,hasPopup:y,ignoreBorder:!0,isRenderable:P,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--square","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),S.createElement("svg",{height:"".concat(I,"px"),preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 ".concat(F," ").concat(I),width:"".concat(F,"px")},S.createElement("rect",{height:I-A,fill:"none",stroke:"transparent",strokeWidth:A||1,x:A/2,y:A/2,width:F-A})),e.slot.children)})},Ve=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=!1===a.hasPopup,_=xe(a),E=me(a),P=!!(a.hasPopup||_||E);return S.createElement(be,{annotation:a,hasPopup:y,ignoreBorder:!0,isRenderable:P,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--squiggly","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},ze=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=!1===a.hasPopup,_=xe(a),E=me(a),P=!!(a.hasPopup||_||E);return S.createElement(be,{annotation:a,hasPopup:y,ignoreBorder:!0,isRenderable:P,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--stamp","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},Be=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=!1===a.hasPopup,_=xe(a),E=me(a),P=!!(a.hasPopup||_||E);return S.createElement(be,{annotation:a,hasPopup:y,ignoreBorder:!0,isRenderable:P,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--strike-out","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},We=function(){return S.createElement(v,{size:16},S.createElement("path",{d:"M.5,16.5a1,1,0,0,0,1,1h2v4l4-4h15a1,1,0,0,0,1-1V3.5a1,1,0,0,0-1-1H1.5a1,1,0,0,0-1,1Z"}),S.createElement("path",{d:"M7.25,9.75A.25.25,0,1,1,7,10a.25.25,0,0,1,.25-.25"}),S.createElement("path",{d:"M12,9.75a.25.25,0,1,1-.25.25A.25.25,0,0,1,12,9.75"}),S.createElement("path",{d:"M16.75,9.75a.25.25,0,1,1-.25.25.25.25,0,0,1,.25-.25"}))},je=function(){return S.createElement(v,{size:16},S.createElement("path",{d:"M0.500 12.001 A11.500 11.500 0 1 0 23.500 12.001 A11.500 11.500 0 1 0 0.500 12.001 Z"}),S.createElement("path",{d:"M6.000 12.001 A6.000 6.000 0 1 0 18.000 12.001 A6.000 6.000 0 1 0 6.000 12.001 Z"}),S.createElement("path",{d:"M21.423 5.406L17.415 9.414"}),S.createElement("path",{d:"M14.587 6.585L18.607 2.565"}),S.createElement("path",{d:"M5.405 21.424L9.413 17.416"}),S.createElement("path",{d:"M6.585 14.588L2.577 18.596"}),S.createElement("path",{d:"M18.602 21.419L14.595 17.412"}),S.createElement("path",{d:"M17.419 14.58L21.428 18.589"}),S.createElement("path",{d:"M2.582 5.399L6.588 9.406"}),S.createElement("path",{d:"M9.421 6.581L5.412 2.572"}))},qe=function(){return S.createElement(v,{size:16},S.createElement("path",{d:"M4.000 18.500 A1.500 1.500 0 1 0 7.000 18.500 A1.500 1.500 0 1 0 4.000 18.500 Z"}),S.createElement("path",{d:"M20.5.5l-9.782,9.783a7,7,0,1,0,3,3L17,10h1.5V8.5L19,8h1.5V6.5L21,6h1.5V4.5l1-1V.5Z"}))},Ue=function(){return S.createElement(v,{size:16},S.createElement("path",{d:"M2.000 2.500 L22.000 2.500 L22.000 23.500 L2.000 23.500 Z"}),S.createElement("path",{d:"M6 4.5L6 0.5"}),S.createElement("path",{d:"M18 4.5L18 0.5"}),S.createElement("path",{d:"M10 4.5L10 0.5"}),S.createElement("path",{d:"M14 4.5L14 0.5"}))},Ze=function(){return S.createElement(v,{size:16},S.createElement("path",{d:"M17.5 0.498L17.5 23.498"}),S.createElement("path",{d:"M10.5 0.498L10.5 23.498"}),S.createElement("path",{d:"M23.5.5H6.5a6,6,0,0,0,0,12h4"}))},Je=function(){return S.createElement(v,{size:16},S.createElement("path",{d:"M2.5 22.995L12 6.005 21.5 22.995 2.5 22.995z"}))},Ge=function(e){var u=e.annotation,b=e.childAnnotation,y=e.page,_=e.viewport,E=!1===u.hasPopup,P=xe(u),O=me(u),F=!!(u.hasPopup||P||O),I=u.name?u.name.toLowerCase():"";return S.createElement(be,{annotation:u,hasPopup:E,ignoreBorder:!1,isRenderable:F,page:y,viewport:_},function(e){return S.createElement(S.Fragment,null,S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--text","data-annotation-id":u.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),I&&S.createElement("div",{className:"rpv-core__annotation-text-icon"},"check"===I&&S.createElement(h,null),"comment"===I&&S.createElement(We,null),"help"===I&&S.createElement(je,null),"insert"===I&&S.createElement(Je,null),"key"===I&&S.createElement(qe,null),"note"===I&&S.createElement(Ue,null),("newparagraph"===I||"paragraph"===I)&&S.createElement(Ze,null)),e.slot.children),b&&b.annotationType===a.AnnotationType.Popup&&e.popup.opened&&S.createElement(Re,{annotation:b,page:y,viewport:_}))})},Ye=function(e){var a=e.annotation,u=e.page,b=e.viewport,y=!1===a.hasPopup,_=xe(a),E=me(a),P=!!(a.hasPopup||_||E);return S.createElement(be,{annotation:a,hasPopup:y,ignoreBorder:!0,isRenderable:P,page:u,viewport:b},function(e){return S.createElement("div",l({},e.slot.attrs,{className:"rpv-core__annotation rpv-core__annotation--underline","data-annotation-id":a.id,onClick:e.popup.toggleOnClick,onMouseEnter:e.popup.openOnHover,onMouseLeave:e.popup.closeOnHover}),e.slot.children)})},Ke=function(e){var u=e.annotations,b=e.doc,y=e.outlines,_=e.page,E=e.pageIndex,P=e.plugins,O=e.rotation,F=e.scale,I=e.onExecuteNamedAction,H=e.onJumpFromLinkAnnotation,j=e.onJumpToDest,Z=S.useRef(),J=_.getViewport({rotation:O,scale:F}).clone({dontFlip:!0}),G=u.filter(function(e){return!e.parentId});return A(function(){var e=Z.current;e&&P.forEach(function(a){a.onAnnotationLayerRender&&a.onAnnotationLayerRender({annotations:G,container:e,pageIndex:E,rotation:O,scale:F})})},[]),S.createElement("div",{ref:Z,className:"rpv-core__annotation-layer","data-testid":"core__annotation-layer-".concat(E)},G.map(function(e){var P=u.find(function(a){return a.parentId===e.id});switch(e.annotationType){case a.AnnotationType.Caret:return S.createElement(ye,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.Circle:return S.createElement(Se,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.FileAttachment:return S.createElement(_e,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.FreeText:return S.createElement(Pe,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.Highlight:return S.createElement(Me,{key:e.id,annotation:e,childAnnotation:P,page:_,viewport:J});case a.AnnotationType.Ink:return S.createElement(ke,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.Line:return S.createElement(Ce,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.Link:return S.createElement(Ie,{key:e.id,annotation:e,annotationContainerRef:Z,doc:b,outlines:y,page:_,pageIndex:E,scale:F,viewport:J,onExecuteNamedAction:I,onJumpFromLinkAnnotation:H,onJumpToDest:j});case a.AnnotationType.Polygon:return S.createElement(Ae,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.Polyline:return S.createElement(He,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.Popup:return S.createElement(Re,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.Square:return S.createElement(Ne,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.Squiggly:return S.createElement(Ve,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.Stamp:return S.createElement(ze,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.StrikeOut:return S.createElement(Be,{key:e.id,annotation:e,page:_,viewport:J});case a.AnnotationType.Text:return S.createElement(Ge,{key:e.id,annotation:e,childAnnotation:P,page:_,viewport:J});case a.AnnotationType.Underline:return S.createElement(Ye,{key:e.id,annotation:e,page:_,viewport:J});default:return S.createElement(S.Fragment,{key:e.id})}}))},Xe=function(e){var a=e.page,u=e.renderAnnotations,b=T(),y=S.useState({loading:!0,annotations:[]}),_=y[0],E=y[1];return S.useEffect(function(){a.getAnnotations({intent:"display"}).then(function(e){b.current&&E({loading:!1,annotations:e})})},[]),_.loading?S.createElement(S.Fragment,null):u(_.annotations)},Qe=function(e){var a=e.doc,u=e.outlines,b=e.page,y=e.pageIndex,_=e.plugins,E=e.rotation,P=e.scale,O=e.onExecuteNamedAction,F=e.onJumpFromLinkAnnotation,I=e.onJumpToDest;return S.createElement(Xe,{page:b,renderAnnotations:function(e){return S.createElement(Ke,{annotations:e,doc:a,outlines:u,page:b,pageIndex:y,plugins:_,rotation:E,scale:P,onExecuteNamedAction:O,onJumpFromLinkAnnotation:F,onJumpToDest:I})}})},$e=function(e,a){var u=e%a;return 0===u?e:Math.floor(e-u)},et=function(e){var u=e.canvasLayerRef,b=e.height,y=e.page,_=e.pageIndex,E=e.plugins,P=e.rotation,O=e.scale,F=e.width,I=e.onRenderCanvasCompleted,H=S.useRef();return A(function(){var e=H.current;e&&e.cancel();var b=u.current;
1b.removeAttribute("data-testid"),E.forEach(function(e){e.onCanvasLayerRender&&e.onCanvasLayerRender({ele:b,pageIndex:_,rotation:P,scale:O,status:a.LayerRenderStatus.PreRender})});var S=y.getViewport({rotation:P,scale:O}),F=window.devicePixelRatio||1,A=Math.sqrt(16777216/(S.width*S.height)),j=F>A;j?b.style.transform="scale(1, 1)":b.style.removeProperty("transform");var Z=Math.min(A,F),J=function(e,a){if(Math.floor(e)===e)return[e,1];var u,b,y=1/e;if(y>a)return[1,a];if(Math.floor(y)===y)return[1,y];for(var _=e>1?y:e,E=0,S=1,P=1,O=1;;){var F=E+P,I=S+O;if(I>a)break;_<=F/I?(P=(u=[F,I])[0],O=u[1]):(E=(b=[F,I])[0],S=b[1])}return _<(E/S+P/O)/2?_===e?[E,S]:[S,E]:_===e?[P,O]:[O,P]}(Z,8),G=J[0],Y=J[1];b.width=$e(S.width*Z,G),b.height=$e(S.height*Z,G),b.style.width="".concat($e(S.width,Y),"px"),b.style.height="".concat($e(S.height,Y),"px"),b.hidden=!0;var K=b.getContext("2d",{alpha:!1}),X=j||1!==F?[Z,0,0,Z,0,0]:null;return H.current=y.render({canvasContext:K,transform:X,viewport:S}),H.current.promise.then(function(){b.hidden=!1,b.setAttribute("data-testid","core__canvas-layer-".concat(_)),E.forEach(function(e){e.onCanvasLayerRender&&e.onCanvasLayerRender({ele:b,pageIndex:_,rotation:P,scale:O,status:a.LayerRenderStatus.DidRender})}),I()},function(){I()}),function(){b&&(b.width=0,b.height=0)}},[]),S.createElement("div",{className:"rpv-core__canvas-layer",style:{height:"".concat(b,"px"),width:"".concat(F,"px")}},S.createElement("canvas",{ref:u}))},tt=function(e){var a=e.height,u=e.page,b=e.rotation,y=e.scale,_=e.width,E=S.useRef();return A(function(){var e=E.current,S=u.getViewport({rotation:b,scale:y});u.getOperatorList().then(function(b){var y;(y=E.current)&&(y.innerHTML=""),new P.SVGGraphics(u.commonObjs,u.objs).getSVG(b,S).then(function(u){u.style.height="".concat(a,"px"),u.style.width="".concat(_,"px"),e.appendChild(u)})})},[]),S.createElement("div",{className:"rpv-core__svg-layer",ref:E})},nt=function(e){var u=e.containerRef,b=e.page,y=e.pageIndex,_=e.plugins,E=e.rotation,O=e.scale,F=e.onRenderTextCompleted,I=S.useRef(),p=function(){var e=u.current;e&&([].slice.call(e.querySelectorAll(".rpv-core__text-layer-text")).forEach(function(a){return e.removeChild(a)}),[].slice.call(e.querySelectorAll('br[role="presentation"]')).forEach(function(a){return e.removeChild(a)}))};return A(function(){var e=I.current;e&&e.cancel();var S=u.current;if(S){S.removeAttribute("data-testid");var A=b.getViewport({rotation:E,scale:O});return _.forEach(function(e){e.onTextLayerRender&&e.onTextLayerRender({ele:S,pageIndex:y,scale:O,status:a.LayerRenderStatus.PreRender})}),b.getTextContent().then(function(e){p(),I.current=P.renderTextLayer({container:S,textContent:e,textContentSource:e,viewport:A}),I.current.promise.then(function(){S.setAttribute("data-testid","core__text-layer-".concat(y)),[].slice.call(S.children).forEach(function(e){e.classList.contains("rpv-core__text-layer-text--not")||e.classList.add("rpv-core__text-layer-text")}),_.forEach(function(e){e.onTextLayerRender&&e.onTextLayerRender({ele:S,pageIndex:y,scale:O,status:a.LayerRenderStatus.DidRender})}),F()},function(){S.removeAttribute("data-testid"),F()})}),function(){var e;p(),null===(e=I.current)||void 0===e||e.cancel()}}},[]),S.createElement("div",{className:"rpv-core__text-layer",ref:u})},rt=function(e){var u=e.doc,b=e.measureRef,y=e.outlines,_=e.pageIndex,E=e.pageRotation,P=e.pageSize,O=e.plugins,F=e.renderPage,I=e.renderQueueKey,A=e.rotation,H=e.scale,j=e.shouldRender,Z=e.viewMode,J=e.onExecuteNamedAction,G=e.onJumpFromLinkAnnotation,Y=e.onJumpToDest,K=e.onRenderCompleted,X=e.onRotatePage,Q=T(),en=S.useState(null),er=en[0],eo=en[1],ea=S.useState(!1),ei=ea[0],ec=ea[1],el=S.useState(!1),eu=el[0],es=el[1],ed=S.useRef(),ep=S.useRef(),ef=Math.abs(A+E)%180==0,eg=P.pageWidth*H,eh=P.pageHeight*H,ev=ef?eg:eh,em=ef?eh:eg,ew=(P.rotation+A+E)%360,eb=S.useRef(0),ey=F||function(e){return S.createElement(S.Fragment,null,e.canvasLayer.children,e.textLayer.children,e.annotationLayer.children)};return S.useEffect(function(){eo(null),ec(!1),es(!1)},[E,A,H]),S.useEffect(function(){j&&Q.current&&!er&&de(u,_).then(function(e){Q.current&&(eb.current=I,eo(e))})},[j,er]),S.useEffect(function(){ei&&eu&&(I!==eb.current?(eo(null),ec(!1),es(!1)):K(_))},[ei,eu]),S.createElement("div",{className:d({"rpv-core__page-layer":!0,"rpv-core__page-layer--dual":Z===a.ViewMode.DualPage,"rpv-core__page-layer--dual-cover":Z===a.ViewMode.DualPageWithCover,"rpv-core__page-layer--single":Z===a.ViewMode.SinglePage}),"data-testid":"core__page-layer-".concat(_),ref:b,style:{height:"".concat(em,"px"),width:"".concat(ev,"px")}},er?S.createElement(S.Fragment,null,ey({annotationLayer:{attrs:{},children:S.createElement(Qe,{doc:u,outlines:y,page:er,pageIndex:_,plugins:O,rotation:ew,scale:H,onExecuteNamedAction:J,onJumpFromLinkAnnotation:G,onJumpToDest:Y})},canvasLayer:{attrs:{},children:S.createElement(et,{canvasLayerRef:ed,height:em,page:er,pageIndex:_,plugins:O,rotation:ew,scale:H,width:ev,onRenderCanvasCompleted:function(){Q.current&&ec(!0)}})},canvasLayerRendered:ei,doc:u,height:em,pageIndex:_,rotation:ew,scale:H,svgLayer:{attrs:{},children:S.createElement(tt,{height:em,page:er,rotation:ew,scale:H,width:ev})},textLayer:{attrs:{},children:S.createElement(nt,{containerRef:ep,page:er,pageIndex:_,plugins:O,rotation:ew,scale:H,onRenderTextCompleted:function(){Q.current&&es(!0)}})},textLayerRendered:eu,width:ev,markRendered:K,onRotatePage:function(e){return X(_,e)}}),O.map(function(e,a){return e.renderPageLayer?S.createElement(S.Fragment,{key:a},e.renderPageLayer({canvasLayerRef:ed,canvasLayerRendered:ei,doc:u,height:em,pageIndex:_,rotation:ew,scale:H,textLayerRef:ep,textLayerRendered:eu,width:ev})):S.createElement(S.Fragment,{key:a})})):S.createElement(x,{testId:"core__page-layer-loading-".concat(_)}))},ot=function(e,a){var u=a.rect;return e.height!==u.height||e.width!==u.width?u:e};(b=e_||(e_={})).Horizontal="Horizontal",b.Vertical="Vertical",b.Both="Both";var at=function(e){return 1-Math.pow(1-e,4)},eR={left:0,top:0},eM={capture:!1,passive:!0},lt=function(e){var a=e.elementRef,u=e.enableSmoothScroll,b=e.isRtl,y=e.scrollDirection,_=e.onSmoothScroll,E=S.useState(eR),P=E[0],O=E[1],F=S.useState(a.current),I=F[0],H=F[1],j=b?-1:1,Z=S.useRef(y);Z.current=y;var J=S.useRef(eR),G=S.useRef(!0),Y=S.useCallback(function(){G.current=!0,u&&O(J.current),_(!1)},[]),K=S.useCallback(function(){if(I){switch(Z.current){case e_.Horizontal:J.current={left:j*I.scrollLeft,top:0};break;case e_.Both:J.current={left:j*I.scrollLeft,top:I.scrollTop};break;case e_.Vertical:default:J.current={left:0,top:I.scrollTop}}u&&!G.current||O(J.current)}},[I]);return A(function(){H(a.current)}),A(function(){if(I)return I.addEventListener("scroll",K,eM),function(){I.removeEventListener("scroll",K,eM)}},[I]),{scrollOffset:P,scrollTo:S.useCallback(function(e,u){var b=a.current;if(!b)return Promise.resolve();var y={left:0,top:0};switch(Z.current){case e_.Horizontal:y.left=j*e.left;break;case e_.Both:y.left=j*e.left,y.top=e.top;break;case e_.Vertical:default:y.top=e.top}return u?(G.current=!1,_(!0),new Promise(function(e,a){!function(e,a,u,b,y,_){void 0===y&&(y=function(e){return e}),void 0===_&&(_=function(){});var E=0,S=0,P=!1;switch(a){case e_.Horizontal:S=e.scrollLeft,E=0;case e_.Both:S=e.scrollLeft,E=e.scrollTop;break;case e_.Vertical:default:S=0,E=e.scrollTop}var l=function(){P||(P=!0,e.scrollLeft=u.left,e.scrollTop=u.top,_())};if(1e-4>=Math.abs(E-u.top)&&a===e_.Vertical)l();else if(1e-4>=Math.abs(S-u.left)&&a===e_.Horizontal)l();else{var O,F=-1,I=S-u.left,A=E-u.top,g=function(_){-1===F&&(F=_);
1var H=_-F,j=y(Math.min(H/b,1)),Z={left:S-I*j,top:E-A*j};switch(a){case e_.Horizontal:e.scrollLeft=Z.left;break;case e_.Both:e.scrollLeft=Z.left,e.scrollTop=Z.top;break;case e_.Vertical:default:e.scrollTop=Z.top}1e-4>=Math.abs(Z.top-u.top)&&1e-4>=Math.abs(Z.left-u.left)&&!P&&(window.cancelAnimationFrame(O),l()),H<b?O=window.requestAnimationFrame(g):window.cancelAnimationFrame(O)};O=window.requestAnimationFrame(g)}}(b,Z.current,y,400,at,function(){Y(),e()})})):new Promise(function(e,a){switch(Z.current){case e_.Horizontal:b.scrollLeft=y.left;break;case e_.Both:b.scrollLeft=y.left,b.scrollTop=y.top;break;case e_.Vertical:default:b.scrollTop=y.top}e()})},[a])}},ut=function(e,a,u){return Math.max(e,Math.min(u,a))},pt=function(e,u){if(u!==a.ViewMode.DualPageWithCover)return 0;if(!function(e){var a=e.length;if(1===a)return!1;for(var u=1;u<a;u++)if(e[u].height!==e[0].height||e[u].width!==e[0].width)return!0;return!1}(e))return 2*e[0].width;var b=ie(e.slice(1),2).map(function(e){return 2===e.length?e[0].width+e[1].width:e[0].width}),y=[e[0].width].concat(b);return Math.max.apply(Math,y)},ek={left:0,top:0},eC={left:0,top:0},eT={left:0,top:0},eL={left:0,top:0},eO={height:0,width:0},eF={left:0,top:0},eI="data-virtual-index",eD=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],Et=function(e){var u,b,y,_,E,P,O,F=e.enableSmoothScroll,I=e.isRtl,H=e.numberOfItems,j=e.parentRef,Z=e.setRenderRange,J=e.sizes,G=e.scrollMode,Y=e.viewMode,K=S.useState(!1),X=K[0],Q=K[1],en=S.useCallback(function(e){return Q(e)},[]),er=S.useRef(G);er.current=G;var eo=S.useRef(Y);eo.current=Y;var ea=G===a.ScrollMode.Wrapped||Y===a.ViewMode.DualPageWithCover||Y===a.ViewMode.DualPage?e_.Both:G===a.ScrollMode.Horizontal?e_.Horizontal:e_.Vertical,ei=lt({elementRef:j,enableSmoothScroll:F,isRtl:I,scrollDirection:ea,onSmoothScroll:en}),ec=ei.scrollOffset,el=ei.scrollTo,eu=(b=(u=S.useState(j.current))[0],y=u[1],_=S.useRef(!1),P=(E=S.useReducer(ot,{height:0,width:0}))[0],O=E[1],A(function(){j.current!==b&&y(j.current)}),A(function(){if(b&&!_.current){_.current=!0;var e=b.getBoundingClientRect();O({rect:{height:e.height,width:e.width}})}},[b]),S.useEffect(function(){if(b){var e=new ResizeObserver(function(e,a){e.forEach(function(e){if(e.target===b){var a=e.contentRect;O({rect:{height:a.height,width:a.width}})}})});return e.observe(b),function(){e.unobserve(b)}}},[b]),P),es=S.useRef({scrollOffset:eF,measurements:[]});es.current.scrollOffset=ec;var ed=S.useMemo(function(){return Array(H).fill(-1)},[]),ep=S.useState(ed),ef=ep[0],eg=ep[1],eh=S.useMemo(function(){return new IntersectionObserver(function(e){e.forEach(function(e){var a=e.isIntersecting?e.intersectionRatio:-1,u=e.target.getAttribute(eI);if(u){var b=parseInt(u,10);0<=b&&b<H&&eg(function(e){return e[b]=a,function(e,a,u){if(u||2==arguments.length)for(var b,y=0,_=a.length;y<_;y++)!b&&y in a||(b||(b=Array.prototype.slice.call(a,0,y)),b[y]=a[y]);return e.concat(b||Array.prototype.slice.call(a))}([],e,!0)})}})},{threshold:eD})},[]),ev=S.useMemo(function(){return G===a.ScrollMode.Page&&Y===a.ViewMode.SinglePage?function(e,a,u){for(var b=[],y=0;y<e;y++){var _={height:Math.max(a.height,u[y].height),width:Math.max(a.width,u[y].width)},E=0===y?eL:b[y-1].end,S={left:E.left+_.width,top:E.top+_.height};b[y]={index:y,start:E,size:_,end:S,visibility:-1}}return b}(H,eu,J):Y===a.ViewMode.DualPageWithCover?function(e,u,b,y){for(var _=[],E=0,S=0,P=eT,O=0;O<e;O++){var F=0===O?{height:y===a.ScrollMode.Page?Math.max(u.height,b[O].height):b[O].height,width:y===a.ScrollMode.Page?Math.max(u.width,b[O].width):b[O].width}:{height:y===a.ScrollMode.Page?Math.max(u.height,b[O].height):b[O].height,width:Math.max(u.width/2,b[O].width)};y===a.ScrollMode.Page?P=0===O?eT:{left:O%2==0?F.width:0,top:Math.floor((O-1)/2)*F.height+_[0].end.top}:0===O?(P=eT,E=b[0].height,S=0):O%2==1?(P={left:0,top:E+=S},S=O===e-1?b[O].height:Math.max(b[O].height,b[O+1].height)):P={left:_[O-1].end.left,top:E};var I={left:P.left+F.width,top:P.top+F.height};_[O]={index:O,start:P,size:F,end:I,visibility:-1}}return _}(H,eu,J,G):Y===a.ViewMode.DualPage?function(e,u,b,y){for(var _=[],E=0,S=0,P=eC,O=0;O<e;
1O++){var F={height:y===a.ScrollMode.Page?Math.max(u.height,b[O].height):b[O].height,width:Math.max(u.width/2,b[O].width)};y===a.ScrollMode.Page?P={left:O%2==0?0:F.width,top:Math.floor(O/2)*F.height}:O%2==0?(P={left:0,top:E+=S},S=O===e-1?b[O].height:Math.max(b[O].height,b[O+1].height)):P={left:_[O-1].end.left,top:E};var I={left:P.left+F.width,top:P.top+F.height};_[O]={index:O,start:P,size:F,end:I,visibility:-1}}return _}(H,eu,J,G):function(e,u,b,y){for(var _=[],E=0,S={left:0,top:0},P=0,O=ek,F=0;F<e;F++){var I=b[F];if(0===F)E=I.width,S={left:0,top:0},P=I.height;else switch(y){case a.ScrollMode.Wrapped:(E+=I.width)<u.width?(O={left:_[F-1].end.left,top:S.top},P=Math.max(P,I.height)):(E=I.width,S={left:(O={left:S.left,top:S.top+P}).left,top:O.top},P=I.height);break;case a.ScrollMode.Horizontal:case a.ScrollMode.Vertical:default:O=_[F-1].end}var A={left:O.left+I.width,top:O.top+I.height};_[F]={index:F,start:O,size:I,end:A,visibility:-1}}return _}(H,eu,J,G)},[G,J,Y,eu]),em=ev[H-1]?{height:ev[H-1].end.top,width:ev[H-1].end.left}:eO;es.current.measurements=ev;var ew=S.useMemo(function(){var e=function(e,a,u,b){var y=0;switch(e){case e_.Horizontal:y=b.left;break;case e_.Vertical:default:y=b.top}var _=a.length-1,E=function(e,a,u,b){for(;e<=a;){var y=(e+a)/2|0,_=b(y);if(_<u)e=y+1;else{if(!(_>u))return y;a=y-1}}return e>0?e-1:0}(0,_,y,function(u){switch(e){case e_.Horizontal:return a[u].start.left;case e_.Both:case e_.Vertical:default:return a[u].start.top}});if(e===e_.Both)for(var S=a[E].start.top;E-1>=0&&a[E-1].start.top===S&&a[E-1].start.left>=b.left;)E--;for(var P=E;P<=_;){var O={top:a[P].start.top-b.top,left:a[P].start.left-b.left},F={height:u.height-O.top,width:u.width-O.left};if(e===e_.Horizontal&&F.width<0||e===e_.Vertical&&F.height<0||e===e_.Both&&(F.width<0||F.height<0))break;P++}return{start:E,end:P}}(ea,ev,eu,ec),u=e.start,b=e.end,y=ef.slice(ut(0,H,u),ut(0,H,b)),_=u+y.reduce(function(e,a,u,b){return a>b[e]?u:e},0),E=_=ut(0,H-1,_),S=Z({endPage:b,numPages:H,startPage:u}),P=S.startPage,O=S.endPage;switch(P=Math.max(P,0),O=Math.min(O,H-1),Y){case a.ViewMode.DualPageWithCover:_>0&&(E=_%2==1?_:_-1),P=0===P?0:P%2==1?P:P-1,H-(O=O%2==1?O-1:O)<=2&&(O=H-1);break;case a.ViewMode.DualPage:E=_%2==0?_:_-1,P=P%2==0?P:P-1,O=O%2==1?O:O-1;break;case a.ViewMode.SinglePage:default:E=_}return{startPage:P,endPage:O,maxVisbilityIndex:E}},[ev,eu,ec,Y,ef]),eb=ew.startPage,ey=ew.endPage,eE=ew.maxVisbilityIndex,ex=S.useMemo(function(){for(var e=[],t=function(a){var u=ev[a],b=l(l({},u),{visibility:void 0!==ef[a]?ef[a]:-1,measureRef:function(e){e&&(e.setAttribute(eI,"".concat(a)),eh.observe(e))}});e.push(b)},a=eb;a<=ey;a++)t(a);return e},[eb,ey,ef,ev]),eS=S.useCallback(function(e,u){var b=es.current.measurements[ut(0,H-1,e)],y=er.current===a.ScrollMode.Page?eF:u;return b?el({left:y.left+b.start.left,top:y.top+b.start.top},F):Promise.resolve()},[el,F]),eP=S.useCallback(function(e,u){var b=es.current.measurements,y=b[e].start,_=b.find(function(e){return e.start.top-y.top>1e-12});if(!_)return Promise.resolve();var E=_.index;switch(eo.current){case a.ViewMode.DualPage:E=E%2==0?E:E+1;break;case a.ViewMode.DualPageWithCover:E=E%2==1?E:E+1}return eS(E,u)},[]),eR=S.useCallback(function(e,u){for(var b=es.current.measurements,y=b[e].start,_=e,E=!1,S=H-1;S>=0;S--)if(y.top-b[S].start.top>1e-12){E=!0,_=b[S].index;break}if(!E)return Promise.resolve();switch(eo.current){case a.ViewMode.DualPage:_=_%2==0?_:_-1;break;case a.ViewMode.DualPageWithCover:_=_%2==0?_-1:_}return _===e&&(_=e-1),eS(_,u)},[]),eM=S.useCallback(function(e,u){if(eo.current===a.ViewMode.DualPageWithCover||eo.current===a.ViewMode.DualPage)return eP(e,u);switch(er.current){case a.ScrollMode.Wrapped:return eP(e,u);case a.ScrollMode.Horizontal:case a.ScrollMode.Vertical:default:return eS(e+1,u)}},[]),eA=S.useCallback(function(e,u){if(eo.current===a.ViewMode.DualPageWithCover||eo.current===a.ViewMode.DualPage)return eR(e,u);switch(er.current){case a.ScrollMode.Wrapped:return eR(e,u);case a.ScrollMode.Horizontal:case a.ScrollMode.Vertical:default:return eS(e-1,u)}},[]),eN=S.useCallback(function(){return function(e,u){switch(u){case a.ScrollMode.Horizontal:return{position:"relative",height:"100%",width:"".concat(e.width,"px")}
1;case a.ScrollMode.Vertical:default:return{position:"relative",height:"".concat(e.height,"px"),width:"100%"}}}(em,er.current)},[em]),eV=S.useCallback(function(e){return er.current!==a.ScrollMode.Page?{}:{height:"".concat(eu.height,"px"),width:"100%",position:"absolute",top:0,transform:"translateY(".concat(e.start.top,"px)")}},[eu]),eH=S.useCallback(function(e){return function(e,u,b,y,_){var E,S,P,O,F,I,A,H=u?"right":"left",j=b.length,Z=e.start.left*(u?-1:1),J=e.size,G=J.height,Y=J.width;if(y===a.ViewMode.DualPageWithCover){var K=_===a.ScrollMode.Page?0:e.start.top;return 0===e.index||j%2==0&&e.index===j-1?((E={height:"".concat(G,"px"),minWidth:"".concat(pt(b,y),"px"),width:"100%"})[H]=0,E.position="absolute",E.top=0,E.transform="translate(".concat(Z,"px, ").concat(K,"px)"),E):((S={height:"".concat(G,"px"),width:"".concat(Y,"px")})[H]=0,S.position="absolute",S.top=0,S.transform="translate(".concat(Z,"px, ").concat(K,"px)"),S)}if(y===a.ViewMode.DualPage)return(P={height:"".concat(G,"px"),width:"".concat(Y,"px")})[H]=0,P.position="absolute",P.top=0,P.transform="translate(".concat(Z,"px, ").concat(_===a.ScrollMode.Page?0:e.start.top,"px)"),P;switch(_){case a.ScrollMode.Horizontal:return(O={height:"100%",width:"".concat(Y,"px")})[H]=0,O.position="absolute",O.top=0,O.transform="translateX(".concat(Z,"px)"),O;case a.ScrollMode.Page:return(F={height:"".concat(G,"px"),width:"".concat(Y,"px")})[H]=0,F.position="absolute",F.top=0,F;case a.ScrollMode.Wrapped:return(I={height:"".concat(G,"px"),width:"".concat(Y,"px")})[H]=0,I.position="absolute",I.top=0,I.transform="translate(".concat(Z,"px, ").concat(e.start.top,"px)"),I;case a.ScrollMode.Vertical:default:return(A={height:"".concat(G,"px"),width:"100%"})[H]=0,A.position="absolute",A.top=0,A.transform="translateY(".concat(e.start.top,"px)"),A}}(e,I,J,eo.current,er.current)},[I,J]),ez=S.useCallback(function(e,u){var b=es.current,y=b.measurements,_=b.scrollOffset,E=y[ut(0,H-1,u)];return E?el(er.current===a.ScrollMode.Page?{left:E.start.left,top:E.start.top}:{left:_.left*e,top:_.top*e},!1):Promise.resolve()},[]);return S.useEffect(function(){return function(){eh.disconnect()}},[]),{boundingClientRect:eu,isSmoothScrolling:X,startPage:eb,endPage:ey,maxVisbilityIndex:eE,virtualItems:ex,getContainerStyles:eN,getItemContainerStyles:eV,getItemStyles:eH,scrollToItem:eS,scrollToNextItem:eM,scrollToPreviousItem:eA,zoom:ez}},bt=function(e,u,b,y,_,E){var S=b;switch(!0){case _===a.ViewMode.DualPageWithCover&&E>=3:case _===a.ViewMode.DualPage&&E>=3:S=2*b;break;default:S=b}switch(y){case a.SpecialZoomLevel.ActualSize:return 1;case a.SpecialZoomLevel.PageFit:return Math.min((e.clientWidth-17)/S,(e.clientHeight-16)/u);case a.SpecialZoomLevel.PageWidth:return(e.clientWidth-17)/S}},yt=function(e){var a,u,b=e.getCurrentPage,y=(u=S.useRef([]),S.useEffect(function(){return function(){u.current=[]}},[]),{push:function(e){var a=u.current;a.length+1>50&&a.shift(),a.push(e),u.current=a},map:function(e){return u.current.map(function(a){return e(a)})},pop:function(){var e=u.current;if(0===e.length)return null;var a=e.pop();return u.current=e,a}}),_=(a=S.useRef([]),S.useEffect(function(){return function(){a.current=[]}},[]),{dequeue:function(){var e=a.current;if(0===e.length)return null;var u=e.shift();return a.current=e,u||null},enqueue:function(e){var u=a.current;u.length+1>50&&u.pop(),a.current=[e].concat(u)},map:function(e){return a.current.map(function(a){return e(a)})}}),c=function(){var e=_.dequeue();return e&&y.push(e),e&&e.pageIndex===b()?c():e},s=function(){var e=y.pop();return e&&_.enqueue(e),e&&e.pageIndex===b()?s():e};return{getNextDestination:c,getPreviousDestination:s,markVisitedDestination:S.useCallback(function(e){y.push(e)},[])}},St=function(e){var a=[];return e.map(function(e){var u;a=a.concat(e).concat((u=[],e.items&&e.items.length>0&&(u=u.concat(St(e.items))),u))}),a},eA={capture:!1,passive:!0},eN={height:0,width:0},eV={height:0,width:0},Mt=function(e){var u,b,y,_,E=e.getCurrentPage,P=e.getCurrentScrollMode,O=e.jumpToPage,F=e.targetRef,I=S.useState(a.FullScreenMode.Normal),H=I[0],j=I[1],Z=(b=(u=S.useState(eN))[
10],y=u[1],_=C(function(){y({height:window.innerHeight,width:window.innerWidth})},100),A(function(){return window.addEventListener("resize",_,eA),function(){window.removeEventListener("resize",_,eA)}},[]),b),J=S.useState(eV),G=J[0],X=J[1],Q=S.useRef(eV),en=S.useRef(E()),er=S.useRef(eV),eo=S.useState(F.current),ea=eo[0],ei=eo[1],ec=S.useRef();A(function(){F.current!==ea&&ei(F.current)},[]),A(function(){if(ea){var e=new ResizeObserver(function(e){e.forEach(function(e){var a=e.target.getBoundingClientRect();X({height:a.height,width:a.width})})});return e.observe(ea),function(){e.unobserve(ea),e.disconnect()}}},[ea]);var el=S.useCallback(function(e){var u=k();return u&&u!==e?(j(a.FullScreenMode.Normal),M(u)):Promise.resolve()},[]),eu=S.useCallback(function(e){e&&R()&&(ei(e),el(e).then(function(){ec.current=e,j(a.FullScreenMode.Entering),Y&&e[K.RequestFullScreen]()}))},[]),es=S.useCallback(function(){k()&&(j(a.FullScreenMode.Exitting),M(document))},[]),ed=S.useCallback(function(){ea&&k()!==ea&&j(a.FullScreenMode.Exitting)},[ea]);return S.useEffect(function(){switch(H){case a.FullScreenMode.Entering:ec.current&&(ec.current.style.backgroundColor="var(--rpv-core__full-screen-target-background-color)"),en.current=E(),Q.current={height:window.innerHeight,width:window.innerWidth};break;case a.FullScreenMode.Entered:P()===a.ScrollMode.Page?O(en.current).then(function(){j(a.FullScreenMode.EnteredCompletely)}):j(a.FullScreenMode.EnteredCompletely);break;case a.FullScreenMode.Exitting:ec.current&&(ec.current.style.backgroundColor="",ec.current=null),en.current=E();break;case a.FullScreenMode.Exited:j(a.FullScreenMode.Normal),P()===a.ScrollMode.Page&&O(en.current)}},[H]),S.useEffect(function(){if(H!==a.FullScreenMode.Normal)return H===a.FullScreenMode.Entering&&Z.height===G.height&&Z.width===G.width&&Z.height>0&&Z.width>0&&(0===er.current.height||Z.height==er.current.height)?(er.current={height:window.innerHeight,width:window.innerWidth},void j(a.FullScreenMode.Entered)):void(H===a.FullScreenMode.Exitting&&Q.current.height===Z.height&&Q.current.width===Z.width&&Z.height>0&&Z.width>0&&j(a.FullScreenMode.Exited))},[H,Z,G]),S.useEffect(function(){return Y&&document.addEventListener(K.FullScreenChange,ed),function(){Y&&document.removeEventListener(K.FullScreenChange,ed)}},[ea]),{enterFullScreenMode:eu,exitFullScreenMode:es,fullScreenMode:H}},eH={buildPageStyles:function(){return{}},transformSize:function(e){return e.size}},ez={left:0,top:0},Tt=function(e){var u=e.currentFile,b=e.defaultScale,y=e.doc,_=e.enableSmoothScroll,E=e.initialPage,P=e.initialRotation,O=e.initialScale,F=e.pageLayout,H=e.pageSizes,j=e.plugins,Z=e.renderPage,J=e.scrollMode,G=e.setRenderRange,Y=e.viewMode,K=e.viewerState,X=e.onDocumentLoad,Q=e.onOpenFile,en=e.onPageChange,eo=e.onRotate,ea=e.onRotatePage,ei=e.onZoom,ec=y.numPages,el=y.loadingTask.docId,eu=S.useContext(er).l10n,es=S.useContext(I),ed=es.direction===a.TextDirection.RightToLeft,ep=S.useRef(),ef=S.useRef(),eg=S.useState(E),em=eg[0],ew=eg[1],eb=S.useRef(null),ey=yt({getCurrentPage:function(){return eZ.current.pageIndex}}),e_=S.useState(P),eE=e_[0],ex=e_[1],eS=L(eE),eP=S.useState(!1),eR=eP[0],eM=eP[1],ek=S.useState(new Map),eC=ek[0],eT=ek[1],eL=S.useState(J),eO=eL[0],eF=eL[1],eI=L(eO),eD=S.useState(Y),eA=eD[0],eN=eD[1],eV=L(eA),eB=(tv=T(),tw=(tm=S.useState([]))[0],tb=tm[1],S.useEffect(function(){y.getOutline().then(function(e){tv.current&&null!==e&&tb(St(e))})},[]),tw),eW=S.useState(O),ej=eW[0],eq=eW[1],eU=L(ej),eZ=S.useRef(K),eJ=S.useRef("string"==typeof b?b:null),eG=S.useRef(-1),eY=S.useRef(-1),eK=S.useRef(E),e$=Mt({getCurrentPage:function(){return eZ.current.pageIndex},getCurrentScrollMode:function(){return eZ.current.scrollMode},jumpToPage:function(e){return ti(e)}
1,targetRef:ef}),eX=S.useState(-1),eQ=eX[0],e0=eX[1],e1=S.useState(0),e2=e1[0],e5=e1[1],e9=D({doc:y});S.useEffect(function(){return function(){eh.clear(),ev.clear()}},[el]);var e4=S.useMemo(function(){return Object.assign({},eH,F)},[]),e3=S.useMemo(function(){return Array(ec).fill(0).map(function(e,a){var u=[H[a].pageHeight,H[a].pageWidth],b=Math.abs(eE)%180==0?{height:u[0],width:u[1]}:{height:u[1],width:u[0]},y={height:b.height*ej,width:b.width*ej};return e4.transformSize({numPages:ec,pageIndex:a,size:y})})},[eE,ej]),e6=Et({enableSmoothScroll:_,isRtl:ed,numberOfItems:ec,parentRef:ef,scrollMode:eO,setRenderRange:G,sizes:e3,viewMode:eA});t_=(ty={targetRef:ef,onResize:C(function(){!eJ.current||eZ.current.fullScreenMode!==a.FullScreenMode.Normal||E>0&&eK.current===E||tf(eJ.current)},200)}).targetRef,tE=ty.onResize,A(function(){var e=new ResizeObserver(function(e){e.forEach(function(e){tE(e.target)})}),a=t_.current;if(a)return e.observe(a),function(){e.unobserve(a)}},[]);var De=function(e){var a=e;j.forEach(function(e){e.onViewerStateChange&&(a=e.onViewerStateChange(a))}),eZ.current=a},Ie=function(){return ef.current},Ae=function(){return eZ.current},e7=S.useCallback(function(e){ey.markVisitedDestination(e)},[]),e8=S.useCallback(function(e){var u=e.pageIndex,b=e.bottomOffset,_=e.leftOffset,E=e.scaleTo,S=ef.current,P=eZ.current;return S&&P?new Promise(function(e,O){de(y,u).then(function(y){var O=y.getViewport({scale:1}),F=0,I=("function"==typeof b?b(O.width,O.height):b)||0,A=("function"==typeof _?_(O.width,O.height):_)||0,j=P.scale;switch(E){case a.SpecialZoomLevel.PageFit:F=0,A=0,tf(a.SpecialZoomLevel.PageFit);break;case a.SpecialZoomLevel.PageWidth:j=bt(S,H[u].pageHeight,H[u].pageWidth,a.SpecialZoomLevel.PageWidth,Y,ec),F=(O.height-I)*j,A*=j,tf(j);break;default:F=(O.height-I)*j,A*=j}switch(P.scrollMode){case a.ScrollMode.Horizontal:e6.scrollToItem(u,{left:A,top:0}).then(function(){e()});break;case a.ScrollMode.Vertical:default:e6.scrollToItem(u,{left:0,top:F}).then(function(){e()})}})}):Promise.resolve()},[]),tn=S.useCallback(function(e){return ey.markVisitedDestination(e),e8(e)},[]),tr=S.useCallback(function(){var e=ey.getNextDestination();return e?e8(e):Promise.resolve()},[]),to=S.useCallback(function(){var e=ey.getPreviousDestination();return e?e8(e):Promise.resolve()},[]),ta=S.useCallback(function(){return e6.scrollToNextItem(eZ.current.pageIndex,ez)},[]),ti=S.useCallback(function(e){return 0<=e&&e<ec?e6.scrollToItem(e,ez):Promise.resolve()},[]),tc=S.useCallback(function(){return e6.scrollToPreviousItem(eZ.current.pageIndex,ez)},[]),tl=S.useCallback(function(e){var a;"pdf"===((a=e.name.split(/\./).pop())?a.toLowerCase():"").toLowerCase()&&new Promise(function(a){var u=new FileReader;u.readAsArrayBuffer(e),u.onload=function(){a(new Uint8Array(u.result))}}).then(function(a){Q(e.name,a)})},[Q]),tu=S.useCallback(function(e){var u=e===a.RotateDirection.Backward?-90:90,b=eZ.current.rotation,_=360===b||-360===b?u:b+u;e9.markNotRendered(),ex(_),De(l(l({},eZ.current),{rotation:_})),eo({direction:e,doc:y,rotation:_})},[]),ts=S.useCallback(function(e,u){var b=u===a.RotateDirection.Backward?-90:90,_=eZ.current.pagesRotation,E=(_.has(e)?_.get(e):P)+b,S=_.set(e,E);eT(S),eM(function(e){return!e}),De(l(l({},eZ.current),{pagesRotation:S,rotatedPage:e})),ea({direction:u,doc:y,pageIndex:e,rotation:E}),e9.markRendering(e),e0(e)},[]),td=S.useCallback(function(e){De(l(l({},eZ.current),{scrollMode:e})),eF(e)},[]),tp=S.useCallback(function(e){De(l(l({},eZ.current),{viewMode:e})),eN(e)},[]),tf=S.useCallback(function(e){var a=ef.current,u=eZ.current.pageIndex;if(!(u<0||u>=ec)){var b=H[u].pageHeight,_=H[u].pageWidth,E=a?"string"==typeof e?bt(a,b,_,e,eZ.current.viewMode,ec):e:1;eJ.current="string"==typeof e?e:null,E!==eZ.current.scale&&(e5(function(e){return e+1}),e9.markNotRendered(),eq(E),ei({doc:y,scale:E}),De(l(l({},eZ.current),{scale:E})))}},[]),tg=S.useCallback(function(e){e$.enterFullScreenMode(e)},[]),th=S.useCallback(function(){e$.exitFullScreenMode()},[]);S.useEffect(function(){De(l(l({},eZ.current),{fullScreenMode:e$.fullScreenMode}))},[e$.fullScreenMode]),S.useEffect(function(){var e={enterFullScreenMode:tg,exitFullScreenMode:th,getPagesContainer:Ie,getViewerState:Ae,jumpToDestination:tn,jumpToNextDestination:tr,jumpToPreviousDestination:to,jumpToNextPage:ta,jumpToPreviousPage:tc,jumpToPage:ti,openFile:tl,rotate:tu,rotatePage:ts,setVie
1werState:De,switchScrollMode:td,switchViewMode:tp,zoom:tf};return j.forEach(function(a){a.install&&a.install(e)}),function(){j.forEach(function(a){a.uninstall&&a.uninstall(e)})}},[el]),S.useEffect(function(){X({doc:y,file:u}),j.forEach(function(e){e.onDocumentLoad&&e.onDocumentLoad({doc:y,file:u})})},[el]);var tv,tm,tw,tb,ty,t_,tE,tx,tS,tP,tR=e6.boundingClientRect;tx=function(){E&&ti(E)},tS=tR.height>0&&tR.width>0,tP=S.useRef(!1),A(function(){tS&&!tP.current&&(tP.current=!0,tx())},[tx,tS]),A(function(){var e=eZ.current.pageIndex;e>-1&&eI!==eO&&e6.scrollToItem(e,ez).then(function(){e$.fullScreenMode===a.FullScreenMode.EnteredCompletely&&(_||e9.markNotRendered(),eG.current=-1)})},[eO]),A(function(){var e=eZ.current.pageIndex;e>-1&&eS!==eE&&e6.scrollToItem(e,ez)},[eE]),A(function(){0!=eU&&eU!=eZ.current.scale&&e6.zoom(eZ.current.scale/eU,eZ.current.pageIndex).then(function(){e$.fullScreenMode===a.FullScreenMode.EnteredCompletely&&(eY.current=-1)})},[ej]),A(function(){if(eV!==eZ.current.viewMode){var e=e6.startPage,a=e6.endPage,u=e6.virtualItems;e9.markNotRendered(),e9.setRange(e,a);for(var r=function(e){var a=u.find(function(a){return a.index===e});a&&e9.setVisibility(e,a.visibility)},b=e;b<=a;b++)r(b);at()}},[eA]),A(function(){var e=eZ.current.pageIndex;e>-1&&eV!==eA&&e6.scrollToItem(e,ez)},[eA]),A(function(){var e=eZ.current.pageIndex;e>0&&e===E&&eK.current===E&&eJ.current&&(eK.current=-1,tf(eJ.current))},[em]),S.useEffect(function(){e6.isSmoothScrolling||null!==eb.current&&eb.current===em||(eb.current=em,en({currentPage:em,doc:y}))},[em,e6.isSmoothScrolling]),S.useEffect(function(){e$.fullScreenMode===a.FullScreenMode.Entering&&eZ.current.scrollMode===a.ScrollMode.Page&&(eG.current=eZ.current.pageIndex),e$.fullScreenMode===a.FullScreenMode.EnteredCompletely&&eZ.current.scrollMode===a.ScrollMode.Page&&_&&(eG.current=-1),e$.fullScreenMode===a.FullScreenMode.EnteredCompletely&&eJ.current&&(eY.current=eZ.current.pageIndex,tf(eJ.current))},[e$.fullScreenMode]),S.useEffect(function(){if(e$.fullScreenMode!==a.FullScreenMode.Entering&&e$.fullScreenMode!==a.FullScreenMode.Exitting&&!e6.isSmoothScrolling){var e=e6.startPage,u=e6.endPage,b=e6.maxVisbilityIndex,y=e6.virtualItems,_=e$.fullScreenMode===a.FullScreenMode.Entered||e$.fullScreenMode===a.FullScreenMode.EnteredCompletely;if(!(_&&b!==eG.current&&eG.current>-1||_&&b!==eY.current&&eY.current>-1)){ew(b),De(l(l({},eZ.current),{pageIndex:b})),e9.setRange(e,u);for(var i=function(e){var a=y.find(function(a){return a.index===e});a&&e9.setVisibility(e,a.visibility)},E=e;E<=u;E++)i(E);at()}}},[e6.startPage,e6.endPage,e6.isSmoothScrolling,e6.maxVisbilityIndex,e$.fullScreenMode,eR,eE,ej]);var tM=S.useCallback(function(e){e9.markRendered(e),at()},[e2]),at=function(){var e=e9.getHighestPriorityPage();e>-1&&e9.isInRange(e)&&(e9.markRendering(e),e0(e))},it=function(e){var a=em-1,u=em+1;switch(e){case"FirstPage":ti(0);break;case"LastPage":ti(ec-1);break;case"NextPage":u<ec&&ti(u);break;case"PrevPage":a>=0&&ti(a)}},tk=S.useCallback(function(){var e=e6.virtualItems,u=[];switch(eA){case a.ViewMode.DualPage:u=ie(e,2);break;case a.ViewMode.DualPageWithCover:e.length&&(u=0===e[0].index?[[e[0]]].concat(ie(e.slice(1),2)):ie(e,2));break;case a.ViewMode.SinglePage:default:u=ie(e,1)}var b=eu&&eu.core?eu.core.pageLabel:"Page {{pageIndex}}",_={attrs:{className:"rpv-core__inner-container","data-testid":"core__inner-container",ref:ep,style:{height:"100%"}},children:S.createElement(S.Fragment,null),subSlot:{attrs:{"data-testid":"core__inner-pages",className:d({"rpv-core__inner-pages":!0,"rpv-core__inner-pages--horizontal":eO===a.ScrollMode.Horizontal,"rpv-core__inner-pages--rtl":ed,"rpv-core__inner-pages--single":eO===a.ScrollMode.Page,"rpv-core__inner-pages--vertical":eO===a.ScrollMode.Vertical,"rpv-core__inner-pages--wrapped":eO===a.ScrollMode.Wrapped}),ref:ef,style:{height:"100%",position:"relative"}},children:S.createElement("div",{"data-testid":"core__inner-current-page-".concat(em),style:Object.assign({"--scale-factor":ej},e6.getContainerStyles())},u.map(function(e){return S.createElement("div",{className:d({"rpv-core__inner-page-container":!0,"rpv-core__inner-page-container--single":eO===a.ScrollMode.Page}),style:e6.getItemContainerStyles(e[0]),key:"".concat(e[0].index,"-").concat(eA)},e.map(function(e){var u=eA===a.ViewMode.DualPageWithCover&&(0===e.index||ec%2==0&&e.index===ec-1);return S.createElement("div",{"aria-label":b.replace("{{pageIndex}}","".concat(e.index+1)),className:d({"rpv-core__inner-page":!0,"rpv-core__inner-page--dual-even":eA===a.ViewMode.DualPage&&e.index%2==0,"rpv-core__inner-page--dual-odd":eA===a.ViewMode.DualPage&&e.index%2==1,"rpv-core__inner-page--dual-cover":u,"rpv-core__inner-page--dual-cover-even":eA===a.ViewMode.DualPageWithCover&&!u&&e.index%2==0,"rpv-core__inner-page--dual-cover-odd":eA===a.ViewMode.DualPageWithCover&&!u&&e.index%2==1,"rpv-core__inner-page--single":eA===a.ViewMode.SinglePage&&eO===a.ScrollMode.Page}),role:"region",key:"".concat(e.index,"-").concat(eA),style:Object.assign({},e6.getItemStyles(e),e4.buildPageStyles({numPages:ec,pageIndex:e.index,scrollMode:eO,viewM
1ode:eA}))},S.createElement(rt,{doc:y,measureRef:e.measureRef,outlines:eB,pageIndex:e.index,pageRotation:eC.has(e.index)?eC.get(e.index):0,pageSize:H[e.index],plugins:j,renderPage:Z,renderQueueKey:e2,rotation:eE,scale:ej,shouldRender:eQ===e.index,viewMode:eA,onExecuteNamedAction:it,onJumpFromLinkAnnotation:e7,onJumpToDest:tn,onRenderCompleted:tM,onRotatePage:ts}))}))}))}};return j.forEach(function(e){e.renderViewer&&(_=e.renderViewer({containerRef:ep,doc:y,pagesContainerRef:ef,pagesRotation:eC,pageSizes:H,rotation:eE,slot:_,themeContext:es,jumpToPage:ti,openFile:tl,rotate:tu,rotatePage:ts,switchScrollMode:td,switchViewMode:tp,zoom:tf}))}),_},[j,e6]),tC=S.useCallback(function(e){return S.createElement("div",l({},e.attrs,{style:e.attrs&&e.attrs.style?e.attrs.style:{}}),e.children,e.subSlot&&tC(e.subSlot))},[]);return tC(tk())},eB=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.3,1.5,1.7,1.9,2.1,2.4,2.7,3,3.3,3.7,4.1,4.6,5.1,5.7,6.3,7,7.7,8.5,9.4,10],Ot=function(e){var u=e.defaultScale,b=e.doc,y=e.render,_=e.scrollMode,E=e.viewMode,P=S.useRef(),O=S.useState({pageSizes:[],scale:0}),F=O[0],I=O[1];return S.useLayoutEffect(function(){Promise.all(Array(b.numPages).fill(0).map(function(e,a){return new Promise(function(e,u){de(b,a).then(function(a){var u=a.getViewport({scale:1});e({pageHeight:u.height,pageWidth:u.width,rotation:u.rotation})})})})).then(function(e){var y=P.current;if(y&&0!==e.length){var S,O,F=e[0].pageWidth,A=e[0].pageHeight,H=y.parentElement,j=(H.clientWidth-45)/F,Z=(H.clientHeight-45)/A,J=j;switch(_){case a.ScrollMode.Horizontal:J=Math.min(j,Z);break;case a.ScrollMode.Vertical:default:J=j}I({pageSizes:e,scale:u?"string"==typeof u?bt(H,A,F,u,E,b.numPages):u:(S=J,-1===(O=eB.findIndex(function(e){return e>=S}))||0===O?S:eB[O-1])})}})},[b.loadingTask.docId]),0===F.pageSizes.length||0===F.scale?S.createElement("div",{className:"rpv-core__page-size-calculator","data-testid":"core__page-size-calculating",ref:P},S.createElement(x,null)):y(F.pageSizes,F.scale)},Ft=function(){},eW=function(e){function t(a,u){var b=e.call(this)||this;return b.verifyPassword=a,b.passwordStatus=u,b}return c(t,e),t}(Ft),It=function(e){var u=e.passwordStatus,b=e.renderProtectedView,y=e.verifyPassword,_=e.onDocumentAskPassword,E=S.useContext(er).l10n,P=S.useState(""),O=P[0],F=P[1],A=S.useContext(I).direction===a.TextDirection.RightToLeft,f=function(){return y(O)};return S.useEffect(function(){_&&_({verifyPassword:y})},[]),b?b({passwordStatus:u,verifyPassword:y}):S.createElement("div",{className:"rpv-core__asking-password-wrapper"},S.createElement("div",{className:d({"rpv-core__asking-password":!0,"rpv-core__asking-password--rtl":A})},S.createElement("div",{className:"rpv-core__asking-password-message"},u===a.PasswordStatus.RequiredPassword&&E.core.askingPassword.requirePasswordToOpen,u===a.PasswordStatus.WrongPassword&&E.core.wrongPassword.tryAgain),S.createElement("div",{className:"rpv-core__asking-password-body"},S.createElement("div",{className:d({"rpv-core__asking-password-input":!0,"rpv-core__asking-password-input--ltr":!A,"rpv-core__asking-password-input--rtl":A})},S.createElement(w,{testId:"core__asking-password-input",type:"password",value:O,onChange:F,onKeyDown:function(e){"Enter"===e.key&&f()}})),S.createElement(m,{onClick:f},E.core.askingPassword.submit))))},ej=function(e){function t(a){var u=e.call(this)||this;return u.doc=a,u}return c(t,e),t}(Ft),eq=function(e){function t(a){var u=e.call(this)||this;return u.error=a,u}return c(t,e),t}(Ft),eU=function(e){function t(a){var u=e.call(this)||this;return u.percentages=a,u}return c(t,e),t}(Ft),Vt=function(e){var u=e.characterMap,b=e.file,y=e.httpHeaders,_=e.render,E=e.renderError,O=e.renderLoader,F=e.renderProtectedView,A=e.transformGetDocumentParams,H=e.withCredentials,j=e.onDocumentAskPassword,Z=S.useContext(I).direction===a.TextDirection.RightToLeft,J=S.useState(new eU(0)),G=J[0],Y=J[1],K=S.useRef(""),X=T();return S.useEffect(function(){K.current="",Y(new eU(0));var e=new P.PDFWorker({name:"PDFWorker_".concat(Date.now())}),_=Object.assign({httpHeaders:y,withCredentials:H,worker:e},"string"==typeof b?{url:b}:{data:b},u?{cMapUrl:u.url,cMapPacked:u.isCompressed}:{}),E=A?A(_):_,S=P.getDocument(E);return S.onPassword=function(e,u){switch(u){case P.PasswordResponses.NEED_PASSWORD:X.current&&Y
1(new eW(e,a.PasswordStatus.RequiredPassword));break;case P.PasswordResponses.INCORRECT_PASSWORD:X.current&&Y(new eW(e,a.PasswordStatus.WrongPassword))}},S.onProgress=function(e){var a=e.total>0?Math.min(100,100*e.loaded/e.total):100;X.current&&""===K.current&&Y(new eU(a))},S.promise.then(function(e){K.current=e.loadingTask.docId,X.current&&Y(new ej(e))},function(a){return X.current&&!e.destroyed&&Y(new eq({message:a.message||"Cannot load document",name:a.name}))}),function(){S.destroy(),e.destroy()}},[b]),G instanceof eW?S.createElement(It,{passwordStatus:G.passwordStatus,renderProtectedView:F,verifyPassword:G.verifyPassword,onDocumentAskPassword:j}):G instanceof ej?_(G.doc):G instanceof eq?E?E(G.error):S.createElement("div",{className:d({"rpv-core__doc-error":!0,"rpv-core__doc-error--rtl":Z})},S.createElement("div",{className:"rpv-core__doc-error-text"},G.error.message)):S.createElement("div",{"data-testid":"core__doc-loading",className:d({"rpv-core__doc-loading":!0,"rpv-core__doc-loading--rtl":Z})},O?O(G.percentages):S.createElement(x,null))},zt=function(e,a){var u=S.useMemo(function(){return"auto"===e?"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e},[]),b=S.useState(u),y=b[0],_=b[1],E=L(y);return S.useEffect(function(){if("auto"===e){var a=window.matchMedia("(prefers-color-scheme: dark)"),n=function(e){_(e.matches?"dark":"light")};return a.addEventListener("change",n),function(){return a.removeEventListener("change",n)}}},[]),S.useEffect(function(){y!==E&&a&&a(y)},[y]),S.useEffect(function(){e!==y&&_(e)},[e]),{currentTheme:y,setCurrentTheme:_}},Bt=function(e){return{startPage:e.startPage-3,endPage:e.endPage+3}};a.Button=function(e){var u=e.children,b=e.testId,y=e.onClick,_=S.useContext(I).direction===a.TextDirection.RightToLeft,E=b?{"data-testid":b}:{};return S.createElement("button",l({className:d({"rpv-core__button":!0,"rpv-core__button--rtl":_}),type:"button",onClick:y},E),u)},a.Icon=v,a.LazyRender=function(e){var a=e.attrs,u=e.children,b=e.testId,y=S.useState(!1),_=y[0],E=y[1],P=b?l(l({},a),{"data-testid":b}):a,O=g({once:!0,onVisibilityChanged:function(e){e.isVisible&&E(!0)}});return S.createElement("div",l({ref:O},P),_&&u)},a.LocalizationContext=er,a.Menu=function(e){var u=e.children,b=S.useRef(),y=S.useRef([]),_=S.useContext(I).direction===a.TextDirection.RightToLeft,i=function(e){if(b.current)switch(e.key){case"Tab":e.preventDefault();break;case"ArrowDown":e.preventDefault(),c(function(e,a){return a+1});break;case"ArrowUp":e.preventDefault(),c(function(e,a){return a-1});break;case"End":e.preventDefault(),c(function(e,a){return e.length-1});break;case"Home":e.preventDefault(),c(function(e,a){return 0})}},c=function(e){if(b.current){var a=y.current,u=a.findIndex(function(e){return"0"===e.getAttribute("tabindex")}),_=Math.min(a.length-1,Math.max(0,e(a,u)));u>=0&&u<=a.length-1&&a[u].setAttribute("tabindex","-1"),a[_].setAttribute("tabindex","0"),a[_].focus()}};return A(function(){var e=b.current;if(e){var a,u=(a=[],e.querySelectorAll('.rpv-core__menu-item[role="menuitem"]').forEach(function(u){if(u instanceof HTMLElement){var b=u.parentElement;(b===e||"none"!==window.getComputedStyle(b).display)&&a.push(u)}}),a);y.current=u}},[]),A(function(){return document.addEventListener("keydown",i),function(){document.removeEventListener("keydown",i)}},[]),S.createElement("div",{ref:b,"aria-orientation":"vertical",className:d({"rpv-core__menu":!0,"rpv-core__menu--rtl":_}),role:"menu",tabIndex:0},u)},a.MenuDivider=function(){return S.createElement("div",{"aria-orientation":"horizontal",className:"rpv-core__menu-divider",role:"separator"})},a.MenuItem=function(e){var u=e.checked,b=void 0!==u&&u,y=e.children,_=e.icon,E=void 0===_?null:_,P=e.isDisabled,O=e.testId,F=e.onClick,A=S.useContext(I).direction===a.TextDirection.RightToLeft,H=O?{"data-testid":O}:{};return S.createElement("button",l({className:d({"rpv-core__menu-item":!0,"rpv-core__menu-item--disabled":void 0!==P&&P,"rpv-core__menu-item--ltr":!A,"rpv-core__menu-item--rtl":A}),role:"menuitem",tabIndex:-1,type:"button",onClick:F},H),S.createElement("div",{className:d({"rpv-core__menu-item-icon":!0,"rpv-core__menu-item-icon--ltr":!A,"rpv-core__menu-item-icon--rtl":A})},E),S.createElement("div",{className:d({"rpv-core__menu-item-label":!0,"rpv-core__menu-item-label--ltr":!A,"rpv-core__menu-item-label--rtl":A})},y),S.createElement("div",{className:d({"rpv-core__menu-item-check":!0,"rpv-core__menu-item-check--ltr":!A,"rpv-core__menu-item-check--rtl":A})},b&&S.createElement(h,null)))},a.MinimalButton=function(e){var u=e.ariaLabel,b=e.ariaKeyShortcuts,y=void 0===b?"":b,_=e.children,E=e.isDisabled,P=void 0!==E&&E,O=e.isSelected,F=e.testId,A=e.onClick,H=S.useContext(I).direction===a.TextDirection.RightToLeft,j=F?{"data-testid":F}:{};return S.createElement("button",l({"aria-label":void 0===u?"":u},y&&{"aria-keyshortcuts":y},P&&{"aria-disabled":!0},{className:d({"rpv-core__minimal-button":!0,"rpv-core__minimal-button--disabled":P,"rpv-core__minimal-button--rtl":H,"rpv-core__minimal-button--selected":void 0!==O&&O}),type:"button",onClick:A},j),_)}
1,a.Modal=function(e){var a=e.ariaControlsSuffix,u=e.closeOnClickOutside,b=e.closeOnEscape,y=e.content,_=e.isOpened,E=e.target,P=a||"".concat(N());return S.createElement(U,{target:E?function(e,a){return S.createElement("div",{"aria-expanded":a?"true":"false","aria-haspopup":"dialog","aria-controls":"rpv-core__modal-body-".concat(P)},E(e,a))}:null,content:function(e){return S.createElement(W,null,S.createElement(B,{ariaControlsSuffix:P,closeOnClickOutside:u,closeOnEscape:b,onToggle:e},y(e)))},isOpened:void 0!==_&&_})},a.Popover=function(e){var a=e.ariaHasPopup,u=e.ariaControlsSuffix,b=e.closeOnClickOutside,y=e.closeOnEscape,_=e.content,E=e.lockScroll,P=void 0===E||E,O=e.offset,F=e.position,I=e.target,A=q(!1),H=A.opened,j=A.toggle,Z=S.useRef(),J=S.useMemo(function(){return u||"".concat(N())},[]);return S.createElement("div",{ref:Z,"aria-expanded":H?"true":"false","aria-haspopup":void 0===a?"dialog":a,"aria-controls":"rpv-core__popver-body-".concat(J)},I(j,H),H&&S.createElement(S.Fragment,null,P&&S.createElement(re,{closeOnEscape:y,onClose:j}),S.createElement(ne,{ariaControlsSuffix:J,closeOnClickOutside:b,offset:O,position:F,targetRef
1:Z,onClose:j},_(j))))},a.PrimaryButton=m,a.ProgressBar=function(e){var u=e.progress,b=S.useContext(I).direction===a.TextDirection.RightToLeft;return S.createElement("div",{className:d({"rpv-core__progress-bar":!0,"rpv-core__progress-bar--rtl":b})},S.createElement("div",{className:"rpv-core__progress-bar-progress",style:{width:"".concat(u,"%")}},u,"%"))},a.Separator=function(){return S.createElement("div",{className:"rpv-core__separator"})},a.Spinner=x,a.Splitter=function(e){var u=e.constrain,b=S.useContext(I).direction===a.TextDirection.RightToLeft,y=S.useRef(),_=S.useRef(),E=S.useRef(),P=S.useRef(0),O=S.useRef(0),F=S.useRef(0),A=S.useRef(0),H={capture:!0},f=function(e){var a=y.current,S=_.current,O=E.current;if(a&&S&&O){var I=A.current,H=e.clientX-P.current,j=F.current+(b?-H:H),Z=a.parentElement.getBoundingClientRect().width,J=100*j/Z;if(a.classList.add("rpv-core__splitter--resizing"),u){var G=Z-j-I;if(!u({firstHalfPercentage:J,firstHalfSize:j,secondHalfPercentage:100*G/Z,secondHalfSize:G}))return}S.style.width="".concat(J,"%"),document.body.classList.add("rpv-core__splitter-body--resizing"),S.classList.add("rpv-core__splitter-sibling--resizing"),O.classList.add("rpv-core__splitter-sibling--resizing")}},g=function(e){var a=y.current,u=_.current,b=E.current;a&&u&&b&&(document.body.classList.remove("rpv-core__splitter-body--resizing"),a.classList.remove("rpv-core__splitter--resizing"),u.classList.remove("rpv-core__splitter-sibling--resizing"),b.classList.remove("rpv-core__splitter-sibling--resizing"),document.removeEventListener("mousemove",f,H),document.removeEventListener("mouseup",g,H))};return S.useEffect(function(){var e=y.current;e&&(A.current=e.getBoundingClientRect().width,_.current=e.previousElementSibling,E.current=e.nextElementSibling)},[]),S.createElement("div",{ref:y,className:"rpv-core__splitter",onMouseDown:function(e){var a=_.current;a&&(P.current=e.clientX,O.current=e.clientY,F.current=a.getBoundingClientRect().width,document.addEventListener("mousemove",f,H),document.addEventListener("mouseup",g,H))}})},a.TextBox=w,a.ThemeContext=I,a.Tooltip=function(e){var u=e.ariaControlsSuffix,b=e.content,y=e.offset,_=e.position,E=e.target,P=q(!1),O=P.opened,F=P.toggle,I=S.useRef(),A=S.useRef(),H=S.useMemo(function(){return u||"".concat(N())},[]);z(function(){I.current&&document.activeElement&&I.current.contains(document.activeElement)&&g()});var f=function(){F(a.ToggleStatus.Open)},g=function(){F(a.ToggleStatus.Close)};return S.createElement(S.Fragment,null,S.createElement("div",{ref:I,"aria-describedby":"rpv-core__tooltip-body-".concat(H),onBlur:function(e){e.relatedTarget instanceof HTMLElement&&e.currentTarget.parentElement&&e.currentTarget.parentElement.contains(e.relatedTarget)?A.current&&(A.current.style.display="none"):g()},onFocus:f,onMouseEnter:f,onMouseLeave:g},E),O&&S.createElement(oe,{ariaControlsSuffix:H,contentRef:A,offset:y,position:_,targetRef:I},b()))},a.Viewer=function(e){var u=e.characterMap,b=e.defaultScale,y=e.enableSmoothScroll,_=void 0===y||y,E=e.fileUrl,P=e.httpHeaders,O=e.initialPage,F=void 0===O?0:O,A=e.pageLayout,H=e.initialRotation,j=void 0===H?0:H,Z=e.localization,J=e.plugins,G=void 0===J?[]:J,Y=e.renderError,K=e.renderLoader,X=e.renderPage,Q=e.renderProtectedView,eo=e.scrollMode,ea=void 0===eo?a.ScrollMode.Vertical:eo,ei=e.setRenderRange,ec=void 0===ei?Bt:ei,el=e.transformGetDocumentParams,eu=e.theme,es=void 0===eu?{direction:a.TextDirection.LeftToRight,theme:"light"}:eu,ed=e.viewMode,ep=void 0===ed?a.ViewMode.SinglePage:ed,ef=e.withCredentials,eg=e.onDocumentAskPassword,eh=e.onDocumentLoad,ev=void 0===eh?function(){}:eh,em=e.onPageChange,ew=void 0===em?function(){}:em,eb=e.onRotate,ey=void 0===eb?function(){}:eb,e_=e.onRotatePage,eE=void 0===e_?function(){}:e_,ex=e.onSwitchTheme,eS=void 0===ex?function(){}:ex,eP=e.onZoom,eR=void 0===eP?function(){}:eP,eM=S.useState({data:E,name:"string"==typeof E?E:"",shouldLoad:!1}),ek=eM[0],eC=eM[1],$=function(e,a){eC({data:a,name:e,shouldLoad:!0})},eT=S.useState(!1),eL=eT[0],eO=eT[1],eF=L(ek);S.useEffect(function(){var e,a,u;e=eF.data,u=typeof E,"string"==(a=typeof e)&&"string"===u&&e===E||"object"===a&&"object"===u&&e.length===E.length&&e.every(function(e,a){return e===E[a]})||eC({data:E,name:"string"==typeof E?E:"",shouldLoad:eL})},[E,eL]);var eI=g({onVisibilityChanged:function(e){eO(e.isVisible),e.isVisible&&eC(function(e){return Object.assign({},e,{shouldLoad:!0})})}}),eD="string"==typeof es?{direction:a.TextDirection.LeftToRight,theme:es}:es,eA=S.useState(Z||en),eN=eA[0],eV=eA[1],eH=Object.assign({},{direction:eD.direction},zt(eD.theme||"light",eS));return S.useEffect(function(){Z&&eV(Z)},[Z]),S.createElement(er.Provider,{value:{l10n:eN,setL10n:eV}},S.createElement(I.Provider,{value:eH},S.createElement("div",{ref:eI,className:"rpv-core__viewer rpv-core__viewer--".concat(eH.currentTheme),"data-testid":"core__viewer",style:{height:"100%",width:"100%"}},ek.shouldLoad&&S.createElement(Vt,{characterMap:u,file:ek.data,httpHeaders:void 0===P?{}:P,render:function(e){return S.createElement(Ot,{defaultScale:b,doc:e,render:function(u,y){return S.createElement(Tt,{currentFile:{data:ek.data,name:ek.name},defaultScale:b,doc:e,enableSmoothScroll:_,initialPage:F,initialRotation:j,initialScale:y,pageLayout:A,pageSizes:u,plugins:G,renderPage:X,scrollMode:ea,setRenderRange:ec,viewMode:ep,viewerState:{file:ek,fullScreenMode:a.FullScreenMode.Normal,pageIndex:-1,pageHeight:u[0].pageHeight,pageWidth:u[0].pageWidth,pagesRotation:new Map,rotation:j,scale:y,scrollMode:ea,viewMode:ep},onDocumentLoad:ev,onOpenFile:$,onPageChange:ew,onRotate:ey,onRotatePage:eE,onZoom:eR})},scrollMode:ea,viewMode:ep})},renderError:Y,renderLoader:K,renderProtectedView:Q,transformGetDocumentParam
1s:el,withCredentials:void 0!==ef&&ef,onDocumentAskPassword:eg}))))},a.Worker=function(e){var a=e.children,u=e.workerUrl;return P.GlobalWorkerOptions.workerSrc=u,S.createElement(S.Fragment,null,a)},a.chunk=ie,a.classNames=d,a.createStore=function(e){var a=e||{},u={},r=function(e,b){var y;a=l(l({},a),((y={})[e]=b,y)),(u[e]||[]).forEach(function(u){return u(a[e])})},o=function(e){return a[e]};return{subscribe:function(e,a){u[e]=(u[e]||[]).concat(a)},unsubscribe:function(e,a){u[e]=(u[e]||[]).filter(function(e){return e!==a})},update:function(e,a){r(e,a)},updateCurrentValue:function(e,a){var u=o(e);void 0!==u&&r(e,a(u))},get:function(e){return o(e)}}},a.getDestination=fe,a.getPage=de,a.isFullScreenEnabled=R,a.isMac=function(){return"undefined"!=typeof window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)},a.useDebounceCallback=C,a.useIntersectionObserver=g,a.useIsMounted=T,a.useIsomorphicLayoutEffect=A,a.usePrevious=L,a.useRenderQueue=D},54141:function(e,a,u){"use strict";e.exports=u(89469)},11987:function(e,a,u){!function(){var a={452:function(e){"use strict";e.exports=u(97334)}},b={};function __nccwpck_require__(e){var u=b[e];if(void 0!==u)return u.exports;var y=b[e]={exports:{}},_=!0;try{a[e](y,y.exports,__nccwpck_require__),_=!1}finally{_&&delete b[e]}return y.exports}__nccwpck_require__.ab="//";var y={};!function(){var e,a=(e=__nccwpck_require__(452))&&"object"==typeof e&&"default"in e?e.default:e,u=/https?|ftp|gopher|file/;function r(e){"string"==typeof e&&(e=d(e));var b,y,_,E,S,P,O,F,I,A=(y=(b=e).auth,_=b.hostname,E=b.protocol||"",S=b.pathname||"",P=b.hash||"",O=b.query||"",F=!1,y=y?encodeURIComponent(y).replace(/%3A/i,":")+"@":"",b.host?F=y+b.host:_&&(F=y+(~_.indexOf(":")?"["+_+"]":_),b.port&&(F+=":"+b.port)),O&&"object"==typeof O&&(O=a.encode(O)),I=b.search||O&&"?"+O||"",E&&":"!==E.substr(-1)&&(E+=":"),b.slashes||(!E||u.test(E))&&!1!==F?(F="//"+(F||""),S&&"/"!==S[0]&&(S="/"+S)):F||(F=""),P&&"#"!==P[0]&&(P="#"+P),I&&"?"!==I[0]&&(I="?"+I),{protocol:E,host:F,pathname:S=S.replace(/[?#]/g,encodeURIComponent),search:I=I.replace("#","%23"),hash:P});return""+A.protocol+A.host+A.pathname+A.search+A.hash}var b="http://",_=b+"w.w",E=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,S=/https?|ftp|gopher|file/;function h(e,a){var u="string"==typeof e?d(e):e;e="object"==typeof e?r(e):e;var y=d(a),P="";u.protocol&&!u.slashes&&(P=u.protocol,e=e.replace(u.protocol,""),P+="/"===a[0]||"/"===e[0]?"/":""),P&&y.protocol&&(P="",y.slashes||(P=y.protocol,a=a.replace(y.protocol,"")));var O=e.match(E);O&&!y.protocol&&(e=e.substr((P=O[1]+(O[2]||"")).length),/^\/\/[^/]/.test(a)&&(P=P.slice(0,-1)));var F=new URL(e,_+"/"),I=new URL(a,F).toString().replace(_,""),A=y.protocol||u.protocol;return A+=u.slashes||y.slashes?"//":"",!P&&A?I=I.replace(b,A):P&&(I=I.replace(b,"")),S.test(I)||~a.indexOf(".")||"/"===e.slice(-1)||"/"===a.slice(-1)||"/"!==I.slice(-1)||(I=I.slice(0,-1)),P&&(I=P+("/"===I[0]?I.substr(1):I)),I}function l(){}l.prototype.parse=d,l.prototype.format=r,l.prototype.resolve=h,l.prototype.resolveObject=h;var P=/^https?|ftp|gopher|file/,O=/^(.*?)([#?].*)/,F=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,I=/^([a-z0-9.+-]*:)?\/\/\/*/i,A=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function d(e,u,b){if(void 0===u&&(u=!1),void 0===b&&(b=!1),e&&"object"==typeof e&&e instanceof l)return e;var y=(e=e.trim()).match(O);e=y?y[1].replace(/\\/g,"/")+y[2]:e.replace(/\\/g,"/"),A.test(e)&&"/"!==e.slice(-1)&&(e+="/");var E=!/(^javascript)/.test(e)&&e.match(F),S=I.test(e),H="";E&&(P.test(E[1])||(H=E[1].toLowerCase(),e=""+E[2]+E[3]),E[2]||(S=!1,P.test(E[1])?(H=E[1],e=""+E[3]):e="//"+E[3]),3!==E[2].length&&1!==E[2].length||(H=E[1],e="/"+E[3]));var j,Z=(y?y[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),J=Z&&Z[1],G=new l,Y="",K="";try{j=new URL(e)}catch(a){Y=a,H||b||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(K="/",e=e.substr(1));try{j=new URL(e,_)}catch(e){return G.protocol=H,G.href=H,G}}G.slashes=S&&!K,G.host="w.w"===j.host?"":j.host,G.hostname="w.w"===j.hostname?"":j.hostname.replace(/(\[|\])/g,""),G.protocol=Y?H||null:j.protocol,G.search=j.search.replace(/\\/g,"%5C"),G.hash=j.hash.replace(/\\/g,"%5C");var X=e.split("#");!G.search&&~X[0].indexOf("?")&&(G.search="?"),G.hash||""!==X[1]||(G.hash="#"),G.query=u?a.decode(j.search.substr(1)):G.search.substr(1),G.pathname=K+(E?j.pathname.replace(/['^|`]/g,function(e){return"%"+e.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(e,a){try{return decodeURIComponent(a).split("").map(function(e){var a=e.charCodeAt();return a>256||/^[a-z0-9]$/i.test(e)?e:"%"+a.toString(16).toUpperCase()}).join("")}catch(e){return a}}):j.pathname),"about:"===G.protocol&&"blank"===G.pathname&&(G.protocol="",G.pathname=""),Y&&"/"!==e[0]&&(G.pathname=G.pathname.substr(1)),H&&!P.test(H)&&"/"!==e.slice(-1)&&"/"===G.pathname&&(G.pathname=""),G.path=G.pathname+G.search,G.auth=[j.username,j.password].map(decodeURIComponent).filter(
1Boolean).join(":"),G.port=j.port,J&&!G.host.endsWith(J)&&(G.host+=J,G.port=J.slice(1)),G.href=K?""+G.pathname+G.search+G.hash:r(G);var Q=/^(file)/.test(G.href)?["host","hostname"]:[];return Object.keys(G).forEach(function(e){~Q.indexOf(e)||(G[e]=G[e]||null)}),G}y.parse=d,y.format=r,y.resolve=h,y.resolveObject=function(e,a){return d(h(e,a))},y.Url=l}(),e.exports=y}()},97334:function(e){!function(){"use strict";var a={815:function(e){e.exports=function(e,u,b,y){u=u||"&",b=b||"=";var _={};if("string"!=typeof e||0===e.length)return _;var E=/\+/g;e=e.split(u);var S=1e3;y&&"number"==typeof y.maxKeys&&(S=y.maxKeys);var P=e.length;S>0&&P>S&&(P=S);for(var O=0;O<P;++O){var F,I,A,H,j=e[O].replace(E,"%20"),Z=j.indexOf(b);(Z>=0?(F=j.substr(0,Z),I=j.substr(Z+1)):(F=j,I=""),A=decodeURIComponent(F),H=decodeURIComponent(I),Object.prototype.hasOwnProperty.call(_,A))?a(_[A])?_[A].push(H):_[A]=[_[A],H]:_[A]=H}return _};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},577:function(e){var stringifyPrimitive=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,b,y,_){return(b=b||"&",y=y||"=",null===e&&(e=void 0),"object"==typeof e)?map(u(e),function(u){var _=encodeURIComponent(stringifyPrimitive(u))+y;return a(e[u])?map(e[u],function(e){return _+encodeURIComponent(stringifyPrimitive(e))}).join(b):_+encodeURIComponent(stringifyPrimitive(e[u]))}).join(b):_?encodeURIComponent(stringifyPrimitive(_))+y+encodeURIComponent(stringifyPrimitive(e)):""};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function map(e,a){if(e.map)return e.map(a);for(var u=[],b=0;b<e.length;b++)u.push(a(e[b],b));return u}var u=Object.keys||function(e){var a=[];for(var u in e)Object.prototype.hasOwnProperty.call(e,u)&&a.push(u);return a}}},u={};function __nccwpck_require__(e){var b=u[e];if(void 0!==b)return b.exports;var y=u[e]={exports:{}},_=!0;try{a[e](y,y.exports,__nccwpck_require__),_=!1}finally{_&&delete u[e]}return y.exports}__nccwpck_require__.ab="//";var b={};b.decode=b.parse=__nccwpck_require__(815),b.encode=b.stringify=__nccwpck_require__(577),e.exports=b}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.