@esri/solutions-components 5.1.0-next.100 → 5.1.0-next.102

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 (240) hide show
  1. package/dist/cdn/24OJQL75.js +2 -0
  2. package/dist/cdn/2AXKBNIN.js +2 -0
  3. package/dist/cdn/{CEP54NLT.js → 2C4DK6YC.js} +1 -1
  4. package/dist/cdn/2HGZUNIC.js +2 -0
  5. package/dist/cdn/{E63XW5PH.js → 3NPBN2B4.js} +1 -1
  6. package/dist/cdn/{HHVIWWK2.js → 45UNI2VP.js} +2 -2
  7. package/dist/cdn/4SPIPOYO.js +2 -0
  8. package/dist/cdn/5LX6ROQC.js +384 -0
  9. package/dist/cdn/64ZLSOK3.js +2 -0
  10. package/dist/cdn/{MVYIHKFK.js → 66BZFR5Z.js} +1 -1
  11. package/dist/cdn/{ULTK7DMM.js → 6GOYDVLJ.js} +1 -1
  12. package/dist/cdn/{IVSYM7YY.js → 6UTDTBHM.js} +1 -1
  13. package/dist/cdn/{76APML4N.js → 76OYXG7R.js} +1 -1
  14. package/dist/cdn/{XKFPWKMX.js → 7EPZDMA2.js} +1 -1
  15. package/dist/cdn/{7SJP3QTP.js → 7SFTLJTV.js} +1 -1
  16. package/dist/cdn/7X5K32QE.js +2 -0
  17. package/dist/cdn/{AY6K2SJI.js → A2SX6EF7.js} +1 -1
  18. package/dist/cdn/{2MK34V3V.js → ADTHTFGI.js} +1 -1
  19. package/dist/cdn/{IEKNRCBC.js → AFMPPVMO.js} +1 -1
  20. package/dist/cdn/{TFZ2AK22.js → ANZVLZYR.js} +1 -1
  21. package/dist/cdn/{VG6ML5VK.js → AO3QYZNQ.js} +1 -1
  22. package/dist/cdn/AOTEIDXK.js +2 -0
  23. package/dist/cdn/{X23TE3BV.js → AYO5GP4M.js} +1 -1
  24. package/dist/cdn/{DHPZIFHE.js → B4EWPUMU.js} +1 -1
  25. package/dist/cdn/{74OJ22BW.js → BELRJU3A.js} +1 -1
  26. package/dist/cdn/{ZS6XB5WK.js → BYU5RVVM.js} +1 -1
  27. package/dist/cdn/{J3MAWMYQ.js → CNY6H6U2.js} +1 -1
  28. package/dist/cdn/{44R32SU3.js → CZZN3R4F.js} +1 -1
  29. package/dist/cdn/{ZYCAAXQF.js → DINEURA2.js} +1 -1
  30. package/dist/cdn/{W6E3DYEQ.js → EW4O5UX4.js} +1 -1
  31. package/dist/cdn/{E6YARJM2.js → G4OMMOS4.js} +1 -1
  32. package/dist/cdn/GKT3GU2L.js +2 -0
  33. package/dist/cdn/GU4QAZMD.js +2 -0
  34. package/dist/cdn/{7RFQ7MW2.js → IGIHPCRS.js} +1 -1
  35. package/dist/cdn/{CRFLICFH.js → IIOO4ABM.js} +1 -1
  36. package/dist/cdn/{V3YTRV33.js → JMVHSWQR.js} +1 -1
  37. package/dist/cdn/JPJ2PWRJ.js +2 -0
  38. package/dist/cdn/{2PM224B6.js → JUJ5KUGK.js} +1 -1
  39. package/dist/cdn/{UUPARGLA.js → LYNVZ7EL.js} +1 -1
  40. package/dist/cdn/{NBPM6OJQ.js → MSEGWVWC.js} +19 -19
  41. package/dist/cdn/{66NSOJUX.js → MT2QHKUQ.js} +1 -1
  42. package/dist/cdn/{DJFXVUF7.js → N3FJFS6W.js} +1 -1
  43. package/dist/cdn/{GSK7CUMC.js → NBJK6Z7L.js} +1 -1
  44. package/dist/cdn/{R3QHE3VT.js → O5PAINAH.js} +1 -1
  45. package/dist/cdn/O7TCCL6B.js +2 -0
  46. package/dist/cdn/P2QWXLFJ.js +2 -0
  47. package/dist/cdn/{Q6XLTRMA.js → P76UNULK.js} +1 -1
  48. package/dist/cdn/{OIRNHTN3.js → PCZFIXAY.js} +1 -1
  49. package/dist/cdn/{OG6IMWBH.js → PDE6N2YM.js} +1 -1
  50. package/dist/cdn/{U77O2MIG.js → PQPNCADS.js} +1 -1
  51. package/dist/cdn/{KH2WXNMT.js → RQIBNHBN.js} +1 -1
  52. package/dist/cdn/{4QJK4LPR.js → S7ZM2RFD.js} +1 -1
  53. package/dist/cdn/{HNVWONX2.js → SKUGEKDV.js} +1 -1
  54. package/dist/cdn/{2ASJ2RMU.js → SR53JCI4.js} +1 -1
  55. package/dist/cdn/{LOINOBXI.js → TDY54Z67.js} +1 -1
  56. package/dist/cdn/{2HLILJFJ.js → TS7GYVPR.js} +1 -1
  57. package/dist/cdn/{HM4YDFBC.js → TWO6FJHP.js} +1 -1
  58. package/dist/cdn/UUGWRXGN.js +2 -0
  59. package/dist/cdn/{Y3PCMVG7.js → UUMJMH3T.js} +1 -1
  60. package/dist/cdn/VB5C4Z27.js +2 -0
  61. package/dist/cdn/VK6ZOC6A.js +2 -0
  62. package/dist/cdn/WNH3PY6X.js +2 -0
  63. package/dist/cdn/{J75MHJID.js → WU7QCA5H.js} +1 -1
  64. package/dist/cdn/{VLBW4YNM.js → WZ22NICV.js} +1 -1
  65. package/dist/cdn/{DQWJUYMM.js → XF533XOH.js} +1 -1
  66. package/dist/cdn/{YOAGUXW6.js → XKMN6N5I.js} +1 -1
  67. package/dist/cdn/{QZRJRLYA.js → XMHHBXM6.js} +1 -1
  68. package/dist/cdn/{RG2D7ZRS.js → Y2ROEEOX.js} +2 -2
  69. package/dist/cdn/{D5FLGJ5G.js → YXJJ5QPI.js} +1 -1
  70. package/dist/cdn/{3RJKHADA.js → ZPOWEU76.js} +1 -1
  71. package/dist/cdn/{6ENQ42XY.js → ZT5TOVYM.js} +1 -1
  72. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.en.json +1 -1
  73. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.json +1 -1
  74. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ar.json +1 -1
  75. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
  76. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
  77. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
  78. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
  79. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
  80. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
  81. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
  82. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.en.json +1 -1
  83. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
  84. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
  85. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
  86. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
  87. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
  88. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
  89. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
  90. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
  91. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
  92. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
  93. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.json +1 -1
  94. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
  95. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
  96. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
  97. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
  98. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
  99. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
  100. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
  101. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
  102. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
  103. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
  104. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
  105. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
  106. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
  107. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
  108. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
  109. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
  110. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
  111. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
  112. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
  113. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
  114. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.json +1 -1
  115. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.en.json +1 -1
  116. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.json +1 -1
  117. package/dist/cdn/index.js +1 -1
  118. package/dist/chunks/CardsFetcher.js +287 -0
  119. package/dist/chunks/cardFetchingUtils.js +22 -304
  120. package/dist/chunks/cardsHelpers.js +6 -6
  121. package/dist/chunks/converter.js +72 -28
  122. package/dist/chunks/downloadUtils.js +246 -235
  123. package/dist/chunks/helpers.js +38 -43
  124. package/dist/chunks/interfaces.js +1 -1
  125. package/dist/chunks/popupUtils.js +2 -2
  126. package/dist/chunks/queryUtils.js +3 -3
  127. package/dist/chunks/solutions-deploy-app-nav.js +1 -1
  128. package/dist/components/arcgis-solutions-assistant/customElement.d.ts +2 -0
  129. package/dist/components/arcgis-solutions-assistant/customElement.js +9725 -8601
  130. package/dist/components/buffer-tools/customElement.d.ts +4 -3
  131. package/dist/components/card-manager/customElement.d.ts +4 -3
  132. package/dist/components/consent-manager/customElement.d.ts +2 -2
  133. package/dist/components/create-feature/customElement.d.ts +2 -2
  134. package/dist/components/create-feature/customElement.js +13 -13
  135. package/dist/components/create-related-feature/customElement.d.ts +6 -4
  136. package/dist/components/create-related-feature/customElement.js +2 -2
  137. package/dist/components/crowdsource-reporter/customElement.d.ts +2 -2
  138. package/dist/components/crowdsource-reporter/customElement.js +4 -4
  139. package/dist/components/delete-button/customElement.d.ts +2 -2
  140. package/dist/components/delete-dialog/customElement.d.ts +2 -2
  141. package/dist/components/edit-card/customElement.d.ts +7 -5
  142. package/dist/components/edit-card/customElement.js +2 -2
  143. package/dist/components/feature-details/customElement.d.ts +7 -6
  144. package/dist/components/feature-details/customElement.js +2 -2
  145. package/dist/components/feature-list/customElement.d.ts +4 -3
  146. package/dist/components/feature-list/customElement.js +3 -3
  147. package/dist/components/field-selection/customElement.d.ts +6 -4
  148. package/dist/components/info-card/customElement.d.ts +6 -5
  149. package/dist/components/info-card/customElement.js +2 -2
  150. package/dist/components/layer-list/customElement.d.ts +2 -2
  151. package/dist/components/layer-list/customElement.js +2 -2
  152. package/dist/components/layer-list-widget/customElement.d.ts +4 -3
  153. package/dist/components/layer-list-widget/customElement.js +1 -1
  154. package/dist/components/layer-table/customElement.d.ts +4 -3
  155. package/dist/components/layer-table/customElement.js +5 -5
  156. package/dist/components/map-basemap-gallery/customElement.d.ts +4 -3
  157. package/dist/components/map-basemap-gallery/customElement.js +2 -2
  158. package/dist/components/map-card/customElement.d.ts +7 -5
  159. package/dist/components/map-card/customElement.js +4 -4
  160. package/dist/components/map-draw-tools/customElement.d.ts +10 -6
  161. package/dist/components/map-draw-tools/customElement.js +3 -3
  162. package/dist/components/map-floor-filter/customElement.d.ts +4 -3
  163. package/dist/components/map-floor-filter/customElement.js +2 -2
  164. package/dist/components/map-fullscreen/customElement.d.ts +4 -3
  165. package/dist/components/map-fullscreen/customElement.js +2 -2
  166. package/dist/components/map-layer-picker/customElement.d.ts +2 -2
  167. package/dist/components/map-legend/customElement.d.ts +4 -3
  168. package/dist/components/map-legend/customElement.js +1 -1
  169. package/dist/components/map-search/customElement.d.ts +4 -3
  170. package/dist/components/map-search/customElement.js +2 -2
  171. package/dist/components/map-select-tools/customElement.d.ts +13 -8
  172. package/dist/components/map-select-tools/customElement.js +5 -5
  173. package/dist/components/map-tools/customElement.d.ts +6 -4
  174. package/dist/components/map-tools/customElement.js +2 -2
  175. package/dist/components/pdf-download/customElement.d.ts +3 -3
  176. package/dist/components/public-notification/customElement.d.ts +10 -6
  177. package/dist/components/public-notification/customElement.js +154 -70
  178. package/dist/components/refine-selection/customElement.d.ts +15 -9
  179. package/dist/components/refine-selection/customElement.js +2 -2
  180. package/dist/components/selection-tool/customElement.d.ts +2 -2
  181. package/dist/components/selection-tool/customElement.js +2 -2
  182. package/dist/components/solution-builder-assistant/customElement.js +57 -57
  183. package/dist/components/solution-configure-titles/customElement.js +1 -1
  184. package/dist/components/solution-delete-dialog/customElement.js +1 -1
  185. package/dist/components/solution-deployed-card-panel/customElement.d.ts +2 -0
  186. package/dist/components/solution-deployed-card-panel/customElement.js +51 -39
  187. package/dist/components/solution-details-card/customElement.js +26 -26
  188. package/dist/components/solution-details-panel/customElement.js +67 -63
  189. package/dist/components/solution-item-accordion/customElement.js +7 -8
  190. package/dist/components/solution-resource-card/customElement.js +1 -1
  191. package/dist/components/solution-snapshot-gallery/customElement.js +1 -1
  192. package/dist/components/solution-social-share/customElement.js +2 -2
  193. package/dist/components/solutions-all-panel/customElement.js +6 -5
  194. package/dist/components/solutions-deploy-app/customElement.js +3 -2
  195. package/dist/components/solutions-deployed-list/customElement.d.ts +10 -6
  196. package/dist/components/solutions-deployed-list/customElement.js +40 -18
  197. package/dist/components/solutions-deployed-list/index.js +2 -0
  198. package/dist/components/solutions-deployed-panel/customElement.js +8 -7
  199. package/dist/components/solutions-deployed-shell/customElement.js +1 -1
  200. package/dist/components/solutions-filter-panel/customElement.js +1 -1
  201. package/dist/components/solutions-searchsort-toolbar/customElement.js +1 -1
  202. package/dist/docs/api.json +1 -1
  203. package/dist/docs/docs.json +1 -1
  204. package/dist/docs/vscode.html-custom-data.json +1 -1
  205. package/dist/docs/web-types.json +1 -1
  206. package/dist/loader.js +3 -3
  207. package/dist/solutions-components_commit.txt +7 -7
  208. package/dist/types/lumina.d.ts +2 -2
  209. package/dist/types/preact.d.ts +2 -2
  210. package/dist/types/react.d.ts +2 -2
  211. package/dist/types/stencil.d.ts +2 -2
  212. package/dist/utils/Auth.d.ts +2 -2
  213. package/dist/utils/interfaces.d.ts +27 -27
  214. package/package.json +1 -1
  215. package/dist/cdn/2R3HJ764.js +0 -2
  216. package/dist/cdn/5AGYVY7S.js +0 -2
  217. package/dist/cdn/AWQQ3CNF.js +0 -2
  218. package/dist/cdn/C47FRSF6.js +0 -2
  219. package/dist/cdn/C6KN2U7N.js +0 -2
  220. package/dist/cdn/DOK6WZN3.js +0 -2
  221. package/dist/cdn/DRXERUDE.js +0 -2
  222. package/dist/cdn/ESBPGZRY.js +0 -2
  223. package/dist/cdn/J6LCEXM3.js +0 -2
  224. package/dist/cdn/J6MVIDTT.js +0 -2
  225. package/dist/cdn/JSJWGKKI.js +0 -2
  226. package/dist/cdn/LEBQMVF6.js +0 -2
  227. package/dist/cdn/MVJVKXZM.js +0 -2
  228. package/dist/cdn/MZXEOLNG.js +0 -2
  229. package/dist/cdn/NM7MKM5L.js +0 -2
  230. package/dist/cdn/TSEG3YWM.js +0 -359
  231. /package/dist/cdn/{HMKJYAVE.js → 2KSTM3IP.js} +0 -0
  232. /package/dist/cdn/{J5FYHTE4.js → 6S56JAXB.js} +0 -0
  233. /package/dist/cdn/{6WQK4DHL.js → 7JOL6EOJ.js} +0 -0
  234. /package/dist/cdn/{ZDLTST3A.js → FB2RD4BK.js} +0 -0
  235. /package/dist/cdn/{3JGLETSR.js → IRQKL5IM.js} +0 -0
  236. /package/dist/cdn/{34EUIYLN.js → ITM5SR7G.js} +0 -0
  237. /package/dist/cdn/{6MP2RVUK.js → SITXFSGP.js} +0 -0
  238. /package/dist/cdn/{QAMVNRII.js → W5VSVSIV.js} +0 -0
  239. /package/dist/cdn/{YVNP437O.js → WV7QX3ED.js} +0 -0
  240. /package/dist/cdn/{6IIMJC5D.js → XMLWS6XC.js} +0 -0
