@itwin/rpcinterface-full-stack-tests 5.13.0-dev.18 → 5.13.0-dev.20

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.
@@ -38207,31 +38207,6 @@ exports.createInvalidObservableTypeError = createInvalidObservableTypeError;
38207
38207
  }));
38208
38208
 
38209
38209
 
38210
- /***/ },
38211
-
38212
- /***/ "../../common/temp/node_modules/.pnpm/wms-capabilities@0.4.0/node_modules/wms-capabilities/dist/wms-capabilities.min.js"
38213
- /*!******************************************************************************************************************************!*\
38214
- !*** ../../common/temp/node_modules/.pnpm/wms-capabilities@0.4.0/node_modules/wms-capabilities/dist/wms-capabilities.min.js ***!
38215
- \******************************************************************************************************************************/
38216
- (module) {
38217
-
38218
- "use strict";
38219
- (function(f,m){ true?module.exports=m():0})(this,function(){function f(a){return void 0!==a}function m(a,c,b){if(a.nodeType===u.CDATA_SECTION||a.nodeType===u.TEXT)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else for(a=a.firstChild;a;a=a.nextSibling)m(a,c,b);return b}function F(a){for(a=a.nextElementSibling||a.nextSibling;a&&
38220
- a.nodeType!==u.ELEMENT;)a=a.nextSibling;return a}function h(a,c,b){b=f(b)?b:{};var d;var n=0;for(d=a.length;n<d;++n)b[a[n]]=c;return b}function A(a,c){return function(b,d){b=a.call(f(c)?c:this,b,d);f(b)&&d[d.length-1].push(b)}}function l(a,c,b,d,e){d.push(a);for(a=b.firstElementChild||b.firstChild;a&&a.nodeType!==u.ELEMENT;)a=a.nextSibling;for(;a;a=F(a))b=c[a.namespaceURI||null],f(b)&&(b=b[a.localName],f(b)&&b.call(e,a,d));return d.pop()}function b(a,c,b){return function(d,e){var n=a.call(f(b)?b:
38221
- this,d,e);f(n)&&(e=e[e.length-1],d=f(c)?c:d.localName,e[d]=n)}}function k(a,c,b){return function(d,e){var n=a.call(f(b)?b:this,d,e);if(f(n)){e=e[e.length-1];d=f(c)?c:d.localName;var g=[];(d in e?e[d]:e[d]=g).push(n)}}}function r(a){if(a=/^\s*(true|1)|(false|0)\s*$/.exec(a))return f(a[1])||!1}function t(a){return p(m(a,!1,[]).join(""))}function p(a){if(a=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(a))return parseFloat(a[1])}function w(a){return v(m(a,!1,[]).join(""))}function v(a){if(a=/^\s*(\d+)\s*$/.exec(a))return parseInt(a[1],
38222
- 10)}function e(a){return m(a,!1,[]).join("").replace(G,"")}function x(a){return a.getAttributeNS("http://www.w3.org/1999/xlink","href")}function B(a){return[p(a.getAttribute("minx")),p(a.getAttribute("miny")),p(a.getAttribute("maxx")),p(a.getAttribute("maxy"))]}function q(a,c){return l({},H,a,c)}function y(a,c){return l({},I,a,c)}function C(a,c){c=q(a,c);if(f(c))return a=[v(a.getAttribute("width")),v(a.getAttribute("height"))],c.size=a,c}function D(a,c){return l([],J,a,c)}var u={ELEMENT:1,ATTRIBUTE:2,
38223
- TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12},z=function(a){this._parser=new a};z.prototype.toDocument=function(a){return this._parser.parseFromString(a,"application/xml")};z.prototype.getAllTextContent=function(a,c){return m(a,c,[]).join("").join("")};var G=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,g=[null,"http://www.opengis.net/wms"],M=h(g,{Service:b(function(a,c){return l({},K,a,c)}),Capability:b(function(a,
38224
- c){return l({},L,a,c)})}),L=h(g,{Request:b(function(a,c){return l({},N,a,c)}),Exception:b(function(a,c){return l([],O,a,c)}),Layer:b(function(a,c){var b=r(a.getAttribute("queryable"));return l({queryable:f(b)?b:!1},E,a,c)})}),K=h(g,{Name:b(e),Title:b(e),Abstract:b(e),KeywordList:b(D),OnlineResource:b(x),ContactInformation:b(function(a,c){return l({},P,a,c)}),Fees:b(e),AccessConstraints:b(e),LayerLimit:b(w),MaxWidth:b(w),MaxHeight:b(w)}),P=h(g,{ContactPersonPrimary:b(function(a,c){return l({},Q,a,
38225
- c)}),ContactPosition:b(e),ContactAddress:b(function(a,c){return l({},R,a,c)}),ContactVoiceTelephone:b(e),ContactFacsimileTelephone:b(e),ContactElectronicMailAddress:b(e)}),Q=h(g,{ContactPerson:b(e),ContactOrganization:b(e)}),R=h(g,{AddressType:b(e),Address:b(e),City:b(e),StateOrProvince:b(e),PostCode:b(e),Country:b(e)}),O=h(g,{Format:A(e)}),E=h(g,{Name:b(e),Title:b(e),Abstract:b(e),KeywordList:b(D),CRS:k(e),SRS:k(e),EX_GeographicBoundingBox:b(function(a,c){var b=l({},S,a,c);if(f(b)){a=b.westBoundLongitude;
38226
- c=b.southBoundLatitude;var d=b.eastBoundLongitude;b=b.northBoundLatitude;if(f(a)&&f(c)&&f(d)&&f(b))return[a,c,d,b]}}),LatLonBoundingBox:b(function(a,b){a=B(a);if(f(a[0])&&f(a[1])&&f(a[2])&&f(a[3]))return a}),BoundingBox:k(function(a,b){b=B(a);var c=[p(a.getAttribute("resx")),p(a.getAttribute("resy"))];return{crs:a.getAttribute("CRS")||a.getAttribute("SRS"),extent:b,res:c}}),Dimension:k(function(a,b){return{name:a.getAttribute("name"),units:a.getAttribute("units"),unitSymbol:a.getAttribute("unitSymbol"),
38227
- "default":a.getAttribute("default"),multipleValues:r(a.getAttribute("multipleValues")),nearestValue:r(a.getAttribute("nearestValue")),current:r(a.getAttribute("current")),values:e(a)}}),Attribution:b(function(a,b){return l({},T,a,b)}),AuthorityURL:k(function(a,b){b=q(a,b);if(f(b))return b.name=a.getAttribute("name"),b}),Identifier:k(e),MetadataURL:k(function(a,b){b=q(a,b);if(f(b))return b.type=a.getAttribute("type"),b}),DataURL:k(q),FeatureListURL:k(q),Style:k(function(a,b){return l({},U,a,b)}),MinScaleDenominator:b(t),
38228
- MaxScaleDenominator:b(t),ScaleHint:b(function(a,b){b=parseFloat(a.getAttribute("min"));a=parseFloat(a.getAttribute("max"));return{min:b,max:a}}),Layer:k(function(a,b){var c=b[b.length-1];b=l({},E,a,b);if(f(b)){var d=r(a.getAttribute("queryable"));f(d)||(d=c.queryable);b.queryable=f(d)?d:!1;d=v(a.getAttribute("cascaded"));f(d)||(d=c.cascaded);b.cascaded=d;d=r(a.getAttribute("opaque"));f(d)||(d=c.opaque);b.opaque=f(d)?d:!1;d=r(a.getAttribute("noSubsets"));f(d)||(d=c.noSubsets);b.noSubsets=f(d)?d:!1;
38229
- d=p(a.getAttribute("fixedWidth"));f(d)||(d=c.fixedWidth);b.fixedWidth=d;a=p(a.getAttribute("fixedHeight"));f(a)||(a=c.fixedHeight);b.fixedHeight=a;a=["Style","CRS","AuthorityURL"];d=0;for(var e=a.length;d<e;d++){var g=a[d],h=c[g];if(f(h)){var k=[];k=g in b?b[g]:b[g]=k;k=k.concat(h);b[g]=k}}a="EX_GeographicBoundingBox BoundingBox Dimension Attribution MinScaleDenominator MaxScaleDenominator".split(" ");d=0;for(e=a.length;d<e;d++)g=a[d],f(b[g])||(b[g]=c[g]);return b}})}),T=h(g,{Title:b(e),OnlineResource:b(x),
38230
- LogoURL:b(C)}),S=h(g,{westBoundLongitude:b(t),eastBoundLongitude:b(t),southBoundLatitude:b(t),northBoundLatitude:b(t)}),N=h(g,{GetCapabilities:b(y),GetMap:b(y),GetFeatureInfo:b(y)}),I=h(g,{Format:k(e),DCPType:k(function(a,b){return l({},V,a,b)})}),V=h(g,{HTTP:b(function(a,b){return l({},W,a,b)})}),W=h(g,{Get:b(q),Post:b(q)}),U=h(g,{Name:b(e),Title:b(e),Abstract:b(e),LegendURL:k(C),StyleSheetURL:b(q),StyleURL:b(q)}),H=h(g,{Format:b(e),OnlineResource:b(x)}),J=h(g,{Keyword:A(e)});g=function(a,b){b||
38231
- "undefined"===typeof window||(b=window.DOMParser);this.version=void 0;this._parser=new z(b);this._data=a};g.prototype.data=function(a){this._data=a;return this};g.prototype.toJSON=function(a){a=a||this._data;return this.parse(a)};g.prototype.parse=function(a){return this._readFromDocument(this._parser.toDocument(a))};g.prototype._readFromDocument=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==u.ELEMENT)return this.readFromNode(a);return null};g.prototype.readFromNode=function(a){this.version=
38232
- a.getAttribute("version");return l({version:this.version},M,a,[])||null};return g});
38233
-
38234
-
38235
38210
  /***/ },
