All new
alle new
This commit is contained in:
1 parent
da64472251
commit
5b20adee48
1605 files changed
+396517
-1674
No files matched your search
+28
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @licstart The following is the entire license notice for the
|
||||
* JavaScript code in this page
|
||||
*
|
||||
* Copyright 2024 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
|
||||
*/
|
||||
/**
|
||||
* pdfjsVersion = 6.3.289
|
||||
* pdfjsBuild = 1c8020a7d
|
||||
*/var t={9306(t,e,i){var n=i(4901),r=i(6823),s=TypeError;t.exports=function(t){if(n(t))return t;throw new s(r(t)+" is not a function")}},3506(t,e,i){var n=i(3925),r=String,s=TypeError;t.exports=function(t){if(n(t))return t;throw new s("Can't set "+r(t)+" as a prototype")}},7080(t,e,i){var n=i(4402).has;t.exports=function(t){n(t);return t}},3463(t){var e=TypeError;t.exports=function(t){if("string"==typeof t)return t;throw new e("Argument is not a string")}},4328(t,e,i){var n=i(4995),r=new n.WeakMap,s=n.set,a=n.remove;t.exports=function(t){s(r,t,1);a(r,t);return t}},6557(t,e,i){var n=i(4995).has;t.exports=function(t){n(t);return t}},6469(t,e,i){var n=i(8227),r=i(2360),s=i(4913).f,a=n("unscopables"),o=Array.prototype;void 0===o[a]&&s(o,a,{configurable:!0,value:r(null)});t.exports=function(t){o[a][t]=!0}},679(t,e,i){var n=i(1625),r=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new r("Incorrect invocation")}},3972(t,e,i){var n=i(34),r=String,s=TypeError;t.exports=function(t){if(void 0===t||n(t))return t;throw new s(r(t)+" is not an object or undefined")}},8551(t,e,i){var n=i(34),r=String,s=TypeError;t.exports=function(t){if(n(t))return t;throw new s(r(t)+" is not an object")}},4154(t,e,i){var n=i(6955),r=TypeError;t.exports=function(t){if("Uint8Array"===n(t))return t;throw new r("Argument is not an Uint8Array")}},7811(t){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7394(t,e,i){var n=i(4576),r=i(6706),s=i(2195),a=n.ArrayBuffer,o=n.TypeError;t.exports=a&&r(a.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==s(t))throw new o("ArrayBuffer expected");return t.byteLength}},3238(t,e,i){var n=i(4576),r=i(7811),s=i(7394),a=n.DataView;t.exports=function(t){if(!r||0!==s(t))return!1;try{new a(t);return!1}catch(t){return!0}}},5169(t,e,i){var n=i(3238),r=TypeError;t.exports=function(t){if(n(t))throw new r("ArrayBuffer is detached");return t}},4644(t,e,i){var n,r,s,a=i(7811),o=i(3724),l=i(4576),c=i(4901),h=i(34),d=i(9297),u=i(6955),p=i(6823),g=i(6699),m=i(6840),f=i(2106),b=i(1625),y=i(2787),v=i(2967),w=i(8227),A=i(3392),x=i(1181),E=x.enforce,C=x.get,S=l.Int8Array,T=S&&S.prototype,_=l.Uint8ClampedArray,k=_&&_.prototype,D=S&&y(S),P=T&&y(T),M=Object.prototype,I=l.TypeError,O=w("toStringTag"),R=A("TYPED_ARRAY_TAG"),B="TypedArrayConstructor",L=a&&!!v&&"Opera"!==u(l.opera),N=!1,U={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},H={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(t){var e=y(t);if(h(e)){var i=C(e);return i&&d(i,B)?i[B]:getTypedArrayConstructor(e)}},isTypedArray=function(t){if(!h(t))return!1;var e=u(t);return d(U,e)||d(H,e)};for(n in U)(s=(r=l[n])&&r.prototype)?E(s)[B]=r:L=!1;for(n in H)(s=(r=l[n])&&r.prototype)&&(E(s)[B]=r);if(!L||!c(D)||D===Function.prototype){D=function TypedArray(){throw new I("Incorrect invocation")};if(L)for(n in U)l[n]&&v(l[n],D)}if(!L||!P||P===M){P=D.prototype;if(L)for(n in U)l[n]&&v(l[n].prototype,P)}L&&y(k)!==P&&v(k,P);if(o&&!d(P,O)){N=!0;f(P,O,{configurable:!0,get:function(){return h(this)?this[R]:void 0}});for(n in U)l[n]&&g(l[n].prototype,R,n)}t.exports={NATIVE_ARRAY_BUFFER_VIEWS:L,TYPED_ARRAY_TAG:N&&R,aTypedArray:function(t){if(isTypedArray(t))return t;throw new I("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!v||b(D,t)))return t;throw new I(p(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,i,n){if(o){if(i)for(var r in U){var s=l[r];if(s&&d(s.prototype,t))try{delete s.prototype[t]}catch(i){try{s.prototype[t]=e}catch(t){}}}P[t]&&!i||m(P,t,i?e:L&&T[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,i){var n,r;if(o){if(v){if(i)for(n in U)if((r=l[n])&&d(r,t))try{delete r[t]}catch(t){}if(D[t]&&!i)return;try{return m(D,t,i?e:L&&D[t]||e)}catch(t){}}for(n in U)!(r=l[n])||r[t]&&!i||m(r,t,e)}},getTypedArrayConstructor,isView:function isView(t){if(!h(t))return!1;var e=u(t);return"DataView"===e||d(U,e)||d(H,e)},isTypedArray,TypedArray:D,TypedArrayPrototype:P}},5370(t,e,i){var n=i(6198);t.exports=function(t,e,i){for(var r=0,s=arguments.length>2?i:n(e),a=new t(s);s>r;)a[r]=e[r++];return a}},9617(t,e,i){var n=i(5397),r=i(5610),s=i(6198),createMethod=function(t){return function(e,i,a){var o=n(e),l=s(o);if(0===l)return!t&&-1;var c,h=r(a,l);if(t&&i!=i){for(;l>h;)if((c=o[h++])!=c)return!0}else for(;l>h;h++)if((t||h in o)&&o[h]===i)return t||h||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},4527(t,e,i){var n=i(3724),r=i(4376),s=TypeError,a=Object.getOwnPropertyDescriptor,o=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=o?function(t,e){if(r(t)&&!a(t,"length").writable)throw new s("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},7680(t,e,i){var n=i(9504);t.exports=n([].slice)},2804(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcLine truncated
|
||||
/*webpackIgnore: true*/
|
||||
/*@vite-ignore*/
|
||||
this.workerSrc)).WorkerMessageHandler})())}}class WorkerTransport{downloadInfoCapability=Promise.withResolvers();#Xs=null;#Ks=new Map;#Ys=null;#Js=new Map;#Qs=new Map;#Zs=new Map;#ta=null;constructor(t,e,i,n,r,s){this.messageHandler=t;this.loadingTask=e;this.#Ys=i;this.commonObjs=new PDFObjects;this.fontLoader=new FontLoader({ownerDocument:n.ownerDocument,styleElement:n.styleElement});this.enableHWA=n.enableHWA;this.loadingParams=n.loadingParams;this._params=n;this.canvasFactory=r.canvasFactory;this.filterFactory=r.filterFactory;this.binaryDataFactory=r.binaryDataFactory;this.pagesMapper=s;this.destroyed=!1;this.destroyCapability=null;this.setupMessageHandler()}updatePage(t){const{_pageIndex:e}=t;this.#Js.set(e,t);this.#Qs.set(e,Promise.resolve(t))}#ea(t,e=null){return this.#Ks.getOrInsertComputed(t,()=>this.messageHandler.sendWithPromise(t,e))}#Pr({loaded:t,total:e}){this.loadingTask.onProgress?.({loaded:t,total:e,percent:e?MathClamp(Math.round(t/e*100),0,100):NaN})}get annotationStorage(){return shadow(this,"annotationStorage",new AnnotationStorage)}getRenderingIntent(t,e=m.ENABLE,i=null,n=!1,r=!1){let s=l,a=it;switch(t){case"any":s=o;break;case"display":break;case"print":s=c;break;default:warn(`getRenderingIntent - invalid intent: ${t}`)}const f=s&c&&i instanceof PrintAnnotationStorage?i:this.annotationStorage;switch(e){case m.DISABLE:s+=u;break;case m.ENABLE:break;case m.ENABLE_FORMS:s+=h;break;case m.ENABLE_STORAGE:s+=d;a=f.serializable;break;default:warn(`getRenderingIntent - invalid annotationMode: ${e}`)}n&&(s+=p);r&&(s+=g);const{ids:b,hash:y}=f.modifiedIds;return{renderingIntent:s,cacheKey:[s,a.hash,y].join("_"),annotationStorageSerializable:a,modifiedIds:b}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0;this.destroyCapability=Promise.withResolvers();this.#ta?.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const e of this.#Js.values())t.push(e._destroy());this.#Js.clear();this.#Qs.clear();this.#Zs.clear();Object.hasOwn(this,"annotationStorage")&&this.annotationStorage.resetModified();const e=this.messageHandler.sendWithPromise("Terminate",null);t.push(e);Promise.all(t).then(()=>{this.commonObjs.clear();this.fontLoader.clear();this.#Ks.clear();this.filterFactory.destroy();TextLayer.cleanup();this.#Ys?.cancelAllRequests(new AbortException("Worker was terminated."));this.messageHandler?.destroy();this.messageHandler=null;this.destroyCapability.resolve()},this.destroyCapability.reject);return this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",(t,e)=>{assert(this.#Ys,"GetReader - no `BasePDFStream` instance available.");this.#Xs=this.#Ys.getFullReader();this.#Xs.onProgress=t=>this.#Pr(t);e.onPull=()=>{this.#Xs.read().then(function({value:t,done:i}){if(i)e.close();else{assert(t instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer.");e.enqueue(new Uint8Array(t),1,[t])}}).catch(t=>{e.error(t)})};e.onCancel=t=>{this.#Xs.cancel(t);e.ready.catch(t=>{if(!this.destroyed)throw t})}});t.on("ReaderHeadersReady",async t=>{await this.#Xs.headersReady;const{isStreamingSupported:e,isRangeSupported:i,contentLength:n}=this.#Xs;e&&i&&(this.#Xs.onProgress=null);return{isStreamingSupported:e,isRangeSupported:i,contentLength:n}});t.on("GetRangeReader",(t,e)=>{assert(this.#Ys,"GetRangeReader - no `BasePDFStream` instance available.");const i=this.#Ys.getRangeReader(t.begin,t.end);if(i){e.onPull=()=>{i.read().then(function({value:t,done:i}){if(i)e.close();else{assert(t instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer.");e.enqueue(new Uint8Array(t),1,[t])}}).catch(t=>{e.error(t)})};e.onCancel=t=>{i.cancel(t);e.ready.catch(t=>{if(!this.destroyed)throw t})}}else e.close()});t.on("GetDoc",({pdfInfo:t})=>{this.pagesMapper.pagesNumber=t.numPages;this._numPages=t.numPages;this._htmlForXfa=t.htmlForXfa;delete t.htmlForXfa;e._capability.resolve(new PDFDocumentProxy(t,this))});t.on("DocException",t=>{e._capability.reject(wrapReason(t))});t.on("PasswordRequest",t=>{this.#ta=Promise.withResolvers();try{if(!e.onPassword)throw wrapReason(t);const updatePassword=t=>{t instanceof Error?this.#ta.reject(t):this.#ta.resolve({password:t})};e.onPassword(updatePassword,t.code)}catch(t){this.#ta.reject(t)}return this.#ta.promise});t.on("DataLoaded",t=>{this.#Pr({loaded:t.length,total:t.length});this.downloadInfoCapability.resolve(t)});t.on("StartRenderPage",t=>{if(this.destroyed)return;this.#Js.get(t.pageIndex)._startRenderPage(t.transparency,t.cacheKey)});t.on("commonobj",([e,i,n])=>{if(this.destroyed)return null;if(this.commonObjs.has(e))return null;switch(i){case"Font":if("error"in n){const t=n.error;warn(`Error during font loading: ${t}`);this.commonObjs.resolve(e,t);break}const r=new FontInfo(n),s=this._params.pdfBug&&globalThis.FontInspector?.enabled?(t,e)=>globalThis.FontInspector.fontAdded(t,e):null,a=new FontFaceObject(r,s,n.charProcOperatorList,n.extra);this.fontLoader.bindLine truncated
|
||||
Reference in new issue
Block a user