1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-15 23:52:33 +01:00
invoiceninja/public/js/vendor/pdf.js/pdf.min.js

22 lines
190 KiB
JavaScript
Raw Normal View History

/**
* @licstart The following is the entire license notice for the
* Javascript code in this page
*
* Copyright 2020 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
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],t):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=t():e["pdfjs-dist/build/pdf"]=e.pdfjsLib=t()}(this,(function(){return function(e){var t={};function r(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(s,n,function(t){return e[t]}.bind(null,n));return s},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";var s=r(1),n=r(3),i=r(16),a=r(17),o=r(4),l=r(18);const c=r(10),h=r(6);{const{isNodeJS:e}=r(7);if(e){const e=r(19).PDFNodeStream;n.setPDFNetworkStreamFactory(t=>new e(t))}else{const e=r(22).PDFNetworkStream;let t;o.isFetchSupported()&&(t=r(23).PDFFetchStream),n.setPDFNetworkStreamFactory(r=>t&&o.isValidFetchUrl(r.url)?new t(r):new e(r))}}t.build=n.build,t.version=n.version,t.getDocument=n.getDocument,t.LoopbackPort=n.LoopbackPort,t.PDFDataRangeTransport=n.PDFDataRangeTransport,t.PDFWorker=n.PDFWorker,t.renderTextLayer=i.renderTextLayer,t.AnnotationLayer=a.AnnotationLayer,t.createPromiseCapability=s.createPromiseCapability,t.PasswordResponses=s.PasswordResponses,t.InvalidPDFException=s.InvalidPDFException,t.MissingPDFException=s.MissingPDFException,t.SVGGraphics=l.SVGGraphics,t.NativeImageDecoding=s.NativeImageDecoding,t.CMapCompressionType=s.CMapCompressionType,t.PermissionFlag=s.PermissionFlag,t.UnexpectedResponseException=s.UnexpectedResponseException,t.OPS=s.OPS,t.VerbosityLevel=s.VerbosityLevel,t.UNSUPPORTED_FEATURES=s.UNSUPPORTED_FEATURES,t.createValidAbsoluteUrl=s.createValidAbsoluteUrl,t.createObjectURL=s.createObjectURL,t.removeNullCharacters=s.removeNullCharacters,t.shadow=s.shadow,t.Util=s.Util,t.RenderingCancelledException=o.RenderingCancelledException,t.getFilenameFromUrl=o.getFilenameFromUrl,t.LinkTarget=o.LinkTarget,t.addLinkAttributes=o.addLinkAttributes,t.loadScript=o.loadScript,t.PDFDateString=o.PDFDateString,t.GlobalWorkerOptions=c.GlobalWorkerOptions,t.apiCompatibilityParams=h.apiCompatibilityParams},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=u,t.arraysToBytes=function(e){const t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];let r=0;for(let s=0;s<t;s++)r+=u(e[s]);let s=0;const n=new Uint8Array(r);for(let r=0;r<t;r++){let t=e[r];t instanceof Uint8Array||(t="string"==typeof t?d(t):new Uint8Array(t));const i=t.byteLength;n.set(t,s),s+=i}return n},t.assert=o,t.bytesToString=function(e){o(null!==e&&"object"==typeof e&&void 0!==e.length,"Invalid argument for bytesToString");const t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);const r=[];for(let s=0;s<t;s+=8192){const n=Math.min(s+8192,t),i=e.subarray(s,n);r.push(String.fromCharCode.apply(null,i))}return r.join("")},t.createPromiseCapability=function(){const e=Object.create(null);let t=!1;return Object.defineProperty(e,"settled",{get:()=>t}),e.promise=new Promise((function(r,s){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,s(e)}})),e},t.getVerbosityLevel=function(){return n},t.info=function(e){n>=s.INFOS&&console.log(`Info: ${e}`)},t.isArrayBuffer=function(e){return"object"==typeof e&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;return e.every((function(e,r){return e===t[r]}))},t.isBool=function(e){return"boolean