@toolspack/ttd-pdfjs 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -2
- package/README.md +14 -2
- package/lib/ttd-pdfjs.common.js +199 -267
- package/lib/ttd-pdfjs.umd.js +199 -267
- package/lib/ttd-pdfjs.umd.min.js +5 -27
- package/package.json +3 -3
- package/src/packages/pdfjs/PdfView216.vue +80 -65
package/lib/ttd-pdfjs.common.js
CHANGED
|
@@ -109,6 +109,17 @@ test[TO_STRING_TAG] = 'z';
|
|
|
109
109
|
module.exports = String(test) === '[object z]';
|
|
110
110
|
|
|
111
111
|
|
|
112
|
+
/***/ }),
|
|
113
|
+
|
|
114
|
+
/***/ "01ac":
|
|
115
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
116
|
+
|
|
117
|
+
"use strict";
|
|
118
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwitchPage_vue_vue_type_style_index_0_id_0190e316_prod_lang_css_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3a86");
|
|
119
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwitchPage_vue_vue_type_style_index_0_id_0190e316_prod_lang_css_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwitchPage_vue_vue_type_style_index_0_id_0190e316_prod_lang_css_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
120
|
+
/* unused harmony reexport * */
|
|
121
|
+
|
|
122
|
+
|
|
112
123
|
/***/ }),
|
|
113
124
|
|
|
114
125
|
/***/ "0366":
|
|
@@ -239,17 +250,6 @@ module.exports = {
|
|
|
239
250
|
};
|
|
240
251
|
|
|
241
252
|
|
|
242
|
-
/***/ }),
|
|
243
|
-
|
|
244
|
-
/***/ "0a5a":
|
|
245
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
246
|
-
|
|
247
|
-
"use strict";
|
|
248
|
-
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_3_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PdfView216_vue_vue_type_style_index_0_id_3ce34874_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ceb2");
|
|
249
|
-
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_3_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PdfView216_vue_vue_type_style_index_0_id_3ce34874_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_3_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PdfView216_vue_vue_type_style_index_0_id_3ce34874_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
250
|
-
/* unused harmony reexport * */
|
|
251
|
-
|
|
252
|
-
|
|
253
253
|
/***/ }),
|
|
254
254
|
|
|
255
255
|
/***/ "0cb2":
|
|
@@ -375,11 +375,12 @@ module.exports = function (argument) {
|
|
|
375
375
|
|
|
376
376
|
// load the styles
|
|
377
377
|
var content = __webpack_require__("51d3");
|
|
378
|
+
if(content.__esModule) content = content.default;
|
|
378
379
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
379
380
|
if(content.locals) module.exports = content.locals;
|
|
380
381
|
// add the styles to the DOM
|
|
381
382
|
var add = __webpack_require__("499e").default
|
|
382
|
-
var update = add("
|
|
383
|
+
var update = add("5222ba7b", content, true, {"sourceMap":false,"shadowMode":false});
|
|
383
384
|
|
|
384
385
|
/***/ }),
|
|
385
386
|
|
|
@@ -1211,6 +1212,20 @@ function toComment(sourceMap) {
|
|
|
1211
1212
|
return "/*# ".concat(data, " */");
|
|
1212
1213
|
}
|
|
1213
1214
|
|
|
1215
|
+
/***/ }),
|
|
1216
|
+
|
|
1217
|
+
/***/ "263a":
|
|
1218
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1219
|
+
|
|
1220
|
+
// Imports
|
|
1221
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
1222
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
1223
|
+
// Module
|
|
1224
|
+
exports.push([module.i, ".pdf-view[data-v-071495fa]{height:100%;width:100%;display:flex;flex-direction:column}.pdf-view-control[data-v-071495fa]{text-align:center;margin:10px 0}.pdf-view-area-wapper[data-v-071495fa]{flex:1 1 0%;overflow:auto;width:100%;flex-shrink:0%}.pdf-view-area[data-v-071495fa]{position:relative;min-height:700px}.pdf-view-area .canvasstyle[data-v-071495fa]{display:block;margin:0 auto}.pdf-view-area .label-area[data-v-071495fa]{position:absolute;right:0;bottom:0;top:0;left:0}.pdf-view-empty[data-v-071495fa]{text-align:center;line-height:150px;font-size:14px;color:#999}.pdf-view-loading[data-v-071495fa],.pdf-view-rendering[data-v-071495fa]{margin-top:40px;text-align:center;font-size:14px;color:#999}", ""]);
|
|
1225
|
+
// Exports
|
|
1226
|
+
module.exports = exports;
|
|
1227
|
+
|
|
1228
|
+
|
|
1214
1229
|
/***/ }),
|
|
1215
1230
|
|
|
1216
1231
|
/***/ "271a":
|
|
@@ -1686,6 +1701,22 @@ module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
|
|
|
1686
1701
|
};
|
|
1687
1702
|
|
|
1688
1703
|
|
|
1704
|
+
/***/ }),
|
|
1705
|
+
|
|
1706
|
+
/***/ "3a86":
|
|
1707
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1708
|
+
|
|
1709
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
1710
|
+
|
|
1711
|
+
// load the styles
|
|
1712
|
+
var content = __webpack_require__("bb79");
|
|
1713
|
+
if(content.__esModule) content = content.default;
|
|
1714
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
1715
|
+
if(content.locals) module.exports = content.locals;
|
|
1716
|
+
// add the styles to the DOM
|
|
1717
|
+
var add = __webpack_require__("499e").default
|
|
1718
|
+
var update = add("159154f8", content, true, {"sourceMap":false,"shadowMode":false});
|
|
1719
|
+
|
|
1689
1720
|
/***/ }),
|
|
1690
1721
|
|
|
1691
1722
|
/***/ "3a9b":
|
|
@@ -1877,17 +1908,6 @@ exports.uvCounters = function() {};
|
|
|
1877
1908
|
exports.features = {};
|
|
1878
1909
|
|
|
1879
1910
|
|
|
1880
|
-
/***/ }),
|
|
1881
|
-
|
|
1882
|
-
/***/ "43c2":
|
|
1883
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1884
|
-
|
|
1885
|
-
"use strict";
|
|
1886
|
-
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwitchPage_vue_vue_type_style_index_0_id_0190e316_lang_css_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c299");
|
|
1887
|
-
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwitchPage_vue_vue_type_style_index_0_id_0190e316_lang_css_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwitchPage_vue_vue_type_style_index_0_id_0190e316_lang_css_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
1888
|
-
/* unused harmony reexport * */
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
1911
|
/***/ }),
|
|
1892
1912
|
|
|
1893
1913
|
/***/ "448a":
|
|
@@ -1985,11 +2005,12 @@ module.exports = function (it) {
|
|
|
1985
2005
|
|
|
1986
2006
|
// load the styles
|
|
1987
2007
|
var content = __webpack_require__("7f6e");
|
|
2008
|
+
if(content.__esModule) content = content.default;
|
|
1988
2009
|
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
1989
2010
|
if(content.locals) module.exports = content.locals;
|
|
1990
2011
|
// add the styles to the DOM
|
|
1991
2012
|
var add = __webpack_require__("499e").default
|
|
1992
|
-
var update = add("
|
|
2013
|
+
var update = add("ede70dbe", content, true, {"sourceMap":false,"shadowMode":false});
|
|
1993
2014
|
|
|
1994
2015
|
/***/ }),
|
|
1995
2016
|
|
|
@@ -4876,91 +4897,6 @@ function _classExtractFieldDescriptor(receiver, privateMap, action) {
|
|
|
4876
4897
|
}
|
|
4877
4898
|
module.exports = _classExtractFieldDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4878
4899
|
|
|
4879
|
-
/***/ }),
|
|
4880
|
-
|
|
4881
|
-
/***/ "8875":
|
|
4882
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
4883
|
-
|
|
4884
|
-
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
|
|
4885
|
-
// MIT license
|
|
4886
|
-
// source: https://github.com/amiller-gh/currentScript-polyfill
|
|
4887
|
-
|
|
4888
|
-
// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
|
|
4889
|
-
|
|
4890
|
-
(function (root, factory) {
|
|
4891
|
-
if (true) {
|
|
4892
|
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
4893
|
-
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
4894
|
-
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
4895
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
4896
|
-
} else {}
|
|
4897
|
-
}(typeof self !== 'undefined' ? self : this, function () {
|
|
4898
|
-
function getCurrentScript () {
|
|
4899
|
-
var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
|
|
4900
|
-
// for chrome
|
|
4901
|
-
if (!descriptor && 'currentScript' in document && document.currentScript) {
|
|
4902
|
-
return document.currentScript
|
|
4903
|
-
}
|
|
4904
|
-
|
|
4905
|
-
// for other browsers with native support for currentScript
|
|
4906
|
-
if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
|
|
4907
|
-
return document.currentScript
|
|
4908
|
-
}
|
|
4909
|
-
|
|
4910
|
-
// IE 8-10 support script readyState
|
|
4911
|
-
// IE 11+ & Firefox support stack trace
|
|
4912
|
-
try {
|
|
4913
|
-
throw new Error();
|
|
4914
|
-
}
|
|
4915
|
-
catch (err) {
|
|
4916
|
-
// Find the second match for the "at" string to get file src url from stack.
|
|
4917
|
-
var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
|
|
4918
|
-
ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
|
|
4919
|
-
stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
|
|
4920
|
-
scriptLocation = (stackDetails && stackDetails[1]) || false,
|
|
4921
|
-
line = (stackDetails && stackDetails[2]) || false,
|
|
4922
|
-
currentLocation = document.location.href.replace(document.location.hash, ''),
|
|
4923
|
-
pageSource,
|
|
4924
|
-
inlineScriptSourceRegExp,
|
|
4925
|
-
inlineScriptSource,
|
|
4926
|
-
scripts = document.getElementsByTagName('script'); // Live NodeList collection
|
|
4927
|
-
|
|
4928
|
-
if (scriptLocation === currentLocation) {
|
|
4929
|
-
pageSource = document.documentElement.outerHTML;
|
|
4930
|
-
inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
|
|
4931
|
-
inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
|
|
4932
|
-
}
|
|
4933
|
-
|
|
4934
|
-
for (var i = 0; i < scripts.length; i++) {
|
|
4935
|
-
// If ready state is interactive, return the script tag
|
|
4936
|
-
if (scripts[i].readyState === 'interactive') {
|
|
4937
|
-
return scripts[i];
|
|
4938
|
-
}
|
|
4939
|
-
|
|
4940
|
-
// If src matches, return the script tag
|
|
4941
|
-
if (scripts[i].src === scriptLocation) {
|
|
4942
|
-
return scripts[i];
|
|
4943
|
-
}
|
|
4944
|
-
|
|
4945
|
-
// If inline source matches, return the script tag
|
|
4946
|
-
if (
|
|
4947
|
-
scriptLocation === currentLocation &&
|
|
4948
|
-
scripts[i].innerHTML &&
|
|
4949
|
-
scripts[i].innerHTML.trim() === inlineScriptSource
|
|
4950
|
-
) {
|
|
4951
|
-
return scripts[i];
|
|
4952
|
-
}
|
|
4953
|
-
}
|
|
4954
|
-
|
|
4955
|
-
// If no match, return null
|
|
4956
|
-
return null;
|
|
4957
|
-
}
|
|
4958
|
-
};
|
|
4959
|
-
|
|
4960
|
-
return getCurrentScript
|
|
4961
|
-
}));
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
4900
|
/***/ }),
|
|
4965
4901
|
|
|
4966
4902
|
/***/ "88a7":
|
|
@@ -5497,6 +5433,33 @@ exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P
|
|
|
5497
5433
|
};
|
|
5498
5434
|
|
|
5499
5435
|
|
|
5436
|
+
/***/ }),
|
|
5437
|
+
|
|
5438
|
+
/***/ "9c3f":
|
|
5439
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5440
|
+
|
|
5441
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
5442
|
+
|
|
5443
|
+
// load the styles
|
|
5444
|
+
var content = __webpack_require__("263a");
|
|
5445
|
+
if(content.__esModule) content = content.default;
|
|
5446
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
5447
|
+
if(content.locals) module.exports = content.locals;
|
|
5448
|
+
// add the styles to the DOM
|
|
5449
|
+
var add = __webpack_require__("499e").default
|
|
5450
|
+
var update = add("77e7d9da", content, true, {"sourceMap":false,"shadowMode":false});
|
|
5451
|
+
|
|
5452
|
+
/***/ }),
|
|
5453
|
+
|
|
5454
|
+
/***/ "9f3b":
|
|
5455
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5456
|
+
|
|
5457
|
+
"use strict";
|
|
5458
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PdfView216_vue_vue_type_style_index_0_id_071495fa_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9c3f");
|
|
5459
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PdfView216_vue_vue_type_style_index_0_id_071495fa_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PdfView216_vue_vue_type_style_index_0_id_071495fa_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
5460
|
+
/* unused harmony reexport * */
|
|
5461
|
+
|
|
5462
|
+
|
|
5500
5463
|
/***/ }),
|
|
5501
5464
|
|
|
5502
5465
|
/***/ "9f70":
|
|
@@ -8251,6 +8214,20 @@ module.exports = !fails(function () {
|
|
|
8251
8214
|
});
|
|
8252
8215
|
|
|
8253
8216
|
|
|
8217
|
+
/***/ }),
|
|
8218
|
+
|
|
8219
|
+
/***/ "bb79":
|
|
8220
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
8221
|
+
|
|
8222
|
+
// Imports
|
|
8223
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
8224
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
8225
|
+
// Module
|
|
8226
|
+
exports.push([module.i, ".switch-page[data-v-0190e316]{margin:0;padding:0;overflow:auto}.switch-page button[data-v-0190e316]{font-size:16px;padding:6px!important}", ""]);
|
|
8227
|
+
// Exports
|
|
8228
|
+
module.exports = exports;
|
|
8229
|
+
|
|
8230
|
+
|
|
8254
8231
|
/***/ }),
|
|
8255
8232
|
|
|
8256
8233
|
/***/ "bcbf":
|
|
@@ -8336,21 +8313,6 @@ module.exports = _nonIterableRest, module.exports.__esModule = true, module.expo
|
|
|
8336
8313
|
|
|
8337
8314
|
/***/ }),
|
|
8338
8315
|
|
|
8339
|
-
/***/ "c299":
|
|
8340
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
8341
|
-
|
|
8342
|
-
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
8343
|
-
|
|
8344
|
-
// load the styles
|
|
8345
|
-
var content = __webpack_require__("dd05");
|
|
8346
|
-
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
8347
|
-
if(content.locals) module.exports = content.locals;
|
|
8348
|
-
// add the styles to the DOM
|
|
8349
|
-
var add = __webpack_require__("499e").default
|
|
8350
|
-
var update = add("614e6f6b", content, true, {"sourceMap":false,"shadowMode":false});
|
|
8351
|
-
|
|
8352
|
-
/***/ }),
|
|
8353
|
-
|
|
8354
8316
|
/***/ "c430":
|
|
8355
8317
|
/***/ (function(module, exports, __webpack_require__) {
|
|
8356
8318
|
|
|
@@ -8375,20 +8337,6 @@ module.exports = NATIVE_BIND ? call.bind(call) : function () {
|
|
|
8375
8337
|
};
|
|
8376
8338
|
|
|
8377
8339
|
|
|
8378
|
-
/***/ }),
|
|
8379
|
-
|
|
8380
|
-
/***/ "c69f":
|
|
8381
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
8382
|
-
|
|
8383
|
-
// Imports
|
|
8384
|
-
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
8385
|
-
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
8386
|
-
// Module
|
|
8387
|
-
exports.push([module.i, ".pdf-view[data-v-3ce34874]{height:100%;width:100%;display:flex;flex-direction:column}.pdf-view-control[data-v-3ce34874]{text-align:center;margin:10px 0}.pdf-view-area-wapper[data-v-3ce34874]{flex:1 1 0%;overflow:auto;width:100%;flex-shrink:0%}.pdf-view-area[data-v-3ce34874]{position:relative;min-height:700px}.pdf-view-area .canvasstyle[data-v-3ce34874]{display:block;margin:0 auto}.pdf-view-area .label-area[data-v-3ce34874]{position:absolute;right:0;bottom:0;top:0;left:0}.pdf-view-empty[data-v-3ce34874]{text-align:center;line-height:150px;font-size:14px;color:#999}.pdf-view-loading[data-v-3ce34874],.pdf-view-rendering[data-v-3ce34874]{margin-top:40px;text-align:center;font-size:14px;color:#999}", ""]);
|
|
8388
|
-
// Exports
|
|
8389
|
-
module.exports = exports;
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
8340
|
/***/ }),
|
|
8393
8341
|
|
|
8394
8342
|
/***/ "c6b6":
|
|
@@ -8656,21 +8604,6 @@ var WeakMap = global.WeakMap;
|
|
|
8656
8604
|
module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
|
|
8657
8605
|
|
|
8658
8606
|
|
|
8659
|
-
/***/ }),
|
|
8660
|
-
|
|
8661
|
-
/***/ "ceb2":
|
|
8662
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
8663
|
-
|
|
8664
|
-
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
8665
|
-
|
|
8666
|
-
// load the styles
|
|
8667
|
-
var content = __webpack_require__("c69f");
|
|
8668
|
-
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
8669
|
-
if(content.locals) module.exports = content.locals;
|
|
8670
|
-
// add the styles to the DOM
|
|
8671
|
-
var add = __webpack_require__("499e").default
|
|
8672
|
-
var update = add("e4356e10", content, true, {"sourceMap":false,"shadowMode":false});
|
|
8673
|
-
|
|
8674
8607
|
/***/ }),
|
|
8675
8608
|
|
|
8676
8609
|
/***/ "cf98":
|
|
@@ -9091,20 +9024,6 @@ module.exports = function (V, P) {
|
|
|
9091
9024
|
};
|
|
9092
9025
|
|
|
9093
9026
|
|
|
9094
|
-
/***/ }),
|
|
9095
|
-
|
|
9096
|
-
/***/ "dd05":
|
|
9097
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
9098
|
-
|
|
9099
|
-
// Imports
|
|
9100
|
-
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
9101
|
-
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
9102
|
-
// Module
|
|
9103
|
-
exports.push([module.i, ".switch-page[data-v-0190e316]{margin:0;padding:0;overflow:auto}.switch-page button[data-v-0190e316]{font-size:16px;padding:6px!important}", ""]);
|
|
9104
|
-
// Exports
|
|
9105
|
-
module.exports = exports;
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
9027
|
/***/ }),
|
|
9109
9028
|
|
|
9110
9029
|
/***/ "de5e":
|
|
@@ -10779,15 +10698,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10779
10698
|
|
|
10780
10699
|
if (typeof window !== 'undefined') {
|
|
10781
10700
|
var currentScript = window.document.currentScript
|
|
10782
|
-
if (
|
|
10783
|
-
var getCurrentScript = __webpack_require__("8875")
|
|
10784
|
-
currentScript = getCurrentScript()
|
|
10785
|
-
|
|
10786
|
-
// for backward compatibility, because previously we directly included the polyfill
|
|
10787
|
-
if (!('currentScript' in document)) {
|
|
10788
|
-
Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
|
|
10789
|
-
}
|
|
10790
|
-
}
|
|
10701
|
+
if (false) { var getCurrentScript; }
|
|
10791
10702
|
|
|
10792
10703
|
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
10793
10704
|
if (src) {
|
|
@@ -10798,12 +10709,12 @@ if (typeof window !== 'undefined') {
|
|
|
10798
10709
|
// Indicate to webpack that this file can be concatenated
|
|
10799
10710
|
/* harmony default export */ var setPublicPath = (null);
|
|
10800
10711
|
|
|
10801
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
10802
|
-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"pdf-view"},[(_vm.showPages)?_c('div',{staticClass:"pdf-view-control"},[_c('switch-page',{ref:"switchPage",attrs:{"numPages":_vm.page_count},on:{"page":_vm.onChangePage}})],1):_vm._e(),_c('div',{staticClass:"pdf-view-area-wapper"},[_c('div',{style:(_vm.style)},[(_vm.pdfurl)?_c('div',{staticClass:"center pdf-view-area",style:({'border': _vm.border?'1px solid #666': ''}),on:{"drop":_vm.onDrop,"dragover":_vm.onDragOver}},[(_vm.fileLoading)?_c('div',{staticClass:"pdf-view-loading"},[_vm._v("文件加载中...")]):_vm._e(),_c('canvas',{ref:"canvas",staticClass:"canvasstyle"}),_c('div',{staticClass:"label-area"},[_vm._t("default")],2)]):_c('div',{staticClass:"pdf-view-empty"},[_vm._v("未找到资源,请联系管理员!")])])])])}
|
|
10712
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"803a9372-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/pdfjs/PdfView216.vue?vue&type=template&id=071495fa&scoped=true
|
|
10713
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"pdf-view"},[(_vm.showPages)?_c('div',{staticClass:"pdf-view-control"},[_c('switch-page',{ref:"switchPage",attrs:{"numPages":_vm.page_count},on:{"page":_vm.onChangePage}})],1):_vm._e(),_c('div',{staticClass:"pdf-view-area-wapper"},[_c('div',{style:(_vm.style)},[(_vm.pdfurl)?_c('div',{key:_vm.pdfurl,staticClass:"center pdf-view-area",style:({'border': _vm.border?'1px solid #666': ''}),on:{"drop":_vm.onDrop,"dragover":_vm.onDragOver}},[(_vm.fileLoading)?_c('div',{staticClass:"pdf-view-loading"},[_vm._v("文件加载中...")]):(_vm.pageRendering)?_c('div',{staticClass:"pdf-view-rendering"},[_vm._v("内容渲染中...")]):_vm._e(),_c('canvas',{key:_vm.pdfurl +'canvas',ref:"canvas",staticClass:"canvasstyle"}),_c('div',{staticClass:"label-area"},[_vm._t("default")],2)]):_c('div',{staticClass:"pdf-view-empty"},[_vm._v("未找到资源,请联系管理员!")])])])])}
|
|
10803
10714
|
var staticRenderFns = []
|
|
10804
10715
|
|
|
10805
10716
|
|
|
10806
|
-
// CONCATENATED MODULE: ./src/packages/pdfjs/PdfView216.vue?vue&type=template&id=
|
|
10717
|
+
// CONCATENATED MODULE: ./src/packages/pdfjs/PdfView216.vue?vue&type=template&id=071495fa&scoped=true
|
|
10807
10718
|
|
|
10808
10719
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.cause.js
|
|
10809
10720
|
var es_error_cause = __webpack_require__("d9e2");
|
|
@@ -11179,14 +11090,14 @@ var web_url_search_params_has = __webpack_require__("271a");
|
|
|
11179
11090
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.size.js
|
|
11180
11091
|
var web_url_search_params_size = __webpack_require__("5494");
|
|
11181
11092
|
|
|
11182
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
11093
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"803a9372-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/pdfjs/SwitchPage.vue?vue&type=template&id=0190e316&scoped=true&lang=html
|
|
11183
11094
|
var SwitchPagevue_type_template_id_0190e316_scoped_true_lang_html_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"switch-page"},[_c('el-button',{attrs:{"size":"mini"},on:{"click":function($event){return _vm.switchPage('prev')}}},[_c('i',{staticClass:"el-icon-caret-left"})]),_c('el-button',{attrs:{"size":"mini"},on:{"click":function($event){return _vm.switchPage('next')}}},[_c('i',{staticClass:"el-icon-caret-right"})]),_c('span',{staticStyle:{"margin-left":"10px"}},[_vm._v(_vm._s(_vm.page)+"/"+_vm._s(_vm.numPages))]),_c('span',{staticStyle:{"margin-left":"6px"}},[_vm._v(" 跳转至 "),_c('el-input',{staticStyle:{"width":"50px","margin":"0 4px"},attrs:{"size":"mini"},nativeOn:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.goPage($event)}},model:{value:(_vm.itemPage),callback:function ($$v) {_vm.itemPage=_vm._n($$v)},expression:"itemPage"}}),_vm._v(" 页 ")],1)],1)}
|
|
11184
11095
|
var SwitchPagevue_type_template_id_0190e316_scoped_true_lang_html_staticRenderFns = []
|
|
11185
11096
|
|
|
11186
11097
|
|
|
11187
|
-
// CONCATENATED MODULE: ./src/packages/pdfjs/SwitchPage.vue?vue&type=template&id=0190e316&scoped=true&lang=html
|
|
11098
|
+
// CONCATENATED MODULE: ./src/packages/pdfjs/SwitchPage.vue?vue&type=template&id=0190e316&scoped=true&lang=html
|
|
11188
11099
|
|
|
11189
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--
|
|
11100
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/pdfjs/SwitchPage.vue?vue&type=script&lang=js
|
|
11190
11101
|
//
|
|
11191
11102
|
//
|
|
11192
11103
|
//
|
|
@@ -11201,7 +11112,7 @@ var SwitchPagevue_type_template_id_0190e316_scoped_true_lang_html_staticRenderFn
|
|
|
11201
11112
|
//
|
|
11202
11113
|
//
|
|
11203
11114
|
|
|
11204
|
-
/* harmony default export */ var
|
|
11115
|
+
/* harmony default export */ var SwitchPagevue_type_script_lang_js = ({
|
|
11205
11116
|
name: 'switch-page',
|
|
11206
11117
|
props: {
|
|
11207
11118
|
numPages: {
|
|
@@ -11257,10 +11168,10 @@ var SwitchPagevue_type_template_id_0190e316_scoped_true_lang_html_staticRenderFn
|
|
|
11257
11168
|
}
|
|
11258
11169
|
}
|
|
11259
11170
|
});
|
|
11260
|
-
// CONCATENATED MODULE: ./src/packages/pdfjs/SwitchPage.vue?vue&type=script&lang=js
|
|
11261
|
-
/* harmony default export */ var
|
|
11262
|
-
// EXTERNAL MODULE: ./src/packages/pdfjs/SwitchPage.vue?vue&type=style&index=0&id=0190e316&lang=css&scoped=true
|
|
11263
|
-
var
|
|
11171
|
+
// CONCATENATED MODULE: ./src/packages/pdfjs/SwitchPage.vue?vue&type=script&lang=js
|
|
11172
|
+
/* harmony default export */ var pdfjs_SwitchPagevue_type_script_lang_js = (SwitchPagevue_type_script_lang_js);
|
|
11173
|
+
// EXTERNAL MODULE: ./src/packages/pdfjs/SwitchPage.vue?vue&type=style&index=0&id=0190e316&prod&lang=css&scoped=true
|
|
11174
|
+
var SwitchPagevue_type_style_index_0_id_0190e316_prod_lang_css_scoped_true = __webpack_require__("01ac");
|
|
11264
11175
|
|
|
11265
11176
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
11266
11177
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
@@ -11269,20 +11180,19 @@ var SwitchPagevue_type_style_index_0_id_0190e316_lang_css_scoped_true_ = __webpa
|
|
|
11269
11180
|
// This module is a runtime utility for cleaner component module output and will
|
|
11270
11181
|
// be included in the final webpack user bundle.
|
|
11271
11182
|
|
|
11272
|
-
function normalizeComponent
|
|
11183
|
+
function normalizeComponent(
|
|
11273
11184
|
scriptExports,
|
|
11274
11185
|
render,
|
|
11275
11186
|
staticRenderFns,
|
|
11276
11187
|
functionalTemplate,
|
|
11277
11188
|
injectStyles,
|
|
11278
11189
|
scopeId,
|
|
11279
|
-
moduleIdentifier
|
|
11190
|
+
moduleIdentifier /* server only */,
|
|
11280
11191
|
shadowMode /* vue-cli only */
|
|
11281
11192
|
) {
|
|
11282
11193
|
// Vue.extend constructor export interop
|
|
11283
|
-
var options =
|
|
11284
|
-
? scriptExports.options
|
|
11285
|
-
: scriptExports
|
|
11194
|
+
var options =
|
|
11195
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
11286
11196
|
|
|
11287
11197
|
// render functions
|
|
11288
11198
|
if (render) {
|
|
@@ -11302,7 +11212,8 @@ function normalizeComponent (
|
|
|
11302
11212
|
}
|
|
11303
11213
|
|
|
11304
11214
|
var hook
|
|
11305
|
-
if (moduleIdentifier) {
|
|
11215
|
+
if (moduleIdentifier) {
|
|
11216
|
+
// server build
|
|
11306
11217
|
hook = function (context) {
|
|
11307
11218
|
// 2.3 injection
|
|
11308
11219
|
context =
|
|
@@ -11328,11 +11239,11 @@ function normalizeComponent (
|
|
|
11328
11239
|
} else if (injectStyles) {
|
|
11329
11240
|
hook = shadowMode
|
|
11330
11241
|
? function () {
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11242
|
+
injectStyles.call(
|
|
11243
|
+
this,
|
|
11244
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
11245
|
+
)
|
|
11246
|
+
}
|
|
11336
11247
|
: injectStyles
|
|
11337
11248
|
}
|
|
11338
11249
|
|
|
@@ -11343,16 +11254,14 @@ function normalizeComponent (
|
|
|
11343
11254
|
options._injectStyles = hook
|
|
11344
11255
|
// register for functional component in vue file
|
|
11345
11256
|
var originalRender = options.render
|
|
11346
|
-
options.render = function renderWithStyleInjection
|
|
11257
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
11347
11258
|
hook.call(context)
|
|
11348
11259
|
return originalRender(h, context)
|
|
11349
11260
|
}
|
|
11350
11261
|
} else {
|
|
11351
11262
|
// inject component registration as beforeCreate hook
|
|
11352
11263
|
var existing = options.beforeCreate
|
|
11353
|
-
options.beforeCreate = existing
|
|
11354
|
-
? [].concat(existing, hook)
|
|
11355
|
-
: [hook]
|
|
11264
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
11356
11265
|
}
|
|
11357
11266
|
}
|
|
11358
11267
|
|
|
@@ -11372,7 +11281,7 @@ function normalizeComponent (
|
|
|
11372
11281
|
/* normalize component */
|
|
11373
11282
|
|
|
11374
11283
|
var component = normalizeComponent(
|
|
11375
|
-
|
|
11284
|
+
pdfjs_SwitchPagevue_type_script_lang_js,
|
|
11376
11285
|
SwitchPagevue_type_template_id_0190e316_scoped_true_lang_html_render,
|
|
11377
11286
|
SwitchPagevue_type_template_id_0190e316_scoped_true_lang_html_staticRenderFns,
|
|
11378
11287
|
false,
|
|
@@ -11383,7 +11292,7 @@ var component = normalizeComponent(
|
|
|
11383
11292
|
)
|
|
11384
11293
|
|
|
11385
11294
|
/* harmony default export */ var SwitchPage = (component.exports);
|
|
11386
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--
|
|
11295
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/pdfjs/PdfView216.vue?vue&type=script&lang=js
|
|
11387
11296
|
|
|
11388
11297
|
|
|
11389
11298
|
|
|
@@ -11418,6 +11327,7 @@ var component = normalizeComponent(
|
|
|
11418
11327
|
//
|
|
11419
11328
|
//
|
|
11420
11329
|
//
|
|
11330
|
+
//
|
|
11421
11331
|
|
|
11422
11332
|
|
|
11423
11333
|
function getChromeVersion() {
|
|
@@ -11446,7 +11356,6 @@ if (getChromeVersion()) {
|
|
|
11446
11356
|
// const PDFJS = require('pdfjs-dist/legacy/build/pdf.js')
|
|
11447
11357
|
var PDFJS = __webpack_require__("9511");
|
|
11448
11358
|
var defautScale = 1.0;
|
|
11449
|
-
|
|
11450
11359
|
// PDFJS.GlobalWorkerOptions.workerSrc = require('pdfjs-dist/legacy/build/pdf.worker.min.js')
|
|
11451
11360
|
PDFJS.GlobalWorkerOptions.workerSrc = __webpack_require__("2aad");
|
|
11452
11361
|
// https://unpkg.com/pdfjs-dist@2.16.105/cmaps/
|
|
@@ -11454,7 +11363,7 @@ PDFJS.GlobalWorkerOptions.workerSrc = __webpack_require__("2aad");
|
|
|
11454
11363
|
// 使用代理的cmaps,会导致加载很慢,改用本地
|
|
11455
11364
|
|
|
11456
11365
|
var cMapUrl = 'https://wsp.totodi.com/staticfiles_web/web/pdfjs/cmaps/';
|
|
11457
|
-
/* harmony default export */ var
|
|
11366
|
+
/* harmony default export */ var PdfView216vue_type_script_lang_js = ({
|
|
11458
11367
|
components: {
|
|
11459
11368
|
SwitchPage: SwitchPage
|
|
11460
11369
|
},
|
|
@@ -11519,18 +11428,33 @@ var cMapUrl = 'https://wsp.totodi.com/staticfiles_web/web/pdfjs/cmaps/';
|
|
|
11519
11428
|
renderPage: function renderPage(num) {
|
|
11520
11429
|
var _this = this;
|
|
11521
11430
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11522
|
-
var vm, page, scaleNum, viewport, viewboxWidth, desiredWidth, canvas, renderContext
|
|
11431
|
+
var vm, page, scaleNum, viewport, viewboxWidth, desiredWidth, canvas, renderContext;
|
|
11523
11432
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11524
11433
|
while (1) switch (_context.prev = _context.next) {
|
|
11525
11434
|
case 0:
|
|
11435
|
+
console.log('renderPage ', _this.pageRendering);
|
|
11436
|
+
if (!_this.pageRendering) {
|
|
11437
|
+
_context.next = 5;
|
|
11438
|
+
break;
|
|
11439
|
+
}
|
|
11440
|
+
_this.pageNumPending = num;
|
|
11441
|
+
_context.next = 39;
|
|
11442
|
+
break;
|
|
11443
|
+
case 5:
|
|
11526
11444
|
// 渲染pdf
|
|
11527
11445
|
vm = _this;
|
|
11528
11446
|
_this.pageRendering = true;
|
|
11529
11447
|
// Using promise to fetch the page
|
|
11530
|
-
|
|
11531
|
-
|
|
11448
|
+
if (_this.pdfDoc) {
|
|
11449
|
+
_context.next = 9;
|
|
11450
|
+
break;
|
|
11451
|
+
}
|
|
11452
|
+
return _context.abrupt("return", false);
|
|
11453
|
+
case 9:
|
|
11454
|
+
_context.prev = 9;
|
|
11455
|
+
_context.next = 12;
|
|
11532
11456
|
return _this.pdfDoc.getPage(num);
|
|
11533
|
-
case
|
|
11457
|
+
case 12:
|
|
11534
11458
|
page = _context.sent;
|
|
11535
11459
|
scaleNum = vm.compuscale;
|
|
11536
11460
|
viewport = '';
|
|
@@ -11563,13 +11487,11 @@ var cMapUrl = 'https://wsp.totodi.com/staticfiles_web/web/pdfjs/cmaps/';
|
|
|
11563
11487
|
renderContext = {
|
|
11564
11488
|
canvasContext: canvas.getContext('2d'),
|
|
11565
11489
|
viewport: viewport
|
|
11566
|
-
};
|
|
11567
|
-
_context.next =
|
|
11568
|
-
return page.render(renderContext);
|
|
11569
|
-
case
|
|
11570
|
-
|
|
11571
|
-
// Wait for rendering to finish
|
|
11572
|
-
renderTask.promise;
|
|
11490
|
+
}; // Wait for rendering to finish
|
|
11491
|
+
_context.next = 28;
|
|
11492
|
+
return page.render(renderContext).promise;
|
|
11493
|
+
case 28:
|
|
11494
|
+
// console.log(' await page.render 168')
|
|
11573
11495
|
vm.pageRendering = false;
|
|
11574
11496
|
if (vm.pageNumPending !== null) {
|
|
11575
11497
|
// New page rendering is pending
|
|
@@ -11577,21 +11499,22 @@ var cMapUrl = 'https://wsp.totodi.com/staticfiles_web/web/pdfjs/cmaps/';
|
|
|
11577
11499
|
vm.pageNumPending = null;
|
|
11578
11500
|
}
|
|
11579
11501
|
_this.$emit('renderSuccess');
|
|
11580
|
-
_context.next =
|
|
11502
|
+
_context.next = 36;
|
|
11581
11503
|
break;
|
|
11582
|
-
case
|
|
11583
|
-
_context.prev =
|
|
11584
|
-
_context.t0 = _context["catch"](
|
|
11504
|
+
case 33:
|
|
11505
|
+
_context.prev = 33;
|
|
11506
|
+
_context.t0 = _context["catch"](9);
|
|
11585
11507
|
console.error(_context.t0);
|
|
11586
|
-
case
|
|
11587
|
-
_context.prev =
|
|
11508
|
+
case 36:
|
|
11509
|
+
_context.prev = 36;
|
|
11510
|
+
// console.log('finally 178')
|
|
11588
11511
|
_this.pageRendering = false;
|
|
11589
|
-
return _context.finish(
|
|
11590
|
-
case
|
|
11512
|
+
return _context.finish(36);
|
|
11513
|
+
case 39:
|
|
11591
11514
|
case "end":
|
|
11592
11515
|
return _context.stop();
|
|
11593
11516
|
}
|
|
11594
|
-
}, _callee, null, [[
|
|
11517
|
+
}, _callee, null, [[9, 33, 36, 39]]);
|
|
11595
11518
|
}))();
|
|
11596
11519
|
},
|
|
11597
11520
|
prev: function prev() {
|
|
@@ -11630,13 +11553,15 @@ var cMapUrl = 'https://wsp.totodi.com/staticfiles_web/web/pdfjs/cmaps/';
|
|
|
11630
11553
|
}
|
|
11631
11554
|
this.viewport = null;
|
|
11632
11555
|
this.pdfDoc.destroy();
|
|
11556
|
+
// console.log('closepdf end')
|
|
11633
11557
|
}
|
|
11634
|
-
this.pdfDoc = null
|
|
11558
|
+
// this.pdfDoc = null
|
|
11635
11559
|
this.isready = false;
|
|
11636
11560
|
this.compuscale = this.scale;
|
|
11637
11561
|
this.$emit('closepdf');
|
|
11638
11562
|
},
|
|
11639
11563
|
queueRenderPage: function queueRenderPage(num) {
|
|
11564
|
+
// console.log('queueRenderPage 226', this.pageRendering)
|
|
11640
11565
|
if (this.pageRendering) {
|
|
11641
11566
|
this.pageNumPending = num;
|
|
11642
11567
|
} else {
|
|
@@ -11664,60 +11589,58 @@ var cMapUrl = 'https://wsp.totodi.com/staticfiles_web/web/pdfjs/cmaps/';
|
|
|
11664
11589
|
// console.log('-----encodeURI------', url)
|
|
11665
11590
|
// }
|
|
11666
11591
|
console.log('----PdfView---', url);
|
|
11667
|
-
|
|
11668
|
-
|
|
11592
|
+
if (_this2.pdfDoc) {
|
|
11593
|
+
// console.log('pdfDocument is ready destroy,,')
|
|
11594
|
+
_this2.pdfDoc.destroy();
|
|
11595
|
+
}
|
|
11596
|
+
_context2.prev = 5;
|
|
11597
|
+
_context2.next = 8;
|
|
11669
11598
|
return PDFJS.getDocument({
|
|
11670
11599
|
url: encodeURI(url),
|
|
11671
11600
|
cMapUrl: cMapUrl,
|
|
11672
11601
|
cMapPacked: true
|
|
11673
11602
|
}).promise;
|
|
11674
|
-
case
|
|
11603
|
+
case 8:
|
|
11675
11604
|
pdfDoc_ = _context2.sent;
|
|
11676
|
-
_context2.next =
|
|
11605
|
+
_context2.next = 23;
|
|
11677
11606
|
break;
|
|
11678
|
-
case
|
|
11679
|
-
_context2.prev =
|
|
11680
|
-
_context2.t0 = _context2["catch"](
|
|
11607
|
+
case 11:
|
|
11608
|
+
_context2.prev = 11;
|
|
11609
|
+
_context2.t0 = _context2["catch"](5);
|
|
11681
11610
|
console.error(_context2.t0);
|
|
11682
|
-
_context2.next =
|
|
11611
|
+
_context2.next = 16;
|
|
11683
11612
|
return fetch(new URL(url, window.location).href);
|
|
11684
|
-
case
|
|
11613
|
+
case 16:
|
|
11685
11614
|
pdfData = _context2.sent;
|
|
11686
|
-
_context2.next =
|
|
11615
|
+
_context2.next = 19;
|
|
11687
11616
|
return pdfData.arrayBuffer();
|
|
11688
|
-
case
|
|
11617
|
+
case 19:
|
|
11689
11618
|
arrayBufferPdf = _context2.sent;
|
|
11690
|
-
_context2.next =
|
|
11619
|
+
_context2.next = 22;
|
|
11691
11620
|
return PDFJS.getDocument({
|
|
11692
11621
|
data: arrayBufferPdf
|
|
11693
11622
|
}).promise;
|
|
11694
|
-
case 21:
|
|
11695
|
-
pdfDoc_ = _context2.sent;
|
|
11696
11623
|
case 22:
|
|
11697
|
-
|
|
11624
|
+
pdfDoc_ = _context2.sent;
|
|
11625
|
+
case 23:
|
|
11626
|
+
_context2.prev = 23;
|
|
11698
11627
|
_this2.fileLoading = false;
|
|
11699
|
-
return _context2.finish(
|
|
11700
|
-
case
|
|
11701
|
-
|
|
11702
|
-
|
|
11703
|
-
break;
|
|
11704
|
-
}
|
|
11705
|
-
console.log('pdfDocument is ready destroy,,');
|
|
11706
|
-
_context2.next = 29;
|
|
11707
|
-
return _this2.closepdf();
|
|
11708
|
-
case 29:
|
|
11709
|
-
_this2.pdfDoc = null;
|
|
11710
|
-
case 30:
|
|
11628
|
+
return _context2.finish(23);
|
|
11629
|
+
case 26:
|
|
11630
|
+
// console.log('pdfDoc_', pdfDoc_)
|
|
11631
|
+
// debugger
|
|
11711
11632
|
_this2.pdfDoc = pdfDoc_;
|
|
11633
|
+
// 初始化pdf
|
|
11712
11634
|
_this2.page_count = pdfDoc_.numPages;
|
|
11713
11635
|
_this2.$emit('numPages', pdfDoc_.numPages);
|
|
11636
|
+
// console.log('265', this.pageRendering)
|
|
11714
11637
|
_this2.renderPage(_this2.pageNum);
|
|
11715
11638
|
_this2.emitPage(_this2.pageNum);
|
|
11716
|
-
case
|
|
11639
|
+
case 31:
|
|
11717
11640
|
case "end":
|
|
11718
11641
|
return _context2.stop();
|
|
11719
11642
|
}
|
|
11720
|
-
}, _callee2, null, [[
|
|
11643
|
+
}, _callee2, null, [[5, 11, 23, 26]]);
|
|
11721
11644
|
}))();
|
|
11722
11645
|
},
|
|
11723
11646
|
onDrop: function onDrop(event) {
|
|
@@ -11730,6 +11653,7 @@ var cMapUrl = 'https://wsp.totodi.com/staticfiles_web/web/pdfjs/cmaps/';
|
|
|
11730
11653
|
},
|
|
11731
11654
|
updateScale: function updateScale() {
|
|
11732
11655
|
this.compuscale = this.scale;
|
|
11656
|
+
// console.log('updateScale 278')
|
|
11733
11657
|
this.renderPage(this.pageNum);
|
|
11734
11658
|
}
|
|
11735
11659
|
},
|
|
@@ -11741,7 +11665,7 @@ var cMapUrl = 'https://wsp.totodi.com/staticfiles_web/web/pdfjs/cmaps/';
|
|
|
11741
11665
|
// }
|
|
11742
11666
|
},
|
|
11743
11667
|
beforeDestroy: function beforeDestroy() {
|
|
11744
|
-
console.log('---', this.pdfDoc)
|
|
11668
|
+
// console.log('---', this.pdfDoc)
|
|
11745
11669
|
if (this.pdfDoc) {
|
|
11746
11670
|
this.closepdf();
|
|
11747
11671
|
}
|
|
@@ -11755,14 +11679,16 @@ var cMapUrl = 'https://wsp.totodi.com/staticfiles_web/web/pdfjs/cmaps/';
|
|
|
11755
11679
|
pdfurl: {
|
|
11756
11680
|
handler: function handler(val) {
|
|
11757
11681
|
var _this3 = this;
|
|
11682
|
+
// console.log('watch url change: ', val)
|
|
11683
|
+
if (this.pdfDoc) {
|
|
11684
|
+
// console.log('closepdf')
|
|
11685
|
+
this.closepdf();
|
|
11686
|
+
}
|
|
11758
11687
|
this.$nextTick(function () {
|
|
11759
11688
|
if (val) {
|
|
11760
11689
|
_this3.pageNum = 1;
|
|
11761
11690
|
_this3.initPage = true;
|
|
11762
11691
|
_this3.loadUrl(val);
|
|
11763
|
-
if (_this3.pdfDoc) {
|
|
11764
|
-
_this3.closepdf();
|
|
11765
|
-
}
|
|
11766
11692
|
}
|
|
11767
11693
|
if (_this3.showPages) {
|
|
11768
11694
|
_this3.$refs.switchPage.setPage(1);
|
|
@@ -11773,14 +11699,20 @@ var cMapUrl = 'https://wsp.totodi.com/staticfiles_web/web/pdfjs/cmaps/';
|
|
|
11773
11699
|
},
|
|
11774
11700
|
// 监听页码变化,渲染对应合同页
|
|
11775
11701
|
page: function page(newPage, oldPage) {
|
|
11776
|
-
|
|
11702
|
+
// console.log('watch page change: ', newPage)
|
|
11703
|
+
if (this.pdfDoc) {
|
|
11704
|
+
this.queueRenderPage(newPage);
|
|
11705
|
+
} else {
|
|
11706
|
+
this.pageNum = newPage;
|
|
11707
|
+
// console.log('no pdfDoc')
|
|
11708
|
+
}
|
|
11777
11709
|
}
|
|
11778
11710
|
}
|
|
11779
11711
|
});
|
|
11780
|
-
// CONCATENATED MODULE: ./src/packages/pdfjs/PdfView216.vue?vue&type=script&lang=js
|
|
11781
|
-
/* harmony default export */ var
|
|
11782
|
-
// EXTERNAL MODULE: ./src/packages/pdfjs/PdfView216.vue?vue&type=style&index=0&id=
|
|
11783
|
-
var
|
|
11712
|
+
// CONCATENATED MODULE: ./src/packages/pdfjs/PdfView216.vue?vue&type=script&lang=js
|
|
11713
|
+
/* harmony default export */ var pdfjs_PdfView216vue_type_script_lang_js = (PdfView216vue_type_script_lang_js);
|
|
11714
|
+
// EXTERNAL MODULE: ./src/packages/pdfjs/PdfView216.vue?vue&type=style&index=0&id=071495fa&prod&lang=less&scoped=true
|
|
11715
|
+
var PdfView216vue_type_style_index_0_id_071495fa_prod_lang_less_scoped_true = __webpack_require__("9f3b");
|
|
11784
11716
|
|
|
11785
11717
|
// CONCATENATED MODULE: ./src/packages/pdfjs/PdfView216.vue
|
|
11786
11718
|
|
|
@@ -11792,12 +11724,12 @@ var PdfView216vue_type_style_index_0_id_3ce34874_lang_less_scoped_true_ = __webp
|
|
|
11792
11724
|
/* normalize component */
|
|
11793
11725
|
|
|
11794
11726
|
var PdfView216_component = normalizeComponent(
|
|
11795
|
-
|
|
11727
|
+
pdfjs_PdfView216vue_type_script_lang_js,
|
|
11796
11728
|
render,
|
|
11797
11729
|
staticRenderFns,
|
|
11798
11730
|
false,
|
|
11799
11731
|
null,
|
|
11800
|
-
"
|
|
11732
|
+
"071495fa",
|
|
11801
11733
|
null
|
|
11802
11734
|
|
|
11803
11735
|
)
|