@@ -1,27 +1,27 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { jsPDF as R } from "jspdf";
3
- import { g as z } from "./runtime.js";
4
- import { a as k } from "./queryUtils.js";
5
- import { Sanitizer as G } from "@esri/arcgis-html-sanitizer";
6
- import * as A from "@esri/solution-common";
7
- import * as I from "@arcgis/core/arcade";
8
- import * as S from "@arcgis/core/intl";
9
- function $(s, t) {
2
+ import { jsPDF as k } from "jspdf";
3
+ import { g as G } from "./runtime.js";
4
+ import { a as W } from "./queryUtils.js";
5
+ import { Sanitizer as $ } from "@esri/arcgis-html-sanitizer";
6
+ import * as I from "@esri/solution-common";
7
+ import * as S from "@arcgis/core/arcade.js";
8
+ import * as j from "@arcgis/core/intl.js";
9
+ function H(s, t) {
10
10
  const e = document.createElement("a");
11
11
  e.download !== void 0 && (e.href = URL.createObjectURL(new Blob([decodeURIComponent("%ef%bb%bf"), t.join("")], { type: "text/csv;charset=utf-8;" })), e.download = `${s}.csv` || "export.csv", e.style.visibility = "hidden", document.body.appendChild(e), e.click(), document.body.removeChild(e));
12
12
  }
13
- function W(s, t) {
13
+ function B(s, t) {
14
14
  const e = t.map(
15
15
  (i) => Object.values(i).map((o) => `"${o}"`).join(",") + `\r
16
16
  `
17
17
  );
18
- $(s, e);
18
+ H(s, e);
19
19
  }
20
- var b;
20
+ var y;
21
21
  (function(s) {
22
22
  s.A4 = "A4", s.ANSI_A = "ANSI A";
23
- })(b || (b = {}));
24
- class v {
23
+ })(y || (y = {}));
24
+ class D {
25
25
  // Properties are public for testing purposes
26
26
  dataPath = "";
27
27
  lang = "en";
@@ -50,7 +50,7 @@ class v {
50
50
  }
51
51
  };
52
52
  pageOptions = {
53
- pageType: b.ANSI_A,
53
+ pageType: y.ANSI_A,
54
54
  width: 8.5,
55
55
  height: 11,
56
56
  leftMargin: 0.25,
@@ -101,13 +101,13 @@ class v {
101
101
  * @class PDFCreator
102
102
  */
103
103
  static getPageSize(t) {
104
- switch (typeof t == "string" && (t = t === b.A4 ? b.A4 : b.ANSI_A), t) {
105
- case b.A4:
104
+ switch (typeof t == "string" && (t = t === y.A4 ? y.A4 : y.ANSI_A), t) {
105
+ case y.A4:
106
106
  return {
107
107
  width: 8.25,
108
108
  height: 11.708333
109
109
  };
110
- case b.ANSI_A:
110
+ case y.ANSI_A:
111
111
  return {
112
112
  width: 8.5,
113
113
  height: 11
@@ -273,13 +273,13 @@ class v {
273
273
  /**
274
274
  * @class PDFCreator
275
275
  */
276
- async initialize(t = {}, e = "", i = "en", o = "", r = !1) {
276
+ async initialize(t = {}, e = "", i = "en", o = "", n = !1) {
277
277
  if (JSON.stringify(t) !== "{}") {
278
- this.pageOptions.pageType = t.pageType === b.A4 ? b.A4 : b.ANSI_A;
279
- const n = v.getPageSize(this.pageOptions.pageType);
280
- this.pageOptions.width = n.width, this.pageOptions.height = n.height, this.pageOptions.leftMargin = t.leftMargin ?? this.pageOptions.leftMargin, this.pageOptions.rightMargin = t.rightMargin ?? this.pageOptions.rightMargin, this.pageOptions.topMargin = t.topMargin ?? this.pageOptions.topMargin, this.pageOptions.bottomMargin = t.bottomMargin ?? this.pageOptions.bottomMargin;
278
+ this.pageOptions.pageType = t.pageType === y.A4 ? y.A4 : y.ANSI_A;
279
+ const r = D.getPageSize(this.pageOptions.pageType);
280
+ this.pageOptions.width = r.width, this.pageOptions.height = r.height, this.pageOptions.leftMargin = t.leftMargin ?? this.pageOptions.leftMargin, this.pageOptions.rightMargin = t.rightMargin ?? this.pageOptions.rightMargin, this.pageOptions.topMargin = t.topMargin ?? this.pageOptions.topMargin, this.pageOptions.bottomMargin = t.bottomMargin ?? this.pageOptions.bottomMargin;
281
281
  }
282
- return this.dataPath = e, this.lang = i, this.title = o || "PDF Document", this.pageOptions.drawNeatline = r, Promise.resolve();
282
+ return this.dataPath = e, this.lang = i, this.title = o || "PDF Document", this.pageOptions.drawNeatline = n, Promise.resolve();
283
283
  }
284
284
  /**
285
285
  * @class PDFCreator
@@ -327,7 +327,7 @@ class v {
327
327
  this.lineOptions.lineProperties.thickness !== t.thickness && this.setLineWidth(t.thickness), (this.lineOptions.lineProperties.color !== t.color || this.lineOptions.lineProperties.opacity !== t.opacity) && this.setDrawColor(t.color, t.opacity), this.lineOptions.lineProperties = t;
328
328
  }
329
329
  }
330
- class H extends v {
330
+ class J extends D {
331
331
  jsDoc;
332
332
  constructor(t = null) {
333
333
  super(), this.jsDoc = t;
@@ -414,8 +414,8 @@ class H extends v {
414
414
  super.drawText(t, e);
415
415
  let i = this.pageOptions.leftMargin + this.textOptions.left;
416
416
  if (this.lang === "ar" || this.lang === "he") {
417
- const r = this.jsDoc.context2d.measureText(t).width * this.fontProps.fontResolutionInchesPerPoint;
418
- i = this.pageOptions.width - this.pageOptions.leftMargin - r - this.textOptions.left;
417
+ const n = this.jsDoc.context2d.measureText(t).width * this.fontProps.fontResolutionInchesPerPoint;
418
+ i = this.pageOptions.width - this.pageOptions.leftMargin - n - this.textOptions.left;
419
419
  }
420
420
  const o = this.pageOptions.topMargin + this.textOptions.top + this.fontAscenderBaselineHeight(this.textOptions.fontPoints);
421
421
  this.jsDoc.text(t, i, o);
@@ -435,9 +435,9 @@ class H extends v {
435
435
  /**
436
436
  * @class PDFCreator_jsPDF
437
437
  */
438
- async initialize(t = {}, e = "", i = "en", o = "", r = !1) {
439
- await super.initialize(t, e, i, o, r), this.jsDoc || (this.jsDoc = new R({
440
- format: t.pageType === b.A4 ? "a4" : "letter",
438
+ async initialize(t = {}, e = "", i = "en", o = "", n = !1) {
439
+ await super.initialize(t, e, i, o, n), this.jsDoc || (this.jsDoc = new k({
440
+ format: t.pageType === y.A4 ? "a4" : "letter",
441
441
  orientation: "portrait",
442
442
  putOnlyUsedFonts: !0,
443
443
  unit: "in"
@@ -494,7 +494,7 @@ class H extends v {
494
494
  this.jsDoc.setLineWidth(t);
495
495
  }
496
496
  }
497
- function B(s, t = {
497
+ function V(s, t = {
498
498
  numAcross: 1,
499
499
  numDown: 1,
500
500
  x0: 0,
@@ -520,7 +520,7 @@ function B(s, t = {
520
520
  lineProperties: t.lineProperties
521
521
  });
522
522
  }
523
- class J {
523
+ class U {
524
524
  // Properties are public for testing purposes
525
525
  PDFCreator;
526
526
  labelFormats;
@@ -537,38 +537,38 @@ class J {
537
537
  *
538
538
  * @class PDFLabels
539
539
  */
540
- addLabelsToDoc(t, e, i, o, r) {
541
- return new Promise((n) => {
542
- const p = e.numLabelsAcross * e.numLabelsDown;
543
- let l, a, c, h;
540
+ addLabelsToDoc(t, e, i, o, n) {
541
+ return new Promise((r) => {
542
+ const g = e.numLabelsAcross * e.numLabelsDown;
543
+ let l, a, c, p;
544
544
  const f = e.labelWidth - 2 * e.labelPadding;
545
- let O = i;
546
- const w = e.pageProperties.topMargin - this.PDFCreator.pageOptions.topMargin;
545
+ let w = i;
546
+ const b = e.pageProperties.topMargin - this.PDFCreator.pageOptions.topMargin;
547
547
  o && this.drawSupplementalText(o, 0, -0.1);
548
- for (let F = 0, g = 0; F < t.length; F++) {
549
- r && r(Math.round(F / t.length * 100));
550
- let d = t[F].map((y) => y.trim()).filter((y) => y.length > 0);
551
- if (d.length === 0)
548
+ for (let O = 0, d = 0; O < t.length; O++) {
549
+ n && n(Math.round(O / t.length * 100));
550
+ let h = t[O].map((F) => F.trim()).filter((F) => F.length > 0);
551
+ if (h.length === 0)
552
552
  continue;
553
- g % p === 0 ? (g > 0 && (this.PDFCreator.addPage(), ++O, o && this.drawSupplementalText(o, 0, -0.1)), l = 0, c = 0, a = 0) : g % e.numLabelsDown === 0 && (c = ++l * (e.labelWidth + e.horizGapIn), a = 0);
554
- const m = 4;
553
+ d % g === 0 ? (d > 0 && (this.PDFCreator.addPage(), ++w, o && this.drawSupplementalText(o, 0, -0.1)), l = 0, c = 0, a = 0) : d % e.numLabelsDown === 0 && (c = ++l * (e.labelWidth + e.horizGapIn), a = 0);
554
+ const P = 4;
555
555
  let u = e.fontSizePx;
556
- e.maxNumLabelLines < d.length && (u = Math.max(Math.floor(e.maxNumLabelLines / d.length * e.fontSizePx), m)), u = this._getFontSizeForOverlongLines(d, f, u, m), d = this._clipOverlongLines(d, f, u);
557
- const P = this.PDFCreator.fontAscenderDescenderHeight(u);
558
- h = w + a++ * (e.labelHeight + e.vertGapIn), d.forEach((y) => {
559
- this.PDFCreator.drawText(y, {
556
+ e.maxNumLabelLines < h.length && (u = Math.max(Math.floor(e.maxNumLabelLines / h.length * e.fontSizePx), P)), u = this._getFontSizeForOverlongLines(h, f, u, P), h = this._clipOverlongLines(h, f, u);
557
+ const m = this.PDFCreator.fontAscenderDescenderHeight(u);
558
+ p = b + a++ * (e.labelHeight + e.vertGapIn), h.forEach((F) => {
559
+ this.PDFCreator.drawText(F, {
560
560
  left: c + e.labelPadding,
561
- top: h + e.labelPadding,
561
+ top: p + e.labelPadding,
562
562
  fontPoints: u,
563
563
  fontColor: "000000"
564
- }), h += P;
565
- }), ++g;
564
+ }), p += m;
565
+ }), ++d;
566
566
  }
567
- r && r(100), n(O);
567
+ n && n(100), r(w);
568
568
  });
569
569
  }
570
570
  drawLabelGuidelines(t, e = null) {
571
- e !== null && B(this.PDFCreator, {
571
+ e !== null && V(this.PDFCreator, {
572
572
  // Margins in the page spec are absolute but we draw in within the margins
573
573
  x0: t.pageProperties.leftMargin - this.PDFCreator.pageOptions.leftMargin,
574
574
  y0: t.pageProperties.topMargin - this.PDFCreator.pageOptions.topMargin,
@@ -640,8 +640,8 @@ class J {
640
640
  * @class PDFLabels
641
641
  */
642
642
  removeDuplicates(t) {
643
- const i = t.filter((n) => Array.isArray(n) && n.length > 0).map((n) => n.map((p) => p.trim()).join("?")), o = {};
644
- return i.forEach((n) => o[n] = !0), Object.keys(o).sort().map((n) => n.split("?"));
643
+ const i = t.filter((r) => Array.isArray(r) && r.length > 0).map((r) => r.map((g) => g.trim()).join("?")), o = {};
644
+ return i.forEach((r) => o[r] = !0), Object.keys(o).sort().map((r) => r.split("?"));
645
645
  }
646
646
  //-- Private methods -----------------------------------------------------------------------------------------------//
647
647
  /**
@@ -657,8 +657,8 @@ class J {
657
657
  * @class PDFLabels
658
658
  * @private
659
659
  */
660
- _calculateLabelFirstLineBase(t, e, i, o, r) {
661
- return t + e / 2 + (2 - i) / 2 * o + (1 - i) / 2 * r;
660
+ _calculateLabelFirstLineBase(t, e, i, o, n) {
661
+ return t + e / 2 + (2 - i) / 2 * o + (1 - i) / 2 * n;
662
662
  }
663
663
  /**
664
664
  * Trims a set of text lines to fit within specified bounds.
@@ -673,14 +673,14 @@ class J {
673
673
  */
674
674
  _clipOverlongLines(t, e, i) {
675
675
  const o = [];
676
- return t.forEach((r) => {
677
- if (r = r.trim(), this.PDFCreator.getTextWidth(r, i) > e) {
676
+ return t.forEach((n) => {
677
+ if (n = n.trim(), this.PDFCreator.getTextWidth(n, i) > e) {
678
678
  do
679
- r = r.slice(0, -1);
680
- while (this.PDFCreator.getTextWidth(r, i) > e);
681
- r += "...";
679
+ n = n.slice(0, -1);
680
+ while (this.PDFCreator.getTextWidth(n, i) > e);
681
+ n += "...";
682
682
  }
683
- o.push(r);
683
+ o.push(n);
684
684
  }), o;
685
685
  }
686
686
  /**
@@ -697,13 +697,13 @@ class J {
697
697
  * @private
698
698
  */
699
699
  _getFontSizeForOverlongLines(t, e, i, o) {
700
- let r = i;
701
- return t.forEach((n) => {
702
- if (n = n.trim(), this.PDFCreator.getTextWidth(n, r) > e)
700
+ let n = i;
701
+ return t.forEach((r) => {
702
+ if (r = r.trim(), this.PDFCreator.getTextWidth(r, n) > e)
703
703
  do
704
- --r;
705
- while (this.PDFCreator.getTextWidth(n, r) > e && r > o);
706
- }), r;
704
+ --n;
705
+ while (this.PDFCreator.getTextWidth(r, n) > e && n > o);
706
+ }), n;
707
707
  }
708
708
  /**
709
709
  * Loads the label formats.
@@ -718,84 +718,95 @@ class J {
718
718
  return await (await fetch(t + "labelFormats.json")).json();
719
719
  }
720
720
  }
721
- function U(s, t, e, i = "", o = "") {
722
- V(s, t, e, i, o);
721
+ function q(s, t, e, i = "", o = "") {
722
+ X(s, t, e, i, o);
723
723
  }
724
- async function V(s, t, e, i = "", o = "") {
725
- const r = new H(void 0);
726
- await r.initialize(
724
+ async function X(s, t, e, i = "", o = "") {
725
+ const n = new J(void 0);
726
+ await n.initialize(
727
727
  {
728
728
  pageType: "ANSI_A"
729
729
  },
730
- z("assets/arcgis-pdf-creator/"),
730
+ G("assets/arcgis-pdf-creator/"),
731
731
  "en",
732
732
  s
733
733
  // filename without ".pdf"
734
734
  );
735
- const n = new J();
736
- await n.initialize(r);
737
- const p = e.labelSpec;
735
+ const r = new U();
736
+ await r.initialize(n);
737
+ const g = e.labelSpec;
738
738
  let l = 1;
739
739
  if (o) {
740
- const a = p.pageProperties, c = v.getPageSize(a.pageType || "");
741
- r.drawImage(o, {
742
- x: a.leftMargin || 0,
743
- y: a.topMargin || 0,
744
- width: c.width - (a.leftMargin || 0) - (a.rightMargin || 0),
745
- height: c.height - (a.topMargin || 0) - (a.bottomMargin || 0)
746
- }), i && n.drawSupplementalText(i, 0, -0.1), t.length > 0 && (r.addPage(), ++l);
740
+ const a = g.pageProperties, c = D.getPageSize(a.pageType || ""), p = 0.25, f = i ? 0.25 : 0, w = p, b = p + f, O = c.width - 2 * p, d = c.height - 2 * p - f, h = await Y(o);
741
+ let P = w, u = b, m = O, F = d;
742
+ if (h && h.width > 0 && h.height > 0 && O > 0 && d > 0) {
743
+ const L = h.width / h.height, z = O / d;
744
+ L > z ? (m = O, F = O / L, u = b + (d - F) / 2) : (F = d, m = d * L, P = w + (O - m) / 2);
745
+ }
746
+ n.drawImage(o, {
747
+ x: P,
748
+ y: u,
749
+ width: m,
750
+ height: F
751
+ }), i && r.drawSupplementalText(i, 0, -0.1), t.length > 0 && (n.addPage(), ++l);
747
752
  }
748
- await n.addLabelsToDoc(
753
+ await r.addLabelsToDoc(
749
754
  t,
750
- p,
755
+ g,
751
756
  l,
752
757
  i
753
758
  // heading
754
- ), r.save();
759
+ ), n.save();
760
+ }
761
+ async function Y(s) {
762
+ return new Promise((t) => {
763
+ const e = new Image();
764
+ e.onload = () => t({ width: e.naturalWidth, height: e.naturalHeight }), e.onerror = () => t(null), e.src = s;
765
+ });
755
766
  }
756
767
  const x = "|";
757
- async function j(s, t, e = !0, i = !1, o = !1, r = void 0, n = !1, p = !1) {
768
+ async function M(s, t, e = !0, i = !1, o = !1, n = void 0, r = !1, g = !1) {
758
769
  const l = [];
759
770
  return Object.keys(t).forEach((c) => {
760
- const h = t[c], f = h.layerView?.layer || h.layer;
771
+ const p = t[c], f = p.layerView?.layer || p.layer;
761
772
  f && l.push(
762
- it(s, f, h.ids, e, i, r, n, p)
773
+ nt(s, f, p.ids, e, i, n, r, g)
763
774
  ), o && l.push(Promise.resolve([[c]]));
764
- }), (await Promise.all(l)).reduce((c, h) => c.concat(h), []);
775
+ }), (await Promise.all(l)).reduce((c, p) => c.concat(p), []);
765
776
  }
766
- async function pt(s, t, e, i = !1, o = !1, r = void 0, n = !1, p = !1) {
767
- let l = await j(s, t, e, o, !0, r, n, p);
768
- l = i ? M(l) : l;
777
+ async function dt(s, t, e, i = !1, o = !1, n = void 0, r = !1, g = !1) {
778
+ let l = await M(s, t, e, o, !0, n, r, g);
779
+ l = i ? N(l) : l;
769
780
  const a = Object.keys(t);
770
781
  let c = [];
771
- return l.forEach((h) => {
772
- const f = h[0];
782
+ return l.forEach((p) => {
783
+ const f = p[0];
773
784
  if (a.indexOf(f) < 0)
774
- c.push(h);
785
+ c.push(p);
775
786
  else {
776
- const O = T(t, new RegExp(`\\b${f}\\b`));
777
- W(N(O), c), c = [];
787
+ const w = _(t, new RegExp(`\\b${f}\\b`));
788
+ B(E(w), c), c = [];
778
789
  }
779
790
  }), Promise.resolve();
780
791
  }
781
- async function ht(s, t, e, i = !1, o = "", r = "") {
782
- let n = await j(s, t);
783
- const p = T(t);
784
- n = // Remove empty lines in labels
785
- n.map((a) => a.filter((c) => c.length > 0)).filter((a) => a.length > 0), n = i ? M(n) : n;
786
- const l = o || N(p);
787
- return U(l, n, e, o, r), Promise.resolve();
792
+ async function gt(s, t, e, i = !1, o = "", n = "") {
793
+ let r = await M(s, t);
794
+ const g = _(t);
795
+ r = // Remove empty lines in labels
796
+ r.map((a) => a.filter((c) => c.length > 0)).filter((a) => a.length > 0), r = i ? N(r) : r;
797
+ const l = o || E(g);
798
+ return q(l, r, e, o, n), Promise.resolve();
788
799
  }
789
- function M(s) {
800
+ function N(s) {
790
801
  const t = s.map((i) => JSON.stringify(i)), e = new Set(t);
791
802
  return Array.from(e, (i) => JSON.parse(i));
792
803
  }
793
- function C(s) {
794
- for (s = s.replace(/<br\s*\/?>/gi, x), s = s.replace(/<p[^>]*>/gi, x).trim().replace(/^\|/, ""), s = s.replace(/<\/p>/gi, ""), s = s.replace(/\n/gi, "|"), s = new G().sanitize(s), s = s.replace(/<[\s.]*[^<>]*\/?>/gi, "").replace(/\xA0/gi, " ").replace(/&nbsp;/gi, " "), s = s.replace(/\s*\|\s*/g, "|"); s.match(/\|\|/); )
804
+ function A(s) {
805
+ for (s = s.replace(/<br\s*\/?>/gi, x), s = s.replace(/<p[^>]*>/gi, x).trim().replace(/^\|/, ""), s = s.replace(/<\/p>/gi, ""), s = s.replace(/\n/gi, "|"), s = new $().sanitize(s), s = s.replace(/<[\s.]*[^<>]*\/?>/gi, "").replace(/\xA0/gi, " ").replace(/&nbsp;/gi, " "), s = s.replace(/\s*\|\s*/g, "|"); s.match(/\|\|/); )
795
806
  s = s.replace(/\|\|/, "|");
796
807
  return s = s.replace(/^\|/, ""), s = s.replace(/\|$/, ""), s;
797
808
  }
798
- function D(s, t = !1) {
809
+ function v(s, t = !1) {
799
810
  const e = [];
800
811
  return s.forEach((i) => {
801
812
  (i.visible || t) && e.push(`{${i.fieldName}}`);
@@ -804,13 +815,13 @@ function D(s, t = !1) {
804
815
  format: e.join(x)
805
816
  };
806
817
  }
807
- function q(s) {
818
+ function K(s) {
808
819
  return {
809
820
  type: "pattern",
810
- format: C(s)
821
+ format: A(s)
811
822
  };
812
823
  }
813
- async function K(s) {
824
+ async function Q(s) {
814
825
  const t = {
815
826
  variables: [
816
827
  {
@@ -830,20 +841,20 @@ async function K(s) {
830
841
  type: "featureSetCollection"
831
842
  }
832
843
  ]
833
- }, e = await I.createArcadeExecutor(s.expression, t);
844
+ }, e = await S.createArcadeExecutor(s.expression, t);
834
845
  return Promise.resolve({
835
846
  type: "executor",
836
847
  format: e
837
848
  });
838
849
  }
839
- async function Q(s, t) {
850
+ async function Z(s, t) {
840
851
  const e = {};
841
852
  if (!Array.isArray(t?.popupTemplate?.expressionInfos) || t?.popupTemplate?.expressionInfos.length === 0)
842
853
  return Promise.resolve(e);
843
854
  const i = /\{expression\/\w+\}/g, o = s.match(i);
844
855
  if (!o)
845
856
  return Promise.resolve(e);
846
- const r = {
857
+ const n = {
847
858
  variables: [
848
859
  {
849
860
  name: "$feature",
@@ -862,38 +873,38 @@ async function Q(s, t) {
862
873
  type: "featureSetCollection"
863
874
  }
864
875
  ]
865
- }, n = {};
876
+ }, r = {};
866
877
  o.forEach((l) => {
867
878
  const a = l.substring(l.indexOf("/") + 1, l.length - 1);
868
879
  (t?.popupTemplate?.expressionInfos || []).forEach((c) => {
869
- c.name === a && (n[a] = I.createArcadeExecutor(c.expression, r));
880
+ c.name === a && (r[a] = S.createArcadeExecutor(c.expression, n));
870
881
  });
871
882
  });
872
- const p = Object.values(n);
873
- return Promise.all(p).then((l) => {
874
- const a = Object.keys(n);
883
+ const g = Object.values(r);
884
+ return Promise.all(g).then((l) => {
885
+ const a = Object.keys(r);
875
886
  for (let c = 0; c < a.length; ++c)
876
887
  e[a[c]] = l[c].valueOf();
877
888
  return e;
878
889
  });
879
890
  }
880
- function N(s) {
891
+ function E(s) {
881
892
  return s.length > 0 ? s.join(", ") : "download";
882
893
  }
883
- function X(s) {
894
+ function tt(s) {
884
895
  return s.split(x).map((i, o) => {
885
- const r = i.match(/\{[^\}]*\}/g);
886
- return r ? r.map((n) => n.substring(1, n.length - 1)).map((n) => n.startsWith("expression/") ? n.substring(n.indexOf("/") + 1) : n).join("__") : `column_${o + 1}`;
896
+ const n = i.match(/\{[^\}]*\}/g);
897
+ return n ? n.map((r) => r.substring(1, r.length - 1)).map((r) => r.startsWith("expression/") ? r.substring(r.indexOf("/") + 1) : r).join("__") : `column_${o + 1}`;
887
898
  });
888
899
  }
889
- function Y(s) {
900
+ function et(s) {
890
901
  const t = /\{expression\/\w+\}/g;
891
902
  return s.match(t) ?? [];
892
903
  }
893
- function Z(s, t, e, i, o) {
894
- const r = s.substring(s.lastIndexOf("/") + 1);
895
- Number.isNaN(Number.parseInt(r)) && (s += "/" + t.toString());
896
- const n = {
904
+ function it(s, t, e, i, o) {
905
+ const n = s.substring(s.lastIndexOf("/") + 1);
906
+ Number.isNaN(Number.parseInt(n)) && (s += "/" + t.toString());
907
+ const r = {
897
908
  definitionExpression: "1=1",
898
909
  httpMethod: "POST",
899
910
  objectIds: i,
@@ -901,39 +912,39 @@ function Z(s, t, e, i, o) {
901
912
  relationshipId: e,
902
913
  url: s
903
914
  };
904
- return o && (n.params = { token: o }), E(n);
915
+ return o && (r.params = { token: o }), T(r);
905
916
  }
906
- function E(s, t = [], e = 0) {
917
+ function T(s, t = [], e = 0) {
907
918
  const i = {
908
919
  ...s.params,
909
920
  resultOffset: e
910
921
  };
911
- return A.queryRelated({
922
+ return I.queryRelated({
912
923
  ...s,
913
924
  params: i
914
925
  //TODO } as IQueryRelatedOptionsOffset).then((response: IQueryRelatedResponseOffset) => {
915
- }).then((o) => (t.push(...o.relatedRecordGroups), o.exceededTransferLimit ? E(s, t, e + o.relatedRecordGroups.length) : Promise.resolve(t)));
926
+ }).then((o) => (t.push(...o.relatedRecordGroups), o.exceededTransferLimit ? T(s, t, e + o.relatedRecordGroups.length) : Promise.resolve(t)));
916
927
  }
917
- function tt(s) {
928
+ function st(s) {
918
929
  const t = [];
919
930
  let e = 0;
920
931
  for (; e < s.length; ) {
921
932
  const o = s.indexOf("{", e);
922
933
  if (o < 0)
923
934
  break;
924
- const r = s.indexOf("}", o);
925
- if (r < 0)
935
+ const n = s.indexOf("}", o);
936
+ if (n < 0)
926
937
  break;
927
- const n = s.substring(o, r + 1);
928
- t.push(n), e = r + 1;
938
+ const r = s.substring(o, n + 1);
939
+ t.push(r), e = n + 1;
929
940
  }
930
- const i = Y(s);
941
+ const i = et(s);
931
942
  return t.filter((o) => i.indexOf(o) < 0);
932
943
  }
933
- function et(s) {
944
+ function ot(s) {
934
945
  return s.map((t) => t.substring(1, t.length - 1));
935
946
  }
936
- async function L(s, t, e) {
947
+ async function C(s, t, e) {
937
948
  let i = {
938
949
  layer: t,
939
950
  attributeFormats: {},
@@ -949,189 +960,189 @@ async function L(s, t, e) {
949
960
  o.format && (i.attributeFormats[o.fieldName.toLowerCase()] = o.format);
950
961
  }
951
962
  ), e && t)) {
952
- const o = t?.popupTemplate?.content || [], r = o && o.length > 0 ? o[0]?.type : void 0;
953
- if (r === "relationship") {
954
- const n = o[0].relationshipId, p = t.relationships?.find((a) => a.id === n);
963
+ const o = t?.popupTemplate?.content || [], n = o && o.length > 0 ? o[0]?.type : void 0;
964
+ if (n === "relationship") {
965
+ const r = o[0].relationshipId, g = t.relationships?.find((a) => a.id === r);
955
966
  let l = s.layers.toArray().concat(s.tables.toArray());
956
- if (l = l.filter((a) => a.type === "feature" && a.layerId === p?.relatedTableId), l.length > 0)
957
- i = await L(s, l[0], e), i.relationshipId = n.toString();
967
+ if (l = l.filter((a) => a.type === "feature" && a.layerId === g?.relatedTableId), l.length > 0)
968
+ i = await C(s, l[0], e), i.relationshipId = r.toString();
958
969
  else {
959
970
  l = s.layers.toArray().concat(s.tables.toArray());
960
971
  const a = [];
961
972
  l = l.filter((f) => {
962
973
  if (f.type === "feature" && f.layerId != t.layerId && f.url) {
963
- const O = f.url + "/" + f?.layerId?.toString();
964
- return a.push(A.getJson(
965
- O
974
+ const w = f.url + "/" + f?.layerId?.toString();
975
+ return a.push(I.getJson(
976
+ w
966
977
  /*, authentication*/
967
978
  )), !0;
968
979
  } else
969
980
  return !1;
970
981
  });
971
982
  const c = await Promise.all(a);
972
- let h = Promise.resolve(void 0);
973
- c.some((f, O) => f.relationships && f.relationships.some((w) => w.id === n) ? (h = L(s, l[O], e), !0) : !1) ? (i = await h, i.relationshipId = n.toString()) : i.labelFormat = D(t.popupTemplate?.fieldInfos);
983
+ let p = Promise.resolve(void 0);
984
+ c.some((f, w) => f.relationships && f.relationships.some((b) => b.id === r) ? (p = C(s, l[w], e), !0) : !1) ? (i = await p, i.relationshipId = r.toString()) : i.labelFormat = v(t.popupTemplate?.fieldInfos);
974
985
  }
975
- } else r === "fields" ? (i.labelFormat = D(t.popupTemplate?.fieldInfos), i.labelFormat.format.length === 0 && (i.labelFormat = t.popupTemplate?.title && typeof t.popupTemplate?.title == "string" ? { type: "pattern", format: t.popupTemplate.title } : (
986
+ } else n === "fields" ? (i.labelFormat = v(t.popupTemplate?.fieldInfos), i.labelFormat.format.length === 0 && (i.labelFormat = t.popupTemplate?.title && typeof t.popupTemplate?.title == "string" ? { type: "pattern", format: t.popupTemplate.title } : (
976
987
  // Otherwise revert to using attributes
977
- D(t.popupTemplate?.fieldInfos, !0)
978
- ))) : r === "text" ? i.labelFormat = q(o[0].text) : r === "expression" ? i.labelFormat = await K(o[0].expressionInfo) : i.labelFormat = D(t.popupTemplate?.fieldInfos);
988
+ v(t.popupTemplate?.fieldInfos, !0)
989
+ ))) : n === "text" ? i.labelFormat = K(o[0].text) : n === "expression" ? i.labelFormat = await Q(o[0].expressionInfo) : i.labelFormat = v(t.popupTemplate?.fieldInfos);
979
990
  }
980
991
  return Promise.resolve(i);
981
992
  }
982
- function T(s, t = /.+/) {
993
+ function _(s, t = /.+/) {
983
994
  let e = [];
984
995
  return Object.keys(s).forEach((i) => {
985
996
  const o = s[i];
986
997
  t.test(i) && (e = e.concat(o.selectionSetNames));
987
998
  }), e;
988
999
  }
989
- function _(s, t, e, i, o) {
1000
+ function R(s, t, e, i, o) {
990
1001
  if (s === null || typeof s > "u")
991
1002
  return "";
992
1003
  if (e && e.type === "coded-value")
993
1004
  return e.getName(s)?.toString();
994
1005
  {
995
- let r = s;
1006
+ let n = s;
996
1007
  switch (t) {
997
1008
  case "date":
998
1009
  if (i?.dateFormat) {
999
- const n = o.convertDateFormatToIntlOptions(i.dateFormat);
1000
- r = o.formatDate(r, n);
1010
+ const r = o.convertDateFormatToIntlOptions(i.dateFormat);
1011
+ n = o.formatDate(n, r);
1001
1012
  } else
1002
- r = o.formatDate(r);
1003
- r = r.replace(/\xe2\x80\xaf/g, "");
1013
+ n = o.formatDate(n);
1014
+ n = n.replace(/\xe2\x80\xaf/g, "");
1004
1015
  break;
1005
1016
  case "date-only":
1006
1017
  if (i?.dateFormat) {
1007
- const n = o.convertDateFormatToIntlOptions(i.dateFormat);
1008
- r = o.formatDateOnly(r, n);
1018
+ const r = o.convertDateFormatToIntlOptions(i.dateFormat);
1019
+ n = o.formatDateOnly(n, r);
1009
1020
  } else
1010
- r = o.formatDateOnly(r);
1021
+ n = o.formatDateOnly(n);
1011
1022
  break;
1012
1023
  case "time-only":
1013
1024
  if (i?.dateFormat) {
1014
- const n = o.convertDateFormatToIntlOptions(i.dateFormat);
1015
- r = o.formatTimeOnly(r, n);
1025
+ const r = o.convertDateFormatToIntlOptions(i.dateFormat);
1026
+ n = o.formatTimeOnly(n, r);
1016
1027
  } else
1017
- r = o.formatTimeOnly(r);
1028
+ n = o.formatTimeOnly(n);
1018
1029
  break;
1019
1030
  case "double":
1020
1031
  case "integer":
1021
1032
  case "long":
1022
1033
  case "small-integer":
1023
1034
  if (i) {
1024
- const n = o.convertNumberFormatToIntlOptions(i);
1025
- r = o.formatNumber(r, n);
1035
+ const r = o.convertNumberFormatToIntlOptions(i);
1036
+ n = o.formatNumber(n, r);
1026
1037
  } else
1027
- r = o.formatNumber(r?.toString(), {
1038
+ n = o.formatNumber(n?.toString(), {
1028
1039
  maximumFractionDigits: 100
1029
1040
  });
1030
1041
  break;
1031
1042
  }
1032
- return r;
1043
+ return n;
1033
1044
  }
1034
1045
  }
1035
- async function it(s, t, e, i = !0, o = !1, r = [], n = !1, p = !1) {
1036
- const l = s?.portalItem?.portal?.credential?.token, a = await L(s, t, i), c = a.layer;
1037
- let h = [];
1046
+ async function nt(s, t, e, i = !0, o = !1, n = [], r = !1, g = !1) {
1047
+ const l = s?.portalItem?.portal?.credential?.token, a = await C(s, t, i), c = a.layer;
1048
+ let p = [];
1038
1049
  if (typeof a.relationshipId < "u") {
1039
- const g = await Z(t.url, t.layerId, a.relationshipId, e, l), d = [];
1040
- g.forEach((u) => {
1041
- u.relatedRecords?.forEach((P) => {
1042
- d.push(P.attributes);
1050
+ const d = await it(t.url, t.layerId, a.relationshipId, e, l), h = [];
1051
+ d.forEach((u) => {
1052
+ u.relatedRecords?.forEach((m) => {
1053
+ h.push(m.attributes);
1043
1054
  });
1044
1055
  });
1045
- const m = t.objectIdField;
1046
- if (d.sort((u, P) => u[m] < P[m] ? -1 : u[m] > P[m] ? 1 : 0), h = d.filter((u, P) => P === 0 ? !0 : u[m] !== d[P - 1][m]), h.length === 0)
1056
+ const P = t.objectIdField;
1057
+ if (h.sort((u, m) => u[P] < m[P] ? -1 : u[P] > m[P] ? 1 : 0), p = h.filter((u, m) => m === 0 ? !0 : u[P] !== h[m - 1][P]), p.length === 0)
1047
1058
  return Promise.resolve([]);
1048
1059
  } else {
1049
- const g = r.length > 0 ? r : void 0;
1050
- h = await k(e, c, [], !1, void 0, g);
1060
+ const d = n.length > 0 ? n : void 0;
1061
+ p = await W(e, c, [], !1, void 0, d);
1051
1062
  }
1052
- const f = {}, O = {}, w = {};
1053
- c.fields && r ? c.fields.forEach((g) => {
1054
- if (!p || r.indexOf((g?.name || "").toLowerCase()) > -1) {
1055
- const d = g.name.toLowerCase();
1056
- f[d] = g.name, w[d] = g.domain, O[d] = g.type;
1063
+ const f = {}, w = {}, b = {};
1064
+ c.fields && n ? c.fields.forEach((d) => {
1065
+ if (!g || n.indexOf((d?.name || "").toLowerCase()) > -1) {
1066
+ const h = d.name.toLowerCase();
1067
+ f[h] = d.name, b[h] = d.domain, w[h] = d.type;
1057
1068
  }
1058
- }) : r && Object.keys(h[0]).forEach((g) => {
1059
- if (!p || r.indexOf(g.toLowerCase()) > -1) {
1060
- const d = g.toLowerCase();
1061
- f[d] = g;
1069
+ }) : n && Object.keys(p[0]).forEach((d) => {
1070
+ if (!g || n.indexOf(d.toLowerCase()) > -1) {
1071
+ const h = d.toLowerCase();
1072
+ f[h] = d;
1062
1073
  }
1063
1074
  });
1064
- const F = a.labelFormat.type === "pattern" ? (
1075
+ const O = a.labelFormat.type === "pattern" ? (
1065
1076
  // Export attributes in format
1066
- await ot(
1077
+ await at(
1067
1078
  t,
1068
- h,
1079
+ p,
1069
1080
  f,
1070
- O,
1071
1081
  w,
1082
+ b,
1072
1083
  a.attributeFormats,
1073
1084
  a.labelFormat.format,
1074
1085
  o
1075
1086
  )
1076
1087
  ) : a.labelFormat.type === "executor" ? (
1077
1088
  // Export attributes in expression
1078
- await rt(h, a.labelFormat.format)
1089
+ await lt(p, a.labelFormat.format)
1079
1090
  ) : (
1080
1091
  // Export all attributes
1081
- await st(h, O, w, o, n)
1092
+ await rt(p, w, b, o, r)
1082
1093
  );
1083
- return Promise.resolve(F);
1094
+ return Promise.resolve(O);
1084
1095
  }
1085
- async function st(s, t, e, i = !1, o = !1) {
1086
- const r = s.map((n) => Object.keys(n.attributes).map((p) => {
1087
- const l = p.toLowerCase();
1088
- return _(n.attributes[p], t[l], e[l], void 0, S);
1096
+ async function rt(s, t, e, i = !1, o = !1) {
1097
+ const n = s.map((r) => Object.keys(r.attributes).map((g) => {
1098
+ const l = g.toLowerCase();
1099
+ return R(r.attributes[g], t[l], e[l], void 0, j);
1089
1100
  }));
1090
1101
  if (i) {
1091
- const n = [], p = s[0].attributes, l = s[0]?.layer?.fields.reduce((a, c) => (a[c.name] = c.alias, a), {});
1092
- Object.keys(p).forEach((a) => {
1093
- n.push(o && l ? l[a] : a);
1094
- }), r.unshift(n);
1102
+ const r = [], g = s[0].attributes, l = s[0]?.layer?.fields.reduce((a, c) => (a[c.name] = c.alias, a), {});
1103
+ Object.keys(g).forEach((a) => {
1104
+ r.push(o && l ? l[a] : a);
1105
+ }), n.unshift(r);
1095
1106
  }
1096
- return Promise.resolve(r);
1107
+ return Promise.resolve(n);
1097
1108
  }
1098
- async function ot(s, t, e, i, o, r, n, p = !1) {
1099
- const l = tt(n), a = et(l), c = await Q(n, s), h = /\{expression\/\w+\}/g, f = n.match(h) ?? [], O = await Promise.all(
1100
- t.map(async (w) => {
1101
- let F = n;
1102
- for (let m = 0; m < f.length; m++) {
1103
- const u = f[m], P = u.substring(u.indexOf("/") + 1, u.length - 1), y = await c[P].executeAsync({ $feature: w, $layer: s });
1104
- y && (F = F.replace(u, y).replace(/\n/gi, "|"));
1109
+ async function at(s, t, e, i, o, n, r, g = !1) {
1110
+ const l = st(r), a = ot(l), c = await Z(r, s), p = /\{expression\/\w+\}/g, f = r.match(p) ?? [], w = await Promise.all(
1111
+ t.map(async (b) => {
1112
+ let O = r;
1113
+ for (let P = 0; P < f.length; P++) {
1114
+ const u = f[P], m = u.substring(u.indexOf("/") + 1, u.length - 1), F = await c[m].executeAsync({ $feature: b, $layer: s });
1115
+ F && (O = O.replace(u, F).replace(/\n/gi, "|"));
1105
1116
  }
1106
- const g = w.attributes ?? w;
1107
- a.forEach((m, u) => {
1108
- const P = m.toLowerCase(), y = _(
1109
- g[e[P]],
1110
- i[P],
1111
- o[P],
1112
- r[P],
1113
- S
1117
+ const d = b.attributes ?? b;
1118
+ a.forEach((P, u) => {
1119
+ const m = P.toLowerCase(), F = R(
1120
+ d[e[m]],
1121
+ i[m],
1122
+ o[m],
1123
+ n[m],
1124
+ j
1114
1125
  );
1115
- F = F.replace(l[u], y);
1126
+ O = O.replace(l[u], F);
1116
1127
  });
1117
- let d = F.split(x);
1118
- return d = d.map((m) => C(m)), d;
1128
+ let h = O.split(x);
1129
+ return h = h.map((P) => A(P)), h;
1119
1130
  })
1120
1131
  );
1121
- return p && O.unshift(X(n)), Promise.resolve(O);
1132
+ return g && w.unshift(tt(r)), Promise.resolve(w);
1122
1133
  }
1123
- async function rt(s, t) {
1134
+ async function lt(s, t) {
1124
1135
  const i = (await Promise.all(
1125
1136
  s.map(async (o) => t.executeAsync({ $feature: o }))
1126
- )).filter((o) => o?.text).map((o) => C(o.text).split(x));
1137
+ )).filter((o) => o?.text).map((o) => A(o.text).split(x));
1127
1138
  return Promise.resolve(i);
1128
1139
  }
1129
1140
  export {
1130
- _,
1131
- ht as a,
1132
- T as b,
1133
- j as c,
1134
- pt as d,
1135
- N as e,
1136
- M as r
1141
+ R as _,
1142
+ gt as a,
1143
+ _ as b,
1144
+ M as c,
1145
+ dt as d,
1146
+ E as e,
1147
+ N as r
1137
1148
  };