38236
38211
 
38237
38212
  /***/ "../../core/bentley/lib/esm/AccessToken.js"
@@ -46296,6 +46271,12 @@ var BriefcaseIdValue;
46296
46271
  BriefcaseIdValue[BriefcaseIdValue["FirstValid"] = 2] = "FirstValid";
46297
46272
  /** All valid iModelHub issued BriefcaseIds will be equal or lower than this */
46298
46273
  BriefcaseIdValue[BriefcaseIdValue["LastValid"] = 16777205] = "LastValid";
46274
+ /**
46275
+ * Briefcase Id reserved for `Element` Ids allocated by SchemaSync reservations.
46276
+ * Never assigned to a real briefcase by iModelHub.
46277
+ * @internal
46278
+ */
46279
+ BriefcaseIdValue[BriefcaseIdValue["SchemaSyncElementReserved"] = 16777206] = "SchemaSyncElementReserved";
46299
46280
  /**
46300
46281
  * The briefcase has not been assigned a unique Id by iModelHub. Only briefcases that have been assigned a unique BriefcaseId may create changesets,
46301
46282
  * because BriefcaseId is used to create unique ElementIds for new elements.
@@ -46908,7 +46889,7 @@ class Code {
46908
46889
  equals(other) { return Code.equalCodes(this, other); }
46909
46890
  /** @internal */
46910
46891
  static equalCodes(c1, c2) {
46911
- return c1.spec === c2.spec && c1.scope === c2.scope && c1.value === c2.value;
46892
+ return c1.spec === c2.spec && c1.scope === c2.scope && (c1.value ?? "").toLowerCase() === (c2.value ?? "").toLowerCase();
46912
46893
  }
46913
46894
  /** Determine whether this Code is valid. */
46914
46895
  static isValid(c) { return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isValidId64(c.spec); }
@@ -55416,6 +55397,7 @@ __webpack_require__.r(__webpack_exports__);
55416
55397
  /* harmony export */ CloudSqliteError: () => (/* binding */ CloudSqliteError),
55417
55398
  /* harmony export */ EditTxnError: () => (/* binding */ EditTxnError),
55418
55399
  /* harmony export */ ElementError: () => (/* binding */ ElementError),
55400
+ /* harmony export */ ElementReservationError: () => (/* binding */ ElementReservationError),
55419
55401
  /* harmony export */ ITwinSettingsError: () => (/* binding */ ITwinSettingsError),
55420
55402
  /* harmony export */ ServerBasedLocksError: () => (/* binding */ ServerBasedLocksError),
55421
55403
  /* harmony export */ SqliteError: () => (/* binding */ SqliteError),
@@ -55577,6 +55559,22 @@ var ElementError;
55577
55559
  }
55578
55560
  ElementError.isError = isError;
55579
55561
  })(ElementError || (ElementError = {}));
55562
+ /** @beta */
55563
+ var ElementReservationError;
55564
+ (function (ElementReservationError) {
55565
+ /** the ITwinError scope for `ElementReservationError`s. */
55566
+ ElementReservationError.scope = "itwin-ElementReservation";
55567
+ /** Instantiate and throw an ElementReservationError */
55568
+ function throwError(key, e) {
55569
+ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ITwinError.throwError({ ...e, iTwinErrorId: { scope: ElementReservationError.scope, key } });
55570
+ }
55571
+ ElementReservationError.throwError = throwError;
55572
+ /** Determine whether an error object is an ElementReservationError */
55573
+ function isError(error, key) {
55574
+ return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ITwinError.isError(error, ElementReservationError.scope, key);
55575
+ }
55576
+ ElementReservationError.isError = isError;
55577
+ })(ElementReservationError || (ElementReservationError = {}));
55580
55578
 
55581
55579
 
55582
55580
  /***/ },
@@ -65299,6 +65297,7 @@ __webpack_require__.r(__webpack_exports__);
65299
65297
  /* harmony export */ ElementGeometry: () => (/* reexport safe */ _geometry_ElementGeometry__WEBPACK_IMPORTED_MODULE_49__.ElementGeometry),
65300
65298
  /* harmony export */ ElementGeometryChange: () => (/* reexport safe */ _ModelGeometryChanges__WEBPACK_IMPORTED_MODULE_96__.ElementGeometryChange),
65301
65299
  /* harmony export */ ElementGeometryOpcode: () => (/* reexport safe */ _geometry_ElementGeometry__WEBPACK_IMPORTED_MODULE_49__.ElementGeometryOpcode),
65300
+ /* harmony export */ ElementReservationError: () => (/* reexport safe */ _ITwinCoreErrors__WEBPACK_IMPORTED_MODULE_73__.ElementReservationError),
65302
65301
  /* harmony export */ EmptyLocalization: () => (/* reexport safe */ _Localization__WEBPACK_IMPORTED_MODULE_83__.EmptyLocalization),
65303
65302
  /* harmony export */ EntityMetaData: () => (/* reexport safe */ _EntityProps__WEBPACK_IMPORTED_MODULE_34__.EntityMetaData),
65304
65303
  /* harmony export */ EntityReferenceSet: () => (/* reexport safe */ _EntityReference__WEBPACK_IMPORTED_MODULE_35__.EntityReferenceSet),
@@ -105458,10 +105457,19 @@ class BriefcaseTxns extends BriefcaseNotificationHandler {
105458
105457
  return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ipcAppChannels.txns;
105459
105458
  }
105460
105459
  /** Event raised after Txn validation or changeset application to indicate the set of changed elements.
105460
+ * Each [[TxnEntityChange]] exposes its class through `metadata.classFullName`. Use [[TxnEntityChanges.filter]] with `metadata.is` to match a class or one of its subclasses.
105461
+ * @example
105462
+ * ```ts
105463
+ * iModel.txns.onElementsChanged.addListener((changes) => {
105464
+ * for (const change of changes.filter({ includeMetadata: (metadata) => metadata.is("BisCore:GeometricElement") }))
105465
+ * updateElement(change.id);
105466
+ * });
105467
+ * ```
105461
105468
  * @note If there are many changed elements in a single Txn, the notifications are sent in batches so this event *may be called multiple times* per Txn.
105462
105469
  */
105463
105470
  onElementsChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
105464
105471
  /** Event raised after Txn validation or changeset application to indicate the set of changed models.
105472
+ * Each [[TxnEntityChange]] exposes its class through `metadata.classFullName`. Use [[TxnEntityChanges.filter]] with `metadata.is` to match a class or one of its subclasses.
105465
105473
  * @note If there are many changed models in a single Txn, the notifications are sent in batches so this event *may be called multiple times* per Txn.
105466
105474
  */
105467
105475
  onModelsChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
