@unotest/viewer 0.21.0 → 0.23.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.
@@ -1 +1 @@
1
- const _0x548d9c=_0x3dca;(function(_0x480a9a,_0xff6fde){const _0x1ed58a={_0x22a484:0x1c5,_0x5dbfe1:0x1e2,_0x3f5ffd:0x1cc,_0x4426d5:0x1d4,_0x8dd02e:0x1dd},_0x92af01=_0x3dca,_0x4bcffd=_0x480a9a();while(!![]){try{const _0x57d589=parseInt(_0x92af01(0x1d9))/0x1*(-parseInt(_0x92af01(_0x1ed58a._0x22a484))/0x2)+parseInt(_0x92af01(_0x1ed58a._0x5dbfe1))/0x3*(parseInt(_0x92af01(0x1dc))/0x4)+parseInt(_0x92af01(0x1ce))/0x5+parseInt(_0x92af01(_0x1ed58a._0x3f5ffd))/0x6*(parseInt(_0x92af01(_0x1ed58a._0x4426d5))/0x7)+-parseInt(_0x92af01(0x1cb))/0x8*(parseInt(_0x92af01(_0x1ed58a._0x8dd02e))/0x9)+parseInt(_0x92af01(0x1d7))/0xa+parseInt(_0x92af01(0x1d2))/0xb*(-parseInt(_0x92af01(0x1e1))/0xc);if(_0x57d589===_0xff6fde)break;else _0x4bcffd['push'](_0x4bcffd['shift']());}catch(_0xf7e95a){_0x4bcffd['push'](_0x4bcffd['shift']());}}}(_0x1303,0x3146f));var __defProp=Object[_0x548d9c(0x1cf)],__name=(_0x11498e,_0x427a01)=>__defProp(_0x11498e,_0x548d9c(0x1df),{'value':_0x427a01,'configurable':!![]}),FULL_CAPABILITIES={'canRun':!![],'canEditFiles':!![],'canTerminal':!![],'canBrowseFs':!![]},STANDALONE_SESSION={'capabilities':FULL_CAPABILITIES,'identity':null},VIEWER_SESSION_HEADER=_0x548d9c(0x1c8);function encodeViewerSession(_0x4a19fd){const _0x51ee89={_0xdc1419:0x1c9,_0x4084d7:0x1d1},_0x8d3ac5=_0x548d9c;return Buffer['from'](JSON[_0x8d3ac5(0x1d5)](_0x4a19fd),_0x8d3ac5(0x1c7))[_0x8d3ac5(_0x51ee89._0xdc1419)](_0x8d3ac5(_0x51ee89._0x4084d7));}__name(encodeViewerSession,_0x548d9c(0x1cd));function _0x1303(){const _0x28fe82=['CMvHzenHCgfIAwXPDgLLCW','C3rYAw5N','mtjZveD3wgm','owDTD0TxCW','y2fUqNjVD3nLrNm','BMfTzq','B2jQzwn0','ntiWmZjLEM1lwgS','mZa0oda5Ag5AqNrW','mtmYEhvHvwHd','Bg9NB3v0vxjS','DxrMoa','Ec11BM90zxn0lxzPzxDLCI1ZzxnZAw9U','Dg9tDhjPBMC','CMvHzeLKzw50Axr5','mteXmZeYofbKwg1wva','mtCYmdyYyvn2Bej6','zw5JB2rLvMLLD2vYu2vZC2LVBG','nJq3odu1Ce9Yrhfc','zgvMAw5LuhjVCgvYDhK','zw52','yMfZzty0DxjS','otC5CLPLCwLW','CgfYC2u','mtrIqwDrs2O','C3rYAw5NAwz5','zMXHzW','mZq5nZKYmgrUvxfkDW','zgvJB2rLvMLLD2vYu2vZC2LVBG','mtCZn25cwM1xvW'];_0x1303=function(){return _0x28fe82;};return _0x1303();}function decodeViewerSession(_0x28037f){const _0x463587={_0x188fef:0x1c9},_0x4fbc1d=_0x548d9c;if(_0x28037f===void 0x0||_0x28037f==='')return null;let _0x27423a;try{_0x27423a=JSON[_0x4fbc1d(0x1d3)](Buffer['from'](_0x28037f,'base64url')[_0x4fbc1d(_0x463587._0x188fef)](_0x4fbc1d(0x1c7)));}catch{return null;}if(typeof _0x27423a!==_0x4fbc1d(0x1e0)||_0x27423a===null)return null;const {capabilities:_0x1da200,identity:_0x568557}=_0x27423a,_0x3e552e=readCapabilities(_0x1da200);if(_0x3e552e===null)return null;return{'capabilities':_0x3e552e,'identity':readIdentity(_0x568557)};}__name(decodeViewerSession,_0x548d9c(0x1d8));function _0x3dca(_0x2c2b70,_0x3c5d9e){_0x2c2b70=_0x2c2b70-0x1c5;const _0x1303c6=_0x1303();let _0x3dcac4=_0x1303c6[_0x2c2b70];if(_0x3dca['UDwCgp']===undefined){var _0x4e2cca=function(_0x25632a){const _0x3a1b4c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x11498e='',_0x427a01='';for(let _0x4a19fd=0x0,_0x28037f,_0x27423a,_0x1da200=0x0;_0x27423a=_0x25632a['charAt'](_0x1da200++);~_0x27423a&&(_0x28037f=_0x4a19fd%0x4?_0x28037f*0x40+_0x27423a:_0x27423a,_0x4a19fd++%0x4)?_0x11498e+=String['fromCharCode'](0xff&_0x28037f>>(-0x2*_0x4a19fd&0x6)):0x0){_0x27423a=_0x3a1b4c['indexOf'](_0x27423a);}for(let _0x568557=0x0,_0x3e552e=_0x11498e['length'];_0x568557<_0x3e552e;_0x568557++){_0x427a01+='%'+('00'+_0x11498e['charCodeAt'](_0x568557)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x427a01);};_0x3dca['qyvfcj']=_0x4e2cca,_0x3dca['nONUMN']={},_0x3dca['UDwCgp']=!![];}const _0x5e1bfd=_0x1303c6[0x0],_0x45f0e0=_0x2c2b70+_0x5e1bfd,_0x99a0e0=_0x3dca['nONUMN'][_0x45f0e0];return!_0x99a0e0?(_0x3dcac4=_0x3dca['qyvfcj'](_0x3dcac4),_0x3dca['nONUMN'][_0x45f0e0]=_0x3dcac4):_0x3dcac4=_0x99a0e0,_0x3dcac4;}function readCapabilities(_0x3b7ade){const _0xb96442={_0xd74ad4:0x1e0,_0x27f36b:0x1d6,_0x47567d:0x1de},_0x40dfc9=_0x548d9c;if(typeof _0x3b7ade!==_0x40dfc9(_0xb96442._0xd74ad4)||_0x3b7ade===null)return null;const _0xc9c57=_0x3b7ade,_0x15de4c=__name(_0x34d4e1=>_0xc9c57[_0x34d4e1]===!![],_0x40dfc9(_0xb96442._0x27f36b));return{'canRun':_0x15de4c('canRun'),'canEditFiles':_0x15de4c('canEditFiles'),'canTerminal':_0x15de4c('canTerminal'),'canBrowseFs':_0x15de4c(_0x40dfc9(_0xb96442._0x47567d))};}__name(readCapabilities,_0x548d9c(0x1da));function readIdentity(_0x4b9c10){const _0x3c0c6d={_0x7693f9:0x1db,_0x712df4:0x1d0,_0x1732a7:0x1c6,_0x5d5248:0x1db},_0x4181d7=_0x548d9c;if(typeof _0x4b9c10!==_0x4181d7(0x1e0)||_0x4b9c10===null)return null;const _0x50c66f=_0x4b9c10,{user:_0x12bbf9,role:_0x2c6428}=_0x50c66f;if(typeof _0x12bbf9!=='string'||typeof _0x2c6428!=='string')return null;return{'user':_0x12bbf9,'role':_0x2c6428,...typeof _0x50c66f[_0x4181d7(0x1d0)]===_0x4181d7(_0x3c0c6d._0x7693f9)?{'env':_0x50c66f[_0x4181d7(_0x3c0c6d._0x712df4)]}:{},...typeof _0x50c66f[_0x4181d7(_0x3c0c6d._0x1732a7)]===_0x4181d7(_0x3c0c6d._0x5d5248)?{'logoutUrl':_0x50c66f[_0x4181d7(0x1c6)]}:{}};}__name(readIdentity,_0x548d9c(0x1ca));export{FULL_CAPABILITIES,STANDALONE_SESSION,VIEWER_SESSION_HEADER,decodeViewerSession,encodeViewerSession};
1
+ const _0x13c8a7=_0x1dec;(function(_0x30c242,_0x297da6){const _0x1deced={_0x3be67b:0x113,_0x58fcb5:0x11d,_0x56c935:0x111,_0x480c6f:0x10e},_0x5a8f3d=_0x1dec,_0x463e3a=_0x30c242();while(!![]){try{const _0x4257ec=-parseInt(_0x5a8f3d(0x129))/0x1+parseInt(_0x5a8f3d(0x11a))/0x2+parseInt(_0x5a8f3d(_0x1deced._0x3be67b))/0x3*(-parseInt(_0x5a8f3d(_0x1deced._0x58fcb5))/0x4)+parseInt(_0x5a8f3d(0x127))/0x5*(-parseInt(_0x5a8f3d(0x11e))/0x6)+parseInt(_0x5a8f3d(_0x1deced._0x56c935))/0x7+parseInt(_0x5a8f3d(0x116))/0x8*(-parseInt(_0x5a8f3d(0x124))/0x9)+-parseInt(_0x5a8f3d(0x128))/0xa*(-parseInt(_0x5a8f3d(_0x1deced._0x480c6f))/0xb);if(_0x4257ec===_0x297da6)break;else _0x463e3a['push'](_0x463e3a['shift']());}catch(_0x1df8bb){_0x463e3a['push'](_0x463e3a['shift']());}}}(_0x1d9d,0x51e79));var __defProp=Object[_0x13c8a7(0x126)],__name=(_0x279566,_0x4417c5)=>__defProp(_0x279566,'name',{'value':_0x4417c5,'configurable':!![]}),FULL_CAPABILITIES={'canRun':!![],'canEditFiles':!![],'canTerminal':!![],'canBrowseFs':!![]},STANDALONE_SESSION={'capabilities':FULL_CAPABILITIES,'identity':null},VIEWER_SESSION_HEADER=_0x13c8a7(0x115);function encodeViewerSession(_0x1706b0){const _0x4a5043={_0x34ced8:0x121,_0x3cccf8:0x122,_0x564b8b:0x110,_0x5a7b6b:0x114},_0x17f096=_0x13c8a7;return Buffer[_0x17f096(_0x4a5043._0x34ced8)](JSON[_0x17f096(_0x4a5043._0x3cccf8)](_0x1706b0),_0x17f096(_0x4a5043._0x564b8b))[_0x17f096(0x112)](_0x17f096(_0x4a5043._0x5a7b6b));}__name(encodeViewerSession,'encodeViewerSession');function decodeViewerSession(_0x4ae417){const _0x585bc4={_0x560041:0x114,_0x574b1a:0x110,_0x2be030:0x10f},_0x40081a=_0x13c8a7;if(_0x4ae417===void 0x0||_0x4ae417==='')return null;let _0x54a215;try{_0x54a215=JSON[_0x40081a(0x119)](Buffer['from'](_0x4ae417,_0x40081a(_0x585bc4._0x560041))['toString'](_0x40081a(_0x585bc4._0x574b1a)));}catch{return null;}if(typeof _0x54a215!==_0x40081a(_0x585bc4._0x2be030)||_0x54a215===null)return null;const {capabilities:_0x321249,identity:_0x1efeed}=_0x54a215,_0x5af60c=readCapabilities(_0x321249);if(_0x5af60c===null)return null;return{'capabilities':_0x5af60c,'identity':readIdentity(_0x1efeed)};}function _0x1dec(_0x429ab2,_0x1b1f1d){_0x429ab2=_0x429ab2-0x10d;const _0x1d9d98=_0x1d9d();let _0x1decd6=_0x1d9d98[_0x429ab2];if(_0x1dec['wIgtfu']===undefined){var _0x448394=function(_0x5b261a){const _0x20858a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x279566='',_0x4417c5='';for(let _0x1706b0=0x0,_0x4ae417,_0x54a215,_0x321249=0x0;_0x54a215=_0x5b261a['charAt'](_0x321249++);~_0x54a215&&(_0x4ae417=_0x1706b0%0x4?_0x4ae417*0x40+_0x54a215:_0x54a215,_0x1706b0++%0x4)?_0x279566+=String['fromCharCode'](0xff&_0x4ae417>>(-0x2*_0x1706b0&0x6)):0x0){_0x54a215=_0x20858a['indexOf'](_0x54a215);}for(let _0x1efeed=0x0,_0x5af60c=_0x279566['length'];_0x1efeed<_0x5af60c;_0x1efeed++){_0x4417c5+='%'+('00'+_0x279566['charCodeAt'](_0x1efeed)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4417c5);};_0x1dec['UmxXTy']=_0x448394,_0x1dec['NqlkMv']={},_0x1dec['wIgtfu']=!![];}const _0x2e2c86=_0x1d9d98[0x0],_0x1e54a2=_0x429ab2+_0x2e2c86,_0x15fd5b=_0x1dec['NqlkMv'][_0x1e54a2];return!_0x15fd5b?(_0x1decd6=_0x1dec['UmxXTy'](_0x1decd6),_0x1dec['NqlkMv'][_0x1e54a2]=_0x1decd6):_0x1decd6=_0x15fd5b,_0x1decd6;}__name(decodeViewerSession,_0x13c8a7(0x11f));function readCapabilities(_0x2b40ab){const _0x4a3c65={_0x4234de:0x11c},_0x4b1158=_0x13c8a7;if(typeof _0x2b40ab!==_0x4b1158(0x10f)||_0x2b40ab===null)return null;const _0x51cd9c=_0x2b40ab,_0x1cac5e=__name(_0x23fbe9=>_0x51cd9c[_0x23fbe9]===!![],_0x4b1158(0x125));return{'canRun':_0x1cac5e(_0x4b1158(0x123)),'canEditFiles':_0x1cac5e('canEditFiles'),'canTerminal':_0x1cac5e(_0x4b1158(0x10d)),'canBrowseFs':_0x1cac5e(_0x4b1158(_0x4a3c65._0x4234de))};}function _0x1d9d(){const _0x15e55f=['zgvJB2rLvMLLD2vYu2vZC2LVBG','CMvHzenHCgfIAwXPDgLLCW','zNjVBq','C3rYAw5NAwz5','y2fUuNvU','ovbswwjHEG','zMXHzW','zgvMAw5LuhjVCgvYDhK','mJm1ALjwuwDi','odiWDMfOBwPK','ntG4nda0r3H1A256','y2fUvgvYBwLUywW','mJe2otuZEMrcAwLS','B2jQzwn0','DxrMoa','mJuXotm0mNvTuvbvCq','Dg9tDhjPBMC','mta0mtCYmhL1BNjbqG','yMfZzty0DxjS','Ec11BM90zxn0lxzPzxDLCI1ZzxnZAw9U','mta3mta1nNLmwfbwsq','Bg9NB3v0vxjS','C3rYAw5N','CgfYC2u','mte5mJCYDMPdDhHc','zw52','y2fUqNjVD3nLrNm','nevztK1wAa','oda2ntH0uMX2u1C'];_0x1d9d=function(){return _0x15e55f;};return _0x1d9d();}__name(readCapabilities,_0x13c8a7(0x120));function readIdentity(_0x391cb2){const _0x2ea1f2={_0x1514d7:0x118,_0x6558fa:0x117},_0x253794=_0x13c8a7;if(typeof _0x391cb2!=='object'||_0x391cb2===null)return null;const _0x14d93a=_0x391cb2,{user:_0x3b0e03,role:_0x4c66aa}=_0x14d93a;if(typeof _0x3b0e03!==_0x253794(0x118)||typeof _0x4c66aa!==_0x253794(_0x2ea1f2._0x1514d7))return null;return{'user':_0x3b0e03,'role':_0x4c66aa,...typeof _0x14d93a[_0x253794(0x11b)]===_0x253794(_0x2ea1f2._0x1514d7)?{'env':_0x14d93a['env']}:{},...typeof _0x14d93a[_0x253794(_0x2ea1f2._0x6558fa)]===_0x253794(0x118)?{'logoutUrl':_0x14d93a[_0x253794(0x117)]}:{}};}__name(readIdentity,'readIdentity');export{FULL_CAPABILITIES,STANDALONE_SESSION,VIEWER_SESSION_HEADER,decodeViewerSession,encodeViewerSession};