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/asort.js.map
{"version":3,"sources":["../../../src/php/array/asort.js"],"names":["module","exports","asort","inputArr","sortFlags","strnatcmp","require","i18nlgd","valArr","valArrLen","k","i","sorter","sortByReference","populateArr","$global","window","global","$locutus","php","locales","a","b","loc","sorting","aFloat","parseFloat","bFloat","aNumeric","bNumeric","iniVal","undefined","hasOwnProperty","push","sort","length"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,QAAhB,EAA0BC,SAA1B,EAAqC;AACpD;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;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,YAAYC,QAAQ,sBAAR,CAAhB;AACA,MAAIC,UAAUD,QAAQ,8BAAR,CAAd;;AAEA,MAAIE,SAAS,EAAb;AACA,MAAIC,YAAY,CAAhB;AACA,MAAIC,CAAJ;AACA,MAAIC,CAAJ;AACA,MAAIC,MAAJ;AACA,MAAIC,kBAAkB,KAAtB;AACA,MAAIC,cAAc,EAAlB;;AAEA,MA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AOR,IAAIC,CAAJ,GAAQ,CAAR,GAAYD,IAAIC,CAAJ,GAAQ,CAAC,CAAT,GAAa,CAAhC;AACD,OAbD;AAcA;AArCJ;;AAwCA,MAAIQ,SAAS,CAAC,OAAOxB,OAAP,KAAmB,WAAnB,GAAiCA,QAAQ,iBAAR,EAA2B,yBAA3B,CAAjC,GAAyFyB,SAA1F,KAAwG,IAArH;AACAlB,oBAAkBiB,WAAW,IAA7B;AACAhB,gBAAcD,kBAAkBV,QAAlB,GAA6BW,WAA3C;;AAEA;AACA,OAAKJ,CAAL,IAAUP,QAAV,EAAoB;AAClB,QAAIA,SAAS6B,cAAT,CAAwBtB,CAAxB,CAAJ,EAAgC;AAC9BF,aAAOyB,IAAP,CAAY,CAACvB,CAAD,EAAIP,SAASO,CAAT,CAAJ,CAAZ;AACA,UAAIG,eAAJ,EAAqB;AACnB,eAAOV,SAASO,CAAT,CAAP;AACD;AACF;AACF;;AAEDF,SAAO0B,IAAP,CAAY,UAAUb,CAAV,EAAaC,CAAb,EAAgB;AAC1B,WAAOV,OAAOS,EAAE,CAAF,CAAP,EAAaC,EAAE,CAAF,CAAb,CAAP;AACD,GAFD;;AAIA;AACA,OAAKX,IAAI,CAAJ,EAAOF,YAAYD,OAAO2B,MAA/B,EAAuCxB,IAAIF,SAA3C,EAAsDE,GAAtD,EAA2D;AACzDG,gBAAYN,OAAOG,CAAP,EAAU,CAAV,CAAZ,IAA4BH,OAAOG,CAAP,EAAU,CAAV,CAA5B;AACD;;AAED,SAAOE,mBAAmBC,WAA1B;AACD,CArHD","file":"asort.js","sourcesContent":["module.exports = function asort (inputArr, sortFlags) {\n  //  discuss at: http://locutus.io/php/asort/\n  // original by: Brett Zamir (http://brett-zamir.me)\n  // improved by: Brett Zamir (http://brett-zamir.me)\n  // improved by: Brett Zamir (http://brett-zamir.me)\n  // improved by: Theriault (https://github.com/Theriault)\n  //    input by: paulo kuong\n  // bugfixed by: Adam Wallner (http://web2.bitbaro.hu/)\n  //      note 1: SORT_STRING (as well as natsort and natcasesort) might also be\n  //      note 1: integrated into all of these functions by adapting the code at\n  //      note 1: http://sourcefrog.net/projects/natsort/natcompare.js\n  //      note 1: The examples are correct, this is a new way\n  //      note 1: Credits to: http://javascript.internet.com/math-related/bubble-sort.html\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: asort($data)\n  //   example 1: var $result = $data\n  //   returns 1: {c: 'apple', b: 'banana', d: 'lemon', a: 'orange'}\n  //   example 2: ini_set('locutus.sortByReference', true)\n  //   example 2: var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'}\n  //   example 2: asort($data)\n  //   example 2: var $result = $data\n  //   returns 2: {c: 'apple', b: 'banana', d: 'lemon', a: 'orange'}\n\n  var strnatcmp = require('../strings/strnatcmp')\n  var i18nlgd = require('../i18n/i18n_loc_get_default')\n\n  var valArr = []\n  var valArrLen = 0\n  var k\n  var i\n  var sorter\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(a, b)\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.php.locales[loc].sorting\n      break\n    case 'SORT_NUMERIC':\n      // compare items numerically\n      sorter = function (a, b) {\n        return (a - b)\n      }\n      break\n    case 'SORT_REGULAR':\n      // compare items normally (don't change types)\n      break\n    default:\n      sorter = function (a, b) {\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  var iniVal = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.sortByReference') : undefined) || 'on'\n  sortByReference = iniVal === 'on'\n  populateArr = sortByReference ? inputArr : populateArr\n\n  // Get key and value arrays\n  for (k in inputArr) {\n    if (inputArr.hasOwnProperty(k)) {\n      valArr.push([k, inputArr[k]])\n      if (sortByReference) {\n        delete inputArr[k]\n      }\n    }\n  }\n\n  valArr.sort(function (a, b) {\n    return sorter(a[1], b[1])\n  })\n\n  // Repopulate the old array\n  for (i = 0, valArrLen = valArr.length; i < valArrLen; i++) {\n    populateArr[valArr[i][0]] = valArr[i][1]\n  }\n\n  return sortByReference || populateArr\n}\n"]}