@esri/solutions-components 0.6.34 → 0.6.35

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.
Files changed (61) hide show
  1. package/dist/cjs/calcite-alert_3.cjs.entry.js +20 -6
  2. package/dist/cjs/calcite-combobox_6.cjs.entry.js +1 -1
  3. package/dist/cjs/card-manager_3.cjs.entry.js +83 -13
  4. package/dist/cjs/crowdsource-manager.cjs.entry.js +27 -4
  5. package/dist/cjs/{downloadUtils-b37689dd.js → downloadUtils-37d9aaf3.js} +2 -2
  6. package/dist/cjs/{index.es-83e253dc.js → index.es-d1d9b140.js} +2 -2
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  9. package/dist/cjs/{mapViewUtils-303bf42d.js → mapViewUtils-96172223.js} +18 -0
  10. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  11. package/dist/cjs/solutions-components.cjs.js +1 -1
  12. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +30 -4
  13. package/dist/collection/components/edit-card/edit-card.js +19 -6
  14. package/dist/collection/components/layer-table/layer-table.js +56 -5
  15. package/dist/collection/components/map-card/map-card.js +34 -6
  16. package/dist/collection/utils/mapViewUtils.js +17 -0
  17. package/dist/collection/utils/mapViewUtils.ts +20 -0
  18. package/dist/components/crowdsource-manager.js +30 -5
  19. package/dist/components/edit-card2.js +19 -6
  20. package/dist/components/layer-table2.js +54 -6
  21. package/dist/components/map-card2.js +34 -7
  22. package/dist/components/map-layer-picker2.js +1 -1
  23. package/dist/components/map-select-tools2.js +1 -1
  24. package/dist/components/mapViewUtils.js +18 -1
  25. package/dist/components/public-notification.js +1 -1
  26. package/dist/components/refine-selection2.js +1 -1
  27. package/dist/esm/calcite-alert_3.entry.js +20 -6
  28. package/dist/esm/calcite-combobox_6.entry.js +1 -1
  29. package/dist/esm/card-manager_3.entry.js +83 -13
  30. package/dist/esm/crowdsource-manager.entry.js +27 -4
  31. package/dist/esm/{downloadUtils-ddd7eeb7.js → downloadUtils-76379e4a.js} +2 -2
  32. package/dist/esm/{index.es-a53707d1.js → index.es-0d134a52.js} +2 -2
  33. package/dist/esm/loader.js +1 -1
  34. package/dist/esm/map-select-tools_3.entry.js +2 -2
  35. package/dist/esm/{mapViewUtils-43c930f1.js → mapViewUtils-08f6cfce.js} +18 -1
  36. package/dist/esm/public-notification.entry.js +2 -2
  37. package/dist/esm/solutions-components.js +1 -1
  38. package/dist/solutions-components/{p-05ba41f9.js → p-03130804.js} +1 -1
  39. package/dist/solutions-components/{p-e05cf92d.entry.js → p-0f50087e.entry.js} +2 -2
  40. package/dist/solutions-components/{p-f2194390.js → p-15070568.js} +1 -1
  41. package/dist/solutions-components/{p-4792005c.entry.js → p-1682bd0f.entry.js} +1 -1
  42. package/dist/solutions-components/p-63867402.entry.js +6 -0
  43. package/dist/solutions-components/{p-50a3a887.entry.js → p-81a0c88f.entry.js} +1 -1
  44. package/dist/solutions-components/{p-978a26b3.entry.js → p-9800e602.entry.js} +1 -1
  45. package/dist/solutions-components/{p-b745143d.js → p-b02eb8f4.js} +2 -2
  46. package/dist/solutions-components/p-eba875d9.entry.js +6 -0
  47. package/dist/solutions-components/solutions-components.esm.js +1 -1
  48. package/dist/solutions-components/utils/mapViewUtils.ts +20 -0
  49. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +10 -0
  50. package/dist/types/components/edit-card/edit-card.d.ts +5 -1
  51. package/dist/types/components/layer-table/layer-table.d.ts +24 -0
  52. package/dist/types/components/map-card/map-card.d.ts +14 -0
  53. package/dist/types/utils/mapViewUtils.d.ts +9 -0
  54. package/package.json +1 -1
  55. package/dist/esm/polyfills/core-js.js +0 -11
  56. package/dist/esm/polyfills/dom.js +0 -79
  57. package/dist/esm/polyfills/es5-html-element.js +0 -1
  58. package/dist/esm/polyfills/index.js +0 -34
  59. package/dist/esm/polyfills/system.js +0 -6
  60. package/dist/solutions-components/p-506db776.entry.js +0 -6
  61. package/dist/solutions-components/p-80243d29.entry.js +0 -6
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
7
  import { e as ESelectionMode, b as EDrawMode, E as EWorkflowType } from './interfaces.js';
