PageSourceSearch

https://armenia.travel/_next/static/chunks/4599.e5637490c5ab2fd6.js

js armenia.travel collected 2026-10-02 16:39:37 UTC 25,339 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4599],{4839:(e,t,n)=>{n.d(t,{Bd:()=>i,UT:()=>y,ci:()=>u,h1:()=>m,jA:()=>f,mZ:()=>d,mw:()=>s,qC:()=>p,qf:()=>l,vS:()=>h,xL:()=>g,zL:()=>c});var r=n(28752),o=n(68547);let i="undefined"!=typeof window,a=i&&"file:"===window.location.protocol;function u(e){return null!=e}function s(e){return e instanceof ArrayBuffer}function l(e){return(0,r.A)(i,"isBlob can only be used in a browser environment"),e instanceof Blob}function c(e){return"string"==typeof e&&/^data:/.test(e)}function f(e){(0,r.A)(c(e),"Invalid data URI.");let[t="",n=""]=e.split(",");return -1!==t.split(";").indexOf("base64")?atob(n):unescape(n)}function d(){return i&&window.devicePixelRatio||1}function p(){o(!a,"Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.")}function g(e){(null==e?void 0:e.cancel)&&e.cancel()}function h(e,t){return Object.defineProperty(e,"width",{get(){return this.view[2]*t},configurable:!0}),Object.defineProperty(e,"height",{get(){return this.view[3]*t},configurable:!0}),Object.defineProperty(e,"originalWidth",{get(){return this.view[2]},configurable:!0}),Object.defineProperty(e,"originalHeight",{get(){return this.view[3]},configurable:!0}),e}
1function y(e){return"RenderingCancelledException"===e.name}function m(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{if(!r.result)return n(Error("Error while reading a file."));t(r.result)},r.onerror=e=>{if(!e.target)return n(Error("Error while reading a file."));let{error:t}=e.target;if(!t)return n(Error("Error while reading a file."));switch(t.code){case t.NOT_FOUND_ERR:return n(Error("Error while reading a file: File not found."));case t.SECURITY_ERR:return n(Error("Error while reading a file: Security error."));case t.ABORT_ERR:return n(Error("Error while reading a file: Aborted."));default:return n(Error("Error while reading a file."))}},r.readAsArrayBuffer(e)})}},19699:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(37876);function o({children:e,type:t}){return(0,r.jsx)("div",{className:`react-pdf__message react-pdf__message--${t}`,children:e})}},19811:(e,t,n)=>{n.d(t,{A:()=>R});var r=n(37876),o=n(14232),i=n(52280),a=n(77039),u=n(69241),s=n(28752),l=n(68547),c=Object.prototype.hasOwnProperty;function f(e,t,n){for(n of e.keys())if(d(n,t))return n}function d(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&d(e[r],t[r]););return -1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((o=r)&&"object"==typeof o&&!(o=f(t,o))||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((o=r[0])&&"object"==typeof o&&!(o=f(t,o))||!d(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return -1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return -1===r}if(!n||"object"==typeof e){for(n in r=0,e)if(c.call(e,n)&&++r&&!c.call(t,n)||!(n in t)||!d(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}var p=n(53553),g=n(78304),h=n(19699);class y{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(e){this.pdfDocument=e}setViewer(e){this.pdfViewer=e}setExternalLinkRel(e){this.externalLinkRel=e}setExternalLinkTarget(e){this.externalLinkTarget=e}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return(0,s.A)(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber||0}set page(e){(0,s.A)(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber=e}get rotation(){return 0}set rotation(e){}goToDestination(e){return new Promise(t=>{(0,s.A)(this.pdfDocument,"PDF document not loaded."),(0,s.A)(e,"Destination is not specified."),"string"==typeof e?this.pdfDocument.getDestination(e).then(t):Array.isArray(e)?t(e):e.then(t)}).then(e=>{(0,s.A)(Array.isArray(e),`"${e}" is not a valid destination array.`);let t=e[0];new Promise(e=>{(0,s.A)(this.pdfDocument,"PDF document not loaded."),t instanceof Object?this.pdfDocument.getPageIndex(t).then(t=>{e(t)}).catch(()=>{(0,s.A)(!1,`"${t}" is not a valid page reference.`)}):"number"==typeof t?e(t):(0,s.A)(!1,`"${t}" is not a valid destination reference.`)}).then(t=>{let n=t+1;(0,s.A)(this.pdfViewer,"PDF viewer is not initialized."),(0,s.A)(n>=1&&n<=this.pagesCount,`"${n}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({dest:e,pageIndex:t,pageNumber:n})})})}navigateTo(e){this.goToDestination(e)}goToPage(e){(0,s.A)(this.pdfViewer,"PDF viewer is not initialized."),(0,s.A)(e>=1&&e<=this.pagesCount,`"${e}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({pageIndex:e-1,pageNumber:e})}addLinkAttributes(e,t,n){e.href=t,e.rel=this.externalLinkRel||"noopener noreferrer nofollow",e.target=n?"_blank":this.externalLinkTarget||""}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}setHash(){}executeNamedAction(){}cachePageRef(){}isPageVisible(){return!0}isPageCached(){return!0}executeSetOCGState(){}}let m={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var v=n(4839),E=n(31332),A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let{Tm:b}=p,w=(e,t)=>{switch(t){case m.NEED_PASSWORD:e(prompt("Enter the password to open this PDF file."));break;case m.INCORRECT_PASSWORD:e(prompt("Invalid password. Please try again."))}};function S(e){return"object"==typeof e&&null!==e&&("data"in e||"range"in e||"url"in e)}let R=(0,o.forwardRef)(function(e,t){var{children:n,className:c,error:f="Failed to load PDF file.",externalLinkRel:m,externalLinkTarget:R,file:x,inputRef:L,imageResourcesPath:P,loading:T="Loading PDF…",noData:O="No PDF file specified.",onItemClick:j,onLoadError:C,onLoadProgress:D,onLoadSuccess:k,onPassword:_=w,onSourceError:M,onSourceSuccess:N,options:V,renderMode:I,rotate:F}=e,G=A(e,["children","className","error","externalLinkRel","externalLinkTarget","file","inputRef","imageResourcesPath","loading","noData","onItemClick","onLoadError","onLoadProgress","onLoadSuccess","onPassword","onSourceError","onSourceSuccess","options","renderMode","rotate"]);let[U,$]=(0,E.A)(),{value:B,error:H}=U,[z,W]=(0,E.A)(),{value:q,error:J}=z,K=(0,o.useRef)(new y),Y=(0,o.useRef)([]),Z=(0,o.useRef)(void 0),Q=(0,o.useRef)(void 0);x&&x!==Z.current&&S(x)&&(l(!d(x,Z.current),'File prop passed to <Document /> changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.'),Z.current=x),V&&V!==Q.current&&(l(!d(V,Q.current),'Options prop passed to <Document /> changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.'),Q.current=V);let X=(0,o.useRef)({scrollPageIntoView:e=>{let{dest:t,pageNumber:n,pageIndex:r=n-1}=e;if(j)return void j({dest:t,pageIndex:r,pageNumber:n});let o=Y.current[r];if(o)return void o.scrollIntoView();l(!1,`An internal link leading to page ${n} was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document>
1 and handle navigating by yourself or ensure that all pages are rendered within <Document>.`)}});(0,o.useImperativeHandle)(t,()=>({linkService:K,pages:Y,viewer:X}),[]),(0,o.useEffect)(function(){$({type:"RESET"})},[x,$]);let ee=(0,o.useCallback)(()=>{var e,t,n,r;return e=this,t=void 0,n=void 0,r=function*(){if(!x)return null;if("string"==typeof x)return(0,v.zL)(x)?{data:(0,v.jA)(x)}:((0,v.qC)(),{url:x});if(x instanceof b)return{range:x};if((0,v.mw)(x))return{data:x};if(v.Bd&&(0,v.qf)(x))return{data:yield(0,v.h1)(x)};if((0,s.A)("object"==typeof x,"Invalid parameter in file, need either Uint8Array, string or a parameter object"),(0,s.A)(S(x),"Invalid parameter object: need either .data, .range or .url"),"url"in x&&"string"==typeof x.url){if((0,v.zL)(x.url)){let{url:e}=x,t=A(x,["url"]);return Object.assign({data:(0,v.jA)(e)},t)}(0,v.qC)()}return x},new(n||(n=Promise))(function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},[x]);(0,o.useEffect)(()=>{let e=(0,a.A)(ee());return e.promise.then(e=>{$({type:"RESOLVE",value:e})}).catch(e=>{$({type:"REJECT",error:e})}),()=>{(0,v.xL)(e)}},[ee,$]),(0,o.useEffect)(()=>{if(void 0!==B){if(!1===B)return void(H&&(l(!1,H.toString()),M&&M(H)));N&&N()}},[B]),(0,o.useEffect)(function(){W({type:"RESET"})},[W,B]),(0,o.useEffect)(function(){if(!B)return;let e=V?Object.assign(Object.assign({},B),V):B,t=p.YE(e);D&&(t.onProgress=D),_&&(t.onPassword=_);let n=t.promise.then(e=>{W({type:"RESOLVE",value:e})}).catch(e=>{t.destroyed||W({type:"REJECT",error:e})});return()=>{n.finally(()=>t.destroy())}},[V,W,B]),(0,o.useEffect)(()=>{if(void 0!==q){if(!1===q)return void(J&&(l(!1,J.toString()),C&&C(J)));q&&(k&&k(q),Y.current=Array(q.numPages),K.current.setDocument(q))}},[q]),(0,o.useEffect)(function(){K.current.setViewer(X.current),K.current.setExternalLinkRel(m),K.current.setExternalLinkTarget(R)},[m,R]);let et=(0,o.useCallback)((e,t)=>{Y.current[e]=t},[]),en=(0,o.useCallback)(e=>{delete Y.current[e]},[]),er=(0,o.useMemo)(()=>({imageResourcesPath:P,linkService:K.current,onItemClick:j,pdf:q,registerPage:et,renderMode:I,rotate:F,unregisterPage:en}),[P,j,q,et,I,F,en]),eo=(0,o.useMemo)(()=>(0,i.Ay)(G,()=>q),[G,q]);return(0,r.jsx)("div",Object.assign({className:(0,u.A)("react-pdf__Document",c),ref:L,style:{"--scale-factor":"1"}},eo,{children:x?null==q?(0,r.jsx)(h.A,{type:"loading",children:"function"==typeof T?T():T}):!1===q?(0,r.jsx)(h.A,{type:"error",children:"function"==typeof f?f():f}):(0,r.jsx)(g.A.Provider,{value:er,children:n}):(0,r.jsx)(h.A,{type:"no-data",children:"function"==typeof O?O():O})}))})},28752:(e,t,n)=>{n.d(t,{A:()=>r});function r(e,t){if(!e)throw Error("Invariant failed")}},31332:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(14232);function o(e,t){switch(t.type){case"RESOLVE":return{value:t.value,error:void 0};case"REJECT":return{value:!1,error:t.error};case"RESET":return{value:void 0,error:void 0};default:return e}}function i(){return(0,r.useReducer)(o,{value:void 0,error:void 0})}},52280:(e,t,n)=>{n.d(t,{Ay:()=>i});var r=function(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},o=r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r([],["onCopy","onCut","onPaste"],!0),["onCompositionEnd","onCompositionStart","onCompositionUpdate"],!0),["onFocus","onBlur"],!0),["onInput","onInvalid","onReset","onSubmit"],!0),["onLoad","onError"],!0),["onKeyDown","onKeyPress","onKeyUp"],!0),["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],!0),["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],!0),["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],!0),["onSelect"],!0),["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],!0),["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],!0),["onScroll"],!0),["onWheel"],!0),["onAnimationStart","onAnimationEnd","onAnimationIteration"],!0),["onTransitionEnd"],!0),["onChange"],!0),["onToggle"],!0);function i(e,t){var n={};return o.forEach(function(r){var o=e[r];o&&(t?n[r]=function(e){return o(e,t(r))}:n[r]=o)}),n}},68547:e=>{e.exports=function(){}},69241:(e,t,n)=>{n.d(t,{A:()=>r});let r=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}
1else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}(e))&&(r&&(r+=" "),r+=t);return r}},76165:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(37876),o=n(14232),i=n(77039),a=n(52280),u=n(69241);function s(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(Boolean);return n.length<=1?n[0]||null:function(e){n.forEach(function(t){"function"==typeof t?t(e):t&&(t.current=e)})}}var l=n(28752),c=n(68547);let f=(0,o.createContext)(null);var d=n(19699),p=n(53553);let g={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},h=/^H(\d+)$/;function y(e){return"children"in e}function m(e){return!!y(e)&&1===e.children.length&&0 in e.children&&"id"in e.children[0]}function v({className:e,node:t}){let n=(0,o.useMemo)(()=>t?Object.assign(Object.assign({},function(e){let t={};if(y(e)){let{role:n}=e,r=n.match(h);if(r)t.role="heading",t["aria-level"]=Number(r[1]);else if(n in g){let e=g[n];e&&(t.role=e)}}return t}(t)),function e(t){let n={};if(y(t)){if(void 0!==t.alt&&(n["aria-label"]=t.alt),void 0!==t.lang&&(n.lang=t.lang),m(t)){let[r]=t.children;if(r){let t=e(r);return Object.assign(Object.assign({},n),t)}}}else"id"in t&&(n["aria-owns"]=t.id);return n}(t)):null,[t]),i=(0,o.useMemo)(()=>!y(t)||m(t)?null:t.children.map((e,t)=>(0,r.jsx)(v,{node:e},t)),[t]);return(0,r.jsx)("span",Object.assign({className:e},n,{children:i}))}function E(){return(0,o.useContext)(f)}var A=n(31332),b=n(4839);function w(){let e=E();(0,l.A)(e,"Unable to find Page context.");let{onGetStructTreeError:t,onGetStructTreeSuccess:n}=e,[a,u]=(0,A.A)(),{value:s,error:f}=a,{customTextRenderer:d,page:p}=e;return((0,o.useEffect)(function(){u({type:"RESET"})},[u,p]),(0,o.useEffect)(function(){if(d||!p)return;let e=(0,i.A)(p.getStructTree());return e.promise.then(e=>{u({type:"RESOLVE",value:e})}).catch(e=>{u({type:"REJECT",error:e})}),()=>(0,b.xL)(e)},[d,p,u]),(0,o.useEffect)(()=>{if(void 0!==s){if(!1===s)return void(f&&(c(!1,f.toString()),t&&t(f)));s&&n&&n(s)}},[s]),s)?(0,r.jsx)(v,{className:"react-pdf__Page__structTree structTree",node:s}):null}let S=p.ng;function R(e){let t=E();(0,l.A)(t,"Unable to find Page context.");let{_className:n,canvasBackground:i,devicePixelRatio:a=(0,b.mZ)(),onRenderError:u,onRenderSuccess:f,page:d,renderForms:p,renderTextLayer:g,rotate:h,scale:y}=Object.assign(Object.assign({},t),e),{canvasRef:m}=e;(0,l.A)(d,"Attempted to render page canvas, but no page was specified.");let v=(0,o.useRef)(null);function A(e){!(0,b.UT)(e)&&(c(!1,e.toString()),u&&u(e))}let R=(0,o.useMemo)(()=>d.getViewport({scale:y*a,rotation:h}),[a,d,h,y]),x=(0,o.useMemo)(()=>d.getViewport({scale:y,rotation:h}),[d,h,y]);(0,o.useEffect)(function(){if(!d)return;d.cleanup();let{current:e}=v;if(!e)return;e.width=R.width,e.height=R.height,e.style.width=`${Math.floor(x.width)}px`,e.style.height=`${Math.floor(x.height)}px`,e.style.visibility="hidden";let t={annotationMode:p?S.ENABLE_FORMS:S.ENABLE,canvasContext:e.getContext("2d",{alpha:!1}),viewport:R};i&&(t.background=i);let n=d.render(t);return n.promise.then(()=>{e.style.visibility="",d&&f&&f((0,b.vS)(d,y))}).catch(A),()=>(0,b.xL)(n)},[i,d,p,R,x]);let L=(0,o.useCallback)(()=>{let{current:e}=v;e&&(e.width=0,e.height=0)},[]);return(0,o.useEffect)(()=>L,[L]),(0,r.jsx)("canvas",{className:`${n}__canvas`,dir:"ltr",ref:s(m,v),style:{display:"block",userSelect:"none"},children:g?(0,r.jsx)(w,{}):null})}function x(){let e=E();(0,l.A)(e,"Unable to find Page context.");let{customTextRenderer:t,onGetTextError:n,onGetTextSuccess:a,onRenderTextLayerError:s,onRenderTextLayerSuccess:f,page:d,pageIndex:g,pageNumber:h,rotate:y,scale:m}=e;(0,l.A)(d,"Attempted to load page text content, but no page was specified.");let[v,w]=(0,A.A)(),{value:S,error:R}=v,x=(0,o.useRef)(null);c(1===Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10),"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer"),(0,o.useEffect)(function(){w({type:"RESET"})},[d,w]),(0,o.useEffect)(function(){if(!d)return;let e=(0,i.A)(d.getTextContent());return e.promise.then(e=>{w({type:"RESOLVE",value:e})}).catch(e=>{w({type:"REJECT",error:e})}),()=>(0,b.xL)(e)},[d,w]),(0,o.useEffect)(()=>
1{if(void 0!==S){if(!1===S)return void(R&&(c(!1,R.toString()),n&&n(R)));S&&a&&a(S)}},[S]);let L=(0,o.useCallback)(()=>{f&&f()},[f]),P=(0,o.useCallback)(e=>{c(!1,e.toString()),s&&s(e)},[s]),T=(0,o.useMemo)(()=>d.getViewport({scale:m,rotation:y}),[d,y,m]);return(0,o.useLayoutEffect)(function(){if(!d||!S)return;let{current:e}=x;if(!e)return;e.innerHTML="";let n=d.streamTextContent({includeMarkedContent:!0}),r=new p.D6({container:e,textContentSource:n,viewport:T});return r.render().then(()=>{let n=document.createElement("div");n.className="endOfContent",e.append(n);let r=e.querySelectorAll('[role="presentation"]');if(t){let e=0;S.items.forEach((n,o)=>{if(!("str"in n))return;let i=r[e];i&&(i.innerHTML=t(Object.assign({pageIndex:g,pageNumber:h,itemIndex:o},n)),e+=n.str&&n.hasEOL?2:1)})}L()}).catch(P),()=>(0,b.xL)(r)},[t,P,L,d,g,h,S,T]),(0,r.jsx)("div",{className:(0,u.A)("react-pdf__Page__textContent","textLayer"),onMouseUp:function(){let e=x.current;e&&e.classList.remove("selecting")},onMouseDown:function(){let e=x.current;e&&e.classList.add("selecting")},ref:x})}var L=n(78304);function P(){return(0,o.useContext)(L.A)}function T(){let e=P(),t=E();(0,l.A)(t,"Unable to find Page context.");let{imageResourcesPath:n,linkService:a,onGetAnnotationsError:s,onGetAnnotationsSuccess:f,onRenderAnnotationLayerError:d,onRenderAnnotationLayerSuccess:g,page:h,pdf:y,renderForms:m,rotate:v,scale:w=1}=Object.assign(Object.assign({},e),t);(0,l.A)(y,"Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."),(0,l.A)(h,"Attempted to load page annotations, but no page was specified."),(0,l.A)(a,"Attempted to load page annotations, but no linkService was specified.");let[S,R]=(0,A.A)(),{value:x,error:L}=S,T=(0,o.useRef)(null);c(1===Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10),"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations"),(0,o.useEffect)(function(){R({type:"RESET"})},[R,h]),(0,o.useEffect)(function(){if(!h)return;let e=(0,i.A)(h.getAnnotations());return e.promise.then(e=>{R({type:"RESOLVE",value:e})}).catch(e=>{R({type:"REJECT",error:e})}),()=>{(0,b.xL)(e)}},[R,h]),(0,o.useEffect)(()=>{if(void 0!==x){if(!1===x)return void(L&&(c(!1,L.toString()),s&&s(L)));x&&f&&f(x)}},[x]);let O=(0,o.useMemo)(()=>h.getViewport({scale:w,rotation:v}),[h,v,w]);return(0,o.useEffect)(function(){if(!y||!h||!a||!x)return;let{current:e}=T;if(!e)return;let t=O.clone({dontFlip:!0}),r={annotations:x,annotationStorage:y.annotationStorage,div:e,imageResourcesPath:n,linkService:a,page:h,renderForms:m,viewport:t};e.innerHTML="";try{new p.dU({accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,div:e,l10n:null,page:h,structTreeLayer:null,viewport:t}).render(r),g&&g()}catch(e){c(!1,`${e}`),d&&d(e)}return()=>{}},[x,n,a,h,y,m,O]),(0,r.jsx)("div",{className:(0,u.A)("react-pdf__Page__annotations","annotationLayer"),ref:T})}var O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function j(e){let t=Object.assign(Object.assign({},P()),e),{_className:n="react-pdf__Page",_enableRegisterUnregisterPage:p=!0,canvasBackground:g,canvasRef:h,children:y,className:m,customRenderer:v,customTextRenderer:E,devicePixelRatio:w,error:S="Failed to load the page.",height:L,inputRef:j,loading:C="Loading page…",noData:D="No page specified.",onGetAnnotationsError:k,onGetAnnotationsSuccess:_,onGetStructTreeError:M,onGetStructTreeSuccess:N,onGetTextError:V,onGetTextSuccess:I,onLoadError:F,onLoadSuccess:G,onRenderAnnotationLayerError:U,onRenderAnnotationLayerSuccess:$,onRenderError:B,onRenderSuccess:H,onRenderTextLayerError:z,onRenderTextLayerSuccess:W,pageIndex:q,pageNumber:J,pdf:K,registerPage:Y,renderAnnotationLayer:Z=!0,renderForms:Q=!1,renderMode:X="canvas",renderTextLayer:ee=!0,rotate:et,scale:en=1,unregisterPage:er,width:eo}=t,ei=O(t,["_className","_enableRegisterUnregisterPage","canvasBackgroun
1d","canvasRef","children","className","customRenderer","customTextRenderer","devicePixelRatio","error","height","inputRef","loading","noData","onGetAnnotationsError","onGetAnnotationsSuccess","onGetStructTreeError","onGetStructTreeSuccess","onGetTextError","onGetTextSuccess","onLoadError","onLoadSuccess","onRenderAnnotationLayerError","onRenderAnnotationLayerSuccess","onRenderError","onRenderSuccess","onRenderTextLayerError","onRenderTextLayerSuccess","pageIndex","pageNumber","pdf","registerPage","renderAnnotationLayer","renderForms","renderMode","renderTextLayer","rotate","scale","unregisterPage","width"]),[ea,eu]=(0,A.A)(),{value:es,error:el}=ea,ec=(0,o.useRef)(null);(0,l.A)(K,"Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");let ef=(0,b.ci)(J)?J-1:null!=q?q:null,ed=null!=J?J:(0,b.ci)(q)?q+1:null,ep=null!=et?et:es?es.rotate:null,eg=(0,o.useMemo)(()=>{if(!es)return null;let e=1,t=null!=en?en:1;if(eo||L){let t=es.getViewport({scale:1,rotation:ep});eo?e=eo/t.width:L&&(e=L/t.height)}return t*e},[L,es,ep,en,eo]);(0,o.useEffect)(function(){return()=>{(0,b.ci)(ef)&&p&&er&&er(ef)}},[p,K,ef,er]),(0,o.useEffect)(function(){eu({type:"RESET"})},[eu,K,ef]),(0,o.useEffect)(function(){if(!K||!ed)return;let e=(0,i.A)(K.getPage(ed));return e.promise.then(e=>{eu({type:"RESOLVE",value:e})}).catch(e=>{eu({type:"REJECT",error:e})}),()=>(0,b.xL)(e)},[eu,K,ed]),(0,o.useEffect)(()=>{if(void 0!==es){if(!1===es)return void(el&&(c(!1,el.toString()),F&&F(el)));!function(){if(G){if(!es||!eg)return;G((0,b.vS)(es,eg))}if(p&&Y){if(!(0,b.ci)(ef)||!ec.current)return;Y(ef,ec.current)}}()}},[es,eg]);let eh=(0,o.useMemo)(()=>es&&(0,b.ci)(ef)&&ed&&(0,b.ci)(ep)&&(0,b.ci)(eg)?{_className:n,canvasBackground:g,customTextRenderer:E,devicePixelRatio:w,onGetAnnotationsError:k,onGetAnnotationsSuccess:_,onGetStructTreeError:M,onGetStructTreeSuccess:N,onGetTextError:V,onGetTextSuccess:I,onRenderAnnotationLayerError:U,onRenderAnnotationLayerSuccess:$,onRenderError:B,onRenderSuccess:H,onRenderTextLayerError:z,onRenderTextLayerSuccess:W,page:es,pageIndex:ef,pageNumber:ed,renderForms:Q,renderTextLayer:ee,rotate:ep,scale:eg}:null,[n,g,E,w,k,_,M,N,V,I,U,$,B,H,z,W,es,ef,ed,Q,ee,ep,eg]),ey=(0,o.useMemo)(()=>(0,a.Ay)(ei,()=>es?eg?(0,b.vS)(es,eg):void 0:es),[ei,es,eg]),em=`${ef}@${eg}/${ep}`;return(0,r.jsx)("div",Object.assign({className:(0,u.A)(n,m),"data-page-number":ed,ref:s(j,ec),style:{"--scale-factor":`${eg}`,backgroundColor:g||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"}},ey,{children:ed?null===K||null==es?(0,r.jsx)(d.A,{type:"loading",children:"function"==typeof C?C():C}):!1===K||!1===es?(0,r.jsx)(d.A,{type:"error",children:"function"==typeof S?S():S}):(0,r.jsxs)(f.Provider,{value:eh,children:[function(){switch(X){case"custom":return(0,l.A)(v,'renderMode was set to "custom", but no customRenderer was passed.'),(0,r.jsx)(v,{},`${em}_custom`);case"none":return null;default:return(0,r.jsx)(R,{canvasRef:h},`${em}_canvas`)}}(),ee?(0,r.jsx)(x,{},`${em}_text`):null,Z?(0,r.jsx)(T,{},`${em}_annotations`):null,y]}):(0,r.jsx)(d.A,{type:"no-data",children:"function"==typeof D?D():D})}))}},77039:(e,t,n)=>{n.d(t,{A:()=>r});function r(e){var t=!1;return{promise:new Promise(function(n,r){e.then(function(e){return!t&&n(e)}).catch(function(e){return!t&&r(e)})}),cancel:function(){t=!0}}}},78304:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(14232).createContext)(null)}}]);
2//# sourceMappingURL=4599.e5637490c5ab2fd6.js.map

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.