@sv-print/plugin-api-image 0.1.1 → 0.1.2

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/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var S=(c,e,x)=>new Promise((n,l)=>{var g=i=>{try{I(x.next(i))}catch(b){l(b)}},p=i=>{try{I(x.throw(i))}catch(b){l(b)}},I=i=>i.done?n(i.value):Promise.resolve(i.value).then(g,p);I((x=x.apply(c,e)).next())});const J=require("html-to-image");function N(c){if(c&&c.__esModule)return c;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const x in c)if(x!=="default"){const n=Object.getOwnPropertyDescriptor(c,x);Object.defineProperty(e,x,n.get?n:{enumerable:!0,get:()=>c[x]})}}return e.default=c,Object.freeze(e)}const $=N(J);(function(c,e){const x=C,n=c();for(;[];)try{if(-parseInt(x(171))/1+parseInt(x(153))/2+-parseInt(x(163))/3+parseInt(x(162))/4*(parseInt(x(209))/5)+parseInt(x(190))/6*(parseInt(x(136))/7)+parseInt(x(141))/8+-parseInt(x(180))/9===e)break;n.push(n.shift())}catch(l){n.push(n.shift())}})(A,126671);function C(c,e){const x=A();return C=function(n,l){return n=n-129,x[n]},C(c,e)}const V=function(c,e){return S(this,null,function*(){const x=C;let n=this,l=globalThis.$.Deferred(),g=!![],p=10,I=(i,b)=>{const u=C,w=Math.floor(i/b*100);console.log(u(137),i,u(159),b),console[u(131)](u(174),w+"%")};if(this[x(167)][x(173)]){let i=globalThis.$[x(191)]({filter:t=>{const a=x;return t.tagName!=a(145)||t[a(170)]==a(145)&&([a(139),a(204),a(146),a(152),a(185),a(156),"svg"].includes(t.src.split(".")[a(151)]().toLowerCase())||t[a(183)]!=t[a(188)]||t.src[a(140)](a(207))>-1&&t[a(183)]!=t[a(188)]||t[a(183)][a(140)](a(133))>-1)},backgroundColor:"#fff"},e||{}),b=yield this[x(142)](c,e);e&&e[x(192)]!=null&&(g=e[x(192)]),e&&e[x(157)]!=null&&(I=e.onProgress),e&&e[x(186)]!=null&&(p=e[x(186)]),globalThis.$(b)[x(198)](x(206),"")[x(198)](x(134),""),this.createTempContainer();let u=this[x(129)]();this[x(138)](b,i),u[x(160)](b[0]);let w=u[x(132)](x(130))[x(173)];globalThis.$(b).css(x(172)),this.loadAllImages(b,function(){const t=x;try{let a=[],U=Math.ceil(w/p),z=w%p;const d=document.createElement("canvas"),q=d.getContext("2d"),D=u[t(206)]()*i[t(189)];for(let v=0;v<U;v++){q.clearRect(0,0,d[t(206)],d.height);const P=v==U-1;let G=0,R=P?z:p;for(let h=0;h<R;h++){q[t(165)](0,0,d.width,d[t(134)]);const r=v*p+h,y=u.find(t(130))[r];globalThis.hinnn[t(197)][t(201)](function(M){const _=t;$[_(203)](y,i)[_(166)](function(m){const s=_;let T=m.getContext("2d");T[s(184)]=![];let j=m[s(169)](s(195),i[s(196)]||.92),o=new Image;o.src=j,o[s(193)]=function(){const f=s;h===0&&(d[f(206)]=D,d.height=o[f(134)]*R),G+=o[f(134)],q[f(194)](o,0,G-o[f(134)],D,o[f(134)]),I(r+1,w),M()}})})}globalThis[t(202)][t(197)][t(201)](function(h){const r=t;let y=i.type||r(195),M=i[r(161)]||r(149),_=i[r(196)]||.8;if(g){let m=d[r(169)](y,_),s=new Image;s.src=m,s.onload=function(){const T=r;a[T(177)]({url:m,start:v*p+1,end:v*p+R}),P&&(globalThis[T(202)].queue.clear(),n[T(176)](),a.forEach(j=>{const o=T;let f=document[o(208)]("a"),k=e[o(168)]||o(175);k.indexOf(".")==-1&&(k+=".jpg");let L=k[o(164)](".")[o(151)](),H=k.replace("."+L,"")+"_"+j[o(205)]+"-"+j[o(158)]+"."+L;f[o(179)][o(154)]=o(147),f[o(181)](o(135),H),f.setAttribute(o(143),j[o(149)]),document.body[o(155)](f),f[o(144)](),f.remove()})),h()};return}if(M==r(149)){a[r(177)](d[r(169)](y,_)),P&&(globalThis[r(202)][r(197)][r(182)](),n[r(176)](),l.resolve(a)),h();return}M==r(187)&&d[r(200)](function(m){const s=r;a[s(177)](m),P&&(globalThis[s(202)][s(197)][s(182)](),n[s(176)](),l.resolve(a)),h()},y,_)})}globalThis[t(202)].queue[t(178)]()}catch(a){console[t(148)](t(150)),console[t(131)](a)}})}return l[x(199)]()})};function A(){const c=["onload","drawImage","image/jpeg","quality","queue","css","promise","toBlob","add","hinnn","toCanvas","jpeg","start","width","http","createElement","17845aJMMFM","getTempContainer",".hiprint-printPanel .hiprint-printPaper","log","find","base64","height","download","7nvjuUG","cur","svg2canvas","jpg","indexOf","1382496wmAJVv","getHtml","href","click","IMG","png","none","error","url","toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","pop","gif","15804rtxQjn","display","appendChild","webp","onProgress","end","total","html","toType","148gHZyHi","291942JmkdKg","split","clearRect","then","printPanels","name","toDataURL","tagName","170103UJzqEe","position:fixed","length","toImage percent: ","download.jpg","removeTempContainer","push","run","style","987210lTTdIf","setAttribute","clear","src","imageSmoothingEnabled","bmp","limit","blob","baseURI","pixelRatio","1146066cwCEsY","extend","isDownload"];return A=function(){return c},A()}function E(c,e){var x=O();return E=function(n,l){n=n-313;var g=x[n];return g},E(c,e)}(function(c,e){for(var x=E,n=c();[];)try{var l=-parseInt(x(326))/1+-parseInt(x(318))/2*(parseInt(x(320))/3)+-parseInt(x(319))/4*(-parseInt(x(315))/5)+-parseInt(x(313))/6+-parseInt(x(324))/7+-parseInt(x(314))/8*(-parseInt(x(322))/9)+parseInt(x(327))/10;if(l===e)break;n.push(n.shift())}catch(g){n.push(n.shift())}})(O,130981);function O(){var c=["3505exymMF","0.3.0","defineProperty","10046WLLdyV","108zUjlNU","45GjvuCS","add toImage Api to PrintTemplate","532503BbhERj","newPrintTemplate","1158864uGPodT","add toImage Api","247842GfECTD","6807500veISyt","1189746zLKxMA","16TrvwwC"];return O=function(){return c},O()}function B(c){var e=E;return{name:e(325),description:e(325),hooks:[{hook:e(323),name:e(321),description:"add toImage Api to PrintTemplate",priority:1,run:({template:x,options:n})=>{var l=e;Object[l(317)](x,"toImage",{value:V,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:e(316)}}module.exports=B;
1
+ "use strict";var H=(r,x,e)=>new Promise((a,f)=>{var h=i=>{try{I(e.next(i))}catch(d){f(d)}},u=i=>{try{I(e.throw(i))}catch(d){f(d)}},I=i=>i.done?a(i.value):Promise.resolve(i.value).then(h,u);I((e=e.apply(r,x)).next())});const V=require("html-to-image");function X(r){if(r&&r.__esModule)return r;const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(x,e,a.get?a:{enumerable:!0,get:()=>r[e]})}}return x.default=r,Object.freeze(x)}const $=X(V);function C(r,x){const e=R();return C=function(a,f){return a=a-474,e[a]},C(r,x)}(function(r,x){const e=C,a=r();for(;[];)try{if(parseInt(e(503))/1*(parseInt(e(504))/2)+parseInt(e(555))/3*(-parseInt(e(487))/4)+parseInt(e(535))/5+parseInt(e(526))/6*(-parseInt(e(521))/7)+-parseInt(e(475))/8*(parseInt(e(505))/9)+-parseInt(e(490))/10+-parseInt(e(493))/11*(-parseInt(e(559))/12)===x)break;a.push(a.shift())}catch(f){a.push(a.shift())}})(R,816052);function R(){const r=["position:fixed","then","hinnn","toLowerCase","click","loadAllImages","indexOf","appendChild","jpeg","removeTempContainer","run","html","3441704qtnwHN",".jpg","limit","pop","length","6XyoQTM","includes","end","start","queue","baseURI","http","replace","style","1106880KqPUKf","drawImage","width","onProgress","jpg","height","toImage percent: ","toType","IMG","floor","toDataURL","image/jpeg","clear","download","error","quality","getTempContainer","printPanels","gif","css","361308RsofXq","getHtml","Deferred","ceil","39956604WryTHN","add","log","setAttribute","isDownload","blob","toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","2342960qOtRWn","base64","src","display","bmp","forEach","name","tagName","createElement","getContext","extend","svg","40ZTyEhO","clearRect","resolve","5600870NYRqPE","none","push","11IUEizV","devicePixelRatio","url","onload","total","canvas","remove","find","svg2canvas","download.jpg","38PHPcee","5622CHoDSb","18PuPaoM",".hiprint-printPanel .hiprint-printPaper","split","imageSmoothingEnabled"];return R=function(){return r},R()}const B=function(r,x){return H(this,null,function*(){const e=C;let a=this,f=globalThis.$[e(557)](),h=!![],u=10,I=(i,d)=>{const b=e,y=Math[b(544)](i/d*100);console.log("cur",i,b(497),d),console[b(561)](b(541),y+"%")};if(this[e(552)][e(525)]){let i=globalThis.$[e(485)]({filter:t=>{const n=e;return t[n(482)]!=n(543)||t.tagName==n(543)&&([n(539),n(517),"png",n(553),n(479),"webp",n(486)][n(527)](t[n(477)][n(507)](".").pop()[n(512)]())||t[n(477)]!=t[n(531)]||t.src.indexOf(n(532))>-1&&t[n(477)]!=t[n(531)]||t[n(477)][n(515)](n(476))>-1)},backgroundColor:"#fff"},x||{}),d=yield this[e(556)](r,x);x&&x[e(563)]!=null&&(h=x.isDownload),x&&x[e(538)]!=null&&(I=x[e(538)]),x&&x[e(523)]!=null&&(u=x.limit),globalThis.$(d).css(e(537),"")[e(554)](e(540),""),this.createTempContainer();let b=this[e(551)]();this[e(501)](d,i),b[e(520)](d[0]);let y=b[e(500)](e(506)).length;globalThis.$(d)[e(554)](e(509)),this[e(514)](d,function(){const t=e;try{let n=[],A=Math[t(558)](y/u),L=y%u;const p=document.createElement(t(498)),k=p.getContext("2d"),E=b[t(537)]()*(i.pixelRatio||globalThis[t(494)]);for(let v=0;v<A;v++){k[t(488)](0,0,p[t(537)],p.height);const j=v==A-1;let S=0,N=j?L:u;for(let g=0;g<N;g++){k.clearRect(0,0,p.width,p[t(540)]);const c=v*u+g,w=b[t(500)](t(506))[c];globalThis.hinnn.queue[t(560)](function(q){const T=t;$.toCanvas(w,i)[T(510)](function(_){const s=T;let m=_[s(484)]("2d");m[s(508)]=![];let P=_[s(545)](s(546),i[s(550)]||.92),o=new Image;o[s(477)]=P,o[s(496)]=function(){const l=s;g===0&&(p[l(537)]=E,p[l(540)]=o[l(540)]*N),S+=o[l(540)],k[l(536)](o,0,S-o[l(540)],E,o[l(540)]),I(c+1,y),q()}})})}globalThis[t(511)][t(530)][t(560)](function(g){const c=t;let w=i.type||c(546),q=i[c(542)]||"url",T=i.quality||.8;if(h){let _=p.toDataURL(w,T),s=new Image;s[c(477)]=_,s[c(496)]=function(){const m=c;n[m(492)]({url:_,start:v*u+1,end:v*u+N}),j&&(globalThis[m(511)].queue.clear(),a[m(518)](),n[m(480)](P=>{const o=m;let l=document[o(483)]("a"),O=x[o(481)]||o(502);O.indexOf(".")==-1&&(O+=o(522));let U=O[o(507)](".")[o(524)](),z=O[o(533)]("."+U,"")+"_"+P[o(529)]+"-"+P[o(528)]+"."+U;l[o(534)][o(478)]=o(491),l.setAttribute(o(548),z),l[o(562)]("href",P[o(495)]),document.body[o(516)](l),l[o(513)](),l[o(499)]()})),g()};return}if(q==c(495)){n.push(p.toDataURL(w,T)),j&&(globalThis[c(511)][c(530)][c(547)](),a[c(518)](),f[c(489)](n)),g();return}q==c(564)&&p.toBlob(function(_){const s=c;n[s(492)](_),j&&(globalThis[s(511)].queue[s(547)](),a[s(518)](),f[s(489)](n)),g()},w,T)})}globalThis.hinnn[t(530)][t(519)]()}catch(n){console[t(549)](t(474)),console[t(561)](n)}})}return f.promise()})};(function(r,x){for(var e=M,a=r();[];)try{var f=-parseInt(e(334))/1+-parseInt(e(331))/2*(-parseInt(e(344))/3)+-parseInt(e(338))/4*(parseInt(e(341))/5)+-parseInt(e(332))/6*(-parseInt(e(337))/7)+-parseInt(e(339))/8+-parseInt(e(335))/9+parseInt(e(330))/10*(parseInt(e(336))/11);if(f===x)break;a.push(a.shift())}catch(h){a.push(a.shift())}})(D,181429);function D(){var r=["1295808WtNBbn","add toImage Api","123315SiaLiG","newPrintTemplate","add toImage Api to PrintTemplate","9YVzMTT","10MvYIXj","220664DaJysg","376422ksOobN","0.3.0","53520SAQUct","1388907VBMmzC","3903009xpjZvF","7ssnXvg","32FfDhfS"];return D=function(){return r},D()}function M(r,x){var e=D();return M=function(a,f){a=a-330;var h=e[a];return h},M(r,x)}function W(r){var x=M;return{name:x(340),description:"add toImage Api",hooks:[{hook:x(342),name:x(343),description:x(343),priority:1,run:({template:e,options:a})=>{Object.defineProperty(e,"toImage",{value:B,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:x(333)}}module.exports=W;
package/dist/index.mjs CHANGED
@@ -1,153 +1,152 @@
1
- var J = (i, e, x) => new Promise((n, l) => {
1
+ var L = (s, n, x) => new Promise((o, f) => {
2
2
  var h = (r) => {
3
3
  try {
4
4
  I(x.next(r));
5
- } catch (b) {
6
- l(b);
5
+ } catch (d) {
6
+ f(d);
7
7
  }
8
- }, p = (r) => {
8
+ }, u = (r) => {
9
9
  try {
10
10
  I(x.throw(r));
11
- } catch (b) {
12
- l(b);
11
+ } catch (d) {
12
+ f(d);
13
13
  }
14
- }, I = (r) => r.done ? n(r.value) : Promise.resolve(r.value).then(h, p);
15
- I((x = x.apply(i, e)).next());
14
+ }, I = (r) => r.done ? o(r.value) : Promise.resolve(r.value).then(h, u);
15
+ I((x = x.apply(s, n)).next());
16
16
  });
17
- import * as N from "html-to-image";
18
- (function(i, e) {
19
- const x = j, n = i();
17
+ import * as X from "html-to-image";
18
+ function D(s, n) {
19
+ const x = j();
20
+ return D = function(o, f) {
21
+ return o = o - 474, x[o];
22
+ }, D(s, n);
23
+ }
24
+ (function(s, n) {
25
+ const x = D, o = s();
20
26
  for (; []; )
21
27
  try {
22
- if (-parseInt(x(171)) / 1 + parseInt(x(153)) / 2 + -parseInt(x(163)) / 3 + parseInt(x(162)) / 4 * (parseInt(x(209)) / 5) + parseInt(x(190)) / 6 * (parseInt(x(136)) / 7) + parseInt(x(141)) / 8 + -parseInt(x(180)) / 9 === e)
28
+ if (parseInt(x(503)) / 1 * (parseInt(x(504)) / 2) + parseInt(x(555)) / 3 * (-parseInt(x(487)) / 4) + parseInt(x(535)) / 5 + parseInt(x(526)) / 6 * (-parseInt(x(521)) / 7) + -parseInt(x(475)) / 8 * (parseInt(x(505)) / 9) + -parseInt(x(490)) / 10 + -parseInt(x(493)) / 11 * (-parseInt(x(559)) / 12) === n)
23
29
  break;
24
- n.push(n.shift());
25
- } catch (l) {
26
- n.push(n.shift());
30
+ o.push(o.shift());
31
+ } catch (f) {
32
+ o.push(o.shift());
27
33
  }
28
- })(M, 126671);
29
- function j(i, e) {
30
- const x = M();
31
- return j = function(n, l) {
32
- return n = n - 129, x[n];
33
- }, j(i, e);
34
+ })(j, 816052);
35
+ function j() {
36
+ const s = ["position:fixed", "then", "hinnn", "toLowerCase", "click", "loadAllImages", "indexOf", "appendChild", "jpeg", "removeTempContainer", "run", "html", "3441704qtnwHN", ".jpg", "limit", "pop", "length", "6XyoQTM", "includes", "end", "start", "queue", "baseURI", "http", "replace", "style", "1106880KqPUKf", "drawImage", "width", "onProgress", "jpg", "height", "toImage percent: ", "toType", "IMG", "floor", "toDataURL", "image/jpeg", "clear", "download", "error", "quality", "getTempContainer", "printPanels", "gif", "css", "361308RsofXq", "getHtml", "Deferred", "ceil", "39956604WryTHN", "add", "log", "setAttribute", "isDownload", "blob", "toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ", "2342960qOtRWn", "base64", "src", "display", "bmp", "forEach", "name", "tagName", "createElement", "getContext", "extend", "svg", "40ZTyEhO", "clearRect", "resolve", "5600870NYRqPE", "none", "push", "11IUEizV", "devicePixelRatio", "url", "onload", "total", "canvas", "remove", "find", "svg2canvas", "download.jpg", "38PHPcee", "5622CHoDSb", "18PuPaoM", ".hiprint-printPanel .hiprint-printPaper", "split", "imageSmoothingEnabled"];
37
+ return j = function() {
38
+ return s;
39
+ }, j();
34
40
  }
35
- const O = function(i, e) {
36
- return J(this, null, function* () {
37
- const x = j;
38
- let n = this, l = globalThis.$.Deferred(), h = !![], p = 10, I = (r, b) => {
39
- const u = j, w = Math.floor(r / b * 100);
40
- console.log(u(137), r, u(159), b), console[u(131)](u(174), w + "%");
41
+ const $ = function(s, n) {
42
+ return L(this, null, function* () {
43
+ const x = D;
44
+ let o = this, f = globalThis.$[x(557)](), h = !![], u = 10, I = (r, d) => {
45
+ const b = x, w = Math[b(544)](r / d * 100);
46
+ console.log("cur", r, b(497), d), console[b(561)](b(541), w + "%");
41
47
  };
42
- if (this[x(167)][x(173)]) {
43
- let r = globalThis.$[x(191)]({ filter: (t) => {
44
- const a = x;
45
- return t.tagName != a(145) || t[a(170)] == a(145) && ([a(139), a(204), a(146), a(152), a(185), a(156), "svg"].includes(t.src.split(".")[a(151)]().toLowerCase()) || t[a(183)] != t[a(188)] || t.src[a(140)](a(207)) > -1 && t[a(183)] != t[a(188)] || t[a(183)][a(140)](a(133)) > -1);
46
- }, backgroundColor: "#fff" }, e || {}), b = yield this[x(142)](i, e);
47
- e && e[x(192)] != null && (h = e[x(192)]), e && e[x(157)] != null && (I = e.onProgress), e && e[x(186)] != null && (p = e[x(186)]), globalThis.$(b)[x(198)](x(206), "")[x(198)](x(134), ""), this.createTempContainer();
48
- let u = this[x(129)]();
49
- this[x(138)](b, r), u[x(160)](b[0]);
50
- let w = u[x(132)](x(130))[x(173)];
51
- globalThis.$(b).css(x(172)), this.loadAllImages(b, function() {
48
+ if (this[x(552)][x(525)]) {
49
+ let r = globalThis.$[x(485)]({ filter: (e) => {
52
50
  const t = x;
51
+ return e[t(482)] != t(543) || e.tagName == t(543) && ([t(539), t(517), "png", t(553), t(479), "webp", t(486)][t(527)](e[t(477)][t(507)](".").pop()[t(512)]()) || e[t(477)] != e[t(531)] || e.src.indexOf(t(532)) > -1 && e[t(477)] != e[t(531)] || e[t(477)][t(515)](t(476)) > -1);
52
+ }, backgroundColor: "#fff" }, n || {}), d = yield this[x(556)](s, n);
53
+ n && n[x(563)] != null && (h = n.isDownload), n && n[x(538)] != null && (I = n[x(538)]), n && n[x(523)] != null && (u = n.limit), globalThis.$(d).css(x(537), "")[x(554)](x(540), ""), this.createTempContainer();
54
+ let b = this[x(551)]();
55
+ this[x(501)](d, r), b[x(520)](d[0]);
56
+ let w = b[x(500)](x(506)).length;
57
+ globalThis.$(d)[x(554)](x(509)), this[x(514)](d, function() {
58
+ const e = x;
53
59
  try {
54
- let a = [], G = Math.ceil(w / p), $ = w % p;
55
- const d = document.createElement("canvas"), U = d.getContext("2d"), L = u[t(206)]() * r[t(189)];
56
- for (let v = 0; v < G; v++) {
57
- U.clearRect(0, 0, d[t(206)], d.height);
58
- const P = v == G - 1;
59
- let D = 0, q = P ? $ : p;
60
- for (let g = 0; g < q; g++) {
61
- U[t(165)](0, 0, d.width, d[t(134)]);
62
- const o = v * p + g, y = u.find(t(130))[o];
63
- globalThis.hinnn[t(197)][t(201)](function(A) {
64
- const m = t;
65
- N[m(203)](y, r)[m(166)](function(_) {
66
- const s = m;
67
- let T = _.getContext("2d");
68
- T[s(184)] = ![];
69
- let C = _[s(169)](s(195), r[s(196)] || 0.92), c = new Image();
70
- c.src = C, c[s(193)] = function() {
71
- const f = s;
72
- g === 0 && (d[f(206)] = L, d.height = c[f(134)] * q), D += c[f(134)], U[f(194)](c, 0, D - c[f(134)], L, c[f(134)]), I(o + 1, w), A();
60
+ let t = [], N = Math[e(558)](w / u), S = w % u;
61
+ const p = document.createElement(e(498)), A = p.getContext("2d"), O = b[e(537)]() * (r.pixelRatio || globalThis[e(494)]);
62
+ for (let v = 0; v < N; v++) {
63
+ A[e(488)](0, 0, p[e(537)], p.height);
64
+ const q = v == N - 1;
65
+ let U = 0, E = q ? S : u;
66
+ for (let g = 0; g < E; g++) {
67
+ A.clearRect(0, 0, p.width, p[e(540)]);
68
+ const c = v * u + g, y = b[e(500)](e(506))[c];
69
+ globalThis.hinnn.queue[e(560)](function(C) {
70
+ const T = e;
71
+ X.toCanvas(y, r)[T(510)](function(_) {
72
+ const i = T;
73
+ let m = _[i(484)]("2d");
74
+ m[i(508)] = ![];
75
+ let P = _[i(545)](i(546), r[i(550)] || 0.92), a = new Image();
76
+ a[i(477)] = P, a[i(496)] = function() {
77
+ const l = i;
78
+ g === 0 && (p[l(537)] = O, p[l(540)] = a[l(540)] * E), U += a[l(540)], A[l(536)](a, 0, U - a[l(540)], O, a[l(540)]), I(c + 1, w), C();
73
79
  };
74
80
  });
75
81
  });
76
82
  }
77
- globalThis[t(202)][t(197)][t(201)](function(g) {
78
- const o = t;
79
- let y = r.type || o(195), A = r[o(161)] || o(149), m = r[o(196)] || 0.8;
83
+ globalThis[e(511)][e(530)][e(560)](function(g) {
84
+ const c = e;
85
+ let y = r.type || c(546), C = r[c(542)] || "url", T = r.quality || 0.8;
80
86
  if (h) {
81
- let _ = d[o(169)](y, m), s = new Image();
82
- s.src = _, s.onload = function() {
83
- const T = o;
84
- a[T(177)]({ url: _, start: v * p + 1, end: v * p + q }), P && (globalThis[T(202)].queue.clear(), n[T(176)](), a.forEach((C) => {
85
- const c = T;
86
- let f = document[c(208)]("a"), E = e[c(168)] || c(175);
87
- E.indexOf(".") == -1 && (E += ".jpg");
88
- let H = E[c(164)](".")[c(151)](), z = E.replace("." + H, "") + "_" + C[c(205)] + "-" + C[c(158)] + "." + H;
89
- f[c(179)][c(154)] = c(147), f[c(181)](c(135), z), f.setAttribute(c(143), C[c(149)]), document.body[c(155)](f), f[c(144)](), f.remove();
87
+ let _ = p.toDataURL(y, T), i = new Image();
88
+ i[c(477)] = _, i[c(496)] = function() {
89
+ const m = c;
90
+ t[m(492)]({ url: _, start: v * u + 1, end: v * u + E }), q && (globalThis[m(511)].queue.clear(), o[m(518)](), t[m(480)]((P) => {
91
+ const a = m;
92
+ let l = document[a(483)]("a"), R = n[a(481)] || a(502);
93
+ R.indexOf(".") == -1 && (R += a(522));
94
+ let H = R[a(507)](".")[a(524)](), V = R[a(533)]("." + H, "") + "_" + P[a(529)] + "-" + P[a(528)] + "." + H;
95
+ l[a(534)][a(478)] = a(491), l.setAttribute(a(548), V), l[a(562)]("href", P[a(495)]), document.body[a(516)](l), l[a(513)](), l[a(499)]();
90
96
  })), g();
91
97
  };
92
98
  return;
93
99
  }
94
- if (A == o(149)) {
95
- a[o(177)](d[o(169)](y, m)), P && (globalThis[o(202)][o(197)][o(182)](), n[o(176)](), l.resolve(a)), g();
100
+ if (C == c(495)) {
101
+ t.push(p.toDataURL(y, T)), q && (globalThis[c(511)][c(530)][c(547)](), o[c(518)](), f[c(489)](t)), g();
96
102
  return;
97
103
  }
98
- A == o(187) && d[o(200)](function(_) {
99
- const s = o;
100
- a[s(177)](_), P && (globalThis[s(202)][s(197)][s(182)](), n[s(176)](), l.resolve(a)), g();
101
- }, y, m);
104
+ C == c(564) && p.toBlob(function(_) {
105
+ const i = c;
106
+ t[i(492)](_), q && (globalThis[i(511)].queue[i(547)](), o[i(518)](), f[i(489)](t)), g();
107
+ }, y, T);
102
108
  });
103
109
  }
104
- globalThis[t(202)].queue[t(178)]();
105
- } catch (a) {
106
- console[t(148)](t(150)), console[t(131)](a);
110
+ globalThis.hinnn[e(530)][e(519)]();
111
+ } catch (t) {
112
+ console[e(549)](e(474)), console[e(561)](t);
107
113
  }
108
114
  });
109
115
  }
110
- return l[x(199)]();
116
+ return f.promise();
111
117
  });
112
118
  };
119
+ (function(s, n) {
120
+ for (var x = k, o = s(); []; )
121
+ try {
122
+ var f = -parseInt(x(334)) / 1 + -parseInt(x(331)) / 2 * (-parseInt(x(344)) / 3) + -parseInt(x(338)) / 4 * (parseInt(x(341)) / 5) + -parseInt(x(332)) / 6 * (-parseInt(x(337)) / 7) + -parseInt(x(339)) / 8 + -parseInt(x(335)) / 9 + parseInt(x(330)) / 10 * (parseInt(x(336)) / 11);
123
+ if (f === n)
124
+ break;
125
+ o.push(o.shift());
126
+ } catch (h) {
127
+ o.push(o.shift());
128
+ }
129
+ })(M, 181429);
113
130
  function M() {
114
- const i = ["onload", "drawImage", "image/jpeg", "quality", "queue", "css", "promise", "toBlob", "add", "hinnn", "toCanvas", "jpeg", "start", "width", "http", "createElement", "17845aJMMFM", "getTempContainer", ".hiprint-printPanel .hiprint-printPaper", "log", "find", "base64", "height", "download", "7nvjuUG", "cur", "svg2canvas", "jpg", "indexOf", "1382496wmAJVv", "getHtml", "href", "click", "IMG", "png", "none", "error", "url", "toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ", "pop", "gif", "15804rtxQjn", "display", "appendChild", "webp", "onProgress", "end", "total", "html", "toType", "148gHZyHi", "291942JmkdKg", "split", "clearRect", "then", "printPanels", "name", "toDataURL", "tagName", "170103UJzqEe", "position:fixed", "length", "toImage percent: ", "download.jpg", "removeTempContainer", "push", "run", "style", "987210lTTdIf", "setAttribute", "clear", "src", "imageSmoothingEnabled", "bmp", "limit", "blob", "baseURI", "pixelRatio", "1146066cwCEsY", "extend", "isDownload"];
131
+ var s = ["1295808WtNBbn", "add toImage Api", "123315SiaLiG", "newPrintTemplate", "add toImage Api to PrintTemplate", "9YVzMTT", "10MvYIXj", "220664DaJysg", "376422ksOobN", "0.3.0", "53520SAQUct", "1388907VBMmzC", "3903009xpjZvF", "7ssnXvg", "32FfDhfS"];
115
132
  return M = function() {
116
- return i;
133
+ return s;
117
134
  }, M();
118
135
  }
119
- function k(i, e) {
120
- var x = R();
121
- return k = function(n, l) {
122
- n = n - 313;
123
- var h = x[n];
136
+ function k(s, n) {
137
+ var x = M();
138
+ return k = function(o, f) {
139
+ o = o - 330;
140
+ var h = x[o];
124
141
  return h;
125
- }, k(i, e);
126
- }
127
- (function(i, e) {
128
- for (var x = k, n = i(); []; )
129
- try {
130
- var l = -parseInt(x(326)) / 1 + -parseInt(x(318)) / 2 * (parseInt(x(320)) / 3) + -parseInt(x(319)) / 4 * (-parseInt(x(315)) / 5) + -parseInt(x(313)) / 6 + -parseInt(x(324)) / 7 + -parseInt(x(314)) / 8 * (-parseInt(x(322)) / 9) + parseInt(x(327)) / 10;
131
- if (l === e)
132
- break;
133
- n.push(n.shift());
134
- } catch (h) {
135
- n.push(n.shift());
136
- }
137
- })(R, 130981);
138
- function R() {
139
- var i = ["3505exymMF", "0.3.0", "defineProperty", "10046WLLdyV", "108zUjlNU", "45GjvuCS", "add toImage Api to PrintTemplate", "532503BbhERj", "newPrintTemplate", "1158864uGPodT", "add toImage Api", "247842GfECTD", "6807500veISyt", "1189746zLKxMA", "16TrvwwC"];
140
- return R = function() {
141
- return i;
142
- }, R();
142
+ }, k(s, n);
143
143
  }
144
- function V(i) {
145
- var e = k;
146
- return { name: e(325), description: e(325), hooks: [{ hook: e(323), name: e(321), description: "add toImage Api to PrintTemplate", priority: 1, run: ({ template: x, options: n }) => {
147
- var l = e;
148
- Object[l(317)](x, "toImage", { value: O, enumerable: ![], writable: !![], configurable: !![] });
149
- } }], leastHiprintVersion: e(316) };
144
+ function B(s) {
145
+ var n = k;
146
+ return { name: n(340), description: "add toImage Api", hooks: [{ hook: n(342), name: n(343), description: n(343), priority: 1, run: ({ template: x, options: o }) => {
147
+ Object.defineProperty(x, "toImage", { value: $, enumerable: ![], writable: !![], configurable: !![] });
148
+ } }], leastHiprintVersion: n(333) };
150
149
  }
151
150
  export {
152
- V as default
151
+ B as default
153
152
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(p,_){typeof exports=="object"&&typeof module!="undefined"?module.exports=_(require("html-to-image")):typeof define=="function"&&define.amd?define(["html-to-image"],_):(p=typeof globalThis!="undefined"?globalThis:p||self,p.pluginApiImage=_(p.htmlToImage))})(this,function(p){"use strict";var $=(p,_,w)=>new Promise((I,q)=>{var j=b=>{try{h(w.next(b))}catch(a){q(a)}},C=b=>{try{h(w.throw(b))}catch(a){q(a)}},h=b=>b.done?I(b.value):Promise.resolve(b.value).then(j,C);h((w=w.apply(p,_)).next())});function _(a){if(a&&a.__esModule)return a;const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(x,e,o.get?o:{enumerable:!0,get:()=>a[e]})}}return x.default=a,Object.freeze(x)}const w=_(p);(function(a,x){const e=I,o=a();for(;[];)try{if(-parseInt(e(171))/1+parseInt(e(153))/2+-parseInt(e(163))/3+parseInt(e(162))/4*(parseInt(e(209))/5)+parseInt(e(190))/6*(parseInt(e(136))/7)+parseInt(e(141))/8+-parseInt(e(180))/9===x)break;o.push(o.shift())}catch(l){o.push(o.shift())}})(j,126671);function I(a,x){const e=j();return I=function(o,l){return o=o-129,e[o]},I(a,x)}const q=function(a,x){return $(this,null,function*(){const e=I;let o=this,l=globalThis.$.Deferred(),P=!![],v=10,S=(f,g)=>{const u=I,k=Math.floor(f/g*100);console.log(u(137),f,u(159),g),console[u(131)](u(174),k+"%")};if(this[e(167)][e(173)]){let f=globalThis.$[e(191)]({filter:t=>{const n=e;return t.tagName!=n(145)||t[n(170)]==n(145)&&([n(139),n(204),n(146),n(152),n(185),n(156),"svg"].includes(t.src.split(".")[n(151)]().toLowerCase())||t[n(183)]!=t[n(188)]||t.src[n(140)](n(207))>-1&&t[n(183)]!=t[n(188)]||t[n(183)][n(140)](n(133))>-1)},backgroundColor:"#fff"},x||{}),g=yield this[e(142)](a,x);x&&x[e(192)]!=null&&(P=x[e(192)]),x&&x[e(157)]!=null&&(S=x.onProgress),x&&x[e(186)]!=null&&(v=x[e(186)]),globalThis.$(g)[e(198)](e(206),"")[e(198)](e(134),""),this.createTempContainer();let u=this[e(129)]();this[e(138)](g,f),u[e(160)](g[0]);let k=u[e(132)](e(130))[e(173)];globalThis.$(g).css(e(172)),this.loadAllImages(g,function(){const t=e;try{let n=[],z=Math.ceil(k/v),V=k%v;const d=document.createElement("canvas"),G=d.getContext("2d"),H=u[t(206)]()*f[t(189)];for(let M=0;M<z;M++){G.clearRect(0,0,d[t(206)],d.height);const R=M==z-1;let J=0,L=R?V:v;for(let m=0;m<L;m++){G[t(165)](0,0,d.width,d[t(134)]);const r=M*v+m,E=u.find(t(130))[r];globalThis.hinnn[t(197)][t(201)](function(U){const T=t;w[T(203)](E,f)[T(166)](function(y){const i=T;let A=y.getContext("2d");A[i(184)]=![];let O=y[i(169)](i(195),f[i(196)]||.92),c=new Image;c.src=O,c[i(193)]=function(){const s=i;m===0&&(d[s(206)]=H,d.height=c[s(134)]*L),J+=c[s(134)],G[s(194)](c,0,J-c[s(134)],H,c[s(134)]),S(r+1,k),U()}})})}globalThis[t(202)][t(197)][t(201)](function(m){const r=t;let E=f.type||r(195),U=f[r(161)]||r(149),T=f[r(196)]||.8;if(P){let y=d[r(169)](E,T),i=new Image;i.src=y,i.onload=function(){const A=r;n[A(177)]({url:y,start:M*v+1,end:M*v+L}),R&&(globalThis[A(202)].queue.clear(),o[A(176)](),n.forEach(O=>{const c=A;let s=document[c(208)]("a"),D=x[c(168)]||c(175);D.indexOf(".")==-1&&(D+=".jpg");let N=D[c(164)](".")[c(151)](),B=D.replace("."+N,"")+"_"+O[c(205)]+"-"+O[c(158)]+"."+N;s[c(179)][c(154)]=c(147),s[c(181)](c(135),B),s.setAttribute(c(143),O[c(149)]),document.body[c(155)](s),s[c(144)](),s.remove()})),m()};return}if(U==r(149)){n[r(177)](d[r(169)](E,T)),R&&(globalThis[r(202)][r(197)][r(182)](),o[r(176)](),l.resolve(n)),m();return}U==r(187)&&d[r(200)](function(y){const i=r;n[i(177)](y),R&&(globalThis[i(202)][i(197)][i(182)](),o[i(176)](),l.resolve(n)),m()},E,T)})}globalThis[t(202)].queue[t(178)]()}catch(n){console[t(148)](t(150)),console[t(131)](n)}})}return l[e(199)]()})};function j(){const a=["onload","drawImage","image/jpeg","quality","queue","css","promise","toBlob","add","hinnn","toCanvas","jpeg","start","width","http","createElement","17845aJMMFM","getTempContainer",".hiprint-printPanel .hiprint-printPaper","log","find","base64","height","download","7nvjuUG","cur","svg2canvas","jpg","indexOf","1382496wmAJVv","getHtml","href","click","IMG","png","none","error","url","toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","pop","gif","15804rtxQjn","display","appendChild","webp","onProgress","end","total","html","toType","148gHZyHi","291942JmkdKg","split","clearRect","then","printPanels","name","toDataURL","tagName","170103UJzqEe","position:fixed","length","toImage percent: ","download.jpg","removeTempContainer","push","run","style","987210lTTdIf","setAttribute","clear","src","imageSmoothingEnabled","bmp","limit","blob","baseURI","pixelRatio","1146066cwCEsY","extend","isDownload"];return j=function(){return a},j()}function C(a,x){var e=h();return C=function(o,l){o=o-313;var P=e[o];return P},C(a,x)}(function(a,x){for(var e=C,o=a();[];)try{var l=-parseInt(e(326))/1+-parseInt(e(318))/2*(parseInt(e(320))/3)+-parseInt(e(319))/4*(-parseInt(e(315))/5)+-parseInt(e(313))/6+-parseInt(e(324))/7+-parseInt(e(314))/8*(-parseInt(e(322))/9)+parseInt(e(327))/10;if(l===x)break;o.push(o.shift())}catch(P){o.push(o.shift())}})(h,130981);function h(){var a=["3505exymMF","0.3.0","defineProperty","10046WLLdyV","108zUjlNU","45GjvuCS","add toImage Api to PrintTemplate","532503BbhERj","newPrintTemplate","1158864uGPodT","add toImage Api","247842GfECTD","6807500veISyt","1189746zLKxMA","16TrvwwC"];return h=function(){return a},h()}function b(a){var x=C;return{name:x(325),description:x(325),hooks:[{hook:x(323),name:x(321),description:"add toImage Api to PrintTemplate",priority:1,run:({template:e,options:o})=>{var l=x;Object[l(317)](e,"toImage",{value:q,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:x(316)}}return b});
1
+ (function(b,_){typeof exports=="object"&&typeof module!="undefined"?module.exports=_(require("html-to-image")):typeof define=="function"&&define.amd?define(["html-to-image"],_):(b=typeof globalThis!="undefined"?globalThis:b||self,b.pluginApiImage=_(b.htmlToImage))})(this,function(b){"use strict";var $=(b,_,w)=>new Promise((P,I)=>{var E=d=>{try{h(w.next(d))}catch(a){I(a)}},j=d=>{try{h(w.throw(d))}catch(a){I(a)}},h=d=>d.done?P(d.value):Promise.resolve(d.value).then(E,j);h((w=w.apply(b,_)).next())});function _(a){if(a&&a.__esModule)return a;const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(x,e,i.get?i:{enumerable:!0,get:()=>a[e]})}}return x.default=a,Object.freeze(x)}const w=_(b);function P(a,x){const e=I();return P=function(i,p){return i=i-474,e[i]},P(a,x)}(function(a,x){const e=P,i=a();for(;[];)try{if(parseInt(e(503))/1*(parseInt(e(504))/2)+parseInt(e(555))/3*(-parseInt(e(487))/4)+parseInt(e(535))/5+parseInt(e(526))/6*(-parseInt(e(521))/7)+-parseInt(e(475))/8*(parseInt(e(505))/9)+-parseInt(e(490))/10+-parseInt(e(493))/11*(-parseInt(e(559))/12)===x)break;i.push(i.shift())}catch(p){i.push(i.shift())}})(I,816052);function I(){const a=["position:fixed","then","hinnn","toLowerCase","click","loadAllImages","indexOf","appendChild","jpeg","removeTempContainer","run","html","3441704qtnwHN",".jpg","limit","pop","length","6XyoQTM","includes","end","start","queue","baseURI","http","replace","style","1106880KqPUKf","drawImage","width","onProgress","jpg","height","toImage percent: ","toType","IMG","floor","toDataURL","image/jpeg","clear","download","error","quality","getTempContainer","printPanels","gif","css","361308RsofXq","getHtml","Deferred","ceil","39956604WryTHN","add","log","setAttribute","isDownload","blob","toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","2342960qOtRWn","base64","src","display","bmp","forEach","name","tagName","createElement","getContext","extend","svg","40ZTyEhO","clearRect","resolve","5600870NYRqPE","none","push","11IUEizV","devicePixelRatio","url","onload","total","canvas","remove","find","svg2canvas","download.jpg","38PHPcee","5622CHoDSb","18PuPaoM",".hiprint-printPanel .hiprint-printPaper","split","imageSmoothingEnabled"];return I=function(){return a},I()}const E=function(a,x){return $(this,null,function*(){const e=P;let i=this,p=globalThis.$[e(557)](),q=!![],T=10,H=(f,g)=>{const u=e,R=Math[u(544)](f/g*100);console.log("cur",f,u(497),g),console[u(561)](u(541),R+"%")};if(this[e(552)][e(525)]){let f=globalThis.$[e(485)]({filter:t=>{const n=e;return t[n(482)]!=n(543)||t.tagName==n(543)&&([n(539),n(517),"png",n(553),n(479),"webp",n(486)][n(527)](t[n(477)][n(507)](".").pop()[n(512)]())||t[n(477)]!=t[n(531)]||t.src.indexOf(n(532))>-1&&t[n(477)]!=t[n(531)]||t[n(477)][n(515)](n(476))>-1)},backgroundColor:"#fff"},x||{}),g=yield this[e(556)](a,x);x&&x[e(563)]!=null&&(q=x.isDownload),x&&x[e(538)]!=null&&(H=x[e(538)]),x&&x[e(523)]!=null&&(T=x.limit),globalThis.$(g).css(e(537),"")[e(554)](e(540),""),this.createTempContainer();let u=this[e(551)]();this[e(501)](g,f),u[e(520)](g[0]);let R=u[e(500)](e(506)).length;globalThis.$(g)[e(554)](e(509)),this[e(514)](g,function(){const t=e;try{let n=[],L=Math[t(558)](R/T),B=R%T;const l=document.createElement(t(498)),S=l.getContext("2d"),z=u[t(537)]()*(f.pixelRatio||globalThis[t(494)]);for(let O=0;O<L;O++){S[t(488)](0,0,l[t(537)],l.height);const k=O==L-1;let V=0,U=k?B:T;for(let m=0;m<U;m++){S.clearRect(0,0,l.width,l[t(540)]);const s=O*T+m,D=u[t(500)](t(506))[s];globalThis.hinnn.queue[t(560)](function(A){const C=t;w.toCanvas(D,f)[C(510)](function(v){const r=C;let y=v[r(484)]("2d");y[r(508)]=![];let M=v[r(545)](r(546),f[r(550)]||.92),o=new Image;o[r(477)]=M,o[r(496)]=function(){const c=r;m===0&&(l[c(537)]=z,l[c(540)]=o[c(540)]*U),V+=o[c(540)],S[c(536)](o,0,V-o[c(540)],z,o[c(540)]),H(s+1,R),A()}})})}globalThis[t(511)][t(530)][t(560)](function(m){const s=t;let D=f.type||s(546),A=f[s(542)]||"url",C=f.quality||.8;if(q){let v=l.toDataURL(D,C),r=new Image;r[s(477)]=v,r[s(496)]=function(){const y=s;n[y(492)]({url:v,start:O*T+1,end:O*T+U}),k&&(globalThis[y(511)].queue.clear(),i[y(518)](),n[y(480)](M=>{const o=y;let c=document[o(483)]("a"),N=x[o(481)]||o(502);N.indexOf(".")==-1&&(N+=o(522));let X=N[o(507)](".")[o(524)](),W=N[o(533)]("."+X,"")+"_"+M[o(529)]+"-"+M[o(528)]+"."+X;c[o(534)][o(478)]=o(491),c.setAttribute(o(548),W),c[o(562)]("href",M[o(495)]),document.body[o(516)](c),c[o(513)](),c[o(499)]()})),m()};return}if(A==s(495)){n.push(l.toDataURL(D,C)),k&&(globalThis[s(511)][s(530)][s(547)](),i[s(518)](),p[s(489)](n)),m();return}A==s(564)&&l.toBlob(function(v){const r=s;n[r(492)](v),k&&(globalThis[r(511)].queue[r(547)](),i[r(518)](),p[r(489)](n)),m()},D,C)})}globalThis.hinnn[t(530)][t(519)]()}catch(n){console[t(549)](t(474)),console[t(561)](n)}})}return p.promise()})};(function(a,x){for(var e=h,i=a();[];)try{var p=-parseInt(e(334))/1+-parseInt(e(331))/2*(-parseInt(e(344))/3)+-parseInt(e(338))/4*(parseInt(e(341))/5)+-parseInt(e(332))/6*(-parseInt(e(337))/7)+-parseInt(e(339))/8+-parseInt(e(335))/9+parseInt(e(330))/10*(parseInt(e(336))/11);if(p===x)break;i.push(i.shift())}catch(q){i.push(i.shift())}})(j,181429);function j(){var a=["1295808WtNBbn","add toImage Api","123315SiaLiG","newPrintTemplate","add toImage Api to PrintTemplate","9YVzMTT","10MvYIXj","220664DaJysg","376422ksOobN","0.3.0","53520SAQUct","1388907VBMmzC","3903009xpjZvF","7ssnXvg","32FfDhfS"];return j=function(){return a},j()}function h(a,x){var e=j();return h=function(i,p){i=i-330;var q=e[i];return q},h(a,x)}function d(a){var x=h;return{name:x(340),description:"add toImage Api",hooks:[{hook:x(342),name:x(343),description:x(343),priority:1,run:({template:e,options:i})=>{Object.defineProperty(e,"toImage",{value:E,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:x(333)}}return d});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sv-print/plugin-api-image",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "add image api to print template",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",