You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
salary-management-oneself/public/js/hiprint/plugins/jspdf/canvg.min.js

1 line
74 KiB
JavaScript

5 months ago
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("rgbcolor"),require("stackblur-canvas")):"function"==typeof define&&define.amd?define(["rgbcolor","stackblur-canvas"],e):t.canvg=e(t.RGBColor,t.StackBlur)}(this,function(y,v){"use strict";var t;return y=y&&y.hasOwnProperty("default")?y.default:y,v=v&&v.hasOwnProperty("default")?v.default:v,function(t){var l;t.exports;(l=window).DOMParser=window.DOMParser;var c=l.document;function d(t,e){var i;return(i=c.createElement("canvas")).width=t,i.height=e,i}var f,p=function(t,e,i){if(null!=t||null!=e||null!=i){var n=m(i||{});"string"==typeof t&&(t=c.getElementById(t)),null!=t.svg&&t.svg.stop(),t.childNodes&&1==t.childNodes.length&&"OBJECT"==t.childNodes[0].nodeName||(t.svg=n);var s=t.getContext("2d");void 0!==e.documentElement?n.loadXmlDoc(s,e):"<"==e.substr(0,1)?n.loadXml(s,e):n.load(s,e)}else for(var a=c.querySelectorAll("svg"),r=0;r<a.length;r++){var o=a[r],h=c.createElement("canvas");if(void 0!==o.clientWidth&&void 0!==o.clientHeight)h.width=o.clientWidth,h.height=o.clientHeight;else{var l=o.getBoundingClientRect();h.width=l.width,h.height=l.height}o.parentNode.insertBefore(h,o),o.parentNode.removeChild(o);var u=c.createElement("div");u.appendChild(o),p(h,u.innerHTML)}};"undefined"==typeof Element||(void 0!==Element.prototype.matches?f=function(t,e){return t.matches(e)}:void 0!==Element.prototype.webkitMatchesSelector?f=function(t,e){return t.webkitMatchesSelector(e)}:void 0!==Element.prototype.mozMatchesSelector?f=function(t,e){return t.mozMatchesSelector(e)}:void 0!==Element.prototype.msMatchesSelector?f=function(t,e){return t.msMatchesSelector(e)}:void 0!==Element.prototype.oMatchesSelector?f=function(t,e){return t.oMatchesSelector(e)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(f=function(t,e){return $(t).is(e)}),void 0===f&&"undefined"!=typeof Sizzle&&(f=Sizzle.matchesSelector)));var e=/(\[[^\]]+\])/g,i=/(#[^\s\+>~\.\[:]+)/g,a=/(\.[^\s\+>~\.\[:]+)/g,r=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,o=/(:[\w-]+\([^\)]*\))/gi,h=/(:[^\s\+>~\.\[:]+)/g,u=/([^\s\+>~\.\[:]+)/g;function P(n){var s=[0,0,0],t=function(t,e){var i=n.match(t);null!=i&&(s[e]+=i.length,n=n.replace(t," "))};return n=(n=n.replace(/:not\(([^\)]*)\)/g," $1 ")).replace(/{[\s\S]*/gm," "),t(e,1),t(i,0),t(a,1),t(r,2),t(o,1),t(h,1),n=(n=n.replace(/[\*\s\+>~]/g," ")).replace(/[#\.]/g," "),t(u,2),s.join("")}function m(s){var D={opts:s,FRAMERATE:30,MAX_VIRTUAL_PIXELS:3e4,rootEmSize:12,emSize:12,log:function(){}};1==D.opts.log&&"undefined"!=typeof console&&(D.log=function(t){console.log(t)}),D.init=function(t){var e=0;D.UniqueId=function(){return"canvg"+ ++e},D.Definitions={},D.Styles={},D.StylesSpecificity={},D.Animations=[],D.Images=[],D.ctx=t,D.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(t,e){this.viewPorts.push({width:t,height:e})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(t){return null!=t&&"number"==typeof t?t:"x"==t?this.width():"y"==t?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},D.init(),D.ImagesLoaded=function(){for(var t=0;t<D.Images.length;t++)if(!D.Images[t].loaded)return!1;return!0},D.trim=function(t){return t.replace(/^\s+|\s+$/g,"")},D.compressSpaces=function(t){return t.replace(/(?!\u3000)\s+/gm," ")},D.ajax=function(t){var e;return(e=l.XMLHttpRequest?new l.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"))?(e.open("GET",t,!1),e.send(null),e.responseText):null},D.parseXml=function(e){if("undefined"!=typeof Windows&&void 0!==Windows.Data&&void 0!==Windows.Data.Xml){var t=new Windows.Data.Xml.Dom.XmlDocument,i=new Windows.Data.Xml.Dom.XmlLoadSettings;return i.prohibitDtd=!1,t.loadXml(e,i),t}if(!l.DOMParser)return e=e.replace(/<!DOCTYPE svg[^>]*>/,""),(t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t