@esri/calcite-components 6.0.0-next.57 → 6.0.0-next.58
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.
- package/THIRD-PARTY-NOTICES.md +25 -25
- package/dist/cdn/{UAWAKMEG.js → 262BHZPX.js} +1 -1
- package/dist/cdn/{QRXSGVJ3.js → 2KSSNEHL.js} +1 -1
- package/dist/cdn/{JXXBBIQE.js → 2UH3OMBW.js} +1 -1
- package/dist/cdn/{6OFRJTUT.js → 2UQKII64.js} +1 -1
- package/dist/cdn/{H5EGUTQH.js → 2URIWMCR.js} +1 -1
- package/dist/cdn/{Y53EJPH7.js → 2YQPHIXA.js} +1 -1
- package/dist/cdn/{GVFKJAQB.js → 3G2SC2S3.js} +1 -1
- package/dist/cdn/{S4JGRGUG.js → 3KA5AK3Z.js} +1 -1
- package/dist/cdn/{AWZZDDF5.js → 4HAMZSNT.js} +1 -1
- package/dist/cdn/{2P4DFN2O.js → 4JHTF5DV.js} +1 -1
- package/dist/cdn/{255DGVF3.js → 4YPHFKUF.js} +1 -1
- package/dist/cdn/{NADBQLBM.js → 5EPJVJRZ.js} +1 -1
- package/dist/cdn/5KIYA3IZ.js +2 -0
- package/dist/cdn/{QUYQCGNL.js → 64ZLUEWK.js} +1 -1
- package/dist/cdn/{DCJVJGUW.js → 67TTPSK7.js} +1 -1
- package/dist/cdn/{JV6ZOC4Q.js → 6JK57F7Z.js} +1 -1
- package/dist/cdn/{MFI6726F.js → 6LHB5RGN.js} +1 -1
- package/dist/cdn/6NFZFTHW.js +2 -0
- package/dist/cdn/{BH3JLG7G.js → 72LA67LQ.js} +1 -1
- package/dist/cdn/{TLB24UHT.js → 7FBHH5E4.js} +1 -1
- package/dist/cdn/{UPVI4NRM.js → 7N3CA5JL.js} +1 -1
- package/dist/cdn/{PAS5DKDX.js → 7VCCZFWX.js} +1 -1
- package/dist/cdn/{CPHTL2F6.js → A4EWYVRJ.js} +1 -1
- package/dist/cdn/{RJSOXSZD.js → A4YJHKLW.js} +1 -1
- package/dist/cdn/{I6RJ2VIN.js → A5UKONLR.js} +1 -1
- package/dist/cdn/{7CQ6OL7X.js → AA7MKCMW.js} +1 -1
- package/dist/cdn/{EFCPZGE6.js → ADXIUYJP.js} +1 -1
- package/dist/cdn/{6V6OLYYL.js → AIYI4KLT.js} +1 -1
- package/dist/cdn/{NFMCPHWW.js → AJX6FSDA.js} +1 -1
- package/dist/cdn/{YKUXYNDA.js → AP5EMLZT.js} +1 -1
- package/dist/cdn/{2PK5LMCW.js → APDB2R5F.js} +1 -1
- package/dist/cdn/{QT77Q2K3.js → B5O7D4DU.js} +1 -1
- package/dist/cdn/{XBAPCBIF.js → B6HBT6MV.js} +1 -1
- package/dist/cdn/{Q2Q2QGKM.js → BBG67UBB.js} +1 -1
- package/dist/cdn/{D4GBRS4G.js → BJT42FVC.js} +1 -1
- package/dist/cdn/{YH6Q5VY4.js → BQ7YJ3PF.js} +1 -1
- package/dist/cdn/{PFRK3XFW.js → BUWKJ72Y.js} +1 -1
- package/dist/cdn/{3723XZUX.js → BXX3MHWH.js} +1 -1
- package/dist/cdn/{Q4VFSQF5.js → CCLG3D7E.js} +1 -1
- package/dist/cdn/{VNYD2OUD.js → CPOKYX36.js} +1 -1
- package/dist/cdn/{6CWE6MNV.js → DIMR4ISD.js} +1 -1
- package/dist/cdn/{X2Z5LB3O.js → DM3R3RDU.js} +1 -1
- package/dist/cdn/{XGYS74KU.js → DO4KVY7Y.js} +1 -1
- package/dist/cdn/DQB3JHBX.js +2 -0
- package/dist/cdn/{MADPO7KC.js → DQHDLIOQ.js} +1 -1
- package/dist/cdn/{536UDPUJ.js → DWBAUY2O.js} +1 -1
- package/dist/cdn/{JNYTB4OF.js → E67S3W5F.js} +1 -1
- package/dist/cdn/E6AGZFV5.js +2 -0
- package/dist/cdn/{I4V7SKAA.js → EBOARSV6.js} +1 -1
- package/dist/cdn/{ODXUFMJH.js → EFV73TUW.js} +1 -1
- package/dist/cdn/{PDSLJRDS.js → EZFMLSIV.js} +1 -1
- package/dist/cdn/{47KWRQ4W.js → F2XZNM7I.js} +1 -1
- package/dist/cdn/{AK5R6KXR.js → F5KY6RC2.js} +1 -1
- package/dist/cdn/{CFPNPSEH.js → F5WL6J5S.js} +1 -1
- package/dist/cdn/{KP6ZOTOC.js → FNCNJH35.js} +1 -1
- package/dist/cdn/{WUOCYAV4.js → FNZXA44J.js} +1 -1
- package/dist/cdn/{IVIEPOEY.js → GBLGTHFD.js} +1 -1
- package/dist/cdn/{FT3LFO47.js → GI6KFZMW.js} +1 -1
- package/dist/cdn/{DIXFECD7.js → H6EOTDA3.js} +1 -1
- package/dist/cdn/{7URWMNOS.js → H7YF2IMU.js} +1 -1
- package/dist/cdn/{ACVA6KXM.js → HCBKDKAE.js} +1 -1
- package/dist/cdn/{DXHS5GYG.js → IE2QNZEU.js} +1 -1
- package/dist/cdn/{CNATAZKN.js → IIPTVCUW.js} +1 -1
- package/dist/cdn/{AKXSJUEZ.js → IVAVBCGO.js} +1 -1
- package/dist/cdn/{ECV3BCU2.js → JCGGZNRY.js} +1 -1
- package/dist/cdn/{RR5ATBN4.js → JGNRWRFC.js} +1 -1
- package/dist/cdn/{IFYYF2UJ.js → JLWOFZ3U.js} +1 -1
- package/dist/cdn/{JXYWBESB.js → JMK4MVYV.js} +1 -1
- package/dist/cdn/{SVIV7MP3.js → JTB7EZBF.js} +1 -1
- package/dist/cdn/{VUOWO7CG.js → K4U6BMUF.js} +1 -1
- package/dist/cdn/{XOAMM76F.js → KTDRSKJ6.js} +1 -1
- package/dist/cdn/{6ZUSE3GG.js → KW7LDRSU.js} +1 -1
- package/dist/cdn/{3F326EUW.js → LDRFCBQX.js} +1 -1
- package/dist/cdn/{JRFBOXZF.js → LFBR5CPK.js} +1 -1
- package/dist/cdn/LJMRBALT.js +2 -0
- package/dist/cdn/{53N3A2GQ.js → LKN4LUNT.js} +1 -1
- package/dist/cdn/{R4TNZDBK.js → LRZX3WFC.js} +1 -1
- package/dist/cdn/{LZEWTLMU.js → LX5MRNZ6.js} +1 -1
- package/dist/cdn/MC5XM5AE.js +2 -0
- package/dist/cdn/{XY7N5NOI.js → MHGHUSWD.js} +1 -1
- package/dist/cdn/{FNBZIEVI.js → MLSWUVXY.js} +1 -1
- package/dist/cdn/{EEOKRDQW.js → MPGHVV7O.js} +1 -1
- package/dist/cdn/{WYVF25H2.js → MVXVRV3L.js} +1 -1
- package/dist/cdn/{SS34LSD2.js → N3BEKA6Y.js} +1 -1
- package/dist/cdn/{U7YUFZ25.js → N7S7RVBB.js} +1 -1
- package/dist/cdn/{UDVQVBC6.js → N7WEIKWP.js} +1 -1
- package/dist/cdn/{427FF3YB.js → NQJXCAZC.js} +1 -1
- package/dist/cdn/{5ZE3EOFT.js → OQFWYTZR.js} +1 -1
- package/dist/cdn/{MK5VDQGI.js → ORZC3SG4.js} +1 -1
- package/dist/cdn/{IYAWTCCQ.js → P772V265.js} +1 -1
- package/dist/cdn/{CUXRRYYR.js → PKF4PCC3.js} +1 -1
- package/dist/cdn/{BGVOI22E.js → PRVIXJ7V.js} +1 -1
- package/dist/cdn/{EHA27KQT.js → Q7PRU56L.js} +1 -1
- package/dist/cdn/{T4E5UUS2.js → QDM2OPV6.js} +1 -1
- package/dist/cdn/{KOACFUL2.js → QPV4XZH2.js} +1 -1
- package/dist/cdn/{F4VQ6GFT.js → QW3GDUOM.js} +1 -1
- package/dist/cdn/{COJORJUY.js → QY2AFC2Q.js} +1 -1
- package/dist/cdn/{2C6O7GZD.js → R3JESRUS.js} +1 -1
- package/dist/cdn/{7I4J3QL3.js → R3OB5AED.js} +1 -1
- package/dist/cdn/{FZCH4GEB.js → ROAXTH4J.js} +1 -1
- package/dist/cdn/{DPAMT5RL.js → RQ6KOELW.js} +1 -1
- package/dist/cdn/{5F3N7QMR.js → RSNJIGRT.js} +1 -1
- package/dist/cdn/{WXN2SASK.js → RYDDFBP3.js} +1 -1
- package/dist/cdn/{RP3EAINH.js → SBQGT5X3.js} +1 -1
- package/dist/cdn/{ACOYPEYA.js → SGRUHNSM.js} +1 -1
- package/dist/cdn/{GVTCSUCB.js → SVWITGRF.js} +1 -1
- package/dist/cdn/{6YRETAZF.js → T2JUGBD5.js} +1 -1
- package/dist/cdn/T6MIIDHZ.js +2 -0
- package/dist/cdn/{UWHSTM2T.js → TG4HJT6M.js} +1 -1
- package/dist/cdn/{QGFOIT4W.js → TOFY2INI.js} +1 -1
- package/dist/cdn/{JBB74BJD.js → U7NXNZOA.js} +1 -1
- package/dist/cdn/{4PILPCKW.js → UHWJB7QE.js} +1 -1
- package/dist/cdn/{PWKBCDNZ.js → ULL6GPKV.js} +1 -1
- package/dist/cdn/{544WHEAC.js → UOYYONEV.js} +1 -1
- package/dist/cdn/{YI4EAC34.js → UQA4IJMM.js} +1 -1
- package/dist/cdn/{3K7RNV7S.js → VBKJL7VE.js} +1 -1
- package/dist/cdn/{Y6VF2ATT.js → VGDMUJGD.js} +1 -1
- package/dist/cdn/{NAGETJPT.js → VGI5FR3H.js} +1 -1
- package/dist/cdn/{AFAULQJZ.js → VTE67UUL.js} +1 -1
- package/dist/cdn/{SP5REG7X.js → VULUCOIA.js} +1 -1
- package/dist/cdn/{Z2UTWWWB.js → W27GBIB7.js} +1 -1
- package/dist/cdn/{6FRRQNIA.js → WDJZ44LL.js} +1 -1
- package/dist/cdn/{4TFX5NKO.js → WQK6BEDO.js} +1 -1
- package/dist/cdn/{HTGSUTHB.js → X5AAH2CE.js} +1 -1
- package/dist/cdn/{I5IUYLTE.js → XP5LP6D2.js} +1 -1
- package/dist/cdn/{YTK4BNMW.js → Y3B6YAGD.js} +1 -1
- package/dist/cdn/{3QXLTJ4A.js → Y3ZFMXH6.js} +1 -1
- package/dist/cdn/{JX5QRWOH.js → YE5HVMTC.js} +1 -1
- package/dist/cdn/{KMPESISY.js → YGWIVXHL.js} +1 -1
- package/dist/cdn/{JO6B72H7.js → YQPYWC2S.js} +1 -1
- package/dist/cdn/{BJ7WZK6B.js → YRBFOBYN.js} +1 -1
- package/dist/cdn/{JI3CVRLG.js → YRVGR3HM.js} +1 -1
- package/dist/cdn/{TYC5HTPV.js → YVEJTF76.js} +1 -1
- package/dist/cdn/Z6XAMJUJ.js +2 -0
- package/dist/cdn/{S75YSIFL.js → ZBVXUCQY.js} +1 -1
- package/dist/cdn/ZN5NDQPK.js +2 -0
- package/dist/cdn/{UDA2GABL.js → ZPQKTCJJ.js} +1 -1
- package/dist/cdn/{XQZORI5T.js → ZROAP4OW.js} +1 -1
- package/dist/cdn/{K3YWTTEY.js → ZV5ABNHG.js} +1 -1
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-accordion-item/customElement.d.ts +3 -30
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item-group/customElement.js +1 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.js +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-dropdown-group/customElement.js +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +3 -3
- package/dist/cdn/2S4LRLKY.js +0 -2
- package/dist/cdn/44XMAA3C.js +0 -2
- package/dist/cdn/C5E6QSIS.js +0 -2
- package/dist/cdn/DWPNKYZB.js +0 -2
- package/dist/cdn/MPKF6LGA.js +0 -2
- package/dist/cdn/MQTYR6LO.js +0 -2
- package/dist/cdn/ODQTJZLA.js +0 -2
- package/dist/cdn/U3YL3XUS.js +0 -2
- package/dist/cdn/XK4UDEEY.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as ie,b as D}from"./M7VG3ZLQ.js";import{a as ee}from"./TLB24UHT.js";import{a as Z}from"./544WHEAC.js";import{c as te}from"./FT3LFO47.js";import{a as Y}from"./XN5GTOTE.js";import{a as ae}from"./3K7RNV7S.js";import{a as K}from"./GVTCSUCB.js";import"./YYOLNZRT.js";import{b as P}from"./CSDY4NKB.js";import{a as N}from"./FDHY2TZA.js";import{a as W}from"./CASNTUXN.js";import{a as Q,k as C}from"./BGVOI22E.js";import{a as J}from"./JN6YLTUP.js";import{a as U}from"./53N3A2GQ.js";import{a as G}from"./MFI6726F.js";import{a as j}from"./BH3JLG7G.js";import"./VMHJHFFS.js";import{e as q}from"./JX5QRWOH.js";import"./IVIEPOEY.js";import{D as w,u as S,v as $}from"./W77STZAT.js";import{E as k,F as T,G as A,H as x,I as M,K as O,L as X,T as I,g as E,h as V,l as H,p as z}from"./EEOKRDQW.js";var c={container:"container",containerRange:"container--range",graph:"graph",handle:"handle",handleExtension:"handle-extension",handleLabel:"handle__label",handleLabelMinValue:"handle__label--minValue",handleLabelValue:"handle__label--value",hyphen:"hyphen",hyphenWrap:"hyphen--wrap",static:"static",thumb:"thumb",thumbActive:"thumb--active",thumbContainer:"thumb-container",thumbMinValue:"thumb--minValue",thumbPrecise:"thumb--precise",thumbValue:"thumb--value",tick:"tick",tickActive:"tick--active",tickEndAligned:"tick--end-aligned",tickLabel:"tick__label",tickLabelCovered:"tick__label--covered",tickLabelLeft:"tick__label--left",tickLabelRight:"tick__label--right",tickLabelVisible:"tick__label--visible",tickMax:"tick__label--max",tickMin:"tick__label--min",ticks:"ticks",track:"track",trackRange:"track__range",transformed:"transformed",scale:y=>`scale--${y}`},oe="calcite-slider",F={validationMessage:"validationMessage",host:y=>`${oe}-${y}`},ce=250,he=E`@charset "UTF-8";:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{--calcite-slider-handle-size: var(--calcite-size-4xs);--calcite-slider-handle-extension-height: .4rem;--calcite-slider-container-font-size: var(--calcite-font-size-relative-xs)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size: var(--calcite-size-2xs);--calcite-slider-handle-extension-height: .5rem;--calcite-slider-container-font-size: var(--calcite-font-size-relative-sm)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size: 1rem;--calcite-slider-handle-extension-height: .65rem;--calcite-slider-container-font-size: var(--calcite-font-size-relative-base)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-slider-text-color, var(--calcite-color-text-2));font-size:var(--calcite-slider-container-font-size)}:host{display:block;inline-size:100%;min-inline-size:0}:host .validation-container{padding-block-start:0!important}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * .5);padding-block:calc(var(--calcite-slider-handle-size) * .5);margin-block:calc(var(--calcite-slider-handle-size) * .5);margin-inline:0;--calcite-slider-full-handle-height: calc( var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height) );touch-action:none;-webkit-user-select:none;user-select:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-color-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.375rem}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.5rem}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.55rem}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset: calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset: calc(var(--calcite-slider-handle-size) * .5);outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md);font-family:inherit;position:absolute;margin:var(--calcite-space-none);display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:var(--calcite-color-transparent);padding:var(--calcite-space-none);transform:translate(var(--calcite-slider-thumb-x-offset),var(--calcite-slider-thumb-y-offset))}.thumb .handle__label{white-space:nowrap}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:var(--calcite-space-none);opacity:0}.thumb .handle__label.hyphen:after{content:"—";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{outline-color:var(--calcite-color-transparent);box-sizing:border-box;border-radius:var(--calcite-corner-radius-pill);background-color:var(--calcite-slider-handle-fill-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease,background-color var(--calcite-internal-animation-timing-medium) ease,box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-slider-handle-extension-color, var(--calcite-color-text-3))}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb:focus .handle{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}.thumb:focus .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1),var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset: -.125rem}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset: 50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.4375rem}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.875rem}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -2rem}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{margin-block-start:.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{margin-block-end:.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset: -2.075rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset: -2.75rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset: -3.0625rem}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand));box-shadow:0 0 8px #00000029}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.track{position:relative;block-size:.125rem;background-color:var(--calcite-slider-track-color, var(--calcite-color-border-2));transition:all var(--calcite-internal-animation-timing-medium) ease-in;border-radius:var(--calcite-corner-radius)}.track__range{position:absolute;inset-block-start:var(--calcite-space-none);block-size:.125rem;background-color:var(--calcite-slider-track-fill-color, var(--calcite-color-brand));border-radius:var(--calcite-corner-radius)}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * .5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media(forced-colors:active){.thumb{outline-width:0;outline-offset:0}.handle{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md)}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:var(--calcite-space-2xs);inline-size:.125rem;border-width:var(--calcite-border-width-sm);border-style:solid;background-color:var(--calcite-slider-tick-color, var(--calcite-color-border-input));border-color:var(--calcite-slider-tick-border-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));inset-block-start:-2px;pointer-events:none;margin-inline-start:calc(var(--calcite-space-2xs) * -.5)}.tick--end-aligned{margin-inline-start:var(--calcite-space-none);margin-inline-end:calc(var(--calcite-space-2xs) * -.5)}.tick--active{background-color:var(--calcite-slider-tick-selected-color, var(--calcite-color-brand))}.tick__label{pointer-events:none;margin-block-start:var(--calcite-space-md-plus);display:flex;justify-content:center;visibility:hidden}.tick__label--visible{visibility:visible}.tick__label--covered{opacity:0}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--min,.tick__label--max{position:absolute;inset-block-start:calc(var(--calcite-space-px) * -1);inline-size:max-content}.tick__label--left{transform:translate(-.25ch);left:0}.tick__label--right{transform:translate(.25ch);right:0}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{color:var(--calcite-color-text-3);font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal))}.graph{color:var(--calcite-slider-graph-color, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)));block-size:48px}:host([label-ticks][ticks]) .container{padding-block-end:calc(var(--calcite-space-md-plus) + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{padding-block-end:calc(var(--calcite-slider-handle-size) * .5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-theme-space-base, var(--calcite-spacing-base))}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-relative-md)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}`;function ue(y,e=!1){let t=y.find(i=>i.edge==="min"),s=y.find(i=>i.edge==="max"),a=[];t&&a.push(t),s&&(!t||!$(t,s)||e)&&a.push(s);let n=y.filter(i=>!i.edge&&!a.some(r=>$(i,r))).sort((i,r)=>i.right-r.right||i.value-r.value),l=[];for(let i of n){let r=l.at(-1);(!r||!$(r,i))&&l.push(i)}if(l.length===n.length)return new Set([...a,...l].map(i=>i.value));l.push(...a),l.sort((i,r)=>i.value-r.value);for(let i=0;i<l.length;i++){let r=l[i];if(r.edge)continue;let o=l[i-1],h=l[i+1],m=o?.position??0,f=h?.position??1,g=u=>(u.position-m)**2+(f-u.position)**2,L=r;for(let u of n){if(u.position<=m||u.position>=f||o&&$(o,u)||h&&$(h,u))continue;let d=g(u),b=g(L);(d<b||d===b&&u.value<L.value)&&(L=u)}l[i]=L}return new Set(l.map(i=>i.value))}function p(y){return Array.isArray(y)}var le=0,de="\u200E",B=class extends A{constructor(){super(),this.direction=q(),this.dragEnd=e=>{this.disabled||(this.removeDragListeners(),this.focusActiveHandle(e.clientX),this.dragProp&&!P(this.lastDragPropValue,this.getDragPropValue(this.dragProp))&&this.emitChange(),this.dragProp=void 0,this.lastDragPropValue=void 0,this.minValueDragRange=void 0,this.maxValueDragRange=void 0,this.minMaxValueRange=void 0)},this.dragUpdate=e=>{if(!(this.disabled||!this.trackRef.value)&&(e.preventDefault(),this.dragProp)){let t=this.mapToRange(e.clientX||e.pageX);if(p(this.value)&&this.dragProp==="minMaxValue")if(this.minValueDragRange&&this.maxValueDragRange&&this.minMaxValueRange){let s=t-this.minValueDragRange,a=t+this.maxValueDragRange;a<=this.max&&s>=this.min&&a-s===this.minMaxValueRange&&this.setValue({minValue:this.clamp(s,"minValue"),maxValue:this.clamp(a,"maxValue")})}else this.minValueDragRange=t-this.minValue,this.maxValueDragRange=this.maxValue-t,this.minMaxValueRange=this.maxValue-this.minValue;else if(p(this.value)&&this.previousEmittedValue!==void 0&&p(this.previousEmittedValue)&&this.dragProp==="maxValue"){let[s,a]=this.previousEmittedValue;s===a&&t<s?(this.dragProp="minValue",this.minHandleRef.value.focus()):this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}else this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}},this.formatValue=e=>{C.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};let t=C.localize(e.toString(),!0);return this.direction==="rtl"&&t.startsWith(C.minusSign)?`${de}${t}`:t},this.formSupport=te({inputType:"range"})(this),this.guid=F.host(W()),this.maxHandleRef=k(),this.maxValueLabelRefs={label:k(),static:k(),transformed:k()},this.maxTickLabelRef=k(),this.messages=G({blocking:!0}),this.minHandleRef=k(),this.minValueLabelRefs={label:k(),static:k(),transformed:k()},this.minTickLabelRef=k(),this.pointerUpDragEnd=e=>{this.disabled||!w(e)||this.dragEnd(e)},this.coveredTickLabels=new Set,this.tickLabelRefs=new Map,this.tickLabelText=new Map,this.invalidateTickLabelLayout=()=>{this.tickLabelLayout=void 0,this.scheduleTickLabelLayout()},this.tickLabelResizeObserver=N("resize",this.invalidateTickLabelLayout),this.trackRef=k(),this.focusSetter=j()(this).setFocus,this.interactiveContainer=K(this),this._value=le,this.activeProp="value",this.tickValues=[],this.disabled=!1,this.fillPlacement="start",this.groupSeparator=!1,this.hasHistogram=!1,this.labelHandles=!1,this.labelTicks=!1,this.max=100,this.min=0,this.mirrored=!1,this.precise=!1,this.required=!1,this.scale="m",this.snap=!1,this.status="idle",this.step=1,this.calciteSliderChange=z({cancelable:!1}),this.calciteSliderInput=z({cancelable:!1}),ae(this),this.listen("pointerdown",this.pointerDownHandler),this.listen("keydown",this.handleKeyDown),this.listen("touchstart",this.handleTouchStart)}static{this.properties={activeProp:[16,{},{state:!0}],maxValueDragRange:[16,{},{state:!0}],minMaxValueRange:[16,{},{state:!0}],minValueDragRange:[16,{},{state:!0}],tickValues:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillPlacement:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],hasHistogram:[7,{},{reflect:!0,type:Boolean}],histogram:[0,{},{attribute:!1}],histogramStops:[0,{},{attribute:!1}],label:1,labelFormatter:[0,{},{attribute:!1}],labelHandles:[7,{},{reflect:!0,type:Boolean}],labelTicks:[7,{},{reflect:!0,type:Boolean}],max:[11,{},{reflect:!0,type:Number}],maxLabel:1,maxValue:[9,{},{type:Number}],min:[11,{},{reflect:!0,type:Number}],minLabel:1,labelText:1,messageOverrides:[0,{},{attribute:!1}],minValue:[9,{},{type:Number}],mirrored:[7,{},{reflect:!0,type:Boolean}],name:[3,{},{reflect:!0}],numberingSystem:1,pageStep:[11,{},{reflect:!0,type:Number}],precise:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],snap:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],ticks:[11,{},{reflect:!0,type:Number}],validationIcon:[3,{converter:X},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:[11,{},{reflect:!0,type:Number}]}}static{this.formAssociated=!0}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=he}get value(){return this._value}set value(e){if(Array.isArray(e)){this._value=e;return}if(e!=null){this._value=Number(e);return}this._value=Array.isArray(this._value)?[this.minValue,this.maxValue]:le}async setFocus(e){return this.focusSetter(()=>this.minHandleRef.value||this.maxHandleRef.value,e)}connectedCallback(){super.connectedCallback(),this.setMinMaxFromValue(),this.setValueFromMinMax(),this.previousEmittedValue=this.value,this.tickLabelResizeObserver?.observe(this.el)}load(){this.setInitialValue()}willUpdate(e){e.has("histogram")&&(this.hasHistogram=!!this.histogram),(e.has("ticks")||e.has("min")||e.has("max"))&&(this.tickValues=this.generateTickValues(),this.tickLabelRefs.clear()),(e.has("ticks")||e.has("min")||e.has("max")||e.has("scale")||e.has("mirrored")||e.has("hasHistogram")||e.has("labelTicks")||e.has("labelHandles")||e.has("precise")||e.has("groupSeparator")||e.has("numberingSystem")||e.has("value")&&Array.isArray(e.get("value"))!==p(this.value))&&(this.tickLabelText.clear(),this.invalidateTickLabelLayout()),e.has("value")&&(this.hasUpdated||this.value!==0)&&this.setMinMaxFromValue(),(e.has("minValue")||e.has("maxValue"))&&this.setValueFromMinMax()}updated(){this.isConnected&&(this.labelHandles&&(this.adjustHostObscuredHandleLabel("value"),p(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideCoveredBoundingTickLabels(),this.tickLabelLayout&&this.tickLabelLayout.direction!==this.direction&&this.invalidateTickLabelLayout(),this.tickLabelLayout?.visibleValues||this.scheduleTickLabelLayout())}disconnectedCallback(){super.disconnectedCallback(),this.removeDragListeners(),this.tickLabelResizeObserver?.disconnect(),this.tickLabelLayoutFrame!==void 0&&(cancelAnimationFrame(this.tickLabelLayoutFrame),this.tickLabelLayoutFrame=void 0),this.tickLabelLayout=void 0}setInitialValue(){p(this.value)||(this.value=this.snap?this.getClosestStep(this.value):this.clamp(this.value))}handleKeyDown(e){let t=this.shouldMirror(),{activeProp:s,max:a,min:n,pageStep:l,step:i}=this,r=this[s],{key:o}=e;if(J(o)){e.preventDefault();return}let h=NaN;if(o==="ArrowUp"||o==="ArrowRight"?h=r+i*(t&&o==="ArrowRight"?-1:1):o==="ArrowDown"||o==="ArrowLeft"?h=r-i*(t&&o==="ArrowLeft"?-1:1):o==="PageUp"?l&&(h=r+l):o==="PageDown"?l&&(h=r-l):o==="Home"?h=n:o==="End"&&(h=a),isNaN(h))return;e.preventDefault();let m=Number(h.toFixed(D(i)));this.setValue({[s]:this.clamp(m,s)})}pointerDownHandler(e){if(this.disabled||!w(e))return;let t=e.clientX||e.pageX,s=this.mapToRange(t),a="value";p(this.value)&&(s>=this.minValue&&s<=this.maxValue&&this.lastDragProp==="minMaxValue"?a="minMaxValue":a=Math.abs(this.maxValue-s)<Math.abs(this.minValue-s)||s>=this.maxValue?"maxValue":"minValue"),this.lastDragPropValue=this.getDragPropValue(a),this.dragStart(a);let n=e.composedPath();[this.minHandleRef.value,this.maxHandleRef.value].some(i=>i&&n.includes(i))||this.setValue({[a]:this.clamp(s,a)}),this.focusActiveHandle(t)}handleTouchStart(e){e.preventDefault()}buildThumbType(e){let t=[e];return this.labelHandles&&t.push("labeled"),this.precise&&t.push("precise"),this.hasHistogram&&t.push("histogram"),t.join("-")}setValueFromMinMax(){let{minValue:e,maxValue:t}=this;typeof e=="number"&&typeof t=="number"&&(this.value=[e,t])}setMinMaxFromValue(){let{value:e}=this;p(e)&&(this.minValue=e[0],this.maxValue=e[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return p(this.value)?this.hasHistogram&&this.maxValue===0||!this.hasHistogram&&this.minValue===0:!1}getTickDensity(){let e=(this.max-this.min)/this.ticks/ce;return e<1?1:e}generateTickValues(){let e=this.ticks??0;if(e<=0)return[];let t=[this.min],s=this.getTickDensity(),a=e*s,n=this.min;for(;n<this.max;)n+=a,t.push(Math.min(n,this.max));return t.includes(this.max)||t.push(this.max),t}onThumbBlur(){this.activeProp=void 0}onThumbFocus(e){let t=e.currentTarget;this.activeProp=t.getAttribute("data-value-prop")}onThumbPointerDown(e){let t=e.currentTarget;this.pointerDownDragStart(e,t.getAttribute("data-value-prop"))}onTrackPointerDown(e){this.pointerDownDragStart(e,"minMaxValue")}pointerDownDragStart(e,t){w(e)&&this.dragStart(t)}dragStart(e){this.dragProp=e,this.lastDragProp=this.dragProp,this.activeProp=e,window.addEventListener("pointermove",this.dragUpdate),window.addEventListener("pointerup",this.pointerUpDragEnd),window.addEventListener("pointercancel",this.dragEnd)}getDragPropValue(e){return e==="minMaxValue"?this.value:this[e]}focusActiveHandle(e){this.dragProp==="minValue"?this.minHandleRef.value.focus():this.dragProp==="maxValue"||this.dragProp==="value"?this.maxHandleRef.value.focus():this.dragProp==="minMaxValue"&&this.getClosestHandle(e).focus()}emitChange(){this.calciteSliderChange.emit(),this.previousEmittedValue=this.value}removeDragListeners(){window.removeEventListener("pointermove",this.dragUpdate),window.removeEventListener("pointerup",this.pointerUpDragEnd),window.removeEventListener("pointercancel",this.dragEnd)}setValue(e){let t=!1;if(Object.keys(e).forEach(a=>{let n=e[a];n!==void 0&&(t||(t=this[a]!==n),this[a]=n)}),!t)return;(e.minValue||e.maxValue)&&this.setValueFromMinMax();let s=this.dragProp;this.calciteSliderInput.emit(),s||this.emitChange()}clamp(e,t){return e=ie(e,this.min,this.max),t==="maxValue"&&(e=Math.max(e,this.minValue)),t==="minValue"&&(e=Math.min(e,this.maxValue)),e}mapToRange(e){let t=this.max-this.min,{left:s,width:a}=this.trackRef.value.getBoundingClientRect()||{left:0,width:0},n=(e-s)/a,l=this.shouldMirror(),i=this.clamp(this.min+t*(l?1-n:n)),r=Number(i.toFixed(D(this.step)));return this.snap&&this.step?this.getClosestStep(r):r}getClosestStep(e){let{max:t,min:s,step:a}=this,n=new Q(`${Math.floor((e-s)/a)}`).multiply(`${a}`).add(`${s}`).toString(),l=this.clamp(Number(n));return l>t&&(l-=a),l}getClosestHandle(e){let t=this.minHandleRef.value,s=this.maxHandleRef.value;return this.getDistanceX(s,e)>this.getDistanceX(t,e)?t:s}getDistanceX(e,t){return Math.abs(e.getBoundingClientRect().left-t)}getFontSizeForElement(e){return Number(window.getComputedStyle(e).getPropertyValue("font-size").match(/\d+/)[0])}getUnitInterval(e){e=this.clamp(e);let t=this.max-this.min;return(e-this.min)/t}adjustHostObscuredHandleLabel(e){let t=e==="minValue"?this.minValueLabelRefs:this.maxValueLabelRefs,s=t.label.value,a=t.static.value,n=t.transformed.value,l=a.getBoundingClientRect(),i=this.getHostOffset(l.left,l.right);s.style.transform=`translateX(${i}px)`,n.style.transform=`translateX(${i}px)`}hyphenateCollidingRangeHandleLabels(){let e=this.shouldMirror(),t=e?this.maxValueLabelRefs:this.minValueLabelRefs,s=e?this.minValueLabelRefs:this.maxValueLabelRefs,a=t.label.value,n=t.static.value,l=t.transformed.value,i=this.getHostOffset(n.getBoundingClientRect().left,n.getBoundingClientRect().right),r=s.label.value,o=s.static.value,h=s.transformed.value,m=this.getHostOffset(o.getBoundingClientRect().left,o.getBoundingClientRect().right),f=this.getFontSizeForElement(a),g=this.getRangeLabelOverlap(l,h),L=a,u=f/2;if(g>0){if(L.classList.add(c.hyphen,c.hyphenWrap),m===0&&i===0){let d=g/2-u;d=Math.sign(d)===-1?Math.abs(d):-d;let b=this.getHostOffset(l.getBoundingClientRect().left+d-u,l.getBoundingClientRect().right+d-u),v=g/2,R=this.getHostOffset(h.getBoundingClientRect().left+v,h.getBoundingClientRect().right+v);b!==0&&(d+=b,v+=b),R!==0&&(d+=R,v+=R),a.style.transform=`translateX(${d}px)`,l.style.transform=`translateX(${d-u}px)`,r.style.transform=`translateX(${v}px)`,h.style.transform=`translateX(${v}px)`}else if(i>0||m>0)a.style.transform=`translateX(${i+u}px)`,r.style.transform=`translateX(${g+m}px)`,h.style.transform=`translateX(${g+m}px)`;else if(i<0||m<0){let d=Math.abs(i)+g-u;d=Math.sign(d)===-1?Math.abs(d):-d,a.style.transform=`translateX(${d}px)`,l.style.transform=`translateX(${d-u}px)`}}else L.classList.remove(c.hyphen,c.hyphenWrap),a.style.transform=`translateX(${i}px)`,l.style.transform=`translateX(${i}px)`,r.style.transform=`translateX(${m}px)`,h.style.transform=`translateX(${m}px)`}hideCoveredBoundingTickLabels(){let e=p(this.value),t=this.hasHistogram?this.precise||this.labelHandles:e&&this.precise,s=this.minHandleRef.value,a=this.maxHandleRef.value,n=this.minTickLabelRef.value,l=this.maxTickLabelRef.value,i=new Set;t&&a&&n&&l&&((s&&this.isMinTickLabelObscured(n,s)||this.isMinTickLabelObscured(n,a))&&i.add(this.min),(s&&this.isMaxTickLabelObscured(l,s)||(!s||this.hasHistogram)&&this.isMaxTickLabelObscured(l,a))&&i.add(this.max)),n&&l&&(n.classList.toggle(c.tickLabelCovered,i.has(this.min)),l.classList.toggle(c.tickLabelCovered,i.has(this.max))),P(this.coveredTickLabels,i)||(this.coveredTickLabels=i,this.tickLabelLayout&&(this.tickLabelLayout.visibleValues=void 0))}scheduleTickLabelLayout(){!this.isConnected||!this.labelTicks||!this.ticks||this.tickLabelLayoutFrame!==void 0||(this.tickLabelLayoutFrame=requestAnimationFrame(()=>{this.tickLabelLayoutFrame=void 0,this.updateTickLabelVisibility()}))}updateTickLabelVisibility(){let e=this.trackRef.value;if(!this.isConnected||!this.labelTicks||!this.ticks||!e)return;if(!this.tickLabelLayout){let a=e.getBoundingClientRect();if(!a.width)return;let n=document.createRange(),l=[],i=this.shouldMirror();for(let[r,o]of this.tickLabelRefs){let h=o.value;if(!h)continue;if(!h.textContent?.trim()){l.push({element:h});continue}n.selectNodeContents(h);let m=n.getBoundingClientRect();l.push({element:h,measurement:{value:r,position:this.max===this.min?0:(r-this.min)/(this.max-this.min),left:i?a.right-m.right:m.left-a.left,right:i?a.right-m.left:m.right-a.left,edge:r===this.min?"min":r===this.max?"max":void 0}})}this.tickLabelLayout={direction:this.direction,labels:l}}if(this.hideCoveredBoundingTickLabels(),this.tickLabelLayout.visibleValues)return;let{labels:t}=this.tickLabelLayout,s=ue(t.flatMap(({measurement:a})=>a&&!this.coveredTickLabels.has(a.value)?[a]:[]));for(let{element:a,measurement:n}of t){let l=!!n&&s.has(n.value);a.classList.contains(c.tickLabelVisible)!==l&&a.classList.toggle(c.tickLabelVisible,l)}this.tickLabelLayout.visibleValues=s}getHostOffset(e,t){let{left:s,right:a}=this.el.getBoundingClientRect();return e<s?s-e:t>a?-(t-a):0}getRangeLabelOverlap(e,t){let s=e.getBoundingClientRect(),a=t.getBoundingClientRect(),n=this.getFontSizeForElement(e),l=s.right+n-a.left;return Math.max(l,0)}isMinTickLabelObscured(e,t){let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();return S(s,a)}isMaxTickLabelObscured(e,t){let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();return S(s,a)}internalLabelFormatter(e,t){let s=this.labelFormatter;if(!s)return this.formatValue(e);let a=s(e,t,this.formatValue);return a??this.formatValue(e)}render(){let e=this.el.id||this.guid,t=p(this.value)?this.maxValue:this.value,s=this.minValue||this.min,a=this.shouldUseMinValue(),n=this.getUnitInterval(a?this.minValue:s)*100,l=this.getUnitInterval(t)*100,i=this.shouldMirror(),r=p(this.value),o=Y(this),h=r&&!!o,m=this.buildThumbType("max"),f=this.renderThumb({type:m,thumbPlacement:m.includes("histogram")?"below":"above",labelFallback:o,maxInterval:l,minInterval:n,mirror:i}),g=this.buildThumbType("min"),L=r?this.renderThumb({type:g,thumbPlacement:g.includes("histogram")||g.includes("precise")?"below":"above",labelFallback:o,maxInterval:l,minInterval:n,mirror:i}):null,u=r?"start":this.fillPlacement,d=u==="none"?{left:"unset",right:"unset"}:u==="end"?{left:`${i?n:l}%`,right:`${i?l:n}%`}:{left:`${i?100-l:n}%`,right:`${i?n:100-l}%`};return O(this.el,"id",e),this.interactiveContainer({disabled:this.disabled,children:V`${this.labelText&&Z({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${F.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${o} .ariaRequired=${this.required} class=${x({[c.container]:!0,[c.containerRange]:r,[c.scale(this.scale)]:!0})} .role=${h?"group":void 0}>${this.renderGraph()}<div class=${x(c.track)} ${T(this.trackRef)}><div class=${x(c.trackRange)} @pointerdown=${this.onTrackPointerDown} style=${M(d)}></div><div class=${x(c.ticks)}>${this.tickValues.map(b=>{let v=`${this.getUnitInterval(b)*100}%`,R=b===this.min||b===this.max,_=!1;if(u==="start"||u==="end")if(a)_=b>=this.minValue&&b<=this.maxValue;else{let ne=u==="start"?s:t,re=u==="start"?t:this.max;_=b>=ne&&b<=re}return V`<span class=${x({[c.tick]:!0,[c.tickActive]:_,[c.tickEndAligned]:i!==(this.direction==="rtl")})} style=${M({left:i?"":v,right:i?v:""})}>${!R&&this.renderTickLabel(b)||""}</span>${R&&this.renderTickLabel(b)||""}`})}</div></div><div class=${x(c.thumbContainer)}>${L}${f}</div></div>${this.validationMessage&&this.status==="invalid"?ee({icon:this.validationIcon,id:F.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderThumb({type:e,mirror:t,thumbPlacement:s,minInterval:a,maxInterval:n,labelFallback:l}){let i=e.includes("labeled"),r=e.includes("precise"),o=e.includes("min"),h=p(this.value),m=o?this.minValue:h?this.maxValue:this.value,f=o?"minValue":h?"maxValue":"value",g=o?this.minLabel||l:h?this.maxLabel||l:this.minLabel||l,L=o?this.minValue:m,u=f==="minValue"?this.internalLabelFormatter(this.minValue,"min"):f==="maxValue"?this.internalLabelFormatter(this.maxValue,"max"):this.internalLabelFormatter(m,"value"),d=o?{left:`${t?100-a:a}%`}:{right:`${t?n:100-n}%`},b=`${c.handleLabel} ${o?c.handleLabelMinValue:c.handleLabelValue}`,v=o?this.minValueLabelRefs:this.maxValueLabelRefs,_=[...i?[V`<span aria-hidden=true class=${x(b)} ${T(v.label)}>${u}</span>`,V`<span aria-hidden=true class=${`${b} ${c.static}`} ${T(v.static)}>${u}</span>`,V`<span aria-hidden=true class=${`${b} ${c.transformed}`} ${T(v.transformed)}>${u}</span>`]:[],V`<div class=${x(c.handle)}></div>`,r&&V`<div class=${x(c.handleExtension)}></div>`||""];return s==="below"&&_.reverse(),U(e,V`<div .ariaLabel=${g} aria-orientation=horizontal .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${L} class=${x({[c.thumb]:!0,[c.thumbValue]:!o,[c.thumbActive]:this.lastDragProp!=="minMaxValue"&&this.dragProp===f,[c.thumbPrecise]:r,[c.thumbMinValue]:o})} data-value-prop=${f??H} @blur=${this.onThumbBlur} @focus=${this.onThumbFocus} @pointerdown=${this.onThumbPointerDown} role=slider style=${M(d)} tabindex=0 ${T(o?this.minHandleRef:this.maxHandleRef)}>${_}</div>`)}renderGraph(){return this.histogram?V`<calcite-graph class=${x(c.graph)} .colorStops=${this.histogramStops} .data=${this.histogram} .highlightMax=${p(this.value)?this.maxValue:this.value} .highlightMin=${p(this.value)?this.minValue:this.min} .max=${this.max} .min=${this.min}></calcite-graph>`:null}renderTickLabel(e){let{hasHistogram:t,labelHandles:s,labelTicks:a,max:n,min:l,precise:i,value:r}=this,o=p(r),h=e===l,m=e===n,f=h||m,g=h!==this.shouldMirror();if(!(a&&(!t&&(f||!i||!o)||t&&(f||!i&&!s))))return null;let u={[c.tickLabel]:!0,[c.tickMin]:h,[c.tickMax]:m,[c.tickLabelCovered]:this.coveredTickLabels.has(e),[c.tickLabelLeft]:f&&g,[c.tickLabelRight]:f&&!g},d=this.internalLabelFormatter(e,"tick");this.tickLabelText.get(e)!==d&&(this.tickLabelText.set(e,d),this.tickLabelLayout=void 0);let b=this.tickLabelRefs.get(e);return b||(b=h?this.minTickLabelRef:m?this.maxTickLabelRef:k(),this.tickLabelRefs.set(e,b)),V`<span class=${x(u)} data-tick=${e??H} ${T(b)}>${d}</span>`}};I("calcite-slider",B);export{B as Slider};
|
|
2
|
+
import{a as ie,b as D}from"./M7VG3ZLQ.js";import{a as ee}from"./7FBHH5E4.js";import{a as Z}from"./UOYYONEV.js";import{c as te}from"./GI6KFZMW.js";import{a as Y}from"./XN5GTOTE.js";import{a as ae}from"./VBKJL7VE.js";import{a as K}from"./SVWITGRF.js";import"./YYOLNZRT.js";import{b as P}from"./CSDY4NKB.js";import{a as N}from"./FDHY2TZA.js";import{a as W}from"./CASNTUXN.js";import{a as Q,k as C}from"./PRVIXJ7V.js";import{a as J}from"./JN6YLTUP.js";import{a as U}from"./LKN4LUNT.js";import{a as G}from"./6LHB5RGN.js";import{a as j}from"./72LA67LQ.js";import"./VMHJHFFS.js";import{e as q}from"./YE5HVMTC.js";import"./GBLGTHFD.js";import{D as w,u as S,v as $}from"./W77STZAT.js";import{E as k,F as T,G as A,H as x,I as M,K as O,L as X,T as I,g as E,h as V,l as H,p as z}from"./MPGHVV7O.js";var c={container:"container",containerRange:"container--range",graph:"graph",handle:"handle",handleExtension:"handle-extension",handleLabel:"handle__label",handleLabelMinValue:"handle__label--minValue",handleLabelValue:"handle__label--value",hyphen:"hyphen",hyphenWrap:"hyphen--wrap",static:"static",thumb:"thumb",thumbActive:"thumb--active",thumbContainer:"thumb-container",thumbMinValue:"thumb--minValue",thumbPrecise:"thumb--precise",thumbValue:"thumb--value",tick:"tick",tickActive:"tick--active",tickEndAligned:"tick--end-aligned",tickLabel:"tick__label",tickLabelCovered:"tick__label--covered",tickLabelLeft:"tick__label--left",tickLabelRight:"tick__label--right",tickLabelVisible:"tick__label--visible",tickMax:"tick__label--max",tickMin:"tick__label--min",ticks:"ticks",track:"track",trackRange:"track__range",transformed:"transformed",scale:y=>`scale--${y}`},oe="calcite-slider",F={validationMessage:"validationMessage",host:y=>`${oe}-${y}`},ce=250,he=E`@charset "UTF-8";:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{--calcite-slider-handle-size: var(--calcite-size-4xs);--calcite-slider-handle-extension-height: .4rem;--calcite-slider-container-font-size: var(--calcite-font-size-relative-xs)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size: var(--calcite-size-2xs);--calcite-slider-handle-extension-height: .5rem;--calcite-slider-container-font-size: var(--calcite-font-size-relative-sm)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size: 1rem;--calcite-slider-handle-extension-height: .65rem;--calcite-slider-container-font-size: var(--calcite-font-size-relative-base)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-slider-text-color, var(--calcite-color-text-2));font-size:var(--calcite-slider-container-font-size)}:host{display:block;inline-size:100%;min-inline-size:0}:host .validation-container{padding-block-start:0!important}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * .5);padding-block:calc(var(--calcite-slider-handle-size) * .5);margin-block:calc(var(--calcite-slider-handle-size) * .5);margin-inline:0;--calcite-slider-full-handle-height: calc( var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height) );touch-action:none;-webkit-user-select:none;user-select:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-color-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.375rem}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.5rem}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.55rem}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset: calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset: calc(var(--calcite-slider-handle-size) * .5);outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md);font-family:inherit;position:absolute;margin:var(--calcite-space-none);display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:var(--calcite-color-transparent);padding:var(--calcite-space-none);transform:translate(var(--calcite-slider-thumb-x-offset),var(--calcite-slider-thumb-y-offset))}.thumb .handle__label{white-space:nowrap}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:var(--calcite-space-none);opacity:0}.thumb .handle__label.hyphen:after{content:"—";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{outline-color:var(--calcite-color-transparent);box-sizing:border-box;border-radius:var(--calcite-corner-radius-pill);background-color:var(--calcite-slider-handle-fill-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease,background-color var(--calcite-internal-animation-timing-medium) ease,box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-slider-handle-extension-color, var(--calcite-color-text-3))}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb:focus .handle{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}.thumb:focus .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1),var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset: -.125rem}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset: 50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.4375rem}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.875rem}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -2rem}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{margin-block-start:.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{margin-block-end:.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset: -2.075rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset: -2.75rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset: -3.0625rem}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand));box-shadow:0 0 8px #00000029}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.track{position:relative;block-size:.125rem;background-color:var(--calcite-slider-track-color, var(--calcite-color-border-2));transition:all var(--calcite-internal-animation-timing-medium) ease-in;border-radius:var(--calcite-corner-radius)}.track__range{position:absolute;inset-block-start:var(--calcite-space-none);block-size:.125rem;background-color:var(--calcite-slider-track-fill-color, var(--calcite-color-brand));border-radius:var(--calcite-corner-radius)}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * .5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media(forced-colors:active){.thumb{outline-width:0;outline-offset:0}.handle{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md)}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:var(--calcite-space-2xs);inline-size:.125rem;border-width:var(--calcite-border-width-sm);border-style:solid;background-color:var(--calcite-slider-tick-color, var(--calcite-color-border-input));border-color:var(--calcite-slider-tick-border-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));inset-block-start:-2px;pointer-events:none;margin-inline-start:calc(var(--calcite-space-2xs) * -.5)}.tick--end-aligned{margin-inline-start:var(--calcite-space-none);margin-inline-end:calc(var(--calcite-space-2xs) * -.5)}.tick--active{background-color:var(--calcite-slider-tick-selected-color, var(--calcite-color-brand))}.tick__label{pointer-events:none;margin-block-start:var(--calcite-space-md-plus);display:flex;justify-content:center;visibility:hidden}.tick__label--visible{visibility:visible}.tick__label--covered{opacity:0}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--min,.tick__label--max{position:absolute;inset-block-start:calc(var(--calcite-space-px) * -1);inline-size:max-content}.tick__label--left{transform:translate(-.25ch);left:0}.tick__label--right{transform:translate(.25ch);right:0}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{color:var(--calcite-color-text-3);font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal))}.graph{color:var(--calcite-slider-graph-color, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)));block-size:48px}:host([label-ticks][ticks]) .container{padding-block-end:calc(var(--calcite-space-md-plus) + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{padding-block-end:calc(var(--calcite-slider-handle-size) * .5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-theme-space-base, var(--calcite-spacing-base))}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-relative-md)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}`;function ue(y,e=!1){let t=y.find(i=>i.edge==="min"),s=y.find(i=>i.edge==="max"),a=[];t&&a.push(t),s&&(!t||!$(t,s)||e)&&a.push(s);let n=y.filter(i=>!i.edge&&!a.some(r=>$(i,r))).sort((i,r)=>i.right-r.right||i.value-r.value),l=[];for(let i of n){let r=l.at(-1);(!r||!$(r,i))&&l.push(i)}if(l.length===n.length)return new Set([...a,...l].map(i=>i.value));l.push(...a),l.sort((i,r)=>i.value-r.value);for(let i=0;i<l.length;i++){let r=l[i];if(r.edge)continue;let o=l[i-1],h=l[i+1],m=o?.position??0,f=h?.position??1,g=u=>(u.position-m)**2+(f-u.position)**2,L=r;for(let u of n){if(u.position<=m||u.position>=f||o&&$(o,u)||h&&$(h,u))continue;let d=g(u),b=g(L);(d<b||d===b&&u.value<L.value)&&(L=u)}l[i]=L}return new Set(l.map(i=>i.value))}function p(y){return Array.isArray(y)}var le=0,de="\u200E",B=class extends A{constructor(){super(),this.direction=q(),this.dragEnd=e=>{this.disabled||(this.removeDragListeners(),this.focusActiveHandle(e.clientX),this.dragProp&&!P(this.lastDragPropValue,this.getDragPropValue(this.dragProp))&&this.emitChange(),this.dragProp=void 0,this.lastDragPropValue=void 0,this.minValueDragRange=void 0,this.maxValueDragRange=void 0,this.minMaxValueRange=void 0)},this.dragUpdate=e=>{if(!(this.disabled||!this.trackRef.value)&&(e.preventDefault(),this.dragProp)){let t=this.mapToRange(e.clientX||e.pageX);if(p(this.value)&&this.dragProp==="minMaxValue")if(this.minValueDragRange&&this.maxValueDragRange&&this.minMaxValueRange){let s=t-this.minValueDragRange,a=t+this.maxValueDragRange;a<=this.max&&s>=this.min&&a-s===this.minMaxValueRange&&this.setValue({minValue:this.clamp(s,"minValue"),maxValue:this.clamp(a,"maxValue")})}else this.minValueDragRange=t-this.minValue,this.maxValueDragRange=this.maxValue-t,this.minMaxValueRange=this.maxValue-this.minValue;else if(p(this.value)&&this.previousEmittedValue!==void 0&&p(this.previousEmittedValue)&&this.dragProp==="maxValue"){let[s,a]=this.previousEmittedValue;s===a&&t<s?(this.dragProp="minValue",this.minHandleRef.value.focus()):this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}else this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}},this.formatValue=e=>{C.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};let t=C.localize(e.toString(),!0);return this.direction==="rtl"&&t.startsWith(C.minusSign)?`${de}${t}`:t},this.formSupport=te({inputType:"range"})(this),this.guid=F.host(W()),this.maxHandleRef=k(),this.maxValueLabelRefs={label:k(),static:k(),transformed:k()},this.maxTickLabelRef=k(),this.messages=G({blocking:!0}),this.minHandleRef=k(),this.minValueLabelRefs={label:k(),static:k(),transformed:k()},this.minTickLabelRef=k(),this.pointerUpDragEnd=e=>{this.disabled||!w(e)||this.dragEnd(e)},this.coveredTickLabels=new Set,this.tickLabelRefs=new Map,this.tickLabelText=new Map,this.invalidateTickLabelLayout=()=>{this.tickLabelLayout=void 0,this.scheduleTickLabelLayout()},this.tickLabelResizeObserver=N("resize",this.invalidateTickLabelLayout),this.trackRef=k(),this.focusSetter=j()(this).setFocus,this.interactiveContainer=K(this),this._value=le,this.activeProp="value",this.tickValues=[],this.disabled=!1,this.fillPlacement="start",this.groupSeparator=!1,this.hasHistogram=!1,this.labelHandles=!1,this.labelTicks=!1,this.max=100,this.min=0,this.mirrored=!1,this.precise=!1,this.required=!1,this.scale="m",this.snap=!1,this.status="idle",this.step=1,this.calciteSliderChange=z({cancelable:!1}),this.calciteSliderInput=z({cancelable:!1}),ae(this),this.listen("pointerdown",this.pointerDownHandler),this.listen("keydown",this.handleKeyDown),this.listen("touchstart",this.handleTouchStart)}static{this.properties={activeProp:[16,{},{state:!0}],maxValueDragRange:[16,{},{state:!0}],minMaxValueRange:[16,{},{state:!0}],minValueDragRange:[16,{},{state:!0}],tickValues:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillPlacement:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],hasHistogram:[7,{},{reflect:!0,type:Boolean}],histogram:[0,{},{attribute:!1}],histogramStops:[0,{},{attribute:!1}],label:1,labelFormatter:[0,{},{attribute:!1}],labelHandles:[7,{},{reflect:!0,type:Boolean}],labelTicks:[7,{},{reflect:!0,type:Boolean}],max:[11,{},{reflect:!0,type:Number}],maxLabel:1,maxValue:[9,{},{type:Number}],min:[11,{},{reflect:!0,type:Number}],minLabel:1,labelText:1,messageOverrides:[0,{},{attribute:!1}],minValue:[9,{},{type:Number}],mirrored:[7,{},{reflect:!0,type:Boolean}],name:[3,{},{reflect:!0}],numberingSystem:1,pageStep:[11,{},{reflect:!0,type:Number}],precise:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],snap:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],ticks:[11,{},{reflect:!0,type:Number}],validationIcon:[3,{converter:X},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:[11,{},{reflect:!0,type:Number}]}}static{this.formAssociated=!0}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=he}get value(){return this._value}set value(e){if(Array.isArray(e)){this._value=e;return}if(e!=null){this._value=Number(e);return}this._value=Array.isArray(this._value)?[this.minValue,this.maxValue]:le}async setFocus(e){return this.focusSetter(()=>this.minHandleRef.value||this.maxHandleRef.value,e)}connectedCallback(){super.connectedCallback(),this.setMinMaxFromValue(),this.setValueFromMinMax(),this.previousEmittedValue=this.value,this.tickLabelResizeObserver?.observe(this.el)}load(){this.setInitialValue()}willUpdate(e){e.has("histogram")&&(this.hasHistogram=!!this.histogram),(e.has("ticks")||e.has("min")||e.has("max"))&&(this.tickValues=this.generateTickValues(),this.tickLabelRefs.clear()),(e.has("ticks")||e.has("min")||e.has("max")||e.has("scale")||e.has("mirrored")||e.has("hasHistogram")||e.has("labelTicks")||e.has("labelHandles")||e.has("precise")||e.has("groupSeparator")||e.has("numberingSystem")||e.has("value")&&Array.isArray(e.get("value"))!==p(this.value))&&(this.tickLabelText.clear(),this.invalidateTickLabelLayout()),e.has("value")&&(this.hasUpdated||this.value!==0)&&this.setMinMaxFromValue(),(e.has("minValue")||e.has("maxValue"))&&this.setValueFromMinMax()}updated(){this.isConnected&&(this.labelHandles&&(this.adjustHostObscuredHandleLabel("value"),p(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideCoveredBoundingTickLabels(),this.tickLabelLayout&&this.tickLabelLayout.direction!==this.direction&&this.invalidateTickLabelLayout(),this.tickLabelLayout?.visibleValues||this.scheduleTickLabelLayout())}disconnectedCallback(){super.disconnectedCallback(),this.removeDragListeners(),this.tickLabelResizeObserver?.disconnect(),this.tickLabelLayoutFrame!==void 0&&(cancelAnimationFrame(this.tickLabelLayoutFrame),this.tickLabelLayoutFrame=void 0),this.tickLabelLayout=void 0}setInitialValue(){p(this.value)||(this.value=this.snap?this.getClosestStep(this.value):this.clamp(this.value))}handleKeyDown(e){let t=this.shouldMirror(),{activeProp:s,max:a,min:n,pageStep:l,step:i}=this,r=this[s],{key:o}=e;if(J(o)){e.preventDefault();return}let h=NaN;if(o==="ArrowUp"||o==="ArrowRight"?h=r+i*(t&&o==="ArrowRight"?-1:1):o==="ArrowDown"||o==="ArrowLeft"?h=r-i*(t&&o==="ArrowLeft"?-1:1):o==="PageUp"?l&&(h=r+l):o==="PageDown"?l&&(h=r-l):o==="Home"?h=n:o==="End"&&(h=a),isNaN(h))return;e.preventDefault();let m=Number(h.toFixed(D(i)));this.setValue({[s]:this.clamp(m,s)})}pointerDownHandler(e){if(this.disabled||!w(e))return;let t=e.clientX||e.pageX,s=this.mapToRange(t),a="value";p(this.value)&&(s>=this.minValue&&s<=this.maxValue&&this.lastDragProp==="minMaxValue"?a="minMaxValue":a=Math.abs(this.maxValue-s)<Math.abs(this.minValue-s)||s>=this.maxValue?"maxValue":"minValue"),this.lastDragPropValue=this.getDragPropValue(a),this.dragStart(a);let n=e.composedPath();[this.minHandleRef.value,this.maxHandleRef.value].some(i=>i&&n.includes(i))||this.setValue({[a]:this.clamp(s,a)}),this.focusActiveHandle(t)}handleTouchStart(e){e.preventDefault()}buildThumbType(e){let t=[e];return this.labelHandles&&t.push("labeled"),this.precise&&t.push("precise"),this.hasHistogram&&t.push("histogram"),t.join("-")}setValueFromMinMax(){let{minValue:e,maxValue:t}=this;typeof e=="number"&&typeof t=="number"&&(this.value=[e,t])}setMinMaxFromValue(){let{value:e}=this;p(e)&&(this.minValue=e[0],this.maxValue=e[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return p(this.value)?this.hasHistogram&&this.maxValue===0||!this.hasHistogram&&this.minValue===0:!1}getTickDensity(){let e=(this.max-this.min)/this.ticks/ce;return e<1?1:e}generateTickValues(){let e=this.ticks??0;if(e<=0)return[];let t=[this.min],s=this.getTickDensity(),a=e*s,n=this.min;for(;n<this.max;)n+=a,t.push(Math.min(n,this.max));return t.includes(this.max)||t.push(this.max),t}onThumbBlur(){this.activeProp=void 0}onThumbFocus(e){let t=e.currentTarget;this.activeProp=t.getAttribute("data-value-prop")}onThumbPointerDown(e){let t=e.currentTarget;this.pointerDownDragStart(e,t.getAttribute("data-value-prop"))}onTrackPointerDown(e){this.pointerDownDragStart(e,"minMaxValue")}pointerDownDragStart(e,t){w(e)&&this.dragStart(t)}dragStart(e){this.dragProp=e,this.lastDragProp=this.dragProp,this.activeProp=e,window.addEventListener("pointermove",this.dragUpdate),window.addEventListener("pointerup",this.pointerUpDragEnd),window.addEventListener("pointercancel",this.dragEnd)}getDragPropValue(e){return e==="minMaxValue"?this.value:this[e]}focusActiveHandle(e){this.dragProp==="minValue"?this.minHandleRef.value.focus():this.dragProp==="maxValue"||this.dragProp==="value"?this.maxHandleRef.value.focus():this.dragProp==="minMaxValue"&&this.getClosestHandle(e).focus()}emitChange(){this.calciteSliderChange.emit(),this.previousEmittedValue=this.value}removeDragListeners(){window.removeEventListener("pointermove",this.dragUpdate),window.removeEventListener("pointerup",this.pointerUpDragEnd),window.removeEventListener("pointercancel",this.dragEnd)}setValue(e){let t=!1;if(Object.keys(e).forEach(a=>{let n=e[a];n!==void 0&&(t||(t=this[a]!==n),this[a]=n)}),!t)return;(e.minValue||e.maxValue)&&this.setValueFromMinMax();let s=this.dragProp;this.calciteSliderInput.emit(),s||this.emitChange()}clamp(e,t){return e=ie(e,this.min,this.max),t==="maxValue"&&(e=Math.max(e,this.minValue)),t==="minValue"&&(e=Math.min(e,this.maxValue)),e}mapToRange(e){let t=this.max-this.min,{left:s,width:a}=this.trackRef.value.getBoundingClientRect()||{left:0,width:0},n=(e-s)/a,l=this.shouldMirror(),i=this.clamp(this.min+t*(l?1-n:n)),r=Number(i.toFixed(D(this.step)));return this.snap&&this.step?this.getClosestStep(r):r}getClosestStep(e){let{max:t,min:s,step:a}=this,n=new Q(`${Math.floor((e-s)/a)}`).multiply(`${a}`).add(`${s}`).toString(),l=this.clamp(Number(n));return l>t&&(l-=a),l}getClosestHandle(e){let t=this.minHandleRef.value,s=this.maxHandleRef.value;return this.getDistanceX(s,e)>this.getDistanceX(t,e)?t:s}getDistanceX(e,t){return Math.abs(e.getBoundingClientRect().left-t)}getFontSizeForElement(e){return Number(window.getComputedStyle(e).getPropertyValue("font-size").match(/\d+/)[0])}getUnitInterval(e){e=this.clamp(e);let t=this.max-this.min;return(e-this.min)/t}adjustHostObscuredHandleLabel(e){let t=e==="minValue"?this.minValueLabelRefs:this.maxValueLabelRefs,s=t.label.value,a=t.static.value,n=t.transformed.value,l=a.getBoundingClientRect(),i=this.getHostOffset(l.left,l.right);s.style.transform=`translateX(${i}px)`,n.style.transform=`translateX(${i}px)`}hyphenateCollidingRangeHandleLabels(){let e=this.shouldMirror(),t=e?this.maxValueLabelRefs:this.minValueLabelRefs,s=e?this.minValueLabelRefs:this.maxValueLabelRefs,a=t.label.value,n=t.static.value,l=t.transformed.value,i=this.getHostOffset(n.getBoundingClientRect().left,n.getBoundingClientRect().right),r=s.label.value,o=s.static.value,h=s.transformed.value,m=this.getHostOffset(o.getBoundingClientRect().left,o.getBoundingClientRect().right),f=this.getFontSizeForElement(a),g=this.getRangeLabelOverlap(l,h),L=a,u=f/2;if(g>0){if(L.classList.add(c.hyphen,c.hyphenWrap),m===0&&i===0){let d=g/2-u;d=Math.sign(d)===-1?Math.abs(d):-d;let b=this.getHostOffset(l.getBoundingClientRect().left+d-u,l.getBoundingClientRect().right+d-u),v=g/2,R=this.getHostOffset(h.getBoundingClientRect().left+v,h.getBoundingClientRect().right+v);b!==0&&(d+=b,v+=b),R!==0&&(d+=R,v+=R),a.style.transform=`translateX(${d}px)`,l.style.transform=`translateX(${d-u}px)`,r.style.transform=`translateX(${v}px)`,h.style.transform=`translateX(${v}px)`}else if(i>0||m>0)a.style.transform=`translateX(${i+u}px)`,r.style.transform=`translateX(${g+m}px)`,h.style.transform=`translateX(${g+m}px)`;else if(i<0||m<0){let d=Math.abs(i)+g-u;d=Math.sign(d)===-1?Math.abs(d):-d,a.style.transform=`translateX(${d}px)`,l.style.transform=`translateX(${d-u}px)`}}else L.classList.remove(c.hyphen,c.hyphenWrap),a.style.transform=`translateX(${i}px)`,l.style.transform=`translateX(${i}px)`,r.style.transform=`translateX(${m}px)`,h.style.transform=`translateX(${m}px)`}hideCoveredBoundingTickLabels(){let e=p(this.value),t=this.hasHistogram?this.precise||this.labelHandles:e&&this.precise,s=this.minHandleRef.value,a=this.maxHandleRef.value,n=this.minTickLabelRef.value,l=this.maxTickLabelRef.value,i=new Set;t&&a&&n&&l&&((s&&this.isMinTickLabelObscured(n,s)||this.isMinTickLabelObscured(n,a))&&i.add(this.min),(s&&this.isMaxTickLabelObscured(l,s)||(!s||this.hasHistogram)&&this.isMaxTickLabelObscured(l,a))&&i.add(this.max)),n&&l&&(n.classList.toggle(c.tickLabelCovered,i.has(this.min)),l.classList.toggle(c.tickLabelCovered,i.has(this.max))),P(this.coveredTickLabels,i)||(this.coveredTickLabels=i,this.tickLabelLayout&&(this.tickLabelLayout.visibleValues=void 0))}scheduleTickLabelLayout(){!this.isConnected||!this.labelTicks||!this.ticks||this.tickLabelLayoutFrame!==void 0||(this.tickLabelLayoutFrame=requestAnimationFrame(()=>{this.tickLabelLayoutFrame=void 0,this.updateTickLabelVisibility()}))}updateTickLabelVisibility(){let e=this.trackRef.value;if(!this.isConnected||!this.labelTicks||!this.ticks||!e)return;if(!this.tickLabelLayout){let a=e.getBoundingClientRect();if(!a.width)return;let n=document.createRange(),l=[],i=this.shouldMirror();for(let[r,o]of this.tickLabelRefs){let h=o.value;if(!h)continue;if(!h.textContent?.trim()){l.push({element:h});continue}n.selectNodeContents(h);let m=n.getBoundingClientRect();l.push({element:h,measurement:{value:r,position:this.max===this.min?0:(r-this.min)/(this.max-this.min),left:i?a.right-m.right:m.left-a.left,right:i?a.right-m.left:m.right-a.left,edge:r===this.min?"min":r===this.max?"max":void 0}})}this.tickLabelLayout={direction:this.direction,labels:l}}if(this.hideCoveredBoundingTickLabels(),this.tickLabelLayout.visibleValues)return;let{labels:t}=this.tickLabelLayout,s=ue(t.flatMap(({measurement:a})=>a&&!this.coveredTickLabels.has(a.value)?[a]:[]));for(let{element:a,measurement:n}of t){let l=!!n&&s.has(n.value);a.classList.contains(c.tickLabelVisible)!==l&&a.classList.toggle(c.tickLabelVisible,l)}this.tickLabelLayout.visibleValues=s}getHostOffset(e,t){let{left:s,right:a}=this.el.getBoundingClientRect();return e<s?s-e:t>a?-(t-a):0}getRangeLabelOverlap(e,t){let s=e.getBoundingClientRect(),a=t.getBoundingClientRect(),n=this.getFontSizeForElement(e),l=s.right+n-a.left;return Math.max(l,0)}isMinTickLabelObscured(e,t){let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();return S(s,a)}isMaxTickLabelObscured(e,t){let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();return S(s,a)}internalLabelFormatter(e,t){let s=this.labelFormatter;if(!s)return this.formatValue(e);let a=s(e,t,this.formatValue);return a??this.formatValue(e)}render(){let e=this.el.id||this.guid,t=p(this.value)?this.maxValue:this.value,s=this.minValue||this.min,a=this.shouldUseMinValue(),n=this.getUnitInterval(a?this.minValue:s)*100,l=this.getUnitInterval(t)*100,i=this.shouldMirror(),r=p(this.value),o=Y(this),h=r&&!!o,m=this.buildThumbType("max"),f=this.renderThumb({type:m,thumbPlacement:m.includes("histogram")?"below":"above",labelFallback:o,maxInterval:l,minInterval:n,mirror:i}),g=this.buildThumbType("min"),L=r?this.renderThumb({type:g,thumbPlacement:g.includes("histogram")||g.includes("precise")?"below":"above",labelFallback:o,maxInterval:l,minInterval:n,mirror:i}):null,u=r?"start":this.fillPlacement,d=u==="none"?{left:"unset",right:"unset"}:u==="end"?{left:`${i?n:l}%`,right:`${i?l:n}%`}:{left:`${i?100-l:n}%`,right:`${i?n:100-l}%`};return O(this.el,"id",e),this.interactiveContainer({disabled:this.disabled,children:V`${this.labelText&&Z({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${F.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${o} .ariaRequired=${this.required} class=${x({[c.container]:!0,[c.containerRange]:r,[c.scale(this.scale)]:!0})} .role=${h?"group":void 0}>${this.renderGraph()}<div class=${x(c.track)} ${T(this.trackRef)}><div class=${x(c.trackRange)} @pointerdown=${this.onTrackPointerDown} style=${M(d)}></div><div class=${x(c.ticks)}>${this.tickValues.map(b=>{let v=`${this.getUnitInterval(b)*100}%`,R=b===this.min||b===this.max,_=!1;if(u==="start"||u==="end")if(a)_=b>=this.minValue&&b<=this.maxValue;else{let ne=u==="start"?s:t,re=u==="start"?t:this.max;_=b>=ne&&b<=re}return V`<span class=${x({[c.tick]:!0,[c.tickActive]:_,[c.tickEndAligned]:i!==(this.direction==="rtl")})} style=${M({left:i?"":v,right:i?v:""})}>${!R&&this.renderTickLabel(b)||""}</span>${R&&this.renderTickLabel(b)||""}`})}</div></div><div class=${x(c.thumbContainer)}>${L}${f}</div></div>${this.validationMessage&&this.status==="invalid"?ee({icon:this.validationIcon,id:F.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderThumb({type:e,mirror:t,thumbPlacement:s,minInterval:a,maxInterval:n,labelFallback:l}){let i=e.includes("labeled"),r=e.includes("precise"),o=e.includes("min"),h=p(this.value),m=o?this.minValue:h?this.maxValue:this.value,f=o?"minValue":h?"maxValue":"value",g=o?this.minLabel||l:h?this.maxLabel||l:this.minLabel||l,L=o?this.minValue:m,u=f==="minValue"?this.internalLabelFormatter(this.minValue,"min"):f==="maxValue"?this.internalLabelFormatter(this.maxValue,"max"):this.internalLabelFormatter(m,"value"),d=o?{left:`${t?100-a:a}%`}:{right:`${t?n:100-n}%`},b=`${c.handleLabel} ${o?c.handleLabelMinValue:c.handleLabelValue}`,v=o?this.minValueLabelRefs:this.maxValueLabelRefs,_=[...i?[V`<span aria-hidden=true class=${x(b)} ${T(v.label)}>${u}</span>`,V`<span aria-hidden=true class=${`${b} ${c.static}`} ${T(v.static)}>${u}</span>`,V`<span aria-hidden=true class=${`${b} ${c.transformed}`} ${T(v.transformed)}>${u}</span>`]:[],V`<div class=${x(c.handle)}></div>`,r&&V`<div class=${x(c.handleExtension)}></div>`||""];return s==="below"&&_.reverse(),U(e,V`<div .ariaLabel=${g} aria-orientation=horizontal .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${L} class=${x({[c.thumb]:!0,[c.thumbValue]:!o,[c.thumbActive]:this.lastDragProp!=="minMaxValue"&&this.dragProp===f,[c.thumbPrecise]:r,[c.thumbMinValue]:o})} data-value-prop=${f??H} @blur=${this.onThumbBlur} @focus=${this.onThumbFocus} @pointerdown=${this.onThumbPointerDown} role=slider style=${M(d)} tabindex=0 ${T(o?this.minHandleRef:this.maxHandleRef)}>${_}</div>`)}renderGraph(){return this.histogram?V`<calcite-graph class=${x(c.graph)} .colorStops=${this.histogramStops} .data=${this.histogram} .highlightMax=${p(this.value)?this.maxValue:this.value} .highlightMin=${p(this.value)?this.minValue:this.min} .max=${this.max} .min=${this.min}></calcite-graph>`:null}renderTickLabel(e){let{hasHistogram:t,labelHandles:s,labelTicks:a,max:n,min:l,precise:i,value:r}=this,o=p(r),h=e===l,m=e===n,f=h||m,g=h!==this.shouldMirror();if(!(a&&(!t&&(f||!i||!o)||t&&(f||!i&&!s))))return null;let u={[c.tickLabel]:!0,[c.tickMin]:h,[c.tickMax]:m,[c.tickLabelCovered]:this.coveredTickLabels.has(e),[c.tickLabelLeft]:f&&g,[c.tickLabelRight]:f&&!g},d=this.internalLabelFormatter(e,"tick");this.tickLabelText.get(e)!==d&&(this.tickLabelText.set(e,d),this.tickLabelLayout=void 0);let b=this.tickLabelRefs.get(e);return b||(b=h?this.minTickLabelRef:m?this.maxTickLabelRef:k(),this.tickLabelRefs.set(e,b)),V`<span class=${x(u)} data-tick=${e??H} ${T(b)}>${d}</span>`}};I("calcite-slider",B);export{B as Slider};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{b as g}from"./JN6YLTUP.js";import{a as f}from"./
|
|
2
|
+
import{b as g}from"./JN6YLTUP.js";import{a as f}from"./GBLGTHFD.js";var A=new RegExp("\\.(0+)?$"),C=new RegExp("0+$"),p=class t{static{this.DECIMALS=100}static{this.ROUNDED=!0}static{this.SHIFT=BigInt("1"+"0".repeat(this.DECIMALS))}constructor(e){if(e instanceof t)return e;let[n,s]=R(e).split(".").concat("");this.value=BigInt(n+s.padEnd(t.DECIMALS,"0").slice(0,t.DECIMALS))+BigInt(t.ROUNDED&&s[t.DECIMALS]>="5"),this.isNegative=e.charAt(0)==="-"}static{this._divRound=(e,n)=>t.fromBigInt(e/n+(t.ROUNDED?e*BigInt(2)/n%BigInt(2):BigInt(0)))}static{this.fromBigInt=e=>Object.assign(Object.create(t.prototype),{value:e,isNegative:e<BigInt(0)})}getIntegersAndDecimals(){let e=this.value.toString().replace("-","").padStart(t.DECIMALS+1,"0"),n=e.slice(0,-t.DECIMALS),s=e.slice(-t.DECIMALS).replace(C,"");return{integers:n,decimals:s}}toString(){let{integers:e,decimals:n}=this.getIntegersAndDecimals();return`${this.isNegative?"-":""}${e}${n.length?"."+n:""}`}formatToParts(e,n=!1){let{integers:s,decimals:r}=this.getIntegersAndDecimals(),i=I(e,s,this.isNegative,n);return r.length&&(i.push({type:"decimal",value:e.decimal}),r.split("").forEach(a=>i.push({type:"fraction",value:a}))),i}format(e,n=!1){let{integers:s,decimals:r}=this.getIntegersAndDecimals(),i=I(e,s,this.isNegative,n).map(m=>m.value).join(""),a=r.length?`${e.decimal}${r.split("").map(m=>e.numberFormatter.format(Number(m))).join("")}`:"";return`${i}${a}`}add(e){return t.fromBigInt(this.value+new t(e).value)}subtract(e){return t.fromBigInt(this.value-new t(e).value)}multiply(e){return t._divRound(this.value*new t(e).value,t.SHIFT)}divide(e){return t._divRound(this.value*t.SHIFT,new t(e).value)}};function I(t,e,n,s){let r=t.numberFormatter.formatToParts(s&&n&&e==="0"?-0:BigInt(`${s&&n?"-":""}${e}`));for(let i of r)i.type==="group"&&(i.value=t.group);return n&&!s&&r.unshift({type:"minusSign",value:t.minusSign}),r}function D(t){return!(!t||isNaN(Number(t)))}function J(t){return!t||!_(t)?"":h(t,e=>{let n=!1,s=e.split("").filter((r,i)=>r.match(/\./g)&&!n?(n=!0,!0):r.match(/-/g)&&i===0?!0:g.includes(r)).join("");return D(s)?new p(s).toString():""})}var v=/^([-0])0+(?=\d)/,x=/(?!^\.)\.$/,L=/(?!^-)-/g,T=/^-\b0\b\.?0*$/,j=/0*$/,B=new Set(["e","E","-",",",".",...g]),K=t=>{let e=Array.from(t).filter(n=>B.has(n)).join("");return h(e,n=>{let s=n.replace(L,"").replace(x,"").replace(v,"$1");return D(s)?T.test(s)?s:M(s):n})};function M(t){let e=t.split(".")[1],n=new p(t).toString(),[s,r]=n.split(".");return e&&r!==e?`${s}.${e}`:n}function h(t,e){if(!t)return t;let n=t.toLowerCase().indexOf("e")+1;return n?t.replace(/[eE]*$/g,"").substring(0,n).concat(t.slice(n).replace(/[eE]/g,"")).split(/[eE]/).map((s,r)=>e(r===1?s.replace(/\./g,""):s)).join("e").replace(/^e/,"1e"):e(t)}function R(t){let e=t.split(/[eE]/);if(e.length===1)return t;let n=+t;if(Number.isSafeInteger(n))return`${n}`;let s=t.charAt(0)==="-",r=+e[1],i=e[0].split("."),a=(s?i[0].substring(1):i[0])||"",m=i[1]||"",E=(c,o)=>{let l=Math.abs(o)-c.length,d=l>0?`${"0".repeat(l)}${c}`:c;return`${d.slice(0,o)}.${d.slice(o)}`},N=(c,o)=>{let l=o>c.length?`${c}${"0".repeat(o-c.length)}`:c;return`${l.slice(0,o)}.${l.slice(o)}`},S=r>0?`${a}${N(m,r)}`:`${E(a,r)}${m}`;return`${s?"-":""}${S.charAt(0)==="."?"0":""}${S.replace(A,"").replace(v,"")}`}function _(t){return g.some(e=>t.includes(e))}function W(t,e,n){let s=e.split(".")[1];if(s){let r=s.match(j)?.[0];if(r&&n.delocalize(t).length!==e.length&&s.indexOf("e")===-1){let i=n.decimal;return t=t.includes(i)?t:`${t}${i}`,t.padEnd(t.length+r.length,n.localize("0"))}}return t}var X=new Map(Object.entries({bg:{am:"\u043F\u0440.\u043E\u0431.",pm:"\u0441\u043B.\u043E\u0431."},bs:{am:"prijepodne",pm:"popodne"},ca:{am:"a.\xA0m.",pm:"p.\xA0m."},cs:{am:"dop.",pm:"odp."},es:{am:"a.\xA0m.",pm:"p.\xA0m."},"es-mx":{am:"a.m.",pm:"p.m."},"es-MX":{am:"a.m.",pm:"p.m."},fi:{am:"ap.",pm:"ip."},he:{am:"\u05DC\u05E4\u05E0\u05D4\u05F4\u05E6",pm:"\u05D0\u05D7\u05D4\u05F4\u05E6"},hu:{am:"de. ",pm:"du."},lt:{am:"prie\u0161piet",pm:"popiet"},lv:{am:"priek\u0161pusdien\u0101",pm:"p\u0113cpusdien\u0101"},mk:{am:"\u043F\u0440\u0435\u0442\u043F\u043B.",pm:"\u043F\u043E\u043F\u043B."},no:{am:"a.m.",pm:"p.m."},nl:{am:"a.m.",pm:"p.m."},"pt-pt":{am:"da manh\xE3",pm:"da tarde"},"pt-PT":{am:"da manh\xE3",pm:"da tarde"},ro:{am:"a.m.",pm:"p.m."},sl:{am:"dop.",pm:"pop."},sv:{am:"fm",pm:"em"},th:{am:"\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",pm:"\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07"},tr:{am:"\xD6\xD6",pm:"\xD6S"},uk:{am:"\u0434\u043F",pm:"\u043F\u043F"},vi:{am:"SA",pm:"CH"}})),F=["arab","arabext","latn"],O=t=>!!(F&&F.includes(t)),b=new Intl.NumberFormat().resolvedOptions().numberingSystem,P=/[\u061C\u200E\u200F]/g,w=b==="arab"||!O(b)?"latn":b,H=t=>O(t)?t:w;function Z(t){switch(t){case"it-CH":return"de-CH";case"bs":return"sr-Latn-CS";default:return t}}function q(t){return t==="bs"?Z(t):t}var $=class{constructor(){this.delocalize=e=>this._numberFormatOptions?h(e,n=>this.#e(this.#t(n))):e,this.localize=(e,n=!1)=>this._numberFormatOptions?h(e,s=>D(s.trim())?new p(s.trim()).format(this,n):s):e}get group(){return this._group}get decimal(){return this._decimal}get minusSign(){return this._minusSign}get digits(){return this._digits}get numberFormatter(){return this._numberFormatter}get numberFormatOptions(){return this._numberFormatOptions}set numberFormatOptions(e){if(e.numberingSystem=H(e?.numberingSystem),e.locale=e?.locale||f,!this._numberFormatOptions&&e.locale===f&&e.numberingSystem===w&&Object.keys(e).length===2||JSON.stringify(this._numberFormatOptions)===JSON.stringify(e))return;this._numberFormatOptions=e,this._numberFormatter=new Intl.NumberFormat(this._numberFormatOptions.locale,this._numberFormatOptions),this._digits=[...new Intl.NumberFormat(this._numberFormatOptions.locale,{useGrouping:!1,numberingSystem:this._numberFormatOptions.numberingSystem}).format(9876543210)].reverse();let n=new Map(this._digits.map((a,m)=>[a,m])),s=new Intl.NumberFormat(this._numberFormatOptions.locale,{numberingSystem:this._numberFormatOptions.numberingSystem}).formatToParts(-123456789e-1),r=s.find(a=>a.type==="group").value,i=e.locale==="bs"||e.locale==="mk";this._group=i&&e.numberingSystem==="latn"?".":r.trim().length===0||r===" "?"\xA0":r,this._decimal=i?",":s.find(a=>a.type==="decimal").value,this._minusSign=s.find(a=>a.type==="minusSign").value,this._getDigitIndex=a=>`${n.get(a)??""}`}#e(e){return e.replace(P,"").replace(new RegExp(`[${this._minusSign}]`,"g"),"-").replace(new RegExp(`[${this._digits.join("")}]`,"g"),this._getDigitIndex)}#t(e){return e.replace(new RegExp(`[${this._group}]`,"g"),"").replace(new RegExp(`[${this._decimal}]`,"g"),".")}},Q=new $,u,y;function k(t={}){return Object.entries(t).sort(([e],[n])=>e.localeCompare(n)).map(e=>`${e[0]}-${e[1]}`).flat().join(":")}function Y(t,e){u||(u=new Map),y!==t&&(u.clear(),y=t);let n=k(e),s=u.get(n);if(s)return s;let r=new Intl.DateTimeFormat(t,e);return u.set(n,r),r}export{p as a,D as b,J as c,K as d,W as e,X as f,H as g,Z as h,q as i,$ as j,Q as k,Y as l};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as i,b as o}from"./KTA2LFLG.js";import{a as x}from"./RP3EAINH.js";import{a as z}from"./GVTCSUCB.js";import{k as l}from"./BGVOI22E.js";import{a as I}from"./JN6YLTUP.js";import{a as y}from"./MFI6726F.js";import"./TL56TNQ7.js";import{a as f}from"./BH3JLG7G.js";import{b as g}from"./VMHJHFFS.js";import"./JX5QRWOH.js";import"./IVIEPOEY.js";import{w as b}from"./W77STZAT.js";import{E as p,F as d,G as h,H as t,K as m,M as u,T as v,g as s,h as r,l as n,p as a}from"./EEOKRDQW.js";var k=s`:host([disabled]),:host([layout=horizontal][disabled]) .stepper-item-header,:host([layout=horizontal-single][disabled]) .stepper-item-header{opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header *,:host([layout=horizontal-single][disabled]) .stepper-item-header *,:host([disabled]) ::slotted(*),:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([layout=horizontal-single][disabled]) .stepper-item-header ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: var(--calcite-space-2xs);--calcite-internal-stepper-item-spacing-unit-m: var(--calcite-space-md);--calcite-internal-stepper-item-spacing-unit-l: var(--calcite-space-lg);--calcite-internal-stepper-item-header-padding: var(--calcite-theme-space-md, var(--calcite-spacing-md));--calcite-internal-stepper-action-inline-size: var(--calcite-size-md);font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);margin-inline-end:var(--calcite-space-2xs)}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: var(--calcite-space-sm);--calcite-internal-stepper-item-spacing-unit-m: var(--calcite-space-lg);--calcite-internal-stepper-item-spacing-unit-l: var(--calcite-space-xl);--calcite-internal-stepper-item-header-padding: var(--calcite-theme-space-lg, var(--calcite-spacing-lg));--calcite-internal-stepper-action-inline-size: 2.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);margin-inline-end:var(--calcite-space-sm)}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: var(--calcite-space-md);--calcite-internal-stepper-item-spacing-unit-m: var(--calcite-space-xl);--calcite-internal-stepper-item-spacing-unit-l: var(--calcite-space-2xl);--calcite-internal-stepper-item-header-padding: var(--calcite-theme-space-xl, var(--calcite-spacing-xl));--calcite-internal-stepper-action-inline-size: var(--calcite-size-xl);font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-lg);margin-inline-end:var(--calcite-space-md)}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-relative-md)}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host .container{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md);color:var(--calcite-color-text-3);border-color:var(--calcite-color-border-3);position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:var(--calcite-border-width-none);border-block-start-width:var(--calcite-border-width-md);border-style:solid;text-decoration-line:none}:host .container:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)))}:host{outline-color:var(--calcite-color-transparent)}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host .stepper-item-content,:host .stepper-item-header{box-sizing:border-box;padding-block:var(--calcite-internal-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start;padding-block:var(--calcite-internal-stepper-item-header-padding)}:host .stepper-item-header:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)))}:host .stepper-item-header *{display:inline-flex;align-items:center}:host .stepper-item-content{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);display:none;inline-size:100%;flex-direction:column}:host .stepper-item-icon{margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);display:inline-flex;block-size:var(--calcite-space-md);flex-shrink:0;align-self:flex-start;margin-block-start:var(--calcite-theme-space-base, var(--calcite-spacing-base));color:var(--calcite-stepper-item-icon-color, var(--calcite-color-border-input))}:host([complete]) .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}.stepper-item-heading,.stepper-item-description,.stepper-item-number{line-height:var(--calcite-font-line-height-relative-snug)}:host .stepper-item-heading{font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal));color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-1))}:host .stepper-item-description{color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host .stepper-item-number{font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal));margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-1))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}:host([complete]) .container{border-color:#007ac280}:host([complete]) .container .stepper-item-icon{color:var(--calcite-stepper-item-complete-icon-color, var(--calcite-color-brand))}:host([error]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([error]) .container .stepper-item-icon{opacity:var(--calcite-opacity-full);color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color-hover, var(--calcite-color-text-1))}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-status-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-color-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-selected-header-text-color, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-medium)}:host([selected]) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-medium)}:host([selected]) .container .stepper-item-icon{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));opacity:var(--calcite-opacity-full)}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]){inline-size:100%}:host([layout=vertical]) .container{margin-inline:var(--calcite-space-none);margin-block-start:var(--calcite-space-none);flex:1 1 auto;border-block-start-width:var(--calcite-border-width-none);border-style:solid;padding-block:var(--calcite-space-none);border-inline-start-width:var(--calcite-border-width-md);padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-l);border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:var(--calcite-space-px) var(--calcite-space-none);padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:var(--calcite-space-none)}:host([layout=vertical]) .container .stepper-item-content{padding:var(--calcite-space-none)}:host([layout=vertical][complete]) .container{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=vertical][error]) .container{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=vertical][selected]) .container{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=vertical][selected]) .container .stepper-item-content.has-slotted-content{margin-block-end:var(--calcite-internal-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}:host([layout=horizontal]),:host([layout=horizontal-single]){display:contents}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header,:host([layout=horizontal-single]) .stepper-item-header{border-width:var(--calcite-border-width-none);border-style:solid;border-block-start-width:var(--calcite-border-width-md);outline-color:var(--calcite-color-transparent);grid-row:items;border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=horizontal]) .stepper-item-header:focus,:host([layout=horizontal-single]) .stepper-item-header:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{cursor:auto;transition-timing-function:var(--calcite-animation-easing-function);padding-block:0;padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal-single]) .stepper-item-header{grid-area:1/1/1/-1}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][complete]) .stepper-item-header,:host([layout=horizontal-single][complete]) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=horizontal][error]) .stepper-item-header,:host([layout=horizontal-single][error]) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=horizontal][selected]) .stepper-item-header,:host([layout=horizontal-single][selected]) .stepper-item-header{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}@media(forced-colors:active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([layout=horizontal-single]) .stepper-item-header{border-style:none;margin-inline-end:var(--calcite-space-none);inline-size:100%;padding-inline:calc(var(--calcite-internal-stepper-action-inline-size) + .5rem)}:host([layout=horizontal-single][error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error]) .container .stepper-item-icon{opacity:var(--calcite-opacity-full);color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error][selected]),:host([layout=horizontal-single][complete][selected]) .container{color:var(--calcite-color-text-3)}:host([layout=horizontal-single][error][selected]) .stepper-item-heading,:host([layout=horizontal-single][complete][selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-text-3))}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`,c=class extends h{constructor(){super(),this.headerRef=p(),this.itemPosition=0,this.selectedPosition=0,this.messages=y(),this.focusSetter=f()(this).setFocus,this.interactiveContainer=z(this),this.stepperItemHasContent=!1,this.complete=!1,this.disabled=!1,this.error=!1,this.icon=!1,this.iconFlipRtl=!1,this.itemHidden=!1,this.numbered=!1,this.scale="m",this.selected=!1,this.calciteInternalStepperItemSelect=a({cancelable:!1}),this.calciteInternalStepperItemUpdate=a({cancelable:!1}),this.calciteStepperItemSelect=a({cancelable:!1}),this.listenOn(document.body,"calciteInternalStepperItemChange",this.updateActiveItemOnChange),this.listen("click",this.handleItemClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={stepperItemHasContent:[16,{},{state:!0}],complete:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],error:[7,{},{reflect:!0,type:Boolean}],heading:1,icon:[5,{},{type:Boolean}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],itemHidden:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[5,{},{type:Boolean}],numberingSystem:1,scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[k,x]}async setFocus(e){return this.focusSetter(()=>this.layout==="vertical"?this.el:this.headerRef.value,e)}async load(){this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.selected&&this.emitRequestedItem()}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.calciteInternalStepperItemUpdate.emit(),e.has("messages")&&this.effectiveLocaleWatcher(this.messages._lang)}updated(){m(this.el,"tabindex",this.disabled||this.layout==="horizontal"?null:0)}selectedHandler(){this.selected&&this.emitRequestedItem()}effectiveLocaleWatcher(e){l.numberFormatOptions={locale:e,numberingSystem:this.numberingSystem,useGrouping:!1}}updateActiveItemOnChange(e){(e.target===this.parentStepperEl||e.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=e.detail.position,this.determineSelectedItem())}keyDownHandler(e){!this.disabled&&e.target===this.el&&I(e.key)&&(this.emitUserRequestedItem(),e.preventDefault())}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}handleItemClick(e){this.disabled||g(this.el)||this.layout==="horizontal"&&e.composedPath().some(w=>w.classList?.contains("stepper-item-content"))||this.emitUserRequestedItem()}emitUserRequestedItem(){this.emitRequestedItem(),this.disabled||this.calciteStepperItemSelect.emit()}emitRequestedItem(){if(!this.disabled){let e=this.itemPosition;this.calciteInternalStepperItemSelect.emit({position:e})}}getItemPosition(){let e=this.parentStepperEl?.querySelectorAll("calcite-stepper-item:not([hidden]):not([item-hidden])");return e?Array.from(e).indexOf(this.el):-1}render(){return this.el.ariaCurrent=this.selected?"step":"false",this.interactiveContainer({disabled:this.disabled,children:r`<div class=${t(i.container)}>${this.complete&&r`<span aria-live=polite class=${t(u.screenReaderText)}>${this.messages.complete}</span>`||""}<div class=${t(i.stepperItemHeader)} tabindex=${(this.layout==="horizontal"&&!this.disabled?0:void 0)??n} ${d(this.headerRef)}>${this.icon?this.renderIcon():null}${this.numbered?r`<div class=${t(i.stepperItemNumber)}>${this.renderNumbers()}.</div>`:null}<div class=${t(i.stepperItemHeaderText)}><span class=${t(i.stepperItemHeading)}>${this.heading}</span><span class=${t(i.stepperItemDescription)}>${this.description}</span></div></div><div class=${t({[i.stepperItemContent]:!0,[i.hasSlottedContent]:this.stepperItemHasContent})}><slot @slotchange=${e=>this.stepperItemHasContent=b(e)}></slot></div></div>`})}renderIcon(){let e=o.circle;return this.selected&&(this.layout!=="horizontal-single"||!this.error&&!this.complete)?e=o.circleF:this.error?e=o.exclamationMarkCircleF:this.complete&&(e=o.checkCircleF),r`<calcite-icon class=${t(i.stepperItemIcon)} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`}renderNumbers(){return l.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:!1},l.numberFormatter.format(this.itemPosition+1)}};v("calcite-stepper-item",c);export{c as StepperItem};
|
|
2
|
+
import{a as i,b as o}from"./KTA2LFLG.js";import{a as x}from"./SBQGT5X3.js";import{a as z}from"./SVWITGRF.js";import{k as l}from"./PRVIXJ7V.js";import{a as I}from"./JN6YLTUP.js";import{a as y}from"./6LHB5RGN.js";import"./TL56TNQ7.js";import{a as f}from"./72LA67LQ.js";import{b as g}from"./VMHJHFFS.js";import"./YE5HVMTC.js";import"./GBLGTHFD.js";import{w as b}from"./W77STZAT.js";import{E as p,F as d,G as h,H as t,K as m,M as u,T as v,g as s,h as r,l as n,p as a}from"./MPGHVV7O.js";var k=s`:host([disabled]),:host([layout=horizontal][disabled]) .stepper-item-header,:host([layout=horizontal-single][disabled]) .stepper-item-header{opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header *,:host([layout=horizontal-single][disabled]) .stepper-item-header *,:host([disabled]) ::slotted(*),:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([layout=horizontal-single][disabled]) .stepper-item-header ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: var(--calcite-space-2xs);--calcite-internal-stepper-item-spacing-unit-m: var(--calcite-space-md);--calcite-internal-stepper-item-spacing-unit-l: var(--calcite-space-lg);--calcite-internal-stepper-item-header-padding: var(--calcite-theme-space-md, var(--calcite-spacing-md));--calcite-internal-stepper-action-inline-size: var(--calcite-size-md);font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);margin-inline-end:var(--calcite-space-2xs)}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: var(--calcite-space-sm);--calcite-internal-stepper-item-spacing-unit-m: var(--calcite-space-lg);--calcite-internal-stepper-item-spacing-unit-l: var(--calcite-space-xl);--calcite-internal-stepper-item-header-padding: var(--calcite-theme-space-lg, var(--calcite-spacing-lg));--calcite-internal-stepper-action-inline-size: 2.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);margin-inline-end:var(--calcite-space-sm)}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: var(--calcite-space-md);--calcite-internal-stepper-item-spacing-unit-m: var(--calcite-space-xl);--calcite-internal-stepper-item-spacing-unit-l: var(--calcite-space-2xl);--calcite-internal-stepper-item-header-padding: var(--calcite-theme-space-xl, var(--calcite-spacing-xl));--calcite-internal-stepper-action-inline-size: var(--calcite-size-xl);font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-lg);margin-inline-end:var(--calcite-space-md)}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-relative-md)}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host .container{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md);color:var(--calcite-color-text-3);border-color:var(--calcite-color-border-3);position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:var(--calcite-border-width-none);border-block-start-width:var(--calcite-border-width-md);border-style:solid;text-decoration-line:none}:host .container:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)))}:host{outline-color:var(--calcite-color-transparent)}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host .stepper-item-content,:host .stepper-item-header{box-sizing:border-box;padding-block:var(--calcite-internal-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start;padding-block:var(--calcite-internal-stepper-item-header-padding)}:host .stepper-item-header:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3)))}:host .stepper-item-header *{display:inline-flex;align-items:center}:host .stepper-item-content{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);display:none;inline-size:100%;flex-direction:column}:host .stepper-item-icon{margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);display:inline-flex;block-size:var(--calcite-space-md);flex-shrink:0;align-self:flex-start;margin-block-start:var(--calcite-theme-space-base, var(--calcite-spacing-base));color:var(--calcite-stepper-item-icon-color, var(--calcite-color-border-input))}:host([complete]) .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}.stepper-item-heading,.stepper-item-description,.stepper-item-number{line-height:var(--calcite-font-line-height-relative-snug)}:host .stepper-item-heading{font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal));color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-1))}:host .stepper-item-description{color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host .stepper-item-number{font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal));margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-1))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}:host([complete]) .container{border-color:#007ac280}:host([complete]) .container .stepper-item-icon{color:var(--calcite-stepper-item-complete-icon-color, var(--calcite-color-brand))}:host([error]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([error]) .container .stepper-item-icon{opacity:var(--calcite-opacity-full);color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color-hover, var(--calcite-color-text-1))}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-status-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-color-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-selected-header-text-color, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-medium)}:host([selected]) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-medium)}:host([selected]) .container .stepper-item-icon{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));opacity:var(--calcite-opacity-full)}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]){inline-size:100%}:host([layout=vertical]) .container{margin-inline:var(--calcite-space-none);margin-block-start:var(--calcite-space-none);flex:1 1 auto;border-block-start-width:var(--calcite-border-width-none);border-style:solid;padding-block:var(--calcite-space-none);border-inline-start-width:var(--calcite-border-width-md);padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-l);border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:var(--calcite-space-px) var(--calcite-space-none);padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:var(--calcite-space-none)}:host([layout=vertical]) .container .stepper-item-content{padding:var(--calcite-space-none)}:host([layout=vertical][complete]) .container{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=vertical][error]) .container{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=vertical][selected]) .container{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=vertical][selected]) .container .stepper-item-content.has-slotted-content{margin-block-end:var(--calcite-internal-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}:host([layout=horizontal]),:host([layout=horizontal-single]){display:contents}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header,:host([layout=horizontal-single]) .stepper-item-header{border-width:var(--calcite-border-width-none);border-style:solid;border-block-start-width:var(--calcite-border-width-md);outline-color:var(--calcite-color-transparent);grid-row:items;border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=horizontal]) .stepper-item-header:focus,:host([layout=horizontal-single]) .stepper-item-header:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{cursor:auto;transition-timing-function:var(--calcite-animation-easing-function);padding-block:0;padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal-single]) .stepper-item-header{grid-area:1/1/1/-1}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][complete]) .stepper-item-header,:host([layout=horizontal-single][complete]) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=horizontal][error]) .stepper-item-header,:host([layout=horizontal-single][error]) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=horizontal][selected]) .stepper-item-header,:host([layout=horizontal-single][selected]) .stepper-item-header{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}@media(forced-colors:active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([layout=horizontal-single]) .stepper-item-header{border-style:none;margin-inline-end:var(--calcite-space-none);inline-size:100%;padding-inline:calc(var(--calcite-internal-stepper-action-inline-size) + .5rem)}:host([layout=horizontal-single][error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error]) .container .stepper-item-icon{opacity:var(--calcite-opacity-full);color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error][selected]),:host([layout=horizontal-single][complete][selected]) .container{color:var(--calcite-color-text-3)}:host([layout=horizontal-single][error][selected]) .stepper-item-heading,:host([layout=horizontal-single][complete][selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-text-3))}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`,c=class extends h{constructor(){super(),this.headerRef=p(),this.itemPosition=0,this.selectedPosition=0,this.messages=y(),this.focusSetter=f()(this).setFocus,this.interactiveContainer=z(this),this.stepperItemHasContent=!1,this.complete=!1,this.disabled=!1,this.error=!1,this.icon=!1,this.iconFlipRtl=!1,this.itemHidden=!1,this.numbered=!1,this.scale="m",this.selected=!1,this.calciteInternalStepperItemSelect=a({cancelable:!1}),this.calciteInternalStepperItemUpdate=a({cancelable:!1}),this.calciteStepperItemSelect=a({cancelable:!1}),this.listenOn(document.body,"calciteInternalStepperItemChange",this.updateActiveItemOnChange),this.listen("click",this.handleItemClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={stepperItemHasContent:[16,{},{state:!0}],complete:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],error:[7,{},{reflect:!0,type:Boolean}],heading:1,icon:[5,{},{type:Boolean}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],itemHidden:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[5,{},{type:Boolean}],numberingSystem:1,scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[k,x]}async setFocus(e){return this.focusSetter(()=>this.layout==="vertical"?this.el:this.headerRef.value,e)}async load(){this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.selected&&this.emitRequestedItem()}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.calciteInternalStepperItemUpdate.emit(),e.has("messages")&&this.effectiveLocaleWatcher(this.messages._lang)}updated(){m(this.el,"tabindex",this.disabled||this.layout==="horizontal"?null:0)}selectedHandler(){this.selected&&this.emitRequestedItem()}effectiveLocaleWatcher(e){l.numberFormatOptions={locale:e,numberingSystem:this.numberingSystem,useGrouping:!1}}updateActiveItemOnChange(e){(e.target===this.parentStepperEl||e.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=e.detail.position,this.determineSelectedItem())}keyDownHandler(e){!this.disabled&&e.target===this.el&&I(e.key)&&(this.emitUserRequestedItem(),e.preventDefault())}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}handleItemClick(e){this.disabled||g(this.el)||this.layout==="horizontal"&&e.composedPath().some(w=>w.classList?.contains("stepper-item-content"))||this.emitUserRequestedItem()}emitUserRequestedItem(){this.emitRequestedItem(),this.disabled||this.calciteStepperItemSelect.emit()}emitRequestedItem(){if(!this.disabled){let e=this.itemPosition;this.calciteInternalStepperItemSelect.emit({position:e})}}getItemPosition(){let e=this.parentStepperEl?.querySelectorAll("calcite-stepper-item:not([hidden]):not([item-hidden])");return e?Array.from(e).indexOf(this.el):-1}render(){return this.el.ariaCurrent=this.selected?"step":"false",this.interactiveContainer({disabled:this.disabled,children:r`<div class=${t(i.container)}>${this.complete&&r`<span aria-live=polite class=${t(u.screenReaderText)}>${this.messages.complete}</span>`||""}<div class=${t(i.stepperItemHeader)} tabindex=${(this.layout==="horizontal"&&!this.disabled?0:void 0)??n} ${d(this.headerRef)}>${this.icon?this.renderIcon():null}${this.numbered?r`<div class=${t(i.stepperItemNumber)}>${this.renderNumbers()}.</div>`:null}<div class=${t(i.stepperItemHeaderText)}><span class=${t(i.stepperItemHeading)}>${this.heading}</span><span class=${t(i.stepperItemDescription)}>${this.description}</span></div></div><div class=${t({[i.stepperItemContent]:!0,[i.hasSlottedContent]:this.stepperItemHasContent})}><slot @slotchange=${e=>this.stepperItemHasContent=b(e)}></slot></div></div>`})}renderIcon(){let e=o.circle;return this.selected&&(this.layout!=="horizontal-single"||!this.error&&!this.complete)?e=o.circleF:this.error?e=o.exclamationMarkCircleF:this.complete&&(e=o.checkCircleF),r`<calcite-icon class=${t(i.stepperItemIcon)} .flipRtl=${this.iconFlipRtl} .icon=${e} scale=s></calcite-icon>`}renderNumbers(){return l.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:!1},l.numberFormatter.format(this.itemPosition+1)}};v("calcite-stepper-item",c);export{c as StepperItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{H as h,h as s}from"./
|
|
2
|
+
import{H as h,h as s}from"./MPGHVV7O.js";var i={textMatch:"text-match"};function c({text:r,pattern:a}){if(!a||!r)return r;let t=r.split(a);return t.length>1&&(t[1]=s`<mark class=${h(i.textMatch)}>${t[1]}</mark>`),t}export{c as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as r}from"./
|
|
2
|
+
import{a as r}from"./QDM2OPV6.js";import{a as t,b as n,c as b}from"./FWMKFJLG.js";import{a as g}from"./SVWITGRF.js";import{a as f}from"./CASNTUXN.js";import"./TL56TNQ7.js";import{a as v}from"./VMHJHFFS.js";import"./YE5HVMTC.js";import"./GBLGTHFD.js";import{G as u,H as i,T as m,g as h,h as l,p as o}from"./MPGHVV7O.js";var x=h`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);--calcite-internal-autocomplete-item-spacing-unit-l: var(--calcite-space-sm);--calcite-internal-autocomplete-item-spacing-unit-s: var(--calcite-space-2xs);--calcite-internal-autocomplete-item-description-font-size: var(--calcite-font-size-xs)}.scale--m{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);--calcite-internal-autocomplete-item-spacing-unit-l: var(--calcite-space-md);--calcite-internal-autocomplete-item-spacing-unit-s: var(--calcite-space-xs);--calcite-internal-autocomplete-item-description-font-size: var(--calcite-font-size-sm)}.scale--l{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);--calcite-internal-autocomplete-item-spacing-unit-l: var(--calcite-space-lg);--calcite-internal-autocomplete-item-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-internal-autocomplete-item-description-font-size: var(--calcite-font-size)}:host{display:flex}.container{display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;outline-color:var(--calcite-color-transparent);position:relative;box-sizing:border-box;align-items:center;background-color:var(--calcite-autocomplete-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-3));gap:var(--calcite-internal-autocomplete-item-spacing-unit-l);padding-inline:var(--calcite-internal-autocomplete-item-spacing-unit-l);padding-block:var(--calcite-internal-autocomplete-item-spacing-unit-s);overflow-wrap:break-word;word-break:break-word;justify-content:space-around}.description{color:var(--calcite-autocomplete-description-text-color);font-size:var(--calcite-internal-autocomplete-item-description-font-size)}.heading{color:var(--calcite-autocomplete-heading-text-color, var(--calcite-color-text-1))}.heading,.description{line-height:var(--calcite-font-line-height-relative-snug)}:host([selected]) .heading{font-weight:var(--calcite-font-weight-medium)}:host(:hover:not([disabled]):not([selected])) .container{background-color:var(--calcite-autocomplete-background-color, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)))}:host(:hover:not([disabled]):not([selected])) .container .description{color:var(--calcite-autocomplete-description-text-color, var(--calcite-color-text-2))}:host([selected]) .container{color:var(--calcite-color-text-1);background-color:var(--calcite-color-surface-highlight)}:host([selected]) .container .description{color:var(--calcite-autocomplete-description-text-color, var(--calcite-color-text-2))}.container--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-1 * var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}.content-center{display:flex;flex-direction:column;flex-grow:1;padding-block:0}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-semibold)}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}`,s=class extends u{constructor(){super(...arguments),this.interactiveContainer=g(this),this.active=!1,this.disabled=!1,this.guid=b.host(f()),this.scale="m",this.selected=!1,this.calciteAutocompleteItemSelect=o({cancelable:!1}),this.calciteInternalAutocompleteItemChange=o({cancelable:!1})}static{this.properties={active:[5,{},{type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],guid:1,heading:1,iconEnd:[3,{},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{},{reflect:!0}],inputValueMatchPattern:[3,{},{reflect:!0}],label:1,scale:1,selected:[7,{},{reflect:!0,type:Boolean}],value:1}}static{this.styles=x}requestSelection(){this.calciteAutocompleteItemSelect.emit()}willUpdate(e){this.hasUpdated&&(e.has("description")||e.has("disabled")||e.has("heading")||e.has("label")||e.has("selected")||e.has("value"))&&this.calciteInternalAutocompleteItemChange.emit()}handleClick(e){e.preventDefault(),!this.disabled&&this.requestSelection()}render(){let{active:e,description:c,heading:a,disabled:d,inputValueMatchPattern:p}=this;return this.interactiveContainer({disabled:d,children:l`<div class=${i({[t.container]:!0,[t.containerActive]:e&&!d,[t.scale(this.scale)]:!0})} @click=${this.handleClick}>${this.renderIcon("start")}<slot name=${n.contentStart}></slot><div class=${i(t.contentCenter)}><div class=${i(t.heading)}>${r({text:a,pattern:p})}</div><div class=${i(t.description)}>${r({text:c,pattern:p})}</div></div><slot name=${n.contentEnd}></slot>${this.renderIcon("end")}</div>`})}renderIcon(e){let{iconFlipRtl:c}=this,a=e==="start"?this.iconStart:this.iconEnd;return a?l`<calcite-icon class=${i(e==="start"?t.iconStart:t.iconEnd)} .flipRtl=${c===e||c==="both"} .icon=${a} .scale=${v(this.scale)}></calcite-icon>`:null}};m("calcite-autocomplete-item",s);export{s as AutocompleteItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as B}from"./
|
|
2
|
+
import{a as B}from"./R3JESRUS.js";import{a as L,b as O}from"./67TTPSK7.js";import{c as d,e as E,f as z,g as C,h as D,i as f}from"./T2JUGBD5.js";import"./WTNYMVTD.js";import"./YYOLNZRT.js";import"./CSDY4NKB.js";import{a as p}from"./Q5V3JJ3K.js";import{a as w}from"./VTE67UUL.js";import{a as x}from"./WBDWFW77.js";import"./JN6YLTUP.js";import{a as y}from"./LKN4LUNT.js";import"./TL56TNQ7.js";import{e as k}from"./YE5HVMTC.js";import"./GBLGTHFD.js";import"./W77STZAT.js";import{E as u,F as s,G as g,H as o,T as b,g as m,h as v,p as t}from"./MPGHVV7O.js";var S=m`:host{display:contents;--calcite-internal-tooltip-padding-block: var(--calcite-theme-space-sm, var(--calcite-spacing-sm));--calcite-internal-tooltip-padding-inline: var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([top-layer-disabled]){--calcite-floating-ui-z-index: var(--calcite-z-index-tooltip)}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;border-radius:var(--calcite-corner-radius-sm);z-index:var(--calcite-z-index)}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{z-index:calc(var(--calcite-z-index) * -1);position:absolute;pointer-events:none;fill:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]){--calcite-internal-tooltip-padding-block: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs));--calcite-internal-tooltip-padding-inline: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .container{font-size:var(--calcite-font-size-relative-xs);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .container{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}.container{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);overflow-wrap:break-word;word-break:break-word;position:relative;overflow:hidden;font-weight:var(--calcite-font-weight-medium);padding-block:var(--calcite-internal-tooltip-padding-block);padding-inline:var(--calcite-internal-tooltip-padding-inline);border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:var(--calcite-border-width-sm);border-style:solid;box-shadow:var(--calcite-shadow-md);background-color:var(--calcite-tooltip-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-theme-corner-radius-sm, var(--calcite-corner-radius-round)))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,T=O({hover:!0}),h=class extends g{constructor(){super(...arguments),this.direction=k(),this.referenceElementType="hover",this.referenceElementController=L({manager:T})(this),this.transitionProp="opacity",this.transitionRef=u(),this.topLayer=w({disabledOverride:()=>this.open&&!this.referenceEl,target:()=>this.floatingEl})(this),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=f,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.pointerDisabled=!1,this.scale="m",this.topLayerDisabled=!1,this.calciteTooltipBeforeClose=t({cancelable:!1}),this.calciteTooltipBeforeOpen=t({cancelable:!1}),this.calciteTooltipClose=t({cancelable:!1}),this.calciteTooltipOpen=t({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],pointerDisabled:[7,{},{reflect:!0,type:Boolean}],referenceElement:1,scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=S}async reposition(e=!1){let{referenceEl:a,placement:r,overlayPositioning:n,offsetDistance:i,offsetSkidding:l,arrowEl:c,floatingEl:F}=this;return E(this,{direction:this.direction,floatingEl:F,referenceEl:a,overlayPositioning:n,placement:r,offsetDistance:i,offsetSkidding:l,arrowEl:c,type:"tooltip"},e)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==f)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&!this.referenceElement&&this.open&&this.topLayer.hide()}updated(e){e.has("referenceEl")&&C(this)}disconnectedCallback(){super.disconnectedCallback(),D(this)}openHandler(){x(this),this.reposition(!0)}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),z(this),this.topLayer.hide()}setFloatingEl(e){this.floatingEl=e}setArrowEl(e){this.arrowEl=e,this.reposition(!0)}render(){let{referenceEl:e,open:a,pointerDisabled:r,floatingLayout:n}=this,i=e&&a,l=!i,c=r?null:y("floating-arrow",B({floatingLayout:n,ref:this.setArrowEl}));return this.el.inert=l,this.el.role="tooltip",v`<div class=${o(p.positionContainer)} popover=manual ${s(this.setFloatingEl)}><div class=${o({[d.animation]:!0,[d.animationActive]:i})} ${s(this.transitionRef)}>${c}<div class=${o(p.container)}><slot></slot></div></div></div>`}};b("calcite-tooltip",h);export{h as Tooltip};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as e}from"./DGOFDT3T.js";import{d as u}from"./FWMKFJLG.js";import"./TL56TNQ7.js";import{C as g}from"./W77STZAT.js";import{E as o,F as n,G as s,H as t,J as p,T as m,g as l,h as i,p as r}from"./
|
|
2
|
+
import{a as e}from"./DGOFDT3T.js";import{d as u}from"./FWMKFJLG.js";import"./TL56TNQ7.js";import{C as g}from"./W77STZAT.js";import{E as o,F as n,G as s,H as t,J as p,T as m,g as l,h as i,p as r}from"./MPGHVV7O.js";var d=l`.scale--s{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var( --calcite-theme-space-sm, var(--calcite-spacing-sm) );--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var( --calcite-theme-space-2xs, var(--calcite-spacing-xxs) )}.scale--s .first-title{padding-block-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}.scale--s .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--m{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var( --calcite-theme-space-md, var(--calcite-spacing-md) );--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var( --calcite-theme-space-xs, var(--calcite-spacing-xs) )}.scale--m .first-title{padding-block-start:var(--calcite-theme-space-md, var(--calcite-spacing-md))}.scale--m .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--l{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var( --calcite-theme-space-lg, var(--calcite-spacing-lg) );--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var( --calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus) )}.scale--l .first-title{padding-block-start:var(--calcite-theme-space-xl, var(--calcite-spacing-xl))}.scale--l .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host{margin:var(--calcite-space-none);display:flex;flex-direction:column}.container{display:flex;flex-direction:column;background-color:var(--calcite-autocomplete-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}.container--no-spacing{padding-block-start:0}.separator{block-size:var(--calcite-theme-space-px, var(--calcite-spacing-px));background-color:var(--calcite-autocomplete-border-color, var(--calcite-color-border-3))}.heading{overflow-wrap:break-word;word-break:break-word;box-sizing:border-box;inline-size:100%;min-inline-size:var(--calcite-space-none);max-inline-size:100%;font-weight:var(--calcite-font-weight-semibold);color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));padding-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);padding-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host([hidden]){display:none}[hidden]{display:none}`,v="calcite-autocomplete-item",c=class extends s{constructor(){super(...arguments),this.defaultSlotRef=o(),this._items=[],this.disableSpacing=!1,this.position=0,this.scale="m",this.calciteInternalAutocompleteItemGroupItemsChange=r({cancelable:!1})}static{this.properties={disableSpacing:[5,{},{type:Boolean}],heading:1,label:1,position:[9,{},{type:Number}],scale:1,items:[32,{},{attribute:!1,readOnly:!0}]}}static{this.styles=d}get items(){return this._items}loaded(){this.updateItems()}handleDefaultSlotChange(){this.updateItems()}updateItems(){let a=this.defaultSlotRef.value?g(this.defaultSlotRef.value,v):Array.from(this.el.children).filter(u);this._items=a,this.calciteInternalAutocompleteItemGroupItemsChange.emit()}render(){let{scale:a}=this,h=this.position>0?i`<div class=${t(e.separator)} role=separator></div>`:null;return i`<div aria-label=${this.label??this.heading??p} class=${t({[e.container]:!0,[e.containerNoSpacing]:this.disableSpacing,[e.scale(a)]:!0})} role=group>${h}<div class=${t({[e.heading]:!0,[e.firstTitle]:this.position===0})}>${this.heading}</div><slot @slotchange=${this.handleDefaultSlotChange} ${n(this.defaultSlotRef)}></slot></div>`}};m("calcite-autocomplete-item-group",c);export{c as AutocompleteItemGroup};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as l}from"./
|
|
2
|
+
import{a as l}from"./LKN4LUNT.js";import{F as c,H as a,h,i as e,l as s}from"./MPGHVV7O.js";var d={arrow:"calcite-floating-ui-arrow",arrowStroke:"calcite-floating-ui-arrow__stroke"},m={width:12,height:6,strokeWidth:1},S=({floatingLayout:w,key:g,ref:f})=>{let{width:t,height:r,strokeWidth:o}=m,i=t/2,$=w==="vertical",n=`M0,0 H${t} L${t-i},${r} Q${i},${r} ${i},${r} Z`;return l(g,h`<svg aria-hidden=true class=${a(d.arrow)} height=${t} viewBox=${`0 0 ${t} ${t+($?0:o)}`} width=${t+($?o:0)} ${c(f)}>${e`${e`<path class=${a(d.arrowStroke)} d=${n??s} fill=none stroke-width=${o+1} />`||""}<path d=${n??s} stroke=none />`}</svg>`)};export{S as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{c as h}from"./
|
|
2
|
+
import{c as h}from"./2UQKII64.js";import{b as o}from"./YYOLNZRT.js";import{h as g,i as p}from"./PRVIXJ7V.js";import{a as m}from"./GBLGTHFD.js";var i={},d={},D=new Date(Date.UTC(2006,10,22)),T=Array.from({length:12},(t,e)=>new Date(Date.UTC(2006,e,1))),I=Array.from({length:7},(t,e)=>new Date(Date.UTC(2006,0,e+1)));function v(t){return s(t,"calendar").resolvedOptions().calendar==="buddhist"?"buddhist":"gregorian"}function s(t,e,n={}){let r=`${t}:${e}`;if(!d[r]){let a=e==="calendar"?void 0:v(t)==="buddhist"?"buddhist":"gregory";d[r]=new Intl.DateTimeFormat(t,{...n,...a&&{calendar:a},timeZone:"UTC"})}return d[r]}function M(t){let e=s(t,"date-pattern",{day:"numeric",month:"numeric",year:"numeric"}).formatToParts(D),n=e.map(({type:r,value:a})=>{switch(r){case"day":return"DD";case"month":return"MM";case"year":return"YYYY";default:return a}}).join("");return{placeholder:n,separator:e.find(({type:r})=>r==="literal")?.value.replace(/\s/gu,"")||"/",unitOrder:n}}function b(t,e){let n=e==="abbreviated"?"short":"long",r=s(t,`months-${e}`,{month:n});return T.map(a=>r.format(a))}function u(t,e){let n=e==="abbreviated"?"short":"narrow",r=s(t,`weekdays-${e}`,{weekday:n});return I.map(a=>r.format(a))}function O(t,e){return t==="pt-PT"?u("pt","abbreviated"):e}function F(t){return new Intl.Locale(t).getWeekInfo().firstDay}function A(t){let e=s(t,"year",{year:"numeric"}).formatToParts(D),n=e.findIndex(({type:a})=>a==="year");return e.slice(n+1).filter(({type:a})=>a==="literal").map(({value:a})=>a).join("")||void 0}function N(t){let e=Intl.getCanonicalLocales(t||m)[0];if(i[e])return i[e];let n=g(e),r=p(e),a=o(()=>v(n)),c=o(()=>M(n)),w=o(()=>b(r,"abbreviated")),k=o(()=>b(r,"wide")),l=o(()=>u(r,"abbreviated")),L=o(()=>u(r,"narrow")),x=o(()=>O(r,l())),S=o(()=>F(e)),W=o(()=>A(r)),C={get"default-calendar"(){return a()},get separator(){return c().separator},get unitOrder(){return c().unitOrder},get weekStart(){return S()},get placeholder(){return c().placeholder},days:{get abbreviated(){return l()},get narrow(){return L()},get short(){return x()}},months:{get abbreviated(){return w()},get wide(){return k()}},get year(){let f=W();return f?{suffix:f}:void 0}};return i[e]=C}function j(t){return{"ar-SA":"ar"}[t]||t}function _(t){return t.map((e,n)=>h(e,n===1))}function y(t,e,n){let r=t.has(e),a=t.has(n);if(r&&!a)return e;if(a&&!r)return n}function z(t,e){return e==="min"?y(t,"min","minAsDate"):y(t,"max","maxAsDate")}export{N as a,j as b,_ as c,z as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{b as ae}from"./
|
|
2
|
+
import{b as ae}from"./YE5HVMTC.js";import{a as j,b as re,c as ne,d as C,e as G,f as ie,q as oe}from"./W77STZAT.js";import{R as te}from"./MPGHVV7O.js";function V(n,e){(e==null||e>n.length)&&(e=n.length);for(var i=0,o=Array(e);i<e;i++)o[i]=n[i];return o}function he(n){if(Array.isArray(n))return V(n)}function ue(n,e){var i=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!i){if(Array.isArray(n)||(i=fe(n))||e){i&&(n=i);var o=0,y=function(){};return{s:y,n:function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}},e:function(h){throw h},f:y}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,t=!0,b=!1;return{s:function(){i=i.call(n)},n:function(){var h=i.next();return t=h.done,h},e:function(h){b=!0,s=h},f:function(){try{t||i.return==null||i.return()}finally{if(b)throw s}}}}function ge(n,e,i){return(e=ke(e))in n?Object.defineProperty(n,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[e]=i,n}function Te(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function we(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function se(n,e){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(y){return Object.getOwnPropertyDescriptor(n,y).enumerable})),i.push.apply(i,o)}return i}function ce(n){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?se(Object(i),!0).forEach(function(o){ge(n,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):se(Object(i)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(i,o))})}return n}function Fe(n){return he(n)||Te(n)||fe(n)||we()}function Ne(n,e){if(typeof n!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function ke(n){var e=Ne(n,"string");return typeof e=="symbol"?e:e+""}function fe(n,e){if(n){if(typeof n=="string")return V(n,e);var i={}.toString.call(n).slice(8,-1);return i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set"?Array.from(n):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?V(n,e):void 0}}var O=new WeakMap,U=function(e){var i=e?.preexistingTrap;if(i){var o=O.get(i);o===1?O.delete(i):O.set(i,o-1),e.preexistingTrap=void 0}},k={getActiveTrap:function(e){return e?.length>0?e[e.length-1]:null},activateTrap:function(e,i){var o=k.getActiveTrap(e);i!==o&&k.pauseTrap(e);var y=e.indexOf(i);y===-1||e.splice(y,1),e.push(i)},deactivateTrap:function(e,i){var o=e.indexOf(i);o!==-1&&e.splice(o,1),k.unpauseTrap(e)},pauseTrap:function(e){var i=k.getActiveTrap(e);i?._setPausedState(!0)},unpauseTrap:function(e){var i=k.getActiveTrap(e);i&&!i._isManuallyPaused()&&i._setPausedState(!1)}},Ee=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},De=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},B=function(e){return e?.key==="Tab"||e?.keyCode===9},Ae=function(e){return B(e)&&!e.shiftKey},Se=function(e){return B(e)&&e.shiftKey},le=function(e){return setTimeout(e,0)},K=function(e){for(var i=arguments.length,o=new Array(i>1?i-1:0),y=1;y<i;y++)o[y-1]=arguments[y];return typeof e=="function"?e.apply(void 0,o):e},M=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Pe=[],de=function(e,i){var o=i?.document||document,y=i?.trapStack||Pe,s=ce({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,delayReturnFocus:!0,isolateSubtrees:!1,isKeyForward:Ae,isKeyBackward:Se},i),t={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,subtreeIsolated:!1,activation:void 0,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,unpausing:void 0,recentNavEvent:void 0},b,h=function(a,r,u){return a&&a[r]!==void 0?a[r]:s[u||r]},E=function(a,r){var u=typeof r?.composedPath=="function"?r.composedPath():void 0;return t.containerGroups.findIndex(function(f){var d=f.container,l=f.tabbableNodes;return d.contains(a)||u?.includes(d)||l.find(function(c){return c===a})})},A=function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=r.hasFallback,f=u===void 0?!1:u,d=r.params,l=d===void 0?[]:d,c=s[a];if(typeof c=="function"&&(c=c.apply(void 0,Fe(l))),c===!0&&(c=void 0),!c){if(c===void 0||c===!1)return c;throw new Error("`".concat(a,"` was specified but was not a node, or did not return a node"))}var v=c;if(typeof c=="string"){try{v=o.querySelector(c)}catch(p){throw new Error("`".concat(a,'` appears to be an invalid selector; error="').concat(p.message,'"'),{cause:p})}if(!v&&!f)throw new Error("`".concat(a,"` as selector refers to no known node"))}return v},S=function(a){var r=a.activeElement;return r?r.shadowRoot&&r.shadowRoot.activeElement!==null?S(r.shadowRoot):r:null},D=function(){var a=A("initialFocus",{hasFallback:!0});if(a===!1)return!1;if(a===void 0||a&&!G(a,s.tabbableOptions)){var r=S(o);if(E(r)>=0)a=r;else{var u=t.tabbableGroups[0],f=u&&u.firstTabbableNode;a=f||A("fallbackFocus")}}else a===null&&(a=A("fallbackFocus"));if(!a)throw new Error("Your focus-trap needs to have at least one focusable element");return a},R=function(){if(t.containerGroups=t.containers.map(function(a){var r=re(a,s.tabbableOptions),u=ne(a,s.tabbableOptions),f=r.length>0?r[0]:void 0,d=r.length>0?r[r.length-1]:void 0,l=u.find(function(p){return C(p)}),c=u.slice().reverse().find(function(p){return C(p)}),v=!!r.find(function(p){return j(p)>0});return{container:a,tabbableNodes:r,focusableNodes:u,posTabIndexesFound:v,firstTabbableNode:f,lastTabbableNode:d,firstDomTabbableNode:l,lastDomTabbableNode:c,nextTabbableNode:function(g){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,w=r.indexOf(g);return w<0?T?u.slice(u.indexOf(g)+1).find(function(N){return C(N)}):u.slice(0,u.indexOf(g)).reverse().find(function(N){return C(N)}):r[w+(T?1:-1)]}}}),t.tabbableGroups=t.containerGroups.filter(function(a){return a.tabbableNodes.length>0}),t.tabbableGroups.length<=0&&!A("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(t.containerGroups.find(function(a){return a.posTabIndexesFound})&&t.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},F=function(a){if(a!==!1){if(a===S(o)){t.mostRecentlyFocusedNode=a;return}if(!a||!a.focus){F(D());return}a.focus({preventScroll:!!s.preventScroll}),t.mostRecentlyFocusedNode=a,Ee(a)&&a.select()}},x=function(a){var r=A("setReturnFocus",{params:[a]});return r||(r===!1?!1:a)},Y=function(a){var r=a.target,u=a.event,f=a.isBackward,d=f===void 0?!1:f;r=r||M(u),R();var l=null;if(t.tabbableGroups.length>0){var c=E(r,u),v=c>=0?t.containerGroups[c]:void 0;if(c<0)d?l=t.tabbableGroups[t.tabbableGroups.length-1].lastTabbableNode:l=t.tabbableGroups[0].firstTabbableNode;else if(d){var p=t.tabbableGroups.findIndex(function(I){var W=I.firstTabbableNode;return r===W});if(p<0&&(v.container===r||G(r,s.tabbableOptions)&&!C(r,s.tabbableOptions)&&!v.nextTabbableNode(r,!1))&&(p=Math.max(0,t.tabbableGroups.findIndex(function(I){return t.containerGroups.indexOf(I)>=c}))),p>=0){var g=p===0?t.tabbableGroups.length-1:p-1,T=t.tabbableGroups[g];l=j(r)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else B(u)||(l=v.nextTabbableNode(r,!1))}else{var w=t.tabbableGroups.findIndex(function(I){var W=I.lastTabbableNode;return r===W});if(w<0&&(v.container===r||G(r,s.tabbableOptions)&&!C(r,s.tabbableOptions)&&!v.nextTabbableNode(r))){var N=t.tabbableGroups.findIndex(function(I){return t.containerGroups.indexOf(I)>c});w=N>0?N-1:t.tabbableGroups.length-1}if(w>=0){var P=w===t.tabbableGroups.length-1?0:w+1,ee=t.tabbableGroups[P];l=j(r)>=0?ee.firstTabbableNode:ee.firstDomTabbableNode}else B(u)||(l=v.nextTabbableNode(r))}}else l=A("fallbackFocus");return l},_=function(a){var r=M(a);if(!(E(r,a)>=0)){if(K(s.clickOutsideDeactivates,a)){b.deactivate({returnFocus:s.returnFocusOnDeactivate});return}K(s.allowOutsideClick,a)||a.preventDefault()}},z=function(a){var r=M(a),u=E(r,a)>=0;if(u||r instanceof Document)u&&(t.mostRecentlyFocusedNode=r);else{a.stopImmediatePropagation();var f,d=!0;if(t.mostRecentlyFocusedNode)if(j(t.mostRecentlyFocusedNode)>0){var l=E(t.mostRecentlyFocusedNode),c=t.containerGroups[l].tabbableNodes;if(c.length>0){var v=c.findIndex(function(p){return p===t.mostRecentlyFocusedNode});v>=0&&(s.isKeyForward(t.recentNavEvent)?v+1<c.length&&(f=c[v+1],d=!1):v-1>=0&&(f=c[v-1],d=!1))}}else t.containerGroups.some(function(p){return p.tabbableNodes.some(function(g){return j(g)>0})})||(d=!1);else d=!1;d&&(f=Y({target:t.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(t.recentNavEvent)})),F(f||t.mostRecentlyFocusedNode||D())}t.recentNavEvent=void 0},pe=function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;t.recentNavEvent=a;var u=Y({event:a,isBackward:r});u&&(B(a)&&a.preventDefault(),F(u))},J=function(a){(s.isKeyForward(a)||s.isKeyBackward(a))&&pe(a,s.isKeyBackward(a))},Q=function(a){De(a)&&K(s.escapeDeactivates,a)!==!1&&(a.preventDefault(),b.deactivate())},X=function(a){var r=M(a);E(r,a)>=0||K(s.clickOutsideDeactivates,a)||K(s.allowOutsideClick,a)||(a.preventDefault(),a.stopImmediatePropagation())},Z=function(){if(t.active&&(k.activateTrap(y,b),!t.paused)){var a;if(s.delayInitialFocus)a=new Promise(function(r){t.delayInitialFocusTimer=le(function(){F(D()),r()})});else if(F(D()),!t.active||t.paused)return;return o.addEventListener("focusin",z,!0),o.addEventListener("mousedown",_,{capture:!0,passive:!1}),o.addEventListener("touchstart",_,{capture:!0,passive:!1}),o.addEventListener("click",X,{capture:!0,passive:!1}),o.addEventListener("keydown",J,{capture:!0,passive:!1}),o.addEventListener("keydown",Q),a}},ye=function(a){t.active&&!t.paused&&b._setSubtreeIsolation(!1),t.adjacentElements.clear(),t.alreadySilent.clear();var r=new Set,u=new Set,f=ue(a),d;try{for(f.s();!(d=f.n()).done;){var l=d.value;r.add(l);for(var c=typeof ShadowRoot<"u"&&l.getRootNode()instanceof ShadowRoot,v=l;v;){r.add(v);var p=v.parentElement,g=[];p?g=p.children:!p&&c&&(g=v.getRootNode().children,p=v.getRootNode().host,c=typeof ShadowRoot<"u"&&p.getRootNode()instanceof ShadowRoot);var T=ue(g),w;try{for(T.s();!(w=T.n()).done;){var N=w.value;u.add(N)}}catch(P){T.e(P)}finally{T.f()}v=p}}}catch(P){f.e(P)}finally{f.f()}r.forEach(function(P){u.delete(P)}),t.adjacentElements=u},$=function(){if(t.active)return o.removeEventListener("focusin",z,!0),o.removeEventListener("mousedown",_,!0),o.removeEventListener("touchstart",_,!0),o.removeEventListener("click",X,!0),o.removeEventListener("keydown",J,!0),o.removeEventListener("keydown",Q),b},me=function(a){var r=t.mostRecentlyFocusedNode;if(r){var u=a.some(function(d){var l=Array.from(d.removedNodes);return l.some(function(c){return c===r||typeof c.contains=="function"&&c.contains(r)})});if(u&&t.containers.some(function(d){return d?.isConnected})){R();var f=D();F(f)}}},q=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(me):void 0,L=function(){q&&(q.disconnect(),t.active&&!t.paused&&t.containers.map(function(a){q.observe(a,{subtree:!0,childList:!0})}))};return b={get active(){return t.active},get paused(){return t.paused},activate:function(a){if(t.active)return this;var r={};t.activation=r;var u=h(a,"onActivate"),f=h(a,"onPostActivate"),d=h(a,"checkCanFocusTrap"),l=k.getActiveTrap(y),c=!1;if(l&&!l.paused){var v;(v=l._setSubtreeIsolation)===null||v===void 0||v.call(l,!1),c=!0,r.preexistingTrap=l,O.set(l,(O.get(l)||0)+1)}try{d||R(),t.active=!0,t.paused=!1,t.nodeFocusedBeforeActivation=S(o),u?.({trap:b});var p=function(){if(!(!t.active||t.activation!==r)){d&&R();var w=function(){!t.active||t.activation!==r||(t.paused||b._setSubtreeIsolation(!0),L(),f?.({trap:b}))};U(r);var N=Z();N?N.then(w):w()}};if(d)return d(t.containers.concat()).then(p,p),this;p()}catch(T){if(U(r),l===k.getActiveTrap(y)&&c&&!O.has(l)){var g;(g=l._setSubtreeIsolation)===null||g===void 0||g.call(l,!0)}throw T}return this},deactivate:function(a){var r;if(!t.active)return this;var u=ce({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},a);clearTimeout(t.delayInitialFocusTimer),t.delayInitialFocusTimer=void 0,t.unpausing=void 0,t.paused||b._setSubtreeIsolation(!1),t.alreadySilent.clear(),$(),t.active=!1,t.paused=!1,L(),k.deactivateTrap(y,b);var f=(r=t.activation)===null||r===void 0?void 0:r.preexistingTrap;if(U(t.activation),!O.has(f)&&f===k.getActiveTrap(y)&&f!==null&&f!==void 0&&f.active&&!f.paused){var d;(d=f._setSubtreeIsolation)===null||d===void 0||d.call(f,!0)}var l=h(u,"onDeactivate"),c=h(u,"onPostDeactivate"),v=h(u,"checkCanReturnFocus"),p=h(u,"delayReturnFocus"),g=h(u,"returnFocus","returnFocusOnDeactivate");l?.({trap:b});var T=function(){g&&F(x(t.nodeFocusedBeforeActivation)),c?.({trap:b})},w=function(){p&&g?le(T):T()};return g&&v?(v(x(t.nodeFocusedBeforeActivation)).then(w,w),this):(w(),this)},pause:function(a){return t.active?(t.manuallyPaused=!0,this._setPausedState(!0,a)):this},unpause:function(a){return t.active?(t.manuallyPaused=!1,y[y.length-1]!==this?this:this._setPausedState(!1,a)):this},updateContainerElements:function(a){var r=[].concat(a).filter(Boolean);return t.containers=r.map(function(u){return typeof u=="string"?o.querySelector(u):u}),s.isolateSubtrees&&ye(t.containers),t.active&&(R(),t.paused||b._setSubtreeIsolation(!0)),L(),this}},Object.defineProperties(b,{_isManuallyPaused:{value:function(){return t.manuallyPaused}},_setPausedState:{value:function(a,r){if(t.paused===a)return this;if(t.paused=a,a){var u=h(r,"onPause"),f=h(r,"onPostPause");u?.({trap:b}),t.unpausing=void 0,$(),b._setSubtreeIsolation(!1),L(),f?.({trap:b})}else{var d=h(r,"onUnpause"),l=h(r,"onPostUnpause"),c={};if(t.unpausing=c,d?.({trap:b}),t.unpausing!==c)return this;var v=function(){if(!(!t.active||t.paused)){R();var g=function(){t.unpausing===c&&(O.has(b)||b._setSubtreeIsolation(!0),L(),l?.({trap:b}))},T=Z();T?T.then(g):g()}};v()}return this}},_setSubtreeIsolation:{value:function(a){if(s.isolateSubtrees){if(t.subtreeIsolated===a)return;t.subtreeIsolated=a,t.adjacentElements.forEach(function(r){var u;a?s.isolateSubtrees==="aria-hidden"?((r.ariaHidden==="true"||((u=r.getAttribute("aria-hidden"))===null||u===void 0?void 0:u.toLowerCase())==="true")&&t.alreadySilent.add(r),r.setAttribute("aria-hidden","true")):((r.inert||r.hasAttribute("inert"))&&t.alreadySilent.add(r),r.setAttribute("inert",!0)):t.alreadySilent.has(r)||(s.isolateSubtrees==="aria-hidden"?r.removeAttribute("aria-hidden"):r.removeAttribute("inert"))})}}}}),b.updateContainerElements(e),b};function ve(n,{focusTrapOptions:e},i){return!e?.extraContainers&&!i?n:[n,...be(e?.extraContainers),...be(i)]}function be(n=[]){return Array.isArray(n)?n:[n]}var H=new WeakSet;function Oe(n,e){let i=e&&e!==document.body&&e!==document.documentElement;return!H.has(n)&&i&&oe(e),!1}function Re(n,e){let i=e?.fallbackFocus||n,o=e?.clickOutsideDeactivates??!0,y;return{fallbackFocus:i,...e,document:n.ownerDocument,tabbableOptions:ie,trapStack:te().focusTrapStack,clickOutsideDeactivates:s=>(H.has(n)||H.add(n),typeof o=="function"?o(s):o),onActivate:s=>{e?.escapeDeactivates&&(y=new AbortController,n.addEventListener("keydown",t=>{if(t.key==="Escape"){let b=e?.escapeDeactivates;(typeof b=="function"?b(t):b??!0)&&s.trap.deactivate()}},{signal:y.signal})),e?.onActivate?.(s)},onDeactivate:s=>{y?.abort(),y=void 0,e?.onDeactivate?.(s)},onPostDeactivate:()=>{H.delete(n)},setReturnFocus:s=>{let t=typeof e?.setReturnFocus=="function"?e.setReturnFocus(s):e?.setReturnFocus;return t===void 0?Oe(n,s):t}}}var xe=(n={})=>ae((e,i)=>{let o,y,s,t=!1,b=n.focusTrapOptions,h=()=>n.triggerProp?!!e[n.triggerProp]:!0,E=()=>n.triggerProp?h():t,A=()=>typeof e.focusTrapDisabledOverride=="function"?!e.focusTrapDisabledOverride():!e.focusTrapDisabled,S=()=>{let F=y||e.el;F.isConnected&&(o||(s||=ve(F,e),o=de(s,Re(F,{...b,...e.focusTrapOptions}))),A()&&o.activate())},D=()=>{o?.deactivate()};return i.onConnected(()=>{o&&E()&&S()}),i.onUpdate(F=>{if(!(!e.hasUpdated||!F.has("focusTrapDisabled"))){if(e.focusTrapDisabled||!h()){D();return}E()&&S()}}),i.onDisconnected(()=>D()),{get _instance(){},activate:()=>{t=!0,S()},deactivate:()=>{t=!1,D()},overrideFocusTrapEl:F=>{if(o)throw new Error("Focus trap already created");y=F},setExtraContainers:F=>{let x=y||e.el;s=ve(x,e,F)},updateContainerElements:()=>o?.updateContainerElements(s)}});export{xe as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as t,b as r,c as n}from"./IWH5APVB.js";import{b as x}from"./WTNYMVTD.js";import{a as b}from"./GVTCSUCB.js";import{a as k}from"./JN6YLTUP.js";import{a as m}from"./MFI6726F.js";import"./TL56TNQ7.js";import{a as f}from"./BH3JLG7G.js";import{a as u}from"./VMHJHFFS.js";import"./JX5QRWOH.js";import"./IVIEPOEY.js";import{A as i}from"./W77STZAT.js";import{E as h,F as p,G as v,H as a,T as g,g as s,h as c,p as d}from"./EEOKRDQW.js";var $=s`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;max-inline-size:100%}:host([scale=s]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-sm);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-xs);--calcite-internal-card-header-text-container-padding-right: 0;--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-xs);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-xs);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-xs);--calcite-internal-card-slotted-content-padding: var(--calcite-space-sm);--calcite-internal-card-footer-padding-inline: var(--calcite-space-sm);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-base)}:host([scale=m]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-md);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-sm);--calcite-internal-card-header-text-container-padding-right: var(--calcite-space-base);--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-base);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-sm);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-sm);--calcite-internal-card-slotted-content-padding: var(--calcite-space-md);--calcite-internal-card-footer-padding-inline: var(--calcite-space-md);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-2xs)}:host([scale=l]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-lg);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-md);--calcite-internal-card-header-text-container-padding-right: var(--calcite-space-xs);--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-md);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-base);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-md);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-md);--calcite-internal-card-slotted-content-padding: var(--calcite-space-lg);--calcite-internal-card-footer-padding-inline: var(--calcite-space-lg);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-sm)}.content-wrapper{position:relative;display:flex;block-size:100%;flex-direction:column;justify-content:space-between;overflow:hidden;border:var(--calcite-border-width-sm) solid var(--calcite-card-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-card-corner-radius, var(--calcite-theme-corner-radius-none, var(--calcite-corner-radius-sharp)));background-color:var(--calcite-card-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));box-shadow:var(--calcite-card-shadow, var(--calcite-shadow-none));pointer-events:none}::slotted(*){pointer-events:auto}:host(:not([selectable])) .content-wrapper:not(.non-interactive){outline-color:transparent}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}.container{position:relative;display:flex;flex:1 1 auto;flex-direction:column}:host([loading]) .content-wrapper *:not(calcite-loader):not(.calcite-card-loader-container){pointer-events:none;opacity:0}:host([loading]) .calcite-card-loader-container{position:absolute;inset:0;display:flex;align-items:center}.header{display:flex;flex-direction:row;align-items:flex-start}.header-text-container{display:flex;flex-direction:column;inline-size:100%;justify-content:center;padding-inline:var(--calcite-internal-card-header-text-container-padding-inline);padding-block:var(--calcite-internal-card-header-text-container-padding-block)}.header-text-container:not(:only-child){padding-inline-end:var(--calcite-internal-card-header-text-container-padding-right)}.footer{display:flex;margin-block-start:auto;flex-direction:row;align-content:space-between;justify-content:space-between;padding-inline:var(--calcite-internal-card-footer-padding-inline);padding-block-start:var(--calcite-space-2xs);padding-block-end:var(--calcite-space-md)}.card-content{block-size:auto;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}.has-slotted-content{padding:var(--calcite-internal-card-slotted-content-padding)}:host([selected]) .content-wrapper{border:1px solid var(--calcite-card-accent-color-selected, var(--calcite-color-brand))}:host([selectable]) .header{padding-inline-end:var(--calcite-theme-space-3xl, var(--calcite-spacing-xxxl))}slot[name=heading]::slotted(*),*::slotted([slot=heading]){color:var(--calcite-color-text-1);margin:0;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-internal-card-heading-font-size)}slot[name=description]::slotted(*),*::slotted([slot=description]){color:var(--calcite-color-text-2);margin:0;font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal));line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-internal-card-description-font-size)}slot[name=thumbnail]::slotted(img),img::slotted([slot=thumbnail]){min-inline-size:100%;max-inline-size:100%}slot[name=footer-start]::slotted(*),*::slotted([slot=footer-start]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);align-self:center;margin-inline-end:auto}slot[name=footer-end]::slotted(*),*::slotted([slot=footer-end]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);align-self:center}.checkbox-wrapper-deprecated{position:absolute;pointer-events:auto;inset-block-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm));inset-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm));margin:0;padding:0;color:var(--calcite-card-selection-color, var(--calcite-color-text-3))}.checkbox-wrapper-deprecated:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));color:var(--calcite-card-selection-color-hover, var(--calcite-color-text-2))}.checkbox-wrapper-deprecated:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper{outline-color:transparent;cursor:pointer;pointer-events:auto;display:flex;align-items:center;justify-items:center;color:var(--calcite-card-selection-color, var(--calcite-color-text-3));padding:var(--calcite-internal-card-checkbox-wrapper-padding);margin:var(--calcite-internal-card-checkbox-wrapper-margin)}.checkbox-wrapper:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));color:var(--calcite-card-selection-color-hover, var(--calcite-color-text-2))}.checkbox-wrapper:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper calcite-icon{pointer-events:none}:host([selected]) .checkbox-wrapper-deprecated,:host([selected]) .checkbox-wrapper{color:var(--calcite-card-accent-color-selected, var(--calcite-color-brand))}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));color:var(--calcite-card-selection-color-hover, var(--calcite-color-text-2))}:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press));color:var(--calcite-card-accent-color-selected, var(--calcite-color-brand))}.thumbnail-wrapper{display:flex}.content-wrapper.inline{flex-direction:row}.content-wrapper.inline>.container{inline-size:60%}.content-wrapper.inline>.thumbnail-wrapper{align-items:flex-start;inline-size:40%}.content-wrapper.inline slot[name=thumbnail]::slotted(img),.content-wrapper.inline img::slotted([slot=thumbnail]){inline-size:100%}slot[name=footer-start]::slotted(*),slot[name=footer-end]::slotted(*){display:flex;gap:var(--calcite-internal-card-footer-start-end-gap)}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}`,l=class extends v{constructor(){super(...arguments),this.containerRef=h(),this.messages=m(),this.focusSetter=f()(this).setFocus,this.interactiveContainer=b(this),this.hasContent=!1,this.hasDescription=!1,this.hasFooterEnd=!1,this.hasFooterStart=!1,this.hasHeading=!1,this.hasThumbnail=!1,this.disabled=!1,this.loading=!1,this.scale="m",this.selectable=!1,this.selected=!1,this.selectionMode="none",this.thumbnailPosition="block-start",this.calciteCardSelect=d({cancelable:!1})}static{this.properties={hasContent:[16,{},{state:!0}],hasDescription:[16,{},{state:!0}],hasFooterEnd:[16,{},{state:!0}],hasFooterStart:[16,{},{state:!0}],hasHeading:[16,{},{state:!0}],hasThumbnail:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selectable:[7,{},{reflect:!0,type:Boolean}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,thumbnailPosition:[3,{},{reflect:!0}]}}static{this.styles=$}async setFocus(e){return this.focusSetter(()=>({target:this.containerRef.value,includeContainer:!0}),e)}handleThumbnailSlotChange(e){this.hasThumbnail=i(e)}handleHeadingSlotChange(e){this.hasHeading=i(e)}handleDescriptionSlotChange(e){this.hasDescription=i(e)}handleFooterStartSlotChange(e){this.hasFooterStart=i(e)}handleFooterEndSlotChange(e){this.hasFooterEnd=i(e)}handleDefaultSlotChange(e){this.hasContent=i(e)}keyDownHandler(e){e.target===this.containerRef.value&&!this.selectable&&!this.disabled&&k(e.key)&&this.selectionMode!=="none"&&(this.calciteCardSelect.emit(),e.preventDefault())}cardBodyClickHandler(e){e.target===this.containerRef.value&&!this.selectable&&!this.disabled&&this.selectionMode!=="none"&&this.calciteCardSelect.emit()}selectCardDeprecated(e){this.selected=e.currentTarget.checked,this.calciteCardSelect.emit()}cardSelectClick(e){this.disabled||(e.preventDefault(),this.calciteCardSelect.emit(),this.setFocus())}renderCheckboxDeprecated(){return c`<calcite-label class=${a(t.checkboxWrapperDeprecated)}><calcite-checkbox .checked=${this.selected} .label=${this.messages.select} @calciteCheckboxChange=${this.selectCardDeprecated}></calcite-checkbox></calcite-label>`}renderThumbnail(){return c`<section class=${a(t.thumbnailWrapper)} .hidden=${!this.hasThumbnail}><slot name=${r.thumbnail} @slotchange=${this.handleThumbnailSlotChange}></slot></section>`}renderSelectionIcon(){let e=this.selectionMode==="multiple"&&this.selected?n.selected:this.selectionMode==="multiple"?n.unselected:this.selected?n.selectedSingle:n.unselectedSingle;return c`<div class=${a(t.checkboxWrapper)} @pointerdown=${this.cardSelectClick} tabindex=-1><calcite-icon .icon=${e} .scale=${u(this.scale)}></calcite-icon></div>`}renderHeader(){let e=this.hasHeading||this.hasDescription;return c`<header class=${a(t.header)} .hidden=${!e}>${this.selectable?this.renderCheckboxDeprecated():null}<div class=${a(t.headerTextContainer)}><slot name=${r.heading} @slotchange=${this.handleHeadingSlotChange}></slot><slot name=${r.description} @slotchange=${this.handleDescriptionSlotChange}></slot></div>${this.selectionMode!=="none"&&this.renderSelectionIcon()||""}</header>`}renderFooter(){let e=this.hasFooterStart||this.hasFooterEnd;return c`<footer class=${a(t.footer)} .hidden=${!e}><slot name=${r.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot><slot name=${r.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></footer>`}render(){let e=this.thumbnailPosition.startsWith("inline"),o=this.thumbnailPosition.endsWith("start"),w=this.selectionMode==="multiple"?"checkbox":this.selectionMode!=="none"?"radio":void 0;return this.interactiveContainer({disabled:this.disabled,children:c`<div .ariaChecked=${this.selectionMode!=="none"?this.selected:void 0} .ariaLabel=${this.label} class=${a({[t.contentWrapper]:!0,inline:e})} @click=${this.cardBodyClickHandler} @keydown=${this.keyDownHandler} .role=${w} .tabIndex=${!this.selectable||this.disabled?0:-1} ${p(this.containerRef)}>${this.loading?c`<div aria-live=polite class="calcite-card-loader-container"><calcite-loader .label=${this.messages.loading}></calcite-loader></div>`:null}${o&&this.renderThumbnail()||""}<section .ariaBusy=${x(this.loading,void 0)} class=${a({[t.container]:!0})}>${this.renderHeader()}<div class=${a({[t.cardContent]:!0,[t.hasSlottedContent]:this.hasContent})}><slot @slotchange=${this.handleDefaultSlotChange}></slot></div>${this.renderFooter()}</section>${!o&&this.renderThumbnail()||""}</div>`})}};g("calcite-card",l);export{l as Card};
|
|
2
|
+
import{a as t,b as r,c as n}from"./IWH5APVB.js";import{b as x}from"./WTNYMVTD.js";import{a as b}from"./SVWITGRF.js";import{a as k}from"./JN6YLTUP.js";import{a as m}from"./6LHB5RGN.js";import"./TL56TNQ7.js";import{a as f}from"./72LA67LQ.js";import{a as u}from"./VMHJHFFS.js";import"./YE5HVMTC.js";import"./GBLGTHFD.js";import{A as i}from"./W77STZAT.js";import{E as h,F as p,G as v,H as a,T as g,g as s,h as c,p as d}from"./MPGHVV7O.js";var $=s`:host([disabled]){opacity:var(--calcite-opacity-disabled);cursor:default;-webkit-user-select:none;user-select:none}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;max-inline-size:100%}:host([scale=s]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-sm);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-xs);--calcite-internal-card-header-text-container-padding-right: 0;--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-xs);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-xs);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-xs);--calcite-internal-card-slotted-content-padding: var(--calcite-space-sm);--calcite-internal-card-footer-padding-inline: var(--calcite-space-sm);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-base)}:host([scale=m]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-md);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-sm);--calcite-internal-card-header-text-container-padding-right: var(--calcite-space-base);--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-base);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-sm);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-sm);--calcite-internal-card-slotted-content-padding: var(--calcite-space-md);--calcite-internal-card-footer-padding-inline: var(--calcite-space-md);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-2xs)}:host([scale=l]){--calcite-internal-card-header-text-container-padding-inline: var(--calcite-space-lg);--calcite-internal-card-header-text-container-padding-block: var(--calcite-space-md);--calcite-internal-card-header-text-container-padding-right: var(--calcite-space-xs);--calcite-internal-card-heading-font-size: var(--calcite-font-size-relative-md);--calcite-internal-card-description-font-size: var(--calcite-font-size-relative-base);--calcite-internal-card-checkbox-wrapper-padding: var(--calcite-space-md);--calcite-internal-card-checkbox-wrapper-margin: var(--calcite-space-md);--calcite-internal-card-slotted-content-padding: var(--calcite-space-lg);--calcite-internal-card-footer-padding-inline: var(--calcite-space-lg);--calcite-internal-card-footer-start-end-gap: var(--calcite-space-sm)}.content-wrapper{position:relative;display:flex;block-size:100%;flex-direction:column;justify-content:space-between;overflow:hidden;border:var(--calcite-border-width-sm) solid var(--calcite-card-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-card-corner-radius, var(--calcite-theme-corner-radius-none, var(--calcite-corner-radius-sharp)));background-color:var(--calcite-card-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)));box-shadow:var(--calcite-card-shadow, var(--calcite-shadow-none));pointer-events:none}::slotted(*){pointer-events:auto}:host(:not([selectable])) .content-wrapper:not(.non-interactive){outline-color:transparent}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-space-base) * (1 - 2 * clamp(0,var(--calcite-offset-invert-focus),1)))}.container{position:relative;display:flex;flex:1 1 auto;flex-direction:column}:host([loading]) .content-wrapper *:not(calcite-loader):not(.calcite-card-loader-container){pointer-events:none;opacity:0}:host([loading]) .calcite-card-loader-container{position:absolute;inset:0;display:flex;align-items:center}.header{display:flex;flex-direction:row;align-items:flex-start}.header-text-container{display:flex;flex-direction:column;inline-size:100%;justify-content:center;padding-inline:var(--calcite-internal-card-header-text-container-padding-inline);padding-block:var(--calcite-internal-card-header-text-container-padding-block)}.header-text-container:not(:only-child){padding-inline-end:var(--calcite-internal-card-header-text-container-padding-right)}.footer{display:flex;margin-block-start:auto;flex-direction:row;align-content:space-between;justify-content:space-between;padding-inline:var(--calcite-internal-card-footer-padding-inline);padding-block-start:var(--calcite-space-2xs);padding-block-end:var(--calcite-space-md)}.card-content{block-size:auto;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}.has-slotted-content{padding:var(--calcite-internal-card-slotted-content-padding)}:host([selected]) .content-wrapper{border:1px solid var(--calcite-card-accent-color-selected, var(--calcite-color-brand))}:host([selectable]) .header{padding-inline-end:var(--calcite-theme-space-3xl, var(--calcite-spacing-xxxl))}slot[name=heading]::slotted(*),*::slotted([slot=heading]){color:var(--calcite-color-text-1);margin:0;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-internal-card-heading-font-size)}slot[name=description]::slotted(*),*::slotted([slot=description]){color:var(--calcite-color-text-2);margin:0;font-weight:var(--calcite-theme-font-weight-regular, var(--calcite-font-weight-normal));line-height:var(--calcite-font-line-height-relative-snug);font-size:var(--calcite-internal-card-description-font-size)}slot[name=thumbnail]::slotted(img),img::slotted([slot=thumbnail]){min-inline-size:100%;max-inline-size:100%}slot[name=footer-start]::slotted(*),*::slotted([slot=footer-start]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);align-self:center;margin-inline-end:auto}slot[name=footer-end]::slotted(*),*::slotted([slot=footer-end]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);align-self:center}.checkbox-wrapper-deprecated{position:absolute;pointer-events:auto;inset-block-start:var(--calcite-theme-space-sm, var(--calcite-spacing-sm));inset-inline-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm));margin:0;padding:0;color:var(--calcite-card-selection-color, var(--calcite-color-text-3))}.checkbox-wrapper-deprecated:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));color:var(--calcite-card-selection-color-hover, var(--calcite-color-text-2))}.checkbox-wrapper-deprecated:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper{outline-color:transparent;cursor:pointer;pointer-events:auto;display:flex;align-items:center;justify-items:center;color:var(--calcite-card-selection-color, var(--calcite-color-text-3));padding:var(--calcite-internal-card-checkbox-wrapper-padding);margin:var(--calcite-internal-card-checkbox-wrapper-margin)}.checkbox-wrapper:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));color:var(--calcite-card-selection-color-hover, var(--calcite-color-text-2))}.checkbox-wrapper:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper calcite-icon{pointer-events:none}:host([selected]) .checkbox-wrapper-deprecated,:host([selected]) .checkbox-wrapper{color:var(--calcite-card-accent-color-selected, var(--calcite-color-brand))}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)));color:var(--calcite-card-selection-color-hover, var(--calcite-color-text-2))}:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press));color:var(--calcite-card-accent-color-selected, var(--calcite-color-brand))}.thumbnail-wrapper{display:flex}.content-wrapper.inline{flex-direction:row}.content-wrapper.inline>.container{inline-size:60%}.content-wrapper.inline>.thumbnail-wrapper{align-items:flex-start;inline-size:40%}.content-wrapper.inline slot[name=thumbnail]::slotted(img),.content-wrapper.inline img::slotted([slot=thumbnail]){inline-size:100%}slot[name=footer-start]::slotted(*),slot[name=footer-end]::slotted(*){display:flex;gap:var(--calcite-internal-card-footer-start-end-gap)}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}`,l=class extends v{constructor(){super(...arguments),this.containerRef=h(),this.messages=m(),this.focusSetter=f()(this).setFocus,this.interactiveContainer=b(this),this.hasContent=!1,this.hasDescription=!1,this.hasFooterEnd=!1,this.hasFooterStart=!1,this.hasHeading=!1,this.hasThumbnail=!1,this.disabled=!1,this.loading=!1,this.scale="m",this.selectable=!1,this.selected=!1,this.selectionMode="none",this.thumbnailPosition="block-start",this.calciteCardSelect=d({cancelable:!1})}static{this.properties={hasContent:[16,{},{state:!0}],hasDescription:[16,{},{state:!0}],hasFooterEnd:[16,{},{state:!0}],hasFooterStart:[16,{},{state:!0}],hasHeading:[16,{},{state:!0}],hasThumbnail:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selectable:[7,{},{reflect:!0,type:Boolean}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,thumbnailPosition:[3,{},{reflect:!0}]}}static{this.styles=$}async setFocus(e){return this.focusSetter(()=>({target:this.containerRef.value,includeContainer:!0}),e)}handleThumbnailSlotChange(e){this.hasThumbnail=i(e)}handleHeadingSlotChange(e){this.hasHeading=i(e)}handleDescriptionSlotChange(e){this.hasDescription=i(e)}handleFooterStartSlotChange(e){this.hasFooterStart=i(e)}handleFooterEndSlotChange(e){this.hasFooterEnd=i(e)}handleDefaultSlotChange(e){this.hasContent=i(e)}keyDownHandler(e){e.target===this.containerRef.value&&!this.selectable&&!this.disabled&&k(e.key)&&this.selectionMode!=="none"&&(this.calciteCardSelect.emit(),e.preventDefault())}cardBodyClickHandler(e){e.target===this.containerRef.value&&!this.selectable&&!this.disabled&&this.selectionMode!=="none"&&this.calciteCardSelect.emit()}selectCardDeprecated(e){this.selected=e.currentTarget.checked,this.calciteCardSelect.emit()}cardSelectClick(e){this.disabled||(e.preventDefault(),this.calciteCardSelect.emit(),this.setFocus())}renderCheckboxDeprecated(){return c`<calcite-label class=${a(t.checkboxWrapperDeprecated)}><calcite-checkbox .checked=${this.selected} .label=${this.messages.select} @calciteCheckboxChange=${this.selectCardDeprecated}></calcite-checkbox></calcite-label>`}renderThumbnail(){return c`<section class=${a(t.thumbnailWrapper)} .hidden=${!this.hasThumbnail}><slot name=${r.thumbnail} @slotchange=${this.handleThumbnailSlotChange}></slot></section>`}renderSelectionIcon(){let e=this.selectionMode==="multiple"&&this.selected?n.selected:this.selectionMode==="multiple"?n.unselected:this.selected?n.selectedSingle:n.unselectedSingle;return c`<div class=${a(t.checkboxWrapper)} @pointerdown=${this.cardSelectClick} tabindex=-1><calcite-icon .icon=${e} .scale=${u(this.scale)}></calcite-icon></div>`}renderHeader(){let e=this.hasHeading||this.hasDescription;return c`<header class=${a(t.header)} .hidden=${!e}>${this.selectable?this.renderCheckboxDeprecated():null}<div class=${a(t.headerTextContainer)}><slot name=${r.heading} @slotchange=${this.handleHeadingSlotChange}></slot><slot name=${r.description} @slotchange=${this.handleDescriptionSlotChange}></slot></div>${this.selectionMode!=="none"&&this.renderSelectionIcon()||""}</header>`}renderFooter(){let e=this.hasFooterStart||this.hasFooterEnd;return c`<footer class=${a(t.footer)} .hidden=${!e}><slot name=${r.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot><slot name=${r.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></footer>`}render(){let e=this.thumbnailPosition.startsWith("inline"),o=this.thumbnailPosition.endsWith("start"),w=this.selectionMode==="multiple"?"checkbox":this.selectionMode!=="none"?"radio":void 0;return this.interactiveContainer({disabled:this.disabled,children:c`<div .ariaChecked=${this.selectionMode!=="none"?this.selected:void 0} .ariaLabel=${this.label} class=${a({[t.contentWrapper]:!0,inline:e})} @click=${this.cardBodyClickHandler} @keydown=${this.keyDownHandler} .role=${w} .tabIndex=${!this.selectable||this.disabled?0:-1} ${p(this.containerRef)}>${this.loading?c`<div aria-live=polite class="calcite-card-loader-container"><calcite-loader .label=${this.messages.loading}></calcite-loader></div>`:null}${o&&this.renderThumbnail()||""}<section .ariaBusy=${x(this.loading,void 0)} class=${a({[t.container]:!0})}>${this.renderHeader()}<div class=${a({[t.cardContent]:!0,[t.hasSlottedContent]:this.hasContent})}><slot @slotchange=${this.handleDefaultSlotChange}></slot></div>${this.renderFooter()}</section>${!o&&this.renderThumbnail()||""}</div>`})}};g("calcite-card",l);export{l as Card};
|