@tangle-network/sandbox 0.0.0-develop.20260518222502.7184025 → 0.0.0-develop.20260518230754.e59c65a
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/auth/index.js +1 -1
- package/dist/client-DFFqzEf3.js +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/collaboration-CRyb5e8F.js +1 -1
- package/dist/core.js +1 -1
- package/dist/errors-CljiGR__.js +1 -1
- package/dist/index.js +1 -1
- package/dist/openai/index.js +1 -1
- package/dist/platform-integrations.js +1 -1
- package/dist/sandbox-CHsHtmjx.js +1 -1
- package/dist/session-gateway/index.js +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/tangle-DwLVHGvt.js +1 -1
- package/package.json +1 -1
package/dist/auth/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a0_0x1925d2=a0_0x1d87;(function(_0x3bba96,_0x21d243){const _0x171c71=a0_0x1d87,_0x1890c8=_0x3bba96();while(!![]){try{const _0x4c8fb4=-parseInt(_0x171c71(0x90))/0x1+parseInt(_0x171c71(0xb2))/0x2*(-parseInt(_0x171c71(0x9f))/0x3)+parseInt(_0x171c71(0x77))/0x4*(parseInt(_0x171c71(0xb5))/0x5)+parseInt(_0x171c71(0x88))/0x6+-parseInt(_0x171c71(0x8a))/0x7*(-parseInt(_0x171c71(0xb6))/0x8)+-parseInt(_0x171c71(0x78))/0x9*(parseInt(_0x171c71(0x95))/0xa)+-parseInt(_0x171c71(0xac))/0xb;if(_0x4c8fb4===_0x21d243)break;else _0x1890c8['push'](_0x1890c8['shift']());}catch(_0x436da9){_0x1890c8['push'](_0x1890c8['shift']());}}}(a0_0x29e2,0x6e884));import{createHmac,timingSafeEqual}from'\x6e\x6f\x64\x65\x3a\x63\x72\x79\x70\x74\x6f';function base64UrlEncode(_0x23f5f7){const _0x51eb1d=a0_0x1d87,_0x3c2e25={'\x4d\x45\x54\x52\x58':function(_0x55f451,_0x49af7b){return _0x55f451===_0x49af7b;},'\x62\x69\x48\x65\x73':_0x51eb1d(0xa3)};return(_0x3c2e25[_0x51eb1d(0x76)](typeof _0x23f5f7,_0x3c2e25[_0x51eb1d(0xa5)])?Buffer[_0x51eb1d(0xb7)](_0x23f5f7):_0x23f5f7)[_0x51eb1d(0xb8)](_0x51eb1d(0xa6))['\x72\x65\x70\x6c\x61\x63\x65'](/\+/g,'\x2d')[_0x51eb1d(0x89)](/\//g,'\x5f')['\x72\x65\x70\x6c\x61\x63\x65'](/=+$/,'');}function decodeBase64UrlToBuffer(_0x4865a4){const _0x56c8ee=a0_0x1d87,_0xde03da={'\x52\x63\x67\x56\x64':function(_0x1fcd5d,_0x504930){return _0x1fcd5d+_0x504930;},'\x49\x4a\x69\x6f\x45':function(_0x41d99b,_0x45a30b){return _0x41d99b%_0x45a30b;},'\x62\x4a\x77\x58\x4a':function(_0x29da36,_0x31f46a){return _0x29da36-_0x31f46a;},'\x7a\x58\x6c\x4f\x53':_0x56c8ee(0xa6)};if(!/^[A-Za-z0-9_-]*$/['\x74\x65\x73\x74'](_0x4865a4))return null;const _0x264b62=_0xde03da['\x52\x63\x67\x56\x64'](_0x4865a4,'\x3d'['\x72\x65\x70\x65\x61\x74'](_0xde03da[_0x56c8ee(0x9d)](_0xde03da[_0x56c8ee(0x8e)](0x4,_0x4865a4['\x6c\x65\x6e\x67\x74\x68']%0x4),0x4)));return Buffer['\x66\x72\x6f\x6d'](_0x264b62[_0x56c8ee(0x89)](/-/g,'\x2b')[_0x56c8ee(0x89)](/_/g,'\x2f'),_0xde03da[_0x56c8ee(0x80)]);}function createSignature(_0x4c1997,_0x390051){const _0x22e550=a0_0x1d87;return base64UrlEncode(createHmac(_0x22e550(0xaa),_0x390051)['\x75\x70\x64\x61\x74\x65'](_0x4c1997)[_0x22e550(0x87)]());}const JWT_HEADER=base64UrlEncode(JSON['\x73\x74\x72\x69\x6e\x67\x69\x66\x79']({'\x61\x6c\x67':a0_0x1925d2(0xa2),'\x74\x79\x70':a0_0x1925d2(0x9a)}));function issueToken(_0x41ba43,_0x2ec9b1,_0x448dfc){const _0x47e404=a0_0x1925d2,_0x2cebcf={'\x74\x4a\x74\x64\x77':function(_0x7d2c79,_0x10e49f){return _0x7d2c79*_0x10e49f;},'\x71\x47\x57\x49\x54':function(_0x2f79b0,_0xabbc86){return _0x2f79b0(_0xabbc86);},'\x65\x43\x43\x7a\x76':function(_0x2be4b5,_0x508a4d,_0x6c6449){return _0x2be4b5(_0x508a4d,_0x6c6449);}},_0x1989a6=Math['\x66\x6c\x6f\x6f\x72'](Date['\x6e\x6f\x77']()/0x3e8),_0x3a09ef={..._0x2ec9b1,'\x69\x61\x74':_0x1989a6,'\x65\x78\x70':_0x1989a6+_0x2cebcf[_0x47e404(0x85)](_0x448dfc,0x3c)},_0x3143ce=JWT_HEADER+'\x2e'+_0x2cebcf[_0x47e404(0x99)](base64UrlEncode,JSON[_0x47e404(0x84)](_0x3a09ef));return _0x3143ce+'\x2e'+_0x2cebcf[_0x47e404(0x81)](createSignature,_0x3143ce,_0x41ba43);}function a0_0x29e2(){const _0x35f8ea=['\x7a\x67\x39\x4a\x44\x77\x31\x4c\x42\x4e\x72\x6a\x7a\x61','\x44\x76\x50\x72\x45\x4b\x38','\x42\x4e\x76\x54\x79\x4d\x76\x59','\x6d\x74\x75\x31\x6d\x64\x65\x30\x79\x4c\x7a\x36\x75\x66\x76\x7a','\x74\x30\x31\x6e\x77\x68\x6d','\x45\x78\x6a\x58\x72\x68\x47','\x6d\x4a\x61\x35\x6e\x64\x6d\x5a\x6e\x75\x35\x55\x73\x77\x6a\x6d\x75\x71','\x6d\x5a\x69\x59\x6e\x5a\x47\x32\x6e\x68\x44\x63\x7a\x4b\x58\x30\x44\x71','\x7a\x4e\x6a\x56\x42\x71','\x44\x67\x39\x74\x44\x68\x6a\x50\x42\x4d\x43','\x75\x4e\x7a\x4a\x71\x77\x30','\x74\x75\x76\x75\x75\x4c\x47','\x6f\x68\x6e\x41\x76\x30\x54\x78\x43\x47','\x6f\x77\x31\x41\x42\x67\x44\x53\x79\x47','\x42\x77\x66\x34','\x43\x32\x50\x6c\x45\x78\x43','\x79\x77\x6e\x4a\x7a\x78\x6e\x5a','\x79\x32\x58\x56\x79\x32\x54\x74\x41\x32\x76\x33\x75\x32\x76\x4a\x42\x32\x35\x4b\x43\x57','\x71\x76\x66\x76\x79\x33\x47','\x7a\x4d\x58\x56\x42\x33\x69','\x43\x32\x66\x55\x7a\x67\x6a\x56\x45\x65\x4c\x4b','\x45\x4c\x48\x53\x74\x31\x6d','\x7a\x75\x6e\x64\x45\x4e\x79','\x7a\x32\x76\x30\x76\x68\x72\x53\x74\x77\x4c\x55\x44\x78\x72\x4c\x43\x57','\x43\x32\x76\x5a\x43\x32\x4c\x56\x42\x4b\x4c\x4b','\x43\x33\x72\x59\x41\x77\x35\x4e\x41\x77\x7a\x35','\x44\x65\x50\x30\x7a\x68\x43','\x41\x30\x48\x78\x75\x33\x43','\x7a\x67\x4c\x4e\x7a\x78\x6e\x30','\x6d\x74\x43\x35\x6e\x4a\x79\x30\x6d\x68\x6e\x4d\x72\x32\x76\x31\x44\x47','\x43\x4d\x76\x57\x42\x67\x66\x4a\x7a\x71','\x6d\x74\x72\x5a\x77\x4d\x50\x58\x41\x76\x69','\x79\x77\x58\x4e','\x7a\x4e\x6a\x4c\x7a\x71','\x44\x78\x6e\x4c\x43\x4b\x4c\x4b','\x79\x4b\x50\x33\x77\x65\x4f','\x74\x4e\x4c\x31\x74\x66\x61','\x6e\x64\x47\x30\x6d\x64\x65\x30\x72\x76\x72\x6e\x74\x68\x7a\x6f','\x74\x30\x76\x4e\x72\x77\x4f','\x43\x68\x6a\x56\x41\x4d\x76\x4a\x44\x65\x4c\x4b','\x43\x4d\x76\x57\x7a\x77\x66\x30','\x43\x67\x66\x59\x43\x32\x75','\x6e\x4a\x79\x33\x6d\x5a\x6d\x5a\x6d\x65\x58\x70\x75\x66\x48\x6f\x41\x47','\x44\x68\x72\x53\x74\x77\x4c\x55\x44\x78\x72\x4c\x43\x57','\x43\x68\x6a\x56\x7a\x68\x76\x4a\x44\x65\x4c\x4b','\x43\x68\x6a\x56','\x43\x75\x44\x78\x73\x76\x71','\x73\x4c\x44\x75','\x76\x77\x66\x66\x43\x32\x6d','\x7a\x78\x48\x57','\x73\x75\x50\x50\x42\x30\x75','\x42\x4d\x39\x33','\x6f\x75\x50\x68\x76\x33\x50\x72\x77\x71','\x43\x32\x4c\x4e\x42\x4d\x4c\x55\x7a\x31\x6e\x4c\x79\x33\x6a\x4c\x44\x61','\x43\x33\x62\x53\x41\x78\x71','\x73\x66\x6d\x59\x6e\x74\x79','\x43\x33\x72\x59\x41\x77\x35\x4e','\x71\x4c\x62\x71\x7a\x31\x75','\x79\x4d\x4c\x69\x7a\x78\x6d','\x79\x4d\x66\x5a\x7a\x74\x79\x30','\x72\x75\x6e\x41\x42\x78\x79','\x45\x4b\x35\x32\x74\x78\x47','\x42\x67\x76\x55\x7a\x33\x72\x4f','\x43\x32\x48\x48\x6d\x4a\x75\x32','\x75\x76\x62\x55\x71\x30\x47','\x6d\x74\x65\x34\x6d\x4a\x47\x31\x6d\x4d\x50\x67\x45\x65\x44\x62\x71\x57','\x41\x78\x6e\x5a\x44\x77\x76\x64\x42\x32\x58\x53\x79\x77\x6a\x56\x43\x4d\x66\x30\x41\x77\x39\x55','\x44\x67\x4c\x4c\x43\x47'];a0_0x29e2=function(){return _0x35f8ea;};return a0_0x29e2();}function issueReadToken(_0x186ffb,_0x2ed882,_0x4a92da){const _0x311a36=a0_0x1925d2,_0x124d9c={'\x79\x72\x71\x44\x78':function(_0x3139bc,_0x4d0bbe,_0x156a01,_0x369c58){return _0x3139bc(_0x4d0bbe,_0x156a01,_0x369c58);}};return _0x124d9c[_0x311a36(0xb4)](issueToken,_0x186ffb,{..._0x2ed882,'\x74\x79\x70':'\x72\x65\x61\x64'},_0x4a92da);}function issueSessionScopedToken(_0x59b4f0,_0x4376e0,_0xf6f65a){const _0xb4629a={'\x76\x67\x67\x70\x58':function(_0x2dd91c,_0x50fb6f,_0x24782b,_0x4ff7f3){return _0x2dd91c(_0x50fb6f,_0x24782b,_0x4ff7f3);}};return _0xb4629a['\x76\x67\x67\x70\x58'](issueReadToken,_0x59b4f0,_0x4376e0,_0xf6f65a);}function issueProjectScopedToken(_0x3aa5bb,_0x32607c,_0xc0f455){const _0x3b6973=a0_0x1925d2,_0x477341={'\x42\x50\x50\x67\x55':function(_0x58e2b3,_0x5e8bc2,_0x2967e9,_0x220b4f){return _0x58e2b3(_0x5e8bc2,_0x2967e9,_0x220b4f);}};return _0x477341[_0x3b6973(0xa4)](issueReadToken,_0x3aa5bb,_0x32607c,_0xc0f455);}function issueBatchScopedToken(_0x2749a2,_0x947d6b,_0x48325a){const _0x5eee1d=a0_0x1925d2,_0x25c01c={'\x7a\x4e\x76\x4d\x78':function(_0xcb5383,_0x4a260b,_0x18e558,_0x21b67e){return _0xcb5383(_0x4a260b,_0x18e558,_0x21b67e);}};return _0x25c01c[_0x5eee1d(0xa8)](issueReadToken,_0x2749a2,_0x947d6b,_0x48325a);}function issueCollaborationToken(_0x4d0844,_0x28de1a,_0x7e676f){const _0x1cf12b=a0_0x1925d2,_0x3894e1={'\x6b\x67\x77\x70\x65':function(_0x391044,_0x318230,_0x1294f8,_0x247176){return _0x391044(_0x318230,_0x1294f8,_0x247176);}};return _0x3894e1['\x6b\x67\x77\x70\x65'](issueToken,_0x4d0844,{'\x73\x75\x62':_0x28de1a['\x75\x73\x65\x72\x49\x64'],'\x73\x69\x64':_0x28de1a['\x73\x65\x73\x73\x69\x6f\x6e\x49\x64'],'\x70\x69\x64':_0x28de1a['\x70\x72\x6f\x64\x75\x63\x74\x49\x64'],'\x63\x69\x64':_0x28de1a[_0x1cf12b(0x7f)],'\x74\x79\x70':'\x63\x6f\x6c\x6c\x61\x62\x6f\x72\x61\x74\x69\x6f\x6e','\x70\x72\x6f\x6a\x65\x63\x74\x49\x64':_0x28de1a[_0x1cf12b(0x92)],'\x64\x6f\x63\x75\x6d\x65\x6e\x74\x49\x64':_0x28de1a[_0x1cf12b(0xaf)],'\x61\x63\x63\x65\x73\x73':_0x28de1a[_0x1cf12b(0x7b)]},_0x7e676f);}function unsafeDecodeToken(_0x3f2e7b){const _0x1e3a3d=a0_0x1925d2,_0x26e3d6={'\x52\x76\x63\x41\x6d':function(_0x8648e8,_0x4ceeec){return _0x8648e8-_0x4ceeec;}};try{const _0x5c1b29=_0x3f2e7b[_0x1e3a3d(0xa1)]('\x2e');if(_0x5c1b29[_0x1e3a3d(0xa9)]!==0x3)return null;const _0x40eec1=_0x5c1b29[0x1]+'\x3d'[_0x1e3a3d(0x93)](_0x26e3d6[_0x1e3a3d(0xb9)](0x4,_0x5c1b29[0x1][_0x1e3a3d(0xa9)]%0x4)%0x4),_0x5e5cba=Buffer[_0x1e3a3d(0xb7)](_0x40eec1[_0x1e3a3d(0x89)](/-/g,'\x2b')[_0x1e3a3d(0x89)](/_/g,'\x2f'),'\x62\x61\x73\x65\x36\x34')[_0x1e3a3d(0xb8)]();return JSON['\x70\x61\x72\x73\x65'](_0x5e5cba);}catch{return null;}}function verifyToken(_0xb1a804,_0x2eb681,_0x109e5a={}){const _0x194537=a0_0x1925d2,_0x3e6f50={'\x73\x4b\x6a\x6d\x70':function(_0x599535,_0x3bf991){return _0x599535||_0x3bf991;},'\x75\x5a\x51\x7a\x4f':function(_0x223f22,_0x2e3eb6){return _0x223f22+_0x2e3eb6;},'\x4e\x79\x75\x4c\x50':function(_0x4c61aa,_0xbdd257){return _0x4c61aa%_0xbdd257;},'\x45\x43\x5a\x6d\x76':function(_0x31125a,_0x125345){return _0x31125a%_0x125345;},'\x6f\x43\x69\x64\x4e':'\x62\x61\x73\x65\x36\x34','\x4f\x4d\x4d\x58\x73':function(_0x2e303f,_0x2b6f8e){return _0x2e303f!==_0x2b6f8e;},'\x55\x61\x45\x73\x63':function(_0x29c6a6,_0x4017ba,_0x40620f){return _0x29c6a6(_0x4017ba,_0x40620f);},'\x51\x50\x6e\x43\x48':function(_0x4be8f3,_0x5eac11){return _0x4be8f3(_0x5eac11);},'\x6d\x49\x50\x47\x53':function(_0x23eea3,_0x30682b){return _0x23eea3(_0x30682b);},'\x6b\x48\x57\x53\x77':function(_0x527fc1,_0x7d76aa){return _0x527fc1<_0x7d76aa;}};try{const _0x557c5f=_0xb1a804[_0x194537(0xa1)]('\x2e');if(_0x557c5f[_0x194537(0xa9)]!==0x3)return null;const [_0x482d90,_0xd44e23,_0x10f97f]=_0x557c5f;if(_0x3e6f50['\x73\x4b\x6a\x6d\x70'](!_0x482d90,!_0xd44e23)||!_0x10f97f)return null;let _0x40e1e1;try{const _0x9edecf=_0x3e6f50[_0x194537(0xb0)](_0x482d90,'\x3d'['\x72\x65\x70\x65\x61\x74'](_0x3e6f50[_0x194537(0x8f)](0x4-_0x3e6f50[_0x194537(0xa7)](_0x482d90[_0x194537(0xa9)],0x4),0x4))),_0x5cf554=Buffer[_0x194537(0xb7)](_0x9edecf[_0x194537(0x89)](/-/g,'\x2b')[_0x194537(0x89)](/_/g,'\x2f'),_0x3e6f50['\x6f\x43\x69\x64\x4e'])[_0x194537(0xb8)]();_0x40e1e1=JSON[_0x194537(0x94)](_0x5cf554);}catch{return null;}if(_0x3e6f50[_0x194537(0xb3)](_0x40e1e1[_0x194537(0x8b)],_0x194537(0xa2)))return null;const _0xb4fd0e=_0x3e6f50[_0x194537(0x9b)](createSignature,_0x482d90+'\x2e'+_0xd44e23,_0x2eb681),_0x4b3146=_0x3e6f50[_0x194537(0xab)](decodeBase64UrlToBuffer,_0x10f97f),_0x464f18=_0x3e6f50[_0x194537(0xab)](decodeBase64UrlToBuffer,_0xb4fd0e);if(!_0x4b3146||!_0x464f18)return null;if(_0x3e6f50[_0x194537(0xb3)](_0x4b3146[_0x194537(0xa9)],_0x464f18[_0x194537(0xa9)]))return null;if(!timingSafeEqual(_0x4b3146,_0x464f18))return null;const _0x23f3f9=_0x3e6f50['\x6d\x49\x50\x47\x53'](unsafeDecodeToken,_0xb1a804);if(!_0x23f3f9)return null;const _0x94ee2a=Math[_0x194537(0x7e)](Date['\x6e\x6f\x77']()/0x3e8),_0x230f1d=Math[_0x194537(0x79)](0x0,_0x109e5a[_0x194537(0x7c)]??0x0);if(_0x3e6f50[_0x194537(0xb3)](typeof _0x23f3f9[_0x194537(0x9c)],_0x194537(0xb1))||_0x3e6f50[_0x194537(0x86)](_0x23f3f9[_0x194537(0x9c)]+_0x230f1d,_0x94ee2a))return null;return _0x23f3f9;}catch{return null;}}function getTokenTTL(_0x5765f9){const _0x24117e=a0_0x1925d2,_0x24268f={'\x5a\x4c\x70\x46\x4f':function(_0x4f1b7b,_0x14db98){return _0x4f1b7b/_0x14db98;}},_0x1683ad=Math[_0x24117e(0x7e)](_0x24268f['\x5a\x4c\x70\x46\x4f'](Date['\x6e\x6f\x77'](),0x3e8));return _0x5765f9[_0x24117e(0x9c)]-_0x1683ad;}function isTokenExpiringSoon(_0x39c0cb,_0x472ffc=0x3c){const _0x4479ba={'\x71\x42\x4b\x56\x7a':function(_0x13fdf9,_0x3d9363){return _0x13fdf9<=_0x3d9363;}};return _0x4479ba['\x71\x42\x4b\x56\x7a'](getTokenTTL(_0x39c0cb),_0x472ffc);}var ProductTokenIssuer=class{['\x70\x72\x6f\x64\x75\x63\x74\x49\x64'];['\x73\x69\x67\x6e\x69\x6e\x67\x53\x65\x63\x72\x65\x74'];[a0_0x1925d2(0x96)];constructor(_0x5a1ffd){const _0x3dae04=a0_0x1925d2;this[_0x3dae04(0x97)]=_0x5a1ffd['\x70\x72\x6f\x64\x75\x63\x74\x49\x64'],this['\x73\x69\x67\x6e\x69\x6e\x67\x53\x65\x63\x72\x65\x74']=_0x5a1ffd[_0x3dae04(0xa0)],this[_0x3dae04(0x96)]={'\x66\x72\x65\x65':_0x5a1ffd[_0x3dae04(0x96)]?.[_0x3dae04(0x8c)]??0xf,'\x70\x72\x6f':_0x5a1ffd['\x74\x74\x6c\x4d\x69\x6e\x75\x74\x65\x73']?.[_0x3dae04(0x98)]??0xf0,'\x65\x6e\x74\x65\x72\x70\x72\x69\x73\x65':_0x5a1ffd['\x74\x74\x6c\x4d\x69\x6e\x75\x74\x65\x73']?.['\x65\x6e\x74\x65\x72\x70\x72\x69\x73\x65']??0x1e0};}['\x69\x73\x73\x75\x65'](_0x2fa6cd){const _0x56fd97=a0_0x1925d2,_0x1e5bff={'\x77\x56\x47\x46\x78':function(_0x4a4ad6,_0x149d4c,_0x126c14,_0x4edee9){return _0x4a4ad6(_0x149d4c,_0x126c14,_0x4edee9);}},_0x10c2ff=_0x2fa6cd['\x74\x69\x65\x72']??_0x56fd97(0x8c),_0x58c9bc=this[_0x56fd97(0x96)][_0x10c2ff]??this[_0x56fd97(0x96)]['\x66\x72\x65\x65'];return{'\x74\x6f\x6b\x65\x6e':_0x1e5bff['\x77\x56\x47\x46\x78'](issueReadToken,this['\x73\x69\x67\x6e\x69\x6e\x67\x53\x65\x63\x72\x65\x74'],{'\x73\x75\x62':_0x2fa6cd[_0x56fd97(0x8d)],'\x73\x69\x64':_0x2fa6cd[_0x56fd97(0x83)],'\x70\x69\x64':this[_0x56fd97(0x97)],'\x63\x69\x64':_0x2fa6cd['\x73\x61\x6e\x64\x62\x6f\x78\x49\x64']},_0x58c9bc),'\x65\x78\x70\x69\x72\x65\x73\x41\x74':Math['\x66\x6c\x6f\x6f\x72'](Date[_0x56fd97(0x9e)]()/0x3e8)+_0x58c9bc*0x3c};}[a0_0x1925d2(0xad)](_0x19b952){const _0x3f1fdf=a0_0x1925d2,_0x49192e={'\x73\x6a\x4b\x79\x77':_0x3f1fdf(0x8c),'\x41\x51\x55\x63\x78':function(_0xa74861,_0x1738fa){return _0xa74861+_0x1738fa;},'\x4f\x45\x67\x45\x6a':function(_0x7a5181,_0x176ab9){return _0x7a5181*_0x176ab9;}},_0x4a4cbf=_0x19b952[_0x3f1fdf(0xae)]??_0x49192e[_0x3f1fdf(0x7a)],_0x219b5d=this[_0x3f1fdf(0x96)][_0x4a4cbf]??this['\x74\x74\x6c\x4d\x69\x6e\x75\x74\x65\x73']['\x66\x72\x65\x65'];return{'\x74\x6f\x6b\x65\x6e':issueCollaborationToken(this[_0x3f1fdf(0xa0)],{'\x75\x73\x65\x72\x49\x64':_0x19b952[_0x3f1fdf(0x8d)],'\x73\x65\x73\x73\x69\x6f\x6e\x49\x64':_0x19b952[_0x3f1fdf(0x83)],'\x70\x72\x6f\x64\x75\x63\x74\x49\x64':this[_0x3f1fdf(0x97)],'\x70\x72\x6f\x6a\x65\x63\x74\x49\x64':_0x19b952[_0x3f1fdf(0x92)],'\x64\x6f\x63\x75\x6d\x65\x6e\x74\x49\x64':_0x19b952[_0x3f1fdf(0xaf)],'\x61\x63\x63\x65\x73\x73':_0x19b952['\x61\x63\x63\x65\x73\x73'],'\x73\x61\x6e\x64\x62\x6f\x78\x49\x64':_0x19b952[_0x3f1fdf(0x7f)]},_0x219b5d),'\x65\x78\x70\x69\x72\x65\x73\x41\x74':_0x49192e[_0x3f1fdf(0x7d)](Math[_0x3f1fdf(0x7e)](Date[_0x3f1fdf(0x9e)]()/0x3e8),_0x49192e[_0x3f1fdf(0x91)](_0x219b5d,0x3c))};}[a0_0x1925d2(0x82)](_0x1b6643='\x66\x72\x65\x65'){const _0x336527=a0_0x1925d2;return this['\x74\x74\x6c\x4d\x69\x6e\x75\x74\x65\x73'][_0x1b6643]??this['\x74\x74\x6c\x4d\x69\x6e\x75\x74\x65\x73'][_0x336527(0x8c)];}};function a0_0x1d87(_0x1185d0,_0x8b83ba){_0x1185d0=_0x1185d0-0x76;const _0x29e22d=a0_0x29e2();let _0x1d87c2=_0x29e22d[_0x1185d0];if(a0_0x1d87['\x64\x62\x69\x4b\x43\x5a']===undefined){var _0x574d7e=function(_0x242e40){const _0x2fb383='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x5e165b='',_0x508c57='';for(let _0x579d05=0x0,_0x326513,_0x38549c,_0x512455=0x0;_0x38549c=_0x242e40['\x63\x68\x61\x72\x41\x74'](_0x512455++);~_0x38549c&&(_0x326513=_0x579d05%0x4?_0x326513*0x40+_0x38549c:_0x38549c,_0x579d05++%0x4)?_0x5e165b+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0xff&_0x326513>>(-0x2*_0x579d05&0x6)):0x0){_0x38549c=_0x2fb383['\x69\x6e\x64\x65\x78\x4f\x66'](_0x38549c);}for(let _0x41f78e=0x0,_0x5c1928=_0x5e165b['\x6c\x65\x6e\x67\x74\x68'];_0x41f78e<_0x5c1928;_0x41f78e++){_0x508c57+='\x25'+('\x30\x30'+_0x5e165b['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x41f78e)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x10))['\x73\x6c\x69\x63\x65'](-0x2);}return decodeURIComponent(_0x508c57);};a0_0x1d87['\x48\x4f\x75\x57\x4b\x62']=_0x574d7e,a0_0x1d87['\x6a\x65\x4f\x65\x71\x46']={},a0_0x1d87['\x64\x62\x69\x4b\x43\x5a']=!![];}const _0x1f0427=_0x29e22d[0x0],_0xdf5fbd=_0x1185d0+_0x1f0427,_0x129077=a0_0x1d87['\x6a\x65\x4f\x65\x71\x46'][_0xdf5fbd];return!_0x129077?(_0x1d87c2=a0_0x1d87['\x48\x4f\x75\x57\x4b\x62'](_0x1d87c2),a0_0x1d87['\x6a\x65\x4f\x65\x71\x46'][_0xdf5fbd]=_0x1d87c2):_0x1d87c2=_0x129077,_0x1d87c2;}export{ProductTokenIssuer,getTokenTTL,isTokenExpiringSoon,issueBatchScopedToken,issueCollaborationToken,issueProjectScopedToken,issueReadToken,issueSessionScopedToken,unsafeDecodeToken,verifyToken};
|
|
1
|
+
const a0_0x241a0f=a0_0x36a1;(function(_0x4570cf,_0x211b7a){const _0x3288fd=a0_0x36a1,_0x18a863=_0x4570cf();while(!![]){try{const _0x6df98=parseInt(_0x3288fd(0x14a))/0x1*(-parseInt(_0x3288fd(0x160))/0x2)+-parseInt(_0x3288fd(0x14e))/0x3*(parseInt(_0x3288fd(0x180))/0x4)+parseInt(_0x3288fd(0x15f))/0x5+-parseInt(_0x3288fd(0x154))/0x6+-parseInt(_0x3288fd(0x15d))/0x7+-parseInt(_0x3288fd(0x16e))/0x8*(-parseInt(_0x3288fd(0x155))/0x9)+parseInt(_0x3288fd(0x15c))/0xa;if(_0x6df98===_0x211b7a)break;else _0x18a863['push'](_0x18a863['shift']());}catch(_0x4a56f9){_0x18a863['push'](_0x18a863['shift']());}}}(a0_0x9966,0xd7503));function a0_0x9966(){const _0x2d5633=['\x7a\x31\x6e\x66\x42\x65\x34','\x76\x30\x58\x4a\x41\x65\x57','\x44\x67\x4c\x4c\x43\x47','\x43\x68\x6a\x56\x7a\x68\x76\x4a\x44\x65\x4c\x4b','\x6e\x74\x61\x34\x6d\x64\x47\x34\x76\x4b\x72\x48\x42\x75\x48\x41','\x75\x4b\x72\x66\x75\x76\x75','\x7a\x4d\x58\x56\x42\x33\x69','\x7a\x67\x39\x4a\x44\x77\x31\x4c\x42\x4e\x72\x6a\x7a\x61','\x71\x77\x58\x51\x73\x31\x4f','\x76\x4d\x58\x5a\x73\x30\x65','\x41\x33\x7a\x49\x77\x75\x47','\x44\x68\x72\x53\x74\x77\x4c\x55\x44\x78\x72\x4c\x43\x57','\x44\x65\x39\x32\x75\x4c\x43','\x76\x77\x72\x5a\x7a\x65\x34','\x74\x76\x7a\x75\x73\x30\x47','\x71\x75\x35\x6a\x43\x32\x38','\x43\x67\x66\x59\x43\x32\x75','\x43\x32\x76\x5a\x43\x32\x4c\x56\x42\x4b\x4c\x4b','\x42\x4d\x39\x33','\x73\x4c\x44\x75','\x7a\x4e\x6a\x56\x42\x71','\x43\x4d\x76\x57\x7a\x77\x66\x30','\x6f\x64\x61\x33\x6d\x64\x48\x49\x7a\x77\x31\x6f\x79\x77\x47','\x44\x78\x6e\x4c\x43\x4b\x4c\x4b','\x79\x77\x6e\x4a\x7a\x78\x6e\x5a','\x73\x75\x4c\x74\x79\x76\x4f','\x42\x67\x76\x55\x7a\x33\x72\x4f','\x79\x77\x58\x4e','\x7a\x78\x48\x57','\x7a\x67\x4c\x4e\x7a\x78\x6e\x30','\x43\x33\x72\x59\x41\x77\x35\x4e\x41\x77\x7a\x35','\x44\x4c\x62\x6b\x41\x4d\x71','\x6d\x4a\x6d\x58\x6e\x74\x75\x31\x77\x4d\x50\x69\x44\x66\x76\x34','\x76\x78\x48\x65\x79\x32\x34','\x41\x78\x6e\x5a\x44\x77\x75','\x44\x67\x76\x5a\x44\x61','\x6d\x4a\x65\x35\x72\x32\x72\x41\x77\x4c\x4c\x6d','\x79\x75\x39\x53\x41\x4c\x61','\x73\x66\x6d\x59\x6e\x74\x79','\x41\x78\x6e\x5a\x44\x77\x76\x64\x42\x32\x58\x53\x79\x77\x6a\x56\x43\x4d\x66\x30\x41\x77\x39\x55','\x43\x33\x62\x53\x41\x78\x71','\x79\x32\x39\x53\x42\x67\x66\x49\x42\x33\x6a\x48\x44\x67\x4c\x56\x42\x47','\x6d\x74\x69\x59\x6e\x5a\x4b\x58\x6f\x66\x66\x48\x44\x66\x66\x52\x76\x61','\x6f\x77\x4c\x74\x71\x4c\x66\x73\x42\x71','\x43\x32\x66\x55\x7a\x67\x6a\x56\x45\x65\x4c\x4b','\x43\x68\x6a\x56\x41\x4d\x76\x4a\x44\x65\x4c\x4b','\x75\x67\x72\x34\x75\x4c\x4b','\x76\x68\x66\x71\x74\x32\x4b','\x76\x30\x35\x65\x72\x68\x4b','\x43\x4d\x76\x57\x42\x67\x66\x4a\x7a\x71','\x6d\x5a\x43\x32\x6d\x4a\x4b\x33\x6e\x64\x62\x32\x42\x4b\x35\x34\x41\x67\x30','\x6d\x74\x65\x35\x6d\x4a\x47\x5a\x6d\x5a\x7a\x70\x43\x75\x7a\x50\x72\x4d\x43','\x7a\x4e\x6a\x4c\x7a\x71','\x6e\x74\x79\x31\x6f\x64\x79\x59\x6e\x76\x44\x41\x74\x33\x76\x41\x71\x47','\x6e\x4d\x31\x52\x76\x75\x58\x75\x7a\x61','\x7a\x77\x35\x30\x7a\x78\x6a\x57\x43\x4d\x4c\x5a\x7a\x71','\x43\x68\x6a\x56','\x7a\x65\x54\x7a\x45\x4b\x75','\x71\x4b\x54\x63\x77\x4c\x6d','\x44\x67\x39\x74\x44\x68\x6a\x50\x42\x4d\x43','\x43\x77\x44\x48\x43\x66\x79','\x43\x32\x4c\x4e\x42\x4d\x4c\x55\x7a\x31\x6e\x4c\x79\x33\x6a\x4c\x44\x61','\x43\x67\x6a\x67\x73\x68\x4b','\x79\x4d\x66\x5a\x7a\x74\x79\x30'];a0_0x9966=function(){return _0x2d5633;};return a0_0x9966();}import{createHmac,timingSafeEqual}from'\x6e\x6f\x64\x65\x3a\x63\x72\x79\x70\x74\x6f';function base64UrlEncode(_0x13e3eb){const _0x38445b=a0_0x36a1,_0x345c75={'\x71\x67\x61\x70\x56':_0x38445b(0x169)};return(typeof _0x13e3eb==='\x73\x74\x72\x69\x6e\x67'?Buffer[_0x38445b(0x17e)](_0x13e3eb):_0x13e3eb)[_0x38445b(0x165)](_0x345c75[_0x38445b(0x166)])[_0x38445b(0x15b)](/\+/g,'\x2d')[_0x38445b(0x15b)](/\//g,'\x5f')[_0x38445b(0x15b)](/=+$/,'');}function decodeBase64UrlToBuffer(_0x379355){const _0x4f4fcf=a0_0x36a1,_0x58f1af={'\x58\x4f\x75\x57\x44':function(_0x11d037,_0x17a062){return _0x11d037%_0x17a062;},'\x76\x50\x4a\x6a\x64':function(_0x21eed8,_0x3eb162){return _0x21eed8%_0x3eb162;},'\x41\x4e\x49\x73\x6f':_0x4f4fcf(0x169)};if(!/^[A-Za-z0-9_-]*$/[_0x4f4fcf(0x14d)](_0x379355))return null;const _0x552b2f=_0x379355+'\x3d'['\x72\x65\x70\x65\x61\x74'](_0x58f1af['\x58\x4f\x75\x57\x44'](0x4-_0x58f1af[_0x4f4fcf(0x189)](_0x379355[_0x4f4fcf(0x184)],0x4),0x4));return Buffer[_0x4f4fcf(0x17e)](_0x552b2f[_0x4f4fcf(0x15b)](/-/g,'\x2b')['\x72\x65\x70\x6c\x61\x63\x65'](/_/g,'\x2f'),_0x58f1af[_0x4f4fcf(0x179)]);}function createSignature(_0x10d2a9,_0x2394ac){const _0x1acf77=a0_0x36a1,_0x54f90a={'\x61\x4f\x6c\x6a\x50':function(_0x44f96f,_0x38da07,_0x1ae59f){return _0x44f96f(_0x38da07,_0x1ae59f);}};return base64UrlEncode(_0x54f90a[_0x1acf77(0x14f)](createHmac,'\x73\x68\x61\x32\x35\x36',_0x2394ac)['\x75\x70\x64\x61\x74\x65'](_0x10d2a9)[_0x1acf77(0x187)]());}const JWT_HEADER=base64UrlEncode(JSON[a0_0x241a0f(0x188)]({'\x61\x6c\x67':a0_0x241a0f(0x150),'\x74\x79\x70':a0_0x241a0f(0x17d)}));function issueToken(_0x1d00b4,_0x2f3da6,_0x3c51f6){const _0x448216=a0_0x241a0f,_0x47c993={'\x49\x49\x53\x61\x5a':function(_0x12b27d,_0x582466){return _0x12b27d*_0x582466;},'\x64\x4b\x59\x7a\x45':function(_0x10ad3b,_0x4878b3){return _0x10ad3b(_0x4878b3);}},_0x27000e=Math[_0x448216(0x170)](Date[_0x448216(0x17c)]()/0x3e8),_0x111aa2={..._0x2f3da6,'\x69\x61\x74':_0x27000e,'\x65\x78\x70':_0x27000e+_0x47c993[_0x448216(0x183)](_0x3c51f6,0x3c)},_0x334fc8=JWT_HEADER+'\x2e'+_0x47c993[_0x448216(0x163)](base64UrlEncode,JSON['\x73\x74\x72\x69\x6e\x67\x69\x66\x79'](_0x111aa2));return _0x334fc8+'\x2e'+createSignature(_0x334fc8,_0x1d00b4);}function issueReadToken(_0x3bdd81,_0x4dd8b0,_0x79463f){const _0x394644=a0_0x241a0f,_0x2d47cf={'\x62\x55\x4a\x44\x77':function(_0x182231,_0x2f4a49,_0x3832d0,_0x3c7f91){return _0x182231(_0x2f4a49,_0x3832d0,_0x3c7f91);},'\x57\x4e\x44\x44\x79':'\x72\x65\x61\x64'};return _0x2d47cf['\x62\x55\x4a\x44\x77'](issueToken,_0x3bdd81,{..._0x4dd8b0,'\x74\x79\x70':_0x2d47cf[_0x394644(0x15a)]},_0x79463f);}function a0_0x36a1(_0x1e9fbc,_0x23e9da){_0x1e9fbc=_0x1e9fbc-0x14a;const _0x996680=a0_0x9966();let _0x36a1b6=_0x996680[_0x1e9fbc];if(a0_0x36a1['\x47\x56\x4c\x43\x79\x53']===undefined){var _0xd29a33=function(_0x42ee13){const _0xd27518='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x25f515='',_0x482eb3='';for(let _0x1419a7=0x0,_0x44de0c,_0x409425,_0x5d9c28=0x0;_0x409425=_0x42ee13['\x63\x68\x61\x72\x41\x74'](_0x5d9c28++);~_0x409425&&(_0x44de0c=_0x1419a7%0x4?_0x44de0c*0x40+_0x409425:_0x409425,_0x1419a7++%0x4)?_0x25f515+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0xff&_0x44de0c>>(-0x2*_0x1419a7&0x6)):0x0){_0x409425=_0xd27518['\x69\x6e\x64\x65\x78\x4f\x66'](_0x409425);}for(let _0x47ee77=0x0,_0x3d204c=_0x25f515['\x6c\x65\x6e\x67\x74\x68'];_0x47ee77<_0x3d204c;_0x47ee77++){_0x482eb3+='\x25'+('\x30\x30'+_0x25f515['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x47ee77)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x10))['\x73\x6c\x69\x63\x65'](-0x2);}return decodeURIComponent(_0x482eb3);};a0_0x36a1['\x53\x70\x70\x70\x6a\x45']=_0xd29a33,a0_0x36a1['\x66\x50\x77\x48\x66\x52']={},a0_0x36a1['\x47\x56\x4c\x43\x79\x53']=!![];}const _0x5d2696=_0x996680[0x0],_0x1a4fa0=_0x1e9fbc+_0x5d2696,_0x551fcc=a0_0x36a1['\x66\x50\x77\x48\x66\x52'][_0x1a4fa0];return!_0x551fcc?(_0x36a1b6=a0_0x36a1['\x53\x70\x70\x70\x6a\x45'](_0x36a1b6),a0_0x36a1['\x66\x50\x77\x48\x66\x52'][_0x1a4fa0]=_0x36a1b6):_0x36a1b6=_0x551fcc,_0x36a1b6;}function issueSessionScopedToken(_0x29736e,_0x238db4,_0x3c13dc){const _0x4f1afd=a0_0x241a0f,_0xbb799c={'\x54\x71\x50\x4f\x69':function(_0x282b39,_0xb3f796,_0x633608,_0x2f0fd5){return _0x282b39(_0xb3f796,_0x633608,_0x2f0fd5);}};return _0xbb799c[_0x4f1afd(0x159)](issueReadToken,_0x29736e,_0x238db4,_0x3c13dc);}function issueProjectScopedToken(_0x1cf409,_0x2cc9ea,_0x2d18b8){return issueReadToken(_0x1cf409,_0x2cc9ea,_0x2d18b8);}function issueBatchScopedToken(_0x28188d,_0x5af318,_0x25b3aa){return issueReadToken(_0x28188d,_0x5af318,_0x25b3aa);}function issueCollaborationToken(_0x467951,_0x1af17e,_0x468b63){const _0x421509=a0_0x241a0f,_0x17d8ed={'\x42\x4b\x42\x5a\x53':_0x421509(0x153)};return issueToken(_0x467951,{'\x73\x75\x62':_0x1af17e[_0x421509(0x181)],'\x73\x69\x64':_0x1af17e[_0x421509(0x17b)],'\x70\x69\x64':_0x1af17e[_0x421509(0x16d)],'\x63\x69\x64':_0x1af17e[_0x421509(0x156)],'\x74\x79\x70':_0x17d8ed[_0x421509(0x164)],'\x70\x72\x6f\x6a\x65\x63\x74\x49\x64':_0x1af17e[_0x421509(0x157)],'\x64\x6f\x63\x75\x6d\x65\x6e\x74\x49\x64':_0x1af17e[_0x421509(0x171)],'\x61\x63\x63\x65\x73\x73':_0x1af17e[_0x421509(0x182)]},_0x468b63);}function unsafeDecodeToken(_0x2a3775){const _0x4d8ba3=a0_0x241a0f,_0x1b9947={'\x68\x45\x53\x4a\x5a':function(_0x434216,_0x1f2602){return _0x434216+_0x1f2602;},'\x50\x64\x78\x52\x59':function(_0x4d7e3a,_0xb30e4f){return _0x4d7e3a-_0xb30e4f;}};try{const _0x26f12f=_0x2a3775[_0x4d8ba3(0x152)]('\x2e');if(_0x26f12f[_0x4d8ba3(0x184)]!==0x3)return null;const _0x3b8d03=_0x1b9947['\x68\x45\x53\x4a\x5a'](_0x26f12f[0x1],'\x3d'[_0x4d8ba3(0x17f)](_0x1b9947[_0x4d8ba3(0x158)](0x4,_0x26f12f[0x1][_0x4d8ba3(0x184)]%0x4)%0x4)),_0x3ae9fd=Buffer[_0x4d8ba3(0x17e)](_0x3b8d03['\x72\x65\x70\x6c\x61\x63\x65'](/-/g,'\x2b')[_0x4d8ba3(0x15b)](/_/g,'\x2f'),'\x62\x61\x73\x65\x36\x34')[_0x4d8ba3(0x165)]();return JSON[_0x4d8ba3(0x17a)](_0x3ae9fd);}catch{return null;}}function verifyToken(_0x1a3792,_0x40a843,_0x2cdfef={}){const _0x4d5b2f=a0_0x241a0f,_0x4a09ff={'\x56\x6c\x73\x4b\x41':function(_0xc8da91,_0x22cda1){return _0xc8da91!==_0x22cda1;},'\x55\x64\x73\x64\x4e':function(_0x5282c6,_0x1d2aaf){return _0x5282c6||_0x1d2aaf;},'\x62\x66\x73\x61\x58':'\x62\x61\x73\x65\x36\x34','\x74\x4f\x76\x52\x57':function(_0x1d7862,_0x5b5041,_0x188e86){return _0x1d7862(_0x5b5041,_0x188e86);},'\x4d\x56\x54\x4b\x48':function(_0x181c06,_0x25c31f){return _0x181c06(_0x25c31f);},'\x55\x78\x44\x63\x6e':function(_0x3e448d,_0x4568fb){return _0x3e448d!==_0x4568fb;},'\x6b\x76\x62\x59\x48':function(_0x1db394,_0x224e53){return _0x1db394(_0x224e53);},'\x70\x62\x46\x48\x79':function(_0x3502ed,_0x29dbc8){return _0x3502ed!==_0x29dbc8;},'\x41\x6c\x6a\x4b\x5a':function(_0x1c3292,_0x3a6510){return _0x1c3292<_0x3a6510;}};try{const _0x216d22=_0x1a3792[_0x4d5b2f(0x152)]('\x2e');if(_0x4a09ff['\x56\x6c\x73\x4b\x41'](_0x216d22[_0x4d5b2f(0x184)],0x3))return null;const [_0x27b834,_0x230d0a,_0x52d8d9]=_0x216d22;if(_0x4a09ff[_0x4d5b2f(0x177)](!_0x27b834,!_0x230d0a)||!_0x52d8d9)return null;let _0x4e20b0;try{const _0x2928bf=_0x27b834+'\x3d'['\x72\x65\x70\x65\x61\x74']((0x4-_0x27b834[_0x4d5b2f(0x184)]%0x4)%0x4),_0xf39136=Buffer[_0x4d5b2f(0x17e)](_0x2928bf[_0x4d5b2f(0x15b)](/-/g,'\x2b')['\x72\x65\x70\x6c\x61\x63\x65'](/_/g,'\x2f'),_0x4a09ff['\x62\x66\x73\x61\x58'])['\x74\x6f\x53\x74\x72\x69\x6e\x67']();_0x4e20b0=JSON['\x70\x61\x72\x73\x65'](_0xf39136);}catch{return null;}if(_0x4a09ff[_0x4d5b2f(0x173)](_0x4e20b0[_0x4d5b2f(0x185)],_0x4d5b2f(0x150)))return null;const _0x5edb62=_0x4a09ff[_0x4d5b2f(0x176)](createSignature,_0x27b834+'\x2e'+_0x230d0a,_0x40a843),_0x2f43f9=_0x4a09ff[_0x4d5b2f(0x178)](decodeBase64UrlToBuffer,_0x52d8d9),_0x4d4957=decodeBase64UrlToBuffer(_0x5edb62);if(!_0x2f43f9||!_0x4d4957)return null;if(_0x4a09ff[_0x4d5b2f(0x14b)](_0x2f43f9[_0x4d5b2f(0x184)],_0x4d4957['\x6c\x65\x6e\x67\x74\x68']))return null;if(!_0x4a09ff[_0x4d5b2f(0x176)](timingSafeEqual,_0x2f43f9,_0x4d4957))return null;const _0x43bd9c=_0x4a09ff[_0x4d5b2f(0x174)](unsafeDecodeToken,_0x1a3792);if(!_0x43bd9c)return null;const _0x1c4d25=Math[_0x4d5b2f(0x170)](Date[_0x4d5b2f(0x17c)]()/0x3e8),_0x22f381=Math['\x6d\x61\x78'](0x0,_0x2cdfef['\x63\x6c\x6f\x63\x6b\x53\x6b\x65\x77\x53\x65\x63\x6f\x6e\x64\x73']??0x0);if(_0x4a09ff[_0x4d5b2f(0x168)](typeof _0x43bd9c[_0x4d5b2f(0x186)],'\x6e\x75\x6d\x62\x65\x72')||_0x4a09ff[_0x4d5b2f(0x172)](_0x43bd9c[_0x4d5b2f(0x186)]+_0x22f381,_0x1c4d25))return null;return _0x43bd9c;}catch{return null;}}function getTokenTTL(_0xb4ac5f){const _0x3b7b2c=a0_0x241a0f,_0x50add5=Math[_0x3b7b2c(0x170)](Date[_0x3b7b2c(0x17c)]()/0x3e8);return _0xb4ac5f[_0x3b7b2c(0x186)]-_0x50add5;}function isTokenExpiringSoon(_0x50a2f0,_0x2b01cd=0x3c){const _0x1f04d2={'\x68\x73\x43\x65\x4d':function(_0x4a3365,_0x279813){return _0x4a3365(_0x279813);}};return _0x1f04d2['\x68\x73\x43\x65\x4d'](getTokenTTL,_0x50a2f0)<=_0x2b01cd;}var ProductTokenIssuer=class{[a0_0x241a0f(0x16d)];[a0_0x241a0f(0x167)];[a0_0x241a0f(0x175)];constructor(_0x3897bf){const _0x4780ac=a0_0x241a0f;this[_0x4780ac(0x16d)]=_0x3897bf['\x70\x72\x6f\x64\x75\x63\x74\x49\x64'],this[_0x4780ac(0x167)]=_0x3897bf['\x73\x69\x67\x6e\x69\x6e\x67\x53\x65\x63\x72\x65\x74'],this[_0x4780ac(0x175)]={'\x66\x72\x65\x65':_0x3897bf['\x74\x74\x6c\x4d\x69\x6e\x75\x74\x65\x73']?.['\x66\x72\x65\x65']??0xf,'\x70\x72\x6f':_0x3897bf[_0x4780ac(0x175)]?.[_0x4780ac(0x162)]??0xf0,'\x65\x6e\x74\x65\x72\x70\x72\x69\x73\x65':_0x3897bf[_0x4780ac(0x175)]?.[_0x4780ac(0x161)]??0x1e0};}[a0_0x241a0f(0x14c)](_0xecb066){const _0x243524=a0_0x241a0f,_0x4e2a0d={'\x50\x50\x4b\x55\x69':_0x243524(0x15e),'\x5a\x5a\x65\x62\x6d':function(_0x278678,_0x206884,_0x103ec8,_0x16dc3b){return _0x278678(_0x206884,_0x103ec8,_0x16dc3b);},'\x57\x4c\x63\x68\x4c':function(_0x433fbc,_0x5980f2){return _0x433fbc+_0x5980f2;},'\x67\x53\x45\x6c\x4e':function(_0x52dd9b,_0x2c989b){return _0x52dd9b*_0x2c989b;}},_0x1d034c=_0xecb066[_0x243524(0x16c)]??_0x4e2a0d['\x50\x50\x4b\x55\x69'],_0x56b23a=this[_0x243524(0x175)][_0x1d034c]??this[_0x243524(0x175)][_0x243524(0x15e)];return{'\x74\x6f\x6b\x65\x6e':_0x4e2a0d['\x5a\x5a\x65\x62\x6d'](issueReadToken,this[_0x243524(0x167)],{'\x73\x75\x62':_0xecb066['\x75\x73\x65\x72\x49\x64'],'\x73\x69\x64':_0xecb066[_0x243524(0x17b)],'\x70\x69\x64':this[_0x243524(0x16d)],'\x63\x69\x64':_0xecb066[_0x243524(0x156)]},_0x56b23a),'\x65\x78\x70\x69\x72\x65\x73\x41\x74':_0x4e2a0d[_0x243524(0x16b)](Math[_0x243524(0x170)](Date[_0x243524(0x17c)]()/0x3e8),_0x4e2a0d[_0x243524(0x16a)](_0x56b23a,0x3c))};}[a0_0x241a0f(0x151)](_0x349917){const _0x1fa9a9=a0_0x241a0f,_0x2e29de={'\x52\x44\x45\x51\x55':_0x1fa9a9(0x15e)},_0x3b9a93=_0x349917[_0x1fa9a9(0x16c)]??_0x2e29de[_0x1fa9a9(0x16f)],_0x40e5cd=this[_0x1fa9a9(0x175)][_0x3b9a93]??this['\x74\x74\x6c\x4d\x69\x6e\x75\x74\x65\x73'][_0x1fa9a9(0x15e)];return{'\x74\x6f\x6b\x65\x6e':issueCollaborationToken(this[_0x1fa9a9(0x167)],{'\x75\x73\x65\x72\x49\x64':_0x349917[_0x1fa9a9(0x181)],'\x73\x65\x73\x73\x69\x6f\x6e\x49\x64':_0x349917[_0x1fa9a9(0x17b)],'\x70\x72\x6f\x64\x75\x63\x74\x49\x64':this[_0x1fa9a9(0x16d)],'\x70\x72\x6f\x6a\x65\x63\x74\x49\x64':_0x349917['\x70\x72\x6f\x6a\x65\x63\x74\x49\x64'],'\x64\x6f\x63\x75\x6d\x65\x6e\x74\x49\x64':_0x349917['\x64\x6f\x63\x75\x6d\x65\x6e\x74\x49\x64'],'\x61\x63\x63\x65\x73\x73':_0x349917[_0x1fa9a9(0x182)],'\x73\x61\x6e\x64\x62\x6f\x78\x49\x64':_0x349917['\x73\x61\x6e\x64\x62\x6f\x78\x49\x64']},_0x40e5cd),'\x65\x78\x70\x69\x72\x65\x73\x41\x74':Math[_0x1fa9a9(0x170)](Date['\x6e\x6f\x77']()/0x3e8)+_0x40e5cd*0x3c};}['\x67\x65\x74\x54\x74\x6c\x4d\x69\x6e\x75\x74\x65\x73'](_0x2fc446=a0_0x241a0f(0x15e)){const _0x4aee2c=a0_0x241a0f;return this[_0x4aee2c(0x175)][_0x2fc446]??this[_0x4aee2c(0x175)][_0x4aee2c(0x15e)];}};export{ProductTokenIssuer,getTokenTTL,isTokenExpiringSoon,issueBatchScopedToken,issueCollaborationToken,issueProjectScopedToken,issueReadToken,issueSessionScopedToken,unsafeDecodeToken,verifyToken};
|