@univer-cli/unit-pdf-printer 1.5.2 → 1.6.0

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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- const _0x2b9a6b=_0x54fe;(function(_0x16a256,_0xd5a21d){const _0x349803=_0x54fe,_0x3b3370=_0x16a256();while(!![]){try{const _0x5c3863=-parseInt(_0x349803(0x1d5))/0x1+parseInt(_0x349803(0x1d6))/0x2+parseInt(_0x349803(0x1cb))/0x3+-parseInt(_0x349803(0x1e7))/0x4+-parseInt(_0x349803(0x1cc))/0x5+parseInt(_0x349803(0x1e1))/0x6+-parseInt(_0x349803(0x1e6))/0x7*(-parseInt(_0x349803(0x1e3))/0x8);if(_0x5c3863===_0xd5a21d)break;else _0x3b3370['push'](_0x3b3370['shift']());}catch(_0x10db74){_0x3b3370['push'](_0x3b3370['shift']());}}}(_0x1424,0x59861));var e=class extends Error{[_0x2b9a6b(0x1e0)];constructor(_0x1fd0da,_0x5a4f98){const _0x408a5c=_0x2b9a6b;super(_0x5a4f98),this[_0x408a5c(0x1d2)]=_0x408a5c(0x1df),this[_0x408a5c(0x1e0)]=_0x1fd0da;}};function t(_0x44e2c5){return _0x44e2c5 instanceof e;}function _0x54fe(_0x4293b1,_0x341285){_0x4293b1=_0x4293b1-0x1c8;const _0x142434=_0x1424();let _0x54fe1f=_0x142434[_0x4293b1];return _0x54fe1f;}function _0x1424(){const _0x542170=['3646744MoWuGG','bytes','render\x20runtime\x20returned\x20invalid\x20PDF\x20bytes','7oyomyg','1319164fxEytY','isSafeInteger','length','operation\x20aborted','maxPages\x20must\x20be\x20a\x20positive\x20integer','maxPages','pageCount','fromCharCode','286998eLSWmk','333945IlVjiB','signal','\x20pages,\x20over\x20the\x20','INVALID_INPUT','.pdf','aborted','name','unit','unitData','504030ZLGkxc','100494fwLinZ','replaceAll','\x20page\x20limit','trim','unitData.id\x20is\x20required','string','reason','%PDF-','unitType','UnitPdfPrinterError','code','3993258fWOZSL','runtime'];_0x1424=function(){return _0x542170;};return _0x1424();}var n=0x3e8;function r(_0x186c08){const _0x388d11=_0x2b9a6b;let _0x29bea0=_0x186c08[_0x388d11(0x1c8)]??n;if(!Number[_0x388d11(0x1e8)](_0x29bea0)||_0x29bea0<0x1)throw new e('INVALID_INPUT',_0x388d11(0x1eb));return{async 'print'(_0x3be3d1){const _0x425227=_0x388d11;c(_0x3be3d1[_0x425227(0x1cd)]);let _0x1b5d79=i(_0x3be3d1[_0x425227(0x1d4)]),_0x19b318=await _0x186c08[_0x425227(0x1e2)]['printPdf'](_0x3be3d1);if(c(_0x3be3d1[_0x425227(0x1cd)]),_0x19b318[_0x425227(0x1c9)]>_0x29bea0)throw new e(_0x425227(0x1cf),'print\x20produced\x20'+_0x19b318[_0x425227(0x1c9)]+_0x425227(0x1ce)+_0x29bea0+_0x425227(0x1d8));if(!s(_0x19b318[_0x425227(0x1e4)]))throw new e(_0x425227(0x1cf),_0x425227(0x1e5));return{'bytes':_0x19b318['bytes'],'mediaType':'application/pdf','name':o(a(_0x3be3d1[_0x425227(0x1d4)])??_0x1b5d79)+_0x425227(0x1d0),'pageCount':_0x19b318[_0x425227(0x1c9)],'unitId':_0x1b5d79,'unitType':_0x3be3d1[_0x425227(0x1de)]};}};}function i(_0x277964){const _0x35db1f=_0x2b9a6b;if(typeof _0x277964['id']!='string'||_0x277964['id']['length']===0x0)throw new e(_0x35db1f(0x1cf),_0x35db1f(0x1da));return _0x277964['id'];}function a(_0x8c1026){const _0x120c20=_0x2b9a6b;let _0x314d9b=_0x8c1026[_0x120c20(0x1d2)];return typeof _0x314d9b==_0x120c20(0x1db)&&_0x314d9b[_0x120c20(0x1d9)]()['length']>0x0?_0x314d9b[_0x120c20(0x1d9)]():void 0x0;}function o(_0x4b6f8a){const _0x42b7fb=_0x2b9a6b;let _0x3cadab=_0x4b6f8a[_0x42b7fb(0x1d7)](/[\\/:*?"<>|]/gu,'-')[_0x42b7fb(0x1d9)]();return _0x3cadab[_0x42b7fb(0x1e9)]>0x0?_0x3cadab:_0x42b7fb(0x1d3);}function s(_0x356f73){const _0x2b85d8=_0x2b9a6b;return _0x356f73['length']>=0x5&&String[_0x2b85d8(0x1ca)](..._0x356f73['subarray'](0x0,0x5))===_0x2b85d8(0x1dd);}function c(_0x4566be){const _0x52e2df=_0x2b9a6b;if(_0x4566be?.[_0x52e2df(0x1d1)]===!0x0)throw _0x4566be[_0x52e2df(0x1dc)]instanceof Error?_0x4566be[_0x52e2df(0x1dc)]:Error(_0x52e2df(0x1ea));}export{e as UnitPdfPrinterError,r as createUnitPdfPrinter,t as isUnitPdfPrinterError};
1
+ function _0x5222(){const _0x39c4e1=['print\x20produced\x20','unitData','code','printPdf','\x20page\x20limit','96753rhDTDR','89154SPZnGt','replaceAll','render\x20runtime\x20returned\x20invalid\x20PDF\x20bytes','.pdf','788938gtcnwh','1764792GEKXNV','maxPages\x20must\x20be\x20a\x20positive\x20integer','UnitPdfPrinterError','pageCount','536ajJPPu','8746311HdyDFR','28rPyMML','string','unit','name','INVALID_INPUT','36358610nOdozR','aborted','11418ACyFic','%PDF-','2315IZLVab','subarray','bytes','reason','signal','trim','length'];_0x5222=function(){return _0x39c4e1;};return _0x5222();}(function(_0x19f965,_0x56a81d){const _0x77cd93=_0x13f7,_0x2f775e=_0x19f965();while(!![]){try{const _0x31f8be=-parseInt(_0x77cd93(0x1ee))/0x1+parseInt(_0x77cd93(0x1ef))/0x2+parseInt(_0x77cd93(0x1e9))/0x3*(-parseInt(_0x77cd93(0x1f5))/0x4)+parseInt(_0x77cd93(0x1fe))/0x5*(-parseInt(_0x77cd93(0x1fc))/0x6)+-parseInt(_0x77cd93(0x1f4))/0x7+-parseInt(_0x77cd93(0x1f3))/0x8*(parseInt(_0x77cd93(0x1ea))/0x9)+parseInt(_0x77cd93(0x1fa))/0xa;if(_0x31f8be===_0x56a81d)break;else _0x2f775e['push'](_0x2f775e['shift']());}catch(_0x177cda){_0x2f775e['push'](_0x2f775e['shift']());}}}(_0x5222,0xad2b2));var e=class extends Error{['code'];constructor(_0x4779f3,_0x2e14d9){const _0xfbc054=_0x13f7;super(_0x2e14d9),this[_0xfbc054(0x1f8)]=_0xfbc054(0x1f1),this[_0xfbc054(0x207)]=_0x4779f3;}};function t(_0x460083){return _0x460083 instanceof e;}function _0x13f7(_0x369f08,_0x37a029){_0x369f08=_0x369f08-0x1e9;const _0x522252=_0x5222();let _0x13f7ea=_0x522252[_0x369f08];return _0x13f7ea;}var n=0x3e8;function r(_0x1aa38c){const _0x1b7bd5=_0x13f7;let _0x4273c0=_0x1aa38c['maxPages']??n;if(!Number['isSafeInteger'](_0x4273c0)||_0x4273c0<0x1)throw new e(_0x1b7bd5(0x1f9),_0x1b7bd5(0x1f0));return{async 'print'(_0x245ba7){const _0x264494=_0x1b7bd5;c(_0x245ba7[_0x264494(0x202)]);let _0x556f1d=i(_0x245ba7[_0x264494(0x206)]),_0x1b3b06=await _0x1aa38c['runtime'][_0x264494(0x208)](_0x245ba7);if(c(_0x245ba7[_0x264494(0x202)]),_0x1b3b06[_0x264494(0x1f2)]>_0x4273c0)throw new e('INVALID_INPUT',_0x264494(0x205)+_0x1b3b06[_0x264494(0x1f2)]+'\x20pages,\x20over\x20the\x20'+_0x4273c0+_0x264494(0x209));if(!s(_0x1b3b06['bytes']))throw new e('INVALID_INPUT',_0x264494(0x1ec));return{'bytes':_0x1b3b06[_0x264494(0x200)],'mediaType':'application/pdf','name':o(a(_0x245ba7[_0x264494(0x206)])??_0x556f1d)+_0x264494(0x1ed),'pageCount':_0x1b3b06[_0x264494(0x1f2)],'unitId':_0x556f1d,'unitType':_0x245ba7['unitType']};}};}function i(_0x1a4020){const _0x23e41e=_0x13f7;if(typeof _0x1a4020['id']!='string'||_0x1a4020['id'][_0x23e41e(0x204)]===0x0)throw new e(_0x23e41e(0x1f9),'unitData.id\x20is\x20required');return _0x1a4020['id'];}function a(_0x23fc57){const _0x4b434a=_0x13f7;let _0x52cdd0=_0x23fc57[_0x4b434a(0x1f8)];return typeof _0x52cdd0==_0x4b434a(0x1f6)&&_0x52cdd0[_0x4b434a(0x203)]()[_0x4b434a(0x204)]>0x0?_0x52cdd0['trim']():void 0x0;}function o(_0x389868){const _0x432ad2=_0x13f7;let _0x3a4195=_0x389868[_0x432ad2(0x1eb)](/[\\/:*?"<>|]/gu,'-')[_0x432ad2(0x203)]();return _0x3a4195[_0x432ad2(0x204)]>0x0?_0x3a4195:_0x432ad2(0x1f7);}function s(_0x1e8016){const _0x8b3249=_0x13f7;return _0x1e8016[_0x8b3249(0x204)]>=0x5&&String['fromCharCode'](..._0x1e8016[_0x8b3249(0x1ff)](0x0,0x5))===_0x8b3249(0x1fd);}function c(_0x1d3a57){const _0x22e669=_0x13f7;if(_0x1d3a57?.[_0x22e669(0x1fb)]===!0x0)throw _0x1d3a57['reason']instanceof Error?_0x1d3a57[_0x22e669(0x201)]:Error('operation\x20aborted');}export{e as UnitPdfPrinterError,r as createUnitPdfPrinter,t as isUnitPdfPrinterError};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@univer-cli/unit-pdf-printer",
3
3
  "description": "Print materialized Univer Units to PDF through the browser render runtime.",
4
4
  "type": "module",
5
- "version": "1.5.2",
5
+ "version": "1.6.0",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.mjs",
8
8
  "types": "./dist/index.d.ts",
@@ -19,6 +19,6 @@
19
19
  "README.zh-CN.md"
20
20
  ],
21
21
  "dependencies": {
22
- "@univer-cli/univer-render-runtime": "1.5.2"
22
+ "@univer-cli/univer-render-runtime": "1.6.0"
23
23
  }
24
24
  }