!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="./",n(n.s=30)}({0:function(e,t,n){"use strict";function o(e,t,n,o,i,r,s,d){var a,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),s?(a=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=a):i&&(a=d?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),a)if(l.functional){l._injectStyles=a;var f=l.render;l.render=function(e,t){return a.call(t),f(e,t)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,a):[a]}return{exports:e,options:l}}n.d(t,"a",(function(){return o}))},30:function(e,t,n){"use strict";n.r(t);var o=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"pdf-viewer"},[this.pdfSrc?this._e():t("p",{staticClass:"pdf-viewer-errorMessage"},[this._v("\n    "+this._s("暂无"+this.titleName+"信息")+"\n  ")]),this._v(" "),t("div",{attrs:{id:"pdf-content"}})])};o._withStripped=!0;var i=n(39),r=n.n(i),s={props:{pdfSrc:{type:String,default:""},titleName:{type:String,default:""}},data:function(){return{}},watch:{pdfSrc:function(){this.updatePDF()}},mounted:function(){this.updatePDF()},methods:{updatePDF:function(){this.pdfSrc&&r.a.embed(this.pdfSrc,"#pdf-content")}}},d=n(0),a=Object(d.a)(s,o,[],!1,null,"039353e9",null);a.options.__file="PDFViewer/index.vue";t.default=a.exports},39:function(e,t,n){var o,i,r;
/**
 *  PDFObject v2.2.7
 *  https://github.com/pipwerks/PDFObject
 *  @license
 *  Copyright (c) 2008-2021 Philip Hutchison
 *  MIT-style license: http://pipwerks.mit-license.org/
 *  UMD module pattern from https://github.com/umdjs/umd/blob/master/templates/returnExports.js
 */i=[],void 0===(r="function"==typeof(o=function(){"use strict";if("undefined"==typeof window||void 0===window.navigator||void 0===window.navigator.userAgent||void 0===window.navigator.mimeTypes)return!1;let e=window.navigator,t=window.navigator.userAgent,n="ActiveXObject"in window,o=void 0!==window.Promise,i=void 0!==e.mimeTypes["application/pdf"],r=void 0!==e.platform&&"MacIntel"===e.platform&&void 0!==e.maxTouchPoints&&e.maxTouchPoints>1||/Mobi|Tablet|Android|iPad|iPhone/.test(t),s=!r&&void 0!==e.vendor&&/Apple/.test(e.vendor)&&/Safari/.test(t),d=!!(!r&&/irefox/.test(t)&&t.split("rv:").length>1)&&parseInt(t.split("rv:")[1].split(".")[0],10)>18,a=function(e){var t;try{t=new ActiveXObject(e)}catch(e){t=null}return t},l=!r&&(o||d||i||n&&!(!a("AcroPDF.PDF")&&!a("PDF.PdfCtrl"))),f=function(e,t){return t||console.log("[PDFObject] "+e),!1},p=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},c=function(e,t,n,o,i,r,s){p(e);let d=o+"?file="+encodeURIComponent(t)+n,a=document.createElement("div"),l=document.createElement("iframe");return l.src=d,l.className="pdfobject",l.type="application/pdf",l.frameborder="0",l.allow="fullscreen",l.title=r,i&&(l.id=i),s||(a.style.cssText="position: absolute; top: 0; right: 0; bottom: 0; left: 0;",l.style.cssText="border: none; width: 100%; height: 100%;",e.style.position="relative",e.style.overflow="auto"),a.appendChild(l),e.appendChild(a),e.classList.add("pdfobject-container"),e.getElementsByTagName("iframe")[0]},u=function(e,t,n){let o=t||!1,i=n||{},d="string"==typeof i.id?i.id:"",a=i.page||!1,u=i.pdfOpenParams||{},m=i.fallbackLink||!0,v=i.width||"100%",h=i.height||"100%",y=i.title||"Embedded PDF",b="boolean"!=typeof i.assumptionMode||i.assumptionMode,g="boolean"==typeof i.forcePDFJS&&i.forcePDFJS,w="boolean"==typeof i.supportRedirect&&i.supportRedirect,_="boolean"==typeof i.omitInlineStyles&&i.omitInlineStyles,P="boolean"==typeof i.suppressConsole&&i.suppressConsole,S="boolean"==typeof i.forceIframe&&i.forceIframe,j=i.PDFJS_URL||!1,C=function(e){let t=document.body;return"string"==typeof e?t=document.querySelector(e):void 0!==window.jQuery&&e instanceof jQuery&&e.length?t=e.get(0):void 0!==e.nodeType&&1===e.nodeType&&(t=e),t}(o),T="",x="";return"string"!=typeof e?f("URL is not valid",P):C?(a&&(u.page=a),x=function(e){let t,n="";if(e){for(t in e)e.hasOwnProperty(t)&&(n+=encodeURIComponent(t)+"="+encodeURIComponent(e[t])+"&");n&&(n="#"+n,n=n.slice(0,n.length-1))}return n}(u),g&&j?c(C,e,x,j,d,y,_):l||b&&!r?function(e,t,n,o,i,r,s,d,a,l){p(t);let f=document.createElement(e);if(f.src=o+i,f.className="pdfobject",f.type="application/pdf",f.title=a,d&&(f.id=d),"iframe"===e&&(f.allow="fullscreen"),!l){let t="embed"===e?"overflow: auto;":"border: none;";n&&n!==document.body?t+="width: "+r+"; height: "+s+";":t+="position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%;",f.style.cssText=t}return t.classList.add("pdfobject-container"),t.appendChild(f),t.getElementsByTagName(e)[0]}(S||w||s?"iframe":"embed",C,t,e,x,v,h,d,y,_):j?c(C,e,x,j,d,y,_):(m&&(T="string"==typeof m?m:"<p>This browser does not support inline PDFs. Please download the PDF to view it: <a href='[url]'>Download PDF</a></p>",C.innerHTML=T.replace(/\[url\]/g,e)),f("This browser does not support embedded PDFs",P))):f("Target element cannot be determined",P)};return{embed:function(e,t,n){return u(e,t,n)},pdfobjectversion:"2.2.7",supportsPDFs:l}})?o.apply(t,i):o)||(e.exports=r)}})}));
//# sourceMappingURL=PDFViewer.js.map