@symbo.ls/create 2.11.198 → 2.11.204
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/dist/cjs/bundle/index.js +321 -732
- package/package.json +2 -2
package/dist/cjs/bundle/index.js
CHANGED
|
@@ -464,7 +464,7 @@ var require_object = __commonJS({
|
|
|
464
464
|
flattenRecursive: () => flattenRecursive,
|
|
465
465
|
isEqualDeep: () => isEqualDeep2,
|
|
466
466
|
map: () => map2,
|
|
467
|
-
merge: () =>
|
|
467
|
+
merge: () => merge4,
|
|
468
468
|
mergeArrayExclude: () => mergeArrayExclude,
|
|
469
469
|
mergeIfExisted: () => mergeIfExisted,
|
|
470
470
|
objectToString: () => objectToString,
|
|
@@ -494,7 +494,7 @@ var require_object = __commonJS({
|
|
|
494
494
|
obj[e] = exec4(extention[e], element);
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
|
-
var
|
|
497
|
+
var merge4 = (element, obj, excludeFrom = []) => {
|
|
498
498
|
for (const e in obj) {
|
|
499
499
|
const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, e);
|
|
500
500
|
if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__"))
|
|
@@ -812,22 +812,28 @@ var require_object = __commonJS({
|
|
|
812
812
|
delete objectized[prop];
|
|
813
813
|
return stack;
|
|
814
814
|
};
|
|
815
|
-
var isEqualDeep2 = (param, element) => {
|
|
816
|
-
if (param === element)
|
|
815
|
+
var isEqualDeep2 = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
816
|
+
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
817
|
+
return param === element;
|
|
818
|
+
}
|
|
819
|
+
if (visited.has(param) || visited.has(element)) {
|
|
817
820
|
return true;
|
|
818
|
-
|
|
821
|
+
}
|
|
822
|
+
visited.add(param);
|
|
823
|
+
visited.add(element);
|
|
824
|
+
const keysParam = Object.keys(param);
|
|
825
|
+
const keysElement = Object.keys(element);
|
|
826
|
+
if (keysParam.length !== keysElement.length) {
|
|
819
827
|
return false;
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
if (!isEqual)
|
|
830
|
-
return false;
|
|
828
|
+
}
|
|
829
|
+
for (const key of keysParam) {
|
|
830
|
+
if (!keysElement.includes(key)) {
|
|
831
|
+
return false;
|
|
832
|
+
}
|
|
833
|
+
const paramProp = param[key];
|
|
834
|
+
const elementProp = element[key];
|
|
835
|
+
if (!isEqualDeep2(paramProp, elementProp, visited)) {
|
|
836
|
+
return false;
|
|
831
837
|
}
|
|
832
838
|
}
|
|
833
839
|
return true;
|
|
@@ -871,6 +877,7 @@ var require_function = __commonJS({
|
|
|
871
877
|
var function_exports = {};
|
|
872
878
|
__export2(function_exports, {
|
|
873
879
|
debounce: () => debounce,
|
|
880
|
+
isStringFunction: () => isStringFunction,
|
|
874
881
|
memoize: () => memoize2
|
|
875
882
|
});
|
|
876
883
|
module2.exports = __toCommonJS2(function_exports);
|
|
@@ -896,6 +903,10 @@ var require_function = __commonJS({
|
|
|
896
903
|
}
|
|
897
904
|
};
|
|
898
905
|
};
|
|
906
|
+
var isStringFunction = (inputString) => {
|
|
907
|
+
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
908
|
+
return functionRegex.test(inputString);
|
|
909
|
+
};
|
|
899
910
|
}
|
|
900
911
|
});
|
|
901
912
|
|
|
@@ -1320,11 +1331,11 @@ var require_tree = __commonJS({
|
|
|
1320
1331
|
TREE: () => TREE
|
|
1321
1332
|
});
|
|
1322
1333
|
module2.exports = __toCommonJS2(tree_exports);
|
|
1323
|
-
var
|
|
1334
|
+
var import_utils20 = require_cjs();
|
|
1324
1335
|
var import_report = require_cjs2();
|
|
1325
1336
|
var ROOT = {
|
|
1326
1337
|
key: ":root",
|
|
1327
|
-
node:
|
|
1338
|
+
node: import_utils20.document ? import_utils20.document.body : (0, import_report.report)("DocumentNotDefined", import_utils20.document)
|
|
1328
1339
|
};
|
|
1329
1340
|
var TREE = ROOT;
|
|
1330
1341
|
}
|
|
@@ -1360,12 +1371,12 @@ var require_on = __commonJS({
|
|
|
1360
1371
|
triggerEventOnUpdate: () => triggerEventOnUpdate
|
|
1361
1372
|
});
|
|
1362
1373
|
module2.exports = __toCommonJS2(on_exports);
|
|
1363
|
-
var
|
|
1374
|
+
var import_utils20 = require_cjs();
|
|
1364
1375
|
var applyEvent = (param, element, state, context, options) => {
|
|
1365
1376
|
return param(element, state || element.state, context || element.context, options);
|
|
1366
1377
|
};
|
|
1367
1378
|
var triggerEventOn = (param, element, options) => {
|
|
1368
|
-
if (element.on && (0,
|
|
1379
|
+
if (element.on && (0, import_utils20.isFunction)(element.on[param])) {
|
|
1369
1380
|
const { state, context } = element;
|
|
1370
1381
|
return applyEvent(element.on[param], element, state, context, options);
|
|
1371
1382
|
}
|
|
@@ -1374,7 +1385,7 @@ var require_on = __commonJS({
|
|
|
1374
1385
|
return param(updatedObj, element, state || element.state, context || element.context, options);
|
|
1375
1386
|
};
|
|
1376
1387
|
var triggerEventOnUpdate = (param, updatedObj, element, options) => {
|
|
1377
|
-
if (element.on && (0,
|
|
1388
|
+
if (element.on && (0, import_utils20.isFunction)(element.on[param])) {
|
|
1378
1389
|
const { state, context } = element;
|
|
1379
1390
|
return applyEventUpdate(element.on[param], updatedObj, element, state, context, options);
|
|
1380
1391
|
}
|
|
@@ -1385,7 +1396,7 @@ var require_on = __commonJS({
|
|
|
1385
1396
|
if (param === "init" || param === "beforeClassAssign" || param === "render" || param === "renderRouter" || param === "attachNode" || param === "stateInit" || param === "stateCreated" || param === "initStateUpdated" || param === "stateUpdated" || param === "initUpdate" || param === "update")
|
|
1386
1397
|
continue;
|
|
1387
1398
|
const appliedFunction = element.on[param];
|
|
1388
|
-
if ((0,
|
|
1399
|
+
if ((0, import_utils20.isFunction)(appliedFunction)) {
|
|
1389
1400
|
const { state, context } = element;
|
|
1390
1401
|
node2.addEventListener(param, (event) => appliedFunction(event, element, state, context));
|
|
1391
1402
|
}
|
|
@@ -1421,10 +1432,10 @@ var require_can = __commonJS({
|
|
|
1421
1432
|
});
|
|
1422
1433
|
module2.exports = __toCommonJS2(can_exports);
|
|
1423
1434
|
var import_report = require_cjs2();
|
|
1424
|
-
var
|
|
1435
|
+
var import_utils20 = require_cjs();
|
|
1425
1436
|
var canRender = (element) => {
|
|
1426
1437
|
const tag = element.tag || "div";
|
|
1427
|
-
return (0,
|
|
1438
|
+
return (0, import_utils20.isValidHtmlTag)(tag) || (0, import_report.report)("HTMLInvalidTag");
|
|
1428
1439
|
};
|
|
1429
1440
|
}
|
|
1430
1441
|
});
|
|
@@ -1515,7 +1526,7 @@ var require_cache = __commonJS({
|
|
|
1515
1526
|
module2.exports = __toCommonJS2(cache_exports);
|
|
1516
1527
|
var import_report = require_cjs2();
|
|
1517
1528
|
var import_event = require_cjs3();
|
|
1518
|
-
var
|
|
1529
|
+
var import_utils20 = require_cjs();
|
|
1519
1530
|
var cache2 = {};
|
|
1520
1531
|
var createHTMLNode = (element) => {
|
|
1521
1532
|
const { tag } = element;
|
|
@@ -1534,15 +1545,15 @@ var require_cache = __commonJS({
|
|
|
1534
1545
|
};
|
|
1535
1546
|
var detectTag = (element) => {
|
|
1536
1547
|
let { tag, key } = element;
|
|
1537
|
-
tag = (0,
|
|
1548
|
+
tag = (0, import_utils20.exec)(tag, element);
|
|
1538
1549
|
if (tag === true)
|
|
1539
1550
|
tag = key;
|
|
1540
|
-
if ((0,
|
|
1541
|
-
const tagExists = (0,
|
|
1551
|
+
if ((0, import_utils20.isString)(tag)) {
|
|
1552
|
+
const tagExists = (0, import_utils20.isValidHtmlTag)(tag);
|
|
1542
1553
|
if (tagExists)
|
|
1543
1554
|
return tag;
|
|
1544
1555
|
} else {
|
|
1545
|
-
const isKeyATag = (0,
|
|
1556
|
+
const isKeyATag = (0, import_utils20.isValidHtmlTag)(key);
|
|
1546
1557
|
if (isKeyATag)
|
|
1547
1558
|
return key;
|
|
1548
1559
|
}
|
|
@@ -1661,16 +1672,16 @@ var require_attr = __commonJS({
|
|
|
1661
1672
|
default: () => attr_default
|
|
1662
1673
|
});
|
|
1663
1674
|
module2.exports = __toCommonJS2(attr_exports);
|
|
1664
|
-
var
|
|
1675
|
+
var import_utils20 = require_cjs();
|
|
1665
1676
|
var import_report = require_cjs2();
|
|
1666
1677
|
var attr_default = (params, element, node2) => {
|
|
1667
1678
|
const { __ref } = element;
|
|
1668
1679
|
const { __attr } = __ref;
|
|
1669
|
-
if ((0,
|
|
1680
|
+
if ((0, import_utils20.isNot)("object"))
|
|
1670
1681
|
(0, import_report.report)("HTMLInvalidAttr", params);
|
|
1671
1682
|
if (params) {
|
|
1672
1683
|
for (const attr in params) {
|
|
1673
|
-
const val = (0,
|
|
1684
|
+
const val = (0, import_utils20.exec)(params[attr], element);
|
|
1674
1685
|
if (val && node2.setAttribute)
|
|
1675
1686
|
node2.setAttribute(attr, val);
|
|
1676
1687
|
else if (node2.removeAttribute)
|
|
@@ -1713,7 +1724,7 @@ var require_classList = __commonJS({
|
|
|
1713
1724
|
default: () => classList_default
|
|
1714
1725
|
});
|
|
1715
1726
|
module2.exports = __toCommonJS2(classList_exports);
|
|
1716
|
-
var
|
|
1727
|
+
var import_utils20 = require_cjs();
|
|
1717
1728
|
var assignKeyAsClassname = (element) => {
|
|
1718
1729
|
const { key } = element;
|
|
1719
1730
|
if (element.class === true)
|
|
@@ -1731,7 +1742,7 @@ var require_classList = __commonJS({
|
|
|
1731
1742
|
else if (typeof param === "string")
|
|
1732
1743
|
className += ` ${param}`;
|
|
1733
1744
|
else if (typeof param === "function") {
|
|
1734
|
-
className += ` ${(0,
|
|
1745
|
+
className += ` ${(0, import_utils20.exec)(param, element)}`;
|
|
1735
1746
|
}
|
|
1736
1747
|
}
|
|
1737
1748
|
return className;
|
|
@@ -1742,9 +1753,9 @@ var require_classList = __commonJS({
|
|
|
1742
1753
|
const { key } = element;
|
|
1743
1754
|
if (params === true)
|
|
1744
1755
|
params = element.class = { key };
|
|
1745
|
-
if ((0,
|
|
1756
|
+
if ((0, import_utils20.isString)(params))
|
|
1746
1757
|
params = element.class = { default: params };
|
|
1747
|
-
if ((0,
|
|
1758
|
+
if ((0, import_utils20.isObject)(params))
|
|
1748
1759
|
params = classify2(params, element);
|
|
1749
1760
|
const className = params.replace(/\s+/g, " ").trim();
|
|
1750
1761
|
if (element.ref)
|
|
@@ -1828,7 +1839,7 @@ var require_set = __commonJS({
|
|
|
1828
1839
|
default: () => set_default
|
|
1829
1840
|
});
|
|
1830
1841
|
module2.exports = __toCommonJS2(set_exports);
|
|
1831
|
-
var
|
|
1842
|
+
var import_utils20 = require_cjs();
|
|
1832
1843
|
var import_create = __toESM2(require_create4(), 1);
|
|
1833
1844
|
var import_options3 = __toESM2(require_options(), 1);
|
|
1834
1845
|
var import_mixins = require_mixins();
|
|
@@ -1836,7 +1847,7 @@ var require_set = __commonJS({
|
|
|
1836
1847
|
var set5 = function(params, options = {}, el) {
|
|
1837
1848
|
const element = el || this;
|
|
1838
1849
|
const __contentRef = element.content && element.content.__ref;
|
|
1839
|
-
if (__contentRef && __contentRef.__cached && (0,
|
|
1850
|
+
if (__contentRef && __contentRef.__cached && (0, import_utils20.isEqualDeep)(params, element.content)) {
|
|
1840
1851
|
return element;
|
|
1841
1852
|
}
|
|
1842
1853
|
(0, import_content.removeContent)(element);
|
|
@@ -1896,7 +1907,7 @@ var require_content = __commonJS({
|
|
|
1896
1907
|
updateContent: () => updateContent
|
|
1897
1908
|
});
|
|
1898
1909
|
module2.exports = __toCommonJS2(content_exports);
|
|
1899
|
-
var
|
|
1910
|
+
var import_utils20 = require_cjs();
|
|
1900
1911
|
var import_set = __toESM2(require_set(), 1);
|
|
1901
1912
|
var updateContent = function(params, options) {
|
|
1902
1913
|
const element = this;
|
|
@@ -1919,7 +1930,7 @@ var require_content = __commonJS({
|
|
|
1919
1930
|
if (__cached && __cached.content) {
|
|
1920
1931
|
if (__cached.content.tag === "fragment")
|
|
1921
1932
|
__cached.content.parent.node.innerHTML = "";
|
|
1922
|
-
else if (__cached.content && (0,
|
|
1933
|
+
else if (__cached.content && (0, import_utils20.isFunction)(__cached.content.remove))
|
|
1923
1934
|
__cached.content.remove();
|
|
1924
1935
|
}
|
|
1925
1936
|
delete element.content;
|
|
@@ -1964,15 +1975,15 @@ var require_data = __commonJS({
|
|
|
1964
1975
|
default: () => data_default
|
|
1965
1976
|
});
|
|
1966
1977
|
module2.exports = __toCommonJS2(data_exports);
|
|
1967
|
-
var
|
|
1978
|
+
var import_utils20 = require_cjs();
|
|
1968
1979
|
var import_report = require_cjs2();
|
|
1969
1980
|
var data_default = (params, element, node2) => {
|
|
1970
1981
|
if (params && params.showOnNode) {
|
|
1971
|
-
if (!(0,
|
|
1982
|
+
if (!(0, import_utils20.isObject)(params))
|
|
1972
1983
|
(0, import_report.report)("HTMLInvalidData", params);
|
|
1973
1984
|
for (const dataset in params) {
|
|
1974
1985
|
if (dataset !== "showOnNode") {
|
|
1975
|
-
node2.dataset[dataset] = (0,
|
|
1986
|
+
node2.dataset[dataset] = (0, import_utils20.exec)(params[dataset], element);
|
|
1976
1987
|
}
|
|
1977
1988
|
}
|
|
1978
1989
|
}
|
|
@@ -2006,9 +2017,9 @@ var require_html = __commonJS({
|
|
|
2006
2017
|
default: () => html_default
|
|
2007
2018
|
});
|
|
2008
2019
|
module2.exports = __toCommonJS2(html_exports);
|
|
2009
|
-
var
|
|
2020
|
+
var import_utils20 = require_cjs();
|
|
2010
2021
|
var html_default = (param, element, node2) => {
|
|
2011
|
-
const prop = (0,
|
|
2022
|
+
const prop = (0, import_utils20.exec)(param, element);
|
|
2012
2023
|
const { __ref } = element;
|
|
2013
2024
|
if (prop !== __ref.__html) {
|
|
2014
2025
|
if (node2.nodeName === "SVG")
|
|
@@ -2047,12 +2058,12 @@ var require_style = __commonJS({
|
|
|
2047
2058
|
default: () => style_default2
|
|
2048
2059
|
});
|
|
2049
2060
|
module2.exports = __toCommonJS2(style_exports);
|
|
2050
|
-
var
|
|
2061
|
+
var import_utils20 = require_cjs();
|
|
2051
2062
|
var import_report = require_cjs2();
|
|
2052
2063
|
var style_default2 = (params, element, node2) => {
|
|
2053
2064
|
if (params) {
|
|
2054
|
-
if ((0,
|
|
2055
|
-
(0,
|
|
2065
|
+
if ((0, import_utils20.isObject)(params))
|
|
2066
|
+
(0, import_utils20.map)(node2.style, params, element);
|
|
2056
2067
|
else
|
|
2057
2068
|
(0, import_report.report)("HTMLInvalidStyles", params);
|
|
2058
2069
|
}
|
|
@@ -2088,9 +2099,9 @@ var require_text = __commonJS({
|
|
|
2088
2099
|
});
|
|
2089
2100
|
module2.exports = __toCommonJS2(text_exports);
|
|
2090
2101
|
var import__ = require_cjs7();
|
|
2091
|
-
var
|
|
2102
|
+
var import_utils20 = require_cjs();
|
|
2092
2103
|
var asd = (param, element, node2) => {
|
|
2093
|
-
const prop = (0,
|
|
2104
|
+
const prop = (0, import_utils20.exec)(param, element);
|
|
2094
2105
|
if (element.tag === "string") {
|
|
2095
2106
|
node2.nodeValue = prop;
|
|
2096
2107
|
} else if (param !== void 0 || param !== null) {
|
|
@@ -2104,9 +2115,9 @@ var require_text = __commonJS({
|
|
|
2104
2115
|
}
|
|
2105
2116
|
};
|
|
2106
2117
|
var text_default = (param, element, node2) => {
|
|
2107
|
-
let prop = (0,
|
|
2108
|
-
if ((0,
|
|
2109
|
-
prop = (0,
|
|
2118
|
+
let prop = (0, import_utils20.exec)(param, element);
|
|
2119
|
+
if ((0, import_utils20.isString)(prop) && prop.includes("{{")) {
|
|
2120
|
+
prop = (0, import_utils20.replaceLiteralsWithObjectFields)(prop, element.state);
|
|
2110
2121
|
}
|
|
2111
2122
|
if (element.tag === "string") {
|
|
2112
2123
|
if (element.text === prop)
|
|
@@ -2210,11 +2221,11 @@ var require_methods = __commonJS({
|
|
|
2210
2221
|
toggle: () => toggle
|
|
2211
2222
|
});
|
|
2212
2223
|
module2.exports = __toCommonJS2(methods_exports);
|
|
2213
|
-
var
|
|
2224
|
+
var import_utils20 = require_cjs();
|
|
2214
2225
|
var import_ignore = require_ignore();
|
|
2215
2226
|
var parse3 = function() {
|
|
2216
2227
|
const state = this;
|
|
2217
|
-
if ((0,
|
|
2228
|
+
if ((0, import_utils20.isObject)(state)) {
|
|
2218
2229
|
const obj = {};
|
|
2219
2230
|
for (const param in state) {
|
|
2220
2231
|
if (!import_ignore.IGNORE_STATE_PARAMS.includes(param)) {
|
|
@@ -2222,7 +2233,7 @@ var require_methods = __commonJS({
|
|
|
2222
2233
|
}
|
|
2223
2234
|
}
|
|
2224
2235
|
return obj;
|
|
2225
|
-
} else if ((0,
|
|
2236
|
+
} else if ((0, import_utils20.isArray)(state)) {
|
|
2226
2237
|
return state.filter((item) => !import_ignore.IGNORE_STATE_PARAMS.includes(item));
|
|
2227
2238
|
}
|
|
2228
2239
|
};
|
|
@@ -2242,7 +2253,7 @@ var require_methods = __commonJS({
|
|
|
2242
2253
|
const state = this;
|
|
2243
2254
|
const element = state.__element;
|
|
2244
2255
|
const stateKey = element.__ref.__state;
|
|
2245
|
-
if ((0,
|
|
2256
|
+
if ((0, import_utils20.isString)(stateKey)) {
|
|
2246
2257
|
element.parent.state.remove(stateKey, { isHoisted: true, ...options });
|
|
2247
2258
|
return element.state;
|
|
2248
2259
|
}
|
|
@@ -2277,10 +2288,10 @@ var require_methods = __commonJS({
|
|
|
2277
2288
|
};
|
|
2278
2289
|
var add = function(value2, options = {}) {
|
|
2279
2290
|
const state = this;
|
|
2280
|
-
if ((0,
|
|
2291
|
+
if ((0, import_utils20.isArray)(state)) {
|
|
2281
2292
|
state.push(value2);
|
|
2282
2293
|
state.update(state.parse(), { overwrite: "replace", ...options });
|
|
2283
|
-
} else if ((0,
|
|
2294
|
+
} else if ((0, import_utils20.isObject)(state)) {
|
|
2284
2295
|
const key = Object.keys(state).length;
|
|
2285
2296
|
state.update({ [key]: value2 }, options);
|
|
2286
2297
|
}
|
|
@@ -2291,10 +2302,10 @@ var require_methods = __commonJS({
|
|
|
2291
2302
|
};
|
|
2292
2303
|
var remove = function(key, options = {}) {
|
|
2293
2304
|
const state = this;
|
|
2294
|
-
if ((0,
|
|
2295
|
-
(0,
|
|
2296
|
-
if ((0,
|
|
2297
|
-
(0,
|
|
2305
|
+
if ((0, import_utils20.isArray)(state))
|
|
2306
|
+
(0, import_utils20.removeFromArray)(state, key);
|
|
2307
|
+
if ((0, import_utils20.isObject)(state))
|
|
2308
|
+
(0, import_utils20.removeFromObject)(state, key);
|
|
2298
2309
|
return state.update(state.parse(), { replace: true, ...options });
|
|
2299
2310
|
};
|
|
2300
2311
|
var set5 = function(value2, options = {}) {
|
|
@@ -2303,7 +2314,7 @@ var require_methods = __commonJS({
|
|
|
2303
2314
|
};
|
|
2304
2315
|
var apply = function(func, options = {}) {
|
|
2305
2316
|
const state = this;
|
|
2306
|
-
if ((0,
|
|
2317
|
+
if ((0, import_utils20.isFunction)(func)) {
|
|
2307
2318
|
func(state);
|
|
2308
2319
|
return state.update(state, { replace: true, ...options });
|
|
2309
2320
|
}
|
|
@@ -2343,7 +2354,7 @@ var require_inherit = __commonJS({
|
|
|
2343
2354
|
isState: () => isState2
|
|
2344
2355
|
});
|
|
2345
2356
|
module2.exports = __toCommonJS2(inherit_exports);
|
|
2346
|
-
var
|
|
2357
|
+
var import_utils20 = require_cjs();
|
|
2347
2358
|
var import_ignore = require_ignore();
|
|
2348
2359
|
var getParentStateInKey = (stateKey, parentState) => {
|
|
2349
2360
|
if (!stateKey.includes("../"))
|
|
@@ -2397,9 +2408,9 @@ var require_inherit = __commonJS({
|
|
|
2397
2408
|
const inheritedState = findInheritedState(element, parent);
|
|
2398
2409
|
if (!inheritedState)
|
|
2399
2410
|
return element.state;
|
|
2400
|
-
if ((0,
|
|
2401
|
-
return (0,
|
|
2402
|
-
} else if ((0,
|
|
2411
|
+
if ((0, import_utils20.is)(inheritedState)("object", "array")) {
|
|
2412
|
+
return (0, import_utils20.deepClone)(inheritedState, import_ignore.IGNORE_STATE_PARAMS);
|
|
2413
|
+
} else if ((0, import_utils20.is)(inheritedState)("string", "number")) {
|
|
2403
2414
|
ref.__stateType = "string";
|
|
2404
2415
|
return { value: inheritedState };
|
|
2405
2416
|
}
|
|
@@ -2408,12 +2419,12 @@ var require_inherit = __commonJS({
|
|
|
2408
2419
|
var checkIfInherits = (element) => {
|
|
2409
2420
|
const ref = element.__ref;
|
|
2410
2421
|
const stateKey = ref.__state;
|
|
2411
|
-
if (!stateKey || (0,
|
|
2422
|
+
if (!stateKey || (0, import_utils20.isNot)(stateKey)("number", "string"))
|
|
2412
2423
|
return false;
|
|
2413
2424
|
return true;
|
|
2414
2425
|
};
|
|
2415
2426
|
var isState2 = function(state) {
|
|
2416
|
-
if (!(0,
|
|
2427
|
+
if (!(0, import_utils20.isObjectLike)(state))
|
|
2417
2428
|
return false;
|
|
2418
2429
|
return state.update && state.parse && state.clean && state.create && state.parent && state.destroy && state.rootUpdate && state.parentUpdate && state.toggle && state.add && state.apply && state.__element && state.__children;
|
|
2419
2430
|
};
|
|
@@ -2462,7 +2473,7 @@ var require_updateState = __commonJS({
|
|
|
2462
2473
|
var import_report = require_cjs2();
|
|
2463
2474
|
var import_event = require_cjs3();
|
|
2464
2475
|
var import_ignore = require_ignore();
|
|
2465
|
-
var
|
|
2476
|
+
var import_utils20 = require_cjs();
|
|
2466
2477
|
var import_inherit = require_inherit();
|
|
2467
2478
|
var STATE_UPDATE_OPTIONS = {
|
|
2468
2479
|
overwrite: true,
|
|
@@ -2476,7 +2487,7 @@ var require_updateState = __commonJS({
|
|
|
2476
2487
|
const state = this;
|
|
2477
2488
|
const element = state.__element;
|
|
2478
2489
|
if (!options.updateByState)
|
|
2479
|
-
(0,
|
|
2490
|
+
(0, import_utils20.merge)(options, STATE_UPDATE_OPTIONS);
|
|
2480
2491
|
if (!state.__element)
|
|
2481
2492
|
(0, import_report.report)("ElementOnStateIsNotDefined");
|
|
2482
2493
|
if (options.preventInheritAtCurrentState === true) {
|
|
@@ -2506,10 +2517,10 @@ var require_updateState = __commonJS({
|
|
|
2506
2517
|
const shallow = overwrite === "shallow";
|
|
2507
2518
|
const merge22 = overwrite === "merge";
|
|
2508
2519
|
if (merge22) {
|
|
2509
|
-
(0,
|
|
2520
|
+
(0, import_utils20.deepMerge)(state, obj, import_ignore.IGNORE_STATE_PARAMS);
|
|
2510
2521
|
return;
|
|
2511
2522
|
}
|
|
2512
|
-
const overwriteFunc = shallow ?
|
|
2523
|
+
const overwriteFunc = shallow ? import_utils20.overwriteShallow : import_utils20.overwriteDeep;
|
|
2513
2524
|
overwriteFunc(state, obj, import_ignore.IGNORE_STATE_PARAMS);
|
|
2514
2525
|
};
|
|
2515
2526
|
var hoistStateUpdate = (state, obj, options) => {
|
|
@@ -2600,7 +2611,7 @@ var require_create2 = __commonJS({
|
|
|
2600
2611
|
});
|
|
2601
2612
|
module2.exports = __toCommonJS2(create_exports);
|
|
2602
2613
|
var import_event = require_cjs3();
|
|
2603
|
-
var
|
|
2614
|
+
var import_utils20 = require_cjs();
|
|
2604
2615
|
var import_ignore = require_ignore();
|
|
2605
2616
|
var import_methods = require_methods();
|
|
2606
2617
|
var import_updateState = require_updateState();
|
|
@@ -2614,7 +2625,7 @@ var require_create2 = __commonJS({
|
|
|
2614
2625
|
if (objectizeState === false)
|
|
2615
2626
|
return parent.state || {};
|
|
2616
2627
|
else
|
|
2617
|
-
element.state = (0,
|
|
2628
|
+
element.state = (0, import_utils20.deepClone)(objectizeState, import_ignore.IGNORE_STATE_PARAMS);
|
|
2618
2629
|
const whatInitReturns = (0, import_event.triggerEventOn)("stateInit", element, options);
|
|
2619
2630
|
if (whatInitReturns === false)
|
|
2620
2631
|
return element.state;
|
|
@@ -2633,17 +2644,17 @@ var require_create2 = __commonJS({
|
|
|
2633
2644
|
const { __ref: ref } = state;
|
|
2634
2645
|
if (!ref)
|
|
2635
2646
|
return;
|
|
2636
|
-
const dependentState = (0,
|
|
2647
|
+
const dependentState = (0, import_utils20.deepClone)(ref, import_ignore.IGNORE_STATE_PARAMS);
|
|
2637
2648
|
const newDepends = { [element.key]: dependentState };
|
|
2638
|
-
ref.__depends = (0,
|
|
2649
|
+
ref.__depends = (0, import_utils20.isObject)(ref.__depends) ? { ...ref.__depends, ...newDepends } : newDepends;
|
|
2639
2650
|
return dependentState;
|
|
2640
2651
|
};
|
|
2641
2652
|
var checkForTypes = (element) => {
|
|
2642
2653
|
const { state, __ref: ref } = element;
|
|
2643
|
-
if ((0,
|
|
2654
|
+
if ((0, import_utils20.isFunction)(state)) {
|
|
2644
2655
|
ref.__state = state;
|
|
2645
|
-
return (0,
|
|
2646
|
-
} else if ((0,
|
|
2656
|
+
return (0, import_utils20.exec)(state, element);
|
|
2657
|
+
} else if ((0, import_utils20.is)(state)("string", "number")) {
|
|
2647
2658
|
ref.__state = state;
|
|
2648
2659
|
return {};
|
|
2649
2660
|
} else if (state === true) {
|
|
@@ -2690,7 +2701,7 @@ var require_create2 = __commonJS({
|
|
|
2690
2701
|
__children: {},
|
|
2691
2702
|
__root: ref.__root ? ref.__root.state : state
|
|
2692
2703
|
};
|
|
2693
|
-
if ((0,
|
|
2704
|
+
if ((0, import_utils20.isArray)(state)) {
|
|
2694
2705
|
addProtoToArray(state, proto);
|
|
2695
2706
|
} else {
|
|
2696
2707
|
Object.setPrototypeOf(state, proto);
|
|
@@ -2758,16 +2769,16 @@ var require_state = __commonJS({
|
|
|
2758
2769
|
});
|
|
2759
2770
|
module2.exports = __toCommonJS2(state_exports);
|
|
2760
2771
|
var import_state2 = require_cjs5();
|
|
2761
|
-
var
|
|
2772
|
+
var import_utils20 = require_cjs();
|
|
2762
2773
|
var state = (params, element, node2) => {
|
|
2763
|
-
const state2 = (0,
|
|
2764
|
-
if ((0,
|
|
2774
|
+
const state2 = (0, import_utils20.exec)(params, element);
|
|
2775
|
+
if ((0, import_utils20.isObject)(state2)) {
|
|
2765
2776
|
for (const param in state2) {
|
|
2766
2777
|
if (import_state2.IGNORE_STATE_PARAMS.includes(param))
|
|
2767
2778
|
continue;
|
|
2768
2779
|
if (!Object.hasOwnProperty.call(state2, param))
|
|
2769
2780
|
continue;
|
|
2770
|
-
element.state[param] = (0,
|
|
2781
|
+
element.state[param] = (0, import_utils20.exec)(state2[param], element);
|
|
2771
2782
|
}
|
|
2772
2783
|
}
|
|
2773
2784
|
return element;
|
|
@@ -2970,7 +2981,7 @@ var require_methods2 = __commonJS({
|
|
|
2970
2981
|
spotByPath: () => spotByPath
|
|
2971
2982
|
});
|
|
2972
2983
|
module2.exports = __toCommonJS2(methods_exports);
|
|
2973
|
-
var
|
|
2984
|
+
var import_utils20 = require_cjs();
|
|
2974
2985
|
var import_tree = require_tree();
|
|
2975
2986
|
var import_mixins = require_mixins();
|
|
2976
2987
|
var spotByPath = function(path) {
|
|
@@ -3003,9 +3014,9 @@ var require_methods2 = __commonJS({
|
|
|
3003
3014
|
};
|
|
3004
3015
|
var remove = function(params) {
|
|
3005
3016
|
const element = this;
|
|
3006
|
-
if ((0,
|
|
3017
|
+
if ((0, import_utils20.isFunction)(element.node.remove))
|
|
3007
3018
|
element.node.remove();
|
|
3008
|
-
else if (!(0,
|
|
3019
|
+
else if (!(0, import_utils20.isProduction)()) {
|
|
3009
3020
|
console.warn("This item cant be removed");
|
|
3010
3021
|
element.log();
|
|
3011
3022
|
}
|
|
@@ -3045,12 +3056,12 @@ var require_methods2 = __commonJS({
|
|
|
3045
3056
|
if (v === "state") {
|
|
3046
3057
|
if (element.__ref && element.__ref.__hasRootState)
|
|
3047
3058
|
return;
|
|
3048
|
-
if ((0,
|
|
3059
|
+
if ((0, import_utils20.isFunction)(val && val.parse))
|
|
3049
3060
|
val = val.parse();
|
|
3050
3061
|
} else if (v === "props") {
|
|
3051
3062
|
const { __element, update, ...props4 } = element[v];
|
|
3052
3063
|
obj[v] = props4;
|
|
3053
|
-
} else if ((0,
|
|
3064
|
+
} else if ((0, import_utils20.isDefined)(val))
|
|
3054
3065
|
obj[v] = val;
|
|
3055
3066
|
});
|
|
3056
3067
|
return obj;
|
|
@@ -3061,7 +3072,7 @@ var require_methods2 = __commonJS({
|
|
|
3061
3072
|
for (const v in obj) {
|
|
3062
3073
|
if (excl.includes(v))
|
|
3063
3074
|
return;
|
|
3064
|
-
if ((0,
|
|
3075
|
+
if ((0, import_utils20.isObjectLike)(obj[v])) {
|
|
3065
3076
|
obj[v] = parseDeep.call(obj[v], excl);
|
|
3066
3077
|
}
|
|
3067
3078
|
}
|
|
@@ -3179,18 +3190,18 @@ var require_inherit2 = __commonJS({
|
|
|
3179
3190
|
inheritParentProps: () => inheritParentProps
|
|
3180
3191
|
});
|
|
3181
3192
|
module2.exports = __toCommonJS2(inherit_exports);
|
|
3182
|
-
var
|
|
3193
|
+
var import_utils20 = require_cjs();
|
|
3183
3194
|
var objectizeStringProperty = (propValue) => {
|
|
3184
|
-
if ((0,
|
|
3195
|
+
if ((0, import_utils20.is)(propValue)("string", "number")) {
|
|
3185
3196
|
return { inheritedString: propValue };
|
|
3186
3197
|
}
|
|
3187
3198
|
return propValue;
|
|
3188
3199
|
};
|
|
3189
3200
|
var inheritParentProps = (element, parent) => {
|
|
3190
3201
|
let propsStack = [];
|
|
3191
|
-
const parentProps = (0,
|
|
3202
|
+
const parentProps = (0, import_utils20.exec)(parent, parent.state).props;
|
|
3192
3203
|
const matchParent = parent.props && parentProps[element.key];
|
|
3193
|
-
const matchParentIsString = (0,
|
|
3204
|
+
const matchParentIsString = (0, import_utils20.isString)(matchParent);
|
|
3194
3205
|
const matchParentChildProps = parentProps && parentProps.childProps;
|
|
3195
3206
|
if (matchParent) {
|
|
3196
3207
|
if (matchParentIsString) {
|
|
@@ -3238,19 +3249,19 @@ var require_create3 = __commonJS({
|
|
|
3238
3249
|
syncProps: () => syncProps
|
|
3239
3250
|
});
|
|
3240
3251
|
module2.exports = __toCommonJS2(create_exports);
|
|
3241
|
-
var
|
|
3252
|
+
var import_utils20 = require_cjs();
|
|
3242
3253
|
var import_ignore = require_ignore2();
|
|
3243
3254
|
var import_inherit = require_inherit2();
|
|
3244
3255
|
var createPropsStack = (element, parent) => {
|
|
3245
3256
|
const { props: props4, __ref } = element;
|
|
3246
3257
|
const propsStack = __ref.__props = (0, import_inherit.inheritParentProps)(element, parent);
|
|
3247
|
-
if ((0,
|
|
3258
|
+
if ((0, import_utils20.isObject)(props4))
|
|
3248
3259
|
propsStack.push(props4);
|
|
3249
3260
|
else if (props4 === "inherit" && parent.props)
|
|
3250
3261
|
propsStack.push(parent.props);
|
|
3251
3262
|
else if (props4)
|
|
3252
3263
|
propsStack.push(props4);
|
|
3253
|
-
if ((0,
|
|
3264
|
+
if ((0, import_utils20.isArray)(__ref.__extend)) {
|
|
3254
3265
|
__ref.__extend.forEach((extend) => {
|
|
3255
3266
|
if (extend.props)
|
|
3256
3267
|
propsStack.push(extend.props);
|
|
@@ -3265,12 +3276,12 @@ var require_create3 = __commonJS({
|
|
|
3265
3276
|
props4.forEach((v) => {
|
|
3266
3277
|
if (import_ignore.IGNORE_PROPS_PARAMS.includes(v))
|
|
3267
3278
|
return;
|
|
3268
|
-
const execProps = (0,
|
|
3269
|
-
if ((0,
|
|
3279
|
+
const execProps = (0, import_utils20.exec)(v, element);
|
|
3280
|
+
if ((0, import_utils20.isObject)(execProps) && execProps.__element)
|
|
3270
3281
|
return;
|
|
3271
|
-
element.props = (0,
|
|
3282
|
+
element.props = (0, import_utils20.deepMerge)(
|
|
3272
3283
|
mergedProps,
|
|
3273
|
-
(0,
|
|
3284
|
+
(0, import_utils20.deepClone)(execProps, import_ignore.IGNORE_PROPS_PARAMS),
|
|
3274
3285
|
import_ignore.IGNORE_PROPS_PARAMS
|
|
3275
3286
|
);
|
|
3276
3287
|
});
|
|
@@ -3402,11 +3413,11 @@ var require_object2 = __commonJS({
|
|
|
3402
3413
|
overwriteShallow: () => overwriteShallow2
|
|
3403
3414
|
});
|
|
3404
3415
|
module2.exports = __toCommonJS2(object_exports);
|
|
3405
|
-
var
|
|
3416
|
+
var import_utils20 = require_cjs();
|
|
3406
3417
|
var import_state2 = require_cjs5();
|
|
3407
3418
|
var import_props = require_props();
|
|
3408
3419
|
var import_methods = require_methods2();
|
|
3409
|
-
var METHODS_EXL = (0,
|
|
3420
|
+
var METHODS_EXL = (0, import_utils20.joinArrays)(
|
|
3410
3421
|
["node", "state", "context", "extend"],
|
|
3411
3422
|
import_methods.METHODS,
|
|
3412
3423
|
import_state2.IGNORE_STATE_PARAMS,
|
|
@@ -3420,7 +3431,7 @@ var require_object2 = __commonJS({
|
|
|
3420
3431
|
const extendProp = extend[e];
|
|
3421
3432
|
if (elementProp === void 0) {
|
|
3422
3433
|
element[e] = extendProp;
|
|
3423
|
-
} else if ((0,
|
|
3434
|
+
} else if ((0, import_utils20.isObjectLike)(elementProp) && (0, import_utils20.isObject)(extendProp)) {
|
|
3424
3435
|
deepMerge4(elementProp, extendProp);
|
|
3425
3436
|
}
|
|
3426
3437
|
}
|
|
@@ -3436,15 +3447,15 @@ var require_object2 = __commonJS({
|
|
|
3436
3447
|
return o;
|
|
3437
3448
|
};
|
|
3438
3449
|
var deepClone3 = (obj, exclude = METHODS_EXL) => {
|
|
3439
|
-
const o = (0,
|
|
3450
|
+
const o = (0, import_utils20.isArray)(obj) ? [] : {};
|
|
3440
3451
|
for (const e in obj) {
|
|
3441
3452
|
if (exclude.includes(e))
|
|
3442
3453
|
continue;
|
|
3443
3454
|
let objProp = obj[e];
|
|
3444
|
-
if (e === "extend" && (0,
|
|
3455
|
+
if (e === "extend" && (0, import_utils20.isArray)(objProp)) {
|
|
3445
3456
|
objProp = mergeArray(objProp, exclude);
|
|
3446
3457
|
}
|
|
3447
|
-
if ((0,
|
|
3458
|
+
if ((0, import_utils20.isObjectLike)(objProp)) {
|
|
3448
3459
|
o[e] = deepClone3(objProp, exclude);
|
|
3449
3460
|
} else
|
|
3450
3461
|
o[e] = objProp;
|
|
@@ -3483,7 +3494,7 @@ var require_object2 = __commonJS({
|
|
|
3483
3494
|
continue;
|
|
3484
3495
|
const objProp = obj[e];
|
|
3485
3496
|
const paramsProp = params[e];
|
|
3486
|
-
if ((0,
|
|
3497
|
+
if ((0, import_utils20.isObjectLike)(objProp) && (0, import_utils20.isObjectLike)(paramsProp)) {
|
|
3487
3498
|
overwriteDeep(objProp, paramsProp);
|
|
3488
3499
|
} else if (paramsProp !== void 0) {
|
|
3489
3500
|
obj[e] = paramsProp;
|
|
@@ -3492,7 +3503,7 @@ var require_object2 = __commonJS({
|
|
|
3492
3503
|
return obj;
|
|
3493
3504
|
};
|
|
3494
3505
|
var mergeIfExisted = (a, b) => {
|
|
3495
|
-
if ((0,
|
|
3506
|
+
if ((0, import_utils20.isObjectLike)(a) && (0, import_utils20.isObjectLike)(b))
|
|
3496
3507
|
return deepMerge4(a, b);
|
|
3497
3508
|
return a || b;
|
|
3498
3509
|
};
|
|
@@ -3500,7 +3511,7 @@ var require_object2 = __commonJS({
|
|
|
3500
3511
|
return arr.reduce((a, c) => deepMerge4(a, deepClone3(c, exclude)), {});
|
|
3501
3512
|
};
|
|
3502
3513
|
var mergeAndCloneIfArray = (obj) => {
|
|
3503
|
-
return (0,
|
|
3514
|
+
return (0, import_utils20.isArray)(obj) ? mergeArray(obj) : deepClone3(obj);
|
|
3504
3515
|
};
|
|
3505
3516
|
var flattenRecursive = (param, prop, stack = []) => {
|
|
3506
3517
|
const objectized = mergeAndCloneIfArray(param);
|
|
@@ -3556,7 +3567,7 @@ var require_extendUtils = __commonJS({
|
|
|
3556
3567
|
setHashedExtend: () => setHashedExtend
|
|
3557
3568
|
});
|
|
3558
3569
|
module2.exports = __toCommonJS2(extendUtils_exports);
|
|
3559
|
-
var
|
|
3570
|
+
var import_utils20 = require_cjs();
|
|
3560
3571
|
var ENV2 = "development";
|
|
3561
3572
|
var generateHash = () => Math.random().toString(36).substring(2);
|
|
3562
3573
|
var extendStackRegistry = {};
|
|
@@ -3566,7 +3577,7 @@ var require_extendUtils = __commonJS({
|
|
|
3566
3577
|
};
|
|
3567
3578
|
var setHashedExtend = (extend, stack) => {
|
|
3568
3579
|
const hash2 = generateHash();
|
|
3569
|
-
if (!(0,
|
|
3580
|
+
if (!(0, import_utils20.isString)(extend)) {
|
|
3570
3581
|
extend.__hash = hash2;
|
|
3571
3582
|
}
|
|
3572
3583
|
extendStackRegistry[hash2] = stack;
|
|
@@ -3592,7 +3603,7 @@ var require_extendUtils = __commonJS({
|
|
|
3592
3603
|
var flattenExtend = (extend, stack) => {
|
|
3593
3604
|
if (!extend)
|
|
3594
3605
|
return stack;
|
|
3595
|
-
if ((0,
|
|
3606
|
+
if ((0, import_utils20.isArray)(extend))
|
|
3596
3607
|
return extractArrayExtend(extend, stack);
|
|
3597
3608
|
stack.push(extend);
|
|
3598
3609
|
if (extend.extend)
|
|
@@ -3605,9 +3616,9 @@ var require_extendUtils = __commonJS({
|
|
|
3605
3616
|
if (["parent", "node", "__element"].indexOf(prop) > -1)
|
|
3606
3617
|
continue;
|
|
3607
3618
|
const objProp = obj[prop];
|
|
3608
|
-
if ((0,
|
|
3619
|
+
if ((0, import_utils20.isObject)(objProp)) {
|
|
3609
3620
|
o[prop] = deepCloneExtend(objProp);
|
|
3610
|
-
} else if ((0,
|
|
3621
|
+
} else if ((0, import_utils20.isArray)(objProp)) {
|
|
3611
3622
|
o[prop] = objProp.map((x) => x);
|
|
3612
3623
|
} else
|
|
3613
3624
|
o[prop] = objProp;
|
|
@@ -3622,14 +3633,14 @@ var require_extendUtils = __commonJS({
|
|
|
3622
3633
|
const extendProp = extend[e];
|
|
3623
3634
|
if (elementProp === void 0) {
|
|
3624
3635
|
element[e] = extendProp;
|
|
3625
|
-
} else if ((0,
|
|
3636
|
+
} else if ((0, import_utils20.isObject)(elementProp) && (0, import_utils20.isObject)(extendProp)) {
|
|
3626
3637
|
deepMergeExtend(elementProp, extendProp);
|
|
3627
|
-
} else if ((0,
|
|
3638
|
+
} else if ((0, import_utils20.isArray)(elementProp) && (0, import_utils20.isArray)(extendProp)) {
|
|
3628
3639
|
element[e] = elementProp.concat(extendProp);
|
|
3629
|
-
} else if ((0,
|
|
3640
|
+
} else if ((0, import_utils20.isArray)(elementProp) && (0, import_utils20.isObject)(extendProp)) {
|
|
3630
3641
|
const obj = deepMergeExtend({}, elementProp);
|
|
3631
3642
|
element[e] = deepMergeExtend(obj, extendProp);
|
|
3632
|
-
} else if (elementProp === void 0 && (0,
|
|
3643
|
+
} else if (elementProp === void 0 && (0, import_utils20.isFunction)(extendProp)) {
|
|
3633
3644
|
element[e] = extendProp;
|
|
3634
3645
|
}
|
|
3635
3646
|
}
|
|
@@ -3642,7 +3653,7 @@ var require_extendUtils = __commonJS({
|
|
|
3642
3653
|
};
|
|
3643
3654
|
var fallbackStringExtend = (extend, context, options) => {
|
|
3644
3655
|
const COMPONENTS = context && context.components || options.components;
|
|
3645
|
-
if ((0,
|
|
3656
|
+
if ((0, import_utils20.isString)(extend)) {
|
|
3646
3657
|
console.log("extend", extend);
|
|
3647
3658
|
console.log(COMPONENTS[extend]);
|
|
3648
3659
|
if (COMPONENTS && COMPONENTS[extend]) {
|
|
@@ -3674,11 +3685,11 @@ var require_extendUtils = __commonJS({
|
|
|
3674
3685
|
var replaceStringsWithComponents = (stack, context, options) => {
|
|
3675
3686
|
const COMPONENTS = context && context.components || options.components;
|
|
3676
3687
|
return stack.map((v) => {
|
|
3677
|
-
if ((0,
|
|
3688
|
+
if ((0, import_utils20.isString)(v)) {
|
|
3678
3689
|
const component = COMPONENTS[v];
|
|
3679
3690
|
return component;
|
|
3680
3691
|
}
|
|
3681
|
-
if ((0,
|
|
3692
|
+
if ((0, import_utils20.isString)(v.extend)) {
|
|
3682
3693
|
v.extend = COMPONENTS[v.extend];
|
|
3683
3694
|
return { ...getExtendMerged(v.extend), ...v };
|
|
3684
3695
|
}
|
|
@@ -3714,12 +3725,12 @@ var require_extend = __commonJS({
|
|
|
3714
3725
|
applyExtend: () => applyExtend
|
|
3715
3726
|
});
|
|
3716
3727
|
module2.exports = __toCommonJS2(extend_exports);
|
|
3717
|
-
var
|
|
3728
|
+
var import_utils20 = require_cjs();
|
|
3718
3729
|
var import_utils22 = require_utils();
|
|
3719
3730
|
var ENV2 = "development";
|
|
3720
3731
|
var applyExtend = (element, parent, options = {}) => {
|
|
3721
|
-
if ((0,
|
|
3722
|
-
element = (0,
|
|
3732
|
+
if ((0, import_utils20.isFunction)(element))
|
|
3733
|
+
element = (0, import_utils20.exec)(element, parent);
|
|
3723
3734
|
let { extend, props: props4, context, __ref } = element;
|
|
3724
3735
|
extend = (0, import_utils22.fallbackStringExtend)(extend, context, options);
|
|
3725
3736
|
const extendStack = (0, import_utils22.getExtendStack)(extend);
|
|
@@ -3763,7 +3774,7 @@ var require_extend = __commonJS({
|
|
|
3763
3774
|
const findAndReplaceStrings = (0, import_utils22.replaceStringsWithComponents)(stack, context, options);
|
|
3764
3775
|
let mergedExtend = (0, import_utils22.cloneAndMergeArrayExtend)(findAndReplaceStrings);
|
|
3765
3776
|
const COMPONENTS = context && context.components || options.components;
|
|
3766
|
-
const component = (0,
|
|
3777
|
+
const component = (0, import_utils20.exec)(element.component || mergedExtend.component, element);
|
|
3767
3778
|
if (component && COMPONENTS && COMPONENTS[component]) {
|
|
3768
3779
|
const componentExtend = (0, import_utils22.cloneAndMergeArrayExtend)((0, import_utils22.getExtendStack)(COMPONENTS[component]));
|
|
3769
3780
|
mergedExtend = (0, import_utils22.deepMergeExtend)(componentExtend, mergedExtend);
|
|
@@ -3807,11 +3818,11 @@ var require_component = __commonJS({
|
|
|
3807
3818
|
overwriteVariant: () => overwriteVariant
|
|
3808
3819
|
});
|
|
3809
3820
|
module2.exports = __toCommonJS2(component_exports);
|
|
3810
|
-
var
|
|
3821
|
+
var import_utils20 = require_cjs();
|
|
3811
3822
|
var import_extend = require_extend();
|
|
3812
3823
|
var ENV2 = "development";
|
|
3813
3824
|
var checkIfKeyIsComponent = (key) => {
|
|
3814
|
-
const isFirstKeyString = (0,
|
|
3825
|
+
const isFirstKeyString = (0, import_utils20.isString)(key);
|
|
3815
3826
|
if (!isFirstKeyString)
|
|
3816
3827
|
return;
|
|
3817
3828
|
const firstCharKey = key.slice(0, 1);
|
|
@@ -3819,7 +3830,7 @@ var require_component = __commonJS({
|
|
|
3819
3830
|
};
|
|
3820
3831
|
var addAdditionalExtend = (newExtend, element) => {
|
|
3821
3832
|
const { extend } = element;
|
|
3822
|
-
const preserveExtend = (0,
|
|
3833
|
+
const preserveExtend = (0, import_utils20.isArray)(extend) ? extend : [extend];
|
|
3823
3834
|
return {
|
|
3824
3835
|
...element,
|
|
3825
3836
|
extend: [newExtend].concat(preserveExtend)
|
|
@@ -3842,10 +3853,10 @@ var require_component = __commonJS({
|
|
|
3842
3853
|
};
|
|
3843
3854
|
} else if (extend) {
|
|
3844
3855
|
addAdditionalExtend(extendKey, element);
|
|
3845
|
-
} else if ((0,
|
|
3856
|
+
} else if ((0, import_utils20.isFunction)(element)) {
|
|
3846
3857
|
return {
|
|
3847
3858
|
extend: extendKey,
|
|
3848
|
-
props: { ...(0,
|
|
3859
|
+
props: { ...(0, import_utils20.exec)(element, parent) }
|
|
3849
3860
|
};
|
|
3850
3861
|
}
|
|
3851
3862
|
};
|
|
@@ -3858,8 +3869,8 @@ var require_component = __commonJS({
|
|
|
3858
3869
|
return;
|
|
3859
3870
|
const { components } = context;
|
|
3860
3871
|
const { extend } = element;
|
|
3861
|
-
const execExtend = (0,
|
|
3862
|
-
if ((0,
|
|
3872
|
+
const execExtend = (0, import_utils20.exec)(extend, element);
|
|
3873
|
+
if ((0, import_utils20.isString)(execExtend)) {
|
|
3863
3874
|
if (components[execExtend])
|
|
3864
3875
|
element.extend = components[execExtend];
|
|
3865
3876
|
else {
|
|
@@ -3872,29 +3883,29 @@ var require_component = __commonJS({
|
|
|
3872
3883
|
}
|
|
3873
3884
|
};
|
|
3874
3885
|
var isVariant = (param) => {
|
|
3875
|
-
if (!(0,
|
|
3886
|
+
if (!(0, import_utils20.isString)(param))
|
|
3876
3887
|
return;
|
|
3877
3888
|
const firstCharKey = param.slice(0, 1);
|
|
3878
3889
|
return firstCharKey === ".";
|
|
3879
3890
|
};
|
|
3880
3891
|
var hasVariantProp = (element) => {
|
|
3881
3892
|
const { props: props4 } = element;
|
|
3882
|
-
if ((0,
|
|
3893
|
+
if ((0, import_utils20.isObject)(props4) && (0, import_utils20.isString)(props4.variant))
|
|
3883
3894
|
return true;
|
|
3884
3895
|
};
|
|
3885
3896
|
var overwriteVariant = (element, variant, variantProps) => {
|
|
3886
3897
|
let variantElement = element[variant];
|
|
3887
3898
|
if (!variantElement)
|
|
3888
3899
|
return;
|
|
3889
|
-
const props4 = (0,
|
|
3890
|
-
if ((0,
|
|
3900
|
+
const props4 = (0, import_utils20.isObject)(variantProps) ? variantProps : {};
|
|
3901
|
+
if ((0, import_utils20.isString)(variantElement)) {
|
|
3891
3902
|
variantElement = {
|
|
3892
3903
|
extend: [{ props: props4 }, variantElement]
|
|
3893
3904
|
};
|
|
3894
3905
|
} else if (variantElement.extend) {
|
|
3895
3906
|
variantElement = addAdditionalExtend({ props: props4 }, variantElement);
|
|
3896
3907
|
}
|
|
3897
|
-
return (0,
|
|
3908
|
+
return (0, import_utils20.overwriteDeep)(element, (0, import_extend.applyExtend)(variantElement));
|
|
3898
3909
|
};
|
|
3899
3910
|
var applyVariant = (element) => {
|
|
3900
3911
|
const { props: props4 } = element;
|
|
@@ -3969,7 +3980,7 @@ var require_iterate = __commonJS({
|
|
|
3969
3980
|
throughUpdatedExec: () => throughUpdatedExec
|
|
3970
3981
|
});
|
|
3971
3982
|
module2.exports = __toCommonJS2(iterate_exports);
|
|
3972
|
-
var
|
|
3983
|
+
var import_utils20 = require_cjs();
|
|
3973
3984
|
var import_utils22 = require_utils();
|
|
3974
3985
|
var import_methods = require_methods2();
|
|
3975
3986
|
var throughInitialExec = (element, exclude = {}) => {
|
|
@@ -3978,7 +3989,7 @@ var require_iterate = __commonJS({
|
|
|
3978
3989
|
if (exclude[param])
|
|
3979
3990
|
continue;
|
|
3980
3991
|
const prop = element[param];
|
|
3981
|
-
if ((0,
|
|
3992
|
+
if ((0, import_utils20.isFunction)(prop) && !(0, import_methods.isMethod)(param) && !(0, import_utils22.isVariant)(param)) {
|
|
3982
3993
|
ref.__exec[param] = prop;
|
|
3983
3994
|
element[param] = prop(element, element.state);
|
|
3984
3995
|
}
|
|
@@ -3993,7 +4004,7 @@ var require_iterate = __commonJS({
|
|
|
3993
4004
|
if (isDefinedParam)
|
|
3994
4005
|
continue;
|
|
3995
4006
|
const newExec = ref.__exec[param](element, element.state, element.context);
|
|
3996
|
-
const execReturnsString = (0,
|
|
4007
|
+
const execReturnsString = (0, import_utils20.isString)(newExec) || (0, import_utils20.isNumber)(newExec);
|
|
3997
4008
|
if (prop && prop.node && execReturnsString) {
|
|
3998
4009
|
(0, import_utils22.overwrite)(prop, { text: newExec }, options);
|
|
3999
4010
|
} else if (newExec !== prop) {
|
|
@@ -4011,16 +4022,16 @@ var require_iterate = __commonJS({
|
|
|
4011
4022
|
var throughInitialDefine = (element) => {
|
|
4012
4023
|
const { define, context, __ref: ref } = element;
|
|
4013
4024
|
let defineObj = {};
|
|
4014
|
-
const hasGlobalDefine = context && (0,
|
|
4015
|
-
if ((0,
|
|
4025
|
+
const hasGlobalDefine = context && (0, import_utils20.isObject)(context.define);
|
|
4026
|
+
if ((0, import_utils20.isObject)(define))
|
|
4016
4027
|
defineObj = { ...define };
|
|
4017
4028
|
if (hasGlobalDefine)
|
|
4018
4029
|
defineObj = { ...defineObj, ...context.define };
|
|
4019
4030
|
for (const param in defineObj) {
|
|
4020
4031
|
let elementProp = element[param];
|
|
4021
|
-
if ((0,
|
|
4032
|
+
if ((0, import_utils20.isFunction)(elementProp) && !(0, import_methods.isMethod)(param) && !(0, import_utils22.isVariant)(param)) {
|
|
4022
4033
|
ref.__exec[param] = elementProp;
|
|
4023
|
-
const execParam2 = elementProp = (0,
|
|
4034
|
+
const execParam2 = elementProp = (0, import_utils20.exec)(elementProp, element);
|
|
4024
4035
|
if (execParam2) {
|
|
4025
4036
|
elementProp = element[param] = execParam2.parse ? execParam2.parse() : execParam2;
|
|
4026
4037
|
ref.__defineCache[param] = elementProp;
|
|
@@ -4036,15 +4047,15 @@ var require_iterate = __commonJS({
|
|
|
4036
4047
|
const { context, define, __ref: ref } = element;
|
|
4037
4048
|
const changes = {};
|
|
4038
4049
|
let obj = {};
|
|
4039
|
-
if ((0,
|
|
4050
|
+
if ((0, import_utils20.isObject)(define))
|
|
4040
4051
|
obj = { ...define };
|
|
4041
|
-
if ((0,
|
|
4052
|
+
if ((0, import_utils20.isObject)(context && context.define))
|
|
4042
4053
|
obj = { ...obj, ...context.define };
|
|
4043
4054
|
for (const param in obj) {
|
|
4044
4055
|
const execParam = ref.__exec[param];
|
|
4045
4056
|
if (execParam)
|
|
4046
4057
|
ref.__defineCache[param] = execParam(element, element.state, element.context);
|
|
4047
|
-
const cached = (0,
|
|
4058
|
+
const cached = (0, import_utils20.exec)(ref.__defineCache[param], element);
|
|
4048
4059
|
const newExecParam = obj[param](cached, element, element.state, element.context);
|
|
4049
4060
|
if (newExecParam)
|
|
4050
4061
|
element[param] = newExecParam;
|
|
@@ -4080,7 +4091,7 @@ var require_applyParam = __commonJS({
|
|
|
4080
4091
|
applyParam: () => applyParam
|
|
4081
4092
|
});
|
|
4082
4093
|
module2.exports = __toCommonJS2(applyParam_exports);
|
|
4083
|
-
var
|
|
4094
|
+
var import_utils20 = require_cjs();
|
|
4084
4095
|
var import_mixins = require_mixins();
|
|
4085
4096
|
var applyParam = (param, element, options) => {
|
|
4086
4097
|
const { node: node2, context, __ref: ref } = element;
|
|
@@ -4093,7 +4104,7 @@ var require_applyParam = __commonJS({
|
|
|
4093
4104
|
if (!ref.__if)
|
|
4094
4105
|
return;
|
|
4095
4106
|
if (isGlobalTransformer && !hasContextDefine) {
|
|
4096
|
-
if ((0,
|
|
4107
|
+
if ((0, import_utils20.isFunction)(isGlobalTransformer)) {
|
|
4097
4108
|
isGlobalTransformer(prop, element, node2, options);
|
|
4098
4109
|
return;
|
|
4099
4110
|
}
|
|
@@ -4140,7 +4151,7 @@ var require_node2 = __commonJS({
|
|
|
4140
4151
|
default: () => node_default
|
|
4141
4152
|
});
|
|
4142
4153
|
module2.exports = __toCommonJS2(node_exports);
|
|
4143
|
-
var
|
|
4154
|
+
var import_utils20 = require_cjs();
|
|
4144
4155
|
var import_event = require_cjs3();
|
|
4145
4156
|
var import_render = require_cjs4();
|
|
4146
4157
|
var import_methods = require_methods2();
|
|
@@ -4165,23 +4176,27 @@ var require_node2 = __commonJS({
|
|
|
4165
4176
|
}
|
|
4166
4177
|
if (ENV2 === "test" || ENV2 === "development" || options.alowRefReference) {
|
|
4167
4178
|
node2.ref = element;
|
|
4168
|
-
if ((0,
|
|
4179
|
+
if ((0, import_utils20.isFunction)(node2.setAttribute))
|
|
4169
4180
|
node2.setAttribute("key", element.key);
|
|
4170
4181
|
}
|
|
4171
4182
|
if (element.tag !== "string" || element.tag !== "fragment") {
|
|
4172
4183
|
(0, import_iterate.throughInitialDefine)(element);
|
|
4173
4184
|
(0, import_iterate.throughInitialExec)(element);
|
|
4174
|
-
if (isNewNode && (0,
|
|
4185
|
+
if (isNewNode && (0, import_utils20.isObject)(element.on))
|
|
4175
4186
|
(0, import_event.applyEventsOnNode)(element);
|
|
4176
4187
|
for (const param in element) {
|
|
4177
4188
|
const prop = element[param];
|
|
4178
|
-
if ((0,
|
|
4189
|
+
if ((0, import_utils20.isUndefined)(prop) || (0, import_methods.isMethod)(param) || (0, import_utils22.isVariant)(param) || (0, import_utils20.isObject)(import_mixins.registry[param]))
|
|
4179
4190
|
continue;
|
|
4180
4191
|
const isElement = (0, import_applyParam.applyParam)(param, element, options);
|
|
4181
4192
|
if (isElement) {
|
|
4182
4193
|
const { hasDefine, hasContextDefine } = isElement;
|
|
4183
4194
|
if (element[param] && !hasDefine && !hasContextDefine) {
|
|
4184
|
-
(0, import_create.default)((0,
|
|
4195
|
+
const createAsync = () => (0, import_create.default)((0, import_utils20.exec)(prop, element), element, param, options);
|
|
4196
|
+
if (element.props && element.props.lazyLoad || options.lazyLoad) {
|
|
4197
|
+
window.requestAnimationFrame(() => createAsync());
|
|
4198
|
+
} else
|
|
4199
|
+
createAsync();
|
|
4185
4200
|
}
|
|
4186
4201
|
}
|
|
4187
4202
|
}
|
|
@@ -4218,7 +4233,7 @@ var require_methods3 = __commonJS({
|
|
|
4218
4233
|
DEFAULT_METHODS: () => DEFAULT_METHODS
|
|
4219
4234
|
});
|
|
4220
4235
|
module2.exports = __toCommonJS2(methods_exports);
|
|
4221
|
-
var
|
|
4236
|
+
var import_utils20 = require_cjs();
|
|
4222
4237
|
var DEFAULT_METHODS = {
|
|
4223
4238
|
key: {},
|
|
4224
4239
|
tag: {},
|
|
@@ -4239,7 +4254,7 @@ var require_methods3 = __commonJS({
|
|
|
4239
4254
|
text: (element, state) => {
|
|
4240
4255
|
element.ref.text = {
|
|
4241
4256
|
tag: "text",
|
|
4242
|
-
text: (0,
|
|
4257
|
+
text: (0, import_utils20.exec)(element.text, element, state)
|
|
4243
4258
|
};
|
|
4244
4259
|
},
|
|
4245
4260
|
innerHTML: {},
|
|
@@ -4476,7 +4491,7 @@ var require_update2 = __commonJS({
|
|
|
4476
4491
|
default: () => update_default
|
|
4477
4492
|
});
|
|
4478
4493
|
module2.exports = __toCommonJS2(update_exports);
|
|
4479
|
-
var
|
|
4494
|
+
var import_utils20 = require_cjs();
|
|
4480
4495
|
var import_event = require_cjs3();
|
|
4481
4496
|
var import_methods = require_methods2();
|
|
4482
4497
|
var import_props = require_props();
|
|
@@ -4488,7 +4503,7 @@ var require_update2 = __commonJS({
|
|
|
4488
4503
|
var import_applyParam = require_applyParam();
|
|
4489
4504
|
var import_options3 = __toESM2(require_options(), 1);
|
|
4490
4505
|
var snapshot = {
|
|
4491
|
-
snapshotId:
|
|
4506
|
+
snapshotId: import_utils20.createSnapshotId
|
|
4492
4507
|
};
|
|
4493
4508
|
var UPDATE_DEFAULT_OPTIONS = {
|
|
4494
4509
|
stackChanges: false,
|
|
@@ -4505,14 +4520,14 @@ var require_update2 = __commonJS({
|
|
|
4505
4520
|
if (preventInheritAtCurrentState && preventInheritAtCurrentState.__element === element)
|
|
4506
4521
|
return;
|
|
4507
4522
|
if (!excludes)
|
|
4508
|
-
(0,
|
|
4523
|
+
(0, import_utils20.merge)(options, UPDATE_DEFAULT_OPTIONS);
|
|
4509
4524
|
let ref = element.__ref;
|
|
4510
4525
|
if (!ref)
|
|
4511
4526
|
ref = element.__ref = {};
|
|
4512
4527
|
const [snapshotOnCallee, calleeElement, snapshotHasUpdated] = captureSnapshot(element, options);
|
|
4513
4528
|
if (snapshotHasUpdated)
|
|
4514
4529
|
return;
|
|
4515
|
-
if ((0,
|
|
4530
|
+
if ((0, import_utils20.isString)(params) || (0, import_utils20.isNumber)(params)) {
|
|
4516
4531
|
params = { text: params };
|
|
4517
4532
|
}
|
|
4518
4533
|
const ifFails = checkIfOnUpdate(element, parent, options);
|
|
@@ -4523,7 +4538,7 @@ var require_update2 = __commonJS({
|
|
|
4523
4538
|
return;
|
|
4524
4539
|
if (ref.__if && !options.preventPropsUpdate) {
|
|
4525
4540
|
const hasParentProps = parent.props && (parent.props[key] || parent.props.childProps);
|
|
4526
|
-
const hasFunctionInProps = ref.__props.filter((v) => (0,
|
|
4541
|
+
const hasFunctionInProps = ref.__props.filter((v) => (0, import_utils20.isFunction)(v));
|
|
4527
4542
|
const props4 = params.props || hasParentProps || hasFunctionInProps.length;
|
|
4528
4543
|
if (props4)
|
|
4529
4544
|
(0, import_props.updateProps)(props4, element, parent);
|
|
@@ -4536,11 +4551,11 @@ var require_update2 = __commonJS({
|
|
|
4536
4551
|
if (initUpdateReturns === false)
|
|
4537
4552
|
return element;
|
|
4538
4553
|
}
|
|
4539
|
-
const overwriteChanges = (0,
|
|
4554
|
+
const overwriteChanges = (0, import_utils20.overwriteDeep)(element, params, import_utils22.METHODS_EXL);
|
|
4540
4555
|
const execChanges = (0, import_iterate.throughUpdatedExec)(element, { ignore: UPDATE_DEFAULT_OPTIONS });
|
|
4541
4556
|
const definedChanges = (0, import_iterate.throughUpdatedDefine)(element);
|
|
4542
4557
|
if (options.stackChanges && element.__stackChanges) {
|
|
4543
|
-
const stackChanges = (0,
|
|
4558
|
+
const stackChanges = (0, import_utils20.merge)(definedChanges, (0, import_utils20.merge)(execChanges, overwriteChanges));
|
|
4544
4559
|
element.__stackChanges.push(stackChanges);
|
|
4545
4560
|
}
|
|
4546
4561
|
if (!ref.__if)
|
|
@@ -4551,16 +4566,16 @@ var require_update2 = __commonJS({
|
|
|
4551
4566
|
for (const param in element) {
|
|
4552
4567
|
const prop = element[param];
|
|
4553
4568
|
const hasOnlyUpdateFalsy = options.onlyUpdate && (options.onlyUpdate !== param || !element.lookup(options.onlyUpdate));
|
|
4554
|
-
const isInPreventUpdate = (0,
|
|
4555
|
-
const isInPreventDefineUpdate = (0,
|
|
4556
|
-
if ((0,
|
|
4569
|
+
const isInPreventUpdate = (0, import_utils20.isArray)(options.preventUpdate) && options.preventUpdate.includes(param);
|
|
4570
|
+
const isInPreventDefineUpdate = (0, import_utils20.isArray)(options.preventDefineUpdate) && options.preventDefineUpdate.includes(param);
|
|
4571
|
+
if ((0, import_utils20.isUndefined)(prop) || hasOnlyUpdateFalsy || isInPreventUpdate || isInPreventDefineUpdate || options.preventDefineUpdate === true || options.preventDefineUpdate === param || options.preventContentUpdate && param === "content" || (options.preventStateUpdate && param) === "state" || (0, import_methods.isMethod)(param) || (0, import_utils20.isObject)(import_mixins.registry[param]) || (0, import_utils22.isVariant)(param))
|
|
4557
4572
|
continue;
|
|
4558
4573
|
if (options.preventStateUpdate === "once")
|
|
4559
4574
|
options.preventStateUpdate = false;
|
|
4560
4575
|
const isElement = (0, import_applyParam.applyParam)(param, element, options);
|
|
4561
4576
|
if (isElement) {
|
|
4562
4577
|
const { hasDefine, hasContextDefine } = isElement;
|
|
4563
|
-
const canUpdate = (0,
|
|
4578
|
+
const canUpdate = (0, import_utils20.isObject)(prop) && !hasDefine && !hasContextDefine && !options.preventRecursive;
|
|
4564
4579
|
if (!canUpdate)
|
|
4565
4580
|
continue;
|
|
4566
4581
|
const childUpdateCall = () => update.call(prop, params[prop], {
|
|
@@ -4569,7 +4584,7 @@ var require_update2 = __commonJS({
|
|
|
4569
4584
|
calleeElement
|
|
4570
4585
|
});
|
|
4571
4586
|
if (element.props && element.props.lazyLoad || options.lazyLoad) {
|
|
4572
|
-
|
|
4587
|
+
import_utils20.window.requestAnimationFrame(() => childUpdateCall());
|
|
4573
4588
|
} else
|
|
4574
4589
|
childUpdateCall();
|
|
4575
4590
|
}
|
|
@@ -4593,7 +4608,7 @@ var require_update2 = __commonJS({
|
|
|
4593
4608
|
return [snapshotOnCallee, calleeElement];
|
|
4594
4609
|
};
|
|
4595
4610
|
var checkIfOnUpdate = (element, parent, options) => {
|
|
4596
|
-
if (!(0,
|
|
4611
|
+
if (!(0, import_utils20.isFunction)(element.if) || !element.state || !parent)
|
|
4597
4612
|
return;
|
|
4598
4613
|
const ref = element.__ref;
|
|
4599
4614
|
const ifPassed = element.if(element, element.state, element.context, options);
|
|
@@ -4610,7 +4625,7 @@ var require_update2 = __commonJS({
|
|
|
4610
4625
|
element.state = ref.__state;
|
|
4611
4626
|
}
|
|
4612
4627
|
const created = (0, import_create.default)(element, parent, element.key, import_options3.default.create);
|
|
4613
|
-
if (options.preventUpdate !== true && element.on && (0,
|
|
4628
|
+
if (options.preventUpdate !== true && element.on && (0, import_utils20.isFunction)(element.on.update)) {
|
|
4614
4629
|
(0, import_event.applyEvent)(element.on.update, created, created.state);
|
|
4615
4630
|
}
|
|
4616
4631
|
return created;
|
|
@@ -4631,9 +4646,9 @@ var require_update2 = __commonJS({
|
|
|
4631
4646
|
return;
|
|
4632
4647
|
}
|
|
4633
4648
|
const { isHoisted, execStateFunction, stateFunctionOverwrite } = options;
|
|
4634
|
-
const shouldForceStateUpdate = (0,
|
|
4649
|
+
const shouldForceStateUpdate = (0, import_utils20.isFunction)(stateKey) && (!isHoisted && execStateFunction && stateFunctionOverwrite);
|
|
4635
4650
|
if (shouldForceStateUpdate) {
|
|
4636
|
-
const execState = (0,
|
|
4651
|
+
const execState = (0, import_utils20.exec)(stateKey, element);
|
|
4637
4652
|
state.set(execState, {
|
|
4638
4653
|
...options,
|
|
4639
4654
|
preventUpdate: true
|
|
@@ -4705,7 +4720,7 @@ var require_set2 = __commonJS({
|
|
|
4705
4720
|
addMethods: () => addMethods
|
|
4706
4721
|
});
|
|
4707
4722
|
module2.exports = __toCommonJS2(set_exports);
|
|
4708
|
-
var
|
|
4723
|
+
var import_utils20 = require_cjs();
|
|
4709
4724
|
var import_set = __toESM2(require_set(), 1);
|
|
4710
4725
|
var import_update = __toESM2(require_update2(), 1);
|
|
4711
4726
|
var import__ = require_methods2();
|
|
@@ -4726,7 +4741,7 @@ var require_set2 = __commonJS({
|
|
|
4726
4741
|
nextElement: import__.nextElement.bind(element),
|
|
4727
4742
|
previousElement: import__.previousElement.bind(element)
|
|
4728
4743
|
};
|
|
4729
|
-
if ((0,
|
|
4744
|
+
if ((0, import_utils20.isDevelopment)())
|
|
4730
4745
|
proto.log = import__.log.bind(element);
|
|
4731
4746
|
Object.setPrototypeOf(element, proto);
|
|
4732
4747
|
};
|
|
@@ -4782,7 +4797,7 @@ var require_create4 = __commonJS({
|
|
|
4782
4797
|
var import_set = require_set2();
|
|
4783
4798
|
var import_classList = require_classList();
|
|
4784
4799
|
var import_iterate = require_iterate();
|
|
4785
|
-
var
|
|
4800
|
+
var import_utils20 = require_cjs();
|
|
4786
4801
|
var import_options3 = __toESM2(require_options(), 1);
|
|
4787
4802
|
var import_component = require_component();
|
|
4788
4803
|
var ENV2 = "development";
|
|
@@ -4795,7 +4810,7 @@ var require_create4 = __commonJS({
|
|
|
4795
4810
|
parent = redefineParent(element, parent, key);
|
|
4796
4811
|
key = createKey(element, parent, key);
|
|
4797
4812
|
const ref = addRef(element, parent, key);
|
|
4798
|
-
ref.__initialProps = (0,
|
|
4813
|
+
ref.__initialProps = (0, import_utils20.deepClone)(element.props, []);
|
|
4799
4814
|
applyContext(element, parent, options);
|
|
4800
4815
|
(0, import_component.applyComponentFromContext)(element, parent, options);
|
|
4801
4816
|
(0, import_extend.applyExtend)(element, parent, options);
|
|
@@ -4830,7 +4845,7 @@ var require_create4 = __commonJS({
|
|
|
4830
4845
|
}
|
|
4831
4846
|
return {};
|
|
4832
4847
|
}
|
|
4833
|
-
if ((0,
|
|
4848
|
+
if ((0, import_utils20.isString)(key) && key.slice(0, 2 === "__")) {
|
|
4834
4849
|
if (ENV2 === "test" || ENV2 === "development") {
|
|
4835
4850
|
console.warn(key, "seems like to be in __ref");
|
|
4836
4851
|
}
|
|
@@ -4857,7 +4872,7 @@ var require_create4 = __commonJS({
|
|
|
4857
4872
|
var redefineParent = (element, parent, key, options) => {
|
|
4858
4873
|
if (!parent)
|
|
4859
4874
|
return import_tree.ROOT;
|
|
4860
|
-
if ((0,
|
|
4875
|
+
if ((0, import_utils20.isNode)(parent)) {
|
|
4861
4876
|
const parentNodeWrapper = { key: ":root", node: parent };
|
|
4862
4877
|
import_tree.ROOT[`${key}_parent`] = parentNodeWrapper;
|
|
4863
4878
|
return parentNodeWrapper;
|
|
@@ -4871,7 +4886,7 @@ var require_create4 = __commonJS({
|
|
|
4871
4886
|
}
|
|
4872
4887
|
};
|
|
4873
4888
|
var createKey = (element, parent, key) => {
|
|
4874
|
-
return (key || element.key || (0,
|
|
4889
|
+
return ((0, import_utils20.exec)(key, element) || key || element.key || (0, import_utils20.generateKey)()).toString();
|
|
4875
4890
|
};
|
|
4876
4891
|
var addRef = (element, parent) => {
|
|
4877
4892
|
if (element.__ref)
|
|
@@ -4901,7 +4916,7 @@ var require_create4 = __commonJS({
|
|
|
4901
4916
|
(0, import_event.triggerEventOn)("render", element, options);
|
|
4902
4917
|
};
|
|
4903
4918
|
var checkIfPrimitive = (element) => {
|
|
4904
|
-
return (0,
|
|
4919
|
+
return (0, import_utils20.is)(element)("string", "number");
|
|
4905
4920
|
};
|
|
4906
4921
|
var applyValueAsText = (element, parent, key) => {
|
|
4907
4922
|
const extendTag = element.extend && element.extend.tag;
|
|
@@ -4920,7 +4935,7 @@ var require_create4 = __commonJS({
|
|
|
4920
4935
|
};
|
|
4921
4936
|
var createIfConditionFlag = (element, parent) => {
|
|
4922
4937
|
const { __ref: ref } = element;
|
|
4923
|
-
if ((0,
|
|
4938
|
+
if ((0, import_utils20.isFunction)(element.if)) {
|
|
4924
4939
|
const ifPassed = element.if(element, element.state);
|
|
4925
4940
|
if (!ifPassed) {
|
|
4926
4941
|
const ifFragment = (0, import_render.cacheNode)({ tag: "fragment" });
|
|
@@ -4989,7 +5004,7 @@ var require_create4 = __commonJS({
|
|
|
4989
5004
|
(0, import_set.addMethods)(element, parent);
|
|
4990
5005
|
(0, import_state2.createState)(element, parent);
|
|
4991
5006
|
const ref = __ref;
|
|
4992
|
-
if ((0,
|
|
5007
|
+
if ((0, import_utils20.isFunction)(element.if)) {
|
|
4993
5008
|
const ifPassed = element.if(element, element.state);
|
|
4994
5009
|
if (!ifPassed) {
|
|
4995
5010
|
delete ref.__if;
|
|
@@ -5008,7 +5023,7 @@ var require_create4 = __commonJS({
|
|
|
5008
5023
|
(0, import_iterate.throughInitialDefine)(element);
|
|
5009
5024
|
(0, import_iterate.throughInitialExec)(element);
|
|
5010
5025
|
for (const k in element) {
|
|
5011
|
-
if ((0,
|
|
5026
|
+
if ((0, import_utils20.isUndefined)(element[k]) || (0, import_methods.isMethod)(k) || (0, import_utils20.isObject)(import_mixins.registry[k]) || (0, import_component.isVariant)(k))
|
|
5012
5027
|
continue;
|
|
5013
5028
|
const hasDefine = element.define && element.define[k];
|
|
5014
5029
|
const contextHasDefine = element.context && element.context.define && element.context.define[k];
|
|
@@ -5016,7 +5031,7 @@ var require_create4 = __commonJS({
|
|
|
5016
5031
|
if (import_mixins.registry[k] && !optionsHasDefine) {
|
|
5017
5032
|
continue;
|
|
5018
5033
|
} else if (element[k] && !hasDefine && !optionsHasDefine && !contextHasDefine) {
|
|
5019
|
-
create2((0,
|
|
5034
|
+
create2((0, import_utils20.exec)(element[k], element), element, k, options);
|
|
5020
5035
|
}
|
|
5021
5036
|
}
|
|
5022
5037
|
}
|
|
@@ -6014,22 +6029,28 @@ var require_cjs9 = __commonJS({
|
|
|
6014
6029
|
delete objectized[prop];
|
|
6015
6030
|
return stack;
|
|
6016
6031
|
};
|
|
6017
|
-
var isEqualDeep2 = (param, element) => {
|
|
6018
|
-
if (param === element)
|
|
6032
|
+
var isEqualDeep2 = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
6033
|
+
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
6034
|
+
return param === element;
|
|
6035
|
+
}
|
|
6036
|
+
if (visited.has(param) || visited.has(element)) {
|
|
6019
6037
|
return true;
|
|
6020
|
-
|
|
6038
|
+
}
|
|
6039
|
+
visited.add(param);
|
|
6040
|
+
visited.add(element);
|
|
6041
|
+
const keysParam = Object.keys(param);
|
|
6042
|
+
const keysElement = Object.keys(element);
|
|
6043
|
+
if (keysParam.length !== keysElement.length) {
|
|
6021
6044
|
return false;
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
if (!isEqual)
|
|
6032
|
-
return false;
|
|
6045
|
+
}
|
|
6046
|
+
for (const key of keysParam) {
|
|
6047
|
+
if (!keysElement.includes(key)) {
|
|
6048
|
+
return false;
|
|
6049
|
+
}
|
|
6050
|
+
const paramProp = param[key];
|
|
6051
|
+
const elementProp = element[key];
|
|
6052
|
+
if (!isEqualDeep2(paramProp, elementProp, visited)) {
|
|
6053
|
+
return false;
|
|
6033
6054
|
}
|
|
6034
6055
|
}
|
|
6035
6056
|
return true;
|
|
@@ -6071,6 +6092,7 @@ var require_cjs9 = __commonJS({
|
|
|
6071
6092
|
var function_exports = {};
|
|
6072
6093
|
__export22(function_exports, {
|
|
6073
6094
|
debounce: () => debounce,
|
|
6095
|
+
isStringFunction: () => isStringFunction,
|
|
6074
6096
|
memoize: () => memoize2
|
|
6075
6097
|
});
|
|
6076
6098
|
module22.exports = __toCommonJS22(function_exports);
|
|
@@ -6096,6 +6118,10 @@ var require_cjs9 = __commonJS({
|
|
|
6096
6118
|
}
|
|
6097
6119
|
};
|
|
6098
6120
|
};
|
|
6121
|
+
var isStringFunction = (inputString) => {
|
|
6122
|
+
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
6123
|
+
return functionRegex.test(inputString);
|
|
6124
|
+
};
|
|
6099
6125
|
}
|
|
6100
6126
|
});
|
|
6101
6127
|
var require_log2 = __commonJS2({
|
|
@@ -6537,7 +6563,7 @@ var require_cjs9 = __commonJS({
|
|
|
6537
6563
|
setVariables: () => setVariables
|
|
6538
6564
|
});
|
|
6539
6565
|
var import_globals2 = __toESM2(require_cjs13(), 1);
|
|
6540
|
-
var
|
|
6566
|
+
var import_utils20 = __toESM2(require_cjs22(), 1);
|
|
6541
6567
|
var ENV2 = "development";
|
|
6542
6568
|
var colorStringToRgbaArray = (color) => {
|
|
6543
6569
|
if (color === "")
|
|
@@ -6665,9 +6691,9 @@ var require_cjs9 = __commonJS({
|
|
|
6665
6691
|
return `rgba(${arr})`;
|
|
6666
6692
|
};
|
|
6667
6693
|
var getRgbTone = (rgb, tone) => {
|
|
6668
|
-
if ((0,
|
|
6694
|
+
if ((0, import_utils20.isString)(rgb))
|
|
6669
6695
|
rgb = rgb.split(", ").map((v) => parseFloat(v));
|
|
6670
|
-
if ((0,
|
|
6696
|
+
if ((0, import_utils20.isNumber)(tone))
|
|
6671
6697
|
tone += "";
|
|
6672
6698
|
const toHex = rgbArrayToHex(rgb);
|
|
6673
6699
|
const abs2 = tone.slice(0, 1);
|
|
@@ -8157,8 +8183,8 @@ var require_cjs10 = __commonJS({
|
|
|
8157
8183
|
router: () => router2
|
|
8158
8184
|
});
|
|
8159
8185
|
module2.exports = __toCommonJS2(router_exports);
|
|
8160
|
-
var
|
|
8161
|
-
var getActiveRoute = (level = 0, route =
|
|
8186
|
+
var import_utils20 = require_cjs();
|
|
8187
|
+
var getActiveRoute = (level = 0, route = import_utils20.window.location.pathname) => {
|
|
8162
8188
|
const routeArray = route.split("/");
|
|
8163
8189
|
const activeRoute = routeArray[level + 1];
|
|
8164
8190
|
if (activeRoute)
|
|
@@ -8172,7 +8198,7 @@ var require_cjs10 = __commonJS({
|
|
|
8172
8198
|
initialRender: false,
|
|
8173
8199
|
scrollToTop: true,
|
|
8174
8200
|
scrollToNode: false,
|
|
8175
|
-
scrollNode:
|
|
8201
|
+
scrollNode: import_utils20.document && import_utils20.document.documentElement,
|
|
8176
8202
|
scrollBody: false,
|
|
8177
8203
|
useFragment: false,
|
|
8178
8204
|
updateState: true,
|
|
@@ -8187,13 +8213,13 @@ var require_cjs10 = __commonJS({
|
|
|
8187
8213
|
const route = getActiveRoute(options.level, pathname);
|
|
8188
8214
|
const content = element.routes[route || "/"] || element.routes["/*"];
|
|
8189
8215
|
const scrollNode = options.scrollToNode ? rootNode : options.scrollNode;
|
|
8190
|
-
const hashChanged = hash2 && hash2 !==
|
|
8216
|
+
const hashChanged = hash2 && hash2 !== import_utils20.window.location.hash.slice(1);
|
|
8191
8217
|
const pathChanged = pathname !== lastPathname;
|
|
8192
8218
|
lastPathname = pathname;
|
|
8193
8219
|
if (!content)
|
|
8194
8220
|
return;
|
|
8195
8221
|
if (options.pushState) {
|
|
8196
|
-
|
|
8222
|
+
import_utils20.window.history.pushState(state, null, pathname + (hash2 ? `#${hash2}` : ""));
|
|
8197
8223
|
}
|
|
8198
8224
|
if (pathChanged || !hashChanged) {
|
|
8199
8225
|
if (options.updateState) {
|
|
@@ -8219,7 +8245,7 @@ var require_cjs10 = __commonJS({
|
|
|
8219
8245
|
});
|
|
8220
8246
|
}
|
|
8221
8247
|
if (hash2) {
|
|
8222
|
-
const activeNode =
|
|
8248
|
+
const activeNode = import_utils20.document.getElementById(hash2);
|
|
8223
8249
|
if (activeNode) {
|
|
8224
8250
|
const top = activeNode.getBoundingClientRect().top + rootNode.scrollTop - options.scrollToOffset || 0;
|
|
8225
8251
|
scrollNode.scrollTo({
|
|
@@ -8380,7 +8406,7 @@ __export(src_exports, {
|
|
|
8380
8406
|
});
|
|
8381
8407
|
module.exports = __toCommonJS(src_exports);
|
|
8382
8408
|
var import_domql = __toESM(require_cjs8(), 1);
|
|
8383
|
-
var
|
|
8409
|
+
var import_utils19 = __toESM(require_cjs(), 1);
|
|
8384
8410
|
|
|
8385
8411
|
// src/utilImports.js
|
|
8386
8412
|
var utilImports_exports = {};
|
|
@@ -9320,7 +9346,7 @@ var createCache = function createCache2(options) {
|
|
|
9320
9346
|
return cache2;
|
|
9321
9347
|
};
|
|
9322
9348
|
|
|
9323
|
-
//
|
|
9349
|
+
// ../../node_modules/@emotion/hash/dist/emotion-hash.esm.js
|
|
9324
9350
|
function murmur2(str) {
|
|
9325
9351
|
var h = 0;
|
|
9326
9352
|
var k, i2 = 0, len = str.length;
|
|
@@ -9350,7 +9376,7 @@ function murmur2(str) {
|
|
|
9350
9376
|
return ((h ^ h >>> 15) >>> 0).toString(36);
|
|
9351
9377
|
}
|
|
9352
9378
|
|
|
9353
|
-
//
|
|
9379
|
+
// ../../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
|
|
9354
9380
|
var unitlessKeys = {
|
|
9355
9381
|
animationIterationCount: 1,
|
|
9356
9382
|
aspectRatio: 1,
|
|
@@ -9401,7 +9427,7 @@ var unitlessKeys = {
|
|
|
9401
9427
|
strokeWidth: 1
|
|
9402
9428
|
};
|
|
9403
9429
|
|
|
9404
|
-
//
|
|
9430
|
+
// ../../node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js
|
|
9405
9431
|
var ILLEGAL_ESCAPE_SEQUENCE_ERROR = `You have illegal escape sequence in your template literal, most likely inside content's property value.
|
|
9406
9432
|
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
|
|
9407
9433
|
You can read more about this here:
|
|
@@ -9446,7 +9472,7 @@ if (true) {
|
|
|
9446
9472
|
msPattern = /^-ms-/;
|
|
9447
9473
|
hyphenPattern = /-(.)/g;
|
|
9448
9474
|
hyphenatedCache = {};
|
|
9449
|
-
processStyleValue = function
|
|
9475
|
+
processStyleValue = function processStyleValue3(key, value2) {
|
|
9450
9476
|
if (key === "content") {
|
|
9451
9477
|
if (typeof value2 !== "string" || contentValues.indexOf(value2) === -1 && !contentValuePattern.test(value2) && (value2.charAt(0) !== value2.charAt(value2.length - 1) || value2.charAt(0) !== '"' && value2.charAt(0) !== "'")) {
|
|
9452
9478
|
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value2 + "\"'`");
|
|
@@ -9654,7 +9680,7 @@ var serializeStyles = function serializeStyles2(args, registered, mergedProps) {
|
|
|
9654
9680
|
};
|
|
9655
9681
|
};
|
|
9656
9682
|
|
|
9657
|
-
//
|
|
9683
|
+
// ../../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js
|
|
9658
9684
|
var isBrowser = true;
|
|
9659
9685
|
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
9660
9686
|
var rawClassName = "";
|
|
@@ -9696,7 +9722,7 @@ var insertStyles = function insertStyles2(cache2, serialized, isStringTag) {
|
|
|
9696
9722
|
}
|
|
9697
9723
|
};
|
|
9698
9724
|
|
|
9699
|
-
//
|
|
9725
|
+
// ../../node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js
|
|
9700
9726
|
function insertWithoutScoping(cache2, serialized) {
|
|
9701
9727
|
if (cache2.inserted[serialized.name] === void 0) {
|
|
9702
9728
|
return cache2.insert("", serialized, cache2.sheet, true);
|
|
@@ -9897,6 +9923,7 @@ __export(domql_exports, {
|
|
|
9897
9923
|
Animation: () => Animation,
|
|
9898
9924
|
Avatar: () => Avatar,
|
|
9899
9925
|
AvatarBundle: () => AvatarBundle,
|
|
9926
|
+
AvatarChooser: () => AvatarChooser,
|
|
9900
9927
|
AvatarIndicator: () => AvatarIndicator,
|
|
9901
9928
|
BalanceCard: () => BalanceCard,
|
|
9902
9929
|
Block: () => Block,
|
|
@@ -12701,16 +12728,14 @@ var CardLabel = {
|
|
|
12701
12728
|
// ../../uikit/domql/Avatar/Avatar.js
|
|
12702
12729
|
var Avatar = {
|
|
12703
12730
|
extend: Img,
|
|
12704
|
-
props: {
|
|
12731
|
+
props: ({ key, props: props4 }) => ({
|
|
12705
12732
|
display: "block",
|
|
12706
12733
|
avatarType: "initials",
|
|
12707
12734
|
borderRadius: "100%",
|
|
12708
12735
|
boxSize: "C+X C+X",
|
|
12709
|
-
cursor: "pointer"
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
src: ({ key, props: props4 }) => props4.src || `https://avatars.dicebear.com/api/${props4.avatarType || "adventurer-neutral"}/${props4.key || key}.svg`
|
|
12713
|
-
}
|
|
12736
|
+
cursor: "pointer",
|
|
12737
|
+
src: `https://api.dicebear.com/7.x/${props4.avatarType || "adventurer-neutral"}/svg?seed=${props4.key || key}`
|
|
12738
|
+
})
|
|
12714
12739
|
};
|
|
12715
12740
|
|
|
12716
12741
|
// ../../uikit/domql/Avatar/AvatarIndicator.js
|
|
@@ -12743,6 +12768,60 @@ var AvatarBundle = {
|
|
|
12743
12768
|
...[{}, {}, {}, {}]
|
|
12744
12769
|
};
|
|
12745
12770
|
|
|
12771
|
+
// ../../uikit/domql/Avatar/index.js
|
|
12772
|
+
var AvatarChooser = {
|
|
12773
|
+
extend: Button,
|
|
12774
|
+
tag: "label",
|
|
12775
|
+
props: {
|
|
12776
|
+
round: "C",
|
|
12777
|
+
gap: "Y",
|
|
12778
|
+
padding: "W2 A W2 W2",
|
|
12779
|
+
theme: "tertiary",
|
|
12780
|
+
position: "relative",
|
|
12781
|
+
cursor: "pointer"
|
|
12782
|
+
},
|
|
12783
|
+
Avatar: {
|
|
12784
|
+
props: ({ state }) => ({
|
|
12785
|
+
key: state.key,
|
|
12786
|
+
boxSize: "B1",
|
|
12787
|
+
pointerEvents: "none"
|
|
12788
|
+
})
|
|
12789
|
+
},
|
|
12790
|
+
Select: {
|
|
12791
|
+
props: {
|
|
12792
|
+
outline: "none",
|
|
12793
|
+
pointerEvents: "all",
|
|
12794
|
+
appearance: "none",
|
|
12795
|
+
border: "none",
|
|
12796
|
+
width: "100%",
|
|
12797
|
+
height: "100%",
|
|
12798
|
+
background: "none",
|
|
12799
|
+
color: "currentColor",
|
|
12800
|
+
fontSize: "A",
|
|
12801
|
+
lineHeight: 1,
|
|
12802
|
+
margin: "0 0 0 -B1+X",
|
|
12803
|
+
padding: "0 A 0 B1+X",
|
|
12804
|
+
":focus-visible": {
|
|
12805
|
+
outline: "none"
|
|
12806
|
+
}
|
|
12807
|
+
},
|
|
12808
|
+
childExtend: { tag: "option" },
|
|
12809
|
+
$setPropsCollection: ({ parent, state }) => {
|
|
12810
|
+
return parent.props.options.map((v) => {
|
|
12811
|
+
if (v.text === state.key)
|
|
12812
|
+
return { ...v, selected: true };
|
|
12813
|
+
return v;
|
|
12814
|
+
});
|
|
12815
|
+
},
|
|
12816
|
+
on: {
|
|
12817
|
+
change: (ev, { state }) => {
|
|
12818
|
+
state.update({ key: ev.target.value });
|
|
12819
|
+
console.log(state.key);
|
|
12820
|
+
}
|
|
12821
|
+
}
|
|
12822
|
+
}
|
|
12823
|
+
};
|
|
12824
|
+
|
|
12746
12825
|
// ../../uikit/domql/Notification/index.js
|
|
12747
12826
|
var Notification = {
|
|
12748
12827
|
extend: Flex,
|
|
@@ -15298,7 +15377,7 @@ var fetchAsync = (app, key, options, callback) => {
|
|
|
15298
15377
|
};
|
|
15299
15378
|
|
|
15300
15379
|
// ../../node_modules/@domql/emotion/index.js
|
|
15301
|
-
var
|
|
15380
|
+
var import_utils16 = __toESM(require_cjs());
|
|
15302
15381
|
|
|
15303
15382
|
// ../../node_modules/@domql/classlist/index.js
|
|
15304
15383
|
var import_utils15 = __toESM(require_cjs());
|
|
@@ -15337,507 +15416,17 @@ var applyClassListOnNode = (params, element, node2) => {
|
|
|
15337
15416
|
return className;
|
|
15338
15417
|
};
|
|
15339
15418
|
|
|
15340
|
-
// ../../node_modules/@emotion/hash/dist/emotion-hash.esm.js
|
|
15341
|
-
function murmur22(str) {
|
|
15342
|
-
var h = 0;
|
|
15343
|
-
var k, i2 = 0, len = str.length;
|
|
15344
|
-
for (; len >= 4; ++i2, len -= 4) {
|
|
15345
|
-
k = str.charCodeAt(i2) & 255 | (str.charCodeAt(++i2) & 255) << 8 | (str.charCodeAt(++i2) & 255) << 16 | (str.charCodeAt(++i2) & 255) << 24;
|
|
15346
|
-
k = /* Math.imul(k, m): */
|
|
15347
|
-
(k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16);
|
|
15348
|
-
k ^= /* k >>> r: */
|
|
15349
|
-
k >>> 24;
|
|
15350
|
-
h = /* Math.imul(k, m): */
|
|
15351
|
-
(k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
15352
|
-
(h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
15353
|
-
}
|
|
15354
|
-
switch (len) {
|
|
15355
|
-
case 3:
|
|
15356
|
-
h ^= (str.charCodeAt(i2 + 2) & 255) << 16;
|
|
15357
|
-
case 2:
|
|
15358
|
-
h ^= (str.charCodeAt(i2 + 1) & 255) << 8;
|
|
15359
|
-
case 1:
|
|
15360
|
-
h ^= str.charCodeAt(i2) & 255;
|
|
15361
|
-
h = /* Math.imul(h, m): */
|
|
15362
|
-
(h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
15363
|
-
}
|
|
15364
|
-
h ^= h >>> 13;
|
|
15365
|
-
h = /* Math.imul(h, m): */
|
|
15366
|
-
(h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
15367
|
-
return ((h ^ h >>> 15) >>> 0).toString(36);
|
|
15368
|
-
}
|
|
15369
|
-
|
|
15370
|
-
// ../../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
|
|
15371
|
-
var unitlessKeys2 = {
|
|
15372
|
-
animationIterationCount: 1,
|
|
15373
|
-
aspectRatio: 1,
|
|
15374
|
-
borderImageOutset: 1,
|
|
15375
|
-
borderImageSlice: 1,
|
|
15376
|
-
borderImageWidth: 1,
|
|
15377
|
-
boxFlex: 1,
|
|
15378
|
-
boxFlexGroup: 1,
|
|
15379
|
-
boxOrdinalGroup: 1,
|
|
15380
|
-
columnCount: 1,
|
|
15381
|
-
columns: 1,
|
|
15382
|
-
flex: 1,
|
|
15383
|
-
flexGrow: 1,
|
|
15384
|
-
flexPositive: 1,
|
|
15385
|
-
flexShrink: 1,
|
|
15386
|
-
flexNegative: 1,
|
|
15387
|
-
flexOrder: 1,
|
|
15388
|
-
gridRow: 1,
|
|
15389
|
-
gridRowEnd: 1,
|
|
15390
|
-
gridRowSpan: 1,
|
|
15391
|
-
gridRowStart: 1,
|
|
15392
|
-
gridColumn: 1,
|
|
15393
|
-
gridColumnEnd: 1,
|
|
15394
|
-
gridColumnSpan: 1,
|
|
15395
|
-
gridColumnStart: 1,
|
|
15396
|
-
msGridRow: 1,
|
|
15397
|
-
msGridRowSpan: 1,
|
|
15398
|
-
msGridColumn: 1,
|
|
15399
|
-
msGridColumnSpan: 1,
|
|
15400
|
-
fontWeight: 1,
|
|
15401
|
-
lineHeight: 1,
|
|
15402
|
-
opacity: 1,
|
|
15403
|
-
order: 1,
|
|
15404
|
-
orphans: 1,
|
|
15405
|
-
tabSize: 1,
|
|
15406
|
-
widows: 1,
|
|
15407
|
-
zIndex: 1,
|
|
15408
|
-
zoom: 1,
|
|
15409
|
-
WebkitLineClamp: 1,
|
|
15410
|
-
// SVG-related properties
|
|
15411
|
-
fillOpacity: 1,
|
|
15412
|
-
floodOpacity: 1,
|
|
15413
|
-
stopOpacity: 1,
|
|
15414
|
-
strokeDasharray: 1,
|
|
15415
|
-
strokeDashoffset: 1,
|
|
15416
|
-
strokeMiterlimit: 1,
|
|
15417
|
-
strokeOpacity: 1,
|
|
15418
|
-
strokeWidth: 1
|
|
15419
|
-
};
|
|
15420
|
-
|
|
15421
|
-
// ../../node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js
|
|
15422
|
-
var ILLEGAL_ESCAPE_SEQUENCE_ERROR2 = `You have illegal escape sequence in your template literal, most likely inside content's property value.
|
|
15423
|
-
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
|
|
15424
|
-
You can read more about this here:
|
|
15425
|
-
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`;
|
|
15426
|
-
var UNDEFINED_AS_OBJECT_KEY_ERROR2 = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
|
|
15427
|
-
var hyphenateRegex2 = /[A-Z]|^ms/g;
|
|
15428
|
-
var animationRegex2 = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
15429
|
-
var isCustomProperty3 = function isCustomProperty4(property) {
|
|
15430
|
-
return property.charCodeAt(1) === 45;
|
|
15431
|
-
};
|
|
15432
|
-
var isProcessableValue3 = function isProcessableValue4(value2) {
|
|
15433
|
-
return value2 != null && typeof value2 !== "boolean";
|
|
15434
|
-
};
|
|
15435
|
-
var processStyleName2 = /* @__PURE__ */ memoize(function(styleName) {
|
|
15436
|
-
return isCustomProperty3(styleName) ? styleName : styleName.replace(hyphenateRegex2, "-$&").toLowerCase();
|
|
15437
|
-
});
|
|
15438
|
-
var processStyleValue3 = function processStyleValue4(key, value2) {
|
|
15439
|
-
switch (key) {
|
|
15440
|
-
case "animation":
|
|
15441
|
-
case "animationName": {
|
|
15442
|
-
if (typeof value2 === "string") {
|
|
15443
|
-
return value2.replace(animationRegex2, function(match2, p1, p2) {
|
|
15444
|
-
cursor2 = {
|
|
15445
|
-
name: p1,
|
|
15446
|
-
styles: p2,
|
|
15447
|
-
next: cursor2
|
|
15448
|
-
};
|
|
15449
|
-
return p1;
|
|
15450
|
-
});
|
|
15451
|
-
}
|
|
15452
|
-
}
|
|
15453
|
-
}
|
|
15454
|
-
if (unitlessKeys2[key] !== 1 && !isCustomProperty3(key) && typeof value2 === "number" && value2 !== 0) {
|
|
15455
|
-
return value2 + "px";
|
|
15456
|
-
}
|
|
15457
|
-
return value2;
|
|
15458
|
-
};
|
|
15459
|
-
if (true) {
|
|
15460
|
-
contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
|
|
15461
|
-
contentValues = ["normal", "none", "initial", "inherit", "unset"];
|
|
15462
|
-
oldProcessStyleValue = processStyleValue3;
|
|
15463
|
-
msPattern = /^-ms-/;
|
|
15464
|
-
hyphenPattern = /-(.)/g;
|
|
15465
|
-
hyphenatedCache = {};
|
|
15466
|
-
processStyleValue3 = function processStyleValue5(key, value2) {
|
|
15467
|
-
if (key === "content") {
|
|
15468
|
-
if (typeof value2 !== "string" || contentValues.indexOf(value2) === -1 && !contentValuePattern.test(value2) && (value2.charAt(0) !== value2.charAt(value2.length - 1) || value2.charAt(0) !== '"' && value2.charAt(0) !== "'")) {
|
|
15469
|
-
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value2 + "\"'`");
|
|
15470
|
-
}
|
|
15471
|
-
}
|
|
15472
|
-
var processed = oldProcessStyleValue(key, value2);
|
|
15473
|
-
if (processed !== "" && !isCustomProperty3(key) && key.indexOf("-") !== -1 && hyphenatedCache[key] === void 0) {
|
|
15474
|
-
hyphenatedCache[key] = true;
|
|
15475
|
-
console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, "ms-").replace(hyphenPattern, function(str, _char) {
|
|
15476
|
-
return _char.toUpperCase();
|
|
15477
|
-
}) + "?");
|
|
15478
|
-
}
|
|
15479
|
-
return processed;
|
|
15480
|
-
};
|
|
15481
|
-
}
|
|
15482
|
-
var contentValuePattern;
|
|
15483
|
-
var contentValues;
|
|
15484
|
-
var oldProcessStyleValue;
|
|
15485
|
-
var msPattern;
|
|
15486
|
-
var hyphenPattern;
|
|
15487
|
-
var hyphenatedCache;
|
|
15488
|
-
var noComponentSelectorMessage2 = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
|
|
15489
|
-
function handleInterpolation2(mergedProps, registered, interpolation) {
|
|
15490
|
-
if (interpolation == null) {
|
|
15491
|
-
return "";
|
|
15492
|
-
}
|
|
15493
|
-
if (interpolation.__emotion_styles !== void 0) {
|
|
15494
|
-
if (interpolation.toString() === "NO_COMPONENT_SELECTOR") {
|
|
15495
|
-
throw new Error(noComponentSelectorMessage2);
|
|
15496
|
-
}
|
|
15497
|
-
return interpolation;
|
|
15498
|
-
}
|
|
15499
|
-
switch (typeof interpolation) {
|
|
15500
|
-
case "boolean": {
|
|
15501
|
-
return "";
|
|
15502
|
-
}
|
|
15503
|
-
case "object": {
|
|
15504
|
-
if (interpolation.anim === 1) {
|
|
15505
|
-
cursor2 = {
|
|
15506
|
-
name: interpolation.name,
|
|
15507
|
-
styles: interpolation.styles,
|
|
15508
|
-
next: cursor2
|
|
15509
|
-
};
|
|
15510
|
-
return interpolation.name;
|
|
15511
|
-
}
|
|
15512
|
-
if (interpolation.styles !== void 0) {
|
|
15513
|
-
var next2 = interpolation.next;
|
|
15514
|
-
if (next2 !== void 0) {
|
|
15515
|
-
while (next2 !== void 0) {
|
|
15516
|
-
cursor2 = {
|
|
15517
|
-
name: next2.name,
|
|
15518
|
-
styles: next2.styles,
|
|
15519
|
-
next: cursor2
|
|
15520
|
-
};
|
|
15521
|
-
next2 = next2.next;
|
|
15522
|
-
}
|
|
15523
|
-
}
|
|
15524
|
-
var styles = interpolation.styles + ";";
|
|
15525
|
-
if (interpolation.map !== void 0) {
|
|
15526
|
-
styles += interpolation.map;
|
|
15527
|
-
}
|
|
15528
|
-
return styles;
|
|
15529
|
-
}
|
|
15530
|
-
return createStringFromObject2(mergedProps, registered, interpolation);
|
|
15531
|
-
}
|
|
15532
|
-
case "function": {
|
|
15533
|
-
if (mergedProps !== void 0) {
|
|
15534
|
-
var previousCursor = cursor2;
|
|
15535
|
-
var result = interpolation(mergedProps);
|
|
15536
|
-
cursor2 = previousCursor;
|
|
15537
|
-
return handleInterpolation2(mergedProps, registered, result);
|
|
15538
|
-
} else if (true) {
|
|
15539
|
-
console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");
|
|
15540
|
-
}
|
|
15541
|
-
break;
|
|
15542
|
-
}
|
|
15543
|
-
case "string":
|
|
15544
|
-
if (true) {
|
|
15545
|
-
var matched = [];
|
|
15546
|
-
var replaced = interpolation.replace(animationRegex2, function(match2, p1, p2) {
|
|
15547
|
-
var fakeVarName = "animation" + matched.length;
|
|
15548
|
-
matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, "") + "`");
|
|
15549
|
-
return "${" + fakeVarName + "}";
|
|
15550
|
-
});
|
|
15551
|
-
if (matched.length) {
|
|
15552
|
-
console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n" + [].concat(matched, ["`" + replaced + "`"]).join("\n") + "\n\nYou should wrap it with `css` like this:\n\n" + ("css`" + replaced + "`"));
|
|
15553
|
-
}
|
|
15554
|
-
}
|
|
15555
|
-
break;
|
|
15556
|
-
}
|
|
15557
|
-
if (registered == null) {
|
|
15558
|
-
return interpolation;
|
|
15559
|
-
}
|
|
15560
|
-
var cached = registered[interpolation];
|
|
15561
|
-
return cached !== void 0 ? cached : interpolation;
|
|
15562
|
-
}
|
|
15563
|
-
function createStringFromObject2(mergedProps, registered, obj) {
|
|
15564
|
-
var string = "";
|
|
15565
|
-
if (Array.isArray(obj)) {
|
|
15566
|
-
for (var i2 = 0; i2 < obj.length; i2++) {
|
|
15567
|
-
string += handleInterpolation2(mergedProps, registered, obj[i2]) + ";";
|
|
15568
|
-
}
|
|
15569
|
-
} else {
|
|
15570
|
-
for (var _key in obj) {
|
|
15571
|
-
var value2 = obj[_key];
|
|
15572
|
-
if (typeof value2 !== "object") {
|
|
15573
|
-
if (registered != null && registered[value2] !== void 0) {
|
|
15574
|
-
string += _key + "{" + registered[value2] + "}";
|
|
15575
|
-
} else if (isProcessableValue3(value2)) {
|
|
15576
|
-
string += processStyleName2(_key) + ":" + processStyleValue3(_key, value2) + ";";
|
|
15577
|
-
}
|
|
15578
|
-
} else {
|
|
15579
|
-
if (_key === "NO_COMPONENT_SELECTOR" && true) {
|
|
15580
|
-
throw new Error(noComponentSelectorMessage2);
|
|
15581
|
-
}
|
|
15582
|
-
if (Array.isArray(value2) && typeof value2[0] === "string" && (registered == null || registered[value2[0]] === void 0)) {
|
|
15583
|
-
for (var _i = 0; _i < value2.length; _i++) {
|
|
15584
|
-
if (isProcessableValue3(value2[_i])) {
|
|
15585
|
-
string += processStyleName2(_key) + ":" + processStyleValue3(_key, value2[_i]) + ";";
|
|
15586
|
-
}
|
|
15587
|
-
}
|
|
15588
|
-
} else {
|
|
15589
|
-
var interpolated = handleInterpolation2(mergedProps, registered, value2);
|
|
15590
|
-
switch (_key) {
|
|
15591
|
-
case "animation":
|
|
15592
|
-
case "animationName": {
|
|
15593
|
-
string += processStyleName2(_key) + ":" + interpolated + ";";
|
|
15594
|
-
break;
|
|
15595
|
-
}
|
|
15596
|
-
default: {
|
|
15597
|
-
if (_key === "undefined") {
|
|
15598
|
-
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR2);
|
|
15599
|
-
}
|
|
15600
|
-
string += _key + "{" + interpolated + "}";
|
|
15601
|
-
}
|
|
15602
|
-
}
|
|
15603
|
-
}
|
|
15604
|
-
}
|
|
15605
|
-
}
|
|
15606
|
-
}
|
|
15607
|
-
return string;
|
|
15608
|
-
}
|
|
15609
|
-
var labelPattern2 = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
|
|
15610
|
-
var sourceMapPattern2;
|
|
15611
|
-
if (true) {
|
|
15612
|
-
sourceMapPattern2 = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
|
15613
|
-
}
|
|
15614
|
-
var cursor2;
|
|
15615
|
-
var serializeStyles3 = function serializeStyles4(args, registered, mergedProps) {
|
|
15616
|
-
if (args.length === 1 && typeof args[0] === "object" && args[0] !== null && args[0].styles !== void 0) {
|
|
15617
|
-
return args[0];
|
|
15618
|
-
}
|
|
15619
|
-
var stringMode = true;
|
|
15620
|
-
var styles = "";
|
|
15621
|
-
cursor2 = void 0;
|
|
15622
|
-
var strings = args[0];
|
|
15623
|
-
if (strings == null || strings.raw === void 0) {
|
|
15624
|
-
stringMode = false;
|
|
15625
|
-
styles += handleInterpolation2(mergedProps, registered, strings);
|
|
15626
|
-
} else {
|
|
15627
|
-
if (strings[0] === void 0) {
|
|
15628
|
-
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR2);
|
|
15629
|
-
}
|
|
15630
|
-
styles += strings[0];
|
|
15631
|
-
}
|
|
15632
|
-
for (var i2 = 1; i2 < args.length; i2++) {
|
|
15633
|
-
styles += handleInterpolation2(mergedProps, registered, args[i2]);
|
|
15634
|
-
if (stringMode) {
|
|
15635
|
-
if (strings[i2] === void 0) {
|
|
15636
|
-
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR2);
|
|
15637
|
-
}
|
|
15638
|
-
styles += strings[i2];
|
|
15639
|
-
}
|
|
15640
|
-
}
|
|
15641
|
-
var sourceMap;
|
|
15642
|
-
if (true) {
|
|
15643
|
-
styles = styles.replace(sourceMapPattern2, function(match3) {
|
|
15644
|
-
sourceMap = match3;
|
|
15645
|
-
return "";
|
|
15646
|
-
});
|
|
15647
|
-
}
|
|
15648
|
-
labelPattern2.lastIndex = 0;
|
|
15649
|
-
var identifierName = "";
|
|
15650
|
-
var match2;
|
|
15651
|
-
while ((match2 = labelPattern2.exec(styles)) !== null) {
|
|
15652
|
-
identifierName += "-" + // $FlowFixMe we know it's not null
|
|
15653
|
-
match2[1];
|
|
15654
|
-
}
|
|
15655
|
-
var name = murmur22(styles) + identifierName;
|
|
15656
|
-
if (true) {
|
|
15657
|
-
return {
|
|
15658
|
-
name,
|
|
15659
|
-
styles,
|
|
15660
|
-
map: sourceMap,
|
|
15661
|
-
next: cursor2,
|
|
15662
|
-
toString: function toString2() {
|
|
15663
|
-
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
15664
|
-
}
|
|
15665
|
-
};
|
|
15666
|
-
}
|
|
15667
|
-
return {
|
|
15668
|
-
name,
|
|
15669
|
-
styles,
|
|
15670
|
-
next: cursor2
|
|
15671
|
-
};
|
|
15672
|
-
};
|
|
15673
|
-
|
|
15674
|
-
// ../../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js
|
|
15675
|
-
var isBrowser2 = true;
|
|
15676
|
-
function getRegisteredStyles2(registered, registeredStyles, classNames) {
|
|
15677
|
-
var rawClassName = "";
|
|
15678
|
-
classNames.split(" ").forEach(function(className) {
|
|
15679
|
-
if (registered[className] !== void 0) {
|
|
15680
|
-
registeredStyles.push(registered[className] + ";");
|
|
15681
|
-
} else {
|
|
15682
|
-
rawClassName += className + " ";
|
|
15683
|
-
}
|
|
15684
|
-
});
|
|
15685
|
-
return rawClassName;
|
|
15686
|
-
}
|
|
15687
|
-
var registerStyles3 = function registerStyles4(cache2, serialized, isStringTag) {
|
|
15688
|
-
var className = cache2.key + "-" + serialized.name;
|
|
15689
|
-
if (
|
|
15690
|
-
// we only need to add the styles to the registered cache if the
|
|
15691
|
-
// class name could be used further down
|
|
15692
|
-
// the tree but if it's a string tag, we know it won't
|
|
15693
|
-
// so we don't have to add it to registered cache.
|
|
15694
|
-
// this improves memory usage since we can avoid storing the whole style string
|
|
15695
|
-
(isStringTag === false || // we need to always store it if we're in compat mode and
|
|
15696
|
-
// in node since emotion-server relies on whether a style is in
|
|
15697
|
-
// the registered cache to know whether a style is global or not
|
|
15698
|
-
// also, note that this check will be dead code eliminated in the browser
|
|
15699
|
-
isBrowser2 === false) && cache2.registered[className] === void 0
|
|
15700
|
-
) {
|
|
15701
|
-
cache2.registered[className] = serialized.styles;
|
|
15702
|
-
}
|
|
15703
|
-
};
|
|
15704
|
-
var insertStyles3 = function insertStyles4(cache2, serialized, isStringTag) {
|
|
15705
|
-
registerStyles3(cache2, serialized, isStringTag);
|
|
15706
|
-
var className = cache2.key + "-" + serialized.name;
|
|
15707
|
-
if (cache2.inserted[serialized.name] === void 0) {
|
|
15708
|
-
var current = serialized;
|
|
15709
|
-
do {
|
|
15710
|
-
cache2.insert(serialized === current ? "." + className : "", current, cache2.sheet, true);
|
|
15711
|
-
current = current.next;
|
|
15712
|
-
} while (current !== void 0);
|
|
15713
|
-
}
|
|
15714
|
-
};
|
|
15715
|
-
|
|
15716
|
-
// ../../node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js
|
|
15717
|
-
function insertWithoutScoping2(cache2, serialized) {
|
|
15718
|
-
if (cache2.inserted[serialized.name] === void 0) {
|
|
15719
|
-
return cache2.insert("", serialized, cache2.sheet, true);
|
|
15720
|
-
}
|
|
15721
|
-
}
|
|
15722
|
-
function merge4(registered, css, className) {
|
|
15723
|
-
var registeredStyles = [];
|
|
15724
|
-
var rawClassName = getRegisteredStyles2(registered, registeredStyles, className);
|
|
15725
|
-
if (registeredStyles.length < 2) {
|
|
15726
|
-
return className;
|
|
15727
|
-
}
|
|
15728
|
-
return rawClassName + css(registeredStyles);
|
|
15729
|
-
}
|
|
15730
|
-
var createEmotion4 = function createEmotion5(options) {
|
|
15731
|
-
var cache2 = createCache(options);
|
|
15732
|
-
cache2.sheet.speedy = function(value2) {
|
|
15733
|
-
if (this.ctr !== 0) {
|
|
15734
|
-
throw new Error("speedy must be changed before any rules are inserted");
|
|
15735
|
-
}
|
|
15736
|
-
this.isSpeedy = value2;
|
|
15737
|
-
};
|
|
15738
|
-
cache2.compat = true;
|
|
15739
|
-
var css = function css2() {
|
|
15740
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
15741
|
-
args[_key] = arguments[_key];
|
|
15742
|
-
}
|
|
15743
|
-
var serialized = serializeStyles3(args, cache2.registered, void 0);
|
|
15744
|
-
insertStyles3(cache2, serialized, false);
|
|
15745
|
-
return cache2.key + "-" + serialized.name;
|
|
15746
|
-
};
|
|
15747
|
-
var keyframes = function keyframes2() {
|
|
15748
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
15749
|
-
args[_key2] = arguments[_key2];
|
|
15750
|
-
}
|
|
15751
|
-
var serialized = serializeStyles3(args, cache2.registered);
|
|
15752
|
-
var animation = "animation-" + serialized.name;
|
|
15753
|
-
insertWithoutScoping2(cache2, {
|
|
15754
|
-
name: serialized.name,
|
|
15755
|
-
styles: "@keyframes " + animation + "{" + serialized.styles + "}"
|
|
15756
|
-
});
|
|
15757
|
-
return animation;
|
|
15758
|
-
};
|
|
15759
|
-
var injectGlobal = function injectGlobal2() {
|
|
15760
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
15761
|
-
args[_key3] = arguments[_key3];
|
|
15762
|
-
}
|
|
15763
|
-
var serialized = serializeStyles3(args, cache2.registered);
|
|
15764
|
-
insertWithoutScoping2(cache2, serialized);
|
|
15765
|
-
};
|
|
15766
|
-
var cx = function cx2() {
|
|
15767
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
15768
|
-
args[_key4] = arguments[_key4];
|
|
15769
|
-
}
|
|
15770
|
-
return merge4(cache2.registered, css, classnames3(args));
|
|
15771
|
-
};
|
|
15772
|
-
return {
|
|
15773
|
-
css,
|
|
15774
|
-
cx,
|
|
15775
|
-
injectGlobal,
|
|
15776
|
-
keyframes,
|
|
15777
|
-
hydrate: function hydrate(ids) {
|
|
15778
|
-
ids.forEach(function(key) {
|
|
15779
|
-
cache2.inserted[key] = true;
|
|
15780
|
-
});
|
|
15781
|
-
},
|
|
15782
|
-
flush: function flush() {
|
|
15783
|
-
cache2.registered = {};
|
|
15784
|
-
cache2.inserted = {};
|
|
15785
|
-
cache2.sheet.flush();
|
|
15786
|
-
},
|
|
15787
|
-
// $FlowFixMe
|
|
15788
|
-
sheet: cache2.sheet,
|
|
15789
|
-
cache: cache2,
|
|
15790
|
-
getRegisteredStyles: getRegisteredStyles2.bind(null, cache2.registered),
|
|
15791
|
-
merge: merge4.bind(null, cache2.registered, css)
|
|
15792
|
-
};
|
|
15793
|
-
};
|
|
15794
|
-
var classnames3 = function classnames4(args) {
|
|
15795
|
-
var cls = "";
|
|
15796
|
-
for (var i2 = 0; i2 < args.length; i2++) {
|
|
15797
|
-
var arg = args[i2];
|
|
15798
|
-
if (arg == null)
|
|
15799
|
-
continue;
|
|
15800
|
-
var toAdd = void 0;
|
|
15801
|
-
switch (typeof arg) {
|
|
15802
|
-
case "boolean":
|
|
15803
|
-
break;
|
|
15804
|
-
case "object": {
|
|
15805
|
-
if (Array.isArray(arg)) {
|
|
15806
|
-
toAdd = classnames4(arg);
|
|
15807
|
-
} else {
|
|
15808
|
-
toAdd = "";
|
|
15809
|
-
for (var k in arg) {
|
|
15810
|
-
if (arg[k] && k) {
|
|
15811
|
-
toAdd && (toAdd += " ");
|
|
15812
|
-
toAdd += k;
|
|
15813
|
-
}
|
|
15814
|
-
}
|
|
15815
|
-
}
|
|
15816
|
-
break;
|
|
15817
|
-
}
|
|
15818
|
-
default: {
|
|
15819
|
-
toAdd = arg;
|
|
15820
|
-
}
|
|
15821
|
-
}
|
|
15822
|
-
if (toAdd) {
|
|
15823
|
-
cls && (cls += " ");
|
|
15824
|
-
cls += toAdd;
|
|
15825
|
-
}
|
|
15826
|
-
}
|
|
15827
|
-
return cls;
|
|
15828
|
-
};
|
|
15829
|
-
|
|
15830
15419
|
// ../../node_modules/@domql/emotion/index.js
|
|
15831
15420
|
var transformEmotionStyle = (emotion2) => {
|
|
15832
15421
|
return (params, element, state) => {
|
|
15833
|
-
const execParams = (0,
|
|
15422
|
+
const execParams = (0, import_utils16.exec)(params, element);
|
|
15834
15423
|
if (params) {
|
|
15835
|
-
if ((0,
|
|
15424
|
+
if ((0, import_utils16.isObjectLike)(element.class))
|
|
15836
15425
|
element.class.elementStyle = execParams;
|
|
15837
15426
|
else
|
|
15838
15427
|
element.class = { elementStyle: execParams };
|
|
15839
15428
|
}
|
|
15840
|
-
transformEmotionClass(emotion2)(element.class, element, state, true);
|
|
15429
|
+
transformEmotionClass(emotion2)(element.class, element, element.state, true);
|
|
15841
15430
|
};
|
|
15842
15431
|
};
|
|
15843
15432
|
var transformEmotionClass = (emotion2) => {
|
|
@@ -15846,18 +15435,18 @@ var transformEmotionClass = (emotion2) => {
|
|
|
15846
15435
|
return;
|
|
15847
15436
|
const { __ref } = element;
|
|
15848
15437
|
const { __class, __classNames } = __ref;
|
|
15849
|
-
if (!(0,
|
|
15438
|
+
if (!(0, import_utils16.isObjectLike)(params))
|
|
15850
15439
|
return;
|
|
15851
15440
|
for (const key in params) {
|
|
15852
|
-
const prop = (0,
|
|
15441
|
+
const prop = (0, import_utils16.exec)(params[key], element);
|
|
15853
15442
|
if (!prop) {
|
|
15854
15443
|
delete __class[key];
|
|
15855
15444
|
delete __classNames[key];
|
|
15856
15445
|
continue;
|
|
15857
15446
|
}
|
|
15858
|
-
const isEqual = (0,
|
|
15447
|
+
const isEqual = (0, import_utils16.isEqualDeep)(__class[key], prop);
|
|
15859
15448
|
if (!isEqual) {
|
|
15860
|
-
if (!(0,
|
|
15449
|
+
if (!(0, import_utils16.isProduction)() && (0, import_utils16.isObject)(prop))
|
|
15861
15450
|
prop.label = key || element.key;
|
|
15862
15451
|
const CSSed = emotion2.css(prop);
|
|
15863
15452
|
__class[key] = prop;
|
|
@@ -15869,7 +15458,7 @@ var transformEmotionClass = (emotion2) => {
|
|
|
15869
15458
|
};
|
|
15870
15459
|
var transformDOMQLEmotion = (emotion2, options) => {
|
|
15871
15460
|
if (!emotion2)
|
|
15872
|
-
emotion2 =
|
|
15461
|
+
emotion2 = createEmotion(options || { key: "smbls" });
|
|
15873
15462
|
return {
|
|
15874
15463
|
style: transformEmotionStyle(emotion2),
|
|
15875
15464
|
class: transformEmotionClass(emotion2)
|
|
@@ -19325,7 +18914,7 @@ function send(event = "change", changes, options) {
|
|
|
19325
18914
|
var import_globals = __toESM(require_cjs11());
|
|
19326
18915
|
|
|
19327
18916
|
// ../socket-ui/devFocus.js
|
|
19328
|
-
var
|
|
18917
|
+
var import_utils17 = __toESM(require_cjs());
|
|
19329
18918
|
var DevFocus = {
|
|
19330
18919
|
props: {
|
|
19331
18920
|
".preventSelect": {
|
|
@@ -19379,7 +18968,7 @@ var DevFocus = {
|
|
|
19379
18968
|
on: {
|
|
19380
18969
|
init: ({ context }) => {
|
|
19381
18970
|
const { components } = context;
|
|
19382
|
-
if ((0,
|
|
18971
|
+
if ((0, import_utils17.isObject)(components)) {
|
|
19383
18972
|
const { Content, ...rest } = components;
|
|
19384
18973
|
for (const key in rest) {
|
|
19385
18974
|
if (domql_exports[key])
|
|
@@ -19601,13 +19190,13 @@ var Sync = {
|
|
|
19601
19190
|
};
|
|
19602
19191
|
|
|
19603
19192
|
// src/syncExtend.js
|
|
19604
|
-
var
|
|
19193
|
+
var import_utils18 = __toESM(require_cjs(), 1);
|
|
19605
19194
|
var applySyncDebug = (extend, options) => {
|
|
19606
19195
|
const { editor } = options;
|
|
19607
19196
|
if (!editor)
|
|
19608
19197
|
return extend;
|
|
19609
|
-
const inspect = (0,
|
|
19610
|
-
const liveSync = (0,
|
|
19198
|
+
const inspect = (0, import_utils18.isUndefined)(editor.inspect) ? (0, import_utils18.isDevelopment)() : editor.inspect;
|
|
19199
|
+
const liveSync = (0, import_utils18.isUndefined)(editor.liveSync) ? (0, import_utils18.isDevelopment)() : editor.liveSync;
|
|
19611
19200
|
if (inspect)
|
|
19612
19201
|
extend.push(DevFocus);
|
|
19613
19202
|
if (liveSync)
|
|
@@ -19618,7 +19207,7 @@ var applyInspectListener = (root, options) => {
|
|
|
19618
19207
|
const { editor } = options;
|
|
19619
19208
|
if (!editor)
|
|
19620
19209
|
return;
|
|
19621
|
-
const inspect = (0,
|
|
19210
|
+
const inspect = (0, import_utils18.isUndefined)(editor.inspect) ? (0, import_utils18.isDevelopment)() : editor.inspect;
|
|
19622
19211
|
if (inspect)
|
|
19623
19212
|
inspectOnKey(root);
|
|
19624
19213
|
};
|
|
@@ -19626,11 +19215,11 @@ var applyInspectListener = (root, options) => {
|
|
|
19626
19215
|
// src/index.js
|
|
19627
19216
|
var SYMBOLS_KEY = process.env.SYMBOLS_KEY;
|
|
19628
19217
|
var mergeWithLocalFile2 = (options, optionsExternalFile) => {
|
|
19629
|
-
const rcfile = (0,
|
|
19630
|
-
return (0,
|
|
19218
|
+
const rcfile = (0, import_utils19.isObject)(optionsExternalFile) ? optionsExternalFile : dynamic_default || {};
|
|
19219
|
+
return (0, import_utils19.deepMerge)(options, rcfile);
|
|
19631
19220
|
};
|
|
19632
19221
|
var create = async (App, options = options_default, optionsExternalFile) => {
|
|
19633
|
-
const appIsKey = (0,
|
|
19222
|
+
const appIsKey = (0, import_utils19.isString)(App);
|
|
19634
19223
|
options = mergeWithLocalFile2(options, optionsExternalFile);
|
|
19635
19224
|
const key = options.key || SYMBOLS_KEY || (appIsKey ? App : "");
|
|
19636
19225
|
if (appIsKey)
|
|
@@ -19693,7 +19282,7 @@ var create = async (App, options = options_default, optionsExternalFile) => {
|
|
|
19693
19282
|
return domqlApp;
|
|
19694
19283
|
};
|
|
19695
19284
|
var createSync = (App, options = options_default, optionsExternalFile) => {
|
|
19696
|
-
const appIsKey = (0,
|
|
19285
|
+
const appIsKey = (0, import_utils19.isString)(App);
|
|
19697
19286
|
options = mergeWithLocalFile2(options, optionsExternalFile);
|
|
19698
19287
|
const key = options.key || SYMBOLS_KEY || (appIsKey ? App : "");
|
|
19699
19288
|
if (appIsKey)
|