@esri/solutions-components 5.1.0-next.142 → 5.1.0-next.144

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 (266) hide show
  1. package/dist/cdn/{D4MZYBH7.js → 4JGB6WLL.js} +1 -1
  2. package/dist/cdn/{7NAC32PQ.js → 4MAZNAHZ.js} +1 -1
  3. package/dist/cdn/{Z6UCVV4K.js → 4RLG6MXK.js} +1 -1
  4. package/dist/cdn/56A5UMZG.js +9 -0
  5. package/dist/cdn/{WCOEPRRK.js → 56XVVIG7.js} +1 -1
  6. package/dist/cdn/{W5FWW67G.js → 5LIR6BQY.js} +1 -1
  7. package/dist/cdn/{UVOAWVML.js → 5MPYPIR2.js} +1 -1
  8. package/dist/cdn/{LLPT3R4B.js → 5YXQ4UXZ.js} +27 -27
  9. package/dist/cdn/{UFPB7JD3.js → 65L2LQGD.js} +1 -1
  10. package/dist/cdn/{HO4GBQJG.js → 6Z3DXRF6.js} +1 -1
  11. package/dist/cdn/{HT2HC33W.js → 7FJTZ7VA.js} +1 -1
  12. package/dist/cdn/{GPL6FNKN.js → 7GXMCAWQ.js} +1 -1
  13. package/dist/cdn/{E5EU4SVV.js → 7WD3GNG4.js} +1 -1
  14. package/dist/cdn/{3UJAJDSF.js → AGB374BK.js} +1 -1
  15. package/dist/cdn/{2KSXH2TC.js → AHB7W7RI.js} +1 -1
  16. package/dist/cdn/{6ID6N5BF.js → BGLTC5SO.js} +1 -1
  17. package/dist/cdn/{SSH4MSHE.js → BVSSQNES.js} +1 -1
  18. package/dist/cdn/{CEWRVOKP.js → C4OXBZJK.js} +1 -1
  19. package/dist/cdn/CGCNGFBL.js +2 -0
  20. package/dist/cdn/{SXVCHOTK.js → DFZZNKPK.js} +3 -6
  21. package/dist/cdn/{B33EUN4X.js → DKEYOEI7.js} +1 -1
  22. package/dist/cdn/{5UIJ4Z3C.js → DNPN62O5.js} +1 -1
  23. package/dist/cdn/{KEOBSFBN.js → EPOIEXNS.js} +1 -1
  24. package/dist/cdn/{FV4F6RW3.js → FE2GEHNL.js} +1 -1
  25. package/dist/cdn/{JMCZPJDW.js → FVOCVCEE.js} +1 -1
  26. package/dist/cdn/H2UL463J.js +2 -0
  27. package/dist/cdn/{FMTXVLZB.js → I22C4HE4.js} +1 -1
  28. package/dist/cdn/{SRT2KXZG.js → IEOFEUZI.js} +1 -1
  29. package/dist/cdn/{P2TNN5UL.js → J3HJC4SO.js} +1 -1
  30. package/dist/cdn/K4TDKKPB.js +18 -0
  31. package/dist/cdn/{23LRX7AS.js → KSQHSNTW.js} +1 -1
  32. package/dist/cdn/{CB7QDBRG.js → KUGXNF5Y.js} +1 -1
  33. package/dist/cdn/{52QHFDTC.js → LEK4P4OY.js} +1 -1
  34. package/dist/cdn/LKZFKOG4.js +2 -0
  35. package/dist/cdn/{RYEEEMFO.js → LYAXTCCM.js} +1 -1
  36. package/dist/cdn/LYK2CASU.js +2 -0
  37. package/dist/cdn/{TFTW5B3R.js → MC5ARLKZ.js} +1 -1
  38. package/dist/cdn/{DNZ5U52C.js → MT5J66WR.js} +1 -1
  39. package/dist/cdn/{IFI66PVI.js → MVF7I3RU.js} +1 -1
  40. package/dist/cdn/{F3NG6RFP.js → NIHPHDXG.js} +31 -18
  41. package/dist/cdn/{ZIX74MNU.js → PPRV6EZZ.js} +1 -1
  42. package/dist/cdn/{PZW6JMSM.js → PUCDO65D.js} +1 -1
  43. package/dist/cdn/Q5TICZRX.js +15 -0
  44. package/dist/cdn/{GSD6O5J7.js → QHDEVLC3.js} +1 -1
  45. package/dist/cdn/{HNWINTTY.js → QQEYWBVV.js} +1 -1
  46. package/dist/cdn/{CUJ3M6UT.js → RRD4QUQS.js} +1 -1
  47. package/dist/cdn/{GWWU6HWB.js → RSCBZIAN.js} +17 -19
  48. package/dist/cdn/{UY5JVVRO.js → S5AQVTR2.js} +1 -1
  49. package/dist/cdn/{H7J2FXMS.js → SGQBWAPU.js} +1 -1
  50. package/dist/cdn/{MEDCFXMB.js → SOLCNPHW.js} +1 -1
  51. package/dist/cdn/{BQE2XAKC.js → SSIUWTQX.js} +1 -1
  52. package/dist/cdn/{34JROLRM.js → SYZEWVHU.js} +1 -1
  53. package/dist/cdn/{KGSB4I6Y.js → TWJSFINX.js} +1 -1
  54. package/dist/cdn/{VEDAG7UO.js → TX3LBQ6V.js} +1 -1
  55. package/dist/cdn/{TIRNZIMX.js → U4RHWD57.js} +1 -1
  56. package/dist/cdn/{UM3P3Q52.js → U6JZYJ4D.js} +1 -1
  57. package/dist/cdn/{PQNFWMST.js → ULFPP7PF.js} +1 -1
  58. package/dist/cdn/{N5D5ABJ6.js → UOGZGAJD.js} +1 -1
  59. package/dist/cdn/{NWCKV677.js → VBJSVR6T.js} +1 -1
  60. package/dist/cdn/WGS5W6W5.js +2 -0
  61. package/dist/cdn/{RPEQD2MH.js → WLM4HMMF.js} +1 -1
  62. package/dist/cdn/{MOH6GREK.js → X6JL6SAH.js} +1 -1
  63. package/dist/cdn/{DGNAMFJN.js → XBFG3KX6.js} +6 -2
  64. package/dist/cdn/{TIF36KTA.js → XXGM7HGO.js} +1 -1
  65. package/dist/cdn/{BLCW2CZO.js → Y77RX7KL.js} +1 -1
  66. package/dist/cdn/{ATHNXWV4.js → YLC2EM5A.js} +115 -115
  67. package/dist/cdn/{ICSHJV2N.js → ZCSF2MJ5.js} +1 -1
  68. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ar.json +1 -1
  69. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.bg.json +1 -1
  70. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.bs.json +1 -1
  71. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ca.json +1 -1
  72. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.cs.json +1 -1
  73. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.da.json +1 -1
  74. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.de.json +1 -1
  75. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.el.json +1 -1
  76. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.en.json +1 -1
  77. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.es.json +1 -1
  78. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.et.json +1 -1
  79. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.fi.json +1 -1
  80. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.fr.json +1 -1
  81. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.he.json +1 -1
  82. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.hr.json +1 -1
  83. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.hu.json +1 -1
  84. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.id.json +1 -1
  85. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.it.json +1 -1
  86. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ja.json +1 -1
  87. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.json +1 -1
  88. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ko.json +1 -1
  89. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.lt.json +1 -1
  90. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.lv.json +1 -1
  91. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.nl.json +1 -1
  92. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.no.json +1 -1
  93. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pl.json +1 -1
  94. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pt-BR.json +1 -1
  95. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pt-PT.json +1 -1
  96. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ro.json +1 -1
  97. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ru.json +1 -1
  98. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sk.json +1 -1
  99. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sl.json +1 -1
  100. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sr.json +1 -1
  101. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sv.json +1 -1
  102. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.th.json +1 -1
  103. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.tr.json +1 -1
  104. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.uk.json +1 -1
  105. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.vi.json +1 -1
  106. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-CN.json +1 -1
  107. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-HK.json +1 -1
  108. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-TW.json +1 -1
  109. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ar.json +1 -1
  110. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
  111. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
  112. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
  113. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
  114. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
  115. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
  116. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
  117. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.en.json +1 -1
  118. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
  119. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
  120. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
  121. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
  122. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
  123. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
  124. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
  125. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
  126. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
  127. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
  128. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.json +1 -1
  129. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
  130. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
  131. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
  132. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
  133. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
  134. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
  135. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
  136. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
  137. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
  138. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
  139. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
  140. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
  141. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
  142. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
  143. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
  144. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
  145. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
  146. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
  147. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
  148. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
  149. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.json +1 -1
  150. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ar.json +1 -1
  151. package/dist/cdn/assets/solution-deployed-card/t9n/messages.bg.json +1 -1
  152. package/dist/cdn/assets/solution-deployed-card/t9n/messages.bs.json +1 -1
  153. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ca.json +1 -1
  154. package/dist/cdn/assets/solution-deployed-card/t9n/messages.cs.json +1 -1
  155. package/dist/cdn/assets/solution-deployed-card/t9n/messages.da.json +1 -1
  156. package/dist/cdn/assets/solution-deployed-card/t9n/messages.de.json +1 -1
  157. package/dist/cdn/assets/solution-deployed-card/t9n/messages.el.json +1 -1
  158. package/dist/cdn/assets/solution-deployed-card/t9n/messages.en.json +1 -1
  159. package/dist/cdn/assets/solution-deployed-card/t9n/messages.es.json +1 -1
  160. package/dist/cdn/assets/solution-deployed-card/t9n/messages.et.json +1 -1
  161. package/dist/cdn/assets/solution-deployed-card/t9n/messages.fi.json +1 -1
  162. package/dist/cdn/assets/solution-deployed-card/t9n/messages.fr.json +1 -1
  163. package/dist/cdn/assets/solution-deployed-card/t9n/messages.he.json +1 -1
  164. package/dist/cdn/assets/solution-deployed-card/t9n/messages.hr.json +1 -1
  165. package/dist/cdn/assets/solution-deployed-card/t9n/messages.hu.json +1 -1
  166. package/dist/cdn/assets/solution-deployed-card/t9n/messages.id.json +1 -1
  167. package/dist/cdn/assets/solution-deployed-card/t9n/messages.it.json +1 -1
  168. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ja.json +1 -1
  169. package/dist/cdn/assets/solution-deployed-card/t9n/messages.json +1 -1
  170. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ko.json +1 -1
  171. package/dist/cdn/assets/solution-deployed-card/t9n/messages.lt.json +1 -1
  172. package/dist/cdn/assets/solution-deployed-card/t9n/messages.lv.json +1 -1
  173. package/dist/cdn/assets/solution-deployed-card/t9n/messages.nl.json +1 -1
  174. package/dist/cdn/assets/solution-deployed-card/t9n/messages.no.json +1 -1
  175. package/dist/cdn/assets/solution-deployed-card/t9n/messages.pl.json +1 -1
  176. package/dist/cdn/assets/solution-deployed-card/t9n/messages.pt-BR.json +1 -1
  177. package/dist/cdn/assets/solution-deployed-card/t9n/messages.pt-PT.json +1 -1
  178. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ro.json +1 -1
  179. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ru.json +1 -1
  180. package/dist/cdn/assets/solution-deployed-card/t9n/messages.sk.json +1 -1
  181. package/dist/cdn/assets/solution-deployed-card/t9n/messages.sl.json +1 -1
  182. package/dist/cdn/assets/solution-deployed-card/t9n/messages.sr.json +1 -1
  183. package/dist/cdn/assets/solution-deployed-card/t9n/messages.sv.json +1 -1
  184. package/dist/cdn/assets/solution-deployed-card/t9n/messages.th.json +1 -1
  185. package/dist/cdn/assets/solution-deployed-card/t9n/messages.tr.json +1 -1
  186. package/dist/cdn/assets/solution-deployed-card/t9n/messages.uk.json +1 -1
  187. package/dist/cdn/assets/solution-deployed-card/t9n/messages.vi.json +1 -1
  188. package/dist/cdn/assets/solution-deployed-card/t9n/messages.zh-CN.json +1 -1
  189. package/dist/cdn/assets/solution-deployed-card/t9n/messages.zh-HK.json +1 -1
  190. package/dist/cdn/assets/solution-deployed-card/t9n/messages.zh-TW.json +1 -1
  191. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.en.json +1 -1
  192. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.json +1 -1
  193. package/dist/cdn/index.js +1 -1
  194. package/dist/chunks/Auth.js +1 -1
  195. package/dist/chunks/CardsFetcher.js +2 -2
  196. package/dist/chunks/assistantResponse.js +17 -19
  197. package/dist/chunks/cardsHelpers.js +12 -12
  198. package/dist/chunks/classifyIntent.js +31 -18
  199. package/dist/chunks/description.js +7 -3
  200. package/dist/chunks/designSolution.js +1 -1
  201. package/dist/chunks/downloadUtils.js +5 -5
  202. package/dist/chunks/getRelatedInfos.js +1 -1
  203. package/dist/chunks/helpers.js +75 -55
  204. package/dist/chunks/initialAssessment.js +3 -6
  205. package/dist/chunks/interfaces.js +45 -41
  206. package/dist/chunks/mapViewUtils.js +9 -9
  207. package/dist/chunks/popupUtils.js +1 -1
  208. package/dist/chunks/queryUtils.js +3 -3
  209. package/dist/chunks/responseOptionsBuilderExclusion.js +12 -0
  210. package/dist/chunks/responseOptionsDefault.js +18 -0
  211. package/dist/chunks/solution-builder-assistant.js +15 -15
  212. package/dist/chunks/solution-deploy-dialog.js +157 -153
  213. package/dist/chunks/solutions-deploy-app-nav.js +3 -4
  214. package/dist/chunks/templates.js +6 -6
  215. package/dist/chunks/updateDesign.js +1 -1
  216. package/dist/chunks/validators.js +6 -6
  217. package/dist/components/arcgis-solutions-assistant/customElement.d.ts +8 -0
  218. package/dist/components/arcgis-solutions-assistant/customElement.js +414 -359
  219. package/dist/components/arcgis-solutions-assistant/index.js +1 -0
  220. package/dist/components/card-manager/customElement.js +6 -6
  221. package/dist/components/create-feature/customElement.js +1 -1
  222. package/dist/components/crowdsource-manager/customElement.js +1 -1
  223. package/dist/components/crowdsource-reporter/customElement.js +2 -2
  224. package/dist/components/edit-card/customElement.js +1 -1
  225. package/dist/components/feature-details/customElement.js +1 -1
  226. package/dist/components/feature-list/customElement.js +1 -1
  227. package/dist/components/layer-list/customElement.js +1 -1
  228. package/dist/components/layer-table/customElement.js +2 -2
  229. package/dist/components/map-card/customElement.js +2 -2
  230. package/dist/components/map-layer-picker/customElement.js +1 -1
  231. package/dist/components/map-select-tools/customElement.js +2 -2
  232. package/dist/components/pdf-download/customElement.js +1 -1
  233. package/dist/components/public-notification/customElement.js +2 -2
  234. package/dist/components/refine-selection/customElement.js +2 -2
  235. package/dist/components/selection-tool/customElement.js +1 -1
  236. package/dist/components/solution-builder-assistant/customElement.d.ts +6 -2
  237. package/dist/components/solution-configure-titles/customElement.js +6 -6
  238. package/dist/components/solution-delete-dialog/customElement.js +2 -2
  239. package/dist/components/solution-deployed-card/customElement.js +2 -2
  240. package/dist/components/solution-deployed-card-panel/customElement.js +3 -3
  241. package/dist/components/solution-details-card/customElement.js +2 -2
  242. package/dist/components/solution-details-panel/customElement.js +2 -2
  243. package/dist/components/solution-resource-card/customElement.js +1 -1
  244. package/dist/components/solution-snapshot-gallery/customElement.js +2 -2
  245. package/dist/components/solution-social-share/customElement.js +1 -1
  246. package/dist/components/solution-user-avatar/customElement.js +1 -1
  247. package/dist/components/solutions-all-panel/customElement.js +1 -1
  248. package/dist/components/solutions-deploy-app/customElement.js +160 -32
  249. package/dist/components/solutions-deploy-app/index.js +1 -1
  250. package/dist/components/solutions-deployed-list/customElement.js +1 -1
  251. package/dist/components/solutions-deployed-panel/customElement.js +1 -1
  252. package/dist/components/solutions-deployed-shell/customElement.js +1 -1
  253. package/dist/components/solutions-filter-panel/customElement.js +1 -1
  254. package/dist/components/solutions-searchsort-toolbar/customElement.js +1 -1
  255. package/dist/docs/api.json +1 -1
  256. package/dist/docs/docs.json +1 -1
  257. package/dist/docs/web-types.json +1 -1
  258. package/dist/solutions-components_commit.txt +7 -7
  259. package/dist/utils/interfaces.d.ts +1 -6
  260. package/package.json +1 -1
  261. package/dist/cdn/4WJ2UJWQ.js +0 -2
  262. package/dist/cdn/EXC566PM.js +0 -2
  263. package/dist/cdn/PUQBEN7F.js +0 -18
  264. package/dist/cdn/SFFLZSAY.js +0 -2
  265. package/dist/cdn/XC3IZAIH.js +0 -2
  266. package/dist/cdn/YM3CRTWP.js +0 -2
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as Lf}from"./VVZAS55G.js";import{b as xf,ya as Af}from"./3UKDJZ2D.js";import{a as Le}from"./US5FON7D.js";import a from"./WV7QX3ED.js";import{c as _f}from"./2I5LGZNX.js";export default $arcgis.t(([Th,n1,{b:Nf}])=>{var lr=Uint8Array,Bn=Uint16Array,Fl=Int32Array,El=new lr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Cl=new lr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Sf=new lr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ff=function(t,n){for(var e=new Bn(31),r=0;r<31;++r)e[r]=n+=1<<t[r-1];for(var i=new Fl(e[30]),r=1;r<30;++r)for(var a=e[r];a<e[r+1];++a)i[a]=a-e[r]<<5|r;return{b:e,r:i}},Ef=Ff(El,2),V1=Ef.b,kl=Ef.r;V1[28]=258,kl[258]=28;var Cf=Ff(Cl,0),ip=Cf.b,kf=Cf.r,Pl=new Bn(32768);for(be=0;be<32768;++be)Vr=(be&43690)>>1|(be&21845)<<1,Vr=(Vr&52428)>>2|(Vr&13107)<<2,Vr=(Vr&61680)>>4|(Vr&3855)<<4,Pl[be]=((Vr&65280)>>8|(Vr&255)<<8)>>1;var Vr,be,ao=(function(t,n,e){for(var r=t.length,i=0,a=new Bn(n);i<r;++i)t[i]&&++a[t[i]-1];var h=new Bn(n);for(i=1;i<n;++i)h[i]=h[i-1]+a[i-1]<<1;var l;if(e){l=new Bn(1<<n);var c=15-n;for(i=0;i<r;++i)if(t[i])for(var u=i<<4|t[i],g=n-t[i],y=h[t[i]-1]++<<g,x=y|(1<<g)-1;y<=x;++y)l[Pl[y]>>c]=u}else for(l=new Bn(r),i=0;i<r;++i)t[i]&&(l[i]=Pl[h[t[i]-1]++]>>15-t[i]);return l}),Bi=new lr(288);for(be=0;be<144;++be)Bi[be]=8;var be;for(be=144;be<256;++be)Bi[be]=9;var be;for(be=256;be<280;++be)Bi[be]=7;var be;for(be=280;be<288;++be)Bi[be]=8;var be,us=new lr(32);for(be=0;be<32;++be)us[be]=5;var be,Z1=ao(Bi,9,0);var $1=ao(us,5,0);var Of=function(t){return(t+7)/8|0},Y1=function(t,n,e){return(n==null||n<0)&&(n=0),(e==null||e>t.length)&&(e=t.length),new lr(t.subarray(n,e))};var Zr=function(t,n,e){e<<=n&7;var r=n/8|0;t[r]|=e,t[r+1]|=e>>8},ro=function(t,n,e){e<<=n&7;var r=n/8|0;t[r]|=e,t[r+1]|=e>>8,t[r+2]|=e>>16},Sl=function(t,n){for(var e=[],r=0;r<t.length;++r)t[r]&&e.push({s:r,f:t[r]});var i=e.length,a=e.slice();if(!i)return{t:Df,l:0};if(i==1){var h=new lr(e[0].s+1);return h[e[0].s]=1,{t:h,l:1}}e.sort(function(rt,mt){return rt.f-mt.f}),e.push({s:-1,f:25001});var l=e[0],c=e[1],u=0,g=1,y=2;for(e[0]={s:-1,f:l.f+c.f,l,r:c};g!=i-1;)l=e[e[u].f<e[y].f?u++:y++],c=e[u!=g&&e[u].f<e[y].f?u++:y++],e[g++]={s:-1,f:l.f+c.f,l,r:c};for(var x=a[0].s,r=1;r<i;++r)a[r].s>x&&(x=a[r].s);var p=new Bn(x+1),F=Il(e[g-1],p,0);if(F>n){var r=0,P=0,D=F-n,N=1<<D;for(a.sort(function(mt,ct){return p[ct.s]-p[mt.s]||mt.f-ct.f});r<i;++r){var H=a[r].s;if(p[H]>n)P+=N-(1<<F-p[H]),p[H]=n;else break}for(P>>=D;P>0;){var q=a[r].s;p[q]<n?P-=1<<n-p[q]++-1:++r}for(;r>=0&&P;--r){var R=a[r].s;p[R]==n&&(--p[R],++P)}F=n}return{t:new lr(p),l:F}},Il=function(t,n,e){return t.s==-1?Math.max(Il(t.l,n,e+1),Il(t.r,n,e+1)):n[t.s]=e},Pf=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new Bn(++n),r=0,i=t[0],a=1,h=function(c){e[r++]=c},l=1;l<=n;++l)if(t[l]==i&&l!=n)++a;else{if(!i&&a>2){for(;a>138;a-=138)h(32754);a>2&&(h(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(h(i),--a;a>6;a-=6)h(8304);a>2&&(h(a-3<<5|8208),a=0)}for(;a--;)h(i);a=1,i=t[l]}return{c:e.subarray(0,r),n}},io=function(t,n){for(var e=0,r=0;r<n.length;++r)e+=t[r]*n[r];return e},Tf=function(t,n,e){var r=e.length,i=Of(n+2);t[i]=r&255,t[i+1]=r>>8,t[i+2]=t[i]^255,t[i+3]=t[i+1]^255;for(var a=0;a<r;++a)t[i+a+4]=e[a];return(i+4+r)*8},If=function(t,n,e,r,i,a,h,l,c,u,g){Zr(n,g++,e),++i[256];for(var y=Sl(i,15),x=y.t,p=y.l,F=Sl(a,15),P=F.t,D=F.l,N=Pf(x),H=N.c,q=N.n,R=Pf(P),rt=R.c,mt=R.n,ct=new Bn(19),Y=0;Y<H.length;++Y)++ct[H[Y]&31];for(var Y=0;Y<rt.length;++Y)++ct[rt[Y]&31];for(var j=Sl(ct,7),tt=j.t,S=j.l,O=19;O>4&&!tt[Sf[O-1]];--O);var W=u+5<<3,U=io(i,Bi)+io(a,us)+h,it=io(i,x)+io(a,P)+h+14+3*O+io(ct,tt)+2*ct[16]+3*ct[17]+7*ct[18];if(c>=0&&W<=U&&W<=it)return Tf(n,g,t.subarray(c,c+u));var st,ht,nt,ut;if(Zr(n,g,1+(it<U)),g+=2,it<U){st=ao(x,p,0),ht=x,nt=ao(P,D,0),ut=P;var At=ao(tt,S,0);Zr(n,g,q-257),Zr(n,g+5,mt-1),Zr(n,g+10,O-4),g+=14;for(var Y=0;Y<O;++Y)Zr(n,g+3*Y,tt[Sf[Y]]);g+=3*O;for(var wt=[H,rt],A=0;A<2;++A)for(var M=wt[A],Y=0;Y<M.length;++Y){var B=M[Y]&31;Zr(n,g,At[B]),g+=tt[B],B>15&&(Zr(n,g,M[Y]>>5&127),g+=M[Y]>>12)}}else st=Z1,ht=Bi,nt=$1,ut=us;for(var Y=0;Y<l;++Y){var G=r[Y];if(G>255){var B=G>>18&31;ro(n,g,st[B+257]),g+=ht[B+257],B>7&&(Zr(n,g,G>>23&31),g+=El[B]);var $=G&31;ro(n,g,nt[$]),g+=ut[$],$>3&&(ro(n,g,G>>5&8191),g+=Cl[$])}else ro(n,g,st[G]),g+=ht[G]}return ro(n,g,st[256]),g+ht[256]},K1=new Fl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Df=new lr(0),X1=function(t,n,e,r,i,a){var h=a.z||t.length,l=new lr(r+h+5*(1+Math.ceil(h/7e3))+i),c=l.subarray(r,l.length-i),u=a.l,g=(a.r||0)&7;if(n){g&&(c[0]=a.r>>3);for(var y=K1[n-1],x=y>>13,p=y&8191,F=(1<<e)-1,P=a.p||new Bn(32768),D=a.h||new Bn(F+1),N=Math.ceil(e/3),H=2*N,q=function(Bt){return(t[Bt]^t[Bt+1]<<N^t[Bt+2]<<H)&F},R=new Fl(25e3),rt=new Bn(288),mt=new Bn(32),ct=0,Y=0,j=a.i||0,tt=0,S=a.w||0,O=0;j+2<h;++j){var W=q(j),U=j&32767,it=D[W];if(P[U]=it,D[W]=U,S<=j){var st=h-j;if((ct>7e3||tt>24576)&&(st>423||!u)){g=If(t,c,0,R,rt,mt,Y,tt,O,j-O,g),tt=ct=Y=0,O=j;for(var ht=0;ht<286;++ht)rt[ht]=0;for(var ht=0;ht<30;++ht)mt[ht]=0}var nt=2,ut=0,At=p,wt=U-it&32767;if(st>2&&W==q(j-wt))for(var A=Math.min(x,st)-1,M=Math.min(32767,j),B=Math.min(258,st);wt<=M&&--At&&U!=it;){if(t[j+nt]==t[j+nt-wt]){for(var G=0;G<B&&t[j+G]==t[j+G-wt];++G);if(G>nt){if(nt=G,ut=wt,G>A)break;for(var $=Math.min(wt,G-2),J=0,ht=0;ht<$;++ht){var at=j-wt+ht&32767,ot=P[at],gt=at-ot&32767;gt>J&&(J=gt,it=at)}}}U=it,it=P[U],wt+=U-it&32767}if(ut){R[tt++]=268435456|kl[nt]<<18|kf[ut];var xt=kl[nt]&31,kt=kf[ut]&31;Y+=El[xt]+Cl[kt],++rt[257+xt],++mt[kt],S=j+nt,++ct}else R[tt++]=t[j],++rt[t[j]]}}for(j=Math.max(j,S);j<h;++j)R[tt++]=t[j],++rt[t[j]];g=If(t,c,u,R,rt,mt,Y,tt,O,j-O,g),u||(a.r=g&7|c[g/8|0]<<3,g-=7,a.h=D,a.p=P,a.i=j,a.w=S)}else{for(var j=a.w||0;j<h+u;j+=65535){var St=j+65535;St>=h&&(c[g/8|0]=u,St=h),g=Tf(c,g+1,t.subarray(j,St))}a.i=h}return Y1(l,0,r+Of(g)+i)};var Mf=function(){var t=1,n=0;return{p:function(e){for(var r=t,i=n,a=e.length|0,h=0;h!=a;){for(var l=Math.min(h+2655,a);h<l;++h)i+=r+=e[h];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}t=r,n=i},d:function(){return t%=65521,n%=65521,(t&255)<<24|(t&65280)<<8|(n&255)<<8|n>>8}}},J1=function(t,n,e,r,i){if(!i&&(i={l:1},n.dictionary)){var a=n.dictionary.subarray(-32768),h=new lr(a.length+t.length);h.set(a),h.set(t,a.length),t=h,i.w=a.length}return X1(t,n.level==null?6:n.level,n.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+n.mem,e,r,i)};var Rf=function(t,n,e){for(;e;++n)t[n]=e,e>>>=8};var Q1=function(t,n){var e=n.level,r=e==0?0:e<6?1:e==9?3:2;if(t[0]=120,t[1]=r<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=Mf();i.p(n.dictionary),Rf(t,2,i.d())}};function ds(t,n){n||(n={});var e=Mf();e.p(t);var r=J1(t,n,n.dictionary?6:2,4);return Q1(r,n),Rf(r,r.length-4,e.d()),r}var t0=typeof TextDecoder<"u"&&new TextDecoder,e0=0;try{t0.decode(Df,{stream:!0}),e0=1}catch{}function jf(t){if(Array.isArray(t))return t}function Bf(t,n){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var r,i,a,h,l=[],c=!0,u=!1;try{if(a=(e=e.call(t)).next,n===0){if(Object(e)!==e)return;c=!1}else for(;!(c=(r=a.call(e)).done)&&(l.push(r.value),l.length!==n);c=!0);}catch(g){u=!0,i=g}finally{try{if(!c&&e.return!=null&&(h=e.return(),Object(h)!==h))return}finally{if(u)throw i}}return l}}function Ol(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function zf(t,n){if(t){if(typeof t=="string")return Ol(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ol(t,n):void 0}}function Uf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ import{a as Lf}from"./VVZAS55G.js";import{a as Le}from"./US5FON7D.js";import{b as xf,ya as Af}from"./3UKDJZ2D.js";import a from"./WV7QX3ED.js";import{c as _f}from"./2I5LGZNX.js";export default $arcgis.t(([Th,n1,{b:Nf}])=>{var lr=Uint8Array,Bn=Uint16Array,Fl=Int32Array,El=new lr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Cl=new lr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Sf=new lr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ff=function(t,n){for(var e=new Bn(31),r=0;r<31;++r)e[r]=n+=1<<t[r-1];for(var i=new Fl(e[30]),r=1;r<30;++r)for(var a=e[r];a<e[r+1];++a)i[a]=a-e[r]<<5|r;return{b:e,r:i}},Ef=Ff(El,2),V1=Ef.b,kl=Ef.r;V1[28]=258,kl[258]=28;var Cf=Ff(Cl,0),ip=Cf.b,kf=Cf.r,Pl=new Bn(32768);for(be=0;be<32768;++be)Vr=(be&43690)>>1|(be&21845)<<1,Vr=(Vr&52428)>>2|(Vr&13107)<<2,Vr=(Vr&61680)>>4|(Vr&3855)<<4,Pl[be]=((Vr&65280)>>8|(Vr&255)<<8)>>1;var Vr,be,ao=(function(t,n,e){for(var r=t.length,i=0,a=new Bn(n);i<r;++i)t[i]&&++a[t[i]-1];var h=new Bn(n);for(i=1;i<n;++i)h[i]=h[i-1]+a[i-1]<<1;var l;if(e){l=new Bn(1<<n);var c=15-n;for(i=0;i<r;++i)if(t[i])for(var u=i<<4|t[i],g=n-t[i],y=h[t[i]-1]++<<g,x=y|(1<<g)-1;y<=x;++y)l[Pl[y]>>c]=u}else for(l=new Bn(r),i=0;i<r;++i)t[i]&&(l[i]=Pl[h[t[i]-1]++]>>15-t[i]);return l}),Bi=new lr(288);for(be=0;be<144;++be)Bi[be]=8;var be;for(be=144;be<256;++be)Bi[be]=9;var be;for(be=256;be<280;++be)Bi[be]=7;var be;for(be=280;be<288;++be)Bi[be]=8;var be,us=new lr(32);for(be=0;be<32;++be)us[be]=5;var be,Z1=ao(Bi,9,0);var $1=ao(us,5,0);var Of=function(t){return(t+7)/8|0},Y1=function(t,n,e){return(n==null||n<0)&&(n=0),(e==null||e>t.length)&&(e=t.length),new lr(t.subarray(n,e))};var Zr=function(t,n,e){e<<=n&7;var r=n/8|0;t[r]|=e,t[r+1]|=e>>8},ro=function(t,n,e){e<<=n&7;var r=n/8|0;t[r]|=e,t[r+1]|=e>>8,t[r+2]|=e>>16},Sl=function(t,n){for(var e=[],r=0;r<t.length;++r)t[r]&&e.push({s:r,f:t[r]});var i=e.length,a=e.slice();if(!i)return{t:Df,l:0};if(i==1){var h=new lr(e[0].s+1);return h[e[0].s]=1,{t:h,l:1}}e.sort(function(rt,mt){return rt.f-mt.f}),e.push({s:-1,f:25001});var l=e[0],c=e[1],u=0,g=1,y=2;for(e[0]={s:-1,f:l.f+c.f,l,r:c};g!=i-1;)l=e[e[u].f<e[y].f?u++:y++],c=e[u!=g&&e[u].f<e[y].f?u++:y++],e[g++]={s:-1,f:l.f+c.f,l,r:c};for(var x=a[0].s,r=1;r<i;++r)a[r].s>x&&(x=a[r].s);var p=new Bn(x+1),F=Il(e[g-1],p,0);if(F>n){var r=0,P=0,D=F-n,N=1<<D;for(a.sort(function(mt,ct){return p[ct.s]-p[mt.s]||mt.f-ct.f});r<i;++r){var H=a[r].s;if(p[H]>n)P+=N-(1<<F-p[H]),p[H]=n;else break}for(P>>=D;P>0;){var q=a[r].s;p[q]<n?P-=1<<n-p[q]++-1:++r}for(;r>=0&&P;--r){var R=a[r].s;p[R]==n&&(--p[R],++P)}F=n}return{t:new lr(p),l:F}},Il=function(t,n,e){return t.s==-1?Math.max(Il(t.l,n,e+1),Il(t.r,n,e+1)):n[t.s]=e},Pf=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new Bn(++n),r=0,i=t[0],a=1,h=function(c){e[r++]=c},l=1;l<=n;++l)if(t[l]==i&&l!=n)++a;else{if(!i&&a>2){for(;a>138;a-=138)h(32754);a>2&&(h(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(h(i),--a;a>6;a-=6)h(8304);a>2&&(h(a-3<<5|8208),a=0)}for(;a--;)h(i);a=1,i=t[l]}return{c:e.subarray(0,r),n}},io=function(t,n){for(var e=0,r=0;r<n.length;++r)e+=t[r]*n[r];return e},Tf=function(t,n,e){var r=e.length,i=Of(n+2);t[i]=r&255,t[i+1]=r>>8,t[i+2]=t[i]^255,t[i+3]=t[i+1]^255;for(var a=0;a<r;++a)t[i+a+4]=e[a];return(i+4+r)*8},If=function(t,n,e,r,i,a,h,l,c,u,g){Zr(n,g++,e),++i[256];for(var y=Sl(i,15),x=y.t,p=y.l,F=Sl(a,15),P=F.t,D=F.l,N=Pf(x),H=N.c,q=N.n,R=Pf(P),rt=R.c,mt=R.n,ct=new Bn(19),Y=0;Y<H.length;++Y)++ct[H[Y]&31];for(var Y=0;Y<rt.length;++Y)++ct[rt[Y]&31];for(var j=Sl(ct,7),tt=j.t,S=j.l,O=19;O>4&&!tt[Sf[O-1]];--O);var W=u+5<<3,U=io(i,Bi)+io(a,us)+h,it=io(i,x)+io(a,P)+h+14+3*O+io(ct,tt)+2*ct[16]+3*ct[17]+7*ct[18];if(c>=0&&W<=U&&W<=it)return Tf(n,g,t.subarray(c,c+u));var st,ht,nt,ut;if(Zr(n,g,1+(it<U)),g+=2,it<U){st=ao(x,p,0),ht=x,nt=ao(P,D,0),ut=P;var At=ao(tt,S,0);Zr(n,g,q-257),Zr(n,g+5,mt-1),Zr(n,g+10,O-4),g+=14;for(var Y=0;Y<O;++Y)Zr(n,g+3*Y,tt[Sf[Y]]);g+=3*O;for(var wt=[H,rt],A=0;A<2;++A)for(var M=wt[A],Y=0;Y<M.length;++Y){var B=M[Y]&31;Zr(n,g,At[B]),g+=tt[B],B>15&&(Zr(n,g,M[Y]>>5&127),g+=M[Y]>>12)}}else st=Z1,ht=Bi,nt=$1,ut=us;for(var Y=0;Y<l;++Y){var G=r[Y];if(G>255){var B=G>>18&31;ro(n,g,st[B+257]),g+=ht[B+257],B>7&&(Zr(n,g,G>>23&31),g+=El[B]);var $=G&31;ro(n,g,nt[$]),g+=ut[$],$>3&&(ro(n,g,G>>5&8191),g+=Cl[$])}else ro(n,g,st[G]),g+=ht[G]}return ro(n,g,st[256]),g+ht[256]},K1=new Fl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Df=new lr(0),X1=function(t,n,e,r,i,a){var h=a.z||t.length,l=new lr(r+h+5*(1+Math.ceil(h/7e3))+i),c=l.subarray(r,l.length-i),u=a.l,g=(a.r||0)&7;if(n){g&&(c[0]=a.r>>3);for(var y=K1[n-1],x=y>>13,p=y&8191,F=(1<<e)-1,P=a.p||new Bn(32768),D=a.h||new Bn(F+1),N=Math.ceil(e/3),H=2*N,q=function(Bt){return(t[Bt]^t[Bt+1]<<N^t[Bt+2]<<H)&F},R=new Fl(25e3),rt=new Bn(288),mt=new Bn(32),ct=0,Y=0,j=a.i||0,tt=0,S=a.w||0,O=0;j+2<h;++j){var W=q(j),U=j&32767,it=D[W];if(P[U]=it,D[W]=U,S<=j){var st=h-j;if((ct>7e3||tt>24576)&&(st>423||!u)){g=If(t,c,0,R,rt,mt,Y,tt,O,j-O,g),tt=ct=Y=0,O=j;for(var ht=0;ht<286;++ht)rt[ht]=0;for(var ht=0;ht<30;++ht)mt[ht]=0}var nt=2,ut=0,At=p,wt=U-it&32767;if(st>2&&W==q(j-wt))for(var A=Math.min(x,st)-1,M=Math.min(32767,j),B=Math.min(258,st);wt<=M&&--At&&U!=it;){if(t[j+nt]==t[j+nt-wt]){for(var G=0;G<B&&t[j+G]==t[j+G-wt];++G);if(G>nt){if(nt=G,ut=wt,G>A)break;for(var $=Math.min(wt,G-2),J=0,ht=0;ht<$;++ht){var at=j-wt+ht&32767,ot=P[at],gt=at-ot&32767;gt>J&&(J=gt,it=at)}}}U=it,it=P[U],wt+=U-it&32767}if(ut){R[tt++]=268435456|kl[nt]<<18|kf[ut];var xt=kl[nt]&31,kt=kf[ut]&31;Y+=El[xt]+Cl[kt],++rt[257+xt],++mt[kt],S=j+nt,++ct}else R[tt++]=t[j],++rt[t[j]]}}for(j=Math.max(j,S);j<h;++j)R[tt++]=t[j],++rt[t[j]];g=If(t,c,u,R,rt,mt,Y,tt,O,j-O,g),u||(a.r=g&7|c[g/8|0]<<3,g-=7,a.h=D,a.p=P,a.i=j,a.w=S)}else{for(var j=a.w||0;j<h+u;j+=65535){var St=j+65535;St>=h&&(c[g/8|0]=u,St=h),g=Tf(c,g+1,t.subarray(j,St))}a.i=h}return Y1(l,0,r+Of(g)+i)};var Mf=function(){var t=1,n=0;return{p:function(e){for(var r=t,i=n,a=e.length|0,h=0;h!=a;){for(var l=Math.min(h+2655,a);h<l;++h)i+=r+=e[h];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}t=r,n=i},d:function(){return t%=65521,n%=65521,(t&255)<<24|(t&65280)<<8|(n&255)<<8|n>>8}}},J1=function(t,n,e,r,i){if(!i&&(i={l:1},n.dictionary)){var a=n.dictionary.subarray(-32768),h=new lr(a.length+t.length);h.set(a),h.set(t,a.length),t=h,i.w=a.length}return X1(t,n.level==null?6:n.level,n.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+n.mem,e,r,i)};var Rf=function(t,n,e){for(;e;++n)t[n]=e,e>>>=8};var Q1=function(t,n){var e=n.level,r=e==0?0:e<6?1:e==9?3:2;if(t[0]=120,t[1]=r<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=Mf();i.p(n.dictionary),Rf(t,2,i.d())}};function ds(t,n){n||(n={});var e=Mf();e.p(t);var r=J1(t,n,n.dictionary?6:2,4);return Q1(r,n),Rf(r,r.length-4,e.d()),r}var t0=typeof TextDecoder<"u"&&new TextDecoder,e0=0;try{t0.decode(Df,{stream:!0}),e0=1}catch{}function jf(t){if(Array.isArray(t))return t}function Bf(t,n){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var r,i,a,h,l=[],c=!0,u=!1;try{if(a=(e=e.call(t)).next,n===0){if(Object(e)!==e)return;c=!1}else for(;!(c=(r=a.call(e)).done)&&(l.push(r.value),l.length!==n);c=!0);}catch(g){u=!0,i=g}finally{try{if(!c&&e.return!=null&&(h=e.return(),Object(h)!==h))return}finally{if(u)throw i}}return l}}function Ol(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function zf(t,n){if(t){if(typeof t=="string")return Ol(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ol(t,n):void 0}}function Uf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tl(t,n){return jf(t)||Bf(t,n)||zf(t,n)||Uf()}function Dl(t,n="utf8"){return new TextDecoder(n).decode(t)}var n0=new TextEncoder;function qf(t){return n0.encode(t)}var r0=1024*8,i0=(()=>{let t=new Uint8Array(4),n=new Uint32Array(t.buffer);return!((n[0]=1)&t[0])})(),Ml={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array},oo=class t{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(n=r0,e={}){let r=!1;typeof n=="number"?n=new ArrayBuffer(n):(r=!0,this.lastWrittenByte=n.byteLength);let i=e.offset?e.offset>>>0:0,a=n.byteLength-i,h=i;(ArrayBuffer.isView(n)||n instanceof t)&&(n.byteLength!==n.buffer.byteLength&&(h=n.byteOffset+i),n=n.buffer),r?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=n,this.length=a,this.byteLength=a,this.byteOffset=h,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,h,a),this._mark=0,this._marks=[]}available(n=1){return this.offset+n<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(n=1){return this.offset+=n,this}back(n=1){return this.offset-=n,this}seek(n){return this.offset=n,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let n=this._marks.pop();if(n===void 0)throw new Error("Mark stack empty");return this.seek(n),this}rewind(){return this.offset=0,this}ensureAvailable(n=1){if(!this.available(n)){let r=(this.offset+n)*2,i=new Uint8Array(r);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=r,this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(n=1){return this.readArray(n,"uint8")}readArray(n,e){let r=Ml[e].BYTES_PER_ELEMENT*n,i=this.byteOffset+this.offset,a=this.buffer.slice(i,i+r);if(this.littleEndian===i0&&e!=="uint8"&&e!=="int8"){let l=new Uint8Array(this.buffer.slice(i,i+r));l.reverse();let c=new Ml[e](l.buffer);return this.offset+=r,c.reverse(),c}let h=new Ml[e](a);return this.offset+=r,h}readInt16(){let n=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,n}readUint16(){let n=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,n}readInt32(){let n=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,n}readUint32(){let n=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat32(){let n=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat64(){let n=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,n}readBigInt64(){let n=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,n}readBigUint64(){let n=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,n}readChar(){return String.fromCharCode(this.readInt8())}readChars(n=1){let e="";for(let r=0;r<n;r++)e+=this.readChar();return e}readUtf8(n=1){return Dl(this.readBytes(n))}decodeText(n=1,e="utf8"){return Dl(this.readBytes(n),e)}writeBoolean(n){return this.writeUint8(n?255:0),this}writeInt8(n){return this.ensureAvailable(1),this._data.setInt8(this.offset++,n),this._updateLastWrittenByte(),this}writeUint8(n){return this.ensureAvailable(1),this._data.setUint8(this.offset++,n),this._updateLastWrittenByte(),this}writeByte(n){return this.writeUint8(n)}writeBytes(n){this.ensureAvailable(n.length);for(let e=0;e<n.length;e++)this._data.setUint8(this.offset++,n[e]);return this._updateLastWrittenByte(),this}writeInt16(n){return this.ensureAvailable(2),this._data.setInt16(this.offset,n,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(n){return this.ensureAvailable(2),this._data.setUint16(this.offset,n,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(n){return this.ensureAvailable(4),this._data.setInt32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(n){return this.ensureAvailable(4),this._data.setUint32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(n){return this.ensureAvailable(4),this._data.setFloat32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(n){return this.ensureAvailable(8),this._data.setFloat64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(n){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(n){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(n){return this.writeUint8(n.charCodeAt(0))}writeChars(n){for(let e=0;e<n.length;e++)this.writeUint8(n.charCodeAt(e));return this}writeUtf8(n){return this.writeBytes(qf(n))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}};function ga(t){let n=t.length;for(;--n>=0;)t[n]=0}var a0=0,kc=1,o0=2,s0=3,l0=258,oh=29,xo=256,po=xo+1+oh,ua=30,sh=19,Pc=2*po+1,zi=15,Rl=16,h0=7,lh=256,Ic=16,Fc=17,Ec=18,Xl=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),ws=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),f0=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Cc=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c0=512,Yr=new Array((po+2)*2);ga(Yr);var fo=new Array(ua*2);ga(fo);var go=new Array(c0);ga(go);var mo=new Array(l0-s0+1);ga(mo);var hh=new Array(oh);ga(hh);var ys=new Array(ua);ga(ys);function jl(t,n,e,r,i){this.static_tree=t,this.extra_bits=n,this.extra_base=e,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}var Oc,Tc,Dc;function Bl(t,n){this.dyn_tree=t,this.max_code=0,this.stat_desc=n}var Mc=t=>t<256?go[t]:go[256+(t>>>7)],vo=(t,n)=>{t.pending_buf[t.pending++]=n&255,t.pending_buf[t.pending++]=n>>>8&255},In=(t,n,e)=>{t.bi_valid>Rl-e?(t.bi_buf|=n<<t.bi_valid&65535,vo(t,t.bi_buf),t.bi_buf=n>>Rl-t.bi_valid,t.bi_valid+=e-Rl):(t.bi_buf|=n<<t.bi_valid&65535,t.bi_valid+=e)},xr=(t,n,e)=>{In(t,e[n*2],e[n*2+1])},Rc=(t,n)=>{let e=0;do e|=t&1,t>>>=1,e<<=1;while(--n>0);return e>>>1},u0=t=>{t.bi_valid===16?(vo(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)},d0=(t,n)=>{let e=n.dyn_tree,r=n.max_code,i=n.stat_desc.static_tree,a=n.stat_desc.has_stree,h=n.stat_desc.extra_bits,l=n.stat_desc.extra_base,c=n.stat_desc.max_length,u,g,y,x,p,F,P=0;for(x=0;x<=zi;x++)t.bl_count[x]=0;for(e[t.heap[t.heap_max]*2+1]=0,u=t.heap_max+1;u<Pc;u++)g=t.heap[u],x=e[e[g*2+1]*2+1]+1,x>c&&(x=c,P++),e[g*2+1]=x,!(g>r)&&(t.bl_count[x]++,p=0,g>=l&&(p=h[g-l]),F=e[g*2],t.opt_len+=F*(x+p),a&&(t.static_len+=F*(i[g*2+1]+p)));if(P!==0){do{for(x=c-1;t.bl_count[x]===0;)x--;t.bl_count[x]--,t.bl_count[x+1]+=2,t.bl_count[c]--,P-=2}while(P>0);for(x=c;x!==0;x--)for(g=t.bl_count[x];g!==0;)y=t.heap[--u],!(y>r)&&(e[y*2+1]!==x&&(t.opt_len+=(x-e[y*2+1])*e[y*2],e[y*2+1]=x),g--)}},jc=(t,n,e)=>{let r=new Array(zi+1),i=0,a,h;for(a=1;a<=zi;a++)i=i+e[a-1]<<1,r[a]=i;for(h=0;h<=n;h++){let l=t[h*2+1];l!==0&&(t[h*2]=Rc(r[l]++,l))}},p0=()=>{let t,n,e,r,i,a=new Array(zi+1);for(e=0,r=0;r<oh-1;r++)for(hh[r]=e,t=0;t<1<<Xl[r];t++)mo[e++]=r;for(mo[e-1]=r,i=0,r=0;r<16;r++)for(ys[r]=i,t=0;t<1<<ws[r];t++)go[i++]=r;for(i>>=7;r<ua;r++)for(ys[r]=i<<7,t=0;t<1<<ws[r]-7;t++)go[256+i++]=r;for(n=0;n<=zi;n++)a[n]=0;for(t=0;t<=143;)Yr[t*2+1]=8,t++,a[8]++;for(;t<=255;)Yr[t*2+1]=9,t++,a[9]++;for(;t<=279;)Yr[t*2+1]=7,t++,a[7]++;for(;t<=287;)Yr[t*2+1]=8,t++,a[8]++;for(jc(Yr,po+1,a),t=0;t<ua;t++)fo[t*2+1]=5,fo[t*2]=Rc(t,5);Oc=new jl(Yr,Xl,xo+1,po,zi),Tc=new jl(fo,ws,0,ua,zi),Dc=new jl(new Array(0),f0,0,sh,h0)},Bc=t=>{let n;for(n=0;n<po;n++)t.dyn_ltree[n*2]=0;for(n=0;n<ua;n++)t.dyn_dtree[n*2]=0;for(n=0;n<sh;n++)t.bl_tree[n*2]=0;t.dyn_ltree[lh*2]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},zc=t=>{t.bi_valid>8?vo(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},Hf=(t,n,e,r)=>{let i=n*2,a=e*2;return t[i]<t[a]||t[i]===t[a]&&r[n]<=r[e]},zl=(t,n,e)=>{let r=t.heap[e],i=e<<1;for(;i<=t.heap_len&&(i<t.heap_len&&Hf(n,t.heap[i+1],t.heap[i],t.depth)&&i++,!Hf(n,r,t.heap[i],t.depth));)t.heap[e]=t.heap[i],e=i,i<<=1;t.heap[e]=r},Wf=(t,n,e)=>{let r,i,a=0,h,l;if(t.sym_next!==0)do r=t.pending_buf[t.sym_buf+a++]&255,r+=(t.pending_buf[t.sym_buf+a++]&255)<<8,i=t.pending_buf[t.sym_buf+a++],r===0?xr(t,i,n):(h=mo[i],xr(t,h+xo+1,n),l=Xl[h],l!==0&&(i-=hh[h],In(t,i,l)),r--,h=Mc(r),xr(t,h,e),l=ws[h],l!==0&&(r-=ys[h],In(t,r,l)));while(a<t.sym_next);xr(t,lh,n)},Jl=(t,n)=>{let e=n.dyn_tree,r=n.stat_desc.static_tree,i=n.stat_desc.has_stree,a=n.stat_desc.elems,h,l,c=-1,u;for(t.heap_len=0,t.heap_max=Pc,h=0;h<a;h++)e[h*2]!==0?(t.heap[++t.heap_len]=c=h,t.depth[h]=0):e[h*2+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,e[u*2]=1,t.depth[u]=0,t.opt_len--,i&&(t.static_len-=r[u*2+1]);for(n.max_code=c,h=t.heap_len>>1;h>=1;h--)zl(t,e,h);u=a;do h=t.heap[1],t.heap[1]=t.heap[t.heap_len--],zl(t,e,1),l=t.heap[1],t.heap[--t.heap_max]=h,t.heap[--t.heap_max]=l,e[u*2]=e[h*2]+e[l*2],t.depth[u]=(t.depth[h]>=t.depth[l]?t.depth[h]:t.depth[l])+1,e[h*2+1]=e[l*2+1]=u,t.heap[1]=u++,zl(t,e,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],d0(t,n),jc(e,c,t.bl_count)},Gf=(t,n,e)=>{let r,i=-1,a,h=n[1],l=0,c=7,u=4;for(h===0&&(c=138,u=3),n[(e+1)*2+1]=65535,r=0;r<=e;r++)a=h,h=n[(r+1)*2+1],!(++l<c&&a===h)&&(l<u?t.bl_tree[a*2]+=l:a!==0?(a!==i&&t.bl_tree[a*2]++,t.bl_tree[Ic*2]++):l<=10?t.bl_tree[Fc*2]++:t.bl_tree[Ec*2]++,l=0,i=a,h===0?(c=138,u=3):a===h?(c=6,u=3):(c=7,u=4))},Vf=(t,n,e)=>{let r,i=-1,a,h=n[1],l=0,c=7,u=4;for(h===0&&(c=138,u=3),r=0;r<=e;r++)if(a=h,h=n[(r+1)*2+1],!(++l<c&&a===h)){if(l<u)do xr(t,a,t.bl_tree);while(--l!==0);else a!==0?(a!==i&&(xr(t,a,t.bl_tree),l--),xr(t,Ic,t.bl_tree),In(t,l-3,2)):l<=10?(xr(t,Fc,t.bl_tree),In(t,l-3,3)):(xr(t,Ec,t.bl_tree),In(t,l-11,7));l=0,i=a,h===0?(c=138,u=3):a===h?(c=6,u=3):(c=7,u=4)}},g0=t=>{let n;for(Gf(t,t.dyn_ltree,t.l_desc.max_code),Gf(t,t.dyn_dtree,t.d_desc.max_code),Jl(t,t.bl_desc),n=sh-1;n>=3&&t.bl_tree[Cc[n]*2+1]===0;n--);return t.opt_len+=3*(n+1)+5+5+4,n},m0=(t,n,e,r)=>{let i;for(In(t,n-257,5),In(t,e-1,5),In(t,r-4,4),i=0;i<r;i++)In(t,t.bl_tree[Cc[i]*2+1],3);Vf(t,t.dyn_ltree,n-1),Vf(t,t.dyn_dtree,e-1)},v0=t=>{let n=4093624447,e;for(e=0;e<=31;e++,n>>>=1)if(n&1&&t.dyn_ltree[e*2]!==0)return 0;if(t.dyn_ltree[18]!==0||t.dyn_ltree[20]!==0||t.dyn_ltree[26]!==0)return 1;for(e=32;e<xo;e++)if(t.dyn_ltree[e*2]!==0)return 1;return 0},Zf=!1,b0=t=>{Zf||(p0(),Zf=!0),t.l_desc=new Bl(t.dyn_ltree,Oc),t.d_desc=new Bl(t.dyn_dtree,Tc),t.bl_desc=new Bl(t.bl_tree,Dc),t.bi_buf=0,t.bi_valid=0,Bc(t)},Uc=(t,n,e,r)=>{In(t,(a0<<1)+(r?1:0),3),zc(t),vo(t,e),vo(t,~e),e&&t.pending_buf.set(t.window.subarray(n,n+e),t.pending),t.pending+=e},w0=t=>{In(t,kc<<1,3),xr(t,lh,Yr),u0(t)},y0=(t,n,e,r)=>{let i,a,h=0;t.level>0?(t.strm.data_type===2&&(t.strm.data_type=v0(t)),Jl(t,t.l_desc),Jl(t,t.d_desc),h=g0(t),i=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=i&&(i=a)):i=a=e+5,e+4<=i&&n!==-1?Uc(t,n,e,r):t.strategy===4||a===i?(In(t,(kc<<1)+(r?1:0),3),Wf(t,Yr,fo)):(In(t,(o0<<1)+(r?1:0),3),m0(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),Wf(t,t.dyn_ltree,t.dyn_dtree)),Bc(t),r&&zc(t)},_0=(t,n,e)=>(t.pending_buf[t.sym_buf+t.sym_next++]=n,t.pending_buf[t.sym_buf+t.sym_next++]=n>>8,t.pending_buf[t.sym_buf+t.sym_next++]=e,n===0?t.dyn_ltree[e*2]++:(t.matches++,n--,t.dyn_ltree[(mo[e]+xo+1)*2]++,t.dyn_dtree[Mc(n)*2]++),t.sym_next===t.sym_end),x0=b0,A0=Uc,N0=y0,L0=_0,S0=w0,k0={_tr_init:x0,_tr_stored_block:A0,_tr_flush_block:N0,_tr_tally:L0,_tr_align:S0},P0=(t,n,e,r)=>{let i=t&65535|0,a=t>>>16&65535|0,h=0;for(;e!==0;){h=e>2e3?2e3:e,e-=h;do i=i+n[r++]|0,a=a+i|0;while(--h);i%=65521,a%=65521}return i|a<<16|0},bo=P0,I0=()=>{let t,n=[];for(var e=0;e<256;e++){t=e;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;n[e]=t}return n},F0=new Uint32Array(I0()),E0=(t,n,e,r)=>{let i=F0,a=r+e;t^=-1;for(let h=r;h<a;h++)t=t>>>8^i[(t^n[h])&255];return t^-1},on=E0,Hi={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ma={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:C0,_tr_stored_block:Ql,_tr_flush_block:O0,_tr_tally:gi,_tr_align:T0}=k0,{Z_NO_FLUSH:mi,Z_PARTIAL_FLUSH:D0,Z_FULL_FLUSH:M0,Z_FINISH:Xn,Z_BLOCK:$f,Z_OK:pn,Z_STREAM_END:Yf,Z_STREAM_ERROR:Ar,Z_DATA_ERROR:R0,Z_BUF_ERROR:Ul,Z_DEFAULT_COMPRESSION:j0,Z_FILTERED:B0,Z_HUFFMAN_ONLY:ps,Z_RLE:z0,Z_FIXED:U0,Z_DEFAULT_STRATEGY:q0,Z_UNKNOWN:H0,Z_DEFLATED:As}=ma,W0=9,G0=15,V0=8,Z0=29,$0=256,th=$0+1+Z0,Y0=30,K0=19,X0=2*th+1,J0=15,de=3,pi=258,Nr=pi+de+1,Q0=32,da=42,fh=57,eh=69,nh=73,rh=91,ih=103,Ui=113,lo=666,Ln=1,va=2,Wi=3,ba=4,t2=3,qi=(t,n)=>(t.msg=Hi[n],n),Kf=t=>t*2-(t>4?9:0),di=t=>{let n=t.length;for(;--n>=0;)t[n]=0},e2=t=>{let n,e,r,i=t.w_size;n=t.hash_size,r=n;do e=t.head[--r],t.head[r]=e>=i?e-i:0;while(--n);n=i,r=n;do e=t.prev[--r],t.prev[r]=e>=i?e-i:0;while(--n)},n2=(t,n,e)=>(n<<t.hash_shift^e)&t.hash_mask,vi=n2,zn=t=>{let n=t.state,e=n.pending;e>t.avail_out&&(e=t.avail_out),e!==0&&(t.output.set(n.pending_buf.subarray(n.pending_out,n.pending_out+e),t.next_out),t.next_out+=e,n.pending_out+=e,t.total_out+=e,t.avail_out-=e,n.pending-=e,n.pending===0&&(n.pending_out=0))},Un=(t,n)=>{O0(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,n),t.block_start=t.strstart,zn(t.strm)},we=(t,n)=>{t.pending_buf[t.pending++]=n},so=(t,n)=>{t.pending_buf[t.pending++]=n>>>8&255,t.pending_buf[t.pending++]=n&255},ah=(t,n,e,r)=>{let i=t.avail_in;return i>r&&(i=r),i===0?0:(t.avail_in-=i,n.set(t.input.subarray(t.next_in,t.next_in+i),e),t.state.wrap===1?t.adler=bo(t.adler,n,i,e):t.state.wrap===2&&(t.adler=on(t.adler,n,i,e)),t.next_in+=i,t.total_in+=i,i)},qc=(t,n)=>{let e=t.max_chain_length,r=t.strstart,i,a,h=t.prev_length,l=t.nice_match,c=t.strstart>t.w_size-Nr?t.strstart-(t.w_size-Nr):0,u=t.window,g=t.w_mask,y=t.prev,x=t.strstart+pi,p=u[r+h-1],F=u[r+h];t.prev_length>=t.good_match&&(e>>=2),l>t.lookahead&&(l=t.lookahead);do if(i=n,!(u[i+h]!==F||u[i+h-1]!==p||u[i]!==u[r]||u[++i]!==u[r+1])){r+=2,i++;do;while(u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&r<x);if(a=pi-(x-r),r=x-pi,a>h){if(t.match_start=n,h=a,a>=l)break;p=u[r+h-1],F=u[r+h]}}while((n=y[n&g])>c&&--e!==0);return h<=t.lookahead?h:t.lookahead},pa=t=>{let n=t.w_size,e,r,i;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=n+(n-Nr)&&(t.window.set(t.window.subarray(n,n+n-r),0),t.match_start-=n,t.strstart-=n,t.block_start-=n,t.insert>t.strstart&&(t.insert=t.strstart),e2(t),r+=n),t.strm.avail_in===0)break;if(e=ah(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=e,t.lookahead+t.insert>=de)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=vi(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=vi(t,t.ins_h,t.window[i+de-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<de)););}while(t.lookahead<Nr&&t.strm.avail_in!==0)},Hc=(t,n)=>{let e=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r,i,a,h=0,l=t.strm.avail_in;do{if(r=65535,a=t.bi_valid+42>>3,t.strm.avail_out<a||(a=t.strm.avail_out-a,i=t.strstart-t.block_start,r>i+t.strm.avail_in&&(r=i+t.strm.avail_in),r>a&&(r=a),r<e&&(r===0&&n!==Xn||n===mi||r!==i+t.strm.avail_in)))break;h=n===Xn&&r===i+t.strm.avail_in?1:0,Ql(t,0,0,h),t.pending_buf[t.pending-4]=r,t.pending_buf[t.pending-3]=r>>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,zn(t.strm),i&&(i>r&&(i=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,r-=i),r&&(ah(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(h===0);return l-=t.strm.avail_in,l&&(l>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=l&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-l,t.strm.next_in),t.strstart),t.strstart+=l,t.insert+=l>t.w_size-t.insert?t.w_size-t.insert:l),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),h?ba:n!==mi&&n!==Xn&&t.strm.avail_in===0&&t.strstart===t.block_start?va:(a=t.window_size-t.strstart,t.strm.avail_in>a&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,a+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),a>t.strm.avail_in&&(a=t.strm.avail_in),a&&(ah(t.strm,t.window,t.strstart,a),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.high_water<t.strstart&&(t.high_water=t.strstart),a=t.bi_valid+42>>3,a=t.pending_buf_size-a>65535?65535:t.pending_buf_size-a,e=a>t.w_size?t.w_size:a,i=t.strstart-t.block_start,(i>=e||(i||n===Xn)&&n!==mi&&t.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,h=n===Xn&&t.strm.avail_in===0&&r===i?1:0,Ql(t,t.block_start,r,h),t.block_start+=r,zn(t.strm)),h?Wi:Ln)},ql=(t,n)=>{let e,r;for(;;){if(t.lookahead<Nr){if(pa(t),t.lookahead<Nr&&n===mi)return Ln;if(t.lookahead===0)break}if(e=0,t.lookahead>=de&&(t.ins_h=vi(t,t.ins_h,t.window[t.strstart+de-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),e!==0&&t.strstart-e<=t.w_size-Nr&&(t.match_length=qc(t,e)),t.match_length>=de)if(r=gi(t,t.strstart-t.match_start,t.match_length-de),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=de){t.match_length--;do t.strstart++,t.ins_h=vi(t,t.ins_h,t.window[t.strstart+de-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=vi(t,t.ins_h,t.window[t.strstart+1]);else r=gi(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(Un(t,!1),t.strm.avail_out===0))return Ln}return t.insert=t.strstart<de-1?t.strstart:de-1,n===Xn?(Un(t,!0),t.strm.avail_out===0?Wi:ba):t.sym_next&&(Un(t,!1),t.strm.avail_out===0)?Ln:va},fa=(t,n)=>{let e,r,i;for(;;){if(t.lookahead<Nr){if(pa(t),t.lookahead<Nr&&n===mi)return Ln;if(t.lookahead===0)break}if(e=0,t.lookahead>=de&&(t.ins_h=vi(t,t.ins_h,t.window[t.strstart+de-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=de-1,e!==0&&t.prev_length<t.max_lazy_match&&t.strstart-e<=t.w_size-Nr&&(t.match_length=qc(t,e),t.match_length<=5&&(t.strategy===B0||t.match_length===de&&t.strstart-t.match_start>4096)&&(t.match_length=de-1)),t.prev_length>=de&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-de,r=gi(t,t.strstart-1-t.prev_match,t.prev_length-de),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(t.ins_h=vi(t,t.ins_h,t.window[t.strstart+de-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!==0);if(t.match_available=0,t.match_length=de-1,t.strstart++,r&&(Un(t,!1),t.strm.avail_out===0))return Ln}else if(t.match_available){if(r=gi(t,0,t.window[t.strstart-1]),r&&Un(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return Ln}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=gi(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<de-1?t.strstart:de-1,n===Xn?(Un(t,!0),t.strm.avail_out===0?Wi:ba):t.sym_next&&(Un(t,!1),t.strm.avail_out===0)?Ln:va},r2=(t,n)=>{let e,r,i,a,h=t.window;for(;;){if(t.lookahead<=pi){if(pa(t),t.lookahead<=pi&&n===mi)return Ln;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=de&&t.strstart>0&&(i=t.strstart-1,r=h[i],r===h[++i]&&r===h[++i]&&r===h[++i])){a=t.strstart+pi;do;while(r===h[++i]&&r===h[++i]&&r===h[++i]&&r===h[++i]&&r===h[++i]&&r===h[++i]&&r===h[++i]&&r===h[++i]&&i<a);t.match_length=pi-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=de?(e=gi(t,1,t.match_length-de),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(e=gi(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),e&&(Un(t,!1),t.strm.avail_out===0))return Ln}return t.insert=0,n===Xn?(Un(t,!0),t.strm.avail_out===0?Wi:ba):t.sym_next&&(Un(t,!1),t.strm.avail_out===0)?Ln:va},i2=(t,n)=>{let e;for(;;){if(t.lookahead===0&&(pa(t),t.lookahead===0)){if(n===mi)return Ln;break}if(t.match_length=0,e=gi(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,e&&(Un(t,!1),t.strm.avail_out===0))return Ln}return t.insert=0,n===Xn?(Un(t,!0),t.strm.avail_out===0?Wi:ba):t.sym_next&&(Un(t,!1),t.strm.avail_out===0)?Ln:va};function _r(t,n,e,r,i){this.good_length=t,this.max_lazy=n,this.nice_length=e,this.max_chain=r,this.func=i}var ho=[new _r(0,0,0,0,Hc),new _r(4,4,8,4,ql),new _r(4,5,16,8,ql),new _r(4,6,32,32,ql),new _r(4,4,16,16,fa),new _r(8,16,32,32,fa),new _r(8,16,128,128,fa),new _r(8,32,128,256,fa),new _r(32,128,258,1024,fa),new _r(32,258,258,4096,fa)],a2=t=>{t.window_size=2*t.w_size,di(t.head),t.max_lazy_match=ho[t.level].max_lazy,t.good_match=ho[t.level].good_length,t.nice_match=ho[t.level].nice_length,t.max_chain_length=ho[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=de-1,t.match_available=0,t.ins_h=0};function o2(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=As,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(X0*2),this.dyn_dtree=new Uint16Array((2*Y0+1)*2),this.bl_tree=new Uint16Array((2*K0+1)*2),di(this.dyn_ltree),di(this.dyn_dtree),di(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(J0+1),this.heap=new Uint16Array(2*th+1),di(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*th+1),di(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Ao=t=>{if(!t)return 1;let n=t.state;return!n||n.strm!==t||n.status!==da&&n.status!==fh&&n.status!==eh&&n.status!==nh&&n.status!==rh&&n.status!==ih&&n.status!==Ui&&n.status!==lo?1:0},Wc=t=>{if(Ao(t))return qi(t,Ar);t.total_in=t.total_out=0,t.data_type=H0;let n=t.state;return n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap===2?fh:n.wrap?da:Ui,t.adler=n.wrap===2?0:1,n.last_flush=-2,C0(n),pn},Gc=t=>{let n=Wc(t);return n===pn&&a2(t.state),n},s2=(t,n)=>Ao(t)||t.state.wrap!==2?Ar:(t.state.gzhead=n,pn),Vc=(t,n,e,r,i,a)=>{if(!t)return Ar;let h=1;if(n===j0&&(n=6),r<0?(h=0,r=-r):r>15&&(h=2,r-=16),i<1||i>W0||e!==As||r<8||r>15||n<0||n>9||a<0||a>U0||r===8&&h!==1)return qi(t,Ar);r===8&&(r=9);let l=new o2;return t.state=l,l.strm=t,l.status=da,l.wrap=h,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=i+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+de-1)/de),l.window=new Uint8Array(l.w_size*2),l.head=new Uint16Array(l.hash_size),l.prev=new Uint16Array(l.w_size),l.lit_bufsize=1<<i+6,l.pending_buf_size=l.lit_bufsize*4,l.pending_buf=new Uint8Array(l.pending_buf_size),l.sym_buf=l.lit_bufsize,l.sym_end=(l.lit_bufsize-1)*3,l.level=n,l.strategy=a,l.method=e,Gc(t)},l2=(t,n)=>Vc(t,n,As,G0,V0,q0),h2=(t,n)=>{if(Ao(t)||n>$f||n<0)return t?qi(t,Ar):Ar;let e=t.state;if(!t.output||t.avail_in!==0&&!t.input||e.status===lo&&n!==Xn)return qi(t,t.avail_out===0?Ul:Ar);let r=e.last_flush;if(e.last_flush=n,e.pending!==0){if(zn(t),t.avail_out===0)return e.last_flush=-1,pn}else if(t.avail_in===0&&Kf(n)<=Kf(r)&&n!==Xn)return qi(t,Ul);if(e.status===lo&&t.avail_in!==0)return qi(t,Ul);if(e.status===da&&e.wrap===0&&(e.status=Ui),e.status===da){let i=As+(e.w_bits-8<<4)<<8,a=-1;if(e.strategy>=ps||e.level<2?a=0:e.level<6?a=1:e.level===6?a=2:a=3,i|=a<<6,e.strstart!==0&&(i|=Q0),i+=31-i%31,so(e,i),e.strstart!==0&&(so(e,t.adler>>>16),so(e,t.adler&65535)),t.adler=1,e.status=Ui,zn(t),e.pending!==0)return e.last_flush=-1,pn}if(e.status===fh){if(t.adler=0,we(e,31),we(e,139),we(e,8),e.gzhead)we(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),we(e,e.gzhead.time&255),we(e,e.gzhead.time>>8&255),we(e,e.gzhead.time>>16&255),we(e,e.gzhead.time>>24&255),we(e,e.level===9?2:e.strategy>=ps||e.level<2?4:0),we(e,e.gzhead.os&255),e.gzhead.extra&&e.gzhead.extra.length&&(we(e,e.gzhead.extra.length&255),we(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(t.adler=on(t.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=eh;else if(we(e,0),we(e,0),we(e,0),we(e,0),we(e,0),we(e,e.level===9?2:e.strategy>=ps||e.level<2?4:0),we(e,t2),e.status=Ui,zn(t),e.pending!==0)return e.last_flush=-1,pn}if(e.status===eh){if(e.gzhead.extra){let i=e.pending,a=(e.gzhead.extra.length&65535)-e.gzindex;for(;e.pending+a>e.pending_buf_size;){let l=e.pending_buf_size-e.pending;if(e.pending_buf.set(e.gzhead.extra.subarray(e.gzindex,e.gzindex+l),e.pending),e.pending=e.pending_buf_size,e.gzhead.hcrc&&e.pending>i&&(t.adler=on(t.adler,e.pending_buf,e.pending-i,i)),e.gzindex+=l,zn(t),e.pending!==0)return e.last_flush=-1,pn;i=0,a-=l}let h=new Uint8Array(e.gzhead.extra);e.pending_buf.set(h.subarray(e.gzindex,e.gzindex+a),e.pending),e.pending+=a,e.gzhead.hcrc&&e.pending>i&&(t.adler=on(t.adler,e.pending_buf,e.pending-i,i)),e.gzindex=0}e.status=nh}if(e.status===nh){if(e.gzhead.name){let i=e.pending,a;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>i&&(t.adler=on(t.adler,e.pending_buf,e.pending-i,i)),zn(t),e.pending!==0)return e.last_flush=-1,pn;i=0}e.gzindex<e.gzhead.name.length?a=e.gzhead.name.charCodeAt(e.gzindex++)&255:a=0,we(e,a)}while(a!==0);e.gzhead.hcrc&&e.pending>i&&(t.adler=on(t.adler,e.pending_buf,e.pending-i,i)),e.gzindex=0}e.status=rh}if(e.status===rh){if(e.gzhead.comment){let i=e.pending,a;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>i&&(t.adler=on(t.adler,e.pending_buf,e.pending-i,i)),zn(t),e.pending!==0)return e.last_flush=-1,pn;i=0}e.gzindex<e.gzhead.comment.length?a=e.gzhead.comment.charCodeAt(e.gzindex++)&255:a=0,we(e,a)}while(a!==0);e.gzhead.hcrc&&e.pending>i&&(t.adler=on(t.adler,e.pending_buf,e.pending-i,i))}e.status=ih}if(e.status===ih){if(e.gzhead.hcrc){if(e.pending+2>e.pending_buf_size&&(zn(t),e.pending!==0))return e.last_flush=-1,pn;we(e,t.adler&255),we(e,t.adler>>8&255),t.adler=0}if(e.status=Ui,zn(t),e.pending!==0)return e.last_flush=-1,pn}if(t.avail_in!==0||e.lookahead!==0||n!==mi&&e.status!==lo){let i=e.level===0?Hc(e,n):e.strategy===ps?i2(e,n):e.strategy===z0?r2(e,n):ho[e.level].func(e,n);if((i===Wi||i===ba)&&(e.status=lo),i===Ln||i===Wi)return t.avail_out===0&&(e.last_flush=-1),pn;if(i===va&&(n===D0?T0(e):n!==$f&&(Ql(e,0,0,!1),n===M0&&(di(e.head),e.lookahead===0&&(e.strstart=0,e.block_start=0,e.insert=0))),zn(t),t.avail_out===0))return e.last_flush=-1,pn}return n!==Xn?pn:e.wrap<=0?Yf:(e.wrap===2?(we(e,t.adler&255),we(e,t.adler>>8&255),we(e,t.adler>>16&255),we(e,t.adler>>24&255),we(e,t.total_in&255),we(e,t.total_in>>8&255),we(e,t.total_in>>16&255),we(e,t.total_in>>24&255)):(so(e,t.adler>>>16),so(e,t.adler&65535)),zn(t),e.wrap>0&&(e.wrap=-e.wrap),e.pending!==0?pn:Yf)},f2=t=>{if(Ao(t))return Ar;let n=t.state.status;return t.state=null,n===Ui?qi(t,R0):pn},c2=(t,n)=>{let e=n.length;if(Ao(t))return Ar;let r=t.state,i=r.wrap;if(i===2||i===1&&r.status!==da||r.lookahead)return Ar;if(i===1&&(t.adler=bo(t.adler,n,e,0)),r.wrap=0,e>=r.w_size){i===0&&(di(r.head),r.strstart=0,r.block_start=0,r.insert=0);let c=new Uint8Array(r.w_size);c.set(n.subarray(e-r.w_size,e),0),n=c,e=r.w_size}let a=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=e,t.next_in=0,t.input=n,pa(r);r.lookahead>=de;){let c=r.strstart,u=r.lookahead-(de-1);do r.ins_h=vi(r,r.ins_h,r.window[c+de-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--u);r.strstart=c,r.lookahead=de-1,pa(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=de-1,r.match_available=0,t.next_in=h,t.input=l,t.avail_in=a,r.wrap=i,pn},u2=l2,d2=Vc,p2=Gc,g2=Wc,m2=s2,v2=h2,b2=f2,w2=c2,y2="pako deflate (from Nodeca project)",co={deflateInit:u2,deflateInit2:d2,deflateReset:p2,deflateResetKeep:g2,deflateSetHeader:m2,deflate:v2,deflateEnd:b2,deflateSetDictionary:w2,deflateInfo:y2},_2=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),x2=function(t){let n=Array.prototype.slice.call(arguments,1);for(;n.length;){let e=n.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(let r in e)_2(e,r)&&(t[r]=e[r])}}return t},A2=t=>{let n=0;for(let r=0,i=t.length;r<i;r++)n+=t[r].length;let e=new Uint8Array(n);for(let r=0,i=0,a=t.length;r<a;r++){let h=t[r];e.set(h,i),i+=h.length}return e},Ns={assign:x2,flattenChunks:A2},Zc=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Zc=!1}var wo=new Uint8Array(256);for(let t=0;t<256;t++)wo[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;wo[254]=wo[254]=1;var N2=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let n,e,r,i,a,h=t.length,l=0;for(i=0;i<h;i++)e=t.charCodeAt(i),(e&64512)===55296&&i+1<h&&(r=t.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),l+=e<128?1:e<2048?2:e<65536?3:4;for(n=new Uint8Array(l),a=0,i=0;a<l;i++)e=t.charCodeAt(i),(e&64512)===55296&&i+1<h&&(r=t.charCodeAt(i+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),i++)),e<128?n[a++]=e:e<2048?(n[a++]=192|e>>>6,n[a++]=128|e&63):e<65536?(n[a++]=224|e>>>12,n[a++]=128|e>>>6&63,n[a++]=128|e&63):(n[a++]=240|e>>>18,n[a++]=128|e>>>12&63,n[a++]=128|e>>>6&63,n[a++]=128|e&63);return n},L2=(t,n)=>{if(n<65534&&t.subarray&&Zc)return String.fromCharCode.apply(null,t.length===n?t:t.subarray(0,n));let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(t[r]);return e},S2=(t,n)=>{let e=n||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,n));let r,i,a=new Array(e*2);for(i=0,r=0;r<e;){let h=t[r++];if(h<128){a[i++]=h;continue}let l=wo[h];if(l>4){a[i++]=65533,r+=l-1;continue}for(h&=l===2?31:l===3?15:7;l>1&&r<e;)h=h<<6|t[r++]&63,l--;if(l>1){a[i++]=65533;continue}h<65536?a[i++]=h:(h-=65536,a[i++]=55296|h>>10&1023,a[i++]=56320|h&1023)}return L2(a,i)},k2=(t,n)=>{n=n||t.length,n>t.length&&(n=t.length);let e=n-1;for(;e>=0&&(t[e]&192)===128;)e--;return e<0||e===0?n:e+wo[t[e]]>n?e:n},yo={string2buf:N2,buf2string:S2,utf8border:k2};function P2(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var $c=P2,Yc=Object.prototype.toString,{Z_NO_FLUSH:I2,Z_SYNC_FLUSH:F2,Z_FULL_FLUSH:E2,Z_FINISH:C2,Z_OK:_s,Z_STREAM_END:O2,Z_DEFAULT_COMPRESSION:T2,Z_DEFAULT_STRATEGY:D2,Z_DEFLATED:M2}=ma;function No(t){this.options=Ns.assign({level:T2,method:M2,chunkSize:16384,windowBits:15,memLevel:8,strategy:D2},t||{});let n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $c,this.strm.avail_out=0;let e=co.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(e!==_s)throw new Error(Hi[e]);if(n.header&&co.deflateSetHeader(this.strm,n.header),n.dictionary){let r;if(typeof n.dictionary=="string"?r=yo.string2buf(n.dictionary):Yc.call(n.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(n.dictionary):r=n.dictionary,e=co.deflateSetDictionary(this.strm,r),e!==_s)throw new Error(Hi[e]);this._dict_set=!0}}No.prototype.push=function(t,n){let e=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;for(n===~~n?a=n:a=n===!0?C2:I2,typeof t=="string"?e.input=yo.string2buf(t):Yc.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){if(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),(a===F2||a===E2)&&e.avail_out<=6){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(i=co.deflate(e,a),i===O2)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),i=co.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===_s;if(e.avail_out===0){this.onData(e.output);continue}if(a>0&&e.next_out>0){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(e.avail_in===0)break}return!0};No.prototype.onData=function(t){this.chunks.push(t)};No.prototype.onEnd=function(t){t===_s&&(this.result=Ns.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function ch(t,n){let e=new No(n);if(e.push(t,!0),e.err)throw e.msg||Hi[e.err];return e.result}function R2(t,n){return n=n||{},n.raw=!0,ch(t,n)}function j2(t,n){return n=n||{},n.gzip=!0,ch(t,n)}var B2=No,z2=ch,U2=R2,q2=j2,H2=ma,W2={Deflate:B2,deflate:z2,deflateRaw:U2,gzip:q2,constants:H2},gs=16209,G2=16191,V2=function(n,e){let r,i,a,h,l,c,u,g,y,x,p,F,P,D,N,H,q,R,rt,mt,ct,Y,j,tt,S=n.state;r=n.next_in,j=n.input,i=r+(n.avail_in-5),a=n.next_out,tt=n.output,h=a-(e-n.avail_out),l=a+(n.avail_out-257),c=S.dmax,u=S.wsize,g=S.whave,y=S.wnext,x=S.window,p=S.hold,F=S.bits,P=S.lencode,D=S.distcode,N=(1<<S.lenbits)-1,H=(1<<S.distbits)-1;t:do{F<15&&(p+=j[r++]<<F,F+=8,p+=j[r++]<<F,F+=8),q=P[p&N];e:for(;;){if(R=q>>>24,p>>>=R,F-=R,R=q>>>16&255,R===0)tt[a++]=q&65535;else if(R&16){rt=q&65535,R&=15,R&&(F<R&&(p+=j[r++]<<F,F+=8),rt+=p&(1<<R)-1,p>>>=R,F-=R),F<15&&(p+=j[r++]<<F,F+=8,p+=j[r++]<<F,F+=8),q=D[p&H];n:for(;;){if(R=q>>>24,p>>>=R,F-=R,R=q>>>16&255,R&16){if(mt=q&65535,R&=15,F<R&&(p+=j[r++]<<F,F+=8,F<R&&(p+=j[r++]<<F,F+=8)),mt+=p&(1<<R)-1,mt>c){n.msg="invalid distance too far back",S.mode=gs;break t}if(p>>>=R,F-=R,R=a-h,mt>R){if(R=mt-R,R>g&&S.sane){n.msg="invalid distance too far back",S.mode=gs;break t}if(ct=0,Y=x,y===0){if(ct+=u-R,R<rt){rt-=R;do tt[a++]=x[ct++];while(--R);ct=a-mt,Y=tt}}else if(y<R){if(ct+=u+y-R,R-=y,R<rt){rt-=R;do tt[a++]=x[ct++];while(--R);if(ct=0,y<rt){R=y,rt-=R;do tt[a++]=x[ct++];while(--R);ct=a-mt,Y=tt}}}else if(ct+=y-R,R<rt){rt-=R;do tt[a++]=x[ct++];while(--R);ct=a-mt,Y=tt}for(;rt>2;)tt[a++]=Y[ct++],tt[a++]=Y[ct++],tt[a++]=Y[ct++],rt-=3;rt&&(tt[a++]=Y[ct++],rt>1&&(tt[a++]=Y[ct++]))}else{ct=a-mt;do tt[a++]=tt[ct++],tt[a++]=tt[ct++],tt[a++]=tt[ct++],rt-=3;while(rt>2);rt&&(tt[a++]=tt[ct++],rt>1&&(tt[a++]=tt[ct++]))}}else if((R&64)===0){q=D[(q&65535)+(p&(1<<R)-1)];continue n}else{n.msg="invalid distance code",S.mode=gs;break t}break}}else if((R&64)===0){q=P[(q&65535)+(p&(1<<R)-1)];continue e}else if(R&32){S.mode=G2;break t}else{n.msg="invalid literal/length code",S.mode=gs;break t}break}}while(r<i&&a<l);rt=F>>3,r-=rt,F-=rt<<3,p&=(1<<F)-1,n.next_in=r,n.next_out=a,n.avail_in=r<i?5+(i-r):5-(r-i),n.avail_out=a<l?257+(l-a):257-(a-l),S.hold=p,S.bits=F},ca=15,Xf=852,Jf=592,Qf=0,Hl=1,tc=2,Z2=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),$2=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Y2=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),K2=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),X2=(t,n,e,r,i,a,h,l)=>{let c=l.bits,u=0,g=0,y=0,x=0,p=0,F=0,P=0,D=0,N=0,H=0,q,R,rt,mt,ct,Y=null,j,tt=new Uint16Array(ca+1),S=new Uint16Array(ca+1),O=null,W,U,it;for(u=0;u<=ca;u++)tt[u]=0;for(g=0;g<r;g++)tt[n[e+g]]++;for(p=c,x=ca;x>=1&&tt[x]===0;x--);if(p>x&&(p=x),x===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,l.bits=1,0;for(y=1;y<x&&tt[y]===0;y++);for(p<y&&(p=y),D=1,u=1;u<=ca;u++)if(D<<=1,D-=tt[u],D<0)return-1;if(D>0&&(t===Qf||x!==1))return-1;for(S[1]=0,u=1;u<ca;u++)S[u+1]=S[u]+tt[u];for(g=0;g<r;g++)n[e+g]!==0&&(h[S[n[e+g]]++]=g);if(t===Qf?(Y=O=h,j=20):t===Hl?(Y=Z2,O=$2,j=257):(Y=Y2,O=K2,j=0),H=0,g=0,u=y,ct=a,F=p,P=0,rt=-1,N=1<<p,mt=N-1,t===Hl&&N>Xf||t===tc&&N>Jf)return 1;for(;;){W=u-P,h[g]+1<j?(U=0,it=h[g]):h[g]>=j?(U=O[h[g]-j],it=Y[h[g]-j]):(U=96,it=0),q=1<<u-P,R=1<<F,y=R;do R-=q,i[ct+(H>>P)+R]=W<<24|U<<16|it|0;while(R!==0);for(q=1<<u-1;H&q;)q>>=1;if(q!==0?(H&=q-1,H+=q):H=0,g++,--tt[u]===0){if(u===x)break;u=n[e+h[g]]}if(u>p&&(H&mt)!==rt){for(P===0&&(P=p),ct+=y,F=u-P,D=1<<F;F+P<x&&(D-=tt[F+P],!(D<=0));)F++,D<<=1;if(N+=1<<F,t===Hl&&N>Xf||t===tc&&N>Jf)return 1;rt=H&mt,i[rt]=p<<24|F<<16|ct-a|0}}return H!==0&&(i[ct+H]=u-P<<24|64<<16|0),l.bits=p,0},uo=X2,J2=0,Kc=1,Xc=2,{Z_FINISH:ec,Z_BLOCK:Q2,Z_TREES:ms,Z_OK:Gi,Z_STREAM_END:t5,Z_NEED_DICT:e5,Z_STREAM_ERROR:Jn,Z_DATA_ERROR:Jc,Z_MEM_ERROR:Qc,Z_BUF_ERROR:n5,Z_DEFLATED:nc}=ma,Ls=16180,rc=16181,ic=16182,ac=16183,oc=16184,sc=16185,lc=16186,hc=16187,fc=16188,cc=16189,xs=16190,$r=16191,Wl=16192,uc=16193,Gl=16194,dc=16195,pc=16196,gc=16197,mc=16198,vs=16199,bs=16200,vc=16201,bc=16202,wc=16203,yc=16204,_c=16205,Vl=16206,xc=16207,Ac=16208,De=16209,tu=16210,eu=16211,r5=852,i5=592,a5=15,o5=a5,Nc=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function s5(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var Vi=t=>{if(!t)return 1;let n=t.state;return!n||n.strm!==t||n.mode<Ls||n.mode>eu?1:0},nu=t=>{if(Vi(t))return Jn;let n=t.state;return t.total_in=t.total_out=n.total=0,t.msg="",n.wrap&&(t.adler=n.wrap&1),n.mode=Ls,n.last=0,n.havedict=0,n.flags=-1,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new Int32Array(r5),n.distcode=n.distdyn=new Int32Array(i5),n.sane=1,n.back=-1,Gi},ru=t=>{if(Vi(t))return Jn;let n=t.state;return n.wsize=0,n.whave=0,n.wnext=0,nu(t)},iu=(t,n)=>{let e;if(Vi(t))return Jn;let r=t.state;return n<0?(e=0,n=-n):(e=(n>>4)+5,n<48&&(n&=15)),n&&(n<8||n>15)?Jn:(r.window!==null&&r.wbits!==n&&(r.window=null),r.wrap=e,r.wbits=n,ru(t))},au=(t,n)=>{if(!t)return Jn;let e=new s5;t.state=e,e.strm=t,e.window=null,e.mode=Ls;let r=iu(t,n);return r!==Gi&&(t.state=null),r},l5=t=>au(t,o5),Lc=!0,Zl,$l,h5=t=>{if(Lc){Zl=new Int32Array(512),$l=new Int32Array(32);let n=0;for(;n<144;)t.lens[n++]=8;for(;n<256;)t.lens[n++]=9;for(;n<280;)t.lens[n++]=7;for(;n<288;)t.lens[n++]=8;for(uo(Kc,t.lens,0,288,Zl,0,t.work,{bits:9}),n=0;n<32;)t.lens[n++]=5;uo(Xc,t.lens,0,32,$l,0,t.work,{bits:5}),Lc=!1}t.lencode=Zl,t.lenbits=9,t.distcode=$l,t.distbits=5},ou=(t,n,e,r)=>{let i,a=t.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(n.subarray(e-a.wsize,e),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(n.subarray(e-r,e-r+i),a.wnext),r-=i,r?(a.window.set(n.subarray(e-r,e),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},f5=(t,n)=>{let e,r,i,a,h,l,c,u,g,y,x,p,F,P,D=0,N,H,q,R,rt,mt,ct,Y,j=new Uint8Array(4),tt,S,O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Vi(t)||!t.output||!t.input&&t.avail_in!==0)return Jn;e=t.state,e.mode===$r&&(e.mode=Wl),h=t.next_out,i=t.output,c=t.avail_out,a=t.next_in,r=t.input,l=t.avail_in,u=e.hold,g=e.bits,y=l,x=c,Y=Gi;t:for(;;)switch(e.mode){case Ls:if(e.wrap===0){e.mode=Wl;break}for(;g<16;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(e.wrap&2&&u===35615){e.wbits===0&&(e.wbits=15),e.check=0,j[0]=u&255,j[1]=u>>>8&255,e.check=on(e.check,j,2,0),u=0,g=0,e.mode=rc;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((u&255)<<8)+(u>>8))%31){t.msg="incorrect header check",e.mode=De;break}if((u&15)!==nc){t.msg="unknown compression method",e.mode=De;break}if(u>>>=4,g-=4,ct=(u&15)+8,e.wbits===0&&(e.wbits=ct),ct>15||ct>e.wbits){t.msg="invalid window size",e.mode=De;break}e.dmax=1<<e.wbits,e.flags=0,t.adler=e.check=1,e.mode=u&512?cc:$r,u=0,g=0;break;case rc:for(;g<16;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(e.flags=u,(e.flags&255)!==nc){t.msg="unknown compression method",e.mode=De;break}if(e.flags&57344){t.msg="unknown header flags set",e.mode=De;break}e.head&&(e.head.text=u>>8&1),e.flags&512&&e.wrap&4&&(j[0]=u&255,j[1]=u>>>8&255,e.check=on(e.check,j,2,0)),u=0,g=0,e.mode=ic;case ic:for(;g<32;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}e.head&&(e.head.time=u),e.flags&512&&e.wrap&4&&(j[0]=u&255,j[1]=u>>>8&255,j[2]=u>>>16&255,j[3]=u>>>24&255,e.check=on(e.check,j,4,0)),u=0,g=0,e.mode=ac;case ac:for(;g<16;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}e.head&&(e.head.xflags=u&255,e.head.os=u>>8),e.flags&512&&e.wrap&4&&(j[0]=u&255,j[1]=u>>>8&255,e.check=on(e.check,j,2,0)),u=0,g=0,e.mode=oc;case oc:if(e.flags&1024){for(;g<16;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}e.length=u,e.head&&(e.head.extra_len=u),e.flags&512&&e.wrap&4&&(j[0]=u&255,j[1]=u>>>8&255,e.check=on(e.check,j,2,0)),u=0,g=0}else e.head&&(e.head.extra=null);e.mode=sc;case sc:if(e.flags&1024&&(p=e.length,p>l&&(p=l),p&&(e.head&&(ct=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(a,a+p),ct)),e.flags&512&&e.wrap&4&&(e.check=on(e.check,r,p,a)),l-=p,a+=p,e.length-=p),e.length))break t;e.length=0,e.mode=lc;case lc:if(e.flags&2048){if(l===0)break t;p=0;do ct=r[a+p++],e.head&&ct&&e.length<65536&&(e.head.name+=String.fromCharCode(ct));while(ct&&p<l);if(e.flags&512&&e.wrap&4&&(e.check=on(e.check,r,p,a)),l-=p,a+=p,ct)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=hc;case hc:if(e.flags&4096){if(l===0)break t;p=0;do ct=r[a+p++],e.head&&ct&&e.length<65536&&(e.head.comment+=String.fromCharCode(ct));while(ct&&p<l);if(e.flags&512&&e.wrap&4&&(e.check=on(e.check,r,p,a)),l-=p,a+=p,ct)break t}else e.head&&(e.head.comment=null);e.mode=fc;case fc:if(e.flags&512){for(;g<16;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(e.wrap&4&&u!==(e.check&65535)){t.msg="header crc mismatch",e.mode=De;break}u=0,g=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),t.adler=e.check=0,e.mode=$r;break;case cc:for(;g<32;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}t.adler=e.check=Nc(u),u=0,g=0,e.mode=xs;case xs:if(e.havedict===0)return t.next_out=h,t.avail_out=c,t.next_in=a,t.avail_in=l,e.hold=u,e.bits=g,e5;t.adler=e.check=1,e.mode=$r;case $r:if(n===Q2||n===ms)break t;case Wl:if(e.last){u>>>=g&7,g-=g&7,e.mode=Vl;break}for(;g<3;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}switch(e.last=u&1,u>>>=1,g-=1,u&3){case 0:e.mode=uc;break;case 1:if(h5(e),e.mode=vs,n===ms){u>>>=2,g-=2;break t}break;case 2:e.mode=pc;break;case 3:t.msg="invalid block type",e.mode=De}u>>>=2,g-=2;break;case uc:for(u>>>=g&7,g-=g&7;g<32;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if((u&65535)!==(u>>>16^65535)){t.msg="invalid stored block lengths",e.mode=De;break}if(e.length=u&65535,u=0,g=0,e.mode=Gl,n===ms)break t;case Gl:e.mode=dc;case dc:if(p=e.length,p){if(p>l&&(p=l),p>c&&(p=c),p===0)break t;i.set(r.subarray(a,a+p),h),l-=p,a+=p,c-=p,h+=p,e.length-=p;break}e.mode=$r;break;case pc:for(;g<14;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(e.nlen=(u&31)+257,u>>>=5,g-=5,e.ndist=(u&31)+1,u>>>=5,g-=5,e.ncode=(u&15)+4,u>>>=4,g-=4,e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols",e.mode=De;break}e.have=0,e.mode=gc;case gc:for(;e.have<e.ncode;){for(;g<3;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}e.lens[O[e.have++]]=u&7,u>>>=3,g-=3}for(;e.have<19;)e.lens[O[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,tt={bits:e.lenbits},Y=uo(J2,e.lens,0,19,e.lencode,0,e.work,tt),e.lenbits=tt.bits,Y){t.msg="invalid code lengths set",e.mode=De;break}e.have=0,e.mode=mc;case mc:for(;e.have<e.nlen+e.ndist;){for(;D=e.lencode[u&(1<<e.lenbits)-1],N=D>>>24,H=D>>>16&255,q=D&65535,!(N<=g);){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(q<16)u>>>=N,g-=N,e.lens[e.have++]=q;else{if(q===16){for(S=N+2;g<S;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(u>>>=N,g-=N,e.have===0){t.msg="invalid bit length repeat",e.mode=De;break}ct=e.lens[e.have-1],p=3+(u&3),u>>>=2,g-=2}else if(q===17){for(S=N+3;g<S;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}u>>>=N,g-=N,ct=0,p=3+(u&7),u>>>=3,g-=3}else{for(S=N+7;g<S;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}u>>>=N,g-=N,ct=0,p=11+(u&127),u>>>=7,g-=7}if(e.have+p>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=De;break}for(;p--;)e.lens[e.have++]=ct}}if(e.mode===De)break;if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block",e.mode=De;break}if(e.lenbits=9,tt={bits:e.lenbits},Y=uo(Kc,e.lens,0,e.nlen,e.lencode,0,e.work,tt),e.lenbits=tt.bits,Y){t.msg="invalid literal/lengths set",e.mode=De;break}if(e.distbits=6,e.distcode=e.distdyn,tt={bits:e.distbits},Y=uo(Xc,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,tt),e.distbits=tt.bits,Y){t.msg="invalid distances set",e.mode=De;break}if(e.mode=vs,n===ms)break t;case vs:e.mode=bs;case bs:if(l>=6&&c>=258){t.next_out=h,t.avail_out=c,t.next_in=a,t.avail_in=l,e.hold=u,e.bits=g,V2(t,x),h=t.next_out,i=t.output,c=t.avail_out,a=t.next_in,r=t.input,l=t.avail_in,u=e.hold,g=e.bits,e.mode===$r&&(e.back=-1);break}for(e.back=0;D=e.lencode[u&(1<<e.lenbits)-1],N=D>>>24,H=D>>>16&255,q=D&65535,!(N<=g);){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(H&&(H&240)===0){for(R=N,rt=H,mt=q;D=e.lencode[mt+((u&(1<<R+rt)-1)>>R)],N=D>>>24,H=D>>>16&255,q=D&65535,!(R+N<=g);){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}u>>>=R,g-=R,e.back+=R}if(u>>>=N,g-=N,e.back+=N,e.length=q,H===0){e.mode=_c;break}if(H&32){e.back=-1,e.mode=$r;break}if(H&64){t.msg="invalid literal/length code",e.mode=De;break}e.extra=H&15,e.mode=vc;case vc:if(e.extra){for(S=e.extra;g<S;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}e.length+=u&(1<<e.extra)-1,u>>>=e.extra,g-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=bc;case bc:for(;D=e.distcode[u&(1<<e.distbits)-1],N=D>>>24,H=D>>>16&255,q=D&65535,!(N<=g);){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if((H&240)===0){for(R=N,rt=H,mt=q;D=e.distcode[mt+((u&(1<<R+rt)-1)>>R)],N=D>>>24,H=D>>>16&255,q=D&65535,!(R+N<=g);){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}u>>>=R,g-=R,e.back+=R}if(u>>>=N,g-=N,e.back+=N,H&64){t.msg="invalid distance code",e.mode=De;break}e.offset=q,e.extra=H&15,e.mode=wc;case wc:if(e.extra){for(S=e.extra;g<S;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}e.offset+=u&(1<<e.extra)-1,u>>>=e.extra,g-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=De;break}e.mode=yc;case yc:if(c===0)break t;if(p=x-c,e.offset>p){if(p=e.offset-p,p>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=De;break}p>e.wnext?(p-=e.wnext,F=e.wsize-p):F=e.wnext-p,p>e.length&&(p=e.length),P=e.window}else P=i,F=h-e.offset,p=e.length;p>c&&(p=c),c-=p,e.length-=p;do i[h++]=P[F++];while(--p);e.length===0&&(e.mode=bs);break;case _c:if(c===0)break t;i[h++]=e.length,c--,e.mode=bs;break;case Vl:if(e.wrap){for(;g<32;){if(l===0)break t;l--,u|=r[a++]<<g,g+=8}if(x-=c,t.total_out+=x,e.total+=x,e.wrap&4&&x&&(t.adler=e.check=e.flags?on(e.check,i,x,h-x):bo(e.check,i,x,h-x)),x=c,e.wrap&4&&(e.flags?u:Nc(u))!==e.check){t.msg="incorrect data check",e.mode=De;break}u=0,g=0}e.mode=xc;case xc:if(e.wrap&&e.flags){for(;g<32;){if(l===0)break t;l--,u+=r[a++]<<g,g+=8}if(e.wrap&4&&u!==(e.total&4294967295)){t.msg="incorrect length check",e.mode=De;break}u=0,g=0}e.mode=Ac;case Ac:Y=t5;break t;case De:Y=Jc;break t;case tu:return Qc;case eu:default:return Jn}return t.next_out=h,t.avail_out=c,t.next_in=a,t.avail_in=l,e.hold=u,e.bits=g,(e.wsize||x!==t.avail_out&&e.mode<De&&(e.mode<Vl||n!==ec))&&ou(t,t.output,t.next_out,x-t.avail_out),y-=t.avail_in,x-=t.avail_out,t.total_in+=y,t.total_out+=x,e.total+=x,e.wrap&4&&x&&(t.adler=e.check=e.flags?on(e.check,i,x,t.next_out-x):bo(e.check,i,x,t.next_out-x)),t.data_type=e.bits+(e.last?64:0)+(e.mode===$r?128:0)+(e.mode===vs||e.mode===Gl?256:0),(y===0&&x===0||n===ec)&&Y===Gi&&(Y=n5),Y},c5=t=>{if(Vi(t))return Jn;let n=t.state;return n.window&&(n.window=null),t.state=null,Gi},u5=(t,n)=>{if(Vi(t))return Jn;let e=t.state;return(e.wrap&2)===0?Jn:(e.head=n,n.done=!1,Gi)},d5=(t,n)=>{let e=n.length,r,i,a;return Vi(t)||(r=t.state,r.wrap!==0&&r.mode!==xs)?Jn:r.mode===xs&&(i=1,i=bo(i,n,e,0),i!==r.check)?Jc:(a=ou(t,n,e,e),a?(r.mode=tu,Qc):(r.havedict=1,Gi))},p5=ru,g5=iu,m5=nu,v5=l5,b5=au,w5=f5,y5=c5,_5=u5,x5=d5,A5="pako inflate (from Nodeca project)",Kr={inflateReset:p5,inflateReset2:g5,inflateResetKeep:m5,inflateInit:v5,inflateInit2:b5,inflate:w5,inflateEnd:y5,inflateGetHeader:_5,inflateSetDictionary:x5,inflateInfo:A5};function N5(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var L5=N5,su=Object.prototype.toString,{Z_NO_FLUSH:S5,Z_FINISH:k5,Z_OK:_o,Z_STREAM_END:Yl,Z_NEED_DICT:Kl,Z_STREAM_ERROR:P5,Z_DATA_ERROR:Sc,Z_MEM_ERROR:I5}=ma;function Lo(t){this.options=Ns.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});let n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(t&&t.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $c,this.strm.avail_out=0;let e=Kr.inflateInit2(this.strm,n.windowBits);if(e!==_o)throw new Error(Hi[e]);if(this.header=new L5,Kr.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=yo.string2buf(n.dictionary):su.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(e=Kr.inflateSetDictionary(this.strm,n.dictionary),e!==_o)))throw new Error(Hi[e])}Lo.prototype.push=function(t,n){let e=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,h,l;if(this.ended)return!1;for(n===~~n?h=n:h=n===!0?k5:S5,su.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),a=Kr.inflate(e,h),a===Kl&&i&&(a=Kr.inflateSetDictionary(e,i),a===_o?a=Kr.inflate(e,h):a===Sc&&(a=Kl));e.avail_in>0&&a===Yl&&e.state.wrap>0&&t[e.next_in]!==0;)Kr.inflateReset(e),a=Kr.inflate(e,h);switch(a){case P5:case Sc:case Kl:case I5:return this.onEnd(a),this.ended=!0,!1}if(l=e.avail_out,e.next_out&&(e.avail_out===0||a===Yl))if(this.options.to==="string"){let c=yo.utf8border(e.output,e.next_out),u=e.next_out-c,g=yo.buf2string(e.output,c);e.next_out=u,e.avail_out=r-u,u&&e.output.set(e.output.subarray(c,c+u),0),this.onData(g)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(a===_o&&l===0)){if(a===Yl)return a=Kr.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};Lo.prototype.onData=function(t){this.chunks.push(t)};Lo.prototype.onEnd=function(t){t===_o&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ns.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function uh(t,n){let e=new Lo(n);if(e.push(t),e.err)throw e.msg||Hi[e.err];return e.result}function F5(t,n){return n=n||{},n.raw=!0,uh(t,n)}var E5=Lo,C5=uh,O5=F5,T5=uh,D5=ma,M5={Inflate:E5,inflate:C5,inflateRaw:O5,ungzip:T5,constants:D5},{Deflate:yp,deflate:_p,deflateRaw:xp,gzip:Ap}=W2,{Inflate:R5,inflate:j5,inflateRaw:Np,ungzip:Lp}=M5;var dh=R5,lu=j5;var fu=[];for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n&1?n=3988292384^n>>>1:n=n>>>1;fu[t]=n}var hu=4294967295;function B5(t,n,e){let r=t;for(let i=0;i<e;i++)r=fu[(r^n[i])&255]^r>>>8;return r}function z5(t,n){return(B5(hu,t,n)^hu)>>>0}function ph(t,n,e){let r=t.readUint32(),i=z5(new Uint8Array(t.buffer,t.byteOffset+t.offset-n-4,n),n);if(i!==r)throw new Error(`CRC mismatch for chunk ${e}. Expected ${r}, found ${i}`)}function Ss(t,n,e){for(let r=0;r<e;r++)n[r]=t[r]}function ks(t,n,e,r){let i=0;for(;i<r;i++)n[i]=t[i];for(;i<e;i++)n[i]=t[i]+n[i-r]&255}function Ps(t,n,e,r){let i=0;if(e.length===0)for(;i<r;i++)n[i]=t[i];else for(;i<r;i++)n[i]=t[i]+e[i]&255}function Is(t,n,e,r,i){let a=0;if(e.length===0){for(;a<i;a++)n[a]=t[a];for(;a<r;a++)n[a]=t[a]+(n[a-i]>>1)&255}else{for(;a<i;a++)n[a]=t[a]+(e[a]>>1)&255;for(;a<r;a++)n[a]=t[a]+(n[a-i]+e[a]>>1)&255}}function Fs(t,n,e,r,i){let a=0;if(e.length===0){for(;a<i;a++)n[a]=t[a];for(;a<r;a++)n[a]=t[a]+n[a-i]&255}else{for(;a<i;a++)n[a]=t[a]+e[a]&255;for(;a<r;a++)n[a]=t[a]+U5(n[a-i],e[a],e[a-i])&255}}function U5(t,n,e){let r=t+n-e,i=Math.abs(r-t),a=Math.abs(r-n),h=Math.abs(r-e);return i<=a&&i<=h?t:a<=h?n:e}function cu(t,n,e,r,i,a){switch(t){case 0:Ss(n,e,i);break;case 1:ks(n,e,i,a);break;case 2:Ps(n,e,r,i);break;case 3:Is(n,e,r,i,a);break;case 4:Fs(n,e,r,i,a);break;default:throw new Error(`Unsupported filter: ${t}`)}}var q5=new Uint16Array([255]),H5=new Uint8Array(q5.buffer),W5=H5[0]===255;function uu(t){let{data:n,width:e,height:r,channels:i,depth:a}=t,h=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],l=Math.ceil(a/8)*i,c=new Uint8Array(r*e*l),u=0;for(let g=0;g<7;g++){let y=h[g],x=Math.ceil((e-y.x)/y.xStep),p=Math.ceil((r-y.y)/y.yStep);if(x<=0||p<=0)continue;let F=x*l,P=new Uint8Array(F);for(let D=0;D<p;D++){let N=n[u++],H=n.subarray(u,u+F);u+=F;let q=new Uint8Array(F);cu(N,H,q,P,F,l),P.set(q);for(let R=0;R<x;R++){let rt=y.x+R*y.xStep,mt=y.y+D*y.yStep;if(!(rt>=e||mt>=r))for(let ct=0;ct<l;ct++)c[(mt*e+rt)*l+ct]=q[R*l+ct]}}}if(a===16){let g=new Uint16Array(c.buffer);if(W5)for(let y=0;y<g.length;y++)g[y]=G5(g[y]);return g}else return c}function G5(t){return(t&255)<<8|t>>8&255}var V5=new Uint16Array([255]),Z5=new Uint8Array(V5.buffer),$5=Z5[0]===255,Y5=new Uint8Array(0);function gh(t){let{data:n,width:e,height:r,channels:i,depth:a}=t,h=Math.ceil(a/8)*i,l=Math.ceil(a/8*i*e),c=new Uint8Array(r*l),u=Y5,g=0,y,x;for(let p=0;p<r;p++){switch(y=n.subarray(g+1,g+1+l),x=c.subarray(p*l,(p+1)*l),n[g]){case 0:Ss(y,x,l);break;case 1:ks(y,x,l,h);break;case 2:Ps(y,x,u,l);break;case 3:Is(y,x,u,l,h);break;case 4:Fs(y,x,u,l,h);break;default:throw new Error(`Unsupported filter: ${n[g]}`)}u=x,g+=l+1}if(a===16){let p=new Uint16Array(c.buffer);if($5)for(let F=0;F<p.length;F++)p[F]=K5(p[F]);return p}else return c}function K5(t){return(t&255)<<8|t>>8&255}var Es=Uint8Array.of(137,80,78,71,13,10,26,10);function mh(t){if(!du(t.readBytes(Es.length)))throw new Error("wrong PNG signature")}function du(t){if(t.length<Es.length)return!1;for(let n=0;n<Es.length;n++)if(t[n]!==Es[n])return!1;return!0}var pu="tEXt",J5=0,gu=new TextDecoder("latin1");function Q5(t){if(ed(t),t.length===0||t.length>79)throw new Error("keyword length must be between 1 and 79")}var td=/^[\u0000-\u00FF]*$/;function ed(t){if(!td.test(t))throw new Error("invalid latin1 text")}function mu(t,n,e){let r=vh(n);t[r]=nd(n,e-r.length-1)}function vh(t){for(t.mark();t.readByte()!==J5;);let n=t.offset;t.reset();let e=gu.decode(t.readBytes(n-t.offset-1));return t.skip(1),Q5(e),e}function nd(t,n){return gu.decode(t.readBytes(n))}var Sn={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},So={UNKNOWN:-1,DEFLATE:0},Cs={UNKNOWN:-1,ADAPTIVE:0},ko={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Po={NONE:0,BACKGROUND:1,PREVIOUS:2},Os={SOURCE:0,OVER:1};var Io=class extends oo{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(n,e={}){super(n);let{checkCrc:r=!1}=e;this._checkCrc=r,this._inflator=new dh,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=So.UNKNOWN,this._filterMethod=Cs.UNKNOWN,this._interlaceMethod=ko.UNKNOWN,this._colorType=Sn.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(mh(this);!this._end;){let n=this.readUint32(),e=this.readChars(4);this.decodeChunk(n,e)}return this.decodeImage(),this._png}decodeApng(){for(mh(this);!this._end;){let n=this.readUint32(),e=this.readChars(4);this.decodeApngChunk(n,e)}return this.decodeApngImage(),this._apng}decodeChunk(n,e){let r=this.offset;switch(e){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(n);break;case"IDAT":this.decodeIDAT(n);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(n);break;case"iCCP":this.decodeiCCP(n);break;case pu:mu(this._png.text,this,n);break;case"pHYs":this.decodepHYs();break;default:this.skip(n);break}if(this.offset-r!==n)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?ph(this,n+4,e):this.skip(4)}decodeApngChunk(n,e){let r=this.offset;switch(e!=="fdAT"&&e!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),e){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(n);break;default:this.decodeChunk(n,e),this.offset=r+n;break}if(this.offset-r!==n)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?ph(this,n+4,e):this.skip(4)}decodeIHDR(){let n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=rd(this.readUint8());let e=this.readUint8();this._colorType=e;let r;switch(e){case Sn.GREYSCALE:r=1;break;case Sn.TRUECOLOUR:r=3;break;case Sn.INDEXED_COLOUR:r=1;break;case Sn.GREYSCALE_ALPHA:r=2;break;case Sn.TRUECOLOUR_ALPHA:r=4;break;case Sn.UNKNOWN:default:throw new Error(`Unknown color type: ${e}`)}if(this._png.channels=r,this._compressionMethod=this.readUint8(),this._compressionMethod!==So.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){let n={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(n)}decodePLTE(n){if(n%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${n}`);let e=n/3;this._hasPalette=!0;let r=[];this._palette=r;for(let i=0;i<e;i++)r.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(n){this._writingDataChunks=!0;let e=n,r=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,r,e)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodeFDAT(n){this._writingDataChunks=!0;let e=n,r=this.offset+this.byteOffset;if(r+=4,e-=4,this._inflator.push(new Uint8Array(this.buffer,r,e)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodetRNS(n){switch(this._colorType){case Sn.GREYSCALE:case Sn.TRUECOLOUR:{if(n%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${n}`);if(n/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${n/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(n/2);for(let e=0;e<n/2;e++)this._transparency[e]=this.readUint16();break}case Sn.INDEXED_COLOUR:{if(n>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${n} vs ${this._palette.length})`);let e=0;for(;e<n;e++){let r=this.readByte();this._palette[e].push(r)}for(;e<this._palette.length;e++)this._palette[e].push(255);break}case Sn.UNKNOWN:case Sn.GREYSCALE_ALPHA:case Sn.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(n){let e=vh(this),r=this.readUint8();if(r!==So.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${r}`);let i=this.readBytes(n-e.length-2);this._png.iccEmbeddedProfile={name:e,profile:lu(i)}}decodepHYs(){let n=this.readUint32(),e=this.readUint32(),r=this.readByte();this._png.resolution={x:n,y:e,unit:r}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let n=0;n<this._numberOfFrames;n++){let e={sequenceNumber:this._frames[n].sequenceNumber,delayNumber:this._frames[n].delayNumber,delayDenominator:this._frames[n].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},r=this._frames.at(n);if(r){if(r.data=gh({data:r.data,width:r.width,height:r.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),n===0||r.xOffset===0&&r.yOffset===0&&r.width===this._png.width&&r.height===this._png.height)e.data=r.data;else{let i=this._apng.frames.at(n-1);this.disposeFrame(r,i,e),this.addFrameDataToCanvas(e,r)}this._apng.frames.push(e)}}return this._apng}disposeFrame(n,e,r){switch(n.disposeOp){case Po.NONE:break;case Po.BACKGROUND:for(let i=0;i<this._png.height;i++)for(let a=0;a<this._png.width;a++){let h=(i*n.width+a)*this._png.channels;for(let l=0;l<this._png.channels;l++)r.data[h+l]=0}break;case Po.PREVIOUS:r.data.set(e.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(n,e){let r=1<<this._png.depth,i=(a,h)=>{let l=((a+e.yOffset)*this._png.width+e.xOffset+h)*this._png.channels,c=(a*e.width+h)*this._png.channels;return{index:l,frameIndex:c}};switch(e.blendOp){case Os.SOURCE:for(let a=0;a<e.height;a++)for(let h=0;h<e.width;h++){let{index:l,frameIndex:c}=i(a,h);for(let u=0;u<this._png.channels;u++)n.data[l+u]=e.data[c+u]}break;case Os.OVER:for(let a=0;a<e.height;a++)for(let h=0;h<e.width;h++){let{index:l,frameIndex:c}=i(a,h);for(let u=0;u<this._png.channels;u++){let g=e.data[c+this._png.channels-1]/r,y=u%(this._png.channels-1)===0?1:e.data[c+u],x=Math.floor(g*y+(1-g)*n.data[l+u]);n.data[l+u]+=x}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);let n=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==Cs.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===ko.NO_INTERLACE)this._png.data=gh({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===ko.ADAM7)this._png.data=uu({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){let n=this._inflator.result,e=this._frames.at(-1);e?e.data=n:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Po.NONE,blendOp:Os.SOURCE,data:n}),this._inflator=new dh,this._writingDataChunks=!1}};function rd(t){if(t!==1&&t!==2&&t!==4&&t!==8&&t!==16)throw new Error(`invalid bit depth: ${t}`);return t}var vu;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.METRE=1]="METRE"})(vu||(vu={}));function bu(t,n){return new Io(t,n).decode()}var $t=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function bh(){$t.console&&typeof $t.console.log=="function"&&$t.console.log.apply($t.console,arguments)}var Pe={log:bh,warn:function(t){$t.console&&(typeof $t.console.warn=="function"?$t.console.warn.apply($t.console,arguments):bh.call(null,arguments))},error:function(t){$t.console&&(typeof $t.console.error=="function"?$t.console.error.apply($t.console,arguments):bh(t))}};function wh(t,n,e){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){Zi(r.response,n,e)},r.onerror=function(){Pe.error("could not download file")},r.send()}function wu(t){var n=new XMLHttpRequest;n.open("HEAD",t,!1);try{n.send()}catch{}return n.status>=200&&n.status<=299}function Ts(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var Zi=$t.saveAs||((typeof window>"u"?"undefined":Le(window))!=="object"||window!==$t?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,n,e){var r=$t.URL||$t.webkitURL,i=document.createElement("a");n=n||t.name||"download",i.download=n,i.rel="noopener",typeof t=="string"?(i.href=t,i.origin!==location.origin?wu(i.href)?wh(t,n,e):Ts(i,i.target="_blank"):Ts(i)):(i.href=r.createObjectURL(t),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){Ts(i)},0))}:"msSaveOrOpenBlob"in navigator?function(t,n,e){if(n=n||t.name||"download",typeof t=="string")if(wu(t))wh(t,n,e);else{var r=document.createElement("a");r.href=t,r.target="_blank",setTimeout(function(){Ts(r)})}else navigator.msSaveOrOpenBlob((function(i,a){return a===void 0?a={autoBom:!1}:Le(a)!=="object"&&(Pe.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i})(t,e),n)}:function(t,n,e,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof t=="string")return wh(t,n,e);var i=t.type==="application/octet-stream",a=/constructor/i.test($t.HTMLElement)||$t.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||i&&a)&&(typeof FileReader>"u"?"undefined":Le(FileReader))==="object"){var l=new FileReader;l.onloadend=function(){var g=l.result;g=h?g:g.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=g:location=g,r=null},l.readAsDataURL(t)}else{var c=$t.URL||$t.webkitURL,u=c.createObjectURL(t);r?r.location=u:location.href=u,r=null,setTimeout(function(){c.revokeObjectURL(u)},4e4)}});function Hu(t){var n;t=t||"",this.ok=!1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],r=0;r<e.length;r++){var i=e[r].re,a=e[r].process,h=i.exec(t);h&&(n=a(h),this.r=n[0],this.g=n[1],this.b=n[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var l=this.r.toString(16),c=this.g.toString(16),u=this.b.toString(16);return l.length==1&&(l="0"+l),c.length==1&&(c="0"+c),u.length==1&&(u="0"+u),"#"+l+c+u}}var js=$t.atob.bind($t),yu=$t.btoa.bind($t);function yh(t,n){var e=t[0],r=t[1],i=t[2],a=t[3];e=vn(e,r,i,a,n[0],7,-680876936),a=vn(a,e,r,i,n[1],12,-389564586),i=vn(i,a,e,r,n[2],17,606105819),r=vn(r,i,a,e,n[3],22,-1044525330),e=vn(e,r,i,a,n[4],7,-176418897),a=vn(a,e,r,i,n[5],12,1200080426),i=vn(i,a,e,r,n[6],17,-1473231341),r=vn(r,i,a,e,n[7],22,-45705983),e=vn(e,r,i,a,n[8],7,1770035416),a=vn(a,e,r,i,n[9],12,-1958414417),i=vn(i,a,e,r,n[10],17,-42063),r=vn(r,i,a,e,n[11],22,-1990404162),e=vn(e,r,i,a,n[12],7,1804603682),a=vn(a,e,r,i,n[13],12,-40341101),i=vn(i,a,e,r,n[14],17,-1502002290),e=bn(e,r=vn(r,i,a,e,n[15],22,1236535329),i,a,n[1],5,-165796510),a=bn(a,e,r,i,n[6],9,-1069501632),i=bn(i,a,e,r,n[11],14,643717713),r=bn(r,i,a,e,n[0],20,-373897302),e=bn(e,r,i,a,n[5],5,-701558691),a=bn(a,e,r,i,n[10],9,38016083),i=bn(i,a,e,r,n[15],14,-660478335),r=bn(r,i,a,e,n[4],20,-405537848),e=bn(e,r,i,a,n[9],5,568446438),a=bn(a,e,r,i,n[14],9,-1019803690),i=bn(i,a,e,r,n[3],14,-187363961),r=bn(r,i,a,e,n[8],20,1163531501),e=bn(e,r,i,a,n[13],5,-1444681467),a=bn(a,e,r,i,n[2],9,-51403784),i=bn(i,a,e,r,n[7],14,1735328473),e=wn(e,r=bn(r,i,a,e,n[12],20,-1926607734),i,a,n[5],4,-378558),a=wn(a,e,r,i,n[8],11,-2022574463),i=wn(i,a,e,r,n[11],16,1839030562),r=wn(r,i,a,e,n[14],23,-35309556),e=wn(e,r,i,a,n[1],4,-1530992060),a=wn(a,e,r,i,n[4],11,1272893353),i=wn(i,a,e,r,n[7],16,-155497632),r=wn(r,i,a,e,n[10],23,-1094730640),e=wn(e,r,i,a,n[13],4,681279174),a=wn(a,e,r,i,n[0],11,-358537222),i=wn(i,a,e,r,n[3],16,-722521979),r=wn(r,i,a,e,n[6],23,76029189),e=wn(e,r,i,a,n[9],4,-640364487),a=wn(a,e,r,i,n[12],11,-421815835),i=wn(i,a,e,r,n[15],16,530742520),e=yn(e,r=wn(r,i,a,e,n[2],23,-995338651),i,a,n[0],6,-198630844),a=yn(a,e,r,i,n[7],10,1126891415),i=yn(i,a,e,r,n[14],15,-1416354905),r=yn(r,i,a,e,n[5],21,-57434055),e=yn(e,r,i,a,n[12],6,1700485571),a=yn(a,e,r,i,n[3],10,-1894986606),i=yn(i,a,e,r,n[10],15,-1051523),r=yn(r,i,a,e,n[1],21,-2054922799),e=yn(e,r,i,a,n[8],6,1873313359),a=yn(a,e,r,i,n[15],10,-30611744),i=yn(i,a,e,r,n[6],15,-1560198380),r=yn(r,i,a,e,n[13],21,1309151649),e=yn(e,r,i,a,n[4],6,-145523070),a=yn(a,e,r,i,n[11],10,-1120210379),i=yn(i,a,e,r,n[2],15,718787259),r=yn(r,i,a,e,n[9],21,-343485551),t[0]=wi(e,t[0]),t[1]=wi(r,t[1]),t[2]=wi(i,t[2]),t[3]=wi(a,t[3])}function Gs(t,n,e,r,i,a){return n=wi(wi(n,t),wi(r,a)),wi(n<<i|n>>>32-i,e)}function vn(t,n,e,r,i,a,h){return Gs(n&e|~n&r,t,n,i,a,h)}function bn(t,n,e,r,i,a,h){return Gs(n&r|e&~r,t,n,i,a,h)}function wn(t,n,e,r,i,a,h){return Gs(n^e^r,t,n,i,a,h)}function yn(t,n,e,r,i,a,h){return Gs(e^(n|~r),t,n,i,a,h)}function Wu(t){var n,e=t.length,r=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=t.length;n+=64)yh(r,id(t.substring(n-64,n)));t=t.substring(n-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<t.length;n++)i[n>>2]|=t.charCodeAt(n)<<(n%4<<3);if(i[n>>2]|=128<<(n%4<<3),n>55)for(yh(r,i),n=0;n<16;n++)i[n]=0;return i[14]=8*e,yh(r,i),r}function id(t){var n,e=[];for(n=0;n<64;n+=4)e[n>>2]=t.charCodeAt(n)+(t.charCodeAt(n+1)<<8)+(t.charCodeAt(n+2)<<16)+(t.charCodeAt(n+3)<<24);return e}var _u="0123456789abcdef".split("");function ad(t){for(var n="",e=0;e<4;e++)n+=_u[t>>8*e+4&15]+_u[t>>8*e&15];return n}function od(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function Sh(t){return Wu(t).map(od).join("")}var sd=(function(t){for(var n=0;n<t.length;n++)t[n]=ad(t[n]);return t.join("")})(Wu("hello"))!="5d41402abc4b2a76b9719d911017c592";function wi(t,n){if(sd){var e=(65535&t)+(65535&n);return(t>>16)+(n>>16)+(e>>16)<<16|65535&e}return t+n&4294967295}function kh(t,n){var e,r,i,a;if(t!==e){for(var h=(i=t,a=1+(256/t.length|0),new Array(a+1).join(i)),l=[],c=0;c<256;c++)l[c]=c;var u=0;for(c=0;c<256;c++){var g=l[c];u=(u+g+h.charCodeAt(c))%256,l[c]=l[u],l[u]=g}e=t,r=l}else l=r;var y=n.length,x=0,p=0,F="";for(c=0;c<y;c++)p=(p+(g=l[x=(x+1)%256]))%256,l[x]=l[p],l[p]=g,h=l[(l[x]+l[p])%256],F+=String.fromCharCode(n.charCodeAt(c)^h);return F}var xu={print:4,modify:8,copy:16,"annot-forms":32};function _a(t,n,e,r){this.v=1,this.r=2;var i=192;t.forEach(function(l){if(xu.perm!==void 0)throw new Error("Invalid permission: "+l);i+=xu[l]}),this.padding="(\xBFN^Nu\x8AAd\0NV\xFF\xFA\b..\0\xB6\xD0h>\x80/\f\xA9\xFEdSiz";var a=(n+this.padding).substr(0,32),h=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,h),this.P=-(1+(255^i)),this.encryptionKey=Sh(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=kh(this.encryptionKey,this.padding)}function xa(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var n="",e=t.length,r=0;r<e;r++){var i=t.charCodeAt(r);n+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):t[r]}return n}function Au(t){if(Le(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var n={};this.subscribe=function(e,r,i){if(i=i||!1,typeof e!="string"||typeof r!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");n.hasOwnProperty(e)||(n[e]={});var a=Math.random().toString(35);return n[e][a]=[r,!!i],a},this.unsubscribe=function(e){for(var r in n)if(n[r][e])return delete n[r][e],Object.keys(n[r]).length===0&&delete n[r],!0;return!1},this.publish=function(e){if(n.hasOwnProperty(e)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var a in n[e]){var h=n[e][a];try{h[0].apply(t,r)}catch(l){$t.console&&Pe.error("jsPDF PubSub Error",l.message,l)}h[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return n}}function Hs(t){if(!(this instanceof Hs))return new Hs(t);var n="opacity,stroke-opacity".split(",");for(var e in t)t.hasOwnProperty(e)&&n.indexOf(e)>=0&&(this[e]=t[e]);this.id="",this.objectNumber=-1}function Gu(t,n){this.gState=t,this.matrix=n,this.id="",this.objectNumber=-1}function $i(t,n,e,r,i){if(!(this instanceof $i))return new $i(t,n,e,r,i);this.type=t==="axial"?2:3,this.coords=n,this.colors=e,Gu.call(this,r,i)}function Aa(t,n,e,r,i){if(!(this instanceof Aa))return new Aa(t,n,e,r,i);this.boundingBox=t,this.xStep=n,this.yStep=e,this.stream="",this.cloneIndex=0,Gu.call(this,r,i)}function Mt(t){var n,e=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],i=arguments[2],a=arguments[3],h=[],l=1,c=16,u="S",g=null;Le(t=t||{})==="object"&&(e=t.orientation,r=t.unit||r,i=t.format||i,a=t.compress||t.compressPdf||a,(g=t.encryption||null)!==null&&(g.userPassword=g.userPassword||"",g.ownerPassword=g.ownerPassword||"",g.userPermissions=g.userPermissions||[]),l=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(n=t.precision),t.floatPrecision!==void 0&&(c=t.floatPrecision),u=t.defaultPathOperation||"S"),h=t.filters||(a===!0?["FlateEncode"]:h),r=r||"mm",e=(""+(e||"P")).toLowerCase();var y=t.putOnlyUsedFonts||!1,x={},p={internal:{},__private__:{}};p.__private__.PubSub=Au;var F="1.3",P=p.__private__.getPdfVersion=function(){return F};p.__private__.setPdfVersion=function(f){F=f};var D={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return D};var N=p.__private__.getPageFormat=function(f){return D[f]};i=i||"a4";var H="compat",q="advanced",R=H;function rt(){this.saveGraphicsState(),I(new Vt(ee,0,0,-ee,0,Ii()*ee).toString()+" cm"),this.setFontSize(this.getFontSize()/ee),u="n",R=q}function mt(){this.restoreGraphicsState(),u="S",R=H}var ct=p.__private__.combineFontStyleAndFontWeight=function(f,v){if(f=="bold"&&v=="normal"||f=="bold"&&v==400||f=="normal"&&v=="italic"||f=="bold"&&v=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return v&&(f=v==400||v==="normal"?f==="italic"?"italic":"normal":v!=700&&v!=="bold"||f!=="normal"?(v==700?"bold":v)+""+f:"bold"),f};p.advancedAPI=function(f){var v=R===H;return v&&rt.call(this),typeof f!="function"||(f(this),v&&mt.call(this)),this},p.compatAPI=function(f){var v=R===q;return v&&mt.call(this),typeof f!="function"||(f(this),v&&rt.call(this)),this},p.isAdvancedAPI=function(){return R===q};var Y,j=function(f){if(R!==q)throw new Error(f+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},tt=p.roundToPrecision=p.__private__.roundToPrecision=function(f,v){var T=n||v;if(isNaN(f)||isNaN(T))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return f.toFixed(T).replace(/0+$/,"")};Y=p.hpf=p.__private__.hpf=typeof c=="number"?function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.hpf");return tt(f,c)}:c==="smart"?function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.hpf");return tt(f,f>-1&&f<1?16:5)}:function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.hpf");return tt(f,16)};var S=p.f2=p.__private__.f2=function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.f2");return tt(f,2)},O=p.__private__.f3=function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.f3");return tt(f,3)},W=p.scale=p.__private__.scale=function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.scale");return R===H?f*ee:R===q?f:void 0},U=function(f){return W((function(v){return R===H?Ii()-v:R===q?v:void 0})(f))};p.__private__.setPrecision=p.setPrecision=function(f){typeof parseInt(f,10)=="number"&&(n=parseInt(f,10))};var it,st="00000000000000000000000000000000",ht=p.__private__.getFileId=function(){return st},nt=p.__private__.setFileId=function(f){return st=f!==void 0&&/^[a-fA-F0-9]{32}$/.test(f)?f.toUpperCase():st.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),g!==null&&(Je=new _a(g.userPermissions,g.userPassword,g.ownerPassword,st)),st};p.setFileId=function(f){return nt(f),this},p.getFileId=function(){return ht()};var ut=p.__private__.convertDateToPDFDate=function(f){var v=f.getTimezoneOffset(),T=v<0?"+":"-",z=Math.floor(Math.abs(v/60)),K=Math.abs(v%60),dt=[T,B(z),"'",B(K),"'"].join("");return["D:",f.getFullYear(),B(f.getMonth()+1),B(f.getDate()),B(f.getHours()),B(f.getMinutes()),B(f.getSeconds()),dt].join("")},At=p.__private__.convertPDFDateToDate=function(f){var v=parseInt(f.substr(2,4),10),T=parseInt(f.substr(6,2),10)-1,z=parseInt(f.substr(8,2),10),K=parseInt(f.substr(10,2),10),dt=parseInt(f.substr(12,2),10),vt=parseInt(f.substr(14,2),10);return new Date(v,T,z,K,dt,vt,0)},wt=p.__private__.setCreationDate=function(f){var v;if(f===void 0&&(f=new Date),f instanceof Date)v=ut(f);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(f))throw new Error("Invalid argument passed to jsPDF.setCreationDate");v=f}return it=v},A=p.__private__.getCreationDate=function(f){var v=it;return f==="jsDate"&&(v=At(it)),v};p.setCreationDate=function(f){return wt(f),this},p.getCreationDate=function(f){return A(f)};var M,B=p.__private__.padd2=function(f){return("0"+parseInt(f)).slice(-2)},G=p.__private__.padd2Hex=function(f){return("00"+(f=f.toString())).substr(f.length)},$=0,J=[],at=[],ot=0,gt=[],xt=[],kt=!1,St=at;p.__private__.setCustomOutputDestination=function(f){kt=!0,St=f};var Bt=function(f){kt||(St=f)};p.__private__.resetCustomOutputDestination=function(){kt=!1,St=at};var I=p.__private__.out=function(f){return f=f.toString(),ot+=f.length+1,St.push(f),St},Lt=p.__private__.write=function(f){return I(arguments.length===1?f.toString():Array.prototype.join.call(arguments," "))},ae=p.__private__.getArrayBuffer=function(f){for(var v=f.length,T=new ArrayBuffer(v),z=new Uint8Array(T);v--;)z[v]=f.charCodeAt(v);return T},Ht=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];p.__private__.getStandardFonts=function(){return Ht};var yt=t.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(f){return yt=R===q?f/ee:f,this};var Wt,It=p.__private__.getFontSize=p.getFontSize=function(){return R===H?yt:yt*ee},qt=t.R2L||!1;p.__private__.setR2L=p.setR2L=function(f){return qt=f,this},p.__private__.getR2L=p.getR2L=function(){return qt};var zt,ye=p.__private__.setZoomMode=function(f){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(f))Wt=f;else if(isNaN(f)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(f)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+f+'" is not recognized.');Wt=f}else Wt=parseInt(f,10)};p.__private__.getZoomMode=function(){return Wt};var he,Jt=p.__private__.setPageMode=function(f){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(f)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+f+'" is not recognized.');zt=f};p.__private__.getPageMode=function(){return zt};var ce=p.__private__.setLayoutMode=function(f){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(f)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+f+'" is not recognized.');he=f};p.__private__.getLayoutMode=function(){return he},p.__private__.setDisplayMode=p.setDisplayMode=function(f,v,T){return ye(f),ce(v),Jt(T),this};var fe={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(f){if(Object.keys(fe).indexOf(f)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return fe[f]},p.__private__.getDocumentProperties=function(){return fe},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(f){for(var v in fe)fe.hasOwnProperty(v)&&f[v]&&(fe[v]=f[v]);return this},p.__private__.setDocumentProperty=function(f,v){if(Object.keys(fe).indexOf(f)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return fe[f]=v};var Tt,ee,jt,Ue,ge,oe={},se={},Oe=[],Ut={},Ie={},Zt={},Qt={},Te=null,le=0,Gt=[],_e=new Au(p),_i=t.hotfixes||[],gn={},Pr={},ur=[],Vt=function f(v,T,z,K,dt,vt){if(!(this instanceof f))return new f(v,T,z,K,dt,vt);isNaN(v)&&(v=1),isNaN(T)&&(T=0),isNaN(z)&&(z=0),isNaN(K)&&(K=1),isNaN(dt)&&(dt=0),isNaN(vt)&&(vt=0),this._matrix=[v,T,z,K,dt,vt]};Object.defineProperty(Vt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(f){this._matrix[0]=f}}),Object.defineProperty(Vt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(f){this._matrix[1]=f}}),Object.defineProperty(Vt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(f){this._matrix[2]=f}}),Object.defineProperty(Vt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(f){this._matrix[3]=f}}),Object.defineProperty(Vt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(f){this._matrix[4]=f}}),Object.defineProperty(Vt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(f){this._matrix[5]=f}}),Object.defineProperty(Vt.prototype,"a",{get:function(){return this._matrix[0]},set:function(f){this._matrix[0]=f}}),Object.defineProperty(Vt.prototype,"b",{get:function(){return this._matrix[1]},set:function(f){this._matrix[1]=f}}),Object.defineProperty(Vt.prototype,"c",{get:function(){return this._matrix[2]},set:function(f){this._matrix[2]=f}}),Object.defineProperty(Vt.prototype,"d",{get:function(){return this._matrix[3]},set:function(f){this._matrix[3]=f}}),Object.defineProperty(Vt.prototype,"e",{get:function(){return this._matrix[4]},set:function(f){this._matrix[4]=f}}),Object.defineProperty(Vt.prototype,"f",{get:function(){return this._matrix[5]},set:function(f){this._matrix[5]=f}}),Object.defineProperty(Vt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Vt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Vt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Vt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Vt.prototype.join=function(f){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(Y).join(f)},Vt.prototype.multiply=function(f){var v=f.sx*this.sx+f.shy*this.shx,T=f.sx*this.shy+f.shy*this.sy,z=f.shx*this.sx+f.sy*this.shx,K=f.shx*this.shy+f.sy*this.sy,dt=f.tx*this.sx+f.ty*this.shx+this.tx,vt=f.tx*this.shy+f.ty*this.sy+this.ty;return new Vt(v,T,z,K,dt,vt)},Vt.prototype.decompose=function(){var f=this.sx,v=this.shy,T=this.shx,z=this.sy,K=this.tx,dt=this.ty,vt=Math.sqrt(f*f+v*v),Et=(f/=vt)*T+(v/=vt)*z;T-=f*Et,z-=v*Et;var Dt=Math.sqrt(T*T+z*z);return Et/=Dt,f*(z/=Dt)<v*(T/=Dt)&&(f=-f,v=-v,Et=-Et,vt=-vt),{scale:new Vt(vt,0,0,Dt,0,0),translate:new Vt(1,0,0,1,K,dt),rotate:new Vt(f,v,-v,f,0,0),skew:new Vt(1,0,Et,1,0,0)}},Vt.prototype.toString=function(f){return this.join(" ")},Vt.prototype.inversed=function(){var f=this.sx,v=this.shy,T=this.shx,z=this.sy,K=this.tx,dt=this.ty,vt=1/(f*z-v*T),Et=z*vt,Dt=-v*vt,Yt=-T*vt,ne=f*vt;return new Vt(Et,Dt,Yt,ne,-Et*K-Yt*dt,-Dt*K-ne*dt)},Vt.prototype.applyToPoint=function(f){var v=f.x*this.sx+f.y*this.shx+this.tx,T=f.x*this.shy+f.y*this.sy+this.ty;return new Dr(v,T)},Vt.prototype.applyToRectangle=function(f){var v=this.applyToPoint(f),T=this.applyToPoint(new Dr(f.x+f.w,f.y+f.h));return new Ra(v.x,v.y,T.x-v.x,T.y-v.y)},Vt.prototype.clone=function(){var f=this.sx,v=this.shy,T=this.shx,z=this.sy,K=this.tx,dt=this.ty;return new Vt(f,v,T,z,K,dt)},p.Matrix=Vt;var Ir=p.matrixMult=function(f,v){return v.multiply(f)},Fr=new Vt(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Fr;var qn=function(f,v){if(!Ie[f]){var T=(v instanceof $i?"Sh":"P")+(Object.keys(Ut).length+1).toString(10);v.id=T,Ie[f]=T,Ut[T]=v,_e.publish("addPattern",v)}};p.ShadingPattern=$i,p.TilingPattern=Aa,p.addShadingPattern=function(f,v){return j("addShadingPattern()"),qn(f,v),this},p.beginTilingPattern=function(f){j("beginTilingPattern()"),ja(f.boundingBox[0],f.boundingBox[1],f.boundingBox[2]-f.boundingBox[0],f.boundingBox[3]-f.boundingBox[1],f.matrix)},p.endTilingPattern=function(f,v){j("endTilingPattern()"),v.stream=xt[M].join(`
4
4
  `),qn(f,v),_e.publish("endTilingPattern",v),ur.pop().restore()};var Hn,Re=p.__private__.newObject=function(){var f=an();return ln(f,!0),f},an=p.__private__.newObjectDeferred=function(){return $++,J[$]=function(){return ot},$},ln=function(f,v){return v=typeof v=="boolean"&&v,J[f]=ot,v&&I(f+" 0 obj"),f},xi=p.__private__.newAdditionalObject=function(){var f={objId:an(),content:""};return gt.push(f),f},Xr=an(),tr=an(),dr=p.__private__.decodeColorString=function(f){var v=f.split(" ");if(v.length!==2||v[1]!=="g"&&v[1]!=="G")v.length!==5||v[4]!=="k"&&v[4]!=="K"||(v=[(1-v[0])*(1-v[3]),(1-v[1])*(1-v[3]),(1-v[2])*(1-v[3]),"r"]);else{var T=parseFloat(v[0]);v=[T,T,T,"r"]}for(var z="#",K=0;K<3;K++)z+=("0"+Math.floor(255*parseFloat(v[K])).toString(16)).slice(-2);return z},er=p.__private__.encodeColorString=function(f){var v;typeof f=="string"&&(f={ch1:f});var T=f.ch1,z=f.ch2,K=f.ch3,dt=f.ch4,vt=f.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof T=="string"&&T.charAt(0)!=="#"){var Et=new Hu(T);if(Et.ok)T=Et.toHex();else if(!/^\d*\.?\d*$/.test(T))throw new Error('Invalid color "'+T+'" passed to jsPDF.encodeColorString.')}if(typeof T=="string"&&/^#[0-9A-Fa-f]{3}$/.test(T)&&(T="#"+T[1]+T[1]+T[2]+T[2]+T[3]+T[3]),typeof T=="string"&&/^#[0-9A-Fa-f]{6}$/.test(T)){var Dt=parseInt(T.substr(1),16);T=Dt>>16&255,z=Dt>>8&255,K=255&Dt}if(z===void 0||dt===void 0&&T===z&&z===K)v=typeof T=="string"?T+" "+vt[0]:f.precision===2?S(T/255)+" "+vt[0]:O(T/255)+" "+vt[0];else if(dt===void 0||Le(dt)==="object"){if(dt&&!isNaN(dt.a)&&dt.a===0)return["1.","1.","1.",vt[1]].join(" ");v=typeof T=="string"?[T,z,K,vt[1]].join(" "):f.precision===2?[S(T/255),S(z/255),S(K/255),vt[1]].join(" "):[O(T/255),O(z/255),O(K/255),vt[1]].join(" ")}else v=typeof T=="string"?[T,z,K,dt,vt[2]].join(" "):f.precision===2?[S(T),S(z),S(K),S(dt),vt[2]].join(" "):[O(T),O(z),O(K),O(dt),vt[2]].join(" ");return v},nr=p.__private__.getFilters=function(){return h},Wn=p.__private__.putStream=function(f){var v=(f=f||{}).data||"",T=f.filters||nr(),z=f.alreadyAppliedFilters||[],K=f.addLength1||!1,dt=v.length,vt=f.objectId,Et=function(Qe){return Qe};if(g!==null&&vt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");g!==null&&(Et=Je.encryptor(vt,0));var Dt={};T===!0&&(T=["FlateEncode"]);var Yt=f.additionalKeyValues||[],ne=(Dt=Mt.API.processDataByFilters!==void 0?Mt.API.processDataByFilters(v,T):{data:v,reverseChain:[]}).reverseChain+(Array.isArray(z)?z.join(" "):z.toString());if(Dt.data.length!==0&&(Yt.push({key:"Length",value:Dt.data.length}),K===!0&&Yt.push({key:"Length1",value:dt})),ne.length!=0)if(ne.split("/").length-1==1)Yt.push({key:"Filter",value:ne});else{Yt.push({key:"Filter",value:"["+ne+"]"});for(var me=0;me<Yt.length;me+=1)if(Yt[me].key==="DecodeParms"){for(var Me=[],Ke=0;Ke<Dt.reverseChain.split("/").length-1;Ke+=1)Me.push("null");Me.push(Yt[me].value),Yt[me].value="["+Me.join(" ")+"]"}}I("<<");for(var Fe=0;Fe<Yt.length;Fe++)I("/"+Yt[Fe].key+" "+Yt[Fe].value);I(">>"),Dt.data.length!==0&&(I("stream"),I(Et(Dt.data)),I("endstream"))},Ai=p.__private__.putPage=function(f){var v=f.number,T=f.data,z=f.objId,K=f.contentsObjId;ln(z,!0),I("<</Type /Page"),I("/Parent "+f.rootDictionaryObjId+" 0 R"),I("/Resources "+f.resourceDictionaryObjId+" 0 R"),I("/MediaBox ["+parseFloat(Y(f.mediaBox.bottomLeftX))+" "+parseFloat(Y(f.mediaBox.bottomLeftY))+" "+Y(f.mediaBox.topRightX)+" "+Y(f.mediaBox.topRightY)+"]"),f.cropBox!==null&&I("/CropBox ["+Y(f.cropBox.bottomLeftX)+" "+Y(f.cropBox.bottomLeftY)+" "+Y(f.cropBox.topRightX)+" "+Y(f.cropBox.topRightY)+"]"),f.bleedBox!==null&&I("/BleedBox ["+Y(f.bleedBox.bottomLeftX)+" "+Y(f.bleedBox.bottomLeftY)+" "+Y(f.bleedBox.topRightX)+" "+Y(f.bleedBox.topRightY)+"]"),f.trimBox!==null&&I("/TrimBox ["+Y(f.trimBox.bottomLeftX)+" "+Y(f.trimBox.bottomLeftY)+" "+Y(f.trimBox.topRightX)+" "+Y(f.trimBox.topRightY)+"]"),f.artBox!==null&&I("/ArtBox ["+Y(f.artBox.bottomLeftX)+" "+Y(f.artBox.bottomLeftY)+" "+Y(f.artBox.topRightX)+" "+Y(f.artBox.topRightY)+"]"),typeof f.userUnit=="number"&&f.userUnit!==1&&I("/UserUnit "+f.userUnit),_e.publish("putPage",{objId:z,pageContext:Gt[v],pageNumber:v,page:T}),I("/Contents "+K+" 0 R"),I(">>"),I("endobj");var dt=T.join(`
5
5
  `);return R===q&&(dt+=`
@@ -0,0 +1,18 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as gn,b as yn}from"./BNRFT546.js";import{a as In}from"./S6U6SXMD.js";import a from"./LKZFKOG4.js";import{b as Po}from"./2B4SGB3I.js";import{b as yo}from"./I2NTSKBD.js";import{$ as Qe,$a as gr,$b as Mt,A as Oo,Aa as Zo,Ab as Ar,B as Ro,Ba as Qo,Bb as Ur,C as Ie,Ca as Yo,Cb as Mr,D as M,Da as kt,E as Co,Ea as Ot,Eb as Nr,F as Je,Fa as Xo,G as _e,Ga as er,Gb as $r,H as S,Ha as ye,Hb as Wr,I as Et,Ia as Rt,Ib as Lr,J as Ao,Ja as tr,Jb as Vr,K as p,Ka as or,Kb as ne,L as Uo,La as rr,Lb as Br,Ma as nr,Mb as zr,N as Te,Na as ir,Nb as jr,O as b,Oa as sr,Ob as Dr,P as ve,Pa as ar,Pb as Gr,Q as Mo,Qa as mr,Qb as Kr,R as _t,Ra as cr,Rb as Hr,S as Tt,Sa as dr,Sb as qr,T as Ze,Ta as pr,Tb as Jr,U as q,Ua as lr,Ub as Zr,V as No,Va as ur,Vb as Qr,W as $o,Wa as fr,Wb as Yr,X as Wo,Xa as Ct,Xb as Xr,Y as B,Ya as tt,Yb as en,Z as Lo,Za as hr,Zb as tn,_ as D,_a as Ir,_b as on,a as Le,aa as Vo,ab as re,ac as rt,ba as vt,bb as yr,bc as Nt,c as W,ca as oe,cb as Pr,cc as ke,da as w,db as wr,dc as nt,e as ee,ea as _,eb as Sr,ec as rn,f as Eo,fa as Y,fb as xr,fc as nn,g as me,ga as Ye,gb as br,gc as sn,h as u,ha as Bo,hb as Er,hc as an,i as xt,ia as zo,ib as _r,ic as mn,j as le,ja as Ft,jb as Tr,jc as cn,k as je,ka as jo,kb as vr,kc as dn,l as fe,lb as Fe,lc as Oe,m as De,ma as Do,mb as F,mc as it,n as Ge,na as Go,nb as ot,nc as st,o as bt,oa as Ko,oc as pn,p as To,pa as Ho,pc as at,qa as qo,qb as Fr,qc as ln,r as Ke,ra as C,rb as kr,s as vo,sa as ge,sb as z,t as He,ta as J,tb as Or,u as qe,ub as Pe,v as te,va as Xe,vb as Z,w as Fo,wa as et,wb as Rr,x as he,xa as Jo,xb as At,y as ko,yb as Cr,z as I,zb as Ut}from"./3UKDJZ2D.js";import{a as go}from"./MGEDATQ7.js";import{a as ue,g as Ee}from"./IHG7KTNC.js";import{a as L}from"./ZCU2WWVN.js";import{a as H,b as Ve,c as Be,d as ze}from"./KOIDWEP3.js";import{e as K,f as xo,j as Ne,l as $e,o as bo,s as We}from"./AYSQIO6L.js";import{b as wo,h as So}from"./YQHYMLC7.js";import{a as _o}from"./5O53T3SW.js";import{a as V}from"./AJZDBHB6.js";import{b as Io}from"./2I5LGZNX.js";import{E as Me,F as be,G as fo,K as ho,h as uo,i as G,q as pe}from"./FFF5HUPM.js";import{c as $}from"./QPIMTXPL.js";export default $arcgis.t(([{g:un,h:fn,i:hn}])=>{function we(e,t="application/octet-stream"){if(typeof Blob<"u"){let o=[];for(let n=0;n<e.length;n++)o[n]=e.charCodeAt(n);let r=new Uint8Array(o);return new Blob([r],{type:t})}else throw new Error("stringToBlob is not currently supported on Node")}function Pn(e){if(typeof Blob<"u")return new Blob([JSON.stringify(e)],{type:"application/json"});throw new Error("objectToJsonBlob is not currently supported on Node")}var mt={};$(mt,{_mostRecentlyEditedLayer:()=>$t,convertItemToTemplate:()=>ss,createItemFromTemplate:()=>as,postProcess:()=>ms});function ss(e,t,o,r){return new Promise((n,i)=>{let s=D(e);Tr(e.groupDesignations)?rr(s,o).then(m=>n(m),m=>i(S(m))):(s.estimatedDeploymentCostFactor=10,J(s.item.id,o).then(m=>{s.data=m,br(s,o).then(c=>{c.item.modified=Math.max(c.item.modified,$t(s.properties.layers),$t(s.properties.tables)),wr(c,o).then(d=>{c.dependencies=d.map(l=>l.id),n(Xo(c,d,!1,r))},d=>i(S(d)))},c=>i(S(c)))}))})}function as(e,t,o,r){return new Promise(n=>{if(!r(e.itemId,u.Started,0)){r(e.itemId,u.Ignored,0),n(I(e.type));return}let i=M(e);i=w(i,t),delete i.item.thumbnail,Je(i,"properties.service.size");let s=er(i.data);gr(i,o,t).then(a=>{a.success?r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,a.serviceItemId)?(i=Rt(i,t,a),sr(i,t,s,o).then(()=>{i=Rt(i,t,a),Pe({...i.item,url:void 0},i.data,o,e.item.thumbnail,void 0,t).then(()=>{r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,a.serviceItemId)?C(i.itemId,o).then(m=>{i.item=m,p(i,"item.url")&&!i.item.url.endsWith("/")&&(i.item.url+="/"),n({item:i,id:a.serviceItemId,type:i.type,postProcess:oe({item:i.item,data:i.data})||Ct(i)})},()=>{r(e.itemId,u.Failed,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))}):(r(e.itemId,u.Cancelled,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type))))},()=>{r(e.itemId,u.Failed,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))})},()=>{r(e.itemId,u.Failed,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))})):(r(e.itemId,u.Cancelled,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))):(r(e.itemId,u.Failed,0),n(I(e.type)))},()=>{r(e.itemId,u.Failed,0),n(I(e.type))})})}function ms(e,t,o,r,n,i,s){return new Promise((a,m)=>{Z(e,i,s).then(c=>{Ct(r)?(r=w(r,i),tt(r,s,r.item.url,i).then(a,m)):a(c)},m)})}function $t(e){let t=0;return e.forEach(o=>{t=o.editingInfo?.lastEditDate?Math.max(t,o.editingInfo.lastEditDate):t}),t}var f={};$(f,{convertItemToTemplate:()=>cs,createItemFromTemplate:()=>ds});function cs(e,t,o){return new Promise(r=>{let n=D(e);n.item.id=_(n.item.id,n.item.id,".itemId");let i=new Promise(a=>{ge(n.itemId,n.item.name,o).then(m=>{!m||m.size===0?a(null):a(m)})}),s=Promise.resolve({});Promise.all([i,s]).then(a=>{let[m]=a;if(m){let c=rn(m,n.item.name);n.properties[c.filename]=c.mimeType;let d=nt(n.itemId,c.blob.name,1,c.blob.name===c.filename?ke.data:ke.fakezip),l={itemId:n.itemId,file:c.blob,folder:d.folder,filename:d.filename};n.dataFile=l,n.resources.push(d.folder+"/"+d.filename),r(n)}else r(n)})})}function ds(e,t,o,r){return new Promise(n=>{if(!r(e.itemId,u.Started,0)){r(e.itemId,u.Ignored,0),n(I(e.type));return}let i=M(e);i=w(i,t),e.item.thumbnail&&(i.item.thumbnail=e.item.thumbnail),re(i.item,i.data,o,t.folderId).then(s=>{r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,s.id)?(i.itemId=s.id,t[e.itemId]={itemId:s.id},r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,s.id),n({item:i,id:s.id,type:i.type,postProcess:!1})):(r(e.itemId,u.Cancelled,0),F(s.id,o).then(()=>n(I(e.type)),()=>n(I(e.type))))},()=>{r(e.itemId,u.Failed,0),n(I(e.type))})})}var Xt={};$(Xt,{_getFormDataFilename:()=>ri,_replaceFeatureServiceURLs:()=>Zn,_replaceItemIds:()=>Qn,_replacePortalBaseUrls:()=>Yn,_replaceWorkflowManagerBaseUrls:()=>Xn,_updateZipObjectTextContent:()=>ei,convertItemToTemplate:()=>Ks,createItemFromTemplate:()=>Hs,postProcess:()=>oi,postProcessFormItems:()=>Js,swizzleFormObject:()=>Qt,templatizeFormData:()=>Yt});function xn(e,t){return ps(e,t)}function ps(e,t){return["data.desktopView.header","data.desktopView.headerPanel.selectors","data.desktopView.leftPanel.selectors","data.desktopView.sidebar","data.desktopView.urlParameters","data.desktopView.widgets","data.header","data.headerPanel.selectors","data.leftPanel.selectors","data.mobileView.header","data.mobileView.headerPanel.selectors","data.mobileView.leftPanel.selectors","data.mobileView.sidebar","data.mobileView.urlParameters","data.mobileView.widgets","data.sidebar","data.urlParameters","data.widgets"].forEach(r=>{let n=p(e,r);Array.isArray(n)&&n.forEach(i=>{i.type==="mapWidget"&&(e.dependencies.indexOf(i.itemId)<0&&e.dependencies.push(i.itemId),i.itemId=_(i.itemId,i.itemId,".itemId")),Array.isArray(i.datasets)&&ls(i,e,t)})}),e}function ls(e,t,o){e.datasets.forEach(r=>{if(p(r,"dataSource.type")!=="arcadeDataSource"){let i=p(r,"dataSource.itemId");if(i){t.dependencies.indexOf(i)<0&&t.dependencies.push(i);let s=p(r,"dataSource.layerId");ye(s?.toString(),i,"",o),r.dataSource.itemId=_(i,i,".itemId")}}})}function bn(e,t){let o=["data.desktopView.header","data.desktopView.headerPanel.selectors","data.desktopView.leftPanel.selectors","data.desktopView.sidebar","data.desktopView.urlParameters","data.desktopView.widgets","data.header","data.headerPanel.selectors","data.leftPanel.selectors","data.mobileView.header","data.mobileView.headerPanel.selectors","data.mobileView.leftPanel.selectors","data.mobileView.sidebar","data.mobileView.urlParameters","data.mobileView.widgets","data.sidebar","data.urlParameters","data.widgets"];return o.forEach(r=>{let n=p(e,r);us(n,t)}),o.forEach(r=>{fs(e,r,t)}),e}function us(e,t){e&&Array.isArray(e)&&e.forEach(o=>{Array.isArray(o.datasets)&&o.datasets.forEach(r=>{let n=_t(p(r,"dataSource.itemId"));if(n){let i=Tt(p(r,"dataSource.layerId"));t.some(s=>s.itemId===n&&s.layerId===i?(Sn(s,o.id),!0):!1)}else{let i=p(r,"dataSource.id");if(i){let s=i.split("#")[1];t.some(a=>a.ids.indexOf(s)>-1?(Sn(a,o.id),!0):!1)}}})})}function fs(e,t,o){let r=p(e,t);r&&b(e,t,hs(r,o))}function hs(e,t){return Array.isArray(e)?e.map(o=>{let r=o;return Array.isArray(r.events)&&(r.events=r.events.map(n=>{let i=n;return Array.isArray(i.actions)&&(i.actions=i.actions.map(s=>{let a=s;if(a.fieldMap&&a.targetId&&a.targetId.indexOf("#")>-1){let m=wn(a,t);if(m){let c=p(m,"fields"),d=p(m,"basePath");Array.isArray(c)&&d&&(a.fieldMap=a.fieldMap.map(l=>{let h=l;return h.targetName=Y(h.targetName,c,d),h}))}}return a})),i})),Array.isArray(r.datasets)&&(r.datasets=r.datasets.map(n=>{let i=n;if(i.type==="serviceDataset"){let s=wn(n,t);if(s){let a=p(s,"fields"),m=p(s,"basePath");Array.isArray(a)&&m&&(r=Y(r,a,m),i=Y(i,a,m))}}return i})),r}):e}function wn(e,t){let o,r=p(e,"dataSource.id")||p(e,"targetId");if(r){let n=r.split("#")[1];if(!t.some(i=>(o=i.ids.indexOf(n)>-1?i:o,i.ids.indexOf(n)>-1))){let i=r.split("#")[0];t.some(s=>{let m=(s.references||[]).indexOf(i)>-1;return o=m?s:o,m})}}else{let n=_t(p(e,"dataSource.itemId")),i=Tt(p(e,"dataSource.layerId"));n&&t.some(s=>{let a=n===s.itemId&&i===s.layerId;return o=a?s:o,a})}return o}function Sn(e,t){e.references=Array.isArray(e.references)?e.references:[],e.references.indexOf(t)<0&&e.references.push(t)}var Se={};$(Se,{convertItemToTemplate:()=>_s,convertNotebookToTemplate:()=>Ht,createItemFromTemplate:()=>Ts,deleteProps:()=>Un,fineTuneCreatedItem:()=>Kt,postProcess:()=>Fs,postProcessNotebookTemplates:()=>vs});function Tn(e,t,o,r){return new Promise((n,i)=>{let s="";if(e.item.url){let a=e.item.url,m=a.indexOf("//");e.item.url=B(q)+a.substring(a.indexOf("/",m+2),a.lastIndexOf("=")+1)+e.item.id,s=a.replace(a.substring(a.indexOf("/",m+2)),"")}e.dependencies=ys(e),b(e,"data.folderId","{{folderId}}"),Ss(e,["data.map.itemId","data.map.appProxy.mapItemId","data.values.webmap","data.values.group"]),Fn(e,"data.appItemId",e.itemId),Dt(e,["data.logo","data.map.portalUrl","data.portalUrl","data.httpProxy.url"],B(q)),b(e,"data.geometryService",B(No)),Is(e,o,s,r).then(()=>{_n(e,o,s,"data.widgetPool.widgets").then(a=>{_n(a,o,s,"data.widgetOnScreen.widgets",!0).then(m=>{gs(m,o,s,"data.values").then(c=>{n(c)},c=>i(S(c)))},m=>i(S(m)))},a=>i(S(a)))},a=>i(S(a)))})}function Is(e,t,o,r){return new Promise((n,i)=>{let s=p(e,"data.dataSource.dataSources");if(s&&Object.keys(s).length>0){let a=new Array;Object.keys(s).forEach(m=>{let c=s[m];b(c,"portalUrl",B(q));let d=p(c,"itemId");if(p(c,"url")){if(d){let h=c.url.substr(c.url.lastIndexOf("/")+1);ye(h.toString(),d,c.url,r),c.itemId=_(d,d,".layer"+h+".itemId")}let l=jt(c.url,o,[],[],t);a.push(new Promise((h,g)=>{zt(l.serviceRequests,l.requestUrls,l.testString).then(P=>{c.url=P,h()},P=>g(S(P)))}))}else d&&(c.itemId=_(d,d,".itemId"))}),Promise.all(a).then(()=>n(e),m=>i(S(m)))}else n(e)})}function _n(e,t,o,r,n=!1){return new Promise((i,s)=>{let a=p(e,r)||[],m=[],c=[];if(a.forEach(d=>{!n&&p(d,"icon")&&Dt(d,["icon"],B(q));let l=d.config;if(l){let h=JSON.stringify(l),g=jt(h,o,c,m,t);d.config=JSON.parse(g.testString),m=g.serviceRequests,c=g.requestUrls}}),m.length>0){let d=JSON.stringify(a);zt(m,c,d).then(l=>{b(e,r,JSON.parse(l)),i(e)},l=>s(S(l)))}else i(e)})}function gs(e,t,o,r){return new Promise((n,i)=>{let s=p(e,r),a=[],m=[];if(s){p(s,"icon")&&Dt(s,["icon"],B(q));let c=JSON.stringify(s),d=jt(c,o,m,a,t);s=JSON.parse(d.testString),a=d.serviceRequests,m=d.requestUrls}if(a.length>0){let c=JSON.stringify(s);zt(a,m,c).then(d=>{b(e,r,JSON.parse(d)),n(e)},d=>i(S(d)))}else n(e)})}function zt(e,t,o){return new Promise((r,n)=>{if(e&&e.length>0){let i=0;Promise.all(e).then(s=>{s.forEach(a=>{if(p(a,"serviceItemId")){let m="{{"+a.serviceItemId+(a.hasOwnProperty("id")?".layer"+a.id:"")+".url}}";o=ct(o,t[i],m,!0)}i++}),r(o)},s=>n(S(s)))}else r(o)})}function jt(e,t,o,r,n){let i={f:"json",authentication:n},s=e.match(/(\bhttps?:\/\/[-A-Z0-9/._]*)/gim);return s&&s.length&&s.forEach(a=>{a.indexOf("NAServer")>-1?e=ct(e,a,B(Wo)):a.indexOf("GeocodeServer")>-1?e=ct(e,a,B($o)):t&&a.indexOf(t)>-1?e=ct(e,t,B(q)):a.indexOf("FeatureServer")>-1&&o.indexOf(a)===-1&&(o.push(a),r.push(W(a,i)))}),{testString:e,requestUrls:o,serviceRequests:r}}function ct(e,t,o,r=!1){let n=r&&e.indexOf('"')>-1,i=new RegExp(n?'"'+t+'"':t,"gmi");return e.replace(i,n?'"'+o+'"':o)}function Dt(e,t,o){t.forEach(r=>{let n=p(e,r);if(n){let i=n.substring(n.indexOf("/",n.indexOf("//")+2));b(e,r,i!==n?o+i:o)}})}function vn(e,t,o,r){return new Promise(n=>{if(ve(e,["WAB2D","WAB3D","Web AppBuilder"])){let i={id:t.itemId,url:t.item.url,data:t.data},s=z(i,r),a={tags:e.item.tags,title:e.item.title,type:"Code Attachment",typeKeywords:["Code","Javascript","Web Mapping Application"],relationshipType:"WMA2Code",originItemId:t.itemId,url:qe(w(B(q),o))+"sharing/rest/content/items/"+t.itemId+"/package"},m=re(a,{},r,o.folderId);Promise.all([s,m]).then(()=>n(null),()=>n(null))}else n(null)})}function ys(e){let t=Ps;return ve(e,["WAB2D","WAB3D","Web AppBuilder"])&&(t=ws),t(e)}function Ps(e){return Uo(e,["data.values.webmap","data.values.group"])}function ws(e){let t=[],o=p(e,"data.map.itemId");o&&t.push(o);let r=p(e,"data.dataSource.dataSources");return r&&Object.keys(r).forEach(n=>{let i=r[n];i.itemId&&t.push(i.itemId)}),t}function Ss(e,t){t.forEach(o=>{let r=p(e,o);Fn(e,o,r)})}function Fn(e,t,o){b(e,t,_(o,o,".itemId"))}function kn(e,t){let o=p(e,"data.dataSource.dataSources");o&&Object.keys(o).length>0&&(Object.keys(o).forEach(i=>{let s=o[i];o[i]=Vt(s,t)}),b(e,"data.dataSource.dataSources",o)),["data.widgetPool.widgets","data.widgetOnScreen.widgets"].forEach(i=>{let s=p(e,i);s&&b(e,i,xs(s,t))});let n=p(e,"data.values");return n&&b(e,"data.values",Vt(n,t)),e}function Vt(e,t,o=!1){return e=Es(e,t,o),bs(e,t).forEach(n=>{e=Y(e,n.fields,n.basePath,o)}),e}function xs(e,t){let o=["SmartEditor","Screening"];return e.map(r=>{if(r.config){let n=o.indexOf(r.name)>-1;r.config=Vt(r.config,t,n)}return r})}function bs(e,t){let o=JSON.stringify(e);return t.filter(n=>Lt(n,o)<4).sort((n,i)=>Lt(n,o)-Lt(i,o))}function Lt(e,t){let o=e.url,r=e.itemId,n=e.layerId,i;return o&&!isNaN(n)&&(i=new RegExp(o.replace(/[.]/,".layer"+n+"."),"gm")),i&&i.test(t)||e.ids.length>0&&e.ids.some(s=>new RegExp(s,"gm").test(t))?1:o&&new RegExp(o,"gm").test(t)?2:r&&new RegExp(r,"gm").test(t)?3:4}function Es(e,t,o){let r=JSON.stringify(e),n=t.filter(i=>{let s;i.url&&!isNaN(i.layerId)&&(s=new RegExp(i.url.replace(/[.]/,".layer"+i.layerId+"."),"gm"));let a=!1;if(i.ids.length>0&&(a=i.ids.some(m=>new RegExp(m,"gm").test(r))),a||s&&s.test(r))return i});return n.length>0&&n.forEach(i=>{e=Bt(e,i,o),i.ids.length>0&&i.ids.forEach(s=>{e=dt(e,i,s,o)})}),e}function Bt(e,t,o){let r={},n=t.url,i=t.layerId,s;if(n&&!isNaN(i)&&(s=new RegExp(n.replace(/[.]/,".layer"+i+"."),"gm")),Array.isArray(e))r=e.map(a=>Bt(a,t,o));else if(typeof e=="object")for(let a in e)e[a]!=null&&typeof e[a]=="object"?r[a]=Bt(e[a],t,o):(s&&s.test(e[a])&&(e=Y(e,t.fields,t.basePath,o)),r[a]=e[a]);else r=e;return r}function dt(e,t,o,r){let n={},i=new RegExp(o,"gm");if(Array.isArray(e))n=e.map(s=>dt(s,t,o,r));else if(typeof e=="object")for(let s in e)if(e[s]!==null){let a;try{a=JSON.parse(e[s])}catch{a=void 0}a&&typeof a=="object"?n[s]=JSON.stringify(dt(a,t,o,r)):typeof e[s]=="object"?(i.test(s)&&r&&(e[s]=Y(e[s],t.fields,t.basePath,r)),n[s]=dt(e[s],t,o,r)):(i.test(e[s])&&(e=Y(e,t.fields,t.basePath,r)),n[s]=e[s])}else n[s]=e[s];else n=e;return n}function On(e,t,o,r){return fr(e,o,r)}function Rn(e,t,o){return tt(e,t,"",o)}function Q(e,t,o,r,n){return new Promise((i,s)=>{function a(){n&&n.signal.aborted&&s(new Error("Operation was cancelled"))}if(a(),!r(e.itemId,u.Started,0))r(e.itemId,u.Ignored,0),i(I(e.type));else{let m=M(e);m=w(m,t);let c;e.type==="Web Mapping Application"&&e.data?m=JSON.parse(w(JSON.stringify(m),t)):e.type==="QuickCapture Project"&&e.data&&(c=JSON.stringify(m.data.application),delete m.data),e.item.thumbnail&&(m.item.thumbnail=e.item.thumbnail),re(m.item,m.data,o,t.folderId).then(d=>{if(a(),!r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,d.id))r(e.itemId,u.Cancelled,0),F(d.id,o).then(()=>i(I(e.type)),()=>i(I(e.type)));else{t[e.itemId]={itemId:d.id,itemUrl:t.portalBaseUrl+"/sharing/rest/content/items/"+d.id},m.itemId=d.id,m.type==="Web Mapping Application"&&e.data&&b(m,"data.appItemId",d.id);let l=oe(m.data),h=m.item.url;m=w(m,t),a();let g=Promise.resolve([]);if(m.relatedItems){let x=w(Ye(m.relatedItems),t);g=hr(m.itemId,x,o)}a();let P;if(e.type==="Web Mapping Application"&&e.data&&ve(e,["WAB2D","WAB3D","Web AppBuilder"]))P=vn(e,m,t,o);else if(e.type==="Workforce Project")P=Rn(m,o,t);else if(e.type==="QuickCapture Project"){if(c){let x=Ie(w(JSON.parse(c),t),"qc.project.json");P=dn(x,m.itemId,"",x.name,o)}}else e.type==="Notebook"?P=Kt(e,m,t,o):h!==m.item.url?(a(),P=new Promise((x,y)=>{Rr(d.id,m.item.url,o).then(()=>x(),y)})):P=Promise.resolve(null);a(),Promise.all([g,P]).then(()=>{r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,d.id)?i({item:m,id:d.id,type:m.type,postProcess:l}):(r(e.itemId,u.Cancelled,0),F(d.id,o).then(()=>i(I(e.type)),()=>i(I(e.type))))},()=>{r(e.itemId,u.Failed,0),i(I(e.type))})}},()=>{r(e.itemId,u.Failed,0),i(I(e.type))})}})}function _s(e,t,o,r){return X(e,t,o,r)}function Ts(e,t,o,r){return Q(e,t,o,r)}function Ht(e){return new Promise(t=>{Un(e.data),t(e)})}function vs(e,t){if(e.some(r=>r.type==="Notebook")){let r=Object.keys(t).filter(i=>i.indexOf("FeatureServer")>-1).sort().reverse(),n=e.reduce((i,s)=>(i=[...new Set([...i,...s.dependencies,s.itemId])],i),[]);e=e.map(i=>{if(i.type==="Notebook"){let s=i.data&&JSON.stringify(i.data);return n.forEach(a=>{new RegExp(a,"gim").test(s)&&(s=s.replace(a,"{{"+a+".itemId}}"),i.dependencies.indexOf(a)<0&&i.dependencies.push(a))}),r.forEach(a=>{let m=new RegExp(a,"gim");if(m.test(s)){let c=t[a];s=s.replace(m,c);let d=/[0-9A-F]{32}/gim,l=c.match(d)[0];i.dependencies.indexOf(l)<0&&i.dependencies.push(l)}}),i.data=JSON.parse(s),i}})}return e}function Un(e){if(e){let t=["metadata.interpreter","metadata.papermill"];_e(e,t),(e.cells||[]).forEach(o=>{_e(o,t)})}}function Kt(e,t,o,r){return new Promise((n,i)=>{let s={id:t.itemId,url:t.item.url,data:Ie(t.data,t.itemId+".ipynb")};z(s,r).then(()=>n(null),i)})}function Fs(e,t,o,r,n,i,s){return Z(e,i,s)}function Nn(e,t,o){return new Promise((r,n)=>{ks(e,o).then(i=>{e.dependencies=i.dependencies,e.data?.properties&&(e.data.properties.ServiceURL=Mn(e.data.properties.ServiceURL,i.urlHash),e.data.properties.OverviewURL=Mn(e.data.properties.OverviewURL,i.urlHash)),r(e)},i=>n(S(i)))})}function ks(e,t){return new Promise((o,r)=>{let n=[];if(e.data?.properties){let i=[];e.data.properties.ServiceURL&&i.push(e.data.properties.ServiceURL),e.data.properties.OverviewURL&&e.data.properties.OverviewURL!==e.data.properties.ServiceURL&&i.push(e.data.properties.OverviewURL),Os(i,n,t).then(s=>{o(s)},s=>r(S(s)))}else o({dependencies:n,urlHash:{}})})}function Os(e,t,o){return new Promise((r,n)=>{let i={},s={f:"json",authentication:o},a=[],m={},c=e.filter(d=>{if(d){let l=/.+FeatureServer/g.exec(d),h=Array.isArray(l)&&l.length>0?l[0]:void 0;return h?(Object.keys(m).indexOf(h)<0&&(m[h]=W(d,s)),a.push(m[h]),!0):!1}else return!1});a.length>0?Promise.all(a).then(d=>{d.forEach((l,h)=>{if(p(l,"serviceItemId")){let g=l.serviceItemId;t.indexOf(g)<0&&t.push(g),i[c[h]]=g}}),r({dependencies:t,urlHash:i})},d=>n(S(d))):r({dependencies:t,urlHash:i})})}function Mn(e,t){let o=e;if(e){let r=t[e];if(r){let n=e.substr(e.lastIndexOf("/")+1);o=_(r,r,".layer"+n+".url")}o=Ye(o.replace(/.+?(?=\/home)/,"{{portalBaseUrl}}"))}return o}var Re={};$(Re,{_templatizeAdminEmail:()=>Ln,_templatizeApplication:()=>Wn,_templatizeId:()=>qt,_templatizeUrl:()=>Bn,_updateDependencies:()=>Vn,convertItemToTemplate:()=>Cs,convertQuickCaptureToTemplate:()=>Jt,createItemFromTemplate:()=>As});function Cs(e,t,o,r){return X(e,t,o,r)}function Jt(e){return b(e,"data.application",Wn(e.data.application,e)),e}function Wn(e,t){qt(e,"itemId"),Ln(e);let o=e?.dataSources;return o&&Array.isArray(o)&&o.forEach(r=>{let n=r.featureServiceItemId;n&&(Vn(n,t),Bn(r,"featureServiceItemId","url"),qt(r,"featureServiceItemId"))}),e}function Ln(e){p(e,"preferences.adminEmail")&&b(e,"preferences.adminEmail","{{user.email}}")}function Vn(e,t){t.dependencies.indexOf(e)===-1&&t.dependencies.push(e)}function Bn(e,t,o){let r=p(e,t),n=p(e,o);if(n){let i=n.substr(n.lastIndexOf("/")+1);b(e,o,_(r,r,".layer"+i+".url"))}}function qt(e,t){let o=p(e,t);o&&b(e,t,_(o,o,".itemId"))}function As(e,t,o,r){return Q(e,t,o,r)}var Us="home/webmap/viewer.html?webmap=";function zn(e,t,o,r){return new Promise((n,i)=>{e.type!=="Vector Tile Service"&&(e.item.url=e.item.url?qe(B(q))+Us+e.item.id:e.item.url),Ms(e,o).then(s=>{e.dependencies=s.dependencies,e.data&&(e.data.baseMap?.baseMapLayers&&Zt(e.data.baseMap.baseMapLayers,s.urlHash,r),e.data.operationalLayers&&Zt(e.data.operationalLayers,s.urlHash,r),Zt(e.data.tables,s.urlHash,r),Ns(e.data)),n(e)},s=>i(S(s)))})}function Ms(e,t){return new Promise((o,r)=>{let n=[];if(e.data){let i=e.data.baseMap?.baseMapLayers||[],s=e.data.operationalLayers||[],a=e.data.tables||[],m=i.concat(s).concat(a);$s(m,n,t).then(c=>{o(c)},c=>r(S(c)))}else o({dependencies:n,urlHash:{}})})}function Ns(e){Je(e,"initialState")}function $s(e,t,o){return new Promise((r,n)=>{let i={},s={f:"json",authentication:o},a=[],m={},c=e.filter(d=>{if(d.itemId&&d.layerType==="VectorTileLayer")return a.push(C(d.itemId,o)),!0;if(d.url&&d.url.indexOf("{{velocityUrl}}")<0){let l=/.+FeatureServer/g.exec(d.url),h=Array.isArray(l)&&l.length>0?l[0]:void 0;return h?(Object.keys(m).indexOf(h)<0&&(m[h]=W(d.url,s)),a.push(m[h]),!0):!1}else return!1});a.length>0?Promise.all(a).then(d=>{d.forEach((l,h)=>{if(c[h].layerType==="VectorTileLayer"){let g=p(l,"typeKeywords");if(g&&g.includes("Vector Tile Style Editor")){t.indexOf(l.id)<0&&t.push(l.id),c[h].templatizeId=!0;let P=c[h].styleUrl.indexOf(l.id)+l.id.length;c[h].styleUrl=_(c[h].styleUrl.replace(c[h].styleUrl.substring(0,P),l.id),l.id,".itemUrl")}}else if(p(l,"serviceItemId")){let g=l.serviceItemId;t.indexOf(g)<0&&t.push(g),i[c[h].url]=g}}),r({dependencies:t,urlHash:i})},d=>n(S(d))):r({dependencies:t,urlHash:i})})}function Zt(e=[],t,o){e.forEach(r=>{if(r.itemId&&r.layerType==="VectorTileLayer")r.templatizeId&&(r.itemId=_(r.itemId,r.itemId,".itemId"),delete r.templatizeId);else if(r.url){let n=r.url.substr(r.url.lastIndexOf("/")+1),i=Object.keys(t).indexOf(r.url)>-1?t[r.url]:void 0;i&&(ye(n,i,r.url,o),r.url=_(i,i,".layer"+n+".url"),r.itemId=_(i,i,".layer"+n+".itemId"))}})}function jn(e,t){return["data.operationalLayers","data.tables","data.applicationProperties.viewing.search.layers"].forEach(r=>Ws(e,t,r)),e}function Ws(e,t,o){let r=p(e,o);r&&b(e,o,Ls(r,t))}function Ls(e,t){return e.forEach(o=>{let r=Vs(o,t);if(r){let n=r.fields.map(s=>s.name);cr(o,r,r.basePath,r.itemId,n),pr(o,r.basePath,n),o.layerDefinition&&(ur(o.layerDefinition,r.basePath,n),lr(o.layerDefinition,r.basePath,n));let i=p(o,"field.name");i&&b(o,"field.name",dr(i,o,r.itemId,r.basePath))}}),e}function Vs(e,t){let o;return t.some(r=>r.ids.indexOf(e.id)>-1?(o=r,!0):!1),o}function X(e,t,o,r){return new Promise((n,i)=>{let s=D(e);s.item.id=_(s.item.id,s.item.id,".itemId");let a=Xe(s.itemId,"forward",o),m=Promise.resolve({}),c=Promise.resolve([]);switch(e.type){case"Dashboard":case"Data Pipeline":case"Feature Collection":case"Feature Service":case"Hub Initiative":case"Hub Page":case"Hub Site Application":case"Insights Model":case"Oriented Imagery Catalog":case"Project Package":case"Style":case"Workforce Project":case"Web Map":case"Web Mapping Application":case"Web Scene":case"Notebook":m=new Promise(d=>{J(s.itemId,o).then(l=>d(l))});break;case"Form":m=ge(s.itemId,s.item.name,o);break;case"QuickCapture Project":c=et(s.itemId,o);break}Promise.all([m,a,c]).then(d=>{let[l,h,g]=d;ln(s,r),s.data=at(l,e.type,r);let P=h;s.dependencies=[],s.relatedItems=[],P.forEach(y=>{y.relationshipType!=="WMA2Code"&&(s.relatedItems.push(y),y.relatedItemIds.forEach(T=>{s.dependencies.indexOf(T)<0&&s.dependencies.push(T)}))}),e.type==="Data Pipeline"&&(s.dependencies=s.dependencies.concat(Bs(l)));let x=Promise.resolve(s);switch(e.type){case"Dashboard":xn(s,r);break;case"Notebook":x=Ht(s);break;case"Oriented Imagery Catalog":x=Nn(s,t,o);break;case"QuickCapture Project":s.resources=g,x=new Promise(async y=>{let T=null,E=-1;g&&(g.some((ce,ie)=>{let se=ce.name==="qc.project.json";return se&&(T=ce,E=ie),se}),E>=0&&g.splice(E,1)),T&&(s.data={application:{...await He(T)},name:"qc.project.json"}),s.data.application?.basemap?.type==="Web Map"&&s.dependencies.push(s.data.application.basemap.itemId);let j=Jt(s);y(j)});break;case"Vector Tile Service":case"Web Map":case"Web Scene":x=zn(s,t,o,r);break;case"Web Mapping Application":l&&(x=Tn(s,t,o,r));break;case"Workforce Project":x=On(s,t,o,r);break}x.then(n,y=>i(S(y)))})})}function Bs(e){let t=[];return(e?.inputs??[]).concat(e?.outputs??[]).forEach(r=>{if(r.type==="FeatureServiceSource"||r.type==="FeatureServiceSink"){let n=p(r,"parameters.layer.value.itemId");n&&t.push(n)}}),t}var O={};$(O,{convertItemToTemplate:()=>zs,createItemFromTemplate:()=>js,postProcess:()=>Gs,postProcessFieldReferences:()=>Ds});function zs(e,t,o,r){return X(e,t,o,r)}function js(e,t,o,r,n){return n?Q(e,t,o,r,n):Q(e,t,o,r)}function Ds(e,t,o){switch(o){case"Web Mapping Application":kn(e,t);break;case"Dashboard":bn(e,t);break;case"Web Map":jn(e,t);break}return e}async function Gs(e,t,o,r,n,i,s){if(t==="Web Map"&&r.resources.some(a=>a.indexOf(me)>-1)){let a=sn(`${i.portalBaseUrl}/sharing/rest`,r.itemId,me),m={httpMethod:"GET",authentication:s,params:{f:"json"},headers:{Accept:"application/json",Authorization:`Bearer ${s.token}`,"Content-Type":"application/json","X-Esri-Authorization":`Bearer ${s.token}`}};await W(a,m).then(async c=>{let d=JSON.stringify(c),l=w(d,i);if(d!==l){let h=JSON.parse(l),g={id:e,resource:Ie(h,me),name:me,authentication:s,params:{}};await Eo(g)}})}return Z(e,i,s)}function Ks(e,t,o,r){return O.convertItemToTemplate(e,t,o,r)}function pt(e){return!!p(e,"properties.services")}function Kn(e,t="https://survey123.arcgis.com"){let o=`${t}/api/survey/create`,r={credentials:"same-origin",method:"POST",body:wo({f:"json",...e},!0)};return fetch(o,r).then(n=>n.json()).then(n=>{if(!n.success)throw new Error(`Failed to create survey: ${n.error.message}`);return{formId:n.id,featureServiceId:n.featureService.source.itemId,folderId:n.formItemInfo.ownerFolder}})}var Hn=function(t){let o=M(t),r=[["header","content"],["subHeader","content"],["footer","content"],["settings","thankYouScreenContent"]],n=(s,a)=>(s&&s[a]&&(s[a]=encodeURIComponent(s[a])),s);r.forEach(([s,a])=>n(o[s],a));let i=s=>n(s,"description");return o.questions=(o.questions||[]).map(s=>s.questions?{...s,questions:s.questions.map(i)}:i(s)),o};function qn(e,t,o){let{item:{title:r,description:n,tags:i,typeKeywords:s},properties:{form:a}}=e,{user:{username:m},portalBaseUrl:c,organization:{basemapGalleryGroupQuery:d,defaultBasemap:{title:l}}}=t,{token:h}=o.toCredential();return Zo(d,l,o).then(g=>{let P="Survey-",x=Mo(`${P}${r}`,t,"user.folders").replace(P,"");if(a.questions){let T=E=>(E.maps&&(E.maps=E.maps.map(j=>({...j,itemId:g.id}))),E);a.questions=a.questions.map(E=>E.questions?{...E,questions:E.questions.map(T)}:T(E))}let y=Hn(a);return{description:n,form:y,portalUrl:c,tags:i,title:x,token:h,typeKeywords:s,username:m}})}function Jn(e,t,o,r){let n=w(e,t),{survey123Url:i}=t;return qn(n,t,o).then(s=>Kn(s,i)).then(s=>{let{formId:a,featureServiceId:m}=s,c=Promise.resolve(null);return e.item.thumbnail&&(c=Pe({id:a},null,o,e.item.thumbnail)),c.then(()=>C(a,o)).then(d=>(t[n.itemId]={itemId:a},t[n.properties.info.serviceInfo.itemId]={itemId:m},r(n.itemId,u.Finished,n.estimatedDeploymentCostFactor,a),{item:{...e,item:d,itemId:a},id:a,type:"Form",postProcess:!0}))}).catch(s=>{throw r(n.itemId,u.Failed,0),s})}function Hs(e,t,o,r){return pt(e)?Jn(e,t,o,r):O.createItemFromTemplate(e,t,o,r)}async function Qt(e,t){let o=await Ut(e),r=new Date;return r=new Date(r.valueOf()-864e5-r.getTimezoneOffset()*1e3*60),o.forEach(n=>{if(typeof n.content=="string"){let i=ei(n,t);e.file(n.file,i,{date:r})}else n.file.endsWith(".xlsx")&&e.file(n.file,n.content,{date:r})}),Promise.resolve(e)}async function Yt(e,t){return(await Ut(e)).forEach(r=>{if(r.file.endsWith(".info")||r.file.endsWith(".itemInfo")||r.file.endsWith(".json")||r.file.endsWith(".webform")||r.file.endsWith(".xml")){let n=r.content,i=/\b([0-9A-Fa-f]){32}_type/g;n=Qn(n,t,i),n=Zn(n,t,i),n=Yn(n,t),n=Xn(n,t),e.file(r.file,n)}}),Promise.resolve(e)}function Zn(e,t,o){let r=e;return Object.keys(t).filter(i=>i.match(o)&&t[i].type==="Feature Service").forEach(i=>{let s=t[i].url,a=t[s];a&&(r=r.replace(new RegExp(s,"g"),a))}),r}function Qn(e,t,o){let r=e;return Object.keys(t).filter(i=>i.match(o)&&t[i].type!=="Feature Service").map(i=>i.replace("_type","")).forEach(i=>{r=r.replace(new RegExp(i,"g"),`{{${i}.itemId}}`)}),r}function Yn(e,t){let o=e;return t.portalBaseUrl&&(o=o.replace(new RegExp(t.portalBaseUrl,"g"),"{{portalBaseUrl}}")),o}function Xn(e,t){let o=e;return t.workflowBaseUrl&&(o=o.replace(new RegExp(t.workflowBaseUrl,"g"),"{{workflowBaseUrl}}")),o}function ei(e,t){let o=Oo(),r=e.content;return r=w(e.content,t),he(r.match(o)??[]).forEach(i=>{let s=t[i];typeof s?.itemId=="string"&&(r=r.replace(new RegExp(i,"g"),`${s.itemId}`))}),r}function ti(e,t,o,r,n,i,s){let a=r.properties.info.serviceInfo.itemId,{itemId:m}=i[a],c=w(r,i);return C(m,s).then(d=>{let l=[{id:e,title:c.item.title,snippet:c.item.snippet,extent:c.item.extent,culture:c.item.culture},{id:m,extent:c.item.extent,typeKeywords:[`source-${a}`].concat(d.typeKeywords)}],h=P=>z(P,s),g=l.map(h);return Promise.all(g).then(()=>{let P=[e,m],x=T=>K({itemId:T,folderId:i.folderId,authentication:s}),y=P.map(x);return Promise.all(y)}).then(()=>vr(d.ownerFolder,s)).then(()=>{let P=D(d);return n.push(P),r.dependencies.push(d.id),!0})})}async function oi(e,t,o,r,n,i,s){let a=await ge(e,"Form",s);if(a){let m=await At(a),c=await Qt(m,i);rt(c,e,s)}else return await ko(5e3),oi(e,t,o,r,n,i,s);return pt(r)?ti(e,t,o,r,n,i,s):Z(e,i,s)}async function Js(e,t){for(let o of e)if(o.type==="Form"){let r=o.data;if(o.data=null,r){let n=await At(r);n=await Yt(n,t),o.item.name=ri(o.item.name,r.name,`${o.itemId}.zip`);let i=await Ar(n,o.item.name),s=nt(o.itemId,o.item.name,1,ke.data),a={itemId:o.itemId,file:i,folder:s.folder,filename:o.item.name};o.dataFile=a,o.resources.push(s.folder+"/"+s.filename)}}return Promise.resolve(e)}function ri(e,t,o){let r=e||t;return r&&r!=="undefined"?r:o}var eo={};$(eo,{_initializeNewGroup:()=>ni,convertItemToTemplate:()=>Zs,createItemFromTemplate:()=>Qs,postProcess:()=>Ys});function Zs(e,t,o){return new Promise(r=>{let n=Lo(e);n.item.id=_(n.item.id,n.item.id,".itemId"),qo(e.id,o).then(i=>{n.type="Group",Ho(e.id,o).then(s=>{s.id=n.item.id,n.item={...s,type:"Group"},n.dependencies=i.concat(Ao(s.tags)),r(n)},()=>r(n))},()=>r(n))})}function Qs(e,t,o,r){return new Promise(n=>{if(!r(e.itemId,u.Started,0)){r(e.itemId,u.Ignored,0),n(I(e.type));return}let i=M(e);i=w(i,t),i.item.thumbnail=e.item.thumbnail;let s=ni(i.item);Pr(s.title,s,t,o,Ot(i)?t.locationTracking.owner:void 0).then(a=>{if(a.success)if(!r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,a.group.id))r(e.itemId,u.Cancelled,0),Fe(a.group.id,o).then(()=>n(I(e.type)),()=>n(I(e.type)));else if(i.itemId=a.group.id,t[e.itemId]={itemId:a.group.id},i=w(i,t),t[e.itemId].itemId=a.group.id,!r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,a.group.id))r(e.itemId,u.Cancelled,0),Fe(a.group.id,o).then(()=>n(I(e.type)),()=>n(I(e.type)));else if(Ot(i)){let m=t.locationTracking.owner;Fr(a.group.id,m,o).then(c=>{c.success?r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,a.group.id)?kr(a.group.id,[o.username],o).then(d=>{Array.isArray(d.notRemoved)&&d.notRemoved.length===0?r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,a.group.id)?n({item:i,id:a.group.id,type:i.type,postProcess:oe(i)}):(r(e.itemId,u.Cancelled,0),Fe(a.group.id,o).then(()=>n(I(e.type)),()=>n(I(e.type)))):(r(e.itemId,u.Failed,0),n(I(e.type)))}):(r(e.itemId,u.Cancelled,0),Fe(a.group.id,o).then(()=>n(I(e.type)),()=>n(I(e.type)))):(r(e.itemId,u.Failed,0),n(I(e.type)))})}else n({item:i,id:a.group.id,type:i.type,postProcess:oe(i)});else r(e.itemId,u.Failed,0),n(I(e.type))},()=>{r(e.itemId,u.Failed,0),n(I(e.type))})})}function Ys(e,t,o,r,n,i,s){let a=Promise.resolve({success:!0});return o.some(m=>{if(m.id===e){let c=m.item.item;return oe(c)&&(c=w(c,i),a=Or(c,s)),!0}}),a}function ni(e){let t={access:"private",description:e.description,owner:e.owner,snippet:e.snippet,tags:e.tags,thumbnail:e.thumbnail,title:e.title||"",typeKeywords:e.typeKeywords};return["autoJoin","displaySettings","isInvitationOnly","isOpenData","isViewOnly","membershipAccess","properties","sortField","sortOrder"].forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var Ce={};$(Ce,{convertItemToTemplate:()=>Xs,createItemFromTemplate:()=>ea,isAPage:()=>oa,postProcess:()=>ta});function ii(e,t,o,r){return e=fe(e,o,{}),Dr(e,{...r,allowList:[]}).then(()=>!0)}function lt(e){let t=H(e);return(e.dependencies||[]).forEach(r=>{let n=new RegExp(r,"g"),i=`{{${r}.itemId}}`;t.item=le(t.item,n,i),t.data=le(t.data,n,i),e.properties&&(t.properties=le(t.properties,n,i))}),t}function ut(e,t,o){let r=L(K,{success:!0}),n=[r({itemId:e.item.id,folderId:t,authentication:o})];return V(e,"item.properties.parentInitiativeId")&&n.push(r({itemId:e.item.properties.parentInitiativeId,folderId:t,authentication:o})),Promise.all(n)}function Xs(e,t,o=null){let r=0,n=0;return Promise.all([Ee(e.id,{authentication:t}),ne(t)]).then(([i,s])=>(r=i.item.created,n=i.item.modified,Kr(i,s))).then(i=>(i.item.created=r,i.item.modified=n,i.item.typeKeywords=Ve(i.item.typeKeywords,"doNotDelete"),i.groups=[],i.estimatedDeploymentCostFactor=2,i.resources=[],V(i,"properties")||(i.properties={}),i=lt(i),i))}function ea(e,t,o,r){if(!r(e.itemId,u.Started,0))return Promise.resolve(I(e.type));if(e.assets&&e.resources&&delete e.assets,t.solutionItemExtent){let c=t.solutionItemExtent.split(",");t.organization.defaultExtentBBox=[[c[0],c[1]],[c[2],c[3]]]}let i={},s,a,m=e.item.thumbnail;return ne(o,t).then(c=>(a=c,Hr(e,t,i,a))).then(c=>{let d=c,l={assets:d.assets||[]};return Gr(d,l,a)}).then(c=>(s=c,ut(c,t.folderId,o))).then(()=>{let c={item:{id:s.item.id},params:{thumbnail:m},authentication:o};return ee(c)}).then(()=>{if(t[e.itemId]={itemId:s.item.id},r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor||2,s.item.id)){let d={item:{...e,...te(s)},id:s.item.id,type:e.type,postProcess:!0};return d.item.itemId=s.item.id,d}else return L(jr,{success:!0})(s,a).then(()=>Promise.resolve(I(e.type)))}).catch(c=>{throw r(e.itemId,u.Failed,0),c})}function ta(e,t,o,r,n,i,s){let a;return ne(s).then(m=>(a=m,Ee(e,{authentication:s}))).then(m=>ii(m,o,i,a))}function oa(e){let t=!1;return(e==="Hub Page"||e==="Site Page")&&(t=!0),t}var Ae={};$(Ae,{convertItemToTemplate:()=>ra,createItemFromTemplate:()=>na,isASite:()=>sa,postProcess:()=>ia});function si(e,t,o){let r=t.filter(n=>n.type.indexOf("Page")>-1).map(n=>n.id);return Promise.all(r.map(n=>Ee(n,o))).then(n=>tn(e,n,o))}function ai(e,t,o,r){let n=t.filter(m=>m.id!==e.item.id),i=n.map(m=>({item:{id:m.id,type:m.type}})),s=[];s=s.concat(en(e,i,r)),s=s.concat(si(e,n,r));let a=n.map(m=>m.id);return e.item.properties.children=a,e=Qr(e,o,{}),s.push(qr(e,{...r,allowList:void 0})),Promise.all(s).then(()=>!0)}function ra(e,t,o=null){let r=0,n=0,i,s,a;return ne(t).then(m=>(a=m,bt(e.id,a))).then(m=>(r=m.item.created,n=m.item.modified,i=m.item.title,s=m.data.values.title,Xr(m,a))).then(m=>(m.item.created=r,m.item.modified=n,m.item.title=i,m.item.typeKeywords=Ve(m.item.typeKeywords,"doNotDelete"),m.data.values.title=s,m.groups=[],m.estimatedDeploymentCostFactor=2,m.resources=[],p(m,"properties")||(m.properties={}),m.dependencies=he(m.dependencies),m=lt(m),m))}function na(e,t,o,r){if(!r(e.itemId,u.Started,0))return Promise.resolve(I(e.type));e.assets&&e.resources&&delete e.assets,t.solution||(t.solution={}),t.solution.title=t.title;let i={},s,a,m=e.item.thumbnail;return ne(o,t).then(c=>(a=c,Yr(e,t,i,a))).then(c=>{let d={assets:c.assets||[]};return Zr(c,d,a)}).then(c=>(s=c,ut(c,t.folderId,o))).then(()=>{let c={item:{id:s.item.id},params:{thumbnail:m},authentication:o};return ee(c)}).then(()=>{if(t[e.itemId]={itemId:s.item.id},r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor||2,s.item.id)){let d={item:{...e,...te(s)},id:s.item.id,type:e.type,postProcess:!0};return d.item.itemId=s.item.id,d}else return L(Jr,{success:!0})(s,a).then(()=>Promise.resolve(I(e.type)))}).catch(c=>{throw r(e.itemId,u.Failed,0),c})}function ia(e,t,o,r,n,i,s){let a;return ne(s,i).then(m=>(a=m,bt(e,a))).then(m=>ai(m,o,i,a)).then(()=>Promise.resolve(!0))}function sa(e){let t=!1;return(e==="Hub Site Application"||e==="Site Application")&&(t=!0),t}var ht={};$(ht,{convertItemToTemplate:()=>ca,createItemFromTemplate:()=>da,isAStoryMap:()=>pa});function mi(e={}){let t=0;return Object.keys(e).reduce((o,r)=>(V(e,`${r}.type`)==="webmap"&&r!==`webmap${t}`&&(o.push({original:r,updated:`webmap${t}`}),t++),o),[])}function ci(e){let t=V(e,"data.resources")||{};return Object.keys(t).reduce((o,r)=>(V(t,`${r}.type`)==="webmap"&&o.push(V(t,`${r}.data.itemId`)),o),[])}function pi(e){let t=Qe(e.item.id,e.item.type);t.key=`${je(e.item.title)}_${Be("i")}`;let o=H(e);t.data=o.data;let r=o.item.created,n=o.item.modified;return t.item=Ge(o.item),t.item.created=r,t.item.modified=n,t.item.url="{{storyMapTemplateUrl}}",mi(t.data.resources).forEach(a=>{t.data.resources[a.updated]=H(t.data.resources[a.original]),delete t.data.resources[a.original],t.data.nodes=le(t.data.nodes,a.original,a.updated)}),t.item.typeKeywords.indexOf(di)!==-1&&(t.item.typeKeywords=[aa].concat(t.item.typeKeywords.filter(a=>a!==di))),t.properties={},t.properties.draftFileName="draft_{{timestamp}}.json",Object.assign(t.properties,ma),t.dependencies=ci(e),Promise.resolve(t)}var di="smstatusunpublishedchanges",aa="smstatuspublished",ma={oembed:{version:"1.0",type:"rich",title:"Example StoryMap",url:"{{storyMapTemplateUrl}}",provider_name:"ArcGIS StoryMaps",provider_url:"{{storyMapBaseUrl}}",width:800,height:600,thumbnail_url:"{{storyMapThumbnailUrl}}",thumbnail_height:"100.5",thumbnail_width:"400",html:'<iframe src="{{storyMapTemplateUrl}}" width="800" height="600" scrolling="yes" frameborder="0" allowfullscreen></iframe>',cache_age:86400},oembedXML:`<?xml version="1.0" encoding="utf-8" standalone="yes"?>
3
+ <oembed>
4
+ <version>1.0</version>
5
+ <type>rich</type>
6
+ <title>Example StoryMap</title>
7
+ <url>{{storyMapTemplateUrl}}</url>
8
+ <author_name>undefined</author_name>
9
+ <provider_name>ArcGIS StoryMaps</provider_name>
10
+ <provider_url>{{storyMapBaseUrl}}</provider_url>
11
+ <width>800</width>
12
+ <height>600</height>
13
+ <thumbnail_url>{{storyMapThumbnailUrl}}</thumbnail_url>
14
+ <thumbnail_height>100.5</thumbnail_height>
15
+ <thumbnail_width>400</thumbnail_width>
16
+ <html><iframe src="{{storyMapTemplateUrl}}" width="800" height="600" scrolling="yes" frameborder="0" allowfullscreen="true"></iframe></html>
17
+ <cache_age>86400</cache_age>
18
+ </oembed>`};function li(e){let t=e.portal||"https://www.arcgis.com/sharing/rest",o="portal";return t.match(/(qaext|\.mapsqa)\.arcgis.com/)?o="qaext":t.match(/(devext|\.mapsdevext)\.arcgis.com/)?o="devext":t.match(/(www|\.maps)\.arcgis.com/)&&(o="www"),o}function ft(e){let t=e.portal||"https://www.arcgis.com/sharing/rest",o;return t.match(/(qaext|\.mapsqa)\.arcgis.com/)?o="storymapsqa":t.match(/(devext|\.mapsdevext)\.arcgis.com/)?o="storymapsdev":t.match(/(www|\.maps)\.arcgis.com/)&&(o="storymaps"),o}function ui(e){let t="",o=ft(e);return o?t=`https://${o}.arcgis.com`:t=`${e.portal.replace("/sharing/rest","")}/apps/storymaps`,t}function fi(e,t,o,r){let n=new Date().getTime();t.agoenv=li(r),t.smBase=ft(r),t.timestamp=new Date().getTime(),t.storyMapBaseUrl=ui(r),t.storyMapTemplateUrl=`${t.storyMapBaseUrl}/stories/{{appid}}`,t.storyMapThumnailUrl=`${r.portal}/content/items/{{appid}}/info/thumbnail/thumbnail.jpg/?w=400&d=${n}`;let i=fe(e,t,o);return Promise.resolve(i)}function hi(e,t,o,r){let n=[];e.data=JSON.parse(JSON.stringify(e.data).replace(/portalUrl=https:\/\//g,"portalUrl=https%3A%2F%2F"));let i={item:ue(e),authentication:r};return e.item.thumbnail&&(i.params={thumbnail:e.item.thumbnail},delete i.item.thumbnail),Ne(i).then(s=>{e.item.id=s.id,e=De(e);let a=we(JSON.stringify(e.data));return n.push({name:e.properties.draftFileName,file:a}),n.push({name:"oembed.json",file:we(JSON.stringify(e.properties.oembed))}),n.push({name:"oembed.xml",file:we(e.properties.oembedXML)}),n.push({name:"published_data.json",file:a}),delete e.properties,Promise.all([ee({item:ue(e),authentication:r}),r.getUsername()])}).then(s=>{let a=s[1],m=L(Le,{success:!0}),c=n.map(d=>m({id:e.item.id,owner:a,resource:d.file,name:d.name,authentication:r}));return Promise.all(c)}).then(()=>K({itemId:e.item.id,folderId:t,authentication:r})).then(()=>e)}function ca(e,t,o){let r={item:e,data:{}};return $e(e.id,{authentication:o}).then(n=>(r.data=n,pi(r))).then(n=>n)}function da(e,t,o,r){if(!r(e.itemId,u.Started,0))return Promise.resolve(I(e.type));t.solution||(t.solution={}),t.solution.title=t.title;let i={},s;return fi(e,t,i,o).then(a=>{let m={assets:a.assets||[]};return hi(a,t.folderId,m,o)}).then(a=>{if(s=a,t[e.itemId]={itemId:s.item.id},r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor||2,s.item.id)){let c={item:{...e,...te(s)},id:s.item.id,type:e.type,postProcess:!1};return c.item.itemId=s.item.id,c}else return L(We,{success:!0})({id:s.item.id,authentication:o}).then(()=>Promise.resolve(I(e.type)))}).catch(a=>{throw r(e.itemId,u.Failed,0),a})}function pa(e){let t=!1;return e==="StoryMap"&&(t=!0),t}var xe={};$(xe,{convertItemToTemplate:()=>Fa,createItemFromTemplate:()=>ka,postProcess:()=>Oa});function Ii(e){to(e,"data.sources",fa),to(e,"data.feeds",ua),to(e,"data.feed",gi)}function to(e,t,o){let r=p(e,t);r&&b(e,t,o(r))}function ua(e){return e.map(t=>(t.label=t.label&&t.id?`{{${t.id}.label}}`:t.label,t.id=t.id?`{{${t.id}.itemId}}`:t.id,t))}function gi(e){let t=p(e,"properties.feature-layer.portalItemId");if(e.properties&&(e.properties["feature-layer.portalItemId"]&&(t=e.properties["feature-layer.portalItemId"],e.properties["feature-layer.portalItemId"]=`{{${t}.itemId}}`),t&&e.properties.hasOwnProperty("feature-layer.layerId"))){let o=e.properties["feature-layer.layerId"];e.properties["feature-layer.layerId"]=`{{${t}.layer${o}.layerId}}`}return e}function fa(e){return e.map(t=>gi(t))}function yi(e,t){let o=[];return[p(e,"data.feeds")?e.data.feeds:[],p(e,"data.feed")?[e.data.feed]:[]].forEach(r=>Ia(r,o)),[p(e,"data.sources")?e.data.sources:[],p(e,"data.source")?[e.data.source]:[],p(e,"data.outputs")?e.data.outputs:[],p(e,"data.output")?[e.data.output]:[]].forEach(r=>Pi(r,o)),ha(o,t)}function ha(e,t){let o=e.map(r=>C(r,t));return Promise.all(o).then(r=>Promise.resolve(r.reduce((n,i)=>(i.typeKeywords.indexOf("IoTFeatureLayer")<0&&n.push(i.id),n),[])))}function Ia(e,t){e.reduce((o,r)=>{let n=r.id||void 0;return n&&o.indexOf(n)<0&&o.push(n),o},t),Pi(e,t)}function Pi(e,t){e.reduce((o,r)=>((p(r,"name")?[r.name]:it).forEach(i=>{st.forEach(s=>{if(s.indexOf("mapServicePortalItemID")<0&&s.indexOf("streamServicePortalItemID")<0){let a=r.properties?r.properties[i+s]:void 0;a&&o.indexOf(a)<0&&o.push(a)}})}),o),t)}function Ue(e,t,o,r="",n=!1,i="",s=""){return pn(e,t).then(a=>{if(a){let m=o==="Real Time Analytic"?"analytics/realtime":o==="Big Data Analytic"?"analytics/bigdata":o.toLowerCase(),c=s?`/${s}`:"",d=i?`/${i}`:"";return Promise.resolve(n?`${a}/iot/${m}${d}${c}`:r?`${a}/iot/${m}${d}/${r}${c}/?f=json&token=${e.token}`:`${a}/iot/${m}${d}${c}/?f=json&token=${e.token}`)}else return Promise.resolve(a)})}function wi(e,t,o,r,n=!1){return Ue(e,r,t.type,void 0,!0).then(i=>i?ga(e,o.label,i).then(s=>{let a=s.titles;o.label=s.label,o.id="";let m=w(o,r),c=(o.outputs?o.outputs:o.output?[o.output]:[]).map(l=>({id:l.id,name:l.properties[`${l.name}.name`]})),d=(m.feeds?m.feeds:m.feed?[m.feed]:[]).map(l=>({id:l.id?l.id:l.properties[`${l.name}.portalItemId`]||"",name:l.label?l.label:o.label}));return Si(e,r,t.type,m,a,c,d).then(l=>It(e,i,"POST",l).then(h=>{t.item.url=`${i}/${h.id}`,t.item.title=o.label,r[t.itemId].url=t.item.url,r[t.itemId].label=o.label,r[t.itemId].itemId=h.id;let g={item:w(t.item,r),id:h.id,type:t.type,postProcess:!1};return n?Sa(e,r,t,h.id).then(()=>Promise.resolve(g)):Promise.resolve(g)}))}):Promise.reject(S("Velocity NOT Supported by Organization")))}function ga(e,t,o){return It(e,`${o}StatusList?view=admin`,"GET").then(r=>{let n=r&&Array.isArray(r)?r.map(i=>({title:i.label})):[];return Promise.resolve({label:bi(t,{titles:n},"titles"),titles:n.map(i=>i.title)})})}function Si(e,t,o,r,n,i=[],s=[]){return i.length>0||s.length>0?Ei(e,t,o,"",r).then(a=>{let m=ya(a);return m.length>0?(i.length>0&&wa(i,r,m),s.length>0&&Pa(s,r,m.concat(n)),Si(e,t,o,r,n,i,s)):Promise.resolve(r)}):Promise.resolve(r)}function ya(e){let t=p(e,"validation.messages"),o=p(e,"nodes");o&&Array.isArray(o)&&o.forEach(n=>{t=t.concat(p(n,"validation.messages")||[])});let r=[];return t&&Array.isArray(t)&&t.forEach(n=>{["VALIDATION_ANALYTICS__MULTIPLE_CREATE_FEATURE_LAYER_OUTPUTS_REFERENCE_SAME_LAYER_NAME","VALIDATION_ANALYTICS__MULTIPLE_CREATE_STREAM_LAYER_OUTPUTS_REFERENCE_SAME_LAYER_NAME","ITEM_MANAGER__CREATE_ANALYTIC_FAILED_DUPLICATE_OUTPUT_NAMES_IN_ORGANIZATION_NOT_ALLOWED","ITEM_MANAGER__CREATE_BIG_DATA_ANALYTIC_FAILED_DUPLICATE_NAMES_NOT_ALLOWED","ITEM_MANAGER__CREATE_REAL_TIME_ANALYTIC_FAILED_DUPLICATE_NAMES_NOT_ALLOWED","ITEM_MANAGER__CREATE_FEED_FAILED_DUPLICATE_NAME"].indexOf(n.key)>-1&&(r=r.concat(n.args))}),r}function Pa(e,t,o){e.forEach(r=>{let n=xi(o,r);n&&(t.label=n.label,r.name=n.label)})}function wa(e,t,o){e.forEach(r=>{let n=xi(o,r);if(n){let i=(t.outputs?t.outputs:t.output?[t.output]:[]).map(s=>{if(s.id===n.id&&s.properties){let a=`${s.name}.name`;Object.keys(s.properties).indexOf(a)>-1&&(s.properties[a]=n.label)}return s});t.outputs&&(t.outputs=i),t.output&&(t.output=i[0])}})}function xi(e,t){let o=e.map(n=>({title:n})),r=bi(t.name,{titles:o},"titles");return r!==t.name?{label:r,id:t.id}:void 0}function bi(e,t,o){e=e?e.trim():"_";let n=(p(t,o)||[]).map(a=>a.title),i=e,s=0;for(;n.indexOf(i)>-1||n.indexOf(i.replace(/ /g,"_"))>-1;)s++,i=e+" "+s;return i}function Sa(e,t,o,r){return Ei(e,t,o.type,r).then(n=>n.executable?xa(e,t,o.type,r):Promise.resolve(n))}function Ei(e,t,o,r,n){return Ue(e,t,o,r,!1,"validate","").then(i=>It(e,i,"POST",n).then(s=>Promise.resolve(s)))}function xa(e,t,o,r){return Ue(e,t,o,r,!1,"","start").then(n=>It(e,n,"GET").then(i=>Promise.resolve(i)))}function ba(e,t){return{headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"token="+e.token},method:t}}function It(e,t,o,r){let n=ba(e,o);return r&&(n.body=JSON.stringify(r)),fetch(t,n).then(i=>Promise.resolve(i.json()))}function _i(e,t){let o=e.dependencies;[p(e,"data.sources")?e.data.sources:[],p(e,"data.source")?[e.data.source]:[],p(e,"data.feeds")?e.data.feeds:[],p(e,"data.feed")?[e.data.feed]:[]].forEach(r=>Ea(r,o,t)),[p(e,"data.outputs")?e.data.outputs:[],p(e,"data.output")?[e.data.output]:[]].forEach(r=>_a(r,o))}function Ea(e,t,o){e.forEach(r=>{let n="feature-layer.portalItemId",i="feature-layer.layerId";if(r.properties){if(r.properties[n]){let m=r.properties[n];m&&t.indexOf(m)<0&&(delete r.properties[n],delete r.properties[i])}let s="simulator.url",a=r.properties[s];a&&a.indexOf(o)>-1&&delete r.properties[s]}})}function _a(e,t){e.forEach(o=>{o.properties&&((p(o,"name")?[o.name]:it).forEach(n=>{st.forEach(i=>Ta(o.properties,n+i,t))}),va(o.properties))})}function Ta(e,t,o){let r=e[t];r&&o.indexOf(r)<0&&delete e[t]}function va(e){["feat-lyr-new.name","stream-lyr-new.name","feat-lyr-existing.name"].forEach(t=>{let o=e[t];o&&o.indexOf("{{solutionItemId}}")<0&&(e[t]=`${o}_{{solutionItemId}}`)})}function Fa(e,t,o,r){let n=D(e);return Ue(o,r,e.type,e.id).then(i=>i?fetch(i).then(s=>s.json()).then(s=>(n.item.title=s.label,n.data=s,yi(n,o).then(a=>(n.dependencies=a,_i(n,r.velocityUrl),Ii(n),n.item=at(n.item,n.type,r),Promise.resolve(n))))):Promise.reject("Velocity NOT Supported by Organization"),i=>Promise.reject(S(i)))}function ka(e,t,o,r){if(!r(e.itemId,u.Started,0))return Promise.resolve(I(e.type));let i=e.itemId;return wi(o,e,e.data,t).then(s=>{if(r(i,u.Finished,e.estimatedDeploymentCostFactor||2,s.id)){let m={item:{...e,...s},id:s.item.id,type:e.type,postProcess:!0};return m.item.itemId=s.item.id,m}else return F(s.id,o).then(()=>Promise.resolve(I(e.type)),()=>Promise.resolve(I(e.type)))})}function Oa(e,t,o,r,n,i,s){let m=o.filter(c=>c.id===e)[0].item.item;return delete m.url,delete m.origUrl,z(m,s).then(()=>K({owner:s.username,itemId:e,folderId:i.folderId,authentication:s}))}var gt={};$(gt,{convertItemToTemplate:()=>Ca,createItemFromTemplate:()=>Aa,postProcess:()=>Ua});function Ti(e){let t=e.portal||"https://www.arcgis.com/sharing/rest",o;return t.match(/(qaext|\.mapsqa)\.arcgis.com/)?o="experienceqa":t.match(/(devext|\.mapsdevext)\.arcgis.com/)?o="experiencedev":t.match(/(www|\.maps)\.arcgis.com/)&&(o="experience"),o}function vi(e){let t="",o=Ti(e);return o?t=`https://${o}.arcgis.com/experience/{{appid}}`:t=`${e.portal.replace("/sharing/rest","")}/apps/experiencebuilder/?id={{appid}}`,t}function Fi(e,t,o,r){t.experienceUrlTemplate=vi(r);let n=fe(e,t,o);return n.item.url=t.experienceUrlTemplate,e.item.thumbnail&&(n.item.thumbnail=e.item.thumbnail),Promise.resolve(n)}function ki(e,t,o,r){let n=[],i={item:ue(e),authentication:r};return e.item.thumbnail&&(i.params={thumbnail:e.item.thumbnail},delete i.item.thumbnail),Ne(i).then(s=>{e.item.id=s.id;let a=e.item.thumbnail;e=De(e),e.item.thumbnail=a;let m=H(e.data);n.push({name:"config.json",prefix:"config",file:Pn(m)});let c=H(e.properties.imageResourcesList);c&&n.push({name:"image-resources-list.json",prefix:"images",file:we(JSON.stringify(c))}),delete e.properties;let d={item:ue(e),authentication:r};return e.item.thumbnail&&(d.params={thumbnail:e.item.thumbnail},delete d.item.thumbnail),Promise.all([ee(d),r.getUsername()])}).then(s=>{let a=s[1],m=L(Le,{success:!0}),c=n.map(d=>m({id:e.item.id,owner:a,resource:d.file,name:d.name,prefix:d.prefix,authentication:r}));return Promise.all(c)}).then(()=>K({itemId:e.item.id,folderId:t,authentication:r})).then(()=>e)}function Oi(e){let t=V(e,"data.dataSources")||{};return Object.keys(t).reduce((o,r)=>ze(V(t,`${r}.itemId`),o),[])}function Ci(e){let t=Qe(e.item.id,e.item.type);t.key=`${je(e.item.title)}_${Be("i")}`;let o=H(e);t.data=o.data;let r=o.item.created,n=o.item.modified;return t.item=Ge(o.item),t.item.created=r,t.item.modified=n,t.item.url="{{experienceUrlTemplate}}",t.item.typeKeywords.indexOf(Ri)!==-1&&(t.item.typeKeywords=[Ra].concat(t.item.typeKeywords.filter(s=>s!==Ri))),t.dependencies=Oi(e),Promise.resolve(t)}var Ra="status: Published",Ri="status: Changed";function Ca(e,t,o){let r={item:e,data:{}};return $e(e.id,{authentication:o}).then(n=>(r.data=n,Ci(r)))}function Aa(e,t,o,r){if(!r(e.itemId,u.Started,0))return Promise.resolve(I(e.type));let i;return Fi(e,t,{},o).then(s=>(i=s,ki(s,t.folderId,{},o))).then(s=>{if(i.item.id=s.item.id,i.item.url=s.item.url,t[e.itemId]={itemId:s.item.id},r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor||2,s.item.id)){let m={item:{...e,...te(i)},id:i.item.id,type:e.type,postProcess:!1};return m.item.itemId=i.item.id,m}else return L(We,{success:!0})({id:i.item.id,authentication:o}).then(()=>Promise.resolve(I(e.type)))})}function Ua(e,t,o,r,n,i,s){return Z(e,i,s)}var yt={};$(yt,{convertItemToTemplate:()=>Ma,createItemFromTemplate:()=>Na,createWebTool:()=>Ai,getNotebookEnterpriseServerRootURL:()=>Mi,getNotebookServerCreateServiceURL:()=>Ui,moveToFolder:()=>Ni});function Ma(e,t,o,r){return O.convertItemToTemplate(e,t,o,r)}function Na(e,t,o,r){return new Promise(n=>{if(!r(e.itemId,u.Started,0))r(e.itemId,u.Ignored,0),n(I(e.type));else{let i=M(e);i=w(i,t),e.item.thumbnail&&(i.item.thumbnail=e.item.thumbnail),Ai(i,t,o).then(s=>{r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,s.itemId)?(t[e.itemId]={itemId:s.itemId,itemUrl:t.portalBaseUrl+"/sharing/rest/content/items/"+s.itemId},i.itemId=s.itemId,i.item.id=s.itemId,i.data={},delete i.item.thumbnail,Ni(i.itemId,t,o).then(()=>{et(s.itemId,o).then(a=>{let m=Promise.resolve();a.some(c=>{if(c.name==="webtoolService.json")return m=He(c),!0}),m.then(c=>{t[e.itemId].url=c?.serviceUrl,i=w(i,t),Pe({...i.item},i.data,o,e.item.thumbnail,void 0,t).then(()=>{r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,s.itemId)?C(i.itemId,o).then(d=>{i.item=d,n({item:i,id:s.itemId,type:i.type,postProcess:!1})},()=>{r(e.itemId,u.Failed,0),F(s.itemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))}):(r(e.itemId,u.Cancelled,0),F(s.itemId,o).then(()=>n(I(e.type)),()=>n(I(e.type))))},()=>{r(e.itemId,u.Failed,0),F(s.itemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))})})})},()=>{r(e.itemId,u.Failed,0),F(s.itemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))})):(r(e.itemId,u.Cancelled,0),F(s.itemId,o).then(()=>n(I(e.type)),()=>n(I(e.type))))},()=>{r(e.itemId,u.Failed,0),n(I(e.type))})}})}function Ai(e,t,o){return new Promise((r,n)=>{Ui(t.portalBaseUrl,o,t).then(i=>{if(i){let s={serviceProperties:{description:e.item.description,provider:"notebooks",type:"GPServer",jsonProperties:{timeoutInMinutes:e.data.timeoutInMinutes,title:e.item.title,notebookId:e.data.notebookId,tasks:[{type:"notebook",name:e.data.name}]}}},a={httpMethod:"POST",authentication:o,params:s,headers:{Accept:"application/json",Authorization:`Bearer ${o.token}`,"Content-Type":"application/json","X-Esri-Authorization":`Bearer ${o.token}`}};W(i,a).then(m=>{r(m)},m=>{n(m)})}else n()},i=>{n(i)})})}async function Ui(e,t,o){let r=o.isPortal?await Mi(e,t):o.portalUrls?.notebooks.https.length>0?o.portalUrls.notebooks.https[0]:"";return r&&o.isPortal?`${r}/admin/services/createService?f=json&request.preventCache=${Date.now()}`:r?`https://${r}/admin/services/createService?f=json&request.preventCache=${Date.now()}`:""}async function Mi(e,t){let r=(await Go(`${e}/sharing/rest`,t)).find(n=>n.serverFunction.indexOf("NotebookServer")>-1);return r?r.url:""}async function Ni(e,t,o){return t.isPortal&&!(await Sr(e,t.folderId,o)).success?Promise.reject("Failed to move webTool item"):Promise.resolve()}var so={};$(so,{_cacheLayerDetails:()=>oo,addWorkflowItem:()=>ro,convertItemToTemplate:()=>La,createItemFromTemplate:()=>Va,fetchAuxiliaryItems:()=>no,postProcessFormItems:()=>$a,updateTempDictWorkflowId:()=>Pt,updateTemplateDictionaryForWorkflow:()=>io});async function ro(e,t,o){let r=`${t}/admin/createWorkflowItem?name=${e.item.title}`,n={authentication:o,headers:{Accept:"application/json",Authorization:`Bearer ${o.token}`,"Content-Type":"application/json","X-Esri-Authorization":`Bearer ${o.token}`},params:{name:`${e.item.title}`}},i=await W(r,n);return Promise.resolve(i.itemId)}async function no(e,t){let o=`workflow_${e}`,r=`WorkflowLocations_${e}`,n=`workflow_views_${e}`,i=await ot({q:`title:${o} OR title:${r} OR title:${n}`,authentication:t});return Promise.resolve(i.results.map(s=>s.id))}function $a(e){for(let t of e)if(t.type==="Workflow"){let o=Ro(JSON.stringify(t.properties.configuration));t.dependencies=he([...t.dependencies,...o])}return e}async function io(e,t,o,r){let n=await J(t,r),i=p(o,`workflows.${e}`);i&&(await Pt(o,"viewSchema",i,n,r),await Pt(o,"workflowLocations",i,n,r),await Pt(o,"workflowSchema",i,n,r))}async function Pt(e,t,o,r,n){let i=o[t],s=p(r,`${t}.itemId`);e[i].itemId=s;let a=await Vr(s,n),m=p(a,"base.url");e[i].url=m,e[i].name=p(a,"base.name");let c=p(a,"featureServiceProperties.layers");oo(c,e,m,i,s);let d=p(a,"featureServiceProperties.tables");oo(d,e,m,i,s)}function oo(e,t,o,r,n){e&&r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&e.forEach(i=>{let s=i.fields.reduce((c,d)=>(c[d.name.toLowerCase()]={alias:d.alias,name:d.name,type:d.type},c),{}),a=i.id,m=`${o}/${a}`;t[r][`layer${a}`]={fields:s,itemId:n,layerId:a,url:m}})}async function La(e,t,o,r){let n=D(e);n.estimatedDeploymentCostFactor=20,n.item.id=_(n.item.id,n.item.id,".itemId");let i=Xe(n.itemId,"forward",o),s=Er(e.id,r.workflowBaseUrl,o),a=J(e.id,o),[m,c,d]=await Promise.all([i,s,a]);return n.data=d,n.dependencies=[],n.relatedItems=[],Lr(n),m.forEach(l=>{l.relationshipType!=="WMA2Code"&&(n.relatedItems.push(l),l.relatedItemIds.forEach(h=>{n.dependencies.indexOf(h)<0&&n.dependencies.push(h)}))}),n.properties.configuration=await Mr(c),Promise.resolve(n)}async function Va(e,t,o,r){if(!r(e.itemId,u.Started,0))return r(e.itemId,u.Ignored,0),Promise.resolve(I(e.type));e.data={};let n=M(e);n=w(n,t),e.item.thumbnail&&(n.item.thumbnail=e.item.thumbnail);try{let i=await ro(n,t.workflowBaseUrl,o);if(!i)throw new Error("Failed to create workflow item");if(!r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,i))return r(e.itemId,u.Cancelled,0),F(i,o),Promise.resolve(I(e.type));n.itemId=n.item.id=i,t[e.itemId]={itemId:i},await io(e.itemId,i,t,o),n.properties.configuration=w(n.properties.configuration,t);let s=await Ur(n.properties.configuration);await _r(i,s,t.workflowBaseUrl,o);let a=await no(i,o);if(a.push(i),(await xr(a,t.folderId,o)).some(d=>!d.success))throw new Error("Failed to move all workflow items");return r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,i),Promise.resolve({item:n,id:i,type:n.type,postProcess:!1})}catch{return r(e.itemId,u.Failed,0),Promise.resolve(I(e.type))}}var wt=null,St={Group:eo,"Big Data Analytic":xe,"Feature Collection":O,"Feature Service":mt,Feed:xe,"Geocoding Service":void 0,"Geodata Service":void 0,"Geometry Service":void 0,"Geoprocessing Service":yt,"Globe Service":void 0,"Image Service":void 0,KML:void 0,"Map Service":mt,"Network Analysis Service":void 0,"Real Time Analytic":xe,"Relational Database Connection":void 0,"Scene Service":void 0,"Stream Service":void 0,Tool:void 0,"Vector Tile Service":O,WFS:void 0,WMS:void 0,WMTS:void 0,"Workflow Manager Service":void 0,"3D Web Scene":void 0,"Web Map":O,"Web Scene":O,Application:void 0,Dashboard:O,"Data Pipeline":O,"Data Store":void 0,"Desktop Application":void 0,"Excalibur Imagery Project":void 0,Form:Xt,"Hub Initiative":wt,"Hub Page":Ce,"Hub Site Application":Ae,"Insights Model":O,"Insights Page":void 0,"Insights Theme":void 0,"Insights Workbook":void 0,Mission:void 0,"Mobile Application":void 0,Notebook:Se,"Oriented Imagery Catalog":O,"Ortho Mapping Project":void 0,"QuickCapture Project":Re,"Site Application":Ae,"Site Page":Ce,Solution:wt,StoryMap:ht,"Urban Model":void 0,"Web Experience Template":void 0,"Web Experience":gt,"Web Mapping Application":O,"Workforce Project":O,"360 VR Experience":f,"AppBuilder Extension":f,"AppBuilder Widget Package":f,"Application Configuration":f,"ArcGIS Pro Add In":f,"ArcGIS Pro Configuration":f,"ArcPad Package":f,"Basemap Package":f,"CAD Drawing":f,"CityEngine Web Scene":f,"Code Attachment":wt,"Code Sample":f,"Color Set":f,"Compact Tile Package":f,"CSV Collection":f,CSV:f,"Deep Learning Package":f,"Desktop Add In":f,"Desktop Application Template":f,"Desktop Style":f,"Document Link":f,"Explorer Add In":f,"Explorer Layer":f,"Explorer Map":f,"Feature Collection Template":f,"File Geodatabase":f,GeoJson:f,GeoPackage:f,"Geoprocessing Package":f,"Geoprocessing Sample":f,"Globe Document":f,"Image Collection":f,Image:f,"iWork Keynote":f,"iWork Numbers":f,"iWork Pages":f,"KML Collection":f,"Layer Package":f,"Layer Template":f,Layer:f,Layout:f,"Locator Package":f,"Map Document":f,"Map Package":f,"Map Template":f,"Microsoft Excel":f,"Microsoft Powerpoint":f,"Microsoft Word":f,"Mobile Basemap Package":f,"Mobile Map Package":f,"Mobile Scene Package":f,"Native Application":f,"Native Application Installer":f,"Native Application Template":f,netCDF:f,"Operation View":f,"Operations Dashboard Add In":f,"Operations Dashboard Extension":f,PDF:f,"Pro Layer Package":f,"Pro Layer":f,"Pro Map Package":f,"Pro Map":f,"Pro Report":f,"Project Package":f,"Project Template":f,"Published Map":f,"Raster function template":f,"Report Template":f,"Rule Package":f,"Scene Document":f,"Scene Package":f,"Service Definition":f,Shapefile:f,"Statistical Data Collection":f,Style:O,"Survey123 Add In":f,"Symbol Set":f,"Task File":f,"Tile Package":f,"Toolbox Package":f,"Vector Tile Package":f,"Viewer Configuration":f,"Visio Document":f,"Window Mobile Package":f,"Windows Mobile Package":f,"Windows Viewer Add In":f,"Windows Viewer Configuration":f,Workflow:so,"Workflow Manager Package":f,"Administrative Report":void 0,"Apache Parquet":void 0,"API Key":void 0,"datastore catalog service":void 0,"Deep Learning Studio Project":void 0,"Earth Configuration":void 0,"Elevation Layer":void 0,"Esri Classifier Definition":void 0,"Export Package":void 0,"GeoBIM Application":void 0,"GeoBIM Project":void 0,"Geoenrichment Service":void 0,GML:void 0,"Hub Event":void 0,"Hub Initiative Template":void 0,"Hub Project":void 0,"Insights Data Engineering Model":void 0,"Insights Data Engineering Workbook":void 0,"Insights Workbook Package":void 0,"Knowledge Graph":void 0,"Knowledge Studio Project":void 0,"Link Chart":void 0,"Map Image Layer":void 0,Markup:void 0,OGCFeatureServer:void 0,"Pro Project":void 0,"Pro Report Template":void 0,"Route Layer":void 0,"Scene Layer Package":void 0,"Site Initiative":void 0,"StoryMap Theme":void 0,Table:void 0,"Video Service":void 0,Undefined:void 0,Unsupported:wt};var ao=null;function Li(e,t,o,r,n,i,s,a){return new Promise((m,c)=>{let d=Date.now(),l=!1;function h(){if(a&&a.abortController&&!l&&a.abortController.signal.aborted){l=!0;let R=Xa(o,n),N=zi(o,n,s),A={consoleProgress:!0};Promise.all(N.existingItemsDefs).then(U=>{let ae=em(d,U,R);Mt(i,ae,o,n,s,A).then(async()=>{try{await Br(ae,n.folderId,s)}catch(k){console.warn("deleteSolutionFolder failed (ignored during cleanup):",k)}c(Et(y))})})}}let g=Ya(o)+1,P=10,x=(99-P)/g,y=[],T=[],E=!0;h();let j=(R,N,A,U)=>{if(P+=x*A,a.progressCallback)if(N===u.Finished){let ae={event:xt[N],data:R};a.progressCallback(Math.round(P),a.jobId,ae)}else a.progressCallback(Math.round(P),a.jobId);return a.consoleProgress&&console.log(Date.now(),R,a.jobId??"",xt[N],P.toFixed(0)+"%",A,U?"==> "+U:""),N===u.Created?T.push(U):N===u.Failed&&(y.push(R),console.error("Item "+R+" has failed"),E=!1),E};p(n,"organization.isPortal")&&(o=ja(o));let{buildOrder:ce,itemsToBePatched:ie}=zr(o),se=[];h(),Ha(o,a.enableItemReuse??!1,n,s).then(()=>{h(),qa(o,p(n,"params.useExisting"),n,s).then(()=>{h(),o=or(o),ce.forEach(N=>{let A=vt(o,N);A.type==="Form"?ie[N]=[]:A.type==="QuickCapture Project"?A.resources=A.resources.filter(U=>!U.endsWith("qc.project.json")):A.type==="Web Map"&&Ba(ie,A),se.push(Qa(A,mn(e,t,A.resources,a.storageVersion),r,n,s,j,a.abortController))}),Promise.all(se).then(N=>{h(),y.length===0?(za(ie,n,N),m(N)):Mt(i,T,o,n,s,{consoleProgress:!0}).then(()=>c(Et(y)))})})},R=>{console.error(R),c(S(R))})})}function Ba(e,t){t.resources.some(o=>o.indexOf(me)>-1)&&(e[t.itemId]=[])}function za(e,t,o){let r=Object.keys(e);r.length>0&&(r=r.map(n=>t[n].itemId),o.forEach(n=>{r.includes(n.id)&&(n.postProcess=!0)}))}function ja(e){let t=Ka(e);Da(e,t);let o=Ga(t),r=[],n=[];return Object.keys(o).forEach(i=>{o[i].forEach(a=>{let m=vt(e,a),c=p(m,"properties.syncViews");n.indexOf(m.itemId)>-1&&(r=r.concat(c)),c&&c.length>0&&b(m,"properties.syncViews",M(r)),r.indexOf(a)<0&&r.push(a),n.indexOf(m.itemId)<0&&n.push(m.itemId)}),r=[]}),e}function Da(e,t){return t.forEach(o=>{o.dependencies.forEach(r=>{e=e.map(n=>(p(n,"properties.service.isView")&&n.dependencies.indexOf(r)>-1&&n.itemId!==o.id&&(Array.isArray(n.properties.syncViews)||(n.properties.syncViews=[]),n.properties.syncViews.indexOf(o.id)<0&&n.properties.syncViews.push(o.id)),n))})}),e}function Ga(e){let t={};return e.forEach(o=>{o.dependencies.forEach(r=>{Object.keys(t).indexOf(r)<0?t[r]=[o.id]:t[r].indexOf(o.id)<0&&t[r].push(o.id)})}),t}function Ka(e){return e.reduce((t,o)=>(p(o,"properties.service.isView")&&t.push({id:o.itemId,dependencies:o.dependencies}),t),[])}function Ha(e,t,o,r){return new Promise((n,i)=>{if(t){let s=zi(e,o,r),a=s.existingItemsDefs,m=s.existingItemInfos;Promise.all(a).then(c=>{let d=Wi(c,m,o,r,!0),l=d.existingItemsDefs,h=d.existingItemInfos;Promise.all(l).then(g=>{Wi(g,h,o,r,!1),Vi(e,o,r).then(n)},g=>i(S(g)))},c=>i(S(c)))}else n(null)})}function qa(e,t,o,r){return new Promise(n=>{if(t){let i=[],s={},a=[];Object.keys(o.params).forEach(m=>{let c=o.params[m];c.itemId&&/[0-9A-F]{32}/i.test(m)&&(Bi(o,m,c.itemId,c),i.push(C(c.itemId,r)),s[c.itemId]=m,a.indexOf(m)<0&&a.push(m))}),Ja(i,s,r).then(()=>{Vi(a.map(m=>Ze(e,m)),o,r).then(n)})}else n(null)})}function Ja(e,t,o){return new Promise(r=>{e.length>0?Promise.all(e).then(n=>{let i=[];n.forEach(s=>{let a=t[s.id];if(s&&a&&s.typeKeywords){let m=`source-${a}`,c=s.typeKeywords;if(c.indexOf(m)<0){c.push(m);let d={id:s.id,typeKeywords:c};i.push(z(d,o))}}}),i.length>0?Promise.all(i).then(r,()=>r(void 0)):r(void 0)},()=>r(void 0)):r(void 0)})}function Vi(e,t,o){return new Promise(r=>{let n=[],i=[],s=[],a=[];e.forEach(m=>{let c=t[m.itemId];if(c&&c.url&&c.itemId){if(m.item.type==="Feature Service"){let d=p(t,`params.${m.itemId}.enterpriseIDMapping`);Object.assign(t[m.itemId],tr(nr(m),c.url,c.itemId,d)),p(m,"properties.service.hasViews")&&ar(m,t,!1)}i.indexOf(c.url)<0&&(n.push(m.item.type==="Feature Service"?W(c.url,{authentication:o}):C(c.itemId,o)),i.push(c.url),s.push(m.item.type),a.push(c.itemId))}}),n.length>0?Promise.all(n.map(m=>m.catch(c=>c))).then(m=>{if(Array.isArray(m)&&m.length>0){let c=[];m.forEach((d,l)=>{d.serviceItemId&&s[l]==="Feature Service"?Object.keys(t).forEach(h=>{let g=t[h];if(g.itemId&&g.itemId===d.serviceItemId){mr(t,h,d.spatialReference),Te(t,`${h}.defaultExtent`,d.fullExtent||d.initialExtent);let P=(d.layers||[]).map(y=>y.id),x=(d.tables||[]).map(y=>y.id);c.push(ir(i[l],P.concat(x),o))}}):(s[l]==="Feature Service"||p(d,"response.error"))&&(t=Za(t,a[l]))}),c.length>0?Promise.all(c).then(d=>{d.forEach(l=>{l.forEach(h=>{Object.keys(t).forEach(g=>{if(t[g].itemId===h.serviceItemId){let P="";Object.keys(t).some(y=>{if(t[y].itemId===h.serviceItemId)return P=y,!0});let x=p(t,`params.${P}.enterpriseIDMapping`);x?Object.keys(x).forEach(y=>{x[y].toString()===h.id.toString()&&$i(t,g,y,h.fields)}):$i(t,g,h.id,h.fields)}})})}),r(null)}):r(null)}else r(null)}):r(null)})}function $i(e,t,o,r){let n=p(e,`${t}.layer${o}`);n&&r&&(n.fields=r)}function Za(e,t){if(t){let o="";Object.keys(e).some(r=>{if(e[r].itemId===t)return o=r,!0}),o!==""&&delete e[o]}return e}function Wi(e,t,o,r,n){let i=[Promise.resolve(null)],s=[void 0];return e&&Array.isArray(e)&&e.forEach((a,m)=>{if(Array.isArray(a?.results)){let c,d=a.results;if(d.length===1)c=d[0];else if(d.length>1)c=d.reduce((l,h)=>l.created>h.created?l:h);else if(n&&t[m]){let l=t[m],h=`tags:source-${l.itemId} type:${l.type} owner:${o.user.username}`;i.push(ji(h,r)),s.push(t[m])}if(c){let l=t[m].itemId;l&&Bi(o,l,c.id,c)}}}),{existingItemsDefs:i,existingItemInfos:s}}function Bi(e,t,o,r){e[t]=Object.assign(e[t]||{},{def:Promise.resolve(I(r.type,o)),itemId:o,name:r.name,title:r.title,url:r.url,label:r.title})}function zi(e,t,o){let r=[],n=[];return e.forEach(i=>{if(i.item.type==="Group"){let s=t.user?.groups;Array.isArray(s)&&r.push(Promise.resolve({results:s.filter(a=>a.tags.indexOf(`source-${i.itemId}`)>-1||a.typeKeywords.indexOf(`source-${i.itemId}`)>-1).map(a=>(a.type="Group",a)),sourceId:i.itemId}))}else r.push(ji(`typekeywords:source-${i.itemId} type:${i.item.type} owner:${t.user.username}`,o));n.push({itemId:i.itemId,type:i.item.type})}),{existingItemsDefs:r,existingItemInfos:n}}function ji(e,t){return ot({q:e,authentication:t,pagingParam:{start:1,num:100}})}function Qa(e,t,o,r,n,i,s){function a(){if(s&&s.signal.aborted)throw new Error("Operation was cancelled")}let m=e.itemId;if(e.dependencies=e.dependencies||[],!r.hasOwnProperty(e.itemId)||!p(r[e.itemId],"def")){a();let c,d=u.Unknown,l;r[e.itemId]=r[e.itemId]||{},r[e.itemId].def=new Promise(h=>{let g=e.dependencies.reduce((y,T)=>{let E=p(r,`${T}.def`);return E&&y.push(E),y},[]),P=p(e,"properties.syncViews"),x=P&&P.length>0?P.reduce((y,T)=>{let E=p(r,`${T}.def`);return E&&y.push(E),y},g):g;Promise.all(x).then(()=>{a();let y=e.type;if(l=St[y],e.type==="Geoprocessing Service"&&(l=e.item.typeKeywords.indexOf("Web Tool")>-1?l:ao),!l||l===ao)throw l===ao?(d=u.Ignored,new Error):(d=u.Failed,new Error);return cn(o,t)}).then(y=>(a(),e.item.thumbnail=y,l.createItemFromTemplate(e,r,n,i))).then(async y=>{if(a(),y.id==="")throw d=u.Failed,new Error("handled");if(c=y,c.item.item.url&&Te(r,m+".url",c.item.item.url),t.length>0){let T=c.id;if(e.type==="Form"){let E;if(t=t.filter(j=>j.filename.endsWith(".zip")?(E=j,!1):!0),E){a();let j=await Cr(E.url,o);await rt(j,T,n)}}return a(),nn(o,t,m,r.folderId,T,n,c.item,r)}else return Promise.resolve(null)}).then(()=>{h(c)}).catch(y=>{(!y||y.message!=="handled")&&i(m,d===u.Unknown?u.Failed:d,0),h(I(e.type))})})}return r[m].def}function Ya(e){return e.reduce((t,o)=>t+(o.estimatedDeploymentCostFactor||1),0)}function Xa(e,t){return e.map(o=>o.itemId).map(o=>t[o].itemId)}function em(e,t,o){let r=[];t.filter(i=>{i.results.forEach(s=>{s.created<e&&r.push(s.id)})});let n=new Set(r);return o=o.filter(i=>!n.has(i)),o.filter(i=>i!==void 0)}function Di(e,t,o){let r=e.filter(n=>n.groups&&n.groups.length>0);return Promise.all(r.map(n=>{let i=n.groups.reduce((s,a)=>ze(p(t,`${a}.itemId`),s),[]);if(kt(n)&&!p(t,"locationTracking.userIsOwner")){let s=p(n,"item.properties.trackViewGroup"),a=p(t,"locationTracking.owner");if(s&&a){let m=i.filter(c=>c===w(s,t));if(m.length!==i.length){let c=i.filter(d=>d!==s);return Promise.all([Oe(m,n.itemId,o,a),Oe(c,n.itemId,o)])}else return Oe(i,n.itemId,o,a)}}else return Oe(i,n.itemId,o)}))}function Gi(e,t,o,r,n){let i=[];e&&(i=o.filter(c=>c.type!=="Group").map(c=>xo({originItemId:e,destinationItemId:c.id,relationshipType:"Solution2Item",authentication:r})));let s=Di(t,n,r),m=o.filter(c=>c.postProcess).reduce((c,d)=>{let l=St[d.type];return l&&l.postProcess&&c.push(l.postProcess(d.id,d.type,o,Ze(t,d.id),t,n,r)),c},[]);return Promise.all([s].concat(m,i))}function Ki(e,t){e.sort((o,r)=>t.indexOf(o.itemId)-t.indexOf(r.itemId))}async function Ji(e,t,o,r,n){function i(){if(n&&n.abortController&&n.abortController.signal.aborted)throw new Error("Operation was cancelled")}i(),n.storageVersion=Vo(o);let s=n.storageAuthentication?n.storageAuthentication:r,a=n.templateDictionary??{},m=$r(o.templates,a);o.templates=m.deployTemplates,nm(n,t,a,r),n.additionalTypeKeywords&&(t.typeKeywords=[].concat(t.typeKeywords,n.additionalTypeKeywords));let c="thumbnail",d=Promise.resolve(null);if(!n.thumbnail&&n.thumbnailurl){c=Ko(n.thumbnailurl)||c;let k=vo(n.thumbnailurl,"w=400");delete n.thumbnailurl,d=Do(k,c,s,[400])}t=im(t,a),sm(o,a);let l=await Promise.all([Bo("",r),zo(r),Ft(r),jo(r),d]),[h,g,P,x,y]=l;!n.thumbnail&&y&&(n.thumbnail=y),o.templates=rm(o.templates),a.isPortal=h.isPortal,a.organization=Object.assign(a.organization||{},h),a.portalUrls=g.urls,a.portalBaseUrl=am(h,r),a.user=P,a.user.folders=x.folders,a.user.groups=x.groups.filter(k=>k.owner===a.user.username),i();let T=await Ft(r);a.workflowBaseUrl=await Nr(r,h,T.orgId),Qo(h,P,a,o.templates);let E=Yo(a,r),j=yr(t.title,a,r),ce=h.defaultExtent,ie=Ir(ce,void 0,{wkid:4326},h.helperServices.geometry.url,r);i();let se=await Promise.all([j,ie,E]),[po,R,N]=se,A=po.folder.id;a.folderId=A,a.solutionItemExtent=R.xmin+","+R.ymin+","+R.xmax+","+R.ymax,a.organization.defaultExtentBBox=[[R.xmin,R.ymin],[R.xmax,R.ymax]],a.locationTrackingEnabled&&Te(a,"locationTracking.userIsOwner",N);let U;if(!n.dontCreateSolutionItem){t.categories=[];let k={...Ke(t),type:"Solution",typeKeywords:["Solution"]};n.additionalTypeKeywords&&(k.typeKeywords=["Solution"].concat(n.additionalTypeKeywords)),i(),k.thumbnail=n.thumbnail,U=(await re(k,{},r,A)).id,i(),await bo({id:U,authentication:r}),a.solutionItemId=U,t.id=U,t.tryitUrl=qi(t.tryitUrl,e,U),t.url=qi(t.url,e,U)}i();let ae=await Li(s.portal,e,o.templates,s,a,U,r,n);if(o.templates=o.templates.map(k=>(i(),k.itemId=p(a,`${k.itemId}.itemId`),k.dependencies=k.dependencies.map(de=>_o(a,`${de}.itemId`,de)),k)),Ki(o.templates,ae.map(k=>k.id)),i(),await Gi(U,o.templates,ae,r,a),!n.dontCreateSolutionItem){t.typeKeywords=[].concat(t.typeKeywords,["Deployed"]);let k=t.typeKeywords.indexOf("Template");k>=0&&t.typeKeywords.splice(k,1);let de=t.typeKeywords.indexOf("Build");de>=0&&t.typeKeywords.splice(de,1),o.templates=o.templates.map(lo=>Zi(lo)),om(m,o),o.templates=mm(o.templates,a),o.templates=Wr(o.templates,a),t.data=w(o,a),a.params&&(t.data.params=a.params),i(),await z(t,r,A)}return t.id}function om(e,t){e.workflowManagedTemplates.forEach(o=>{t.templates.push(Zi(o))})}function rm(e){return e.map(t=>{if(t.item){let o=t.item.typeKeywords||[];o.push("source-"+t.itemId),t.item.typeKeywords=o}return t})}function nm(e,t,o,r){return["title","snippet","description","tags"].forEach(n=>{e[n]=e[n]??t[n],e[n]&&(t[n]=e[n],o[n]=e[n])}),!e.thumbnailurl&&t.thumbnail&&(e.thumbnailurl=an(r.portal,t.id,t.thumbnail),delete t.thumbnail),e}function im(e,t){return e=w(e,t),e}function sm(e,t){e.templates=e.templates.map(o=>{if(o.type==="Feature Service"){let r="params.";o=Hi(o,"item.spatialReference.wkid",r,t),o=Hi(o,"properties.service.spatialReference.wkid",r,t)}return o})}function Hi(e,t,o,r){let n=p(e,t);return n&&typeof n=="string"&&n.indexOf(o)>-1&&b(e,t,w(n,r)),e}function qi(e,t,o){let r;if(e&&e.indexOf(t)>-1){let n=new RegExp(t,"g");r=e.replace(n,o)}else r=e;return r}function am(e,t){let o="https",r=p(e,"urlKey"),n=p(e,"customBaseUrl"),i=p(e,"portalHostname");return r&&n?`${o}://${r}.${n}`:i?`${o}://${i}`:t.portal.replace("/sharing/rest","")}function mm(e,t){let o=e.reduce((r,n)=>(n.type==="Group"&&r.push(n.itemId),r),[]);return Object.keys(t).forEach(r=>{let n=t[r].itemId;o.indexOf(n)>-1&&e.forEach(i=>{i.groups=i.groups.map(s=>s===r?n:s)})}),e}function Zi(e){let t=["itemId","type","dependencies","groups"],o=Object.keys(e).filter(r=>t.indexOf(r)<0);return _e(e,o),e}function Qi(e,t){return typeof e=="string"?Promise.all([C(e,t),J(e,t)]).then(([o,r])=>Nt({item:o,data:r})):cm(e)?Nt(e):Promise.reject(S("getSolutionTemplateItem must be passed an item id or a model object"))}function Yi(e,t,o){return e.jobId=e.jobId??t.id,e.title=e.title??t.title,e.snippet=e.snippet??t.snippet,e.description=e.description??t.description,e.tags=e.tags??t.tags,e.thumbnailurl=t.thumbnail?Jo(t.id,t.thumbnail,!1,o):null,e}function cm(e){let t=!1,o=r=>r!=null&&typeof r!="string"&&!Array.isArray(r)&&typeof r=="object";return o(e)&&(t=["item","data"].reduce((r,n)=>(r&&(r=o(e[n])),r),!0)),t}function Xi(e){let t=e.typeKeywords,o=!1;return e.type==="Solution"&&t.indexOf("Solution")>-1&&(t.indexOf("Template")>-1||t.indexOf("solutionTemplate")>-1||t.indexOf("Build")>-1)&&(o=!0),e.type==="Web Mapping Application"&&t.indexOf("hubSolutionTemplate")>-1&&(o=!0),o}async function es(e,t,o){if(!e)return Promise.reject(S("The Solution Template id is missing"));function r(){if(o&&o.abortController&&o.abortController.signal.aborted)throw new Error("Operation was cancelled")}let n=o||{};n.progressCallback&&n.progressCallback(1,n.jobId);let i=n.storageAuthentication?n.storageAuthentication:t;return r(),Qi(e,i).then(s=>(r(),Xi(s.item)?Promise.all([Promise.resolve(s.item),Promise.resolve(s.data)]):Promise.reject(S(`${s.item.id} is not a Solution Template`)))).then(s=>{let[a,m]=s,c=new To,d=Ke(a,c),l=m,h=d.id;return n=Yi(n,d,i),Co(d),r(),Ji(h,d,l,t,n)}).then(s=>(n.progressCallback&&n.progressCallback(100,n.jobId),s),s=>(n.progressCallback&&n.progressCallback(1,n.jobId),Promise.reject(s))).catch(s=>{throw typeof s=="string"&&dm(s,t),s})}function dm(e,t){let o={consoleProgress:!0,sendToRecycling:!1};on(e.trim(),t,o)}var pm=uo`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.error-icon-color{--calcite-icon-color: var(--calcite-color-status-danger)}.outline{--calcite-block-border-color: var(--calcite-color-border-2);border:1px solid var(--calcite-color-border-input)}.space-around{margin:.5rem}.title-label{--calcite-label-margin-bottom: 1rem;font-weight:var(--calcite-font-weight-medium)}.padding-around{padding:1rem}.padding-top{padding-top:.5rem}.hidden{display:none}`,ts="",co="AzMGxyZ9AveCc5IZ",os="dev",rs=!1,ns="https://devext.arcgis.com",is="9133940fea834c6fa8cd055d7e3d4802",lm={agoBasedEnterpriseSolutionsGroupId:ts,appId:co,forceTrackingEnv:os,isEnterprise:rs,portalURL:ns,primarySolutionsGroupId:is},Mp=Object.freeze(Object.defineProperty({__proto__:null,agoBasedEnterpriseSolutionsGroupId:ts,appId:co,default:lm,forceTrackingEnv:os,isEnterprise:rs,portalURL:ns,primarySolutionsGroupId:is},Symbol.toStringTag,{value:"Module"})),mo=class extends fo{constructor(){super(...arguments),this.design=null,this.debugFailDeployment=!1,this.open=!1,this.userOptions=[],this._hasSpatialReferenceOption=!1,this._isFormValid=!1,this._isNameValid=!1,this._isSpatialReferenceOpen=!1,this._showAlertFailed=!1,this._showAlertNameErrorDescription="",this._showAlertNameError=!1,this._solutionTitle="",this._translations=go({name:"solution-deploy-dialog",blocking:!0}),this._wkid="",this._wkidDescription="",this._abortController=new AbortController,this._configContextConsumer=yo({context:Po,subscribe:!0}),this._divNameErrorIcon=Me(),this._divNameErrorMessage=Me(),this._failedAlertRef=Me(),this._customDeploymentMappings={},this._portalUrl="",this._srPickerRef=void 0,this._tempUniqueTitle="",this.deployCancelled=pe(),this.deployFailed=pe(),this.deployProgressEnd=pe(),this.deployProgressStart=pe(),this.deployProgressUpdated=pe()}static{this.properties={card:0,design:0,debugFailDeployment:5,open:5,userOptions:0,_hasSpatialReferenceOption:16,_isFormValid:16,_isNameValid:16,_isSpatialReferenceOpen:16,_showAlertFailed:16,_showAlertNameErrorDescription:16,_showAlertNameError:16,_solutionTitle:16,_translations:16,_wkid:16,_wkidDescription:16}}static{this.styles=pm}close(){this._isFormValid=!0,this._showAlertNameError=!1,this._showAlertFailed=!1,this._solutionTitle=this._tempUniqueTitle,this.open=!1,this.deployCancelled.emit()}closeAlert(){this._showAlertFailed=!1}deploy(){this._showAlertFailed&&this._failedAlertRef.value&&(this._failedAlertRef.value.open=!1,this._showAlertFailed=!1),this.userOptions.forEach(o=>{o.props.forEach(r=>{r.prop==="wkid"&&this._wkid!==""&&(r.value=this._wkid)})});let t={jobId:Fo(),reuse:!1,card:this.card,userOptions:this.userOptions};this._configContextConsumer.value?.userSession&&this._deploySolution(t,this._configContextConsumer.value.userSession)}async loaded(){if(this.card&&(this._solutionTitle=this.card.title),this.userOptions.length>0){let o=this._checkUserOption("wkid");o&&(this._hasSpatialReferenceOption=!0,o.default&&this._srPickerRef&&(this._wkidDescription=await this._srPickerRef?.getSRDescription()),this._wkid=o.default??"")}this._customDeploymentMappings={},this._portalUrl=this._configContextConsumer.value?.authentication?.PortalUrl||"";let t=un(this._portalUrl);this._anonAgolSession=new So({clientId:co,portal:`${t}/sharing/rest`}),window.enableDeployDebug=()=>{this.debugFailDeployment=!0,console.log("\u2705 Deploy debug mode enabled - deployments will now fail for testing")},window.disableDeployDebug=()=>{this.debugFailDeployment=!1,console.log("\u2705 Deploy debug mode disabled - deployments will work normally")}}async willUpdate(t){t.has("card")&&(this._solutionTitle=this.card?.title?this.card?.title:"",this._isFormValid=!0);let o=t.has("open")&&this.open,r=t.has("card")&&this.open;(o||r)&&this._configContextConsumer.value?.authentication?.IsSignedIn&&this._generateSolutionName(this._solutionTitle.trim()),(t.has("userOptions")||t.has("open"))&&(await this._checkUserOptionState(),this._hasSpatialReferenceOption&&this._wkid===""&&(this._isFormValid=!1))}render(){return this.open?G`<calcite-dialog .heading=${this._translations.title.replace("{{solutionTitle}}",this.card?.title??"")} id=${this._translations.title.replace("{{solutionTitle}}",this.card?.title??"")??ho} modal open outside-close-disabled @calciteDialogClose=${this.close} width=m><div class="space-around">${this.renderUpdateSolutionName()}${this.renderSpatialReferenceSelection()}</div><calcite-button appearance=outline @click=${this.close} slot=footer-end>${this._translations.cancel}</calcite-button>${this._isFormValid?G`<calcite-button kind=brand @click=${this.deploy} slot=footer-end>${this._translations.deploy}</calcite-button>`:G`<calcite-button kind=brand slot=footer-end disabled>${this._translations.deploy}</calcite-button>`}<calcite-alert auto-close icon=exclamation-mark-triangle kind=danger .label=${this._translations.failedToDeploy.replace("{{solutionTitle}}",this.card.title)} @calciteAlertClose=${()=>{this._showAlertFailed=!1}} .open=${this._showAlertFailed} ${be(this._failedAlertRef)}><div slot=title>${this._translations.failedToDeploy.replace("{{solutionTitle}}",this.card.title)}</div></calcite-alert></calcite-dialog>`:""}renderUpdateSolutionName(){return G`<div class="padding-around"><calcite-label scale=l class="title-label" tabindex=0>${this._translations.solutionName}</calcite-label><calcite-label scale=m><span tabindex=0>${this._translations.solutionNameHint}</span><calcite-input .label=${this._translations.solutionNameHint} max-length=250 @calciteInputInput=${async t=>{let o=t.target.value.trim();this._isNameValid=await this._validateName(o),o===this._solutionTitle&&(this._hasSpatialReferenceOption&&this._wkid===""?this._isFormValid=!1:(this._isFormValid=this._isNameValid,this._divNameErrorMessage.value&&(this._isNameValid?(this._divNameErrorMessage.value.innerHTML="",this._divNameErrorIcon.value?.classList.add("hidden")):(this._divNameErrorMessage.value.innerHTML=this._showAlertNameErrorDescription,this._divNameErrorIcon.value?.classList.remove("hidden")))))}} placeholder required scale=m .value=${this._solutionTitle.trim()}></calcite-input></calcite-label><calcite-label layout=inline><div class="hidden" ${be(this._divNameErrorIcon)}><calcite-icon aria-hidden=true class="error-icon-color" icon=exclamation-mark-triangle scale=s></calcite-icon></div><div ${be(this._divNameErrorMessage)}></div></calcite-label></div>`}renderSpatialReferenceSelection(){return this._hasSpatialReferenceOption?G`<div class="padding-around"><calcite-label scale=l class="title-label" tabindex=0>${this._translations.options}</calcite-label><calcite-block class="outline" .collapsible=${!!this._isSpatialReferenceOpen} .description=${this._wkid!==""?`${this._wkidDescription} [${this._wkid}]`:this._translations.spatialReferenceNoDefined} .expanded=${this._isSpatialReferenceOpen} .heading=${this._translations.spatialReference} @calciteBlockClose=${()=>{this._isSpatialReferenceOpen=!1}}>${!this._isSpatialReferenceOpen&&this._wkid===""&&G`<calcite-button appearance=transparent kind=danger icon-start=exclamation-mark-triangle id=srs-alert-icon scale=l slot=content-end></calcite-button><calcite-tooltip reference-element=srs-alert-icon slot=content-end>${this._translations.selectSpatialReferenceNeeded}</calcite-tooltip>`||""}${!this._isSpatialReferenceOpen&&G`<calcite-button appearance=outline kind=brand @click=${()=>{this._isSpatialReferenceOpen=!0}} scale=m slot=content-end>${this._translations.modifyOption}</calcite-button>`||""}<calcite-label layout=inline scale=s tabindex=0>${` ${this._translations.spatialReferenceInstructions} `}<a href=https://developers.arcgis.com/documentation/spatial-references/ target=_blank>${this._translations.spatialReferenceLearnMore}</a></calcite-label><arcgis-coordinate-system-picker .autoFilterToDefault=${this._wkid!==""?!0:void 0} .defaultWkid=${this._wkid!==""?parseInt(this._wkid):void 0} filter-enabled @arcgisChange=${async t=>{t.detail?.latestWkid&&this._srPickerRef&&(this._wkidDescription=await this._srPickerRef.getSRDescription(),this._wkid=t.detail.latestWkid.toString(),this._isNameValid&&(this._isFormValid=!0))}} ${be(async t=>{if(this._srPickerRef=t,this._srPickerRef&&!this._wkidDescription){await this._srPickerRef.componentOnReady();let o=this._checkUserOption("wkid");o&&o.default&&(this._srPickerRef.value={latestWkid:parseInt(o.default,10)},this._wkidDescription=await this._srPickerRef.getSRDescription()??"")}})}></arcgis-coordinate-system-picker>${this._wkid===""&&G`<calcite-label class="padding-top" layout=inline scale=s tabindex=0><calcite-icon aria-hidden=true class="error-icon-color" icon=exclamation-mark-triangle scale=s></calcite-icon>${this._translations.selectSpatialReferenceNeeded}</calcite-label>`||""}</calcite-block></div>`:G`<div></div>`}async _validateName(t){this._solutionTitle=t,this._showAlertNameError=!1;let o=await yn(t,this._configContextConsumer.value.userSession);if(!o.isValid){switch(this._showAlertNameError=!0,o.errorType){case"empty":this._showAlertNameErrorDescription=this._translations.solutionNameErrorBlank;break;case"exceed-length":this._showAlertNameErrorDescription=this._translations.solutionNameErrorLength;break;case"special-character":this._showAlertNameErrorDescription=this._translations.solutionNameErrorSpecialCharacter;break;case"not-unique":this._showAlertNameErrorDescription=this._translations.solutionNameErrorUniqueName.replace("{{proposedName}}",t);break}return o.isValid}return!0}_simulateDeploymentFailure(t){console.log("[DEBUG MODE] Simulating deployment failure..."),this.deployProgressStart.emit(this._abortController),this.deployProgressUpdated.emit({id:t.jobId,progress:0}),setTimeout(()=>{this.deployProgressUpdated.emit({id:t.jobId,progress:25})},300),setTimeout(()=>{this.deployProgressUpdated.emit({id:t.jobId,progress:50})},600),setTimeout(()=>{let o=new Error("DEBUG MODE: Simulated deployment failure for testing");this._showAlertFailed=!0,this.deployFailed.emit({card:t.card,jobId:t.jobId,error:o})},1500)}async _deploySolution(t,o){let r=this._configContextConsumer.value.authentication;if(fn(this._configContextConsumer.value)){this.deployCancelled.emit();return}if(this._abortController=new AbortController,this.debugFailDeployment){this._simulateDeploymentFailure(t);return}let n={progressCallback:(c,d)=>{this.deployProgressUpdated.emit({id:d||"",progress:Math.round(c)})}};n.enableItemReuse=t.reuse,n.jobId=t.jobId,n.title=this._solutionTitle!==""?this._solutionTitle:this.card?.title;let i=await this._getUserParams(t),s=await this._getConvertedBuildSolutionParam();s&&(i.buildSolution=s),n.templateDictionary={params:i,workflowURL:r?.PortalSubset?.workflowURL||""},n.abortController=this._abortController,n.enableItemReuse=this.card?.supportReuse??!1;let a=this._configContextConsumer.value,m=a.agoBasedEnterpriseSolutionsGroupId&&a.isEnterprise;n.storageAuthentication=m?a.anonAgolSession:o||(this._anonAgolSession??void 0),this.deployProgressStart.emit(this._abortController),this.deployProgressUpdated.emit({id:t.jobId,progress:0}),es(t.card.id,o,n).then(c=>{C(c,o).then(d=>{this.deployProgressUpdated.emit({id:t.card.id,progress:100}),this.deployProgressEnd.emit(d.id)},d=>{console.error(d),this._showAlertFailed=!0,this.deployFailed.emit({card:t.card,jobId:n.jobId||"",error:d})})},c=>{console.error(c),this._showAlertFailed=!0,this.deployFailed.emit({card:t.card,jobId:n.jobId||"",error:c})})}async _getConvertedBuildSolutionParam(){if(!this.design)return null;try{let t=this.design?.sourceBuildSolution;return t?new In({buildSolution:structuredClone(t)}).applyLlmTemplate(this.design)?.buildSolution??null:null}catch(t){return console.warn("Unable to build params.buildSolution from design; deploying with standard params only.",t),null}}async _getUserParams(t){let o={},r=p(t,"userOptions");if(r)for(let n of r)for(let i of n.props){if(i.prop==="wkid"){let s=Number.parseInt(i.value,10),a=this._configContextConsumer.value?.authentication?.Portal?.defaultExtent;if(a){let m=await hn(s,a);o.defaultExtent=m.toJSON()}}i.prop&&(i.value!==""?i.valueType==="itemid"?(o.useExisting=!0,o[i.prop]={itemId:i.value,url:i.responseValue!==i.itemType?i.responseValue:"",name:i.name,title:i.title,type:i.itemType,enterpriseIDMapping:this._customDeploymentMappings[i.prop]||{}}):o[i.prop]=i.outType==="number"?Number.parseInt(i.value,10):i.value:i.default!==""&&(o[i.prop]=i.default))}return o}_checkUserOption(t){for(let o of this.userOptions)for(let r of o.props)if(r.prop===t)return r;return null}async _checkUserOptionState(){if(this.userOptions.length>0){this._hasSpatialReferenceOption=!1,this._wkid="";let t=this._checkUserOption("wkid");t&&(this._hasSpatialReferenceOption=!0,this._wkid=t.default??"")}else this._hasSpatialReferenceOption=!1,this._wkid="",this._wkidDescription="";this._wkid===""?this._isSpatialReferenceOpen=!0:this._isSpatialReferenceOpen=!1}async _generateSolutionName(t){let o=await gn(t,this._configContextConsumer.value.userSession),r=o.conflictingNames.length===0,n=this._generateUniqueName(t,o.similiarNames);r?this._tempUniqueTitle=n:(this._tempUniqueTitle=n,this._solutionTitle=n),this._isNameValid=!0}_generateUniqueName(t,o){let r=t.toLocaleLowerCase().replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),n=new RegExp(`^${r}(?: (\\d+))?$`,"iu"),i=o.map(a=>{let m=a.match(n);return m?m[1]?Number.parseInt(m[1],10):0:null}).filter(a=>a!==null);if(!i.includes(0))return t;let s=1;for(;i.includes(s);)s++;return`${t} ${s}`}};Io("solution-deploy-dialog",mo);return{a:ji,b:Mp,c:mo}},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import b from"./GPL6FNKN.js";import a from"./XC3IZAIH.js";export default $arcgis.t(([{n:d},{c:u}])=>{async function O(r,n,t,o,e=d,a="created",s="desc",i=!1,l=[],m=[],f,g,p){if(!r?.IsSignedIn)return;let c={q:e,filter:"type:Solution",sortField:a,sortOrder:s,delay:i,categories:l,num:100};return c.q+=y(r,g),await S(n,c,o,m,p,f)}function y(r,n){let t="",o=r.PortalUserOrg,e=r.PortalUserName;return o&&(t+=" orgid:"+o),n!=="My organization's solutions"&&e&&(t+=" owner:"+e),t}async function S(r,n,t,o,e="",a){let s=await t.requestDeployedSolutionCards(n,r,e,a),i=u(s.cards,o);return{cards:s.cards,relatedSolutions:i}}return O},a,b)
2
+ import b from"./7GXMCAWQ.js";import a from"./H2UL463J.js";export default $arcgis.t(([{n:d},{c:u}])=>{async function O(r,n,t,o,e=d,a="created",s="desc",i=!1,l=[],m=[],f,g,p){if(!r?.IsSignedIn)return;let c={q:e,filter:"type:Solution",sortField:a,sortOrder:s,delay:i,categories:l,num:100};return c.q+=y(r,g),await S(n,c,o,m,p,f)}function y(r,n){let t="",o=r.PortalUserOrg,e=r.PortalUserName;return o&&(t+=" orgid:"+o),n!=="My organization's solutions"&&e&&(t+=" owner:"+e),t}async function S(r,n,t,o,e="",a){let s=await t.requestDeployedSolutionCards(n,r,e,a),i=u(s.cards,o);return{cards:s.cards,relatedSolutions:i}}return O},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import b from"./KEOBSFBN.js";import a from"./EXC566PM.js";import"./2B4SGB3I.js";import"./I2NTSKBD.js";import"./3UKDJZ2D.js";import"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./2I5LGZNX.js";import"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,a])=>{return a},a,b)
2
+ import b from"./EPOIEXNS.js";import a from"./LKZFKOG4.js";import"./2B4SGB3I.js";import"./I2NTSKBD.js";import"./3UKDJZ2D.js";import"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./2I5LGZNX.js";import"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,a])=>{return a},a,b)