@esri/solutions-components 0.8.22 → 0.8.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. package/dist/cjs/arcgis-login.cjs.entry.js +1 -1
  2. package/dist/cjs/basemap-gallery_7.cjs.entry.js +1 -1
  3. package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
  4. package/dist/cjs/calcite-alert_4.cjs.entry.js +12 -11
  5. package/dist/cjs/{calcite-avatar.cjs.entry.js → calcite-avatar_2.cjs.entry.js} +62 -0
  6. package/dist/cjs/calcite-block_5.cjs.entry.js +12 -3
  7. package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +419 -0
  8. package/dist/cjs/{calcite-dropdown_4.cjs.entry.js → calcite-dropdown_2.cjs.entry.js} +12 -435
  9. package/dist/cjs/calcite-flow_6.cjs.entry.js +25 -29
  10. package/dist/cjs/card-manager_3.cjs.entry.js +9 -3
  11. package/dist/cjs/crowdsource-manager.cjs.entry.js +12 -4
  12. package/dist/cjs/crowdsource-reporter.cjs.entry.js +57 -37
  13. package/dist/cjs/{downloadUtils-2e36a300.js → downloadUtils-5349717a.js} +2 -1
  14. package/dist/cjs/feature-list.cjs.entry.js +11 -6
  15. package/dist/cjs/{helpers-9347ad83.js → helpers-618a3f7d.js} +2 -1
  16. package/dist/cjs/{index.es-56415e48.js → index.es-aa69b58b.js} +1 -1
  17. package/dist/cjs/instant-apps-create.cjs.entry.js +266 -0
  18. package/dist/cjs/instant-apps-export.cjs.entry.js +31 -16
  19. package/dist/cjs/instant-apps-header.cjs.entry.js +3 -2
  20. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +11 -4
  21. package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +1 -1
  22. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +1 -1
  23. package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +2 -2
  24. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +1 -1
  25. package/dist/cjs/instant-apps-landing-page.cjs.entry.js +45 -9
  26. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +1 -1
  27. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +1 -1
  28. package/dist/cjs/instant-apps-sign-in.cjs.entry.js +168 -0
  29. package/dist/cjs/{languageSwitcher-395021d6.js → languageSwitcher-b9a1485c.js} +3 -1
  30. package/dist/cjs/loader.cjs.js +1 -1
  31. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  32. package/dist/cjs/{popupUtils-500c1544.js → popupUtils-3e65296c.js} +17 -2
  33. package/dist/cjs/public-notification.cjs.entry.js +4 -4
  34. package/dist/cjs/resources-fa37e40f.js +26 -0
  35. package/dist/cjs/solutions-components.cjs.js +1 -1
  36. package/dist/collection/collection-manifest.json +3 -1
  37. package/dist/collection/components/arcgis-login/arcgis-login.js +1 -1
  38. package/dist/collection/components/basemap-gallery/basemap-gallery.js +1 -1
  39. package/dist/collection/components/buffer-tools/buffer-tools.js +1 -1
  40. package/dist/collection/components/card-manager/card-manager.js +1 -1
  41. package/dist/collection/components/create-feature/create-feature.js +1 -1
  42. package/dist/collection/components/create-related-feature/create-related-feature.js +1 -1
  43. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +30 -8
  44. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +57 -46
  45. package/dist/collection/components/feature-details/feature-details.css +2 -2
  46. package/dist/collection/components/feature-details/feature-details.js +56 -13
  47. package/dist/collection/components/feature-list/feature-list.css +1 -1
  48. package/dist/collection/components/feature-list/feature-list.js +23 -4
  49. package/dist/collection/components/info-card/info-card.js +7 -27
  50. package/dist/collection/components/layer-list/layer-list.js +7 -14
  51. package/dist/collection/components/layer-table/layer-table.js +7 -1
  52. package/dist/collection/components/public-notification/public-notification.js +3 -3
  53. package/dist/collection/demos/crowdsource-manager.html +10 -2
  54. package/dist/collection/demos/crowdsource-reporter.html +22 -15
  55. package/dist/collection/utils/interfaces.ts +1 -0
  56. package/dist/collection/utils/popupUtils.js +17 -2
  57. package/dist/collection/utils/popupUtils.ts +23 -3
  58. package/dist/components/arcgis-login.js +1 -1
  59. package/dist/components/basemap-gallery2.js +1 -1
  60. package/dist/components/buffer-tools2.js +1 -1
  61. package/dist/components/calcite-navigation-user.js +1 -99
  62. package/dist/components/card-manager2.js +1 -1
  63. package/dist/components/consent-manager.js +1 -1
  64. package/dist/components/create-feature2.js +1 -1
  65. package/dist/components/create-related-feature2.js +1 -1
  66. package/dist/components/crowdsource-manager.js +13 -5
  67. package/dist/components/crowdsource-reporter.js +58 -38
  68. package/dist/components/downloadUtils.js +1 -1
  69. package/dist/components/esri-loader.js +1 -1
  70. package/dist/components/feature-details2.js +17 -13
  71. package/dist/components/feature-list2.js +7 -5
  72. package/dist/components/helpers.js +3 -2
  73. package/dist/components/html2canvas.js +1 -1
  74. package/dist/components/index.es.js +2 -2
  75. package/dist/components/info-card2.js +7 -11
  76. package/dist/components/instant-apps-ckeditor-wrapper2.js +1 -1
  77. package/dist/components/instant-apps-create.js +317 -0
  78. package/dist/components/instant-apps-export.js +32 -16
  79. package/dist/components/instant-apps-filter-list2.js +6 -1
  80. package/dist/components/instant-apps-header2.js +3 -2
  81. package/dist/components/instant-apps-interactive-legend-classic2.js +13 -6
  82. package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +2 -2
  83. package/dist/components/instant-apps-landing-page.js +91 -16
  84. package/dist/components/instant-apps-language-translator2.js +3 -1
  85. package/dist/components/instant-apps-sign-in.js +11 -0
  86. package/dist/components/instant-apps-sign-in2.js +243 -0
  87. package/dist/components/instant-apps-social-share2.js +8 -2
  88. package/dist/components/layer-list2.js +7 -14
  89. package/dist/components/layer-table2.js +7 -1
  90. package/dist/{esm/calcite-navigation-user.entry.js → components/navigation-user.js} +46 -9
  91. package/dist/components/popupUtils.js +17 -2
  92. package/dist/components/public-notification.js +3 -3
  93. package/dist/components/purify.js +1 -1
  94. package/dist/components/solution-resource.js +1 -1
  95. package/dist/esm/arcgis-login.entry.js +1 -1
  96. package/dist/esm/basemap-gallery_7.entry.js +1 -1
  97. package/dist/esm/buffer-tools_3.entry.js +1 -1
  98. package/dist/esm/calcite-alert_4.entry.js +12 -11
  99. package/dist/esm/{calcite-avatar.entry.js → calcite-avatar_2.entry.js} +64 -3
  100. package/dist/esm/calcite-block_5.entry.js +12 -3
  101. package/dist/esm/calcite-color-picker-hex-input_2.entry.js +1 -1
  102. package/dist/esm/calcite-color-picker.entry.js +1 -1
  103. package/dist/esm/calcite-dropdown-group_2.entry.js +414 -0
  104. package/dist/esm/{calcite-dropdown_4.entry.js → calcite-dropdown_2.entry.js} +2 -423
  105. package/dist/esm/calcite-flow_6.entry.js +25 -29
  106. package/dist/esm/card-manager_3.entry.js +9 -3
  107. package/dist/esm/crowdsource-manager.entry.js +12 -4
  108. package/dist/esm/crowdsource-reporter.entry.js +57 -37
  109. package/dist/esm/{downloadUtils-aab31bfe.js → downloadUtils-5fa0d437.js} +2 -2
  110. package/dist/esm/feature-list.entry.js +11 -6
  111. package/dist/esm/{helpers-a5a81b9d.js → helpers-61b05164.js} +3 -2
  112. package/dist/esm/{index.es-43ba3006.js → index.es-57c15c9b.js} +1 -1
  113. package/dist/esm/instant-apps-create.entry.js +262 -0
  114. package/dist/esm/instant-apps-export.entry.js +31 -16
  115. package/dist/esm/instant-apps-header.entry.js +3 -2
  116. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +11 -4
  117. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +1 -1
  118. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +1 -1
  119. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +2 -2
  120. package/dist/esm/instant-apps-interactive-legend.entry.js +1 -1
  121. package/dist/esm/instant-apps-landing-page.entry.js +46 -10
  122. package/dist/esm/instant-apps-language-switcher.entry.js +1 -1
  123. package/dist/esm/instant-apps-language-translator.entry.js +1 -1
  124. package/dist/esm/instant-apps-sign-in.entry.js +164 -0
  125. package/dist/esm/{languageSwitcher-a4a615e4.js → languageSwitcher-d60f03b2.js} +3 -1
  126. package/dist/esm/loader.js +1 -1
  127. package/dist/esm/map-select-tools_3.entry.js +1 -1
  128. package/dist/esm/{popupUtils-2cc3c366.js → popupUtils-650b6bba.js} +17 -2
  129. package/dist/esm/public-notification.entry.js +4 -4
  130. package/dist/esm/resources-16800cce.js +24 -0
  131. package/dist/esm/solutions-components.js +1 -1
  132. package/dist/esm/{utils-6419e941.js → utils-251cb6de.js} +1 -1
  133. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-create/instant-apps-create.css +150 -0
  134. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +16 -9
  135. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-landing-page/instant-apps-landing-page.css +19 -0
  136. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-sign-in/instant-apps-sign-in.css +98 -0
  137. package/dist/solutions-components/demos/crowdsource-manager.html +10 -2
  138. package/dist/solutions-components/demos/crowdsource-reporter.html +22 -15
  139. package/dist/solutions-components/p-1251dcc6.entry.js +6 -0
  140. package/dist/solutions-components/p-16730f05.entry.js +6 -0
  141. package/dist/solutions-components/p-1ae3b886.entry.js +17 -0
  142. package/dist/solutions-components/p-1ff9eb95.entry.js +6 -0
  143. package/dist/solutions-components/{p-667caa6b.js → p-24bf45b7.js} +1 -1
  144. package/dist/solutions-components/{p-8f6e0ae5.entry.js → p-26eb1225.entry.js} +1 -1
  145. package/dist/solutions-components/{p-3a2e0188.entry.js → p-2c044250.entry.js} +2 -2
  146. package/dist/solutions-components/p-314dc933.entry.js +6 -0
  147. package/dist/solutions-components/p-50741707.entry.js +6 -0
  148. package/dist/solutions-components/p-614ebce7.js +6 -0
  149. package/dist/solutions-components/{p-37fc92db.js → p-6f69de4d.js} +2 -2
  150. package/dist/solutions-components/{p-8cff32bd.entry.js → p-72317f8e.entry.js} +2 -2
  151. package/dist/solutions-components/{p-df73649e.entry.js → p-77cd573b.entry.js} +1 -1
  152. package/dist/solutions-components/{p-c95dcdf7.entry.js → p-7883b885.entry.js} +3 -3
  153. package/dist/solutions-components/p-79e2e203.entry.js +6 -0
  154. package/dist/solutions-components/{p-968a6fd8.entry.js → p-7b17e929.entry.js} +1 -1
  155. package/dist/solutions-components/p-80b3eb6b.entry.js +6 -0
  156. package/dist/solutions-components/p-84913712.js +6 -0
  157. package/dist/solutions-components/p-8c500fd7.entry.js +6 -0
  158. package/dist/solutions-components/{p-54324eaa.entry.js → p-97e343df.entry.js} +1 -1
  159. package/dist/solutions-components/{p-fe9d6d06.js → p-9f56c02c.js} +1 -1
  160. package/dist/solutions-components/p-a1037b19.js +21 -0
  161. package/dist/solutions-components/{p-667c022f.entry.js → p-af4be4ce.entry.js} +1 -1
  162. package/dist/solutions-components/p-bb2e669d.entry.js +6 -0
  163. package/dist/solutions-components/p-c41997d5.js +11 -0
  164. package/dist/solutions-components/p-c512fcfb.entry.js +6 -0
  165. package/dist/solutions-components/{p-21d6360a.entry.js → p-c7f0e7a8.entry.js} +1 -1
  166. package/dist/solutions-components/{p-f6668347.entry.js → p-cbf0dada.entry.js} +3 -3
  167. package/dist/solutions-components/{p-9c7d4343.entry.js → p-cd91c3e7.entry.js} +1 -1
  168. package/dist/solutions-components/p-ceba37d3.entry.js +11 -0
  169. package/dist/solutions-components/{p-09b769b7.entry.js → p-d8a15e32.entry.js} +1 -1
  170. package/dist/solutions-components/p-d8da6406.entry.js +6 -0
  171. package/dist/solutions-components/p-da6b3c8a.entry.js +6 -0
  172. package/dist/solutions-components/{p-60f1055e.entry.js → p-e2400b0d.entry.js} +1 -1
  173. package/dist/solutions-components/p-e78be59a.entry.js +6 -0
  174. package/dist/solutions-components/p-f35cc7ae.entry.js +6 -0
  175. package/dist/solutions-components/solutions-components.esm.js +1 -1
  176. package/dist/solutions-components/utils/interfaces.ts +1 -0
  177. package/dist/solutions-components/utils/popupUtils.ts +23 -3
  178. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +14 -6
  179. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +18 -7
  180. package/dist/types/components/feature-details/feature-details.d.ts +13 -1
  181. package/dist/types/components/feature-list/feature-list.d.ts +4 -0
  182. package/dist/types/components/info-card/info-card.d.ts +0 -4
  183. package/dist/types/components/layer-list/layer-list.d.ts +1 -1
  184. package/dist/types/components.d.ts +36 -16
  185. package/dist/types/preact.d.ts +10 -4
  186. package/dist/types/utils/interfaces.d.ts +1 -0
  187. package/dist/types/utils/popupUtils.d.ts +4 -0
  188. package/package.json +2 -2
  189. package/dist/cjs/calcite-navigation-user.cjs.entry.js +0 -73
  190. package/dist/solutions-components/p-08a1e120.js +0 -6
  191. package/dist/solutions-components/p-3283660c.entry.js +0 -6
  192. package/dist/solutions-components/p-33647277.entry.js +0 -6
  193. package/dist/solutions-components/p-3af0764f.entry.js +0 -6
  194. package/dist/solutions-components/p-48c99a48.entry.js +0 -6
  195. package/dist/solutions-components/p-599dcc29.js +0 -6
  196. package/dist/solutions-components/p-5a740f6c.entry.js +0 -6
  197. package/dist/solutions-components/p-64779bb2.entry.js +0 -6
  198. package/dist/solutions-components/p-64b4b579.entry.js +0 -11
  199. package/dist/solutions-components/p-88f73319.entry.js +0 -6
  200. package/dist/solutions-components/p-ab96dd27.entry.js +0 -6
  201. package/dist/solutions-components/p-bb0c7be3.entry.js +0 -17
  202. package/dist/solutions-components/p-bb8e3add.entry.js +0 -11
  203. package/dist/solutions-components/p-cbe166fc.entry.js +0 -6
  204. package/dist/solutions-components/p-eab95aa4.entry.js +0 -6
  205. package/dist/solutions-components/p-ebf82ce0.js +0 -21
  206. package/dist/solutions-components/p-f43d6a86.entry.js +0 -6
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as i,c as t,h as e,H as s,g as o}from"./p-6d753a3d.js";import{g as h}from"./p-896c9644.js";import{E as l}from"./p-c1cf3ebc.js";import{g as a}from"./p-583e5dd0.js";import"./p-82e085d0.js";const n=class{constructor(e){i(this,e),this.showIntroductionWindow=t(this,"showIntroductionWindow",7),this.showCoverPage=t(this,"showCoverPage",7),this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._shouldSetMapView=!1,this.appProxies=void 0,this.basemapConfig=void 0,this.coverPageEnabled=void 0,this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableInlineEdit=!1,this.enableLegend=!0,this.enableSearch=!0,this.enableShare=!1,this.enableZoom=!0,this.hideMapOnLoad=!1,this.mapInfos=[],this.onlyShowUpdatableLayers=!0,this.popupHeaderColor=void 0,this.popupHeaderHoverColor=void 0,this.popupHeaderHoverTextColor=void 0,this.popupHeaderTextColor=void 0,this.searchConfiguration=void 0,this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.zoomToScale=void 0,this._expandPopup=this.hideMapOnLoad,this._hideFooter=!1,this._hideTable=!1,this._isMobile=void 0,this._translations=void 0,this._layer=void 0,this._layoutMode=l.GRID,this._mapInfo=void 0,this._mapView=void 0,this._panelOpen=!0,this._numSelected=0,this._tableOnly=!1}enableZoomWatchHandler(){this._initMapZoom()}hideMapOnLoadWatchHandler(){this.showHideMapPopupAndTable(this.hideMapOnLoad),this._expandPopup=this.hideMapOnLoad}mapInfosWatchHandler(){console.log("mapInfosWatchHandler"),console.log(this.mapInfos)}async featureSelectionChange(i){var t;this._numSelected=null===(t=i.detail)||void 0===t?void 0:t.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async idsFound(i){const t=i.detail;this._tableOnly=t.tableIds.length>0&&0===t.layerIds.length,this._tableOnly&&(this._expandPopup=!0)}async layoutChanged(i){this._layoutMode=i.detail}async mapChanged(i){this._mapChange=i.detail,await this._mapChange.mapView.when((async()=>{await this._setMapView()}))}async beforeMapChanged(){this._expandPopup&&(this._shouldSetMapView=!0)}async layerSelectionChange(i){const t=i.detail[0],e=await a(this._mapView,t);await e.when((()=>{this._layer=e}))}async mapInfoChange(){this._expandPopup=this.hideMapOnLoad}async componentWillLoad(){await this._getTranslations(),this._resizeObserver=new ResizeObserver((()=>this._onResize()))}render(){return e(s,{key:"0f06df71cc424887b8dc4b4929670d94b6548085"},e("calcite-shell",{key:"c81a570fb771650de6193e45ffbebd03544eaf2e",class:"position-relative"},e("calcite-panel",{key:"5e67c2bf9ed0df0080629989f93e89a145349abc",class:"width-full height-full "+(this.popupHeaderColor&&"#FFFFFF"!==this.popupHeaderColor?"border-width-0":"")},this._getBody(this._layoutMode,this._panelOpen,this._hideTable)),this._getFooter()))}async componentDidRender(){this._shouldSetMapView&&(this._shouldSetMapView=!1,await this._setMapView())}async componentDidLoad(){this._resizeObserver.observe(this.el)}_getFooter(){var i,t,s,o;const h=(null===(i=this._layer)||void 0===i?void 0:i.editingEnabled)&&(null===(o=null===(s=null===(t=this._layer)||void 0===t?void 0:t.capabilities)||void 0===s?void 0:s.operations)||void 0===o?void 0:o.supportsDelete);return this._isMobile&&this._numSelected>0&&!this._hideFooter?e("div",{class:"width-100",slot:"footer"},e("div",{class:"display-flex padding-1-2"},e("calcite-button",{appearance:"solid",id:"solutions-show",onClick:()=>this.showHideMapPopupAndTable(!0),width:"full"},this._translations.view.replace("{{n}}",this._numSelected.toString())),h?e("delete-button",{class:"padding-inline-start-1 width-full",id:"solutions-delete",ids:this._layerTable.selectedIds,layer:this._layer}):void 0)):void 0}_getDividerIcon(i,t){let e="";switch(i){case l.HORIZONTAL:e=t?"chevrons-up":"chevrons-down";break;case l.VERTICAL:case l.GRID:e=t?"chevrons-left":"chevrons-right"}return e}_getMapSizeClass(i,t,e){let s="";switch(i){case l.HORIZONTAL:s=(t&&!e?"height-1-2 display-grid":t&&e?"height-full":"height-0")+" width-full position-relative";break;case l.GRID:s="height-full position-relative "+(t?"width-1-3":"width-0");break;case l.VERTICAL:s="height-full position-relative "+(t?"width-1-2":"width-0")}return s}_getTableSizeClass(i,t){let e="";switch(i){case l.HORIZONTAL:e=(t?"height-1-2":"height-full")+" width-full display-flex flex-column";break;case l.GRID:e=(t?"width-2-3":"width-full")+" height-full display-flex";break;case l.VERTICAL:e=(t?"width-1-2":"width-full")+" height-full display-flex"}return e}_getBody(i,t,s){const o="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light";return e("calcite-panel",{class:"width-full height-full"},e("div",{class:"width-full height-full overflow-hidden "+(i===l.HORIZONTAL?"":"display-flex")},this._getMapAndCard(i,t,s),this._getTable(i,t,s)),this.coverPageEnabled&&e("div",{class:"floating-container",onClick:this.coverPageButtonClick.bind(this)},e("calcite-button",{appearance:"solid",class:`floating-button ${o}`,"icon-start":"content-minimal",kind:"neutral",label:"",round:!0,scale:"l","split-child":"primary",width:"auto"})),this.introductionWindowEnabled&&e("div",{class:"floating-container",onClick:this.infoButtonClick.bind(this)},e("calcite-button",{appearance:"solid",class:`floating-button ${o}`,"icon-start":"information-letter",kind:"neutral",label:"",round:!0,scale:"l","split-child":"primary",width:"auto"})))}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(i,t,s){const o=this._getMapSizeClass(i,t,s);return e("div",{class:`${o} overflow-hidden`},this._getMapNode(t),this._getPopupExpandNode())}_getMapNode(i){var t;return e("div",{class:(this._layoutMode!==l.HORIZONTAL||this._isMobile&&!i?"adjusted-height-50":"")+" overflow-hidden"},e("map-card",{appProxies:this.appProxies,basemapConfig:this.basemapConfig,class:"width-full",defaultWebmapId:this.defaultWebmap,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableHome:this.enableHome,enableLegend:this.enableLegend,enableSearch:this.enableSearch,enableSingleExpand:!0,hidden:this._expandPopup&&!this._isMobile,homeZoomIndex:3,homeZoomPosition:"top-left",homeZoomToolsSize:"s",mapInfos:null===(t=this.mapInfos)||void 0===t?void 0:t.filter((i=>!1!==i.visible)),mapWidgetsIndex:0,mapWidgetsPosition:"top-right",mapWidgetsSize:"m",stackTools:!0,theme:this.theme,toolOrder:["legend","search","fullscreen","basemap","floorfilter"]}))}_getPopupExpandNode(){var i;const t=this._expandPopup?"chevrons-down":"chevrons-up",s="expand-popup",o=this._expandPopup?this._translations.collapsePopup:this._translations.expandPopup,h="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light",l=this._expandPopup?1===(null===(i=this.mapInfos)||void 0===i?void 0:i.length)||this._isMobile?"position-absolute-0":"position-absolute-50":"height-full",a=this._isMobile?"display-none height-0":"";return e("div",{class:`${this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark"} ${l} ${this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":""}`,style:{"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor}},e("calcite-panel",null,this._isMobile?void 0:e("div",{class:`display-flex align-items-center ${a}`,slot:"header-content"},e("calcite-icon",{icon:"information",scale:"s"}),e("div",{class:"padding-inline-start-75"},this._translations.information)),e("calcite-action",{class:a,disabled:this._tableOnly,icon:t,id:s,onClick:()=>this._togglePopup(),slot:"header-actions-end",text:""}),this._tableOnly?void 0:e("calcite-tooltip",{class:h,label:"",placement:"bottom","reference-element":s},e("span",null,o)),this._getCardNode()))}_togglePopup(){this._expandPopup=!this._expandPopup}_getCardNode(){return e("div",{class:"width-50 height-full "+("dark"===this.theme?"calcite-mode-dark":"calcite-mode-light")},e("card-manager",{class:(this._expandPopup||this._isMobile?"height-full":"height-50")+" width-full",isMobile:this._isMobile,mapView:null==this?void 0:this._mapView,zoomAndScrollToSelected:this.zoomAndScrollToSelected}))}_getTable(i,t,s){var o,h;const a=s&&this._isMobile?"visibility-hidden":"",n=this._getTableSizeClass(i,t),d=this._getDividerIcon(i,t),r=t?this._translations.close:this._translations.open,c="toggle-layout",p=i===l.HORIZONTAL?"horizontal":"vertical",g=i===l.HORIZONTAL?"header":"panel-start",u=this.defaultWebmap&&this.defaultLayer,f=this.defaultGlobalId?(null===(o=this.defaultGlobalId)||void 0===o?void 0:o.indexOf(","))>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,b=this.defaultOid?(null===(h=this.defaultOid)||void 0===h?void 0:h.indexOf(","))>-1?this.defaultOid.split(",").map((i=>parseInt(i,10))):[parseInt(this.defaultOid,10)]:void 0;return e("calcite-shell",{class:`${n} ${a} border-bottom`},this._isMobile?void 0:e("calcite-action-bar",{class:"border-sides",expandDisabled:!0,layout:p,slot:g},e("calcite-action",{class:"toggle-node",icon:d,id:c,onClick:()=>this._toggleLayout(),text:""}),e("calcite-tooltip",{label:r,placement:"bottom","reference-element":c},e("span",null,r))),e("div",{class:"width-full height-full position-relative"},e("layer-table",{defaultGlobalId:u?f:void 0,defaultLayerId:u?this.defaultLayer:"",defaultOid:u&&!f?b:void 0,enableAutoRefresh:this.enableAutoRefresh,enableCSV:this.enableCSV,enableColumnReorder:this.enableColumnReorder,enableInlineEdit:this.enableInlineEdit,enableShare:this.enableShare,isMobile:this._isMobile,mapInfo:this._mapInfo,mapView:null==this?void 0:this._mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,ref:i=>this._layerTable=i,shareIncludeEmbed:this.shareIncludeEmbed,shareIncludeSocial:this.shareIncludeSocial,showNewestFirst:this.showNewestFirst,zoomAndScrollToSelected:this.zoomAndScrollToSelected,zoomToScale:this.zoomToScale})))}_onResize(){const i=this.el.offsetWidth<1024,t=!this._isMobile&&i;this._isMobile=i,this._layoutMode=this._isMobile?l.HORIZONTAL:l.GRID,t&&(this._panelOpen=!0)}_toggleLayout(){this._panelOpen=!this._panelOpen}showHideMapPopupAndTable(i){this._expandPopup=!1,this._hideTable=i,this._hideFooter=i}_getMapInfo(i){let t;return this.mapInfos.some((e=>{if(e.id===i)return t=e,!0})),Object.assign({},t)}async _setMapView(){var i;this._mapInfo=this._getMapInfo(this._mapChange.id),this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView.popupEnabled=!1;const t=!this.defaultCenter||this._defaultCenterHonored||null===(i=this.defaultCenter)||void 0===i?void 0:i.split(";").map((i=>parseFloat(i))),e=!this.defaultLevel||this._defaultLevelHonored?void 0:parseInt(this.defaultLevel,10);t&&e&&(await this._mapView.goTo({center:t,zoom:e}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView.ui.remove("zoom")}async _getTranslations(){const i=await h(this.el);this._translations=i[0]}get el(){return o(this)}static get watchers(){return{enableZoom:["enableZoomWatchHandler"],hideMapOnLoad:["hideMapOnLoadWatchHandler"],mapInfos:["mapInfosWatchHandler"]}}};n.style=":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}.position-absolute-50{position:absolute;top:50px;bottom:0px;left:0px;right:0px}.position-absolute-0{position:absolute;top:0px;bottom:0px;left:0px;right:0px}.visibility-hidden{visibility:hidden;height:0px}.position-fixed{position:fixed}.border-width-0{border-width:0px}.border-bottom-width-0{border-bottom-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;right:0;margin:100px 0px}.floating-container .floating-button{box-shadow:0 10px 25px rgb(92 93 94 / 60%);transform:translatey(5px);transition:all 0.3s}";export{n as crowdsource_manager}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{a as t,g as r}from"./p-82e085d0.js";import{_ as i}from"./p-37fc92db.js";import"./p-6d753a3d.js";import"./p-896c9644.js";import"./p-583e5dd0.js";import"./p-c1cf3ebc.js";import"./p-334e6394.js";import"./p-a230b270.js";import"./p-530b73ce.js";var e=function(t){return t&&t.Math==Math&&t},n=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")(),s={},a=function(t){try{return!!t()}catch(t){return!0}},o=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=Function.prototype.call,c=h?u.bind(u):function(){return u.apply(u,arguments)},f={},l={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,d=v&&!l.call({1:2},1);f.f=d?function(t){var r=v(this,t);return!!r&&r.enumerable}:l;var p,y,g=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},m=h,b=Function.prototype,w=b.call,x=m&&b.bind.bind(w,w),M=m?x:function(t){return function(){return w.apply(t,arguments)}},k=M,S=k({}.toString),N=k("".slice),j=function(t){return N(S(t),8,-1)},P=a,O=j,E=Object,T=M("".split),C=P((function(){return!E("z").propertyIsEnumerable(0)}))?function(t){return"String"==O(t)?T(t,""):E(t)}:E,A=function(t){return null==t},R=A,B=TypeError,L=function(t){if(R(t))throw B("Can't call method on "+t);return t},$=C,I=L,D=function(t){return $(I(t))},F="object"==typeof document&&document.all,z={all:F,IS_HTMLDDA:void 0===F&&void 0!==F},_=z.all,Y=z.IS_HTMLDDA?function(t){return"function"==typeof t||t===_}:function(t){return"function"==typeof t},X=Y,q=z.all,G=z.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:X(t)||t===q}:function(t){return"object"==typeof t?null!==t:X(t)},U=n,V=Y,H=function(t,r){return arguments.length<2?V(i=U[t])?i:void 0:U[t]&&U[t][r];var i},W=M({}.isPrototypeOf),Q="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Z=Q,K=n.process,J=n.Deno,tt=K&&K.versions||J&&J.version,rt=tt&&tt.v8;rt&&(y=(p=rt.split("."))[0]>0&&p[0]<4?1:+(p[0]+p[1])),!y&&Z&&(!(p=Z.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=Z.match(/Chrome\/(\d+)/))&&(y=+p[1]);var it=y,et=it,nt=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&et&&et<41})),st=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,at=H,ot=Y,ht=W,ut=Object,ct=st?function(t){return"symbol"==typeof t}:function(t){var r=at("Symbol");return ot(r)&&ht(r.prototype,ut(t))},ft=String,lt=function(t){try{return ft(t)}catch(t){return"Object"}},vt=Y,dt=lt,pt=TypeError,yt=function(t){if(vt(t))return t;throw pt(dt(t)+" is not a function")},gt=yt,mt=A,bt=function(t,r){var i=t[r];return mt(i)?void 0:gt(i)},wt=c,xt=Y,Mt=G,kt=TypeError,St={exports:{}},Nt=n,jt=Object.defineProperty,Pt=function(t,r){try{jt(Nt,t,{value:r,configurable:!0,writable:!0})}catch(i){Nt[t]=r}return r},Ot="__core-js_shared__",Et=n[Ot]||Pt(Ot,{}),Tt=Et;(St.exports=function(t,r){return Tt[t]||(Tt[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.27.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Ct=L,At=Object,Rt=function(t){return At(Ct(t))},Bt=Rt,Lt=M({}.hasOwnProperty),$t=Object.hasOwn||function(t,r){return Lt(Bt(t),r)},It=M,Dt=0,Ft=Math.random(),zt=It(1..toString),_t=function(t){return"Symbol("+(void 0===t?"":t)+")_"+zt(++Dt+Ft,36)},Yt=$t,Xt=_t,qt=nt,Gt=st,Ut=n.Symbol,Vt=(0,St.exports)("wks"),Ht=Gt?Ut.for||Ut:Ut&&Ut.withoutSetter||Xt,Wt=function(t){return Yt(Vt,t)||(Vt[t]=qt&&Yt(Ut,t)?Ut[t]:Ht("Symbol."+t)),Vt[t]},Qt=c,Zt=G,Kt=ct,Jt=bt,tr=TypeError,rr=Wt("toPrimitive"),ir=function(t,r){if(!Zt(t)||Kt(t))return t;var i,e=Jt(t,rr);if(e){if(void 0===r&&(r="default"),i=Qt(e,t,r),!Zt(i)||Kt(i))return i;throw tr("Can't convert object to primitive value")}return void 0===r&&(r="number"),function(t,r){var i,e;if("string"===r&&xt(i=t.toString)&&!Mt(e=wt(i,t)))return e;if(xt(i=t.valueOf)&&!Mt(e=wt(i,t)))return e;if("string"!==r&&xt(i=t.toString)&&!Mt(e=wt(i,t)))return e;throw kt("Can't convert object to primitive value")}(t,r)},er=ct,nr=function(t){var r=ir(t,"string");return er(r)?r:r+""},sr=G,ar=n.document,or=sr(ar)&&sr(ar.createElement),hr=function(t){return or?ar.createElement(t):{}},ur=hr,cr=!o&&!a((function(){return 7!=Object.defineProperty(ur("div"),"a",{get:function(){return 7}}).a})),fr=c,lr=f,vr=g,dr=D,pr=nr,yr=$t,gr=cr,mr=Object.getOwnPropertyDescriptor;s.f=o?mr:function(t,r){if(t=dr(t),r=pr(r),gr)try{return mr(t,r)}catch(t){}if(yr(t,r))return vr(!fr(lr.f,t,r),t[r])};var br={},wr=o&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),xr=G,Mr=String,kr=TypeError,Sr=function(t){if(xr(t))return t;throw kr(Mr(t)+" is not an object")},Nr=cr,jr=Sr,Pr=nr,Or=TypeError,Er=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Cr="enumerable",Ar="configurable",Rr="writable";br.f=o?wr?function(t,r,i){if(jr(t),r=Pr(r),jr(i),"function"==typeof t&&"prototype"===r&&"value"in i&&Rr in i&&!i[Rr]){var e=Tr(t,r);e&&e[Rr]&&(t[r]=i.value,i={configurable:Ar in i?i[Ar]:e[Ar],enumerable:Cr in i?i[Cr]:e[Cr],writable:!1})}return Er(t,r,i)}:Er:function(t,r,i){if(jr(t),r=Pr(r),jr(i),Nr)try{return Er(t,r,i)}catch(t){}if("get"in i||"set"in i)throw Or("Accessors not supported");return"value"in i&&(t[r]=i.value),t};var Br=br,Lr=g,$r=o?function(t,r,i){return Br.f(t,r,Lr(1,i))}:function(t,r,i){return t[r]=i,t},Ir={exports:{}},Dr=o,Fr=Function.prototype,zr=Dr&&Object.getOwnPropertyDescriptor,_r=$t(Fr,"name"),Yr={EXISTS:_r,PROPER:_r&&"something"===function(){}.name,CONFIGURABLE:_r&&(!Dr||Dr&&zr(Fr,"name").configurable)},Xr=Y,qr=Et,Gr=M(Function.toString);Xr(qr.inspectSource)||(qr.inspectSource=function(t){return Gr(t)});var Ur,Vr,Hr,Wr=qr.inspectSource,Qr=n.WeakMap,Zr=Y(Qr)&&/native code/.test(String(Qr)),Kr=_t,Jr=(0,St.exports)("keys"),ti=function(t){return Jr[t]||(Jr[t]=Kr(t))},ri={},ii=G,ei=$r,ni=$t,si=ti,ai=ri,oi="Object already initialized",hi=n.TypeError;if(Zr||Et.state){var ui=Et.state||(Et.state=new(0,n.WeakMap));ui.get=ui.get,ui.has=ui.has,ui.set=ui.set,Ur=function(t,r){if(ui.has(t))throw hi(oi);return r.facade=t,ui.set(t,r),r},Vr=function(t){return ui.get(t)||{}},Hr=function(t){return ui.has(t)}}else{var ci=si("state");ai[ci]=!0,Ur=function(t,r){if(ni(t,ci))throw hi(oi);return r.facade=t,ei(t,ci,r),r},Vr=function(t){return ni(t,ci)?t[ci]:{}},Hr=function(t){return ni(t,ci)}}var fi={set:Ur,get:Vr,has:Hr,enforce:function(t){return Hr(t)?Vr(t):Ur(t,{})},getterFor:function(t){return function(r){var i;if(!ii(r)||(i=Vr(r)).type!==t)throw hi("Incompatible receiver, "+t+" required");return i}}},li=M,vi=a,di=Y,pi=$t,yi=o,gi=Yr.CONFIGURABLE,mi=Wr,bi=fi.enforce,wi=fi.get,xi=String,Mi=Object.defineProperty,ki=li("".slice),Si=li("".replace),Ni=li([].join),ji=yi&&!vi((function(){return 8!==Mi((function(){}),"length",{value:8}).length})),Pi=String(String).split("String"),Oi=Ir.exports=function(t,r,i){"Symbol("===ki(xi(r),0,7)&&(r="["+Si(xi(r),/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(r="get "+r),i&&i.setter&&(r="set "+r),(!pi(t,"name")||gi&&t.name!==r)&&(yi?Mi(t,"name",{value:r,configurable:!0}):t.name=r),ji&&i&&pi(i,"arity")&&t.length!==i.arity&&Mi(t,"length",{value:i.arity});try{i&&pi(i,"constructor")&&i.constructor?yi&&Mi(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var e=bi(t);return pi(e,"source")||(e.source=Ni(Pi,"string"==typeof r?r:"")),t};Function.prototype.toString=Oi((function(){return di(this)&&wi(this).source||mi(this)}),"toString");var Ei=Y,Ti=br,Ci=Ir.exports,Ai=Pt,Ri=function(t,r,i,e){e||(e={});var n=e.enumerable,s=void 0!==e.name?e.name:r;if(Ei(i)&&Ci(i,s,e),e.global)n?t[r]=i:Ai(r,i);else{try{e.unsafe?t[r]&&(n=!0):delete t[r]}catch(t){}n?t[r]=i:Ti.f(t,r,{value:i,enumerable:!1,configurable:!e.nonConfigurable,writable:!e.nonWritable})}return t},Bi={},Li=Math.ceil,$i=Math.floor,Ii=Math.trunc||function(t){var r=+t;return(r>0?$i:Li)(r)},Di=Ii,Fi=function(t){var r=+t;return r!=r||0===r?0:Di(r)},zi=Fi,_i=Math.max,Yi=Math.min,Xi=function(t,r){var i=zi(t);return i<0?_i(i+r,0):Yi(i,r)},qi=Fi,Gi=Math.min,Ui=function(t){return t>0?Gi(qi(t),9007199254740991):0},Vi=Ui,Hi=function(t){return Vi(t.length)},Wi=D,Qi=Xi,Zi=Hi,Ki=function(t){return function(r,i,e){var n,s=Wi(r),a=Zi(s),o=Qi(e,a);if(t&&i!=i){for(;a>o;)if((n=s[o++])!=n)return!0}else for(;a>o;o++)if((t||o in s)&&s[o]===i)return t||o||0;return!t&&-1}},Ji={includes:Ki(!0),indexOf:Ki(!1)},te=$t,re=D,ie=Ji.indexOf,ee=ri,ne=M([].push),se=function(t,r){var i,e=re(t),n=0,s=[];for(i in e)!te(ee,i)&&te(e,i)&&ne(s,i);for(;r.length>n;)te(e,i=r[n++])&&(~ie(s,i)||ne(s,i));return s},ae=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],oe=se,he=ae.concat("length","prototype");Bi.f=Object.getOwnPropertyNames||function(t){return oe(t,he)};var ue={};ue.f=Object.getOwnPropertySymbols;var ce=H,fe=Bi,le=ue,ve=Sr,de=M([].concat),pe=ce("Reflect","ownKeys")||function(t){var r=fe.f(ve(t)),i=le.f;return i?de(r,i(t)):r},ye=$t,ge=pe,me=s,be=br,we=a,xe=Y,Me=/#|\.prototype\./,ke=function(t,r){var i=Ne[Se(t)];return i==Pe||i!=je&&(xe(r)?we(r):!!r)},Se=ke.normalize=function(t){return String(t).replace(Me,".").toLowerCase()},Ne=ke.data={},je=ke.NATIVE="N",Pe=ke.POLYFILL="P",Oe=ke,Ee=n,Te=s.f,Ce=$r,Ae=Ri,Re=Pt,Be=function(t,r,i){for(var e=ge(r),n=be.f,s=me.f,a=0;a<e.length;a++){var o=e[a];ye(t,o)||i&&ye(i,o)||n(t,o,s(r,o))}},Le=Oe,$e=function(t,r){var i,e,n,s,a,o=t.target,h=t.global,u=t.stat;if(i=h?Ee:u?Ee[o]||Re(o,{}):(Ee[o]||{}).prototype)for(e in r){if(s=r[e],n=t.dontCallGetSet?(a=Te(i,e))&&a.value:i[e],!Le(h?e:o+(u?".":"#")+e,t.forced)&&void 0!==n){if(typeof s==typeof n)continue;Be(s,n)}(t.sham||n&&n.sham)&&Ce(s,"sham",!0),Ae(i,e,s,t)}},Ie="undefined"!=typeof process&&"process"==j(process),De=Y,Fe=String,ze=TypeError,_e=M,Ye=Sr,Xe=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=_e(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]),r=i instanceof Array}catch(t){}return function(i,e){return Ye(i),function(t){if("object"==typeof t||De(t))return t;throw ze("Can't set "+Fe(t)+" as a prototype")}(e),r?t(i,e):i.__proto__=e,i}}():void 0),qe=br.f,Ge=$t,Ue=Wt("toStringTag"),Ve=function(t,r,i){t&&!i&&(t=t.prototype),t&&!Ge(t,Ue)&&qe(t,Ue,{configurable:!0,value:r})},He=H,We=br,Qe=o,Ze=Wt("species"),Ke=W,Je=TypeError,tn={};tn[Wt("toStringTag")]="z";var rn="[object z]"===String(tn),en=Y,nn=j,sn=Wt("toStringTag"),an=Object,on="Arguments"==nn(function(){return arguments}()),hn=rn?nn:function(t){var r,i,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=an(t),sn))?i:on?nn(r):"Object"==(e=nn(r))&&en(r.callee)?"Arguments":e},un=M,cn=a,fn=Y,ln=hn,vn=Wr,dn=function(){},pn=[],yn=H("Reflect","construct"),gn=/^\s*(?:class|function)\b/,mn=un(gn.exec),bn=!gn.exec(dn),wn=function(t){if(!fn(t))return!1;try{return yn(dn,pn,t),!0}catch(t){return!1}},xn=function(t){if(!fn(t))return!1;switch(ln(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return bn||!!mn(gn,vn(t))}catch(t){return!0}};xn.sham=!0;var Mn,kn,Sn,Nn,jn=!yn||cn((function(){var t;return wn(wn.call)||!wn(Object)||!wn((function(){t=!0}))||t}))?xn:wn,Pn=jn,On=lt,En=TypeError,Tn=Sr,Cn=A,An=Wt("species"),Rn=function(t,r){var i,e=Tn(t).constructor;return void 0===e||Cn(i=Tn(e)[An])?r:function(t){if(Pn(t))return t;throw En(On(t)+" is not a constructor")}(i)},Bn=Function.prototype,Ln=Bn.apply,$n=Bn.call,In="object"==typeof Reflect&&Reflect.apply||(h?$n.bind(Ln):function(){return $n.apply(Ln,arguments)}),Dn=j,Fn=M,zn=function(t){if("Function"===Dn(t))return Fn(t)},_n=yt,Yn=h,Xn=zn(zn.bind),qn=function(t,r){return _n(t),void 0===r?t:Yn?Xn(t,r):function(){return t.apply(r,arguments)}},Gn=H("document","documentElement"),Un=M([].slice),Vn=TypeError,Hn=/(?:ipad|iphone|ipod).*applewebkit/i.test(Q),Wn=n,Qn=In,Zn=qn,Kn=Y,Jn=$t,ts=a,rs=Gn,is=Un,es=hr,ns=Hn,ss=Ie,as=Wn.setImmediate,os=Wn.clearImmediate,hs=Wn.process,us=Wn.Dispatch,cs=Wn.Function,fs=Wn.MessageChannel,ls=Wn.String,vs=0,ds={},ps="onreadystatechange";ts((function(){Mn=Wn.location}));var ys=function(t){if(Jn(ds,t)){var r=ds[t];delete ds[t],r()}},gs=function(t){return function(){ys(t)}},ms=function(t){ys(t.data)},bs=function(t){Wn.postMessage(ls(t),Mn.protocol+"//"+Mn.host)};as&&os||(as=function(t){!function(t,r){if(t<r)throw Vn("Not enough arguments")}(arguments.length,1);var r=Kn(t)?t:cs(t),i=is(arguments,1);return ds[++vs]=function(){Qn(r,void 0,i)},kn(vs),vs},os=function(t){delete ds[t]},ss?kn=function(t){hs.nextTick(gs(t))}:us&&us.now?kn=function(t){us.now(gs(t))}:fs&&!ns?(Nn=(Sn=new fs).port2,Sn.port1.onmessage=ms,kn=Zn(Nn.postMessage,Nn)):Wn.addEventListener&&Kn(Wn.postMessage)&&!Wn.importScripts&&Mn&&"file:"!==Mn.protocol&&!ts(bs)?(kn=bs,Wn.addEventListener("message",ms,!1)):kn=ps in es("script")?function(t){rs.appendChild(es("script"))[ps]=function(){rs.removeChild(this),ys(t)}}:function(t){setTimeout(gs(t),0)});var ws={set:as,clear:os},xs=function(){this.head=null,this.tail=null};xs.prototype={add:function(t){var r={item:t,next:null},i=this.tail;i?i.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Ms,ks,Ss,Ns,js,Ps=xs,Os=/ipad|iphone|ipod/i.test(Q)&&"undefined"!=typeof Pebble,Es=/web0s(?!.*chrome)/i.test(Q),Ts=n,Cs=qn,As=ws.set,Rs=Ps,Bs=Hn,Ls=Os,$s=Es,Is=Ie,Ds=Ts.MutationObserver||Ts.WebKitMutationObserver,Fs=Ts.document,zs=Ts.process,_s=Ts.Promise,Ys=(0,s.f)(Ts,"queueMicrotask"),Xs=Ys&&Ys.value;if(!Xs){var qs=new Rs,Gs=function(){var t,r;for(Is&&(t=zs.domain)&&t.exit();r=qs.get();)try{r()}catch(t){throw qs.head&&Ms(),t}t&&t.enter()};Bs||Is||$s||!Ds||!Fs?!Ls&&_s&&_s.resolve?((Ns=_s.resolve(void 0)).constructor=_s,js=Cs(Ns.then,Ns),Ms=function(){js(Gs)}):Is?Ms=function(){zs.nextTick(Gs)}:(As=Cs(As,Ts),Ms=function(){As(Gs)}):(ks=!0,Ss=Fs.createTextNode(""),new Ds(Gs).observe(Ss,{characterData:!0}),Ms=function(){Ss.data=ks=!ks}),Xs=function(t){qs.head||Ms(),qs.add(t)}}var Us=Xs,Vs=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Hs=n.Promise,Ws="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Qs=!Ws&&!Ie&&"object"==typeof window&&"object"==typeof document,Zs=n,Ks=Hs,Js=Y,ta=Oe,ra=Wr,ia=Qs,ea=Ws,na=it,sa=Wt("species"),aa=!1,oa=Js(Zs.PromiseRejectionEvent),ha=ta("Promise",(function(){var t=ra(Ks),r=t!==String(Ks);if(!r&&66===na)return!0;if(!na||na<51||!/native code/.test(t)){var i=new Ks((function(t){t(1)})),e=function(t){t((function(){}),(function(){}))};if((i.constructor={})[sa]=e,!(aa=i.then((function(){}))instanceof e))return!0}return!r&&(ia||ea)&&!oa})),ua={CONSTRUCTOR:ha,REJECTION_EVENT:oa,SUBCLASSING:aa},ca={},fa=yt,la=TypeError,va=function(t){var r,i;this.promise=new t((function(t,e){if(void 0!==r||void 0!==i)throw la("Bad Promise constructor");r=t,i=e})),this.resolve=fa(r),this.reject=fa(i)};ca.f=function(t){return new va(t)};var da,pa,ya,ga,ma=$e,ba=Ie,wa=n,xa=c,Ma=Ri,ka=Xe,Sa=Ve,Na=yt,ja=Y,Pa=G,Oa=Rn,Ea=ws.set,Ta=Us,Ca=Vs,Aa=Ps,Ra=fi,Ba=Hs,La=ca,$a="Promise",Ia=ua.CONSTRUCTOR,Da=ua.REJECTION_EVENT,Fa=ua.SUBCLASSING,za=Ra.getterFor($a),_a=Ra.set,Ya=Ba&&Ba.prototype,Xa=Ba,qa=Ya,Ga=wa.TypeError,Ua=wa.document,Va=wa.process,Ha=La.f,Wa=Ha,Qa=!!(Ua&&Ua.createEvent&&wa.dispatchEvent),Za="unhandledrejection",Ka=function(t){var r;return!(!Pa(t)||!ja(r=t.then))&&r},Ja=function(t,r){var i,e,n,s=r.value,a=1==r.state,o=a?t.ok:t.fail,h=t.resolve,u=t.reject,c=t.domain;try{o?(a||(2===r.rejection&&no(r),r.rejection=1),!0===o?i=s:(c&&c.enter(),i=o(s),c&&(c.exit(),n=!0)),i===t.promise?u(Ga("Promise-chain cycle")):(e=Ka(i))?xa(e,i,h,u):h(i)):u(s)}catch(t){c&&!n&&c.exit(),u(t)}},to=function(t,r){t.notified||(t.notified=!0,Ta((function(){for(var i,e=t.reactions;i=e.get();)Ja(i,t);t.notified=!1,r&&!t.rejection&&io(t)})))},ro=function(t,r,i){var e,n;Qa?((e=Ua.createEvent("Event")).promise=r,e.reason=i,e.initEvent(t,!1,!0),wa.dispatchEvent(e)):e={promise:r,reason:i},!Da&&(n=wa["on"+t])?n(e):t===Za&&function(t,r){try{1==arguments.length?console.error(t):console.error(t,r)}catch(t){}}("Unhandled promise rejection",i)},io=function(t){xa(Ea,wa,(function(){var r,i=t.facade,e=t.value;if(eo(t)&&(r=Ca((function(){ba?Va.emit("unhandledRejection",e,i):ro(Za,i,e)})),t.rejection=ba||eo(t)?2:1,r.error))throw r.value}))},eo=function(t){return 1!==t.rejection&&!t.parent},no=function(t){xa(Ea,wa,(function(){var r=t.facade;ba?Va.emit("rejectionHandled",r):ro("rejectionhandled",r,t.value)}))},so=function(t,r,i){return function(e){t(r,e,i)}},ao=function(t,r,i){t.done||(t.done=!0,i&&(t=i),t.value=r,t.state=2,to(t,!0))},oo=function(t,r,i){if(!t.done){t.done=!0,i&&(t=i);try{if(t.facade===r)throw Ga("Promise can't be resolved itself");var e=Ka(r);e?Ta((function(){var i={done:!1};try{xa(e,r,so(oo,i,t),so(ao,i,t))}catch(r){ao(i,r,t)}})):(t.value=r,t.state=1,to(t,!1))}catch(r){ao({done:!1},r,t)}}};if(Ia&&(Xa=function(t){(function(t,r){if(Ke(r,t))return t;throw Je("Incorrect invocation")})(this,qa),Na(t),xa(da,this);var r=za(this);try{t(so(oo,r),so(ao,r))}catch(t){ao(r,t)}},(da=function(){_a(this,{type:$a,done:!1,notified:!1,parent:!1,reactions:new Aa,rejection:!1,state:0,value:void 0})}).prototype=Ma(qa=Xa.prototype,"then",(function(t,r){var i=za(this),e=Ha(Oa(this,Xa));return i.parent=!0,e.ok=!ja(t)||t,e.fail=ja(r)&&r,e.domain=ba?Va.domain:void 0,0==i.state?i.reactions.add(e):Ta((function(){Ja(e,i)})),e.promise})),pa=function(){var t=new da,r=za(t);this.promise=t,this.resolve=so(oo,r),this.reject=so(ao,r)},La.f=Ha=function(t){return t===Xa||void 0===t?new pa(t):Wa(t)},ja(Ba)&&Ya!==Object.prototype)){ya=Ya.then,Fa||Ma(Ya,"then",(function(t,r){var i=this;return new Xa((function(t,r){xa(ya,i,t,r)})).then(t,r)}),{unsafe:!0});try{delete Ya.constructor}catch(t){}ka&&ka(Ya,qa)}ma({global:!0,constructor:!0,wrap:!0,forced:Ia},{Promise:Xa}),Sa(Xa,$a,!1),ga=He($a),Qe&&ga&&!ga[Ze]&&(0,We.f)(ga,Ze,{configurable:!0,get:function(){return this}});var ho={},uo=ho,co=Wt("iterator"),fo=Array.prototype,lo=hn,vo=bt,po=A,yo=ho,go=Wt("iterator"),mo=function(t){if(!po(t))return vo(t,go)||vo(t,"@@iterator")||yo[lo(t)]},bo=c,wo=yt,xo=Sr,Mo=lt,ko=mo,So=TypeError,No=c,jo=Sr,Po=bt,Oo=qn,Eo=c,To=Sr,Co=lt,Ao=Hi,Ro=W,Bo=mo,Lo=function(t,r,i){var e,n;jo(t);try{if(!(e=Po(t,"return"))){if("throw"===r)throw i;return i}e=No(e,t)}catch(t){n=!0,e=t}if("throw"===r)throw i;if(n)throw e;return jo(e),i},$o=TypeError,Io=function(t,r){this.stopped=t,this.result=r},Do=Io.prototype,Fo=function(t,r,i){var e,n,s,a,o,h,u,c,f=!(!i||!i.AS_ENTRIES),l=!(!i||!i.IS_RECORD),v=!(!i||!i.IS_ITERATOR),d=!(!i||!i.INTERRUPTED),p=Oo(r,i&&i.that),y=function(t){return e&&Lo(e,"normal",t),new Io(!0,t)},g=function(t){return f?(To(t),d?p(t[0],t[1],y):p(t[0],t[1])):d?p(t,y):p(t)};if(l)e=t.iterator;else if(v)e=t;else{if(!(n=Bo(t)))throw $o(Co(t)+" is not iterable");if(void 0!==(c=n)&&(uo.Array===c||fo[co]===c)){for(s=0,a=Ao(t);a>s;s++)if((o=g(t[s]))&&Ro(Do,o))return o;return new Io(!1)}e=function(t,r){var i=arguments.length<2?ko(t):r;if(wo(i))return xo(bo(i,t));throw So(Mo(t)+" is not iterable")}(t,n)}for(h=l?t.next:e.next;!(u=Eo(h,e)).done;){try{o=g(u.value)}catch(t){Lo(e,"throw",t)}if("object"==typeof o&&o&&Ro(Do,o))return o}return new Io(!1)},zo=Wt("iterator"),_o=!1;try{var Yo=0,Xo={next:function(){return{done:!!Yo++}},return:function(){_o=!0}};Xo[zo]=function(){return this},Array.from(Xo,(function(){throw 2}))}catch(t){}var qo=Hs,Go=ua.CONSTRUCTOR||!function(t,r){if(!r&&!_o)return!1;var i=!1;try{var e={};e[zo]=function(){return{next:function(){return{done:i=!0}}}},t(e)}catch(t){}return i}((function(t){qo.all(t).then(void 0,(function(){}))})),Uo=c,Vo=yt,Ho=ca,Wo=Vs,Qo=Fo;$e({target:"Promise",stat:!0,forced:Go},{all:function(t){var r=this,i=Ho.f(r),e=i.resolve,n=i.reject,s=Wo((function(){var i=Vo(r.resolve),s=[],a=0,o=1;Qo(t,(function(t){var h=a++,u=!1;o++,Uo(i,r,t).then((function(t){u||(u=!0,s[h]=t,--o||e(s))}),n)})),--o||e(s)}));return s.error&&n(s.value),i.promise}});var Zo=Hs,Ko=H,Jo=Y,th=Ri,rh=Zo&&Zo.prototype;if($e({target:"Promise",proto:!0,forced:ua.CONSTRUCTOR,real:!0},{catch:function(t){return this.then(void 0,t)}}),Jo(Zo)){var ih=Ko("Promise").prototype.catch;rh.catch!==ih&&th(rh,"catch",ih,{unsafe:!0})}var eh=c,nh=yt,sh=ca,ah=Vs,oh=Fo;$e({target:"Promise",stat:!0,forced:Go},{race:function(t){var r=this,i=sh.f(r),e=i.reject,n=ah((function(){var n=nh(r.resolve);oh(t,(function(t){eh(n,r,t).then(i.resolve,e)}))}));return n.error&&e(n.value),i.promise}});var hh=c,uh=ca;$e({target:"Promise",stat:!0,forced:ua.CONSTRUCTOR},{reject:function(t){var r=uh.f(this);return hh(r.reject,void 0,t),r.promise}});var ch=Sr,fh=G,lh=ca;$e({target:"Promise",stat:!0,forced:ua.CONSTRUCTOR},{resolve:function(t){return function(t,r){if(ch(t),fh(r)&&r.constructor===t)return r;var i=lh.f(t);return(0,i.resolve)(r),i.promise}(this,t)}});var vh={exports:{}};!function(t){function r(t,r,i,e,n,s,a){try{var o=t[s](a),h=o.value}catch(t){return void i(t)}o.done?r(h):Promise.resolve(h).then(e,n)}t.exports=function(t){return function(){var i=this,e=arguments;return new Promise((function(n,s){var a=t.apply(i,e);function o(t){r(a,n,s,o,h,"next",t)}function h(t){r(a,n,s,o,h,"throw",t)}o(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports}(vh);const dh=r(vh.exports);var ph=hn,yh=String,gh=function(t){if("Symbol"===ph(t))throw TypeError("Cannot convert a Symbol value to a string");return yh(t)},mh=Sr,bh=function(){var t=mh(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},wh=a,xh=n.RegExp,Mh=wh((function(){var t=xh("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),kh=Mh||wh((function(){return!xh("a","y").sticky})),Sh={BROKEN_CARET:Mh||wh((function(){var t=xh("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:kh,UNSUPPORTED_Y:Mh},Nh={},jh=se,Ph=ae,Oh=Object.keys||function(t){return jh(t,Ph)},Eh=br,Th=Sr,Ch=D,Ah=Oh;Nh.f=o&&!wr?Object.defineProperties:function(t,r){Th(t);for(var i,e=Ch(r),n=Ah(r),s=n.length,a=0;s>a;)Eh.f(t,i=n[a++],e[i]);return t};var Rh,Bh=Sr,Lh=Nh,$h=ae,Ih=ri,Dh=Gn,Fh=hr,zh="prototype",_h="script",Yh=ti("IE_PROTO"),Xh=function(){},qh=function(t){return"<"+_h+">"+t+"</"+_h+">"},Gh=function(t){t.write(qh("")),t.close();var r=t.parentWindow.Object;return t=null,r},Uh=function(){try{Rh=new ActiveXObject("htmlfile")}catch(t){}var t,r,i;Uh="undefined"!=typeof document?document.domain&&Rh?Gh(Rh):(r=Fh("iframe"),i="java"+_h+":",r.style.display="none",Dh.appendChild(r),r.src=String(i),(t=r.contentWindow.document).open(),t.write(qh("document.F=Object")),t.close(),t.F):Gh(Rh);for(var e=$h.length;e--;)delete Uh[zh][$h[e]];return Uh()};Ih[Yh]=!0;var Vh,Hh,Wh=Object.create||function(t,r){var i;return null!==t?(Xh[zh]=Bh(t),i=new Xh,Xh[zh]=null,i[Yh]=t):i=Uh(),void 0===r?i:Lh.f(i,r)},Qh=n.RegExp,Zh=a((function(){var t=Qh(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),Kh=n.RegExp,Jh=a((function(){var t=Kh("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),tu=c,ru=M,iu=gh,eu=bh,nu=Sh,su=Wh,au=fi.get,ou=Zh,hu=Jh,uu=(0,St.exports)("native-string-replace",String.prototype.replace),cu=RegExp.prototype.exec,fu=cu,lu=ru("".charAt),vu=ru("".indexOf),du=ru("".replace),pu=ru("".slice),yu=(Hh=/b*/g,tu(cu,Vh=/a/,"a"),tu(cu,Hh,"a"),0!==Vh.lastIndex||0!==Hh.lastIndex),gu=nu.BROKEN_CARET,mu=void 0!==/()??/.exec("")[1];(yu||mu||gu||ou||hu)&&(fu=function(t){var r,i,e,n,s,a,o,h=this,u=au(h),c=iu(t),f=u.raw;if(f)return f.lastIndex=h.lastIndex,r=tu(fu,f,c),h.lastIndex=f.lastIndex,r;var l=u.groups,v=gu&&h.sticky,d=tu(eu,h),p=h.source,y=0,g=c;if(v&&(d=du(d,"y",""),-1===vu(d,"g")&&(d+="g"),g=pu(c,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==lu(c,h.lastIndex-1))&&(p="(?: "+p+")",g=" "+g,y++),i=new RegExp("^(?:"+p+")",d)),mu&&(i=new RegExp("^"+p+"$(?!\\s)",d)),yu&&(e=h.lastIndex),n=tu(cu,v?i:h,g),v?n?(n.input=pu(n.input,y),n[0]=pu(n[0],y),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:yu&&n&&(h.lastIndex=h.global?n.index+n[0].length:e),mu&&n&&n.length>1&&tu(uu,n[0],i,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(n[s]=void 0)})),n&&l)for(n.groups=a=su(null),s=0;s<l.length;s++)a[(o=l[s])[0]]=n[o[1]];return n});var bu=fu;$e({target:"RegExp",proto:!0,forced:/./.exec!==bu},{exec:bu});var wu=zn,xu=Ri,Mu=bu,ku=a,Su=Wt,Nu=$r,ju=Su("species"),Pu=RegExp.prototype,Ou=function(t,r,i,e){var n=Su(t),s=!ku((function(){var r={};return r[n]=function(){return 7},7!=""[t](r)})),a=s&&!ku((function(){var r=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[ju]=function(){return i},i.flags="",i[n]=/./[n]),i.exec=function(){return r=!0,null},i[n](""),!r}));if(!s||!a||i){var o=wu(/./[n]),h=r(n,""[t],(function(t,r,i,e,n){var a=wu(t),h=r.exec;return h===Mu||h===Pu.exec?s&&!n?{done:!0,value:o(r,i,e)}:{done:!0,value:a(i,r,e)}:{done:!1}}));xu(String.prototype,t,h[0]),xu(Pu,n,h[1])}e&&Nu(Pu[n],"sham",!0)},Eu=M,Tu=Fi,Cu=gh,Au=L,Ru=Eu("".charAt),Bu=Eu("".charCodeAt),Lu=Eu("".slice),$u=function(t){return function(r,i){var e,n,s=Cu(Au(r)),a=Tu(i),o=s.length;return a<0||a>=o?t?"":void 0:(e=Bu(s,a))<55296||e>56319||a+1===o||(n=Bu(s,a+1))<56320||n>57343?t?Ru(s,a):e:t?Lu(s,a,a+2):n-56320+(e-55296<<10)+65536}},Iu=($u(!1),$u(!0)),Du=function(t,r,i){return r+(i?Iu(t,r).length:1)},Fu=c,zu=Sr,_u=Y,Yu=j,Xu=bu,qu=TypeError,Gu=function(t,r){var i=t.exec;if(_u(i)){var e=Fu(i,t,r);return null!==e&&zu(e),e}if("RegExp"===Yu(t))return Fu(Xu,t,r);throw qu("RegExp#exec called on incompatible receiver")},Uu=c,Vu=Sr,Hu=A,Wu=Ui,Qu=gh,Zu=L,Ku=bt,Ju=Du,tc=Gu;Ou("match",(function(t,r,i){return[function(r){var i=Zu(this),e=Hu(r)?void 0:Ku(r,t);return e?Uu(e,r,i):new RegExp(r)[t](Qu(i))},function(t){var e=Vu(this),n=Qu(t),s=i(r,e,n);if(s.done)return s.value;if(!e.global)return tc(e,n);var a=e.unicode;e.lastIndex=0;for(var o,h=[],u=0;null!==(o=tc(e,n));){var c=Qu(o[0]);h[u]=c,""===c&&(e.lastIndex=Ju(n,Wu(e.lastIndex),a)),u++}return 0===u?null:h}]}));var rc=M,ic=Rt,ec=Math.floor,nc=rc("".charAt),sc=rc("".replace),ac=rc("".slice),oc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,hc=/\$([$&'`]|\d{1,2})/g,uc=In,cc=c,fc=M,lc=Ou,vc=a,dc=Sr,pc=Y,yc=A,gc=Fi,mc=Ui,bc=gh,wc=L,xc=Du,Mc=bt,kc=function(t,r,i,e,n,s){var a=i+t.length,o=e.length,h=hc;return void 0!==n&&(n=ic(n),h=oc),sc(s,h,(function(s,h){var u;switch(nc(h,0)){case"$":return"$";case"&":return t;case"`":return ac(r,0,i);case"'":return ac(r,a);case"<":u=n[ac(h,1,-1)];break;default:var c=+h;if(0===c)return s;if(c>o){var f=ec(c/10);return 0===f?s:f<=o?void 0===e[f-1]?nc(h,1):e[f-1]+nc(h,1):s}u=e[c-1]}return void 0===u?"":u}))},Sc=Gu,Nc=Wt("replace"),jc=Math.max,Pc=Math.min,Oc=fc([].concat),Ec=fc([].push),Tc=fc("".indexOf),Cc=fc("".slice),Ac="$0"==="a".replace(/./,"$0"),Rc=!!/./[Nc]&&""===/./[Nc]("a","$0");lc("replace",(function(t,r,i){var e=Rc?"$":"$0";return[function(t,i){var e=wc(this),n=yc(t)?void 0:Mc(t,Nc);return n?cc(n,t,e,i):cc(r,bc(e),t,i)},function(t,n){var s=dc(this),a=bc(t);if("string"==typeof n&&-1===Tc(n,e)&&-1===Tc(n,"$<")){var o=i(r,s,a,n);if(o.done)return o.value}var h=pc(n);h||(n=bc(n));var u=s.global;if(u){var c=s.unicode;s.lastIndex=0}for(var f=[];;){var l=Sc(s,a);if(null===l)break;if(Ec(f,l),!u)break;""===bc(l[0])&&(s.lastIndex=xc(a,mc(s.lastIndex),c))}for(var v,d="",p=0,y=0;y<f.length;y++){for(var g=bc((l=f[y])[0]),m=jc(Pc(gc(l.index),a.length),0),b=[],w=1;w<l.length;w++)Ec(b,void 0===(v=l[w])?v:String(v));var x=l.groups;if(h){var M=Oc([g],b,m,a);void 0!==x&&Ec(M,x);var k=bc(uc(n,void 0,M))}else k=kc(g,a,m,b,x,n);m>=p&&(d+=Cc(a,p,m)+k,p=m+g.length)}return d+Cc(a,p)}]}),!!vc((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Ac||Rc);var Bc,Lc=G,$c=j,Ic=Wt("match"),Dc=function(t){var r;return Lc(t)&&(void 0!==(r=t[Ic])?!!r:"RegExp"==$c(t))},Fc=Dc,zc=TypeError,_c=function(t){if(Fc(t))throw zc("The method doesn't accept regular expressions");return t},Yc=Wt("match"),Xc=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{return r[Yc]=!1,"/./"[t](r)}catch(t){}}return!1},qc=$e,Gc=zn,Uc=s.f,Vc=Ui,Hc=gh,Wc=_c,Qc=L,Zc=Xc,Kc=Gc("".startsWith),Jc=Gc("".slice),tf=Math.min,rf=Zc("startsWith");qc({target:"String",proto:!0,forced:!(!rf&&(Bc=Uc(String.prototype,"startsWith"),Bc&&!Bc.writable)||rf)},{startsWith:function(t){var r=Hc(Qc(this));Wc(t);var i=Vc(tf(arguments.length>1?arguments[1]:void 0,r.length)),e=Hc(t);return Kc?Kc(r,e,i):Jc(r,i,i+e.length)===e}});var ef=Wh,nf=br.f,sf=Wt("unscopables"),af=Array.prototype;null==af[sf]&&nf(af,sf,{configurable:!0,value:ef(null)});var of,hf,uf,cf=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ff=$t,lf=Y,vf=Rt,df=cf,pf=ti("IE_PROTO"),yf=Object,gf=yf.prototype,mf=df?yf.getPrototypeOf:function(t){var r=vf(t);if(ff(r,pf))return r[pf];var i=r.constructor;return lf(i)&&r instanceof i?i.prototype:r instanceof yf?gf:null},bf=a,wf=Y,xf=G,Mf=mf,kf=Ri,Sf=Wt("iterator"),Nf=!1;[].keys&&("next"in(uf=[].keys())?(hf=Mf(Mf(uf)))!==Object.prototype&&(of=hf):Nf=!0);var jf=!xf(of)||bf((function(){var t={};return of[Sf].call(t)!==t}));jf&&(of={}),wf(of[Sf])||kf(of,Sf,(function(){return this}));var Pf={IteratorPrototype:of,BUGGY_SAFARI_ITERATORS:Nf},Of=Pf.IteratorPrototype,Ef=Wh,Tf=g,Cf=Ve,Af=ho,Rf=function(){return this},Bf=$e,Lf=c,$f=Y,If=mf,Df=Xe,Ff=Ve,zf=$r,_f=Ri,Yf=ho,Xf=Yr.PROPER,qf=Yr.CONFIGURABLE,Gf=Pf.IteratorPrototype,Uf=Pf.BUGGY_SAFARI_ITERATORS,Vf=Wt("iterator"),Hf="keys",Wf="values",Qf="entries",Zf=function(){return this},Kf=D,Jf=function(t){af[sf][t]=!0},tl=ho,rl=br.f,il=function(t,r){return{value:t,done:r}},el=o,nl="Array Iterator",sl=fi.set,al=fi.getterFor(nl),ol=function(t,r,i,e,n,s,a){!function(t,r,i,e){var n=r+" Iterator";t.prototype=Ef(Of,{next:Tf(+!e,i)}),Cf(t,n,!1),Af[n]=Rf}(i,r,e);var o,h,u,c=function(t){if(t===n&&p)return p;if(!Uf&&t in v)return v[t];switch(t){case Hf:case Wf:case Qf:return function(){return new i(this,t)}}return function(){return new i(this)}},f=r+" Iterator",l=!1,v=t.prototype,d=v[Vf]||v["@@iterator"]||n&&v[n],p=!Uf&&d||c(n),y="Array"==r&&v.entries||d;if(y&&(o=If(y.call(new t)))!==Object.prototype&&o.next&&(If(o)!==Gf&&(Df?Df(o,Gf):$f(o[Vf])||_f(o,Vf,Zf)),Ff(o,f,!0)),Xf&&n==Wf&&d&&d.name!==Wf&&(qf?zf(v,"name",Wf):(l=!0,p=function(){return Lf(d,this)})),n)if(h={values:c(Wf),keys:s?p:c(Hf),entries:c(Qf)},a)for(u in h)(Uf||l||!(u in v))&&_f(v,u,h[u]);else Bf({target:r,proto:!0,forced:Uf||l},h);return v[Vf]!==p&&_f(v,Vf,p,{name:n}),Yf[r]=p,h}(Array,"Array",(function(t,r){sl(this,{type:nl,target:Kf(t),index:0,kind:r})}),(function(){var t=al(this),r=t.target,i=t.kind,e=t.index++;return!r||e>=r.length?(t.target=void 0,il(void 0,!0)):il("keys"==i?e:"values"==i?r[e]:[e,r[e]],!1)}),"values"),hl=tl.Arguments=tl.Array;if(Jf("keys"),Jf("values"),Jf("entries"),el&&"values"!==hl.name)try{rl(hl,"name",{value:"values"})}catch(t){}var ul=hr("span").classList,cl=ul&&ul.constructor&&ul.constructor.prototype,fl=n,ll={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},vl=cl===Object.prototype?void 0:cl,dl=ol,pl=$r,yl=Wt,gl=yl("iterator"),ml=yl("toStringTag"),bl=dl.values,wl=function(t,r){if(t){if(t[gl]!==bl)try{pl(t,gl,bl)}catch(r){t[gl]=bl}if(t[ml]||pl(t,ml,r),ll[r])for(var i in dl)if(t[i]!==dl[i])try{pl(t,i,dl[i])}catch(r){t[i]=dl[i]}}};for(var xl in ll)wl(fl[xl]&&fl[xl].prototype,xl);wl(vl,"DOMTokenList");var Ml={exports:{}},kl={exports:{}},Sl={exports:{}};!function(t){var r=i.exports.default;t.exports=function(t,i){if("object"!==r(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,i||"default");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports}(Sl),function(t){var r=i.exports.default,e=Sl.exports;t.exports=function(t){var i=e(t,"string");return"symbol"===r(i)?i:String(i)},t.exports.__esModule=!0,t.exports.default=t.exports}(kl),function(t){var r=kl.exports;t.exports=function(t,i,e){return(i=r(i))in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t},t.exports.__esModule=!0,t.exports.default=t.exports}(Ml);const Nl=r(Ml.exports);var jl=yt,Pl=Rt,Ol=C,El=Hi,Tl=TypeError,Cl=function(t){return function(r,i,e,n){jl(i);var s=Pl(r),a=Ol(s),o=El(s),h=t?o-1:0,u=t?-1:1;if(e<2)for(;;){if(h in a){n=a[h],h+=u;break}if(h+=u,t?h<0:o<=h)throw Tl("Reduce of empty array with no initial value")}for(;t?h>=0:o>h;h+=u)h in a&&(n=i(n,a[h],h,s));return n}},Al={left:Cl(!1),right:Cl(!0)},Rl=a,Bl=function(t,r){var i=[][t];return!!i&&Rl((function(){i.call(null,r||function(){return 1},1)}))},Ll=Al.left;$e({target:"Array",proto:!0,forced:!Ie&&it>79&&it<83||!Bl("reduce")},{reduce:function(t){var r=arguments.length;return Ll(this,t,r,r>1?arguments[1]:void 0)}});var $l=$e,Il=zn,Dl=s.f,Fl=Ui,zl=gh,_l=_c,Yl=L,Xl=Xc,ql=Il("".endsWith),Gl=Il("".slice),Ul=Math.min,Vl=Xl("endsWith"),Hl=!Vl&&!!function(){var t=Dl(String.prototype,"endsWith");return t&&!t.writable}();$l({target:"String",proto:!0,forced:!Hl&&!Vl},{endsWith:function(t){var r=zl(Yl(this));_l(t);var i=arguments.length>1?arguments[1]:void 0,e=r.length,n=void 0===i?e:Ul(Fl(i),e),s=zl(t);return ql?ql(r,s,n):Gl(r,n-s.length,n)===s}});var Wl=nr,Ql=br,Zl=g,Kl=Xi,Jl=Hi,tv=Array,rv=Math.max,iv=In,ev=c,nv=M,sv=Ou,av=Sr,ov=A,hv=Dc,uv=L,cv=Rn,fv=Du,lv=Ui,vv=gh,dv=bt,pv=function(t,r,i){for(var e=Jl(t),n=Kl(r,e),s=Kl(void 0===i?e:i,e),a=tv(rv(s-n,0)),o=0;n<s;n++,o++)h=a,u=t[n],c=void 0,(c=Wl(o))in h?Ql.f(h,c,Zl(0,u)):h[c]=u;var h,u,c;return a.length=o,a},yv=Gu,gv=bu,mv=a,bv=Sh.UNSUPPORTED_Y,wv=4294967295,xv=Math.min,Mv=[].push,kv=nv(/./.exec),Sv=nv(Mv),Nv=nv("".slice);sv("split",(function(t,r,i){var e;return e="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var e=vv(uv(this)),n=void 0===i?wv:i>>>0;if(0===n)return[];if(void 0===t)return[e];if(!hv(t))return ev(r,e,t,n);for(var s,a,o,h=[],u=0,c=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(s=ev(gv,c,e))&&!((a=c.lastIndex)>u&&(Sv(h,Nv(e,u,s.index)),s.length>1&&s.index<e.length&&iv(Mv,h,pv(s,1)),o=s[0].length,u=a,h.length>=n));)c.lastIndex===s.index&&c.lastIndex++;return u===e.length?!o&&kv(c,"")||Sv(h,""):Sv(h,Nv(e,u)),h.length>n?pv(h,0,n):h}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:ev(r,this,t,i)}:r,[function(r,i){var n=uv(this),s=ov(r)?void 0:dv(r,t);return s?ev(s,r,n,i):ev(e,vv(n),r,i)},function(t,n){var s=av(this),a=vv(t),o=i(e,s,a,n,e!==r);if(o.done)return o.value;var h=cv(s,RegExp),u=s.unicode,c=new h(bv?"^(?:"+s.source+")":s,(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(bv?"g":"y")),f=void 0===n?wv:n>>>0;if(0===f)return[];if(0===a.length)return null===yv(c,a)?[a]:[];for(var l=0,v=0,d=[];v<a.length;){c.lastIndex=bv?0:v;var p,y=yv(c,bv?Nv(a,v):a);if(null===y||(p=xv(lv(c.lastIndex+(bv?v:0)),a.length))===l)v=fv(a,v,u);else{if(Sv(d,Nv(a,l,v)),d.length===f)return d;for(var g=1;g<=y.length-1;g++)if(Sv(d,y[g]),d.length===f)return d;v=l=p}}return Sv(d,Nv(a,l)),d}]}),!!mv((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),bv);var jv={exports:{}},Pv={exports:{}};(function(){var t,r,i,e,n,s;"undefined"!=typeof performance&&null!==performance&&performance.now?Pv.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(Pv.exports=function(){return(t()-n)/1e6},r=process.hrtime,e=(t=function(){var t;return 1e9*(t=r())[0]+t[1]})(),s=1e9*process.uptime(),n=e-s):Date.now?(Pv.exports=function(){return Date.now()-i},i=Date.now()):(Pv.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(t);for(var Ov=Pv.exports,Ev="undefined"==typeof window?t:window,Tv=["moz","webkit"],Cv="AnimationFrame",Av=Ev["request"+Cv],Rv=Ev["cancel"+Cv]||Ev["cancelRequest"+Cv],Bv=0;!Av&&Bv<Tv.length;Bv++)Av=Ev[Tv[Bv]+"Request"+Cv],Rv=Ev[Tv[Bv]+"Cancel"+Cv]||Ev[Tv[Bv]+"CancelRequest"+Cv];if(!Av||!Rv){var Lv=0,$v=0,Iv=[],Dv=1e3/60;Av=function(t){if(0===Iv.length){var r=Ov(),i=Math.max(0,Dv-(r-Lv));Lv=i+r,setTimeout((function(){var t=Iv.slice(0);Iv.length=0;for(var r=0;r<t.length;r++)if(!t[r].cancelled)try{t[r].callback(Lv)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(i))}return Iv.push({handle:++$v,callback:t,cancelled:!1}),$v},Rv=function(t){for(var r=0;r<Iv.length;r++)Iv[r].handle===t&&(Iv[r].cancelled=!0)}}jv.exports=function(t){return Av.call(Ev,t)},jv.exports.cancel=function(){Rv.apply(Ev,arguments)},jv.exports.polyfill=function(t){t||(t=Ev),t.requestAnimationFrame=Av,t.cancelAnimationFrame=Rv};const Fv=jv.exports;var zv,_v="\t\n\v\f\r                 \u2028\u2029\ufeff",Yv=L,Xv=gh,qv=_v,Gv=M("".replace),Uv="["+qv+"]",Vv=RegExp("^"+Uv+Uv+"*"),Hv=RegExp(Uv+Uv+"*$"),Wv=function(t){return function(r){var i=Xv(Yv(r));return 1&t&&(i=Gv(i,Vv,"")),2&t&&(i=Gv(i,Hv,"")),i}},Qv={start:Wv(1),end:Wv(2),trim:Wv(3)},Zv=Yr.PROPER,Kv=_v,Jv=Qv.trim;$e({target:"String",proto:!0,forced:(zv="trim",a((function(){return!!Kv[zv]()||"​…᠎"!=="​…᠎"[zv]()||Zv&&Kv[zv].name!==zv})))},{trim:function(){return Jv(this)}});var td=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var r={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",rebeccapurple:"663399",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=r[t]||t;for(var i=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],e=0;e<i.length;e++){var n=i[e].process,s=i[e].re.exec(t);if(s){var a=n(s);this.r=a[0],this.g=a[1],this.b=a[2],a.length>3&&(this.alpha=a[3]),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.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),r=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),1==i.length&&(i="0"+i),"#"+t+r+i},this.getHelpXML=function(){for(var t=new Array,e=0;e<i.length;e++)for(var n=i[e].example,s=0;s<n.length;s++)t[t.length]=n[s];for(var a in r)t[t.length]=a;var o=document.createElement("ul");for(o.setAttribute("id","rgbcolor-examples"),e=0;e<t.length;e++)try{var h=document.createElement("li"),u=new RGBColor(t[e]),c=document.createElement("div");c.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),c.appendChild(document.createTextNode("test"));var f=document.createTextNode(" "+t[e]+" -> "+u.toRGB()+" -> "+u.toHex());h.appendChild(c),h.appendChild(f),o.appendChild(h)}catch(t){}return o}},rd=$e,id=Ji.indexOf,ed=Bl,nd=zn([].indexOf),sd=!!nd&&1/nd([1],1,-0)<0;rd({target:"Array",proto:!0,forced:sd||!ed("indexOf")},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return sd?nd(this,t,r)||0:id(this,t,r)}});var ad=$e,od=_c,hd=L,ud=gh,cd=Xc,fd=M("".indexOf);ad({target:"String",proto:!0,forced:!cd("includes")},{includes:function(t){return!!~fd(ud(hd(this)),ud(od(t)),arguments.length>1?arguments[1]:void 0)}});var ld=j,vd=$e,dd=Array.isArray||function(t){return"Array"==ld(t)},pd=M([].reverse),yd=[1,2];vd({target:"Array",proto:!0,forced:String(yd)===String(yd.reverse())},{reverse:function(){return dd(this)&&(this.length=this.length),pd(this)}});
6
+ import{a as t,g as r}from"./p-82e085d0.js";import{b as i}from"./p-6f69de4d.js";import"./p-6d753a3d.js";import"./p-896c9644.js";import"./p-583e5dd0.js";import"./p-c1cf3ebc.js";import"./p-334e6394.js";import"./p-a230b270.js";import"./p-530b73ce.js";var e=function(t){return t&&t.Math==Math&&t},n=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")(),s={},a=function(t){try{return!!t()}catch(t){return!0}},o=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=Function.prototype.call,c=h?u.bind(u):function(){return u.apply(u,arguments)},f={},l={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,d=v&&!l.call({1:2},1);f.f=d?function(t){var r=v(this,t);return!!r&&r.enumerable}:l;var p,y,g=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},m=h,b=Function.prototype,w=b.call,x=m&&b.bind.bind(w,w),M=m?x:function(t){return function(){return w.apply(t,arguments)}},k=M,S=k({}.toString),N=k("".slice),j=function(t){return N(S(t),8,-1)},P=a,O=j,E=Object,T=M("".split),C=P((function(){return!E("z").propertyIsEnumerable(0)}))?function(t){return"String"==O(t)?T(t,""):E(t)}:E,A=function(t){return null==t},R=A,B=TypeError,L=function(t){if(R(t))throw B("Can't call method on "+t);return t},$=C,I=L,D=function(t){return $(I(t))},F="object"==typeof document&&document.all,z={all:F,IS_HTMLDDA:void 0===F&&void 0!==F},_=z.all,Y=z.IS_HTMLDDA?function(t){return"function"==typeof t||t===_}:function(t){return"function"==typeof t},X=Y,q=z.all,G=z.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:X(t)||t===q}:function(t){return"object"==typeof t?null!==t:X(t)},U=n,V=Y,H=function(t,r){return arguments.length<2?V(i=U[t])?i:void 0:U[t]&&U[t][r];var i},W=M({}.isPrototypeOf),Q="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Z=Q,K=n.process,J=n.Deno,tt=K&&K.versions||J&&J.version,rt=tt&&tt.v8;rt&&(y=(p=rt.split("."))[0]>0&&p[0]<4?1:+(p[0]+p[1])),!y&&Z&&(!(p=Z.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=Z.match(/Chrome\/(\d+)/))&&(y=+p[1]);var it=y,et=it,nt=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&et&&et<41})),st=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,at=H,ot=Y,ht=W,ut=Object,ct=st?function(t){return"symbol"==typeof t}:function(t){var r=at("Symbol");return ot(r)&&ht(r.prototype,ut(t))},ft=String,lt=function(t){try{return ft(t)}catch(t){return"Object"}},vt=Y,dt=lt,pt=TypeError,yt=function(t){if(vt(t))return t;throw pt(dt(t)+" is not a function")},gt=yt,mt=A,bt=function(t,r){var i=t[r];return mt(i)?void 0:gt(i)},wt=c,xt=Y,Mt=G,kt=TypeError,St={exports:{}},Nt=n,jt=Object.defineProperty,Pt=function(t,r){try{jt(Nt,t,{value:r,configurable:!0,writable:!0})}catch(i){Nt[t]=r}return r},Ot="__core-js_shared__",Et=n[Ot]||Pt(Ot,{}),Tt=Et;(St.exports=function(t,r){return Tt[t]||(Tt[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.27.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Ct=L,At=Object,Rt=function(t){return At(Ct(t))},Bt=Rt,Lt=M({}.hasOwnProperty),$t=Object.hasOwn||function(t,r){return Lt(Bt(t),r)},It=M,Dt=0,Ft=Math.random(),zt=It(1..toString),_t=function(t){return"Symbol("+(void 0===t?"":t)+")_"+zt(++Dt+Ft,36)},Yt=$t,Xt=_t,qt=nt,Gt=st,Ut=n.Symbol,Vt=(0,St.exports)("wks"),Ht=Gt?Ut.for||Ut:Ut&&Ut.withoutSetter||Xt,Wt=function(t){return Yt(Vt,t)||(Vt[t]=qt&&Yt(Ut,t)?Ut[t]:Ht("Symbol."+t)),Vt[t]},Qt=c,Zt=G,Kt=ct,Jt=bt,tr=TypeError,rr=Wt("toPrimitive"),ir=function(t,r){if(!Zt(t)||Kt(t))return t;var i,e=Jt(t,rr);if(e){if(void 0===r&&(r="default"),i=Qt(e,t,r),!Zt(i)||Kt(i))return i;throw tr("Can't convert object to primitive value")}return void 0===r&&(r="number"),function(t,r){var i,e;if("string"===r&&xt(i=t.toString)&&!Mt(e=wt(i,t)))return e;if(xt(i=t.valueOf)&&!Mt(e=wt(i,t)))return e;if("string"!==r&&xt(i=t.toString)&&!Mt(e=wt(i,t)))return e;throw kt("Can't convert object to primitive value")}(t,r)},er=ct,nr=function(t){var r=ir(t,"string");return er(r)?r:r+""},sr=G,ar=n.document,or=sr(ar)&&sr(ar.createElement),hr=function(t){return or?ar.createElement(t):{}},ur=hr,cr=!o&&!a((function(){return 7!=Object.defineProperty(ur("div"),"a",{get:function(){return 7}}).a})),fr=c,lr=f,vr=g,dr=D,pr=nr,yr=$t,gr=cr,mr=Object.getOwnPropertyDescriptor;s.f=o?mr:function(t,r){if(t=dr(t),r=pr(r),gr)try{return mr(t,r)}catch(t){}if(yr(t,r))return vr(!fr(lr.f,t,r),t[r])};var br={},wr=o&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),xr=G,Mr=String,kr=TypeError,Sr=function(t){if(xr(t))return t;throw kr(Mr(t)+" is not an object")},Nr=cr,jr=Sr,Pr=nr,Or=TypeError,Er=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Cr="enumerable",Ar="configurable",Rr="writable";br.f=o?wr?function(t,r,i){if(jr(t),r=Pr(r),jr(i),"function"==typeof t&&"prototype"===r&&"value"in i&&Rr in i&&!i[Rr]){var e=Tr(t,r);e&&e[Rr]&&(t[r]=i.value,i={configurable:Ar in i?i[Ar]:e[Ar],enumerable:Cr in i?i[Cr]:e[Cr],writable:!1})}return Er(t,r,i)}:Er:function(t,r,i){if(jr(t),r=Pr(r),jr(i),Nr)try{return Er(t,r,i)}catch(t){}if("get"in i||"set"in i)throw Or("Accessors not supported");return"value"in i&&(t[r]=i.value),t};var Br=br,Lr=g,$r=o?function(t,r,i){return Br.f(t,r,Lr(1,i))}:function(t,r,i){return t[r]=i,t},Ir={exports:{}},Dr=o,Fr=Function.prototype,zr=Dr&&Object.getOwnPropertyDescriptor,_r=$t(Fr,"name"),Yr={EXISTS:_r,PROPER:_r&&"something"===function(){}.name,CONFIGURABLE:_r&&(!Dr||Dr&&zr(Fr,"name").configurable)},Xr=Y,qr=Et,Gr=M(Function.toString);Xr(qr.inspectSource)||(qr.inspectSource=function(t){return Gr(t)});var Ur,Vr,Hr,Wr=qr.inspectSource,Qr=n.WeakMap,Zr=Y(Qr)&&/native code/.test(String(Qr)),Kr=_t,Jr=(0,St.exports)("keys"),ti=function(t){return Jr[t]||(Jr[t]=Kr(t))},ri={},ii=G,ei=$r,ni=$t,si=ti,ai=ri,oi="Object already initialized",hi=n.TypeError;if(Zr||Et.state){var ui=Et.state||(Et.state=new(0,n.WeakMap));ui.get=ui.get,ui.has=ui.has,ui.set=ui.set,Ur=function(t,r){if(ui.has(t))throw hi(oi);return r.facade=t,ui.set(t,r),r},Vr=function(t){return ui.get(t)||{}},Hr=function(t){return ui.has(t)}}else{var ci=si("state");ai[ci]=!0,Ur=function(t,r){if(ni(t,ci))throw hi(oi);return r.facade=t,ei(t,ci,r),r},Vr=function(t){return ni(t,ci)?t[ci]:{}},Hr=function(t){return ni(t,ci)}}var fi={set:Ur,get:Vr,has:Hr,enforce:function(t){return Hr(t)?Vr(t):Ur(t,{})},getterFor:function(t){return function(r){var i;if(!ii(r)||(i=Vr(r)).type!==t)throw hi("Incompatible receiver, "+t+" required");return i}}},li=M,vi=a,di=Y,pi=$t,yi=o,gi=Yr.CONFIGURABLE,mi=Wr,bi=fi.enforce,wi=fi.get,xi=String,Mi=Object.defineProperty,ki=li("".slice),Si=li("".replace),Ni=li([].join),ji=yi&&!vi((function(){return 8!==Mi((function(){}),"length",{value:8}).length})),Pi=String(String).split("String"),Oi=Ir.exports=function(t,r,i){"Symbol("===ki(xi(r),0,7)&&(r="["+Si(xi(r),/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(r="get "+r),i&&i.setter&&(r="set "+r),(!pi(t,"name")||gi&&t.name!==r)&&(yi?Mi(t,"name",{value:r,configurable:!0}):t.name=r),ji&&i&&pi(i,"arity")&&t.length!==i.arity&&Mi(t,"length",{value:i.arity});try{i&&pi(i,"constructor")&&i.constructor?yi&&Mi(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var e=bi(t);return pi(e,"source")||(e.source=Ni(Pi,"string"==typeof r?r:"")),t};Function.prototype.toString=Oi((function(){return di(this)&&wi(this).source||mi(this)}),"toString");var Ei=Y,Ti=br,Ci=Ir.exports,Ai=Pt,Ri=function(t,r,i,e){e||(e={});var n=e.enumerable,s=void 0!==e.name?e.name:r;if(Ei(i)&&Ci(i,s,e),e.global)n?t[r]=i:Ai(r,i);else{try{e.unsafe?t[r]&&(n=!0):delete t[r]}catch(t){}n?t[r]=i:Ti.f(t,r,{value:i,enumerable:!1,configurable:!e.nonConfigurable,writable:!e.nonWritable})}return t},Bi={},Li=Math.ceil,$i=Math.floor,Ii=Math.trunc||function(t){var r=+t;return(r>0?$i:Li)(r)},Di=Ii,Fi=function(t){var r=+t;return r!=r||0===r?0:Di(r)},zi=Fi,_i=Math.max,Yi=Math.min,Xi=function(t,r){var i=zi(t);return i<0?_i(i+r,0):Yi(i,r)},qi=Fi,Gi=Math.min,Ui=function(t){return t>0?Gi(qi(t),9007199254740991):0},Vi=Ui,Hi=function(t){return Vi(t.length)},Wi=D,Qi=Xi,Zi=Hi,Ki=function(t){return function(r,i,e){var n,s=Wi(r),a=Zi(s),o=Qi(e,a);if(t&&i!=i){for(;a>o;)if((n=s[o++])!=n)return!0}else for(;a>o;o++)if((t||o in s)&&s[o]===i)return t||o||0;return!t&&-1}},Ji={includes:Ki(!0),indexOf:Ki(!1)},te=$t,re=D,ie=Ji.indexOf,ee=ri,ne=M([].push),se=function(t,r){var i,e=re(t),n=0,s=[];for(i in e)!te(ee,i)&&te(e,i)&&ne(s,i);for(;r.length>n;)te(e,i=r[n++])&&(~ie(s,i)||ne(s,i));return s},ae=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],oe=se,he=ae.concat("length","prototype");Bi.f=Object.getOwnPropertyNames||function(t){return oe(t,he)};var ue={};ue.f=Object.getOwnPropertySymbols;var ce=H,fe=Bi,le=ue,ve=Sr,de=M([].concat),pe=ce("Reflect","ownKeys")||function(t){var r=fe.f(ve(t)),i=le.f;return i?de(r,i(t)):r},ye=$t,ge=pe,me=s,be=br,we=a,xe=Y,Me=/#|\.prototype\./,ke=function(t,r){var i=Ne[Se(t)];return i==Pe||i!=je&&(xe(r)?we(r):!!r)},Se=ke.normalize=function(t){return String(t).replace(Me,".").toLowerCase()},Ne=ke.data={},je=ke.NATIVE="N",Pe=ke.POLYFILL="P",Oe=ke,Ee=n,Te=s.f,Ce=$r,Ae=Ri,Re=Pt,Be=function(t,r,i){for(var e=ge(r),n=be.f,s=me.f,a=0;a<e.length;a++){var o=e[a];ye(t,o)||i&&ye(i,o)||n(t,o,s(r,o))}},Le=Oe,$e=function(t,r){var i,e,n,s,a,o=t.target,h=t.global,u=t.stat;if(i=h?Ee:u?Ee[o]||Re(o,{}):(Ee[o]||{}).prototype)for(e in r){if(s=r[e],n=t.dontCallGetSet?(a=Te(i,e))&&a.value:i[e],!Le(h?e:o+(u?".":"#")+e,t.forced)&&void 0!==n){if(typeof s==typeof n)continue;Be(s,n)}(t.sham||n&&n.sham)&&Ce(s,"sham",!0),Ae(i,e,s,t)}},Ie="undefined"!=typeof process&&"process"==j(process),De=Y,Fe=String,ze=TypeError,_e=M,Ye=Sr,Xe=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=_e(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]),r=i instanceof Array}catch(t){}return function(i,e){return Ye(i),function(t){if("object"==typeof t||De(t))return t;throw ze("Can't set "+Fe(t)+" as a prototype")}(e),r?t(i,e):i.__proto__=e,i}}():void 0),qe=br.f,Ge=$t,Ue=Wt("toStringTag"),Ve=function(t,r,i){t&&!i&&(t=t.prototype),t&&!Ge(t,Ue)&&qe(t,Ue,{configurable:!0,value:r})},He=H,We=br,Qe=o,Ze=Wt("species"),Ke=W,Je=TypeError,tn={};tn[Wt("toStringTag")]="z";var rn="[object z]"===String(tn),en=Y,nn=j,sn=Wt("toStringTag"),an=Object,on="Arguments"==nn(function(){return arguments}()),hn=rn?nn:function(t){var r,i,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=an(t),sn))?i:on?nn(r):"Object"==(e=nn(r))&&en(r.callee)?"Arguments":e},un=M,cn=a,fn=Y,ln=hn,vn=Wr,dn=function(){},pn=[],yn=H("Reflect","construct"),gn=/^\s*(?:class|function)\b/,mn=un(gn.exec),bn=!gn.exec(dn),wn=function(t){if(!fn(t))return!1;try{return yn(dn,pn,t),!0}catch(t){return!1}},xn=function(t){if(!fn(t))return!1;switch(ln(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return bn||!!mn(gn,vn(t))}catch(t){return!0}};xn.sham=!0;var Mn,kn,Sn,Nn,jn=!yn||cn((function(){var t;return wn(wn.call)||!wn(Object)||!wn((function(){t=!0}))||t}))?xn:wn,Pn=jn,On=lt,En=TypeError,Tn=Sr,Cn=A,An=Wt("species"),Rn=function(t,r){var i,e=Tn(t).constructor;return void 0===e||Cn(i=Tn(e)[An])?r:function(t){if(Pn(t))return t;throw En(On(t)+" is not a constructor")}(i)},Bn=Function.prototype,Ln=Bn.apply,$n=Bn.call,In="object"==typeof Reflect&&Reflect.apply||(h?$n.bind(Ln):function(){return $n.apply(Ln,arguments)}),Dn=j,Fn=M,zn=function(t){if("Function"===Dn(t))return Fn(t)},_n=yt,Yn=h,Xn=zn(zn.bind),qn=function(t,r){return _n(t),void 0===r?t:Yn?Xn(t,r):function(){return t.apply(r,arguments)}},Gn=H("document","documentElement"),Un=M([].slice),Vn=TypeError,Hn=/(?:ipad|iphone|ipod).*applewebkit/i.test(Q),Wn=n,Qn=In,Zn=qn,Kn=Y,Jn=$t,ts=a,rs=Gn,is=Un,es=hr,ns=Hn,ss=Ie,as=Wn.setImmediate,os=Wn.clearImmediate,hs=Wn.process,us=Wn.Dispatch,cs=Wn.Function,fs=Wn.MessageChannel,ls=Wn.String,vs=0,ds={},ps="onreadystatechange";ts((function(){Mn=Wn.location}));var ys=function(t){if(Jn(ds,t)){var r=ds[t];delete ds[t],r()}},gs=function(t){return function(){ys(t)}},ms=function(t){ys(t.data)},bs=function(t){Wn.postMessage(ls(t),Mn.protocol+"//"+Mn.host)};as&&os||(as=function(t){!function(t,r){if(t<r)throw Vn("Not enough arguments")}(arguments.length,1);var r=Kn(t)?t:cs(t),i=is(arguments,1);return ds[++vs]=function(){Qn(r,void 0,i)},kn(vs),vs},os=function(t){delete ds[t]},ss?kn=function(t){hs.nextTick(gs(t))}:us&&us.now?kn=function(t){us.now(gs(t))}:fs&&!ns?(Nn=(Sn=new fs).port2,Sn.port1.onmessage=ms,kn=Zn(Nn.postMessage,Nn)):Wn.addEventListener&&Kn(Wn.postMessage)&&!Wn.importScripts&&Mn&&"file:"!==Mn.protocol&&!ts(bs)?(kn=bs,Wn.addEventListener("message",ms,!1)):kn=ps in es("script")?function(t){rs.appendChild(es("script"))[ps]=function(){rs.removeChild(this),ys(t)}}:function(t){setTimeout(gs(t),0)});var ws={set:as,clear:os},xs=function(){this.head=null,this.tail=null};xs.prototype={add:function(t){var r={item:t,next:null},i=this.tail;i?i.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Ms,ks,Ss,Ns,js,Ps=xs,Os=/ipad|iphone|ipod/i.test(Q)&&"undefined"!=typeof Pebble,Es=/web0s(?!.*chrome)/i.test(Q),Ts=n,Cs=qn,As=ws.set,Rs=Ps,Bs=Hn,Ls=Os,$s=Es,Is=Ie,Ds=Ts.MutationObserver||Ts.WebKitMutationObserver,Fs=Ts.document,zs=Ts.process,_s=Ts.Promise,Ys=(0,s.f)(Ts,"queueMicrotask"),Xs=Ys&&Ys.value;if(!Xs){var qs=new Rs,Gs=function(){var t,r;for(Is&&(t=zs.domain)&&t.exit();r=qs.get();)try{r()}catch(t){throw qs.head&&Ms(),t}t&&t.enter()};Bs||Is||$s||!Ds||!Fs?!Ls&&_s&&_s.resolve?((Ns=_s.resolve(void 0)).constructor=_s,js=Cs(Ns.then,Ns),Ms=function(){js(Gs)}):Is?Ms=function(){zs.nextTick(Gs)}:(As=Cs(As,Ts),Ms=function(){As(Gs)}):(ks=!0,Ss=Fs.createTextNode(""),new Ds(Gs).observe(Ss,{characterData:!0}),Ms=function(){Ss.data=ks=!ks}),Xs=function(t){qs.head||Ms(),qs.add(t)}}var Us=Xs,Vs=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Hs=n.Promise,Ws="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Qs=!Ws&&!Ie&&"object"==typeof window&&"object"==typeof document,Zs=n,Ks=Hs,Js=Y,ta=Oe,ra=Wr,ia=Qs,ea=Ws,na=it,sa=Wt("species"),aa=!1,oa=Js(Zs.PromiseRejectionEvent),ha=ta("Promise",(function(){var t=ra(Ks),r=t!==String(Ks);if(!r&&66===na)return!0;if(!na||na<51||!/native code/.test(t)){var i=new Ks((function(t){t(1)})),e=function(t){t((function(){}),(function(){}))};if((i.constructor={})[sa]=e,!(aa=i.then((function(){}))instanceof e))return!0}return!r&&(ia||ea)&&!oa})),ua={CONSTRUCTOR:ha,REJECTION_EVENT:oa,SUBCLASSING:aa},ca={},fa=yt,la=TypeError,va=function(t){var r,i;this.promise=new t((function(t,e){if(void 0!==r||void 0!==i)throw la("Bad Promise constructor");r=t,i=e})),this.resolve=fa(r),this.reject=fa(i)};ca.f=function(t){return new va(t)};var da,pa,ya,ga,ma=$e,ba=Ie,wa=n,xa=c,Ma=Ri,ka=Xe,Sa=Ve,Na=yt,ja=Y,Pa=G,Oa=Rn,Ea=ws.set,Ta=Us,Ca=Vs,Aa=Ps,Ra=fi,Ba=Hs,La=ca,$a="Promise",Ia=ua.CONSTRUCTOR,Da=ua.REJECTION_EVENT,Fa=ua.SUBCLASSING,za=Ra.getterFor($a),_a=Ra.set,Ya=Ba&&Ba.prototype,Xa=Ba,qa=Ya,Ga=wa.TypeError,Ua=wa.document,Va=wa.process,Ha=La.f,Wa=Ha,Qa=!!(Ua&&Ua.createEvent&&wa.dispatchEvent),Za="unhandledrejection",Ka=function(t){var r;return!(!Pa(t)||!ja(r=t.then))&&r},Ja=function(t,r){var i,e,n,s=r.value,a=1==r.state,o=a?t.ok:t.fail,h=t.resolve,u=t.reject,c=t.domain;try{o?(a||(2===r.rejection&&no(r),r.rejection=1),!0===o?i=s:(c&&c.enter(),i=o(s),c&&(c.exit(),n=!0)),i===t.promise?u(Ga("Promise-chain cycle")):(e=Ka(i))?xa(e,i,h,u):h(i)):u(s)}catch(t){c&&!n&&c.exit(),u(t)}},to=function(t,r){t.notified||(t.notified=!0,Ta((function(){for(var i,e=t.reactions;i=e.get();)Ja(i,t);t.notified=!1,r&&!t.rejection&&io(t)})))},ro=function(t,r,i){var e,n;Qa?((e=Ua.createEvent("Event")).promise=r,e.reason=i,e.initEvent(t,!1,!0),wa.dispatchEvent(e)):e={promise:r,reason:i},!Da&&(n=wa["on"+t])?n(e):t===Za&&function(t,r){try{1==arguments.length?console.error(t):console.error(t,r)}catch(t){}}("Unhandled promise rejection",i)},io=function(t){xa(Ea,wa,(function(){var r,i=t.facade,e=t.value;if(eo(t)&&(r=Ca((function(){ba?Va.emit("unhandledRejection",e,i):ro(Za,i,e)})),t.rejection=ba||eo(t)?2:1,r.error))throw r.value}))},eo=function(t){return 1!==t.rejection&&!t.parent},no=function(t){xa(Ea,wa,(function(){var r=t.facade;ba?Va.emit("rejectionHandled",r):ro("rejectionhandled",r,t.value)}))},so=function(t,r,i){return function(e){t(r,e,i)}},ao=function(t,r,i){t.done||(t.done=!0,i&&(t=i),t.value=r,t.state=2,to(t,!0))},oo=function(t,r,i){if(!t.done){t.done=!0,i&&(t=i);try{if(t.facade===r)throw Ga("Promise can't be resolved itself");var e=Ka(r);e?Ta((function(){var i={done:!1};try{xa(e,r,so(oo,i,t),so(ao,i,t))}catch(r){ao(i,r,t)}})):(t.value=r,t.state=1,to(t,!1))}catch(r){ao({done:!1},r,t)}}};if(Ia&&(Xa=function(t){(function(t,r){if(Ke(r,t))return t;throw Je("Incorrect invocation")})(this,qa),Na(t),xa(da,this);var r=za(this);try{t(so(oo,r),so(ao,r))}catch(t){ao(r,t)}},(da=function(){_a(this,{type:$a,done:!1,notified:!1,parent:!1,reactions:new Aa,rejection:!1,state:0,value:void 0})}).prototype=Ma(qa=Xa.prototype,"then",(function(t,r){var i=za(this),e=Ha(Oa(this,Xa));return i.parent=!0,e.ok=!ja(t)||t,e.fail=ja(r)&&r,e.domain=ba?Va.domain:void 0,0==i.state?i.reactions.add(e):Ta((function(){Ja(e,i)})),e.promise})),pa=function(){var t=new da,r=za(t);this.promise=t,this.resolve=so(oo,r),this.reject=so(ao,r)},La.f=Ha=function(t){return t===Xa||void 0===t?new pa(t):Wa(t)},ja(Ba)&&Ya!==Object.prototype)){ya=Ya.then,Fa||Ma(Ya,"then",(function(t,r){var i=this;return new Xa((function(t,r){xa(ya,i,t,r)})).then(t,r)}),{unsafe:!0});try{delete Ya.constructor}catch(t){}ka&&ka(Ya,qa)}ma({global:!0,constructor:!0,wrap:!0,forced:Ia},{Promise:Xa}),Sa(Xa,$a,!1),ga=He($a),Qe&&ga&&!ga[Ze]&&(0,We.f)(ga,Ze,{configurable:!0,get:function(){return this}});var ho={},uo=ho,co=Wt("iterator"),fo=Array.prototype,lo=hn,vo=bt,po=A,yo=ho,go=Wt("iterator"),mo=function(t){if(!po(t))return vo(t,go)||vo(t,"@@iterator")||yo[lo(t)]},bo=c,wo=yt,xo=Sr,Mo=lt,ko=mo,So=TypeError,No=c,jo=Sr,Po=bt,Oo=qn,Eo=c,To=Sr,Co=lt,Ao=Hi,Ro=W,Bo=mo,Lo=function(t,r,i){var e,n;jo(t);try{if(!(e=Po(t,"return"))){if("throw"===r)throw i;return i}e=No(e,t)}catch(t){n=!0,e=t}if("throw"===r)throw i;if(n)throw e;return jo(e),i},$o=TypeError,Io=function(t,r){this.stopped=t,this.result=r},Do=Io.prototype,Fo=function(t,r,i){var e,n,s,a,o,h,u,c,f=!(!i||!i.AS_ENTRIES),l=!(!i||!i.IS_RECORD),v=!(!i||!i.IS_ITERATOR),d=!(!i||!i.INTERRUPTED),p=Oo(r,i&&i.that),y=function(t){return e&&Lo(e,"normal",t),new Io(!0,t)},g=function(t){return f?(To(t),d?p(t[0],t[1],y):p(t[0],t[1])):d?p(t,y):p(t)};if(l)e=t.iterator;else if(v)e=t;else{if(!(n=Bo(t)))throw $o(Co(t)+" is not iterable");if(void 0!==(c=n)&&(uo.Array===c||fo[co]===c)){for(s=0,a=Ao(t);a>s;s++)if((o=g(t[s]))&&Ro(Do,o))return o;return new Io(!1)}e=function(t,r){var i=arguments.length<2?ko(t):r;if(wo(i))return xo(bo(i,t));throw So(Mo(t)+" is not iterable")}(t,n)}for(h=l?t.next:e.next;!(u=Eo(h,e)).done;){try{o=g(u.value)}catch(t){Lo(e,"throw",t)}if("object"==typeof o&&o&&Ro(Do,o))return o}return new Io(!1)},zo=Wt("iterator"),_o=!1;try{var Yo=0,Xo={next:function(){return{done:!!Yo++}},return:function(){_o=!0}};Xo[zo]=function(){return this},Array.from(Xo,(function(){throw 2}))}catch(t){}var qo=Hs,Go=ua.CONSTRUCTOR||!function(t,r){if(!r&&!_o)return!1;var i=!1;try{var e={};e[zo]=function(){return{next:function(){return{done:i=!0}}}},t(e)}catch(t){}return i}((function(t){qo.all(t).then(void 0,(function(){}))})),Uo=c,Vo=yt,Ho=ca,Wo=Vs,Qo=Fo;$e({target:"Promise",stat:!0,forced:Go},{all:function(t){var r=this,i=Ho.f(r),e=i.resolve,n=i.reject,s=Wo((function(){var i=Vo(r.resolve),s=[],a=0,o=1;Qo(t,(function(t){var h=a++,u=!1;o++,Uo(i,r,t).then((function(t){u||(u=!0,s[h]=t,--o||e(s))}),n)})),--o||e(s)}));return s.error&&n(s.value),i.promise}});var Zo=Hs,Ko=H,Jo=Y,th=Ri,rh=Zo&&Zo.prototype;if($e({target:"Promise",proto:!0,forced:ua.CONSTRUCTOR,real:!0},{catch:function(t){return this.then(void 0,t)}}),Jo(Zo)){var ih=Ko("Promise").prototype.catch;rh.catch!==ih&&th(rh,"catch",ih,{unsafe:!0})}var eh=c,nh=yt,sh=ca,ah=Vs,oh=Fo;$e({target:"Promise",stat:!0,forced:Go},{race:function(t){var r=this,i=sh.f(r),e=i.reject,n=ah((function(){var n=nh(r.resolve);oh(t,(function(t){eh(n,r,t).then(i.resolve,e)}))}));return n.error&&e(n.value),i.promise}});var hh=c,uh=ca;$e({target:"Promise",stat:!0,forced:ua.CONSTRUCTOR},{reject:function(t){var r=uh.f(this);return hh(r.reject,void 0,t),r.promise}});var ch=Sr,fh=G,lh=ca;$e({target:"Promise",stat:!0,forced:ua.CONSTRUCTOR},{resolve:function(t){return function(t,r){if(ch(t),fh(r)&&r.constructor===t)return r;var i=lh.f(t);return(0,i.resolve)(r),i.promise}(this,t)}});var vh={exports:{}};!function(t){function r(t,r,i,e,n,s,a){try{var o=t[s](a),h=o.value}catch(t){return void i(t)}o.done?r(h):Promise.resolve(h).then(e,n)}t.exports=function(t){return function(){var i=this,e=arguments;return new Promise((function(n,s){var a=t.apply(i,e);function o(t){r(a,n,s,o,h,"next",t)}function h(t){r(a,n,s,o,h,"throw",t)}o(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports}(vh);const dh=r(vh.exports);var ph=hn,yh=String,gh=function(t){if("Symbol"===ph(t))throw TypeError("Cannot convert a Symbol value to a string");return yh(t)},mh=Sr,bh=function(){var t=mh(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},wh=a,xh=n.RegExp,Mh=wh((function(){var t=xh("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),kh=Mh||wh((function(){return!xh("a","y").sticky})),Sh={BROKEN_CARET:Mh||wh((function(){var t=xh("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:kh,UNSUPPORTED_Y:Mh},Nh={},jh=se,Ph=ae,Oh=Object.keys||function(t){return jh(t,Ph)},Eh=br,Th=Sr,Ch=D,Ah=Oh;Nh.f=o&&!wr?Object.defineProperties:function(t,r){Th(t);for(var i,e=Ch(r),n=Ah(r),s=n.length,a=0;s>a;)Eh.f(t,i=n[a++],e[i]);return t};var Rh,Bh=Sr,Lh=Nh,$h=ae,Ih=ri,Dh=Gn,Fh=hr,zh="prototype",_h="script",Yh=ti("IE_PROTO"),Xh=function(){},qh=function(t){return"<"+_h+">"+t+"</"+_h+">"},Gh=function(t){t.write(qh("")),t.close();var r=t.parentWindow.Object;return t=null,r},Uh=function(){try{Rh=new ActiveXObject("htmlfile")}catch(t){}var t,r,i;Uh="undefined"!=typeof document?document.domain&&Rh?Gh(Rh):(r=Fh("iframe"),i="java"+_h+":",r.style.display="none",Dh.appendChild(r),r.src=String(i),(t=r.contentWindow.document).open(),t.write(qh("document.F=Object")),t.close(),t.F):Gh(Rh);for(var e=$h.length;e--;)delete Uh[zh][$h[e]];return Uh()};Ih[Yh]=!0;var Vh,Hh,Wh=Object.create||function(t,r){var i;return null!==t?(Xh[zh]=Bh(t),i=new Xh,Xh[zh]=null,i[Yh]=t):i=Uh(),void 0===r?i:Lh.f(i,r)},Qh=n.RegExp,Zh=a((function(){var t=Qh(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),Kh=n.RegExp,Jh=a((function(){var t=Kh("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),tu=c,ru=M,iu=gh,eu=bh,nu=Sh,su=Wh,au=fi.get,ou=Zh,hu=Jh,uu=(0,St.exports)("native-string-replace",String.prototype.replace),cu=RegExp.prototype.exec,fu=cu,lu=ru("".charAt),vu=ru("".indexOf),du=ru("".replace),pu=ru("".slice),yu=(Hh=/b*/g,tu(cu,Vh=/a/,"a"),tu(cu,Hh,"a"),0!==Vh.lastIndex||0!==Hh.lastIndex),gu=nu.BROKEN_CARET,mu=void 0!==/()??/.exec("")[1];(yu||mu||gu||ou||hu)&&(fu=function(t){var r,i,e,n,s,a,o,h=this,u=au(h),c=iu(t),f=u.raw;if(f)return f.lastIndex=h.lastIndex,r=tu(fu,f,c),h.lastIndex=f.lastIndex,r;var l=u.groups,v=gu&&h.sticky,d=tu(eu,h),p=h.source,y=0,g=c;if(v&&(d=du(d,"y",""),-1===vu(d,"g")&&(d+="g"),g=pu(c,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==lu(c,h.lastIndex-1))&&(p="(?: "+p+")",g=" "+g,y++),i=new RegExp("^(?:"+p+")",d)),mu&&(i=new RegExp("^"+p+"$(?!\\s)",d)),yu&&(e=h.lastIndex),n=tu(cu,v?i:h,g),v?n?(n.input=pu(n.input,y),n[0]=pu(n[0],y),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:yu&&n&&(h.lastIndex=h.global?n.index+n[0].length:e),mu&&n&&n.length>1&&tu(uu,n[0],i,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(n[s]=void 0)})),n&&l)for(n.groups=a=su(null),s=0;s<l.length;s++)a[(o=l[s])[0]]=n[o[1]];return n});var bu=fu;$e({target:"RegExp",proto:!0,forced:/./.exec!==bu},{exec:bu});var wu=zn,xu=Ri,Mu=bu,ku=a,Su=Wt,Nu=$r,ju=Su("species"),Pu=RegExp.prototype,Ou=function(t,r,i,e){var n=Su(t),s=!ku((function(){var r={};return r[n]=function(){return 7},7!=""[t](r)})),a=s&&!ku((function(){var r=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[ju]=function(){return i},i.flags="",i[n]=/./[n]),i.exec=function(){return r=!0,null},i[n](""),!r}));if(!s||!a||i){var o=wu(/./[n]),h=r(n,""[t],(function(t,r,i,e,n){var a=wu(t),h=r.exec;return h===Mu||h===Pu.exec?s&&!n?{done:!0,value:o(r,i,e)}:{done:!0,value:a(i,r,e)}:{done:!1}}));xu(String.prototype,t,h[0]),xu(Pu,n,h[1])}e&&Nu(Pu[n],"sham",!0)},Eu=M,Tu=Fi,Cu=gh,Au=L,Ru=Eu("".charAt),Bu=Eu("".charCodeAt),Lu=Eu("".slice),$u=function(t){return function(r,i){var e,n,s=Cu(Au(r)),a=Tu(i),o=s.length;return a<0||a>=o?t?"":void 0:(e=Bu(s,a))<55296||e>56319||a+1===o||(n=Bu(s,a+1))<56320||n>57343?t?Ru(s,a):e:t?Lu(s,a,a+2):n-56320+(e-55296<<10)+65536}},Iu=($u(!1),$u(!0)),Du=function(t,r,i){return r+(i?Iu(t,r).length:1)},Fu=c,zu=Sr,_u=Y,Yu=j,Xu=bu,qu=TypeError,Gu=function(t,r){var i=t.exec;if(_u(i)){var e=Fu(i,t,r);return null!==e&&zu(e),e}if("RegExp"===Yu(t))return Fu(Xu,t,r);throw qu("RegExp#exec called on incompatible receiver")},Uu=c,Vu=Sr,Hu=A,Wu=Ui,Qu=gh,Zu=L,Ku=bt,Ju=Du,tc=Gu;Ou("match",(function(t,r,i){return[function(r){var i=Zu(this),e=Hu(r)?void 0:Ku(r,t);return e?Uu(e,r,i):new RegExp(r)[t](Qu(i))},function(t){var e=Vu(this),n=Qu(t),s=i(r,e,n);if(s.done)return s.value;if(!e.global)return tc(e,n);var a=e.unicode;e.lastIndex=0;for(var o,h=[],u=0;null!==(o=tc(e,n));){var c=Qu(o[0]);h[u]=c,""===c&&(e.lastIndex=Ju(n,Wu(e.lastIndex),a)),u++}return 0===u?null:h}]}));var rc=M,ic=Rt,ec=Math.floor,nc=rc("".charAt),sc=rc("".replace),ac=rc("".slice),oc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,hc=/\$([$&'`]|\d{1,2})/g,uc=In,cc=c,fc=M,lc=Ou,vc=a,dc=Sr,pc=Y,yc=A,gc=Fi,mc=Ui,bc=gh,wc=L,xc=Du,Mc=bt,kc=function(t,r,i,e,n,s){var a=i+t.length,o=e.length,h=hc;return void 0!==n&&(n=ic(n),h=oc),sc(s,h,(function(s,h){var u;switch(nc(h,0)){case"$":return"$";case"&":return t;case"`":return ac(r,0,i);case"'":return ac(r,a);case"<":u=n[ac(h,1,-1)];break;default:var c=+h;if(0===c)return s;if(c>o){var f=ec(c/10);return 0===f?s:f<=o?void 0===e[f-1]?nc(h,1):e[f-1]+nc(h,1):s}u=e[c-1]}return void 0===u?"":u}))},Sc=Gu,Nc=Wt("replace"),jc=Math.max,Pc=Math.min,Oc=fc([].concat),Ec=fc([].push),Tc=fc("".indexOf),Cc=fc("".slice),Ac="$0"==="a".replace(/./,"$0"),Rc=!!/./[Nc]&&""===/./[Nc]("a","$0");lc("replace",(function(t,r,i){var e=Rc?"$":"$0";return[function(t,i){var e=wc(this),n=yc(t)?void 0:Mc(t,Nc);return n?cc(n,t,e,i):cc(r,bc(e),t,i)},function(t,n){var s=dc(this),a=bc(t);if("string"==typeof n&&-1===Tc(n,e)&&-1===Tc(n,"$<")){var o=i(r,s,a,n);if(o.done)return o.value}var h=pc(n);h||(n=bc(n));var u=s.global;if(u){var c=s.unicode;s.lastIndex=0}for(var f=[];;){var l=Sc(s,a);if(null===l)break;if(Ec(f,l),!u)break;""===bc(l[0])&&(s.lastIndex=xc(a,mc(s.lastIndex),c))}for(var v,d="",p=0,y=0;y<f.length;y++){for(var g=bc((l=f[y])[0]),m=jc(Pc(gc(l.index),a.length),0),b=[],w=1;w<l.length;w++)Ec(b,void 0===(v=l[w])?v:String(v));var x=l.groups;if(h){var M=Oc([g],b,m,a);void 0!==x&&Ec(M,x);var k=bc(uc(n,void 0,M))}else k=kc(g,a,m,b,x,n);m>=p&&(d+=Cc(a,p,m)+k,p=m+g.length)}return d+Cc(a,p)}]}),!!vc((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Ac||Rc);var Bc,Lc=G,$c=j,Ic=Wt("match"),Dc=function(t){var r;return Lc(t)&&(void 0!==(r=t[Ic])?!!r:"RegExp"==$c(t))},Fc=Dc,zc=TypeError,_c=function(t){if(Fc(t))throw zc("The method doesn't accept regular expressions");return t},Yc=Wt("match"),Xc=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{return r[Yc]=!1,"/./"[t](r)}catch(t){}}return!1},qc=$e,Gc=zn,Uc=s.f,Vc=Ui,Hc=gh,Wc=_c,Qc=L,Zc=Xc,Kc=Gc("".startsWith),Jc=Gc("".slice),tf=Math.min,rf=Zc("startsWith");qc({target:"String",proto:!0,forced:!(!rf&&(Bc=Uc(String.prototype,"startsWith"),Bc&&!Bc.writable)||rf)},{startsWith:function(t){var r=Hc(Qc(this));Wc(t);var i=Vc(tf(arguments.length>1?arguments[1]:void 0,r.length)),e=Hc(t);return Kc?Kc(r,e,i):Jc(r,i,i+e.length)===e}});var ef=Wh,nf=br.f,sf=Wt("unscopables"),af=Array.prototype;null==af[sf]&&nf(af,sf,{configurable:!0,value:ef(null)});var of,hf,uf,cf=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ff=$t,lf=Y,vf=Rt,df=cf,pf=ti("IE_PROTO"),yf=Object,gf=yf.prototype,mf=df?yf.getPrototypeOf:function(t){var r=vf(t);if(ff(r,pf))return r[pf];var i=r.constructor;return lf(i)&&r instanceof i?i.prototype:r instanceof yf?gf:null},bf=a,wf=Y,xf=G,Mf=mf,kf=Ri,Sf=Wt("iterator"),Nf=!1;[].keys&&("next"in(uf=[].keys())?(hf=Mf(Mf(uf)))!==Object.prototype&&(of=hf):Nf=!0);var jf=!xf(of)||bf((function(){var t={};return of[Sf].call(t)!==t}));jf&&(of={}),wf(of[Sf])||kf(of,Sf,(function(){return this}));var Pf={IteratorPrototype:of,BUGGY_SAFARI_ITERATORS:Nf},Of=Pf.IteratorPrototype,Ef=Wh,Tf=g,Cf=Ve,Af=ho,Rf=function(){return this},Bf=$e,Lf=c,$f=Y,If=mf,Df=Xe,Ff=Ve,zf=$r,_f=Ri,Yf=ho,Xf=Yr.PROPER,qf=Yr.CONFIGURABLE,Gf=Pf.IteratorPrototype,Uf=Pf.BUGGY_SAFARI_ITERATORS,Vf=Wt("iterator"),Hf="keys",Wf="values",Qf="entries",Zf=function(){return this},Kf=D,Jf=function(t){af[sf][t]=!0},tl=ho,rl=br.f,il=function(t,r){return{value:t,done:r}},el=o,nl="Array Iterator",sl=fi.set,al=fi.getterFor(nl),ol=function(t,r,i,e,n,s,a){!function(t,r,i,e){var n=r+" Iterator";t.prototype=Ef(Of,{next:Tf(+!e,i)}),Cf(t,n,!1),Af[n]=Rf}(i,r,e);var o,h,u,c=function(t){if(t===n&&p)return p;if(!Uf&&t in v)return v[t];switch(t){case Hf:case Wf:case Qf:return function(){return new i(this,t)}}return function(){return new i(this)}},f=r+" Iterator",l=!1,v=t.prototype,d=v[Vf]||v["@@iterator"]||n&&v[n],p=!Uf&&d||c(n),y="Array"==r&&v.entries||d;if(y&&(o=If(y.call(new t)))!==Object.prototype&&o.next&&(If(o)!==Gf&&(Df?Df(o,Gf):$f(o[Vf])||_f(o,Vf,Zf)),Ff(o,f,!0)),Xf&&n==Wf&&d&&d.name!==Wf&&(qf?zf(v,"name",Wf):(l=!0,p=function(){return Lf(d,this)})),n)if(h={values:c(Wf),keys:s?p:c(Hf),entries:c(Qf)},a)for(u in h)(Uf||l||!(u in v))&&_f(v,u,h[u]);else Bf({target:r,proto:!0,forced:Uf||l},h);return v[Vf]!==p&&_f(v,Vf,p,{name:n}),Yf[r]=p,h}(Array,"Array",(function(t,r){sl(this,{type:nl,target:Kf(t),index:0,kind:r})}),(function(){var t=al(this),r=t.target,i=t.kind,e=t.index++;return!r||e>=r.length?(t.target=void 0,il(void 0,!0)):il("keys"==i?e:"values"==i?r[e]:[e,r[e]],!1)}),"values"),hl=tl.Arguments=tl.Array;if(Jf("keys"),Jf("values"),Jf("entries"),el&&"values"!==hl.name)try{rl(hl,"name",{value:"values"})}catch(t){}var ul=hr("span").classList,cl=ul&&ul.constructor&&ul.constructor.prototype,fl=n,ll={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},vl=cl===Object.prototype?void 0:cl,dl=ol,pl=$r,yl=Wt,gl=yl("iterator"),ml=yl("toStringTag"),bl=dl.values,wl=function(t,r){if(t){if(t[gl]!==bl)try{pl(t,gl,bl)}catch(r){t[gl]=bl}if(t[ml]||pl(t,ml,r),ll[r])for(var i in dl)if(t[i]!==dl[i])try{pl(t,i,dl[i])}catch(r){t[i]=dl[i]}}};for(var xl in ll)wl(fl[xl]&&fl[xl].prototype,xl);wl(vl,"DOMTokenList");var Ml={exports:{}},kl={exports:{}},Sl={exports:{}};!function(t){var r=i.exports.default;t.exports=function(t,i){if("object"!==r(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,i||"default");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports}(Sl),function(t){var r=i.exports.default,e=Sl.exports;t.exports=function(t){var i=e(t,"string");return"symbol"===r(i)?i:String(i)},t.exports.__esModule=!0,t.exports.default=t.exports}(kl),function(t){var r=kl.exports;t.exports=function(t,i,e){return(i=r(i))in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t},t.exports.__esModule=!0,t.exports.default=t.exports}(Ml);const Nl=r(Ml.exports);var jl=yt,Pl=Rt,Ol=C,El=Hi,Tl=TypeError,Cl=function(t){return function(r,i,e,n){jl(i);var s=Pl(r),a=Ol(s),o=El(s),h=t?o-1:0,u=t?-1:1;if(e<2)for(;;){if(h in a){n=a[h],h+=u;break}if(h+=u,t?h<0:o<=h)throw Tl("Reduce of empty array with no initial value")}for(;t?h>=0:o>h;h+=u)h in a&&(n=i(n,a[h],h,s));return n}},Al={left:Cl(!1),right:Cl(!0)},Rl=a,Bl=function(t,r){var i=[][t];return!!i&&Rl((function(){i.call(null,r||function(){return 1},1)}))},Ll=Al.left;$e({target:"Array",proto:!0,forced:!Ie&&it>79&&it<83||!Bl("reduce")},{reduce:function(t){var r=arguments.length;return Ll(this,t,r,r>1?arguments[1]:void 0)}});var $l=$e,Il=zn,Dl=s.f,Fl=Ui,zl=gh,_l=_c,Yl=L,Xl=Xc,ql=Il("".endsWith),Gl=Il("".slice),Ul=Math.min,Vl=Xl("endsWith"),Hl=!Vl&&!!function(){var t=Dl(String.prototype,"endsWith");return t&&!t.writable}();$l({target:"String",proto:!0,forced:!Hl&&!Vl},{endsWith:function(t){var r=zl(Yl(this));_l(t);var i=arguments.length>1?arguments[1]:void 0,e=r.length,n=void 0===i?e:Ul(Fl(i),e),s=zl(t);return ql?ql(r,s,n):Gl(r,n-s.length,n)===s}});var Wl=nr,Ql=br,Zl=g,Kl=Xi,Jl=Hi,tv=Array,rv=Math.max,iv=In,ev=c,nv=M,sv=Ou,av=Sr,ov=A,hv=Dc,uv=L,cv=Rn,fv=Du,lv=Ui,vv=gh,dv=bt,pv=function(t,r,i){for(var e=Jl(t),n=Kl(r,e),s=Kl(void 0===i?e:i,e),a=tv(rv(s-n,0)),o=0;n<s;n++,o++)h=a,u=t[n],c=void 0,(c=Wl(o))in h?Ql.f(h,c,Zl(0,u)):h[c]=u;var h,u,c;return a.length=o,a},yv=Gu,gv=bu,mv=a,bv=Sh.UNSUPPORTED_Y,wv=4294967295,xv=Math.min,Mv=[].push,kv=nv(/./.exec),Sv=nv(Mv),Nv=nv("".slice);sv("split",(function(t,r,i){var e;return e="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var e=vv(uv(this)),n=void 0===i?wv:i>>>0;if(0===n)return[];if(void 0===t)return[e];if(!hv(t))return ev(r,e,t,n);for(var s,a,o,h=[],u=0,c=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(s=ev(gv,c,e))&&!((a=c.lastIndex)>u&&(Sv(h,Nv(e,u,s.index)),s.length>1&&s.index<e.length&&iv(Mv,h,pv(s,1)),o=s[0].length,u=a,h.length>=n));)c.lastIndex===s.index&&c.lastIndex++;return u===e.length?!o&&kv(c,"")||Sv(h,""):Sv(h,Nv(e,u)),h.length>n?pv(h,0,n):h}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:ev(r,this,t,i)}:r,[function(r,i){var n=uv(this),s=ov(r)?void 0:dv(r,t);return s?ev(s,r,n,i):ev(e,vv(n),r,i)},function(t,n){var s=av(this),a=vv(t),o=i(e,s,a,n,e!==r);if(o.done)return o.value;var h=cv(s,RegExp),u=s.unicode,c=new h(bv?"^(?:"+s.source+")":s,(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(bv?"g":"y")),f=void 0===n?wv:n>>>0;if(0===f)return[];if(0===a.length)return null===yv(c,a)?[a]:[];for(var l=0,v=0,d=[];v<a.length;){c.lastIndex=bv?0:v;var p,y=yv(c,bv?Nv(a,v):a);if(null===y||(p=xv(lv(c.lastIndex+(bv?v:0)),a.length))===l)v=fv(a,v,u);else{if(Sv(d,Nv(a,l,v)),d.length===f)return d;for(var g=1;g<=y.length-1;g++)if(Sv(d,y[g]),d.length===f)return d;v=l=p}}return Sv(d,Nv(a,l)),d}]}),!!mv((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),bv);var jv={exports:{}},Pv={exports:{}};(function(){var t,r,i,e,n,s;"undefined"!=typeof performance&&null!==performance&&performance.now?Pv.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(Pv.exports=function(){return(t()-n)/1e6},r=process.hrtime,e=(t=function(){var t;return 1e9*(t=r())[0]+t[1]})(),s=1e9*process.uptime(),n=e-s):Date.now?(Pv.exports=function(){return Date.now()-i},i=Date.now()):(Pv.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(t);for(var Ov=Pv.exports,Ev="undefined"==typeof window?t:window,Tv=["moz","webkit"],Cv="AnimationFrame",Av=Ev["request"+Cv],Rv=Ev["cancel"+Cv]||Ev["cancelRequest"+Cv],Bv=0;!Av&&Bv<Tv.length;Bv++)Av=Ev[Tv[Bv]+"Request"+Cv],Rv=Ev[Tv[Bv]+"Cancel"+Cv]||Ev[Tv[Bv]+"CancelRequest"+Cv];if(!Av||!Rv){var Lv=0,$v=0,Iv=[],Dv=1e3/60;Av=function(t){if(0===Iv.length){var r=Ov(),i=Math.max(0,Dv-(r-Lv));Lv=i+r,setTimeout((function(){var t=Iv.slice(0);Iv.length=0;for(var r=0;r<t.length;r++)if(!t[r].cancelled)try{t[r].callback(Lv)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(i))}return Iv.push({handle:++$v,callback:t,cancelled:!1}),$v},Rv=function(t){for(var r=0;r<Iv.length;r++)Iv[r].handle===t&&(Iv[r].cancelled=!0)}}jv.exports=function(t){return Av.call(Ev,t)},jv.exports.cancel=function(){Rv.apply(Ev,arguments)},jv.exports.polyfill=function(t){t||(t=Ev),t.requestAnimationFrame=Av,t.cancelAnimationFrame=Rv};const Fv=jv.exports;var zv,_v="\t\n\v\f\r                 \u2028\u2029\ufeff",Yv=L,Xv=gh,qv=_v,Gv=M("".replace),Uv="["+qv+"]",Vv=RegExp("^"+Uv+Uv+"*"),Hv=RegExp(Uv+Uv+"*$"),Wv=function(t){return function(r){var i=Xv(Yv(r));return 1&t&&(i=Gv(i,Vv,"")),2&t&&(i=Gv(i,Hv,"")),i}},Qv={start:Wv(1),end:Wv(2),trim:Wv(3)},Zv=Yr.PROPER,Kv=_v,Jv=Qv.trim;$e({target:"String",proto:!0,forced:(zv="trim",a((function(){return!!Kv[zv]()||"​…᠎"!=="​…᠎"[zv]()||Zv&&Kv[zv].name!==zv})))},{trim:function(){return Jv(this)}});var td=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var r={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",rebeccapurple:"663399",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=r[t]||t;for(var i=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],e=0;e<i.length;e++){var n=i[e].process,s=i[e].re.exec(t);if(s){var a=n(s);this.r=a[0],this.g=a[1],this.b=a[2],a.length>3&&(this.alpha=a[3]),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.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),r=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),1==i.length&&(i="0"+i),"#"+t+r+i},this.getHelpXML=function(){for(var t=new Array,e=0;e<i.length;e++)for(var n=i[e].example,s=0;s<n.length;s++)t[t.length]=n[s];for(var a in r)t[t.length]=a;var o=document.createElement("ul");for(o.setAttribute("id","rgbcolor-examples"),e=0;e<t.length;e++)try{var h=document.createElement("li"),u=new RGBColor(t[e]),c=document.createElement("div");c.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),c.appendChild(document.createTextNode("test"));var f=document.createTextNode(" "+t[e]+" -> "+u.toRGB()+" -> "+u.toHex());h.appendChild(c),h.appendChild(f),o.appendChild(h)}catch(t){}return o}},rd=$e,id=Ji.indexOf,ed=Bl,nd=zn([].indexOf),sd=!!nd&&1/nd([1],1,-0)<0;rd({target:"Array",proto:!0,forced:sd||!ed("indexOf")},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return sd?nd(this,t,r)||0:id(this,t,r)}});var ad=$e,od=_c,hd=L,ud=gh,cd=Xc,fd=M("".indexOf);ad({target:"String",proto:!0,forced:!cd("includes")},{includes:function(t){return!!~fd(ud(hd(this)),ud(od(t)),arguments.length>1?arguments[1]:void 0)}});var ld=j,vd=$e,dd=Array.isArray||function(t){return"Array"==ld(t)},pd=M([].reverse),yd=[1,2];vd({target:"Array",proto:!0,forced:String(yd)===String(yd.reverse())},{reverse:function(){return dd(this)&&(this.length=this.length),pd(this)}});
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
9
9
 
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as t,c as i,h as o,g as s}from"./p-6d753a3d.js";import{g as e}from"./p-2775f82b.js";import{l}from"./p-4ba6f8f0.js";import{a as n}from"./p-6bdafe3f.js";import{g as a,f as d}from"./p-08a1e120.js";import"./p-bdcf99c0.js";import"./p-82e085d0.js";import"./p-deb3adb8.js";const r=class{constructor(o){t(this,o),this.selectedLanguageUpdated=i(this,"selectedLanguageUpdated",7),this.icon="language",this.portalItem=void 0,this.view=void 0,this.locales=[],this.defaultLocale=void 0,this.messages=void 0,this.selectedLanguage=null,this.t9nData=null}async componentWillLoad(){var t,i,o,s,r,c,h,u,v,p,w,m;const[g,f,b]=await l(["esri/intl","esri/WebMap","esri/request"]);this.intl=g,this.request=b,this.messages=await e(document.createElement("instant-apps-language-translator"));try{this.portalItemResource=await a(this.portalItem);const t=await d(b,this.portalItemResource);this.t9nData=null!=t?t:{}}catch(t){this.t9nData={},console.error("NO PORTAL ITEM RESOURCE AVAILABLE.")}finally{this.userLocale=this.defaultLocale;const e=new URLSearchParams(window.location.search).get("locale"),l=(null===(o=null===(i=null===(t=this.locales)||void 0===t?void 0:t.map((t=>null==t?void 0:t.locale)))||void 0===i?void 0:i.filter((t=>t===e)))||void 0===o?void 0:o.length)>0,a=n(g,this.portalItem.portal),d=(null===(c=null===(r=null===(s=this.locales)||void 0===s?void 0:s.map((t=>null==t?void 0:t.locale)))||void 0===r?void 0:r.filter((t=>t===a)))||void 0===c?void 0:c.length)>0;this.selectedLanguage=l?e:d?a:this.userLocale;const b=this.selectedLanguage;if(b!==this.userLocale&&(this.calciteDropdownItemSelectCallback(b)(),this.selectedLanguageUpdated.emit({locale:b,data:null!==(u=null===(h=this.t9nData)||void 0===h?void 0:h[b])&&void 0!==u?u:null})),this.view){const t=this.view.map;this.defaultWebMapId=null===(v=null==t?void 0:t.portalItem)||void 0===v?void 0:v.id;const i=null===(m=null===(w=null===(p=this.locales)||void 0===p?void 0:p.filter((t=>(null==t?void 0:t.webmap)&&(null==t?void 0:t.webmap)!==this.defaultWebMapId&&(null==t?void 0:t.locale)===this.selectedLanguage)))||void 0===w?void 0:w[0])||void 0===m?void 0:m.webmap;i&&(this.view.map=new f({portalItem:{id:i}}))}}}render(){const t=this.renderTrigger(),i=this.renderDropdownItems(),s=this.renderDefaultLocale();return o("calcite-dropdown",{onCalciteDropdownBeforeOpen:()=>this.trigger.iconEnd="chevron-up",onCalciteDropdownBeforeClose:()=>this.trigger.iconEnd="chevron-down","width-scale":"m"},t,s,i)}renderDefaultLocale(){const{userLocale:t}=this;return o("calcite-dropdown-item",{key:`default-${t}`,onCalciteDropdownItemSelect:this.calciteDropdownItemSelectCallback(t),selected:this.selectedLanguage===this.userLocale},this.getSelectedLanguageText(t))}renderTrigger(){return o("calcite-button",{ref:t=>this.trigger=t,slot:"trigger","icon-start":this.icon,"icon-end":"chevron-down",width:"full",appearance:"outline"},this.getSelectedLanguageText(this.selectedLanguage))}renderDropdownItems(){var t,i;return null===(i=null===(t=this.locales)||void 0===t?void 0:t.map((t=>t.locale)))||void 0===i?void 0:i.map((t=>this.renderDropdownItem(t)))}renderDropdownItem(t){const i=this.getSelectedLanguageText(t);return o("calcite-dropdown-item",{key:t,selected:t===this.selectedLanguage,onCalciteDropdownItemSelect:this.calciteDropdownItemSelectCallback(t)},i)}calciteDropdownItemSelectCallback(t){return async()=>{var i,o,s,e,n;this.selectedLanguage=t;const{intl:a,selectedLanguage:d,t9nData:r,userLocale:c}=this,h=this.locales.filter((t=>t.locale===d))[0];d!==c&&(h.data=r[t]);const u=new URLSearchParams(window.location.search);if(d!==c?u.set("locale",this.selectedLanguage):u.delete("locale"),a.setLocale(d),this.view){const[t]=await l(["esri/WebMap"]),a=null===(o=null===(i=this.locales.filter((t=>t.locale===d)))||void 0===i?void 0:i[0])||void 0===o?void 0:o.webmap;if(a)this.view.map=new t({portalItem:{id:a}});else{const i=null===(n=null===(e=null===(s=this.view)||void 0===s?void 0:s.map)||void 0===e?void 0:e.portalItem)||void 0===n?void 0:n.id;i&&this.defaultWebMapId!==i&&(this.view.map=new t({portalItem:{id:this.defaultWebMapId}}))}}document.documentElement.setAttribute("lang",this.selectedLanguage),this.intl.prefersRTL()?document.documentElement.setAttribute("dir","rtl"):document.documentElement.setAttribute("dir","ltr"),window.history.replaceState({},"",decodeURIComponent(`${window.location.pathname}?${u}`)),this.selectedLanguageUpdated.emit(h)}}getSelectedLanguageText(t){const{messages:i}=this,o=null==i?void 0:i.translatedLanguageNames,s=null==i?void 0:i.languages;return`${null==o?void 0:o[t]} - ${null==s?void 0:s[t]}`}async refresh(){try{const t=await a(this.portalItem),i=await d(this.request,t);this.t9nData=i,this.selectedLanguageUpdated.emit({locale:this.selectedLanguage,data:i[this.selectedLanguage]})}catch(t){}}get el(){return s(this)}};r.style=":host{display:block;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);min-width:200px}:host calcite-dropdown{width:100%}:host calcite-button{--calcite-color-brand:var(--calcite-color-text-3);--calcite-color-brand-hover:var(--calcite-color-text-3)}";export{r as instant_apps_language_switcher}
6
+ import{r as t,c as i,h as o,g as s}from"./p-6d753a3d.js";import{g as e}from"./p-2775f82b.js";import{l}from"./p-4ba6f8f0.js";import{a as n}from"./p-6bdafe3f.js";import{g as a,f as d}from"./p-84913712.js";import"./p-bdcf99c0.js";import"./p-82e085d0.js";import"./p-deb3adb8.js";const r=class{constructor(o){t(this,o),this.selectedLanguageUpdated=i(this,"selectedLanguageUpdated",7),this.icon="language",this.portalItem=void 0,this.view=void 0,this.locales=[],this.defaultLocale=void 0,this.messages=void 0,this.selectedLanguage=null,this.t9nData=null}async componentWillLoad(){var t,i,o,s,r,c,h,u,v,p,w,m;const[g,f,b]=await l(["esri/intl","esri/WebMap","esri/request"]);this.intl=g,this.request=b,this.messages=await e(document.createElement("instant-apps-language-translator"));try{this.portalItemResource=await a(this.portalItem);const t=await d(b,this.portalItemResource);this.t9nData=null!=t?t:{}}catch(t){this.t9nData={},console.error("NO PORTAL ITEM RESOURCE AVAILABLE.")}finally{this.userLocale=this.defaultLocale;const e=new URLSearchParams(window.location.search).get("locale"),l=(null===(o=null===(i=null===(t=this.locales)||void 0===t?void 0:t.map((t=>null==t?void 0:t.locale)))||void 0===i?void 0:i.filter((t=>t===e)))||void 0===o?void 0:o.length)>0,a=n(g,this.portalItem.portal),d=(null===(c=null===(r=null===(s=this.locales)||void 0===s?void 0:s.map((t=>null==t?void 0:t.locale)))||void 0===r?void 0:r.filter((t=>t===a)))||void 0===c?void 0:c.length)>0;this.selectedLanguage=l?e:d?a:this.userLocale;const b=this.selectedLanguage;if(b!==this.userLocale&&(this.calciteDropdownItemSelectCallback(b)(),this.selectedLanguageUpdated.emit({locale:b,data:null!==(u=null===(h=this.t9nData)||void 0===h?void 0:h[b])&&void 0!==u?u:null})),this.view){const t=this.view.map;this.defaultWebMapId=null===(v=null==t?void 0:t.portalItem)||void 0===v?void 0:v.id;const i=null===(m=null===(w=null===(p=this.locales)||void 0===p?void 0:p.filter((t=>(null==t?void 0:t.webmap)&&(null==t?void 0:t.webmap)!==this.defaultWebMapId&&(null==t?void 0:t.locale)===this.selectedLanguage)))||void 0===w?void 0:w[0])||void 0===m?void 0:m.webmap;i&&(this.view.map=new f({portalItem:{id:i}}))}}}render(){const t=this.renderTrigger(),i=this.renderDropdownItems(),s=this.renderDefaultLocale();return o("calcite-dropdown",{onCalciteDropdownBeforeOpen:()=>this.trigger.iconEnd="chevron-up",onCalciteDropdownBeforeClose:()=>this.trigger.iconEnd="chevron-down","width-scale":"m"},t,s,i)}renderDefaultLocale(){const{userLocale:t}=this;return o("calcite-dropdown-item",{key:`default-${t}`,onCalciteDropdownItemSelect:this.calciteDropdownItemSelectCallback(t),selected:this.selectedLanguage===this.userLocale},this.getSelectedLanguageText(t))}renderTrigger(){return o("calcite-button",{ref:t=>this.trigger=t,slot:"trigger","icon-start":this.icon,"icon-end":"chevron-down",width:"full",appearance:"outline"},this.getSelectedLanguageText(this.selectedLanguage))}renderDropdownItems(){var t,i;return null===(i=null===(t=this.locales)||void 0===t?void 0:t.map((t=>t.locale)))||void 0===i?void 0:i.map((t=>this.renderDropdownItem(t)))}renderDropdownItem(t){const i=this.getSelectedLanguageText(t);return o("calcite-dropdown-item",{key:t,selected:t===this.selectedLanguage,onCalciteDropdownItemSelect:this.calciteDropdownItemSelectCallback(t)},i)}calciteDropdownItemSelectCallback(t){return async()=>{var i,o,s,e,n;this.selectedLanguage=t;const{intl:a,selectedLanguage:d,t9nData:r,userLocale:c}=this,h=this.locales.filter((t=>t.locale===d))[0];d!==c&&(h.data=r[t]);const u=new URLSearchParams(window.location.search);if(d!==c?u.set("locale",this.selectedLanguage):u.delete("locale"),a.setLocale(d),this.view){const[t]=await l(["esri/WebMap"]),a=null===(o=null===(i=this.locales.filter((t=>t.locale===d)))||void 0===i?void 0:i[0])||void 0===o?void 0:o.webmap;if(a)this.view.map=new t({portalItem:{id:a}});else{const i=null===(n=null===(e=null===(s=this.view)||void 0===s?void 0:s.map)||void 0===e?void 0:e.portalItem)||void 0===n?void 0:n.id;i&&this.defaultWebMapId!==i&&(this.view.map=new t({portalItem:{id:this.defaultWebMapId}}))}}document.documentElement.setAttribute("lang",this.selectedLanguage),this.intl.prefersRTL()?document.documentElement.setAttribute("dir","rtl"):document.documentElement.setAttribute("dir","ltr"),window.history.replaceState({},"",decodeURIComponent(`${window.location.pathname}?${u}`)),this.selectedLanguageUpdated.emit(h)}}getSelectedLanguageText(t){const{messages:i}=this,o=null==i?void 0:i.translatedLanguageNames,s=null==i?void 0:i.languages;return`${null==o?void 0:o[t]} - ${null==s?void 0:s[t]}`}async refresh(){try{const t=await a(this.portalItem),i=await d(this.request,t);this.t9nData=i,this.selectedLanguageUpdated.emit({locale:this.selectedLanguage,data:i[this.selectedLanguage]})}catch(t){}}get el(){return s(this)}};r.style=":host{display:block;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);min-width:200px}:host calcite-dropdown{width:100%}:host calcite-button{--calcite-color-brand:var(--calcite-color-text-3);--calcite-color-brand-hover:var(--calcite-color-text-3)}";export{r as instant_apps_language_switcher}
@@ -3,10 +3,10 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as t,c as i,h as s,H as e,g as a}from"./p-6d753a3d.js";import{l as n,g as o}from"./p-896c9644.js";import{y as h}from"./p-67b26725.js";import{f as c}from"./p-c1cf3ebc.js";import{s as l}from"./p-f22a4439.js";import"./p-82e085d0.js";import"./p-b85be429.js";import"./p-db50226e.js";import"./p-bdcf99c0.js";const r=class{constructor(s){t(this,s),this.bufferComplete=i(this,"bufferComplete",7),this.distanceChanged=i(this,"distanceChanged",7),this.unitChanged=i(this,"unitChanged",7),this.appearance="text",this.distance=0,this.geometries=[],this.max=void 0,this.min=0,this.sliderTicks=10,this.unionResults=!0,this.unit="meters",this.disabled=!1,this._translations=void 0}geometriesWatchHandler(){this._buffer()}disabledWatchHandler(){this._buffer()}async getTranslatedUnit(t){return this._units||await this._defineTranslations(),this._units[t]}async componentWillLoad(){await this._defineTranslations(),await this._initModules()}render(){return s(e,{key:"b06e61d0e1cb18f0b7c34f51c74455a8d00c279b"},"text"===this.appearance?this._getTextBoxDisplay():this._getSliderDisplay())}async _defineTranslations(){await this._getTranslations(),this._initTranslatedUnits()}async _initModules(){const[t]=await n(["esri/geometry/geometryEngine"]);this._geometryEngine=t}_initTranslatedUnits(){this._units={feet:this._translations.feet,meters:this._translations.meters,miles:this._translations.miles,kilometers:this._translations.kilometers}}_getUnits(){return Object.keys(this._units).map((t=>s("calcite-option",{label:this._units[t],selected:this.unit===t,value:t})))}_setDistance(t){const i=parseInt(t.target.value,10);this.distance!==i&&i>=this.min&&(this.distanceChanged.emit({oldValue:this.distance,newValue:i}),this.distance=i,this.distance>0?this._buffer():this.bufferComplete.emit(void 0))}_setUnit(t){this.unitChanged.emit({oldValue:this.unit,newValue:t}),this.unit=t,this._buffer()}_buffer(){this.disabled?this.bufferComplete.emit(void 0):(this._bufferTimeout&&clearTimeout(this._bufferTimeout),this._bufferTimeout=setTimeout((()=>{var t;if((null===(t=this.geometries)||void 0===t?void 0:t.length)>0&&this.unit&&this.distance>0){const t=this.geometries[0].spatialReference,i=t.isWGS84||t.isWebMercator?this._geometryEngine.geodesicBuffer(this.geometries,this.distance,this.unit,this.unionResults):this._geometryEngine.buffer(this.geometries,this.distance,this.unit,this.unionResults);this.bufferComplete.emit(i)}}),400))}_getTextBoxDisplay(){return s("div",{class:"c-container"},s("calcite-input",{class:"padding-end-1 w-50",max:this.max&&this.max>0?this.max:void 0,min:this.min,"number-button-type":"vertical",onCalciteInputInput:t=>this._setDistance(t),placeholder:"0",type:"number",value:this.distance?this.distance.toString():void 0}),s("calcite-select",{class:"flex-1 w-50",label:"label",onCalciteSelectChange:()=>this._setUnit(this._unitElement.value),ref:t=>{this._unitElement=t}},this._getUnits()))}_getSliderDisplay(){return s("div",null,s("calcite-slider",{labelHandles:!0,max:this.max&&this.max>0?this.max:void 0,min:this.min,ticks:this.sliderTicks}))}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}_testAccess(t,i){switch(t){case"_setUnit":return this._setUnit(i);case"_setDistance":return this._setDistance(i)}return null}get el(){return a(this)}static get watchers(){return{geometries:["geometriesWatchHandler"],disabled:["disabledWatchHandler"]}}};r.style=':host{display:block}.c-container{display:inline-flex}.flex-1{flex:"1"}.padding-end-1{padding-inline-end:1rem}.w-50{width:50%}';
6
+ import{r as t,c as i,h as s,H as e,g as a}from"./p-6d753a3d.js";import{l as n,g as o}from"./p-896c9644.js";import{y as h}from"./p-67b26725.js";import{f as l}from"./p-c1cf3ebc.js";import{s as c}from"./p-f22a4439.js";import"./p-82e085d0.js";import"./p-b85be429.js";import"./p-db50226e.js";import"./p-bdcf99c0.js";const r=class{constructor(s){t(this,s),this.bufferComplete=i(this,"bufferComplete",7),this.distanceChanged=i(this,"distanceChanged",7),this.unitChanged=i(this,"unitChanged",7),this.appearance="text",this.distance=0,this.geometries=[],this.max=void 0,this.min=0,this.sliderTicks=10,this.unionResults=!0,this.unit="meters",this.disabled=!1,this._translations=void 0}geometriesWatchHandler(){this._buffer()}disabledWatchHandler(){this._buffer()}async getTranslatedUnit(t){return this._units||await this._defineTranslations(),this._units[t]}async componentWillLoad(){await this._defineTranslations(),await this._initModules()}render(){return s(e,{key:"63b775eca8dd10785df7b58be3a79eaa6cf4c049"},"text"===this.appearance?this._getTextBoxDisplay():this._getSliderDisplay())}async _defineTranslations(){await this._getTranslations(),this._initTranslatedUnits()}async _initModules(){const[t]=await n(["esri/geometry/geometryEngine"]);this._geometryEngine=t}_initTranslatedUnits(){this._units={feet:this._translations.feet,meters:this._translations.meters,miles:this._translations.miles,kilometers:this._translations.kilometers}}_getUnits(){return Object.keys(this._units).map((t=>s("calcite-option",{label:this._units[t],selected:this.unit===t,value:t})))}_setDistance(t){const i=parseInt(t.target.value,10);this.distance!==i&&i>=this.min&&(this.distanceChanged.emit({oldValue:this.distance,newValue:i}),this.distance=i,this.distance>0?this._buffer():this.bufferComplete.emit(void 0))}_setUnit(t){this.unitChanged.emit({oldValue:this.unit,newValue:t}),this.unit=t,this._buffer()}_buffer(){this.disabled?this.bufferComplete.emit(void 0):(this._bufferTimeout&&clearTimeout(this._bufferTimeout),this._bufferTimeout=setTimeout((()=>{var t;if((null===(t=this.geometries)||void 0===t?void 0:t.length)>0&&this.unit&&this.distance>0){const t=this.geometries[0].spatialReference,i=t.isWGS84||t.isWebMercator?this._geometryEngine.geodesicBuffer(this.geometries,this.distance,this.unit,this.unionResults):this._geometryEngine.buffer(this.geometries,this.distance,this.unit,this.unionResults);this.bufferComplete.emit(i)}}),400))}_getTextBoxDisplay(){return s("div",{class:"c-container"},s("calcite-input",{class:"padding-end-1 w-50",max:this.max&&this.max>0?this.max:void 0,min:this.min,"number-button-type":"vertical",onCalciteInputInput:t=>this._setDistance(t),placeholder:"0",type:"number",value:this.distance?this.distance.toString():void 0}),s("calcite-select",{class:"flex-1 w-50",label:"label",onCalciteSelectChange:()=>this._setUnit(this._unitElement.value),ref:t=>{this._unitElement=t}},this._getUnits()))}_getSliderDisplay(){return s("div",null,s("calcite-slider",{labelHandles:!0,max:this.max&&this.max>0?this.max:void 0,min:this.min,ticks:this.sliderTicks}))}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}_testAccess(t,i){switch(t){case"_setUnit":return this._setUnit(i);case"_setDistance":return this._setDistance(i)}return null}get el(){return a(this)}static get watchers(){return{geometries:["geometriesWatchHandler"],disabled:["disabledWatchHandler"]}}};r.style=':host{display:block}.c-container{display:inline-flex}.flex-1{flex:"1"}.padding-end-1{padding-inline-end:1rem}.w-50{width:50%}';
7
7
  /*!
8
8
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
9
  * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
10
10
  * v2.8.2
11
11
  */
12
- const d={valid:"check-circle",invalid:"exclamation-mark-triangle",idle:"information"},p=class{constructor(i){t(this,i),this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.status="idle"}handleIconEl(){this.requestedIcon=h(d,this.icon,this.status)}connectedCallback(){this.requestedIcon=h(d,this.icon,this.status)}render(){return s(e,{key:"7d7329dbca2d5abb5a9b92dbee9767ba14488caa","calcite-hydrated-hidden":this.el.hidden},this.renderIcon(this.requestedIcon),s("slot",{key:"2fc037f47b40f25698cecdd52df9436da86ecfcf"}))}renderIcon(t){if(t)return s("calcite-icon",{class:"calcite-input-message-icon",flipRtl:this.iconFlipRtl,icon:t,scale:"s"})}get el(){return a(this)}static get watchers(){return{status:["handleIconEl"],icon:["handleIconEl"]}}};p.style=":host{box-sizing:border-box;display:flex;block-size:auto;inline-size:100%;align-items:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);opacity:1;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;--calcite-input-message-spacing-value:0.25rem;margin-block-start:var(--calcite-input-message-spacing-value)}.calcite-input-message-icon{pointer-events:none;display:inline-flex;flex-shrink:0;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;margin-inline-end:0.5rem}:host([status=invalid]) .calcite-input-message-icon{color:var(--calcite-color-status-danger)}:host([status=warning]) .calcite-input-message-icon{color:var(--calcite-color-status-warning)}:host([status=valid]) .calcite-input-message-icon{color:var(--calcite-color-status-success)}:host([status=idle]) .calcite-input-message-icon{color:var(--calcite-color-brand)}:host([scale=s]){font-size:var(--calcite-font-size--3);line-height:0.75rem}:host([scale=m]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([hidden]){display:none}[hidden]{display:none}";const b=class{constructor(s){t(this,s),this.selectionLoadingChange=i(this,"selectionLoadingChange",7),this.sketchGraphicsChange=i(this,"sketchGraphicsChange",7),this.drawUndo=i(this,"drawUndo",7),this.drawRedo=i(this,"drawRedo",7),this.active=!1,this.drawMode=c.SKETCH,this.editGraphicsEnabled=!0,this.graphics=void 0,this.mapView=void 0,this.pointSymbol=void 0,this.polylineSymbol=void 0,this.polygonSymbol=void 0,this.redoEnabled=!1,this.undoEnabled=!1,this._translations=void 0,this._selectionMode=void 0}graphicsWatchHandler(t,i){t&&t.length>0&&JSON.stringify(t)!==JSON.stringify(i)&&this._sketchGraphicsLayer&&(this._updateGraphicsSymbols(t),this._sketchGraphicsLayer.removeAll(),this._sketchGraphicsLayer.addMany(t))}mapViewWatchHandler(t,i){t&&t!==i&&this._init()}async clear(){this._clearSketch()}async updateGraphics(){this._updateGraphics()}async componentWillLoad(){await this._getTranslations(),await this._initModules()}componentDidLoad(){this._init()}disconnectedCallback(){this._sketchWidget.cancel(),this._clearSketch()}render(){const t=this.drawMode===c.SKETCH?"display-none":"esri-widget esri-sketch__panel border-left esri-sketch__section";return s(e,{key:"ab6fe128a5059e5b58ba9dc240f3934142097482"},s("div",{key:"846d66c3aad67b63a2bbbf47325594d2eb35fbb6",class:this.drawMode===c.SKETCH?"border":"border esri-widget esri-sketch__panel"},s("div",{key:"0f439e2c3f4a51413f49ccd1dc6f3524d0e36017",ref:t=>{this._sketchElement=t}}),s("div",{key:"9b755b8df3bb66bf2713969417a29a7059b4f0c9",class:t},s("calcite-action",{key:"f565f8683cf6222232f913a2edb7fcab7e7235c2",disabled:!this.undoEnabled,icon:"undo",onClick:()=>this._undo(),scale:"s",text:this._translations.undo}),s("calcite-action",{key:"fd5d819cf78399c12ffb156035ba38ba41e7cd9b",disabled:!this.redoEnabled,icon:"redo",onClick:()=>this._redo(),scale:"s",text:this._translations.redo}))))}async _initModules(){const[t,i,s]=await n(["esri/layers/GraphicsLayer","esri/widgets/Sketch","esri/widgets/Sketch/SketchViewModel"]);this.GraphicsLayer=t,this.Sketch=i,this.SketchViewModel=s}_init(){this.mapView&&this._sketchElement&&(this._initGraphicsLayer(),this._initSketch())}_initGraphicsLayer(){const t=this._translations.sketchLayer,i=this.mapView.map.layers.findIndex((i=>i.title===t));i>-1?this._sketchGraphicsLayer=this.mapView.map.layers.getItemAt(i):(this._sketchGraphicsLayer=new this.GraphicsLayer({title:t,listMode:"hide"}),l.managedLayers[t]="sketch",this.mapView.map.layers.add(this._sketchGraphicsLayer)),this.graphics&&this.graphics.length>0&&this._sketchGraphicsLayer.addMany(this.graphics)}_initSketch(){const t={layer:this._sketchGraphicsLayer,view:this.mapView,defaultCreateOptions:{mode:"hybrid"},defaultUpdateOptions:{preserveAspectRatio:!1,enableScaling:!1,enableRotation:!1,tool:"reshape",toggleToolOnClick:!1}};this._sketchWidget=new this.Sketch(Object.assign(Object.assign({},t),{container:this._sketchElement,creationMode:"single",visibleElements:{duplicateButton:!1,selectionTools:{"lasso-selection":!1,"rectangle-selection":!1},createTools:{circle:!1},undoRedoMenu:!1,settingsMenu:this.drawMode===c.SKETCH}})),this._sketchViewModel=new this.SketchViewModel(Object.assign({},t)),this._sketchWidget.viewModel.polylineSymbol=this.polylineSymbol,this._sketchWidget.viewModel.pointSymbol=this.pointSymbol,this._sketchWidget.viewModel.polygonSymbol=this.polygonSymbol;let i=!1;this._sketchWidget.on("create",(t=>{"complete"===t.state&&(this.graphics=[t.graphic],this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1}),this.drawMode===c.REFINE&&(i=!0,this._sketchWidget.viewModel.create(t.tool))),"cancel"===t.state&&this.drawMode===c.REFINE&&i&&(i=!i,this._sketchWidget.viewModel.create(t.tool))})),this._sketchWidget.on("update",(t=>{var i;if(this.editGraphicsEnabled){const s=null===(i=null==t?void 0:t.toolEventInfo)||void 0===i?void 0:i.type;"reshape-stop"!==s&&"move-stop"!==s||(this.graphics=t.graphics,this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1}))}else this._sketchWidget.viewModel.cancel(),this._sketchViewModel.cancel()})),this._sketchWidget.on("delete",(()=>{this.graphics=[],this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1})})),this._sketchWidget.on("undo",(t=>{this.graphics=t.graphics,this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1})})),this._sketchWidget.on("redo",(t=>{this.graphics=t.graphics,this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1})}))}_clearSketch(){var t,i;null===(t=this._sketchWidget)||void 0===t||t.viewModel.cancel(),this.graphics=[],null===(i=this._sketchGraphicsLayer)||void 0===i||i.removeAll()}_undo(){this.drawUndo.emit()}_redo(){this.drawRedo.emit()}_updateGraphics(){setTimeout((()=>{1===this.graphics.length&&this._sketchWidget.update(this.graphics,{tool:"reshape",enableRotation:!1,enableScaling:!1,preserveAspectRatio:!1,toggleToolOnClick:!1})}),100)}_updateGraphicsSymbols(t){const i=t[0].geometry.type,s="point"===i?this.pointSymbol:"polyline"===i?this.polylineSymbol:"polygon"===i?this.polygonSymbol:void 0;s&&t.forEach((t=>t.symbol=s))}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}get el(){return a(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};b.style=':host{display:block}.border{outline:1px solid var(--calcite-color-border-input)}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.margin-top-1{margin-top:1rem}.border-left{border-left:1px solid rgba(110,110,110,.3)}.border-left[dir="rtl"]{border-right:1px solid rgba(110,110,110,.3)}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:#fff;--esri-widget-padding-v:12px;--esri-widget-padding-h:15px;--esri-widget-padding:var(--esri-widget-padding-v) var(--esri-widget-padding-h)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row wrap;padding:0;justify-content:flex-start !important}.esri-sketch__section{align-items:center;display:flex;flex-flow:row wrap;padding:0 7px;margin:6px 0}';export{r as buffer_tools,p as calcite_input_message,b as map_draw_tools}
12
+ const d={valid:"check-circle",invalid:"exclamation-mark-triangle",idle:"information"},p=class{constructor(i){t(this,i),this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.status="idle"}handleIconEl(){this.requestedIcon=h(d,this.icon,this.status)}connectedCallback(){this.requestedIcon=h(d,this.icon,this.status)}render(){return s(e,{key:"7d7329dbca2d5abb5a9b92dbee9767ba14488caa","calcite-hydrated-hidden":this.el.hidden},this.renderIcon(this.requestedIcon),s("slot",{key:"2fc037f47b40f25698cecdd52df9436da86ecfcf"}))}renderIcon(t){if(t)return s("calcite-icon",{class:"calcite-input-message-icon",flipRtl:this.iconFlipRtl,icon:t,scale:"s"})}get el(){return a(this)}static get watchers(){return{status:["handleIconEl"],icon:["handleIconEl"]}}};p.style=":host{box-sizing:border-box;display:flex;block-size:auto;inline-size:100%;align-items:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);opacity:1;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;--calcite-input-message-spacing-value:0.25rem;margin-block-start:var(--calcite-input-message-spacing-value)}.calcite-input-message-icon{pointer-events:none;display:inline-flex;flex-shrink:0;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;margin-inline-end:0.5rem}:host([status=invalid]) .calcite-input-message-icon{color:var(--calcite-color-status-danger)}:host([status=warning]) .calcite-input-message-icon{color:var(--calcite-color-status-warning)}:host([status=valid]) .calcite-input-message-icon{color:var(--calcite-color-status-success)}:host([status=idle]) .calcite-input-message-icon{color:var(--calcite-color-brand)}:host([scale=s]){font-size:var(--calcite-font-size--3);line-height:0.75rem}:host([scale=m]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([hidden]){display:none}[hidden]{display:none}";const g=class{constructor(s){t(this,s),this.selectionLoadingChange=i(this,"selectionLoadingChange",7),this.sketchGraphicsChange=i(this,"sketchGraphicsChange",7),this.drawUndo=i(this,"drawUndo",7),this.drawRedo=i(this,"drawRedo",7),this.active=!1,this.drawMode=l.SKETCH,this.editGraphicsEnabled=!0,this.graphics=void 0,this.mapView=void 0,this.pointSymbol=void 0,this.polylineSymbol=void 0,this.polygonSymbol=void 0,this.redoEnabled=!1,this.undoEnabled=!1,this._translations=void 0,this._selectionMode=void 0}graphicsWatchHandler(t,i){t&&t.length>0&&JSON.stringify(t)!==JSON.stringify(i)&&this._sketchGraphicsLayer&&(this._updateGraphicsSymbols(t),this._sketchGraphicsLayer.removeAll(),this._sketchGraphicsLayer.addMany(t))}mapViewWatchHandler(t,i){t&&t!==i&&this._init()}async clear(){this._clearSketch()}async updateGraphics(){this._updateGraphics()}async componentWillLoad(){await this._getTranslations(),await this._initModules()}componentDidLoad(){this._init()}disconnectedCallback(){this._sketchWidget.cancel(),this._clearSketch()}render(){const t=this.drawMode===l.SKETCH?"display-none":"esri-widget esri-sketch__panel border-left esri-sketch__section";return s(e,{key:"ab6fe128a5059e5b58ba9dc240f3934142097482"},s("div",{key:"846d66c3aad67b63a2bbbf47325594d2eb35fbb6",class:this.drawMode===l.SKETCH?"border":"border esri-widget esri-sketch__panel"},s("div",{key:"0f439e2c3f4a51413f49ccd1dc6f3524d0e36017",ref:t=>{this._sketchElement=t}}),s("div",{key:"9b755b8df3bb66bf2713969417a29a7059b4f0c9",class:t},s("calcite-action",{key:"f565f8683cf6222232f913a2edb7fcab7e7235c2",disabled:!this.undoEnabled,icon:"undo",onClick:()=>this._undo(),scale:"s",text:this._translations.undo}),s("calcite-action",{key:"fd5d819cf78399c12ffb156035ba38ba41e7cd9b",disabled:!this.redoEnabled,icon:"redo",onClick:()=>this._redo(),scale:"s",text:this._translations.redo}))))}async _initModules(){const[t,i,s]=await n(["esri/layers/GraphicsLayer","esri/widgets/Sketch","esri/widgets/Sketch/SketchViewModel"]);this.GraphicsLayer=t,this.Sketch=i,this.SketchViewModel=s}_init(){this.mapView&&this._sketchElement&&(this._initGraphicsLayer(),this._initSketch())}_initGraphicsLayer(){const t=this._translations.sketchLayer,i=this.mapView.map.layers.findIndex((i=>i.title===t));i>-1?this._sketchGraphicsLayer=this.mapView.map.layers.getItemAt(i):(this._sketchGraphicsLayer=new this.GraphicsLayer({title:t,listMode:"hide"}),c.managedLayers[t]="sketch",this.mapView.map.layers.add(this._sketchGraphicsLayer)),this.graphics&&this.graphics.length>0&&this._sketchGraphicsLayer.addMany(this.graphics)}_initSketch(){const t={layer:this._sketchGraphicsLayer,view:this.mapView,defaultCreateOptions:{mode:"hybrid"},defaultUpdateOptions:{preserveAspectRatio:!1,enableScaling:!1,enableRotation:!1,tool:"reshape",toggleToolOnClick:!1}};this._sketchWidget=new this.Sketch(Object.assign(Object.assign({},t),{container:this._sketchElement,creationMode:"single",visibleElements:{duplicateButton:!1,selectionTools:{"lasso-selection":!1,"rectangle-selection":!1},createTools:{circle:!1},undoRedoMenu:!1,settingsMenu:this.drawMode===l.SKETCH}})),this._sketchViewModel=new this.SketchViewModel(Object.assign({},t)),this._sketchWidget.viewModel.polylineSymbol=this.polylineSymbol,this._sketchWidget.viewModel.pointSymbol=this.pointSymbol,this._sketchWidget.viewModel.polygonSymbol=this.polygonSymbol;let i=!1;this._sketchWidget.on("create",(t=>{"complete"===t.state&&(this.graphics=[t.graphic],this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1}),this.drawMode===l.REFINE&&(i=!0,this._sketchWidget.viewModel.create(t.tool))),"cancel"===t.state&&this.drawMode===l.REFINE&&i&&(i=!i,this._sketchWidget.viewModel.create(t.tool))})),this._sketchWidget.on("update",(t=>{var i;if(this.editGraphicsEnabled){const s=null===(i=null==t?void 0:t.toolEventInfo)||void 0===i?void 0:i.type;"reshape-stop"!==s&&"move-stop"!==s||(this.graphics=t.graphics,this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1}))}else this._sketchWidget.viewModel.cancel(),this._sketchViewModel.cancel()})),this._sketchWidget.on("delete",(()=>{this.graphics=[],this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1})})),this._sketchWidget.on("undo",(t=>{this.graphics=t.graphics,this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1})})),this._sketchWidget.on("redo",(t=>{this.graphics=t.graphics,this.sketchGraphicsChange.emit({graphics:this.graphics,useOIDs:!1})}))}_clearSketch(){var t,i;null===(t=this._sketchWidget)||void 0===t||t.viewModel.cancel(),this.graphics=[],null===(i=this._sketchGraphicsLayer)||void 0===i||i.removeAll()}_undo(){this.drawUndo.emit()}_redo(){this.drawRedo.emit()}_updateGraphics(){setTimeout((()=>{1===this.graphics.length&&this._sketchWidget.update(this.graphics,{tool:"reshape",enableRotation:!1,enableScaling:!1,preserveAspectRatio:!1,toggleToolOnClick:!1})}),100)}_updateGraphicsSymbols(t){const i=t[0].geometry.type,s="point"===i?this.pointSymbol:"polyline"===i?this.polylineSymbol:"polygon"===i?this.polygonSymbol:void 0;s&&t.forEach((t=>t.symbol=s))}async _getTranslations(){const t=await o(this.el);this._translations=t[0]}get el(){return a(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};g.style=':host{display:block}.border{outline:1px solid var(--calcite-color-border-input)}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.margin-top-1{margin-top:1rem}.border-left{border-left:1px solid rgba(110,110,110,.3)}.border-left[dir="rtl"]{border-right:1px solid rgba(110,110,110,.3)}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:#fff;--esri-widget-padding-v:12px;--esri-widget-padding-h:15px;--esri-widget-padding:var(--esri-widget-padding-v) var(--esri-widget-padding-h)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row wrap;padding:0;justify-content:flex-start !important}.esri-sketch__section{align-items:center;display:flex;flex-flow:row wrap;padding:0 7px;margin:6px 0}';export{r as buffer_tools,p as calcite_input_message,g as map_draw_tools}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{h as e,r as i,f as t,g as n}from"./p-6d753a3d.js";import{h as a,g as s,v as l,a as r,i as c,b as o,c as d,d as v,s as p,e as u,f as g,u as h,j as f,k as m}from"./p-614ebce7.js";import{a as y}from"./p-82e085d0.js";import{l as b}from"./p-4ba6f8f0.js";import"./p-bdcf99c0.js";const _=96;function w(e){return e?e/72*_:0}var k={exports:{}};!function(e){var i,t="http://www.w3.org/",n="".concat(t,"2000/svg"),a="".concat(t,"1999/xlink"),s=[],l=function(e,i){var t={};return Object.keys(e).forEach((function(i){t[i]=e[i]})),i&&Object.keys(i).forEach((function(e){t[e]=i[e]})),t},r=function(e,i){return e.vnodeSelector===i.vnodeSelector&&(e.properties&&i.properties?e.properties.key===i.properties.key&&e.properties.bind===i.properties.bind:!e.properties&&!i.properties)},c=function(e){if("string"!=typeof e)throw new Error("Style values must be strings")},o=function(e,i,t){if(""!==i.vnodeSelector)for(var n=t;n<e.length;n++)if(r(e[n],i))return n;return-1},d=function(e,i,t,n){var a=e[i];if(""!==a.vnodeSelector){var s=a.properties;if(!(s?void 0===s.key?s.bind:s.key:void 0))for(var l=0;l<e.length;l++)if(l!==i&&r(e[l],a))throw{error:new Error("".concat(t.vnodeSelector," had a ").concat(a.vnodeSelector," child ").concat("added"===n?n:"removed",", but there is now more than one. You must add unique key properties to make them distinguishable.")),parentNode:t,childNode:a}}},v=function(e){if(e.properties){var i=e.properties.enterAnimation;i&&i(e.domNode,e.properties)}},p=[],u=!1,g=function(e){(e.children||[]).forEach(g),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},h=function(){u=!1,p.forEach(g),p.length=0},f=function(e){p.push(e),u||(u=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(h,{timeout:16}):setTimeout(h,16))},m=function(e){var i=e.domNode;if(e.properties){var t=e.properties.exitAnimation;if(t){i.style.pointerEvents="none";return void t(i,(function(){i.parentNode&&(i.parentNode.removeChild(i),f(e))}),e.properties)}}i.parentNode&&(i.parentNode.removeChild(i),f(e))},y=function(e,i,t){(function(e,i,t){if(i)for(var n=0,a=i;n<a.length;n++)b(a[n],e,void 0,t)})(e,i.children,t),i.text&&(e.textContent=i.text),function(e,i,t){if(i)for(var s=t.eventHandlerInterceptor,l=Object.keys(i),r=l.length,o=function(r){var o,d=l[r],v=i[d];if("className"===d)throw new Error('Property "className" is not supported, use "class".');if("class"===d)_(e,v,!0);else if("classes"===d)for(var p=Object.keys(v),u=p.length,g=0;g<u;g++){var h=p[g];v[h]&&e.classList.add(h)}else if("styles"===d){var f=Object.keys(v),m=f.length;for(g=0;g<m;g++){var y=f[g],b=v[y];b&&(c(b),t.styleApplyer(e,y,b))}}else if("key"!==d&&null!=v){var w=typeof v;"function"===w?(0===d.lastIndexOf("on",0)&&(s&&(v=s(d,v,e,i)),"oninput"===d&&(o=v,v=function(e){o.apply(this,[e]),e.target["oninput-value"]=e.target.value})),e[d]=v):t.namespace===n?"href"===d?e.setAttributeNS(a,d,v):e.setAttribute(d,v):"string"===w&&"value"!==d&&"innerHTML"!==d?e.setAttribute(d,v):e[d]=v}},d=0;d<r;d++)o(d)}(e,i.properties,t),i.properties&&i.properties.afterCreate&&i.properties.afterCreate.apply(i.properties.bind||i.properties,[e,t,i.vnodeSelector,i.properties,i.children])},b=function(e,i,t,a){var s,r,c=0,o=e.vnodeSelector,d=i.ownerDocument;if(""===o)e.domNode?e.domNode.nodeValue=e.text:(r=e.domNode=d.createTextNode(e.text),void 0!==t?i.insertBefore(r,t):i.appendChild(r));else{for(var v=0;v<=o.length;++v){var p=o.charAt(v);if(v===o.length||"."===p||"#"===p){var u=o.charAt(c-1),g=o.slice(c,v);"."===u?r.classList.add(g):"#"===u?r.id=g:("svg"===g&&(a=l(a,{namespace:n})),void 0!==a.namespace?r=e.domNode=d.createElementNS(a.namespace,g):(r=e.domNode=e.domNode||((null===(s=e.properties)||void 0===s?void 0:s.is)?d.createElement(g,{is:e.properties.is}):d.createElement(g)),"input"===g&&e.properties&&void 0!==e.properties.type&&r.setAttribute("type",e.properties.type)),void 0!==t?i.insertBefore(r,t):r.parentNode!==i&&i.appendChild(r)),c=v+1}}y(r,e,a)}},_=function(e,i,t){i&&i.split(" ").forEach((function(i){i&&e.classList.toggle(i,t)}))};i=function(e,t,p){var u=e.domNode,g=!1;if(e===t)return!1;var h=!1;if(""===t.vnodeSelector){if(t.text!==e.text){var f=u.ownerDocument.createTextNode(t.text);return u.parentNode.replaceChild(f,u),t.domNode=f,!0}t.domNode=u}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(p=l(p,{namespace:n})),e.text!==t.text&&(h=!0,void 0===t.text?u.removeChild(u.firstChild):u.textContent=t.text),t.domNode=u,h=function(e,t,n,a,l){if(n===a)return!1;for(var c,p=(n=n||s).length,u=(a=a||s).length,g=0,h=0,f=!1;h<u;){var y=g<p?n[g]:void 0,_=a[h];if(void 0!==y&&r(y,_))f=i(y,_,l)||f,g++;else{var w=o(n,_,g+1);if(w>=0){for(c=g;c<w;c++)m(n[c]),d(n,c,e,"removed");f=i(n[w],_,l)||f,g=w+1}else b(_,t,g<p?n[g].domNode:void 0,l),v(_),d(a,h,e,"added")}h++}if(p>g)for(c=g;c<p;c++)m(n[c]),d(n,c,e,"removed");return f}(t,u,e.children,t.children,p)||h,h=function(e,i,t,s){if(t){for(var l=!1,r=Object.keys(t),o=r.length,d=0;d<o;d++){var v=r[d],p=t[v],u=i[v];if("class"===v)u!==p&&(_(e,u,!1),_(e,p,!0));else if("classes"===v)for(var g=e.classList,h=Object.keys(p),f=h.length,m=0;m<f;m++){var y=h[m],b=!!p[y];b!==!!u[y]&&(l=!0,b?g.add(y):g.remove(y))}else if("styles"===v){var w=Object.keys(p),k=w.length;for(m=0;m<k;m++){var x=w[m],L=p[x];L!==u[x]&&(l=!0,L?(c(L),s.styleApplyer(e,x,L)):s.styleApplyer(e,x,""))}}else if(p||"string"!=typeof u||(p=""),"value"===v){var $=e[v];$!==p&&(e["oninput-value"]?$===e["oninput-value"]:p!==u)&&(e[v]=p,e["oninput-value"]=void 0),p!==u&&(l=!0)}else if(p!==u){var j=typeof p;"function"===j&&s.eventHandlerInterceptor||(s.namespace===n?"href"===v?e.setAttributeNS(a,v,p):e.setAttribute(v,p):"string"===j&&"innerHTML"!==v?"role"===v&&""===p?e.removeAttribute(v):e.setAttribute(v,p):e[v]!==p&&(e[v]=p),l=!0)}}return l}}(u,e.properties,t.properties,p)||h,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[u,p,t.vnodeSelector,t.properties,t.children]);return h&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(u,t.properties,e.properties),g};var w=function(e,t){return{getLastRender:function(){return e},update:function(n){if(e.vnodeSelector!==n.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var a=e;e=n,i(a,n,t)},domNode:e.domNode}},k={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(e,i,t){"-"===i.charAt(0)?e.style.setProperty(i,t):e.style[i]=t}},x=function(e){return l(k,e)},L={create:function(e,i){return i=x(i),b(e,document.createElement("div"),void 0,i),w(e,i)},append:function(e,i,t){return t=x(t),b(i,e,void 0,t),w(i,t)},insertBefore:function(e,i,t){return t=x(t),b(i,e.parentNode,e,t),w(i,t)},merge:function(e,i,t){return t=x(t),i.domNode=e,y(e,i,t),w(i,t)},replace:function(e,i,t){return t=x(t),b(i,e.parentNode,e,t),e.parentNode.removeChild(e),w(i,t)}},$=function(e,i,t){for(var n=0,a=i.length;n<a;n++){var s=i[n];Array.isArray(s)?$(e,s,t):null!=s&&!1!==s&&("string"==typeof s&&(s={vnodeSelector:"",properties:void 0,children:void 0,text:s.toString(),domNode:null}),t.push(s))}};var j;j=Array.prototype.find?function(e,i){return e.find(i)}:function(e,i){return e.filter(i)[0]};var O=function(e,i,t){return function(){return n};function n(n){t("domEvent",n);var a=i(),s=function(e,i){for(var t=[];e&&e!==i;)t.push(e),e=e.parentNode;return t}(n.currentTarget,a.domNode);s.reverse();var l,r=function(e,i){var t=e;return i.forEach((function(e){t=t&&t.children?j(t.children,(function(i){return i.domNode===e})):void 0})),t}(a.getLastRender(),s);return e.scheduleRender(),r&&(l=r.properties["on".concat(n.type)].apply(r.properties.bind||this,arguments)),t("domEventProcessed",n),l}};e.createCache=function(){var e,i;return{invalidate:function(){i=void 0,e=void 0},result:function(t,n){if(e)for(var a=0;a<t.length;a++)e[a]!==t[a]&&(i=void 0);return i||(i=n(),e=t),i}}},e.createMapping=function(e,i,t){var n=[],a=[];return{results:a,map:function(s){for(var l=s.map(e),r=a.slice(),c=0,o=0;o<s.length;o++){var d=s[o],v=l[o];if(v===n[c])a[o]=r[c],t(d,r[c],o),c++;else{for(var p=!1,u=1;u<n.length+1;u++){var g=(c+u)%n.length;if(n[g]===v){a[o]=r[g],t(s[o],r[g],o),c=g+1,p=!0;break}}p||(a[o]=i(d,o))}}a.length=s.length,n=l}}},e.createProjector=function(e){var i,t,n=x(e),a=n.performanceLogger,s=!0,l=!1,r=[],c=[],o=function(e,t,s){var l;n.eventHandlerInterceptor=O(i,(function(){return l}),a),l=e(t,s(),n),r.push(l),c.push(s)},d=function(){if(t=void 0,s){s=!1,a("renderStart",void 0);for(var e=0;e<r.length;e++){var i=c[e]();a("rendered",void 0),r[e].update(i),a("patched",void 0)}a("renderDone",void 0),s=!0}};return i={renderNow:d,scheduleRender:function(){t||l||(t=requestAnimationFrame(d))},stop:function(){t&&(cancelAnimationFrame(t),t=void 0),l=!0},resume:function(){l=!1,s=!0,i.scheduleRender()},append:function(e,i){o(L.append,e,i)},insertBefore:function(e,i){o(L.insertBefore,e,i)},merge:function(e,i){o(L.merge,e,i)},replace:function(e,i){o(L.replace,e,i)},detach:function(e){for(var i=0;i<c.length;i++)if(c[i]===e)return c.splice(i,1),r.splice(i,1)[0];throw new Error("renderFunction was not found")}}},e.dom=L,e.h=function(e,i,t){if(Array.isArray(i))t=i,i=void 0;else if(i&&("string"==typeof i||i.vnodeSelector)||t&&("string"==typeof t||t.vnodeSelector))throw new Error("h called with invalid arguments");var n,a;return t&&1===t.length&&"string"==typeof t[0]?n=t[0]:t&&($(e,t,a=[]),0===a.length&&(a=void 0)),{vnodeSelector:e,properties:i,children:a,text:""===n?void 0:n,domNode:null}}}(k.exports);const x=k.exports.createProjector(),L=20,$={univariateAboveAndBelowSymbol:"esri-univariate-above-and-below-ramp__symbol",colorRamp:"esri-legend__color-ramp"};function j(i="vertical"){const t="stroke:rgb(200, 200, 200);stroke-width:1";return"vertical"===i?e("svg",{height:"4",width:"10"},e("line",{x1:"0",y1:"2",x2:"10",y2:"2",style:t})):e("svg",{height:"10",width:"10"},e("line",{x1:"5",y1:"0",x2:"5",y2:"10",style:t}))}function O(e,i="vertical"){const t=document.createElement("div");return t.style.height=`${L}px`,t.className=$.univariateAboveAndBelowSymbol,null!=e&&(t.style.opacity=e.toString()),x.append(t,j.bind(null,i)),t}function z(e,i,t="vertical",n){e.infos.forEach(((e,a)=>{if(n&&2===a)e.preview=O(i,t);else{const{size:i}=e,n=w(i)+("horizontal"===t?20:10),a="div"===e.preview.tagName.toLowerCase(),s=a?e.preview:document.createElement("div");s&&(s.className=$.univariateAboveAndBelowSymbol),"horizontal"===t?s&&(s.style.width=`${n}px`):s&&(s.style.height=`${n}px`),a||s&&s.appendChild(e.preview),e.preview=s}}))}function R(e,i="classic"){const t=e.infos,n=t[0].size,a=t[t.length-1].size;return"classic"===i?(w(n)+10)/2:(w(n)-w(a))/2}async function E(e,i){if(!e)return Promise.resolve(null);const t=e.infos.map((e=>e.color)),[n]=await b(["esri/symbols/support/symbolUtils"]),a=n.renderColorRampPreviewHTML("full"===i.type?t:"above"===i.type?t.slice(0,3):t.slice(2,5),{width:i.width,height:i.height,align:i.rampAlignment,effectList:i.effectList});return a.className=$.colorRamp,null!=i.opacity&&(a.style.opacity=i.opacity.toString()),Promise.resolve(a)}function A(e,i,t,n="vertical"){const a=function(e,i,t,n="vertical"){let a=0;const s=e.infos,l=Math.floor(s.length/2),r="full"===i||"below"===i?s.length-1:l;for(let e="full"===i||"above"===i?0:l;e<=r;e++)a+=t&&e===l?"horizontal"===n?10:L:w(s[e].size)+("horizontal"===n?20:10);return Math.round(a)}(e,i,t,n),s=e.infos,l=Math.floor(s.length/2),r="full"===i||"above"===i?0:l,c="full"===i||"below"===i?s.length-1:l,o=t?"vertical"===n?L:10:0,d="vertical"===n?10*("full"===i?2:1):20*("full"===i?2:1);return Math.round(a-(w("full"===i?s[r].size+s[c].size:"above"===i?s[r].size:s[c].size)/2+o/2+d/2))}const F="esri-legend__layer-body",M="esri-legend__layer-row",I="esri-legend__layer-cell esri-legend__layer-cell--info",T="esri-legend__layer-cell esri-legend__layer-cell--symbols",C="esri-legend__symbol",N="esri-legend__ramps",S="esri-legend__size-ramp",P="esri-legend__ramp-labels",H="esri-legend__ramp-label",D="esri-univariate-above-and-below-ramp__label",q={display:"flex",alignItems:"flex-start"},B={marginLeft:"3px"},U={display:"table-cell",verticalAlign:"middle"},V=class{constructor(e){i(this,e),this.calculatingFeatureCount=!1,this.legendvm=void 0,this.zoomTo=!1,this.featureCount=!1,this.filterMode={type:"filter"},this.messages=void 0,this.isLoading=!0,this.intLegendId=void 0}handleFilterModeChange(){a(this.filterMode,this.legendvm.view)}async componentWillLoad(){new MutationObserver((()=>{t(this.el)})).observe(this.el,{attributes:!0});const[e,i,n]=await b(["esri/intl","esri/core/reactiveUtils","esri/core/Handles"]);this.reactiveUtils=i,this.handles=new n,this.intl=e}async componentDidLoad(){this.initLegend()}async initLegend(){try{await this.reactiveUtils.whenOnce((()=>{var e;return null===(e=this.legendvm)||void 0===e?void 0:e.view}));const e=async()=>{var e,i,t,n;try{const a=await(null===(t=null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.view)||void 0===i?void 0:i.map)||void 0===t?void 0:t.load());await(null===(n=null==a?void 0:a.basemap)||void 0===n?void 0:n.load());const s=null==a?void 0:a.allLayers,l=null==s?void 0:s.map((e=>e.load())),r=(await Promise.allSettled(l)).map((e=>"fulfilled"===(null==e?void 0:e.status)&&(null==e?void 0:e.value)?e.value:null)).filter((e=>!!e)),o=[];r.forEach((e=>{var i;(null===(i=this.legendvm)||void 0===i?void 0:i.view)&&o.push(this.legendvm.view.whenLayerView(e))})),await Promise.allSettled(o);const d=await u(this.legendvm,this.reactiveUtils);p.set("data",Object.assign(Object.assign({},c.data),d)),this.isLoading=!1,this.setupWatchersAndListeners()}catch(e){console.error(e),this.isLoading=!1}};this.legendvm.view.when(e),this.legendvm.view.map.layers.on("after-changes",e)}catch(e){this.isLoading=!1}}disconnectedCallback(){var e,i;null===(e=this.handles)||void 0===e||e.removeAll(),null===(i=this.handles)||void 0===i||i.destroy(),this.handles=null}render(){var i,t,n;const a=this.renderFilteredLayers();return this.isLoading?e("calcite-loader",{key:"interactive-legend-loader",scale:"m",label:null===(i=this.messages)||void 0===i?void 0:i.loading,text:null===(t=this.messages)||void 0===t?void 0:t.loading}):e("div",{key:"interactive-legend-classic-container",class:s(this.el)},(null==a?void 0:a.length)>0?a:e("div",{class:"esri-legend__message"},null===(n=this.messages)||void 0===n?void 0:n.noLegend))}renderFilteredLayers(){var e,i;return(null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.activeLayerInfos)||void 0===i?void 0:i.toArray()).map((e=>this.renderLegendForLayer(e))).filter((e=>!!e))}renderLegendForLayer(i,t){var n,a;if(!i.ready)return null;if(i.children.length){const a=i.children.map((e=>this.renderLegendForLayer(e,!0))).toArray();return e("instant-apps-interactive-legend-group-legend-element",{class:s(this.el),legendvm:this.legendvm,featureCount:this.featureCount,activeLayerInfo:i,isChild:t},e("div",{style:{paddingLeft:"20px"},id:`${null===(n=null==i?void 0:i.layer)||void 0===n?void 0:n.id}-legend-layer`,slot:"content"},a))}const l=i.legendElements;if(l&&!l.length)return null;const r=l.map(((e,t)=>this.renderLegendForElement(e,i.layer,i.effectList,i,t))).filter((e=>!!e));return r.length?e("instant-apps-interactive-legend-layer-element",{class:s(this.el),legendvm:this.legendvm,featureCount:this.featureCount,activeLayerInfo:i,messages:this.messages,isChild:t},e("div",{slot:"content",id:`${null===(a=null==i?void 0:i.layer)||void 0===a?void 0:a.id}-legend-layer`,class:"esri-legend__layer"},r)):null}renderLegendForElement(i,t,n,a,r,c,o){const d="color-ramp"===i.type,v="opacity-ramp"===i.type,p="size-ramp"===i.type;let u=null;const g=l(a,i,r),h="relationship-ramp"===(null==i?void 0:i.type);if("symbol-table"===i.type||p){const s=i.infos.map(((e,s)=>this.renderLegendForElementInfo(e,t,n,p,i,a,r,s,g,o||null))).filter((e=>!!e));s.length&&(u=e("div",{class:F},s))}else"color-ramp"===i.type||"opacity-ramp"===i.type||"heatmap-ramp"===i.type||"stretch-ramp"===i.type?u=this.renderLegendForRamp(i,t.opacity):"relationship-ramp"===i.type?u=e("instant-apps-interactive-legend-relationship",{class:s(this.el),key:"relationship-ramp",filterMode:this.filterMode,activeLayerInfo:a,legendElement:i,messages:this.messages}):"pie-chart-ramp"===i.type?u=this.renderPieChartRamp(i):"univariate-above-and-below-ramp"===i.type?u=this.renderUnivariateAboveAndBelowRamp(i,t.opacity,n):"univariate-color-size-ramp"===i.type&&(u=this.renderUnivariateColorSizeRamp(i,t.opacity,n));if(!u)return null;const f=i.title;let m=null;if("string"==typeof f)m=f;else if(f){const e=this.getTitle(this.messages,f,d||v);m=this.isRendererTitle(f,d||v)&&f.title?`${f.title} (${e})`:e}return e("instant-apps-interactive-legend-legend-element",{class:s(this.el),activeLayerInfo:a,isSizeRamp:p,isChild:c,isColorRamp:d,isRelationshipRamp:h,isInteractive:g,zoomTo:this.zoomTo,legendElement:i,titleText:m,legendvm:this.legendvm,legendElementIndex:r,messages:this.messages},e("div",{slot:"content"},u))}renderPieChartRamp(i){var t;return e("div",{innerHTML:`${null===(t=i.preview)||void 0===t?void 0:t.outerHTML}`})}async renderUnivariateAboveAndBelowRamp(i,t,n){const{sizeRampElement:a,colorRampElement:s}=function(e,i,t="vertical"){const n=e.infos;let a=n.find((({type:e})=>"size-ramp"===e)),s=n.find((({type:e})=>"color-ramp"===e));return a&&(a=Object.assign({},a),a.infos=[...a.infos],z(a,i,t,!0)),s&&(s=Object.assign({},s),s.infos=[...s.infos]),"horizontal"===t&&(null==a||a.infos.reverse(),null==s||s.infos.reverse()),{sizeRampElement:a,colorRampElement:s}}(i,t);if(!a)return null;const l=A(a,"above",!0),r=A(a,"below",!0),c=await E(s,{width:12,height:l,rampAlignment:"vertical",opacity:t,type:"above",effectList:n}),o=await E(s,{width:12,height:r,rampAlignment:"vertical",opacity:t,type:"below",effectList:n}),d=R(a),v=a.infos.map((e=>e.label)),p=v.map(((i,t)=>{const n=2===t;return 0===t?e("div",{class:i?c?D:H:""},i):n?e("div",null):null})),u=v.length-1,g=Math.floor(v.length/2),h=v.map(((i,t)=>t===g||t===u?e("div",{class:i?c?D:H:""},i):null)),f={display:"table-cell",verticalAlign:"middle"},m={marginTop:`${d}px`},y={height:`${l}px`},b={height:`${r}px`};return e("div",{key:"univariate-above-and-below-ramp-preview",style:q},e("div",{class:F},a.infos.map(((i,t)=>e("div",{class:`${M} ${S}`},e("div",{class:C,style:f,innerHTML:`${i.preview.outerHTML}`}),c||t%2!=0?null:e("div",{class:I},v[t]))))),c?e("div",{style:m,key:"color-ramp-preview"},e("div",{style:B},e("div",{style:U},e("div",{class:N},c)),e("div",{style:U},e("div",{class:P,style:y},p))),e("div",{style:B},e("div",{style:U},e("div",{class:N},o)),e("div",{style:U},e("div",{class:P,style:b},h)))):null)}renderUnivariateColorSizeRamp(i,t,n){const{sizeRampElement:a,colorRampElement:s}=function(e,i="vertical"){const t=e.infos;let n=t.find((({type:e})=>"size-ramp"===e)),a=t.find((({type:e})=>"color-ramp"===e));return n&&(n=Object.assign({},n),n.infos=[...n.infos],z(n,null,i,!1)),a&&(a=Object.assign({},a),a.infos=[...a.infos]),"horizontal"===i&&(null==n||n.infos.reverse(),null==a||a.infos.reverse()),{sizeRampElement:n,colorRampElement:a}}(i);if(!a)return null;const l=R(a),r=A(a,"full",!1),c=E(s,{width:12,height:r,rampAlignment:"vertical",opacity:t,type:"full",effectList:n}),o=a.infos.length-1,d=a.infos.map(((i,t)=>0===t||t===o?e("div",{class:i.label?s?D:H:""},i.label):null)),v={display:"table-cell",verticalAlign:"middle"},p={marginTop:`${l}px`},u={height:`${r}px`};return e("div",{key:"univariate-above-and-below-ramp-preview",style:q},e("div",{class:F},a.infos.map((i=>e("div",{class:`${M} ${S}`},e("div",{class:C,style:v,innerHTML:`${i.preview.outerHTML}`}))))),e("div",{style:p,key:"color-ramp-preview"},e("div",{style:B},e("div",{style:U},e("div",{class:N},c)),e("div",{style:U},e("div",{class:P,style:u},d)))))}renderLegendForRamp(i,t){var n;const a=i.infos,s="heatmap-ramp"===i.type,l="stretch-ramp"===i.type,r=i.preview,c="opacity-ramp"===i.type?"esri-legend__opacity-ramp":"";r&&(r.classList.add("esri-legend__color-ramp"),c&&r.classList.add(c)),null!=t&&r&&(r.style.opacity=t.toString());const o=a.map((i=>e("div",{class:i.label?H:""},s?this.messages[i.label]||i.label:l?this.getStretchStopLabel(i):i.label))),d={height:null===(n=null==r?void 0:r.style)||void 0===n?void 0:n.height};return e("div",{class:M},e("div",{class:T,style:Object.assign({},{width:"24px"})},e("div",{ref:e=>{var i;(null==e?void 0:e.firstChild)&&(null===(i=null==e?void 0:e.firstChild)||void 0===i||i.remove()),null==e||e.appendChild(r)},class:N})),e("div",{class:I},e("div",{class:P,style:Object.assign({},d)},o)))}getStretchStopLabel(e){return e.label?this.messages[e.label]+": "+("string"==typeof e.value?e.value:this.intl.formatNumber(e.value,{style:"decimal",notation:e.value.toString().includes("e")?"scientific":"standard"})):""}renderLegendForElementInfo(i,t,n,a,l,v,p,u,g,h){var f,y;if(i.type)return this.renderLegendForElement(i,t,n,v,p,!0,i);let b;if(i.preview?b=e("div",{class:C,innerHTML:`${i.preview.outerHTML}`}):i.src&&(b=this.renderImage(i,t,!1)),!b)return null;const _=a?` ${S}`:"";let w;const k=m(t),x=r(k,h);if(c.data){const e=o(k,t,i,x,u),n=d(x?null==x?void 0:x.nestedInfos:k);w=1===(null===(f=null==k?void 0:k.categories)||void 0===f?void 0:f.size)?!(null==e?void 0:e.selected):n||(null==e?void 0:e.selected)}return x&&!(null==i?void 0:i.value)||!g?e("div",{class:M},e("div",{class:`${T}${_}`},b),e("div",{class:`${I}`},this.getTitle(this.messages,i.label,!1)||"")):e("button",{onClick:this.applyFilter(i,t,u,h),class:`${M} instant-apps-interactive-legend__layer-row--interactive${w?" instant-apps-interactive-legend-element-info--selected":""}`},e("div",{class:`${T}${_}`},b),e("div",{class:`${I}`},this.getTitle(this.messages,i.label,!1)||""),this.featureCount?e("instant-apps-interactive-legend-count",{class:s(this.el),categoryId:x?l.title:null!==(y=i.label)&&void 0!==y?y:null==t?void 0:t.id,activeLayerInfo:v,legendvm:this.legendvm,messages:this.messages,selected:w,legendElement:l,infoIndex:u}):null)}renderImage(i,t,n){const{label:a,src:s,opacity:l}=i,r=n?" esri-legend__imagery-layer-image--stretched":"",c=n?"":` ${C}`,o={opacity:`${null!=l?l:t.opacity}`};return e("img",{alt:this.getTitle(this.messages,a,!1),src:s,width:i.width,height:i.height,class:`$${r}${c}`,style:o})}getTitle(e,i,t){var n,a;if(!i)return;if("string"==typeof i||"number"==typeof i)return i;if("value"in i||"unit"in i)return this.intl.substitute(null!==(n=null==e?void 0:e.dotValue)&&void 0!==n?n:"",i);if("colorName"in i||"bandName"in i)return e[i.colorName]+": "+(e[i.bandName]||i.bandName);if("showCount"in i)return i.showCount?e.clusterCountTitle:null;let s=null;return this.isRampTitle(i,t)?s=i.ratioPercentTotal?"showRatioPercentTotal":i.ratioPercent?"showRatioPercent":i.ratio?"showRatio":i.normField?"showNormField":i.field?"showField":null:this.isRendererTitle(i,t)&&(s=i.normField?"showNormField":i.normByPct?"showNormPct":i.field?"showField":null),s?null===(a=this.intl)||void 0===a?void 0:a.substitute("showField"===s?"{field}":e[s],{field:i.field,normField:i.normField}):""}isRampTitle(e,i){return i}isRendererTitle(e,i){return!i}setupWatchersAndListeners(){var e,i,n,a,s,l,r;const o=null===(a=null===(n=null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.view)||void 0===i?void 0:i.map)||void 0===n?void 0:n.allLayers)||void 0===a?void 0:a.filter((e=>"feature"===(null==e?void 0:e.type)));o.forEach((async e=>{var i,t,n,a;try{const s=await(null===(t=null===(i=this.legendvm)||void 0===i?void 0:i.view)||void 0===t?void 0:t.whenLayerView(e)),l=`fLayerViewScale-${null==e?void 0:e.id}`;(null===(n=this.handles)||void 0===n?void 0:n.has(l))||null===(a=this.handles)||void 0===a||a.add(s.watch("visibleAtCurrentScale",(async()=>this.createDataForLayer(e))),l)}catch(e){}})),null==o||o.forEach((e=>{var i,t,n;const a=`fLayer-${null==e?void 0:e.id}`;(null===(i=this.handles)||void 0===i?void 0:i.has(a))||null===(t=this.handles)||void 0===t||t.add(null===(n=this.reactiveUtils)||void 0===n?void 0:n.watch((()=>null==e?void 0:e.visible),(async()=>this.createDataForLayer(e))),a)})),null===(s=this.handles)||void 0===s||s.add(this.reactiveUtils.when((()=>this.legendvm),(()=>{this.reactiveUtils.watch((()=>{var e,i;return null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.view)||void 0===i?void 0:i.updating}),(()=>{var e,i;this.calculatingFeatureCount||(null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.view)||void 0===i?void 0:i.updating)&&(this.calculatingFeatureCount=!0,this.reactiveUtils.when((()=>{var e,i;return!(null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.view)||void 0===i?void 0:i.updating)}),(async()=>{const e=await v(this.legendvm,c.data);p.set("data",Object.assign(Object.assign({},c.data),e)),this.calculatingFeatureCount=!1}),{once:!0,initial:!0}))}),{initial:!0})}),{initial:!0,once:!0})),null===(l=this.handles)||void 0===l||l.add(this.reactiveUtils.on((()=>{var e;return null===(e=this.legendvm)||void 0===e?void 0:e.activeLayerInfos}),"change",(async e=>{var i;const n=await u(this.legendvm,this.reactiveUtils);p.set("data",Object.assign(Object.assign({},c.data),n)),t(this.el),null===(i=this.handles)||void 0===i||i.add(this.reactiveUtils.on((()=>e.children),"change",(async()=>{const e=await u(this.legendvm,this.reactiveUtils);p.set("data",Object.assign(Object.assign({},c.data),e)),t(this.el)})))}))),null===(r=this.handles)||void 0===r||r.add(this.reactiveUtils.on((()=>{var e,i,t;return null===(t=null===(i=null===(e=this.legendvm)||void 0===e?void 0:e.view)||void 0===i?void 0:i.map)||void 0===t?void 0:t.layers}),"after-changes",(async()=>{const e=await v(this.legendvm,c.data);p.set("data",Object.assign(Object.assign({},c.data),e)),this.calculatingFeatureCount=!1})))}async createDataForLayer(e){var i,t;const n=p.get("data"),a=null==n?void 0:n[null==e?void 0:e.id],s=null===(t=null===(i=this.legendvm)||void 0===i?void 0:i.activeLayerInfos)||void 0===t?void 0:t.find((i=>{var t;return(null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.id)===(null==e?void 0:e.id)}));if(!a&&s){const i=await g(this.legendvm,s,this.reactiveUtils);if(h({intLegendLayerData:i,layerId:null==e?void 0:e.id}),this.featureCount){const e=await v(this.legendvm,c.data);p.set("data",Object.assign(Object.assign({},c.data),e))}}}applyFilter(e,i,t,n){return async()=>{var a;const s=Object.assign({},null===(a=c.data)||void 0===a?void 0:a[null==i?void 0:i.id]);n?await f(s,e,t,this.filterMode,n):await f(s,e,t,this.filterMode),h({intLegendLayerData:s,layerId:null==i?void 0:i.id})}}get el(){return n(this)}static get watchers(){return{filterMode:["handleFilterModeChange"]}}};V.style=".sc-instant-apps-interactive-legend-classic-h{display:block;--instant-apps-interactive-legend-heading-font-size:1rem;--instant-apps-interactive-legend-heading-font-weight:normal;--instant-apps-interactive-legend-caption-font-weight:normal;--instant-apps-interactive-legend-secondary-color:var(--calcite-color-text-1);--instant-apps-interactive-legend-field-name-font-size:1rem;--instant-apps-interactive-legend-total-feature-count-font-size:0.875rem;--instant-apps-interactive-legend-info-font-size:0.875rem;--instant-apps-interactive-legend-info-item-background--selected:#c7ebff;--instant-apps-interactive-legend-info-item-background--selected--dark:#009af2;--instant-apps-interactive-legend-info-item-background--hover:#e9e9e9;--instant-apps-interactive-legend-info-item-background--hover--dark:#4a4a4a;--instant-apps-interactive-legend-info-item-color--selected:var(--calcite-color-text-2);--instant-apps-interactive-legend-secondary-background-color:var(--calcite-color-background);--instant-apps-interactive-legend-ui-margin:20px 15px;--instant-apps-interactive-legend-ui-padding:20px 15px}.sc-instant-apps-interactive-legend-classic-h .esri-legend__service.sc-instant-apps-interactive-legend-classic{padding:0}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-body.sc-instant-apps-interactive-legend-classic,.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer.sc-instant-apps-interactive-legend-classic,.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-table.sc-instant-apps-interactive-legend-classic,.sc-instant-apps-interactive-legend-classic-h .esri-legend__group-layer-child.sc-instant-apps-interactive-legend-classic,.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-child-table.sc-instant-apps-interactive-legend-classic{margin:0;overflow:hidden}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-classic{display:flex;align-items:center;font-size:var(--instant-apps-interactive-legend-field-name-font-size);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-classic calcite-action.sc-instant-apps-interactive-legend-classic{margin-right:5px}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-caption-btn-container.sc-instant-apps-interactive-legend-classic{white-space:nowrap}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-caption-btn-container.sc-instant-apps-interactive-legend-classic calcite-button.sc-instant-apps-interactive-legend-classic{margin:2px}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-classic{font-weight:var(--instant-apps-interactive-legend-caption-font-weight)}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-cell.esri-legend__layer-cell--info.sc-instant-apps-interactive-legend-classic{font-size:var(--instant-apps-interactive-legend-info-font-size);text-align:left}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-cell.sc-instant-apps-interactive-legend-classic,.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-row.sc-instant-apps-interactive-legend-classic{display:flex;align-items:center}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__non-interactive.sc-instant-apps-interactive-legend-classic .esri-legend__layer-body.sc-instant-apps-interactive-legend-classic{display:block;margin:var(--instant-apps-interactive-legend-ui-margin)}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__non-interactive.instant-apps-interactive-legend__nested-unique-symbol.sc-instant-apps-interactive-legend-classic>.esri-legend__layer-body.sc-instant-apps-interactive-legend-classic{margin:0}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__non-interactive.sc-instant-apps-interactive-legend-classic .esri-legend__layer-row.sc-instant-apps-interactive-legend-classic{display:table-row}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__non-interactive.sc-instant-apps-interactive-legend-classic .esri-legend__layer-cell.sc-instant-apps-interactive-legend-classic{display:table-cell}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-cell--symbols.sc-instant-apps-interactive-legend-classic{justify-content:center;width:20%}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-cell--info.sc-instant-apps-interactive-legend-classic{width:65%}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic{margin:1px;background:transparent;border:none;width:100%}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-cell--info.sc-instant-apps-interactive-legend-classic{color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-row.sc-instant-apps-interactive-legend-classic,.sc-instant-apps-interactive-legend-classic-h .esri-legend__layer-caption.sc-instant-apps-interactive-legend-classic{padding:var(--instant-apps-interactive-legend-ui-padding)}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic{position:relative}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend-element-info--selected.sc-instant-apps-interactive-legend-classic{background-color:var(--instant-apps-interactive-legend-info-item-background--selected)}.sc-instant-apps-interactive-legend-classic-h .calcite-mode-dark.sc-instant-apps-interactive-legend-classic .instant-apps-interactive-legend-element-info--selected.sc-instant-apps-interactive-legend-classic{cursor:pointer;background-color:var(--instant-apps-interactive-legend-info-item-background--selected--dark)}.sc-instant-apps-interactive-legend-classic-h .calcite-mode-dark.sc-instant-apps-interactive-legend-classic .instant-apps-interactive-legend-element-info--selected.sc-instant-apps-interactive-legend-classic .esri-legend__layer-cell--info.sc-instant-apps-interactive-legend-classic{color:var(--calcite-color-text-inverse)}.sc-instant-apps-interactive-legend-classic-h .hide.sc-instant-apps-interactive-legend-classic{display:none}@media (min-width: 992px){.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic{cursor:pointer}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover)}.sc-instant-apps-interactive-legend-classic-h .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic:hover.instant-apps-interactive-legend-element-info--selected{background-color:#e2f2fe}.sc-instant-apps-interactive-legend-classic-h .calcite-mode-dark.sc-instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover--dark)}.sc-instant-apps-interactive-legend-classic-h .calcite-mode-dark.sc-instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive.sc-instant-apps-interactive-legend-classic:hover.instant-apps-interactive-legend-element-info--selected{background-color:#26a9f4}}";export{V as instant_apps_interactive_legend_classic}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,c as n,h as i,H as s,g as e}from"./p-6d753a3d.js";import{l as o}from"./p-4ba6f8f0.js";import{g as a}from"./p-6bdafe3f.js";import{g as r}from"./p-c96eb2db.js";import"./p-82e085d0.js";import"./p-deb3adb8.js";const p="instant-apps-export calcite-mode-light",l="instant-apps-export-print",h="instant-apps-export-print__content-container",c="instant-apps-export-print__extra-container",d="instant-apps-export-print__legend-container",u="instant-apps-export-print__compass-container",v="instant-apps-export-print__scale-bar-container",x="instant-apps-export-print__popup-container",b="instant-apps-export-print__popup-content",_="instant-apps-export-print__popup-title",g="instant-apps-export-print__view",f="instant-apps-export-print__view-container",m="instant-apps-export-print__view-wrapper",w="instant-app-export-drag",k=class{constructor(i){t(this,i),this.exportOutputUpdated=n(this,"exportOutputUpdated",7),this.output=void 0,this.beforeExport=()=>Promise.resolve(),this.popoverIcon="export",this.extraContent=void 0,this.extraContentLabel=void 0,this.headerTitle="",this.includeExtraContent=!0,this.includeLegend=!0,this.includeMap=!0,this.includePopup=!1,this.mode="popover",this.popoverPositioning="absolute",this.popoverPlacement="auto",this.scale="m",this.showHeaderTitle=!0,this.showIncludeLegend=!0,this.showIncludeMap=!1,this.showIncludePopup=!0,this.showScaleBar=!1,this.view=void 0,this.maskBackground="rgba(255, 51, 0, 0.1)",this.maskBorder="2px dashed rgb(255, 51, 0)",this.baseClass=p,this.exportIsLoading=void 0,this.messages=void 0}watchIncludeMap(t){t&&this.updateLegend()}watchView(){this.handleIncludePopup()}async componentWillLoad(){this.baseClass="dark"===r(this.el)?"instant-apps-export calcite-mode-dark":p,a(this),await this.initializeModules()}componentDidLoad(){this.printContainerEl.prepend(this.printEl),this.handleIncludePopup()}async initializeModules(){const[t,n]=await o(["esri/core/Handles","esri/core/reactiveUtils"]);return this.handles=new t,this.reactiveUtils=n,Promise.resolve()}render(){const t="popover"===this.mode?this.renderPopover():this.renderPanel(),n=this.renderCompass();return i(s,null,i("div",{class:this.baseClass,onMouseEnter:this.handleWidgetCreation.bind(this),onFocusin:this.handleWidgetCreation.bind(this)},t,i("div",{class:"instant-apps-export__visually-hidden"},n)))}renderPopover(){var t,n,s;const e=this.renderPanel();return[i("calcite-popover",{referenceElement:"export-popover-btn",label:null===(t=this.messages)||void 0===t?void 0:t.exportPopover,overlayPositioning:this.popoverPositioning,placement:this.popoverPlacement,autoClose:!0,ref:t=>this.popoverEl=t},e),i("calcite-action",{id:"export-popover-btn",alignment:"center",icon:this.popoverIcon,scale:this.scale,title:null===(n=this.messages)||void 0===n?void 0:n.exportBtn,text:null===(s=this.messages)||void 0===s?void 0:s.exportBtn})]}renderPanel(){var t,n;const s=this.showHeaderTitle?this.renderTitle():null,e=null!=this.extraContent?this.renderSwitch("includeExtraContent",this.extraContentLabel):null,o=this.showIncludeMap?this.renderSwitch("includeMap"):null,a=this.includeMap?this.renderMapOptions():null,r=this.renderPrint();return i("div",{class:"inline"===this.mode?"instant-apps-export__inline-container":"instant-apps-export__popover-container"},s,e,o,a,this.includeMap?i("calcite-button",{appearance:"transparent",width:"full",onClick:this.setMapAreaOnClick.bind(this),disabled:this.exportIsLoading},null===(t=this.messages)||void 0===t?void 0:t.setMapArea):null,i("calcite-button",{width:"full",onClick:this.exportOnClick.bind(this),disabled:this.exportIsLoading},null===(n=this.messages)||void 0===n?void 0:n.export),r)}renderTitle(){var t;return i("calcite-label",null,null===(t=this.messages)||void 0===t?void 0:t.title,i("calcite-input",{value:this.headerTitle,onCalciteInputInput:this.updateHeaderTitle.bind(this)}))}renderSwitch(t,n){var s;const e=null!=n?n:null===(s=this.messages)||void 0===s?void 0:s[t];return i("calcite-label",{layout:"inline-space-between"},e,i("calcite-switch",{checked:this[t],value:t,onCalciteSwitchChange:this.optionOnChange.bind(this)}))}renderMapOptions(){const t=this.showIncludeLegend?this.renderSwitch("includeLegend"):null,n=this.showIncludePopup?this.renderSwitch("includePopup"):null;return i("div",null,t,n)}renderPrint(){const t=this.includeMap?this.renderPrintMap():null,n=this.renderExtraContent(),s=this.includeMap&&this.showIncludeLegend?this.renderLegend():null,e=this.includeMap&&this.showIncludePopup?this.renderPopup():null;return i("div",{ref:t=>this.printContainerEl=t},i("div",{class:l,ref:t=>this.printEl=t},t,s,i("div",{class:h},e,n)))}renderPrintMap(){return i("div",{class:f,ref:t=>this.viewContainerEl=t},i("div",{class:m,ref:t=>this.viewWrapperEl=t},this.headerTitle?i("instant-apps-header",{titleText:this.headerTitle,backgroundColor:"#fff",textColor:"#323232"}):null,i("img",{class:g,ref:t=>this.viewEl=t}),i("div",{class:v,ref:t=>this.scaleBarContainerEl=t})))}renderLegend(){return i("div",{class:d,ref:t=>this.legendContainerEl=t})}renderCompass(){return i("div",{class:u,ref:t=>this.compassContainerEl=t})}renderPopup(){return i("div",{class:x,ref:t=>this.popupContainerEl=t},i("div",{ref:t=>this.popupTitleEl=t,class:_}),i("div",{ref:t=>this.popupContentEl=t,class:b}))}renderExtraContent(){return i("div",{class:c,id:"export-content",ref:t=>this.extraContainerEl=t})}optionOnChange(t){const{checked:n,value:i}=t.target;this[i]=n,this.updateExportOutput()}updateHeaderTitle(t){this.headerTitle=t.target.value,this.updateExportOutput()}async exportOnClick(){this.removeScreenshotElements(),await this.beforeExport(),null==this.viewWrapperEl||this.viewWrapperEl.contains(this.compassContainerEl)||this.viewWrapperEl.append(this.compassContainerEl),this.handleViewExportOnClick(),null!=this.popoverEl&&(this.popoverEl.open=!1)}async handleViewExportOnClick(){null!=this.view?(this.addPrintStyling(),document.body.prepend(this.printEl),this.handleExtraContent(),this.includeMap?(this.updateScaleBar(),this.updatePopupToPrint(),this.viewScreenshot(),this.handleImgLoaded()):this.handleImgLoaded()):null!=this.popoverEl&&(this.popoverEl.open=!1)}addPrintStyling(){null==this.printStyleEl&&(this.printStyleEl=document.createElement("style"),this.printStyleEl.innerHTML='\n @media print {\n @page {\n size: Portrait;\n margin: .25in;\n }\n\n html, body {\n padding: 0;\n margin: 0;\n height: 100%;\n width: 100%;\n }\n\n body > *:not(.instant-apps-export-print) { display: none; }\n }\n\n * {\n -webkit-print-color-adjust: exact;\n color-adjust: exact;\n }\n\n\n .instant-apps-export-print {\n height: 100%;\n width: 100%;\n position: absolute;\n z-index: -999;\n color: #323232 !important;\n display: grid;\n gap: 24px;\n grid-auto-flow: row;\n --esri-calcite-mode-name: "light";\n }\n\n .instant-apps-export-print, .instant-apps-export-print * {\n box-sizing: border-box;\n }\n\n .instant-apps-export-print__view-section {\n height: 100%;\n }\n\n .instant-apps-export-print__view-container {\n height: 100%;\n width: 100%;\n display: flex;\n justify-content: center;\n }\n\n .instant-apps-export-print__view-wrapper {\n height: fit-content;\n width: fit-content;\n position: relative;\n display: flex;\n flex-direction: column;\n border: 2pt solid #323232;\n overflow: hidden;\n }\n\n .instant-apps-export-print__view {\n object-fit: contain;\n }\n\n .instant-apps-export-print__popup-container {\n height: min-content;\n max-width: 350px;\n display: none;\n color: #323232;\n background: #fff;\n border: 1pt solid #323232;\n break-inside: avoid;\n }\n\n .instant-apps-export-print__popup-title {\n border-bottom: 1pt solid #323232;\n }\n\n .instant-apps-export-print__popup-content {\n background: #fff;\n padding-top: 8pt;\n }\n\n .instant-apps-export-print__popup-content .esri-feature-media__chart {\n background: #fff;\n }\n\n .instant-apps-export-print__legend-container {\n height: min-content;\n background: #fff;\n overflow: unset;\n }\n\n .esri-legend--card, .esri-legend--card__service-content {\n flex-flow: row wrap;\n }\n\n .instant-apps-export-print .esri-widget > *:not(.esri-scale-bar.esri-widget > *) {\n background: #fff;\n color: #323232;\n }\n\n .instant-apps-export-print__popup-content * {\n color: #323232;\n }\n\n .instant-apps-export-print .esri-widget__heading {\n margin: 2pt 7pt;\n padding: 0;\n color: #323232;\n }\n\n .instant-apps-export-print .esri-legend__ramp-label:before {\n border-color: rgba(0,0,0,0) rgba(50,50,50,.8) rgba(0,0,0,0) rgba(0,0,0,0);\n }\n\n .instant-apps-export-print .esri-legend--card__section {\n padding: 4pt 0 4pt;\n min-width: unset;\n border-left: none;\n }\n\n .instant-apps-export-print .esri-legend--card__section:first-child {\n border-left: none;\n }\n\n .instant-apps-export-print .esri-legend--card__service {\n border: none;\n flex: 0 1 auto;\n break-inside: avoid;\n }\n\n .instant-apps-export-print .esri-legend--card {\n border: none;\n gap: 6pt 12pt;\n }\n\n .instant-apps-export-print .esri-legend--card:not(:first-child),\n .instant-apps-export-print .esri-compass.esri-widget:not(:first-child) {\n display: none;\n }\n\n .instant-apps-export-print .esri-legend--card__service-caption-container {\n height: unset;\n padding: 0;\n border-bottom: none;\n }\n\n .instant-apps-export-print .esri-legend--card__service-caption-text {\n padding-bottom: 4px;\n }\n\n .instant-apps-export-print__compass-container {\n position: absolute;\n top: 65px;\n left: 15px;\n background: #fff;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n --calcite-ui-icon-color: #000;\n border-radius: 50%;\n height: fit-content;\n }\n\n .instant-apps-export-print__compass-container .esri-compass {\n background: #fff;\n }\n\n .instant-apps-export-print__compass-container .esri-compass__icon.esri-icon-compass {\n color: #000;\n }\n\n .instant-apps-export-print__compass-container.esri-compass.esri-widget--button {\n background: #fff;\n }\n\n .instant-apps-export-print__scale-bar-container {\n width: 100%;\n position: absolute;\n bottom: 15px;\n margin: 0 15px;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__label {\n color: #323232;\n font-size: 10px;\n padding: 0 4px;\n }\n \n .instant-apps-export-print__scale-bar-container--position .esri-scale-bar__label {\n height: 10px;\n padding: 0 2px;\n line-height: 11px;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__bar-container:nth-child(1n+3) {\n display: none;\n }\n\n .instant-apps-export-print__scale-bar-container--position .esri-scale-bar__bar-container.esri-scale-bar__bar-container--line {\n align-items: center;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line {\n background-color: rgba(255, 255, 255, 0.66);\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--top {\n width: var(--instant-apps-scale-bar-top) !important;\n border-bottom: 2px solid #323232;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--bottom {\n width: var(--instant-apps-scale-bar-bottom) !important;\n border-top: 2px solid #323232;\n }\n\n .instant-apps-export-print__scale-bar-container--position .esri-scale-bar__label-container--line {\n position: unset;\n margin: 0 2px;\n background-color: rgba(255, 255, 255, 0.66);\n height: 10px;\n display: flex;\n align-items: center;\n }\n\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--top:before,\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--top:after,\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--bottom:before,\n .instant-apps-export-print__scale-bar-container .esri-scale-bar__line--bottom:after {\n background-color: #323232;\n border-right: 2px solid #323232;\n }\n\n .instant-apps-export-print__popup-container .esri-feature-media__item-navigation {\n display: none;\n }\n\n .instant-apps-export-print__popup-container .esri-feature-media__chart.esri-feature-media__chart--rendered * {\n width: 100%!important;\n }\n\n .instant-apps-export-print__popup-content .esri-popup__content {\n margin: 0;\n }\n\n .instant-apps-export-print__content-container {\n display: flex;\n gap: 24px;\n break-inside: avoid;\n break-before: auto;\n }',document.body.prepend(this.printStyleEl))}handleImgLoaded(){this.exportIsLoading=!0,setTimeout((()=>{this.exportIsLoading=void 0,this.setupViewPrintElements()}),1500)}handleExtraContent(){const t=this.printEl.querySelector("#export-content");null!=t&&(t.innerHTML="",null!=this.extraContent&&this.includeExtraContent?(t.style.display="block",t.append(this.extraContent.cloneNode(!0))):t.style.display="none")}resetPrintContent(){var t,n;if(null!=this.view){this.screenshot=null,null===(t=this.printContainerEl)||void 0===t||t.prepend(this.printEl),null===(n=this.printStyleEl)||void 0===n||n.remove(),this.printStyleEl=void 0;const i=this.printEl.querySelector("#export-content");i&&(i.innerHTML="")}}async updatePopupToPrint(){var t,n;if(null!=this.view&&(null!=this.popupContainerEl&&(this.popupContainerEl.style.display=this.includePopup&&this.view.popup.visible?"block":"none",this.checkPopupOpen()),this.view.popup.visible&&null!=this.view.popup.selectedFeature)){const i=document.createElement(`h${null!==(t=this.view.popup.headingLevel)&&void 0!==t?t:2}`);i.innerHTML=null!==(n=this.view.popup.title)&&void 0!==n?n:"",i.className="esri-widget__heading esri-popup__header-title",null!=this.popupTitleEl&&(this.popupTitleEl.style.display=this.view.popup.title?"block":"none",this.popupTitleEl.innerHTML="",this.popupTitleEl.prepend(i))}}updateExportOutput(){this.output={},this.showHeaderTitle&&(this.output.headerTitle=this.headerTitle),this.showIncludeLegend&&(this.output.includeLegend=this.includeLegend),this.showIncludeMap&&(this.output.includeMap=this.includeMap),this.showIncludePopup&&(this.output.includePopup=this.includePopup),this.exportOutputUpdated.emit()}setupViewPrintElements(){if(null!=this.view){this.handleLegendSetup();const t=document.title;this.showHeaderTitle&&this.headerTitle&&(document.title=this.headerTitle),window.print(),document.title=t,setTimeout((()=>{this.resetPrintContent()}),1e3)}}handleLegendSetup(){var t;if(this.showIncludeLegend&&null!=this.view&&this.includeMap&&null!=this.legendContainerEl){const n=null!=this.legend&&(null===(t=this.legend.activeLayerInfos)||void 0===t?void 0:t.length)>0;this.legendContainerEl.style.display=this.includeLegend&&n?"block":"none"}}handleWidgetCreation(){this.includeMap&&(this.handleLegendCreation(),this.handleCompassCreation())}handleIncludePopup(){var t,n;if(this.showIncludePopup){const i="includePopup";null===(t=this.handles)||void 0===t||t.remove(i),null===(n=this.reactiveUtils)||void 0===n||n.whenOnce((()=>{var t;return null===(t=this.view)||void 0===t?void 0:t.ready})).then((()=>{var t;null===(t=this.handles)||void 0===t||t.add(this.reactiveUtils.watch((()=>{var t,n;return null===(n=null===(t=this.view)||void 0===t?void 0:t.popup)||void 0===n?void 0:n.visible}),(t=>{this.includePopup=t})),i)}))}}handleLegendCreation(){var t,n,i,s,e;if(null!=this.view&&this.showIncludeLegend&&null!=this.legendContainerEl){const o=this.view.map,a=null===(n=null===(t=this.legend)||void 0===t?void 0:t.view)||void 0===n?void 0:n.map;null!=(null===(i=null==o?void 0:o.portalItem)||void 0===i?void 0:i.id)&&(null===(s=null==o?void 0:o.portalItem)||void 0===s?void 0:s.id)===(null===(e=null==a?void 0:a.portalItem)||void 0===e?void 0:e.id)||this.updateLegend()}}updateLegend(){var t;null===(t=this.view)||void 0===t||t.when((async t=>{if(null!=this.legend&&(this.legend.destroy(),this.legend=null),null!=this.legendContainerEl){this.legendContainerEl.innerHTML="";const n=document.createElement("div");this.legendContainerEl.append(n);const[i]=await o(["esri/widgets/Legend"]);this.legend=new i({container:n,view:t,style:{type:"card",layout:"side-by-side"}})}}))}handleCompassCreation(){var t,n,i,s;if(null!=this.view&&null!=this.compassContainerEl){const e=this.view.map,o=null===(n=null===(t=this.compass)||void 0===t?void 0:t.view)||void 0===n?void 0:n.map;(null===(i=null==e?void 0:e.portalItem)||void 0===i?void 0:i.id)===(null===(s=null==o?void 0:o.portalItem)||void 0===s?void 0:s.id)||this.updateCompass()}}updateCompass(){var t;null===(t=this.view)||void 0===t||t.when((async t=>{var n;null===(n=this.compass)||void 0===n||n.destroy(),this.compass=null;const i=document.createElement("div");this.compassContainerEl.append(i);const[s]=await o(["esri/widgets/Compass"]);this.compass=new s({container:i,view:t})}))}updateScaleBar(){if(this.scaleBarContainerEl&&null!=this.view&&(this.scaleBarContainerEl.innerHTML="",this.showScaleBar)){const t=this.view.ui.getComponents(),n=null==t?void 0:t.find((({container:t})=>{var n;return null===(n=null==t?void 0:t.className)||void 0===n?void 0:n.includes("esri-scale-bar")}));null!=(null==n?void 0:n.container)&&"string"!=typeof n.container&&this.scaleBarContainerEl.append(n.container.cloneNode(!0))}}async viewScreenshot(){var t;if(null!=this.view&&this.includeMap&&(null==this.screenshot&&(null===(t=this.scaleBarContainerEl)||void 0===t||t.classList.toggle("instant-apps-export-print__scale-bar-container--position",this.view.width>1e3),this.screenshot=await this.view.takeScreenshot({width:2*this.view.width,height:2*this.view.height})),this.handleScaleBarSize(),null!=this.viewEl&&null!=this.viewWrapperEl)){const{height:t,width:n}=this.screenshot.data;t>n?this.setMaxRowHeightOnViewContainer():this.setMaxWidthOnViewContainer(),this.viewEl.src=this.screenshot.dataUrl}}setMaxRowHeightOnViewContainer(){this.printEl.style.gridTemplateRows="minmax(auto, 70%)",this.viewEl.style.height="100%",this.viewEl.style.width="",this.viewWrapperEl.style.height="100%",this.viewWrapperEl.style.width="fit-content"}setMaxWidthOnViewContainer(){this.printEl.style.gridTemplateRows="",this.viewEl.style.width="100%",this.viewEl.style.height="",this.viewWrapperEl.style.height="fit-content",this.viewWrapperEl.style.width="100%"}checkPopupOpen(){if(null!=this.view){const t=this.view.popup.container,n=null==t?void 0:t.querySelector(".esri-popup .esri-feature__main-container");if(null!=n){const t=n.querySelectorAll("canvas");this.popupContentEl.innerHTML="",this.popupContentEl.append(n.cloneNode(!0));const i=this.popupContentEl.querySelectorAll("canvas");t.forEach(((t,n)=>{var s;const e=t.toDataURL(),o=document.createElement("img");o.src=e;const a=t.getAttribute("style");a&&o.setAttribute("style",a);const r=i[n];null!=r&&(r.replaceWith(o),document.querySelector("link[href*='esri/themes/dark/main.css']")&&null!=(null===(s=o.parentElement)||void 0===s?void 0:s.parentElement)&&(o.parentElement.style.background="#242424",o.parentElement.parentElement.style.background="#242424"))}))}}}createScreenshot(){var t,n;if(null!=this.view){this.screenshotPreview=document.createElement("div"),this.screenshotPreview.className="screenshot-preview hide",this.screenshotImgContainer=document.createElement("div"),this.screenshotImgContainer.className="screenshot-img-container",this.screenshotImg=document.createElement("img");const i=document.createElement("div"),s=document.createElement("calcite-button"),e=document.createElement("calcite-button");s.innerHTML=null===(t=this.messages)||void 0===t?void 0:t.export,e.innerHTML=null===(n=this.messages)||void 0===n?void 0:n.returnToMap,e.appearance="outline-fill",s.onclick=this.exportOnClick.bind(this),e.onclick=this.screenshotReturn.bind(this),i.append(e,s),this.screenshotImgContainer.append(this.screenshotImg,i),this.screenshotPreview.append(this.screenshotImgContainer),this.view.container.append(this.screenshotPreview)}}createMaskDiv(){null!=this.view&&(this.maskDivEl=document.createElement("div"),this.maskDivEl.id="screenshot-mask",this.maskDivEl.className="hide screenshot-cursor",this.maskDivEl.style.setProperty("--instant-apps-screenshot-mask-background",this.maskBackground),this.maskDivEl.style.setProperty("--instant-apps-screenshot-mask-border",this.maskBorder),this.screenshotStyle=document.createElement("style"),this.screenshotStyle.innerHTML="\n.screenshot-preview.hide, .hide {\n display: none;\n}\n\n.screenshot-cursor {\n cursor: crosshair;\n}\n\n.relative {\n position: relative;\n}\n\n#screenshot-mask {\n position: absolute;\n background: var(--instant-apps-screenshot-mask-background);\n border: var(--instant-apps-screenshot-mask-border);\n}\n\n.screenshot-preview {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n text-align: center;\n background-color: rgba(0, 0, 0, 0.75);\n}\n\n.screenshot-preview * {\n box-sizing: border-box;\n}\n\n.screenshot-img-container img {\n max-height: 75%;\n max-width: 75%;\n object-fit: contain;\n border: 10px solid white;\n box-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.5);\n margin-bottom: 0.5em;\n}\n\n.screenshot-img-container {\n height: 100%;\n width: 100%;\n overflow-y: auto;\n margin-bottom: 8px;\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n}\n\n.screenshot-img-container calcite-button {\n margin: 5px;\n}",this.view.container.append(this.screenshotStyle),this.view.container.append(this.maskDivEl))}screenshotReturn(){this.removeScreenshotElements(),this.exportIsLoading=!1,this.screenshot=null}setMapAreaOnClick(){null!=this.view&&(this.exportIsLoading=!0,this.createMaskDiv(),this.createScreenshot(),this.view.container.classList.add("screenshot-cursor","relative"),this.view.addHandles(this.view.on("drag",(async t=>{null!=this.view&&(t.stopPropagation(),"end"!==t.action?this.updateMaskSize(t):this.maskScreenshot())})),w))}updateMaskSize(t){if(null!=this.view){const n=this.clamp(Math.min(t.origin.x,t.x),0,this.view.width),i=this.clamp(Math.max(t.origin.x,t.x),0,this.view.width),s=this.clamp(Math.min(t.origin.y,t.y),0,this.view.height),e=this.clamp(Math.max(t.origin.y,t.y),0,this.view.height);this.area={x:n,y:s,width:i-n,height:e-s},this.setMaskPosition(this.area)}}maskScreenshot(){var t;if(null!=this.view&&null!=this.area){this.view.removeHandles(w);const n=this.area.height,i=this.area.width;this.showScaleBar&&(null===(t=this.scaleBarContainerEl)||void 0===t||t.classList.toggle("instant-apps-export-print__scale-bar-container--position",this.view.width>1e3&&.75*this.view.width<i)),this.view.takeScreenshot({area:this.area,width:2*i,height:2*n,format:"jpg"}).then((t=>{var n;this.screenshot=t,this.showPreview(),null===(n=this.view)||void 0===n||n.container.classList.remove("screenshot-cursor"),this.setMaskPosition(null)}))}}setMaskPosition(t){null!=t?(this.maskDivEl.classList.remove("hide"),this.maskDivEl.style.left=`${t.x}px`,this.maskDivEl.style.top=`${t.y}px`,this.maskDivEl.style.width=`${t.width}px`,this.maskDivEl.style.height=`${t.height}px`):this.maskDivEl.remove()}clamp(t,n,i){return t<n?n:t>i?i:t}showPreview(){this.screenshotPreview.classList.remove("hide"),null!=this.screenshotImg&&null!=this.screenshot&&(this.screenshotImg.src=this.screenshot.dataUrl)}handleScaleBarSize(){var t;if(this.showScaleBar&&"2d"===(null===(t=this.view)||void 0===t?void 0:t.type)&&null!=this.scaleBarContainerEl){const t=this.scaleBarContainerEl.querySelector(".esri-scale-bar__line--top"),n=this.scaleBarContainerEl.querySelector(".esri-scale-bar__line--bottom");this.setScalebarWidth(t,"top"),this.setScalebarWidth(n,"bottom")}}setScalebarWidth(t,n){var i;if(null!=t&&null!=this.screenshot){const s=this.screenshot.data.width/2,e=Number(t.style.width.replace("px",""));null===(i=this.scaleBarContainerEl)||void 0===i||i.style.setProperty(`--instant-apps-scale-bar-${n}`,e/s*100+"%")}}removeScreenshotElements(){var t,n;null===(t=this.screenshotPreview)||void 0===t||t.remove(),null===(n=this.screenshotStyle)||void 0===n||n.remove()}get el(){return e(this)}static get watchers(){return{includeMap:["watchIncludeMap"],view:["watchView"]}}};k.style=":host{display:block;--instant-apps-export-action-background:var(--calcite-color-foreground-1);--instant-apps-export-action-background-hover:var(--calcite-color-foreground-2);--instant-apps-export-action-background-press:var(--calcite-color-foreground-3);--instant-apps-export-action-height:100%;--instant-apps-export-action-width:fit-content;--instant-apps-export-action-icon-color:var(--calcite-color-text-3);--instant-apps-export-action-icon-hover-color:var(--calcite-color-text-1);--instant-apps-export-background:var(--calcite-color-foreground-1);--instant-apps-export-text-color:var(--calcite-color-text-1);--instant-apps-export-popover-width:250px}.instant-apps-export{height:100%}.instant-apps-export *{box-sizing:border-box}.instant-apps-export__popover-container,.instant-apps-export__inline-container{padding:12px;background:var(--instant-apps-export-background);--calcite-color-text-1:var(--instant-apps-export-text-color)}.instant-apps-export__popover-container{width:var(--instant-apps-export-popover-width)}.instant-apps-export calcite-action{height:var(--instant-apps-export-action-height);width:var(--instant-apps-export-action-width);--calcite-color-foreground-1:var(--instant-apps-export-action-background);--calcite-color-foreground-2:var(--instant-apps-export-action-background-hover);--calcite-color-foreground-3:var(--instant-apps-export-action-background-press);--calcite-color-text-3:var(--instant-apps-export-action-icon-color);--calcite-color-text-1:var(--instant-apps-export-action-icon-hover-color)}.instant-apps-export .instant-apps-export-print{display:none}.instant-apps-export__visually-hidden{position:absolute;top:0;z-index:-1;visibility:hidden}.instant-apps-export calcite-input{--calcite-color-foreground-1:var(--instant-apps-export-background);--calcite-color-text-1:var(--instant-apps-export-text-color)}.instant-apps-export calcite-popover{--calcite-color-foreground-1:var(--instant-apps-export-background)}.instant-apps-export calcite-switch{--calcite-color-foreground-1:#fff;--calcite-color-foreground-2:#f3f3f3}.instant-apps-export calcite-button:last-of-type{margin-top:0.5rem}.instant-apps-export .calcite-mode-dark calcite-switch{--calcite-color-foreground-1:#2b2b2b;--calcite-color-foreground-2:#202020}.instant-apps-export__compass-container.esri-widget{background:#fff;box-shadow:0 1px 2px rgba(0, 0, 0, 0.3)}.instant-apps-export__compass-container.esri-widget .esri-compass__icon.esri-icon-compass{color:#6e6e6e}.hide{display:none}.screenshotCursor{cursor:crosshair}";export{k as instant_apps_export}