8
- import { d as getFeatureLayerView, e as getIdSets, f as highlightAllFeatures } from './mapViewUtils.js';
8
+ import { e as getFeatureLayerView, f as getIdSets, i as highlightAllFeatures } from './mapViewUtils.js';
9
9
  import { d as queryFeaturesByGeometry } from './queryUtils.js';
10
10
  import { s as state } from './publicNotificationStore.js';
11
11
  import { g as getLocaleComponentStrings } from './locale.js';
@@ -14,10 +14,12 @@ import { g as getBreakpoints } from './responsive-4d7ef153.js';
14
14
  import { c as createObserver } from './observers-115d1b4b.js';
15
15
  import { l as loadModules } from './loadModules-687a30c5.js';
16
16
  import { g as getLocaleComponentStrings } from './locale-6be4e8f0.js';
17
+ import { k as getAllLayers } from './mapViewUtils-08f6cfce.js';
17
18
  import './guid-99d025c6.js';
18
19
  import './resources-bb8600a6.js';
19
20
  import './key-5ab69c42.js';
20
21
  import './_commonjsHelpers-d5f9d613.js';
22
+ import './interfaces-7470d906.js';
21
23
 
22
24
  /*!
23
25
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
@@ -354,7 +356,7 @@ const EditCard = class {
354
356
  var _a;
355
357
  if (v && ((_a = this.graphics) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.graphicIndex > -1) {
356
358
  this._editorLoading = true;
357
- this._initEditorWidget();
359
+ await this._initEditorWidget();
358
360
  if (this.graphicIndex > -1 && this.graphics.length > 0 && this.open && !this._shouldClose) {
359
361
  await this._startUpdate();
360
362
  }
@@ -436,19 +438,24 @@ const EditCard = class {
436
438
  *
437
439
  * @returns void
438
440
  */
