@esri/solutions-components 0.10.7 → 0.10.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +24 -8
  2. package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
  3. package/dist/cjs/calcite-combobox_3.cjs.entry.js +354 -967
  4. package/dist/cjs/calcite-graph_2.cjs.entry.js +1082 -0
  5. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +6 -6
  6. package/dist/cjs/calcite-tree_3.cjs.entry.js +1 -1
  7. package/dist/cjs/card-manager_3.cjs.entry.js +246 -18
  8. package/dist/cjs/crowdsource-manager.cjs.entry.js +171 -50
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/map-select-tools_3.cjs.entry.js +3 -3
  11. package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
  12. package/dist/cjs/public-notification.cjs.entry.js +1 -1
  13. package/dist/cjs/refine-results-flow-item.cjs.entry.js +1 -1
  14. package/dist/cjs/share-item.cjs.entry.js +1 -1
  15. package/dist/cjs/solution-configuration.cjs.entry.js +3 -3
  16. package/dist/cjs/solution-contents_3.cjs.entry.js +3 -3
  17. package/dist/cjs/solutions-components.cjs.js +1 -1
  18. package/dist/cjs/spatial-ref.cjs.entry.js +1 -1
  19. package/dist/collection/assets/t9n/crowdsource-manager/resources.json +5 -1
  20. package/dist/collection/assets/t9n/crowdsource-manager/resources_en.json +5 -1
  21. package/dist/collection/assets/t9n/layer-table/resources.json +1 -0
  22. package/dist/collection/assets/t9n/layer-table/resources_en.json +1 -0
  23. package/dist/collection/assets/t9n/map-card/resources.json +6 -1
  24. package/dist/collection/assets/t9n/map-card/resources_en.json +6 -1
  25. package/dist/collection/components/card-manager/card-manager.js +34 -8
  26. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +176 -84
  27. package/dist/collection/components/layer-table/layer-table.js +175 -8
  28. package/dist/collection/components/map-card/map-card.css +4 -0
  29. package/dist/collection/components/map-card/map-card.js +368 -3
  30. package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
  31. package/dist/collection/components/map-fullscreen/map-fullscreen.js +1 -1
  32. package/dist/collection/components/map-layer-picker/map-layer-picker.js +9 -3
  33. package/dist/collection/components/map-legend/map-legend.js +1 -1
  34. package/dist/collection/components/map-picker/map-picker.css +8 -0
  35. package/dist/collection/components/map-picker/map-picker.js +74 -3
  36. package/dist/collection/components/map-search/map-search.js +1 -1
  37. package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
  38. package/dist/collection/components/map-tools/map-tools.js +1 -1
  39. package/dist/collection/components/pci-calculator/pci-calculator.js +1 -1
  40. package/dist/collection/components/pdf-download/pdf-download.js +1 -1
  41. package/dist/collection/components/public-notification/public-notification.js +1 -1
  42. package/dist/collection/components/refine-results-flow-item/refine-results-flow-item.js +1 -1
  43. package/dist/collection/components/refine-selection/refine-selection.js +1 -1
  44. package/dist/collection/components/share-item/share-item.js +1 -1
  45. package/dist/collection/components/solution-configuration/solution-configuration.js +3 -3
  46. package/dist/collection/components/solution-contents/solution-contents.js +1 -1
  47. package/dist/collection/components/solution-item/solution-item.js +1 -1
  48. package/dist/collection/components/solution-item-details/solution-item-details.js +1 -1
  49. package/dist/collection/components/solution-item-icon/solution-item-icon.js +1 -1
  50. package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +1 -1
  51. package/dist/collection/components/solution-organization-variables/solution-organization-variables.js +1 -1
  52. package/dist/collection/components/solution-resource-item/solution-resource-item.js +1 -1
  53. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +1 -1
  54. package/dist/collection/components/solution-template-data/solution-template-data.js +1 -1
  55. package/dist/collection/components/solution-variables/solution-variables.js +1 -1
  56. package/dist/collection/components/spatial-ref/spatial-ref.js +1 -1
  57. package/dist/collection/demos/crowdsource-manager.html +1 -0
  58. package/dist/components/card-manager2.js +20 -8
  59. package/dist/components/crowdsource-manager.js +175 -55
  60. package/dist/components/layer-table2.js +72 -10
  61. package/dist/components/map-card2.js +288 -47
  62. package/dist/components/map-draw-tools2.js +1 -1
  63. package/dist/components/map-fullscreen2.js +1 -1
  64. package/dist/components/map-layer-picker2.js +9 -3
  65. package/dist/components/map-legend2.js +1 -1
  66. package/dist/components/map-picker2.js +24 -5
  67. package/dist/components/map-search2.js +1 -1
  68. package/dist/components/map-select-tools2.js +1 -1
  69. package/dist/components/map-tools2.js +1 -1
  70. package/dist/components/pci-calculator.js +1 -1
  71. package/dist/components/pdf-download2.js +1 -1
  72. package/dist/components/public-notification.js +1 -1
  73. package/dist/components/refine-results-flow-item.js +1 -1
  74. package/dist/components/refine-selection2.js +1 -1
  75. package/dist/components/share-item.js +1 -1
  76. package/dist/components/solution-configuration.js +3 -3
  77. package/dist/components/solution-contents2.js +1 -1
  78. package/dist/components/solution-item-details2.js +1 -1
  79. package/dist/components/solution-item-icon2.js +1 -1
  80. package/dist/components/solution-item-sharing2.js +1 -1
  81. package/dist/components/solution-item2.js +1 -1
  82. package/dist/components/solution-organization-variables2.js +1 -1
  83. package/dist/components/solution-resource-item2.js +1 -1
  84. package/dist/components/solution-spatial-ref2.js +1 -1
  85. package/dist/components/solution-template-data2.js +1 -1
  86. package/dist/components/solution-variables2.js +1 -1
  87. package/dist/components/spatial-ref.js +1 -1
  88. package/dist/esm/basemap-gallery_7.entry.js +24 -8
  89. package/dist/esm/buffer-tools_3.entry.js +1 -1
  90. package/dist/esm/calcite-combobox_3.entry.js +369 -982
  91. package/dist/esm/calcite-graph_2.entry.js +1077 -0
  92. package/dist/esm/calcite-shell-panel_14.entry.js +6 -6
  93. package/dist/esm/calcite-tree_3.entry.js +1 -1
  94. package/dist/esm/card-manager_3.entry.js +248 -20
  95. package/dist/esm/crowdsource-manager.entry.js +172 -51
  96. package/dist/esm/loader.js +1 -1
  97. package/dist/esm/map-select-tools_3.entry.js +3 -3
  98. package/dist/esm/pci-calculator.entry.js +1 -1
  99. package/dist/esm/public-notification.entry.js +1 -1
  100. package/dist/esm/refine-results-flow-item.entry.js +1 -1
  101. package/dist/esm/share-item.entry.js +1 -1
  102. package/dist/esm/solution-configuration.entry.js +3 -3
  103. package/dist/esm/solution-contents_3.entry.js +3 -3
  104. package/dist/esm/solutions-components.js +1 -1
  105. package/dist/esm/spatial-ref.entry.js +1 -1
  106. package/dist/solutions-components/assets/t9n/crowdsource-manager/resources.json +5 -1
  107. package/dist/solutions-components/assets/t9n/crowdsource-manager/resources_en.json +5 -1
  108. package/dist/solutions-components/assets/t9n/layer-table/resources.json +1 -0
  109. package/dist/solutions-components/assets/t9n/layer-table/resources_en.json +1 -0
  110. package/dist/solutions-components/assets/t9n/map-card/resources.json +6 -1
  111. package/dist/solutions-components/assets/t9n/map-card/resources_en.json +6 -1
  112. package/dist/solutions-components/demos/crowdsource-manager.html +1 -0
  113. package/dist/solutions-components/p-0abc1354.entry.js +6 -0
  114. package/dist/solutions-components/p-0f7b5d36.entry.js +6 -0
  115. package/dist/solutions-components/{p-a9818be2.entry.js → p-20c465e9.entry.js} +1 -1
  116. package/dist/solutions-components/{p-db18bce8.entry.js → p-36b50b5b.entry.js} +1 -1
  117. package/dist/solutions-components/{p-85512ae3.entry.js → p-445213cf.entry.js} +1 -1
  118. package/dist/solutions-components/{p-d49f895d.entry.js → p-4a5f0a97.entry.js} +1 -1
  119. package/dist/solutions-components/{p-002c97df.entry.js → p-5d201016.entry.js} +1 -1
  120. package/dist/solutions-components/{p-b7cec3bd.entry.js → p-618bafec.entry.js} +1 -1
  121. package/dist/solutions-components/p-6a66d5a9.entry.js +6 -0
  122. package/dist/solutions-components/p-71a2d5b8.entry.js +6 -0
  123. package/dist/solutions-components/p-7a64b026.entry.js +17 -0
  124. package/dist/solutions-components/p-7d514d7f.entry.js +6 -0
  125. package/dist/solutions-components/p-85c25564.entry.js +6 -0
  126. package/dist/solutions-components/{p-235bf02e.entry.js → p-913413c3.entry.js} +1 -1
  127. package/dist/solutions-components/{p-49aa2929.entry.js → p-bebd4646.entry.js} +1 -1
  128. package/dist/solutions-components/p-ce454f5a.entry.js +11 -0
  129. package/dist/solutions-components/solutions-components.esm.js +1 -1
  130. package/dist/types/components/card-manager/card-manager.d.ts +11 -0
  131. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +88 -22
  132. package/dist/types/components/layer-table/layer-table.d.ts +30 -0
  133. package/dist/types/components/map-card/map-card.d.ts +124 -0
  134. package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +4 -0
  135. package/dist/types/components/map-picker/map-picker.d.ts +12 -0
  136. package/dist/types/components.d.ts +130 -8
  137. package/dist/types/preact.d.ts +4 -2
  138. package/package.json +5 -5
  139. package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +0 -453
  140. package/dist/esm/calcite-dropdown-group_2.entry.js +0 -448
  141. package/dist/solutions-components/p-129fd80e.entry.js +0 -6
  142. package/dist/solutions-components/p-3b426576.entry.js +0 -6
  143. package/dist/solutions-components/p-72b217f2.entry.js +0 -6
  144. package/dist/solutions-components/p-8b999a2b.entry.js +0 -6
  145. package/dist/solutions-components/p-973ff7b2.entry.js +0 -23
  146. package/dist/solutions-components/p-a001f9c9.entry.js +0 -6
  147. package/dist/solutions-components/p-c683b3fe.entry.js +0 -6
  148. package/dist/solutions-components/p-e9d049bd.entry.js +0 -6
