HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/tana/frontend/node_modules/locutus/php/array/krsort.js.map
{"version":3,"sources":["../../../src/php/array/krsort.js"],"names":["module","exports","krsort","inputArr","sortFlags","i18nlgd","require","strnatcmp","tmpArr","keys","sorter","i","k","sortByReference","populateArr","$global","window","global","$locutus","php","locales","a","b","loc","sorting","aFloat","parseFloat","bFloat","aNumeric","bNumeric","hasOwnProperty","push","sort","iniVal","undefined","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,QAAjB,EAA2BC,SAA3B,EAAsC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAUC,QAAQ,8BAAR,CAAd;AACA,MAAIC,YAAYD,QAAQ,sBAAR,CAAhB;;AAEA,MAAIE,SAAS,EAAb;AACA,MAAIC,OAAO,EAAX;AACA,MAAIC,MAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,MAAIC,UAAW,OAAOC,MAAP,KAA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J,GAAQ,CAAC,CAAT,GAAa,CAAhC;AACD,OAbD;AAcA;AApCJ;;AAuCA;AACA,OAAKV,CAAL,IAAUT,QAAV,EAAoB;AAClB,QAAIA,SAAS2B,cAAT,CAAwBlB,CAAxB,CAAJ,EAAgC;AAC9BH,WAAKsB,IAAL,CAAUnB,CAAV;AACD;AACF;AACDH,OAAKuB,IAAL,CAAUtB,MAAV;;AAEA,MAAIuB,SAAS,CAAC,OAAO3B,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyF4B,SAA1F,KAAwG,IAArH;AACArB,oBAAkBoB,WAAW,IAA7B;AACAnB,gBAAcD,kBAAkBV,QAAlB,GAA6BW,WAA3C;;AAEA;AACA,OAAKH,IAAI,CAAT,EAAYA,IAAIF,KAAK0B,MAArB,EAA6BxB,GAA7B,EAAkC;AAChCC,QAAIH,KAAKE,CAAL,CAAJ;AACAH,WAAOI,CAAP,IAAYT,SAASS,CAAT,CAAZ;AACA,QAAIC,eAAJ,EAAqB;AACnB,aAAOV,SAASS,CAAT,CAAP;AACD;AACF;AACD,OAAKD,CAAL,IAAUH,MAAV,EAAkB;AAChB,QAAIA,OAAOsB,cAAP,CAAsBnB,CAAtB,CAAJ,EAA8B;AAC5BG,kBAAYH,CAAZ,IAAiBH,OAAOG,CAAP,CAAjB;AACD;AACF;;AAED,SAAOE,mBAAmBC,WAA1B;AACD,CAjHD","file":"krsort.js","sourcesContent":["module.exports = function krsort (inputArr, sortFlags) {\n  //  discuss at: http://locutus.io/php/krsort/\n  // original by: GeekFG (http://geekfg.blogspot.com)\n  // improved by: Kevin van Zonneveld (http://kvz.io)\n  // improved by: Brett Zamir (http://brett-zamir.me)\n  // bugfixed by: pseudaria (https://github.com/pseudaria)\n  //      note 1: The examples are correct, this is a new way\n  //      note 1: This function deviates from PHP in returning a copy of the array instead\n  //      note 1: of acting by reference and returning true; this was necessary because\n  //      note 1: IE does not allow deleting and re-adding of properties without caching\n  //      note 1: of property position; you can set the ini of \"locutus.sortByReference\" to true to\n  //      note 1: get the PHP behavior, but use this only if you are in an environment\n  //      note 1: such as Firefox extensions where for-in iteration order is fixed and true\n  //      note 1: property deletion is supported. Note that we intend to implement the PHP\n  //      note 1: behavior by default if IE ever does allow it; only gives shallow copy since\n  //      note 1: is by reference in PHP anyways\n  //      note 1: Since JS objects' keys are always strings, and (the\n  //      note 1: default) SORT_REGULAR flag distinguishes by key type,\n  //      note 1: if the content is a numeric string, we treat the\n  //      note 1: \"original type\" as numeric.\n  //   example 1: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}\n  //   example 1: krsort($data)\n  //   example 1: var $result = $data\n  //   returns 1: {d: 'lemon', c: 'apple', b: 'banana', a: 'orange'}\n  //   example 2: ini_set('locutus.sortByReference', true)\n  //   example 2: var $data = {2: 'van', 3: 'Zonneveld', 1: 'Kevin'}\n  //   example 2: krsort($data)\n  //   example 2: var $result = $data\n  //   returns 2: {3: 'Zonneveld', 2: 'van', 1: 'Kevin'}\n\n  var i18nlgd = require('../i18n/i18n_loc_get_default')\n  var strnatcmp = require('../strings/strnatcmp')\n\n  var tmpArr = {}\n  var keys = []\n  var sorter\n  var i\n  var k\n  var sortByReference = false\n  var populateArr = {}\n\n  var $global = (typeof window !== 'undefined' ? window : global)\n  $global.$locutus = $global.$locutus || {}\n  var $locutus = $global.$locutus\n  $locutus.php = $locutus.php || {}\n  $locutus.php.locales = $locutus.php.locales || {}\n\n  switch (sortFlags) {\n    case 'SORT_STRING':\n      // compare items as strings\n      sorter = function (a, b) {\n        return strnatcmp(b, a)\n      }\n      break\n    case 'SORT_LOCALE_STRING':\n      // compare items as strings, based on the current locale\n      // (set with i18n_loc_set_default() as of PHP6)\n      var loc = i18nlgd()\n      sorter = $locutus.locales[loc].sorting\n      break\n    case 'SORT_NUMERIC':\n      // compare items numerically\n      sorter = function (a, b) {\n        return (b - a)\n      }\n      break\n    case 'SORT_REGULAR':\n    default:\n      // compare items normally (don't change types)\n      sorter = function (b, a) {\n        var aFloat = parseFloat(a)\n        var bFloat = parseFloat(b)\n        var aNumeric = aFloat + '' === a\n        var bNumeric = bFloat + '' === b\n        if (aNumeric && bNumeric) {\n          return aFloat > bFloat ? 1 : aFloat < bFloat ? -1 : 0\n        } else if (aNumeric && !bNumeric) {\n          return 1\n        } else if (!aNumeric && bNumeric) {\n          return -1\n        }\n        return a > b ? 1 : a < b ? -1 : 0\n      }\n      break\n  }\n\n  // Make a list of key names\n  for (k in inputArr) {\n    if (inputArr.hasOwnProperty(k)) {\n      keys.push(k)\n    }\n  }\n  keys.sort(sorter)\n\n  var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n  sortByReference = iniVal === 'on'\n  populateArr = sortByReference ? inputArr : populateArr\n\n  // Rebuild array with sorted key names\n  for (i = 0; i < keys.length; i++) {\n    k = keys[i]\n    tmpArr[k] = inputArr[k]\n    if (sortByReference) {\n      delete inputArr[k]\n    }\n  }\n  for (i in tmpArr) {\n    if (tmpArr.hasOwnProperty(i)) {\n      populateArr[i] = tmpArr[i]\n    }\n  }\n\n  return sortByReference || populateArr\n}\n"]}