@arcgis/common-components 6.0.0-next.1 → 6.0.0-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/cdn/{O4H2JR53.js → 32MHBJSZ.js} +1 -1
  2. package/dist/cdn/{N25TUHM4.js → 34AP2EEB.js} +2 -2
  3. package/dist/cdn/{A72IJUIB.js → 3AFEXHZ5.js} +2 -2
  4. package/dist/cdn/{5IM4X2GT.js → 3TY4GT5J.js} +1 -1
  5. package/dist/cdn/{PMV2N3L3.js → 5KBPWYPL.js} +1 -1
  6. package/dist/cdn/5XRYXPOX.js +2 -0
  7. package/dist/cdn/{KQS6BKLU.js → 735FTIBP.js} +2 -2
  8. package/dist/cdn/7QVNHEMF.js +2 -0
  9. package/dist/cdn/B33S3YBM.js +2 -0
  10. package/dist/cdn/{HS7W72ER.js → BCN6LPOG.js} +2 -2
  11. package/dist/cdn/{2IDDI3CL.js → BZFAYVKR.js} +2 -2
  12. package/dist/cdn/{Y5Y7IXOV.js → CFEMTMZX.js} +1 -1
  13. package/dist/cdn/{5DN7BGGJ.js → CKGWDI7B.js} +2 -2
  14. package/dist/cdn/{XVHY4R5V.js → D4UHHQ35.js} +2 -2
  15. package/dist/cdn/{L7XGWJZF.js → DPJGC3YQ.js} +2 -2
  16. package/dist/cdn/{6HVKL3BT.js → DR2THZQU.js} +2 -2
  17. package/dist/cdn/{SQZNAETL.js → EB5MDEWF.js} +2 -2
  18. package/dist/cdn/{RMIP56UK.js → EM4OQXFS.js} +2 -2
  19. package/dist/cdn/{WJQZVHBV.js → GDRW3MIZ.js} +2 -2
  20. package/dist/cdn/{XEK22IDA.js → GUL7EIJ4.js} +1 -1
  21. package/dist/cdn/{NCKLLNHD.js → HJ3EJZFF.js} +2 -2
  22. package/dist/cdn/{EPTIOSEA.js → HYFFUYAU.js} +2 -2
  23. package/dist/cdn/{UGWLCTVM.js → I7YBGXB2.js} +1 -1
  24. package/dist/cdn/{LZ4RIDXD.js → IECXEZNI.js} +2 -2
  25. package/dist/cdn/IOFMXI5N.js +2 -0
  26. package/dist/cdn/IYJAPMC5.js +2 -0
  27. package/dist/cdn/{JWK6KCSN.js → JTQN5KMG.js} +2 -2
  28. package/dist/cdn/{7YKS2UHU.js → KDCSDIUQ.js} +2 -2
  29. package/dist/cdn/{5ESJPPJ3.js → LLATF73T.js} +2 -2
  30. package/dist/cdn/{M3SD6ANM.js → LNXO5YIS.js} +2 -2
  31. package/dist/cdn/{LON5GSEV.js → M2J3GPM4.js} +2 -2
  32. package/dist/cdn/M3SFEFPX.js +2 -0
  33. package/dist/cdn/{YNJHUBFL.js → MFGUTQRR.js} +2 -2
  34. package/dist/cdn/{DE72K2VB.js → OIGA7XBZ.js} +2 -2
  35. package/dist/cdn/{FVQ64IB5.js → OMROUY3L.js} +2 -2
  36. package/dist/cdn/{KWZ7LGK2.js → OTWADB4M.js} +2 -2
  37. package/dist/cdn/{6KPYL34Q.js → QCUF7B3I.js} +2 -2
  38. package/dist/cdn/{KWLXXTWN.js → S4XOD4YS.js} +2 -2
  39. package/dist/cdn/{4TZVXSQZ.js → SANPZYEG.js} +2 -2
  40. package/dist/cdn/TO3YFXVJ.js +2 -0
  41. package/dist/cdn/{Z5QBBHLD.js → TTFTN2LD.js} +1 -1
  42. package/dist/cdn/{NPVQBA5D.js → TXQKK4DJ.js} +2 -2
  43. package/dist/cdn/{4LQHU5XS.js → UIBTY5FF.js} +2 -2
  44. package/dist/cdn/{NZEZVGEW.js → X6DNIKWY.js} +2 -2
  45. package/dist/cdn/{MXGA3EHW.js → XUPA27AW.js} +2 -2
  46. package/dist/cdn/{H4Q2JVNO.js → XX2ZCFWI.js} +1 -1
  47. package/dist/cdn/{2E2QBY2J.js → YEFEVEP6.js} +2 -2
  48. package/dist/cdn/ZGYD3GAS.js +2 -0
  49. package/dist/cdn/index.js +2 -2
  50. package/dist/chunks/element-reference-controller.js +1 -1
  51. package/dist/chunks/general.js +1 -1
  52. package/dist/chunks/internal-types.js +1 -1
  53. package/dist/chunks/layer-utils.js +1 -1
  54. package/dist/chunks/locale.js +1 -1
  55. package/dist/chunks/resources.js +1 -1
  56. package/dist/chunks/runtime.js +2 -2
  57. package/dist/chunks/strategies.js +1 -1
  58. package/dist/chunks/toolbar.js +1 -1
  59. package/dist/chunks/types.js +1 -1
  60. package/dist/chunks/useT9n.js +1 -1
  61. package/dist/chunks/utils.js +1 -1
  62. package/dist/chunks/utils2.js +1 -1
  63. package/dist/chunks/utils3.js +1 -1
  64. package/dist/components/arcgis-ckeditor5/customElement.js +1 -1
  65. package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
  66. package/dist/components/arcgis-color-input/customElement.js +1 -1
  67. package/dist/components/arcgis-coordinate-system-picker/customElement.js +1 -1
  68. package/dist/components/arcgis-coordinate-system-picker-tree/customElement.js +1 -1
  69. package/dist/components/arcgis-field-info/customElement.js +1 -1
  70. package/dist/components/arcgis-field-pick-list/customElement.js +1 -1
  71. package/dist/components/arcgis-histogram/customElement.d.ts +8 -0
  72. package/dist/components/arcgis-histogram/customElement.js +104 -99
  73. package/dist/components/arcgis-label-input/customElement.js +2 -2
  74. package/dist/components/arcgis-picker-input/customElement.js +1 -1
  75. package/dist/components/arcgis-ramp-color/customElement.js +1 -1
  76. package/dist/components/arcgis-ramp-color-break/customElement.js +1 -1
  77. package/dist/components/arcgis-ramp-opacity/customElement.js +1 -1
  78. package/dist/components/arcgis-slider/customElement.js +523 -452
  79. package/dist/components/arcgis-slider-field/customElement.js +1 -1
  80. package/dist/components/arcgis-slider-histogram-range/customElement.js +1 -1
  81. package/dist/components/arcgis-slider-input/customElement.js +1 -1
  82. package/dist/components/arcgis-ticks/customElement.js +9 -9
  83. package/dist/components/arcgis-toolbar/customElement.js +1 -1
  84. package/dist/components/arcgis-toolbar-action/customElement.js +1 -1
  85. package/dist/components/arcgis-toolbar-group/customElement.js +1 -1
  86. package/dist/components/arcgis-toolbar-item/customElement.js +1 -1
  87. package/dist/components/arcgis-toolbar-more-button/customElement.js +1 -1
  88. package/dist/components/arcgis-toolbar-split-button/customElement.js +1 -1
  89. package/dist/components/arcgis-toolbar-stack/customElement.js +1 -1
  90. package/dist/components/arcgis-unique-values-list/customElement.js +1 -1
  91. package/dist/components/arcgis-value-picker/customElement.d.ts +8 -1
  92. package/dist/components/arcgis-value-picker/customElement.js +24 -20
  93. package/dist/components/arcgis-value-picker/index.js +1 -1
  94. package/dist/components/arcgis-value-picker-collection/customElement.js +1 -1
  95. package/dist/components/arcgis-value-picker-combobox/customElement.js +1 -1
  96. package/dist/components/arcgis-value-picker-label/customElement.d.ts +6 -0
  97. package/dist/components/arcgis-value-picker-label/customElement.js +4 -4
  98. package/dist/components/arcgis-value-picker-slider/customElement.js +2 -2
  99. package/dist/docs/api.json +1 -1
  100. package/dist/docs/docs.json +1 -1
  101. package/dist/docs/vscode.html-custom-data.json +1 -1
  102. package/dist/docs/web-types.json +1 -1
  103. package/dist/index.js +1 -1
  104. package/dist/loader.js +4 -4
  105. package/dist/types/lumina.d.ts +3 -3
  106. package/dist/types/preact.d.ts +3 -3
  107. package/dist/types/react.d.ts +3 -3
  108. package/dist/types/stencil.d.ts +3 -3
  109. package/package.json +5 -5
  110. package/dist/cdn/A5NQGETV.js +0 -2
  111. package/dist/cdn/BU4CQ2UT.js +0 -2
  112. package/dist/cdn/DBBRUMRI.js +0 -2
  113. package/dist/cdn/FSIEKVKO.js +0 -2
  114. package/dist/cdn/HCF255AI.js +0 -2
  115. package/dist/cdn/IFXBIZ77.js +0 -2
  116. package/dist/cdn/WG2YHQHU.js +0 -2
  117. package/dist/cdn/Y2G4R4SG.js +0 -2
@@ -1,20 +1,20 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as ee } from "../../chunks/runtime.js";
3
- import { keyed as te } from "lit/directives/keyed.js";
4
- import { LitElement as ae, createEvent as M, safeClassMap as T, safeStyleMap as F, nothing as E } from "@arcgis/lumina";
5
- import { makeAccessorController as ne } from "@arcgis/lumina-toolkit/useAccessor";
6
- import { classes as re, getClosestElement as ie } from "@arcgis/toolkit/dom";
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import { c as re } from "../../chunks/runtime.js";
3
+ import { keyed as q } from "lit/directives/keyed.js";
4
+ import { LitElement as ie, createEvent as M, safeClassMap as S, safeStyleMap as F, nothing as P } from "@arcgis/lumina";
5
+ import { makeAccessorController as se } from "@arcgis/lumina-toolkit/useAccessor";
6
+ import { classes as le, getClosestElement as oe } from "@arcgis/toolkit/dom";
7
7
  import { slotChangeHasAssignedElement as H } from "@arcgis/toolkit/dom/slots";
