@arcgis/common-components 6.0.0-next.3 → 6.0.0-next.30

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