@@ -1,23 +0,0 @@
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 t,r as i,c as e,H as s,g as a,f as n}from"./p-f4c4a2b7.js";import{d as l}from"./p-e3196917.js";import{f as o,e as h}from"./p-262e91ea.js";import{D as r,E as c,t as d,i as p,v as m}from"./p-8448b98b.js";import{d as u,f as b,c as f,r as g,a as v,F as x}from"./p-583ecbf6.js";import{s as k,c as y,a as w,d as $,H as C}from"./p-7c585a72.js";import{g as _}from"./p-0ae5f8fe.js";import{c as z,u as I,d as M,I as V}from"./p-ec561560.js";import{c as H,d as S,g as L}from"./p-d7ee860a.js";import{b as D,c as A,s as E,a as j}from"./p-f83c0ef6.js";import{c as P,d as T,n as F}from"./p-16d69510.js";import{c as O}from"./p-2327029a.js";import{o as X}from"./p-cd4d69c1.js";import{D as R}from"./p-a8e556aa.js";import{c as W,s as B,d as G,u as U}from"./p-d4e3e979.js";import{g as N,c as Z}from"./p-bb3ce613.js";import{V as K}from"./p-cfca5772.js";import{i as Y,h as q,C as J,b as Q,c as tt,d as it,e as et,f as st,j as at}from"./p-ee056d26.js";import{d as nt}from"./p-c8d3207e.js";import{i as lt}from"./p-4250bde1.js";import{d as ot,c as ht}from"./p-33447b6f.js";import"./p-73ae4b9b.js";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
10
- * v2.11.1
11
- */const rt="x-button";function ct({disabled:i,key:e,label:s,onClick:a,ref:n,scale:l}){return t("button",{"aria-label":s,class:rt,disabled:i,key:e,onClick:a,ref:n,tabIndex:-1,type:"button"},t("calcite-icon",{icon:"x",scale:N(l)}))}const dt="combobox-item-",pt="combobox-chip-",mt="combobox-label-",ut="combobox-listbox-",bt="combobox-input-",ft=class{constructor(t){i(this,t),this.calciteComboboxChange=e(this,"calciteComboboxChange",6),this.calciteComboboxFilterChange=e(this,"calciteComboboxFilterChange",6),this.calciteComboboxChipClose=e(this,"calciteComboboxChipClose",6),this.calciteComboboxBeforeClose=e(this,"calciteComboboxBeforeClose",6),this.calciteComboboxClose=e(this,"calciteComboboxClose",6),this.calciteComboboxBeforeOpen=e(this,"calciteComboboxBeforeOpen",6),this.calciteComboboxOpen=e(this,"calciteComboboxOpen",6),this.placement=u,this.internalValueChangeFlag=!1,this.textInput=null,this.mutationObserver=O("mutation",(()=>this.updateItems())),this.resizeObserver=O("resize",(()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()})),this.guid=_(),this.inputHeight=0,this.ignoreSelectedEventsFlag=!1,this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:t,flipPlacements:i}=this;this.filteredFlipPlacements=i?b(i,t):null},this.getValue=()=>{const t=this.selectedItems.map((t=>t?.value?.toString()));return t?.length?t.length>1?t:t[0]:""},this.onLabelClick=()=>{this.setFocus()},this.keyDownHandler=t=>{if(this.readOnly)return;const{key:i}=t;switch(i){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),t.preventDefault()):this.open?(this.open=!1,t.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":-1===this.activeChipIndex&&0!==this.textInput.selectionStart||(this.previousChip(),t.preventDefault());break;case"ArrowRight":-1!==this.activeChipIndex&&(this.nextChip(),t.preventDefault());break;case"ArrowUp":this.filteredItems.length&&(t.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView());break;case"ArrowDown":this.filteredItems.length&&(t.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":this.textInput.value||t.defaultPrevented||(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),t.preventDefault());break;case"Home":if(!this.open)return;t.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;t.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":this.clearDisabled||this.open||this.clearValue(),this.open=!1,t.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.toggleSelection(this.filteredItems[this.activeItemIndex]),t.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),t.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),t.preventDefault()):t.defaultPrevented||k(this)&&t.preventDefault();break;case"Delete":case"Backspace":if("single"===this.selectionDisplay||"fit"===this.selectionDisplay&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(t.preventDefault(),this.removeActiveChip()):!this.filterText&&this.isMulti()&&(t.preventDefault(),this.removeLastChip())}},this.toggleCloseEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxClose",this.toggleCloseEnd)},this.toggleOpenEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxOpen",this.toggleOpenEnd)},this.setMaxScrollerHeight=async()=>{const{listContainerEl:t,open:i,referenceEl:e}=this;if(!t||!i)return;await this.reposition(!0);const s=this.getMaxScrollerHeight();t.style.maxHeight=s>0?`${s}px`:"",t.style.minWidth=`${e.clientWidth}px`,await this.reposition(!0)},this.calciteChipCloseHandler=t=>{this.open=!1;const i=this.items.find((i=>i===t));i&&this.toggleSelection(i,!1),this.calciteComboboxChipClose.emit()},this.clickHandler=t=>{if(this.readOnly)return;const i=t.composedPath();return i.some((t=>"CALCITE-CHIP"===t.tagName))?(this.open=!1,void t.preventDefault()):i.some((t=>t.classList?.contains(rt)))?(this.clearValue(),void t.preventDefault()):(this.open=!this.open,void this.ensureRecentSelectedItemIsActive())},this.refreshSelectionDisplay=async()=>{if(await D(this),Y(this.selectionMode))return;if(!this.textInput)return;const{allSelectedIndicatorChipEl:t,chipContainerEl:i,selectionDisplay:e,placeholder:s,selectedIndicatorChipEl:a,textInput:n}=this,o=parseInt(getComputedStyle(i).gap.replace("px","")),h=r(i),{fontSize:d,fontFamily:p}=getComputedStyle(n),m=(c(s,`${d} ${p}`)||parseInt(l))+o,u=r(t),b=r(a),f=Math.max(u,b);if(this.setCompactSelectionDisplay({chipContainerElGap:o,chipContainerElWidth:h,inputWidth:m,largestSelectedIndicatorChipWidth:f}),"fit"===e){const t=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter((t=>t.closable)),i=Math.round(h-((this.selectedHiddenChipsCount>0?b:0)+o+m+o));this.refreshChipDisplay({availableHorizontalChipElSpace:i,chipContainerElGap:o,chipEls:t}),this.setVisibleAndHiddenChips(t)}},this.setFloatingEl=t=>{this.floatingEl=t,f(this,this.referenceEl,this.floatingEl)},this.setContainerEl=t=>{this.resizeObserver.observe(t),this.listContainerEl=t,this.transitionEl=t},this.setChipContainerEl=t=>{this.resizeObserver.observe(t),this.chipContainerEl=t},this.setReferenceEl=t=>{this.referenceEl=t,f(this,this.referenceEl,this.floatingEl)},this.setAllSelectedIndicatorChipEl=t=>{this.allSelectedIndicatorChipEl=t},this.setSelectedIndicatorChipEl=t=>{this.selectedIndicatorChipEl=t},this.inputHandler=t=>{this.filterText=t.target.value},this.filterItems=(()=>{const t=(t,i)=>t&&i.some((({label:i,value:e})=>t.tagName===at?i===t.label:e===t.value&&i===t.textLabel));return nt(((i,e=!1,s=!0)=>{const a=o(this.data,i),n=this.getItemsAndGroups(),l=""===i;n.forEach((i=>{if(l)return void(i.hidden=!1);const e=!t(i,a);i.hidden=e;const[s,n]=i.ancestors;(t(s,a)||t(n,a))&&(i.hidden=!1),e||i.ancestors.forEach((t=>t.hidden=!1))})),this.filterTextMatchPattern=this.filterText&&new RegExp(`(${h(this.filterText)})`,"i"),this.filteredItems=this.getFilteredItems(),this.filteredItems.forEach((t=>{t.filterTextMatchPattern=this.filterTextMatchPattern})),e&&(this.open=this.filterText.trim().length>0&&this.filteredItems.length>0),s&&this.calciteComboboxFilterChange.emit()}),R.filter)})(),this.internalComboboxChangeEvent=()=>{this.calciteComboboxChange.emit()},this.emitComboboxChange=nt(this.internalComboboxChangeEvent,0),this.getSelectedItems=()=>{if(!this.isMulti()){const t=this.items.find((({selected:t})=>t));return t?[t]:[]}return this.items.filter((t=>t.selected&&("ancestors"!==this.selectionMode||!q(t)))).sort(((t,i)=>{const e=this.selectedItems.indexOf(t),s=this.selectedItems.indexOf(i);return e>-1&&s>-1?e-s:s-e}))},this.updateItems=()=>{this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.selectedItems=this.getSelectedItems(),this.filteredItems=this.getFilteredItems(),this.needsIcon=this.getNeedsIcon(),this.items.forEach((t=>{t.selectionMode=this.selectionMode,t.scale=this.scale})),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach(((t,i,e)=>{0===i&&(t.afterEmptyGroup=!1);const s=e[i+1];s&&(s.afterEmptyGroup=0===t.children.length)}))},this.scrollToActiveItem=()=>{const t=this.filteredItems[this.activeItemIndex];if(!t)return;const i=this.calculateScrollerHeight(t),{offsetHeight:e,scrollTop:s}=this.listContainerEl;e+s<t.offsetTop+i?this.listContainerEl.scrollTop=t.offsetTop-e+i:t.offsetTop<s&&(this.listContainerEl.scrollTop=t.offsetTop)},this.comboboxFocusHandler=()=>{this.disabled||this.textInput?.focus()},this.clearDisabled=!1,this.filterText="",this.selectionDisplay="all",this.open=!1,this.disabled=!1,this.form=void 0,this.label=void 0,this.placeholder=void 0,this.placeholderIcon=void 0,this.placeholderIconFlipRtl=!1,this.maxItems=0,this.validationMessage=void 0,this.validationIcon=void 0,this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.name=void 0,this.allowCustomValues=void 0,this.overlayPositioning="absolute",this.required=!1,this.selectionMode="multiple",this.scale="m",this.status="idle",this.value=null,this.flipPlacements=void 0,this.messages=void 0,this.messageOverrides=void 0,this.selectedItems=[],this.filteredItems=[],this.readOnly=!1,this.items=[],this.groupItems=[],this.needsIcon=void 0,this.activeItemIndex=-1,this.activeChipIndex=-1,this.activeDescendant="",this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.effectiveLocale=void 0,this.defaultMessages=void 0}filterTextChange(t){this.updateActiveItemIndex(-1),this.filterItems(t,!0)}openHandler(){X(this),this.disabled?this.open=!1:this.setMaxScrollerHeight()}handleDisabledChange(t){t||(this.open=!1)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}handlePropsChange(){this.updateItems()}valueHandler(t){if(!this.internalValueChangeFlag){const i=this.getItems();Array.isArray(t)?i.forEach((i=>i.selected=t.includes(i.value))):i.forEach(t?i=>i.selected=t===i.value:t=>t.selected=!1),this.updateItems()}}onMessagesChange(){}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(await Z(this.el),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}calciteComboboxItemChangeHandler(t){if(this.ignoreSelectedEventsFlag)return;const i=t.target,e=this.filteredItems.indexOf(i);this.updateActiveItemIndex(e),this.toggleSelection(i,i.selected)}async reposition(t=!1){const{floatingEl:i,referenceEl:e,placement:s,overlayPositioning:a,filteredFlipPlacements:n}=this;return g(this,{floatingEl:i,referenceEl:e,overlayPositioning:a,placement:s,flipPlacements:n,type:"menu"},t)}async setFocus(){await A(this),this.textInput?.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){z(this),P(this),W(this),H(this),y(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.updateItems(),this.setFilteredPlacements(),this.open&&(this.openHandler(),X(this)),f(this,this.referenceEl,this.floatingEl)}async componentWillLoad(){E(this),this.updateItems(),await B(this),this.filterItems(this.filterText,!1,!1)}componentDidLoad(){w(this,this.getValue()),f(this,this.referenceEl,this.floatingEl),j(this)}componentDidRender(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),I(this)}componentDidUpdate(){this.refreshSelectionDisplay()}disconnectedCallback(){this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),M(this),S(this),$(this),v(this,this.referenceEl,this.floatingEl),T(this),G(this)}effectiveLocaleChange(){U(this,this.effectiveLocale)}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach((t=>t.selected=!1)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInput.value="",this.filterText=""}comboboxInViewport(){const t=this.el.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.right<=(window.innerWidth||document.documentElement.clientWidth)&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)}onBeforeOpen(){this.scrollToActiveItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit()}ensureRecentSelectedItemIsActive(){const{selectedItems:t}=this,i=0===t.length?0:this.items.indexOf(t[t.length-1]);this.updateActiveItemIndex(i)}hideChip(t){t.classList.add(J.chipInvisible)}showChip(t){t.classList.remove(J.chipInvisible)}refreshChipDisplay({chipEls:t,availableHorizontalChipElSpace:i,chipContainerElGap:e}){t.forEach((t=>{if(t.selected){const s=r(t);if(s&&s<i)return i-=s+e,void this.showChip(t)}else this.hideChip(t);this.hideChip(t)}))}setCompactSelectionDisplay({chipContainerElGap:t,chipContainerElWidth:i,inputWidth:e,largestSelectedIndicatorChipWidth:s}){const a=Math.round(s+t+e);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<a)&&(this.maxCompactBreakpoint=a),this.compactSelectionDisplay=i<this.maxCompactBreakpoint}setVisibleAndHiddenChips(t){let i=0;t.forEach((t=>{t.selected&&!t.classList.contains(J.chipInvisible)&&i++})),i!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=i);const e=this.getSelectedItems().length-i;e!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=e)}getMaxScrollerHeight(){const t=this.getItemsAndGroups().filter((t=>!t.hidden)),{maxItems:i}=this;let e=0,s=0;return t.length>i&&t.forEach((t=>{if(e<i){const i=this.calculateScrollerHeight(t);i>0&&(s+=i,e++)}})),s}calculateScrollerHeight(t){if(t)return t.getBoundingClientRect().height-Array.from(t.querySelectorAll(Q)).reduce(((t,i)=>t+i.getBoundingClientRect().height),0)}getItemsAndGroups(){return[...this.groupItems,...this.items]}toggleSelection(t,i=!t.selected){!t||"single-persist"===this.selectionMode&&t.selected&&t.value===this.value||(this.isMulti()?(t.selected=i,this.updateAncestors(t),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach((e=>e.selected=e===t&&i)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput&&(this.textInput.value=tt(t)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(t){if("ancestors"!==this.selectionMode)return;const i=it(t),e=et(t);t.selected?i.forEach((t=>{t.selected=!0})):(e.forEach((t=>t.selected=!1)),[...i].forEach((t=>{q(t)||(t.selected=!1)})))}getFilteredItems(){return""===this.filterText?this.items:this.items.filter((t=>!t.hidden))}getData(){return this.items.map((t=>({description:t.description,filterDisabled:t.filterDisabled,label:t.textLabel,metadata:t.metadata,shortHeading:t.shortHeading,value:t.value})))}getNeedsIcon(){return Y(this.selectionMode)&&this.items.some((t=>t.icon))}resetText(){this.textInput&&(this.textInput.value=""),this.filterText=""}getItems(){return Array.from(this.el.querySelectorAll(st)).filter((t=>!t.disabled))}getGroupItems(){return Array.from(this.el.querySelectorAll(at))}addCustomChip(t,i){const e=this.items.find((i=>i.textLabel===t));if(e)this.toggleSelection(e,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);const e=document.createElement("calcite-combobox-item");e.value=t,e.textLabel=t,e.selected=!0,this.el.prepend(e),this.resetText(),i&&this.setFocus(),this.updateItems(),this.filterItems(""),this.open=!0,this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){const t=this.activeChipIndex;this.activeChipIndex=-1===t?this.selectedItems.length-1:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){const t=this.activeChipIndex+1;t>this.selectedItems.length-1?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){const t=this.selectedItems[this.activeChipIndex]?.guid,i=t?this.referenceEl.querySelector(`#${pt}${t}`):null;i?.setFocus()}shiftActiveItemIndex(t){const{length:i}=this.filteredItems;this.updateActiveItemIndex((this.activeItemIndex+i+t)%i),this.scrollToActiveItem()}updateActiveItemIndex(t){this.activeItemIndex=t;let i=null;this.filteredItems.forEach(((e,s)=>{s===t?(e.active=!0,i=`${dt}${e.guid}`):e.active=!1})),this.activeDescendant=i,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isAllSelected(){return this.getItems().length===this.getSelectedItems().length}isMulti(){return!Y(this.selectionMode)}renderChips(){const{activeChipIndex:i,readOnly:e,scale:s,selectionMode:a,messages:n}=this;return this.selectedItems.map(((l,o)=>{const h={chip:!0,"chip--active":i===o},r=[...it(l)].reverse(),c=tt(l),d=[...r,l].map((t=>tt(t))),p="ancestors"!==a?c:d.join(" / ");return t("calcite-chip",{appearance:e?"outline":"solid",class:h,closable:!e,"data-test-id":`chip-${o}`,icon:l.icon,iconFlipRtl:l.iconFlipRtl,id:l.guid?`${pt}${l.guid}`:null,key:c,messageOverrides:{dismissLabel:n.removeTag},onCalciteChipClose:()=>this.calciteChipCloseHandler(l),onFocusin:()=>this.activeChipIndex=o,scale:s,selected:l.selected,tabindex:i===o?0:-1,title:p,value:l.value},p)}))}renderAllSelectedIndicatorChip(){const{compactSelectionDisplay:i,scale:e,selectedVisibleChipsCount:s,setAllSelectedIndicatorChipEl:a}=this,n=this.messages.allSelected;return t("calcite-chip",{class:{chip:!0,[J.chipInvisible]:!(this.isAllSelected()&&!s&&!i)},ref:a,scale:e,title:n,value:""},n)}renderAllSelectedIndicatorChipCompact(){const{compactSelectionDisplay:i,scale:e,selectedVisibleChipsCount:s}=this,a=this.messages.all||"All";return t("calcite-chip",{class:{chip:!0,[J.chipInvisible]:!(this.isAllSelected()&&!s&&i)},scale:e,title:a,value:""},a)}renderSelectedIndicatorChip(){const{compactSelectionDisplay:i,selectionDisplay:e,getSelectedItems:s,scale:a,selectedHiddenChipsCount:n,selectedVisibleChipsCount:l,setSelectedIndicatorChipEl:o}=this;let h,r;if(i)h=!0;else if("single"===e){const t=s().length;h=!(!this.isAllSelected()&&t>0),r=`${t} ${this.messages.selected}`}else"fit"===e&&(h=!!(this.isAllSelected()&&0===l||0===n),r=l>0?`+${n}`:`${n} ${this.messages.selected}`);return t("calcite-chip",{class:{chip:!0,[J.chipInvisible]:h},ref:o,scale:a,title:r,value:""},r)}renderSelectedIndicatorChipCompact(){const{compactSelectionDisplay:i,selectionDisplay:e,getSelectedItems:s,scale:a,selectedHiddenChipsCount:n}=this;let l,o;if(i){const t=s().length;this.isAllSelected()?l=!0:"fit"===e?(l=!(n>0),o=`${n||0}`):"single"===e&&(l=!(t>0),o=`${t}`)}else l=!0;return t("calcite-chip",{class:{chip:!0,[J.chipInvisible]:l},scale:a,title:o,value:""},o)}get showingInlineIcon(){const{placeholderIcon:t,selectionMode:i,selectedItems:e,open:s}=this,a=e[0],n=a?.icon,l=Y(i);return!s&&a?!!n&&l:!!t&&(!a||l)}renderInput(){const{guid:i,disabled:e,placeholder:s,selectionMode:a,selectedItems:n,open:l}=this,o=Y(a),h=n[0],r=!l&&o&&!!h;return t("span",{class:{"input-wrap":!0,"input-wrap--single":o}},r&&t("span",{class:{label:!0,"label--icon":!!h?.icon},key:"label"},tt(h)),t("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":`${ut}${i}`,"aria-expanded":d(l),"aria-haspopup":"listbox","aria-label":L(this),"aria-owns":`${ut}${i}`,class:{[J.input]:!0,"input--single":!0,"input--hidden":r,"input--icon":this.showingInlineIcon&&!!this.placeholderIcon},"data-test-id":"input",disabled:e,id:`${bt}${i}`,key:"input",onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:s,readOnly:this.readOnly,ref:t=>this.textInput=t,role:"combobox",tabindex:-1===this.activeChipIndex?0:-1,type:"text",value:this.filterText}))}renderListBoxOptions(){return this.filteredItems.map((i=>t("li",{"aria-selected":d(i.selected),id:i.guid?`${dt}${i.guid}`:null,role:"option",tabindex:"-1"},i.textLabel)))}renderFloatingUIContainer(){const{setFloatingEl:i,setContainerEl:e,open:s}=this;return t("div",{"aria-hidden":"true",class:{"floating-ui-container":!0,"floating-ui-container--active":s},ref:i},t("div",{class:{[J.listContainer]:!0,[x.animation]:!0,[x.animationActive]:s},ref:e},t("ul",{class:{list:!0,"list--hide":!s}},t("slot",null))))}renderSelectedOrPlaceholderIcon(){const{selectedItems:i,placeholderIcon:e,placeholderIconFlipRtl:s}=this,a=i[0],n=a?.icon;return this.showingInlineIcon&&t("span",{class:"icon-start",key:"selected-placeholder-icon"},t("calcite-icon",{class:"selected-icon",flipRtl:this.open&&a?a.iconFlipRtl:s,icon:!this.open&&a?n:e,scale:N(this.scale)}))}renderChevronIcon(){const{open:i}=this;return t("span",{class:"icon-end",key:"chevron"},t("calcite-icon",{class:J.icon,icon:i?"chevron-up":"chevron-down",scale:N(this.scale)}))}render(){const{selectionDisplay:i,guid:e,label:a,open:n,readOnly:l}=this,o=Y(this.selectionMode),h="all"===i,r="single"===i,c=!o&&"fit"===i,d=!this.clearDisabled&&this.value?.length>0;return t(s,{key:"c51466b3ff7d6aaf29578ba9a017cab02b49d704",onClick:this.comboboxFocusHandler},t(V,{key:"5c1e3383be919a3348677607b46f79a8baefeee7",disabled:this.disabled},t("div",{key:"ffb0ee17748ed4827cfca2c8aea8f39fc82a05cc","aria-live":"polite",class:{wrapper:!0,"wrapper--single":o||!this.selectedItems.length,"wrapper--active":n},onClick:this.clickHandler,onKeyDown:this.keyDownHandler,ref:this.setReferenceEl},this.renderSelectedOrPlaceholderIcon(),t("div",{class:{"grid-input":!0,[J.selectionDisplayFit]:c,[J.selectionDisplaySingle]:r},key:"grid",ref:this.setChipContainerEl},!o&&!r&&this.renderChips(),!o&&!h&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip(),this.renderAllSelectedIndicatorChipCompact()],t("label",{key:"d60ddc1697b80245c56fd7b553408beb21296b3d",class:"screen-readers-only",htmlFor:`${bt}${e}`,id:`${mt}${e}`},a),this.renderInput()),!l&&d?t(ct,{disabled:this.disabled,key:"close-button",label:this.messages.clear,scale:this.scale}):null,!l&&this.renderChevronIcon()),t("ul",{key:"856e6f4bd4fcf6db32fb6e8d984fcdb7c4776448","aria-labelledby":`${mt}${e}`,"aria-multiselectable":"true",class:"screen-readers-only",id:`${ut}${e}`,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderFloatingUIContainer(),t(C,{key:"eca6c0108b0fbb8e6851c6cc86d15dc70318a4a3",component:this}),this.validationMessage&&"invalid"===this.status?t(K,{icon:this.validationIcon,message:this.validationMessage,scale:this.scale,status:this.status}):null))}static get assetsDirs(){return["assets"]}get el(){return a(this)}static get watchers(){return{filterText:["filterTextChange"],open:["openHandler"],disabled:["handleDisabledChange"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],selectionMode:["handlePropsChange"],scale:["handlePropsChange"],value:["valueHandler"],messageOverrides:["onMessagesChange"],flipPlacements:["flipPlacementsHandler"],selectedItems:["selectedItemsHandler"],effectiveLocale:["effectiveLocaleChange"]}}};function gt(t,i,e){const s=i[0]-t[0];return s?(3*(i[1]-t[1])/s-e)/2:e}function vt(t,i,e,s,a){const[n,l]=t,[o,h]=i,r=(o-n)/3;return`C ${a([n+r,l+r*e]).join(",")} ${a([o-r,h-r*s]).join(",")} ${a([o,h]).join(",")}`}ft.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]) .x-button{inline-size:1rem;block-size:1rem}:host([scale=m]) .x-button{inline-size:1.5rem;block-size:1.5rem}:host([scale=l]) .x-button{inline-size:2rem;block-size:2rem}.x-button{margin:0px;display:flex;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-content:center;align-items:center;justify-content:center;align-self:center;border-width:2px;background-color:transparent;color:var(--calcite-color-text-3);outline-color:transparent;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;border-radius:50%;border-color:transparent;background-color:var(--calcite-color-foreground-2)}.x-button:active,.x-button:hover{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-3)}.x-button:active{border-style:solid;border-color:var(--calcite-color-brand)}.x-button calcite-icon{color:inherit}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1rem;--calcite-internal-combobox-input-margin-block:calc(0.25rem - 1px)}:host([scale=s]) .x-button{margin-inline:0.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:1rem;--calcite-internal-combobox-input-margin-block:calc(0.5rem - 1px)}:host([scale=m]) .x-button{margin-inline-end:0.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:1.5rem;--calcite-internal-combobox-input-margin-block:calc(0.625rem - 1px)}:host([scale=l]) .x-button{margin-inline-end:1rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.wrapper:hover .icon{color:var(--calcite-color-text-1)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:2px solid var(--calcite-color-status-danger);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;gap:var(--calcite-combobox-item-spacing-unit-s);margin-inline-end:var(--calcite-combobox-item-spacing-unit-s)}.grid-input.selection-display-fit,.grid-input.selection-display-single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-combobox-item-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:-moz-placeholder-shown{text-overflow:ellipsis}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0px;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-color-text-3)}.floating-ui-container{--calcite-floating-ui-z-index:var(--calcite-z-index-dropdown);display:block;position:absolute;z-index:var(--calcite-floating-ui-z-index);visibility:hidden}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:var(--calcite-z-index);border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;transform:translate(0)}.floating-ui-container--active{visibility:visible}@media (forced-colors: active){.wrapper,.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-color-foreground-1);inline-size:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}calcite-chip{--calcite-animation-timing:0}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);max-inline-size:100%}.chip--active{background-color:var(--calcite-color-foreground-3)}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:0.5rem}:host([scale=s]) .validation-container{padding-block-start:0.25rem}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}:host([hidden]){display:none}[hidden]{display:none}::slotted(calcite-combobox-item-group:not(:first-child)){padding-block-start:var(--calcite-combobox-item-spacing-unit-l)}";const xt=class{constructor(t){i(this,t),this.graphId=`calcite-graph-${_()}`,this.resizeObserver=O("resize",(()=>n(this))),this.data=[],this.colorStops=void 0,this.highlightMin=void 0,this.highlightMax=void 0,this.min=void 0,this.max=void 0}connectedCallback(){this.resizeObserver?.observe(this.el)}disconnectedCallback(){this.resizeObserver?.disconnect()}render(){const{data:i,colorStops:e,el:s,highlightMax:a,highlightMin:n,min:l,max:o}=this,h=this.graphId,{clientHeight:r,clientWidth:c}=s;if(!i||0===i.length)return t("svg",{"aria-hidden":"true",class:"svg",height:r,preserveAspectRatio:"none",viewBox:`0 0 ${c} ${r}`,width:c});const{min:d,max:p}=function(t){const[i,e]=t[0];return t.reduce((({min:t,max:i},[e,s])=>({min:[Math.min(t[0],e),Math.min(t[1],s)],max:[Math.max(i[0],e),Math.max(i[1],s)]})),{min:[i,e],max:[i,e]})}(i);let m=d,u=p;(l<d[0]||l>d[0])&&(m=[l,0]),(o>p[0]||o<p[0])&&(u=[o,p[1]]);const b=function({width:t,height:i,min:e,max:s}){const a=s[0]-e[0],n=s[1]-e[1];return s=>[(s[0]-e[0])/a*t,i-s[1]/n*i]}({min:m,max:u,width:c,height:r}),[f]=b([n,u[1]]),[g]=b([a,u[1]]),v=function({data:t,min:i,max:e,t:s}){if(0===t.length)return"";const[a,n]=s(t[0]),[l,o]=s(i),[h]=s(e);let r,c,d;const p=t.reduce(((i,e,a)=>{if(c=t[a-2],d=t[a-1],a>1){const t=
12
- /*!
13
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
14
- * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
15
- * v2.11.1
16
- */
17
- function(t,i,e){const s=i[0]-t[0],a=e[0]-i[0],n=(i[1]-t[1])/(s||a<0&&0),l=(e[1]-i[1])/(a||s<0&&0),o=(n*a+l*s)/(s+a);return(Math.sign(n)+Math.sign(l))*Math.min(Math.abs(n),Math.abs(l),.5*Math.abs(o))||0}(c,d,e),a=void 0===r?gt(c,d,t):r,n=vt(c,d,a,t,s);return r=t,`${i} ${n}`}return i}),`M ${l},${o} L ${l},${n} L ${a},${n}`),m=t[t.length-1];return`${p} ${vt(d,m,r,gt(d,m,r),s)} L ${h},${o} Z`}({data:i,min:d,max:p,t:b}),x=e?`url(#linear-gradient-${h})`:void 0;return t("svg",{"aria-hidden":"true",class:"svg",height:r,preserveAspectRatio:"none",viewBox:`0 0 ${c} ${r}`,width:c},e?t("defs",null,t("linearGradient",{id:`linear-gradient-${h}`,x1:"0",x2:"1",y1:"0",y2:"0"},e.map((({offset:i,color:e,opacity:s})=>t("stop",{offset:100*i+"%","stop-color":e,"stop-opacity":s}))))):null,void 0!==n?[t("mask",{height:"100%",id:`${h}1`,width:"100%",x:"0%",y:"0%"},t("path",{d:`\n M 0,0\n L ${f-1},0\n L ${f-1},${r}\n L 0,${r}\n Z\n `,fill:"white"})),t("mask",{height:"100%",id:`${h}2`,width:"100%",x:"0%",y:"0%"},t("path",{d:`\n M ${f+1},0\n L ${g-1},0\n L ${g-1},${r}\n L ${f+1}, ${r}\n Z\n `,fill:"white"})),t("mask",{height:"100%",id:`${h}3`,width:"100%",x:"0%",y:"0%"},t("path",{d:`\n M ${g+1},0\n L ${c},0\n L ${c},${r}\n L ${g+1}, ${r}\n Z\n `,fill:"white"})),t("path",{class:"graph-path",d:v,fill:x,mask:`url(#${h}1)`}),t("path",{class:"graph-path--highlight",d:v,fill:x,mask:`url(#${h}2)`}),t("path",{class:"graph-path",d:v,fill:x,mask:`url(#${h}3)`})]:t("path",{class:"graph-path",d:v,fill:x}))}get el(){return a(this)}};xt.style=":host{display:block;block-size:100%}.svg{fill:currentColor;stroke:transparent;margin:0px;display:block;block-size:100%;inline-size:100%;padding:0px}.svg .graph-path--highlight{fill:var(--calcite-color-brand);opacity:0.5}:host([hidden]){display:none}[hidden]{display:none}";
18
- /*!
19
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
20
- * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
21
- * v2.11.1
22
- */
23
- const kt="container",yt="container--range",wt="hyphen",$t="hyphen--wrap",Ct="thumb",_t="thumb--active",zt="thumb--minValue",It="thumb--precise",Mt="thumb--value",Vt="tick",Ht="tick--active",St="tick__label",Lt="tick__label--max",Dt="tick__label--min";function At(t){return Array.isArray(t)}const Et=class{constructor(t){i(this,t),this.calciteSliderInput=e(this,"calciteSliderInput",6),this.calciteSliderChange=e(this,"calciteSliderChange",6),this.handleKeyDown=t=>{const i=this.shouldMirror(),{activeProp:e,max:s,min:a,pageStep:n,step:l}=this,o=this[e],{key:h}=t;if(lt(h))return void t.preventDefault();let r;if("ArrowUp"===h||"ArrowRight"===h?r=o+l*(i&&"ArrowRight"===h?-1:1):"ArrowDown"===h||"ArrowLeft"===h?r=o-l*(i&&"ArrowLeft"===h?-1:1):"PageUp"===h?n&&(r=o+n):"PageDown"===h?n&&(r=o-n):"Home"===h?r=a:"End"===h&&(r=s),isNaN(r))return;t.preventDefault();const c=Number(r.toFixed(ot(l)));this.setValue({[e]:this.clamp(c,e)})},this.activeProp="value",this.guid=`calcite-slider-${_()}`,this.onThumbBlur=()=>{this.activeProp=null},this.onThumbFocus=t=>{this.activeProp=t.currentTarget.getAttribute("data-value-prop")},this.onThumbPointerDown=t=>{this.pointerDownDragStart(t,t.currentTarget.getAttribute("data-value-prop"))},this.onTrackPointerDown=t=>{this.pointerDownDragStart(t,"minMaxValue")},this.dragUpdate=t=>{if(!this.disabled&&(t.preventDefault(),this.dragProp)){const i=this.translate(t.clientX||t.pageX);if(At(this.value)&&"minMaxValue"===this.dragProp)if(this.minValueDragRange&&this.maxValueDragRange&&this.minMaxValueRange){const t=i-this.minValueDragRange,e=i+this.maxValueDragRange;e<=this.max&&t>=this.min&&e-t===this.minMaxValueRange&&this.setValue({minValue:this.clamp(t,"minValue"),maxValue:this.clamp(e,"maxValue")})}else this.minValueDragRange=i-this.minValue,this.maxValueDragRange=this.maxValue-i,this.minMaxValueRange=this.maxValue-this.minValue;else this.setValue({[this.dragProp]:this.clamp(i,this.dragProp)})}},this.pointerUpDragEnd=t=>{!this.disabled&&p(t)&&this.dragEnd(t)},this.dragEnd=t=>{this.disabled||(this.removeDragListeners(),this.focusActiveHandle(t.clientX),this.lastDragPropValue!=this[this.dragProp]&&this.emitChange(),this.dragProp=null,this.lastDragPropValue=null,this.minValueDragRange=null,this.maxValueDragRange=null,this.minMaxValueRange=null)},this.storeTrackRef=t=>{this.trackEl=t},this.storeThumbRef=t=>{t&&("minValue"===t.getAttribute("data-value-prop")?this.minHandle=t:this.maxHandle=t)},this.formatValue=t=>(F.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},F.localize(t.toString())),this.disabled=!1,this.fillPlacement="start",this.form=void 0,this.groupSeparator=!1,this.hasHistogram=!1,this.histogram=void 0,this.histogramStops=void 0,this.labelHandles=!1,this.labelFormatter=void 0,this.labelTicks=!1,this.max=100,this.maxLabel=void 0,this.maxValue=void 0,this.min=0,this.minLabel=void 0,this.minValue=void 0,this.mirrored=!1,this.name=void 0,this.numberingSystem=void 0,this.pageStep=void 0,this.precise=!1,this.required=!1,this.snap=!1,this.step=1,this.ticks=void 0,this.value=0,this.scale="m",this.effectiveLocale="",this.minMaxValueRange=null,this.minValueDragRange=null,this.maxValueDragRange=null,this.tickValues=[]}histogramWatcher(t){this.hasHistogram=!!t}ticksWatcher(){this.tickValues=this.generateTickValues()}valueHandler(){this.setMinMaxFromValue()}minMaxValueHandler(){this.setValueFromMinMax()}connectedCallback(){z(this),P(this),this.setMinMaxFromValue(),this.setValueFromMinMax(),H(this),y(this)}disconnectedCallback(){M(this),S(this),$(this),T(this),this.removeDragListeners()}componentWillLoad(){E(this),At(this.value)||(this.value=this.snap?this.getClosestStep(this.value):this.clamp(this.value)),this.ticksWatcher(),this.histogramWatcher(this.histogram),w(this,this.value)}componentDidLoad(){j(this)}componentDidRender(){this.labelHandles&&(this.adjustHostObscuredHandleLabel("value"),At(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideObscuredBoundingTickLabels(),I(this)}render(){const i=this.el.id||this.guid,e=At(this.value)?this.maxValue:this.value,a=this.minValue||this.min,n=this.shouldUseMinValue(),l=100*this.getUnitInterval(n?this.minValue:a),o=100*this.getUnitInterval(e),h=this.shouldMirror(),r=At(this.value),c=this.buildThumbType("max"),d=this.renderThumb({type:c,thumbPlacement:c.includes("histogram")?"below":"above",maxInterval:o,minInterval:l,mirror:h}),p=this.buildThumbType("min"),m=r&&this.renderThumb({type:p,thumbPlacement:p.includes("histogram")||p.includes("precise")?"below":"above",maxInterval:o,minInterval:l,mirror:h}),u=r?"start":this.fillPlacement,b="none"===u?{left:"unset",right:"unset"}:"end"===u?{left:`${h?l:o}%`,right:`${h?o:l}%`}:{left:`${h?100-o:l}%`,right:`${h?l:100-o}%`};return t(s,{key:"345553b84f2336fe5a98bb2b3050d137130c41ef",id:i,onKeyDown:this.handleKeyDown,onTouchStart:this.handleTouchStart},t(V,{key:"0d9db31db94152095071d9ff40dbf3cf8ba685d6",disabled:this.disabled},t("div",{key:"767ab1401000b02717013231c935fe1747def1b3","aria-label":L(this),class:{[kt]:!0,[yt]:r,[`scale--${this.scale}`]:!0}},this.renderGraph(),t("div",{key:"1a104ad97079f71d37efea9d933f364520d49397",class:"track",ref:this.storeTrackRef},t("div",{key:"84f8033505dc0f373a0d19a641886e49ca4fe732",class:"track__range",onPointerDown:this.onTrackPointerDown,style:b}),t("div",{key:"79f89b93a6acbb05ffce09bd2aa34ef134b3e219",class:"ticks"},this.tickValues.map((i=>{const s=100*this.getUnitInterval(i)+"%";let l=!1;return"start"!==u&&"end"!==u||(l=n?i>=this.minValue&&i<=this.maxValue:i>=("start"===u?a:e)&&i<=("start"===u?e:this.max)),t("span",{class:{[Vt]:!0,[Ht]:l},style:{left:h?"":s,right:h?s:""}},this.renderTickLabel(i))})))),t("div",{key:"9bc6ea406e2036adb87da4a6053533283434864d",class:"thumb-container"},m,d,t(C,{key:"c13236898b527a1ffc058914fe87e6004b93aaf5",component:this})))))}renderThumb({type:i,mirror:e,thumbPlacement:s,minInterval:a,maxInterval:n}){const l=i.includes("labeled"),o=i.includes("precise"),h=i.includes("min"),r=At(this.value),c=h?this.minValue:r?this.maxValue:this.value,d=h?"minValue":r?"maxValue":"value",p=h?this.minLabel:r?this.maxLabel:this.minLabel,m=h?this.minValue:c,u="minValue"===d?this.internalLabelFormatter(this.minValue,"min"):"maxValue"===d?this.internalLabelFormatter(this.maxValue,"max"):this.internalLabelFormatter(c,"value"),b=h?{left:`${e?100-a:a}%`}:{right:`${e?n:100-n}%`},f="handle__label "+(h?"handle__label--minValue":"handle__label--value"),g=[...l?[t("span",{"aria-hidden":"true",class:f},u),t("span",{"aria-hidden":"true",class:`${f} static`},u),t("span",{"aria-hidden":"true",class:`${f} transformed`},u)]:[],t("div",{class:"handle"}),o&&t("div",{class:"handle-extension"})];return"below"===s&&g.reverse(),t("div",{"aria-disabled":this.disabled,"aria-label":p,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":m,class:{[Ct]:!0,[Mt]:!h,[_t]:"minMaxValue"!==this.lastDragProp&&this.dragProp===d,[It]:o,[zt]:h},"data-value-prop":d,key:i,onBlur:this.onThumbBlur,onFocus:this.onThumbFocus,onPointerDown:this.onThumbPointerDown,ref:this.storeThumbRef,role:"slider",style:b,tabIndex:0},g)}renderGraph(){return this.histogram?t("calcite-graph",{class:"graph",colorStops:this.histogramStops,data:this.histogram,highlightMax:At(this.value)?this.maxValue:this.value,highlightMin:At(this.value)?this.minValue:this.min,max:this.max,min:this.min}):null}renderTickLabel(i){const{hasHistogram:e,labelHandles:s,labelTicks:a,max:n,min:l,precise:o,value:h}=this,r=At(h),c=i===l,d=i===n,p=c||d;return!a||(e||!p&&o&&r)&&(!e||!p&&(o||s))?null:t("span",{class:{[St]:!0,[Dt]:c,[Lt]:d}},this.internalLabelFormatter(i,"tick"))}pointerDownHandler(t){if(this.disabled||!p(t))return;const i=t.clientX||t.pageX,e=this.translate(i);let s="value";At(this.value)&&(s=e>=this.minValue&&e<=this.maxValue&&"minMaxValue"===this.lastDragProp?"minMaxValue":Math.abs(this.maxValue-e)<Math.abs(this.minValue-e)||e>=this.maxValue?"maxValue":"minValue"),this.lastDragPropValue=this[s],this.dragStart(s),this.el.shadowRoot.querySelector(`.${Ct}:active`)||this.setValue({[s]:this.clamp(e,s)}),this.focusActiveHandle(i)}handleTouchStart(t){t.preventDefault()}async setFocus(){await A(this);const t=this.minHandle?this.minHandle:this.maxHandle;t?.focus()}buildThumbType(t){const i=[t];return this.labelHandles&&i.push("labeled"),this.precise&&i.push("precise"),this.hasHistogram&&i.push("histogram"),i.join("-")}setValueFromMinMax(){const{minValue:t,maxValue:i}=this;"number"==typeof t&&"number"==typeof i&&(this.value=[t,i])}setMinMaxFromValue(){const{value:t}=this;At(t)&&(this.minValue=t[0],this.maxValue=t[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return!!At(this.value)&&(this.hasHistogram&&0===this.maxValue||!this.hasHistogram&&0===this.minValue)}getTickDensity(){const t=(this.max-this.min)/this.ticks/250;return t<1?1:t}generateTickValues(){const t=this.ticks??0;if(t<=0)return[];const i=[this.min],e=t*this.getTickDensity();let s=this.min;for(;s<this.max;)s+=e,i.push(Math.min(s,this.max));return i.includes(this.max)||i.push(this.max),i}pointerDownDragStart(t,i){p(t)&&this.dragStart(i)}dragStart(t){this.dragProp=t,this.lastDragProp=this.dragProp,this.activeProp=t,window.addEventListener("pointermove",this.dragUpdate),window.addEventListener("pointerup",this.pointerUpDragEnd),window.addEventListener("pointercancel",this.dragEnd)}focusActiveHandle(t){"minValue"===this.dragProp?this.minHandle.focus():"maxValue"===this.dragProp||"value"===this.dragProp?this.maxHandle.focus():"minMaxValue"===this.dragProp&&this.getClosestHandle(t).focus()}emitInput(){this.calciteSliderInput.emit()}emitChange(){this.calciteSliderChange.emit()}removeDragListeners(){window.removeEventListener("pointermove",this.dragUpdate),window.removeEventListener("pointerup",this.pointerUpDragEnd),window.removeEventListener("pointercancel",this.dragEnd)}setValue(t){let i;Object.keys(t).forEach((e=>{const s=t[e];i||(i=this[e]!==s),this[e]=s})),i&&(this.dragProp||this.emitChange(),this.emitInput())}clamp(t,i){return t=ht(t,this.min,this.max),"maxValue"===i&&(t=Math.max(t,this.minValue)),"minValue"===i&&(t=Math.min(t,this.maxValue)),t}translate(t){const i=this.max-this.min,{left:e,width:s}=this.trackEl.getBoundingClientRect(),a=(t-e)/s,n=this.shouldMirror(),l=this.clamp(this.min+i*(n?1-a:a)),o=Number(l.toFixed(ot(this.step)));return this.snap&&this.step?this.getClosestStep(o):o}getClosestStep(t){const{max:i,min:e,step:s}=this;let a=Math.floor((t-e)/s)*s+e;return a=Math.min(Math.max(a,e),i),a>i&&(a-=s),a}getClosestHandle(t){return this.getDistanceX(this.maxHandle,t)>this.getDistanceX(this.minHandle,t)?this.minHandle:this.maxHandle}getDistanceX(t,i){return Math.abs(t.getBoundingClientRect().left-i)}getFontSizeForElement(t){return Number(window.getComputedStyle(t).getPropertyValue("font-size").match(/\d+/)[0])}getUnitInterval(t){return((t=this.clamp(t))-this.min)/(this.max-this.min)}adjustHostObscuredHandleLabel(t){const i=this.el.shadowRoot.querySelector(`.handle__label--${t}`),e=this.el.shadowRoot.querySelector(`.handle__label--${t}.static`),s=this.el.shadowRoot.querySelector(`.handle__label--${t}.transformed`),a=e.getBoundingClientRect(),n=this.getHostOffset(a.left,a.right);i.style.transform=`translateX(${n}px)`,s.style.transform=`translateX(${n}px)`}hyphenateCollidingRangeHandleLabels(){const{shadowRoot:t}=this.el,i=this.shouldMirror(),e=i?"value":"minValue",s=i?"minValue":"value",a=t.querySelector(`.handle__label--${e}`),n=t.querySelector(`.handle__label--${e}.static`),l=t.querySelector(`.handle__label--${e}.transformed`),o=this.getHostOffset(n.getBoundingClientRect().left,n.getBoundingClientRect().right),h=t.querySelector(`.handle__label--${s}`),r=t.querySelector(`.handle__label--${s}.static`),c=t.querySelector(`.handle__label--${s}.transformed`),d=this.getHostOffset(r.getBoundingClientRect().left,r.getBoundingClientRect().right),p=this.getFontSizeForElement(a),m=this.getRangeLabelOverlap(l,c),u=a,b=p/2;if(m>0){if(u.classList.add(wt,$t),0===d&&0===o){let t=m/2-b;t=-1===Math.sign(t)?Math.abs(t):-t;const i=this.getHostOffset(l.getBoundingClientRect().left+t-b,l.getBoundingClientRect().right+t-b);let e=m/2;const s=this.getHostOffset(c.getBoundingClientRect().left+e,c.getBoundingClientRect().right+e);0!==i&&(t+=i,e+=i),0!==s&&(t+=s,e+=s),a.style.transform=`translateX(${t}px)`,l.style.transform=`translateX(${t-b}px)`,h.style.transform=`translateX(${e}px)`,c.style.transform=`translateX(${e}px)`}else if(o>0||d>0)a.style.transform=`translateX(${o+b}px)`,h.style.transform=`translateX(${m+d}px)`,c.style.transform=`translateX(${m+d}px)`;else if(o<0||d<0){let t=Math.abs(o)+m-b;t=-1===Math.sign(t)?Math.abs(t):-t,a.style.transform=`translateX(${t}px)`,l.style.transform=`translateX(${t-b}px)`}}else u.classList.remove(wt,$t),a.style.transform=`translateX(${o}px)`,l.style.transform=`translateX(${o}px)`,h.style.transform=`translateX(${d}px)`,c.style.transform=`translateX(${d}px)`}hideObscuredBoundingTickLabels(){const t=At(this.value);if(!(this.hasHistogram||t||this.labelHandles||this.precise))return;if(!this.hasHistogram&&!t&&this.labelHandles&&!this.precise)return;if(!this.hasHistogram&&!t&&!this.labelHandles&&this.precise)return;if(!this.hasHistogram&&!t&&this.labelHandles&&this.precise)return;if(!this.hasHistogram&&t&&!this.precise)return;if(this.hasHistogram&&!this.precise&&!this.labelHandles)return;const i=this.el.shadowRoot.querySelector(`.${zt}`),e=this.el.shadowRoot.querySelector(`.${Mt}`),s=this.el.shadowRoot.querySelector(`.${Dt}`),a=this.el.shadowRoot.querySelector(`.${Lt}`);!i&&e&&s&&a&&(s.style.opacity=this.isMinTickLabelObscured(s,e)?"0":"1",a.style.opacity=this.isMaxTickLabelObscured(a,e)?"0":"1"),i&&e&&s&&a&&(s.style.opacity=this.isMinTickLabelObscured(s,i)||this.isMinTickLabelObscured(s,e)?"0":"1",a.style.opacity=this.isMaxTickLabelObscured(a,i)||this.isMaxTickLabelObscured(a,e)&&this.hasHistogram?"0":"1")}getHostOffset(t,i){const e=this.el.getBoundingClientRect();return t+7<e.left?e.left-t-7:i-7>e.right?7-(i-e.right):0}getRangeLabelOverlap(t,i){const e=t.getBoundingClientRect(),s=i.getBoundingClientRect(),a=this.getFontSizeForElement(t);return Math.max(e.right+a-s.left,0)}isMinTickLabelObscured(t,i){const e=t.getBoundingClientRect(),s=i.getBoundingClientRect();return m(e,s)}isMaxTickLabelObscured(t,i){const e=t.getBoundingClientRect(),s=i.getBoundingClientRect();return m(e,s)}internalLabelFormatter(t,i){const e=this.labelFormatter;if(!e)return this.formatValue(t);const s=e(t,i,this.formatValue);return null==s?this.formatValue(t):s}static get delegatesFocus(){return!0}get el(){return a(this)}static get watchers(){return{histogram:["histogramWatcher"],ticks:["ticksWatcher"],value:["valueHandler"],minValue:["minMaxValueHandler"],maxValue:["minMaxValueHandler"]}}};Et.style='@charset "UTF-8";:host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{--calcite-slider-handle-size:0.625rem;--calcite-slider-handle-extension-height:0.4rem;--calcite-slider-container-font-size:var(--calcite-font-size--3)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size:0.875rem;--calcite-slider-handle-extension-height:0.5rem;--calcite-slider-container-font-size:var(--calcite-font-size--2)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size:1rem;--calcite-slider-handle-extension-height:0.65rem;--calcite-slider-container-font-size:var(--calcite-font-size--1)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-2);font-size:var(--calcite-slider-container-font-size)}:host{display:block}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * 0.5);padding-block:calc(var(--calcite-slider-handle-size) * 0.5);margin-block:calc(var(--calcite-slider-handle-size) * 0.5);margin-inline:0;--calcite-slider-full-handle-height:calc(\n var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height)\n );touch-action:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-color-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-0.375rem}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-0.5rem}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-0.55rem}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset:calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset:calc(var(--calcite-slider-handle-size) * 0.5);position:absolute;margin:0px;display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:transparent;padding:0px;font-family:inherit;outline:2px solid transparent;outline-offset:2px;transform:translate(var(--calcite-slider-thumb-x-offset), var(--calcite-slider-thumb-y-offset))}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:0px;opacity:0}.thumb .handle__label.hyphen::after{content:"—";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{box-sizing:border-box;border-radius:9999px;background-color:var(--calcite-color-foreground-1);outline-color:transparent;block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease, background-color var(--calcite-internal-animation-timing-medium) ease, box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:0.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-color-text-3)}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-color-brand)}.thumb:focus .handle{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}.thumb:focus .handle-extension{background-color:var(--calcite-color-brand)}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1), var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset:-0.125rem}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset:50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-1.4375rem}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-1.875rem}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-2rem}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{margin-block-start:0.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{margin-block-end:0.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset:-2.075rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset:-2.75rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset:-3.0625rem}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-color-brand);box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16)}.thumb:hover.thumb--precise::after,.thumb:focus.thumb--precise::after,.thumb--active.thumb--precise::after{background-color:var(--calcite-color-brand)}.track{position:relative;block-size:0.125rem;border-radius:0px;background-color:var(--calcite-color-border-2);transition:all var(--calcite-internal-animation-timing-medium) ease-in}.track__range{position:absolute;inset-block-start:0px;block-size:0.125rem;background-color:var(--calcite-color-brand)}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range::after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * 0.5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media (forced-colors: active){.thumb{outline-width:0;outline-offset:0}.handle{outline:2px solid transparent;outline-offset:2px}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:0.25rem;inline-size:0.125rem;border-width:1px;border-style:solid;background-color:var(--calcite-color-border-input);border-color:var(--calcite-color-foreground-1);inset-block-start:-2px;pointer-events:none;margin-inline-start:calc(-1 * 0.125rem)}.tick--active{background-color:var(--calcite-color-brand)}.tick__label{pointer-events:none;margin-block-start:0.875rem;display:flex;justify-content:center}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-3)}.graph{color:var(--calcite-color-foreground-3);block-size:48px}:host([label-ticks][ticks]) .container{padding-block-end:calc(0.875rem + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{padding-block-end:calc(var(--calcite-slider-handle-size) * 0.5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}:host([hidden]){display:none}[hidden]{display:none}';export{ft as calcite_combobox,xt as calcite_graph,Et as calcite_slider}
@@ -1,6 +0,0 @@
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 e,h as i,H as s,g as a}from"./p-f4c4a2b7.js";import{c as o}from"./p-2327029a.js";import{C as r}from"./p-c5897e36.js";import{g as h}from"./p-d7868dd4.js";import{d as l,p as n}from"./p-eb483242.js";import{s as c}from"./p-122a81b5.js";import"./p-73ae4b9b.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";import"./p-dcc35070.js";const d=class{constructor(i){t(this,i),this.calciteInternalDropdownItemChange=e(this,"calciteInternalDropdownItemChange",6),this.updateItems=()=>{Array.from(this.el.querySelectorAll("calcite-dropdown-item")).forEach((t=>t.selectionMode=this.selectionMode))},this.mutationObserver=o("mutation",(()=>this.updateItems())),this.groupTitle=void 0,this.scale="m",this.selectionMode="single"}handlePropsChange(){this.updateItems()}connectedCallback(){this.updateItems(),this.mutationObserver?.observe(this.el,{childList:!0})}componentWillLoad(){this.groupPosition=this.getGroupPosition()}disconnectedCallback(){this.mutationObserver?.disconnect()}render(){const t=this.groupTitle?i("span",{"aria-hidden":"true",class:"dropdown-title"},this.groupTitle):null,e=this.groupPosition>0?i("div",{class:"dropdown-separator",role:"separator"}):null;return i(s,{key:"1c189e8ff87a118d296781b729c889307c2b4a5b","aria-label":this.groupTitle,role:"group"},i("div",{key:"2afc3aee9c68b26af882168ce24cb2937a17c9e8",class:{[r.container]:!0}},e,t,i("slot",{key:"3fdcfab750b0541a4a24764f1a1875c867db06e8"})))}updateActiveItemOnChange(t){this.requestedDropdownGroup=t.detail.requestedDropdownGroup,this.requestedDropdownItem=t.detail.requestedDropdownItem,this.calciteInternalDropdownItemChange.emit({requestedDropdownGroup:this.requestedDropdownGroup,requestedDropdownItem:this.requestedDropdownItem})}getGroupPosition(){return Array.prototype.indexOf.call(this.el.parentElement.querySelectorAll("calcite-dropdown-group"),this.el)}static get delegatesFocus(){return!0}get el(){return a(this)}static get watchers(){return{selectionMode:["handlePropsChange"]}}};d.style=":host{position:relative;display:block}.container{text-align:start}.dropdown-title{margin-block-end:-1px;display:block;cursor:default;overflow-wrap:break-word;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-color-border-3);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-color-text-2)}.dropdown-separator{display:block;block-size:1px;background-color:var(--calcite-color-border-3)}:host([scale=s]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .dropdown-title{padding:0.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .dropdown-title{padding:0.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .dropdown-title{padding:1rem}:host([hidden]){display:none}[hidden]{display:none}";const p=class{constructor(i){t(this,i),this.idsFound=e(this,"idsFound",7),this.noLayersFound=e(this,"noLayersFound",7),this.layerSelectionChange=e(this,"layerSelectionChange",7),this.appearance="transparent",this.defaultLayerId="",this.display="inline-block",this.enabledLayerIds=[],this.enabledTableIds=[],this.height=void 0,this.isMobile=void 0,this.mapView=void 0,this.onlyShowUpdatableLayers=void 0,this.placeholderIcon="",this.selectedIds=[],this.scale="m",this.showTables=void 0,this.showSingleLayerAsLabel=!1,this.type="select",this._hasMultipleLayers=!0,this._hasValidLayers=!0,this._isDropdownOpen=void 0,this.ids=[],this.selectedName="",this._translations=void 0}get el(){return a(this)}defaultLayerHonored=!1;_layerElement;_layerNameHash;_tableNameHash;async mapViewWatchHandler(){await this._setLayers(),this.ids.length>0?(this._hasValidLayers=!0,this._hasMultipleLayers=this.ids.length>1,this._setSelectedLayer(this.ids[0])):(this._hasValidLayers=!1,this.noLayersFound.emit())}idsFound;noLayersFound;layerSelectionChange;async componentWillLoad(){await this._getTranslations(),await this._setLayers(),(this.ids.length>0||1===this.selectedIds.length)&&this.layerSelectionChange.emit(1===this.selectedIds.length?[this.selectedIds[0]]:[this.ids[0]])}render(){const t="map-layer-picker";let e=this.height>0?{height:`${this.height.toString()}px`}:{};return e={...e,display:this.display},i(s,{key:"a96e93924530d926c5e10dd2f7212f3f8c1cbe3c"},i("div",{key:"4b96a73e43e86c31291e4ac60eb15976b01de6a2",class:"map-layer-picker-container",style:e},i("div",{key:"e75c61d8ce0853814dd3903b9e1952cc613b6fbb",class:"map-layer-picker",style:e},this._hasValidLayers?!this._hasMultipleLayers&&this.showSingleLayerAsLabel?this._getSingleLayerPlaceholder():"combobox"===this.type?this._getCombobox(t):"select"===this.type?this._getSelect(t):this._getDropdown(t):this._getInvalidPlaceholder())))}async componentDidLoad(){if(this.ids.length>0||1===this.selectedIds.length){const t=1===this.selectedIds.length?this.selectedIds[0]:this.ids[0];"select"===this.type?this._layerElement.value=t:"dropdown"===this.type&&(this.selectedName=Object.keys(this._layerNameHash).indexOf(t)>-1?this._layerNameHash[t].name:Object.keys(this._tableNameHash).indexOf(t)>-1?this._tableNameHash[t].name:"")}}_getInvalidPlaceholder(){return i("div",null,i("calcite-notice",{class:"height-100",icon:"exclamation-mark-triangle",id:"no-valid-layers",kind:"danger",open:!0},i("div",{slot:"message"},this._translations.noLayersFound)),i("calcite-tooltip",{label:this._translations.enableEditUpdate,placement:"bottom","reference-element":"no-valid-layers"},i("span",null,this._translations.enableEditUpdate)))}_getSingleLayerPlaceholder(){return i("div",{class:"layer-picker-label-container cursor-default"},i("calcite-icon",{icon:"layers",scale:"s"}),i("calcite-label",{class:"no-bottom-margin padding-start-1"},this.selectedName))}_getSelect(t){return i("calcite-select",{id:t,label:"",onCalciteSelectChange:()=>this._layerSelectionChange(),ref:t=>{this._layerElement=t},scale:this.scale},this._getMapLayerOptions())}_getCombobox(t){return i("calcite-combobox",{clearDisabled:!0,id:t,label:"",onCalciteComboboxChange:()=>this._layerSelectionChange(),"placeholder-icon":this.placeholderIcon,ref:t=>{this._layerElement=t},scale:this.scale,"selection-mode":"single"},this._getMapLayerOptions())}_getDropdown(t){return i("calcite-dropdown",{class:"layer-picker-dropdown",onCalciteDropdownBeforeClose:()=>this._isDropdownOpen=!1,onCalciteDropdownBeforeOpen:()=>this._isDropdownOpen=!0},this.isMobile?this._getDropdownButton():this._getActionDropdownButton(t),i("calcite-dropdown-group",{"selection-mode":"single"},this._getMapLayerOptions()))}_getActionDropdownButton(t){return i("calcite-action",{id:t,slot:"trigger",text:""},this._getDropdownButton())}_getDropdownButton(){return i("calcite-button",{alignment:"icon-end-space-between",appearance:this.appearance,class:this.isMobile?"":"max-width-350",iconEnd:this._isDropdownOpen?"chevron-up":"chevron-down",iconStart:"layers",kind:"neutral",slot:this.isMobile?"trigger":"",width:"full"},i("div",null,this.selectedName))}_getMapLayerOptions(){return this.ids.reduce(((t,e)=>(this._validLayer(e)?t.push(this._getItem(e,"layer")):this._validTable(e)&&t.push(this._getItem(e,"table")),t)),[])}_getItem(t,e){const s="layer"===e?this._layerNameHash[t]:this._tableNameHash[t],a=!!this.onlyShowUpdatableLayers&&!s.supportsUpdate,o=s.name,r=this.selectedIds.indexOf(t)>-1;return"combobox"===this.type?i("calcite-combobox-item",{disabled:a,selected:r,textLabel:o,value:t}):"select"===this.type?i("calcite-option",{disabled:a,label:o,selected:r,value:t}):i("calcite-dropdown-group",{class:a?"disabled":"",selectionMode:a?"none":"single"},i("calcite-dropdown-item",{onClick:a?void 0:()=>{this._setSelectedLayer(t)},selected:r},o))}_setSelectedLayer(t){let e;this.defaultLayerId&&!this.defaultLayerHonored&&(e=this._getLayerFromHash(this.defaultLayerId),this.defaultLayerHonored=void 0!==e,t=this.defaultLayerHonored?this.defaultLayerId:t),e=e||this._getLayerFromHash(t),this.selectedName=e?.name,this.selectedIds=[t],this.layerSelectionChange.emit(this.selectedIds)}_getLayerFromHash(t){return Object.keys(this._layerNameHash).indexOf(t)>-1?this._layerNameHash[t]:Object.keys(this._tableNameHash).indexOf(t)>-1?this._tableNameHash[t]:void 0}async _setLayers(){if(this.mapView){await this._initLayerTableHash();const t=this.onlyShowUpdatableLayers?this._getEditableIds(this._layerNameHash):Object.keys(this._layerNameHash),e=this.showTables?this.onlyShowUpdatableLayers?this._getEditableIds(this._tableNameHash):Object.keys(this._tableNameHash):[];this.ids=[...t.reverse().filter((t=>!(this.enabledLayerIds?.length>0)||this.enabledLayerIds.reverse().indexOf(t)>-1)),...e.reverse().filter((t=>!(this.enabledTableIds?.length>0)||this.enabledTableIds.reverse().indexOf(t)>-1))],this.idsFound.emit({layerIds:t,tableIds:e})}}_getEditableIds(t){return Object.keys(t).reduce(((e,i)=>(t[i].supportsUpdate&&e.push(i),e)),[])}async _initLayerTableHash(){this._layerNameHash=await l(this.mapView,this.onlyShowUpdatableLayers),this._tableNameHash=this.showTables?await n(this.mapView,this.onlyShowUpdatableLayers):{}}_validLayer(t){const e=this._layerNameHash[t]?.name;return e&&Object.keys(c.managedLayers).indexOf(e)<0&&(!(this.enabledLayerIds.length>0)||this.enabledLayerIds.indexOf(t)>-1)}_validTable(t){const e=this._tableNameHash[t]?.name,i=e&&this.showTables;return i?c.managedTables.indexOf(e)<0&&(!(this.enabledTableIds.length>0)||this.enabledTableIds.indexOf(t)>-1):i}_layerSelectionChange(){const t=Array.isArray(this._layerElement.value)?this._layerElement.value:[this._layerElement.value];JSON.stringify(t)!==JSON.stringify([""])&&(this.selectedIds=t,this.layerSelectionChange.emit(this.selectedIds))}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};p.style=":host{display:block}.map-layer-picker-container{width:100%;align-items:center}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}.layer-picker-dropdown{height:100%;width:100%}.max-width-350{max-width:350px}.height-100{height:100%}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.no-bottom-margin{--calcite-label-margin-bottom:0px}.layer-picker-label-container{align-items:center;display:inline-flex;height:100%;padding-inline-start:1rem;padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.cursor-default{cursor:default}";export{d as calcite_dropdown_group,p as map_layer_picker}
@@ -1,6 +0,0 @@
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 i,g as e,h as s,H as h}from"./p-f4c4a2b7.js";import{g as o}from"./p-d7868dd4.js";import{E as a}from"./p-80cb7c73.js";import{g as l}from"./p-eb483242.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const n=class{constructor(e){t(this,e),this.showIntroductionWindow=i(this,"showIntroductionWindow",7),this.showCoverPage=i(this,"showCoverPage",7),this.appLayout=void 0,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.enableCreateFeatures=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,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=!1,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=void 0,this._layer=void 0,this._layoutMode=a.GRID,this._mapInfo=void 0,this._mapView=void 0,this._panelOpen=!0,this._numSelected=0,this._tableOnly=!1}get el(){return e(this)}_defaultCenterHonored=!1;_defaultLevelHonored=!1;_hideMapOnLoadHonored=!1;_layerTable;_mapChange;_resizeObserver;_shouldSetMapView=!1;enableZoomWatchHandler(){this._initMapZoom()}hideMapOnLoadWatchHandler(){this.showHideMapPopupAndTable(this.hideMapOnLoad&&!this._isMobile),this._expandPopup=this.hideMapOnLoad&&!this._isMobile}showIntroductionWindow;showCoverPage;async featureSelectionChange(t){this._numSelected=t.detail?.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async idsFound(t){const i=t.detail;this._tableOnly=i.tableIds.length>0&&0===i.layerIds.length,this._tableOnly&&(this._expandPopup=!0)}async layoutChanged(t){this._layoutMode=t.detail}async mapChanged(t){this._mapChange=t.detail,await this._mapChange.mapView.when((async()=>{await this._setMapView()}))}async beforeMapChanged(){this._expandPopup&&(this._shouldSetMapView=!0)}async layerSelectionChange(t){const i=t.detail[0],e=await l(this._mapView,i);await e.when((()=>{this._layer=e}))}async mapInfoChange(){this._expandPopup=this.hideMapOnLoad&&!this._isMobile,this._hideMapOnLoadHonored=!1}async componentWillLoad(){await this._getTranslations(),this._resizeObserver=new ResizeObserver((()=>this._onResize()))}render(){return s(h,{key:"f434a8e24b111a32774e9d5683c2446ba35b504b"},s("calcite-shell",{key:"017843c77fa2c52f0d957760ac3f57808d11d59f",class:"position-relative"},s("calcite-panel",{key:"bd8eeec3a013583789b9e1b251fed34e5896171e",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,this._mapChange&&await this._setMapView())}async componentDidLoad(){this._resizeObserver.observe(this.el)}_getFooter(){const t=this._numSelected>0,i=this._layer?.editingEnabled&&this._layer?.capabilities?.operations?.supportsDelete;return this._isMobile&&t&&!this._hideFooter?s("div",{class:"width-100",slot:"footer"},s("div",{class:"display-flex padding-1-2"},s("calcite-button",{appearance:"solid",id:"solutions-show",onClick:()=>this.showHideMapPopupAndTable(!0),width:"full"},this._translations.view.replace("{{n}}",this._numSelected.toString())),i?s("delete-button",{class:"padding-inline-start-1 width-full",id:"solutions-delete",ids:this._layerTable.selectedIds,layer:this._layer}):void 0)):void 0}_getDividerIcon(t,i){let e="";switch(t){case a.HORIZONTAL:e=i?"chevrons-up":"chevrons-down";break;case a.VERTICAL:case a.GRID:e=i?"chevrons-left":"chevrons-right"}return e}_getMapSizeClass(t,i,e){let s="";switch(t){case a.HORIZONTAL:s=(i&&!e?"height-1-2 display-grid":i&&e?"height-full":"height-0")+" width-full position-relative";break;case a.GRID:s="height-full position-relative "+(i?"width-1-3":"width-0");break;case a.VERTICAL:s="height-full position-relative "+(i?"width-1-2":"width-0")}return s}_getTableSizeClass(t,i){let e="";switch(t){case a.HORIZONTAL:e=(i?"height-1-2":"height-full")+" width-full display-flex flex-column";break;case a.GRID:e=(i?"width-2-3":"width-full")+" height-full display-flex";break;case a.VERTICAL:e=(i?"width-1-2":"width-full")+" height-full display-flex"}return e}_getBody(t,i,e){const h="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light";return s("calcite-panel",{class:"width-full height-full"},s("div",{class:"width-full height-full overflow-hidden "+(t===a.HORIZONTAL?"":"display-flex")},this._getMapAndCard(t,i,e),this._getTable(t,i,e)),this.coverPageEnabled&&s("div",{class:"floating-container",onClick:this.coverPageButtonClick.bind(this)},s("calcite-button",{appearance:"solid",class:`floating-button ${h}`,"icon-start":"content-minimal",kind:"neutral",label:"",round:!0,scale:"l","split-child":"primary",width:"auto"})),this.introductionWindowEnabled&&s("div",{class:"floating-container",onClick:this.infoButtonClick.bind(this)},s("calcite-button",{appearance:"solid",class:`floating-button ${h}`,"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(t,i,e){const h=this._getMapSizeClass(t,i,e);return s("div",{class:`${h} overflow-hidden`},this._getMapNode(i),this._getPopupExpandNode())}_getMapNode(t){return s("div",{class:(this._layoutMode!==a.HORIZONTAL||this._isMobile&&!t?"adjusted-height-50":"")+" overflow-hidden"},s("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:this.mapInfos?.filter((t=>!1!==t.visible)),mapWidgetsIndex:0,mapWidgetsPosition:"top-right",mapWidgetsSize:"m",stackTools:!0,theme:this.theme,toolOrder:["legend","search","fullscreen","basemap","floorfilter"]}))}_getPopupExpandNode(){const t=this._expandPopup?"chevrons-down":"chevrons-up",i="expand-popup",e=this._expandPopup?this._translations.collapsePopup:this._translations.expandPopup,h="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light",o=this._isMobile?"display-none height-0":"";return s("div",{class:`${this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark"} ${this._expandPopup?1===this.mapInfos?.length||this._isMobile?"position-absolute-0":"position-absolute-50":"height-full"} ${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}},s("calcite-panel",null,this._isMobile?void 0:s("div",{class:`display-flex align-items-center ${o}`,slot:"header-content"},s("calcite-icon",{icon:"information",scale:"s"}),s("div",{class:"padding-inline-start-75"},this._translations.information)),s("calcite-action",{class:o,disabled:this._tableOnly,icon:t,id:i,onClick:()=>this._togglePopup(),slot:"header-actions-end",text:""}),this._tableOnly?void 0:s("calcite-tooltip",{class:h,label:"",placement:"bottom","reference-element":i},s("span",null,e)),this._getCardNode()))}_togglePopup(){this._expandPopup=!this._expandPopup,this._hideMapOnLoadHonored=!0}_getCardNode(){return s("div",{class:"width-50 height-full "+("dark"===this.theme?"calcite-mode-dark":"calcite-mode-light")},s("card-manager",{class:(this._expandPopup||this._isMobile?"height-full":"height-50")+" width-full",enableEditGeometry:this?._mapInfo?.enableEditGeometry,isMobile:this._isMobile,mapView:this?._mapView,zoomAndScrollToSelected:this.zoomAndScrollToSelected}))}_getTable(t,i,e){const h=e&&this._isMobile?"visibility-hidden":"",o=this._getTableSizeClass(t,i),l=this._getDividerIcon(t,i),n=i?this._translations.close:this._translations.open,d="toggle-layout",r=t===a.HORIZONTAL?"horizontal":"vertical",c=t===a.HORIZONTAL?"header":"panel-start",p=this.defaultWebmap&&this.defaultLayer,g=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,u=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map((t=>parseInt(t,10))):[parseInt(this.defaultOid,10)]:void 0;return s("calcite-shell",{class:`${o} ${h} border-bottom`},this._isMobile?void 0:s("calcite-action-bar",{class:"border-sides",expandDisabled:!0,layout:r,slot:c},s("calcite-action",{class:"toggle-node",icon:l,id:d,onClick:()=>this._toggleLayout(),text:""}),s("calcite-tooltip",{label:n,placement:"bottom","reference-element":d},s("span",null,n))),s("div",{class:"width-full height-full position-relative"},s("layer-table",{defaultGlobalId:p?g:void 0,defaultLayerId:p?this.defaultLayer:"",defaultOid:p&&!g?u:void 0,enableAutoRefresh:this.enableAutoRefresh,enableCSV:this.enableCSV,enableColumnReorder:this.enableColumnReorder,enableInlineEdit:this?._mapInfo?.enableInlineEdit,enableShare:this.enableShare,isMobile:this._isMobile,mapHidden:this._expandPopup,mapInfo:this._mapInfo,mapView:this?._mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,ref:t=>this._layerTable=t,shareIncludeEmbed:this.shareIncludeEmbed,shareIncludeSocial:this.shareIncludeSocial,showNewestFirst:this.showNewestFirst,zoomAndScrollToSelected:this.zoomAndScrollToSelected,zoomToScale:this.zoomToScale})))}_onResize(){const t=this.el.offsetWidth<1024,i=!this._isMobile&&t;this._isMobile=t,this._layoutMode=this._isMobile?a.HORIZONTAL:a.GRID,i&&(this._panelOpen=!0),(this.hideMapOnLoad&&!this._hideMapOnLoadHonored||this._isMobile)&&this.hideMapOnLoadWatchHandler()}_toggleLayout(){this._panelOpen=!this._panelOpen}showHideMapPopupAndTable(t){this._expandPopup=!1,this._hideTable=t,this._hideFooter=t}_getMapInfo(t){let i;return this.mapInfos.some((e=>{if(e.id===t)return i=e,!0})),{...i}}async _setMapView(){this._mapInfo=this._getMapInfo(this._mapChange.id),this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView.popupEnabled=!1;const t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map((t=>parseFloat(t))),i=!this.defaultLevel||this._defaultLevelHonored?void 0:parseInt(this.defaultLevel,10);t&&i&&(await this._mapView.goTo({center:t,zoom:i}),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 t=await o(this.el);this._translations=t[0]}static get watchers(){return{enableZoom:["enableZoomWatchHandler"],hideMapOnLoad:["hideMapOnLoadWatchHandler"]}}};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}
@@ -1,6 +0,0 @@
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 s,g as a,h as e,H as r}from"./p-f4c4a2b7.js";const t=class{constructor(a){s(this,a)}get el(){return a(this)}render(){return e(r,{key:"104457a5adda26509038d324510d96303fc116ec"},e("slot",{key:"b20c4a07d8a74354ce7c1dc6aa56dda863b041c9"}))}};t.style=":host{display:block}";export{t as refine_results_flow_item}