Spaces:
Paused
Paused
Download utils/params.js from AiBotTeszt/Heino: direct link, hf CLI and curl.
- Browser
- Download file 3.1 kB
-
https://huggingface.co/spaces/AiBotTeszt/Heino/resolve/main/utils/params.js
- Command line
-
hf download hf://spaces/AiBotTeszt/Heino/utils/params.js
-
curl -L -o params.js https://huggingface.co/spaces/AiBotTeszt/Heino/resolve/main/utils/params.js
3.1 kB
| function a49_0x3232(){const _0x579d39=['\x20parametresi\x20true\x20veya\x20false\x20olmalı.','hasOwn','userId','3jhoGsn','4320336hHlDve','659006wBYXdv','\x20parametresi\x20geçersiz.','7985736vXodte','468224lZZxlP','string','5pLNdSZ','1121394RUBspU','keys','yes','trim','false','toLowerCase','62775shSomI','query','off','329973DzgVTx','length','phoneNumber','\x20parametresi\x20eksik\x20veya\x20geçersiz.'];a49_0x3232=function(){return _0x579d39;};return a49_0x3232();}const a49_0x176e09=a49_0x4f24;(function(_0x295965,_0x55f773){const _0x1208b1=a49_0x4f24,_0x575848=_0x295965();while(!![]){try{const _0x2525da=-parseInt(_0x1208b1(0x13c))/0x1+-parseInt(_0x1208b1(0x148))/0x2*(-parseInt(_0x1208b1(0x146))/0x3)+parseInt(_0x1208b1(0x14b))/0x4+-parseInt(_0x1208b1(0x14d))/0x5*(-parseInt(_0x1208b1(0x14e))/0x6)+parseInt(_0x1208b1(0x13f))/0x7+parseInt(_0x1208b1(0x147))/0x8+-parseInt(_0x1208b1(0x14a))/0x9;if(_0x2525da===_0x55f773)break;else _0x575848['push'](_0x575848['shift']());}catch(_0x1da8fe){_0x575848['push'](_0x575848['shift']());}}}(a49_0x3232,0x420e0));import{ApiError}from'../middleware/errors.js';import{normalizeNumber,isValidPhoneNumber}from'./phone.js';export function queryValue(_0x1d0acd,_0x53f6c0){const _0x13bb82=a49_0x4f24,_0x6dbefa=_0x1d0acd[_0x13bb82(0x13d)]||{};if(Object[_0x13bb82(0x144)](_0x6dbefa,_0x53f6c0))return _0x6dbefa[_0x53f6c0];const _0x201431=_0x53f6c0[_0x13bb82(0x13b)]();for(const _0x22953a of Object[_0x13bb82(0x14f)](_0x6dbefa)){if(_0x22953a[_0x13bb82(0x13b)]()===_0x201431)return _0x6dbefa[_0x22953a];}return undefined;}export function requiredString(_0x2f7ec9,_0x446f5b,_0x188cb2=0x80){const _0x54fcf3=a49_0x4f24;if(typeof _0x2f7ec9!==_0x54fcf3(0x14c)||!_0x2f7ec9[_0x54fcf3(0x139)]()||_0x2f7ec9[_0x54fcf3(0x140)]>_0x188cb2)throw new ApiError(0x190,_0x446f5b+_0x54fcf3(0x142));return _0x2f7ec9[_0x54fcf3(0x139)]();}function a49_0x4f24(_0x2db450,_0x5cccfe){_0x2db450=_0x2db450-0x139;const _0x32324f=a49_0x3232();let _0x4f24a4=_0x32324f[_0x2db450];return _0x4f24a4;}export function optionalString(_0x32deb5,_0x5ab16b,_0x38df6e=0x3e8){const _0x36538e=a49_0x4f24;if(_0x32deb5===undefined||_0x32deb5===null||_0x32deb5==='')return'';if(typeof _0x32deb5!==_0x36538e(0x14c)||_0x32deb5['length']>_0x38df6e)throw new ApiError(0x190,_0x5ab16b+_0x36538e(0x149));return _0x32deb5;}export function phoneParam(_0x23f0b6,_0x2d3642=a49_0x176e09(0x141)){const _0x56df14=normalizeNumber(requiredString(queryValue(_0x23f0b6,_0x2d3642),_0x2d3642,0x40));if(!isValidPhoneNumber(_0x56df14))throw new ApiError(0x190,'Geçersiz\x20telefon\x20numarası.');return _0x56df14;}export function boolParam(_0x393d43,_0x2bfdf1,_0x439bbf='enabled'){const _0x4075b5=a49_0x176e09;if(_0x393d43===undefined||_0x393d43==='')return _0x2bfdf1;const _0x28a9cb=String(_0x393d43)[_0x4075b5(0x13b)]();if(['true','1',_0x4075b5(0x150),'on']['includes'](_0x28a9cb))return!![];if([_0x4075b5(0x13a),'0','no',_0x4075b5(0x13e)]['includes'](_0x28a9cb))return![];throw new ApiError(0x190,_0x439bbf+_0x4075b5(0x143));}export const userIdParam=_0x44e0d5=>requiredString(queryValue(_0x44e0d5,a49_0x176e09(0x145)),'userId'); |