@pdftron/webviewer
Version:
[WebViewer](https://www.apryse.com/webviewer) is a powerful JavaScript Document SDK and UI Component Library that is a part of the [Apryse PDF SDK](https://www.apryse.com). It provides a slick, out-of-the-box responsive UI that interacts with the core lib
5 lines (4 loc) • 1.62 kB
JavaScript
/** Notice * This file contains works from many authors under various (but compatible) licenses. Please see core.txt for more information. **/
(function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[8],{686:function(wa,ua,e){e.r(ua);var ka=e(0);wa=e(50);var pa=e(605),na=e(341),ia=e(25),ca=window;e=function(){function ba(x){var y=this;this.qQa=function(r){return r&&("image"===r.type.split("/")[0].toLowerCase()||r.name&&!!r.name.match(/.(jpg|jpeg|png|gif)$/i))};this.file=x;this.JQa=new Promise(function(r){return Object(ka.c)(y,void 0,void 0,function(){var b;return Object(ka.e)(this,function(h){switch(h.label){case 0:return this.qQa(this.file)?
[4,Object(na.b)(x)]:[3,2];case 1:b=h.aa(),this.file=ia.r?new Blob([b],{type:x.type}):new File([b],null===x||void 0===x?void 0:x.name,{type:x.type}),h.label=2;case 2:return r(!0),[2]}})})})}ba.prototype.getFileData=function(x){var y=this,r=new FileReader;r.onload=function(b){y.trigger(ba.Events.DOCUMENT_LOADING_PROGRESS,[b.loaded,b.loaded]);x(new Uint8Array(b.target.result))};r.onprogress=function(b){b.lengthComputable&&y.trigger(ba.Events.DOCUMENT_LOADING_PROGRESS,[b.loaded,0<b.total?b.total:0])};
r.readAsArrayBuffer(this.file)};ba.prototype.getFile=function(){return Object(ka.c)(this,void 0,Promise,function(){return Object(ka.e)(this,function(x){switch(x.label){case 0:return[4,this.JQa];case 1:return x.aa(),ca.da.isJSWorker?[2,this.file.path]:[2,this.file]}})})};ba.Events={DOCUMENT_LOADING_PROGRESS:"documentLoadingProgress"};return ba}();Object(wa.b)(e);Object(pa.a)(e);Object(pa.b)(e);ua["default"]=e}}]);}).call(this || window)