ERP-admin/build/admin/assets/print-js.b1833f5a.js

2 lines
14 KiB
JavaScript
Raw Normal View History

2024-05-20 18:04:36 +08:00
import{g as O}from"./axios.18becb61.js";var v={exports:{}};(function(j,P){(function(a,n){j.exports=n()})(window,function(){return function(E){var a={};function n(o){if(a[o])return a[o].exports;var s=a[o]={i:o,l:!1,exports:{}};return E[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=E,n.c=a,n.d=function(o,s,f){n.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:f})},n.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n.t=function(o,s){if(s&1&&(o=n(o)),s&8||s&4&&typeof o=="object"&&o&&o.__esModule)return o;var f=Object.create(null);if(n.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:o}),s&2&&typeof o!="string")for(var b in o)n.d(f,b,function(i){return o[i]}.bind(null,b));return f},n.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(s,"a",s),s},n.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},n.p="",n(n.s=0)}({"./src/index.js":function(E,a,n){n.r(a),n("./src/sass/index.scss");var o=n("./src/js/init.js"),s=o.default.init;typeof window<"u"&&(window.printJS=s),a.default=s},"./src/js/browser.js":function(E,a,n){n.r(a);var o={isFirefox:function(){return typeof InstallTrigger<"u"},isIE:function(){return navigator.userAgent.indexOf("MSIE")!==-1||!!document.documentMode},isEdge:function(){return!o.isIE()&&!!window.StyleMedia},isChrome:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window;return!!f.chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||navigator.userAgent.toLowerCase().indexOf("safari")!==-1},isIOSChrome:function(){return navigator.userAgent.toLowerCase().indexOf("crios")!==-1}};a.default=o},"./src/js/functions.js":function(E,a,n){n.r(a),n.d(a,"addWrapper",function(){return b}),n.d(a,"capitalizePrint",function(){return i}),n.d(a,"collectStyles",function(){return l}),n.d(a,"addHeader",function(){return e}),n.d(a,"cleanUp",function(){return u}),n.d(a,"isRawHTML",function(){return y});var o=n("./src/js/modal.js"),s=n("./src/js/browser.js");function f(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(c){return typeof c}:f=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},f(t)}function b(t,d){var c="font-family:"+d.font+" !important; font-size: "+d.font_size+" !important; width:100%;";return'<div style="'+c+'">'+t+"</div>"}function i(t){return t.charAt(0).toUpperCase()+t.slice(1)}function l(t,d){for(var c=document.defaultView||window,h="",p=c.getComputedStyle(t,""),m=0;m<p.length;m++)(d.targetStyles.indexOf("*")!==-1||d.targetStyle.indexOf(p[m])!==-1||r(d.targetStyles,p[m]))&&p.getPropertyValue(p[m])&&(h+=p[m]+":"+p.getPropertyValue(p[m])+";");return h+="max-width: "+d.maxWidth+"px !important; font-size: "+d.font_size+" !important;",h}function r(t,d){for(var c=0;c<t.length;c++)if(f(d)==="object"&&d.indexOf(t[c])!==-1)return!0;return!1}function e(t,d){var c=document.createElement("div");if(y(d.header))c.innerHTML=d.header;else{var h=document.createElement("h1"),p=document.createTextNode(d.header);h.appendChild(p),h.setAttribute("style",d.headerStyle),c.appendChild(h)}t.insertBefore(c,t.childNodes[0])}function u(t){t.showModal&&o.default.close(),t.onLoadingEnd&&t.onLoadingEnd(),(t.showModal||t.onLoadingStart)&&window.URL.revokeObjectURL(t.printable);var d="mouseover";(s.default.isChrome()||s.default.isFirefox())&&(d="focus");var c=function h(){window.removeEventListener(d,h),t.onPrintDialogClose();var p=document.getElementById(t.frameId);p&&p.remove()};window.addEventListener(d,c)}function y(t){var d=new RegExp("<([A-Za-z][A-Za-z0-9]*)\\b[^>]*>(.*?)</\\1>");return d.test(t)}},"./src/js/html.js":function(E,a,n){n.r(a);var o=n("./src/js/functions.js"),s=n("./src/js/print.js");function f(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(e){return typeof e}:f=function(e){return e&&typeof Symbol=="function"&&e.construc