439
- _initEditorWidget() {
441
+ async _initEditorWidget() {
440
442
  if (this.mapView && this.graphics && this.graphics.length > 0 && this.graphics[0]) {
441
443
  if (this._editor) {
442
444
  this._editor.destroy();
443
445
  }
444
446
  const container = document.createElement("div");
447
+ const layers = await getAllLayers(this.mapView);
448
+ const layerInfos = layers.map(layer => {
449
+ return {
450
+ layer,
451
+ geometryUpdatesEnabled: false,
452
+ addEnabled: false
453
+ };
454
+ });
445
455
  this._editor = new this.Editor({
446
456
  allowedWorkflows: "update",
447
457
  view: this.mapView,
448
- layerInfos: [{
449
- layer: this._layer,
450
- geometryUpdatesEnabled: false
451
- }],
458
+ layerInfos,
452
459
  visibleElements: {
453
460
  snappingControls: false,
454
461
  sketchTooltipControls: false
@@ -459,6 +466,7 @@ const EditCard = class {
459
466
  this._editHandle.remove();
460
467
  this._attachmentHandle.remove();
461
468
  this._activeWorkflowHandle.remove();
469
+ this._addRelatedRecordHandle.remove();
462
470
  }
463
471
  this._attachmentHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "adding-attachment" ||
464
472
  this._editor.viewModel.state === "editing-attachment" ||
@@ -478,6 +486,12 @@ const EditCard = class {
478
486
  this._shouldClose = false;
479
487
  }
480
488
  });
489
+ // Temp workaround until a new prop is added at 4.29
490
+ this._addRelatedRecordHandle = this.reactiveUtils.when(() => !!this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks, () => {
491
+ this._editor.viewModel.featureFormViewModel.relatedRecordCallbacks.addRelatedRecord = null;
492
+ }, {
493
+ once: true
494
+ });
481
495
  // had issues with destroy before adding like this
482
496
  this._editContainer.appendChild(container);
483
497
  }
@@ -21,7 +21,7 @@ import { d as debounce } from './debounce-229b1a22.js';
21
21
  import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-94095778.js';
22
22
  import { i as isActivationKey } from './key-5ab69c42.js';
23
23
  import { g as getLocaleComponentStrings } from './locale-6be4e8f0.js';
24
- import { k as getMapLayerHash, l as getMapTableHash } from './mapViewUtils-43c930f1.js';
24
+ import { l as getMapLayerHash, m as getMapTableHash } from './mapViewUtils-08f6cfce.js';
25
25
  import { s as state } from './publicNotificationStore-f25d1e95.js';
26
26
  import './resources-bb8600a6.js';
27
27
  import './browser-b8a2c2d7.js';
@@ -5,9 +5,9 @@
5
5
  */
6
6
  import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-0740c914.js';
7
7
  import { g as getLocaleComponentStrings } from './locale-6be4e8f0.js';
8
- import { q as queryFeaturesByID, a as getLayerOrTable, g as goToSelection, b as queryAllIds } from './mapViewUtils-43c930f1.js';
8
+ import { q as queryFeaturesByID, a as getLayerOrTable, g as goToSelection, b as queryAllIds } from './mapViewUtils-08f6cfce.js';
9
9
  import { l as loadModules } from './loadModules-687a30c5.js';
10
- import { d as downloadCSV } from './downloadUtils-ddd7eeb7.js';
10
+ import { d as downloadCSV } from './downloadUtils-76379e4a.js';
11
11
  import './_commonjsHelpers-d5f9d613.js';
12
12
  import './interfaces-7470d906.js';
13
13
  import './clean-url-bce022e6.js';
@@ -149,6 +149,32 @@ const LayerTable = class {
149
149
  // Watch handlers
150
150
  //
151
151
  //--------------------------------------------------------------------------
152
+ /**
153
+ * Reset the toolInfos when zoom tool is enabled/disabled
154
+ */
155
+ enableZoomWatchHandler() {
156
+ var _a;
157
+ if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
158
+ this._initToolInfos();
159
+ }
160
+ }
161
+ /**
162
+ * Reset the toolInfos when export csv is enabled/disabled
163
+ */
164
+ enableCSVWatchHandler() {
165
+ var _a;
166
+ if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
167
+ this._initToolInfos();
168
+ }
169
+ }
170
+ /**
171
+ * Update the table when enableInlineEdit is enabled/disabled
172
+ */
173
+ enableInlineEditWatchHandler() {
174
+ if (this._table) {
175
+ this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
176
+ }
177
+ }
152
178
  /**
153
179
  * watch for changes to the list of controls that will currently fit in the display
154
180
  */
@@ -352,7 +378,7 @@ const LayerTable = class {
352
378
  * @returns void
353
379
  */
354
380
  _validateEnabledActions() {
355
- const featuresSelected = this._selectedIndexes.length > 0;
381
+ const featuresSelected = this._featuresSelected();
356
382
  const selectionDependant = [
357
383
  "zoom-to-object",
358
384
  "trash",
@@ -374,8 +400,8 @@ const LayerTable = class {
374
400
  */
375
401
  _initToolInfos() {
376
402
  var _a;
377
- const featuresSelected = this._selectedIndexes.length > 0;
378
- const featuresEmpty = this._allIds.length === 0;
403
+ const featuresSelected = this._featuresSelected();
404
+ const featuresEmpty = this._featuresEmpty();
379
405
  this._toolInfos = [this.enableZoom ? {
380
406
  icon: "zoom-to-object",
381
407
  label: this._translations.zoom,
@@ -437,6 +463,22 @@ const LayerTable = class {
437
463
  } : undefined];
438
464
  this._defaultVisibleToolSizeInfos = undefined;
439
465
  }
466
+ /**
467
+ * Returns true when one ore more features are selected
468
+ *
469
+ * @returns boolean
470
+ */
471
+ _featuresSelected() {
472
+ return this._selectedIndexes.length > 0;
473
+ }
474
+ /**
475
+ * Return true when we have no features
476
+ *
477
+ * @returns boolean
478
+ */
479
+ _featuresEmpty() {
480
+ return this._allIds.length === 0;
481
+ }
440
482
  /**
441
483
  * Add/Remove tools from the action bar and dropdown based on available size
442
484
  *
@@ -665,7 +707,7 @@ const LayerTable = class {
665
707
  // https://github.com/Esri/solutions-components/issues/365
666
708
  this._selectedIndexes = this._table.highlightIds.toArray().reverse();
667
709
  if (this._showOnlySelected) {
668
- if (this._selectedIndexes.length > 0) {
710
+ if (this._featuresSelected()) {
669
711
  this._table.filterBySelection();
670
712
  }
671
713
  else {
@@ -915,7 +957,7 @@ const LayerTable = class {
915
957
  async _layerSelectionChanged(evt) {
916
958
  var _a;
917
959
  const id = evt.detail[0];
918
- if (id !== ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id) || this._allIds.length === 0) {
960
+ if (id !== ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id) || this._featuresEmpty()) {
919
961
  this._fetchingData = true;
920
962
  const layer = await getLayerOrTable(this.mapView, id);
921
963
  await layer.when(() => {
@@ -972,6 +1014,9 @@ const LayerTable = class {
972
1014
  }
973
1015
  get el() { return getElement(this); }
974
1016
  static get watchers() { return {
1017
+ "enableZoom": ["enableZoomWatchHandler"],
1018
+ "enableCSV": ["enableCSVWatchHandler"],
1019
+ "enableInlineEdit": ["enableInlineEditWatchHandler"],
975
1020
  "_controlsThatFit": ["_controlsThatFitWatchHandler"],
976
1021
  "mapView": ["mapViewWatchHandler"],
977
1022
  "_layer": ["_layerWatchHandler"],
@@ -1005,6 +1050,17 @@ const MapCard = class {
1005
1050
  this._searchConfiguration = undefined;
1006
1051
  this._webMapInfo = undefined;
1007
1052
  }
1053
+ //--------------------------------------------------------------------------
1054
+ //
1055
+ // Watch handlers
1056
+ //
1057
+ //--------------------------------------------------------------------------
1058
+ /**
1059
+ * Add/remove home widget
1060
+ */
1061
+ enableHomeWatchHandler() {
1062
+ this._initHome();
1063
+ }
1008
1064
  /**
1009
1065
  * Listen for changes to map info and load the appropriate map
1010
1066
  */
@@ -1079,12 +1135,7 @@ const MapCard = class {
1079
1135
  this._searchConfiguration = this._webMapInfo.searchConfiguration;
1080
1136
  this.beforeMapChanged.emit();
1081
1137
  await this.mapView.when(() => {
1082
- if (this.enableHome) {
1083
- const home = new this.Home({
1084
- view: this.mapView
1085
- });
1086
- this.mapView.ui.add(home, { position: "top-left", index: 3 });
1087
- }
1138
+ this._initHome();
1088
1139
  this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
1089
1140
  this.mapChanged.emit({
1090
1141
  id: id,
@@ -1093,7 +1144,26 @@ const MapCard = class {
1093
1144
  });
1094
1145
  }
1095
1146
  }
1147
+ /**
1148
+ * Add/remove the home widget base on enableHome prop
1149
+ *
1150
+ * @protected
1151
+ */
1152
+ _initHome() {
1153
+ if (this.enableHome) {
1154
+ this._homeWidget = new this.Home({
1155
+ view: this.mapView
1156
+ });
1157
+ this.mapView.ui.add(this._homeWidget, { position: "top-left", index: 3 });
1158
+ }
1159
+ else if (this._homeWidget) {
1160
+ this.mapView.ui.remove(this._homeWidget);
1161
+ }
1162
+ }
1096
1163
  get el() { return getElement(this); }
1164
+ static get watchers() { return {
1165
+ "enableHome": ["enableHomeWatchHandler"]
1166
+ }; }
1097
1167
  };
1098
1168
  MapCard.style = mapCardCss;
1099
1169
 
@@ -48,6 +48,12 @@ const CrowdsourceManager = class {
48
48
  // Watch handlers
49
49
  //
50
50
  //--------------------------------------------------------------------------
51
+ /**
52
+ * When true the map zoom tools will be available
53
+ */
54
+ enableZoomWatchHandler() {
55
+ this._initMapZoom();
56
+ }
51
57
  //--------------------------------------------------------------------------
52
58
  //
53
59
  // Methods (public)
@@ -330,14 +336,28 @@ const CrowdsourceManager = class {
330
336
  * @protected
331
337
  */
332
338
  _setMapView() {
333
- var _a, _b;
334
339
  this._mapInfo = this._getMapInfo(this._mapChange.id);
335
340
  this._mapView = this._mapChange.mapView;
336
- if (!this.enableZoom && ((_b = (_a = this._mapView) === null || _a === void 0 ? void 0 : _a.ui) === null || _b === void 0 ? void 0 : _b.components.indexOf("zoom")) > -1) {
337
- this._mapView.ui.components = this._mapView.ui.components.filter(c => c !== "zoom");
338
- }
341
+ this._initMapZoom();
339
342
  this._mapView.popupEnabled = false;
340
343
  }
344
+ /**
345
+ * Add/remove zoom tools based on enableZoom prop
346
+ *
347
+ * @protected
348
+ */
349
+ _initMapZoom() {
350
+ if (!this.enableZoom) {
351
+ this._mapView.ui.remove("zoom");
352
+ }
353
+ else if (this.enableZoom) {
354
+ this._mapView.ui.add({
355
+ component: "zoom",
356
+ position: "top-left",
357
+ index: 0
358
+ });
359
+ }
360
+ }
341
361
  /**
342
362
  * Fetches the component's translations
343
363
  *
@@ -349,6 +369,9 @@ const CrowdsourceManager = class {
349
369
  this._translations = messages[0];
350
370
  }
351
371
  get el() { return getElement(this); }
372
+ static get watchers() { return {
373
+ "enableZoom": ["enableZoomWatchHandler"]
374
+ }; }
352
375
  };
353
376
  CrowdsourceManager.style = crowdsourceManagerCss;
354
377
 
@@ -6,7 +6,7 @@
6
6
  import { c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
7
7
  import { a as getAssetPath } from './index-0740c914.js';
8
8
  import { l as loadModules } from './loadModules-687a30c5.js';
9
- import { q as queryFeaturesByID } from './mapViewUtils-43c930f1.js';
9
+ import { q as queryFeaturesByID } from './mapViewUtils-08f6cfce.js';
10
10
  import { _ as __assign$1, r as request, c as cleanUrl } from './clean-url-bce022e6.js';
11
11
 
12
12
  /** @license
@@ -1506,7 +1506,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
1506
1506
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1507
1507
  * ====================================================================
1508
1508
  */
1509
- function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-a53707d1.js')).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
1509
+ function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-0d134a52.js')).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
1510
1510
  /** ====================================================================
1511
1511
  * @license
1512
1512
  * jsPDF XMP metadata plugin
@@ -4,11 +4,11 @@
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
6
  import { a as commonjsGlobal, c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
7
- import { _ as _typeof_1 } from './downloadUtils-ddd7eeb7.js';
7
+ import { _ as _typeof_1 } from './downloadUtils-76379e4a.js';
8
8
  import './index-0740c914.js';
9
9
  import './loadModules-687a30c5.js';
10
10
  import './locale-6be4e8f0.js';
11
- import './mapViewUtils-43c930f1.js';
11
+ import './mapViewUtils-08f6cfce.js';
12
12
  import './interfaces-7470d906.js';
13
13
  import './clean-url-bce022e6.js';
14
14