@unotest/viewer 0.18.0 → 0.19.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 _0x3ae841=_0x1622;(function(_0x24b256,_0x38c926){const _0xecb98f={_0x59eee3:0xa0,_0x234528:0xa5,_0x3685d3:0x9b},_0x557840=_0x1622,_0xec0e33=_0x24b256();while(!![]){try{const _0x3a78b9=-parseInt(_0x557840(0xb5))/0x1+-parseInt(_0x557840(_0xecb98f._0x59eee3))/0x2*(-parseInt(_0x557840(0xa6))/0x3)+-parseInt(_0x557840(_0xecb98f._0x234528))/0x4+-parseInt(_0x557840(0xb3))/0x5+parseInt(_0x557840(0xac))/0x6+parseInt(_0x557840(0xa8))/0x7+parseInt(_0x557840(_0xecb98f._0x3685d3))/0x8;if(_0x3a78b9===_0x38c926)break;else _0xec0e33['push'](_0xec0e33['shift']());}catch(_0x6d4207){_0xec0e33['push'](_0xec0e33['shift']());}}}(_0x1259,0x6c82c));function _0x1622(_0x164a5e,_0x2376b0){_0x164a5e=_0x164a5e-0x9b;const _0x125944=_0x1259();let _0x1622a4=_0x125944[_0x164a5e];if(_0x1622['pLyjVh']===undefined){var _0x3b2b55=function(_0x1cb79f){const _0x38083b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x42dc13='',_0x5ca15d='';for(let _0x47e85a=0x0,_0x22371c,_0x20c20e,_0x35a07d=0x0;_0x20c20e=_0x1cb79f['charAt'](_0x35a07d++);~_0x20c20e&&(_0x22371c=_0x47e85a%0x4?_0x22371c*0x40+_0x20c20e:_0x20c20e,_0x47e85a++%0x4)?_0x42dc13+=String['fromCharCode'](0xff&_0x22371c>>(-0x2*_0x47e85a&0x6)):0x0){_0x20c20e=_0x38083b['indexOf'](_0x20c20e);}for(let _0x3cc151=0x0,_0x4689b8=_0x42dc13['length'];_0x3cc151<_0x4689b8;_0x3cc151++){_0x5ca15d+='%'+('00'+_0x42dc13['charCodeAt'](_0x3cc151)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5ca15d);};_0x1622['oaHYKl']=_0x3b2b55,_0x1622['AVxBeR']={},_0x1622['pLyjVh']=!![];}const _0x4ff9a9=_0x125944[0x0],_0x24f28b=_0x164a5e+_0x4ff9a9,_0x7d74ce=_0x1622['AVxBeR'][_0x24f28b];return!_0x7d74ce?(_0x1622a4=_0x1622['oaHYKl'](_0x1622a4),_0x1622['AVxBeR'][_0x24f28b]=_0x1622a4):_0x1622a4=_0x7d74ce,_0x1622a4;}var __defProp=Object[_0x3ae841(0xa9)],__name=(_0x42dc13,_0x5ca15d)=>__defProp(_0x42dc13,_0x3ae841(0xad),{'value':_0x5ca15d,'configurable':!![]}),FULL_CAPABILITIES={'canRun':!![],'canEditFiles':!![],'canTerminal':!![],'canBrowseFs':!![]},STANDALONE_SESSION={'capabilities':FULL_CAPABILITIES,'identity':null},VIEWER_SESSION_HEADER=_0x3ae841(0xb2);function encodeViewerSession(_0x47e85a){const _0x144644={_0xca7ef:0x9c},_0x1d7776=_0x3ae841;return Buffer['from'](JSON[_0x1d7776(0xa1)](_0x47e85a),_0x1d7776(_0x144644._0xca7ef))['toString']('base64url');}__name(encodeViewerSession,_0x3ae841(0xa2));function decodeViewerSession(_0x22371c){const _0x26852c={_0x364ce6:0xaf,_0x1caf8c:0xab,_0x431d22:0x9c,_0x42ad1a:0xb4},_0x48bd90=_0x3ae841;if(_0x22371c===void 0x0||_0x22371c==='')return null;let _0x20c20e;try{_0x20c20e=JSON[_0x48bd90(_0x26852c._0x364ce6)](Buffer[_0x48bd90(0xa3)](_0x22371c,'base64url')[_0x48bd90(_0x26852c._0x1caf8c)](_0x48bd90(_0x26852c._0x431d22)));}catch{return null;}if(typeof _0x20c20e!==_0x48bd90(_0x26852c._0x42ad1a)||_0x20c20e===null)return null;const {capabilities:_0x35a07d,identity:_0x3cc151}=_0x20c20e,_0x4689b8=readCapabilities(_0x35a07d);if(_0x4689b8===null)return null;return{'capabilities':_0x4689b8,'identity':readIdentity(_0x3cc151)};}__name(decodeViewerSession,_0x3ae841(0x9f));function _0x1259(){const _0x1065be=['C3rYAw5NAwz5','zw5JB2rLvMLLD2vYu2vZC2LVBG','zNjVBq','y2fUvgvYBwLUywW','mJi3mdy4nffIruvNtq','mtiZnZGWm1nvyNLbsq','C3rYAw5N','mtaWndaWm2rgExbfBa','zgvMAw5LuhjVCgvYDhK','CMvHzeLKzw50Axr5','Dg9tDhjPBMC','otGWmJG2tvfUEMLY','BMfTzq','y2fUrwrPDezPBgvZ','CgfYC2u','zw52','y2fUqNjVD3nLrNm','Ec11BM90zxn0lxzPzxDLCI1ZzxnZAw9U','mJe0mZK3nuftwvntyW','B2jQzwn0','nJK1mZqXwLD1vhbS','mteZmZq4ndHYrfjduMS','DxrMoa','Bg9NB3v0vxjS','zMXHzW','zgvJB2rLvMLLD2vYu2vZC2LVBG','mK5IvevkCW'];_0x1259=function(){return _0x1065be;};return _0x1259();}function readCapabilities(_0x43a3ab){const _0x455bba=_0x3ae841;if(typeof _0x43a3ab!==_0x455bba(0xb4)||_0x43a3ab===null)return null;const _0x369036=_0x43a3ab,_0x142a3a=__name(_0x328e9e=>_0x369036[_0x328e9e]===!![],_0x455bba(0x9e));return{'canRun':_0x142a3a('canRun'),'canEditFiles':_0x142a3a(_0x455bba(0xae)),'canTerminal':_0x142a3a(_0x455bba(0xa4)),'canBrowseFs':_0x142a3a(_0x455bba(0xb1))};}__name(readCapabilities,'readCapabilities');function readIdentity(_0x2dfb0f){const _0x50c842={_0x4f213a:0xa7,_0xcc800e:0xb0},_0x478311=_0x3ae841;if(typeof _0x2dfb0f!==_0x478311(0xb4)||_0x2dfb0f===null)return null;const _0x5a4022=_0x2dfb0f,{user:_0x3aca51,role:_0x7e6b80}=_0x5a4022;if(typeof _0x3aca51!==_0x478311(0xa7)||typeof _0x7e6b80!==_0x478311(_0x50c842._0x4f213a))return null;return{'user':_0x3aca51,'role':_0x7e6b80,...typeof _0x5a4022[_0x478311(_0x50c842._0xcc800e)]==='string'?{'env':_0x5a4022[_0x478311(0xb0)]}:{},...typeof _0x5a4022['logoutUrl']===_0x478311(0xa7)?{'logoutUrl':_0x5a4022[_0x478311(0x9d)]}:{}};}__name(readIdentity,_0x3ae841(0xaa));export{FULL_CAPABILITIES,STANDALONE_SESSION,VIEWER_SESSION_HEADER,decodeViewerSession,encodeViewerSession};
1
+ const _0x23cff9=_0x2627;(function(_0x2c1a97,_0x4ae410){const _0x4b7d2b={_0x598371:0x1f3,_0x390f7e:0x20d,_0x7ecbeb:0x1ff,_0x46ebaa:0x20c},_0x3a7106=_0x2627,_0x555ac5=_0x2c1a97();while(!![]){try{const _0x501c7e=-parseInt(_0x3a7106(0x208))/0x1+-parseInt(_0x3a7106(0x1f1))/0x2+parseInt(_0x3a7106(_0x4b7d2b._0x598371))/0x3+parseInt(_0x3a7106(0x203))/0x4+parseInt(_0x3a7106(0x205))/0x5*(-parseInt(_0x3a7106(_0x4b7d2b._0x390f7e))/0x6)+-parseInt(_0x3a7106(_0x4b7d2b._0x7ecbeb))/0x7*(parseInt(_0x3a7106(0x1f2))/0x8)+parseInt(_0x3a7106(_0x4b7d2b._0x46ebaa))/0x9;if(_0x501c7e===_0x4ae410)break;else _0x555ac5['push'](_0x555ac5['shift']());}catch(_0x472529){_0x555ac5['push'](_0x555ac5['shift']());}}}(_0x2cc6,0xa3ed2));var __defProp=Object[_0x23cff9(0x1f9)],__name=(_0x26e756,_0x1eeafc)=>__defProp(_0x26e756,_0x23cff9(0x1f4),{'value':_0x1eeafc,'configurable':!![]}),FULL_CAPABILITIES={'canRun':!![],'canEditFiles':!![],'canTerminal':!![],'canBrowseFs':!![]},STANDALONE_SESSION={'capabilities':FULL_CAPABILITIES,'identity':null},VIEWER_SESSION_HEADER=_0x23cff9(0x204);function encodeViewerSession(_0xd43048){const _0x537b0d={_0xd94fc:0x1f5,_0x1804f4:0x1fd},_0x478c01=_0x23cff9;return Buffer[_0x478c01(_0x537b0d._0xd94fc)](JSON['stringify'](_0xd43048),_0x478c01(0x202))['toString'](_0x478c01(_0x537b0d._0x1804f4));}function _0x2627(_0x23fac5,_0x478424){_0x23fac5=_0x23fac5-0x1f1;const _0x2cc6f2=_0x2cc6();let _0x2627f2=_0x2cc6f2[_0x23fac5];if(_0x2627['xlgCna']===undefined){var _0x29030f=function(_0x3569ea){const _0x25f0e3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x26e756='',_0x1eeafc='';for(let _0xd43048=0x0,_0x50643b,_0x3840b4,_0x5ba8e2=0x0;_0x3840b4=_0x3569ea['charAt'](_0x5ba8e2++);~_0x3840b4&&(_0x50643b=_0xd43048%0x4?_0x50643b*0x40+_0x3840b4:_0x3840b4,_0xd43048++%0x4)?_0x26e756+=String['fromCharCode'](0xff&_0x50643b>>(-0x2*_0xd43048&0x6)):0x0){_0x3840b4=_0x25f0e3['indexOf'](_0x3840b4);}for(let _0x412a61=0x0,_0x270fa6=_0x26e756['length'];_0x412a61<_0x270fa6;_0x412a61++){_0x1eeafc+='%'+('00'+_0x26e756['charCodeAt'](_0x412a61)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1eeafc);};_0x2627['wmuSIO']=_0x29030f,_0x2627['BFDMPP']={},_0x2627['xlgCna']=!![];}const _0x113b39=_0x2cc6f2[0x0],_0x2c10ee=_0x23fac5+_0x113b39,_0x18a91d=_0x2627['BFDMPP'][_0x2c10ee];return!_0x18a91d?(_0x2627f2=_0x2627['wmuSIO'](_0x2627f2),_0x2627['BFDMPP'][_0x2c10ee]=_0x2627f2):_0x2627f2=_0x18a91d,_0x2627f2;}__name(encodeViewerSession,_0x23cff9(0x1f6));function _0x2cc6(){const _0x3954b4=['C3rYAw5N','nZu0mdrOrwPWy1u','CMvHzenHCgfIAwXPDgLLCW','zMXHzW','DxrMoa','ndCWnJK2ngLpr3PXva','Ec11BM90zxn0lxzPzxDLCI1ZzxnZAw9U','ndm3odKWv3nTqKTk','y2fUqNjVD3nLrNm','y2fUuNvU','mZa1nJm5Ew50EKDM','B2jQzwn0','y2fUvgvYBwLUywW','Dg9tDhjPBMC','ndy3mde4muL3Ag55uW','mZzLzhPmsLm','mteYnJa4nMroCxzgDq','mZyWrNLpqKDx','mJu2nda0nKTXy1bUuG','BMfTzq','zNjVBq','zw5JB2rLvMLLD2vYu2vZC2LVBG','CgfYC2u','zw52','zgvMAw5LuhjVCgvYDhK','Bg9NB3v0vxjS','zgvJB2rLvMLLD2vYu2vZC2LVBG','y2fUrwrPDezPBgvZ','yMfZzty0DxjS'];_0x2cc6=function(){return _0x3954b4;};return _0x2cc6();}function decodeViewerSession(_0x50643b){const _0x32e473={_0x19fac1:0x1f7,_0x1a4e97:0x1fd,_0x1386fc:0x202},_0x152ec1=_0x23cff9;if(_0x50643b===void 0x0||_0x50643b==='')return null;let _0x3840b4;try{_0x3840b4=JSON[_0x152ec1(_0x32e473._0x19fac1)](Buffer['from'](_0x50643b,_0x152ec1(_0x32e473._0x1a4e97))[_0x152ec1(0x20b)](_0x152ec1(_0x32e473._0x1386fc)));}catch{return null;}if(typeof _0x3840b4!=='object'||_0x3840b4===null)return null;const {capabilities:_0x5ba8e2,identity:_0x412a61}=_0x3840b4,_0x270fa6=readCapabilities(_0x5ba8e2);if(_0x270fa6===null)return null;return{'capabilities':_0x270fa6,'identity':readIdentity(_0x412a61)};}__name(decodeViewerSession,_0x23cff9(0x1fb));function readCapabilities(_0x33abfb){const _0x118453={_0x43a661:0x201,_0x49732a:0x207,_0x7d733:0x1fc,_0x48afa5:0x206},_0x5d2060=_0x23cff9;if(typeof _0x33abfb!==_0x5d2060(0x209)||_0x33abfb===null)return null;const _0x5e94d1=_0x33abfb,_0x203125=__name(_0x50db0a=>_0x5e94d1[_0x50db0a]===!![],_0x5d2060(_0x118453._0x43a661));return{'canRun':_0x203125(_0x5d2060(_0x118453._0x49732a)),'canEditFiles':_0x203125(_0x5d2060(_0x118453._0x7d733)),'canTerminal':_0x203125(_0x5d2060(0x20a)),'canBrowseFs':_0x203125(_0x5d2060(_0x118453._0x48afa5))};}__name(readCapabilities,_0x23cff9(0x200));function readIdentity(_0x55071b){const _0x3b6584={_0xde73e2:0x1f8,_0x5ba58c:0x1fa},_0x5e0c5f=_0x23cff9;if(typeof _0x55071b!=='object'||_0x55071b===null)return null;const _0x580d7f=_0x55071b,{user:_0x3c5fed,role:_0x153ad9}=_0x580d7f;if(typeof _0x3c5fed!==_0x5e0c5f(0x1fe)||typeof _0x153ad9!==_0x5e0c5f(0x1fe))return null;return{'user':_0x3c5fed,'role':_0x153ad9,...typeof _0x580d7f[_0x5e0c5f(_0x3b6584._0xde73e2)]===_0x5e0c5f(0x1fe)?{'env':_0x580d7f['env']}:{},...typeof _0x580d7f['logoutUrl']===_0x5e0c5f(0x1fe)?{'logoutUrl':_0x580d7f[_0x5e0c5f(_0x3b6584._0x5ba58c)]}:{}};}__name(readIdentity,'readIdentity');export{FULL_CAPABILITIES,STANDALONE_SESSION,VIEWER_SESSION_HEADER,decodeViewerSession,encodeViewerSession};