@automattic/charts 4.15.0 → 4.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/index.cjs +13 -1170
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +27 -1
- package/dist/index.js +14 -886
- package/dist/index.js.map +1 -1
- package/package.json +1 -2
- package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +43 -1
- package/src/charts/leaderboard-chart/leaderboard-chart.tsx +25 -20
- package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +15 -20
package/dist/index.cjs
CHANGED
|
@@ -10221,1165 +10221,6 @@ const useMonthCalendarHeatmapData = (valueByDay, range, options = {}) => {
|
|
|
10221
10221
|
weekStartsOn
|
|
10222
10222
|
]);
|
|
10223
10223
|
};
|
|
10224
|
-
// ../../../node_modules/.pnpm/is-plain-object@5.1.0/node_modules/is-plain-object/dist/is-plain-object.mjs
|
|
10225
|
-
/*!
|
|
10226
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
10227
|
-
*
|
|
10228
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
10229
|
-
* Released under the MIT License.
|
|
10230
|
-
*/
|
|
10231
|
-
function isObject(o) {
|
|
10232
|
-
return Object.prototype.toString.call(o) === "[object Object]";
|
|
10233
|
-
}
|
|
10234
|
-
function isPlainObject(o) {
|
|
10235
|
-
var ctor, prot;
|
|
10236
|
-
if (isObject(o) === false) return false;
|
|
10237
|
-
ctor = o.constructor;
|
|
10238
|
-
if (ctor === void 0) return true;
|
|
10239
|
-
prot = ctor.prototype;
|
|
10240
|
-
if (isObject(prot) === false) return false;
|
|
10241
|
-
if (prot.hasOwnProperty("isPrototypeOf") === false) return false;
|
|
10242
|
-
return true;
|
|
10243
|
-
}
|
|
10244
|
-
// ../../../node_modules/.pnpm/lower-case@2.0.2/node_modules/lower-case/dist/index.js
|
|
10245
|
-
var require_dist$14 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10246
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10247
|
-
exports.lowerCase = exports.localeLowerCase = void 0;
|
|
10248
|
-
/**
|
|
10249
|
-
* Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
|
|
10250
|
-
*/
|
|
10251
|
-
var SUPPORTED_LOCALE = {
|
|
10252
|
-
tr: {
|
|
10253
|
-
regexp: /\u0130|\u0049|\u0049\u0307/g,
|
|
10254
|
-
map: {
|
|
10255
|
-
İ: "i",
|
|
10256
|
-
I: "ı",
|
|
10257
|
-
İ: "i"
|
|
10258
|
-
}
|
|
10259
|
-
},
|
|
10260
|
-
az: {
|
|
10261
|
-
regexp: /\u0130/g,
|
|
10262
|
-
map: {
|
|
10263
|
-
İ: "i",
|
|
10264
|
-
I: "ı",
|
|
10265
|
-
İ: "i"
|
|
10266
|
-
}
|
|
10267
|
-
},
|
|
10268
|
-
lt: {
|
|
10269
|
-
regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
|
|
10270
|
-
map: {
|
|
10271
|
-
I: "i̇",
|
|
10272
|
-
J: "j̇",
|
|
10273
|
-
Į: "į̇",
|
|
10274
|
-
Ì: "i̇̀",
|
|
10275
|
-
Í: "i̇́",
|
|
10276
|
-
Ĩ: "i̇̃"
|
|
10277
|
-
}
|
|
10278
|
-
}
|
|
10279
|
-
};
|
|
10280
|
-
/**
|
|
10281
|
-
* Localized lower case.
|
|
10282
|
-
*/
|
|
10283
|
-
function localeLowerCase(str, locale) {
|
|
10284
|
-
var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
|
|
10285
|
-
if (lang) return lowerCase(str.replace(lang.regexp, function(m) {
|
|
10286
|
-
return lang.map[m];
|
|
10287
|
-
}));
|
|
10288
|
-
return lowerCase(str);
|
|
10289
|
-
}
|
|
10290
|
-
exports.localeLowerCase = localeLowerCase;
|
|
10291
|
-
/**
|
|
10292
|
-
* Lower case as a function.
|
|
10293
|
-
*/
|
|
10294
|
-
function lowerCase(str) {
|
|
10295
|
-
return str.toLowerCase();
|
|
10296
|
-
}
|
|
10297
|
-
exports.lowerCase = lowerCase;
|
|
10298
|
-
}));
|
|
10299
|
-
// ../../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist/index.js
|
|
10300
|
-
var require_dist$13 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10301
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10302
|
-
exports.noCase = void 0;
|
|
10303
|
-
var lower_case_1 = require_dist$14();
|
|
10304
|
-
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
|
|
10305
|
-
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
|
|
10306
|
-
/**
|
|
10307
|
-
* Normalize the string into something other libraries can manipulate easier.
|
|
10308
|
-
*/
|
|
10309
|
-
function noCase(input, options) {
|
|
10310
|
-
if (options === void 0) options = {};
|
|
10311
|
-
var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lower_case_1.lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
|
|
10312
|
-
var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
|
|
10313
|
-
var start = 0;
|
|
10314
|
-
var end = result.length;
|
|
10315
|
-
while (result.charAt(start) === "\0") start++;
|
|
10316
|
-
while (result.charAt(end - 1) === "\0") end--;
|
|
10317
|
-
return result.slice(start, end).split("\0").map(transform).join(delimiter);
|
|
10318
|
-
}
|
|
10319
|
-
exports.noCase = noCase;
|
|
10320
|
-
/**
|
|
10321
|
-
* Replace `re` in the input string with the replacement value.
|
|
10322
|
-
*/
|
|
10323
|
-
function replace(input, re, value) {
|
|
10324
|
-
if (re instanceof RegExp) return input.replace(re, value);
|
|
10325
|
-
return re.reduce(function(input, re) {
|
|
10326
|
-
return input.replace(re, value);
|
|
10327
|
-
}, input);
|
|
10328
|
-
}
|
|
10329
|
-
}));
|
|
10330
|
-
// ../../../node_modules/.pnpm/pascal-case@3.1.2/node_modules/pascal-case/dist/index.js
|
|
10331
|
-
var require_dist$12 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10332
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10333
|
-
exports.pascalCase = exports.pascalCaseTransformMerge = exports.pascalCaseTransform = void 0;
|
|
10334
|
-
var tslib_1 = require("tslib");
|
|
10335
|
-
var no_case_1 = require_dist$13();
|
|
10336
|
-
function pascalCaseTransform(input, index) {
|
|
10337
|
-
var firstChar = input.charAt(0);
|
|
10338
|
-
var lowerChars = input.substr(1).toLowerCase();
|
|
10339
|
-
if (index > 0 && firstChar >= "0" && firstChar <= "9") return "_" + firstChar + lowerChars;
|
|
10340
|
-
return "" + firstChar.toUpperCase() + lowerChars;
|
|
10341
|
-
}
|
|
10342
|
-
exports.pascalCaseTransform = pascalCaseTransform;
|
|
10343
|
-
function pascalCaseTransformMerge(input) {
|
|
10344
|
-
return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();
|
|
10345
|
-
}
|
|
10346
|
-
exports.pascalCaseTransformMerge = pascalCaseTransformMerge;
|
|
10347
|
-
function pascalCase(input, options) {
|
|
10348
|
-
if (options === void 0) options = {};
|
|
10349
|
-
return no_case_1.noCase(input, tslib_1.__assign({
|
|
10350
|
-
delimiter: "",
|
|
10351
|
-
transform: pascalCaseTransform
|
|
10352
|
-
}, options));
|
|
10353
|
-
}
|
|
10354
|
-
exports.pascalCase = pascalCase;
|
|
10355
|
-
}));
|
|
10356
|
-
// ../../../node_modules/.pnpm/camel-case@4.1.2/node_modules/camel-case/dist/index.js
|
|
10357
|
-
var require_dist$11 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10358
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10359
|
-
exports.camelCase = exports.camelCaseTransformMerge = exports.camelCaseTransform = void 0;
|
|
10360
|
-
var tslib_1 = require("tslib");
|
|
10361
|
-
var pascal_case_1 = require_dist$12();
|
|
10362
|
-
function camelCaseTransform(input, index) {
|
|
10363
|
-
if (index === 0) return input.toLowerCase();
|
|
10364
|
-
return pascal_case_1.pascalCaseTransform(input, index);
|
|
10365
|
-
}
|
|
10366
|
-
exports.camelCaseTransform = camelCaseTransform;
|
|
10367
|
-
function camelCaseTransformMerge(input, index) {
|
|
10368
|
-
if (index === 0) return input.toLowerCase();
|
|
10369
|
-
return pascal_case_1.pascalCaseTransformMerge(input);
|
|
10370
|
-
}
|
|
10371
|
-
exports.camelCaseTransformMerge = camelCaseTransformMerge;
|
|
10372
|
-
function camelCase(input, options) {
|
|
10373
|
-
if (options === void 0) options = {};
|
|
10374
|
-
return pascal_case_1.pascalCase(input, tslib_1.__assign({ transform: camelCaseTransform }, options));
|
|
10375
|
-
}
|
|
10376
|
-
exports.camelCase = camelCase;
|
|
10377
|
-
}));
|
|
10378
|
-
// ../../../node_modules/.pnpm/upper-case-first@2.0.2/node_modules/upper-case-first/dist/index.js
|
|
10379
|
-
var require_dist$10 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10380
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10381
|
-
exports.upperCaseFirst = void 0;
|
|
10382
|
-
/**
|
|
10383
|
-
* Upper case the first character of an input string.
|
|
10384
|
-
*/
|
|
10385
|
-
function upperCaseFirst(input) {
|
|
10386
|
-
return input.charAt(0).toUpperCase() + input.substr(1);
|
|
10387
|
-
}
|
|
10388
|
-
exports.upperCaseFirst = upperCaseFirst;
|
|
10389
|
-
}));
|
|
10390
|
-
// ../../../node_modules/.pnpm/capital-case@1.0.4/node_modules/capital-case/dist/index.js
|
|
10391
|
-
var require_dist$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10392
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10393
|
-
exports.capitalCase = exports.capitalCaseTransform = void 0;
|
|
10394
|
-
var tslib_1 = require("tslib");
|
|
10395
|
-
var no_case_1 = require_dist$13();
|
|
10396
|
-
var upper_case_first_1 = require_dist$10();
|
|
10397
|
-
function capitalCaseTransform(input) {
|
|
10398
|
-
return upper_case_first_1.upperCaseFirst(input.toLowerCase());
|
|
10399
|
-
}
|
|
10400
|
-
exports.capitalCaseTransform = capitalCaseTransform;
|
|
10401
|
-
function capitalCase(input, options) {
|
|
10402
|
-
if (options === void 0) options = {};
|
|
10403
|
-
return no_case_1.noCase(input, tslib_1.__assign({
|
|
10404
|
-
delimiter: " ",
|
|
10405
|
-
transform: capitalCaseTransform
|
|
10406
|
-
}, options));
|
|
10407
|
-
}
|
|
10408
|
-
exports.capitalCase = capitalCase;
|
|
10409
|
-
}));
|
|
10410
|
-
// ../../../node_modules/.pnpm/upper-case@2.0.2/node_modules/upper-case/dist/index.js
|
|
10411
|
-
var require_dist$8 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10412
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10413
|
-
exports.upperCase = exports.localeUpperCase = void 0;
|
|
10414
|
-
/**
|
|
10415
|
-
* Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
|
|
10416
|
-
*/
|
|
10417
|
-
var SUPPORTED_LOCALE = {
|
|
10418
|
-
tr: {
|
|
10419
|
-
regexp: /[\u0069]/g,
|
|
10420
|
-
map: { i: "İ" }
|
|
10421
|
-
},
|
|
10422
|
-
az: {
|
|
10423
|
-
regexp: /[\u0069]/g,
|
|
10424
|
-
map: { i: "İ" }
|
|
10425
|
-
},
|
|
10426
|
-
lt: {
|
|
10427
|
-
regexp: /[\u0069\u006A\u012F]\u0307|\u0069\u0307[\u0300\u0301\u0303]/g,
|
|
10428
|
-
map: {
|
|
10429
|
-
i̇: "I",
|
|
10430
|
-
j̇: "J",
|
|
10431
|
-
į̇: "Į",
|
|
10432
|
-
i̇̀: "Ì",
|
|
10433
|
-
i̇́: "Í",
|
|
10434
|
-
i̇̃: "Ĩ"
|
|
10435
|
-
}
|
|
10436
|
-
}
|
|
10437
|
-
};
|
|
10438
|
-
/**
|
|
10439
|
-
* Localized upper case.
|
|
10440
|
-
*/
|
|
10441
|
-
function localeUpperCase(str, locale) {
|
|
10442
|
-
var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
|
|
10443
|
-
if (lang) return upperCase(str.replace(lang.regexp, function(m) {
|
|
10444
|
-
return lang.map[m];
|
|
10445
|
-
}));
|
|
10446
|
-
return upperCase(str);
|
|
10447
|
-
}
|
|
10448
|
-
exports.localeUpperCase = localeUpperCase;
|
|
10449
|
-
/**
|
|
10450
|
-
* Upper case as a function.
|
|
10451
|
-
*/
|
|
10452
|
-
function upperCase(str) {
|
|
10453
|
-
return str.toUpperCase();
|
|
10454
|
-
}
|
|
10455
|
-
exports.upperCase = upperCase;
|
|
10456
|
-
}));
|
|
10457
|
-
// ../../../node_modules/.pnpm/constant-case@3.0.4/node_modules/constant-case/dist/index.js
|
|
10458
|
-
var require_dist$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10459
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10460
|
-
exports.constantCase = void 0;
|
|
10461
|
-
var tslib_1 = require("tslib");
|
|
10462
|
-
var no_case_1 = require_dist$13();
|
|
10463
|
-
var upper_case_1 = require_dist$8();
|
|
10464
|
-
function constantCase(input, options) {
|
|
10465
|
-
if (options === void 0) options = {};
|
|
10466
|
-
return no_case_1.noCase(input, tslib_1.__assign({
|
|
10467
|
-
delimiter: "_",
|
|
10468
|
-
transform: upper_case_1.upperCase
|
|
10469
|
-
}, options));
|
|
10470
|
-
}
|
|
10471
|
-
exports.constantCase = constantCase;
|
|
10472
|
-
}));
|
|
10473
|
-
// ../../../node_modules/.pnpm/dot-case@3.0.4/node_modules/dot-case/dist/index.js
|
|
10474
|
-
var require_dist$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10475
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10476
|
-
exports.dotCase = void 0;
|
|
10477
|
-
var tslib_1 = require("tslib");
|
|
10478
|
-
var no_case_1 = require_dist$13();
|
|
10479
|
-
function dotCase(input, options) {
|
|
10480
|
-
if (options === void 0) options = {};
|
|
10481
|
-
return no_case_1.noCase(input, tslib_1.__assign({ delimiter: "." }, options));
|
|
10482
|
-
}
|
|
10483
|
-
exports.dotCase = dotCase;
|
|
10484
|
-
}));
|
|
10485
|
-
// ../../../node_modules/.pnpm/header-case@2.0.4/node_modules/header-case/dist/index.js
|
|
10486
|
-
var require_dist$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10487
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10488
|
-
exports.headerCase = void 0;
|
|
10489
|
-
var tslib_1 = require("tslib");
|
|
10490
|
-
var capital_case_1 = require_dist$9();
|
|
10491
|
-
function headerCase(input, options) {
|
|
10492
|
-
if (options === void 0) options = {};
|
|
10493
|
-
return capital_case_1.capitalCase(input, tslib_1.__assign({ delimiter: "-" }, options));
|
|
10494
|
-
}
|
|
10495
|
-
exports.headerCase = headerCase;
|
|
10496
|
-
}));
|
|
10497
|
-
// ../../../node_modules/.pnpm/param-case@3.0.4/node_modules/param-case/dist/index.js
|
|
10498
|
-
var require_dist$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10499
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10500
|
-
exports.paramCase = void 0;
|
|
10501
|
-
var tslib_1 = require("tslib");
|
|
10502
|
-
var dot_case_1 = require_dist$6();
|
|
10503
|
-
function paramCase(input, options) {
|
|
10504
|
-
if (options === void 0) options = {};
|
|
10505
|
-
return dot_case_1.dotCase(input, tslib_1.__assign({ delimiter: "-" }, options));
|
|
10506
|
-
}
|
|
10507
|
-
exports.paramCase = paramCase;
|
|
10508
|
-
}));
|
|
10509
|
-
// ../../../node_modules/.pnpm/path-case@3.0.4/node_modules/path-case/dist/index.js
|
|
10510
|
-
var require_dist$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10511
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10512
|
-
exports.pathCase = void 0;
|
|
10513
|
-
var tslib_1 = require("tslib");
|
|
10514
|
-
var dot_case_1 = require_dist$6();
|
|
10515
|
-
function pathCase(input, options) {
|
|
10516
|
-
if (options === void 0) options = {};
|
|
10517
|
-
return dot_case_1.dotCase(input, tslib_1.__assign({ delimiter: "/" }, options));
|
|
10518
|
-
}
|
|
10519
|
-
exports.pathCase = pathCase;
|
|
10520
|
-
}));
|
|
10521
|
-
// ../../../node_modules/.pnpm/sentence-case@3.0.4/node_modules/sentence-case/dist/index.js
|
|
10522
|
-
var require_dist$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10523
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10524
|
-
exports.sentenceCase = exports.sentenceCaseTransform = void 0;
|
|
10525
|
-
var tslib_1 = require("tslib");
|
|
10526
|
-
var no_case_1 = require_dist$13();
|
|
10527
|
-
var upper_case_first_1 = require_dist$10();
|
|
10528
|
-
function sentenceCaseTransform(input, index) {
|
|
10529
|
-
var result = input.toLowerCase();
|
|
10530
|
-
if (index === 0) return upper_case_first_1.upperCaseFirst(result);
|
|
10531
|
-
return result;
|
|
10532
|
-
}
|
|
10533
|
-
exports.sentenceCaseTransform = sentenceCaseTransform;
|
|
10534
|
-
function sentenceCase(input, options) {
|
|
10535
|
-
if (options === void 0) options = {};
|
|
10536
|
-
return no_case_1.noCase(input, tslib_1.__assign({
|
|
10537
|
-
delimiter: " ",
|
|
10538
|
-
transform: sentenceCaseTransform
|
|
10539
|
-
}, options));
|
|
10540
|
-
}
|
|
10541
|
-
exports.sentenceCase = sentenceCase;
|
|
10542
|
-
}));
|
|
10543
|
-
// ../../../node_modules/.pnpm/snake-case@3.0.4/node_modules/snake-case/dist/index.js
|
|
10544
|
-
var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10545
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10546
|
-
exports.snakeCase = void 0;
|
|
10547
|
-
var tslib_1 = require("tslib");
|
|
10548
|
-
var dot_case_1 = require_dist$6();
|
|
10549
|
-
function snakeCase(input, options) {
|
|
10550
|
-
if (options === void 0) options = {};
|
|
10551
|
-
return dot_case_1.dotCase(input, tslib_1.__assign({ delimiter: "_" }, options));
|
|
10552
|
-
}
|
|
10553
|
-
exports.snakeCase = snakeCase;
|
|
10554
|
-
}));
|
|
10555
|
-
// ../../../node_modules/.pnpm/change-case@4.1.2/node_modules/change-case/dist/index.js
|
|
10556
|
-
var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10557
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10558
|
-
var tslib_1 = require("tslib");
|
|
10559
|
-
tslib_1.__exportStar(require_dist$11(), exports);
|
|
10560
|
-
tslib_1.__exportStar(require_dist$9(), exports);
|
|
10561
|
-
tslib_1.__exportStar(require_dist$7(), exports);
|
|
10562
|
-
tslib_1.__exportStar(require_dist$6(), exports);
|
|
10563
|
-
tslib_1.__exportStar(require_dist$5(), exports);
|
|
10564
|
-
tslib_1.__exportStar(require_dist$13(), exports);
|
|
10565
|
-
tslib_1.__exportStar(require_dist$4(), exports);
|
|
10566
|
-
tslib_1.__exportStar(require_dist$12(), exports);
|
|
10567
|
-
tslib_1.__exportStar(require_dist$3(), exports);
|
|
10568
|
-
tslib_1.__exportStar(require_dist$2(), exports);
|
|
10569
|
-
tslib_1.__exportStar(require_dist$1(), exports);
|
|
10570
|
-
}));
|
|
10571
|
-
// ../../../node_modules/.pnpm/@wordpress+warning@4.1.0/node_modules/@wordpress/warning/build-module/utils.mjs
|
|
10572
|
-
/**
|
|
10573
|
-
* Object map tracking messages which have been logged, for use in ensuring a
|
|
10574
|
-
* message is only logged once.
|
|
10575
|
-
*/
|
|
10576
|
-
const logged = /* @__PURE__ */ new Set();
|
|
10577
|
-
// ../../../node_modules/.pnpm/@wordpress+warning@4.1.0/node_modules/@wordpress/warning/build-module/index.mjs
|
|
10578
|
-
function isDev() {
|
|
10579
|
-
return globalThis.SCRIPT_DEBUG === true;
|
|
10580
|
-
}
|
|
10581
|
-
/**
|
|
10582
|
-
* Shows a warning with `message` if environment is not `production`.
|
|
10583
|
-
*
|
|
10584
|
-
* @param message Message to show in the warning.
|
|
10585
|
-
*
|
|
10586
|
-
* @example
|
|
10587
|
-
* ```js
|
|
10588
|
-
* import warning from '@wordpress/warning';
|
|
10589
|
-
*
|
|
10590
|
-
* function MyComponent( props ) {
|
|
10591
|
-
* if ( ! props.title ) {
|
|
10592
|
-
* warning( '`props.title` was not passed' );
|
|
10593
|
-
* }
|
|
10594
|
-
* ...
|
|
10595
|
-
* }
|
|
10596
|
-
* ```
|
|
10597
|
-
*/
|
|
10598
|
-
function warning(message) {
|
|
10599
|
-
if (!isDev()) return;
|
|
10600
|
-
if (logged.has(message)) return;
|
|
10601
|
-
console.warn(message);
|
|
10602
|
-
try {
|
|
10603
|
-
throw Error(message);
|
|
10604
|
-
} catch {}
|
|
10605
|
-
logged.add(message);
|
|
10606
|
-
}
|
|
10607
|
-
// ../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/es6/index.js
|
|
10608
|
-
var require_es6 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10609
|
-
module.exports = function equal(a, b) {
|
|
10610
|
-
if (a === b) return true;
|
|
10611
|
-
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
10612
|
-
if (a.constructor !== b.constructor) return false;
|
|
10613
|
-
var length, i, keys;
|
|
10614
|
-
if (Array.isArray(a)) {
|
|
10615
|
-
length = a.length;
|
|
10616
|
-
if (length != b.length) return false;
|
|
10617
|
-
for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;
|
|
10618
|
-
return true;
|
|
10619
|
-
}
|
|
10620
|
-
if (a instanceof Map && b instanceof Map) {
|
|
10621
|
-
if (a.size !== b.size) return false;
|
|
10622
|
-
for (i of a.entries()) if (!b.has(i[0])) return false;
|
|
10623
|
-
for (i of a.entries()) if (!equal(i[1], b.get(i[0]))) return false;
|
|
10624
|
-
return true;
|
|
10625
|
-
}
|
|
10626
|
-
if (a instanceof Set && b instanceof Set) {
|
|
10627
|
-
if (a.size !== b.size) return false;
|
|
10628
|
-
for (i of a.entries()) if (!b.has(i[0])) return false;
|
|
10629
|
-
return true;
|
|
10630
|
-
}
|
|
10631
|
-
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
10632
|
-
length = a.length;
|
|
10633
|
-
if (length != b.length) return false;
|
|
10634
|
-
for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;
|
|
10635
|
-
return true;
|
|
10636
|
-
}
|
|
10637
|
-
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
10638
|
-
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
10639
|
-
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
10640
|
-
keys = Object.keys(a);
|
|
10641
|
-
length = keys.length;
|
|
10642
|
-
if (length !== Object.keys(b).length) return false;
|
|
10643
|
-
for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
10644
|
-
for (i = length; i-- !== 0;) {
|
|
10645
|
-
var key = keys[i];
|
|
10646
|
-
if (!equal(a[key], b[key])) return false;
|
|
10647
|
-
}
|
|
10648
|
-
return true;
|
|
10649
|
-
}
|
|
10650
|
-
return a !== a && b !== b;
|
|
10651
|
-
};
|
|
10652
|
-
}));
|
|
10653
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/utils/hooks/use-update-effect.mjs
|
|
10654
|
-
/**
|
|
10655
|
-
* A `React.useEffect` that will not run on the first render.
|
|
10656
|
-
* Source:
|
|
10657
|
-
* https://github.com/ariakit/ariakit/blob/main/packages/ariakit-react-core/src/utils/hooks.ts
|
|
10658
|
-
*
|
|
10659
|
-
* @param effect
|
|
10660
|
-
* @param deps
|
|
10661
|
-
*/
|
|
10662
|
-
function useUpdateEffect(effect, deps) {
|
|
10663
|
-
const mountedRef = (0, react.useRef)(false);
|
|
10664
|
-
(0, react.useEffect)(() => {
|
|
10665
|
-
if (mountedRef.current) return effect();
|
|
10666
|
-
mountedRef.current = true;
|
|
10667
|
-
}, deps);
|
|
10668
|
-
(0, react.useEffect)(() => () => {
|
|
10669
|
-
mountedRef.current = false;
|
|
10670
|
-
}, []);
|
|
10671
|
-
}
|
|
10672
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/context/context-system-provider.mjs
|
|
10673
|
-
var import_es6 = /* @__PURE__ */ __toESM(require_es6(), 1);
|
|
10674
|
-
const ComponentsContext = (0, react.createContext)({});
|
|
10675
|
-
ComponentsContext.displayName = "ComponentsContext";
|
|
10676
|
-
const useComponentsContext = () => (0, react.useContext)(ComponentsContext);
|
|
10677
|
-
/**
|
|
10678
|
-
* Consolidates incoming ContextSystem values with a (potential) parent ContextSystem value.
|
|
10679
|
-
*
|
|
10680
|
-
* Note: This function will warn if it detects an un-memoized `value`
|
|
10681
|
-
*
|
|
10682
|
-
* @param {Object} props
|
|
10683
|
-
* @param {Record<string, any>} props.value
|
|
10684
|
-
* @return {Record<string, any>} The consolidated value.
|
|
10685
|
-
*/
|
|
10686
|
-
function useContextSystemBridge({ value }) {
|
|
10687
|
-
const parentContext = useComponentsContext();
|
|
10688
|
-
const valueRef = (0, react.useRef)(value);
|
|
10689
|
-
useUpdateEffect(() => {
|
|
10690
|
-
if ((0, import_es6.default)(valueRef.current, value) && valueRef.current !== value) warning(`Please memoize your context: ${JSON.stringify(value)}`);
|
|
10691
|
-
}, [value]);
|
|
10692
|
-
return (0, react.useMemo)(() => {
|
|
10693
|
-
return (0, deepmerge.default)(parentContext ?? {}, value ?? {}, { isMergeableObject: isPlainObject });
|
|
10694
|
-
}, [parentContext, value]);
|
|
10695
|
-
}
|
|
10696
|
-
/**
|
|
10697
|
-
* A Provider component that can modify props for connected components within
|
|
10698
|
-
* the Context system.
|
|
10699
|
-
*
|
|
10700
|
-
* @example
|
|
10701
|
-
* ```jsx
|
|
10702
|
-
* <ContextSystemProvider value={{ Button: { size: 'small' }}}>
|
|
10703
|
-
* <Button>...</Button>
|
|
10704
|
-
* </ContextSystemProvider>
|
|
10705
|
-
* ```
|
|
10706
|
-
*
|
|
10707
|
-
* @template {Record<string, any>} T
|
|
10708
|
-
* @param {Object} options
|
|
10709
|
-
* @param {React.ReactNode} options.children Children to render.
|
|
10710
|
-
* @param {T} options.value Props to render into connected components.
|
|
10711
|
-
* @return {React.JSX.Element} A Provider wrapped component.
|
|
10712
|
-
*/
|
|
10713
|
-
const BaseContextSystemProvider = ({ children, value }) => {
|
|
10714
|
-
const contextValue = useContextSystemBridge({ value });
|
|
10715
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComponentsContext.Provider, {
|
|
10716
|
-
value: contextValue,
|
|
10717
|
-
children
|
|
10718
|
-
});
|
|
10719
|
-
};
|
|
10720
|
-
(0, react.memo)(BaseContextSystemProvider);
|
|
10721
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/context/constants.mjs
|
|
10722
|
-
const COMPONENT_NAMESPACE = "data-wp-component";
|
|
10723
|
-
const CONNECTED_NAMESPACE = "data-wp-c16t";
|
|
10724
|
-
/**
|
|
10725
|
-
* Special key where the connected namespaces are stored.
|
|
10726
|
-
* This is attached to Context connected components as a static property.
|
|
10727
|
-
*/
|
|
10728
|
-
const CONNECT_STATIC_NAMESPACE = "__contextSystemKey__";
|
|
10729
|
-
// ../../../node_modules/.pnpm/memize@2.1.1/node_modules/memize/dist/index.js
|
|
10730
|
-
/**
|
|
10731
|
-
* Memize options object.
|
|
10732
|
-
*
|
|
10733
|
-
* @typedef MemizeOptions
|
|
10734
|
-
*
|
|
10735
|
-
* @property {number} [maxSize] Maximum size of the cache.
|
|
10736
|
-
*/
|
|
10737
|
-
/**
|
|
10738
|
-
* Internal cache entry.
|
|
10739
|
-
*
|
|
10740
|
-
* @typedef MemizeCacheNode
|
|
10741
|
-
*
|
|
10742
|
-
* @property {?MemizeCacheNode|undefined} [prev] Previous node.
|
|
10743
|
-
* @property {?MemizeCacheNode|undefined} [next] Next node.
|
|
10744
|
-
* @property {Array<*>} args Function arguments for cache
|
|
10745
|
-
* entry.
|
|
10746
|
-
* @property {*} val Function result.
|
|
10747
|
-
*/
|
|
10748
|
-
/**
|
|
10749
|
-
* Properties of the enhanced function for controlling cache.
|
|
10750
|
-
*
|
|
10751
|
-
* @typedef MemizeMemoizedFunction
|
|
10752
|
-
*
|
|
10753
|
-
* @property {()=>void} clear Clear the cache.
|
|
10754
|
-
*/
|
|
10755
|
-
/**
|
|
10756
|
-
* Accepts a function to be memoized, and returns a new memoized function, with
|
|
10757
|
-
* optional options.
|
|
10758
|
-
*
|
|
10759
|
-
* @template {(...args: any[]) => any} F
|
|
10760
|
-
*
|
|
10761
|
-
* @param {F} fn Function to memoize.
|
|
10762
|
-
* @param {MemizeOptions} [options] Options object.
|
|
10763
|
-
*
|
|
10764
|
-
* @return {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.
|
|
10765
|
-
*/
|
|
10766
|
-
function memize(fn, options) {
|
|
10767
|
-
var size = 0;
|
|
10768
|
-
/** @type {?MemizeCacheNode|undefined} */
|
|
10769
|
-
var head;
|
|
10770
|
-
/** @type {?MemizeCacheNode|undefined} */
|
|
10771
|
-
var tail;
|
|
10772
|
-
options = options || {};
|
|
10773
|
-
function memoized() {
|
|
10774
|
-
var node = head, len = arguments.length, args, i;
|
|
10775
|
-
searchCache: while (node) {
|
|
10776
|
-
if (node.args.length !== arguments.length) {
|
|
10777
|
-
node = node.next;
|
|
10778
|
-
continue;
|
|
10779
|
-
}
|
|
10780
|
-
for (i = 0; i < len; i++) if (node.args[i] !== arguments[i]) {
|
|
10781
|
-
node = node.next;
|
|
10782
|
-
continue searchCache;
|
|
10783
|
-
}
|
|
10784
|
-
if (node !== head) {
|
|
10785
|
-
if (node === tail) tail = node.prev;
|
|
10786
|
-
/** @type {MemizeCacheNode} */ node.prev.next = node.next;
|
|
10787
|
-
if (node.next) node.next.prev = node.prev;
|
|
10788
|
-
node.next = head;
|
|
10789
|
-
node.prev = null;
|
|
10790
|
-
/** @type {MemizeCacheNode} */ head.prev = node;
|
|
10791
|
-
head = node;
|
|
10792
|
-
}
|
|
10793
|
-
return node.val;
|
|
10794
|
-
}
|
|
10795
|
-
args = new Array(len);
|
|
10796
|
-
for (i = 0; i < len; i++) args[i] = arguments[i];
|
|
10797
|
-
node = {
|
|
10798
|
-
args,
|
|
10799
|
-
val: fn.apply(null, args)
|
|
10800
|
-
};
|
|
10801
|
-
if (head) {
|
|
10802
|
-
head.prev = node;
|
|
10803
|
-
node.next = head;
|
|
10804
|
-
} else tail = node;
|
|
10805
|
-
if (size === options.maxSize) {
|
|
10806
|
-
tail = tail.prev;
|
|
10807
|
-
/** @type {MemizeCacheNode} */ tail.next = null;
|
|
10808
|
-
} else size++;
|
|
10809
|
-
head = node;
|
|
10810
|
-
return node.val;
|
|
10811
|
-
}
|
|
10812
|
-
memoized.clear = function() {
|
|
10813
|
-
head = null;
|
|
10814
|
-
tail = null;
|
|
10815
|
-
size = 0;
|
|
10816
|
-
};
|
|
10817
|
-
return memoized;
|
|
10818
|
-
}
|
|
10819
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/context/get-styled-class-name-from-key.mjs
|
|
10820
|
-
var import_dist = require_dist();
|
|
10821
|
-
/**
|
|
10822
|
-
* Generates the connected component CSS className based on the namespace.
|
|
10823
|
-
*
|
|
10824
|
-
* @param namespace The name of the connected component.
|
|
10825
|
-
* @return The generated CSS className.
|
|
10826
|
-
*/
|
|
10827
|
-
function getStyledClassName(namespace) {
|
|
10828
|
-
return `components-${(0, import_dist.paramCase)(namespace)}`;
|
|
10829
|
-
}
|
|
10830
|
-
const getStyledClassNameFromKey = memize(getStyledClassName);
|
|
10831
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/context/context-connect.mjs
|
|
10832
|
-
/**
|
|
10833
|
-
* Forwards ref (React.ForwardRef) and "Connects" (or registers) a component
|
|
10834
|
-
* within the Context system under a specified namespace.
|
|
10835
|
-
*
|
|
10836
|
-
* @param Component The component to register into the Context system.
|
|
10837
|
-
* @param namespace The namespace to register the component under.
|
|
10838
|
-
* @return The connected WordPressComponent
|
|
10839
|
-
*/
|
|
10840
|
-
function contextConnect(Component, namespace) {
|
|
10841
|
-
return _contextConnect(Component, namespace, { forwardsRef: true });
|
|
10842
|
-
}
|
|
10843
|
-
function _contextConnect(Component, namespace, options) {
|
|
10844
|
-
const WrappedComponent = options?.forwardsRef ? (0, react.forwardRef)(Component) : Component;
|
|
10845
|
-
if (typeof namespace === "undefined") warning("contextConnect: Please provide a namespace");
|
|
10846
|
-
let mergedNamespace = WrappedComponent["__contextSystemKey__"] || [namespace];
|
|
10847
|
-
/**
|
|
10848
|
-
* Consolidate (merge) namespaces before attaching it to the WrappedComponent.
|
|
10849
|
-
*/
|
|
10850
|
-
if (Array.isArray(namespace)) mergedNamespace = [...mergedNamespace, ...namespace];
|
|
10851
|
-
if (typeof namespace === "string") mergedNamespace = [...mergedNamespace, namespace];
|
|
10852
|
-
return Object.assign(WrappedComponent, {
|
|
10853
|
-
[CONNECT_STATIC_NAMESPACE]: [...new Set(mergedNamespace)],
|
|
10854
|
-
displayName: namespace,
|
|
10855
|
-
selector: `.${getStyledClassNameFromKey(namespace)}`
|
|
10856
|
-
});
|
|
10857
|
-
}
|
|
10858
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/context/utils.mjs
|
|
10859
|
-
/**
|
|
10860
|
-
* Creates a dedicated context namespace HTML attribute for components.
|
|
10861
|
-
* ns is short for "namespace"
|
|
10862
|
-
*
|
|
10863
|
-
* @example
|
|
10864
|
-
* ```jsx
|
|
10865
|
-
* <div {...ns('Container')} />
|
|
10866
|
-
* ```
|
|
10867
|
-
*
|
|
10868
|
-
* @param componentName The name for the component.
|
|
10869
|
-
* @return A props object with the namespaced HTML attribute.
|
|
10870
|
-
*/
|
|
10871
|
-
function getNamespace(componentName) {
|
|
10872
|
-
return { [COMPONENT_NAMESPACE]: componentName };
|
|
10873
|
-
}
|
|
10874
|
-
/**
|
|
10875
|
-
* Creates a dedicated connected context namespace HTML attribute for components.
|
|
10876
|
-
* ns is short for "namespace"
|
|
10877
|
-
*
|
|
10878
|
-
* @example
|
|
10879
|
-
* ```jsx
|
|
10880
|
-
* <div {...cns()} />
|
|
10881
|
-
* ```
|
|
10882
|
-
*
|
|
10883
|
-
* @return A props object with the namespaced HTML attribute.
|
|
10884
|
-
*/
|
|
10885
|
-
function getConnectedNamespace() {
|
|
10886
|
-
return { [CONNECTED_NAMESPACE]: true };
|
|
10887
|
-
}
|
|
10888
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/context/use-context-system.mjs
|
|
10889
|
-
/**
|
|
10890
|
-
* Custom hook that derives registered props from the Context system.
|
|
10891
|
-
* These derived props are then consolidated with incoming component props.
|
|
10892
|
-
*
|
|
10893
|
-
* @param props Incoming props from the component.
|
|
10894
|
-
* @param namespace The namespace to register and to derive context props from.
|
|
10895
|
-
* @return The connected props.
|
|
10896
|
-
*/
|
|
10897
|
-
function useContextSystem(props, namespace) {
|
|
10898
|
-
const contextSystemProps = useComponentsContext();
|
|
10899
|
-
if (typeof namespace === "undefined") warning("useContextSystem: Please provide a namespace");
|
|
10900
|
-
const contextProps = contextSystemProps?.[namespace] || {};
|
|
10901
|
-
const finalComponentProps = {
|
|
10902
|
-
...getConnectedNamespace(),
|
|
10903
|
-
...getNamespace(namespace)
|
|
10904
|
-
};
|
|
10905
|
-
const { _overrides, ...otherContextProps } = contextProps;
|
|
10906
|
-
const overrideProps = _overrides;
|
|
10907
|
-
const initialMergedProps = Object.entries(otherContextProps).length ? Object.assign({}, otherContextProps, props) : props;
|
|
10908
|
-
const propsWithChildren = initialMergedProps;
|
|
10909
|
-
const classes = (0, clsx.default)(getStyledClassNameFromKey(namespace), props.className);
|
|
10910
|
-
const rendered = typeof propsWithChildren.renderChildren === "function" ? propsWithChildren.renderChildren(initialMergedProps) : propsWithChildren.children;
|
|
10911
|
-
for (const key in initialMergedProps) finalComponentProps[key] = initialMergedProps[key];
|
|
10912
|
-
for (const key in overrideProps) finalComponentProps[key] = overrideProps[key];
|
|
10913
|
-
if (rendered !== void 0) finalComponentProps.children = rendered;
|
|
10914
|
-
finalComponentProps.className = classes;
|
|
10915
|
-
return finalComponentProps;
|
|
10916
|
-
}
|
|
10917
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/visually-hidden/styles.mjs
|
|
10918
|
-
const visuallyHidden = {
|
|
10919
|
-
border: 0,
|
|
10920
|
-
clip: "rect(1px, 1px, 1px, 1px)",
|
|
10921
|
-
WebkitClipPath: "inset( 50% )",
|
|
10922
|
-
clipPath: "inset( 50% )",
|
|
10923
|
-
height: "1px",
|
|
10924
|
-
margin: "-1px",
|
|
10925
|
-
overflow: "hidden",
|
|
10926
|
-
padding: 0,
|
|
10927
|
-
position: "absolute",
|
|
10928
|
-
width: "1px",
|
|
10929
|
-
wordWrap: "normal",
|
|
10930
|
-
wordBreak: "normal"
|
|
10931
|
-
};
|
|
10932
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/utils/polymorphic-element.mjs
|
|
10933
|
-
const customAttributeRegExp = /^(data|aria|x)-/i;
|
|
10934
|
-
const eventHandlerRegExp = /^on[A-Z]/;
|
|
10935
|
-
const svgElementNames = new Set(`animate animateMotion animateTransform circle clipPath defs desc ellipse
|
|
10936
|
-
feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix
|
|
10937
|
-
feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood
|
|
10938
|
-
feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode
|
|
10939
|
-
feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile
|
|
10940
|
-
feTurbulence filter foreignObject g image line linearGradient marker mask
|
|
10941
|
-
metadata mpath path pattern polygon polyline radialGradient rect set stop svg
|
|
10942
|
-
switch symbol text textPath tspan use view`.split(/\s+/));
|
|
10943
|
-
const baseElementProps = new Set(`children dangerouslySetInnerHTML key autoFocus defaultValue defaultChecked
|
|
10944
|
-
innerHTML suppressContentEditableWarning suppressHydrationWarning valueLink
|
|
10945
|
-
abbr accept acceptCharset accessKey action allow allowUserMedia
|
|
10946
|
-
allowPaymentRequest allowFullScreen allowTransparency alt async autoComplete
|
|
10947
|
-
autoPlay capture cellPadding cellSpacing challenge charSet checked cite classID
|
|
10948
|
-
className cols colSpan content contentEditable contextMenu controls controlsList
|
|
10949
|
-
coords crossOrigin data dateTime decoding default defer dir disabled
|
|
10950
|
-
disablePictureInPicture disableRemotePlayback download draggable encType
|
|
10951
|
-
enterKeyHint fetchpriority fetchPriority form formAction formEncType formMethod
|
|
10952
|
-
formNoValidate formTarget frameBorder headers height hidden high href hrefLang
|
|
10953
|
-
htmlFor httpEquiv id inputMode integrity is keyParams keyType kind label lang
|
|
10954
|
-
list loading loop low marginHeight marginWidth max maxLength media mediaGroup
|
|
10955
|
-
method min minLength multiple muted name nonce noValidate open optimum pattern
|
|
10956
|
-
placeholder playsInline popover popoverTarget popoverTargetAction poster
|
|
10957
|
-
preload profile radioGroup readOnly referrerPolicy rel required reversed role
|
|
10958
|
-
rows rowSpan sandbox scope scoped scrolling seamless selected shape size sizes
|
|
10959
|
-
slot span spellCheck src srcDoc srcLang srcSet start step style summary
|
|
10960
|
-
tabIndex target title translate type useMap value width wmode wrap about
|
|
10961
|
-
datatype inlist prefix property resource typeof vocab autoCapitalize
|
|
10962
|
-
autoCorrect autoSave color incremental fallback inert itemProp itemScope
|
|
10963
|
-
itemType itemID itemRef on option results security unselectable`.split(/\s+/));
|
|
10964
|
-
const svgElementProps = new Set(`accentHeight accumulate additive alignmentBaseline allowReorder alphabetic
|
|
10965
|
-
amplitude arabicForm ascent attributeName attributeType autoReverse azimuth
|
|
10966
|
-
baseFrequency baselineShift baseProfile bbox begin bias by calcMode capHeight
|
|
10967
|
-
clip clipPathUnits clipPath clipRule colorInterpolation
|
|
10968
|
-
colorInterpolationFilters colorProfile colorRendering contentScriptType
|
|
10969
|
-
contentStyleType cursor cx cy d decelerate descent diffuseConstant direction
|
|
10970
|
-
display divisor dominantBaseline dur dx dy edgeMode elevation enableBackground
|
|
10971
|
-
end exponent externalResourcesRequired fill fillOpacity fillRule filter
|
|
10972
|
-
filterRes filterUnits floodColor floodOpacity focusable fontFamily fontSize
|
|
10973
|
-
fontSizeAdjust fontStretch fontStyle fontVariant fontWeight format from fr fx
|
|
10974
|
-
fy g1 g2 glyphName glyphOrientationHorizontal glyphOrientationVertical
|
|
10975
|
-
glyphRef gradientTransform gradientUnits hanging horizAdvX horizOriginX
|
|
10976
|
-
ideographic imageRendering in in2 intercept k k1 k2 k3 k4 kernelMatrix
|
|
10977
|
-
kernelUnitLength kerning keyPoints keySplines keyTimes lengthAdjust
|
|
10978
|
-
letterSpacing lightingColor limitingConeAngle local markerEnd markerMid
|
|
10979
|
-
markerStart markerHeight markerUnits markerWidth mask maskContentUnits
|
|
10980
|
-
maskUnits mathematical mode numOctaves offset opacity operator order orient
|
|
10981
|
-
orientation origin overflow overlinePosition overlineThickness panose1
|
|
10982
|
-
paintOrder pathLength patternContentUnits patternTransform patternUnits
|
|
10983
|
-
pointerEvents points pointsAtX pointsAtY pointsAtZ preserveAlpha
|
|
10984
|
-
preserveAspectRatio primitiveUnits r radius refX refY renderingIntent
|
|
10985
|
-
repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate
|
|
10986
|
-
rx ry scale seed shapeRendering slope spacing specularConstant
|
|
10987
|
-
specularExponent speed spreadMethod startOffset stdDeviation stemh stemv
|
|
10988
|
-
stitchTiles stopColor stopOpacity strikethroughPosition strikethroughThickness
|
|
10989
|
-
string stroke strokeDasharray strokeDashoffset strokeLinecap strokeLinejoin
|
|
10990
|
-
strokeMiterlimit strokeOpacity strokeWidth surfaceScale systemLanguage
|
|
10991
|
-
tableValues targetX targetY textAnchor textDecoration textRendering textLength
|
|
10992
|
-
to transform u1 u2 underlinePosition underlineThickness unicode unicodeBidi
|
|
10993
|
-
unicodeRange unitsPerEm vAlphabetic vHanging vIdeographic vMathematical values
|
|
10994
|
-
vectorEffect version vertAdvY vertOriginX vertOriginY viewBox viewTarget
|
|
10995
|
-
visibility widths wordSpacing writingMode x xHeight x1 x2 xChannelSelector
|
|
10996
|
-
xlinkActuate xlinkArcrole xlinkHref xlinkRole xlinkShow xlinkTitle xlinkType
|
|
10997
|
-
xmlBase xmlns xmlnsXlink xmlLang xmlSpace y y1 y2 yChannelSelector z
|
|
10998
|
-
zoomAndPan`.split(/\s+/));
|
|
10999
|
-
const compatElementProps = /* @__PURE__ */ new Set([
|
|
11000
|
-
"autofocus",
|
|
11001
|
-
"class",
|
|
11002
|
-
"for"
|
|
11003
|
-
]);
|
|
11004
|
-
function isValidIntrinsicElementProp(prop, element) {
|
|
11005
|
-
if (customAttributeRegExp.test(prop) || eventHandlerRegExp.test(prop)) return true;
|
|
11006
|
-
if (baseElementProps.has(prop) || compatElementProps.has(prop)) return true;
|
|
11007
|
-
return svgElementNames.has(element) && svgElementProps.has(prop);
|
|
11008
|
-
}
|
|
11009
|
-
function filterIntrinsicElementProps(props, element) {
|
|
11010
|
-
return Object.fromEntries(Object.entries(props).filter(([prop]) => isValidIntrinsicElementProp(prop, element)));
|
|
11011
|
-
}
|
|
11012
|
-
function UnforwardedPolymorphicElement({ as, ...props }, ref) {
|
|
11013
|
-
const Element = as || "div";
|
|
11014
|
-
const forwardedProps = typeof Element === "string" ? filterIntrinsicElementProps(props, Element) : props;
|
|
11015
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Element, {
|
|
11016
|
-
ref,
|
|
11017
|
-
...forwardedProps
|
|
11018
|
-
});
|
|
11019
|
-
}
|
|
11020
|
-
/**
|
|
11021
|
-
* Internal utility for components that need Emotion-compatible `as` behavior
|
|
11022
|
-
* while rendering with plain React elements.
|
|
11023
|
-
*/
|
|
11024
|
-
const PolymorphicElement = (0, react.forwardRef)(UnforwardedPolymorphicElement);
|
|
11025
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/view/component.mjs
|
|
11026
|
-
function UnforwardedView({ css, ...restProps }, ref) {
|
|
11027
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PolymorphicElement, {
|
|
11028
|
-
ref,
|
|
11029
|
-
...restProps
|
|
11030
|
-
});
|
|
11031
|
-
}
|
|
11032
|
-
/**
|
|
11033
|
-
* `View` is a core component that renders everything in the library.
|
|
11034
|
-
* It is the principle component in the entire library.
|
|
11035
|
-
*
|
|
11036
|
-
* ```jsx
|
|
11037
|
-
* import { View } from `@wordpress/components`;
|
|
11038
|
-
*
|
|
11039
|
-
* function Example() {
|
|
11040
|
-
* return (
|
|
11041
|
-
* <View>
|
|
11042
|
-
* Code is Poetry
|
|
11043
|
-
* </View>
|
|
11044
|
-
* );
|
|
11045
|
-
* }
|
|
11046
|
-
* ```
|
|
11047
|
-
*/
|
|
11048
|
-
const View = Object.assign((0, react.forwardRef)(UnforwardedView), { selector: ".components-view" });
|
|
11049
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/visually-hidden/component.mjs
|
|
11050
|
-
function UnconnectedVisuallyHidden(props, forwardedRef) {
|
|
11051
|
-
const { style: styleProp, ...contextProps } = useContextSystem(props, "VisuallyHidden");
|
|
11052
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(View, {
|
|
11053
|
-
ref: forwardedRef,
|
|
11054
|
-
...contextProps,
|
|
11055
|
-
"data-visually-hidden": "",
|
|
11056
|
-
style: {
|
|
11057
|
-
...visuallyHidden,
|
|
11058
|
-
...styleProp || {}
|
|
11059
|
-
}
|
|
11060
|
-
});
|
|
11061
|
-
}
|
|
11062
|
-
/**
|
|
11063
|
-
* `VisuallyHidden` is a component used to render text intended to be visually
|
|
11064
|
-
* hidden, but will show for alternate devices, for example a screen reader.
|
|
11065
|
-
*
|
|
11066
|
-
* ```jsx
|
|
11067
|
-
* import { VisuallyHidden } from `@wordpress/components`;
|
|
11068
|
-
*
|
|
11069
|
-
* function Example() {
|
|
11070
|
-
* return (
|
|
11071
|
-
* <VisuallyHidden>
|
|
11072
|
-
* <label>Code is Poetry</label>
|
|
11073
|
-
* </VisuallyHidden>
|
|
11074
|
-
* );
|
|
11075
|
-
* }
|
|
11076
|
-
* ```
|
|
11077
|
-
*/
|
|
11078
|
-
const VisuallyHidden$1 = contextConnect(UnconnectedVisuallyHidden, "VisuallyHidden");
|
|
11079
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/utils/use-responsive-value.mjs
|
|
11080
|
-
const breakpoints = [
|
|
11081
|
-
"40em",
|
|
11082
|
-
"52em",
|
|
11083
|
-
"64em"
|
|
11084
|
-
];
|
|
11085
|
-
const useBreakpointIndex = (options = {}) => {
|
|
11086
|
-
const { defaultIndex = 0, enabled = true } = options;
|
|
11087
|
-
if (typeof defaultIndex !== "number") throw new TypeError(`Default breakpoint index should be a number. Got: ${defaultIndex}, ${typeof defaultIndex}`);
|
|
11088
|
-
else if (defaultIndex < 0 || defaultIndex > breakpoints.length - 1) throw new RangeError(`Default breakpoint index out of range. Theme has ${breakpoints.length} breakpoints, got index ${defaultIndex}`);
|
|
11089
|
-
const [value, setValue] = (0, react.useState)(defaultIndex);
|
|
11090
|
-
(0, react.useEffect)(() => {
|
|
11091
|
-
if (!enabled) return;
|
|
11092
|
-
const getIndex = () => breakpoints.filter((bp) => {
|
|
11093
|
-
return typeof window !== "undefined" ? window.matchMedia(`screen and (min-width: ${bp})`).matches : false;
|
|
11094
|
-
}).length;
|
|
11095
|
-
const onResize = () => {
|
|
11096
|
-
const newValue = getIndex();
|
|
11097
|
-
if (value !== newValue) setValue(newValue);
|
|
11098
|
-
};
|
|
11099
|
-
onResize();
|
|
11100
|
-
if (typeof window !== "undefined") window.addEventListener("resize", onResize);
|
|
11101
|
-
return () => {
|
|
11102
|
-
if (typeof window !== "undefined") window.removeEventListener("resize", onResize);
|
|
11103
|
-
};
|
|
11104
|
-
}, [value, enabled]);
|
|
11105
|
-
return value;
|
|
11106
|
-
};
|
|
11107
|
-
function useResponsiveValue(values, options = {}) {
|
|
11108
|
-
const isResponsive = Array.isArray(values) && values.length > 1;
|
|
11109
|
-
const index = useBreakpointIndex({
|
|
11110
|
-
...options,
|
|
11111
|
-
enabled: isResponsive
|
|
11112
|
-
});
|
|
11113
|
-
if (!Array.isArray(values) && typeof values !== "function") return values;
|
|
11114
|
-
const array = values || [];
|
|
11115
|
-
return array[index >= array.length ? array.length - 1 : index];
|
|
11116
|
-
}
|
|
11117
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/grid/utils.mjs
|
|
11118
|
-
const ALIGNMENTS = {
|
|
11119
|
-
bottom: {
|
|
11120
|
-
alignItems: "flex-end",
|
|
11121
|
-
justifyContent: "center"
|
|
11122
|
-
},
|
|
11123
|
-
bottomLeft: {
|
|
11124
|
-
alignItems: "flex-end",
|
|
11125
|
-
justifyContent: "flex-start"
|
|
11126
|
-
},
|
|
11127
|
-
bottomRight: {
|
|
11128
|
-
alignItems: "flex-end",
|
|
11129
|
-
justifyContent: "flex-end"
|
|
11130
|
-
},
|
|
11131
|
-
center: {
|
|
11132
|
-
alignItems: "center",
|
|
11133
|
-
justifyContent: "center"
|
|
11134
|
-
},
|
|
11135
|
-
spaced: {
|
|
11136
|
-
alignItems: "center",
|
|
11137
|
-
justifyContent: "space-between"
|
|
11138
|
-
},
|
|
11139
|
-
left: {
|
|
11140
|
-
alignItems: "center",
|
|
11141
|
-
justifyContent: "flex-start"
|
|
11142
|
-
},
|
|
11143
|
-
right: {
|
|
11144
|
-
alignItems: "center",
|
|
11145
|
-
justifyContent: "flex-end"
|
|
11146
|
-
},
|
|
11147
|
-
stretch: { alignItems: "stretch" },
|
|
11148
|
-
top: {
|
|
11149
|
-
alignItems: "flex-start",
|
|
11150
|
-
justifyContent: "center"
|
|
11151
|
-
},
|
|
11152
|
-
topLeft: {
|
|
11153
|
-
alignItems: "flex-start",
|
|
11154
|
-
justifyContent: "flex-start"
|
|
11155
|
-
},
|
|
11156
|
-
topRight: {
|
|
11157
|
-
alignItems: "flex-start",
|
|
11158
|
-
justifyContent: "flex-end"
|
|
11159
|
-
}
|
|
11160
|
-
};
|
|
11161
|
-
function getAlignmentProps(alignment) {
|
|
11162
|
-
return alignment ? ALIGNMENTS[alignment] ?? {} : {};
|
|
11163
|
-
}
|
|
11164
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/grid/hook.mjs
|
|
11165
|
-
const STYLE_HASH_ATTRIBUTE = "data-wp-hash";
|
|
11166
|
-
/**
|
|
11167
|
-
* Returns the shared style runtime registry.
|
|
11168
|
-
*
|
|
11169
|
-
* The registry is stored on `globalThis` so separately bundled copies of this
|
|
11170
|
-
* package can coordinate through the same document and style maps.
|
|
11171
|
-
*
|
|
11172
|
-
* @return The shared runtime registry.
|
|
11173
|
-
*/
|
|
11174
|
-
function getRuntime() {
|
|
11175
|
-
const globalScope = globalThis;
|
|
11176
|
-
if (globalScope.__wpStyleRuntime) return globalScope.__wpStyleRuntime;
|
|
11177
|
-
globalScope.__wpStyleRuntime = {
|
|
11178
|
-
documents: /* @__PURE__ */ new Map(),
|
|
11179
|
-
styles: /* @__PURE__ */ new Map(),
|
|
11180
|
-
injectedStyles: /* @__PURE__ */ new WeakMap()
|
|
11181
|
-
};
|
|
11182
|
-
if (typeof document !== "undefined") registerDocument(document);
|
|
11183
|
-
return globalScope.__wpStyleRuntime;
|
|
11184
|
-
}
|
|
11185
|
-
/**
|
|
11186
|
-
* Checks whether a document already contains a style tag for a hash.
|
|
11187
|
-
*
|
|
11188
|
-
* @param targetDocument Document to inspect.
|
|
11189
|
-
* @param hash Stable hash for the transformed CSS.
|
|
11190
|
-
*
|
|
11191
|
-
* @return Whether the style hash already exists in the document.
|
|
11192
|
-
*/
|
|
11193
|
-
function documentContainsStyleHash(targetDocument, hash) {
|
|
11194
|
-
if (!targetDocument.head) return false;
|
|
11195
|
-
for (const style of targetDocument.head.querySelectorAll(`style[${STYLE_HASH_ATTRIBUTE}]`)) if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) return true;
|
|
11196
|
-
return false;
|
|
11197
|
-
}
|
|
11198
|
-
/**
|
|
11199
|
-
* Injects a registered style into a document, unless that document already
|
|
11200
|
-
* contains a style tag for the same hash.
|
|
11201
|
-
*
|
|
11202
|
-
* @param targetDocument Document to inject the style into.
|
|
11203
|
-
* @param hash Stable hash for the transformed CSS.
|
|
11204
|
-
* @param css CSS text to inject.
|
|
11205
|
-
*/
|
|
11206
|
-
function injectStyle(targetDocument, hash, css) {
|
|
11207
|
-
if (!targetDocument.head) return;
|
|
11208
|
-
const runtime = getRuntime();
|
|
11209
|
-
let injectedStyles = runtime.injectedStyles.get(targetDocument);
|
|
11210
|
-
if (!injectedStyles) {
|
|
11211
|
-
injectedStyles = /* @__PURE__ */ new Set();
|
|
11212
|
-
runtime.injectedStyles.set(targetDocument, injectedStyles);
|
|
11213
|
-
}
|
|
11214
|
-
if (injectedStyles.has(hash)) return;
|
|
11215
|
-
if (documentContainsStyleHash(targetDocument, hash)) {
|
|
11216
|
-
injectedStyles.add(hash);
|
|
11217
|
-
return;
|
|
11218
|
-
}
|
|
11219
|
-
const style = targetDocument.createElement("style");
|
|
11220
|
-
style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
|
|
11221
|
-
style.appendChild(targetDocument.createTextNode(css));
|
|
11222
|
-
targetDocument.head.appendChild(style);
|
|
11223
|
-
injectedStyles.add(hash);
|
|
11224
|
-
}
|
|
11225
|
-
/**
|
|
11226
|
-
* Registers a document as a style injection target.
|
|
11227
|
-
*
|
|
11228
|
-
* Existing registered styles are replayed into the document immediately.
|
|
11229
|
-
* Documents are reference-counted so multiple providers can safely register the
|
|
11230
|
-
* same document without one cleanup removing it while another registration is
|
|
11231
|
-
* still active.
|
|
11232
|
-
*
|
|
11233
|
-
* @param targetDocument Document to receive registered styles.
|
|
11234
|
-
* @return Cleanup function that unregisters this document registration.
|
|
11235
|
-
*/
|
|
11236
|
-
function registerDocument(targetDocument) {
|
|
11237
|
-
const runtime = getRuntime();
|
|
11238
|
-
runtime.documents.set(targetDocument, (runtime.documents.get(targetDocument) ?? 0) + 1);
|
|
11239
|
-
for (const [hash, css] of runtime.styles) injectStyle(targetDocument, hash, css);
|
|
11240
|
-
return () => {
|
|
11241
|
-
const count = runtime.documents.get(targetDocument);
|
|
11242
|
-
if (count === void 0) return;
|
|
11243
|
-
if (count <= 1) {
|
|
11244
|
-
runtime.documents.delete(targetDocument);
|
|
11245
|
-
return;
|
|
11246
|
-
}
|
|
11247
|
-
runtime.documents.set(targetDocument, count - 1);
|
|
11248
|
-
};
|
|
11249
|
-
}
|
|
11250
|
-
/**
|
|
11251
|
-
* Registers a style and injects it into all registered documents.
|
|
11252
|
-
*
|
|
11253
|
-
* The hash is used as the deduplication key, so calling this repeatedly with
|
|
11254
|
-
* the same hash will not add duplicate style tags to a document.
|
|
11255
|
-
* Registered styles are retained for the lifetime of the page so they can be
|
|
11256
|
-
* replayed into documents that are registered later.
|
|
11257
|
-
*
|
|
11258
|
-
* @param hash Stable hash for the transformed CSS.
|
|
11259
|
-
* @param css CSS text to inject.
|
|
11260
|
-
*/
|
|
11261
|
-
function registerStyle(hash, css) {
|
|
11262
|
-
const runtime = getRuntime();
|
|
11263
|
-
runtime.styles.set(hash, css);
|
|
11264
|
-
for (const targetDocument of runtime.documents.keys()) injectStyle(targetDocument, hash, css);
|
|
11265
|
-
}
|
|
11266
|
-
if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("b1a8e206b7", ".ad3e2e48d7abbecd__grid{--wp-components-grid-align:initial;--wp-components-grid-justify:initial;--wp-components-grid-gap:initial;--wp-components-grid-template-columns:initial;--wp-components-grid-template-rows:initial;--wp-components-grid-row-gap:initial;--wp-components-grid-column-gap:initial;display:grid}.ad3e2e48d7abbecd__grid:not(:where(._519ed3f6107b2f0e__row-gap-inherit,.cd62b95f8b7a55ca__row-gap-initial,._226744df7703790b__row-gap-unset,._372e9fe7fa60a162__row-gap-revert,.a788bb6771f557d4__row-gap-revert-layer)){row-gap:var(--wp-components-grid-row-gap,calc(4px*var(--wp-components-grid-gap)))}.ad3e2e48d7abbecd__grid:not(:where(.c811e15146756906__column-gap-inherit,._17d3c2ea7daf9367__column-gap-initial,._595e6195481b9016__column-gap-unset,.a3ecb3e47731c19e__column-gap-revert,._7c87cfbf3c22f476__column-gap-revert-layer)){column-gap:var(--wp-components-grid-column-gap,calc(4px*var(--wp-components-grid-gap)))}._25a972dc3223dff3__has-align:not(:where(._3cda38ca04ad4eb9__align-inherit,.f1d7342c52a8cb04__align-initial,._0d1a6c7ee990f351__align-unset,._57c7b85e7abf618b__align-revert,._82cb0c4950962787__align-revert-layer)){align-items:var(--wp-components-grid-align)}._801d1214723237b8__has-justify:not(:where(.b83c5dbf3264515b__justify-inherit,._5b7394b39d69670e__justify-initial,._3e7f0418752602e5__justify-unset,._5f937df46d7b2259__justify-revert,.bf2a4718a1ddba5c__justify-revert-layer)){justify-content:var(--wp-components-grid-justify)}._3c6ac9820776f1cb__has-template-columns:not(:where(._35faa4d32eedef32__template-columns-inherit,._8150cadb3f438833__template-columns-initial,.bcd5f2b096dec164__template-columns-unset,._48d047bc6fb687b8__template-columns-revert,._93f250669aa1a5a7__template-columns-revert-layer)){grid-template-columns:var(--wp-components-grid-template-columns)}.c2703b6b15e69b82__has-template-rows:not(:where(._3e9d5ffc53e4afc0__template-rows-inherit,._64bb5fbdf6d1038a__template-rows-initial,.f8f5df7043222325__template-rows-unset,._408aaf58100e60d5__template-rows-revert,.e0730d6abf0f3d2a__template-rows-revert-layer)){grid-template-rows:var(--wp-components-grid-template-rows)}._43af1cbfad3e73dd__is-inline{display:inline-grid;vertical-align:middle}._3cda38ca04ad4eb9__align-inherit{align-items:inherit}.f1d7342c52a8cb04__align-initial{align-items:normal}._0d1a6c7ee990f351__align-unset{align-items:unset}._57c7b85e7abf618b__align-revert{align-items:revert}._82cb0c4950962787__align-revert-layer{align-items:revert-layer}.b83c5dbf3264515b__justify-inherit{justify-content:inherit}._5b7394b39d69670e__justify-initial{justify-content:normal}._3e7f0418752602e5__justify-unset{justify-content:unset}._5f937df46d7b2259__justify-revert{justify-content:revert}.bf2a4718a1ddba5c__justify-revert-layer{justify-content:revert-layer}._35faa4d32eedef32__template-columns-inherit{grid-template-columns:inherit}._8150cadb3f438833__template-columns-initial{grid-template-columns:none}.bcd5f2b096dec164__template-columns-unset{grid-template-columns:unset}._48d047bc6fb687b8__template-columns-revert{grid-template-columns:revert}._93f250669aa1a5a7__template-columns-revert-layer{grid-template-columns:revert-layer}._3e9d5ffc53e4afc0__template-rows-inherit{grid-template-rows:inherit}._64bb5fbdf6d1038a__template-rows-initial{grid-template-rows:none}.f8f5df7043222325__template-rows-unset{grid-template-rows:unset}._408aaf58100e60d5__template-rows-revert{grid-template-rows:revert}.e0730d6abf0f3d2a__template-rows-revert-layer{grid-template-rows:revert-layer}._519ed3f6107b2f0e__row-gap-inherit{row-gap:inherit}.cd62b95f8b7a55ca__row-gap-initial{row-gap:normal}._226744df7703790b__row-gap-unset{row-gap:unset}._372e9fe7fa60a162__row-gap-revert{row-gap:revert}.a788bb6771f557d4__row-gap-revert-layer{row-gap:revert-layer}.c811e15146756906__column-gap-inherit{column-gap:inherit}._17d3c2ea7daf9367__column-gap-initial{column-gap:normal}._595e6195481b9016__column-gap-unset{column-gap:unset}.a3ecb3e47731c19e__column-gap-revert{column-gap:revert}._7c87cfbf3c22f476__column-gap-revert-layer{column-gap:revert-layer}");
|
|
11267
|
-
var style_module_default = {
|
|
11268
|
-
"grid": "ad3e2e48d7abbecd__grid",
|
|
11269
|
-
"row-gap-inherit": "_519ed3f6107b2f0e__row-gap-inherit",
|
|
11270
|
-
"row-gap-initial": "cd62b95f8b7a55ca__row-gap-initial",
|
|
11271
|
-
"row-gap-unset": "_226744df7703790b__row-gap-unset",
|
|
11272
|
-
"row-gap-revert": "_372e9fe7fa60a162__row-gap-revert",
|
|
11273
|
-
"row-gap-revert-layer": "a788bb6771f557d4__row-gap-revert-layer",
|
|
11274
|
-
"column-gap-inherit": "c811e15146756906__column-gap-inherit",
|
|
11275
|
-
"column-gap-initial": "_17d3c2ea7daf9367__column-gap-initial",
|
|
11276
|
-
"column-gap-unset": "_595e6195481b9016__column-gap-unset",
|
|
11277
|
-
"column-gap-revert": "a3ecb3e47731c19e__column-gap-revert",
|
|
11278
|
-
"column-gap-revert-layer": "_7c87cfbf3c22f476__column-gap-revert-layer",
|
|
11279
|
-
"has-align": "_25a972dc3223dff3__has-align",
|
|
11280
|
-
"align-inherit": "_3cda38ca04ad4eb9__align-inherit",
|
|
11281
|
-
"align-initial": "f1d7342c52a8cb04__align-initial",
|
|
11282
|
-
"align-unset": "_0d1a6c7ee990f351__align-unset",
|
|
11283
|
-
"align-revert": "_57c7b85e7abf618b__align-revert",
|
|
11284
|
-
"align-revert-layer": "_82cb0c4950962787__align-revert-layer",
|
|
11285
|
-
"has-justify": "_801d1214723237b8__has-justify",
|
|
11286
|
-
"justify-inherit": "b83c5dbf3264515b__justify-inherit",
|
|
11287
|
-
"justify-initial": "_5b7394b39d69670e__justify-initial",
|
|
11288
|
-
"justify-unset": "_3e7f0418752602e5__justify-unset",
|
|
11289
|
-
"justify-revert": "_5f937df46d7b2259__justify-revert",
|
|
11290
|
-
"justify-revert-layer": "bf2a4718a1ddba5c__justify-revert-layer",
|
|
11291
|
-
"has-template-columns": "_3c6ac9820776f1cb__has-template-columns",
|
|
11292
|
-
"template-columns-inherit": "_35faa4d32eedef32__template-columns-inherit",
|
|
11293
|
-
"template-columns-initial": "_8150cadb3f438833__template-columns-initial",
|
|
11294
|
-
"template-columns-unset": "bcd5f2b096dec164__template-columns-unset",
|
|
11295
|
-
"template-columns-revert": "_48d047bc6fb687b8__template-columns-revert",
|
|
11296
|
-
"template-columns-revert-layer": "_93f250669aa1a5a7__template-columns-revert-layer",
|
|
11297
|
-
"has-template-rows": "c2703b6b15e69b82__has-template-rows",
|
|
11298
|
-
"template-rows-inherit": "_3e9d5ffc53e4afc0__template-rows-inherit",
|
|
11299
|
-
"template-rows-initial": "_64bb5fbdf6d1038a__template-rows-initial",
|
|
11300
|
-
"template-rows-unset": "f8f5df7043222325__template-rows-unset",
|
|
11301
|
-
"template-rows-revert": "_408aaf58100e60d5__template-rows-revert",
|
|
11302
|
-
"template-rows-revert-layer": "e0730d6abf0f3d2a__template-rows-revert-layer",
|
|
11303
|
-
"is-inline": "_43af1cbfad3e73dd__is-inline"
|
|
11304
|
-
};
|
|
11305
|
-
const CSS_WIDE_KEYWORDS = /* @__PURE__ */ new Set([
|
|
11306
|
-
"inherit",
|
|
11307
|
-
"initial",
|
|
11308
|
-
"unset",
|
|
11309
|
-
"revert",
|
|
11310
|
-
"revert-layer"
|
|
11311
|
-
]);
|
|
11312
|
-
function toCSSValue(value) {
|
|
11313
|
-
return typeof value === "number" ? `${value}px` : value?.trim() || void 0;
|
|
11314
|
-
}
|
|
11315
|
-
function useGrid(props) {
|
|
11316
|
-
const { align, alignment, className, columnGap, columns = 2, gap = 3, isInline = false, justify, rowGap, rows, style, templateColumns, templateRows, ...otherProps } = useContextSystem(props, "Grid");
|
|
11317
|
-
const column = useResponsiveValue(Array.isArray(columns) ? columns : [columns]);
|
|
11318
|
-
const row = useResponsiveValue(Array.isArray(rows) ? rows : [rows]);
|
|
11319
|
-
const gridTemplateColumns = templateColumns || !!column && `repeat( ${column}, 1fr )`;
|
|
11320
|
-
const gridTemplateRows = templateRows || !!row && `repeat( ${row}, 1fr )`;
|
|
11321
|
-
const alignmentProps = getAlignmentProps(alignment);
|
|
11322
|
-
const values = {
|
|
11323
|
-
align: alignmentProps.alignItems ?? align,
|
|
11324
|
-
justify: alignmentProps.justifyContent ?? justify,
|
|
11325
|
-
"template-columns": gridTemplateColumns || void 0,
|
|
11326
|
-
"template-rows": gridTemplateRows || void 0,
|
|
11327
|
-
"row-gap": rowGap,
|
|
11328
|
-
"column-gap": columnGap
|
|
11329
|
-
};
|
|
11330
|
-
return {
|
|
11331
|
-
...otherProps,
|
|
11332
|
-
className: (0, clsx.default)(style_module_default.grid, {
|
|
11333
|
-
[style_module_default["is-inline"]]: isInline,
|
|
11334
|
-
[style_module_default["has-align"]]: !!values.align?.trim(),
|
|
11335
|
-
[style_module_default["has-justify"]]: !!values.justify?.trim(),
|
|
11336
|
-
[style_module_default["has-template-columns"]]: !!toCSSValue(values["template-columns"]),
|
|
11337
|
-
[style_module_default["has-template-rows"]]: !!toCSSValue(values["template-rows"])
|
|
11338
|
-
}, Object.entries(values).map(([property, value]) => {
|
|
11339
|
-
const keyword = typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
11340
|
-
return CSS_WIDE_KEYWORDS.has(keyword) && style_module_default[`${property}-${keyword}`];
|
|
11341
|
-
}), className),
|
|
11342
|
-
style: {
|
|
11343
|
-
"--wp-components-grid-align": values.align,
|
|
11344
|
-
"--wp-components-grid-justify": values.justify,
|
|
11345
|
-
"--wp-components-grid-gap": gap,
|
|
11346
|
-
"--wp-components-grid-template-columns": toCSSValue(values["template-columns"]),
|
|
11347
|
-
"--wp-components-grid-template-rows": toCSSValue(values["template-rows"]),
|
|
11348
|
-
"--wp-components-grid-row-gap": toCSSValue(rowGap),
|
|
11349
|
-
"--wp-components-grid-column-gap": toCSSValue(columnGap),
|
|
11350
|
-
...style
|
|
11351
|
-
}
|
|
11352
|
-
};
|
|
11353
|
-
}
|
|
11354
|
-
// ../../../node_modules/.pnpm/@wordpress+components@44.0.0_patch_hash=dd89cc780626599c6721f4e05e7091dd7b0aed577d8a667_94a1a77c56d75249398bc99af3f14fa5/node_modules/@wordpress/components/build-module/grid/component.mjs
|
|
11355
|
-
function UnconnectedGrid(props, forwardedRef) {
|
|
11356
|
-
const gridProps = useGrid(props);
|
|
11357
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(View, {
|
|
11358
|
-
...gridProps,
|
|
11359
|
-
ref: forwardedRef
|
|
11360
|
-
});
|
|
11361
|
-
}
|
|
11362
|
-
/**
|
|
11363
|
-
* `Grid` is a primitive layout component that can arrange content in a grid configuration.
|
|
11364
|
-
*
|
|
11365
|
-
* ```jsx
|
|
11366
|
-
* import {
|
|
11367
|
-
* __experimentalGrid as Grid,
|
|
11368
|
-
* __experimentalText as Text
|
|
11369
|
-
* } from `@wordpress/components`;
|
|
11370
|
-
*
|
|
11371
|
-
* function Example() {
|
|
11372
|
-
* return (
|
|
11373
|
-
* <Grid columns={ 3 }>
|
|
11374
|
-
* <Text>Code</Text>
|
|
11375
|
-
* <Text>is</Text>
|
|
11376
|
-
* <Text>Poetry</Text>
|
|
11377
|
-
* </Grid>
|
|
11378
|
-
* );
|
|
11379
|
-
* }
|
|
11380
|
-
* ```
|
|
11381
|
-
*/
|
|
11382
|
-
const Grid = contextConnect(UnconnectedGrid, "Grid");
|
|
11383
10224
|
// src/charts/leaderboard-chart/hooks/use-fitted-row-count.ts
|
|
11384
10225
|
/**
|
|
11385
10226
|
* Fractional layout rounding can put a row's bottom a hair past the container's
|
|
@@ -11526,6 +10367,8 @@ var leaderboard_chart_module_default = {
|
|
|
11526
10367
|
"deltaValue--up": "a8ccharts-GovfoW-deltaValue--up",
|
|
11527
10368
|
"emptyState": "a8ccharts-GovfoW-emptyState",
|
|
11528
10369
|
"fitEmptyState": "a8ccharts-GovfoW-fitEmptyState",
|
|
10370
|
+
"grid": "a8ccharts-GovfoW-grid",
|
|
10371
|
+
"grid--comparison": "a8ccharts-GovfoW-grid--comparison",
|
|
11529
10372
|
"interactiveRow": "a8ccharts-GovfoW-interactiveRow",
|
|
11530
10373
|
"is-overlay": "a8ccharts-GovfoW-is-overlay",
|
|
11531
10374
|
"label": "a8ccharts-GovfoW-label",
|
|
@@ -11579,8 +10422,6 @@ function resolveLeaderboardEntries(data, { includePrevious, clampNegative = fals
|
|
|
11579
10422
|
});
|
|
11580
10423
|
}
|
|
11581
10424
|
// src/charts/leaderboard-chart/leaderboard-chart.tsx
|
|
11582
|
-
const ROW_GAP = "var(--a8c-charts-dimension-leaderboard-row-gap, 12px)";
|
|
11583
|
-
const COLUMN_GAP = "var(--a8c-charts-dimension-leaderboard-column-gap, 4px)";
|
|
11584
10425
|
/** Indexed by `Math.sign( delta ) + 1`, so [negative, neutral, positive]. */
|
|
11585
10426
|
const DELTA_TREND_CLASS = [
|
|
11586
10427
|
"deltaValue--down",
|
|
@@ -11634,8 +10475,9 @@ function forwardCellClickToRowButton(event) {
|
|
|
11634
10475
|
if (event.target.closest("a, button")) return;
|
|
11635
10476
|
event.currentTarget.querySelector(":scope > button")?.click();
|
|
11636
10477
|
}
|
|
11637
|
-
const BarLabel = ({ label }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: typeof label === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_ui.Text, {
|
|
10478
|
+
const BarLabel = ({ label, isInteractiveRow }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: typeof label === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_ui.Text, {
|
|
11638
10479
|
className: leaderboard_chart_module_default.label,
|
|
10480
|
+
title: isInteractiveRow ? label : void 0,
|
|
11639
10481
|
children: label
|
|
11640
10482
|
}) : label });
|
|
11641
10483
|
const Bar = ({ share, color, animation, divergingScale }) => {
|
|
@@ -11674,7 +10516,10 @@ const BarWithLabel = ({ entry, withComparison, withOverlayLabel, primaryColor, s
|
|
|
11674
10516
|
})] });
|
|
11675
10517
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11676
10518
|
className: (0, clsx.default)(leaderboard_chart_module_default.barWithLabelContainer, { [leaderboard_chart_module_default["is-overlay"]]: withOverlayLabel }),
|
|
11677
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(BarLabel, {
|
|
10519
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(BarLabel, {
|
|
10520
|
+
label: entry.label,
|
|
10521
|
+
isInteractiveRow: Boolean(entry.onClick)
|
|
10522
|
+
}), bars]
|
|
11678
10523
|
});
|
|
11679
10524
|
};
|
|
11680
10525
|
/**
|
|
@@ -11800,7 +10645,7 @@ const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propW
|
|
|
11800
10645
|
const { contentRef, fittedCount, isMeasurable } = useFittedRowCount(fitRows && !allSeriesHidden, data?.length ?? 0, data);
|
|
11801
10646
|
const shouldFitRows = fitRows && isMeasurable;
|
|
11802
10647
|
const showComparisonColumn = withComparison && isComparisonVisible;
|
|
11803
|
-
const
|
|
10648
|
+
const hasDeltaColumn = showComparisonColumn && isPrimaryVisible;
|
|
11804
10649
|
if (!data || data.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChartInstanceContext.Provider, {
|
|
11805
10650
|
value: { chartId },
|
|
11806
10651
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChartLayout, {
|
|
@@ -11862,13 +10707,11 @@ const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propW
|
|
|
11862
10707
|
}), allSeriesHidden ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11863
10708
|
className: leaderboard_chart_module_default.emptyState,
|
|
11864
10709
|
children: getAllHiddenMessage(legendInteractive, "series")
|
|
11865
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
10710
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11866
10711
|
role: "list",
|
|
11867
10712
|
"aria-label": ariaLabel ?? (0, _wordpress_i18n.__)("Leaderboard chart", "jetpack-charts"),
|
|
11868
|
-
templateColumns,
|
|
11869
|
-
rowGap: ROW_GAP,
|
|
11870
|
-
columnGap: COLUMN_GAP,
|
|
11871
10713
|
"data-leaderboard-grid": true,
|
|
10714
|
+
className: (0, clsx.default)(leaderboard_chart_module_default.grid, { [leaderboard_chart_module_default["grid--comparison"]]: hasDeltaColumn }),
|
|
11872
10715
|
children: resolvedData.map((entry, rowIndex) => {
|
|
11873
10716
|
const rowStyle = shouldFitRows && rowIndex >= fittedCount ? { visibility: "hidden" } : void 0;
|
|
11874
10717
|
const hasPreviousPeriodValue = hasPreviousValue(entry);
|
|
@@ -11903,8 +10746,8 @@ const LeaderboardChartInternal = ({ data, chartId: providedChartId, width: propW
|
|
|
11903
10746
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11904
10747
|
"aria-hidden": "true",
|
|
11905
10748
|
children: "—"
|
|
11906
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden
|
|
11907
|
-
|
|
10749
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_ui.VisuallyHidden, {
|
|
10750
|
+
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}),
|
|
11908
10751
|
children: hasPreviousPeriodValue ? (0, _wordpress_i18n.__)("Percentage change unavailable", "jetpack-charts") : (0, _wordpress_i18n.__)("No comparison data", "jetpack-charts")
|
|
11909
10752
|
})]
|
|
11910
10753
|
})
|