| Server IP : 104.21.37.246 / Your IP : 104.23.243.32 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/2388321/root/proc/2388322/task/2388322/cwd/sharedjs/libraries/cjt2/util/ |
Upload File : |
/*
# cjt/util/unicode.js Copyright 2022 cPanel, L.L.C.
# All rights reserved.
# [email protected] http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited
*/
define( [
"punycode",
],
function(PUNYCODE) {
"use strict";
var ucs2Encode = PUNYCODE.ucs2.encode;
function _augmentLookup(cpArray, lookup, value, asCharYN) {
for (var d = 0; d < cpArray.length; d++) {
if (cpArray[d] instanceof Array) {
for (var i = cpArray[d][0]; i <= cpArray[d][1]; i++) {
lookup[ asCharYN ? ucs2Encode([i]) : i ] = value;
}
} else {
lookup[ asCharYN ? ucs2Encode( [cpArray[d]] ) : cpArray[d] ] = value;
}
}
return lookup;
}
function createCharacterLookup(cpArray) {
return _augmentLookup(cpArray, {}, true, true);
}
function augmentCodePointLookup(cpArray, lookup, value) {
return _augmentLookup(cpArray, lookup, value, false);
}
return {
createCharacterLookup: createCharacterLookup,
augmentCodePointLookup: augmentCodePointLookup,
};
} );