baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+15103
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["webpack://pdfjs-dist/build/pdf/webpack/universalModuleDefinition","webpack://pdfjs-dist/build/pdf/src/pdf.js","webpack://pdfjs-dist/build/pdf/src/display/display_utils.js","webpack://pdfjs-dist/build/pdf/src/shared/util.js","webpack://pdfjs-dist/build/pdf/src/shared/compatibility.js","webpack://pdfjs-dist/build/pdf/src/shared/is_node.js","webpack://pdfjs-dist/build/pdf/src/display/api.js","webpack://pdfjs-dist/build/pdf/src/display/font_loader.js","webpack://pdfjs-dist/build/pdf/src/display/node_utils.js","webpack://pdfjs-dist/build/pdf/src/display/annotation_storage.js","webpack://pdfjs-dist/build/pdf/src/display/api_compatibility.js","webpack://pdfjs-dist/build/pdf/src/display/canvas.js","webpack://pdfjs-dist/build/pdf/src/display/pattern_helper.js","webpack://pdfjs-dist/build/pdf/src/display/worker_options.js","webpack://pdfjs-dist/build/pdf/src/shared/message_handler.js","webpack://pdfjs-dist/build/pdf/src/display/metadata.js","webpack://pdfjs-dist/build/pdf/src/shared/xml_parser.js","webpack://pdfjs-dist/build/pdf/src/display/optional_content_config.js","webpack://pdfjs-dist/build/pdf/src/display/transport_stream.js","webpack://pdfjs-dist/build/pdf/src/display/webgl.js","webpack://pdfjs-dist/build/pdf/src/display/annotation_layer.js","webpack://pdfjs-dist/build/pdf/src/shared/scripting_utils.js","webpack://pdfjs-dist/build/pdf/src/display/text_layer.js","webpack://pdfjs-dist/build/pdf/src/display/svg.js","webpack://pdfjs-dist/build/pdf/src/display/node_stream.js","webpack://pdfjs-dist/build/pdf/src/display/network_utils.js","webpack://pdfjs-dist/build/pdf/src/display/content_disposition.js","webpack://pdfjs-dist/build/pdf/src/display/network.js","webpack://pdfjs-dist/build/pdf/src/display/fetch_stream.js","webpack://pdfjs-dist/build/pdf/webpack/bootstrap","webpack://pdfjs-dist/build/pdf/webpack/startup"],"names":["pdfjsVersion","pdfjsBuild","require","PDFNodeStream","setPDFNetworkStreamFactory","params","PDFNetworkStream","PDFFetchStream","isValidFetchUrl","DEFAULT_LINK_REL","SVG_NS","constructor","unreachable","create","reset","canvasAndContext","width","height","destroy","ownerDocument","globalThis","canvas","context","baseUrl","isCompressed","url","compressionType","CMapCompressionType","reason","_fetchData","isFetchSupported","document","response","cMapData","stringToBytes","request","XMLHttpRequest","resolve","reject","assert","svg","createElement","offsetX","offsetY","dontFlip","centerX","viewBox","centerY","rotation","rotateA","rotateB","rotateC","rotateD","offsetCanvasX","Math","offsetCanvasY","clone","scale","convertToViewportPoint","convertToViewportRectangle","topLeft","rect","bottomRight","convertToPdfPoint","LinkTarget","NONE","SELF","BLANK","PARENT","TOP","enabled","urlNullRemoved","removeNullCharacters","link","targetStr","anchor","query","end","Object","time","name","warn","Date","timeEnd","start","toString","outBuf","longest","duration","Response","protocol","removeScriptElement","script","console","isString","pdfDateStringRegex","matches","year","parseInt","month","day","hour","minute","second","universalTimeRelation","offsetHour","offsetMinute","IDENTITY_MATRIX","FONT_IDENTITY_MATRIX","PermissionFlag","PRINT","MODIFY_CONTENTS","COPY","MODIFY_ANNOTATIONS","FILL_INTERACTIVE_FORMS","COPY_FOR_ACCESSIBILITY","ASSEMBLE","PRINT_HIGH_QUALITY","TextRenderingMode","FILL","STROKE","FILL_STROKE","INVISIBLE","FILL_ADD_TO_PATH","STROKE_ADD_TO_PATH","FILL_STROKE_ADD_TO_PATH","ADD_TO_PATH","FILL_STROKE_MASK","ADD_TO_PATH_FLAG","ImageKind","GRAYSCALE_1BPP","RGB_24BPP","RGBA_32BPP","AnnotationType","TEXT","LINK","FREETEXT","LINE","SQUARE","CIRCLE","POLYGON","POLYLINE","HIGHLIGHT","UNDERLINE","SQUIGGLY","STRIKEOUT","STAMP","CARET","INK","POPUP","FILEATTACHMENT","SOUND","MOVIE","WIDGET","SCREEN","PRINTERMARK","TRAPNET","WATERMARK","THREED","REDACT","AnnotationStateModelType","MARKED","REVIEW","AnnotationMarkedState","UNMARKED","AnnotationReviewState","ACCEPTED","REJECTED","CANCELLED","COMPLETED","AnnotationReplyType","GROUP","REPLY","AnnotationFlag","HIDDEN","NOZOOM","NOROTATE","NOVIEW","READONLY","LOCKED","TOGGLENOVIEW","LOCKEDCONTENTS","AnnotationFieldFlag","REQUIRED","NOEXPORT","MULTILINE","PASSWORD","NOTOGGLETOOFF","RADIO","PUSHBUTTON","COMBO","EDIT","SORT","FILESELECT","MULTISELECT","DONOTSPELLCHECK","DONOTSCROLL","COMB","RICHTEXT","RADIOSINUNISON","COMMITONSELCHANGE","AnnotationBorderStyleType","SOLID","DASHED","BEVELED","INSET","AnnotationActionEventType","E","X","D","U","Fo","Bl","PO","PC","PV","PI","K","F","V","C","DocumentActionEventType","WC","WS","DS","WP","DP","PageActionEventType","O","StreamType","UNKNOWN","FLATE","LZW","DCT","JPX","JBIG","A85","AHX","CCF","RLX","FontType","TYPE1","TYPE1C","CIDFONTTYPE0","CIDFONTTYPE0C","TRUETYPE","CIDFONTTYPE2","TYPE3","OPENTYPE","TYPE0","MMTYPE1","VerbosityLevel","ERRORS","WARNINGS","INFOS","BINARY","STREAM","OPS","dependency","setLineWidth","setLineCap","setLineJoin","setMiterLimit","setDash","setRenderingIntent","setFlatness"Line truncated
|
||||
@@ -0,0 +1,312 @@
|
||||
/**
|
||||
* @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 webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory();
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define("pdfjs-dist/build/pdf.sandbox", [], factory);
|
||||
else if(typeof exports === 'object')
|
||||
exports["pdfjs-dist/build/pdf.sandbox"] = factory();
|
||||
else
|
||||
root["pdfjs-dist/build/pdf.sandbox"] = root.pdfjsSandbox = factory();
|
||||
})(this, function() {
|
||||
return /******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
/******/ var __webpack_modules__ = ([
|
||||
/* 0 */
|
||||
/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {
|
||||
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.QuickJSSandbox = QuickJSSandbox;
|
||||
|
||||
var _quickjsEval = _interopRequireDefault(__w_pdfjs_require__(1));
|
||||
|
||||
var _pdfSandboxExternal = __w_pdfjs_require__(2);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const pdfjsVersion = '2.7.570';
|
||||
const pdfjsBuild = 'f2c7338b0';
|
||||
const TESTING = false;
|
||||
|
||||
class SandboxSupport extends _pdfSandboxExternal.SandboxSupportBase {
|
||||
exportValueToSandbox(val) {
|
||||
return JSON.stringify(val);
|
||||
}
|
||||
|
||||
importValueFromSandbox(val) {
|
||||
return val;
|
||||
}
|
||||
|
||||
createErrorForSandbox(errorMessage) {
|
||||
return new Error(errorMessage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Sandbox {
|
||||
constructor(win, module) {
|
||||
this.support = new SandboxSupport(win, this);
|
||||
module.externalCall = this.support.createSandboxExternals();
|
||||
this._module = module;
|
||||
this._alertOnError = 0;
|
||||
}
|
||||
|
||||
create(data) {
|
||||
if (TESTING) {
|
||||
this._module.ccall("nukeSandbox", null, []);
|
||||
}
|
||||
|
||||
const sandboxData = JSON.stringify(data);
|
||||
const code = ['(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === \'object\' && typeof module === \'object\')\n\t\tmodule.exports = factory();\n\telse if(typeof define === \'function\' && define.amd)\n\t\tdefine("pdfjs-dist/build/pdf.scripting", [], factory);\n\telse if(typeof exports === \'object\')\n\t\texports["pdfjs-dist/build/pdf.scripting"] = factory();\n\telse\n\t\troot.pdfjsScripting = factory();\n})(this, function() {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \t"use strict";\n/******/ \tvar __webpack_modules__ = ([\n/* 0 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n value: true\n}));\nObject.defineProperty(exports, "initSandbox", ({\n enumerable: true,\n get: function () {\n return _initialization.initSandbox;\n }\n}));\n\nvar _initialization = __w_pdfjs_require__(1);\n\nconst pdfjsVersion = \'2.7.570\';\nconst pdfjsBuild = \'f2c7338b0\';\n\n/***/ }),\n/* 1 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n value: true\n}));\nexports.initSandbox = initSandbox;\n\nvar _constants = __w_pdfjs_require__(2);\n\nvar _field = __w_pdfjs_require__(3);\n\nvar _aform = __w_pdfjs_require__(8);\n\nvar _app = __w_pdfjs_require__(9);\n\nvar _color = __w_pdfjs_require__(4);\n\nvar _console = __w_pdfjs_require__(13);\n\nvar _doc = __w_pdfjs_require__(14);\n\nvar _proxy = __w_pdfjs_require__(16);\n\nvar _util = __w_pdfjs_require__(17);\n\nfunction initSandbox(params) {\n delete globalThis.pdfjsScripting;\n const externalCall = globalThis.callExternalFunction;\n delete globalThis.callExternalFunction;\n\n const globalEval = code => globalThis.eval(code);\n\n const send = data => externalCall("send", [data]);\n\n const proxyHandler = new _proxy.ProxyHandler();\n const {\n data\n } = params;\n const doc = new _doc.Doc({\n send,\n globalEval,\n ...data.docInfo\n });\n const _document = {\n obj: doc,\n wrapped: new Proxy(doc, proxyHandler)\n };\n const app = new _app.App({\n send,\n globalEval,\n externalCall,\n _document,\n calculationOrder: data.calculationOrder,\n proxyHandler,\n ...data.appInfo\n });\n const util = new _util.Util({\n externalCall\n });\n\n if (data.objects) {\n for (const [name, objs] of Object.entries(data.objects)) {\n const obj = objs[0];\n obj.send = send;\n obj.globalEval = globalEval;\n obj.doc = _document.wrapped;\n let field;\n\n if (obj.type === "radiobutton") {\n const otherButtons = objs.slice(1);\n field = new _field.RadioButtonField(otherButtons, obj);\n } else if (obj.type === "checkbox") {\n const otherButtons = objs.slice(1);\n field = new _field.CheckboxField(otherButtons, obj);\n } else {\n field = new _field.Field(obj);\n }\n\n const wrapped = new Proxy(field, proxyHandler);\n\n doc._addField(name, wrapped);\n\n const _object = {\n obj: field,\n wrapped\n };\n\n for (const object of objs) {\n app._objects[object.id] = _object;\n }\n }\n }\n\n const color = new _color.Color();\n globalThis.event = null;\n globalThis.global = Object.create(null);\n globalThis.app = new Proxy(app, proxyHandler);\n globalThis.color = new Proxy(color, proxyHandler);\n globalThis.console = new Proxy(new _console.Console({\n send\n }), proxyHandler);\n globalThis.util = new Proxy(util, proxyHandler);\n globalThis.border = _constants.Border;\n globalThis.cursor = _constants.Cursor;\n globalThis.display = _constants.Display;\n globalThis.font = _constants.Font;\n globalThis.highlight = _constants.Highlight;\n globalThis.position = _constants.Position;\n globalThis.scaleHow = _constants.ScaleHow;\n globalThis.scaleWhen = _constants.ScaleWhen;\n globalThis.style = _constants.Style;\n globalThis.trans = _constants.Trans;\n globalThis.zoomtype = _constants.ZoomType;\n const aform = new _aform.AForm(doc, app, util, color);\n\n for (const name of Object.getOwnPropertyNames(_aform.AForm.prototype)) {\n if (name !== "constructor" && !name.startsWith("_")) {\n globalThis[name] = aform[name].bind(aform);\n }\n }\n\n for (const [name, value] of Object.entries(_constants.GlobalConstants)) {\n Object.defineProperty(globalThis, name, {\n value,\n writable: false\n });\n }\n\n Object.defineProperties(globalThis, {\n ColorConvert: {\n value: color.convert.bind(color),\n writable: true\n },\n ColorEqual: {\n value: color.equal.bind(color),\n writable: true\n }\n });\n const properties = Object.create(null);\n\n for (const name of Object.getOwnPropertyNames(_doc.Doc.prototype)) {\n if (name === "constructor" || name.startsWith("_")) {\n continue;\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(_doc.DoLine truncated
|
||||
|
||||
if (!TESTING) {
|
||||
code.push("delete dump;");
|
||||
} else {
|
||||
code.unshift(`globalThis.sendResultForTesting = callExternalFunction.bind(null, "send");`);
|
||||
}
|
||||
|
||||
let success = false;
|
||||
|
||||
try {
|
||||
success = !!this._module.ccall("init", "number", ["string", "number"], [code.join("\n"), this._alertOnError]);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
if (success) {
|
||||
this.support.commFun = this._module.cwrap("commFun", null, ["string", "string"]);
|
||||
} else {
|
||||
this.nukeSandbox();
|
||||
throw new Error("Cannot start sandbox");
|
||||
}
|
||||
}
|
||||
|
||||
dispatchEvent(event) {
|
||||
this.support.callSandboxFunction("dispatchEvent", event);
|
||||
}
|
||||
|
||||
dumpMemoryUse() {
|
||||
if (this._module) {
|
||||
this._module.ccall("dumpMemoryUse", null, []);
|
||||
}
|
||||
}
|
||||
|
||||
nukeSandbox() {
|
||||
if (this._module !== null) {
|
||||
this.support.destroy();
|
||||
this.support = null;
|
||||
|
||||
this._module.ccall("nukeSandbox", null, []);
|
||||
|
||||
this._module = null;
|
||||
}
|
||||
}
|
||||
|
||||
evalForTesting(code, key) {
|
||||
if (TESTING) {
|
||||
this._module.ccall("evalInSandbox", null, ["string", "int"], [`try {
|
||||
sendResultForTesting([{ id: "${key}", result: ${code} }]);
|
||||
} catch (error) {
|
||||
sendResultForTesting([{ id: "${key}", result: error.message }]);
|
||||
}`, this._alertOnError]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function QuickJSSandbox() {
|
||||
return (0, _quickjsEval.default)().then(module => {
|
||||
return new Sandbox(window, module);
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({value:true}));exports.default=void 0;var Module=function(){var _scriptDir=typeof document!=='undefined'&&document.currentScript?document.currentScript.src:undefined;return function(Module){Module=Module||{};var b;b||(b=typeof Module!=='undefined'?Module:{});var h,n;b.ready=new Promise(function(a,c){h=a;n=c;});var q={},r;for(r in b)b.hasOwnProperty(r)&&(q[r]=b[r]);var t="";"undefined"!==typeof document&&document.currentScript&&(t=document.currentScript.src);_scriptDir&&(t=_scriptDir);0!==t.indexOf("blob:")?t=t.substr(0,t.lastIndexOf("/")+1):t="";var aa=b.print||console.log.bind(console),u=b.printErr||console.warn.bind(console);for(r in q)q.hasOwnProperty(r)&&(b[r]=q[r]);q=null;var v;b.wasmBinary&&(v=b.wasmBinary);var noExitRuntime;b.noExitRuntime&&(noExitRuntime=b.noExitRuntime);"object"!==typeof WebAssembly&&w("no native wasm support detected");var x,y=!1;function A(a){var c=b["_"+a];c||w("Assertion failed: Cannot call unknown function "+(a+", make sure it is exported"));return c;}function B(a,c,d,e){var f={string:function(l){var p=0;if(null!==l&&void 0!==l&&0!==l){var W=(l.length<<2)+1;p=C(W);D(l,E,p,W);}return p;},array:function(l){var p=C(l.length);F.set(l,p);return p;}},g=A(a),k=[];a=0;if(e)for(var m=0;m<e.length;m++){var z=f[d[m]];z?(0===a&&(a=G()),k[m]=z(e[m])):k[m]=e[m];}d=g.apply(null,k);d=function(l){return"string"===c?H(l):"boolean"===c?!!l:l;}(d);0!==a&&I(a);return d;}var J="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;function ba(a,c,d){var e=c+d;for(d=c;a[d]&&!(d>=e);)++d;if(16<d-c&&a.subarray&&J)return J.decode(a.subarray(c,d));for(e="";c<d;){var f=a[c++];if(f&128){var g=a[c++]&63;if(192==(f&224))e+=String.fromCharCode((f&31)<<6|g);else{var k=a[c++]&63;f=224==(f&240)?(f&15)<<12|g<<6|k:(f&7)<<18|g<<12|k<<6|a[c++]&63;65536>f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023));}}else e+=String.fromCharCode(f);}return e;}function H(a){return a?ba(E,a,void 0):"";}function D(a,c,d,e){if(0<e){e=d+e-1;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var k=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023;}if(127>=g){if(d>=e)break;c[d++]=g;}else{if(2047>=g){if(d+1>=e)break;c[d++]=192|g>>6;}else{if(65535>=g){if(d+2>=e)break;c[d++]=224|g>>12;}else{if(d+3>=e)break;c[d++]=240|g>>18;c[d++]=128|g>>12&63;}c[d++]=128|g>>6&63;}c[d++]=128|g&63;}}c[d]=0;}}function ca(a){for(var c=0,d=0;d<a.length;++d){var e=a.charCodeAt(d);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++d)&1023);127>=e?++c:c=2047>=e?c+2:65535>=e?c+3:c+4;}return c;}function da(a){var c=ca(a)+1,d=K(c);d&&D(a,F,d,c);return d;}var L,F,E,M,N=b.INITIAL_MEMORY||16777216;b.wasmMemory?x=b.wasmMemory:x=new WebAssembly.Memory({initial:N/65536,maximum:N/65536});x&&(L=x.buffer);N=L.byteLength;var O=L;L=O;b.HEAP8=F=new Int8Array(O);b.HEAP16=new Int16Array(O);b.HEAP32=M=new Int32Array(O);b.HEAPU8=E=new Uint8Array(O);b.HEAPU16=new Uint16Array(O);b.HEAPU32=new Uint32Array(O);b.HEAPF32=new Float32Array(O);b.HEAPF64=new Float64Array(O);var P,ea=[],fa=[],ha=[],ia=[];function ja(){var a=b.preRun.shift();ea.unshift(a);}var Q=0,R=null,S=null;b.preloadedImages={};b.preloadedAudios={};function w(a){if(b.onAbort)b.onAbort(a);u(a);y=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");n(a);throw a;}function T(a){return String.prototype.startsWith?a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,");}var U="data:application/octet-stream;base64,AGFzbQEAAAABpQd5YAN/f38Bf2ACf38Bf2AEf35/fwF+YAJ/fwBgAX8Bf2ADf39/AGAFf35/f38BfmABfwBgAn9+AX5gBH9/f38Bf2ACf34Bf2ABfAF8YAJ/fwF+YAJ/fgBgA39/fgF/YAF+AX9gA39+fwF+YAN/fn8AYAN/fn8Bf2AFf39/f38Bf2AGf35/f39/AX5gA39/fwF+YAN/fn4BfmAGf35+f39/AX5gBH9/fn8Bf2AGf39/f39/AX9gAX8BfmACfHwBfGAEf39/fwBgBH9/f38BfmADf35+AX9gBX9/f39/AGAFf35+fn4AYAd/f39/f39/AX9gBH9+fn8BfmAFf35+f38BfmABfgF+YAABf2AFf35/fn8Bf2AHf35/fn5+fwF/YAAAYAN/f34AYAN/fn4AYAR/fn5/AGAEf35+fwF/YAR/fn5+AX9gBX9+fn5/AX9gAn5/AX9gBH9+f38AYAV/fn5/fwBgAn5/AGAJf39/f39/f39/AX9gBH9+f38Bf2AGf35/fn5/AX9gA35/fwF/YAZ/f39/f38BfmAHf35/f39/fwF+YAR/fn9+AX5gBH9+fn4BfmAGf39/f39/AGAHf39/f39/fwBgBH9/fn8AYAh/f39/f39/fwF/YAR/f39+AX9gBH9+f34Bf2AGf3x/f39/AX9gBX9/f39/AX5gAn5+AX5gAnx/AXxgA3x8fwF8YAN/f3wAYAV/fn9/fwBgBH9+f34AYAZ/fn9+fn8AYAJ/fQBgAn98AGADf3x/AGAFf3x/f38AYAF+AGAHfH9/f39/fwBgCn9/f39/f39/f38Bf2AGf39/fn5/AX9gB39/f35+fn8Bf2AFf39+f38Bf2AEf39+fgF/YAV/f35+fwF/YAZ/f35+f38Bf2AGf39+fn5+AX9gBX9+f39/AX9gBn9+f39/fwF/YAV/fn9/fgF/YAV/fn5+fgF/YAZ/fn5+fn8Bf2AEf3x/fwF/YAJ+fgF/YAN+fn4Bf2AEfn5+fgF/YAF8AX9gAnx/AX9gBnx/f39/fwF/YAJ8fAF/YAABfmAHf39/f39/fgF+YAV/f39/fgF+YAR/f39+AX5gA39/fgF+YAR/f35/AX5gBH9/fn4BfmAFf39+fn4BfmAFf35/fn8BfmAFf35+fn8BfmAHf35+fn9/fwF+YAh/fn5+fn9+fgF+YAN/fnwBfmAFf3x/f38BfmABfAF+YAF/AXxgAn9/AXxgA39/fwF8YAF+AXxgAn5+AXwCTQwBYQFiABwBYQFjACgBYQFkAAEBYQFlAAkBYQFmAAABYQFnAAQBYQFoAAMBYQFpAAABYQFqAAEBYQFrAAcBYQFsABwBYQFhAgGAAoACA8AKvgoNDwMkAwQPA20FBXMDAQMmAwADAykDDxEjADANBwQIDwAICgEBAwEMIAUEIwMaALine truncated
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
|
||||
|
||||
class SandboxSupportBase {
|
||||
constructor(win) {
|
||||
this.win = win;
|
||||
this.timeoutIds = new Map();
|
||||
this.commFun = null;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.commFunc = null;
|
||||
this.timeoutIds.forEach(([_, id]) => this.win.clearTimeout(id));
|
||||
this.timeoutIds = null;
|
||||
}
|
||||
|
||||
exportValueToSandbox(val) {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
importValueFromSandbox(val) {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
createErrorForSandbox(errorMessage) {
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
callSandboxFunction(name, args) {
|
||||
try {
|
||||
args = this.exportValueToSandbox(args);
|
||||
this.commFun(name, args);
|
||||
} catch (e) {
|
||||
this.win.console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
createSandboxExternals() {
|
||||
const externals = {
|
||||
setTimeout: (callbackId, nMilliseconds) => {
|
||||
if (typeof callbackId !== "number" || typeof nMilliseconds !== "number") {
|
||||
return;
|
||||
}
|
||||
|
||||
const id = this.win.setTimeout(() => {
|
||||
this.timeoutIds.delete(callbackId);
|
||||
this.callSandboxFunction("timeoutCb", {
|
||||
callbackId,
|
||||
interval: false
|
||||
});
|
||||
}, nMilliseconds);
|
||||
this.timeoutIds.set(callbackId, id);
|
||||
},
|
||||
clearTimeout: id => {
|
||||
this.win.clearTimeout(this.timeoutIds.get(id));
|
||||
this.timeoutIds.delete(id);
|
||||
},
|
||||
setInterval: (callbackId, nMilliseconds) => {
|
||||
if (typeof callbackId !== "number" || typeof nMilliseconds !== "number") {
|
||||
return;
|
||||
}
|
||||
|
||||
const id = this.win.setInterval(() => {
|
||||
this.callSandboxFunction("timeoutCb", {
|
||||
callbackId,
|
||||
interval: true
|
||||
});
|
||||
}, nMilliseconds);
|
||||
this.timeoutIds.set(callbackId, id);
|
||||
},
|
||||
clearInterval: id => {
|
||||
this.win.clearInterval(this.timeoutIds.get(id));
|
||||
this.timeoutIds.delete(id);
|
||||
},
|
||||
alert: cMsg => {
|
||||
if (typeof cMsg !== "string") {
|
||||
return;
|
||||
}
|
||||
|
||||
this.win.alert(cMsg);
|
||||
},
|
||||
prompt: (cQuestion, cDefault) => {
|
||||
if (typeof cQuestion !== "string" || typeof cDefault !== "string") {
|
||||
return null;
|
||||
}
|
||||
|
||||
return this.win.prompt(cQuestion, cDefault);
|
||||
},
|
||||
parseURL: cUrl => {
|
||||
const url = new this.win.URL(cUrl);
|
||||
const props = ["hash", "host", "hostname", "href", "origin", "password", "pathname", "port", "protocol", "search", "searchParams", "username"];
|
||||
return Object.fromEntries(props.map(name => [name, url[name].toString()]));
|
||||
},
|
||||
send: data => {
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
|
||||
const event = new this.win.CustomEvent("updatefromsandbox", {
|
||||
detail: this.importValueFromSandbox(data)
|
||||
});
|
||||
this.win.dispatchEvent(event);
|
||||
}
|
||||
};
|
||||
Object.setPrototypeOf(externals, null);
|
||||
return (name, args) => {
|
||||
try {
|
||||
const result = externals[name](...args);
|
||||
return this.exportValueToSandbox(result);
|
||||
} catch (error) {
|
||||
throw this.createErrorForSandbox(error?.toString() ?? "");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
exports.SandboxSupportBase = SandboxSupportBase;
|
||||
}
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __w_pdfjs_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(__webpack_module_cache__[moduleId]) {
|
||||
/******/ return __webpack_module_cache__[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __w_pdfjs_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ // module exports must be returned from runtime so entry inlining is disabled
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __w_pdfjs_require__(0);
|
||||
/******/ })()
|
||||
;
|
||||
});
|
||||
//# sourceMappingURL=pdf.sandbox.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["webpack://pdfjs-dist/build/pdf.sandbox/webpack/universalModuleDefinition","webpack://pdfjs-dist/build/pdf.sandbox/src/pdf.sandbox.js","webpack://pdfjs-dist/build/pdf.sandbox/external/quickjs/quickjs-eval.js","webpack://pdfjs-dist/build/pdf.sandbox/src/pdf.sandbox.external.js","webpack://pdfjs-dist/build/pdf.sandbox/webpack/bootstrap","webpack://pdfjs-dist/build/pdf.sandbox/webpack/startup"],"names":["pdfjsVersion","pdfjsBuild","TESTING","exportValueToSandbox","JSON","importValueFromSandbox","createErrorForSandbox","constructor","module","create","sandboxData","code","success","console","dispatchEvent","dumpMemoryUse","nukeSandbox","evalForTesting","Module","_scriptDir","document","b","h","n","q","t","aa","u","w","y","c","f","string","p","W","C","D","array","l","F","g","A","k","a","m","e","z","d","G","H","I","J","String","ba","ca","K","N","x","WebAssembly","initial","maximum","L","O","M","E","ea","fa","ha","ia","Q","R","S","U","T","ka","ma","Error","v","Promise","credentials","la","P","qa","sa","Math","ta","ua","Number","da","X","pa","oa","B","va","wa","i","window","Date","j","ra","Y","Z","V","ja","setTimeout","noExitRuntime","destroy","callSandboxFunction","args","createSandboxExternals","externals","id","interval","clearTimeout","setInterval","clearInterval","alert","cMsg","prompt","parseURL","cUrl","url","props","name","send","data","event","detail","Object","result","error","exports"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;ACVA;;AAAA;;;;AAmBA,MAAMA,eAnBN,SAmBA;AAEA,MAAMC,aArBN,WAqBA;AAEA,MAAMC,UAvBN,KAuBA;;AAGA,oEAAgD;AAC9CC,4BAA0B;AAGxB,WAAOC,eAHiB,GAGjBA,CAAP;AAJ4C;;AAO9CC,8BAA4B;AAC1B,WAD0B,GAC1B;AAR4C;;AAW9CC,sCAAoC;AAClC,WAAO,UAD2B,YAC3B,CAAP;AAZ4C;;AAAA;;AAgBhD,cAAc;AACZC,2BAAyB;AACvB,mBAAe,wBADQ,IACR,CAAf;AAMAC,0BAAsB,aAPC,sBAOD,EAAtBA;AAEA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
+55421
File diff suppressed because it is too large.
Load diff
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["webpack://pdfjs-dist/build/pdf.worker/webpack/universalModuleDefinition","webpack://pdfjs-dist/build/pdf.worker/src/pdf.worker.js","webpack://pdfjs-dist/build/pdf.worker/src/core/worker.js","webpack://pdfjs-dist/build/pdf.worker/src/shared/util.js","webpack://pdfjs-dist/build/pdf.worker/src/shared/compatibility.js","webpack://pdfjs-dist/build/pdf.worker/src/shared/is_node.js","webpack://pdfjs-dist/build/pdf.worker/src/core/primitives.js","webpack://pdfjs-dist/build/pdf.worker/src/core/pdf_manager.js","webpack://pdfjs-dist/build/pdf.worker/src/core/chunked_stream.js","webpack://pdfjs-dist/build/pdf.worker/src/core/core_utils.js","webpack://pdfjs-dist/build/pdf.worker/src/core/document.js","webpack://pdfjs-dist/build/pdf.worker/src/core/obj.js","webpack://pdfjs-dist/build/pdf.worker/src/core/parser.js","webpack://pdfjs-dist/build/pdf.worker/src/core/stream.js","webpack://pdfjs-dist/build/pdf.worker/src/core/ccitt_stream.js","webpack://pdfjs-dist/build/pdf.worker/src/core/ccitt.js","webpack://pdfjs-dist/build/pdf.worker/src/core/jbig2_stream.js","webpack://pdfjs-dist/build/pdf.worker/src/core/jbig2.js","webpack://pdfjs-dist/build/pdf.worker/src/core/arithmetic_decoder.js","webpack://pdfjs-dist/build/pdf.worker/src/core/jpeg_stream.js","webpack://pdfjs-dist/build/pdf.worker/src/core/jpg.js","webpack://pdfjs-dist/build/pdf.worker/src/core/jpx_stream.js","webpack://pdfjs-dist/build/pdf.worker/src/core/jpx.js","webpack://pdfjs-dist/build/pdf.worker/src/core/crypto.js","webpack://pdfjs-dist/build/pdf.worker/src/core/colorspace.js","webpack://pdfjs-dist/build/pdf.worker/src/core/image_utils.js","webpack://pdfjs-dist/build/pdf.worker/src/core/annotation.js","webpack://pdfjs-dist/build/pdf.worker/src/core/default_appearance.js","webpack://pdfjs-dist/build/pdf.worker/src/core/evaluator.js","webpack://pdfjs-dist/build/pdf.worker/src/core/cmap.js","webpack://pdfjs-dist/build/pdf.worker/src/core/fonts.js","webpack://pdfjs-dist/build/pdf.worker/src/core/cff_parser.js","webpack://pdfjs-dist/build/pdf.worker/src/core/charsets.js","webpack://pdfjs-dist/build/pdf.worker/src/core/encodings.js","webpack://pdfjs-dist/build/pdf.worker/src/core/glyphlist.js","webpack://pdfjs-dist/build/pdf.worker/src/core/standard_fonts.js","webpack://pdfjs-dist/build/pdf.worker/src/core/unicode.js","webpack://pdfjs-dist/build/pdf.worker/src/core/font_renderer.js","webpack://pdfjs-dist/build/pdf.worker/src/core/type1_parser.js","webpack://pdfjs-dist/build/pdf.worker/src/core/pattern.js","webpack://pdfjs-dist/build/pdf.worker/src/core/function.js","webpack://pdfjs-dist/build/pdf.worker/src/core/ps_parser.js","webpack://pdfjs-dist/build/pdf.worker/src/core/bidi.js","webpack://pdfjs-dist/build/pdf.worker/src/core/metrics.js","webpack://pdfjs-dist/build/pdf.worker/src/core/murmurhash3.js","webpack://pdfjs-dist/build/pdf.worker/src/core/operator_list.js","webpack://pdfjs-dist/build/pdf.worker/src/core/image.js","webpack://pdfjs-dist/build/pdf.worker/src/core/writer.js","webpack://pdfjs-dist/build/pdf.worker/src/shared/xml_parser.js","webpack://pdfjs-dist/build/pdf.worker/src/shared/message_handler.js","webpack://pdfjs-dist/build/pdf.worker/src/core/worker_stream.js","webpack://pdfjs-dist/build/pdf.worker/webpack/bootstrap","webpack://pdfjs-dist/build/pdf.worker/webpack/runtime/define property getters","webpack://pdfjs-dist/build/pdf.worker/webpack/runtime/hasOwnProperty shorthand","webpack://pdfjs-dist/build/pdf.worker/webpack/runtime/make namespace object","webpack://pdfjs-dist/build/pdf.worker/webpack/startup"],"names":["pdfjsVersion","pdfjsBuild","constructor","finish","terminate","ensureNotTerminated","testMessageProcessed","handler","supportTransfers","data","setVerbosityLevel","WorkerMessageHandler","terminated","cancelXHRs","WorkerTasks","verbosity","apiVersion","docParams","workerVersion","enumerableProperties","docId","docBaseUrl","workerHandlerName","task","i","pdfManager","pdfManagerCapability","source","newPdfManager","cachedChunks","pdfStream","fullRequest","disableAutoFetch","msgHandler","password","length","rangeChunkSize","loaded","flushChunks","pdfFile","arraysToBytes","warn","readPromise","readChunk","arrayByteLength","total","Math","reject","pdfInfo","ex","startWorkerTask","finishWorkerTask","pdfManagerReady","loadDocument","onFailure","evaluatorOptions","maxImageSize","disableFontFace","ignoreErrors","isEvalSupported","fontExtraProperties","getPdfManager","stream","pageRef","Ref","ref","page","promises","pageIndex","newRefs","x","a","xfa","acroForm","xfaDatasets","Array","ii","newXrefInfo","Object","xref","infoObj","xrefInfo","isString","stringToPDFString","rootRef","encrypt","newRef","infoRef","info","fileIds","originalData","datasetsRef","start","VerbosityLevel","Date","intent","renderInteractiveForms","annotationStorage","operatorListInfo","sink","featureId","UNSUPPORTED_FEATURES","normalizeWhitespace","combineTextItems","waitOn","cleanupPromise","setupDoc","maybePort","isMessagePort","IDENTITY_MATRIX","FLine truncated
|
||||
Reference in new issue
Block a user