UNPKG

ngx-extended-pdf-viewer

Version:

Embedding PDF files in your Angular application. Highly configurable viewer including the toolbar, sidebar, and all the features you're used to.

22 lines 510 kB
window.ngxZone.runOutsideAngular(() => { /** * @licstart The following is the entire license notice for the * Javascript code in this page * * Copyright 2021 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @licend The above is the entire license notice for the * Javascript code in this page */(()=>{var e=[,(e,t,r)=>{var i=r(2),n=r(3),o=r(4),a=r(8),s=r(61),l=r(17),c=l("iterator"),d=l("toStringTag"),h=a.values,handlePrototype=function(e,t){if(e){if(e[c]!==h)try{s(e,c,h)}catch(t){e[c]=h}e[d]||s(e,d,t);if(n[t])for(var r in a)if(e[r]!==a[r])try{s(e,r,a[r])}catch(t){e[r]=a[r]}}};for(var u in n)handlePrototype(i[u]&&i[u].prototype,u);handlePrototype(o,"DOMTokenList")},e=>{var check=function(e){return e&&e.Math==Math&&e};e.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||function(){return this}()||Function("return this")()},e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},(e,t,r)=>{var i=r(5)("span").classList,n=i&&i.constructor&&i.constructor.prototype;e.exports=n===Object.prototype?void 0:n},(e,t,r)=>{var i=r(2),n=r(6),o=i.document,a=n(o)&&n(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},(e,t,r)=>{var i=r(7);e.exports=function(e){return"object"==typeof e?null!==e:i(e)}},e=>{e.exports=function(e){return"function"==typeof e}},(e,t,r)=>{"use strict";var i=r(9),n=r(16),o=r(57),a=r(58),s=r(35).f,l=r(63),c=r(19),d=r(33),h="Array Iterator",u=a.set,p=a.getterFor(h);e.exports=l(Array,"Array",(function(e,t){u(this,{type:h,target:i(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,r=e.kind,i=e.index++;if(!t||i>=t.length){e.target=void 0;return{value:void 0,done:!0}}return"keys"==r?{value:i,done:!1}:"values"==r?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}}),"values");var g=o.Arguments=o.Array;n("keys");n("values");n("entries");if(!c&&d&&"values"!==g.name)try{s(g,"name",{value:"values"})}catch(e){}},(e,t,r)=>{var i=r(10),n=r(15);e.exports=function(e){return i(n(e))}},(e,t,r)=>{var i=r(2),n=r(11),o=r(13),a=r(14),s=i.Object,l=n("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?l(e,""):s(e)}:s},(e,t,r)=>{var i=r(12),n=Function.prototype,o=n.bind,a=n.call,s=i&&o.bind(a,a);e.exports=i?function(e){return e&&s(e)}:function(e){return e&&function(){return a.apply(e,arguments)}}},(e,t,r)=>{var i=r(13);e.exports=!i((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t,r)=>{var i=r(11),n=i({}.toString),o=i("".slice);e.exports=function(e){return o(n(e),8,-1)}},(e,t,r)=>{var i=r(2).TypeError;e.exports=function(e){if(null==e)throw i("Can't call method on "+e);return e}},(e,t,r)=>{var i=r(17),n=r(30),o=r(35),a=i("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:n(null)});e.exports=function(e){s[a][e]=!0}},(e,t,r)=>{var i=r(2),n=r(18),o=r(22),a=r(24),s=r(25),l=r(29),c=n("wks"),d=i.Symbol,h=d&&d.for,u=l?d:d&&d.withoutSetter||a;e.exports=function(e){if(!o(c,e)||!s&&"string"!=typeof c[e]){var t="Symbol."+e;s&&o(d,e)?c[e]=d[e]:c[e]=l&&h?h(t):u(t)}return c[e]}},(e,t,r)=>{var i=r(19),n=r(20);(e.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.0",mode:i?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.0/LICENSE",source:"https://github.com/zloirock/core-js"})},e=>{e.exports=!1},(e,t,r)=>{var i=r(2),n=r(21),o="__core-js_shared__",a=i[o]||n(o,{});e.exports=a},(e,t,r)=>{var i=r(2),n=Object.defineProperty;e.exports=function(e,t){try{n(i,e,{value:t,configurable:!0,writable:!0})}catch(r){i[e]=t}return t}},(e,t,r)=>{var i=r(11),n=r(23),o=i({}.hasOwnProperty);e.exports=Object.hasOwn||function hasOwn(e,t){return o(n(e),t)}},(e,t,r)=>{var i=r(2),n=r(15),o=i.Object;e.exports=function(e){return o(n(e))}},(e,t,r)=>{var i=r(11),n=0,o=Math.random(),a=i(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++n+o,36)}},(e,t,r)=>{var i=r(26),n=r(13);e.exports=!!Object.getOwnPropertySymbols&&!n((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},(e,t,r)=>{var i,n,o=r(2),a=r(27),s=o.process,l=o.Deno,c=s&&s.versions||l&&l.version,d=c&&c.v8;d&&(n=(i=d.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1]));!n&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(n=+i[1]);e.exports=n},(e,t,r)=>{var i=r(28);e.exports=i("navigator","userAgent")||""},(e,t,r)=>{var i=r(2),n=r(7),aFunction=function(e){return n(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?aFunction(i[e]):i[e]&&i[e][t]}},(e,t,r)=>{var i=r(25);e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,r)=>{var i,n=r(31),o=r(32),a=r(54),s=r(53),l=r(55),c=r(5),d=r(56),h=d("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return"<script>"+e+"</"+"script>"},NullProtoObjectViaActiveX=function(e){e.write(scriptTag(""));e.close();var t=e.parentWindow.Object;e=null;return t},NullProtoObject=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&i?NullProtoObjectViaActiveX(i):function(){var e,t=c("iframe");t.style.display="none";l.appendChild(t);t.src=String("javascript:");(e=t.contentWindow.document).open();e.write(scriptTag("document.F=Object"));e.close();return e.F}():NullProtoObjectViaActiveX(i);for(var e=a.length;e--;)delete NullProtoObject.prototype[a[e]];return NullProtoObject()};s[h]=!0;e.exports=Object.create||function create(e,t){var r;if(null!==e){EmptyConstructor.prototype=n(e);r=new EmptyConstructor;EmptyConstructor.prototype=null;r[h]=e}else r=NullProtoObject();return void 0===t?r:o.f(r,t)}},(e,t,r)=>{var i=r(2),n=r(6),o=i.String,a=i.TypeError;e.exports=function(e){if(n(e))return e;throw a(o(e)+" is not an object")}},(e,t,r)=>{var i=r(33),n=r(34),o=r(35),a=r(31),s=r(9),l=r(46);t.f=i&&!n?Object.defineProperties:function defineProperties(e,t){a(e);for(var r,i=s(t),n=l(t),c=n.length,d=0;c>d;)o.f(e,r=n[d++],i[r]);return e}},(e,t,r)=>{var i=r(13);e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},(e,t,r)=>{var i=r(33),n=r(13);e.exports=i&&n((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(e,t,r)=>{var i=r(2),n=r(33),o=r(36),a=r(34),s=r(31),l=r(37),c=i.TypeError,d=Object.defineProperty,h=Object.getOwnPropertyDescriptor,u="enumerable",p="configurable",g="writable";t.f=n?a?function defineProperty(e,t,r){s(e);t=l(t);s(r);if("function"==typeof e&&"prototype"===t&&"value"in r&&g in r&&!r.writable){var i=h(e,t);if(i&&i.writable){e[t]=r.value;r={configurable:p in r?r.configurable:i.configurable,enumerable:u in r?r.enumerable:i.enumerable,writable:!1}}}return d(e,t,r)}:d:function defineProperty(e,t,r){s(e);t=l(t);s(r);if(o)try{return d(e,t,r)}catch(e){}if("get"in r||"set"in r)throw c("Accessors not supported");"value"in r&&(e[t]=r.value);return e}},(e,t,r)=>{var i=r(33),n=r(13),o=r(5);e.exports=!i&&!n((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},(e,t,r)=>{var i=r(38),n=r(40);e.exports=function(e){var t=i(e,"string");return n(t)?t:t+""}},(e,t,r)=>{var i=r(2),n=r(39),o=r(6),a=r(40),s=r(42),l=r(45),c=r(17),d=i.TypeError,h=c("toPrimitive");e.exports=function(e,t){if(!o(e)||a(e))return e;var r,i=s(e,h);if(i){void 0===t&&(t="default");r=n(i,e,t);if(!o(r)||a(r))return r;throw d("Can't convert object to primitive value")}void 0===t&&(t="number");return l(e,t)}},(e,t,r)=>{var i=r(12),n=Function.prototype.call;e.exports=i?n.bind(n):function(){return n.apply(n,arguments)}},(e,t,r)=>{var i=r(2),n=r(28),o=r(7),a=r(41),s=r(29),l=i.Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&a(t.prototype,l(e))}},(e,t,r)=>{var i=r(11);e.exports=i({}.isPrototypeOf)},(e,t,r)=>{var i=r(43);e.exports=function(e,t){var r=e[t];return null==r?void 0:i(r)}},(e,t,r)=>{var i=r(2),n=r(7),o=r(44),a=i.TypeError;e.exports=function(e){if(n(e))return e;throw a(o(e)+" is not a function")}},(e,t,r)=>{var i=r(2).String;e.exports=function(e){try{return i(e)}catch(e){return"Object"}}},(e,t,r)=>{var i=r(2),n=r(39),o=r(7),a=r(6),s=i.TypeError;e.exports=function(e,t){var r,i;if("string"===t&&o(r=e.toString)&&!a(i=n(r,e)))return i;if(o(r=e.valueOf)&&!a(i=n(r,e)))return i;if("string"!==t&&o(r=e.toString)&&!a(i=n(r,e)))return i;throw s("Can't convert object to primitive value")}},(e,t,r)=>{var i=r(47),n=r(54);e.exports=Object.keys||function keys(e){return i(e,n)}},(e,t,r)=>{var i=r(11),n=r(22),o=r(9),a=r(48).indexOf,s=r(53),l=i([].push);e.exports=function(e,t){var r,i=o(e),c=0,d=[];for(r in i)!n(s,r)&&n(i,r)&&l(d,r);for(;t.length>c;)n(i,r=t[c++])&&(~a(d,r)||l(d,r));return d}},(e,t,r)=>{var i=r(9),n=r(49),o=r(51),createMethod=function(e){return function(t,r,a){var s,l=i(t),c=o(l),d=n(a,c);if(e&&r!=r){for(;c>d;)if((s=l[d++])!=s)return!0}else for(;c>d;d++)if((e||d in l)&&l[d]===r)return e||d||0;return!e&&-1}};e.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},(e,t,r)=>{var i=r(50),n=Math.max,o=Math.min;e.exports=function(e,t){var r=i(e);return r<0?n(r+t,0):o(r,t)}},e=>{var t=Math.ceil,r=Math.floor;e.exports=function(e){var i=+e;return i!=i||0===i?0:(i>0?r:t)(i)}},(e,t,r)=>{var i=r(52);e.exports=function(e){return i(e.length)}},(e,t,r)=>{var i=r(50),n=Math.min;e.exports=function(e){return e>0?n(i(e),9007199254740991):0}},e=>{e.exports={}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t,r)=>{var i=r(28);e.exports=i("document","documentElement")},(e,t,r)=>{var i=r(18),n=r(24),o=i("keys");e.exports=function(e){return o[e]||(o[e]=n(e))}},e=>{e.exports={}},(e,t,r)=>{var i,n,o,a=r(59),s=r(2),l=r(11),c=r(6),d=r(61),h=r(22),u=r(20),p=r(56),g=r(53),f="Object already initialized",m=s.TypeError,v=s.WeakMap;if(a||u.state){var b=u.state||(u.state=new v),w=l(b.get),y=l(b.has),_=l(b.set);i=function(e,t){if(y(b,e))throw new m(f);t.facade=e;_(b,e,t);return t};n=function(e){return w(b,e)||{}};o=function(e){return y(b,e)}}else{var S=p("state");g[S]=!0;i=function(e,t){if(h(e,S))throw new m(f);t.facade=e;d(e,S,t);return t};n=function(e){return h(e,S)?e[S]:{}};o=function(e){return h(e,S)}}e.exports={set:i,get:n,has:o,enforce:function(e){return o(e)?n(e):i(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=n(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return r}}}},(e,t,r)=>{var i=r(2),n=r(7),o=r(60),a=i.WeakMap;e.exports=n(a)&&/native code/.test(o(a))},(e,t,r)=>{var i=r(11),n=r(7),o=r(20),a=i(Function.toString);n(o.inspectSource)||(o.inspectSource=function(e){return a(e)});e.exports=o.inspectSource},(e,t,r)=>{var i=r(33),n=r(35),o=r(62);e.exports=i?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){e[t]=r;return e}},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,r)=>{"use strict";var i=r(64),n=r(39),o=r(19),a=r(68),s=r(7),l=r(74),c=r(76),d=r(79),h=r(78),u=r(61),p=r(67),g=r(17),f=r(57),m=r(75),v=a.PROPER,b=a.CONFIGURABLE,w=m.IteratorPrototype,y=m.BUGGY_SAFARI_ITERATORS,_=g("iterator"),S="keys",P="values",C="entries",returnThis=function(){return this};e.exports=function(e,t,r,a,g,m,R){l(r,t,a);var E,x,T,getIterationMethod=function(e){if(e===g&&B)return B;if(!y&&e in A)return A[e];switch(e){case S:return function keys(){return new r(this,e)};case P:return function values(){return new r(this,e)};case C:return function entries(){return new r(this,e)}}return function(){return new r(this)}},I=t+" Iterator",L=!1,A=e.prototype,D=A[_]||A["@@iterator"]||g&&A[g],B=!y&&D||getIterationMethod(g),M="Array"==t&&A.entries||D;if(M&&(E=c(M.call(new e)))!==Object.prototype&&E.next){o||c(E)===w||(d?d(E,w):s(E[_])||p(E,_,returnThis));h(E,I,!0,!0);o&&(f[I]=returnThis)}if(v&&g==P&&D&&D.name!==P)if(!o&&b)u(A,"name",P);else{L=!0;B=function values(){return n(D,this)}}if(g){x={values:getIterationMethod(P),keys:m?B:getIterationMethod(S),entries:getIterationMethod(C)};if(R)for(T in x)(y||L||!(T in A))&&p(A,T,x[T]);else i({target:t,proto:!0,forced:y||L},x)}o&&!R||A[_]===B||p(A,_,B,{name:g});f[t]=B;return x}},(e,t,r)=>{var i=r(2),n=r(65).f,o=r(61),a=r(67),s=r(21),l=r(69),c=r(73);e.exports=function(e,t){var r,d,h,u,p,g=e.target,f=e.global,m=e.stat;if(r=f?i:m?i[g]||s(g,{}):(i[g]||{}).prototype)for(d in t){u=t[d];h=e.noTargetGet?(p=n(r,d))&&p.value:r[d];if(!c(f?d:g+(m?".":"#")+d,e.forced)&&void 0!==h){if(typeof u==typeof h)continue;l(u,h)}(e.sham||h&&h.sham)&&o(u,"sham",!0);a(r,d,u,e)}}},(e,t,r)=>{var i=r(33),n=r(39),o=r(66),a=r(62),s=r(9),l=r(37),c=r(22),d=r(36),h=Object.getOwnPropertyDescriptor;t.f=i?h:function getOwnPropertyDescriptor(e,t){e=s(e);t=l(t);if(d)try{return h(e,t)}catch(e){}if(c(e,t))return a(!n(o.f,e,t),e[t])}},(e,t)=>{"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,n=i&&!r.call({1:2},1);t.f=n?function propertyIsEnumerable(e){var t=i(this,e);return!!t&&t.enumerable}:r},(e,t,r)=>{var i=r(2),n=r(7),o=r(22),a=r(61),s=r(21),l=r(60),c=r(58),d=r(68).CONFIGURABLE,h=c.get,u=c.enforce,p=String(String).split("String");(e.exports=function(e,t,r,l){var c,h=!!l&&!!l.unsafe,g=!!l&&!!l.enumerable,f=!!l&&!!l.noTargetGet,m=l&&void 0!==l.name?l.name:t;if(n(r)){"Symbol("===String(m).slice(0,7)&&(m="["+String(m).replace(/^Symbol\(([^)]*)\)/,"$1")+"]");(!o(r,"name")||d&&r.name!==m)&&a(r,"name",m);(c=u(r)).source||(c.source=p.join("string"==typeof m?m:""))}if(e!==i){h?!f&&e[t]&&(g=!0):delete e[t];g?e[t]=r:a(e,t,r)}else g?e[t]=r:s(t,r)})(Function.prototype,"toString",(function toString(){return n(this)&&h(this).source||l(this)}))},(e,t,r)=>{var i=r(33),n=r(22),o=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,s=n(o,"name"),l=s&&"something"===function something(){}.name,c=s&&(!i||i&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:c}},(e,t,r)=>{var i=r(22),n=r(70),o=r(65),a=r(35);e.exports=function(e,t,r){for(var s=n(t),l=a.f,c=o.f,d=0;d<s.length;d++){var h=s[d];i(e,h)||r&&i(r,h)||l(e,h,c(t,h))}}},(e,t,r)=>{var i=r(28),n=r(11),o=r(71),a=r(72),s=r(31),l=n([].concat);e.exports=i("Reflect","ownKeys")||function ownKeys(e){var t=o.f(s(e)),r=a.f;return r?l(t,r(e)):t}},(e,t,r)=>{var i=r(47),n=r(54).concat("length","prototype");t.f=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return i(e,n)}},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,r)=>{var i=r(13),n=r(7),o=/#|\.prototype\./,isForced=function(e,t){var r=s[a(e)];return r==c||r!=l&&(n(t)?i(t):!!t)},a=isForced.normalize=function(e){return String(e).replace(o,".").toLowerCase()},s=isForced.data={},l=isForced.NATIVE="N",c=isForced.POLYFILL="P";e.exports=isForced},(e,t,r)=>{"use strict";var i=r(75).IteratorPrototype,n=r(30),o=r(62),a=r(78),s=r(57),returnThis=function(){return this};e.exports=function(e,t,r,l){var c=t+" Iterator";e.prototype=n(i,{next:o(+!l,r)});a(e,c,!1,!0);s[c]=returnThis;return e}},(e,t,r)=>{"use strict";var i,n,o,a=r(13),s=r(7),l=r(30),c=r(76),d=r(67),h=r(17),u=r(19),p=h("iterator"),g=!1;[].keys&&("next"in(o=[].keys())?(n=c(c(o)))!==Object.prototype&&(i=n):g=!0);null==i||a((function(){var e={};return i[p].call(e)!==e}))?i={}:u&&(i=l(i));s(i[p])||d(i,p,(function(){return this}));e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:g}},(e,t,r)=>{var i=r(2),n=r(22),o=r(7),a=r(23),s=r(56),l=r(77),c=s("IE_PROTO"),d=i.Object,h=d.prototype;e.exports=l?d.getPrototypeOf:function(e){var t=a(e);if(n(t,c))return t[c];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof d?h:null}},(e,t,r)=>{var i=r(13);e.exports=!i((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},(e,t,r)=>{var i=r(35).f,n=r(22),o=r(17)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype);e&&!n(e,o)&&i(e,o,{configurable:!0,value:t})}},(e,t,r)=>{var i=r(11),n=r(31),o=r(80);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=i(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]);t=r instanceof Array}catch(e){}return function setPrototypeOf(r,i){n(r);o(i);t?e(r,i):r.__proto__=i;return r}}():void 0)},(e,t,r)=>{var i=r(2),n=r(7),o=i.String,a=i.TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw a("Can't set "+o(e)+" as a prototype")}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.compatibilityParams=t.OptionKind=t.AppOptions=void 0;r(82);const i=Object.create(null);t.compatibilityParams=i;{const e="undefined"!=typeof navigator&&navigator.userAgent||"",t="undefined"!=typeof navigator&&navigator.platform||"",r="undefined"!=typeof navigator&&navigator.maxTouchPoints||1,n=/Android/.test(e),o=/\b(iPad|iPhone|iPod)(?=;)/.test(e)||"MacIntel"===t&&r>1,a=/CriOS/.test(e);!function checkOnBlobSupport(){a&&(i.disableCreateObjectURL=!0)}();!function checkCanvasSizeLimitation(){(o||n)&&(i.maxCanvasPixels=5242880)}()}const n={VIEWER:2,API:4,WORKER:8,PREFERENCE:128};t.OptionKind=n;const o={annotationMode:{value:2,kind:n.VIEWER+n.PREFERENCE},cursorToolOnLoad:{value:0,kind:n.VIEWER+n.PREFERENCE},defaultUrl:{value:"",kind:n.VIEWER},defaultZoomValue:{value:"",kind:n.VIEWER+n.PREFERENCE},disableHistory:{value:!1,kind:n.VIEWER},disablePageLabels:{value:!1,kind:n.VIEWER+n.PREFERENCE},enablePermissions:{value:!1,kind:n.VIEWER+n.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:n.VIEWER+n.PREFERENCE},enableScripting:{value:!0,kind:n.VIEWER+n.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:n.VIEWER},externalLinkTarget:{value:0,kind:n.VIEWER+n.PREFERENCE},historyUpdateUrl:{value:!1,kind:n.VIEWER+n.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:n.VIEWER+n.PREFERENCE},imageResourcesPath:{value:"./images/",kind:n.VIEWER},maxCanvasPixels:{value:16777216,compatibility:i.maxCanvasPixels,kind:n.VIEWER},pdfBugEnabled:{value:!1,kind:n.VIEWER+n.PREFERENCE},printResolution:{value:150,kind:n.VIEWER},removePageBorders:{value:!1,kind:n.VIEWER+n.PREFERENCE},renderer:{value:"canvas",kind:n.VIEWER},sidebarViewOnLoad:{value:-1,kind:n.VIEWER+n.PREFERENCE},scrollModeOnLoad:{value:-1,kind:n.VIEWER+n.PREFERENCE},spreadModeOnLoad:{value:-1,kind:n.VIEWER+n.PREFERENCE},textLayerMode:{value:1,kind:n.VIEWER+n.PREFERENCE},useOnlyCssZoom:{value:!1,kind:n.VIEWER+n.PREFERENCE},viewerCssTheme:{value:0,kind:n.VIEWER+n.PREFERENCE},viewOnLoad:{value:0,kind:n.VIEWER+n.PREFERENCE},cMapPacked:{value:!0,kind:n.API},cMapUrl:{value:"../web/cmaps/",kind:n.API},disableAutoFetch:{value:!1,kind:n.API+n.PREFERENCE},disableFontFace:{value:!1,kind:n.API+n.PREFERENCE},disableRange:{value:!1,kind:n.API+n.PREFERENCE},disableStream:{value:!1,kind:n.API+n.PREFERENCE},docBaseUrl:{value:"",kind:n.API},enableXfa:{value:!0,kind:n.API+n.PREFERENCE},fontExtraProperties:{value:!1,kind:n.API},isEvalSupported:{value:!0,kind:n.API},maxImageSize:{value:-1,kind:n.API},pdfBug:{value:!1,kind:n.API},standardFontDataUrl:{value:"../web/standard_fonts/",kind:n.API},verbosity:{value:1,kind:n.API},workerPort:{value:null,kind:n.WORKER},workerSrc:{value:"./assets/pdf.worker.js",kind:n.WORKER}};o.disablePreferences={value:!1,kind:n.VIEWER};o.locale={value:"undefined"!=typeof navigator?navigator.language:"en-US",kind:n.VIEWER};o.sandboxBundleSrc={value:"../build/pdf.sandbox.js",kind:n.VIEWER};o.renderer.kind+=n.PREFERENCE;const a=Object.create(null);if(globalThis.pdfDefaultOptions)for(const e in globalThis.pdfDefaultOptions)a[e]=globalThis.pdfDefaultOptions[e];t.AppOptions=class AppOptions{constructor(){throw new Error("Cannot initialize AppOptions.")}static get(e){const t=a[e];if(void 0!==t)return t;const r=o[e];if(void 0!==r){var i;return null!==(i=r.compatibility)&&void 0!==i?i:r.value}}static getAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=Object.create(null);for(const i in o){var r;const s=o[i];if(e){if(0==(e&s.kind))continue;if(e===n.PREFERENCE){const e=s.value,r=typeof e;if("boolean"===r||"string"===r||"number"===r&&Number.isInteger(e)){t[i]=e;continue}throw new Error("Invalid type for preference: ".concat(i))}}const l=a[i];t[i]=void 0!==l?l:null!==(r=s.compatibility)&&void 0!==r?r:s.value}return t}static set(e,t){a[e]=t}static setAll(e){for(const t in e)a[t]=e[t]}static remove(e){delete a[e]}static _hasUserOptions(){return Object.keys(a).length>0}}},(e,t,r)=>{"use strict";var i=r(64),n=r(83);i({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n})},(e,t,r)=>{"use strict";var i=r(39),n=r(11),o=r(84),a=r(87),s=r(88),l=r(18),c=r(30),d=r(58).get,h=r(89),u=r(90),p=l("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,f=g,m=n("".charAt),v=n("".indexOf),b=n("".replace),w=n("".slice),y=function(){var e=/a/,t=/b*/g;i(g,e,"a");i(g,t,"a");return 0!==e.lastIndex||0!==t.lastIndex}(),_=s.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(y||S||_||h||u)&&(f=function exec(e){var t,r,n,s,l,h,u,P=this,C=d(P),R=o(e),E=C.raw;if(E){E.lastIndex=P.lastIndex;t=i(f,E,R);P.lastIndex=E.lastIndex;return t}var x=C.groups,T=_&&P.sticky,I=i(a,P),L=P.source,A=0,D=R;if(T){I=b(I,"y","");-1===v(I,"g")&&(I+="g");D=w(R,P.lastIndex);if(P.lastIndex>0&&(!P.multiline||P.multiline&&"\n"!==m(R,P.lastIndex-1))){L="(?: "+L+")";D=" "+D;A++}r=new RegExp("^(?:"+L+")",I)}S&&(r=new RegExp("^"+L+"$(?!\\s)",I));y&&(n=P.lastIndex);s=i(g,T?r:P,D);if(T)if(s){s.input=w(s.input,A);s[0]=w(s[0],A);s.index=P.lastIndex;P.lastIndex+=s[0].length}else P.lastIndex=0;else y&&s&&(P.lastIndex=P.global?s.index+s[0].length:n);S&&s&&s.length>1&&i(p,s[0],r,(function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(s[l]=void 0)}));if(s&&x){s.groups=h=c(null);for(l=0;l<x.length;l++)h[(u=x[l])[0]]=s[u[1]]}return s});e.exports=f},(e,t,r)=>{var i=r(2),n=r(85),o=i.String;e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},(e,t,r)=>{var i=r(2),n=r(86),o=r(7),a=r(14),s=r(17)("toStringTag"),l=i.Object,c="Arguments"==a(function(){return arguments}());e.exports=n?a:function(e){var t,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=l(e),s))?r:c?a(t):"Object"==(i=a(t))&&o(t.callee)?"Arguments":i}},(e,t,r)=>{var i={};i[r(17)("toStringTag")]="z";e.exports="[object z]"===String(i)},(e,t,r)=>{"use strict";var i=r(31);e.exports=function(){var e=i(this),t="";e.global&&(t+="g");e.ignoreCase&&(t+="i");e.multiline&&(t+="m");e.dotAll&&(t+="s");e.unicode&&(t+="u");e.sticky&&(t+="y");return t}},(e,t,r)=>{var i=r(13),n=r(2).RegExp,o=i((function(){var e=n("a","y");e.lastIndex=2;return null!=e.exec("abcd")})),a=o||i((function(){return!n("a","y").sticky})),s=o||i((function(){var e=n("^r","gy");e.lastIndex=2;return null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},(e,t,r)=>{var i=r(13),n=r(2).RegExp;e.exports=i((function(){var e=n(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},(e,t,r)=>{var i=r(13),n=r(2).RegExp;e.exports=i((function(){var e=n("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.PDFViewerApplication=t.PDFPrintServiceFactory=t.DefaultExternalServices=void 0;r(92);r(1);r(82);r(122);r(128);r(137);r(139);r(157);r(158);var i=r(162),n=r(81),o=r(164),a=r(165),s=r(166),l=r(168),c=r(169),d=r(170),h=r(172),u=r(173),p=r(174),g=r(180),f=r(181),m=r(182),v=r(183),b=r(184),w=r(185),y=r(187),_=r(188),S=r(189),P=r(190),C=r(192),R=r(226),E=r(227),x=r(228);const T=-1,I=1,L={AUTOMATIC:0,LIGHT:1,DARK:2},A=["1.0","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8","1.9","2.0","2.1","2.2","2.3"],D=["acrobat distiller","acrobat pdfwriter","adobe livecycle","adobe pdf library","adobe photoshop","ghostscript","tcpdf","cairo","dvipdfm","dvips","pdftex","pdfkit","itext","prince","quarkxpress","mac os x","microsoft","openoffice","oracle","luradocument","pdf-xchange","antenna house","aspose.cells","fpdf"];class DefaultExternalServices{constructor(){throw new Error("Cannot initialize DefaultExternalServices.")}static updateFindControlState(e){}static updateFindMatchesCount(e){}static initPassiveLoading(e){}static async fallback(e){}static reportTelemetry(e){}static createDownloadManager(e){throw new Error("Not implemented: createDownloadManager")}static createPreferences(){throw new Error("Not implemented: createPreferences")}static createL10n(e){throw new Error("Not implemented: createL10n")}static createScripting(e){throw new Error("Not implemented: createScripting")}static get supportsIntegratedFind(){return(0,a.shadow)(this,"supportsIntegratedFind",!1)}static get supportsDocumentFonts(){return(0,a.shadow)(this,"supportsDocumentFonts",!0)}static get supportedMouseWheelZoomModifierKeys(){return(0,a.shadow)(this,"supportedMouseWheelZoomModifierKeys",{ctrlKey:!0,metaKey:!0})}static get isInAutomation(){return(0,a.shadow)(this,"isInAutomation",!1)}}t.DefaultExternalServices=DefaultExternalServices;const B={initialBookmark:document.location.hash.substring(1),_initializedCapability:(0,a.createPromiseCapability)(),_fellback:!1,appConfig:null,pdfDocument:null,pdfLoadingTask:null,printService:null,pdfViewer:null,pdfThumbnailViewer:null,pdfRenderingQueue:null,pdfPresentationMode:null,pdfDocumentProperties:null,pdfLinkService:null,pdfHistory:null,pdfSidebar:null,pdfSidebarResizer:null,pdfOutlineViewer:null,pdfAttachmentViewer:null,pdfLayerViewer:null,pdfCursorTools:null,pdfScriptingManager:null,store:null,downloadManager:null,overlayManager:null,preferences:null,toolbar:null,secondaryToolbar:null,eventBus:null,l10n:null,isInitialViewSet:!1,downloadComplete:!1,isViewerEmbedded:window.parent!==window,url:"",baseUrl:"",_downloadUrl:"",externalServices:DefaultExternalServices,_boundEvents:Object.create(null),documentInfo:null,metadata:null,_contentDispositionFilename:null,_contentLength:null,_saveInProgress:!1,_docStats:null,_wheelUnusedTicks:0,_idleCallbacks:new Set,async initialize(e){this.preferences=this.externalServices.createPreferences();this.appConfig=e;await this._readPreferences();await this._parseHashParameters();this._forceCssTheme();await this._initializeL10n();this.isViewerEmbedded&&n.AppOptions.get("externalLinkTarget")===a.LinkTarget.NONE&&n.AppOptions.set("externalLinkTarget",a.LinkTarget.TOP);await this._initializeViewerComponents();this.bindEvents();this.bindWindowEvents();const t=e.appContainer||document.documentElement;this.l10n.translate(t).then((()=>{this.eventBus.dispatch("localized",{source:this})}));this._initializedCapability.resolve();this.initializeLoadingBar()},async _readPreferences(){if(!n.AppOptions.get("disablePreferences")){n.AppOptions._hasUserOptions()&&Window.ngxConsole.warn('_readPreferences: The Preferences may override manually set AppOptions; please use the "disablePreferences"-option in order to prevent that.');try{n.AppOptions.setAll(await this.preferences.getAll())}catch(e){Window.ngxConsole.error('_readPreferences: "'.concat(null==e?void 0:e.message,'".'))}}},async _parseHashParameters(){if(!n.AppOptions.get("pdfBugEnabled"))return;const e=document.location.hash.substring(1);if(!e)return;const t=(0,i.parseQueryString)(e),r=[];"true"===t.get("disableworker")&&r.push(async function loadFakeWorker(){if(!a.GlobalWorkerOptions.workerSrc){a.GlobalWorkerOptions.workerSrc=n.AppOptions.get("workerSrc");"Function"===a.GlobalWorkerOptions.workerSrc.constructor.name&&(a.GlobalWorkerOptions.workerSrc=a.GlobalWorkerOptions.workerSrc())}await(0,a.loadScript)(a.PDFWorker.workerSrc)}());t.has("disablerange")&&n.AppOptions.set("disableRange","true"===t.get("disablerange"));t.has("disablestream")&&n.AppOptions.set("disableStream","true"===t.get("disablestream"));t.has("disableautofetch")&&n.AppOptions.set("disableAutoFetch","true"===t.get("disableautofetch"));t.has("disablefontface")&&n.AppOptions.set("disableFontFace","true"===t.get("disablefontface"));t.has("disablehistory")&&n.AppOptions.set("disableHistory","true"===t.get("disablehistory"));t.has("verbosity")&&n.AppOptions.set("verbosity",0|t.get("verbosity"));if(t.has("textlayer"))switch(t.get("textlayer")){case"off":n.AppOptions.set("textLayerMode",i.TextLayerMode.DISABLE);break;case"visible":case"shadow":case"hover":this.appConfig.viewerContainer.classList.add("textLayer-".concat(t.get("textlayer")))}if(t.has("pdfbug")){n.AppOptions.set("pdfBug",!0);n.AppOptions.set("fontExtraProperties",!0);const e=t.get("pdfbug").split(",");r.push(async function initPDFBug(e){const{debuggerScriptPath:t,mainContainer:r}=B.appConfig;await(0,a.loadScript)(t);PDFBug.init({OPS:a.OPS},r,e)}(e))}t.has("locale")&&n.AppOptions.set("locale",t.get("locale"));if(0!==r.length)try{await Promise.all(r)}catch(e){Window.ngxConsole.error('_parseHashParameters: "'.concat(e.message,'".'))}},async _initializeL10n(){this.l10n=this.externalServices.createL10n({locale:n.AppOptions.get("locale")});const e=await this.l10n.getDirection();document.getElementsByTagName("html")[0].dir=e},_forceCssTheme(){const e=n.AppOptions.get("viewerCssTheme");if(e!==L.AUTOMATIC&&Object.values(L).includes(e))try{const r=document.styleSheets[0],i=(null==r?void 0:r.cssRules)||[];for(let n=0,o=i.length;n<o;n++){var t;const o=i[n];if(o instanceof CSSMediaRule&&"(prefers-color-scheme: dark)"===(null===(t=o.media)||void 0===t?void 0:t[0])){if(e===L.LIGHT){r.deleteRule(n);return}const t=/^@media \(prefers-color-scheme: dark\) {\n\s*([\w\s-.,:;/\\{}()]+)\n}$/.exec(o.cssText);if(null!=t&&t[1]){r.deleteRule(n);r.insertRule(t[1],n)}return}}}catch(e){Window.ngxConsole.error('_forceCssTheme: "'.concat(null==e?void 0:e.message,'".'))}},async _initializeViewerComponents(){const{appConfig:e,externalServices:t}=this;let r;r=e.eventBus?e.eventBus:t.isInAutomation?new o.AutomationEventBus:new o.EventBus;this.eventBus=r;this.overlayManager=new l.OverlayManager;const i=new w.PDFRenderingQueue;i.onIdle=this._cleanup.bind(this);this.pdfRenderingQueue=i;const a=new m.PDFLinkService({eventBus:r,externalLinkTarget:n.AppOptions.get("externalLinkTarget"),externalLinkRel:n.AppOptions.get("externalLinkRel"),ignoreDestinationZoom:n.AppOptions.get("ignoreDestinationZoom")});this.pdfLinkService=a;const x=t.createDownloadManager();this.downloadManager=x;const T=new p.PDFFindController({linkService:a,eventBus:r,pageViewMode:n.AppOptions.get("pageViewMode")});this.findController=T;const I=new y.PDFScriptingManager({eventBus:r,sandboxBundleSrc:n.AppOptions.get("sandboxBundleSrc"),scriptingFactory:t,docPropertiesLookup:this._scriptingDocProperties.bind(this)});this.pdfScriptingManager=I;const L=e.mainContainer,A=e.viewerContainer;this.pdfViewer=new C.PDFViewer({container:L,viewer:A,eventBus:r,renderingQueue:i,linkService:a,downloadManager:x,findController:T,scriptingManager:n.AppOptions.get("enableScripting")&&I,renderer:n.AppOptions.get("renderer"),l10n:this.l10n,textLayerMode:n.AppOptions.get("textLayerMode"),annotationMode:n.AppOptions.get("annotationMode"),imageResourcesPath:n.AppOptions.get("imageResourcesPath"),removePageBorders:n.AppOptions.get("removePageBorders"),renderInteractiveForms:n.AppOptions.get("renderInteractiveForms"),enablePrintAutoRotate:n.AppOptions.get("enablePrintAutoRotate"),useOnlyCssZoom:n.AppOptions.get("useOnlyCssZoom"),maxCanvasPixels:n.AppOptions.get("maxCanvasPixels"),pageViewMode:n.AppOptions.get("pageViewMode"),enablePermissions:n.AppOptions.get("enablePermissions")});i.setViewer(this.pdfViewer);a.setViewer(this.pdfViewer);I.setViewer(this.pdfViewer);this.pdfThumbnailViewer=new P.PDFThumbnailViewer({container:e.sidebar.thumbnailView,eventBus:r,renderingQueue:i,linkService:a,l10n:this.l10n});i.setThumbnailViewer(this.pdfThumbnailViewer);if(!this.isViewerEmbedded&&!n.AppOptions.get("disableHistory")){this.pdfHistory=new g.PDFHistory({linkService:a,eventBus:r});a.setHistory(this.pdfHistory)}this.supportsIntegratedFind||(this.findBar=new u.PDFFindBar(e.findBar,r,this.l10n));this.pdfDocumentProperties=new h.PDFDocumentProperties(e.documentProperties,this.overlayManager,r,this.l10n);this.pdfCursorTools=new s.PDFCursorTools({container:L,eventBus:r,cursorToolOnLoad:n.AppOptions.get("cursorToolOnLoad")});this.toolbar=new E.Toolbar(e.toolbar,r,this.l10n);this.secondaryToolbar=new R.SecondaryToolbar(e.secondaryToolbar,L,r);this.supportsFullscreen&&(this.pdfPresentationMode=new b.PDFPresentationMode({container:L,pdfViewer:this.pdfViewer,eventBus:r}));let D=n.AppOptions.get("passwordPrompt");D||(D=new c.PasswordPrompt(e.passwordOverlay,this.overlayManager,this.l10n,this.isViewerEmbedded));this.passwordPrompt=D;this.pdfOutlineViewer=new v.PDFOutlineViewer({container:e.sidebar.outlineView,eventBus:r,linkService:a});this.pdfAttachmentViewer=new d.PDFAttachmentViewer({container:e.sidebar.attachmentsView,eventBus:r,downloadManager:x});this.pdfLayerViewer=new f.PDFLayerViewer({container:e.sidebar.layersView,eventBus:r,l10n:this.l10n});this.pdfSidebar=new _.PDFSidebar({elements:e.sidebar,pdfViewer:this.pdfViewer,pdfThumbnailViewer:this.pdfThumbnailViewer,eventBus:r,l10n:this.l10n});this.pdfSidebar.onToggled=this.forceRendering.bind(this);this.pdfSidebarResizer=new S.PDFSidebarResizer(e.sidebarResizer,r,this.l10n)},run(e){this.initialize(e).then(webViewerInitialized)},get initialized(){return this._initializedCapability.settled},get initializedPromise(){return this._initializedCapability.promise},zoomIn(e){this.pdfViewer.isInPresentationMode||this.pdfViewer.increaseScale(e)},zoomOut(e){this.pdfViewer.isInPresentationMode||this.pdfViewer.decreaseScale(e)},zoomReset(){this.pdfViewer.isInPresentationMode||(this.pdfViewer.currentScaleValue=i.DEFAULT_SCALE_VALUE)},get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0},get page(){return this.pdfViewer.currentPageNumber},set page(e){this.pdfViewer.currentPageNumber=e},get supportsPrinting(){return W.instance.supportsPrinting},get supportsFullscreen(){return(0,a.shadow)(this,"supportsFullscreen",document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled)},get supportsIntegratedFind(){return this.externalServices.supportsIntegratedFind},get supportsDocumentFonts(){return this.externalServices.supportsDocumentFonts},initializeLoadingBar(){const e=new i.ProgressBar("#loadingBar");e.hide();return(0,a.shadow)(this,"loadingBar",e)},get supportedMouseWheelZoomModifierKeys(){return this.externalServices.supportedMouseWheelZoomModifierKeys},initPassiveLoading(){throw new Error("Not implemented: initPassiveLoading")},setTitleUsingUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.url=e;this.baseUrl=e.split("#")[0];t&&(this._downloadUrl=t===e?this.baseUrl:t.split("#")[0]);let r=(0,a.getPdfFilenameFromUrl)(e,"");if(!r)try{r=decodeURIComponent((0,a.getFilenameFromUrl)(e))||e}catch(t){r=e}this.setTitle(r)},setTitle(e){this.isViewerEmbedded||(document.title=e)},get _docFilename(){return this._contentDispositionFilename||(0,a.getPdfFilenameFromUrl)(this.url)},_hideViewBookmark(){const{toolbar:e,secondaryToolbar:t}=this.appConfig;e.viewBookmark.hidden=!0;t.viewBookmarkButton.hidden=!0},_cancelIdleCallbacks(){if(this._idleCallbacks.size){for(const e of this._idleCallbacks)window.cancelIdleCallback(e);this._idleCallbacks.clear()}},async close(){var e,t,r;this._unblockDocumentLoadEvent();this._hideViewBookmark();const{container:i}=this.appConfig.errorWrapper;i.hidden=!0;if(!this.pdfLoadingTask)return;if((null===(e=this.pdfDocument)||void 0===e?void 0:e.annotationStorage.size)>0&&this._annotationStorageModified)try{await this.save({sourceEventType:"save"})}catch(e){}const n=[];n.push(this.pdfLoadingTask.destroy());this.pdfLoadingTask=null;if(this.pdfDocument){this.pdfDocument=null;this.pdfThumbnailViewer.setDocument(null);this.pdfViewer.setDocument(null);this.pdfLinkService.setDocument(null);this.pdfDocumentProperties.setDocument(null)}this.pdfLinkService.externalLinkEnabled=!0;this._fellback=!1;this.store=null;this.isInitialViewSet=!1;this.downloadComplete=!1;this.url="";this.baseUrl="";this._downloadUrl="";this.documentInfo=null;this.metadata=null;this._contentDispositionFilename=null;this._contentLength=null;this._saveInProgress=!1;this._docStats=null;this._cancelIdleCallbacks();n.push(this.pdfScriptingManager.destroyPromise);this.pdfSidebar.reset();this.pdfOutlineViewer.reset();this.pdfAttachmentViewer.reset();this.pdfLayerViewer.reset();null===(t=this.pdfHistory)||void 0===t||t.reset();null===(r=this.findBar)||void 0===r||r.reset();this.toolbar.reset();this.secondaryToolbar.reset();"undefined"!=typeof PDFBug&&PDFBug.cleanup();await Promise.all(n)},async open(e,t){window.ngxZone.runOutsideAngular((async()=>{this.pdfLoadingTask&&await this.close();const r=n.AppOptions.getAll(n.OptionKind.WORKER);for(const e in r)a.GlobalWorkerOptions[e]=r[e];const i=Object.create(null);if("string"==typeof e){this.setTitleUsingUrl(e,e);i.url=e}else if(e&&"byteLength"in e)i.data=e;else if(e.url&&e.originalUrl){this.setTitleUsingUrl(e.originalUrl,e.url);i.url=e.url}const o=n.AppOptions.getAll(n.OptionKind.API);for(const e in o){let t=o[e];i[e]=t}if(t)for(const e in t)i[e]=t[e];const s=(0,a.getDocument)(i);this.pdfLoadingTask=s;s.onPassword=(e,t)=>{this.pdfLinkService.externalLinkEnabled=!1;this.passwordPrompt.setUpdateCallback(e,t);this.passwordPrompt.open()};s.onProgress=e=>{let{loaded:t,total:r}=e;this.progress(t/r);this.eventBus.dispatch("progress",{source:this,type:"load",total:r,loaded:t,percent:100*t/r})};s.onUnsupportedFeature=this.fallback.bind(this);this.loadingBar.show();return s.promise.then((e=>{this.load(e)}),(e=>{if(s!==this.pdfLoadingTask)return;let t="loading_error";e instanceof a.InvalidPDFException?t="invalid_file_error":e instanceof a.MissingPDFException?t="missing_file_error":e instanceof a.UnexpectedResponseException&&(t="unexpected_response_error");return this.l10n.get(t).then((t=>{this._documentError(t,{message:null==e?void 0:e.message});throw e}))}))}))},_ensureDownloadComplete(){if(!this.pdfDocument||!this.downloadComplete)throw new Error("PDF document not downloaded.")},async download(){let{sourceEventType:e="download"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this._downloadUrl,r=this._docFilename;try{this._ensureDownloadComplete();const i=await this.pdfDocument.getData(),n=new Blob([i],{type:"application/pdf"});await this.downloadManager.download(n,t,r,e)}catch(e){await this.downloadManager.downloadUrl(t,r)}},async save(){let{sourceEventType:e="download"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._saveInProgress)return;this._saveInProgress=!0;await this.pdfScriptingManager.dispatchWillSave();const t=this._downloadUrl,r=this._docFilename;try{this._ensureDownloadComplete();const i=await this.pdfDocument.saveDocument(),n=new Blob([i],{type:"application/pdf"});await this.downloadManager.download(n,t,r,e)}catch(t){Window.ngxConsole.error("Error when saving the document: ".concat(t.message));await this.download({sourceEventType:e})}finally{await this.pdfScriptingManager.dispatchDidSave();this._saveInProgress=!1}},downloadOrSave(e){var t;(null===(t=this.pdfDocument)||void 0===t?void 0:t.annotationStorage.size)>0?this.save(e):this.download(e)},fallback(e){this.externalServices.reportTelemetry({type:"unsupportedFeature",featureId:e});if(!this._fellback){this._fellback=!0;this.externalServices.fallback({featureId:e,url:this.baseUrl}).then((e=>{e&&this.download({sourceEventType:"download"})}))}},_documentError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this._unblockDocumentLoadEvent();this._otherError(e,t)},_otherError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=[this.l10n.get("error_version_info",{version:a.version||"?",build:a.build||"?"})];if(t){r.push(this.l10n.get("error_message",{message:t.message}));if(t.stack)r.push(this.l10n.get("error_stack",{stack:t.stack}));else{t.filename&&r.push(this.l10n.get("error_file",{file:t.filename}));t.lineNumber&&r.push(this.l10n.get("error_line",{line:t.lineNumber}))}}const n=this.appConfig.errorWrapper,o=n.container;o.hidden=!1;n.errorMessage.textContent=e;const s=n.closeButton;s.onclick=function(){o.hidden=!0};const l=n.errorMoreInfo,c=n.moreInfoButton,d=n.lessInfoButton;c.onclick=function(){l.hidden=!1;c.hidden=!0;d.hidden=!1;l.style.height=l.scrollHeight+"px"};d.onclick=function(){l.hidden=!0;c.hidden=!1;d.hidden=!0};c.oncontextmenu=i.noContextMenuHandler;d.oncontextmenu=i.noContextMenuHandler;s.oncontextmenu=i.noContextMenuHandler;c.hidden=!1;d.hidden=!0;Promise.all(r).then((e=>{l.value=e.join("\n")}))},progress(e){if(this.downloadComplete)return;const t=Math.round(100*e);if(t>this.loadingBar.percent||isNaN(t)){this.loadingBar.percent=t;if((this.pdfDocument?this.pdfDocument.loadingParams.disableAutoFetch:n.AppOptions.get("disableAutoFetch"))&&t){if(this.disableAutoFetchLoadingBarTimeout){clearTimeout(this.disableAutoFetchLoadingBarTimeout);this.disableAutoFetchLoadingBarTimeout=null}this.loadingBar.show();this.disableAutoFetchLoadingBarTimeout=setTimeout((()=>{this.loadingBar.hide();this.disableAutoFetchLoadingBarTimeout=null}),5e3)}}},load(e){this.pdfDocument=e;e.getDownloadInfo().then((e=>{let{length:t}=e;this._contentLength=t;this.downloadComplete=!0;this.loadingBar.hide();l.then((()=>{this.eventBus.dispatch("documentloaded",{source:this})}))}));const t=e.getPageLayout().catch((function(){})),r=e.getPageMode().catch((function(){})),o=e.getOpenAction().catch((function(){}));this.toolbar.setPagesCount(e.numPages,!1);this.secondaryToolbar.setPagesCount(e.numPages);let a;a=null;this.pdfLinkService.setDocument(e,null);this.pdfDocumentProperties.setDocument(e,this.url);const s=this.pdfViewer;s.setDocument(e);const{firstPagePromise:l,onePageRendered:c,pagesPromise:d}=s;this.pdfThumbnailViewer.setDocument(e);const h=(this.store=new x.ViewHistory(e.fingerprints[0])).getMultiple({page:null,zoom:i.DEFAULT_SCALE_VALUE,scrollLeft:"0",scrollTop:"0",rotation:null,sidebarView:i.SidebarView.UNKNOWN,scrollMode:i.ScrollMode.UNKNOWN,spreadMode:i.SpreadMode.UNKNOWN}).catch((()=>Object.create(null)));l.then((a=>{this.loadingBar.setWidth(this.appConfig.viewerContainer);this._initializeAnnotationStorageCallbacks(e);Promise.all([i.animationStarted,h,t,r,o]).then((async t=>{let[r,o,a,l,c]=t;const h=n.AppOptions.get("viewOnLoad");this._initializePdfHistory({fingerprint:e.fingerprints[0],viewOnLoad:h,initialDest:null==c?void 0:c.dest});const u=this.initialBookmark,p=n.AppOptions.get("defaultZoomValue");let g=p?"zoom=".concat(p):null,f=null,m=n.AppOptions.get("sidebarViewOnLoad"),v=n.AppOptions.get("scrollModeOnLoad"),b=n.AppOptions.get("spreadModeOnLoad");if(o.page&&h!==I){g="page=".concat(o.page,"&zoom=").concat(p||o.zoom,",")+"".concat(o.scrollLeft,",").concat(o.scrollTop);f=parseInt(o.rotation,10);m===i.SidebarView.UNKNOWN&&(m=0|o.sidebarView);v===i.ScrollMode.UNKNOWN&&(v=0|o.scrollMode);b===i.SpreadMode.UNKNOWN&&(b=0|o.spreadMode)}l&&m===i.SidebarView.UNKNOWN&&(m=(0,i.apiPageModeToSidebarView)(l));if(a&&v===i.ScrollMode.UNKNOWN&&b===i.SpreadMode.UNKNOWN){b=(0,i.apiPageLayoutToViewerModes)(a).spreadMode}this.setInitialView(g,{rotation:f,sidebarView:m,scrollMode:v,spreadMode:b});this.eventBus.dispatch("documentinit",{source:this});this.isViewerEmbedded||s.focus();await Promise.race([d,new Promise((e=>{setTimeout(e,1e4)}))]);if((u||g)&&!s.hasEqualPageSizes){this.initialBookmark=u;s.currentScaleValue=s.currentScaleValue;this.setInitialView(g)}})).catch((()=>{this.setInitialView()})).then((function(){s.update()}))}));d.then((()=>{this._unblockDocumentLoadEvent();this._initializeAutoPrint(e,o)}),(e=>{this.l10n.get("loading_error").then((t=>{this._documentError(t,{message:null==e?void 0:e.message})}))}));c.then((t=>{this.externalServices.reportTelemetry({type:"pageInfo",timestamp:t.timestamp});e.getOutline().then((t=>{e===this.pdfDocument&&this.pdfOutlineViewer.render({outline:t,pdfDocument:e})}));e.getAttachments().then((t=>{e===this.pdfDocument&&this.pdfAttachmentViewer.render({attachments:t})}));s.optionalContentConfigPromise.then((t=>{e===this.pdfDocument&&this.pdfLayerViewer.render({optionalContentConfig:t,pdfDocument:e})}));if("requestIdleCallback"in window){const t=window.requestIdleCallback((()=>{this._collectTelemetry(e);this._idleCallbacks.delete(t)}),{timeout:1e3});this._idleCallbacks.add(t)}}));this._initializePageLabels(e);this._initializeMetadata(e)},async _scriptingDocProperties(e){var t,r;if(!this.documentInfo){await new Promise((e=>{this.eventBus._on("metadataloaded",e,{once:!0})}));if(e!==this.pdfDocument)return null}if(!this._contentLength){await new Promise((e=>{this.eventBus._on("documentloaded",e,{once:!0})}));if(e!==this.pdfDocument)return null}return{...this.documentInfo,baseURL:this.baseUrl,filesize:this._contentLength,filename:this._docFilename,metadata:null===(t=this.metadata)||void 0===t?void 0:t.getRaw(),authors:null===(r=this.metadata)||void 0===r?void 0:r.get("dc:creator"),numPages:this.pagesCount,URL:this.url}},async _collectTelemetry(e){const t=await this.pdfDocument.getMarkInfo();if(e!==this.pdfDocument)return;const r=(null==t?void 0:t.Marked)||!1;this.externalServices.reportTelemetry({type:"tagged",tagged:r})},async _initializeAutoPrint(e,t){const[r,n]=await Promise.all([t,this.pdfViewer.enableScripting?null:e.getJavaScript()]);if(e!==this.pdfDocument)return;let o=!1;"Print"===(null==r?void 0:r.action)&&(o=!0);if(n){n.some((e=>{if(!e)return!1;Window.ngxConsole.warn("Warning: JavaScript support is not enabled");this.fallback(a.UNSUPPORTED_FEATURES.javaScript);return!0}));if(!o)for(const e of n)if(e&&i.AutoPrintRegExp.test(e)){o=!0;break}}o&&this.triggerPrinting()},async _initializeMetadata(e){var t,r;const{info:i,metadata:n,contentDispositionFilename:o,contentLength:s}=await e.getMetadata();if(e!==this.pdfDocument)return;this.documentInfo=i;this.metadata=n;null!==(t=this._contentDispositionFilename)&&void 0!==t||(this._contentDispositionFilename=o);null!==(r=this._contentLength)&&void 0!==r||(this._contentLength=s);const l=window.PDFViewerApplicationOptions;if(!l||l.get("verbosity")>0){Window.ngxConsole.log("PDF viewer: ngx-extended-pdf-viewer running on pdf.js "+(window["pdfjs-dist/build/pdf"]?window["pdfjs-dist/build/pdf"].version:" developer version (?)"));Window.ngxConsole.log("PDF ".concat(e.fingerprints[0]," [").concat(i.PDFFormatVersion," ")+"".concat((i.Producer||"-").trim()," / ").concat((i.Creator||"-").trim(),"] ")+"(PDF.js: ".concat(a.version||"-")+"".concat(this.pdfViewer.enableWebGL?" [WebGL]":"",") modified by ngx-extended-pdf-viewer)"))}i.Language&&(this.appConfig.viewerContainer.lang=i.Language);let c=null==i?void 0:i.Title;const d=null==n?void 0:n.get("dc:title");d&&("Untitled"===d||/[\uFFF0-\uFFFF]/g.test(d)||(c=d));c?this.setTitle("".concat(c," - ").concat(o||document.title)):o&&this.setTitle(o);if(!i.IsXFAPresent||i.IsAcroFormPresent||e.isPureXfa){if((i.IsAcroFormPresent||i.IsXFAPresent)&&!this.pdfViewer.renderForms){Window.ngxConsole.warn("Warning: Interactive form support is not enabled");this.fallback(a.UNSUPPORTED_FEATURES.forms)}}else{e.loadingParams.enableXfa?Window.ngxConsole.warn("Warning: XFA Foreground documents are not supported"):Window.ngxConsole.warn("Warning: XFA support is not enabled");this.fallback(a.UNSUPPORTED_FEATURES.forms)}if(i.IsSignaturesPresent){Window.ngxConsole.warn("Warning: Digital signatures validation is not supported");this.fallback(a.UNSUPPORTED_FEATURES.signatures)}let h="other";A.includes(i.PDFFormatVersion)&&(h="v".concat(i.PDFFormatVersion.replace(".","_")));let u="other";if(i.Producer){const e=i.Producer.toLowerCase();D.some((function(t){if(!e.includes(t))return!1;u=t.replace(/[ .-]/g,"_");return!0}))}let p=null;i.IsXFAPresent?p="xfa":i.IsAcroFormPresent&&(p="acroform");this.externalServices.reportTelemetry({type:"documentInfo",version:h,generator:u,formType:p});this.eventBus.dispatch("metadataloaded",{source:this})},async _initializePageLabels(e){const t=await e.getPageLabels();if(e!==this.pdfDocument)return;if(!t||n.AppOptions.get("disablePageLabels"))return;const r=t.length;let i=0,o=0;for(let e=0;e<r;e++){const r=t[e];if(r===(e+1).toString())i++;else{if(""!==r)break;o++}}if(i>=r||o>=r)return;const{pdfViewer:a,pdfThumbnailViewer:s,toolbar:l}=this;a.setPageLabels(t);s.setPageLabels(t);l.setPagesCount(r,!0);l.setPageNumber(a.currentPageNumber,a.currentPageLabel)},_initializePdfHistory(e){let{fingerprint:t,viewOnLoad:r,initialDest:i=null}=e;if(this.pdfHistory){this.pdfHistory.initialize({fingerprint:t,resetHistory:r===I,updateUrl:n.AppOptions.get("historyUpdateUrl")});if(this.pdfHistory.initialBookmark){this.initialBookmark=this.pdfHistory.initialBookmark;this.initialRotation=this.pdfHistory.initialRotation}if(i&&!this.initialBookmark&&r===T){this.initialBookmark=JSON.stringify(i);this.pdfHistory.push({explicitDest:i,pageNumber:null})}}},_initializeAnnotationStor