2018-12-14 05:41:57 +01:00
|
|
|
this["wp"] = this["wp"] || {}; this["wp"]["date"] =
|
|
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
|
|
/******/ // The module cache
|
|
|
|
/******/ var installedModules = {};
|
|
|
|
/******/
|
|
|
|
/******/ // The require function
|
|
|
|
/******/ function __webpack_require__(moduleId) {
|
|
|
|
/******/
|
|
|
|
/******/ // Check if module is in cache
|
|
|
|
/******/ if(installedModules[moduleId]) {
|
|
|
|
/******/ return installedModules[moduleId].exports;
|
|
|
|
/******/ }
|
|
|
|
/******/ // Create a new module (and put it into the cache)
|
|
|
|
/******/ var module = installedModules[moduleId] = {
|
|
|
|
/******/ i: moduleId,
|
|
|
|
/******/ l: false,
|
|
|
|
/******/ exports: {}
|
|
|
|
/******/ };
|
|
|
|
/******/
|
|
|
|
/******/ // Execute the module function
|
|
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
|
|
/******/
|
|
|
|
/******/ // Flag the module as loaded
|
|
|
|
/******/ module.l = true;
|
|
|
|
/******/
|
|
|
|
/******/ // Return the exports of the module
|
|
|
|
/******/ return module.exports;
|
|
|
|
/******/ }
|
|
|
|
/******/
|
|
|
|
/******/
|
|
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
|
|
/******/ __webpack_require__.m = modules;
|
|
|
|
/******/
|
|
|
|
/******/ // expose the module cache
|
|
|
|
/******/ __webpack_require__.c = installedModules;
|
|
|
|
/******/
|
|
|
|
/******/ // define getter function for harmony exports
|
|
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
|
|
/******/ }
|
|
|
|
/******/ };
|
|
|
|
/******/
|
|
|
|
/******/ // define __esModule on exports
|
|
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
|
/******/ }
|
|
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
/******/ };
|
|
|
|
/******/
|
|
|
|
/******/ // create a fake namespace object
|
|
|
|
/******/ // mode & 1: value is a module id, require it
|
|
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
|
|
/******/ // mode & 4: return value when already ns object
|
|
|
|
/******/ // mode & 8|1: behave like require
|
|
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
|
|
/******/ if(mode & 8) return value;
|
|
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
|
|
/******/ var ns = Object.create(null);
|
|
|
|
/******/ __webpack_require__.r(ns);
|
|
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
|
|
/******/ return ns;
|
|
|
|
/******/ };
|
|
|
|
/******/
|
|
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
|
|
/******/ __webpack_require__.n = function(module) {
|
|
|
|
/******/ var getter = module && module.__esModule ?
|
|
|
|
/******/ function getDefault() { return module['default']; } :
|
|
|
|
/******/ function getModuleExports() { return module; };
|
|
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
|
|
/******/ return getter;
|
|
|
|
/******/ };
|
|
|
|
/******/
|
|
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
|
|
/******/
|
|
|
|
/******/ // __webpack_public_path__
|
|
|
|
/******/ __webpack_require__.p = "";
|
|
|
|
/******/
|
|
|
|
/******/
|
|
|
|
/******/ // Load entry module and return exports
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/******/ return __webpack_require__(__webpack_require__.s = "BWYS");
|
2018-12-14 05:41:57 +01:00
|
|
|
/******/ })
|
|
|
|
/************************************************************************/
|
|
|
|
/******/ ({
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/***/ "4CCe":
|
2018-12-18 04:14:52 +01:00
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//! moment-timezone-utils.js
|
2020-06-26 15:33:47 +02:00
|
|
|
//! version : 0.5.31
|
2019-09-19 17:19:18 +02:00
|
|
|
//! Copyright (c) JS Foundation and other contributors
|
|
|
|
//! license : MIT
|
|
|
|
//! github.com/moment/moment-timezone
|
|
|
|
|
|
|
|
(function (root, factory) {
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
/*global define*/
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if ( true && module.exports) {
|
|
|
|
module.exports = factory(__webpack_require__("f0Wu")); // Node
|
|
|
|
} else if (true) {
|
|
|
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__("wy2R")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
2018-12-14 05:41:57 +01:00
|
|
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
|
|
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
2019-09-19 17:19:18 +02:00
|
|
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); // AMD
|
|
|
|
} else {}
|
|
|
|
}(this, function (moment) {
|
|
|
|
"use strict";
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (!moment.tz) {
|
|
|
|
throw new Error("moment-timezone-utils.js must be loaded after moment-timezone.js");
|
2020-06-26 15:33:47 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/************************************
|
|
|
|
Pack Base 60
|
|
|
|
************************************/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var BASE60 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX',
|
|
|
|
EPSILON = 0.000001; // Used to fix floating point rounding errors
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function packBase60Fraction(fraction, precision) {
|
|
|
|
var buffer = '.',
|
|
|
|
output = '',
|
|
|
|
current;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
while (precision > 0) {
|
|
|
|
precision -= 1;
|
|
|
|
fraction *= 60;
|
|
|
|
current = Math.floor(fraction + EPSILON);
|
|
|
|
buffer += BASE60[current];
|
|
|
|
fraction -= current;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
// Only add buffer to output once we have a non-zero value.
|
|
|
|
// This makes '.000' output '', and '.100' output '.1'
|
|
|
|
if (current) {
|
|
|
|
output += buffer;
|
|
|
|
buffer = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return output;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function packBase60(number, precision) {
|
|
|
|
var output = '',
|
|
|
|
absolute = Math.abs(number),
|
|
|
|
whole = Math.floor(absolute),
|
|
|
|
fraction = packBase60Fraction(absolute - whole, Math.min(~~precision, 10));
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
while (whole > 0) {
|
|
|
|
output = BASE60[whole % 60] + output;
|
|
|
|
whole = Math.floor(whole / 60);
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (number < 0) {
|
|
|
|
output = '-' + output;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (output && fraction) {
|
|
|
|
return output + fraction;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (!fraction && output === '-') {
|
|
|
|
return '0';
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return output || fraction || '0';
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/************************************
|
|
|
|
Pack
|
|
|
|
************************************/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function packUntils(untils) {
|
|
|
|
var out = [],
|
|
|
|
last = 0,
|
|
|
|
i;
|
|
|
|
|
|
|
|
for (i = 0; i < untils.length - 1; i++) {
|
|
|
|
out[i] = packBase60(Math.round((untils[i] - last) / 1000) / 60, 1);
|
|
|
|
last = untils[i];
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return out.join(' ');
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function packAbbrsAndOffsets(source) {
|
|
|
|
var index = 0,
|
|
|
|
abbrs = [],
|
|
|
|
offsets = [],
|
|
|
|
indices = [],
|
|
|
|
map = {},
|
|
|
|
i, key;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < source.abbrs.length; i++) {
|
|
|
|
key = source.abbrs[i] + '|' + source.offsets[i];
|
|
|
|
if (map[key] === undefined) {
|
|
|
|
map[key] = index;
|
|
|
|
abbrs[index] = source.abbrs[i];
|
|
|
|
offsets[index] = packBase60(Math.round(source.offsets[i] * 60) / 60, 1);
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
indices[i] = packBase60(map[key], 0);
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return abbrs.join(' ') + '|' + offsets.join(' ') + '|' + indices.join('');
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function packPopulation (number) {
|
|
|
|
if (!number) {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
if (number < 1000) {
|
|
|
|
return number;
|
|
|
|
}
|
|
|
|
var exponent = String(number | 0).length - 2;
|
|
|
|
var precision = Math.round(number / Math.pow(10, exponent));
|
|
|
|
return precision + 'e' + exponent;
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function packCountries (countries) {
|
|
|
|
if (!countries) {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
return countries.join(' ');
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function validatePackData (source) {
|
|
|
|
if (!source.name) { throw new Error("Missing name"); }
|
|
|
|
if (!source.abbrs) { throw new Error("Missing abbrs"); }
|
|
|
|
if (!source.untils) { throw new Error("Missing untils"); }
|
|
|
|
if (!source.offsets) { throw new Error("Missing offsets"); }
|
|
|
|
if (
|
|
|
|
source.offsets.length !== source.untils.length ||
|
|
|
|
source.offsets.length !== source.abbrs.length
|
|
|
|
) {
|
|
|
|
throw new Error("Mismatched array lengths");
|
|
|
|
}
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function pack (source) {
|
|
|
|
validatePackData(source);
|
|
|
|
return [
|
|
|
|
source.name, // 0 - timezone name
|
|
|
|
packAbbrsAndOffsets(source), // 1 - abbrs, 2 - offsets, 3 - indices
|
|
|
|
packUntils(source.untils), // 4 - untils
|
|
|
|
packPopulation(source.population) // 5 - population
|
|
|
|
].join('|');
|
|
|
|
}
|
|
|
|
|
|
|
|
function packCountry (source) {
|
|
|
|
return [
|
|
|
|
source.name,
|
|
|
|
source.zones.join(' '),
|
|
|
|
].join('|');
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/************************************
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
Create Links
|
2019-09-19 17:19:18 +02:00
|
|
|
************************************/
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function arraysAreEqual(a, b) {
|
|
|
|
var i;
|
|
|
|
|
|
|
|
if (a.length !== b.length) { return false; }
|
|
|
|
|
|
|
|
for (i = 0; i < a.length; i++) {
|
|
|
|
if (a[i] !== b[i]) {
|
|
|
|
return false;
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return true;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function zonesAreEqual(a, b) {
|
|
|
|
return arraysAreEqual(a.offsets, b.offsets) && arraysAreEqual(a.abbrs, b.abbrs) && arraysAreEqual(a.untils, b.untils);
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function findAndCreateLinks (input, output, links, groupLeaders) {
|
|
|
|
var i, j, a, b, group, foundGroup, groups = [];
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < input.length; i++) {
|
|
|
|
foundGroup = false;
|
|
|
|
a = input[i];
|
2020-02-25 01:18:15 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (j = 0; j < groups.length; j++) {
|
|
|
|
group = groups[j];
|
|
|
|
b = group[0];
|
|
|
|
if (zonesAreEqual(a, b)) {
|
|
|
|
if (a.population > b.population) {
|
|
|
|
group.unshift(a);
|
|
|
|
} else if (a.population === b.population && groupLeaders && groupLeaders[a.name]) {
|
|
|
|
group.unshift(a);
|
|
|
|
} else {
|
|
|
|
group.push(a);
|
|
|
|
}
|
|
|
|
foundGroup = true;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (!foundGroup) {
|
|
|
|
groups.push([a]);
|
|
|
|
}
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < groups.length; i++) {
|
|
|
|
group = groups[i];
|
|
|
|
output.push(group[0]);
|
|
|
|
for (j = 1; j < group.length; j++) {
|
|
|
|
links.push(group[0].name + '|' + group[j].name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function createLinks (source, groupLeaders) {
|
|
|
|
var zones = [],
|
|
|
|
links = [];
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (source.links) {
|
|
|
|
links = source.links.slice();
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
findAndCreateLinks(source.zones, zones, links, groupLeaders);
|
2020-02-25 01:18:15 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return {
|
|
|
|
version : source.version,
|
|
|
|
zones : zones,
|
|
|
|
links : links.sort()
|
|
|
|
};
|
2020-02-25 01:18:15 +01:00
|
|
|
}
|
|
|
|
|
2019-09-19 17:19:18 +02:00
|
|
|
/************************************
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
Filter Years
|
2019-09-19 17:19:18 +02:00
|
|
|
************************************/
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function findStartAndEndIndex (untils, start, end) {
|
|
|
|
var startI = 0,
|
|
|
|
endI = untils.length + 1,
|
|
|
|
untilYear,
|
|
|
|
i;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (!end) {
|
|
|
|
end = start;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (start > end) {
|
|
|
|
i = start;
|
|
|
|
start = end;
|
|
|
|
end = i;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < untils.length; i++) {
|
|
|
|
if (untils[i] == null) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
untilYear = new Date(untils[i]).getUTCFullYear();
|
|
|
|
if (untilYear < start) {
|
|
|
|
startI = i + 1;
|
|
|
|
}
|
|
|
|
if (untilYear > end) {
|
|
|
|
endI = Math.min(endI, i + 1);
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return [startI, endI];
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function filterYears (source, start, end) {
|
|
|
|
var slice = Array.prototype.slice,
|
|
|
|
indices = findStartAndEndIndex(source.untils, start, end),
|
|
|
|
untils = slice.apply(source.untils, indices);
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
untils[untils.length - 1] = null;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return {
|
|
|
|
name : source.name,
|
|
|
|
abbrs : slice.apply(source.abbrs, indices),
|
|
|
|
untils : untils,
|
|
|
|
offsets : slice.apply(source.offsets, indices),
|
|
|
|
population : source.population,
|
|
|
|
countries : source.countries
|
|
|
|
};
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/************************************
|
|
|
|
Filter, Link, and Pack
|
|
|
|
************************************/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function filterLinkPack (input, start, end, groupLeaders) {
|
|
|
|
var i,
|
|
|
|
inputZones = input.zones,
|
|
|
|
outputZones = [],
|
|
|
|
output;
|
|
|
|
|
|
|
|
for (i = 0; i < inputZones.length; i++) {
|
|
|
|
outputZones[i] = filterYears(inputZones[i], start, end);
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
output = createLinks({
|
|
|
|
zones : outputZones,
|
|
|
|
links : input.links.slice(),
|
|
|
|
version : input.version
|
|
|
|
}, groupLeaders);
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < output.zones.length; i++) {
|
|
|
|
output.zones[i] = pack(output.zones[i]);
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
output.countries = input.countries ? input.countries.map(function (unpacked) {
|
|
|
|
return packCountry(unpacked);
|
|
|
|
}) : [];
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return output;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/************************************
|
|
|
|
Exports
|
|
|
|
************************************/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
moment.tz.pack = pack;
|
|
|
|
moment.tz.packBase60 = packBase60;
|
|
|
|
moment.tz.createLinks = createLinks;
|
|
|
|
moment.tz.filterYears = filterYears;
|
|
|
|
moment.tz.filterLinkPack = filterLinkPack;
|
|
|
|
moment.tz.packCountry = packCountry;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return moment;
|
|
|
|
}));
|
2019-09-19 17:19:18 +02:00
|
|
|
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/***/ }),
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/***/ "BWYS":
|
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
"use strict";
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSettings", function() { return setSettings; });
|
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__experimentalGetSettings", function() { return __experimentalGetSettings; });
|
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; });
|
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "date", function() { return date; });
|
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gmdate", function() { return gmdate; });
|
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dateI18n", function() { return dateI18n; });
|
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gmdateI18n", function() { return gmdateI18n; });
|
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInTheFuture", function() { return isInTheFuture; });
|
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDate", function() { return getDate; });
|
|
|
|
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wy2R");
|
|
|
|
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
|
/* harmony import */ var moment_timezone_moment_timezone__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Dvum");
|
|
|
|
/* harmony import */ var moment_timezone_moment_timezone__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(moment_timezone_moment_timezone__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
|
/* harmony import */ var moment_timezone_moment_timezone_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("4CCe");
|
|
|
|
/* harmony import */ var moment_timezone_moment_timezone_utils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment_timezone_moment_timezone_utils__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/** @typedef {import('moment').Moment} Moment */
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var WP_ZONE = 'WP'; // This regular expression tests positive for UTC offsets as described in ISO 8601.
|
|
|
|
// See: https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var VALID_UTC_OFFSET = /^[+-][0-1][0-9](:?[0-9][0-9])?$/; // Changes made here will likely need to be made in `lib/client-assets.php` as
|
|
|
|
// well because it uses the `setSettings()` function to change these settings.
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var settings = {
|
|
|
|
l10n: {
|
|
|
|
locale: 'en',
|
|
|
|
months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
|
|
monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
|
|
weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
|
|
weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
|
|
meridiem: {
|
|
|
|
am: 'am',
|
|
|
|
pm: 'pm',
|
|
|
|
AM: 'AM',
|
|
|
|
PM: 'PM'
|
|
|
|
},
|
|
|
|
relative: {
|
|
|
|
future: '%s from now',
|
|
|
|
past: '%s ago',
|
|
|
|
s: 'a few seconds',
|
|
|
|
ss: '%d seconds',
|
|
|
|
m: 'a minute',
|
|
|
|
mm: '%d minutes',
|
|
|
|
h: 'an hour',
|
|
|
|
hh: '%d hours',
|
|
|
|
d: 'a day',
|
|
|
|
dd: '%d days',
|
|
|
|
M: 'a month',
|
|
|
|
MM: '%d months',
|
|
|
|
y: 'a year',
|
|
|
|
yy: '%d years'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
formats: {
|
|
|
|
time: 'g: i a',
|
|
|
|
date: 'F j, Y',
|
|
|
|
datetime: 'F j, Y g: i a',
|
|
|
|
datetimeAbbreviated: 'M j, Y g: i a'
|
|
|
|
},
|
|
|
|
timezone: {
|
|
|
|
offset: '0',
|
|
|
|
string: ''
|
|
|
|
}
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Adds a locale to moment, using the format supplied by `wp_localize_script()`.
|
|
|
|
*
|
|
|
|
* @param {Object} dateSettings Settings, including locale data.
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function setSettings(dateSettings) {
|
|
|
|
settings = dateSettings; // Backup and restore current locale.
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var currentLocale = moment__WEBPACK_IMPORTED_MODULE_0___default.a.locale();
|
|
|
|
moment__WEBPACK_IMPORTED_MODULE_0___default.a.updateLocale(dateSettings.l10n.locale, {
|
|
|
|
// Inherit anything missing from the default locale.
|
|
|
|
parentLocale: currentLocale,
|
|
|
|
months: dateSettings.l10n.months,
|
|
|
|
monthsShort: dateSettings.l10n.monthsShort,
|
|
|
|
weekdays: dateSettings.l10n.weekdays,
|
|
|
|
weekdaysShort: dateSettings.l10n.weekdaysShort,
|
|
|
|
meridiem: function meridiem(hour, minute, isLowercase) {
|
|
|
|
if (hour < 12) {
|
|
|
|
return isLowercase ? dateSettings.l10n.meridiem.am : dateSettings.l10n.meridiem.AM;
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return isLowercase ? dateSettings.l10n.meridiem.pm : dateSettings.l10n.meridiem.PM;
|
|
|
|
},
|
|
|
|
longDateFormat: {
|
|
|
|
LT: dateSettings.formats.time,
|
|
|
|
LTS: null,
|
|
|
|
L: null,
|
|
|
|
LL: dateSettings.formats.date,
|
|
|
|
LLL: dateSettings.formats.datetime,
|
|
|
|
LLLL: null
|
|
|
|
},
|
|
|
|
// From human_time_diff?
|
|
|
|
// Set to `(number, withoutSuffix, key, isFuture) => {}` instead.
|
|
|
|
relativeTime: dateSettings.l10n.relative
|
|
|
|
});
|
|
|
|
moment__WEBPACK_IMPORTED_MODULE_0___default.a.locale(currentLocale);
|
|
|
|
setupWPTimezone();
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Returns the currently defined date settings.
|
|
|
|
*
|
|
|
|
* @return {Object} Settings, including locale data.
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function __experimentalGetSettings() {
|
|
|
|
return settings;
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function setupWPTimezone() {
|
|
|
|
// Create WP timezone based off dateSettings.
|
|
|
|
moment__WEBPACK_IMPORTED_MODULE_0___default.a.tz.add(moment__WEBPACK_IMPORTED_MODULE_0___default.a.tz.pack({
|
|
|
|
name: WP_ZONE,
|
|
|
|
abbrs: [WP_ZONE],
|
|
|
|
untils: [null],
|
|
|
|
offsets: [-settings.timezone.offset * 60 || 0]
|
|
|
|
}));
|
|
|
|
} // Date constants.
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/**
|
|
|
|
* Number of seconds in one minute.
|
|
|
|
*
|
|
|
|
* @type {number}
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var MINUTE_IN_SECONDS = 60;
|
|
|
|
/**
|
|
|
|
* Number of minutes in one hour.
|
|
|
|
*
|
|
|
|
* @type {number}
|
|
|
|
*/
|
2020-02-25 01:18:15 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var HOUR_IN_MINUTES = 60;
|
|
|
|
/**
|
|
|
|
* Number of seconds in one hour.
|
|
|
|
*
|
|
|
|
* @type {number}
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var HOUR_IN_SECONDS = 60 * MINUTE_IN_SECONDS;
|
|
|
|
/**
|
|
|
|
* Map of PHP formats to Moment.js formats.
|
|
|
|
*
|
|
|
|
* These are used internally by {@link wp.date.format}, and are either
|
|
|
|
* a string representing the corresponding Moment.js format code, or a
|
|
|
|
* function which returns the formatted string.
|
|
|
|
*
|
|
|
|
* This should only be used through {@link wp.date.format}, not
|
|
|
|
* directly.
|
|
|
|
*
|
|
|
|
* @type {Object}
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var formatMap = {
|
|
|
|
// Day
|
|
|
|
d: 'DD',
|
|
|
|
D: 'ddd',
|
|
|
|
j: 'D',
|
|
|
|
l: 'dddd',
|
|
|
|
N: 'E',
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/**
|
|
|
|
* Gets the ordinal suffix.
|
|
|
|
*
|
|
|
|
* @param {Moment} momentDate Moment instance.
|
|
|
|
*
|
|
|
|
* @return {string} Formatted date.
|
|
|
|
*/
|
|
|
|
S: function S(momentDate) {
|
|
|
|
// Do - D
|
|
|
|
var num = momentDate.format('D');
|
|
|
|
var withOrdinal = momentDate.format('Do');
|
|
|
|
return withOrdinal.replace(num, '');
|
|
|
|
},
|
|
|
|
w: 'd',
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/**
|
|
|
|
* Gets the day of the year (zero-indexed).
|
|
|
|
*
|
|
|
|
* @param {Moment} momentDate Moment instance.
|
|
|
|
*
|
|
|
|
* @return {string} Formatted date.
|
|
|
|
*/
|
|
|
|
z: function z(momentDate) {
|
|
|
|
// DDD - 1
|
|
|
|
return '' + parseInt(momentDate.format('DDD'), 10) - 1;
|
|
|
|
},
|
|
|
|
// Week
|
|
|
|
W: 'W',
|
|
|
|
// Month
|
|
|
|
F: 'MMMM',
|
|
|
|
m: 'MM',
|
|
|
|
M: 'MMM',
|
|
|
|
n: 'M',
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/**
|
|
|
|
* Gets the days in the month.
|
|
|
|
*
|
|
|
|
* @param {Moment} momentDate Moment instance.
|
|
|
|
*
|
|
|
|
* @return {string} Formatted date.
|
|
|
|
*/
|
|
|
|
t: function t(momentDate) {
|
|
|
|
return momentDate.daysInMonth();
|
|
|
|
},
|
|
|
|
// Year
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/**
|
|
|
|
* Gets whether the current year is a leap year.
|
|
|
|
*
|
|
|
|
* @param {Moment} momentDate Moment instance.
|
|
|
|
*
|
|
|
|
* @return {string} Formatted date.
|
|
|
|
*/
|
|
|
|
L: function L(momentDate) {
|
|
|
|
return momentDate.isLeapYear() ? '1' : '0';
|
|
|
|
},
|
|
|
|
o: 'GGGG',
|
|
|
|
Y: 'YYYY',
|
|
|
|
y: 'YY',
|
|
|
|
// Time
|
|
|
|
a: 'a',
|
|
|
|
A: 'A',
|
2020-02-25 01:18:15 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/**
|
|
|
|
* Gets the current time in Swatch Internet Time (.beats).
|
|
|
|
*
|
|
|
|
* @param {Moment} momentDate Moment instance.
|
|
|
|
*
|
|
|
|
* @return {string} Formatted date.
|
|
|
|
*/
|
|
|
|
B: function B(momentDate) {
|
|
|
|
var timezoned = moment__WEBPACK_IMPORTED_MODULE_0___default()(momentDate).utcOffset(60);
|
|
|
|
var seconds = parseInt(timezoned.format('s'), 10),
|
|
|
|
minutes = parseInt(timezoned.format('m'), 10),
|
|
|
|
hours = parseInt(timezoned.format('H'), 10);
|
|
|
|
return parseInt((seconds + minutes * MINUTE_IN_SECONDS + hours * HOUR_IN_SECONDS) / 86.4, 10);
|
|
|
|
},
|
|
|
|
g: 'h',
|
|
|
|
G: 'H',
|
|
|
|
h: 'hh',
|
|
|
|
H: 'HH',
|
|
|
|
i: 'mm',
|
|
|
|
s: 'ss',
|
|
|
|
u: 'SSSSSS',
|
|
|
|
v: 'SSS',
|
|
|
|
// Timezone
|
|
|
|
e: 'zz',
|
2020-02-25 01:18:15 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/**
|
|
|
|
* Gets whether the timezone is in DST currently.
|
|
|
|
*
|
|
|
|
* @param {Moment} momentDate Moment instance.
|
|
|
|
*
|
|
|
|
* @return {string} Formatted date.
|
|
|
|
*/
|
|
|
|
I: function I(momentDate) {
|
|
|
|
return momentDate.isDST() ? '1' : '0';
|
|
|
|
},
|
|
|
|
O: 'ZZ',
|
|
|
|
P: 'Z',
|
|
|
|
T: 'z',
|
2020-02-25 01:18:15 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/**
|
|
|
|
* Gets the timezone offset in seconds.
|
|
|
|
*
|
|
|
|
* @param {Moment} momentDate Moment instance.
|
|
|
|
*
|
|
|
|
* @return {string} Formatted date.
|
|
|
|
*/
|
|
|
|
Z: function Z(momentDate) {
|
|
|
|
// Timezone offset in seconds.
|
|
|
|
var offset = momentDate.format('Z');
|
|
|
|
var sign = offset[0] === '-' ? -1 : 1;
|
|
|
|
var parts = offset.substring(1).split(':');
|
|
|
|
return sign * (parts[0] * HOUR_IN_MINUTES + parts[1]) * MINUTE_IN_SECONDS;
|
|
|
|
},
|
|
|
|
// Full date/time
|
|
|
|
c: 'YYYY-MM-DDTHH:mm:ssZ',
|
|
|
|
// .toISOString
|
|
|
|
r: 'ddd, D MMM YYYY HH:mm:ss ZZ',
|
|
|
|
U: 'X'
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Formats a date. Does not alter the date's timezone.
|
|
|
|
*
|
|
|
|
* @param {string} dateFormat PHP-style formatting string.
|
|
|
|
* See php.net/date.
|
|
|
|
* @param {Date|string|Moment|null} dateValue Date object or string,
|
|
|
|
* parsable by moment.js.
|
|
|
|
*
|
|
|
|
* @return {string} Formatted date.
|
|
|
|
*/
|
2020-02-25 01:18:15 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function format(dateFormat) {
|
|
|
|
var dateValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
|
|
|
|
var i, char;
|
|
|
|
var newFormat = [];
|
|
|
|
var momentDate = moment__WEBPACK_IMPORTED_MODULE_0___default()(dateValue);
|
2020-02-25 01:18:15 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < dateFormat.length; i++) {
|
|
|
|
char = dateFormat[i]; // Is this an escape?
|
2020-02-25 01:18:15 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if ('\\' === char) {
|
|
|
|
// Add next character, then move on.
|
|
|
|
i++;
|
|
|
|
newFormat.push('[' + dateFormat[i] + ']');
|
|
|
|
continue;
|
|
|
|
}
|
2020-02-25 01:18:15 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (char in formatMap) {
|
|
|
|
if (typeof formatMap[char] !== 'string') {
|
|
|
|
// If the format is a function, call it.
|
|
|
|
newFormat.push('[' + formatMap[char](momentDate) + ']');
|
|
|
|
} else {
|
|
|
|
// Otherwise, add as a formatting string.
|
|
|
|
newFormat.push(formatMap[char]);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
newFormat.push('[' + char + ']');
|
|
|
|
}
|
|
|
|
} // Join with [] between to separate characters, and replace
|
|
|
|
// unneeded separators with static text.
|
2019-09-19 17:19:18 +02:00
|
|
|
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
newFormat = newFormat.join('[]');
|
|
|
|
return momentDate.format(newFormat);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Formats a date (like `date()` in PHP).
|
|
|
|
*
|
|
|
|
* @param {string} dateFormat PHP-style formatting string.
|
|
|
|
* See php.net/date.
|
|
|
|
* @param {Date|string|Moment|null} dateValue Date object or string, parsable
|
|
|
|
* by moment.js.
|
|
|
|
* @param {string|number|null} timezone Timezone to output result in or a
|
|
|
|
* UTC offset. Defaults to timezone from
|
|
|
|
* site.
|
|
|
|
*
|
|
|
|
* @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
|
|
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC
|
|
|
|
*
|
|
|
|
* @return {string} Formatted date in English.
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function date(dateFormat) {
|
|
|
|
var dateValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
|
|
|
|
var timezone = arguments.length > 2 ? arguments[2] : undefined;
|
|
|
|
var dateMoment = buildMoment(dateValue, timezone);
|
|
|
|
return format(dateFormat, dateMoment);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Formats a date (like `date()` in PHP), in the UTC timezone.
|
|
|
|
*
|
|
|
|
* @param {string} dateFormat PHP-style formatting string.
|
|
|
|
* See php.net/date.
|
|
|
|
* @param {Date|string|Moment|null} dateValue Date object or string,
|
|
|
|
* parsable by moment.js.
|
|
|
|
*
|
|
|
|
* @return {string} Formatted date in English.
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function gmdate(dateFormat) {
|
|
|
|
var dateValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
|
|
|
|
var dateMoment = moment__WEBPACK_IMPORTED_MODULE_0___default()(dateValue).utc();
|
|
|
|
return format(dateFormat, dateMoment);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Formats a date (like `wp_date()` in PHP), translating it into site's locale.
|
|
|
|
*
|
|
|
|
* Backward Compatibility Notice: if `timezone` is set to `true`, the function
|
|
|
|
* behaves like `gmdateI18n`.
|
|
|
|
*
|
|
|
|
* @param {string} dateFormat PHP-style formatting string.
|
|
|
|
* See php.net/date.
|
|
|
|
* @param {Date|string|Moment|null} dateValue Date object or string, parsable by
|
|
|
|
* moment.js.
|
|
|
|
* @param {string|number|boolean|null} timezone Timezone to output result in or a
|
|
|
|
* UTC offset. Defaults to timezone from
|
|
|
|
* site. Notice: `boolean` is effectively
|
|
|
|
* deprecated, but still supported for
|
|
|
|
* backward compatibility reasons.
|
|
|
|
*
|
|
|
|
* @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
|
|
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC
|
|
|
|
*
|
|
|
|
* @return {string} Formatted date.
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function dateI18n(dateFormat) {
|
|
|
|
var dateValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
|
|
|
|
var timezone = arguments.length > 2 ? arguments[2] : undefined;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (true === timezone) {
|
|
|
|
return gmdateI18n(dateFormat, dateValue);
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (false === timezone) {
|
|
|
|
timezone = undefined;
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var dateMoment = buildMoment(dateValue, timezone);
|
|
|
|
dateMoment.locale(settings.l10n.locale);
|
|
|
|
return format(dateFormat, dateMoment);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Formats a date (like `wp_date()` in PHP), translating it into site's locale
|
|
|
|
* and using the UTC timezone.
|
|
|
|
*
|
|
|
|
* @param {string} dateFormat PHP-style formatting string.
|
|
|
|
* See php.net/date.
|
|
|
|
* @param {Date|string|Moment|null} dateValue Date object or string,
|
|
|
|
* parsable by moment.js.
|
|
|
|
*
|
|
|
|
* @return {string} Formatted date.
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function gmdateI18n(dateFormat) {
|
|
|
|
var dateValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date();
|
|
|
|
var dateMoment = moment__WEBPACK_IMPORTED_MODULE_0___default()(dateValue).utc();
|
|
|
|
dateMoment.locale(settings.l10n.locale);
|
|
|
|
return format(dateFormat, dateMoment);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Check whether a date is considered in the future according to the WordPress settings.
|
|
|
|
*
|
|
|
|
* @param {string} dateValue Date String or Date object in the Defined WP Timezone.
|
|
|
|
*
|
|
|
|
* @return {boolean} Is in the future.
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function isInTheFuture(dateValue) {
|
|
|
|
var now = moment__WEBPACK_IMPORTED_MODULE_0___default.a.tz(WP_ZONE);
|
|
|
|
var momentObject = moment__WEBPACK_IMPORTED_MODULE_0___default.a.tz(dateValue, WP_ZONE);
|
|
|
|
return momentObject.isAfter(now);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Create and return a JavaScript Date Object from a date string in the WP timezone.
|
|
|
|
*
|
|
|
|
* @param {string?} dateString Date formatted in the WP timezone.
|
|
|
|
*
|
|
|
|
* @return {Date} Date
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function getDate(dateString) {
|
|
|
|
if (!dateString) {
|
|
|
|
return moment__WEBPACK_IMPORTED_MODULE_0___default.a.tz(WP_ZONE).toDate();
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return moment__WEBPACK_IMPORTED_MODULE_0___default.a.tz(dateString, WP_ZONE).toDate();
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Creates a moment instance using the given timezone or, if none is provided, using global settings.
|
|
|
|
*
|
|
|
|
* @param {Date|string|Moment|null} dateValue Date object or string, parsable
|
|
|
|
* by moment.js.
|
|
|
|
* @param {string|number|null} timezone Timezone to output result in or a
|
|
|
|
* UTC offset. Defaults to timezone from
|
|
|
|
* site.
|
|
|
|
*
|
|
|
|
* @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
|
|
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC
|
|
|
|
*
|
|
|
|
* @return {Moment} a moment instance.
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function buildMoment(dateValue) {
|
|
|
|
var timezone = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
|
|
var dateMoment = moment__WEBPACK_IMPORTED_MODULE_0___default()(dateValue);
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (timezone && !isUTCOffset(timezone)) {
|
|
|
|
return dateMoment.tz(timezone);
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (timezone && isUTCOffset(timezone)) {
|
|
|
|
return dateMoment.utcOffset(timezone);
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (settings.timezone.string) {
|
|
|
|
return dateMoment.tz(settings.timezone.string);
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return dateMoment.utcOffset(settings.timezone.offset);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Returns whether a certain UTC offset is valid or not.
|
|
|
|
*
|
|
|
|
* @param {number|string} offset a UTC offset.
|
|
|
|
*
|
|
|
|
* @return {boolean} whether a certain UTC offset is valid or not.
|
|
|
|
*/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function isUTCOffset(offset) {
|
|
|
|
if ('number' === typeof offset) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return VALID_UTC_OFFSET.test(offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
setupWPTimezone();
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
/***/ "Dvum":
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//! moment-timezone.js
|
|
|
|
//! version : 0.5.31
|
|
|
|
//! Copyright (c) JS Foundation and other contributors
|
|
|
|
//! license : MIT
|
|
|
|
//! github.com/moment/moment-timezone
|
|
|
|
|
|
|
|
(function (root, factory) {
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
/*global define*/
|
|
|
|
if ( true && module.exports) {
|
|
|
|
module.exports = factory(__webpack_require__("wy2R")); // Node
|
|
|
|
} else if (true) {
|
|
|
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__("wy2R")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
|
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
|
|
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
|
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); // AMD
|
|
|
|
} else {}
|
|
|
|
}(this, function (moment) {
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
// Resolves es6 module loading issue
|
|
|
|
if (moment.version === undefined && moment.default) {
|
|
|
|
moment = moment.default;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
// Do not load moment-timezone a second time.
|
|
|
|
// if (moment.tz !== undefined) {
|
|
|
|
// logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);
|
|
|
|
// return moment;
|
|
|
|
// }
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var VERSION = "0.5.31",
|
|
|
|
zones = {},
|
|
|
|
links = {},
|
|
|
|
countries = {},
|
|
|
|
names = {},
|
|
|
|
guesses = {},
|
|
|
|
cachedGuess;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (!moment || typeof moment.version !== 'string') {
|
|
|
|
logError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/');
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var momentVersion = moment.version.split('.'),
|
|
|
|
major = +momentVersion[0],
|
|
|
|
minor = +momentVersion[1];
|
2018-12-18 04:14:52 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
// Moment.js version check
|
|
|
|
if (major < 2 || (major === 2 && minor < 6)) {
|
|
|
|
logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/************************************
|
|
|
|
Unpacking
|
|
|
|
************************************/
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function charCodeToInt(charCode) {
|
|
|
|
if (charCode > 96) {
|
|
|
|
return charCode - 87;
|
|
|
|
} else if (charCode > 64) {
|
|
|
|
return charCode - 29;
|
|
|
|
}
|
|
|
|
return charCode - 48;
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function unpackBase60(string) {
|
|
|
|
var i = 0,
|
|
|
|
parts = string.split('.'),
|
|
|
|
whole = parts[0],
|
|
|
|
fractional = parts[1] || '',
|
|
|
|
multiplier = 1,
|
|
|
|
num,
|
|
|
|
out = 0,
|
|
|
|
sign = 1;
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
// handle negative numbers
|
|
|
|
if (string.charCodeAt(0) === 45) {
|
|
|
|
i = 1;
|
|
|
|
sign = -1;
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
// handle digits before the decimal
|
|
|
|
for (i; i < whole.length; i++) {
|
|
|
|
num = charCodeToInt(whole.charCodeAt(i));
|
|
|
|
out = 60 * out + num;
|
|
|
|
}
|
2020-01-08 12:57:23 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
// handle digits after the decimal
|
|
|
|
for (i = 0; i < fractional.length; i++) {
|
|
|
|
multiplier = multiplier / 60;
|
|
|
|
num = charCodeToInt(fractional.charCodeAt(i));
|
|
|
|
out += num * multiplier;
|
|
|
|
}
|
2020-06-26 15:33:47 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return out * sign;
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function arrayToInt (array) {
|
|
|
|
for (var i = 0; i < array.length; i++) {
|
|
|
|
array[i] = unpackBase60(array[i]);
|
|
|
|
}
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function intToUntil (array, length) {
|
|
|
|
for (var i = 0; i < length; i++) {
|
|
|
|
array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
array[length - 1] = Infinity;
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function mapIndices (source, indices) {
|
|
|
|
var out = [], i;
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < indices.length; i++) {
|
|
|
|
out[i] = source[indices[i]];
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return out;
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function unpack (string) {
|
|
|
|
var data = string.split('|'),
|
|
|
|
offsets = data[2].split(' '),
|
|
|
|
indices = data[3].split(''),
|
|
|
|
untils = data[4].split(' ');
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
arrayToInt(offsets);
|
|
|
|
arrayToInt(indices);
|
|
|
|
arrayToInt(untils);
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
intToUntil(untils, indices.length);
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return {
|
|
|
|
name : data[0],
|
|
|
|
abbrs : mapIndices(data[1].split(' '), indices),
|
|
|
|
offsets : mapIndices(offsets, indices),
|
|
|
|
untils : untils,
|
|
|
|
population : data[5] | 0
|
|
|
|
};
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/************************************
|
|
|
|
Zone object
|
|
|
|
************************************/
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function Zone (packedString) {
|
|
|
|
if (packedString) {
|
|
|
|
this._set(unpack(packedString));
|
|
|
|
}
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
Zone.prototype = {
|
|
|
|
_set : function (unpacked) {
|
|
|
|
this.name = unpacked.name;
|
|
|
|
this.abbrs = unpacked.abbrs;
|
|
|
|
this.untils = unpacked.untils;
|
|
|
|
this.offsets = unpacked.offsets;
|
|
|
|
this.population = unpacked.population;
|
|
|
|
},
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
_index : function (timestamp) {
|
|
|
|
var target = +timestamp,
|
|
|
|
untils = this.untils,
|
|
|
|
i;
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < untils.length; i++) {
|
|
|
|
if (target < untils[i]) {
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2018-12-18 04:14:52 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
countries : function () {
|
|
|
|
var zone_name = this.name;
|
|
|
|
return Object.keys(countries).filter(function (country_code) {
|
|
|
|
return countries[country_code].zones.indexOf(zone_name) !== -1;
|
|
|
|
});
|
|
|
|
},
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
parse : function (timestamp) {
|
|
|
|
var target = +timestamp,
|
|
|
|
offsets = this.offsets,
|
|
|
|
untils = this.untils,
|
|
|
|
max = untils.length - 1,
|
|
|
|
offset, offsetNext, offsetPrev, i;
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < max; i++) {
|
|
|
|
offset = offsets[i];
|
|
|
|
offsetNext = offsets[i + 1];
|
|
|
|
offsetPrev = offsets[i ? i - 1 : i];
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (offset < offsetNext && tz.moveAmbiguousForward) {
|
|
|
|
offset = offsetNext;
|
|
|
|
} else if (offset > offsetPrev && tz.moveInvalidForward) {
|
|
|
|
offset = offsetPrev;
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (target < untils[i] - (offset * 60000)) {
|
|
|
|
return offsets[i];
|
|
|
|
}
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return offsets[max];
|
|
|
|
},
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
abbr : function (mom) {
|
|
|
|
return this.abbrs[this._index(mom)];
|
|
|
|
},
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
offset : function (mom) {
|
|
|
|
logError("zone.offset has been deprecated in favor of zone.utcOffset");
|
|
|
|
return this.offsets[this._index(mom)];
|
|
|
|
},
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
utcOffset : function (mom) {
|
|
|
|
return this.offsets[this._index(mom)];
|
|
|
|
}
|
|
|
|
};
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/************************************
|
|
|
|
Country object
|
|
|
|
************************************/
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function Country (country_name, zone_names) {
|
|
|
|
this.name = country_name;
|
|
|
|
this.zones = zone_names;
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/************************************
|
|
|
|
Current Timezone
|
|
|
|
************************************/
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function OffsetAt(at) {
|
|
|
|
var timeString = at.toTimeString();
|
|
|
|
var abbr = timeString.match(/\([a-z ]+\)/i);
|
|
|
|
if (abbr && abbr[0]) {
|
|
|
|
// 17:56:31 GMT-0600 (CST)
|
|
|
|
// 17:56:31 GMT-0600 (Central Standard Time)
|
|
|
|
abbr = abbr[0].match(/[A-Z]/g);
|
|
|
|
abbr = abbr ? abbr.join('') : undefined;
|
|
|
|
} else {
|
|
|
|
// 17:56:31 CST
|
|
|
|
// 17:56:31 GMT+0800 (台北標準時間)
|
|
|
|
abbr = timeString.match(/[A-Z]{3,5}/g);
|
|
|
|
abbr = abbr ? abbr[0] : undefined;
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (abbr === 'GMT') {
|
|
|
|
abbr = undefined;
|
|
|
|
}
|
2020-06-26 15:33:47 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
this.at = +at;
|
|
|
|
this.abbr = abbr;
|
|
|
|
this.offset = at.getTimezoneOffset();
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function ZoneScore(zone) {
|
|
|
|
this.zone = zone;
|
|
|
|
this.offsetScore = 0;
|
|
|
|
this.abbrScore = 0;
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
ZoneScore.prototype.scoreOffsetAt = function (offsetAt) {
|
|
|
|
this.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset);
|
|
|
|
if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) {
|
|
|
|
this.abbrScore++;
|
|
|
|
}
|
|
|
|
};
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function findChange(low, high) {
|
|
|
|
var mid, diff;
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
while ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {
|
|
|
|
mid = new OffsetAt(new Date(low.at + diff));
|
|
|
|
if (mid.offset === low.offset) {
|
|
|
|
low = mid;
|
|
|
|
} else {
|
|
|
|
high = mid;
|
|
|
|
}
|
|
|
|
}
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return low;
|
|
|
|
}
|
2020-06-26 15:33:47 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function userOffsets() {
|
|
|
|
var startYear = new Date().getFullYear() - 2,
|
|
|
|
last = new OffsetAt(new Date(startYear, 0, 1)),
|
|
|
|
offsets = [last],
|
|
|
|
change, next, i;
|
2020-06-26 15:33:47 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 1; i < 48; i++) {
|
|
|
|
next = new OffsetAt(new Date(startYear, i, 1));
|
|
|
|
if (next.offset !== last.offset) {
|
|
|
|
change = findChange(last, next);
|
|
|
|
offsets.push(change);
|
|
|
|
offsets.push(new OffsetAt(new Date(change.at + 6e4)));
|
|
|
|
}
|
|
|
|
last = next;
|
|
|
|
}
|
2020-06-26 15:33:47 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < 4; i++) {
|
|
|
|
offsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));
|
|
|
|
offsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));
|
|
|
|
}
|
2020-06-26 15:33:47 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return offsets;
|
|
|
|
}
|
2020-06-26 15:33:47 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function sortZoneScores (a, b) {
|
|
|
|
if (a.offsetScore !== b.offsetScore) {
|
|
|
|
return a.offsetScore - b.offsetScore;
|
|
|
|
}
|
|
|
|
if (a.abbrScore !== b.abbrScore) {
|
|
|
|
return a.abbrScore - b.abbrScore;
|
|
|
|
}
|
|
|
|
if (a.zone.population !== b.zone.population) {
|
|
|
|
return b.zone.population - a.zone.population;
|
|
|
|
}
|
|
|
|
return b.zone.name.localeCompare(a.zone.name);
|
|
|
|
}
|
|
|
|
|
|
|
|
function addToGuesses (name, offsets) {
|
|
|
|
var i, offset;
|
|
|
|
arrayToInt(offsets);
|
|
|
|
for (i = 0; i < offsets.length; i++) {
|
|
|
|
offset = offsets[i];
|
|
|
|
guesses[offset] = guesses[offset] || {};
|
|
|
|
guesses[offset][name] = true;
|
|
|
|
}
|
|
|
|
}
|
2020-06-26 15:33:47 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function guessesForUserOffsets (offsets) {
|
|
|
|
var offsetsLength = offsets.length,
|
|
|
|
filteredGuesses = {},
|
|
|
|
out = [],
|
|
|
|
i, j, guessesOffset;
|
2020-06-26 15:33:47 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < offsetsLength; i++) {
|
|
|
|
guessesOffset = guesses[offsets[i].offset] || {};
|
|
|
|
for (j in guessesOffset) {
|
|
|
|
if (guessesOffset.hasOwnProperty(j)) {
|
|
|
|
filteredGuesses[j] = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-26 15:33:47 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i in filteredGuesses) {
|
|
|
|
if (filteredGuesses.hasOwnProperty(i)) {
|
|
|
|
out.push(names[i]);
|
|
|
|
}
|
|
|
|
}
|
2020-06-26 15:33:47 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return out;
|
|
|
|
}
|
2018-12-18 04:14:52 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function rebuildGuess () {
|
2018-12-18 04:14:52 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
// use Intl API when available and returning valid time zone
|
|
|
|
try {
|
|
|
|
var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
|
|
if (intlName && intlName.length > 3) {
|
|
|
|
var name = names[normalizeName(intlName)];
|
|
|
|
if (name) {
|
|
|
|
return name;
|
|
|
|
}
|
|
|
|
logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded.");
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
// Intl unavailable, fall back to manual guessing.
|
|
|
|
}
|
2018-12-18 04:14:52 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var offsets = userOffsets(),
|
|
|
|
offsetsLength = offsets.length,
|
|
|
|
guesses = guessesForUserOffsets(offsets),
|
|
|
|
zoneScores = [],
|
|
|
|
zoneScore, i, j;
|
2018-12-18 04:14:52 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < guesses.length; i++) {
|
|
|
|
zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);
|
|
|
|
for (j = 0; j < offsetsLength; j++) {
|
|
|
|
zoneScore.scoreOffsetAt(offsets[j]);
|
|
|
|
}
|
|
|
|
zoneScores.push(zoneScore);
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
zoneScores.sort(sortZoneScores);
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function guess (ignoreCache) {
|
|
|
|
if (!cachedGuess || ignoreCache) {
|
|
|
|
cachedGuess = rebuildGuess();
|
|
|
|
}
|
|
|
|
return cachedGuess;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/************************************
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
Global Methods
|
2019-09-19 17:19:18 +02:00
|
|
|
************************************/
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function normalizeName (name) {
|
|
|
|
return (name || '').toLowerCase().replace(/\//g, '_');
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function addZone (packed) {
|
|
|
|
var i, name, split, normalized;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (typeof packed === "string") {
|
|
|
|
packed = [packed];
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < packed.length; i++) {
|
|
|
|
split = packed[i].split('|');
|
|
|
|
name = split[0];
|
|
|
|
normalized = normalizeName(name);
|
|
|
|
zones[normalized] = packed[i];
|
|
|
|
names[normalized] = name;
|
|
|
|
addToGuesses(normalized, split[2].split(' '));
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function getZone (name, caller) {
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
name = normalizeName(name);
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var zone = zones[name];
|
|
|
|
var link;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (zone instanceof Zone) {
|
|
|
|
return zone;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (typeof zone === 'string') {
|
|
|
|
zone = new Zone(zone);
|
|
|
|
zones[name] = zone;
|
|
|
|
return zone;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
// Pass getZone to prevent recursion more than 1 level deep
|
|
|
|
if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {
|
|
|
|
zone = zones[name] = new Zone();
|
|
|
|
zone._set(link);
|
|
|
|
zone.name = names[name];
|
|
|
|
return zone;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return null;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function getNames () {
|
|
|
|
var i, out = [];
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i in names) {
|
|
|
|
if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {
|
|
|
|
out.push(names[i]);
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return out.sort();
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function getCountryNames () {
|
|
|
|
return Object.keys(countries);
|
2020-02-25 01:18:15 +01:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function addLink (aliases) {
|
|
|
|
var i, alias, normal0, normal1;
|
|
|
|
|
|
|
|
if (typeof aliases === "string") {
|
|
|
|
aliases = [aliases];
|
2020-02-25 01:18:15 +01:00
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
for (i = 0; i < aliases.length; i++) {
|
|
|
|
alias = aliases[i].split('|');
|
|
|
|
|
|
|
|
normal0 = normalizeName(alias[0]);
|
|
|
|
normal1 = normalizeName(alias[1]);
|
|
|
|
|
|
|
|
links[normal0] = normal1;
|
|
|
|
names[normal0] = alias[0];
|
|
|
|
|
|
|
|
links[normal1] = normal0;
|
|
|
|
names[normal1] = alias[1];
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function addCountries (data) {
|
|
|
|
var i, country_code, country_zones, split;
|
|
|
|
if (!data || !data.length) return;
|
|
|
|
for (i = 0; i < data.length; i++) {
|
|
|
|
split = data[i].split('|');
|
|
|
|
country_code = split[0].toUpperCase();
|
|
|
|
country_zones = split[1].split(' ');
|
|
|
|
countries[country_code] = new Country(
|
|
|
|
country_code,
|
|
|
|
country_zones
|
|
|
|
);
|
|
|
|
}
|
2020-02-25 01:18:15 +01:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function getCountry (name) {
|
|
|
|
name = name.toUpperCase();
|
|
|
|
return countries[name] || null;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function zonesForCountry(country, with_offset) {
|
|
|
|
country = getCountry(country);
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (!country) return null;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var zones = country.zones.sort();
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (with_offset) {
|
|
|
|
return zones.map(function (zone_name) {
|
|
|
|
var zone = getZone(zone_name);
|
|
|
|
return {
|
|
|
|
name: zone_name,
|
|
|
|
offset: zone.utcOffset(new Date())
|
|
|
|
};
|
|
|
|
});
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return zones;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function loadData (data) {
|
|
|
|
addZone(data.zones);
|
|
|
|
addLink(data.links);
|
|
|
|
addCountries(data.countries);
|
|
|
|
tz.dataVersion = data.version;
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function zoneExists (name) {
|
|
|
|
if (!zoneExists.didShowError) {
|
|
|
|
zoneExists.didShowError = true;
|
|
|
|
logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')");
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return !!getZone(name);
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function needsOffset (m) {
|
|
|
|
var isUnixTimestamp = (m._f === 'X' || m._f === 'x');
|
|
|
|
return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);
|
|
|
|
}
|
|
|
|
|
|
|
|
function logError (message) {
|
|
|
|
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
|
|
|
console.error(message);
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/************************************
|
|
|
|
moment.tz namespace
|
|
|
|
************************************/
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function tz (input) {
|
|
|
|
var args = Array.prototype.slice.call(arguments, 0, -1),
|
|
|
|
name = arguments[arguments.length - 1],
|
|
|
|
zone = getZone(name),
|
|
|
|
out = moment.utc.apply(null, args);
|
|
|
|
|
|
|
|
if (zone && !moment.isMoment(input) && needsOffset(out)) {
|
|
|
|
out.add(zone.parse(out), 'minutes');
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
out.tz(name);
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
return out;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
tz.version = VERSION;
|
|
|
|
tz.dataVersion = '';
|
|
|
|
tz._zones = zones;
|
|
|
|
tz._links = links;
|
|
|
|
tz._names = names;
|
|
|
|
tz._countries = countries;
|
|
|
|
tz.add = addZone;
|
|
|
|
tz.link = addLink;
|
|
|
|
tz.load = loadData;
|
|
|
|
tz.zone = getZone;
|
|
|
|
tz.zoneExists = zoneExists; // deprecated in 0.1.0
|
|
|
|
tz.guess = guess;
|
|
|
|
tz.names = getNames;
|
|
|
|
tz.Zone = Zone;
|
|
|
|
tz.unpack = unpack;
|
|
|
|
tz.unpackBase60 = unpackBase60;
|
|
|
|
tz.needsOffset = needsOffset;
|
|
|
|
tz.moveInvalidForward = true;
|
|
|
|
tz.moveAmbiguousForward = false;
|
|
|
|
tz.countries = getCountryNames;
|
|
|
|
tz.zonesForCountry = zonesForCountry;
|
|
|
|
|
2019-09-19 17:19:18 +02:00
|
|
|
/************************************
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
Interface with Moment.js
|
2019-09-19 17:19:18 +02:00
|
|
|
************************************/
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
var fn = moment.fn;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
moment.tz = tz;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
moment.defaultZone = null;
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
moment.updateOffset = function (mom, keepTime) {
|
|
|
|
var zone = moment.defaultZone,
|
|
|
|
offset;
|
|
|
|
|
|
|
|
if (mom._z === undefined) {
|
|
|
|
if (zone && needsOffset(mom) && !mom._isUTC) {
|
|
|
|
mom._d = moment.utc(mom._a)._d;
|
|
|
|
mom.utc().add(zone.parse(mom), 'minutes');
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
mom._z = zone;
|
|
|
|
}
|
|
|
|
if (mom._z) {
|
|
|
|
offset = mom._z.utcOffset(mom);
|
|
|
|
if (Math.abs(offset) < 16) {
|
|
|
|
offset = offset / 60;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
if (mom.utcOffset !== undefined) {
|
|
|
|
var z = mom._z;
|
|
|
|
mom.utcOffset(-offset, keepTime);
|
|
|
|
mom._z = z;
|
|
|
|
} else {
|
|
|
|
mom.zone(offset, keepTime);
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
}
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
};
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
fn.tz = function (name, keepTime) {
|
|
|
|
if (name) {
|
|
|
|
if (typeof name !== 'string') {
|
|
|
|
throw new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']');
|
|
|
|
}
|
|
|
|
this._z = getZone(name);
|
|
|
|
if (this._z) {
|
|
|
|
moment.updateOffset(this, keepTime);
|
|
|
|
} else {
|
|
|
|
logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/.");
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
if (this._z) { return this._z.name; }
|
|
|
|
};
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function abbrWrap (old) {
|
|
|
|
return function () {
|
|
|
|
if (this._z) { return this._z.abbr(this); }
|
|
|
|
return old.call(this);
|
2019-09-19 17:19:18 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function resetZoneWrap (old) {
|
|
|
|
return function () {
|
|
|
|
this._z = null;
|
|
|
|
return old.apply(this, arguments);
|
|
|
|
};
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
function resetZoneWrap2 (old) {
|
|
|
|
return function () {
|
|
|
|
if (arguments.length > 0) this._z = null;
|
|
|
|
return old.apply(this, arguments);
|
|
|
|
};
|
|
|
|
}
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
fn.zoneName = abbrWrap(fn.zoneName);
|
|
|
|
fn.zoneAbbr = abbrWrap(fn.zoneAbbr);
|
|
|
|
fn.utc = resetZoneWrap(fn.utc);
|
|
|
|
fn.local = resetZoneWrap(fn.local);
|
|
|
|
fn.utcOffset = resetZoneWrap2(fn.utcOffset);
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
moment.tz.setDefault = function(name) {
|
|
|
|
if (major < 2 || (major === 2 && minor < 9)) {
|
|
|
|
logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
moment.defaultZone = name ? getZone(name) : null;
|
|
|
|
return moment;
|
|
|
|
};
|
2019-09-19 17:19:18 +02:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
// Cloning a moment should include the _z property.
|
|
|
|
var momentProperties = moment.momentProperties;
|
|
|
|
if (Object.prototype.toString.call(momentProperties) === '[object Array]') {
|
|
|
|
// moment 2.8.1+
|
|
|
|
momentProperties.push('_z');
|
|
|
|
momentProperties.push('_a');
|
|
|
|
} else if (momentProperties) {
|
|
|
|
// moment 2.7.0
|
|
|
|
momentProperties._z = null;
|
2019-09-19 17:19:18 +02:00
|
|
|
}
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
// INJECT DATA
|
2019-09-19 17:19:18 +02:00
|
|
|
|
|
|
|
return moment;
|
|
|
|
}));
|
2018-12-14 05:41:57 +01:00
|
|
|
|
|
|
|
|
2018-12-19 04:16:48 +01:00
|
|
|
/***/ }),
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/***/ "bNI1":
|
|
|
|
/***/ (function(module) {
|
2018-12-19 04:16:48 +01:00
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
module.exports = JSON.parse("{\"version\":\"2020a\",\"zones\":[\"Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q|48e5\",\"Africa/Accra|LMT GMT +0020|.Q 0 -k|012121212121212121212121212121212121212121212121|-26BbX.8 6tzX.8 MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE|41e5\",\"Africa/Nairobi|LMT EAT +0230 +0245|-2r.g -30 -2u -2J|01231|-1F3Cr.g 3Dzr.g okMu MFXJ|47e5\",\"Africa/Algiers|PMT WET WEST CET CEST|-9.l 0 -10 -10 -20|0121212121212121343431312123431213|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 DA0 Imo0 rd0 De0 9Xz0 1fb0 1ap0 16K0 2yo0 mEp0 hwL0 jxA0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5\",\"Africa/Lagos|LMT WAT|-d.A -10|01|-22y0d.A|17e6\",\"Africa/Bissau|LMT -01 GMT|12.k 10 0|012|-2ldX0 2xoo0|39e4\",\"Africa/Maputo|LMT CAT|-2a.k -20|01|-2GJea.k|26e5\",\"Africa/Cairo|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1bIO0 vb0 1ip0 11z0 1iN0 1nz0 12p0 1pz0 10N0 1pz0 16p0 1jz0 s3d0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6\",\"Africa/Casablanca|LMT +00 +01|u.k 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-2gMnt.E 130Lt.E rb0 Dd0 dVb0 b6p0 TX0 EoB0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0|32e5\",\"Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|010101010101010101010232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-25KN0 11z0 drd0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1y7o0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|85e3\",\"Africa/El_Aaiun|LMT -01 +00 +01|Q.M 10 0 -10|012323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1rDz7.c 1GVA7.c 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0|20e4\",\"Africa/Johannesburg|SAST SAST SAST|-1u -20 -30|012121|-2GJdu 1Ajdu 1cL0 1cN0 1cL0|84e5\",\"Africa/Juba|LMT CAT CAST EAT|-26.s -20 -30 -30|01212121212121212121212121212121213|-1yW26.s 1zK06.s 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0|\",\"Africa/Khartoum|LMT CAT CAST EAT|-2a.8 -20 -30 -30|012121212121212121212121212121212131|-1yW2a.8 1zK0a.8 16L0 1iN0 17b0 1jd0 17b0 1ip0 17
|
2018-12-19 04:16:48 +01:00
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/***/ "f0Wu":
|
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
var moment = module.exports = __webpack_require__("Dvum");
|
|
|
|
moment.tz.load(__webpack_require__("bNI1"));
|
2018-12-19 04:16:48 +01:00
|
|
|
|
2020-06-26 15:33:47 +02:00
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
Grouped merges for 5.5.6.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.
Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.5 branch.
Built from https://develop.svn.wordpress.org/branches/5.5@51752
git-svn-id: http://core.svn.wordpress.org/branches/5.5@51360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:17:20 +02:00
|
|
|
/***/ "wy2R":
|
2020-06-26 15:33:47 +02:00
|
|
|
/***/ (function(module, exports) {
|
|
|
|
|
|
|
|
(function() { module.exports = this["moment"]; }());
|
2018-12-19 04:16:48 +01:00
|
|
|
|
2018-12-14 05:41:57 +01:00
|
|
|
/***/ })
|
|
|
|
|
2018-12-18 04:14:52 +01:00
|
|
|
/******/ });
|