@@ -108481,11 +108489,11 @@ class EmphasizeElements {
108481
108489
  * @see [[Viewport.addFeatureOverrideProvider]]
108482
108490
  */
108483
108491
  addFeatureOverrides(overrides, vp) {
108492
+ // Apply regardless of whether there are any emphasized/overridden elements for independent de-emphasis...
108493
+ if (undefined !== this._defaultAppearance)
108494
+ overrides.setDefaultOverrides(this._defaultAppearance);
108484
108495
  const emphasizedElements = this.getEmphasizedElements(vp);
108485
108496
  if (undefined !== emphasizedElements) {
108486
- if (this._defaultAppearance !== undefined) {
108487
- overrides.setDefaultOverrides(this._defaultAppearance);
108488
- }
108489
108497
  const appearance = this.wantEmphasis ? this._emphasizedAppearance : _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FeatureAppearance.defaults;
108490
108498
  // Avoid creating a new object per-element inside the loop
108491
108499
  const args = { elementId: "", appearance };
@@ -108501,8 +108509,6 @@ class EmphasizeElements {
108501
108509
  }
108502
108510
  const overriddenElements = this.getOverriddenElements();
108503
108511
  if (undefined !== overriddenElements) {
108504
- if (undefined !== this._defaultAppearance)
108505
- overrides.setDefaultOverrides(this._defaultAppearance);
108506
108512
  // Avoid creating a new object per-element inside the loop
108507
108513
  const args = { elementId: "", appearance: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FeatureAppearance.defaults };
108508
108514
  for (const [key, ids] of overriddenElements) {
@@ -108569,7 +108575,10 @@ class EmphasizeElements {
108569
108575
  return { overrideType, color };
108570
108576
  }
108571
108577
  /** Establish a default appearance to apply to elements without overrides. If changing the default appearance
108572
- * without also calling overrideElements, an explicit refresh must be requested for the change to take effect.
108578
+ * without also calling emphasizeElements/overrideElements, an explicit refresh must be requested for the change to take effect.
108579
+ * @note Setting this to `undefined` to undo [[emphasizeElements]] or [[isolateElements]] leaves the always-drawn/isolated
108580
+ * element IDs in place but invisible to [[getEmphasizedElements]], [[getEmphasizedIsolatedElements]], and [[clearEmphasizedElements]].
108581
+ * Prefer [[clearEmphasizedElements]] or [[clearEmphasizedIsolatedElements]] to undo emphasis, which clear both together.
108573
108582
  * @see [[Viewport.setFeatureOverrideProviderChanged]]
108574
108583
  */
108575
108584
  get defaultAppearance() { return this._defaultAppearance; }
@@ -108928,7 +108937,9 @@ class EmphasizeElements {
108928
108937
  return true;
108929
108938
  }
108930
108939
  /** @return true if provider is currently overriding the display of any elements. */
108931
- isActive(vp) { return (undefined !== this.getNeverDrawnElements(vp) || undefined !== this.getAlwaysDrawnElements(vp) || undefined !== this.getOverriddenElements()); }
108940
+ isActive(vp) {
108941
+ return undefined !== this._defaultAppearance || undefined !== this.getNeverDrawnElements(vp) || undefined !== this.getAlwaysDrawnElements(vp) || undefined !== this.getOverriddenElements();
108942
+ }
108932
108943
  /** Serialize to JSON representation.
108933
108944
  * @see [[EmphasizeElements.fromJSON]]
108934
108945
  */
@@ -108974,8 +108985,12 @@ class EmphasizeElements {
108974
108985
  changed = true;
108975
108986
  if (undefined !== props.alwaysDrawnExclusiveEmphasized)
108976
108987
  this._emphasizeIsolated = new Set(props.alwaysDrawnExclusiveEmphasized); // changed status determined by setAlwaysDrawnElements...
108977
- if (undefined !== props.defaultAppearance)
108978
- this.defaultAppearance = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FeatureAppearance.fromJSON(props.defaultAppearance); // changed status determined by setAlwaysDrawnElements or overrideElements...
108988
+ if (undefined !== props.defaultAppearance) {
108989
+ const defaultAppearance = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FeatureAppearance.fromJSON(props.defaultAppearance);
108990
+ if (undefined === this._defaultAppearance || !this._defaultAppearance.equals(defaultAppearance))
108991
+ changed = true;
108992
+ this.defaultAppearance = defaultAppearance;
108993
+ }
108979
108994
  if (props.unanimatedAppearance)
108980
108995
  this.unanimatedAppearance = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FeatureAppearance.fromJSON(props.unanimatedAppearance);
108981
108996
  if (undefined !== props.appearanceOverride) {
@@ -179364,8 +179379,7 @@ __webpack_require__.r(__webpack_exports__);
179364
179379
  /* harmony export */ WmsCapabilities: () => (/* binding */ WmsCapabilities),
179365
179380
  /* harmony export */ WmsCapability: () => (/* binding */ WmsCapability)
179366
179381
  /* harmony export */ });
179367
- /* harmony import */ var wms_capabilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! wms-capabilities */ "../../common/temp/node_modules/.pnpm/wms-capabilities@0.4.0/node_modules/wms-capabilities/dist/wms-capabilities.min.js");
179368
- /* harmony import */ var wms_capabilities__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(wms_capabilities__WEBPACK_IMPORTED_MODULE_0__);
179382
+ /* harmony import */ var wms_capabilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! wms-capabilities */ "../../common/temp/node_modules/.pnpm/wms-capabilities@0.6.0/node_modules/wms-capabilities/dist/wms-capabilities.mjs");
179369
179383
  /* harmony import */ var _tile_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../tile/internal */ "../../core/frontend/lib/esm/tile/internal.js");
179370
179384
  /*---------------------------------------------------------------------------------------------
179371
179385
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -179517,7 +179531,7 @@ var WmsCapability;
179517
179531
  this.title = _json.Title;
179518
179532
  this.queryable = _json.queryable ? true : false;
179519
179533
  this.cartoRange = rangeFromJSON(_json);
179520
- this.ownCrs = capabilities.isVersion13 ? _json.CRS : _json.SRS;
179534
+ this.ownCrs = initArray(capabilities.isVersion13 ? _json.CRS : _json.SRS) ?? [];
179521
179535
  const crs = new Set(this.ownCrs);
179522
179536
  if (parent) {
179523
179537
  getParentCrs(parent, crs);
@@ -179547,12 +179561,32 @@ class WmsCapabilities {
179547
179561
  get featureInfoFormats() { return Array.isArray(this._json.Capability?.Request?.GetFeatureInfo?.Format) ? this._json.Capability?.Request?.GetFeatureInfo?.Format : undefined; }
179548
179562
  constructor(_json) {
179549
179563
  this._json = _json;
179550
- this.version = _json.version;
179551
- this.isVersion13 = _json.version !== undefined && 0 === _json.version.indexOf("1.3");
179552
- this.service = new WmsCapability.Service(_json.Service);
179553
- if (_json.Capability)
179564
+ if (!_json || typeof _json !== "object" || (_json.Service === undefined && _json.Capability === undefined))
179565
+ throw new Error("Invalid WMS GetCapabilities response");
179566
+ this.version = typeof _json.version === "string" ? _json.version : undefined;
179567
+ this.isVersion13 = this.version !== undefined && this.version.startsWith("1.3");
179568
+ this.service = new WmsCapability.Service(_json.Service ?? {});
179569
+ if (_json.Capability?.Layer)
179554
179570
  this.layer = new WmsCapability.Layer(_json.Capability.Layer, this);
179555
179571
  }
179572
+ /** Parse a GetCapabilities XML response, returning undefined if it is not a valid WMS capabilities document. */
179573
+ static tryParse(xmlCapabilities) {
179574
+ // Validate the document is actually rooted at a WMS capabilities element before parsing:
179575
+ // wms-capabilities happily parses any root and recognizes direct Service/Capability children.
179576
+ // WMS 1.3.0 uses WMS_Capabilities; WMS 1.0.0-1.1.1 uses WMT_MS_Capabilities.
179577
+ const doc = new DOMParser().parseFromString(xmlCapabilities, "text/xml");
179578
+ const rootName = doc.documentElement?.localName;
179579
+ if (rootName !== "WMS_Capabilities" && rootName !== "WMT_MS_Capabilities")
179580
+ return undefined; // Not a WMS GetCapabilities document
179581
+ if (doc.getElementsByTagName("parsererror").length > 0)
179582
+ return undefined; // XML parse error (browsers embed a parsererror element)
179583
+ try {
179584
+ return new WmsCapabilities(new wms_capabilities__WEBPACK_IMPORTED_MODULE_0__["default"](undefined, DOMParser).parse(xmlCapabilities));
179585
+ }
179586
+ catch {
179587
+ return undefined; // Degenerate capabilities document
179588
+ }
179589
+ }
179556
179590
  static async create(url, credentials, ignoreCache, queryParams) {
179557
179591
  if (!ignoreCache) {
179558
179592
  const cached = WmsCapabilities._capabilitiesCache.get(url);
@@ -179571,7 +179605,9 @@ class WmsCapabilities {
179571
179605
  const xmlCapabilities = await _tile_internal__WEBPACK_IMPORTED_MODULE_1__.WmsUtilities.fetchXml(tmpUrl.toString(), credentials);
179572
179606
  if (!xmlCapabilities)
179573
179607
  return undefined;
179574
- const capabilities = new WmsCapabilities(new (wms_capabilities__WEBPACK_IMPORTED_MODULE_0___default())().parse(xmlCapabilities));
179608
+ const capabilities = WmsCapabilities.tryParse(xmlCapabilities);
179609
+ if (capabilities === undefined)
179610
+ return undefined;
179575
179611
  if (!credentials) {
179576
179612
  // Avoid caching protected data
179577
179613
  WmsCapabilities._capabilitiesCache.set(url, capabilities);
@@ -342952,7 +342988,7 @@ class TestContext {
342952
342988
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
342953
342989
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
342954
342990
  await core_frontend_1.NoRenderApp.startup({
342955
- applicationVersion: "5.13.0-dev.18",
342991
+ applicationVersion: "5.13.0-dev.20",
342956
342992
  applicationId: this.settings.gprid,
342957
342993
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
342958
342994
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -368138,6 +368174,1170 @@ var loadLanguages = instance.loadLanguages;
368138
368174
 
368139
368175
 
368140
368176
 
368177
+ /***/ },
368178
+
368179
+ /***/ "../../common/temp/node_modules/.pnpm/wms-capabilities@0.6.0/node_modules/wms-capabilities/dist/wms-capabilities.mjs"
368180
+ /*!***************************************************************************************************************************!*\
368181
+ !*** ../../common/temp/node_modules/.pnpm/wms-capabilities@0.6.0/node_modules/wms-capabilities/dist/wms-capabilities.mjs ***!
368182
+ \***************************************************************************************************************************/
368183
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
368184
+
368185
+ "use strict";
368186
+ __webpack_require__.r(__webpack_exports__);
368187
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
368188
+ /* harmony export */ "default": () => (/* binding */ WMS)
368189
+ /* harmony export */ });
368190
+
368191
+ /**
368192
+ * wms-capabilities @0.6.0
368193
+ * @description WMS service Capabilities > JSON, based on openlayers
368194
+ * @license BSD-2-Clause
368195
+ * @preserve
368196
+ */
368197
+
368198
+ /**
368199
+ * Returns true if the specified value is not undefined.
368200
+ *
368201
+ * @param {?} val Variable to test.
368202
+ * @return {Boolean} Whether variable is defined.
368203
+ */
368204
+ var isDef = (val) => val !== void 0;
368205
+
368206
+ /**
368207
+ * Adds a key-value pair to the object/map/hash if it doesn't exist yet.
368208
+ *
368209
+ * @param {Object.<K,V>} obj The object to which to add the key-value pair.
368210
+ * @param {String} key The key to add.
368211
+ * @param {V} value The value to add if the key wasn't present.
368212
+ * @return {V} The value of the entry at the end of the function.
368213
+ * @template K,V
368214
+ */
368215
+ var setIfUndefined = (obj, key, value) => key in obj ? obj[key] : (obj[key] = value);
368216
+
368217
+ /**
368218
+ * @enum {Number}
368219
+ */
368220
+ const NODE_TYPES = {
368221
+ ELEMENT: 1,
368222
+ ATTRIBUTE: 2,
368223
+ TEXT: 3,
368224
+ CDATA_SECTION: 4,
368225
+ ENTITY_REFERENCE: 5,
368226
+ ENTITY: 6,
368227
+ PROCESSING_INSTRUCTION: 7,
368228
+ COMMENT: 8,
368229
+ DOCUMENT: 9,
368230
+ DOCUMENT_TYPE: 10,
368231
+ DOCUMENT_FRAGMENT: 11,
368232
+ NOTATION: 12
368233
+ };
368234
+
368235
+ class XMLParser {
368236
+ /**
368237
+ * XML DOM parser
368238
+ * @constructor
368239
+ * @param {DOMParser} DOMParser
368240
+ */
368241
+ constructor (DOMParser) {
368242
+ /**
368243
+ * @type {DOMParser}
368244
+ */
368245
+ this._parser = new DOMParser();
368246
+ };
368247
+
368248
+ /**
368249
+ * @param {String} xmlstring
368250
+ * @return {Document}
368251
+ */
368252
+ toDocument (xmlstring) {
368253
+ return this._parser.parseFromString(xmlstring, 'application/xml');
368254
+ }
368255
+
368256
+ /**
368257
+ * Recursively grab all text content of child nodes into a single string.
368258
+ * @param {Node} node Node.
368259
+ * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line
368260
+ * breaks.
368261
+ * @return {string} All text content.
368262
+ * @api
368263
+ */
368264
+ getAllTextContent (node, normalizeWhitespace) {
368265
+ return getAllTextContent(node, normalizeWhitespace).join('');
368266
+ }
368267
+ }
368268
+
368269
+
368270
+ /**
368271
+ * Recursively grab all text content of child nodes into a single string.
368272
+ * @param {Node} node Node.
368273
+ * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line
368274
+ * breaks.
368275
+ * @return {string} All text content.
368276
+ * @api
368277
+ */
368278
+ function getAllTextContent (node, normalizeWhitespace) {
368279
+ return getAllTextContentInternal(node, normalizeWhitespace, []).join('');
368280
+ }
368281
+
368282
+
368283
+ /**
368284
+ * @param {Node} node Node.
368285
+ * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line
368286
+ * breaks.
368287
+ * @param {Array.<String|string>} accumulator Accumulator.
368288
+ * @private
368289
+ * @return {Array.<String|string>} Accumulator.
368290
+ */
368291
+ function getAllTextContentInternal (node, normalizeWhitespace, accumulator) {
368292
+ if (node.nodeType === NODE_TYPES.CDATA_SECTION ||
368293
+ node.nodeType === NODE_TYPES.TEXT) {
368294
+ if (normalizeWhitespace) {
368295
+ // FIXME understand why goog.dom.getTextContent_ uses String here
368296
+ accumulator.push(String(node.nodeValue).replace(/(\r\n|\r|\n)/g, ''));
368297
+ } else {
368298
+ accumulator.push(node.nodeValue);
368299
+ }
368300
+ } else {
368301
+ var n;
368302
+ for (n = node.firstChild; n; n = n.nextSibling) {
368303
+ getAllTextContentInternal(n, normalizeWhitespace, accumulator);
368304
+ }
368305
+ }
368306
+ return accumulator;
368307
+ }
368308
+
368309
+ /**
368310
+ * @param {Object.<string, Object.<string, XMLParser.Parser>>} parsersNS
368311
+ * Parsers by namespace.
368312
+ * @param {Node} node Node.
368313
+ * @param {Array.<*>} objectStack Object stack.
368314
+ * @param {*=} bind The object to use as `this`.
368315
+ */
368316
+ function parseNode (parsersNS, node, objectStack, bind) {
368317
+ for (var n = firstElementChild(node); n; n = nextElementSibling(n)) {
368318
+ var namespaceURI = n.namespaceURI || null;
368319
+ var parsers = parsersNS[namespaceURI];
368320
+ if (isDef(parsers)) {
368321
+ var parser = parsers[n.localName];
368322
+ if (isDef(parser)) {
368323
+ parser.call(bind, n, objectStack);
368324
+ }
368325
+ }
368326
+ }
368327
+ }
368328
+
368329
+ /**
368330
+ * Mostly for node.js
368331
+ * @param {Node} node
368332
+ * @return {Node}
368333
+ */
368334
+ function firstElementChild (node) {
368335
+ let firstElementChild = node.firstElementChild || node.firstChild;
368336
+ while (firstElementChild && firstElementChild.nodeType !== NODE_TYPES.ELEMENT) {
368337
+ firstElementChild = firstElementChild.nextSibling;
368338
+ }
368339
+ return firstElementChild;
368340
+ }
368341
+
368342
+ /**
368343
+ * Mostly for node.js
368344
+ * @param {Node} node
368345
+ * @return {Node}
368346
+ */
368347
+ function nextElementSibling (node) {
368348
+ let nextSibling = node.nextElementSibling || node.nextSibling;
368349
+ while (nextSibling && nextSibling.nodeType !== NODE_TYPES.ELEMENT) {
368350
+ nextSibling = nextSibling.nextSibling;
368351
+ }
368352
+ return nextSibling;
368353
+ }
368354
+
368355
+ /**
368356
+ * @param {Array.<string>} namespaceURIs Namespace URIs.
368357
+ * @param {Object.<string, XMLParser.Parser>} parsers Parsers.
368358
+ * @param {Object.<string, Object.<string, XMLParser.Parser>>=} opt_parsersNS
368359
+ * ParsersNS.
368360
+ * @return {Object.<string, Object.<string, XMLParser.Parser>>} Parsers NS.
368361
+ */
368362
+ function makeParsersNS (namespaceURIs, parsers, opt_parsersNS) {
368363
+ return /** @type {Object.<string, Object.<string, XMLParser.Parser>>} */ (
368364
+ makeStructureNS(namespaceURIs, parsers, opt_parsersNS));
368365
+ }
368366
+
368367
+ /**
368368
+ * Creates a namespaced structure, using the same values for each namespace.
368369
+ * This can be used as a starting point for versioned parsers, when only a few
368370
+ * values are version specific.
368371
+ * @param {Array.<string>} namespaceURIs Namespace URIs.
368372
+ * @param {T} structure Structure.
368373
+ * @param {Object.<string, T>=} opt_structureNS Namespaced structure to add to.
368374
+ * @return {Object.<string, T>} Namespaced structure.
368375
+ * @template T
368376
+ */
368377
+ function makeStructureNS (namespaceURIs, structure, opt_structureNS) {
368378
+ /**
368379
+ * @type {Object.<string, *>}
368380
+ */
368381
+ var structureNS = isDef(opt_structureNS) ? opt_structureNS : {};
368382
+ var i, ii;
368383
+ for (i = 0, ii = namespaceURIs.length; i < ii; ++i) {
368384
+ structureNS[namespaceURIs[i]] = structure;
368385
+ }
368386
+ return structureNS;
368387
+ }
368388
+
368389
+
368390
+ /**
368391
+ * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
368392
+ * @param {T=} opt_this The object to use as `this` in `valueReader`.
368393
+ * @return {Function} Parser.
368394
+ * @template T
368395
+ */
368396
+ function makeArrayPusher (valueReader, opt_this) {
368397
+ return (
368398
+ /**
368399
+ * @param {Node} node Node.
368400
+ * @param {Array.<*>} objectStack Object stack.
368401
+ */
368402
+ function(node, objectStack) {
368403
+ var value = valueReader.call(isDef(opt_this) ? opt_this : this,
368404
+ node, objectStack);
368405
+ if (isDef(value)) {
368406
+ var array = objectStack[objectStack.length - 1];
368407
+ array.push(value);
368408
+ }
368409
+ });
368410
+ }
368411
+
368412
+ /**
368413
+ * @param {Object} object Object.
368414
+ * @param {Object.<String, Object.<String, Function>>} parsersNS Parsers by namespace.
368415
+ * @param {Node} node Node.
368416
+ * @param {Array.<*>} objectStack Object stack.
368417
+ * @param {*=} bind The object to use as `this`.
368418
+ * @return {Object|undefined} Object.
368419
+ */
368420
+ function pushParseAndPop (object, parsersNS, node, objectStack, bind) {
368421
+ objectStack.push(object);
368422
+ parseNode(parsersNS, node, objectStack, bind);
368423
+ return objectStack.pop();
368424
+ }
368425
+
368426
+
368427
+ /**
368428
+ * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
368429
+ * @param {string=} opt_property Property.
368430
+ * @param {T=} opt_this The object to use as `this` in `valueReader`.
368431
+ * @return {XMLParser.Parser} Parser.
368432
+ * @template T
368433
+ */
368434
+ function makeObjectPropertySetter (valueReader, opt_property, opt_this) {
368435
+ return (
368436
+ /**
368437
+ * @param {Node} node Node.
368438
+ * @param {Array.<*>} objectStack Object stack.
368439
+ */
368440
+ function(node, objectStack) {
368441
+ let value = valueReader.call(isDef(opt_this) ? opt_this : this,
368442
+ node, objectStack);
368443
+ if (isDef(value)) {
368444
+ var object = /** @type {Object} */ (objectStack[objectStack.length - 1]);
368445
+ var property = isDef(opt_property) ? opt_property : node.localName;
368446
+ object[property] = value;
368447
+ }
368448
+ });
368449
+ }
368450
+
368451
+
368452
+ /**
368453
+ * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
368454
+ * @param {string=} opt_property Property.
368455
+ * @param {T=} opt_this The object to use as `this` in `valueReader`.
368456
+ * @return {Function} Parser.
368457
+ * @template T
368458
+ */
368459
+ function makeObjectPropertyPusher (valueReader, opt_property, opt_this) {
368460
+ return (
368461
+ /**
368462
+ * @param {Node} node Node.
368463
+ * @param {Array.<*>} objectStack Object stack.
368464
+ */
368465
+ function(node, objectStack) {
368466
+ var value = valueReader.call(isDef(opt_this) ? opt_this : this,
368467
+ node, objectStack);
368468
+
368469
+ if (isDef(value)) {
368470
+ var object = /** @type {Object} */ (objectStack[objectStack.length - 1]);
368471
+ var property = isDef(opt_property) ? opt_property : node.localName;
368472
+ var array = setIfUndefined(object, property, []);
368473
+ array.push(value);
368474
+ }
368475
+ });
368476
+ }
368477
+
368478
+ /**
368479
+ * Make sure we trim BOM and NBSP
368480
+ * @type {RegExp}
368481
+ */
368482
+ const TRIM_RE = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
368483
+
368484
+ /**
368485
+ * @param {String} str
368486
+ * @return {String}
368487
+ */
368488
+ function trim (str) {
368489
+ return str.replace(TRIM_RE, '');
368490
+ }
368491
+
368492
+ /**
368493
+ * @param {string} string String.
368494
+ * @return {boolean|undefined} Boolean.
368495
+ */
368496
+ function readBooleanString (string) {
368497
+ const m = /^\s*(true|1)|(false|0)\s*$/.exec(string);
368498
+ if (m) {
368499
+ return isDef(m[1]) || false;
368500
+ } else {
368501
+ return undefined;
368502
+ }
368503
+ }
368504
+
368505
+
368506
+ /**
368507
+ * @param {Node} node Node.
368508
+ * @return {number|undefined} Decimal.
368509
+ */
368510
+ function readDecimal (node) {
368511
+ return readDecimalString(getAllTextContent(node, false));
368512
+ }
368513
+
368514
+
368515
+ /**
368516
+ * @param {string} string String.
368517
+ * @return {number|undefined} Decimal.
368518
+ */
368519
+ function readDecimalString (string) {
368520
+ // FIXME check spec
368521
+ const m = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(string);
368522
+ if (m) {
368523
+ return parseFloat(m[1]);
368524
+ } else {
368525
+ return undefined;
368526
+ }
368527
+ }
368528
+
368529
+
368530
+ /**
368531
+ * @param {Node} node Node.
368532
+ * @return {number|undefined} Non negative integer.
368533
+ */
368534
+ function readNonNegativeInteger (node) {
368535
+ return readNonNegativeIntegerString(getAllTextContent(node, false));
368536
+ }
368537
+
368538
+
368539
+ /**
368540
+ * @param {string} string String.
368541
+ * @return {number|undefined} Non negative integer.
368542
+ */
368543
+ function readNonNegativeIntegerString (string) {
368544
+ const m = /^\s*(\d+)\s*$/.exec(string);
368545
+ if (m) {
368546
+ return parseInt(m[1], 10);
368547
+ } else {
368548
+ return undefined;
368549
+ }
368550
+ }
368551
+
368552
+
368553
+ /**
368554
+ * @param {Node} node Node.
368555
+ * @return {string|undefined} String.
368556
+ */
368557
+ function readString (node) {
368558
+ return trim(getAllTextContent(node, false));
368559
+ }
368560
+
368561
+ /**
368562
+ * @const
368563
+ * @type {string}
368564
+ */
368565
+ const NAMESPACE_URI = 'http://www.w3.org/1999/xlink';
368566
+
368567
+ /**
368568
+ * @param {Node} node Node.
368569
+ * @return {Boolean|undefined} Boolean.
368570
+ */
368571
+ function readHref (node) {
368572
+ return node.getAttributeNS(NAMESPACE_URI, 'href');
368573
+ }
368574
+
368575
+ /**
368576
+ * @param {Node} node Node.
368577
+ * @param {Array.<*>} objectStack Object stack.
368578
+ * @return {Object|undefined} Attribution object.
368579
+ */
368580
+ function readAttribution(node, objectStack) {
368581
+ return pushParseAndPop({}, ATTRIBUTION_PARSERS, node, objectStack);
368582
+ }
368583
+
368584
+
368585
+ /**
368586
+ * @private
368587
+ * @param {Node} node Node.
368588
+ * @return {ol.Extent} Bounding box object.
368589
+ */
368590
+ function readBoundingBoxExtent (node) {
368591
+ return [
368592
+ readDecimalString(node.getAttribute('minx')),
368593
+ readDecimalString(node.getAttribute('miny')),
368594
+ readDecimalString(node.getAttribute('maxx')),
368595
+ readDecimalString(node.getAttribute('maxy'))
368596
+ ];
368597
+ }
368598
+
368599
+ /**
368600
+ * @private
368601
+ * @param {Node} node Node.
368602
+ * @param {Array.<*>} objectStack Object stack.
368603
+ * @return {Object} Bounding box object.
368604
+ */
368605
+ function readBoundingBox (node, objectStack) {
368606
+ const extent = readBoundingBoxExtent(node);
368607
+ const resolutions = [
368608
+ readDecimalString(node.getAttribute('resx')),
368609
+ readDecimalString(node.getAttribute('resy'))
368610
+ ];
368611
+
368612
+ return {
368613
+ 'crs': node.getAttribute('CRS') || node.getAttribute('SRS'),
368614
+ extent, res: resolutions
368615
+ };
368616
+ }
368617
+
368618
+ /**
368619
+ * @private
368620
+ * @param {Node} node Node.
368621
+ * @param {Array.<*>} objectStack Object stack.
368622
+ * @return {ol.Extent|undefined} Bounding box object.
368623
+ */
368624
+ function readLatLonBoundingBox (node, objectStack) {
368625
+ const extent = readBoundingBoxExtent(node);
368626
+
368627
+ if (!isDef(extent[0]) || !isDef(extent[1]) ||
368628
+ !isDef(extent[2]) || !isDef(extent[3])) {
368629
+ return undefined;
368630
+ }
368631
+
368632
+ return extent;
368633
+ }
368634
+
368635
+
368636
+ /**
368637
+ * @privat
368638
+ * @param {Node} node Node
368639
+ * @param {Arra.<Object>} objectStack Object stack
368640
+ * @return {Object}
368641
+ */
368642
+ function readScaleHint (node, objectStack) {
368643
+ const min = parseFloat(node.getAttribute('min'));
368644
+ const max = parseFloat(node.getAttribute('max'));
368645
+
368646
+ return { min, max };
368647
+ }
368648
+
368649
+
368650
+ /**
368651
+ * @private
368652
+ * @param {Node} node Node.
368653
+ * @param {Array.<*>} objectStack Object stack.
368654
+ * @return {ol.Extent|undefined} Bounding box object.
368655
+ */
368656
+ function readEXGeographicBoundingBox (node, objectStack) {
368657
+ const geographicBoundingBox = pushParseAndPop({},
368658
+ EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS,
368659
+ node, objectStack);
368660
+ if (!isDef(geographicBoundingBox)) return undefined;
368661
+
368662
+ const westBoundLongitude = /** @type {number|undefined} */
368663
+ (geographicBoundingBox['westBoundLongitude']);
368664
+ const southBoundLatitude = /** @type {number|undefined} */
368665
+ (geographicBoundingBox['southBoundLatitude']);
368666
+ const eastBoundLongitude = /** @type {number|undefined} */
368667
+ (geographicBoundingBox['eastBoundLongitude']);
368668
+ const northBoundLatitude = /** @type {number|undefined} */
368669
+ (geographicBoundingBox['northBoundLatitude']);
368670
+
368671
+ if (!isDef(westBoundLongitude) || !isDef(southBoundLatitude) ||
368672
+ !isDef(eastBoundLongitude) || !isDef(northBoundLatitude)) {
368673
+ return undefined;
368674
+ }
368675
+
368676
+ return [
368677
+ westBoundLongitude, southBoundLatitude,
368678
+ eastBoundLongitude, northBoundLatitude
368679
+ ];
368680
+ }
368681
+
368682
+
368683
+ /**
368684
+ * @param {Node} node Node.
368685
+ * @param {Array.<*>} objectStack Object stack.
368686
+ * @private
368687
+ * @return {Object|undefined} Capability object.
368688
+ */
368689
+ function readCapability (node, objectStack) {
368690
+ return pushParseAndPop({}, CAPABILITY_PARSERS, node, objectStack);
368691
+ }
368692
+
368693
+
368694
+ /**
368695
+ * @param {Node} node Node.
368696
+ * @param {Array.<*>} objectStack Object stack.
368697
+ * @private
368698
+ * @return {Object|undefined} Service object.
368699
+ */
368700
+ function readService (node, objectStack) {
368701
+ return pushParseAndPop({}, SERVICE_PARSERS, node, objectStack);
368702
+ }
368703
+
368704
+
368705
+ /**
368706
+ * @param {Node} node Node.
368707
+ * @param {Array.<*>} objectStack Object stack.
368708
+ * @private
368709
+ * @return {Object|undefined} Contact information object.
368710
+ */
368711
+ function readContactInformation (node, objectStack) {
368712
+ return pushParseAndPop({}, CONTACT_INFORMATION_PARSERS,
368713
+ node, objectStack);
368714
+ }
368715
+
368716
+
368717
+ /**
368718
+ * @param {Node} node Node.
368719
+ * @param {Array.<*>} objectStack Object stack.
368720
+ * @private
368721
+ * @return {Object|undefined} Contact person object.
368722
+ */
368723
+ function readContactPersonPrimary (node, objectStack) {
368724
+ return pushParseAndPop({}, CONTACT_PERSON_PARSERS,
368725
+ node, objectStack);
368726
+ }
368727
+
368728
+
368729
+ /**
368730
+ * @param {Node} node Node.
368731
+ * @param {Array.<*>} objectStack Object stack.
368732
+ * @private
368733
+ * @return {Object|undefined} Contact address object.
368734
+ */
368735
+ function readContactAddress (node, objectStack) {
368736
+ return pushParseAndPop({}, CONTACT_ADDRESS_PARSERS,
368737
+ node, objectStack);
368738
+ }
368739
+
368740
+
368741
+ /**
368742
+ * @param {Node} node Node.
368743
+ * @param {Array.<*>} objectStack Object stack.
368744
+ * @private
368745
+ * @return {Array.<string>|undefined} Format array.
368746
+ */
368747
+ function readException (node, objectStack) {
368748
+ return pushParseAndPop(
368749
+ [], EXCEPTION_PARSERS, node, objectStack);
368750
+ }
368751
+
368752
+
368753
+ /**
368754
+ * @param {Node} node Node.
368755
+ * @param {Array.<*>} objectStack Object stack.
368756
+ * @private
368757
+ * @return {Object|undefined} Layer object.
368758
+ */
368759
+ function readCapabilityLayer (node, objectStack) {
368760
+ const queryable = readBooleanString(node.getAttribute('queryable'));
368761
+ return pushParseAndPop({
368762
+ queryable: isDef(queryable) ? queryable : false },
368763
+ LAYER_PARSERS, node, objectStack);
368764
+ }
368765
+
368766
+
368767
+ /**
368768
+ * @private
368769
+ * @param {Node} node Node.
368770
+ * @param {Array.<*>} objectStack Object stack.
368771
+ * @return {Object|undefined} Layer object.
368772
+ */
368773
+ function readLayer (node, objectStack) {
368774
+ var parentLayerObject = /** @type {Object.<string,*>} */
368775
+ (objectStack[objectStack.length - 1]);
368776
+
368777
+ const layerObject = /** @type {Object.<string,*>} */
368778
+ (pushParseAndPop({}, LAYER_PARSERS,
368779
+ node, objectStack));
368780
+
368781
+ if (!isDef(layerObject)) return undefined;
368782
+
368783
+ let queryable = readBooleanString(node.getAttribute('queryable'));
368784
+ if (!isDef(queryable)) {
368785
+ queryable = parentLayerObject['queryable'];
368786
+ }
368787
+ layerObject['queryable'] = isDef(queryable) ? queryable : false;
368788
+
368789
+ let cascaded = readNonNegativeIntegerString(node.getAttribute('cascaded'));
368790
+ if (!isDef(cascaded)) {
368791
+ cascaded = parentLayerObject['cascaded'];
368792
+ }
368793
+ layerObject['cascaded'] = cascaded;
368794
+
368795
+ let opaque = readBooleanString(node.getAttribute('opaque'));
368796
+ if (!isDef(opaque)) {
368797
+ opaque = parentLayerObject['opaque'];
368798
+ }
368799
+ layerObject['opaque'] = isDef(opaque) ? opaque : false;
368800
+
368801
+ let noSubsets = readBooleanString(node.getAttribute('noSubsets'));
368802
+ if (!isDef(noSubsets)) {
368803
+ noSubsets = parentLayerObject['noSubsets'];
368804
+ }
368805
+ layerObject['noSubsets'] = isDef(noSubsets) ? noSubsets : false;
368806
+
368807
+ let fixedWidth = readDecimalString(node.getAttribute('fixedWidth'));
368808
+ if (!isDef(fixedWidth)) {
368809
+ fixedWidth = parentLayerObject['fixedWidth'];
368810
+ }
368811
+ layerObject['fixedWidth'] = fixedWidth;
368812
+
368813
+ let fixedHeight = readDecimalString(node.getAttribute('fixedHeight'));
368814
+ if (!isDef(fixedHeight)) {
368815
+ fixedHeight = parentLayerObject['fixedHeight'];
368816
+ }
368817
+ layerObject['fixedHeight'] = fixedHeight;
368818
+
368819
+ // See 7.2.4.8
368820
+ const addKeys = ['Style', 'CRS', 'AuthorityURL'];
368821
+ for (let i = 0, len = addKeys.length; i < len; i++) {
368822
+ const key = addKeys[i];
368823
+ const parentValue = parentLayerObject[key];
368824
+ if (isDef(parentValue)) {
368825
+ let childValue = setIfUndefined(layerObject, key, []);
368826
+ childValue = childValue.concat(parentValue);
368827
+ layerObject[key] = childValue;
368828
+ }
368829
+ }
368830
+
368831
+ const replaceKeys = ['EX_GeographicBoundingBox', 'BoundingBox', 'Dimension',
368832
+ 'Attribution', 'MinScaleDenominator', 'MaxScaleDenominator'
368833
+ ];
368834
+ for (let i = 0, len = replaceKeys.length; i < len; i++) {
368835
+ const key = replaceKeys[i];
368836
+ const childValue = layerObject[key];
368837
+ if (!isDef(childValue)) {
368838
+ const parentValue = parentLayerObject[key];
368839
+ layerObject[key] = parentValue;
368840
+ }
368841
+ }
368842
+
368843
+ return layerObject;
368844
+ }
368845
+
368846
+
368847
+ /**
368848
+ * @private
368849
+ * @param {Node} node Node.
368850
+ * @param {Array.<*>} objectStack Object stack.
368851
+ * @return {Object} Dimension object.
368852
+ */
368853
+ function readDimension (node, objectStack) {
368854
+ return {
368855
+ 'name': node.getAttribute('name'),
368856
+ 'units': node.getAttribute('units'),
368857
+ 'unitSymbol': node.getAttribute('unitSymbol'),
368858
+ 'default': node.getAttribute('default'),
368859
+ 'multipleValues': readBooleanString(node.getAttribute('multipleValues')),
368860
+ 'nearestValue': readBooleanString(node.getAttribute('nearestValue')),
368861
+ 'current': readBooleanString(node.getAttribute('current')),
368862
+ 'values': readString(node)
368863
+ };
368864
+ }
368865
+
368866
+
368867
+ /**
368868
+ * @private
368869
+ * @param {Node} node Node.
368870
+ * @param {Array.<*>} objectStack Object stack.
368871
+ * @return {Object|undefined} Online resource object.
368872
+ */
368873
+ function readFormatOnlineresource (node, objectStack) {
368874
+ return pushParseAndPop({}, FORMAT_ONLINERESOURCE_PARSERS,
368875
+ node, objectStack);
368876
+ }
368877
+
368878
+
368879
+ /**
368880
+ * @private
368881
+ * @param {Node} node Node.
368882
+ * @param {Array.<*>} objectStack Object stack.
368883
+ * @return {Object|undefined} Request object.
368884
+ */
368885
+ function readRequest (node, objectStack) {
368886
+ return pushParseAndPop({}, REQUEST_PARSERS, node, objectStack);
368887
+ }
368888
+
368889
+
368890
+ /**
368891
+ * @private
368892
+ * @param {Node} node Node.
368893
+ * @param {Array.<*>} objectStack Object stack.
368894
+ * @return {Object|undefined} DCP type object.
368895
+ */
368896
+ function readDCPType (node, objectStack) {
368897
+ return pushParseAndPop({}, DCPTYPE_PARSERS, node, objectStack);
368898
+ }
368899
+
368900
+
368901
+ /**
368902
+ * @private
368903
+ * @param {Node} node Node.
368904
+ * @param {Array.<*>} objectStack Object stack.
368905
+ * @return {Object|undefined} HTTP object.
368906
+ */
368907
+ function readHTTP (node, objectStack) {
368908
+ return pushParseAndPop({}, HTTP_PARSERS, node, objectStack);
368909
+ }
368910
+
368911
+
368912
+ /**
368913
+ * @private
368914
+ * @param {Node} node Node.
368915
+ * @param {Array.<*>} objectStack Object stack.
368916
+ * @return {Object|undefined} Operation type object.
368917
+ */
368918
+ function readOperationType (node, objectStack) {
368919
+ return pushParseAndPop({}, OPERATIONTYPE_PARSERS, node, objectStack);
368920
+ }
368921
+
368922
+
368923
+ /**
368924
+ * @private
368925
+ * @param {Node} node Node.
368926
+ * @param {Array.<*>} objectStack Object stack.
368927
+ * @return {Object|undefined} Online resource object.
368928
+ */
368929
+ function readSizedFormatOnlineresource (node, objectStack) {
368930
+ var formatOnlineresource = readFormatOnlineresource(node, objectStack);
368931
+ if (isDef(formatOnlineresource)) {
368932
+ const size = [
368933
+ readNonNegativeIntegerString(node.getAttribute('width')),
368934
+ readNonNegativeIntegerString(node.getAttribute('height'))
368935
+ ];
368936
+ formatOnlineresource['size'] = size;
368937
+ return formatOnlineresource;
368938
+ }
368939
+ return undefined;
368940
+ }
368941
+
368942
+
368943
+ /**
368944
+ * @private
368945
+ * @param {Node} node Node.
368946
+ * @param {Array.<*>} objectStack Object stack.
368947
+ * @return {Object|undefined} Authority URL object.
368948
+ */
368949
+ function readAuthorityURL (node, objectStack) {
368950
+ var authorityObject = readFormatOnlineresource(node, objectStack);
368951
+ if (isDef(authorityObject)) {
368952
+ authorityObject['name'] = node.getAttribute('name');
368953
+ return authorityObject;
368954
+ }
368955
+ return undefined;
368956
+ }
368957
+
368958
+
368959
+ /**
368960
+ * @private
368961
+ * @param {Node} node Node.
368962
+ * @param {Array.<*>} objectStack Object stack.
368963
+ * @return {Object|undefined} Metadata URL object.
368964
+ */
368965
+ function readMetadataURL (node, objectStack) {
368966
+ var metadataObject = readFormatOnlineresource(node, objectStack);
368967
+ if (isDef(metadataObject)) {
368968
+ metadataObject['type'] = node.getAttribute('type');
368969
+ return metadataObject;
368970
+ }
368971
+ return undefined;
368972
+ }
368973
+
368974
+
368975
+ /**
368976
+ * @private
368977
+ * @param {Node} node Node.
368978
+ * @param {Array.<*>} objectStack Object stack.
368979
+ * @return {Object|undefined} Style object.
368980
+ */
368981
+ function readStyle (node, objectStack) {
368982
+ return pushParseAndPop({}, STYLE_PARSERS, node, objectStack);
368983
+ }
368984
+
368985
+
368986
+ /**
368987
+ * @private
368988
+ * @param {Node} node Node.
368989
+ * @param {Array.<*>} objectStack Object stack.
368990
+ * @return {Array.<string>|undefined} Keyword list.
368991
+ */
368992
+ function readKeywordList (node, objectStack) {
368993
+ return pushParseAndPop(
368994
+ [], KEYWORDLIST_PARSERS, node, objectStack);
368995
+ }
368996
+
368997
+
368998
+ /**
368999
+ * @const
369000
+ * @type {Array.<string>}
369001
+ */
369002
+ const NAMESPACE_URIS = [
369003
+ null,
369004
+ 'http://www.opengis.net/wms'
369005
+ ];
369006
+
369007
+ /**
369008
+ * @const
369009
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369010
+ * @private
369011
+ */
369012
+ const PARSERS = makeParsersNS(
369013
+ NAMESPACE_URIS, {
369014
+ 'Service': makeObjectPropertySetter(readService),
369015
+ 'Capability': makeObjectPropertySetter(readCapability)
369016
+ });
369017
+
369018
+ /**
369019
+ * @const
369020
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369021
+ * @private
369022
+ */
369023
+ const CAPABILITY_PARSERS = makeParsersNS(
369024
+ NAMESPACE_URIS, {
369025
+ 'Request': makeObjectPropertySetter(readRequest),
369026
+ 'Exception': makeObjectPropertySetter(readException),
369027
+ 'Layer': makeObjectPropertySetter(readCapabilityLayer)
369028
+ });
369029
+
369030
+ /**
369031
+ * @const
369032
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369033
+ * @private
369034
+ */
369035
+ const SERVICE_PARSERS = makeParsersNS(
369036
+ NAMESPACE_URIS, {
369037
+ 'Name': makeObjectPropertySetter(readString),
369038
+ 'Title': makeObjectPropertySetter(readString),
369039
+ 'Abstract': makeObjectPropertySetter(readString),
369040
+ 'KeywordList': makeObjectPropertySetter(readKeywordList),
369041
+ 'OnlineResource': makeObjectPropertySetter(readHref),
369042
+ 'ContactInformation': makeObjectPropertySetter(readContactInformation),
369043
+ 'Fees': makeObjectPropertySetter(readString),
369044
+ 'AccessConstraints': makeObjectPropertySetter(readString),
369045
+ 'LayerLimit': makeObjectPropertySetter(readNonNegativeInteger),
369046
+ 'MaxWidth': makeObjectPropertySetter(readNonNegativeInteger),
369047
+ 'MaxHeight': makeObjectPropertySetter(readNonNegativeInteger)
369048
+ });
369049
+
369050
+ /**
369051
+ * @const
369052
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369053
+ * @private
369054
+ */
369055
+ const CONTACT_INFORMATION_PARSERS = makeParsersNS(
369056
+ NAMESPACE_URIS, {
369057
+ 'ContactPersonPrimary': makeObjectPropertySetter(readContactPersonPrimary),
369058
+ 'ContactPosition': makeObjectPropertySetter(readString),
369059
+ 'ContactAddress': makeObjectPropertySetter(readContactAddress),
369060
+ 'ContactVoiceTelephone': makeObjectPropertySetter(readString),
369061
+ 'ContactFacsimileTelephone': makeObjectPropertySetter(readString),
369062
+ 'ContactElectronicMailAddress': makeObjectPropertySetter(readString)
369063
+ });
369064
+
369065
+ /**
369066
+ * @const
369067
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369068
+ * @private
369069
+ */
369070
+ const CONTACT_PERSON_PARSERS = makeParsersNS(
369071
+ NAMESPACE_URIS, {
369072
+ 'ContactPerson': makeObjectPropertySetter(readString),
369073
+ 'ContactOrganization': makeObjectPropertySetter(readString)
369074
+ });
369075
+
369076
+
369077
+ /**
369078
+ * @const
369079
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369080
+ * @private
369081
+ */
369082
+ const CONTACT_ADDRESS_PARSERS = makeParsersNS(
369083
+ NAMESPACE_URIS, {
369084
+ 'AddressType': makeObjectPropertySetter(readString),
369085
+ 'Address': makeObjectPropertySetter(readString),
369086
+ 'City': makeObjectPropertySetter(readString),
369087
+ 'StateOrProvince': makeObjectPropertySetter(readString),
369088
+ 'PostCode': makeObjectPropertySetter(readString),
369089
+ 'Country': makeObjectPropertySetter(readString)
369090
+ });
369091
+
369092
+
369093
+ /**
369094
+ * @const
369095
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369096
+ * @private
369097
+ */
369098
+ const EXCEPTION_PARSERS = makeParsersNS(
369099
+ NAMESPACE_URIS, {
369100
+ 'Format': makeArrayPusher(readString)
369101
+ });
369102
+
369103
+
369104
+ /**
369105
+ * @const
369106
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369107
+ * @private
369108
+ */
369109
+ const LAYER_PARSERS = makeParsersNS(
369110
+ NAMESPACE_URIS, {
369111
+ 'Name': makeObjectPropertySetter(readString),
369112
+ 'Title': makeObjectPropertySetter(readString),
369113
+ 'Abstract': makeObjectPropertySetter(readString),
369114
+ 'KeywordList': makeObjectPropertySetter(readKeywordList),
369115
+ 'CRS': makeObjectPropertyPusher(readString),
369116
+ 'SRS': makeObjectPropertyPusher(readString),
369117
+ 'EX_GeographicBoundingBox': makeObjectPropertySetter(readEXGeographicBoundingBox),
369118
+ 'LatLonBoundingBox': makeObjectPropertySetter(readLatLonBoundingBox),
369119
+ 'BoundingBox': makeObjectPropertyPusher(readBoundingBox),
369120
+ 'Dimension': makeObjectPropertyPusher(readDimension),
369121
+ 'Attribution': makeObjectPropertySetter(readAttribution),
369122
+ 'AuthorityURL': makeObjectPropertyPusher(readAuthorityURL),
369123
+ 'Identifier': makeObjectPropertyPusher(readString),
369124
+ 'MetadataURL': makeObjectPropertyPusher(readMetadataURL),
369125
+ 'DataURL': makeObjectPropertyPusher(readFormatOnlineresource),
369126
+ 'FeatureListURL': makeObjectPropertyPusher(readFormatOnlineresource),
369127
+ 'Style': makeObjectPropertyPusher(readStyle),
369128
+ 'MinScaleDenominator': makeObjectPropertySetter(readDecimal),
369129
+ 'MaxScaleDenominator': makeObjectPropertySetter(readDecimal),
369130
+ 'ScaleHint': makeObjectPropertySetter(readScaleHint),
369131
+ 'Layer': makeObjectPropertyPusher(readLayer)
369132
+ });
369133
+
369134
+
369135
+ /**
369136
+ * @const
369137
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369138
+ * @private
369139
+ */
369140
+ const ATTRIBUTION_PARSERS = makeParsersNS(
369141
+ NAMESPACE_URIS, {
369142
+ 'Title': makeObjectPropertySetter(readString),
369143
+ 'OnlineResource': makeObjectPropertySetter(readHref),
369144
+ 'LogoURL': makeObjectPropertySetter(readSizedFormatOnlineresource)
369145
+ });
369146
+
369147
+
369148
+ /**
369149
+ * @const
369150
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369151
+ * @private
369152
+ */
369153
+ const EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS =
369154
+ makeParsersNS(NAMESPACE_URIS, {
369155
+ 'westBoundLongitude': makeObjectPropertySetter(readDecimal),
369156
+ 'eastBoundLongitude': makeObjectPropertySetter(readDecimal),
369157
+ 'southBoundLatitude': makeObjectPropertySetter(readDecimal),
369158
+ 'northBoundLatitude': makeObjectPropertySetter(readDecimal)
369159
+ });
369160
+
369161
+
369162
+ /**
369163
+ * @const
369164
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369165
+ * @private
369166
+ */
369167
+ const REQUEST_PARSERS = makeParsersNS(
369168
+ NAMESPACE_URIS, {
369169
+ 'GetCapabilities': makeObjectPropertySetter(
369170
+ readOperationType),
369171
+ 'GetMap': makeObjectPropertySetter(
369172
+ readOperationType),
369173
+ 'GetFeatureInfo': makeObjectPropertySetter(
369174
+ readOperationType)
369175
+ });
369176
+
369177
+
369178
+ /**
369179
+ * @const
369180
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369181
+ * @private
369182
+ */
369183
+ const OPERATIONTYPE_PARSERS = makeParsersNS(
369184
+ NAMESPACE_URIS, {
369185
+ 'Format': makeObjectPropertyPusher(readString),
369186
+ 'DCPType': makeObjectPropertyPusher(
369187
+ readDCPType)
369188
+ });
369189
+
369190
+
369191
+ /**
369192
+ * @const
369193
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369194
+ * @private
369195
+ */
369196
+ const DCPTYPE_PARSERS = makeParsersNS(
369197
+ NAMESPACE_URIS, {
369198
+ 'HTTP': makeObjectPropertySetter(
369199
+ readHTTP)
369200
+ });
369201
+
369202
+
369203
+ /**
369204
+ * @const
369205
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369206
+ * @private
369207
+ */
369208
+ const HTTP_PARSERS = makeParsersNS(
369209
+ NAMESPACE_URIS, {
369210
+ 'Get': makeObjectPropertySetter(
369211
+ readFormatOnlineresource),
369212
+ 'Post': makeObjectPropertySetter(
369213
+ readFormatOnlineresource)
369214
+ });
369215
+
369216
+
369217
+ /**
369218
+ * @const
369219
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369220
+ * @private
369221
+ */
369222
+ const STYLE_PARSERS = makeParsersNS(
369223
+ NAMESPACE_URIS, {
369224
+ 'Name': makeObjectPropertySetter(readString),
369225
+ 'Title': makeObjectPropertySetter(readString),
369226
+ 'Abstract': makeObjectPropertySetter(readString),
369227
+ 'LegendURL': makeObjectPropertyPusher(readSizedFormatOnlineresource),
369228
+ 'StyleSheetURL': makeObjectPropertySetter(readFormatOnlineresource),
369229
+ 'StyleURL': makeObjectPropertySetter(readFormatOnlineresource)
369230
+ });
369231
+
369232
+
369233
+ /**
369234
+ * @const
369235
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369236
+ * @private
369237
+ */
369238
+ const FORMAT_ONLINERESOURCE_PARSERS = makeParsersNS(
369239
+ NAMESPACE_URIS, {
369240
+ 'Format': makeObjectPropertySetter(readString),
369241
+ 'OnlineResource': makeObjectPropertySetter(readHref)
369242
+ });
369243
+
369244
+
369245
+ /**
369246
+ * @const
369247
+ * @type {Object.<string, Object.<string, XMLParser.Parser>>}
369248
+ * @private
369249
+ */
369250
+ const KEYWORDLIST_PARSERS = makeParsersNS(
369251
+ NAMESPACE_URIS, {
369252
+ 'Keyword': makeArrayPusher(readString)
369253
+ });
369254
+
369255
+ class WMS {
369256
+ /**
369257
+ * WMS Capabilities parser
369258
+ *
369259
+ * @param {String=} xmlString
369260
+ * @constructor
369261
+ */
369262
+ constructor(xmlString, DOMParser) {
369263
+ if (!DOMParser && typeof window !== 'undefined') {
369264
+ DOMParser = window.DOMParser;
369265
+ }
369266
+
369267
+ /**
369268
+ * @type {String}
369269
+ */
369270
+ this.version = undefined;
369271
+
369272
+ /**
369273
+ * @type {XMLParser}
369274
+ */
369275
+ this._parser = new XMLParser(DOMParser);
369276
+
369277
+ /**
369278
+ * @type {String=}
369279
+ */
369280
+ this._data = xmlString;
369281
+ }
369282
+
369283
+
369284
+ /**
369285
+ * @param {String} xmlString
369286
+ * @return {WMS}
369287
+ */
369288
+ data (xmlString) {
369289
+ this._data = xmlString;
369290
+ return this;
369291
+ }
369292
+
369293
+ /**
369294
+ * @param {String=} xmlString
369295
+ * @return {Object|null}
369296
+ */
369297
+ toJSON (xmlString) {
369298
+ xmlString = xmlString || this._data;
369299
+ return this.parse(xmlString);
369300
+ }
369301
+
369302
+ /**
369303
+ * @return {String} xml
369304
+ * @return {Object|null}
369305
+ */
369306
+ parse (xmlString) {
369307
+ return this.readFromDocument(this._parser.toDocument(xmlString));
369308
+ }
369309
+
369310
+ /**
369311
+ * @param {Document} doc
369312
+ * @return {Object|null}
369313
+ */
369314
+ readFromDocument (doc) {
369315
+ for (let node = doc.firstChild; node; node = node.nextSibling) {
369316
+ if (node.nodeType == NODE_TYPES.ELEMENT) {
369317
+ return this.readFromNode(node);
369318
+ }
369319
+ }
369320
+ return null;
369321
+ }
369322
+
369323
+ /**
369324
+ * @param {DOMNode} node
369325
+ * @return {Object}
369326
+ */
369327
+ readFromNode (node) {
369328
+ this.version = node.getAttribute('version');
369329
+ const wmsCapabilityObject = pushParseAndPop({
369330
+ 'version': this.version
369331
+ }, PARSERS, node, []);
369332
+
369333
+ return wmsCapabilityObject || null;
369334
+ }
369335
+ }
369336
+
369337
+
369338
+ //# sourceMappingURL=wms-capabilities.mjs.map
369339
+
369340
+
368141
369341
  /***/ },
368142
369342
 
368143
369343
  /***/ "../../core/frontend/package.json"
@@ -368147,7 +369347,7 @@ var loadLanguages = instance.loadLanguages;
368147
369347
  (module) {
368148
369348
 
368149
369349
  "use strict";
368150
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.13.0-dev.18","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s build:workers && npm run -s copy:draco","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run build:test-worker && vitest --run","cover":"npm run build:test-worker && vitest --run","build:test-worker":"vite build --config ./src/test/worker/vite.config.mts 1>&2","build:workers":"rimraf lib/workers/webpack && vite build --config ./src/workers/ImdlParser/vite.config.mts 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.11","@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/node":"~20.17.0","@types/sinon":"^17.0.2","@vitest/browser-playwright":"^4.1.10","@vitest/coverage-v8":"^4.1.10","cpx2":"^8.0.0","eslint":"^9.31.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","typescript":"~5.6.2","vite":"^6.4.3","vitest":"^4.1.10","vite-plugin-static-copy":"2.2.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"~4.3.4","@loaders.gl/draco":"~4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
369350
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.13.0-dev.20","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s build:workers && npm run -s copy:draco","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run build:test-worker && vitest --run","cover":"npm run build:test-worker && vitest --run","build:test-worker":"vite build --config ./src/test/worker/vite.config.mts 1>&2","build:workers":"rimraf lib/workers/webpack && vite build --config ./src/workers/ImdlParser/vite.config.mts 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.11","@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/node":"~20.17.0","@types/sinon":"^17.0.2","@vitest/browser-playwright":"^4.1.10","@vitest/coverage-v8":"^4.1.10","cpx2":"^8.0.0","eslint":"^9.31.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","typescript":"~5.6.2","vite":"^6.4.3","vitest":"^4.1.10","vite-plugin-static-copy":"2.2.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"~4.3.4","@loaders.gl/draco":"~4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.6.0"}}');
368151
369351
 
368152
369352
  /***/ },
368153
369353