8
- import { css as se, html as w } from "lit";
9
- import { map as N } from "lit/directives/map.js";
10
- import { createRef as X, ref as B } from "lit/directives/ref.js";
11
- import { u as le } from "../../chunks/useT9n.js";
12
- import { a as oe } from "../../chunks/locale.js";
13
- import ce from "@arcgis/core/core/Accessor.js";
14
- import { property as I, subclass as de } from "@arcgis/core/core/accessorSupport/decorators.js";
15
- import { watch as U } from "@arcgis/core/core/reactiveUtils.js";
16
- import { generateGuid as q } from "@arcgis/toolkit/string";
17
- const b = {
8
+ import { css as ce, html as w } from "lit";
9
+ import { map as X } from "lit/directives/map.js";
10
+ import { createRef as j, ref as U } from "lit/directives/ref.js";
11
+ import { u as de } from "../../chunks/useT9n.js";
12
+ import { a as ue } from "../../chunks/locale.js";
13
+ import he from "@arcgis/core/core/Accessor.js";
14
+ import { property as E, subclass as ge } from "@arcgis/core/core/accessorSupport/decorators.js";
15
+ import { watch as K } from "@arcgis/core/core/reactiveUtils.js";
16
+ import { generateGuid as W } from "@arcgis/toolkit/string";
17
+ const _ = {
18
18
  increment: "ArrowUp",
19
19
  incrementHorizontal: "ArrowRight",
20
20
  decrement: "ArrowDown",
@@ -25,85 +25,85 @@ const b = {
25
25
  jumpToEnd: "End",
26
26
  confirmEdit: "Enter"
27
27
  };
28
- function j({ key: n, shiftKey: e }, t, a) {
29
- const i = he(n);
28
+ function Y({ key: r, shiftKey: e }, t, n) {
29
+ const i = me(r);
30
30
  if (i == null)
31
31
  return null;
32
- const r = ge(n) || ue(n) && e ? me(t) : 1;
32
+ const a = pe(r) || fe(r) && e ? ve(t) : 1;
33
33
  return {
34
- direction: a ? i * -1 : i,
35
- count: r
34
+ direction: n ? i * -1 : i,
35
+ count: a
36
36
  };
37
37
  }
38
- function he(n) {
39
- return n === b.increment || n === b.incrementHorizontal || n === b.pageIncrement ? 1 : n === b.decrement || n === b.decrementHorizontal || n === b.pageDecrement ? -1 : null;
38
+ function me(r) {
39
+ return r === _.increment || r === _.incrementHorizontal || r === _.pageIncrement ? 1 : r === _.decrement || r === _.decrementHorizontal || r === _.pageDecrement ? -1 : null;
40
40
  }
41
- function W(n) {
42
- return n === b.jumpToEnd || n === b.jumpToStart;
41
+ function J(r) {
42
+ return r === _.jumpToEnd || r === _.jumpToStart;
43
43
  }
44
- function ue(n) {
45
- return n === b.increment || n === b.decrement || n === b.decrementHorizontal || n === b.incrementHorizontal;
44
+ function fe(r) {
45
+ return r === _.increment || r === _.decrement || r === _.decrementHorizontal || r === _.incrementHorizontal;
46
46
  }
47
- function ge(n) {
48
- return n === b.pageIncrement || n === b.pageDecrement;
47
+ function pe(r) {
48
+ return r === _.pageIncrement || r === _.pageDecrement;
49
49
  }
50
- function me(n) {
51
- const e = Number.isFinite(n) ? Math.floor(n) : 1;
50
+ function ve(r) {
51
+ const e = Number.isFinite(r) ? Math.floor(r) : 1;
52
52
  return Math.max(1, e);
53
53
  }
54
- const fe = se`:host{display:flex;width:100%;height:100%;font-size:var(--calcite-font-size--2);font-variant-numeric:tabular-nums;--arcgis-slider-dash-length: 5px;--arcgis-slider-handle-size: .875rem;--arcgis-slider-track-background-color: var(--calcite-color-border-2);--arcgis-internal-slider-show-range-labels: 0;--arcgis-internal-slider-show-value-labels: 0;--arcgis-internal-slider-value-labels-placement-start: 0;--arcgis-internal-slider-value-labels-placement-end: 0;--arcgis-internal-slider-range-labels-placement-center: 0;--arcgis-internal-slider-range-labels-placement-end: 0;--arcgis-internal-slider-handle-color: var(--calcite-color-text-3);--arcgis-internal-slider-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-internal-slider-label-input-margin: calc(var(--arcgis-internal-slider-handle-offset) + 4px);--arcgis-internal-slider-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-internal-slider-track-range-background-color: var(--calcite-color-brand);--arcgis-internal-slider-track-size: 2px}:host([show-range-labels]){--arcgis-internal-slider-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-internal-slider-show-value-labels: 1}:host([value-labels-placement="start"]){--arcgis-internal-slider-value-labels-placement-start: var(--arcgis-internal-slider-show-value-labels)}:host([value-labels-placement="end"]){--arcgis-internal-slider-value-labels-placement-end: var(--arcgis-internal-slider-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-internal-slider-range-labels-placement-center: var(--arcgis-internal-slider-show-range-labels)}:host([range-labels-placement="end"]){--arcgis-internal-slider-range-labels-placement-end: var(--arcgis-internal-slider-show-range-labels)}:host([disabled]){cursor:default;opacity:var(--calcite-opacity-disabled);pointer-events:none}.content{direction:ltr;flex:1;touch-action:none;user-select:none;display:grid;word-wrap:normal;word-break:normal;padding-block:var(--arcgis-internal-slider-handle-offset)}.track-container{grid-area:track-container;position:relative;display:flex;justify-content:center;align-items:center}.track{touch-action:none;position:relative}.track-bounds{background-color:var(--calcite-color-border-2)}:host([layout="vertical"]){.track-effective-start{background:repeating-linear-gradient(to bottom,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-end{background:repeating-linear-gradient(to top,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}:host([layout="horizontal"]){.track-effective-start{background:repeating-linear-gradient(to right,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-end{background:repeating-linear-gradient(to left,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}.track-range-interactive{&.active{box-shadow:0 0 8px #00000029;outline:1px solid var(--calcite-color-border-2)}&.filled.active{outline-color:var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}}.track-range{background-color:var(--arcgis-internal-slider-track-range-background-color);pointer-events:none}:host([disabled]) .track-range{background-color:var(--calcite-color-text-3)}:host([disabled]),:host([disabled][layout="horizontal"]),:host([disabled][layout="vertical"]){.track-range-interactive.interactive:after{cursor:default;pointer-events:none}}:host([layout="horizontal"]){.track-range-interactive.interactive:after{all:initial;cursor:ew-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-internal-slider-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-top:1px}}:host([layout="vertical"]){.track-range-interactive.interactive:after{all:initial;cursor:ns-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-internal-slider-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-left:1px;writing-mode:vertical-lr}}.segment{transform-origin:0 0;inset-block-start:0px;block-size:.125rem;position:absolute;top:0;left:0}.thumb{-webkit-user-select:none;user-select:none;background-color:#4c4c4c;width:2px;height:2px;margin:-1px;position:absolute}.thumb-content{width:0;height:0;position:absolute;top:50%;left:50%}.thumb:focus,.thumb.active{.handle{background-color:var(--calcite-color-brand);box-shadow:0 0 8px #00000029;outline:2px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}}.thumb.labels-only .handle{visibility:hidden;pointer-events:none}.thumb.labels-only{background-color:transparent}.handle{cursor:pointer;box-sizing:border-box;z-index:1;touch-action:none;background-color:var(--calcite-color-foreground-1);box-shadow:0 0 0 2px var(--arcgis-internal-slider-handle-color) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all var(--arcgis-internal-slider-transition-duration, var(--calcite-animation-timing, .125s)) ease-in-out;position:absolute;top:calc(var(--arcgis-internal-slider-handle-offset) * -1);left:calc(var(--arcgis-internal-slider-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}:host([layout="vertical"]) .fixed-thumb .handle{width:calc(var(--arcgis-slider-handle-size) / 1.5);height:calc(var(--arcgis-slider-handle-size) * 1.5);cursor:ns-resize}.fixed-thumb .handle{width:calc(var(--arcgis-slider-handle-size) * 1.5);height:calc(var(--arcgis-slider-handle-size) / 1.5);top:0;left:0;transform:translate(-50%,-50%);cursor:ew-resize}.label{position:absolute;will-change:transform}.min{grid-area:range-start}.max{grid-area:range-end}:host([layout="horizontal"][mirrored][range-labels-placement="center"]),:host([layout="vertical"]:not([mirrored])){.min{grid-area:range-end}.max{grid-area:range-start}}.content-start{grid-area:content-start;display:flex}.content-end{grid-area:content-end;display:flex}:dir(rtl){.content-start,.content-end,.label,.max,.min,.popover{direction:rtl}}:host([layout="vertical"]){.content{grid-template:". range-start range-start range-start ." "content-start content-start track-container content-end content-end" ". range-end range-end range-end .";grid-template-rows:auto 1fr auto;grid-template-columns:1fr auto auto auto 1fr;row-gap:var(--arcgis-internal-slider-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-internal-slider-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-internal-slider-label-input-height) * -.5)}&:host([value-labels-placement="start"]){.label{right:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label{left:var(--arcgis-internal-slider-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-internal-slider-content-start-min-height: calc( ((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset)) + (var(--arcgis-internal-slider-value-labels-placement-start) * var(--arcgis-internal-slider-label-input-height)) );--arcgis-internal-slider-content-end-min-height: calc( ((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset)) + (var(--arcgis-internal-slider-value-labels-placement-end) * var(--arcgis-internal-slider-label-input-height)) );column-gap:calc(var(--arcgis-internal-slider-show-range-labels) * var(--arcgis-internal-slider-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset));grid-template:". content-start ." "range-start content-start range-end" "range-start track-container range-end" "range-start content-end range-end" ". content-end .";grid-template-columns:auto 1fr auto;grid-template-rows:minmax(var(--arcgis-internal-slider-content-start-min-height),auto) calc(var(--arcgis-internal-slider-show-range-labels) * calc(calc(var(--arcgis-internal-slider-label-input-height) / 2) - calc(var(--arcgis-internal-slider-track-size) / 2))) var(--arcgis-internal-slider-track-size) calc(var(--arcgis-internal-slider-show-range-labels) * calc(calc(var(--arcgis-internal-slider-label-input-height) / 2) - calc(var(--arcgis-internal-slider-track-size) / 2))) minmax(var(--arcgis-internal-slider-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-internal-slider-track-size)}&:host([value-labels-placement="start"]){.label{bottom:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:var(--arcgis-internal-slider-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="end"]){min-inline-size:min-content;.content{--arcgis-internal-slider-content-start-min-height: calc( var(--arcgis-internal-slider-handle-offset) + var(--arcgis-internal-slider-value-labels-placement-start) * var(--arcgis-internal-slider-label-input-height) );--arcgis-internal-slider-content-end-min-height: calc( var(--arcgis-internal-slider-value-labels-placement-end) * var(--arcgis-internal-slider-label-input-height) );padding-inline:var(--arcgis-internal-slider-handle-offset);grid-template:"content-start content-start content-start" "track-container track-container track-container" "content-end content-end content-end" "content-end content-end content-end" "content-end content-end content-end";grid-template-columns:auto 0 auto;grid-template-rows:minmax(var(--arcgis-internal-slider-content-start-min-height),auto) var(--arcgis-internal-slider-track-size) var(--arcgis-internal-slider-handle-offset) calc(var(--arcgis-internal-slider-range-labels-placement-end) * var(--arcgis-internal-slider-label-input-height)) minmax(var(--arcgis-internal-slider-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-internal-slider-track-size)}&:host([value-labels-placement="start"]){.label{bottom:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:calc(var(--arcgis-internal-slider-label-input-margin) + var(--arcgis-internal-slider-range-labels-placement-end) * (var(--arcgis-internal-slider-label-input-height)))}}.min,.max{--arcgis-internal-slider-range-translation: calc(var(--arcgis-internal-slider-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;margin-inline-start:calc(var(--arcgis-internal-slider-range-translation) * -1)}.max{grid-column:3;margin-inline-end:calc(var(--arcgis-internal-slider-range-translation) * -1)}}&:host([mirrored]){.min{grid-column:3;margin-inline-end:calc(var(--arcgis-internal-slider-range-translation) * -1)}.max{grid-column:1;margin-inline-start:calc(var(--arcgis-internal-slider-range-translation) * -1)}}}`;
55
- var pe = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, J = (n) => {
56
- throw TypeError(n);
57
- }, V = (n, e, t, a) => {
58
- for (var i = a > 1 ? void 0 : a ? ve(e, t) : e, r = n.length - 1, l; r >= 0; r--)
59
- (l = n[r]) && (i = (a ? l(e, t, i) : l(i)) || i);
60
- return a && i && pe(e, t, i), i;
61
- }, Y = (n, e, t) => e.has(n) || J("Cannot " + t), be = (n, e, t) => (Y(n, e, "read from private field"), e.get(n)), _e = (n, e, t) => e.has(n) ? J("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), xe = (n, e, t, a) => (Y(n, e, "write to private field"), e.set(n, t), t), A;
62
- function we() {
54
+ const be = ce`:host{display:flex;width:100%;height:100%;font-size:var(--calcite-font-size--2);font-variant-numeric:tabular-nums;--arcgis-slider-dash-length: 5px;--arcgis-slider-handle-size: .875rem;--arcgis-slider-track-background-color: var(--calcite-color-border-2);--arcgis-internal-slider-show-range-labels: 0;--arcgis-internal-slider-show-value-labels: 0;--arcgis-internal-slider-value-labels-placement-start: 0;--arcgis-internal-slider-value-labels-placement-end: 0;--arcgis-internal-slider-range-labels-placement-center: 0;--arcgis-internal-slider-range-labels-placement-end: 0;--arcgis-internal-slider-handle-color: var(--calcite-color-text-3);--arcgis-internal-slider-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-internal-slider-label-input-margin: calc(var(--arcgis-internal-slider-handle-offset) + 4px);--arcgis-internal-slider-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-internal-slider-track-range-background-color: var(--calcite-color-brand);--arcgis-internal-slider-track-size: 2px}:host([show-range-labels]){--arcgis-internal-slider-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-internal-slider-show-value-labels: 1}:host([value-labels-placement="start"]){--arcgis-internal-slider-value-labels-placement-start: var(--arcgis-internal-slider-show-value-labels)}:host([value-labels-placement="end"]){--arcgis-internal-slider-value-labels-placement-end: var(--arcgis-internal-slider-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-internal-slider-range-labels-placement-center: var(--arcgis-internal-slider-show-range-labels)}:host([range-labels-placement="end"]){--arcgis-internal-slider-range-labels-placement-end: var(--arcgis-internal-slider-show-range-labels)}:host([disabled]){cursor:default;opacity:var(--calcite-opacity-disabled);pointer-events:none}.content{direction:ltr;flex:1;touch-action:none;user-select:none;display:grid;word-wrap:normal;word-break:normal;padding-block:var(--arcgis-internal-slider-handle-offset)}.track-container{grid-area:track-container;position:relative;display:flex;justify-content:center;align-items:center}.track{touch-action:none;position:relative}.track-bounds{background-color:var(--arcgis-slider-track-background-color)}:host([layout="vertical"]){.track-effective-start{background:repeating-linear-gradient(to bottom,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-end{background:repeating-linear-gradient(to top,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}:host([layout="horizontal"]){.track-effective-start{background:repeating-linear-gradient(to right,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-end{background:repeating-linear-gradient(to left,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}.track-range-interactive{&.active{box-shadow:0 0 8px #00000029;outline:1px solid var(--calcite-color-border-2)}&.filled.active{outline-color:var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}}.track-range{background-color:var(--arcgis-internal-slider-track-range-background-color);pointer-events:none}:host([disabled]) .track-range{background-color:var(--calcite-color-text-3)}:host([disabled]),:host([disabled][layout="horizontal"]),:host([disabled][layout="vertical"]){.track-range-interactive.interactive:after{cursor:default;pointer-events:none}}:host([layout="horizontal"]){.track-range-interactive.interactive:after{all:initial;cursor:ew-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-internal-slider-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-top:1px}}:host([layout="vertical"]){.track-range-interactive.interactive:after{all:initial;cursor:ns-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-internal-slider-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-left:1px;writing-mode:vertical-lr}}.segment{transform-origin:0 0;inset-block-start:0px;block-size:var(--arcgis-internal-slider-track-size);position:absolute;top:0;left:0}.thumb{-webkit-user-select:none;user-select:none;background-color:#4c4c4c;width:2px;height:2px;margin:-1px;position:absolute}.thumb-content{width:0;height:0;position:absolute;top:50%;left:50%}.thumb:focus,.thumb.active{.handle{background-color:var(--calcite-color-brand);box-shadow:0 0 8px #00000029;outline:2px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}}.thumb.labels-only .handle{visibility:hidden;pointer-events:none}.thumb.labels-only{background-color:transparent}.handle{cursor:pointer;box-sizing:border-box;z-index:1;touch-action:none;background-color:var(--calcite-color-foreground-1);box-shadow:0 0 0 2px var(--arcgis-internal-slider-handle-color) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all var(--arcgis-internal-slider-transition-duration, var(--calcite-animation-timing, .125s)) ease-in-out;position:absolute;top:calc(var(--arcgis-internal-slider-handle-offset) * -1);left:calc(var(--arcgis-internal-slider-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}:host([layout="vertical"]) .fixed-thumb .handle{width:calc(var(--arcgis-slider-handle-size) / 1.5);height:calc(var(--arcgis-slider-handle-size) * 1.5);cursor:ns-resize}.fixed-thumb .handle{width:calc(var(--arcgis-slider-handle-size) * 1.5);height:calc(var(--arcgis-slider-handle-size) / 1.5);top:0;left:0;transform:translate(-50%,-50%);cursor:ew-resize}.label{position:absolute;will-change:transform}.min{grid-area:range-start}.max{grid-area:range-end}:host([layout="horizontal"][mirrored][range-labels-placement="center"]),:host([layout="vertical"]:not([mirrored])){.min{grid-area:range-end}.max{grid-area:range-start}}.content-start{grid-area:content-start;display:flex}.content-end{grid-area:content-end;display:flex}:dir(rtl){.content-start,.content-end,.label,.max,.min,.popover{direction:rtl}}:host([layout="vertical"]){.content{grid-template:". range-start range-start range-start ." "content-start content-start track-container content-end content-end" ". range-end range-end range-end .";grid-template-rows:auto 1fr auto;grid-template-columns:1fr auto auto auto 1fr;row-gap:var(--arcgis-internal-slider-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-internal-slider-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-internal-slider-label-input-height) * -.5)}&:host([value-labels-placement="start"]){.label{right:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label{left:var(--arcgis-internal-slider-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-internal-slider-content-start-min-height: calc( ((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset)) + (var(--arcgis-internal-slider-value-labels-placement-start) * var(--arcgis-internal-slider-label-input-height)) );--arcgis-internal-slider-content-end-min-height: calc( ((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset)) + (var(--arcgis-internal-slider-value-labels-placement-end) * var(--arcgis-internal-slider-label-input-height)) );column-gap:calc(var(--arcgis-internal-slider-show-range-labels) * var(--arcgis-internal-slider-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset));grid-template:". content-start ." "range-start content-start range-end" "range-start track-container range-end" "range-start content-end range-end" ". content-end .";grid-template-columns:auto 1fr auto;grid-template-rows:minmax(var(--arcgis-internal-slider-content-start-min-height),auto) calc(var(--arcgis-internal-slider-show-range-labels) * calc(calc(var(--arcgis-internal-slider-label-input-height) / 2) - calc(var(--arcgis-internal-slider-track-size) / 2))) var(--arcgis-internal-slider-track-size) calc(var(--arcgis-internal-slider-show-range-labels) * calc(calc(var(--arcgis-internal-slider-label-input-height) / 2) - calc(var(--arcgis-internal-slider-track-size) / 2))) minmax(var(--arcgis-internal-slider-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-internal-slider-track-size)}&:host([value-labels-placement="start"]){.label,.label-separator{bottom:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label,.label-separator{top:var(--arcgis-internal-slider-label-input-margin)}}}.label-separator{position:absolute;width:1em;height:var(--arcgis-internal-slider-label-input-height);margin:0;padding:0;pointer-events:none;text-align:center;z-index:0}.label-separator:before{content:"—"}:host([layout="horizontal"]) .label-separator{transform:translate(-50%)}:host([layout="horizontal"][range-labels-placement="end"]){min-inline-size:min-content;.content{--arcgis-internal-slider-content-start-min-height: calc( var(--arcgis-internal-slider-handle-offset) + var(--arcgis-internal-slider-value-labels-placement-start) * var(--arcgis-internal-slider-label-input-height) );--arcgis-internal-slider-content-end-min-height: calc( var(--arcgis-internal-slider-value-labels-placement-end) * var(--arcgis-internal-slider-label-input-height) );padding-inline:var(--arcgis-internal-slider-handle-offset);grid-template:"content-start content-start content-start" "track-container track-container track-container" "content-end content-end content-end" "content-end content-end content-end" "content-end content-end content-end";grid-template-columns:auto 0 auto;grid-template-rows:minmax(var(--arcgis-internal-slider-content-start-min-height),auto) var(--arcgis-internal-slider-track-size) var(--arcgis-internal-slider-handle-offset) calc(var(--arcgis-internal-slider-range-labels-placement-end) * var(--arcgis-internal-slider-label-input-height)) minmax(var(--arcgis-internal-slider-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-internal-slider-track-size)}&:host([value-labels-placement="start"]){.label,.label-separator{bottom:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label,.label-separator{top:calc(var(--arcgis-internal-slider-label-input-margin) + var(--arcgis-internal-slider-range-labels-placement-end) * (var(--arcgis-internal-slider-label-input-height)))}}.min,.max{--arcgis-internal-slider-range-translation: calc(var(--arcgis-internal-slider-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;margin-inline-start:calc(var(--arcgis-internal-slider-range-translation) * -1)}.max{grid-column:3;margin-inline-end:calc(var(--arcgis-internal-slider-range-translation) * -1)}}&:host([mirrored]){.min{grid-column:3;margin-inline-end:calc(var(--arcgis-internal-slider-range-translation) * -1)}.max{grid-column:1;margin-inline-start:calc(var(--arcgis-internal-slider-range-translation) * -1)}}}`;
55
+ var _e = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, ee = (r) => {
56
+ throw TypeError(r);
57
+ }, V = (r, e, t, n) => {
58
+ for (var i = n > 1 ? void 0 : n ? xe(e, t) : e, a = r.length - 1, o; a >= 0; a--)
59
+ (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
60
+ return n && i && _e(e, t, i), i;
61
+ }, te = (r, e, t) => e.has(r) || ee("Cannot " + t), we = (r, e, t) => (te(r, e, "read from private field"), e.get(r)), ye = (r, e, t) => e.has(r) ? ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), ke = (r, e, t, n) => (te(r, e, "write to private field"), e.set(r, t), t), A;
62
+ function De() {
63
63
  return {
64
64
  min: 0,
65
65
  max: 100,
66
66
  values: []
67
67
  };
68
68
  }
69
- let k = class extends ce {
69
+ let k = class extends he {
70
70
  //--------------------------------------------------------------------------
71
71
  //
72
72
  // Lifecycle
73
73
  //
74
74
  //--------------------------------------------------------------------------
75
- constructor(n = {}) {
76
- super({ ...we(), properties: n }), this._entries = /* @__PURE__ */ new Map(), this.precision = 4, this.ready = !1, _e(this, A);
75
+ constructor(r = {}) {
76
+ super({ ...De(), properties: r }), this._entries = /* @__PURE__ */ new Map(), this.precision = 4, this.ready = !1, ye(this, A);
77
77
  }
78
78
  startup() {
79
- const { precision: n } = this;
80
- let { min: e, max: t, values: a } = this;
81
- t = D(t, n), e = D(e, n), a = a?.map((r) => S(D(r, n), e, t)).sort((r, l) => r - l), this._set("min", e), this._set("max", t), this._set("values", a);
82
- const i = new Map(a?.map((r) => [q(), r]));
83
- this._entries = i, U(
79
+ const { precision: r } = this;
80
+ let { min: e, max: t, values: n } = this;
81
+ t = y(t, r), e = y(e, r), n = n?.map((a) => L(y(a, r), e, t)).sort((a, o) => a - o), this._set("min", e), this._set("max", t), this._set("values", n);
82
+ const i = new Map(n?.map((a) => [W(), a]));
83
+ this._entries = i, K(
84
84
  () => this.min,
85
- (r) => {
86
- const l = this.values;
87
- r != null && l?.length && l.some((o) => o < r) && (this._entries.forEach((o, s) => {
88
- o < r && this._entries.set(s, r);
85
+ (a) => {
86
+ const o = this.values;
87
+ a != null && o?.length && o.some((s) => s < a) && (this._entries.forEach((s, l) => {
88
+ s < a && this._entries.set(l, a);
89
89
  }), this._updatesValues());
90
90
  },
91
91
  { sync: !0 }
92
- ), U(
92
+ ), K(
93
93
  () => this.max,
94
- (r) => {
95
- const l = this.values;
96
- r != null && l?.length && l.some((o) => o > r) && (this._entries.forEach((o, s) => {
97
- o > r && this._entries.set(s, r);
94
+ (a) => {
95
+ const o = this.values;
96
+ a != null && o?.length && o.some((s) => s > a) && (this._entries.forEach((s, l) => {
97
+ s > a && this._entries.set(l, a);
98
98
  }), this._updatesValues());
99
99
  },
100
100
  { sync: !0 }
101
- ), U(
101
+ ), K(
102
102
  () => this.precision,
103
- (r) => {
104
- const { min: l, max: o, values: s } = this;
105
- this._set("min", D(l, r)), this._set("max", D(o, r)), s?.length && (this._entries.forEach((c, d) => {
106
- this._entries.set(d, D(c, r));
103
+ (a) => {
104
+ const { min: o, max: s, values: l } = this;
105
+ this._set("min", y(o, a)), this._set("max", y(s, a)), l?.length && (this._entries.forEach((c, d) => {
106
+ this._entries.set(d, y(c, a));
107
107
  }), this._updatesValues());
108
108
  },
109
109
  { sync: !0 }
@@ -112,42 +112,42 @@ let k = class extends ce {
112
112
  get entries() {
113
113
  return this._entries;
114
114
  }
115
- set max(n) {
115
+ set max(r) {
116
116
  if (!this.ready) {
117
- this._set("max", n);
117
+ this._set("max", r);
118
118
  return;
119
119
  }
120
- const e = this._get("max"), t = D(n, this.precision);
120
+ const e = this._get("max"), t = y(r, this.precision);
121
121
  e !== t && this._set("max", t);
122
122
  }
123
- set min(n) {
123
+ set min(r) {
124
124
  if (!this.ready) {
125
- this._set("min", n);
125
+ this._set("min", r);
126
126
  return;
127
127
  }
128
- const e = this._get("min"), t = D(n, this.precision);
128
+ const e = this._get("min"), t = y(r, this.precision);
129
129
  e !== t && this._set("min", t);
130
130
  }
131
- set values(n) {
132
- if (be(this, A) === n)
131
+ set values(r) {
132
+ if (we(this, A) === r)
133
133
  return;
134
- if (xe(this, A, n), !this.ready) {
135
- this._set("values", n);
134
+ if (ke(this, A, r), !this.ready) {
135
+ this._set("values", r);
136
136
  return;
137
137
  }
138
138
  const e = this._get("values");
139
- if (n = n?.map((a) => S(D(a, this.precision), this.min, this.max)).sort((a, i) => a - i), e?.length === n?.length && e.every((a, i) => a === n[i]))
139
+ if (r = r?.map((n) => L(y(n, this.precision), this.min, this.max)).sort((n, i) => n - i), e?.length === r?.length && e.every((n, i) => n === r[i]))
140
140
  return;
141
- const t = new Map(n?.map((a) => [q(), a]));
142
- this._entries = t, this._set("values", n);
141
+ const t = new Map(r?.map((n) => [W(), n]));
142
+ this._entries = t, this._set("values", r);
143
143
  }
144
144
  //--------------------------------------------------------------------------
145
145
  //
146
146
  // Public Methods
147
147
  //
148
148
  //--------------------------------------------------------------------------
149
- getValue(n) {
150
- return this._entries.get(n);
149
+ getValue(r) {
150
+ return this._entries.get(r);
151
151
  }
152
152
  /**
153
153
  * Updates a thumb [value](#values) based on the provided index. The provided value
@@ -156,354 +156,354 @@ let k = class extends ce {
156
156
  *
157
157
  * @returns `true` if the value was changed, otherwise `false`.
158
158
  */
159
- setValue(n, e) {
159
+ setValue(r, e) {
160
160
  if (this.values == null)
161
161
  return !1;
162
- const { min: t, max: a } = this, i = this._entries.get(n), r = S(D(e, this.precision), t, a);
163
- return i === r ? !1 : (this._entries.set(n, r), this._updatesValues(), !0);
162
+ const { min: t, max: n } = this, i = this._entries.get(r), a = L(y(e, this.precision), t, n);
163
+ return i === a ? !1 : (this._entries.set(r, a), this._updatesValues(), !0);
164
164
  }
165
- setValues(n) {
165
+ setValues(r) {
166
166
  if (this.values == null)
167
167
  return !1;
168
168
  let e = !1;
169
- const { min: t, max: a } = this;
170
- for (const [i, r] of n) {
171
- const l = this._entries.get(i), o = S(D(r, this.precision), t, a);
172
- l !== o && (e = !0, this._entries.set(i, o));
169
+ const { min: t, max: n } = this;
170
+ for (const [i, a] of r) {
171
+ const o = this._entries.get(i), s = L(y(a, this.precision), t, n);
172
+ o !== s && (e = !0, this._entries.set(i, s));
173
173
  }
174
174
  return e ? (this._updatesValues(), !0) : !1;
175
175
  }
176
176
  _updatesValues() {
177
- const n = Array.from(this._entries.values()).sort((e, t) => e - t);
178
- this._set("values", n);
177
+ const r = Array.from(this._entries.values()).sort((e, t) => e - t);
178
+ this._set("values", r);
179
179
  }
180
180
  };
181
181
  A = /* @__PURE__ */ new WeakMap();
182
182
  V([
183
- I()
183
+ E()
184
184
  ], k.prototype, "_entries", 2);
185
185
  V([
186
- I({ readOnly: !0 })
186
+ E({ readOnly: !0 })
187
187
  ], k.prototype, "entries", 1);
188
188
  V([
189
- I()
189
+ E()
190
190
  ], k.prototype, "max", 1);
191
191
  V([
192
- I()
192
+ E()
193
193
  ], k.prototype, "min", 1);
194
194
  V([
195
- I({ cast: (n) => S(n, 0, 20) })
195
+ E({ cast: (r) => L(r, 0, 20) })
196
196
  ], k.prototype, "precision", 2);
197
197
  V([
198
- I({ readOnly: !0 })
198
+ E({ readOnly: !0 })
199
199
  ], k.prototype, "ready", 2);
200
200
  V([
201
- I()
201
+ E()
202
202
  ], k.prototype, "values", 1);
203
203
  k = V([
204
- de("esri.widgets.Slider.SliderData")
204
+ ge("esri.widgets.Slider.SliderData")
205
205
  ], k);
206
- function S(n, e, t) {
207
- return Math.min(Math.max(n, e), t);
206
+ function L(r, e, t) {
207
+ return Math.min(Math.max(r, e), t);
208
208
  }
209
- function D(n, e) {
210
- return Number.parseFloat(n.toFixed(e));
209
+ function y(r, e) {
210
+ return Number.parseFloat(r.toFixed(e));
211
211
  }
212
- class De {
212
+ class Ie {
213
213
  constructor(e) {
214
214
  this.steps = e, this.minIndex = 0, this.maxIndex = this.steps.length - 1;
215
215
  }
216
216
  indexToValue(e) {
217
- return this.steps[y(e, this.minIndex, this.maxIndex)];
217
+ return this.steps[I(e, this.minIndex, this.maxIndex)];
218
218
  }
219
219
  valueToIndex(e) {
220
220
  const t = this.steps.indexOf(e);
221
221
  return t !== -1 ? t : this.steps.reduce(
222
- (a, i, r, l) => Math.abs(i - e) < Math.abs(l[a] - e) ? r : a,
222
+ (n, i, a, o) => Math.abs(i - e) < Math.abs(o[n] - e) ? a : n,
223
223
  0
224
224
  );
225
225
  }
226
226
  getClosestStepDistances(e, t) {
227
227
  if (t <= 0)
228
228
  return [];
229
- const a = [];
229
+ const n = [];
230
230
  for (let i = this.minIndex; i <= this.maxIndex; i++) {
231
- const r = this.indexToValue(i), l = Math.abs(r - e);
232
- let o = !1;
233
- for (let s = 0; s < a.length; s++)
234
- if (l < a[s].dist) {
235
- a.splice(s, 0, { idx: i, value: r, dist: l }), o = !0;
231
+ const a = this.indexToValue(i), o = Math.abs(a - e);
232
+ let s = !1;
233
+ for (let l = 0; l < n.length; l++)
234
+ if (o < n[l].dist) {
235
+ n.splice(l, 0, { idx: i, value: a, dist: o }), s = !0;
236
236
  break;
237
237
  }
238
- !o && a.length < t && a.push({ idx: i, value: r, dist: l }), a.length > t && (a.length = t);
238
+ !s && n.length < t && n.push({ idx: i, value: a, dist: o }), n.length > t && (n.length = t);
239
239
  }
240
- return a;
240
+ return n;
241
241
  }
242
242
  }
243
- class ke {
244
- constructor(e, t, a) {
245
- this.min = e, this.max = t, this.stepSize = a, this.minIndex = 0, this.maxIndex = Math.round((this.max - this.min) / this.stepSize);
243
+ class Ve {
244
+ constructor(e, t, n) {
245
+ this.min = e, this.max = t, this.stepSize = n, this.minIndex = 0, this.maxIndex = Math.round((this.max - this.min) / this.stepSize);
246
246
  }
247
247
  indexToValue(e) {
248
- return this.min + y(e, this.minIndex, this.maxIndex) * this.stepSize;
248
+ return this.min + I(e, this.minIndex, this.maxIndex) * this.stepSize;
249
249
  }
250
250
  valueToIndex(e) {
251
- return e = y(e, this.min, this.max), Math.round((e - this.min) / this.stepSize);
251
+ return e = I(e, this.min, this.max), Math.round((e - this.min) / this.stepSize);
252
252
  }
253
253
  getClosestStepDistances(e, t) {
254
254
  if (t <= 0)
255
255
  return [];
256
- const a = [], i = this.minIndex, r = this.maxIndex, o = (y(e, this.min, this.max) - this.min) / this.stepSize;
257
- let s = Math.floor(o), c = s + 1;
258
- for (; a.length < t && (s >= i || c <= r); ) {
259
- if (s < i) {
256
+ const n = [], i = this.minIndex, a = this.maxIndex, s = (I(e, this.min, this.max) - this.min) / this.stepSize;
257
+ let l = Math.floor(s), c = l + 1;
258
+ for (; n.length < t && (l >= i || c <= a); ) {
259
+ if (l < i) {
260
260
  const m = this.indexToValue(c);
261
- a.push({ idx: c, value: m, dist: Math.abs(m - e) }), c++;
261
+ n.push({ idx: c, value: m, dist: Math.abs(m - e) }), c++;
262
262
  continue;
263
263
  }
264
- if (c > r) {
265
- const m = this.indexToValue(s);
266
- a.push({ idx: s, value: m, dist: Math.abs(m - e) }), s--;
264
+ if (c > a) {
265
+ const m = this.indexToValue(l);
266
+ n.push({ idx: l, value: m, dist: Math.abs(m - e) }), l--;
267
267
  continue;
268
268
  }
269
- const d = this.indexToValue(s), g = this.indexToValue(c), h = Math.abs(d - e), f = Math.abs(g - e);
270
- h <= f ? (a.push({ idx: s, value: d, dist: h }), s--) : (a.push({ idx: c, value: g, dist: f }), c++);
269
+ const d = this.indexToValue(l), h = this.indexToValue(c), u = Math.abs(d - e), f = Math.abs(h - e);
270
+ u <= f ? (n.push({ idx: l, value: d, dist: u }), l--) : (n.push({ idx: c, value: h, dist: f }), c++);
271
271
  }
272
- return a;
272
+ return n;
273
273
  }
274
274
  }
275
- function ye(n) {
276
- if (n.steps == null)
275
+ function Ee(r) {
276
+ if (r.steps == null)
277
277
  return null;
278
- const e = n.steps;
279
- return Array.isArray(e) ? e.length === 0 ? null : new De(e) : e <= 0 ? null : new ke(n.min, n.max, e);
280
- }
281
- function Ve(n, e, t) {
282
- if (n == null) {
283
- const o = /* @__PURE__ */ new Map();
284
- for (const [s, c] of e.entries())
285
- o.set(s, c + t);
286
- return o;
287
- }
288
- const a = e.size, i = Array.from(e.entries()).map(([o, s]) => {
289
- const c = s + t, d = n.getClosestStepDistances(c, a);
290
- return { uuid: o, stepDistances: d };
291
- }), r = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
292
- i.sort((o, s) => o.stepDistances[0].dist - s.stepDistances[0].dist);
293
- for (const o of i) {
294
- const s = o.stepDistances.find((c) => !r.has(c.idx));
295
- s ? (r.add(s.idx), l.set(o.uuid, s.value)) : l.set(o.uuid, e.get(o.uuid));
278
+ const e = r.steps;
279
+ return Array.isArray(e) ? e.length === 0 ? null : new Ie(e) : e <= 0 ? null : new Ve(r.min, r.max, e);
280
+ }
281
+ function Ce(r, e, t) {
282
+ if (r == null) {
283
+ const s = /* @__PURE__ */ new Map();
284
+ for (const [l, c] of e.entries())
285
+ s.set(l, c + t);
286
+ return s;
287
+ }
288
+ const n = e.size, i = Array.from(e.entries()).map(([s, l]) => {
289
+ const c = l + t, d = r.getClosestStepDistances(c, n);
290
+ return { uuid: s, stepDistances: d };
291
+ }), a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
292
+ i.sort((s, l) => s.stepDistances[0].dist - l.stepDistances[0].dist);
293
+ for (const s of i) {
294
+ const l = s.stepDistances.find((c) => !a.has(c.idx));
295
+ l ? (a.add(l.idx), o.set(s.uuid, l.value)) : o.set(s.uuid, e.get(s.uuid));
296
296
  }
297
- return l;
297
+ return o;
298
298
  }
299
- function R(n, e, t, a, i) {
300
- const { allowValuesOverlap: r, precision: l, min: o, max: s } = i, c = e.get(t) ?? 0, d = c + a, g = a >= 0 ? -1 : 1;
301
- let h, f, m;
302
- if (n) {
299
+ function O(r, e, t, n, i) {
300
+ const { allowValuesOverlap: a, precision: o, min: s, max: l } = i, c = e.get(t) ?? 0, d = c + n, h = n >= 0 ? -1 : 1;
301
+ let u, f, m;
302
+ if (r) {
303
303
  const p = /* @__PURE__ */ new Set();
304
- if (!r)
304
+ if (!a)
305
305
  for (const [v, x] of e.entries())
306
- v !== t && p.add(n.valueToIndex(x));
307
- const _ = n.getClosestStepDistances(d, e.size + 1);
308
- _.sort((v, x) => $(v.dist, l) - $(x.dist, l) || g * (x.value - v.value));
309
- let u = 0;
310
- h = _[u].value, m = (v) => !r && p.has(n.valueToIndex(v)), f = () => (u++, _[u]?.value);
306
+ v !== t && p.add(r.valueToIndex(x));
307
+ const b = r.getClosestStepDistances(d, e.size + 1);
308
+ b.sort((v, x) => z(v.dist, o) - z(x.dist, o) || h * (x.value - v.value));
309
+ let g = 0;
310
+ u = b[g].value, m = (v) => !a && p.has(r.valueToIndex(v)), f = () => (g++, b[g]?.value);
311
311
  } else {
312
312
  const p = /* @__PURE__ */ new Set();
313
- for (const [u, v] of e.entries())
314
- u !== t && p.add($(v, l));
315
- const _ = 1 / Math.pow(10, l);
316
- h = y($(d, l), o, s), m = (u) => !r && p.has(u), f = () => {
317
- const u = $(h + g * _, l);
318
- return u === h || u < o || u > s ? void 0 : u;
313
+ for (const [g, v] of e.entries())
314
+ g !== t && p.add(z(v, o));
315
+ const b = 1 / Math.pow(10, o);
316
+ u = I(z(d, o), s, l), m = (g) => !a && p.has(g), f = () => {
317
+ const g = z(u + h * b, o);
318
+ return g === u || g < s || g > l ? void 0 : g;
319
319
  };
320
320
  }
321
- if (!m(h))
322
- return h;
321
+ if (!m(u))
322
+ return u;
323
323
  for (; ; ) {
324
324
  const p = f();
325
325
  if (p === void 0)
326
326
  return c;
327
- if (h = p, !m(h))
328
- return h;
327
+ if (u = p, !m(u))
328
+ return u;
329
329
  }
330
330
  }
331
- function $(n, e) {
332
- return Number.parseFloat(n.toFixed(e));
331
+ function z(r, e) {
332
+ return Number.parseFloat(r.toFixed(e));
333
333
  }
334
- function Ie(n, e, t, a = 1) {
335
- const i = Q(a);
336
- let r = e, l = !1;
337
- for (let o = 0; o < i; o++) {
338
- const s = Pe(n, r, t);
339
- if (l ||= s.changed, r = s.entries, !s.changed)
334
+ function Pe(r, e, t, n = 1) {
335
+ const i = ne(n);
336
+ let a = e, o = !1;
337
+ for (let s = 0; s < i; s++) {
338
+ const l = Se(r, a, t);
339
+ if (o ||= l.changed, a = l.entries, !l.changed)
340
340
  break;
341
341
  }
342
- return { changed: l, entries: r };
343
- }
344
- function Ee(n, e, t, a, i = 1) {
345
- const r = Q(i);
346
- if (r === 1)
347
- return K(n, e, t, a);
348
- const l = new Map(e);
349
- let o = l.get(t);
350
- for (let s = 0; s < r; s++) {
351
- const c = K(n, l, t, a);
352
- if (c === o)
342
+ return { changed: o, entries: a };
343
+ }
344
+ function Te(r, e, t, n, i = 1) {
345
+ const a = ne(i);
346
+ if (a === 1)
347
+ return N(r, e, t, n);
348
+ const o = new Map(e);
349
+ let s = o.get(t);
350
+ for (let l = 0; l < a; l++) {
351
+ const c = N(r, o, t, n);
352
+ if (c === s)
353
353
  break;
354
- o = c, l.set(t, o);
354
+ s = c, o.set(t, s);
355
355
  }
356
- return o;
356
+ return s;
357
357
  }
358
- function Q(n) {
359
- const e = Number.isFinite(n) ? Math.floor(n) : 1;
358
+ function ne(r) {
359
+ const e = Number.isFinite(r) ? Math.floor(r) : 1;
360
360
  return Math.max(1, e);
361
361
  }
362
- function Pe(n, e, t) {
363
- const a = /* @__PURE__ */ new Map(), i = t > 0 ? ze : Z, r = Array.from(e).sort((s, c) => i(s[1], c[1]));
364
- let l = !1, o = !0;
365
- for (const [s, c] of r)
366
- if (a.set(s, c), o) {
367
- const d = K(n, a, s, t);
368
- c === d && (o = !1), l ||= o, a.set(s, d);
362
+ function Se(r, e, t) {
363
+ const n = /* @__PURE__ */ new Map(), i = t > 0 ? Re : ae, a = Array.from(e).sort((l, c) => i(l[1], c[1]));
364
+ let o = !1, s = !0;
365
+ for (const [l, c] of a)
366
+ if (n.set(l, c), s) {
367
+ const d = N(r, n, l, t);
368
+ c === d && (s = !1), o ||= s, n.set(l, d);
369
369
  }
370
- return { changed: l, entries: a };
370
+ return { changed: o, entries: n };
371
371
  }
372
- function K(n, e, t, a) {
373
- const { allowValuesOverlap: i, stepsProvider: r, resolution: l, min: o, max: s } = n, c = e.get(t);
374
- if (a = a > 0 ? 1 : -1, !r) {
375
- let u = y(c + a * l, o, s);
372
+ function N(r, e, t, n) {
373
+ const { allowValuesOverlap: i, stepsProvider: a, resolution: o, min: s, max: l } = r, c = e.get(t);
374
+ if (n = n > 0 ? 1 : -1, !a) {
375
+ let g = I(c + n * o, s, l);
376
376
  if (i)
377
- return u;
377
+ return g;
378
378
  const v = /* @__PURE__ */ new Set();
379
- for (const [x, P] of e)
380
- x !== t && v.add(P);
381
- for (; v.has(u) && u <= s && u >= o; ) {
382
- const x = u;
383
- if (u = y(u + a * l, o, s), u === x)
379
+ for (const [x, D] of e)
380
+ x !== t && v.add(D);
381
+ for (; v.has(g) && g <= l && g >= s; ) {
382
+ const x = g;
383
+ if (g = I(g + n * o, s, l), g === x)
384
384
  return c;
385
385
  }
386
- return v.has(u) || u > s || u < o ? c : u;
386
+ return v.has(g) || g > l || g < s ? c : g;
387
387
  }
388
- const d = r.valueToIndex(c);
388
+ const d = a.valueToIndex(c);
389
389
  if (d === -1)
390
390
  return c;
391
391
  if (i) {
392
- const u = y(d + a, r.minIndex, r.maxIndex);
393
- return r.indexToValue(u);
394
- }
395
- const g = /* @__PURE__ */ new Set();
396
- for (const [u, v] of e)
397
- u !== t && g.add(r.valueToIndex(v));
398
- let h = d, f = !1;
399
- const m = r.minIndex, p = r.maxIndex;
400
- let _ = 0;
401
- for (; _ < Math.abs(p - m) && (h += a, !(h < m || h > p)); ) {
402
- if (!g.has(h)) {
392
+ const g = I(d + n, a.minIndex, a.maxIndex);
393
+ return a.indexToValue(g);
394
+ }
395
+ const h = /* @__PURE__ */ new Set();
396
+ for (const [g, v] of e)
397
+ g !== t && h.add(a.valueToIndex(v));
398
+ let u = d, f = !1;
399
+ const m = a.minIndex, p = a.maxIndex;
400
+ let b = 0;
401
+ for (; b < Math.abs(p - m) && (u += n, !(u < m || u > p)); ) {
402
+ if (!h.has(u)) {
403
403
  f = !0;
404
404
  break;
405
405
  }
406
- _++;
406
+ b++;
407
407
  }
408
- return f ? r.indexToValue(h) : c;
408
+ return f ? a.indexToValue(u) : c;
409
409
  }
410
- function Te(n, e, t, a) {
411
- const { allowValuesOverlap: i, stepsProvider: r, resolution: l, min: o, max: s } = n, c = e.get(t);
412
- if (a = a > 0 ? 1 : -1, !r) {
410
+ function ze(r, e, t, n) {
411
+ const { allowValuesOverlap: i, stepsProvider: a, resolution: o, min: s, max: l } = r, c = e.get(t);
412
+ if (n = n > 0 ? 1 : -1, !a) {
413
413
  const f = new Set(
414
414
  Array.from(e).filter(([p]) => p !== t).map(([, p]) => p)
415
415
  );
416
- let m = a > 0 ? s : o;
416
+ let m = n > 0 ? l : s;
417
417
  if (i)
418
418
  return m;
419
419
  for (; f.has(m); )
420
- if (m -= a * l, a > 0 && m > s || a < 0 && m < o) {
420
+ if (m -= n * o, n > 0 && m > l || n < 0 && m < s) {
421
421
  m = c;
422
422
  break;
423
423
  }
424
424
  return m;
425
425
  }
426
426
  if (i)
427
- return a > 0 ? r.indexToValue(r.maxIndex) : r.indexToValue(r.minIndex);
428
- const d = r.valueToIndex(c);
427
+ return n > 0 ? a.indexToValue(a.maxIndex) : a.indexToValue(a.minIndex);
428
+ const d = a.valueToIndex(c);
429
429
  if (d === -1)
430
430
  return c;
431
- const g = new Set(
432
- Array.from(e).filter(([f]) => f !== t).map(([, f]) => r.valueToIndex(f))
431
+ const h = new Set(
432
+ Array.from(e).filter(([f]) => f !== t).map(([, f]) => a.valueToIndex(f))
433
433
  );
434
- let h = a > 0 ? r.maxIndex : r.minIndex;
435
- for (; g.has(h); )
436
- if (h -= a, a > 0 && h > s || a < 0 && h < o) {
437
- h = d;
434
+ let u = n > 0 ? a.maxIndex : a.minIndex;
435
+ for (; h.has(u); )
436
+ if (u -= n, n > 0 && u > l || n < 0 && u < s) {
437
+ u = d;
438
438
  break;
439
439
  }
440
- return r.indexToValue(h);
440
+ return a.indexToValue(u);
441
441
  }
442
- function $e(n, e, t) {
443
- const { stepsProvider: a, min: i, max: r } = n, l = /* @__PURE__ */ new Map(), o = Array.from(e).sort((c, d) => Z(c[1], d[1]));
444
- if (a) {
442
+ function $e(r, e, t) {
443
+ const { stepsProvider: n, min: i, max: a } = r, o = /* @__PURE__ */ new Map(), s = Array.from(e).sort((c, d) => ae(c[1], d[1]));
444
+ if (n) {
445
445
  let c = 0;
446
446
  if (t > 0) {
447
- const d = o[o.length - 1], g = a.valueToIndex(d[1]);
448
- c = a.maxIndex - g;
447
+ const d = s[s.length - 1], h = n.valueToIndex(d[1]);
448
+ c = n.maxIndex - h;
449
449
  } else {
450
- const d = o[0], g = a.valueToIndex(d[1]);
451
- c = a.minIndex - g;
450
+ const d = s[0], h = n.valueToIndex(d[1]);
451
+ c = n.minIndex - h;
452
452
  }
453
453
  if (c === 0)
454
- for (const [d, g] of o)
455
- l.set(d, g);
456
- for (const [d, g] of o) {
457
- const h = a.indexToValue(a.valueToIndex(g) + c);
458
- l.set(d, h);
454
+ for (const [d, h] of s)
455
+ o.set(d, h);
456
+ for (const [d, h] of s) {
457
+ const u = n.indexToValue(n.valueToIndex(h) + c);
458
+ o.set(d, u);
459
459
  }
460
- return l;
460
+ return o;
461
461
  }
462
- let s = 0;
462
+ let l = 0;
463
463
  if (t > 0) {
464
- const c = o[o.length - 1];
465
- s = r - c[1];
464
+ const c = s[s.length - 1];
465
+ l = a - c[1];
466
466
  } else {
467
- const c = o[0];
468
- s = i - c[1];
467
+ const c = s[0];
468
+ l = i - c[1];
469
469
  }
470
- for (const [c, d] of o)
471
- l.set(c, d + s);
472
- return l;
470
+ for (const [c, d] of s)
471
+ o.set(c, d + l);
472
+ return o;
473
473
  }
474
- function Z(n, e) {
475
- return n - e;
474
+ function ae(r, e) {
475
+ return r - e;
476
476
  }
477
- function ze(n, e) {
478
- return e - n;
477
+ function Re(r, e) {
478
+ return e - r;
479
479
  }
480
- function y(n, e, t) {
481
- return Math.max(e, Math.min(t, n));
480
+ function I(r, e, t) {
481
+ return Math.max(e, Math.min(t, r));
482
482
  }
483
- const Ce = ne(k);
484
- class Se extends ae {
483
+ const Le = se(k);
484
+ class Me extends ie {
485
485
  constructor() {
486
- super(...arguments), this._stepsProvider = null, this._popoverElement = X(), this._trackElement = X(), this.messages = le({}), this._onPointerMoveDragUpdate = (e) => {
486
+ super(...arguments), this._stepsProvider = null, this._popoverElement = j(), this._trackElement = j(), this.messages = de({}), this._onPointerMoveDragUpdate = (e) => {
487
487
  this._updateDrag(this._mapEventToRange(e));
488
488
  }, this._onPointerUpDragEnd = (e) => {
489
- C(e) && this._endDrag();
489
+ R(e) && this._endDrag();
490
490
  }, this._onPointerCancelDragEnd = () => {
491
491
  this._endDrag();
492
- }, this._formatLabel = (e, t, a) => {
493
- const i = oe(this.messages._lang, t), r = this.labelFormatter;
494
- if (!r)
495
- return i.format(a);
496
- const l = r(a, e, (o) => i.format(o));
497
- return l ?? i.format(a);
492
+ }, this._formatLabel = (e, t, n) => {
493
+ const i = ue(this.messages._lang, t), a = this.labelFormatter;
494
+ if (!a)
495
+ return i.format(n);
496
+ const o = a(n, e, (s) => i.format(s));
497
+ return o ?? i.format(n);
498
498
  }, this._numberFormatOptions = {}, this._createFormatter = (e, t) => this._formatLabel.bind(this, e, t), this._minFormatter = this._createFormatter("min", this._numberFormatOptions), this._maxFormatter = this._createFormatter("max", this._numberFormatOptions), this._valueFormatter = this._createFormatter("value", this._numberFormatOptions), this._resizeObserver = new ResizeObserver(() => {
499
- this._layoutLabelInputs();
500
- }), this._labelInputsUpdateComplete = null, this._dragInfo = null, this._hasPopoverContent = !1, this._hasContentStart = !1, this._hasContentEnd = !1, this._activePart = null, this._sliderData = Ce(this), this.allowValuesOverlap = !1, this.autoDestroyDisabled = !1, this.disabled = !1, this.fillPlacement = "start", this.layout = "horizontal", this.max = this._sliderData.max, this.min = this._sliderData.min, this.mirrored = !1, this.popoverDisplay = "auto", this.popoverLabel = "", this.popoverPlacement = "start", this.precision = this._sliderData.precision, this.valuesDraggingDisabled = !1, this.rangeLabelsEditingEnabled = !1, this.rangeLabelsPlacement = "center", this.segmentsDraggingDisabled = !1, this.showRangeLabels = !1, this.valueLabelsDisplay = "hidden", this.valueLabelsPlacement = "start", this.valueLabelsEditingEnabled = !1, this.keyboardLargeStep = 10, this.values = this._sliderData.values, this.arcgisActiveValueChange = M({ cancelable: !1 }), this.arcgisChange = M({ cancelable: !1 }), this.arcgisInput = M({ cancelable: !1 }), this.arcgisRangeChange = M({ cancelable: !1 });
499
+ this._layoutLabelInputs(), this._updatePopoverReferenceElement();
500
+ }), this._labelInputsUpdateComplete = null, this._dragInfo = null, this._hasPopoverContent = !1, this._hasContentStart = !1, this._hasContentEnd = !1, this._measurablePopoverReferenceElement = "", this._activePart = null, this._sliderData = Le(this), this.allowValuesOverlap = !1, this.autoDestroyDisabled = !1, this.disabled = !1, this.fillPlacement = "start", this.layout = "horizontal", this.max = this._sliderData.max, this.min = this._sliderData.min, this.mirrored = !1, this.popoverDisplay = "auto", this.popoverLabel = "", this.popoverPlacement = "start", this.precision = this._sliderData.precision, this.valuesDraggingDisabled = !1, this.rangeLabelsEditingEnabled = !1, this.rangeLabelsPlacement = "center", this.segmentsDraggingDisabled = !1, this.showRangeLabels = !1, this.valueLabelsDisplay = "hidden", this.valueLabelsPlacement = "start", this.valueLabelsEditingEnabled = !1, this.keyboardLargeStep = 10, this.values = this._sliderData.values, this.arcgisActiveValueChange = M({ cancelable: !1 }), this.arcgisChange = M({ cancelable: !1 }), this.arcgisInput = M({ cancelable: !1 }), this.arcgisRangeChange = M({ cancelable: !1 });
501
501
  }
502
502
  static {
503
- this.properties = { _dragInfo: 16, _hasPopoverContent: 16, _hasContentStart: 16, _hasContentEnd: 16, _activePart: 16, _sliderData: 16, activeValue: 32, allowValuesOverlap: 5, autoDestroyDisabled: 5, disabled: 7, fullRangeMax: 11, fullRangeMin: 11, fillPlacement: 1, labelFormatter: 0, layout: 3, max: 11, min: 11, mirrored: 7, popoverDisplay: 1, popoverLabel: 1, popoverPlacement: 3, precision: 11, valuesDraggingDisabled: 7, rangeLabelsEditingEnabled: 5, rangeLabelsPlacement: 3, segmentsDraggingDisabled: 5, showRangeLabels: 7, steps: [9, { converter: {
503
+ this.properties = { _dragInfo: 16, _hasPopoverContent: 16, _hasContentStart: 16, _hasContentEnd: 16, _measurablePopoverReferenceElement: 16, _activePart: 16, _sliderData: 16, activeValue: 32, allowValuesOverlap: 5, autoDestroyDisabled: 5, disabled: 7, fullRangeMax: 11, fullRangeMin: 11, fillPlacement: 1, labelFormatter: 0, layout: 3, max: 11, min: 11, mirrored: 7, popoverDisplay: 1, popoverLabel: 1, popoverPlacement: 3, precision: 11, valuesDraggingDisabled: 7, rangeLabelsEditingEnabled: 5, rangeLabelsPlacement: 3, segmentsDraggingDisabled: 5, showRangeLabels: 7, steps: [9, { converter: {
504
504
  fromAttribute(e) {
505
505
  if (e.includes(","))
506
- return e.split(",").filter((a) => a.trim() !== "").map(parseFloat).filter((a) => Number.isFinite(a));
506
+ return e.split(",").filter((n) => n.trim() !== "").map(parseFloat).filter((n) => Number.isFinite(n));
507
507
  const t = parseFloat(e);
508
508
  return Number.isFinite(t) ? t : void 0;
509
509
  }
@@ -514,7 +514,7 @@ class Se extends ae {
514
514
  } }], messageOverrides: 0 };
515
515
  }
516
516
  static {
517
- this.styles = fe;
517
+ this.styles = be;
518
518
  }
519
519
  static {
520
520
  this.shadowRootOptions = { mode: "open", delegatesFocus: !0 };
@@ -539,8 +539,8 @@ class Se extends ae {
539
539
  return this.disabled || this.values.length === 0 || this._invalid;
540
540
  }
541
541
  get _invalid() {
542
- const e = this.fullRangeMin == null || this.fullRangeMax == null || this.fullRangeMin < this.fullRangeMax, t = this.fullRangeMin == null || this.fullRangeMin <= this.min, a = this.fullRangeMax == null || this.fullRangeMax >= this.max;
543
- return this.min >= this.max || !e || !t || !a;
542
+ const e = this.fullRangeMin == null || this.fullRangeMax == null || this.fullRangeMin < this.fullRangeMax, t = this.fullRangeMin == null || this.fullRangeMin <= this.min, n = this.fullRangeMax == null || this.fullRangeMax >= this.max;
543
+ return this.min >= this.max || !e || !t || !n;
544
544
  }
545
545
  get resolution() {
546
546
  const e = (this._sliderData.max - this._sliderData.min) / this._trackWidthOrHeight;
@@ -557,7 +557,7 @@ class Se extends ae {
557
557
  this._sliderData.startup();
558
558
  }
559
559
  willUpdate(e) {
560
- if ((e.has("steps") || e.has("min") || e.has("max")) && (this._stepsProvider = ye(this)), (e.has("values") || e.has("steps") || e.has("min") || e.has("max") || e.has("precision") || e.has("allowValuesOverlap")) && !this.allowValuesOverlap) {
560
+ if ((e.has("steps") || e.has("min") || e.has("max")) && (this._stepsProvider = Ee(this)), (e.has("values") || e.has("steps") || e.has("min") || e.has("max") || e.has("precision") || e.has("allowValuesOverlap")) && !this.allowValuesOverlap) {
561
561
  const t = this._resolveOverlappingValues();
562
562
  t && this._setValues(t);
563
563
  }
@@ -576,7 +576,7 @@ class Se extends ae {
576
576
  t && (e.has("values") || e.has("min") || e.has("max")) && t.reposition();
577
577
  }
578
578
  loaded() {
579
- this._resizeObserver.observe(this.el);
579
+ this._resizeObserver.observe(this.el), this._updatePopoverReferenceElement();
580
580
  }
581
581
  disconnectedCallback() {
582
582
  super.disconnectedCallback(), this._removeDragListeners();
@@ -588,28 +588,89 @@ class Se extends ae {
588
588
  };
589
589
  }
590
590
  async _layoutLabelInputs() {
591
- if (this.layout !== "horizontal" || !this._trackElement.value || this.valueLabelsDisplay === "hidden")
591
+ if (!this._trackElement.value || this.valueLabelsDisplay === "hidden")
592
592
  return;
593
- const e = this.renderRoot.querySelectorAll("arcgis-label-input"), t = this.componentOnReady().then(() => Promise.all(Array.from(e, (r) => r.updateComplete)));
593
+ const e = this.renderRoot.querySelectorAll("arcgis-label-input"), t = this.componentOnReady().then(() => Promise.all(Array.from(e, (s) => s.updateComplete)));
594
594
  if (this._labelInputsUpdateComplete = t, await t, t !== this._labelInputsUpdateComplete)
595
595
  return;
596
596
  this._labelInputsUpdateComplete = null;
597
- const a = this._trackElement.value;
598
- if (!a)
597
+ const n = this._trackElement.value;
598
+ if (!n)
599
599
  return;
600
- const i = a.getBoundingClientRect();
601
- for (const r of this._sliderData.entries.keys()) {
602
- const l = this._activePart === "range" || this._activePart === r;
600
+ const i = n.getBoundingClientRect(), a = [], o = this.isHorizontal;
601
+ for (const s of this._sliderData.entries.keys()) {
602
+ const l = this._activePart === "range" || this._activePart === s;
603
603
  if (this.valueLabelsDisplay === "always" || l) {
604
- const s = Le(this, r), c = G(this, r);
605
- if (!s || !c)
604
+ const d = Be(this, s), h = Z(this, s);
605
+ if (!d || !h)
606
606
  continue;
607
- const d = s.getBoundingClientRect(), g = c.getBoundingClientRect(), h = c.getLabelBoundingClientRect(), f = d.width / 2, m = Math.round(d.left + f), p = Math.round(h.width / 2);
608
- let _ = g.width / 2;
609
- const u = i.left - f, v = i.right + f, x = m - p, P = m + p;
610
- x < u ? _ += x - u : P > v && (_ += P - v), c.style.transform = `translateX(${-Math.round(_)}px)`;
607
+ const u = d.getBoundingClientRect(), f = o ? u.left + u.width / 2 : u.top + u.height / 2;
608
+ if (o) {
609
+ const m = h.getBoundingClientRect(), p = h.getLabelBoundingClientRect(), b = u.width / 2, g = Math.round(p.width / 2);
610
+ let v = m.width / 2;
611
+ const x = i.left - b, D = i.right + b, C = f - g, G = f + g;
612
+ C < x ? v += C - x : G > D && (v += G - D), h.style.transform = `translateX(${-Math.round(v)}px)`;
613
+ } else
614
+ h.style.removeProperty("transform");
615
+ a.push({
616
+ handleBounds: u,
617
+ handleCenter: f,
618
+ labelInput: h
619
+ });
620
+ }
621
+ }
622
+ this._layoutCollidingLabelInputs(a);
623
+ }
624
+ _layoutCollidingLabelInputs(e) {
625
+ const t = this.isHorizontal, n = Array.from(this.renderRoot.querySelectorAll(".label-separator")), i = e.slice().sort((s, l) => s.handleCenter - l.handleCenter);
626
+ if (i.length === 0)
627
+ return;
628
+ const a = this._trackElement.value?.getBoundingClientRect(), o = i.map((s) => [s]);
629
+ for (let s = 0; s < i.length; s++) {
630
+ for (const c of n)
631
+ c.hidden = !0, c.style.removeProperty("left");
632
+ let l = 0;
633
+ for (const c of o) {
634
+ const d = (c[0].handleCenter + c[c.length - 1].handleCenter) / 2, h = c.reduce((f, m) => f + (t ? m.labelInput.getBoundingClientRect().width : m.labelInput.getBoundingClientRect().height), 0);
635
+ let u = c.length === 1 ? t ? c[0].labelInput.getBoundingClientRect().left : c[0].labelInput.getBoundingClientRect().top : d - h / 2;
636
+ if (a && c.length > 1) {
637
+ const f = c[0], m = c[c.length - 1];
638
+ if (t) {
639
+ const p = f.labelInput.getLabelBoundingClientRect().left - f.labelInput.getBoundingClientRect().left, b = m.labelInput.getBoundingClientRect().right - m.labelInput.getLabelBoundingClientRect().right, g = a.left - f.handleBounds.width / 2 - p, v = a.right + m.handleBounds.width / 2 + b - h;
640
+ u = T(u, g, v);
641
+ } else {
642
+ const p = f.labelInput.getBoundingClientRect().height / 2, b = m.labelInput.getBoundingClientRect().height / 2, g = a.top - p, v = a.bottom + b - h;
643
+ u = T(u, g, v);
644
+ }
645
+ }
646
+ for (let f = 0; f < c.length; f++) {
647
+ const m = c[f], p = m.labelInput.getBoundingClientRect(), b = t ? p.width : p.height, g = (t ? p.left : p.top) + b / 2, v = this._getLabelTranslate(m.labelInput, t), x = u + b / 2, D = `${t ? "translateX" : "translateY"}(${Math.round(v + x - g)}px)`;
648
+ if (m.labelInput.style.transform !== D && (m.labelInput.style.transform = D), u += b, t && f < c.length - 1) {
649
+ const C = n[l++];
650
+ if (!C)
651
+ continue;
652
+ C.hidden = !1, C.style.left = `${u - (a?.left ?? 0)}px`;
653
+ }
654
+ }
611
655
  }
656
+ if (!this._mergeCollidingLabelGroups(o))
657
+ break;
658
+ }
659
+ }
660
+ _mergeCollidingLabelGroups(e) {
661
+ const t = this.isHorizontal;
662
+ for (let n = 0; n < e.length - 1; ) {
663
+ const i = e[n], a = e[n + 1], o = i[i.length - 1], s = a[0], l = o.labelInput.getBoundingClientRect(), c = s.labelInput.getBoundingClientRect(), d = t ? l.right : l.bottom;
664
+ if ((t ? c.left : c.top) > d)
665
+ n++;
666
+ else
667
+ return i.push(...a), e.splice(n + 1, 1), !0;
612
668
  }
669
+ return !1;
670
+ }
671
+ _getLabelTranslate(e, t) {
672
+ const n = t ? /translateX\((-?\d+(?:\.\d+)?)px\)/u : /translateY\((-?\d+(?:\.\d+)?)px\)/u, i = e.style.transform.match(n);
673
+ return i ? Number.parseFloat(i[1]) : 0;
613
674
  }
614
675
  _onTrackFocus() {
615
676
  this._setActivePart("range");
@@ -618,39 +679,39 @@ class Se extends ae {
618
679
  this._setActivePart(null);
619
680
  }
620
681
  _onTrackRangePointerDown(e) {
621
- this._disabledOrInvalid || !C(e) || (e.preventDefault(), e.currentTarget.focus(), this._startDrag("range", this._mapEventToRange(e)));
682
+ this._disabledOrInvalid || !R(e) || (e.preventDefault(), e.currentTarget.focus(), this._startDrag("range", this._mapEventToRange(e)));
622
683
  }
623
684
  async _onPointerDown(e) {
624
- if (this._disabledOrInvalid || !C(e))
685
+ if (this._disabledOrInvalid || !R(e))
625
686
  return;
626
687
  const t = this.renderRoot.querySelector("arcgis-label-input[editing]");
627
688
  if (e.target === t)
628
689
  return;
629
690
  if (t) {
630
- t.blur(), this._focusEntry(z(t));
691
+ t.blur(), this._focusEntry($(t));
631
692
  return;
632
693
  }
633
- if (Me(e.target) || this.values?.length > 1)
694
+ if (Fe(e.target) || this.values?.length > 1)
634
695
  return;
635
- const a = this._mapEventToRange(e), [i, r] = this._sliderData.entries.entries().next().value, l = a * this._fullRange + this._fullMin - r, o = L(this._fullMin, this._fullMax, r) / 100;
636
- this._startDrag(i, o);
637
- const s = R(this._stepsProvider, this._sliderData.entries, i, l, {
696
+ const n = this._mapEventToRange(e), [i, a] = this._sliderData.entries.entries().next().value, o = n * this._fullRange + this._fullMin - a, s = B(this._fullMin, this._fullMax, a) / 100;
697
+ this._startDrag(i, s);
698
+ const l = O(this._stepsProvider, this._sliderData.entries, i, o, {
638
699
  allowValuesOverlap: this.allowValuesOverlap,
639
700
  precision: this.precision,
640
701
  min: this.min,
641
702
  max: this.max
642
703
  });
643
- this._setValue(i, s), this._focusEntry(i);
704
+ this._setValue(i, l), this._focusEntry(i);
644
705
  }
645
706
  _onThumbPointerDown(e) {
646
- const t = z(e.currentTarget);
647
- if (!C(e) || this._disabledOrInvalid || !t)
707
+ const t = $(e.currentTarget);
708
+ if (!R(e) || this._disabledOrInvalid || !t)
648
709
  return;
649
- const a = G(this, t);
650
- e.target === a && a?.editing || (e.stopPropagation(), e.preventDefault(), this._focusEntry(t), this._startDrag(t, this._mapEventToRange(e)));
710
+ const n = Z(this, t);
711
+ e.target === n && n?.editing || (e.stopPropagation(), e.preventDefault(), this._focusEntry(t), this._startDrag(t, this._mapEventToRange(e)));
651
712
  }
652
713
  _onFixedThumbPointerDown(e) {
653
- this._disabledOrInvalid || !C(e) || (e.preventDefault(), e.currentTarget.focus());
714
+ this._disabledOrInvalid || !R(e) || (e.preventDefault(), e.currentTarget.focus());
654
715
  }
655
716
  _endDrag() {
656
717
  if (this._disabledOrInvalid)
@@ -659,8 +720,8 @@ class Se extends ae {
659
720
  let e = !1;
660
721
  if (this._dragInfo) {
661
722
  const { entries: t } = this._dragInfo;
662
- for (const [a, i] of t)
663
- if (this._sliderData.getValue(a) !== i) {
723
+ for (const [n, i] of t)
724
+ if (this._sliderData.getValue(n) !== i) {
664
725
  e = !0;
665
726
  break;
666
727
  }
@@ -670,43 +731,43 @@ class Se extends ae {
670
731
  _startDrag(e, t) {
671
732
  if (this._disabledOrInvalid)
672
733
  return;
673
- const { min: a, max: i, values: r } = this;
674
- let l = a, o = i;
734
+ const { min: n, max: i, values: a } = this;
735
+ let o = n, s = i;
675
736
  if (this._setActivePart(e), e === "range") {
676
737
  if (this.segmentsDraggingDisabled)
677
738
  return;
678
- l = a - r[0], o = i - r[r.length - 1];
739
+ o = n - a[0], s = i - a[a.length - 1];
679
740
  }
680
741
  this._dragInfo = {
681
742
  position: t,
682
743
  entries: new Map(this._sliderData.entries.entries()),
683
- minDiff: l,
684
- maxDiff: o
744
+ minDiff: o,
745
+ maxDiff: s
685
746
  }, this._addDragListeners();
686
747
  }
687
748
  _updateDrag(e) {
688
749
  if (!this._dragInfo || !this._activePart)
689
750
  return;
690
- const { _activePart: t, _dragInfo: { position: a, entries: i, minDiff: r, maxDiff: l } } = this;
691
- if (a === e)
751
+ const { _activePart: t, _dragInfo: { position: n, entries: i, minDiff: a, maxDiff: o } } = this;
752
+ if (n === e)
692
753
  return;
693
- let o = (e - a) * this._fullRange;
754
+ let s = (e - n) * this._fullRange;
694
755
  if (t === "range") {
695
- o = Math.min(l, Math.max(r, o));
696
- const s = Ve(this._stepsProvider, i, o);
697
- this._setValues(s);
756
+ s = Math.min(o, Math.max(a, s));
757
+ const l = Ce(this._stepsProvider, i, s);
758
+ this._setValues(l);
698
759
  } else {
699
- const s = R(this._stepsProvider, i, t, o, {
760
+ const l = O(this._stepsProvider, i, t, s, {
700
761
  allowValuesOverlap: this.allowValuesOverlap,
701
762
  precision: this.precision,
702
763
  min: this.min,
703
764
  max: this.max
704
765
  });
705
- this._setValue(t, s);
766
+ this._setValue(t, l);
706
767
  }
707
768
  }
708
769
  _focusEntry(e) {
709
- e && Re(this, e)?.focus();
770
+ e && Q(this, e)?.focus();
710
771
  }
711
772
  _addDragListeners() {
712
773
  document.addEventListener("pointerup", this._onPointerUpDragEnd), document.addEventListener("pointermove", this._onPointerMoveDragUpdate), document.addEventListener("pointercancel", this._onPointerCancelDragEnd);
@@ -721,72 +782,72 @@ class Se extends ae {
721
782
  this._sliderData.setValue(e, t) && (this._dragInfo || this.arcgisChange.emit(), this.arcgisInput.emit());
722
783
  }
723
784
  _resolveOverlappingValues() {
724
- const e = new Map(this._sliderData.entries), t = Array.from(e.entries()).sort((i, r) => i[1] - r[1]);
725
- let a = !1;
726
- for (const [i, r] of t) {
727
- const l = O(r, this.min, this.max);
728
- if (!Array.from(e).some(([c, d]) => c !== i && O(d, this.min, this.max) === l))
785
+ const e = new Map(this._sliderData.entries), t = Array.from(e.entries()).sort((i, a) => i[1] - a[1]);
786
+ let n = !1;
787
+ for (const [i, a] of t) {
788
+ const o = T(a, this.min, this.max);
789
+ if (!Array.from(e).some(([c, d]) => c !== i && T(d, this.min, this.max) === o))
729
790
  continue;
730
- const s = R(this._stepsProvider, e, i, l - r, {
791
+ const l = O(this._stepsProvider, e, i, o - a, {
731
792
  allowValuesOverlap: !1,
732
793
  precision: this.precision,
733
794
  min: this.min,
734
795
  max: this.max
735
796
  });
736
- s !== r && (a = !0), e.set(i, s);
797
+ l !== a && (n = !0), e.set(i, l);
737
798
  }
738
- return a ? e : null;
799
+ return n ? e : null;
739
800
  }
740
801
  _onThumbFocus(e) {
741
- const t = z(e.currentTarget);
802
+ const t = $(e.currentTarget);
742
803
  this._setActivePart(t);
743
804
  }
744
805
  _onThumbBlur() {
745
806
  this._setActivePart(null);
746
807
  }
747
808
  _onRangeInputChange(e) {
748
- const t = e.currentTarget, a = t.value, i = t.dataset.type;
749
- let r = !1;
809
+ const t = e.currentTarget, n = t.value, i = t.dataset.type;
810
+ let a = !1;
750
811
  switch (e.stopPropagation(), i) {
751
812
  case "min": {
752
- a < this.max ? (this.min = a, r = !0) : t.value = this.min;
813
+ n < this.max ? (this.min = n, a = !0) : t.value = this.min;
753
814
  break;
754
815
  }
755
816
  case "max": {
756
- a > this.min ? (this.max = a, r = !0) : t.value = this.max;
817
+ n > this.min ? (this.max = n, a = !0) : t.value = this.max;
757
818
  break;
758
819
  }
759
820
  }
760
- r && this.arcgisRangeChange.emit();
821
+ a && this.arcgisRangeChange.emit();
761
822
  }
762
823
  _onValueInputChange(e) {
763
- const t = e.currentTarget, a = z(t), i = t.value;
764
- if (a) {
824
+ const t = e.currentTarget, n = $(t), i = t.value;
825
+ if (n) {
765
826
  e.stopPropagation();
766
- const r = this._sliderData.getValue(a), l = R(this._stepsProvider, this._sliderData.entries, a, i - r, {
827
+ const a = this._sliderData.getValue(n), o = O(this._stepsProvider, this._sliderData.entries, n, i - a, {
767
828
  allowValuesOverlap: this.allowValuesOverlap,
768
829
  precision: this.precision,
769
830
  min: this.min,
770
831
  max: this.max
771
832
  });
772
- this._setValue(a, l), t.value = this._sliderData.getValue(a);
833
+ this._setValue(n, o), t.value = this._sliderData.getValue(n);
773
834
  }
774
835
  }
775
836
  _mapEventToRange(e) {
776
837
  const t = this._trackElement.value?.getBoundingClientRect();
777
838
  if (!t)
778
839
  return 0;
779
- const a = this.isHorizontal ? (e.clientX - t.left) / t.width : 1 - (e.clientY - t.top) / t.height;
780
- return this.mirrored ? 1 - a : a;
840
+ const n = this.isHorizontal ? (e.clientX - t.left) / t.width : 1 - (e.clientY - t.top) / t.height;
841
+ return this.mirrored ? 1 - n : n;
781
842
  }
782
843
  _getPositionStyleForElement(e) {
783
- const t = L(this._fullMin, this._fullMax, e);
844
+ const t = B(this._fullMin, this._fullMax, e);
784
845
  return {
785
846
  [this.isHorizontal ? this.mirrored ? "right" : "left" : this.mirrored ? "top" : "bottom"]: `${t}%`
786
847
  };
787
848
  }
788
849
  _popoverSlotChange(e) {
789
- this._hasPopoverContent = H(e);
850
+ this._hasPopoverContent = H(e), this._updatePopoverReferenceElement();
790
851
  }
791
852
  _onContentStartSlotChange(e) {
792
853
  this._hasContentStart = H(e);
@@ -795,43 +856,43 @@ class Se extends ae {
795
856
  this._hasContentEnd = H(e);
796
857
  }
797
858
  _onThumbKeyDown(e) {
798
- const t = z(e.currentTarget);
859
+ const t = $(e.currentTarget);
799
860
  if (!t)
800
861
  return;
801
- const a = e.currentTarget.querySelector("arcgis-label-input");
802
- if (!a || a.editing)
862
+ const n = e.currentTarget.querySelector("arcgis-label-input");
863
+ if (!n || n.editing)
803
864
  return;
804
- if (e.key === b.confirmEdit) {
805
- a.edit();
865
+ if (e.key === _.confirmEdit) {
866
+ n.edit();
806
867
  return;
807
868
  }
808
- const i = j(e, this.keyboardLargeStep, this.mirrored);
869
+ const i = Y(e, this.keyboardLargeStep, this.mirrored);
809
870
  if (i) {
810
871
  e.preventDefault();
811
- const r = Ee(this._getStepsConfiguration(), this._sliderData.entries, t, i.direction, i.count);
812
- this._setValue(t, r);
872
+ const a = Te(this._getStepsConfiguration(), this._sliderData.entries, t, i.direction, i.count);
873
+ this._setValue(t, a);
813
874
  return;
814
875
  }
815
- if (W(e.key)) {
876
+ if (J(e.key)) {
816
877
  e.preventDefault();
817
- const r = Te(this._getStepsConfiguration(), this._sliderData.entries, t, this._getDirectionForHomeEndKey(e.key));
818
- this._setValue(t, r);
878
+ const a = ze(this._getStepsConfiguration(), this._sliderData.entries, t, this._getDirectionForHomeEndKey(e.key));
879
+ this._setValue(t, a);
819
880
  }
820
881
  }
821
882
  _onTrackRangeKeyDown(e) {
822
883
  if (this._disabledOrInvalid)
823
884
  return;
824
- const t = j(e, this.keyboardLargeStep, this.mirrored);
885
+ const t = Y(e, this.keyboardLargeStep, this.mirrored);
825
886
  if (t) {
826
887
  e.preventDefault();
827
- const { entries: a } = Ie(this._getStepsConfiguration(), this._sliderData.entries, t.direction, t.count);
828
- this._setValues(a);
888
+ const { entries: n } = Pe(this._getStepsConfiguration(), this._sliderData.entries, t.direction, t.count);
889
+ this._setValues(n);
829
890
  return;
830
891
  }
831
- if (W(e.key)) {
892
+ if (J(e.key)) {
832
893
  e.preventDefault();
833
- const a = $e(this._getStepsConfiguration(), this._sliderData.entries, this._getDirectionForHomeEndKey(e.key));
834
- this._setValues(a);
894
+ const n = $e(this._getStepsConfiguration(), this._sliderData.entries, this._getDirectionForHomeEndKey(e.key));
895
+ this._setValues(n);
835
896
  }
836
897
  }
837
898
  _getStepsConfiguration() {
@@ -844,32 +905,38 @@ class Se extends ae {
844
905
  };
845
906
  }
846
907
  _getDirectionForHomeEndKey(e) {
847
- return this.isHorizontal && this.mirrored || this.layout === "vertical" ? e === b.jumpToEnd ? -1 : 1 : e === b.jumpToStart ? -1 : 1;
908
+ return this.isHorizontal && this.mirrored || this.layout === "vertical" ? e === _.jumpToEnd ? -1 : 1 : e === _.jumpToStart ? -1 : 1;
848
909
  }
849
910
  _setActivePart(e) {
850
- this._activePart !== e && (this._activePart = e, this.arcgisActiveValueChange.emit());
911
+ this._activePart !== e && (this._activePart = e, this._updatePopoverReferenceElement(), this.arcgisActiveValueChange.emit());
851
912
  }
852
913
  _resolveFillPlacement(e) {
853
914
  const { fillPlacement: t } = this;
854
915
  return e ? t === "between" || t === "not-between" || t === "none" ? t : "between" : t === "start" || t === "end" || t === "none" ? t : "start";
855
916
  }
917
+ _updatePopoverReferenceElement() {
918
+ const { _activePart: e, popoverDisplay: t } = this;
919
+ let n = "";
920
+ if (this._hasPopoverContent)
921
+ if (t === "always" && this.values.length > 1) {
922
+ const s = Array.from(this._sliderData.entries), [l, c] = s[0];
923
+ n = s.every(([, h]) => h === c) ? l : "track-range";
924
+ } else e && Oe(e) ? n = e : this.values.length > 1 ? n = "track-range" : n = this._sliderData.entries.keys().next().value ?? "";
925
+ let i = null;
926
+ n && (n === "track-range" ? i = this.renderRoot.querySelector("#track-range") : i = Q(this, n));
927
+ const a = i?.getBoundingClientRect(), o = !!a && a.width > 0 && a.height > 0;
928
+ this._measurablePopoverReferenceElement = o ? n : "";
929
+ }
856
930
  render() {
857
- return w`<div class=${T({
931
+ return w`<div class=${S({
858
932
  content: !0,
859
933
  disabled: this._disabledOrInvalid
860
934
  })} @pointerdown=${this._onPointerDown}>${this._renderContentStart()}${this._renderContentEnd()}${this._renderRangeLabel("min")}${this._renderTrackRange()}${this._renderRangeLabel("max")}${this._renderPopover()}</div>`;
861
935
  }
862
936
  _renderPopover() {
863
- const { _activePart: e, layout: t, popoverDisplay: a, popoverLabel: i, popoverPlacement: r, valueLabelsDisplay: l, valueLabelsPlacement: o } = this;
864
- let s = "";
865
- if (this._hasPopoverContent)
866
- if (a === "always" && this.values.length > 1) {
867
- const h = Array.from(this._sliderData.entries), [f, m] = h[0];
868
- s = h.every(([, _]) => _ === m) ? f : "track-range";
869
- } else e && Fe(e) ? s = e : this.values.length > 1 ? s = "track-range" : s = this._sliderData.entries.keys().next().value ?? "";
870
- const c = this._hasPopoverContent && (a === "always" || !!e), d = t === "horizontal" ? r === "start" ? "top" : "bottom" : r === "start" ? "left" : "right";
871
- let g = 14;
872
- return s && s !== "track-range" && (g -= 1), l !== "hidden" && r === o && (g += 24), w`<calcite-popover class="popover" focus-trap-disabled .label=${i} .open=${c} .offsetDistance=${g} .placement=${d} .referenceElement=${s} scale=s trigger-disabled ${B(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`;
937
+ const { _activePart: e, layout: t, popoverDisplay: n, popoverLabel: i, popoverPlacement: a, valueLabelsDisplay: o, valueLabelsPlacement: s } = this, l = this._measurablePopoverReferenceElement, c = this._hasPopoverContent && !!l && (n === "always" || !!e), d = t === "horizontal" ? a === "start" ? "top" : "bottom" : a === "start" ? "left" : "right";
938
+ let h = 14;
939
+ return l && l !== "track-range" && (h -= 1), o !== "hidden" && a === s && (h += 24), w`<calcite-popover class="popover" focus-trap-disabled .label=${i} .open=${c} .offsetDistance=${h} .placement=${d} .referenceElement=${l} scale=s trigger-disabled ${U(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`;
873
940
  }
874
941
  _renderContentStart() {
875
942
  return w`<div class="content-start" .hidden=${!this._hasContentStart}><slot name=content-start @slotchange=${this._onContentStartSlotChange}></slot></div>`;
@@ -878,48 +945,52 @@ class Se extends ae {
878
945
  return w`<div class="content-end" .hidden=${!this._hasContentEnd}><slot name=content-end @slotchange=${this._onContentEndSlotChange}></slot></div>`;
879
946
  }
880
947
  _renderTrackRange() {
881
- return w`<div class="track-container">${this._renderTrack()}<slot name=track-overlay></slot>${this._renderThumbs()}</div>`;
948
+ return w`<div class="track-container">${this._renderTrack()}<slot name=track-overlay></slot>${this._renderThumbs()}${this._renderLabelSeparators()}</div>`;
949
+ }
950
+ _renderLabelSeparators() {
951
+ const e = Math.max(0, this.values.length - 1);
952
+ return Array.from({ length: e }, (t, n) => q(n, w`<div aria-hidden=true class="label-separator" hidden></div>`));
882
953
  }
883
954
  _renderTrack() {
884
- return w`<div class="track" ${B(this._trackElement)}>${this._renderTrackBackground()}${this._renderFillSegment()}</div>`;
955
+ return w`<div class="track" ${U(this._trackElement)}>${this._renderTrackBackground()}${this._renderFillSegment()}</div>`;
885
956
  }
886
957
  _renderTrackBackground() {
887
- const { max: e, min: t, fillPlacement: a, values: i } = this, r = i.length > 1;
888
- let l = this._fullMin, o = this._fullMax;
889
- const s = [];
890
- return this._invalid ? w`<div class="segment track-bounds" style=${F({ left: "0%", right: "0%", top: "0%", bottom: "0%" })}></div>` : (l < t && (s.push(this._renderSegment(l, t, [
958
+ const { max: e, min: t, fillPlacement: n, values: i } = this, a = i.length > 1;
959
+ let o = this._fullMin, s = this._fullMax;
960
+ const l = [];
961
+ return this._invalid ? w`<div class="segment track-bounds" style=${F({ left: "0%", right: "0%", top: "0%", bottom: "0%" })}></div>` : (o < t && (l.push(this._renderSegment(o, t, [
891
962
  this.mirrored ? "track-effective-end" : "track-effective-start",
892
- !r && a === "start" ? "track-fill" : null
893
- ])), l = t), o > e && (s.push(this._renderSegment(e, o, [
963
+ !a && n === "start" ? "track-fill" : null
964
+ ])), o = t), s > e && (l.push(this._renderSegment(e, s, [
894
965
  this.mirrored ? "track-effective-start" : "track-effective-end",
895
- !r && a === "end" ? "track-fill" : null
896
- ])), o = e), s.push(this._renderSegment(l, o, ["track-bounds"])), s);
966
+ !a && n === "end" ? "track-fill" : null
967
+ ])), s = e), l.push(this._renderSegment(o, s, ["track-bounds"])), l);
897
968
  }
898
969
  _renderFillSegment() {
899
- const { values: e, min: t, max: a } = this;
970
+ const { values: e, min: t, max: n } = this;
900
971
  if (!e?.length || this._invalid)
901
972
  return;
902
- const i = [...e].sort((g, h) => g - h), r = i[0], l = i[i.length - 1], o = this._resolveFillPlacement(i.length > 1);
903
- let s;
904
- switch (o) {
973
+ const i = [...e].sort((h, u) => h - u), a = i[0], o = i[i.length - 1], s = this._resolveFillPlacement(i.length > 1);
974
+ let l;
975
+ switch (s) {
905
976
  case "start":
906
- t < r && (s = this._renderSegment(t, r, ["track-range"]));
977
+ t < a && (l = this._renderSegment(t, a, ["track-range"]));
907
978
  break;
908
979
  case "end":
909
- a > l && (s = this._renderSegment(l, a, ["track-range"]));
980
+ n > o && (l = this._renderSegment(o, n, ["track-range"]));
910
981
  break;
911
982
  case "between":
912
- i.length > 1 && (s = this._renderSegment(r, l, ["track-range"]));
983
+ i.length > 1 && (l = this._renderSegment(a, o, ["track-range"]));
913
984
  break;
914
985
  case "not-between":
915
- i.length > 1 && (s = [this._renderSegment(t, r, ["track-range"]), this._renderSegment(l, a, ["track-range"])]);
986
+ i.length > 1 && (l = [this._renderSegment(t, a, ["track-range"]), this._renderSegment(o, n, ["track-range"])]);
916
987
  break;
917
988
  }
918
989
  if (!(i.length > 1))
919
- return s;
920
- const c = this.segmentsDraggingDisabled, d = this._renderSegment(r, l, [
990
+ return l;
991
+ const c = this.segmentsDraggingDisabled, d = this._renderSegment(a, o, [
921
992
  "track-range-interactive",
922
- o === "between" ? "filled" : null,
993
+ s === "between" ? "filled" : null,
923
994
  c ? null : "interactive",
924
995
  this._activePart === "range" && !this.segmentsDraggingDisabled ? "active" : null
925
996
  ], {
@@ -929,95 +1000,95 @@ class Se extends ae {
929
1000
  onPointerDown: c ? void 0 : this._onTrackRangePointerDown,
930
1001
  onKeyDown: c ? void 0 : this._onTrackRangeKeyDown
931
1002
  });
932
- return [s, d];
1003
+ return [l, d];
933
1004
  }
934
- _renderSegment(e, t, a, i) {
935
- const { _fullMin: r, _fullMax: l, mirrored: o } = this, s = [
936
- L(r, l, O(e, r, l)),
937
- 100 - L(r, l, O(t, r, l))
1005
+ _renderSegment(e, t, n, i) {
1006
+ const { _fullMin: a, _fullMax: o, mirrored: s } = this, l = [
1007
+ B(a, o, T(e, a, o)),
1008
+ 100 - B(a, o, T(t, a, o))
938
1009
  ];
939
- o && s.reverse();
1010
+ s && l.reverse();
940
1011
  const c = this.isHorizontal ? {
941
- left: `${s[0]}%`,
942
- right: `${s[1]}%`
1012
+ left: `${l[0]}%`,
1013
+ right: `${l[1]}%`
943
1014
  } : {
944
- top: `${s[1]}%`,
945
- bottom: `${s[0]}%`
946
- }, d = re("segment", ...a);
947
- return w`<div id=${i?.id ?? E} class=${T(d)} style=${F(c)} .tabIndex=${i?.onPointerDown ? 0 : -1} @focus=${i?.onFocus} @blur=${i?.onBlur} @pointerdown=${i?.onPointerDown} @keydown=${i?.onKeyDown}></div>`;
1015
+ top: `${l[1]}%`,
1016
+ bottom: `${l[0]}%`
1017
+ }, d = le("segment", ...n);
1018
+ return w`<div id=${i?.id ?? P} class=${S(d)} style=${F(c)} .tabIndex=${i?.onPointerDown ? 0 : -1} @focus=${i?.onFocus} @blur=${i?.onBlur} @pointerdown=${i?.onPointerDown} @keydown=${i?.onKeyDown}></div>`;
948
1019
  }
949
1020
  _renderThumbs() {
950
- const { _sliderData: e } = this, t = Array.from(e.entries).filter(([, i]) => i >= this._fullMin && i <= this._fullMax), a = t.map(([, i]) => i).sort((i, r) => i - r);
951
- if (this.valuesDraggingDisabled && a.length > 1) {
952
- const i = a[0], r = a.at(-1);
953
- if (i != null && r != null) {
954
- const l = (i + r) / 2;
1021
+ const { _sliderData: e } = this, t = Array.from(e.entries).filter(([, i]) => i >= this._fullMin && i <= this._fullMax), n = t.map(([, i]) => i).sort((i, a) => i - a);
1022
+ if (this.valuesDraggingDisabled && n.length > 1) {
1023
+ const i = n[0], a = n.at(-1);
1024
+ if (i != null && a != null) {
1025
+ const o = (i + a) / 2;
955
1026
  return [
956
- this._renderFixedThumb(l),
957
- N(t, ([o, s]) => this._renderThumb(o, s, !0))
1027
+ this._renderFixedThumb(o),
1028
+ X(t, ([s, l]) => this._renderThumb(s, l, !0))
958
1029
  ];
959
1030
  }
960
1031
  }
961
- return N(t, ([i, r]) => this._renderThumb(i, r, !1));
1032
+ return X(t, ([i, a]) => this._renderThumb(i, a, !1));
962
1033
  }
963
1034
  _renderFixedThumb(e) {
964
- const { _disabledOrInvalid: t, segmentsDraggingDisabled: a, isHorizontal: i } = this;
965
- return w`<div .ariaLabel=${this.messages.sliderValue} .ariaOrientation=${i ? "horizontal" : "vertical"} .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${e} class=${T({
1035
+ const { _disabledOrInvalid: t, segmentsDraggingDisabled: n, isHorizontal: i } = this;
1036
+ return w`<div .ariaLabel=${this.messages.sliderValue} .ariaOrientation=${i ? "horizontal" : "vertical"} .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${e} class=${S({
966
1037
  thumb: !0,
967
1038
  "fixed-thumb": !0,
968
1039
  active: this._activePart === "range"
969
- })} @blur=${this._onTrackBlur} @focus=${this._onTrackFocus} @keydown=${a ? void 0 : this._onTrackRangeKeyDown} @pointerdown=${a ? this._onFixedThumbPointerDown : this._onTrackRangePointerDown} role=slider style=${F({
1040
+ })} @blur=${this._onTrackBlur} @focus=${this._onTrackFocus} @keydown=${n ? void 0 : this._onTrackRangeKeyDown} @pointerdown=${n ? this._onFixedThumbPointerDown : this._onTrackRangePointerDown} role=slider style=${F({
970
1041
  ...this._getPositionStyleForElement(e),
971
1042
  "z-index": this._activePart === "range" ? 1 : 0
972
1043
  })} .tabIndex=${t ? -1 : 0}><div class="thumb-content"><span class="handle"></span></div></div>`;
973
1044
  }
974
- _renderThumb(e, t, a) {
975
- const { valueLabelsDisplay: i } = this, r = this._disabledOrInvalid, l = !a && (this._activePart === e || this._activePart === "range"), o = !a && (this._activePart === "range" || this._activePart === e), s = i === "always" || i === "auto" && (o || a && this._activePart === "range"), c = this.isHorizontal, d = c ? "horizontal" : "vertical", g = `label-${e}`, h = c ? "center" : this.valueLabelsPlacement === "start" ? "end" : "start";
976
- return te(e, w`<div id=${e ?? E} .ariaLabel=${this.messages.sliderValue} aria-labelledby=${(i ? g : void 0) ?? E} .ariaOrientation=${d} .ariaValueMin=${this.min} .ariaValueMax=${this.max} .ariaValueNow=${t} .ariaValueText=${this._valueFormatter(t)} class=${T({
1045
+ _renderThumb(e, t, n) {
1046
+ const { valueLabelsDisplay: i } = this, a = this._disabledOrInvalid, o = !n && (this._activePart === e || this._activePart === "range"), s = !n && (this._activePart === "range" || this._activePart === e), l = i === "always" || i === "auto" && (s || n && this._activePart === "range"), c = this.isHorizontal, d = c ? "horizontal" : "vertical", h = `label-${e}`, u = c ? "center" : this.valueLabelsPlacement === "start" ? "end" : "start";
1047
+ return q(e, w`<div id=${e ?? P} .ariaLabel=${this.messages.sliderValue} aria-labelledby=${(i ? h : void 0) ?? P} .ariaOrientation=${d} .ariaValueMin=${this.min} .ariaValueMax=${this.max} .ariaValueNow=${t} .ariaValueText=${this._valueFormatter(t)} class=${S({
977
1048
  thumb: !0,
978
- active: l,
979
- "labels-only": a
980
- })} data-entry=${e ?? E} @pointerdown=${a ? void 0 : this._onThumbPointerDown} @focus=${a ? void 0 : this._onThumbFocus} @blur=${a ? void 0 : this._onThumbBlur} @keydown=${a ? void 0 : this._onThumbKeyDown} role=slider style=${F({
1049
+ active: o,
1050
+ "labels-only": n
1051
+ })} data-entry=${e ?? P} @pointerdown=${n ? void 0 : this._onThumbPointerDown} @focus=${n ? void 0 : this._onThumbFocus} @blur=${n ? void 0 : this._onThumbBlur} @keydown=${n ? void 0 : this._onThumbKeyDown} role=slider style=${F({
981
1052
  ...this._getPositionStyleForElement(t),
982
- "z-index": this._activePart === e ? 1 : 0
983
- })} .tabIndex=${a || r ? -1 : 0}><div class="thumb-content"><span class="handle"></span><arcgis-label-input .alignment=${h} class="label" .hidden=${!s} id=${g ?? E} .labelFormatter=${this._valueFormatter} @focus=${r ? void 0 : this._onThumbFocus} @blur=${r ? void 0 : this._onThumbBlur} @arcgisChange=${this._onValueInputChange} .readOnly=${!this.valueLabelsEditingEnabled} tabindex=-1 .value=${t} ${B(this._makeResizeRef())}></arcgis-label-input></div></div>`);
1053
+ "z-index": this._activePart === e ? 2 : 1
1054
+ })} .tabIndex=${n || a ? -1 : 0}><div class="thumb-content"><span class="handle"></span><arcgis-label-input .alignment=${u} class="label" .hidden=${!l} id=${h ?? P} .labelFormatter=${this._valueFormatter} @focus=${a ? void 0 : this._onThumbFocus} @blur=${a ? void 0 : this._onThumbBlur} @arcgisChange=${this._onValueInputChange} .readOnly=${!this.valueLabelsEditingEnabled} tabindex=-1 .value=${t} ${U(this._makeResizeRef())}></arcgis-label-input></div></div>`);
984
1055
  }
985
1056
  _renderRangeLabel(e) {
986
1057
  let t = "center";
987
- return this.isHorizontal && (t = e === "min" ? "end" : "start", this.rangeLabelsPlacement === "end" && (t = t === "end" ? "start" : "end"), this.mirrored && (t = t === "end" ? "start" : "end")), w`<arcgis-label-input .alignment=${t} class=${T(e)} data-type=${e ?? E} .hidden=${!this.showRangeLabels} .labelFormatter=${this[`_${e}Formatter`]} @arcgisChange=${this._onRangeInputChange} .readOnly=${!this.rangeLabelsEditingEnabled} .value=${this[e]}></arcgis-label-input>`;
1058
+ return this.isHorizontal && (t = e === "min" ? "end" : "start", this.rangeLabelsPlacement === "end" && (t = t === "end" ? "start" : "end"), this.mirrored && (t = t === "end" ? "start" : "end")), w`<arcgis-label-input .alignment=${t} class=${S(e)} data-type=${e ?? P} .hidden=${!this.showRangeLabels} .labelFormatter=${this[`_${e}Formatter`]} @arcgisChange=${this._onRangeInputChange} .readOnly=${!this.rangeLabelsEditingEnabled} .value=${this[e]}></arcgis-label-input>`;
988
1059
  }
989
1060
  }
990
- function Me(n) {
991
- return "dataset" in n && n.tagName === "ARCGIS-LABEL-INPUT" && (n.dataset.type === "min" || n.dataset.type === "max");
1061
+ function Fe(r) {
1062
+ return "dataset" in r && r.tagName === "ARCGIS-LABEL-INPUT" && (r.dataset.type === "min" || r.dataset.type === "max");
992
1063
  }
993
- function z(n) {
994
- const e = ie(n, "[data-entry]");
1064
+ function $(r) {
1065
+ const e = oe(r, "[data-entry]");
995
1066
  return e && "dataset" in e ? e.dataset.entry : null;
996
1067
  }
997
- function Fe(n) {
998
- return typeof n != null && n !== "range";
1068
+ function Oe(r) {
1069
+ return typeof r != null && r !== "range";
999
1070
  }
1000
- function Re(n, e) {
1001
- return e ? n.renderRoot.querySelector(`div[data-entry="${e}"]`) : null;
1071
+ function Q(r, e) {
1072
+ return e ? r.renderRoot.querySelector(`div[data-entry="${e}"]`) : null;
1002
1073
  }
1003
- function Le(n, e) {
1004
- return e ? n.renderRoot.querySelector(`div[data-entry="${e}"] span.handle`) : null;
1074
+ function Be(r, e) {
1075
+ return e ? r.renderRoot.querySelector(`div[data-entry="${e}"] span.handle`) : null;
1005
1076
  }
1006
- function G(n, e) {
1007
- return e ? n.renderRoot.querySelector(`div[data-entry="${e}"] arcgis-label-input`) : null;
1077
+ function Z(r, e) {
1078
+ return e ? r.renderRoot.querySelector(`div[data-entry="${e}"] arcgis-label-input`) : null;
1008
1079
  }
1009
- function C(n) {
1010
- return n.isPrimary && n.button === 0;
1080
+ function R(r) {
1081
+ return r.isPrimary && r.button === 0;
1011
1082
  }
1012
- const Oe = 5;
1013
- function L(n, e, t) {
1014
- const a = e - n, i = (t - n) / a * 100;
1015
- return Number.parseFloat(i.toFixed(Oe));
1083
+ const Ae = 5;
1084
+ function B(r, e, t) {
1085
+ const n = e - r, i = (t - r) / n * 100;
1086
+ return Number.parseFloat(i.toFixed(Ae));
1016
1087
  }
1017
- function O(n, e, t) {
1018
- return Math.max(e, Math.min(t, n));
1088
+ function T(r, e, t) {
1089
+ return Math.max(e, Math.min(t, r));
1019
1090
  }
1020
- ee("arcgis-slider", Se);
1091
+ re("arcgis-slider", Me);
1021
1092
  export {
1022
- Se as ArcgisSlider
1093
+ Me as ArcgisSlider
1023
1094
  };