rebill-web-components-sdk 1.8.10 → 1.8.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/apm-checkout_19.cjs.entry.js +1 -1
- package/dist/cjs/{index-B3Laezx8.js → index-DLWPfXe-.js} +3 -3
- package/dist/cjs/{index-B3Laezx8.js.map → index-DLWPfXe-.js.map} +1 -1
- package/dist/cjs/{jspdf.es.min-ByYxEd9e.js → jspdf.es.min-BoQioi3m.js} +4 -4
- package/dist/cjs/{jspdf.es.min-ByYxEd9e.js.map → jspdf.es.min-BoQioi3m.js.map} +1 -1
- package/dist/cjs/otp-component_7.cjs.entry.js +1 -1
- package/dist/cjs/{pdf-generator-CuE412-Z.js → pdf-generator-zX0ZE6Aa.js} +7 -7
- package/dist/{esm/pdf-generator-snBLBL7p.js.map → cjs/pdf-generator-zX0ZE6Aa.js.map} +1 -1
- package/dist/cjs/renewal-success-page_2.cjs.entry.js +1 -1
- package/dist/collection/utils/download-template.js +3 -3
- package/dist/collection/utils/download-template.js.map +1 -1
- package/dist/components/apm-checkout.js +1 -1
- package/dist/components/apm-download.js +1 -1
- package/dist/components/{p-DfK-jtq1.js → p-B1Jt4Nzk.js} +3 -3
- package/dist/components/{p-DfK-jtq1.js.map → p-B1Jt4Nzk.js.map} +1 -1
- package/dist/components/{p-B05hShHO.js → p-BFKOns7K.js} +4 -4
- package/dist/components/{p-B05hShHO.js.map → p-BFKOns7K.js.map} +1 -1
- package/dist/components/{p-DmzNVDlw.js → p-BIat5a1z.js} +3 -3
- package/dist/components/{p-DmzNVDlw.js.map → p-BIat5a1z.js.map} +1 -1
- package/dist/components/{p-BYXzf-S2.js → p-BP8l8kwZ.js} +7 -7
- package/dist/components/{p-BYXzf-S2.js.map → p-BP8l8kwZ.js.map} +1 -1
- package/dist/components/{p-TnX37Ths.js → p-Buh4lAbF.js} +3 -3
- package/dist/components/{p-TnX37Ths.js.map → p-Buh4lAbF.js.map} +1 -1
- package/dist/components/{p-do9ScsKB.js → p-CSqJ7ePk.js} +3 -3
- package/dist/components/{p-do9ScsKB.js.map → p-CSqJ7ePk.js.map} +1 -1
- package/dist/components/{p-D96If9jd.js → p-KfcaXfJX.js} +3 -3
- package/dist/components/{p-D96If9jd.js.map → p-KfcaXfJX.js.map} +1 -1
- package/dist/components/rebill-checkout.js +3 -3
- package/dist/components/rebill-renewal.js +3 -3
- package/dist/components/renewal-success-page.js +1 -1
- package/dist/components/success-page.js +1 -1
- package/dist/esm/apm-checkout_19.entry.js +1 -1
- package/dist/esm/{index-Dbv9TW_F.js → index-CymF2J-m.js} +3 -3
- package/dist/esm/{index-Dbv9TW_F.js.map → index-CymF2J-m.js.map} +1 -1
- package/dist/esm/{jspdf.es.min-Cshxy1Va.js → jspdf.es.min-CDCJH4OD.js} +4 -4
- package/dist/esm/{jspdf.es.min-Cshxy1Va.js.map → jspdf.es.min-CDCJH4OD.js.map} +1 -1
- package/dist/esm/otp-component_7.entry.js +1 -1
- package/dist/esm/{pdf-generator-snBLBL7p.js → pdf-generator-B4NHkX8z.js} +7 -7
- package/dist/{cjs/pdf-generator-CuE412-Z.js.map → esm/pdf-generator-B4NHkX8z.js.map} +1 -1
- package/dist/esm/renewal-success-page_2.entry.js +1 -1
- package/dist/rebill-web-components-sdk/{p-50dad6ef.entry.js → p-3af0544a.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-CbbYM1HT.js → p-CBIvw8lr.js} +5 -5
- package/dist/rebill-web-components-sdk/{p-CbbYM1HT.js.map → p-CBIvw8lr.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-HVtQDxzl.js → p-DLk0jy5R.js} +9 -9
- package/dist/rebill-web-components-sdk/{p-HVtQDxzl.js.map → p-DLk0jy5R.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-7195af41.entry.js → p-c41119c0.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-BsxJk8cY.js → p-cHVoxSaG.js} +4 -4
- package/dist/rebill-web-components-sdk/{p-BsxJk8cY.js.map → p-cHVoxSaG.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-b77a2a72.entry.js → p-d99d4450.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
- package/package.json +1 -1
- /package/dist/rebill-web-components-sdk/{p-50dad6ef.entry.js.map → p-3af0544a.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-7195af41.entry.js.map → p-c41119c0.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-b77a2a72.entry.js.map → p-d99d4450.entry.js.map} +0 -0
|
@@ -5586,7 +5586,7 @@ function(t){var n=function(t){var e,n,r,i,a,o,s,u,c,l;for(n=[],r=0,i=(t+=e="\0\0
|
|
|
5586
5586
|
* Licensed under the MIT License.
|
|
5587
5587
|
* http://opensource.org/licenses/mit-license
|
|
5588
5588
|
*/
|
|
5589
|
-
function(t){t.loadFile=function(t,e,n){return function(t,e,n){e=false!==e,n="function"==typeof n?n:function(){};var r=void 0;try{r=function(t,e,n){var r=new XMLHttpRequest,i=0,a=function(t){var e=t.length,n=[],r=String.fromCharCode;for(i=0;i<e;i+=1)n.push(r(255&t.charCodeAt(i)));return n.join("")};if(r.open("GET",t,!e),r.overrideMimeType("text/plain; charset=x-user-defined"),false===e&&(r.onload=function(){200===r.status?n(a(this.responseText)):n(void 0);}),r.send(null),e&&200===r.status)return a(r.responseText)}(t,e,n);}catch(i){}return r}(t,e,n)},t.loadImageFile=t.loadFile;}(E.API),function(e){function n(){return (i.html2canvas?Promise.resolve(i.html2canvas):Promise.resolve().then(function () { return require('./pdf-generator-CuE412-Z.js'); }).then(function (n) { return n.html2canvas; })).catch(function(t){return Promise.reject(new Error("Could not load html2canvas: "+t))}).then(function(t){return t.default?t.default:t})}function r(){return (i.DOMPurify?Promise.resolve(i.DOMPurify):Promise.resolve().then(function () { return require('./purify.es-B2x4tLHJ.js'); })).catch(function(t){return Promise.reject(new Error("Could not load dompurify: "+t))}).then(function(t){return t.default?t.default:t})}var a=function(e){var n=_typeof(e);return "undefined"===n?"undefined":"string"===n||e instanceof String?"string":"number"===n||e instanceof Number?"number":"function"===n||e instanceof Function?"function":e&&e.constructor===Array?"array":e&&1===e.nodeType?"element":"object"===n?"object":"unknown"},o=function(t,e){var n=document.createElement(t);for(var r in e.className&&(n.className=e.className),e.innerHTML&&e.dompurify&&(n.innerHTML=e.dompurify.sanitize(e.innerHTML)),e.style)n.style[r]=e.style[r];return n},s=function t(e,n){for(var r=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(false),i=e.firstChild;i;i=i.nextSibling) true!==n&&1===i.nodeType&&"SCRIPT"===i.nodeName||r.appendChild(t(i,n));return 1===e.nodeType&&("CANVAS"===e.nodeName?(r.width=e.width,r.height=e.height,r.getContext("2d").drawImage(e,0,0)):"TEXTAREA"!==e.nodeName&&"SELECT"!==e.nodeName||(r.value=e.value),r.addEventListener("load",function(){r.scrollTop=e.scrollTop,r.scrollLeft=e.scrollLeft;},true)),r},u=function t(e){var n=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),r=t.convert(Promise.resolve(),n);return (r=r.setProgress(1,t,1,[t])).set(e)};(u.prototype=Object.create(Promise.prototype)).constructor=u,u.convert=function(t,e){return t.__proto__=e||u.prototype,t},u.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:true,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},u.prototype.from=function(t,e){return this.then(function(){switch(e=e||function(t){switch(a(t)){case "string":return "string";case "element":return "canvas"===t.nodeName.toLowerCase()?"canvas":"element";default:return "unknown"}}(t),e){case "string":return this.then(r).then(function(e){return this.set({src:o("div",{innerHTML:t,dompurify:e})})});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.")}})},u.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.")}},u.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:"relative",display:"inline-block",width:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},e=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===e.tagName&&(t.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=o("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=o("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(e),this.prop.container.firstChild.appendChild(o("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px";})},u.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(n).then(function(t){var e=Object.assign({},this.opt.html2canvas);return delete e.onrendered,t(this.prop.container,e)}).then(function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay);})},u.prototype.toContext2d=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(n).then(function(t){var e=this.opt.jsPDF,n=this.opt.fontFaces,r="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,i=Object.assign({async:true,allowTaint:true,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:true,proxy:null,removeContainer:true,foreignObjectRendering:false,useCORS:false},this.opt.html2canvas);if(delete i.onrendered,e.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,e.context2d.posX=this.opt.x,e.context2d.posY=this.opt.y,e.context2d.margin=this.opt.margin,e.context2d.fontFaces=n,n)for(var a=0;a<n.length;++a){var o=n[a],s=o.src.find(function(t){return "truetype"===t.format});s&&e.addFont(s.url,o.ref.name,o.ref.style);}return i.windowHeight=i.windowHeight||0,i.windowHeight=0==i.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,e.context2d.save(true),t(this.prop.container,i)}).then(function(t){this.opt.jsPDF.context2d.restore(true),(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay);})},u.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;})},u.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF;})},u.prototype.output=function(t,e,n){return "img"===(n=n||"pdf").toLowerCase()||"image"===n.toLowerCase()?this.outputImg(t,e):this.outputPdf(t,e)},u.prototype.outputPdf=function(t,e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(t,e)})},u.prototype.outputImg=function(t){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.'}})},u.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);})},u.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf);})},u.prototype.set=function(t){if("object"!==a(t))return this;var e=Object.keys(t||{}).map(function(e){if(e in u.template.prop)return function(){this.prop[e]=t[e];};switch(e){case "margin":return this.setMargin.bind(this,t.margin);case "jsPDF":return function(){return this.opt.jsPDF=t.jsPDF,this.setPageSize()};case "pageSize":return this.setPageSize.bind(this,t.pageSize);default:return function(){this.opt[e]=t[e];}}},this);return this.then(function(){return this.thenList(e)})},u.prototype.get=function(t,e){return this.then(function(){var n=t in u.template.prop?this.prop[t]:this.opt[t];return e?e(n):n})},u.prototype.setMargin=function(t){return this.then(function(){switch(a(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)},u.prototype.setPageSize=function(t){function e(t,e){return Math.floor(t*e/72*96)}return this.then(function(){(t=t||E.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;})},u.prototype.setProgress=function(t,e,n,r){return null!=t&&(this.progress.val=t),null!=e&&(this.progress.state=e),null!=n&&(this.progress.n=n),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},u.prototype.updateProgress=function(t,e,n,r){return this.setProgress(t?this.progress.val+t:null,e||null,n?this.progress.n+n:null,r?this.progress.stack.concat(r):null)},u.prototype.then=function(t,e){var n=this;return this.thenCore(t,e,function(t,e){return n.updateProgress(null,null,1,[t]),Promise.prototype.then.call(this,function(e){return n.updateProgress(null,t),e}).then(t,e).then(function(t){return n.updateProgress(1),t})})},u.prototype.thenCore=function(t,e,n){n=n||Promise.prototype.then;var r=this;t&&(t=t.bind(r)),e&&(e=e.bind(r));var i=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?r:u.convert(Object.assign({},r),Promise.prototype),a=n.call(i,t,e);return u.convert(a,r.__proto__)},u.prototype.thenExternal=function(t,e){return Promise.prototype.then.call(this,t,e)},u.prototype.thenList=function(t){var e=this;return t.forEach(function(t){e=e.thenCore(t);}),e},u.prototype.catch=function(t){t&&(t=t.bind(this));var e=Promise.prototype.catch.call(this,t);return u.convert(e,this)},u.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},u.prototype.error=function(t){return this.then(function(){throw new Error(t)})},u.prototype.using=u.prototype.set,u.prototype.saveAs=u.prototype.save,u.prototype.export=u.prototype.output,u.prototype.run=u.prototype.then,E.getPageSize=function(e,n,r){if("object"===_typeof(e)){var i=e;e=i.orientation,n=i.unit||n,r=i.format||r;}n=n||"mm",r=r||"a4",e=(""+(e||"P")).toLowerCase();var a,o=(""+r).toLowerCase(),s={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(n){case "pt":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: "+n}var u,c=0,l=0;if(s.hasOwnProperty(o))c=s[o][1]/a,l=s[o][0]/a;else try{c=r[1],l=r[0];}catch(h){throw new Error("Invalid format: "+r)}if("p"===e||"portrait"===e)e="p",l>c&&(u=l,l=c,c=u);else {if("l"!==e&&"landscape"!==e)throw "Invalid orientation: "+e;e="l",c>l&&(u=l,l=c,c=u);}return {width:l,height:c,unit:n,k:a,orientation:e}},e.html=function(t,e){(e=e||{}).callback=e.callback||function(){},e.html2canvas=e.html2canvas||{},e.html2canvas.canvas=e.html2canvas.canvas||this.canvas,e.jsPDF=e.jsPDF||this,e.fontFaces=e.fontFaces?e.fontFaces.map(Ct):null;var n=new u(e);return e.worker?n:n.from(t).doCallback()};}(E.API),E.API.addJS=function(t){return Ut=t,this.internal.events.subscribe("postPutResources",function(){Tt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Tt+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),zt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Ut+")"),this.internal.out(">>"),this.internal.out("endobj");}),this.internal.events.subscribe("putCatalog",function(){ void 0!==Tt&&void 0!==zt&&this.internal.out("/Names <</JavaScript "+Tt+" 0 R>>");}),this},
|
|
5589
|
+
function(t){t.loadFile=function(t,e,n){return function(t,e,n){e=false!==e,n="function"==typeof n?n:function(){};var r=void 0;try{r=function(t,e,n){var r=new XMLHttpRequest,i=0,a=function(t){var e=t.length,n=[],r=String.fromCharCode;for(i=0;i<e;i+=1)n.push(r(255&t.charCodeAt(i)));return n.join("")};if(r.open("GET",t,!e),r.overrideMimeType("text/plain; charset=x-user-defined"),false===e&&(r.onload=function(){200===r.status?n(a(this.responseText)):n(void 0);}),r.send(null),e&&200===r.status)return a(r.responseText)}(t,e,n);}catch(i){}return r}(t,e,n)},t.loadImageFile=t.loadFile;}(E.API),function(e){function n(){return (i.html2canvas?Promise.resolve(i.html2canvas):Promise.resolve().then(function () { return require('./pdf-generator-zX0ZE6Aa.js'); }).then(function (n) { return n.html2canvas; })).catch(function(t){return Promise.reject(new Error("Could not load html2canvas: "+t))}).then(function(t){return t.default?t.default:t})}function r(){return (i.DOMPurify?Promise.resolve(i.DOMPurify):Promise.resolve().then(function () { return require('./purify.es-B2x4tLHJ.js'); })).catch(function(t){return Promise.reject(new Error("Could not load dompurify: "+t))}).then(function(t){return t.default?t.default:t})}var a=function(e){var n=_typeof(e);return "undefined"===n?"undefined":"string"===n||e instanceof String?"string":"number"===n||e instanceof Number?"number":"function"===n||e instanceof Function?"function":e&&e.constructor===Array?"array":e&&1===e.nodeType?"element":"object"===n?"object":"unknown"},o=function(t,e){var n=document.createElement(t);for(var r in e.className&&(n.className=e.className),e.innerHTML&&e.dompurify&&(n.innerHTML=e.dompurify.sanitize(e.innerHTML)),e.style)n.style[r]=e.style[r];return n},s=function t(e,n){for(var r=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(false),i=e.firstChild;i;i=i.nextSibling) true!==n&&1===i.nodeType&&"SCRIPT"===i.nodeName||r.appendChild(t(i,n));return 1===e.nodeType&&("CANVAS"===e.nodeName?(r.width=e.width,r.height=e.height,r.getContext("2d").drawImage(e,0,0)):"TEXTAREA"!==e.nodeName&&"SELECT"!==e.nodeName||(r.value=e.value),r.addEventListener("load",function(){r.scrollTop=e.scrollTop,r.scrollLeft=e.scrollLeft;},true)),r},u=function t(e){var n=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),r=t.convert(Promise.resolve(),n);return (r=r.setProgress(1,t,1,[t])).set(e)};(u.prototype=Object.create(Promise.prototype)).constructor=u,u.convert=function(t,e){return t.__proto__=e||u.prototype,t},u.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:true,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},u.prototype.from=function(t,e){return this.then(function(){switch(e=e||function(t){switch(a(t)){case "string":return "string";case "element":return "canvas"===t.nodeName.toLowerCase()?"canvas":"element";default:return "unknown"}}(t),e){case "string":return this.then(r).then(function(e){return this.set({src:o("div",{innerHTML:t,dompurify:e})})});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.")}})},u.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.")}},u.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:"relative",display:"inline-block",width:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},e=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===e.tagName&&(t.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=o("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=o("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(e),this.prop.container.firstChild.appendChild(o("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px";})},u.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(n).then(function(t){var e=Object.assign({},this.opt.html2canvas);return delete e.onrendered,t(this.prop.container,e)}).then(function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay);})},u.prototype.toContext2d=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(n).then(function(t){var e=this.opt.jsPDF,n=this.opt.fontFaces,r="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,i=Object.assign({async:true,allowTaint:true,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:true,proxy:null,removeContainer:true,foreignObjectRendering:false,useCORS:false},this.opt.html2canvas);if(delete i.onrendered,e.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,e.context2d.posX=this.opt.x,e.context2d.posY=this.opt.y,e.context2d.margin=this.opt.margin,e.context2d.fontFaces=n,n)for(var a=0;a<n.length;++a){var o=n[a],s=o.src.find(function(t){return "truetype"===t.format});s&&e.addFont(s.url,o.ref.name,o.ref.style);}return i.windowHeight=i.windowHeight||0,i.windowHeight=0==i.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,e.context2d.save(true),t(this.prop.container,i)}).then(function(t){this.opt.jsPDF.context2d.restore(true),(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay);})},u.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;})},u.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF;})},u.prototype.output=function(t,e,n){return "img"===(n=n||"pdf").toLowerCase()||"image"===n.toLowerCase()?this.outputImg(t,e):this.outputPdf(t,e)},u.prototype.outputPdf=function(t,e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(t,e)})},u.prototype.outputImg=function(t){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.'}})},u.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);})},u.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf);})},u.prototype.set=function(t){if("object"!==a(t))return this;var e=Object.keys(t||{}).map(function(e){if(e in u.template.prop)return function(){this.prop[e]=t[e];};switch(e){case "margin":return this.setMargin.bind(this,t.margin);case "jsPDF":return function(){return this.opt.jsPDF=t.jsPDF,this.setPageSize()};case "pageSize":return this.setPageSize.bind(this,t.pageSize);default:return function(){this.opt[e]=t[e];}}},this);return this.then(function(){return this.thenList(e)})},u.prototype.get=function(t,e){return this.then(function(){var n=t in u.template.prop?this.prop[t]:this.opt[t];return e?e(n):n})},u.prototype.setMargin=function(t){return this.then(function(){switch(a(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)},u.prototype.setPageSize=function(t){function e(t,e){return Math.floor(t*e/72*96)}return this.then(function(){(t=t||E.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;})},u.prototype.setProgress=function(t,e,n,r){return null!=t&&(this.progress.val=t),null!=e&&(this.progress.state=e),null!=n&&(this.progress.n=n),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},u.prototype.updateProgress=function(t,e,n,r){return this.setProgress(t?this.progress.val+t:null,e||null,n?this.progress.n+n:null,r?this.progress.stack.concat(r):null)},u.prototype.then=function(t,e){var n=this;return this.thenCore(t,e,function(t,e){return n.updateProgress(null,null,1,[t]),Promise.prototype.then.call(this,function(e){return n.updateProgress(null,t),e}).then(t,e).then(function(t){return n.updateProgress(1),t})})},u.prototype.thenCore=function(t,e,n){n=n||Promise.prototype.then;var r=this;t&&(t=t.bind(r)),e&&(e=e.bind(r));var i=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?r:u.convert(Object.assign({},r),Promise.prototype),a=n.call(i,t,e);return u.convert(a,r.__proto__)},u.prototype.thenExternal=function(t,e){return Promise.prototype.then.call(this,t,e)},u.prototype.thenList=function(t){var e=this;return t.forEach(function(t){e=e.thenCore(t);}),e},u.prototype.catch=function(t){t&&(t=t.bind(this));var e=Promise.prototype.catch.call(this,t);return u.convert(e,this)},u.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},u.prototype.error=function(t){return this.then(function(){throw new Error(t)})},u.prototype.using=u.prototype.set,u.prototype.saveAs=u.prototype.save,u.prototype.export=u.prototype.output,u.prototype.run=u.prototype.then,E.getPageSize=function(e,n,r){if("object"===_typeof(e)){var i=e;e=i.orientation,n=i.unit||n,r=i.format||r;}n=n||"mm",r=r||"a4",e=(""+(e||"P")).toLowerCase();var a,o=(""+r).toLowerCase(),s={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(n){case "pt":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: "+n}var u,c=0,l=0;if(s.hasOwnProperty(o))c=s[o][1]/a,l=s[o][0]/a;else try{c=r[1],l=r[0];}catch(h){throw new Error("Invalid format: "+r)}if("p"===e||"portrait"===e)e="p",l>c&&(u=l,l=c,c=u);else {if("l"!==e&&"landscape"!==e)throw "Invalid orientation: "+e;e="l",c>l&&(u=l,l=c,c=u);}return {width:l,height:c,unit:n,k:a,orientation:e}},e.html=function(t,e){(e=e||{}).callback=e.callback||function(){},e.html2canvas=e.html2canvas||{},e.html2canvas.canvas=e.html2canvas.canvas||this.canvas,e.jsPDF=e.jsPDF||this,e.fontFaces=e.fontFaces?e.fontFaces.map(Ct):null;var n=new u(e);return e.worker?n:n.from(t).doCallback()};}(E.API),E.API.addJS=function(t){return Ut=t,this.internal.events.subscribe("postPutResources",function(){Tt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Tt+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),zt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Ut+")"),this.internal.out(">>"),this.internal.out("endobj");}),this.internal.events.subscribe("putCatalog",function(){ void 0!==Tt&&void 0!==zt&&this.internal.out("/Names <</JavaScript "+Tt+" 0 R>>");}),this},
|
|
5590
5590
|
/**
|
|
5591
5591
|
* @license
|
|
5592
5592
|
* Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
|
|
@@ -5623,7 +5623,7 @@ function(t){t.processWEBP=function(e,n,r,i){var a=new le(e),o=a.width,s=a.height
|
|
|
5623
5623
|
* Licensed under the MIT License.
|
|
5624
5624
|
* http://opensource.org/licenses/mit-license
|
|
5625
5625
|
*/
|
|
5626
|
-
function(t){var e=function(t){for(var e=t.length,n=new Uint8Array(e),r=0;r<e;r++)n[r]=t.charCodeAt(r);return n};t.API.events.push(["addFont",function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(void 0===a)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if("string"!=typeof(r=false===a.existsFileInVFS(i.postScriptName)?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");!function(n,r){r=/^\x00\x01\x00\x00/.test(r)?e(r):e(f(r)),n.metadata=t.API.TTFFont.open(r),n.metadata.Unicode=n.metadata.Unicode||{encoding:{},kerning:{},widths:[]},n.metadata.glyIdsUsed=[0];}(i,r);}}]);}(E),E.API.addSvgAsImage=function(t,e,n,r,a,s,u,c){if(isNaN(e)||isNaN(n))throw o.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(a))throw o.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=r,l.height=a;var h=l.getContext("2d");h.fillStyle="#fff",h.fillRect(0,0,l.width,l.height);var f={ignoreMouse:true,ignoreAnimation:true,ignoreDimensions:true},d=this;return (i.canvg?Promise.resolve(i.canvg):Promise.resolve().then(function () { return require('./index-
|
|
5626
|
+
function(t){var e=function(t){for(var e=t.length,n=new Uint8Array(e),r=0;r<e;r++)n[r]=t.charCodeAt(r);return n};t.API.events.push(["addFont",function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(void 0===a)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if("string"!=typeof(r=false===a.existsFileInVFS(i.postScriptName)?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");!function(n,r){r=/^\x00\x01\x00\x00/.test(r)?e(r):e(f(r)),n.metadata=t.API.TTFFont.open(r),n.metadata.Unicode=n.metadata.Unicode||{encoding:{},kerning:{},widths:[]},n.metadata.glyIdsUsed=[0];}(i,r);}}]);}(E),E.API.addSvgAsImage=function(t,e,n,r,a,s,u,c){if(isNaN(e)||isNaN(n))throw o.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(a))throw o.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=r,l.height=a;var h=l.getContext("2d");h.fillStyle="#fff",h.fillRect(0,0,l.width,l.height);var f={ignoreMouse:true,ignoreAnimation:true,ignoreDimensions:true},d=this;return (i.canvg?Promise.resolve(i.canvg):Promise.resolve().then(function () { return require('./index-DLWPfXe-.js'); }).then(function (n) { return n.index; })).catch(function(t){return Promise.reject(new Error("Could not load canvg: "+t))}).then(function(t){return t.default?t.default:t}).then(function(e){return e.fromString(h,t,f)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(t){return t.render(f)}).then(function(){d.addImage(l.toDataURL("image/jpeg",1),e,n,r,a,u,c);})},E.API.putTotalPages=function(t){var e,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),n=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(e,n);return this},E.API.viewerPreferences=function(e,n){var r;e=e||{},n=n||false;var i,a,o,s={HideToolbar:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},HideMenubar:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},HideWindowUI:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},FitWindow:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},CenterWindow:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.3},DisplayDocTitle:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:false,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:false,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:false,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:false,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:false,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:false,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:false,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:false,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:false,value:false,type:"boolean",explicitSet:false,valueSet:[true,false],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:false,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:false,valueSet:null,pdfVersion:1.7}},u=Object.keys(s),c=[],l=0,h=0,f=0;function d(t,e){var n,r=false;for(n=0;n<t.length;n+=1)t[n]===e&&(r=true);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=false),r=this.internal.viewerpreferences.configuration,"reset"===e||true===n){var p=u.length;for(f=0;f<p;f+=1)r[u[f]].value=r[u[f]].defaultValue,r[u[f]].explicitSet=false;}if("object"===_typeof(e))for(a in e)if(o=e[a],d(u,a)&&void 0!==o){if("boolean"===r[a].type&&"boolean"==typeof o)r[a].value=o;else if("name"===r[a].type&&d(r[a].valueSet,o))r[a].value=o;else if("integer"===r[a].type&&Number.isInteger(o))r[a].value=o;else if("array"===r[a].type){for(l=0;l<o.length;l+=1)if(i=true,1===o[l].length&&"number"==typeof o[l][0])c.push(String(o[l]-1));else if(o[l].length>1){for(h=0;h<o[l].length;h+=1)"number"!=typeof o[l][h]&&(i=false);true===i&&c.push([o[l][0]-1,o[l][1]-1].join(" "));}r[a].value="["+c.join(" ")+"]";}else r[a].value=r[a].defaultValue;r[a].explicitSet=true;}return false===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){var t,e=[];for(t in r) true===r[t].explicitSet&&("name"===r[t].type?e.push("/"+t+" /"+r[t].value):e.push("/"+t+" "+r[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");}),this.internal.viewerpreferences.isSubscribed=true),this.internal.viewerpreferences.configuration=r,this},
|
|
5627
5627
|
/** ====================================================================
|
|
5628
5628
|
* @license
|
|
5629
5629
|
* jsPDF XMP metadata plugin
|
|
@@ -5690,6 +5690,6 @@ exports._typeof = _typeof;
|
|
|
5690
5690
|
exports._unsupportedIterableToArray = _unsupportedIterableToArray;
|
|
5691
5691
|
exports.jspdf_es_min = jspdf_es_min;
|
|
5692
5692
|
exports.slicedToArray = slicedToArray;
|
|
5693
|
-
//# sourceMappingURL=jspdf.es.min-
|
|
5693
|
+
//# sourceMappingURL=jspdf.es.min-BoQioi3m.js.map
|
|
5694
5694
|
|
|
5695
|
-
//# sourceMappingURL=jspdf.es.min-
|
|
5695
|
+
//# sourceMappingURL=jspdf.es.min-BoQioi3m.js.map
|