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