@wavemaker/angular-codegen 11.15.5-rc.647638 → 11.15.5-rc.647771
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/angular-app/dependency-report.html +1 -1
- package/angular-app/npm-shrinkwrap.json +1342 -1248
- package/angular-app/package-lock.json +1342 -1248
- package/angular-app/package.json +14 -12
- package/build-angular-app.js +2 -2
- package/dependencies/custom-widgets-bundle.cjs.js +20 -28
- package/dependencies/pipe-provider.cjs.js +696 -90
- package/dependencies/transpilation-web.cjs.js +351 -48
- package/npm-shrinkwrap.json +142 -145
- package/package-lock.json +142 -145
- package/package.json +2 -2
- package/src/gen-app-skeleton.js +1 -1
- package/src/wm-utils.js +1 -1
|
@@ -131194,11 +131194,22 @@ function requireConventions$1 () {
|
|
|
131194
131194
|
XMLNS: 'http://www.w3.org/2000/xmlns/',
|
|
131195
131195
|
});
|
|
131196
131196
|
|
|
131197
|
+
//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
|
131198
|
+
//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
|
|
131199
|
+
//[5] Name ::= NameStartChar (NameChar)*
|
|
131200
|
+
var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
|
|
131201
|
+
var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
|
|
131202
|
+
var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
|
|
131203
|
+
//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
|
|
131204
|
+
|
|
131197
131205
|
conventions$1.assign = assign;
|
|
131198
131206
|
conventions$1.find = find;
|
|
131199
131207
|
conventions$1.freeze = freeze;
|
|
131200
131208
|
conventions$1.MIME_TYPE = MIME_TYPE;
|
|
131201
131209
|
conventions$1.NAMESPACE = NAMESPACE;
|
|
131210
|
+
conventions$1.nameStartChar = nameStartChar;
|
|
131211
|
+
conventions$1.nameChar = nameChar;
|
|
131212
|
+
conventions$1.tagNamePattern = tagNamePattern;
|
|
131202
131213
|
return conventions$1;
|
|
131203
131214
|
}
|
|
131204
131215
|
|
|
@@ -131211,6 +131222,7 @@ function requireDom$1 () {
|
|
|
131211
131222
|
|
|
131212
131223
|
var find = conventions.find;
|
|
131213
131224
|
var NAMESPACE = conventions.NAMESPACE;
|
|
131225
|
+
var tagNamePattern = conventions.tagNamePattern;
|
|
131214
131226
|
|
|
131215
131227
|
/**
|
|
131216
131228
|
* A prerequisite for `[].filter`, to drop elements that are empty
|
|
@@ -131442,6 +131454,13 @@ function requireDom$1 () {
|
|
|
131442
131454
|
* used for attributes or DocumentType entities
|
|
131443
131455
|
*/
|
|
131444
131456
|
function NamedNodeMap() {
|
|
131457
|
+
// nodeName -> Attr membership index; lets the parse-time de-duplication in
|
|
131458
|
+
// setNamedItem resolve an existing attribute in O(1) instead of scanning the
|
|
131459
|
+
// list, so building an element with M attributes costs O(M) rather than O(M^2).
|
|
131460
|
+
// The numbered entries and length remain the sole authority for attribute order.
|
|
131461
|
+
// Object.create(null) so an attribute named __proto__ or constructor is an
|
|
131462
|
+
// ordinary key.
|
|
131463
|
+
this._nameIndex = Object.create(null);
|
|
131445
131464
|
}
|
|
131446
131465
|
function _findNodeIndex(list,node){
|
|
131447
131466
|
var i = list.length;
|
|
@@ -131450,12 +131469,27 @@ function requireDom$1 () {
|
|
|
131450
131469
|
}
|
|
131451
131470
|
}
|
|
131452
131471
|
|
|
131472
|
+
function _nnmIndexAdd(list, attr) {
|
|
131473
|
+
list._nameIndex[attr.nodeName] = attr;
|
|
131474
|
+
}
|
|
131475
|
+
function _nnmIndexRemove(list, attr) {
|
|
131476
|
+
// Only drop the entry if it still points at this attribute; a replacement with
|
|
131477
|
+
// a different nodeName may already have re-keyed it.
|
|
131478
|
+
if (list._nameIndex[attr.nodeName] === attr) {
|
|
131479
|
+
delete list._nameIndex[attr.nodeName];
|
|
131480
|
+
}
|
|
131481
|
+
}
|
|
131482
|
+
|
|
131453
131483
|
function _addNamedNode(el,list,newAttr,oldAttr){
|
|
131454
131484
|
if(oldAttr){
|
|
131455
131485
|
list[_findNodeIndex(list,oldAttr)] = newAttr;
|
|
131486
|
+
// oldAttr leaves the list; drop its index entry (its nodeName may differ
|
|
131487
|
+
// from newAttr's when the replacement came via setNamedItemNS).
|
|
131488
|
+
_nnmIndexRemove(list, oldAttr);
|
|
131456
131489
|
}else {
|
|
131457
131490
|
list[list.length++] = newAttr;
|
|
131458
131491
|
}
|
|
131492
|
+
_nnmIndexAdd(list, newAttr);
|
|
131459
131493
|
if(el){
|
|
131460
131494
|
newAttr.ownerElement = el;
|
|
131461
131495
|
var doc = el.ownerDocument;
|
|
@@ -131474,6 +131508,7 @@ function requireDom$1 () {
|
|
|
131474
131508
|
list[i] = list[++i];
|
|
131475
131509
|
}
|
|
131476
131510
|
list.length = lastIndex;
|
|
131511
|
+
_nnmIndexRemove(list, attr);
|
|
131477
131512
|
if(el){
|
|
131478
131513
|
var doc = el.ownerDocument;
|
|
131479
131514
|
if(doc){
|
|
@@ -131507,7 +131542,11 @@ function requireDom$1 () {
|
|
|
131507
131542
|
if(el && el!=this._ownerElement){
|
|
131508
131543
|
throw new DOMException(INUSE_ATTRIBUTE_ERR);
|
|
131509
131544
|
}
|
|
131510
|
-
|
|
131545
|
+
// Resolve any existing attribute with the same nodeName through the O(1)
|
|
131546
|
+
// membership index rather than an O(M) scan — this is the parse-dedup hot
|
|
131547
|
+
// path (setAttributeNode per attribute during parse). Absent -> undefined,
|
|
131548
|
+
// matching getNamedItem's contract.
|
|
131549
|
+
var oldAttr = this._nameIndex[attr.nodeName];
|
|
131511
131550
|
_addNamedNode(this._ownerElement,this,attr,oldAttr);
|
|
131512
131551
|
return oldAttr;
|
|
131513
131552
|
},
|
|
@@ -131740,9 +131779,38 @@ function requireDom$1 () {
|
|
|
131740
131779
|
while (child) {
|
|
131741
131780
|
var next = child.nextSibling;
|
|
131742
131781
|
if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) {
|
|
131743
|
-
|
|
131744
|
-
|
|
131745
|
-
//
|
|
131782
|
+
// Merge the whole run of adjacent text nodes at once: gather the
|
|
131783
|
+
// following text siblings' data, unlink them in a single pass, and
|
|
131784
|
+
// re-index the child list a single time. Per-sibling `removeChild`
|
|
131785
|
+
// (each an O(K) re-index) plus per-sibling `appendData` (each an O(K)
|
|
131786
|
+
// string rebuild) is O(K^2) over a long run of single-character text
|
|
131787
|
+
// nodes; this keeps it O(K). The first text node of the run survives
|
|
131788
|
+
// and carries the concatenated data, preserving node identity and
|
|
131789
|
+
// locator semantics.
|
|
131790
|
+
var tail = [];
|
|
131791
|
+
var sibling = next;
|
|
131792
|
+
while (sibling !== null && sibling.nodeType === TEXT_NODE) {
|
|
131793
|
+
tail.push(sibling.data);
|
|
131794
|
+
sibling = sibling.nextSibling;
|
|
131795
|
+
}
|
|
131796
|
+
// `sibling` is now the first non-text node after the run, or null.
|
|
131797
|
+
var removed = child.nextSibling;
|
|
131798
|
+
while (removed !== sibling) {
|
|
131799
|
+
var following = removed.nextSibling;
|
|
131800
|
+
removed.parentNode = null;
|
|
131801
|
+
removed.previousSibling = null;
|
|
131802
|
+
removed.nextSibling = null;
|
|
131803
|
+
removed = following;
|
|
131804
|
+
}
|
|
131805
|
+
child.nextSibling = sibling;
|
|
131806
|
+
if (sibling !== null) {
|
|
131807
|
+
sibling.previousSibling = child;
|
|
131808
|
+
} else {
|
|
131809
|
+
node.lastChild = child;
|
|
131810
|
+
}
|
|
131811
|
+
child.appendData(tail.join('')); // single O(K) string rebuild
|
|
131812
|
+
_onUpdateChild(node.ownerDocument, node); // single O(K) re-index
|
|
131813
|
+
child = sibling;
|
|
131746
131814
|
} else {
|
|
131747
131815
|
child = next;
|
|
131748
131816
|
}
|
|
@@ -132553,8 +132621,10 @@ function requireDom$1 () {
|
|
|
132553
132621
|
* - it does not do any input validation on the arguments and doesn't throw "InvalidCharacterError".
|
|
132554
132622
|
*
|
|
132555
132623
|
* Note: When the resulting document is serialized with `requireWellFormed: true`, the
|
|
132556
|
-
* serializer throws with code `INVALID_STATE_ERR` if `.
|
|
132557
|
-
*
|
|
132624
|
+
* serializer throws with code `INVALID_STATE_ERR` if `.target` is not a valid XML `NCName`
|
|
132625
|
+
* (a `Name` with no colon) or is an ASCII case-insensitive match for `"xml"`, or if `.data`
|
|
132626
|
+
* contains `?>` (W3C DOM Parsing §3.2.1.7). Without that option the target and data are
|
|
132627
|
+
* emitted verbatim.
|
|
132558
132628
|
*
|
|
132559
132629
|
* @param {string} target
|
|
132560
132630
|
* @param {string} data
|
|
@@ -132579,7 +132649,27 @@ function requireDom$1 () {
|
|
|
132579
132649
|
node.specified = true;
|
|
132580
132650
|
return node;
|
|
132581
132651
|
},
|
|
132652
|
+
/**
|
|
132653
|
+
* Creates an EntityReference object, serialized as `&name;`.
|
|
132654
|
+
*
|
|
132655
|
+
* The `name` is validated against the XML `Name` production at creation time; an invalid name
|
|
132656
|
+
* throws a `DOMException` with code `INVALID_CHARACTER_ERR`. When the resulting node is
|
|
132657
|
+
* serialized with `requireWellFormed: true`, the serializer re-validates `nodeName` and throws
|
|
132658
|
+
* a `DOMException` with code `INVALID_STATE_ERR` if a later `nodeName` mutation made it invalid;
|
|
132659
|
+
* without that option the name is emitted verbatim.
|
|
132660
|
+
*
|
|
132661
|
+
* Note: xmldom does not expand entities — the parser resolves entity references inline and never
|
|
132662
|
+
* constructs `EntityReference` nodes, so this method is the only producer.
|
|
132663
|
+
*
|
|
132664
|
+
* @param {string} name The name of the entity to reference.
|
|
132665
|
+
* @returns {EntityReference}
|
|
132666
|
+
* @throws {DOMException} With code `INVALID_CHARACTER_ERR` when `name` is not a valid XML `Name`.
|
|
132667
|
+
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-392B75AE
|
|
132668
|
+
*/
|
|
132582
132669
|
createEntityReference : function(name){
|
|
132670
|
+
if (!tagNamePattern.test(name)) {
|
|
132671
|
+
throw new DOMException(INVALID_CHARACTER_ERR, 'not a valid xml name "' + name + '"');
|
|
132672
|
+
}
|
|
132583
132673
|
var node = new EntityReference();
|
|
132584
132674
|
node.ownerDocument = this;
|
|
132585
132675
|
node.nodeName = name;
|
|
@@ -132791,15 +132881,16 @@ function requireDom$1 () {
|
|
|
132791
132881
|
/**
|
|
132792
132882
|
* Represents a DocumentType node (the `<!DOCTYPE ...>` declaration).
|
|
132793
132883
|
*
|
|
132794
|
-
* `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
|
|
132884
|
+
* `name`, `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
|
|
132795
132885
|
* xmldom does not enforce the `readonly` constraint declared by the WHATWG DOM spec —
|
|
132796
132886
|
* direct property writes succeed silently. Values are serialized verbatim when
|
|
132797
132887
|
* `requireWellFormed` is false (the default). When the serializer is invoked with
|
|
132798
132888
|
* `requireWellFormed: true` (via the 4th-parameter options object), it validates each
|
|
132799
|
-
* field
|
|
132889
|
+
* field — including `name`, which is checked against the XML `Name` production — and throws
|
|
132890
|
+
* `DOMException` with code `INVALID_STATE_ERR` on invalid values.
|
|
132800
132891
|
*
|
|
132801
132892
|
* @class
|
|
132802
|
-
* @see https://developer.mozilla.org/
|
|
132893
|
+
* @see https://developer.mozilla.org/docs/Web/API/DocumentType MDN
|
|
132803
132894
|
*/
|
|
132804
132895
|
function DocumentType() {
|
|
132805
132896
|
} DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
|
|
@@ -132813,6 +132904,20 @@ function requireDom$1 () {
|
|
|
132813
132904
|
} Entity.prototype.nodeType = ENTITY_NODE;
|
|
132814
132905
|
_extends(Entity,Node);
|
|
132815
132906
|
|
|
132907
|
+
/**
|
|
132908
|
+
* Represents an EntityReference node, serialized as `&nodeName;`.
|
|
132909
|
+
*
|
|
132910
|
+
* `nodeName` is the referenced entity's name, stored verbatim. When serialized with
|
|
132911
|
+
* `requireWellFormed: true`, the serializer validates `nodeName` against the XML `Name` production
|
|
132912
|
+
* and throws a `DOMException` with code `INVALID_STATE_ERR` if it does not match; without that
|
|
132913
|
+
* option the name is emitted verbatim between `&` and `;`.
|
|
132914
|
+
*
|
|
132915
|
+
* Note: xmldom does not expand entities — the parser resolves entity references inline and never
|
|
132916
|
+
* constructs `EntityReference` nodes, so the only producer is `Document.createEntityReference`.
|
|
132917
|
+
*
|
|
132918
|
+
* @class
|
|
132919
|
+
* @see https://www.w3.org/TR/xml/#NT-Name
|
|
132920
|
+
*/
|
|
132816
132921
|
function EntityReference() {
|
|
132817
132922
|
} EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
|
|
132818
132923
|
_extends(EntityReference,Node);
|
|
@@ -132850,14 +132955,20 @@ function requireDom$1 () {
|
|
|
132850
132955
|
* @returns {string}
|
|
132851
132956
|
* @throws {DOMException}
|
|
132852
132957
|
* With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
|
|
132958
|
+
* - an Element's qualified name (including any namespace prefix) is not a valid XML QName,
|
|
132959
|
+
* - an attribute's qualified name (including a synthesized `xmlns:` namespace declaration) is
|
|
132960
|
+
* not a valid XML QName,
|
|
132853
132961
|
* - a CDATASection node's data contains `"]]>"`,
|
|
132854
132962
|
* - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
|
|
132855
|
-
* - a ProcessingInstruction's
|
|
132963
|
+
* - a ProcessingInstruction's target is not a valid XML `NCName` (a `Name` with no colon) or is
|
|
132964
|
+
* an ASCII case-insensitive match for `"xml"`, or its data contains `"?>"`,
|
|
132965
|
+
* - a DocumentType's `name` is not a valid XML `Name` (XML 1.0 production [5]),
|
|
132856
132966
|
* - a DocumentType's `publicId` is non-empty and does not match the XML `PubidLiteral`
|
|
132857
132967
|
* production,
|
|
132858
132968
|
* - a DocumentType's `systemId` is non-empty and does not match the XML `SystemLiteral`
|
|
132859
|
-
* production,
|
|
132860
|
-
* - a DocumentType's `internalSubset` contains `"]>"
|
|
132969
|
+
* production,
|
|
132970
|
+
* - a DocumentType's `internalSubset` contains `"]>"`, or
|
|
132971
|
+
* - an EntityReference's `nodeName` is not a valid XML `Name` (XML 1.0 production [5]).
|
|
132861
132972
|
* Note: xmldom does not enforce `readonly` on DocumentType fields — direct property
|
|
132862
132973
|
* writes succeed and are covered by the serializer-level checks above.
|
|
132863
132974
|
* @see https://html.spec.whatwg.org/#dom-xmlserializer-serializetostring
|
|
@@ -132931,7 +133042,10 @@ function requireDom$1 () {
|
|
|
132931
133042
|
* @see https://www.w3.org/TR/xml11/#AVNormalize
|
|
132932
133043
|
* @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
|
|
132933
133044
|
*/
|
|
132934
|
-
function addSerializedAttribute(buf, qualifiedName, value) {
|
|
133045
|
+
function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
|
|
133046
|
+
if (requireWellFormed && !tagNamePattern.test(qualifiedName)) {
|
|
133047
|
+
throw new DOMException(INVALID_STATE_ERR, 'The attribute name "' + qualifiedName + '" is not a valid XML QName');
|
|
133048
|
+
}
|
|
132935
133049
|
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
|
|
132936
133050
|
}
|
|
132937
133051
|
|
|
@@ -132997,6 +133111,9 @@ function requireDom$1 () {
|
|
|
132997
133111
|
}
|
|
132998
133112
|
}
|
|
132999
133113
|
|
|
133114
|
+
if (requireWellFormed && !tagNamePattern.test(prefixedNodeName)) {
|
|
133115
|
+
throw new DOMException(INVALID_STATE_ERR, 'The element name "' + prefixedNodeName + '" is not a valid XML QName');
|
|
133116
|
+
}
|
|
133000
133117
|
buf.push('<', prefixedNodeName);
|
|
133001
133118
|
|
|
133002
133119
|
// Build a fresh namespace snapshot for this element's children.
|
|
@@ -133016,7 +133133,7 @@ function requireDom$1 () {
|
|
|
133016
133133
|
if (needNamespaceDefine(attr, html, childNs)) {
|
|
133017
133134
|
var attrPrefix = attr.prefix || '';
|
|
133018
133135
|
var uri = attr.namespaceURI;
|
|
133019
|
-
addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
|
|
133136
|
+
addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri, requireWellFormed);
|
|
133020
133137
|
childNs.push({ prefix: attrPrefix, namespace: uri });
|
|
133021
133138
|
}
|
|
133022
133139
|
// Apply nodeFilter and serialize the attribute.
|
|
@@ -133025,7 +133142,7 @@ function requireDom$1 () {
|
|
|
133025
133142
|
if (typeof filteredAttr === 'string') {
|
|
133026
133143
|
buf.push(filteredAttr);
|
|
133027
133144
|
} else {
|
|
133028
|
-
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
|
|
133145
|
+
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
|
|
133029
133146
|
}
|
|
133030
133147
|
}
|
|
133031
133148
|
}
|
|
@@ -133034,7 +133151,7 @@ function requireDom$1 () {
|
|
|
133034
133151
|
if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
|
|
133035
133152
|
var nodePrefix = n.prefix || '';
|
|
133036
133153
|
var uri = n.namespaceURI;
|
|
133037
|
-
addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
|
|
133154
|
+
addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri, requireWellFormed);
|
|
133038
133155
|
childNs.push({ prefix: nodePrefix, namespace: uri });
|
|
133039
133156
|
}
|
|
133040
133157
|
|
|
@@ -133067,7 +133184,7 @@ function requireDom$1 () {
|
|
|
133067
133184
|
return { ns: ns.slice(), isHTML: html, tag: null };
|
|
133068
133185
|
|
|
133069
133186
|
case ATTRIBUTE_NODE:
|
|
133070
|
-
addSerializedAttribute(buf, n.name, n.value);
|
|
133187
|
+
addSerializedAttribute(buf, n.name, n.value, requireWellFormed);
|
|
133071
133188
|
return null;
|
|
133072
133189
|
|
|
133073
133190
|
case TEXT_NODE:
|
|
@@ -133106,6 +133223,9 @@ function requireDom$1 () {
|
|
|
133106
133223
|
|
|
133107
133224
|
case DOCUMENT_TYPE_NODE:
|
|
133108
133225
|
if (requireWellFormed) {
|
|
133226
|
+
if (!tagNamePattern.test(n.name)) {
|
|
133227
|
+
throw new DOMException(INVALID_STATE_ERR, 'The doctype name "' + n.name + '" is not a valid XML Name');
|
|
133228
|
+
}
|
|
133109
133229
|
if (n.publicId && !/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(n.publicId)) {
|
|
133110
133230
|
throw new DOMException(INVALID_STATE_ERR, 'DocumentType publicId is not a valid PubidLiteral');
|
|
133111
133231
|
}
|
|
@@ -133137,13 +133257,27 @@ function requireDom$1 () {
|
|
|
133137
133257
|
return null;
|
|
133138
133258
|
|
|
133139
133259
|
case PROCESSING_INSTRUCTION_NODE:
|
|
133140
|
-
if (requireWellFormed
|
|
133141
|
-
|
|
133260
|
+
if (requireWellFormed) {
|
|
133261
|
+
if (!tagNamePattern.test(n.target) || n.target.indexOf(':') !== -1 || n.target.toLowerCase() === 'xml') {
|
|
133262
|
+
throw new DOMException(
|
|
133263
|
+
INVALID_STATE_ERR,
|
|
133264
|
+
'The processing instruction target "' + n.target + '" is not a valid XML NCName or is reserved'
|
|
133265
|
+
);
|
|
133266
|
+
}
|
|
133267
|
+
if (n.data.indexOf('?>') !== -1) {
|
|
133268
|
+
throw new DOMException(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"');
|
|
133269
|
+
}
|
|
133142
133270
|
}
|
|
133143
133271
|
buf.push('<?', n.target, ' ', n.data, '?>');
|
|
133144
133272
|
return null;
|
|
133145
133273
|
|
|
133146
133274
|
case ENTITY_REFERENCE_NODE:
|
|
133275
|
+
if (requireWellFormed && !tagNamePattern.test(n.nodeName)) {
|
|
133276
|
+
throw new DOMException(
|
|
133277
|
+
INVALID_STATE_ERR,
|
|
133278
|
+
'The entity reference name "' + n.nodeName + '" is not a valid XML Name'
|
|
133279
|
+
);
|
|
133280
|
+
}
|
|
133147
133281
|
buf.push('&', n.nodeName, ';');
|
|
133148
133282
|
return null;
|
|
133149
133283
|
|
|
@@ -135524,14 +135658,8 @@ function requireSax$1 () {
|
|
|
135524
135658
|
if (hasRequiredSax$1) return sax$1;
|
|
135525
135659
|
hasRequiredSax$1 = 1;
|
|
135526
135660
|
var NAMESPACE = requireConventions$1().NAMESPACE;
|
|
135661
|
+
var tagNamePattern = requireConventions$1().tagNamePattern;
|
|
135527
135662
|
|
|
135528
|
-
//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
|
135529
|
-
//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
|
|
135530
|
-
//[5] Name ::= NameStartChar (NameChar)*
|
|
135531
|
-
var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
|
|
135532
|
-
var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
|
|
135533
|
-
var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
|
|
135534
|
-
//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
|
|
135535
135663
|
//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
|
|
135536
135664
|
|
|
135537
135665
|
//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
|
|
@@ -135642,7 +135770,13 @@ function requireSax$1 () {
|
|
|
135642
135770
|
switch(source.charAt(tagStart+1)){
|
|
135643
135771
|
case '/':
|
|
135644
135772
|
var end = source.indexOf('>',tagStart+3);
|
|
135645
|
-
|
|
135773
|
+
// Anchored trailing-whitespace trim. The former `/[ \t\n\r]+$/g` backtracked
|
|
135774
|
+
// quadratically on a name shaped `whitespace-run + non-whitespace char`
|
|
135775
|
+
// (an end tag `</ … x>`): from every start position it extended `[ws]+`
|
|
135776
|
+
// to the end and then failed the `$` anchor. This anchored form matches the
|
|
135777
|
+
// whole string once and captures everything up to the last non-whitespace
|
|
135778
|
+
// character, so it trims in linear time with byte-identical output.
|
|
135779
|
+
var tagName = source.substring(tagStart + 2, end).replace(/^([\s\S]*?[^ \t\n\r])?[ \t\n\r]*$/, '$1');
|
|
135646
135780
|
var config = parseStack.pop();
|
|
135647
135781
|
if(end<0){
|
|
135648
135782
|
|
|
@@ -135653,6 +135787,14 @@ function requireSax$1 () {
|
|
|
135653
135787
|
tagName = tagName.replace(/[\s<].*/,'');
|
|
135654
135788
|
errorHandler.error("end tag name: "+tagName+' maybe not complete');
|
|
135655
135789
|
end = tagStart+1+tagName.length;
|
|
135790
|
+
}else if(/[ \t\n\r]/.test(tagName) && tagNamePattern.test(tagName.split(/[ \t\n\r]/)[0])){
|
|
135791
|
+
// The XML `ETag` production is `'</' Name S? '>'`: only optional whitespace may follow
|
|
135792
|
+
// the `Name`. A valid `Name` followed by whitespace and non-whitespace residue (e.g.
|
|
135793
|
+
// `</a\nbogus>` or `</a bogus>`) is not well-formed, but historically it was silently
|
|
135794
|
+
// accepted (the malformed end tag ignored, the residue dropped, the element left on the
|
|
135795
|
+
// stack). Report it as a recoverable `error` (which a custom errorHandler may escalate to
|
|
135796
|
+
// fatal) while keeping the existing recovery so the parsed DOM stays byte-identical.
|
|
135797
|
+
errorHandler.error('end tag name is followed by whitespace and trailing content: "'+tagName+'"');
|
|
135656
135798
|
}
|
|
135657
135799
|
var localNSMap = config.localNSMap;
|
|
135658
135800
|
var endMatch = config.tagName == tagName;
|
|
@@ -135776,6 +135918,15 @@ function requireSax$1 () {
|
|
|
135776
135918
|
var s = S_TAG;//status
|
|
135777
135919
|
while(true){
|
|
135778
135920
|
var c = source.charAt(p);
|
|
135921
|
+
if (s === S_TAG && c === '<') {
|
|
135922
|
+
// A `<` can never occur inside a tag name. Without this guard the scan runs
|
|
135923
|
+
// on to the next `>` (or EOF) before the tag name is rejected, so a document
|
|
135924
|
+
// with many `<` inside a malformed tag makes each one-character recovery step
|
|
135925
|
+
// re-scan to the distant `>` — O(n^2). Stopping at the `<` keeps each recovery
|
|
135926
|
+
// step bounded. The candidate scanned so far is reported raw, consistent with
|
|
135927
|
+
// the sibling invalid-tag-name throw below.
|
|
135928
|
+
throw new Error('unexpected < in tag name: ' + source.slice(start, p));
|
|
135929
|
+
}
|
|
135779
135930
|
switch(c){
|
|
135780
135931
|
case '=':
|
|
135781
135932
|
if(s === S_ATTR){//attrName
|
|
@@ -135968,9 +136119,13 @@ function requireSax$1 () {
|
|
|
135968
136119
|
if(nsPrefix !== false){//hack!!
|
|
135969
136120
|
if(localNSMap == null){
|
|
135970
136121
|
localNSMap = {};
|
|
135971
|
-
//
|
|
135972
|
-
|
|
135973
|
-
//
|
|
136122
|
+
// Derive the child scope's namespace map by prototype-chain inheritance
|
|
136123
|
+
// instead of a flat copy: lookups inherit ancestor prefixes transparently,
|
|
136124
|
+
// so a document nesting N scopes retains O(N) map entries rather than
|
|
136125
|
+
// sum(1..N) = O(N^2). localNSMap stays a flat own-only record of the
|
|
136126
|
+
// prefixes declared at THIS element, so own-property enumeration
|
|
136127
|
+
// (endPrefixMapping below) still reports only local declarations.
|
|
136128
|
+
currentNSMap = Object.create(currentNSMap);
|
|
135974
136129
|
}
|
|
135975
136130
|
currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
|
|
135976
136131
|
a.uri = NAMESPACE.XMLNS;
|
|
@@ -143009,7 +143164,7 @@ function requireMomentTimezone$1 () {
|
|
|
143009
143164
|
hasRequiredMomentTimezone$1 = 1;
|
|
143010
143165
|
(function (module) {
|
|
143011
143166
|
//! moment-timezone.js
|
|
143012
|
-
//! version : 0.6.
|
|
143167
|
+
//! version : 0.6.5
|
|
143013
143168
|
//! Copyright (c) JS Foundation and other contributors
|
|
143014
143169
|
//! license : MIT
|
|
143015
143170
|
//! github.com/moment/moment-timezone
|
|
@@ -143035,12 +143190,18 @@ function requireMomentTimezone$1 () {
|
|
|
143035
143190
|
// return moment;
|
|
143036
143191
|
// }
|
|
143037
143192
|
|
|
143038
|
-
var VERSION = "0.6.
|
|
143193
|
+
var VERSION = "0.6.5",
|
|
143039
143194
|
zones = {},
|
|
143040
143195
|
links = {},
|
|
143041
143196
|
countries = {},
|
|
143042
143197
|
names = {},
|
|
143043
143198
|
guesses = {},
|
|
143199
|
+
parsingInZone = false,
|
|
143200
|
+
parsingNow,
|
|
143201
|
+
parsingNowFunction,
|
|
143202
|
+
hasParsingNow = false,
|
|
143203
|
+
ignoreDefaultZoneForInput,
|
|
143204
|
+
hasIgnoredDefaultZoneInput = false,
|
|
143044
143205
|
cachedGuess;
|
|
143045
143206
|
|
|
143046
143207
|
if (!moment || typeof moment.version !== 'string') {
|
|
@@ -143212,17 +143373,16 @@ function requireMomentTimezone$1 () {
|
|
|
143212
143373
|
offsets = this.offsets,
|
|
143213
143374
|
untils = this.untils,
|
|
143214
143375
|
max = untils.length - 1,
|
|
143215
|
-
offset, offsetNext,
|
|
143376
|
+
offset, offsetNext, i;
|
|
143216
143377
|
|
|
143217
143378
|
for (i = 0; i < max; i++) {
|
|
143218
143379
|
offset = offsets[i];
|
|
143219
143380
|
offsetNext = offsets[i + 1];
|
|
143220
|
-
offsetPrev = offsets[i ? i - 1 : i];
|
|
143221
143381
|
|
|
143222
143382
|
if (offset < offsetNext && tz.moveAmbiguousForward) {
|
|
143223
143383
|
offset = offsetNext;
|
|
143224
|
-
} else if (offset >
|
|
143225
|
-
offset =
|
|
143384
|
+
} else if (offset > offsetNext && tz.moveInvalidForward) {
|
|
143385
|
+
offset = offsetNext;
|
|
143226
143386
|
}
|
|
143227
143387
|
|
|
143228
143388
|
if (target < untils[i] - (offset * 60000)) {
|
|
@@ -143247,6 +143407,15 @@ function requireMomentTimezone$1 () {
|
|
|
143247
143407
|
}
|
|
143248
143408
|
};
|
|
143249
143409
|
|
|
143410
|
+
var utcDefaultZone = new Zone();
|
|
143411
|
+
utcDefaultZone._set({
|
|
143412
|
+
name : 'UTC',
|
|
143413
|
+
abbrs : ['UTC'],
|
|
143414
|
+
untils : [Infinity],
|
|
143415
|
+
offsets : [0],
|
|
143416
|
+
population : 0
|
|
143417
|
+
});
|
|
143418
|
+
|
|
143250
143419
|
/************************************
|
|
143251
143420
|
Country object
|
|
143252
143421
|
************************************/
|
|
@@ -143584,6 +143753,85 @@ function requireMomentTimezone$1 () {
|
|
|
143584
143753
|
return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);
|
|
143585
143754
|
}
|
|
143586
143755
|
|
|
143756
|
+
function isObjectInput (input) {
|
|
143757
|
+
var prop;
|
|
143758
|
+
|
|
143759
|
+
if (moment.isMoment(input) || input === null || Object.prototype.toString.call(input) !== '[object Object]') {
|
|
143760
|
+
return false;
|
|
143761
|
+
}
|
|
143762
|
+
if (Object.getOwnPropertyNames) {
|
|
143763
|
+
return Object.getOwnPropertyNames(input).length > 0;
|
|
143764
|
+
}
|
|
143765
|
+
for (prop in input) {
|
|
143766
|
+
if (Object.prototype.hasOwnProperty.call(input, prop)) {
|
|
143767
|
+
return true;
|
|
143768
|
+
}
|
|
143769
|
+
}
|
|
143770
|
+
return false;
|
|
143771
|
+
}
|
|
143772
|
+
|
|
143773
|
+
function parseWithZoneNow (args, name, stringInput) {
|
|
143774
|
+
var savedNow = moment.now,
|
|
143775
|
+
savedDefaultZone = moment.defaultZone,
|
|
143776
|
+
savedParsingInZone = parsingInZone,
|
|
143777
|
+
savedParsingNow = parsingNow,
|
|
143778
|
+
savedParsingNowFunction = parsingNowFunction,
|
|
143779
|
+
savedHasParsingNow = hasParsingNow,
|
|
143780
|
+
now,
|
|
143781
|
+
hasNow = false,
|
|
143782
|
+
zonedNow,
|
|
143783
|
+
wallNow,
|
|
143784
|
+
parsedDateParts,
|
|
143785
|
+
out;
|
|
143786
|
+
|
|
143787
|
+
if (!parsingInZone) {
|
|
143788
|
+
parsingNow = undefined;
|
|
143789
|
+
parsingNowFunction = savedNow;
|
|
143790
|
+
hasParsingNow = false;
|
|
143791
|
+
}
|
|
143792
|
+
parsingInZone = true;
|
|
143793
|
+
moment.now = function () {
|
|
143794
|
+
if (!hasNow) {
|
|
143795
|
+
if (!hasParsingNow) {
|
|
143796
|
+
parsingNow = parsingNowFunction.call(moment);
|
|
143797
|
+
hasParsingNow = true;
|
|
143798
|
+
}
|
|
143799
|
+
now = parsingNow;
|
|
143800
|
+
hasNow = true;
|
|
143801
|
+
zonedNow = moment.tz(now, name);
|
|
143802
|
+
wallNow = zonedNow.valueOf() + zonedNow.utcOffset() * 60000;
|
|
143803
|
+
}
|
|
143804
|
+
return wallNow;
|
|
143805
|
+
};
|
|
143806
|
+
if (stringInput) {
|
|
143807
|
+
moment.defaultZone = utcDefaultZone;
|
|
143808
|
+
}
|
|
143809
|
+
try {
|
|
143810
|
+
out = moment.utc.apply(null, args);
|
|
143811
|
+
if (stringInput && hasNow && out._a && out._tzm !== undefined) {
|
|
143812
|
+
parsedDateParts = out.parsingFlags().parsedDateParts;
|
|
143813
|
+
if (!parsedDateParts || parsedDateParts[0] == null || parsedDateParts[1] == null || parsedDateParts[2] == null) {
|
|
143814
|
+
moment.now = function () {
|
|
143815
|
+
return now;
|
|
143816
|
+
};
|
|
143817
|
+
moment.defaultZone = savedDefaultZone;
|
|
143818
|
+
out = moment.utc.apply(null, args);
|
|
143819
|
+
}
|
|
143820
|
+
}
|
|
143821
|
+
} finally {
|
|
143822
|
+
moment.now = savedNow;
|
|
143823
|
+
moment.defaultZone = savedDefaultZone;
|
|
143824
|
+
parsingInZone = savedParsingInZone;
|
|
143825
|
+
if (!savedParsingInZone) {
|
|
143826
|
+
parsingNow = savedParsingNow;
|
|
143827
|
+
parsingNowFunction = savedParsingNowFunction;
|
|
143828
|
+
hasParsingNow = savedHasParsingNow;
|
|
143829
|
+
}
|
|
143830
|
+
}
|
|
143831
|
+
|
|
143832
|
+
return out;
|
|
143833
|
+
}
|
|
143834
|
+
|
|
143587
143835
|
function logError (message) {
|
|
143588
143836
|
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
|
143589
143837
|
console.error(message);
|
|
@@ -143597,10 +143845,13 @@ function requireMomentTimezone$1 () {
|
|
|
143597
143845
|
function tz (input) {
|
|
143598
143846
|
var args = Array.prototype.slice.call(arguments, 0, -1),
|
|
143599
143847
|
name = arguments[arguments.length - 1],
|
|
143600
|
-
|
|
143601
|
-
|
|
143848
|
+
objectInput = isObjectInput(input),
|
|
143849
|
+
stringInput = args.length > 0 && typeof input === 'string',
|
|
143850
|
+
zone = objectInput || stringInput ? getZone(name) : null,
|
|
143851
|
+
out = objectInput && zone ? parseWithZoneNow(args, name) :
|
|
143852
|
+
stringInput && zone ? parseWithZoneNow(args, name, true) : moment.utc.apply(null, args);
|
|
143602
143853
|
|
|
143603
|
-
if (!moment.isMoment(input) && needsOffset(out) && (zone = getZone(name))) {
|
|
143854
|
+
if (!moment.isMoment(input) && needsOffset(out) && (zone || (!objectInput && (zone = getZone(name))))) {
|
|
143604
143855
|
out.add(zone.parse(out), 'minutes');
|
|
143605
143856
|
}
|
|
143606
143857
|
|
|
@@ -143640,10 +143891,49 @@ function requireMomentTimezone$1 () {
|
|
|
143640
143891
|
moment.tz = tz;
|
|
143641
143892
|
|
|
143642
143893
|
moment.defaultZone = null;
|
|
143894
|
+
var momentGetDefaultDateParts = moment._getDefaultDateParts;
|
|
143895
|
+
if (momentGetDefaultDateParts) {
|
|
143896
|
+
moment._getDefaultDateParts = function (config, now, forWeek) {
|
|
143897
|
+
var zone = moment.defaultZone,
|
|
143898
|
+
zonedNow,
|
|
143899
|
+
dateParts,
|
|
143900
|
+
savedIgnoredInput,
|
|
143901
|
+
savedHasIgnoredInput;
|
|
143902
|
+
forWeek = forWeek || config._isDefaultDatePartsForWeek;
|
|
143903
|
+
|
|
143904
|
+
if (parsingInZone && config._tzm === undefined) {
|
|
143905
|
+
zonedNow = new Date(now);
|
|
143906
|
+
return [zonedNow.getUTCFullYear(), zonedNow.getUTCMonth(), zonedNow.getUTCDate()];
|
|
143907
|
+
}
|
|
143908
|
+
|
|
143909
|
+
if (zone && !config._useUTC && config._tzm === undefined) {
|
|
143910
|
+
zonedNow = new Date(now - zone.utcOffset(now) * 60000);
|
|
143911
|
+
return [zonedNow.getUTCFullYear(), zonedNow.getUTCMonth(), zonedNow.getUTCDate()];
|
|
143912
|
+
}
|
|
143913
|
+
|
|
143914
|
+
if (forWeek && (config._useUTC || config._tzm !== undefined)) {
|
|
143915
|
+
savedIgnoredInput = ignoreDefaultZoneForInput;
|
|
143916
|
+
savedHasIgnoredInput = hasIgnoredDefaultZoneInput;
|
|
143917
|
+
ignoreDefaultZoneForInput = now;
|
|
143918
|
+
hasIgnoredDefaultZoneInput = true;
|
|
143919
|
+
try {
|
|
143920
|
+
dateParts = momentGetDefaultDateParts.call(this, config, now, forWeek);
|
|
143921
|
+
} finally {
|
|
143922
|
+
ignoreDefaultZoneForInput = savedIgnoredInput;
|
|
143923
|
+
hasIgnoredDefaultZoneInput = savedHasIgnoredInput;
|
|
143924
|
+
}
|
|
143925
|
+
return dateParts;
|
|
143926
|
+
}
|
|
143927
|
+
|
|
143928
|
+
return momentGetDefaultDateParts.call(this, config, now, forWeek);
|
|
143929
|
+
};
|
|
143930
|
+
}
|
|
143643
143931
|
|
|
143644
143932
|
moment.updateOffset = function (mom, keepTime) {
|
|
143645
|
-
var zone = moment.defaultZone,
|
|
143646
|
-
offset
|
|
143933
|
+
var zone = hasIgnoredDefaultZoneInput && ignoreDefaultZoneForInput === mom._i ? null : moment.defaultZone,
|
|
143934
|
+
offset,
|
|
143935
|
+
localTimestamp,
|
|
143936
|
+
normalizedTimestamp;
|
|
143647
143937
|
|
|
143648
143938
|
if (mom._z === undefined) {
|
|
143649
143939
|
if (zone && needsOffset(mom) && !mom._isUTC && mom.isValid()) {
|
|
@@ -143654,6 +143944,20 @@ function requireMomentTimezone$1 () {
|
|
|
143654
143944
|
}
|
|
143655
143945
|
if (mom._z) {
|
|
143656
143946
|
offset = mom._z.utcOffset(mom);
|
|
143947
|
+
if (keepTime) {
|
|
143948
|
+
// Resolve local times inside a forward gap using the configured
|
|
143949
|
+
// invalid-input policy before applying the new offset.
|
|
143950
|
+
localTimestamp = mom._d.valueOf();
|
|
143951
|
+
if (!mom._isUTC) {
|
|
143952
|
+
localTimestamp -= mom._d.getTimezoneOffset() * 60000;
|
|
143953
|
+
}
|
|
143954
|
+
if (mom._z.utcOffset(localTimestamp + offset * 60000) !== offset) {
|
|
143955
|
+
offset = mom._z.parse(localTimestamp);
|
|
143956
|
+
localTimestamp += offset * 60000;
|
|
143957
|
+
offset = mom._z.utcOffset(localTimestamp);
|
|
143958
|
+
normalizedTimestamp = localTimestamp - offset * 60000;
|
|
143959
|
+
}
|
|
143960
|
+
}
|
|
143657
143961
|
if (Math.abs(offset) < 16) {
|
|
143658
143962
|
offset = offset / 60;
|
|
143659
143963
|
}
|
|
@@ -143664,6 +143968,9 @@ function requireMomentTimezone$1 () {
|
|
|
143664
143968
|
} else {
|
|
143665
143969
|
mom.zone(offset, keepTime);
|
|
143666
143970
|
}
|
|
143971
|
+
if (normalizedTimestamp != null) {
|
|
143972
|
+
mom._d.setTime(normalizedTimestamp);
|
|
143973
|
+
}
|
|
143667
143974
|
}
|
|
143668
143975
|
};
|
|
143669
143976
|
|
|
@@ -149568,14 +149875,10 @@ const triggerItemAction$1 = (scope, item) => {
|
|
|
149568
149875
|
const getDatasourceFromExpr$1 = (expr, scope) => {
|
|
149569
149876
|
const isBoundToVariable = startsWith$1(expr, 'Variables.');
|
|
149570
149877
|
const isBoundToWidget = startsWith$1(expr, 'Widgets.');
|
|
149571
|
-
const isBoundToActivePageVar = startsWith$1(expr, 'App.activePage.Variables.');
|
|
149572
149878
|
const parts = expr.split('.');
|
|
149573
149879
|
if (isBoundToVariable) {
|
|
149574
149880
|
return get$2(scope.viewParent.Variables, parts[1]);
|
|
149575
149881
|
}
|
|
149576
|
-
if (isBoundToActivePageVar) {
|
|
149577
|
-
return get$2(scope.viewParent?.App?.activePage?.Variables, parts[3]);
|
|
149578
|
-
}
|
|
149579
149882
|
if (isBoundToWidget) {
|
|
149580
149883
|
const widgetScope = get$2(scope.viewParent.Widgets, parts[1]);
|
|
149581
149884
|
const widgetDatasetBoundExpr = widgetScope.$attrs.get('datasetboundexpr');
|
|
@@ -188246,11 +188549,22 @@ function requireConventions () {
|
|
|
188246
188549
|
XMLNS: 'http://www.w3.org/2000/xmlns/',
|
|
188247
188550
|
});
|
|
188248
188551
|
|
|
188552
|
+
//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
|
188553
|
+
//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
|
|
188554
|
+
//[5] Name ::= NameStartChar (NameChar)*
|
|
188555
|
+
var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
|
|
188556
|
+
var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
|
|
188557
|
+
var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
|
|
188558
|
+
//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
|
|
188559
|
+
|
|
188249
188560
|
conventions.assign = assign;
|
|
188250
188561
|
conventions.find = find;
|
|
188251
188562
|
conventions.freeze = freeze;
|
|
188252
188563
|
conventions.MIME_TYPE = MIME_TYPE;
|
|
188253
188564
|
conventions.NAMESPACE = NAMESPACE;
|
|
188565
|
+
conventions.nameStartChar = nameStartChar;
|
|
188566
|
+
conventions.nameChar = nameChar;
|
|
188567
|
+
conventions.tagNamePattern = tagNamePattern;
|
|
188254
188568
|
return conventions;
|
|
188255
188569
|
}
|
|
188256
188570
|
|
|
@@ -188263,6 +188577,7 @@ function requireDom () {
|
|
|
188263
188577
|
|
|
188264
188578
|
var find = conventions.find;
|
|
188265
188579
|
var NAMESPACE = conventions.NAMESPACE;
|
|
188580
|
+
var tagNamePattern = conventions.tagNamePattern;
|
|
188266
188581
|
|
|
188267
188582
|
/**
|
|
188268
188583
|
* A prerequisite for `[].filter`, to drop elements that are empty
|
|
@@ -188494,6 +188809,13 @@ function requireDom () {
|
|
|
188494
188809
|
* used for attributes or DocumentType entities
|
|
188495
188810
|
*/
|
|
188496
188811
|
function NamedNodeMap() {
|
|
188812
|
+
// nodeName -> Attr membership index; lets the parse-time de-duplication in
|
|
188813
|
+
// setNamedItem resolve an existing attribute in O(1) instead of scanning the
|
|
188814
|
+
// list, so building an element with M attributes costs O(M) rather than O(M^2).
|
|
188815
|
+
// The numbered entries and length remain the sole authority for attribute order.
|
|
188816
|
+
// Object.create(null) so an attribute named __proto__ or constructor is an
|
|
188817
|
+
// ordinary key.
|
|
188818
|
+
this._nameIndex = Object.create(null);
|
|
188497
188819
|
}
|
|
188498
188820
|
function _findNodeIndex(list,node){
|
|
188499
188821
|
var i = list.length;
|
|
@@ -188502,12 +188824,27 @@ function requireDom () {
|
|
|
188502
188824
|
}
|
|
188503
188825
|
}
|
|
188504
188826
|
|
|
188827
|
+
function _nnmIndexAdd(list, attr) {
|
|
188828
|
+
list._nameIndex[attr.nodeName] = attr;
|
|
188829
|
+
}
|
|
188830
|
+
function _nnmIndexRemove(list, attr) {
|
|
188831
|
+
// Only drop the entry if it still points at this attribute; a replacement with
|
|
188832
|
+
// a different nodeName may already have re-keyed it.
|
|
188833
|
+
if (list._nameIndex[attr.nodeName] === attr) {
|
|
188834
|
+
delete list._nameIndex[attr.nodeName];
|
|
188835
|
+
}
|
|
188836
|
+
}
|
|
188837
|
+
|
|
188505
188838
|
function _addNamedNode(el,list,newAttr,oldAttr){
|
|
188506
188839
|
if(oldAttr){
|
|
188507
188840
|
list[_findNodeIndex(list,oldAttr)] = newAttr;
|
|
188841
|
+
// oldAttr leaves the list; drop its index entry (its nodeName may differ
|
|
188842
|
+
// from newAttr's when the replacement came via setNamedItemNS).
|
|
188843
|
+
_nnmIndexRemove(list, oldAttr);
|
|
188508
188844
|
}else {
|
|
188509
188845
|
list[list.length++] = newAttr;
|
|
188510
188846
|
}
|
|
188847
|
+
_nnmIndexAdd(list, newAttr);
|
|
188511
188848
|
if(el){
|
|
188512
188849
|
newAttr.ownerElement = el;
|
|
188513
188850
|
var doc = el.ownerDocument;
|
|
@@ -188526,6 +188863,7 @@ function requireDom () {
|
|
|
188526
188863
|
list[i] = list[++i];
|
|
188527
188864
|
}
|
|
188528
188865
|
list.length = lastIndex;
|
|
188866
|
+
_nnmIndexRemove(list, attr);
|
|
188529
188867
|
if(el){
|
|
188530
188868
|
var doc = el.ownerDocument;
|
|
188531
188869
|
if(doc){
|
|
@@ -188559,7 +188897,11 @@ function requireDom () {
|
|
|
188559
188897
|
if(el && el!=this._ownerElement){
|
|
188560
188898
|
throw new DOMException(INUSE_ATTRIBUTE_ERR);
|
|
188561
188899
|
}
|
|
188562
|
-
|
|
188900
|
+
// Resolve any existing attribute with the same nodeName through the O(1)
|
|
188901
|
+
// membership index rather than an O(M) scan — this is the parse-dedup hot
|
|
188902
|
+
// path (setAttributeNode per attribute during parse). Absent -> undefined,
|
|
188903
|
+
// matching getNamedItem's contract.
|
|
188904
|
+
var oldAttr = this._nameIndex[attr.nodeName];
|
|
188563
188905
|
_addNamedNode(this._ownerElement,this,attr,oldAttr);
|
|
188564
188906
|
return oldAttr;
|
|
188565
188907
|
},
|
|
@@ -188792,9 +189134,38 @@ function requireDom () {
|
|
|
188792
189134
|
while (child) {
|
|
188793
189135
|
var next = child.nextSibling;
|
|
188794
189136
|
if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) {
|
|
188795
|
-
|
|
188796
|
-
|
|
188797
|
-
//
|
|
189137
|
+
// Merge the whole run of adjacent text nodes at once: gather the
|
|
189138
|
+
// following text siblings' data, unlink them in a single pass, and
|
|
189139
|
+
// re-index the child list a single time. Per-sibling `removeChild`
|
|
189140
|
+
// (each an O(K) re-index) plus per-sibling `appendData` (each an O(K)
|
|
189141
|
+
// string rebuild) is O(K^2) over a long run of single-character text
|
|
189142
|
+
// nodes; this keeps it O(K). The first text node of the run survives
|
|
189143
|
+
// and carries the concatenated data, preserving node identity and
|
|
189144
|
+
// locator semantics.
|
|
189145
|
+
var tail = [];
|
|
189146
|
+
var sibling = next;
|
|
189147
|
+
while (sibling !== null && sibling.nodeType === TEXT_NODE) {
|
|
189148
|
+
tail.push(sibling.data);
|
|
189149
|
+
sibling = sibling.nextSibling;
|
|
189150
|
+
}
|
|
189151
|
+
// `sibling` is now the first non-text node after the run, or null.
|
|
189152
|
+
var removed = child.nextSibling;
|
|
189153
|
+
while (removed !== sibling) {
|
|
189154
|
+
var following = removed.nextSibling;
|
|
189155
|
+
removed.parentNode = null;
|
|
189156
|
+
removed.previousSibling = null;
|
|
189157
|
+
removed.nextSibling = null;
|
|
189158
|
+
removed = following;
|
|
189159
|
+
}
|
|
189160
|
+
child.nextSibling = sibling;
|
|
189161
|
+
if (sibling !== null) {
|
|
189162
|
+
sibling.previousSibling = child;
|
|
189163
|
+
} else {
|
|
189164
|
+
node.lastChild = child;
|
|
189165
|
+
}
|
|
189166
|
+
child.appendData(tail.join('')); // single O(K) string rebuild
|
|
189167
|
+
_onUpdateChild(node.ownerDocument, node); // single O(K) re-index
|
|
189168
|
+
child = sibling;
|
|
188798
189169
|
} else {
|
|
188799
189170
|
child = next;
|
|
188800
189171
|
}
|
|
@@ -189605,8 +189976,10 @@ function requireDom () {
|
|
|
189605
189976
|
* - it does not do any input validation on the arguments and doesn't throw "InvalidCharacterError".
|
|
189606
189977
|
*
|
|
189607
189978
|
* Note: When the resulting document is serialized with `requireWellFormed: true`, the
|
|
189608
|
-
* serializer throws with code `INVALID_STATE_ERR` if `.
|
|
189609
|
-
*
|
|
189979
|
+
* serializer throws with code `INVALID_STATE_ERR` if `.target` is not a valid XML `NCName`
|
|
189980
|
+
* (a `Name` with no colon) or is an ASCII case-insensitive match for `"xml"`, or if `.data`
|
|
189981
|
+
* contains `?>` (W3C DOM Parsing §3.2.1.7). Without that option the target and data are
|
|
189982
|
+
* emitted verbatim.
|
|
189610
189983
|
*
|
|
189611
189984
|
* @param {string} target
|
|
189612
189985
|
* @param {string} data
|
|
@@ -189631,7 +190004,27 @@ function requireDom () {
|
|
|
189631
190004
|
node.specified = true;
|
|
189632
190005
|
return node;
|
|
189633
190006
|
},
|
|
190007
|
+
/**
|
|
190008
|
+
* Creates an EntityReference object, serialized as `&name;`.
|
|
190009
|
+
*
|
|
190010
|
+
* The `name` is validated against the XML `Name` production at creation time; an invalid name
|
|
190011
|
+
* throws a `DOMException` with code `INVALID_CHARACTER_ERR`. When the resulting node is
|
|
190012
|
+
* serialized with `requireWellFormed: true`, the serializer re-validates `nodeName` and throws
|
|
190013
|
+
* a `DOMException` with code `INVALID_STATE_ERR` if a later `nodeName` mutation made it invalid;
|
|
190014
|
+
* without that option the name is emitted verbatim.
|
|
190015
|
+
*
|
|
190016
|
+
* Note: xmldom does not expand entities — the parser resolves entity references inline and never
|
|
190017
|
+
* constructs `EntityReference` nodes, so this method is the only producer.
|
|
190018
|
+
*
|
|
190019
|
+
* @param {string} name The name of the entity to reference.
|
|
190020
|
+
* @returns {EntityReference}
|
|
190021
|
+
* @throws {DOMException} With code `INVALID_CHARACTER_ERR` when `name` is not a valid XML `Name`.
|
|
190022
|
+
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-392B75AE
|
|
190023
|
+
*/
|
|
189634
190024
|
createEntityReference : function(name){
|
|
190025
|
+
if (!tagNamePattern.test(name)) {
|
|
190026
|
+
throw new DOMException(INVALID_CHARACTER_ERR, 'not a valid xml name "' + name + '"');
|
|
190027
|
+
}
|
|
189635
190028
|
var node = new EntityReference();
|
|
189636
190029
|
node.ownerDocument = this;
|
|
189637
190030
|
node.nodeName = name;
|
|
@@ -189843,15 +190236,16 @@ function requireDom () {
|
|
|
189843
190236
|
/**
|
|
189844
190237
|
* Represents a DocumentType node (the `<!DOCTYPE ...>` declaration).
|
|
189845
190238
|
*
|
|
189846
|
-
* `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
|
|
190239
|
+
* `name`, `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
|
|
189847
190240
|
* xmldom does not enforce the `readonly` constraint declared by the WHATWG DOM spec —
|
|
189848
190241
|
* direct property writes succeed silently. Values are serialized verbatim when
|
|
189849
190242
|
* `requireWellFormed` is false (the default). When the serializer is invoked with
|
|
189850
190243
|
* `requireWellFormed: true` (via the 4th-parameter options object), it validates each
|
|
189851
|
-
* field
|
|
190244
|
+
* field — including `name`, which is checked against the XML `Name` production — and throws
|
|
190245
|
+
* `DOMException` with code `INVALID_STATE_ERR` on invalid values.
|
|
189852
190246
|
*
|
|
189853
190247
|
* @class
|
|
189854
|
-
* @see https://developer.mozilla.org/
|
|
190248
|
+
* @see https://developer.mozilla.org/docs/Web/API/DocumentType MDN
|
|
189855
190249
|
*/
|
|
189856
190250
|
function DocumentType() {
|
|
189857
190251
|
} DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
|
|
@@ -189865,6 +190259,20 @@ function requireDom () {
|
|
|
189865
190259
|
} Entity.prototype.nodeType = ENTITY_NODE;
|
|
189866
190260
|
_extends(Entity,Node);
|
|
189867
190261
|
|
|
190262
|
+
/**
|
|
190263
|
+
* Represents an EntityReference node, serialized as `&nodeName;`.
|
|
190264
|
+
*
|
|
190265
|
+
* `nodeName` is the referenced entity's name, stored verbatim. When serialized with
|
|
190266
|
+
* `requireWellFormed: true`, the serializer validates `nodeName` against the XML `Name` production
|
|
190267
|
+
* and throws a `DOMException` with code `INVALID_STATE_ERR` if it does not match; without that
|
|
190268
|
+
* option the name is emitted verbatim between `&` and `;`.
|
|
190269
|
+
*
|
|
190270
|
+
* Note: xmldom does not expand entities — the parser resolves entity references inline and never
|
|
190271
|
+
* constructs `EntityReference` nodes, so the only producer is `Document.createEntityReference`.
|
|
190272
|
+
*
|
|
190273
|
+
* @class
|
|
190274
|
+
* @see https://www.w3.org/TR/xml/#NT-Name
|
|
190275
|
+
*/
|
|
189868
190276
|
function EntityReference() {
|
|
189869
190277
|
} EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
|
|
189870
190278
|
_extends(EntityReference,Node);
|
|
@@ -189902,14 +190310,20 @@ function requireDom () {
|
|
|
189902
190310
|
* @returns {string}
|
|
189903
190311
|
* @throws {DOMException}
|
|
189904
190312
|
* With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
|
|
190313
|
+
* - an Element's qualified name (including any namespace prefix) is not a valid XML QName,
|
|
190314
|
+
* - an attribute's qualified name (including a synthesized `xmlns:` namespace declaration) is
|
|
190315
|
+
* not a valid XML QName,
|
|
189905
190316
|
* - a CDATASection node's data contains `"]]>"`,
|
|
189906
190317
|
* - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
|
|
189907
|
-
* - a ProcessingInstruction's
|
|
190318
|
+
* - a ProcessingInstruction's target is not a valid XML `NCName` (a `Name` with no colon) or is
|
|
190319
|
+
* an ASCII case-insensitive match for `"xml"`, or its data contains `"?>"`,
|
|
190320
|
+
* - a DocumentType's `name` is not a valid XML `Name` (XML 1.0 production [5]),
|
|
189908
190321
|
* - a DocumentType's `publicId` is non-empty and does not match the XML `PubidLiteral`
|
|
189909
190322
|
* production,
|
|
189910
190323
|
* - a DocumentType's `systemId` is non-empty and does not match the XML `SystemLiteral`
|
|
189911
|
-
* production,
|
|
189912
|
-
* - a DocumentType's `internalSubset` contains `"]>"
|
|
190324
|
+
* production,
|
|
190325
|
+
* - a DocumentType's `internalSubset` contains `"]>"`, or
|
|
190326
|
+
* - an EntityReference's `nodeName` is not a valid XML `Name` (XML 1.0 production [5]).
|
|
189913
190327
|
* Note: xmldom does not enforce `readonly` on DocumentType fields — direct property
|
|
189914
190328
|
* writes succeed and are covered by the serializer-level checks above.
|
|
189915
190329
|
* @see https://html.spec.whatwg.org/#dom-xmlserializer-serializetostring
|
|
@@ -189983,7 +190397,10 @@ function requireDom () {
|
|
|
189983
190397
|
* @see https://www.w3.org/TR/xml11/#AVNormalize
|
|
189984
190398
|
* @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
|
|
189985
190399
|
*/
|
|
189986
|
-
function addSerializedAttribute(buf, qualifiedName, value) {
|
|
190400
|
+
function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
|
|
190401
|
+
if (requireWellFormed && !tagNamePattern.test(qualifiedName)) {
|
|
190402
|
+
throw new DOMException(INVALID_STATE_ERR, 'The attribute name "' + qualifiedName + '" is not a valid XML QName');
|
|
190403
|
+
}
|
|
189987
190404
|
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
|
|
189988
190405
|
}
|
|
189989
190406
|
|
|
@@ -190049,6 +190466,9 @@ function requireDom () {
|
|
|
190049
190466
|
}
|
|
190050
190467
|
}
|
|
190051
190468
|
|
|
190469
|
+
if (requireWellFormed && !tagNamePattern.test(prefixedNodeName)) {
|
|
190470
|
+
throw new DOMException(INVALID_STATE_ERR, 'The element name "' + prefixedNodeName + '" is not a valid XML QName');
|
|
190471
|
+
}
|
|
190052
190472
|
buf.push('<', prefixedNodeName);
|
|
190053
190473
|
|
|
190054
190474
|
// Build a fresh namespace snapshot for this element's children.
|
|
@@ -190068,7 +190488,7 @@ function requireDom () {
|
|
|
190068
190488
|
if (needNamespaceDefine(attr, html, childNs)) {
|
|
190069
190489
|
var attrPrefix = attr.prefix || '';
|
|
190070
190490
|
var uri = attr.namespaceURI;
|
|
190071
|
-
addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
|
|
190491
|
+
addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri, requireWellFormed);
|
|
190072
190492
|
childNs.push({ prefix: attrPrefix, namespace: uri });
|
|
190073
190493
|
}
|
|
190074
190494
|
// Apply nodeFilter and serialize the attribute.
|
|
@@ -190077,7 +190497,7 @@ function requireDom () {
|
|
|
190077
190497
|
if (typeof filteredAttr === 'string') {
|
|
190078
190498
|
buf.push(filteredAttr);
|
|
190079
190499
|
} else {
|
|
190080
|
-
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
|
|
190500
|
+
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
|
|
190081
190501
|
}
|
|
190082
190502
|
}
|
|
190083
190503
|
}
|
|
@@ -190086,7 +190506,7 @@ function requireDom () {
|
|
|
190086
190506
|
if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
|
|
190087
190507
|
var nodePrefix = n.prefix || '';
|
|
190088
190508
|
var uri = n.namespaceURI;
|
|
190089
|
-
addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
|
|
190509
|
+
addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri, requireWellFormed);
|
|
190090
190510
|
childNs.push({ prefix: nodePrefix, namespace: uri });
|
|
190091
190511
|
}
|
|
190092
190512
|
|
|
@@ -190119,7 +190539,7 @@ function requireDom () {
|
|
|
190119
190539
|
return { ns: ns.slice(), isHTML: html, tag: null };
|
|
190120
190540
|
|
|
190121
190541
|
case ATTRIBUTE_NODE:
|
|
190122
|
-
addSerializedAttribute(buf, n.name, n.value);
|
|
190542
|
+
addSerializedAttribute(buf, n.name, n.value, requireWellFormed);
|
|
190123
190543
|
return null;
|
|
190124
190544
|
|
|
190125
190545
|
case TEXT_NODE:
|
|
@@ -190158,6 +190578,9 @@ function requireDom () {
|
|
|
190158
190578
|
|
|
190159
190579
|
case DOCUMENT_TYPE_NODE:
|
|
190160
190580
|
if (requireWellFormed) {
|
|
190581
|
+
if (!tagNamePattern.test(n.name)) {
|
|
190582
|
+
throw new DOMException(INVALID_STATE_ERR, 'The doctype name "' + n.name + '" is not a valid XML Name');
|
|
190583
|
+
}
|
|
190161
190584
|
if (n.publicId && !/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(n.publicId)) {
|
|
190162
190585
|
throw new DOMException(INVALID_STATE_ERR, 'DocumentType publicId is not a valid PubidLiteral');
|
|
190163
190586
|
}
|
|
@@ -190189,13 +190612,27 @@ function requireDom () {
|
|
|
190189
190612
|
return null;
|
|
190190
190613
|
|
|
190191
190614
|
case PROCESSING_INSTRUCTION_NODE:
|
|
190192
|
-
if (requireWellFormed
|
|
190193
|
-
|
|
190615
|
+
if (requireWellFormed) {
|
|
190616
|
+
if (!tagNamePattern.test(n.target) || n.target.indexOf(':') !== -1 || n.target.toLowerCase() === 'xml') {
|
|
190617
|
+
throw new DOMException(
|
|
190618
|
+
INVALID_STATE_ERR,
|
|
190619
|
+
'The processing instruction target "' + n.target + '" is not a valid XML NCName or is reserved'
|
|
190620
|
+
);
|
|
190621
|
+
}
|
|
190622
|
+
if (n.data.indexOf('?>') !== -1) {
|
|
190623
|
+
throw new DOMException(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"');
|
|
190624
|
+
}
|
|
190194
190625
|
}
|
|
190195
190626
|
buf.push('<?', n.target, ' ', n.data, '?>');
|
|
190196
190627
|
return null;
|
|
190197
190628
|
|
|
190198
190629
|
case ENTITY_REFERENCE_NODE:
|
|
190630
|
+
if (requireWellFormed && !tagNamePattern.test(n.nodeName)) {
|
|
190631
|
+
throw new DOMException(
|
|
190632
|
+
INVALID_STATE_ERR,
|
|
190633
|
+
'The entity reference name "' + n.nodeName + '" is not a valid XML Name'
|
|
190634
|
+
);
|
|
190635
|
+
}
|
|
190199
190636
|
buf.push('&', n.nodeName, ';');
|
|
190200
190637
|
return null;
|
|
190201
190638
|
|
|
@@ -192576,14 +193013,8 @@ function requireSax () {
|
|
|
192576
193013
|
if (hasRequiredSax) return sax;
|
|
192577
193014
|
hasRequiredSax = 1;
|
|
192578
193015
|
var NAMESPACE = requireConventions().NAMESPACE;
|
|
193016
|
+
var tagNamePattern = requireConventions().tagNamePattern;
|
|
192579
193017
|
|
|
192580
|
-
//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
|
192581
|
-
//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
|
|
192582
|
-
//[5] Name ::= NameStartChar (NameChar)*
|
|
192583
|
-
var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;//\u10000-\uEFFFF
|
|
192584
|
-
var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]");
|
|
192585
|
-
var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
|
|
192586
|
-
//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
|
|
192587
193018
|
//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
|
|
192588
193019
|
|
|
192589
193020
|
//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
|
|
@@ -192694,7 +193125,13 @@ function requireSax () {
|
|
|
192694
193125
|
switch(source.charAt(tagStart+1)){
|
|
192695
193126
|
case '/':
|
|
192696
193127
|
var end = source.indexOf('>',tagStart+3);
|
|
192697
|
-
|
|
193128
|
+
// Anchored trailing-whitespace trim. The former `/[ \t\n\r]+$/g` backtracked
|
|
193129
|
+
// quadratically on a name shaped `whitespace-run + non-whitespace char`
|
|
193130
|
+
// (an end tag `</ … x>`): from every start position it extended `[ws]+`
|
|
193131
|
+
// to the end and then failed the `$` anchor. This anchored form matches the
|
|
193132
|
+
// whole string once and captures everything up to the last non-whitespace
|
|
193133
|
+
// character, so it trims in linear time with byte-identical output.
|
|
193134
|
+
var tagName = source.substring(tagStart + 2, end).replace(/^([\s\S]*?[^ \t\n\r])?[ \t\n\r]*$/, '$1');
|
|
192698
193135
|
var config = parseStack.pop();
|
|
192699
193136
|
if(end<0){
|
|
192700
193137
|
|
|
@@ -192705,6 +193142,14 @@ function requireSax () {
|
|
|
192705
193142
|
tagName = tagName.replace(/[\s<].*/,'');
|
|
192706
193143
|
errorHandler.error("end tag name: "+tagName+' maybe not complete');
|
|
192707
193144
|
end = tagStart+1+tagName.length;
|
|
193145
|
+
}else if(/[ \t\n\r]/.test(tagName) && tagNamePattern.test(tagName.split(/[ \t\n\r]/)[0])){
|
|
193146
|
+
// The XML `ETag` production is `'</' Name S? '>'`: only optional whitespace may follow
|
|
193147
|
+
// the `Name`. A valid `Name` followed by whitespace and non-whitespace residue (e.g.
|
|
193148
|
+
// `</a\nbogus>` or `</a bogus>`) is not well-formed, but historically it was silently
|
|
193149
|
+
// accepted (the malformed end tag ignored, the residue dropped, the element left on the
|
|
193150
|
+
// stack). Report it as a recoverable `error` (which a custom errorHandler may escalate to
|
|
193151
|
+
// fatal) while keeping the existing recovery so the parsed DOM stays byte-identical.
|
|
193152
|
+
errorHandler.error('end tag name is followed by whitespace and trailing content: "'+tagName+'"');
|
|
192708
193153
|
}
|
|
192709
193154
|
var localNSMap = config.localNSMap;
|
|
192710
193155
|
var endMatch = config.tagName == tagName;
|
|
@@ -192828,6 +193273,15 @@ function requireSax () {
|
|
|
192828
193273
|
var s = S_TAG;//status
|
|
192829
193274
|
while(true){
|
|
192830
193275
|
var c = source.charAt(p);
|
|
193276
|
+
if (s === S_TAG && c === '<') {
|
|
193277
|
+
// A `<` can never occur inside a tag name. Without this guard the scan runs
|
|
193278
|
+
// on to the next `>` (or EOF) before the tag name is rejected, so a document
|
|
193279
|
+
// with many `<` inside a malformed tag makes each one-character recovery step
|
|
193280
|
+
// re-scan to the distant `>` — O(n^2). Stopping at the `<` keeps each recovery
|
|
193281
|
+
// step bounded. The candidate scanned so far is reported raw, consistent with
|
|
193282
|
+
// the sibling invalid-tag-name throw below.
|
|
193283
|
+
throw new Error('unexpected < in tag name: ' + source.slice(start, p));
|
|
193284
|
+
}
|
|
192831
193285
|
switch(c){
|
|
192832
193286
|
case '=':
|
|
192833
193287
|
if(s === S_ATTR){//attrName
|
|
@@ -193020,9 +193474,13 @@ function requireSax () {
|
|
|
193020
193474
|
if(nsPrefix !== false){//hack!!
|
|
193021
193475
|
if(localNSMap == null){
|
|
193022
193476
|
localNSMap = {};
|
|
193023
|
-
//
|
|
193024
|
-
|
|
193025
|
-
//
|
|
193477
|
+
// Derive the child scope's namespace map by prototype-chain inheritance
|
|
193478
|
+
// instead of a flat copy: lookups inherit ancestor prefixes transparently,
|
|
193479
|
+
// so a document nesting N scopes retains O(N) map entries rather than
|
|
193480
|
+
// sum(1..N) = O(N^2). localNSMap stays a flat own-only record of the
|
|
193481
|
+
// prefixes declared at THIS element, so own-property enumeration
|
|
193482
|
+
// (endPrefixMapping below) still reports only local declarations.
|
|
193483
|
+
currentNSMap = Object.create(currentNSMap);
|
|
193026
193484
|
}
|
|
193027
193485
|
currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
|
|
193028
193486
|
a.uri = NAMESPACE.XMLNS;
|
|
@@ -200061,7 +200519,7 @@ function requireMomentTimezone () {
|
|
|
200061
200519
|
hasRequiredMomentTimezone = 1;
|
|
200062
200520
|
(function (module) {
|
|
200063
200521
|
//! moment-timezone.js
|
|
200064
|
-
//! version : 0.6.
|
|
200522
|
+
//! version : 0.6.5
|
|
200065
200523
|
//! Copyright (c) JS Foundation and other contributors
|
|
200066
200524
|
//! license : MIT
|
|
200067
200525
|
//! github.com/moment/moment-timezone
|
|
@@ -200087,12 +200545,18 @@ function requireMomentTimezone () {
|
|
|
200087
200545
|
// return moment;
|
|
200088
200546
|
// }
|
|
200089
200547
|
|
|
200090
|
-
var VERSION = "0.6.
|
|
200548
|
+
var VERSION = "0.6.5",
|
|
200091
200549
|
zones = {},
|
|
200092
200550
|
links = {},
|
|
200093
200551
|
countries = {},
|
|
200094
200552
|
names = {},
|
|
200095
200553
|
guesses = {},
|
|
200554
|
+
parsingInZone = false,
|
|
200555
|
+
parsingNow,
|
|
200556
|
+
parsingNowFunction,
|
|
200557
|
+
hasParsingNow = false,
|
|
200558
|
+
ignoreDefaultZoneForInput,
|
|
200559
|
+
hasIgnoredDefaultZoneInput = false,
|
|
200096
200560
|
cachedGuess;
|
|
200097
200561
|
|
|
200098
200562
|
if (!moment || typeof moment.version !== 'string') {
|
|
@@ -200264,17 +200728,16 @@ function requireMomentTimezone () {
|
|
|
200264
200728
|
offsets = this.offsets,
|
|
200265
200729
|
untils = this.untils,
|
|
200266
200730
|
max = untils.length - 1,
|
|
200267
|
-
offset, offsetNext,
|
|
200731
|
+
offset, offsetNext, i;
|
|
200268
200732
|
|
|
200269
200733
|
for (i = 0; i < max; i++) {
|
|
200270
200734
|
offset = offsets[i];
|
|
200271
200735
|
offsetNext = offsets[i + 1];
|
|
200272
|
-
offsetPrev = offsets[i ? i - 1 : i];
|
|
200273
200736
|
|
|
200274
200737
|
if (offset < offsetNext && tz.moveAmbiguousForward) {
|
|
200275
200738
|
offset = offsetNext;
|
|
200276
|
-
} else if (offset >
|
|
200277
|
-
offset =
|
|
200739
|
+
} else if (offset > offsetNext && tz.moveInvalidForward) {
|
|
200740
|
+
offset = offsetNext;
|
|
200278
200741
|
}
|
|
200279
200742
|
|
|
200280
200743
|
if (target < untils[i] - (offset * 60000)) {
|
|
@@ -200299,6 +200762,15 @@ function requireMomentTimezone () {
|
|
|
200299
200762
|
}
|
|
200300
200763
|
};
|
|
200301
200764
|
|
|
200765
|
+
var utcDefaultZone = new Zone();
|
|
200766
|
+
utcDefaultZone._set({
|
|
200767
|
+
name : 'UTC',
|
|
200768
|
+
abbrs : ['UTC'],
|
|
200769
|
+
untils : [Infinity],
|
|
200770
|
+
offsets : [0],
|
|
200771
|
+
population : 0
|
|
200772
|
+
});
|
|
200773
|
+
|
|
200302
200774
|
/************************************
|
|
200303
200775
|
Country object
|
|
200304
200776
|
************************************/
|
|
@@ -200636,6 +201108,85 @@ function requireMomentTimezone () {
|
|
|
200636
201108
|
return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);
|
|
200637
201109
|
}
|
|
200638
201110
|
|
|
201111
|
+
function isObjectInput (input) {
|
|
201112
|
+
var prop;
|
|
201113
|
+
|
|
201114
|
+
if (moment.isMoment(input) || input === null || Object.prototype.toString.call(input) !== '[object Object]') {
|
|
201115
|
+
return false;
|
|
201116
|
+
}
|
|
201117
|
+
if (Object.getOwnPropertyNames) {
|
|
201118
|
+
return Object.getOwnPropertyNames(input).length > 0;
|
|
201119
|
+
}
|
|
201120
|
+
for (prop in input) {
|
|
201121
|
+
if (Object.prototype.hasOwnProperty.call(input, prop)) {
|
|
201122
|
+
return true;
|
|
201123
|
+
}
|
|
201124
|
+
}
|
|
201125
|
+
return false;
|
|
201126
|
+
}
|
|
201127
|
+
|
|
201128
|
+
function parseWithZoneNow (args, name, stringInput) {
|
|
201129
|
+
var savedNow = moment.now,
|
|
201130
|
+
savedDefaultZone = moment.defaultZone,
|
|
201131
|
+
savedParsingInZone = parsingInZone,
|
|
201132
|
+
savedParsingNow = parsingNow,
|
|
201133
|
+
savedParsingNowFunction = parsingNowFunction,
|
|
201134
|
+
savedHasParsingNow = hasParsingNow,
|
|
201135
|
+
now,
|
|
201136
|
+
hasNow = false,
|
|
201137
|
+
zonedNow,
|
|
201138
|
+
wallNow,
|
|
201139
|
+
parsedDateParts,
|
|
201140
|
+
out;
|
|
201141
|
+
|
|
201142
|
+
if (!parsingInZone) {
|
|
201143
|
+
parsingNow = undefined;
|
|
201144
|
+
parsingNowFunction = savedNow;
|
|
201145
|
+
hasParsingNow = false;
|
|
201146
|
+
}
|
|
201147
|
+
parsingInZone = true;
|
|
201148
|
+
moment.now = function () {
|
|
201149
|
+
if (!hasNow) {
|
|
201150
|
+
if (!hasParsingNow) {
|
|
201151
|
+
parsingNow = parsingNowFunction.call(moment);
|
|
201152
|
+
hasParsingNow = true;
|
|
201153
|
+
}
|
|
201154
|
+
now = parsingNow;
|
|
201155
|
+
hasNow = true;
|
|
201156
|
+
zonedNow = moment.tz(now, name);
|
|
201157
|
+
wallNow = zonedNow.valueOf() + zonedNow.utcOffset() * 60000;
|
|
201158
|
+
}
|
|
201159
|
+
return wallNow;
|
|
201160
|
+
};
|
|
201161
|
+
if (stringInput) {
|
|
201162
|
+
moment.defaultZone = utcDefaultZone;
|
|
201163
|
+
}
|
|
201164
|
+
try {
|
|
201165
|
+
out = moment.utc.apply(null, args);
|
|
201166
|
+
if (stringInput && hasNow && out._a && out._tzm !== undefined) {
|
|
201167
|
+
parsedDateParts = out.parsingFlags().parsedDateParts;
|
|
201168
|
+
if (!parsedDateParts || parsedDateParts[0] == null || parsedDateParts[1] == null || parsedDateParts[2] == null) {
|
|
201169
|
+
moment.now = function () {
|
|
201170
|
+
return now;
|
|
201171
|
+
};
|
|
201172
|
+
moment.defaultZone = savedDefaultZone;
|
|
201173
|
+
out = moment.utc.apply(null, args);
|
|
201174
|
+
}
|
|
201175
|
+
}
|
|
201176
|
+
} finally {
|
|
201177
|
+
moment.now = savedNow;
|
|
201178
|
+
moment.defaultZone = savedDefaultZone;
|
|
201179
|
+
parsingInZone = savedParsingInZone;
|
|
201180
|
+
if (!savedParsingInZone) {
|
|
201181
|
+
parsingNow = savedParsingNow;
|
|
201182
|
+
parsingNowFunction = savedParsingNowFunction;
|
|
201183
|
+
hasParsingNow = savedHasParsingNow;
|
|
201184
|
+
}
|
|
201185
|
+
}
|
|
201186
|
+
|
|
201187
|
+
return out;
|
|
201188
|
+
}
|
|
201189
|
+
|
|
200639
201190
|
function logError (message) {
|
|
200640
201191
|
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
|
200641
201192
|
console.error(message);
|
|
@@ -200649,10 +201200,13 @@ function requireMomentTimezone () {
|
|
|
200649
201200
|
function tz (input) {
|
|
200650
201201
|
var args = Array.prototype.slice.call(arguments, 0, -1),
|
|
200651
201202
|
name = arguments[arguments.length - 1],
|
|
200652
|
-
|
|
200653
|
-
|
|
201203
|
+
objectInput = isObjectInput(input),
|
|
201204
|
+
stringInput = args.length > 0 && typeof input === 'string',
|
|
201205
|
+
zone = objectInput || stringInput ? getZone(name) : null,
|
|
201206
|
+
out = objectInput && zone ? parseWithZoneNow(args, name) :
|
|
201207
|
+
stringInput && zone ? parseWithZoneNow(args, name, true) : moment.utc.apply(null, args);
|
|
200654
201208
|
|
|
200655
|
-
if (!moment.isMoment(input) && needsOffset(out) && (zone = getZone(name))) {
|
|
201209
|
+
if (!moment.isMoment(input) && needsOffset(out) && (zone || (!objectInput && (zone = getZone(name))))) {
|
|
200656
201210
|
out.add(zone.parse(out), 'minutes');
|
|
200657
201211
|
}
|
|
200658
201212
|
|
|
@@ -200692,10 +201246,49 @@ function requireMomentTimezone () {
|
|
|
200692
201246
|
moment.tz = tz;
|
|
200693
201247
|
|
|
200694
201248
|
moment.defaultZone = null;
|
|
201249
|
+
var momentGetDefaultDateParts = moment._getDefaultDateParts;
|
|
201250
|
+
if (momentGetDefaultDateParts) {
|
|
201251
|
+
moment._getDefaultDateParts = function (config, now, forWeek) {
|
|
201252
|
+
var zone = moment.defaultZone,
|
|
201253
|
+
zonedNow,
|
|
201254
|
+
dateParts,
|
|
201255
|
+
savedIgnoredInput,
|
|
201256
|
+
savedHasIgnoredInput;
|
|
201257
|
+
forWeek = forWeek || config._isDefaultDatePartsForWeek;
|
|
201258
|
+
|
|
201259
|
+
if (parsingInZone && config._tzm === undefined) {
|
|
201260
|
+
zonedNow = new Date(now);
|
|
201261
|
+
return [zonedNow.getUTCFullYear(), zonedNow.getUTCMonth(), zonedNow.getUTCDate()];
|
|
201262
|
+
}
|
|
201263
|
+
|
|
201264
|
+
if (zone && !config._useUTC && config._tzm === undefined) {
|
|
201265
|
+
zonedNow = new Date(now - zone.utcOffset(now) * 60000);
|
|
201266
|
+
return [zonedNow.getUTCFullYear(), zonedNow.getUTCMonth(), zonedNow.getUTCDate()];
|
|
201267
|
+
}
|
|
201268
|
+
|
|
201269
|
+
if (forWeek && (config._useUTC || config._tzm !== undefined)) {
|
|
201270
|
+
savedIgnoredInput = ignoreDefaultZoneForInput;
|
|
201271
|
+
savedHasIgnoredInput = hasIgnoredDefaultZoneInput;
|
|
201272
|
+
ignoreDefaultZoneForInput = now;
|
|
201273
|
+
hasIgnoredDefaultZoneInput = true;
|
|
201274
|
+
try {
|
|
201275
|
+
dateParts = momentGetDefaultDateParts.call(this, config, now, forWeek);
|
|
201276
|
+
} finally {
|
|
201277
|
+
ignoreDefaultZoneForInput = savedIgnoredInput;
|
|
201278
|
+
hasIgnoredDefaultZoneInput = savedHasIgnoredInput;
|
|
201279
|
+
}
|
|
201280
|
+
return dateParts;
|
|
201281
|
+
}
|
|
201282
|
+
|
|
201283
|
+
return momentGetDefaultDateParts.call(this, config, now, forWeek);
|
|
201284
|
+
};
|
|
201285
|
+
}
|
|
200695
201286
|
|
|
200696
201287
|
moment.updateOffset = function (mom, keepTime) {
|
|
200697
|
-
var zone = moment.defaultZone,
|
|
200698
|
-
offset
|
|
201288
|
+
var zone = hasIgnoredDefaultZoneInput && ignoreDefaultZoneForInput === mom._i ? null : moment.defaultZone,
|
|
201289
|
+
offset,
|
|
201290
|
+
localTimestamp,
|
|
201291
|
+
normalizedTimestamp;
|
|
200699
201292
|
|
|
200700
201293
|
if (mom._z === undefined) {
|
|
200701
201294
|
if (zone && needsOffset(mom) && !mom._isUTC && mom.isValid()) {
|
|
@@ -200706,6 +201299,20 @@ function requireMomentTimezone () {
|
|
|
200706
201299
|
}
|
|
200707
201300
|
if (mom._z) {
|
|
200708
201301
|
offset = mom._z.utcOffset(mom);
|
|
201302
|
+
if (keepTime) {
|
|
201303
|
+
// Resolve local times inside a forward gap using the configured
|
|
201304
|
+
// invalid-input policy before applying the new offset.
|
|
201305
|
+
localTimestamp = mom._d.valueOf();
|
|
201306
|
+
if (!mom._isUTC) {
|
|
201307
|
+
localTimestamp -= mom._d.getTimezoneOffset() * 60000;
|
|
201308
|
+
}
|
|
201309
|
+
if (mom._z.utcOffset(localTimestamp + offset * 60000) !== offset) {
|
|
201310
|
+
offset = mom._z.parse(localTimestamp);
|
|
201311
|
+
localTimestamp += offset * 60000;
|
|
201312
|
+
offset = mom._z.utcOffset(localTimestamp);
|
|
201313
|
+
normalizedTimestamp = localTimestamp - offset * 60000;
|
|
201314
|
+
}
|
|
201315
|
+
}
|
|
200709
201316
|
if (Math.abs(offset) < 16) {
|
|
200710
201317
|
offset = offset / 60;
|
|
200711
201318
|
}
|
|
@@ -200716,6 +201323,9 @@ function requireMomentTimezone () {
|
|
|
200716
201323
|
} else {
|
|
200717
201324
|
mom.zone(offset, keepTime);
|
|
200718
201325
|
}
|
|
201326
|
+
if (normalizedTimestamp != null) {
|
|
201327
|
+
mom._d.setTime(normalizedTimestamp);
|
|
201328
|
+
}
|
|
200719
201329
|
}
|
|
200720
201330
|
};
|
|
200721
201331
|
|
|
@@ -205555,14 +206165,10 @@ const triggerItemAction = (scope, item) => {
|
|
|
205555
206165
|
const getDatasourceFromExpr = (expr, scope) => {
|
|
205556
206166
|
const isBoundToVariable = startsWith(expr, 'Variables.');
|
|
205557
206167
|
const isBoundToWidget = startsWith(expr, 'Widgets.');
|
|
205558
|
-
const isBoundToActivePageVar = startsWith(expr, 'App.activePage.Variables.');
|
|
205559
206168
|
const parts = expr.split('.');
|
|
205560
206169
|
if (isBoundToVariable) {
|
|
205561
206170
|
return get(scope.viewParent.Variables, parts[1]);
|
|
205562
206171
|
}
|
|
205563
|
-
if (isBoundToActivePageVar) {
|
|
205564
|
-
return get(scope.viewParent?.App?.activePage?.Variables, parts[3]);
|
|
205565
|
-
}
|
|
205566
206172
|
if (isBoundToWidget) {
|
|
205567
206173
|
const widgetScope = get(scope.viewParent.Widgets, parts[1]);
|
|
205568
206174
|
const widgetDatasetBoundExpr = widgetScope.$attrs.get('datasetboundexpr');
|