@esri/calcite-components 6.0.0-next.29 → 6.0.0-next.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/dist/cdn/{J7X4A3ZF.js → 26ZHQ7BU.js} +1 -1
  2. package/dist/cdn/{QBKHKR3D.js → 27RYO3S3.js} +1 -1
  3. package/dist/cdn/{VJWD7FH3.js → 2MQ3WWV6.js} +1 -1
  4. package/dist/cdn/{BJFYIDJP.js → 32L6XZV2.js} +1 -1
  5. package/dist/cdn/{LTMQC4S4.js → 34LORM54.js} +1 -1
  6. package/dist/cdn/{MXEEH5EI.js → 3B2ZDL33.js} +1 -1
  7. package/dist/cdn/{KP5SZ66O.js → 3INSFKSX.js} +1 -1
  8. package/dist/cdn/{RKIY6WHY.js → 444236DE.js} +1 -1
  9. package/dist/cdn/47WLTGVK.js +2 -0
  10. package/dist/cdn/{KSUVZQ5Y.js → 4GJVPFBQ.js} +1 -1
  11. package/dist/cdn/{6FOBVDYE.js → 4LQENKOC.js} +1 -1
  12. package/dist/cdn/{3Q2LEAYP.js → 4U3UP55J.js} +1 -1
  13. package/dist/cdn/{XKIF342Q.js → 4YAW7S6I.js} +1 -1
  14. package/dist/cdn/{XSVS2DOW.js → 54Y2XWNM.js} +1 -1
  15. package/dist/cdn/{QZLQI36H.js → 5LZ756VG.js} +1 -1
  16. package/dist/cdn/{7AUNAF3M.js → 5QTRE4DW.js} +1 -1
  17. package/dist/cdn/{SRVL4B2W.js → 5RCRYCLG.js} +1 -1
  18. package/dist/cdn/{F7QXEGBS.js → 5XN6EOKV.js} +1 -1
  19. package/dist/cdn/{UTUHWCD7.js → 65S2O64A.js} +1 -1
  20. package/dist/cdn/{6Z52HHB6.js → 66MGO5ZU.js} +1 -1
  21. package/dist/cdn/{Q4BRTY6R.js → 66VFQ7FS.js} +1 -1
  22. package/dist/cdn/{H2Z2GH36.js → 6I7EXQHZ.js} +1 -1
  23. package/dist/cdn/{TZLBK6RN.js → 6PI5JKRE.js} +1 -1
  24. package/dist/cdn/{UF2QE2DA.js → 6SZN3UEC.js} +1 -1
  25. package/dist/cdn/6TP6A2OR.js +2 -0
  26. package/dist/cdn/{5IL2ZPCL.js → 6WXRX7AM.js} +1 -1
  27. package/dist/cdn/{FI5PK3FL.js → 7KM376VM.js} +1 -1
  28. package/dist/cdn/{S57TJIFW.js → 7KQIWP5A.js} +1 -1
  29. package/dist/cdn/{EUXTAWW7.js → 7RQHFOJK.js} +1 -1
  30. package/dist/cdn/{7NFADUTT.js → AE5P23AX.js} +1 -1
  31. package/dist/cdn/{CGJCCSPN.js → AGD2EOLY.js} +1 -1
  32. package/dist/cdn/{SS4SRALC.js → AKAXKJA2.js} +1 -1
  33. package/dist/cdn/{TC6K3NOQ.js → AWYSKRFD.js} +1 -1
  34. package/dist/cdn/{RBNVRR4B.js → BEI2Q4QV.js} +1 -1
  35. package/dist/cdn/{TUDKL65E.js → BIBBX2NQ.js} +1 -1
  36. package/dist/cdn/{LEX3BVJR.js → BMHY44X2.js} +1 -1
  37. package/dist/cdn/{EV3EWA5Q.js → BOPWFMNV.js} +1 -1
  38. package/dist/cdn/{BYCVNDL2.js → BTB6KHWC.js} +1 -1
  39. package/dist/cdn/{65NP4EGJ.js → BUD3X4EV.js} +1 -1
  40. package/dist/cdn/{3PG6Y3I3.js → BZ7XAOLC.js} +1 -1
  41. package/dist/cdn/{L4K4JIJ5.js → BZD6X5QP.js} +1 -1
  42. package/dist/cdn/{SX6TNVU7.js → BZZ3PDRE.js} +1 -1
  43. package/dist/cdn/{GE7IFILW.js → C664KWJK.js} +1 -1
  44. package/dist/cdn/{MYSHZV4C.js → C6JSMZCR.js} +1 -1
  45. package/dist/cdn/C7SUNBF3.js +2 -0
  46. package/dist/cdn/{JMBBMHRC.js → CGICD7ZG.js} +1 -1
  47. package/dist/cdn/{7DOG6YZC.js → CRJ7GEOB.js} +1 -1
  48. package/dist/cdn/{KM4NVHVQ.js → D6FYHCKK.js} +1 -1
  49. package/dist/cdn/{LCJ3PCQ4.js → DC52WCG4.js} +1 -1
  50. package/dist/cdn/{JR6MZSRX.js → DM56VGTT.js} +1 -1
  51. package/dist/cdn/{T5DZKDMX.js → DR4XSQZU.js} +1 -1
  52. package/dist/cdn/{NK63ALK7.js → DV5KMXKC.js} +1 -1
  53. package/dist/cdn/{ZFWFECDT.js → E4TS5FQE.js} +1 -1
  54. package/dist/cdn/{VTMV66QN.js → E67XH4JQ.js} +1 -1
  55. package/dist/cdn/{AJOWYDOG.js → EGLMU2AU.js} +1 -1
  56. package/dist/cdn/{OE4V26HH.js → ERP7JCOT.js} +1 -1
  57. package/dist/cdn/{56JLNRYX.js → EYRAVDKP.js} +1 -1
  58. package/dist/cdn/{NSQJKBOO.js → F6OZCUVP.js} +1 -1
  59. package/dist/cdn/{TTY44OFP.js → FGPKBUR3.js} +1 -1
  60. package/dist/cdn/{QAAX5OQX.js → G7VCDZAH.js} +1 -1
  61. package/dist/cdn/{HULDMXF6.js → GBTJTOXL.js} +1 -1
  62. package/dist/cdn/{3EJMLBG5.js → GLRXNYZY.js} +1 -1
  63. package/dist/cdn/{GHGAQBRL.js → GYAMAUXY.js} +1 -1
  64. package/dist/cdn/{UM6NXFFG.js → H2LEXNC7.js} +1 -1
  65. package/dist/cdn/{7FWDZCAS.js → H5ZWUCNU.js} +1 -1
  66. package/dist/cdn/{YARE3LTH.js → HAEXMEIN.js} +1 -1
  67. package/dist/cdn/{5L4NFDSD.js → HDWQ7NSI.js} +1 -1
  68. package/dist/cdn/{6B3Z35ZN.js → HEQ6QW3K.js} +1 -1
  69. package/dist/cdn/{PHFE647U.js → HUTTOR7N.js} +1 -1
  70. package/dist/cdn/{ZNN7THFW.js → I4AFXPRB.js} +1 -1
  71. package/dist/cdn/{NY2AHWA2.js → I6UMOKHJ.js} +1 -1
  72. package/dist/cdn/{4VFYQZBZ.js → IBUMIXPU.js} +1 -1
  73. package/dist/cdn/{JXEM5Z4O.js → IE3D5G6W.js} +1 -1
  74. package/dist/cdn/{AAH5EARD.js → IH6VM7RW.js} +1 -1
  75. package/dist/cdn/{A7TRTFSC.js → IROQKMX4.js} +1 -1
  76. package/dist/cdn/{HXLWBKPJ.js → J3NX74VT.js} +1 -1
  77. package/dist/cdn/{USZDPVIJ.js → JED2BFML.js} +1 -1
  78. package/dist/cdn/{C43ZXEWO.js → JLH4SXHH.js} +1 -1
  79. package/dist/cdn/{4MKSADCX.js → JNL2MGPV.js} +1 -1
  80. package/dist/cdn/{ANO2XJDF.js → JWRK3M36.js} +1 -1
  81. package/dist/cdn/{F23EUS7Z.js → JXSCNDAH.js} +1 -1
  82. package/dist/cdn/{UKHGKVTR.js → K773C63U.js} +1 -1
  83. package/dist/cdn/{EDHUB66C.js → KETKIVWP.js} +1 -1
  84. package/dist/cdn/{7BZSXVMQ.js → KF2PRC3N.js} +1 -1
  85. package/dist/cdn/{7URWXTLY.js → KGTOCD7C.js} +1 -1
  86. package/dist/cdn/{DMHUFZHH.js → KIT7NU4F.js} +1 -1
  87. package/dist/cdn/{5Q6FCXBG.js → KLALTZ6M.js} +1 -1
  88. package/dist/cdn/{PTRDVGLX.js → KOOUNRK4.js} +1 -1
  89. package/dist/cdn/{3ME55ZJK.js → L2PORTM4.js} +1 -1
  90. package/dist/cdn/{O2CKRXA4.js → LKSMSNM7.js} +1 -1
  91. package/dist/cdn/{4ZGVSWZI.js → LKYZVTZF.js} +1 -1
  92. package/dist/cdn/{W6XFBRE6.js → LQX75TZ6.js} +1 -1
  93. package/dist/cdn/{CTOW2HON.js → LRGOLZEK.js} +1 -1
  94. package/dist/cdn/{T3DVVGZX.js → LZ6OXXTM.js} +1 -1
  95. package/dist/cdn/{E7PZ4OAV.js → N4Y4IVWT.js} +1 -1
  96. package/dist/cdn/{JV72IXPB.js → N5725US7.js} +1 -1
  97. package/dist/cdn/{MNWMISWE.js → NBZ37GX7.js} +1 -1
  98. package/dist/cdn/{567B4UOS.js → OR22OBUK.js} +1 -1
  99. package/dist/cdn/{J3NC35DL.js → OYQLEYK5.js} +1 -1
  100. package/dist/cdn/{DEIIHGSF.js → P2PASM66.js} +1 -1
  101. package/dist/cdn/{G6AL4MTN.js → PERDWZWY.js} +1 -1
  102. package/dist/cdn/{SXHYAGRQ.js → PO6YL62I.js} +1 -1
  103. package/dist/cdn/{PFDHLRYF.js → PQ6MRDKH.js} +1 -1
  104. package/dist/cdn/{T7PXQTRN.js → Q4DOOVM7.js} +1 -1
  105. package/dist/cdn/{BX4GIY6F.js → Q4WATFR3.js} +1 -1
  106. package/dist/cdn/{OBZCBBAJ.js → QDYPYDT7.js} +1 -1
  107. package/dist/cdn/{MM7N2646.js → QEVG42UL.js} +1 -1
  108. package/dist/cdn/{TVDFD3QT.js → QEW6GSYQ.js} +1 -1
  109. package/dist/cdn/{O7B5CQ4B.js → QLODMQBD.js} +1 -1
  110. package/dist/cdn/{F5ITNV4F.js → QYVKOLJZ.js} +1 -1
  111. package/dist/cdn/{GLE4BG4H.js → RHG4MWDQ.js} +1 -1
  112. package/dist/cdn/{ZMEGH75G.js → ROZEV7RT.js} +1 -1
  113. package/dist/cdn/{IUB3JJKD.js → S3MNGCZD.js} +1 -1
  114. package/dist/cdn/{DZJITRG3.js → SIEIL7FM.js} +1 -1
  115. package/dist/cdn/{2HCRM3JW.js → SN5B3KVW.js} +1 -1
  116. package/dist/cdn/{RDYZPOTP.js → SVFPRHA6.js} +1 -1
  117. package/dist/cdn/{PL7XKE3Y.js → T7YGUZSK.js} +1 -1
  118. package/dist/cdn/{54SKIDRI.js → TCRMJM5C.js} +1 -1
  119. package/dist/cdn/{XHQCY62T.js → TNDQWC77.js} +1 -1
  120. package/dist/cdn/{QJ26H6F6.js → U5TTY3OC.js} +1 -1
  121. package/dist/cdn/{NGNU3GAC.js → UR6MPMXC.js} +1 -1
  122. package/dist/cdn/{BYE4ZOV7.js → URTYW475.js} +1 -1
  123. package/dist/cdn/{HSXLUGF4.js → V2AKOENX.js} +1 -1
  124. package/dist/cdn/{2THHALCV.js → V3KLQ5UF.js} +1 -1
  125. package/dist/cdn/{ANVPI4NC.js → VCZHUG3S.js} +1 -1
  126. package/dist/cdn/{VTXJ57FS.js → VSQINAGH.js} +1 -1
  127. package/dist/cdn/{KYKYK236.js → WB7RXQJA.js} +1 -1
  128. package/dist/cdn/{33ZL5S7V.js → WBQQBVVC.js} +1 -1
  129. package/dist/cdn/{ENDTWKGW.js → WCZUTUTW.js} +1 -1
  130. package/dist/cdn/{FCATUNYX.js → X4VMA74R.js} +1 -1
  131. package/dist/cdn/{MBGIUTAP.js → XF25BJXC.js} +1 -1
  132. package/dist/cdn/{46VZWMD7.js → XI5BUNVP.js} +1 -1
  133. package/dist/cdn/{X24TBTXT.js → Y2BRPES3.js} +1 -1
  134. package/dist/cdn/{XRM2MIPP.js → YDT6TQRJ.js} +1 -1
  135. package/dist/cdn/{GMPHAYB2.js → YXTWPSNG.js} +1 -1
  136. package/dist/cdn/{RFCVRKK6.js → YZOCZJGM.js} +1 -1
  137. package/dist/cdn/{3FMB76YM.js → Z2C6GGRO.js} +1 -1
  138. package/dist/cdn/{IQNT76LY.js → ZDSKF5YJ.js} +1 -1
  139. package/dist/cdn/{ITNERLJE.js → ZEIISDRS.js} +1 -1
  140. package/dist/cdn/{XJEX6TCG.js → ZF366KLH.js} +1 -1
  141. package/dist/cdn/index.js +2 -2
  142. package/dist/cdn/main.css +1 -1
  143. package/dist/chunks/responsive.js +2 -2
  144. package/dist/chunks/runtime.js +3 -3
  145. package/dist/chunks/utils3.js +4 -4
  146. package/dist/components/calcite-color-picker/customElement.d.ts +1 -1
  147. package/dist/components/calcite-color-picker/customElement.js +1 -1
  148. package/dist/docs/api.json +1 -1
  149. package/dist/docs/docs.json +1 -1
  150. package/dist/docs/vscode.css-custom-data.json +1 -1
  151. package/dist/docs/vscode.html-custom-data.json +1 -1
  152. package/dist/docs/web-types.json +1 -1
  153. package/package.json +3 -3
  154. package/dist/cdn/6MDH7C4R.js +0 -2
  155. package/dist/cdn/GODDGRIM.js +0 -2
  156. package/dist/cdn/R7VZJOKU.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as T}from"./FDHY2TZA.js";import{j as L}from"./HSXLUGF4.js";import{a as p}from"./XSVS2DOW.js";import{a as M}from"./SX6TNVU7.js";import"./JN6YLTUP.js";import"./CGJCCSPN.js";import"./SXHYAGRQ.js";import{u as V}from"./RRBGCYLX.js";import{E as u,F as m,G as z,H as b,I as v,T as C,g as k,h}from"./QAAX5OQX.js";var r={container:"container",fill:"fill",stepLine:"step-line",label:"label",labelHidden:"label-hidden",labelRange:"label-range",labelValue:"label-value",unitLabel:"unit-label",stepsVisible:"steps-visible",valueVisible:"value-visible",success:"fill-success",warning:"fill-warning",danger:"fill-danger"},N=k`: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([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}:host{display:flex;--calcite-internal-meter-space: var(--calcite-theme-space-base, var(--calcite-spacing-base));--calcite-internal-meter-height: var(--calcite-theme-space-lg, var(--calcite-spacing-lg));--calcite-internal-meter-font-size: var(--calcite-font-size--1);--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand));--calcite-internal-meter-background-color: var( --calcite-meter-background-color, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)) );--calcite-internal-meter-border-color: var(--calcite-meter-border-color, var(--calcite-color-border-2));--calcite-internal-meter-shadow: var(--calcite-meter-shadow, var(--calcite-shadow-none));--calcite-internal-meter-corner-radius: var(--calcite-meter-corner-radius, 9999px);--calcite-internal-meter-value-text-color: var(--calcite-meter-value-text-color, var(--calcite-color-text-1));--calcite-internal-meter-range-text-color: var(--calcite-meter-range-text-color, var(--calcite-color-text-3));--calcite-internal-meter-label-line-height: var(--calcite-font-line-height-base)}:host([scale=s]){--calcite-internal-meter-height: var(--calcite-theme-space-md, var(--calcite-spacing-md));--calcite-internal-meter-font-size: var(--calcite-font-size--2)}:host([scale=l]){--calcite-internal-meter-height: var(--calcite-theme-space-2xl, var(--calcite-spacing-xxl));--calcite-internal-meter-font-size: var(--calcite-font-size-0);--calcite-internal-meter-label-line-height: var(--calcite-font-line-height-md)}:host([appearance=solid]){--calcite-internal-meter-border-color: var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3));--calcite-internal-meter-background-color: var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3))}:host([appearance=outline]){--calcite-internal-meter-background-color: transparent}.fill{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand))}.fill-danger{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-danger))}.fill-success{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-success))}.fill-warning{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-warning))}.container{display:flex;position:relative;align-items:center;margin:0;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-internal-meter-height);background-color:var(--calcite-internal-meter-background-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-meter-border-color);border-radius:var(--calcite-internal-meter-corner-radius);box-shadow:var(--calcite-internal-meter-shadow)}.value-visible{margin-block-start:var(--calcite-theme-space-2xl, var(--calcite-spacing-xxl))}.steps-visible{margin-block-end:var(--calcite-theme-space-2xl, var(--calcite-spacing-xxl))}.step-line{display:block;position:absolute;inset-block:var(--calcite-space-none);inline-size:var(--calcite-internal-meter-space);background-color:var(--calcite-internal-meter-border-color)}.label{position:absolute;display:flex;gap:var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs));font-size:var(--calcite-internal-meter-font-size);line-height:var(--calcite-internal-meter-label-line-height)}.label-hidden{visibility:hidden;opacity:0}.label-value{inset-block-end:calc(100% + .5em);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-internal-meter-value-text-color)}.label-range{color:var(--calcite-internal-meter-range-text-color);inset-block-start:calc(100% + .5em)}.label-range .unit-label{font-weight:var(--calcite-font-weight-medium)}.fill{display:block;position:absolute;transition-timing-function:var(--calcite-animation-easing-function);z-index:var(--calcite-z-index);inset-inline-start:var(--calcite-internal-meter-space);inset-block:var(--calcite-internal-meter-space);border-radius:var(--calcite-internal-meter-corner-radius);max-inline-size:calc(100% - var(--calcite-internal-meter-space) * 2);min-inline-size:calc(var(--calcite-internal-meter-height) - var(--calcite-internal-meter-space) * 2);background-color:var(--calcite-internal-meter-fill-color);transition-property:inline-size,background-color,box-shadow}.solid .fill{inset-block:0;inset-inline-start:0;max-inline-size:100%;min-inline-size:calc(var(--calcite-internal-meter-height));box-shadow:0 0 0 1px var(--calcite-internal-meter-fill-color)}`,y=class extends z{constructor(){super(...arguments),this.highLabelRef=u(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelRef=u(),this.maxLabelRef=u(),this.maxPercent=100,this.messages=M({name:null}),this.meterContainerRef=u(),this.minLabelRef=u(),this.minPercent=0,this.resizeObserver=T("resize",()=>this.resizeHandler()),this.valueLabelRef=u(),this.currentPercent=0,this.highActive=!1,this.highPercent=100,this.lowActive=!1,this.lowPercent=0,this.appearance="outline-fill",this.disabled=!1,this.fillType="range",this.groupSeparator=!1,this.max=100,this.min=0,this.rangeLabelType="percent",this.rangeLabels=!1,this.scale="m",this.unitLabel="",this.valueLabel=!1,this.valueLabelType="percent"}static{this.properties={currentPercent:[16,{},{state:!0}],highActive:[16,{},{state:!0}],highPercent:[16,{},{state:!0}],lowActive:[16,{},{state:!0}],lowPercent:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillType:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],high:[11,{},{reflect:!0,type:Number}],label:1,low:[11,{},{reflect:!0,type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,rangeLabelType:[3,{},{reflect:!0}],rangeLabels:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],unitLabel:1,value:[9,{},{type:Number}],valueLabel:[7,{},{reflect:!0,type:Boolean}],valueLabelType:[3,{},{reflect:!0}]}}static{this.styles=N}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}load(){this.calculateValues()}willUpdate(e){(e.has("min")&&(this.hasUpdated||this.min!==0)||e.has("max")&&(this.hasUpdated||this.max!==100)||e.has("low")||e.has("high")||e.has("value"))&&this.handleRangeChange(),(e.has("rangeLabels")&&(this.hasUpdated||this.rangeLabels!==!1)||e.has("rangeLabelType")&&(this.hasUpdated||this.rangeLabelType!=="percent")||e.has("unitLabel")&&(this.hasUpdated||this.unitLabel!=="")||e.has("valueLabel")&&(this.hasUpdated||this.valueLabel!==!1)||e.has("valueLabelType")&&(this.hasUpdated||this.valueLabelType!=="percent"))&&this.updateLabels()}loaded(){this.updateLabels()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.determineValueLabelPosition(),this.determineVisibleLabels()}calculateValues(){let{min:e,max:a,low:t,high:l,value:i}=this,n=t===void 0?NaN:100*(t-e)/(a-e),s=l===void 0?NaN:100*(l-e)/(a-e),c=i===void 0?NaN:100*(i-e)/(a-e);(!t||t<e||l!==void 0&&t>l||t>a)&&(this.low=e),(!l||l>a||t!==void 0&&l<t||l<e)&&(this.high=a),i||(this.value=e),this.lowPercent=n,this.highPercent=s,this.currentPercent=i?c:0,this.lowActive=!!t&&t>e&&(!i||t>i)&&(!l||t<l),this.highActive=!!l&&e<=l&&l<a&&(!i||l>i)&&(!t||l>t)}formatLabel(e,a){if(a==="percent"){if(!this.percentFormatting){let t=this.messages._lang,l=new Intl.NumberFormat(t,{useGrouping:this.groupSeparator,style:"percent"});this.percentFormatting={formatter:l,locale:t}}return this.percentFormatting.formatter.format(e)}else return L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())}getMeterKindCssClass(){let{low:e,high:a,min:t,max:l,value:i}=this,n=e||t,s=a||l,c=i!==void 0&&i>=n,d=i!==void 0&&i<n,f=i!==void 0&&i>=s,o=i!==void 0&&i<s;return!i||!e&&o||d?r.success:c&&o?r.warning:f?r.danger:r.success}intersects(e,a){return!!(e&&a&&V(e.getBoundingClientRect(),a.getBoundingClientRect()))}determineVisibleLabels(){if(!this.rangeLabels)return;let{minLabelRef:{value:e},lowLabelRef:{value:a},highLabelRef:{value:t},maxLabelRef:{value:l}}=this,i=this.intersects(t,l),n=this.intersects(a,t),s=this.intersects(a,l),c=this.intersects(e,t),d=this.intersects(e,a),f=this.intersects(e,l),o=r.labelHidden;a&&(d||s||n?a.classList.add(o):a.classList.remove(o)),t&&(c||s||i?t.classList.add(o):t.classList.remove(o)),e&&l&&(f?l.classList.add(o):l.classList.remove(o))}determineValueLabelPosition(){let{valueLabelRef:{value:e},meterContainerRef:{value:a},currentPercent:t}=this;if(!e||!a)return;let l=t>100?100:t>0?t:0,i=e.getBoundingClientRect().width,n=a.getBoundingClientRect().width,s=100*(i-0)/(n-0);l+s>=100?(e.style.insetInlineEnd="0%",e.style.removeProperty("inset-inline-start")):(e.style.insetInlineStart=`${l}% `,e.style.removeProperty("inset-inline-end"))}renderMeterFill(){let{currentPercent:e,fillType:a}=this,t=this.getMeterKindCssClass();return h`<div class=${b({[r.fill]:!0,[t]:a!=="single"})} style=${v({width:`${e}%`})}></div>`}renderRangeLine(e){let a={insetInlineStart:`${e}%`};return h`<div class=${b(r.stepLine)} style=${v(a)}></div>`}renderValueLabel(){let{currentPercent:e,valueLabelType:a,unitLabel:t,value:l}=this,i=this.formatLabel(a==="percent"?e/100:l||0,a);return p("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelValue]:!0})} ${m(this.valueLabelRef)}>${i}${t&&a!=="percent"&&h`<span class=${b(r.unitLabel)}>${t}</span>`||""}</div>`)}renderMinLabel(){let{rangeLabelType:e,min:a,minPercent:t,unitLabel:l}=this,i={insetInlineStart:`${t}%`},n=this.formatLabel(e==="percent"?t:a,e);return p("min-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${v(i)} ${m(this.minLabelRef)}>${n}${l&&e!=="percent"&&h`<span class=${b(r.unitLabel)}>${l}</span>`||""}</div>`)}renderLowLabel(){let{rangeLabelType:e,low:a,lowPercent:t,highPercent:l,labelFlipProximity:i}=this,n=a?this.formatLabel(e==="percent"?t/100:a,e):"",s={insetInlineStart:`${t}%`},c={insetInlineEnd:`${100-t}%`},d=(l-t)/100<i?c:s;return p("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${v(d)} ${m(this.lowLabelRef)}>${n}</div>`)}renderHighLabel(){let{rangeLabelType:e,high:a,highPercent:t,labelFlipMax:l}=this,i=a?this.formatLabel(e==="percent"?t/100:a,e):"",n={insetInlineStart:`${t}%`},s={insetInlineEnd:`${100-t}%`},c=t/100>=l?s:n;return p("high-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${v(c)} ${m(this.highLabelRef)}>${i}</div>`)}renderMaxLabel(){let{rangeLabelType:e,max:a,maxPercent:t}=this,l={insetInlineEnd:`${100-t}%`},i=this.formatLabel(e==="percent"?t/100:a,e);return p("max-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${v(l)} ${m(this.maxLabelRef)}>${i}</div>`)}render(){let{appearance:e,currentPercent:a,highActive:t,highPercent:l,label:i,lowActive:n,lowPercent:s,max:c,maxPercent:d,min:f,minPercent:o,rangeLabels:g,rangeLabelType:x,unitLabel:w,value:$,valueLabel:P,valueLabelType:R}=this,S=this.formatLabel(a/100,"percent"),F=`${$} ${w}`;return h`<div .ariaLabel=${i} .ariaValueMax=${x==="percent"?d:c} .ariaValueMin=${x==="percent"?o:f} .ariaValueNow=${R==="percent"?a:$} .ariaValueText=${R==="percent"?S:w?F:void 0} class=${b({[r.container]:!0,[r.stepsVisible]:g,[r.valueVisible]:P,[e]:e!=="outline-fill"})} role=meter ${m(this.meterContainerRef)}>${this.renderMeterFill()}${P&&this.renderValueLabel()||""}${n&&this.renderRangeLine(s)||""}${t&&this.renderRangeLine(l)||""}${g&&this.renderMinLabel()||""}${g&&n&&this.renderLowLabel()||""}${g&&t&&this.renderHighLabel()||""}${g&&this.renderMaxLabel()||""}</div>`}};C("calcite-meter",y);export{y as Meter};
2
+ import{a as T}from"./FDHY2TZA.js";import{j as L}from"./V2AKOENX.js";import{a as p}from"./54Y2XWNM.js";import{a as M}from"./BZZ3PDRE.js";import"./JN6YLTUP.js";import"./AGD2EOLY.js";import"./PO6YL62I.js";import{u as V}from"./RRBGCYLX.js";import{E as u,F as m,G as z,H as b,I as v,T as C,g as k,h}from"./G7VCDZAH.js";var r={container:"container",fill:"fill",stepLine:"step-line",label:"label",labelHidden:"label-hidden",labelRange:"label-range",labelValue:"label-value",unitLabel:"unit-label",stepsVisible:"steps-visible",valueVisible:"value-visible",success:"fill-success",warning:"fill-warning",danger:"fill-danger"},N=k`: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([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}:host{display:flex;--calcite-internal-meter-space: var(--calcite-theme-space-base, var(--calcite-spacing-base));--calcite-internal-meter-height: var(--calcite-theme-space-lg, var(--calcite-spacing-lg));--calcite-internal-meter-font-size: var(--calcite-font-size--1);--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand));--calcite-internal-meter-background-color: var( --calcite-meter-background-color, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)) );--calcite-internal-meter-border-color: var(--calcite-meter-border-color, var(--calcite-color-border-2));--calcite-internal-meter-shadow: var(--calcite-meter-shadow, var(--calcite-shadow-none));--calcite-internal-meter-corner-radius: var(--calcite-meter-corner-radius, 9999px);--calcite-internal-meter-value-text-color: var(--calcite-meter-value-text-color, var(--calcite-color-text-1));--calcite-internal-meter-range-text-color: var(--calcite-meter-range-text-color, var(--calcite-color-text-3));--calcite-internal-meter-label-line-height: var(--calcite-font-line-height-base)}:host([scale=s]){--calcite-internal-meter-height: var(--calcite-theme-space-md, var(--calcite-spacing-md));--calcite-internal-meter-font-size: var(--calcite-font-size--2)}:host([scale=l]){--calcite-internal-meter-height: var(--calcite-theme-space-2xl, var(--calcite-spacing-xxl));--calcite-internal-meter-font-size: var(--calcite-font-size-0);--calcite-internal-meter-label-line-height: var(--calcite-font-line-height-md)}:host([appearance=solid]){--calcite-internal-meter-border-color: var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3));--calcite-internal-meter-background-color: var(--calcite-theme-color-surface-4, var(--calcite-color-foreground-3))}:host([appearance=outline]){--calcite-internal-meter-background-color: transparent}.fill{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand))}.fill-danger{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-danger))}.fill-success{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-success))}.fill-warning{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-warning))}.container{display:flex;position:relative;align-items:center;margin:0;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-internal-meter-height);background-color:var(--calcite-internal-meter-background-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-meter-border-color);border-radius:var(--calcite-internal-meter-corner-radius);box-shadow:var(--calcite-internal-meter-shadow)}.value-visible{margin-block-start:var(--calcite-theme-space-2xl, var(--calcite-spacing-xxl))}.steps-visible{margin-block-end:var(--calcite-theme-space-2xl, var(--calcite-spacing-xxl))}.step-line{display:block;position:absolute;inset-block:var(--calcite-space-none);inline-size:var(--calcite-internal-meter-space);background-color:var(--calcite-internal-meter-border-color)}.label{position:absolute;display:flex;gap:var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs));font-size:var(--calcite-internal-meter-font-size);line-height:var(--calcite-internal-meter-label-line-height)}.label-hidden{visibility:hidden;opacity:0}.label-value{inset-block-end:calc(100% + .5em);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-internal-meter-value-text-color)}.label-range{color:var(--calcite-internal-meter-range-text-color);inset-block-start:calc(100% + .5em)}.label-range .unit-label{font-weight:var(--calcite-font-weight-medium)}.fill{display:block;position:absolute;transition-timing-function:var(--calcite-animation-easing-function);z-index:var(--calcite-z-index);inset-inline-start:var(--calcite-internal-meter-space);inset-block:var(--calcite-internal-meter-space);border-radius:var(--calcite-internal-meter-corner-radius);max-inline-size:calc(100% - var(--calcite-internal-meter-space) * 2);min-inline-size:calc(var(--calcite-internal-meter-height) - var(--calcite-internal-meter-space) * 2);background-color:var(--calcite-internal-meter-fill-color);transition-property:inline-size,background-color,box-shadow}.solid .fill{inset-block:0;inset-inline-start:0;max-inline-size:100%;min-inline-size:calc(var(--calcite-internal-meter-height));box-shadow:0 0 0 1px var(--calcite-internal-meter-fill-color)}`,y=class extends z{constructor(){super(...arguments),this.highLabelRef=u(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelRef=u(),this.maxLabelRef=u(),this.maxPercent=100,this.messages=M({name:null}),this.meterContainerRef=u(),this.minLabelRef=u(),this.minPercent=0,this.resizeObserver=T("resize",()=>this.resizeHandler()),this.valueLabelRef=u(),this.currentPercent=0,this.highActive=!1,this.highPercent=100,this.lowActive=!1,this.lowPercent=0,this.appearance="outline-fill",this.disabled=!1,this.fillType="range",this.groupSeparator=!1,this.max=100,this.min=0,this.rangeLabelType="percent",this.rangeLabels=!1,this.scale="m",this.unitLabel="",this.valueLabel=!1,this.valueLabelType="percent"}static{this.properties={currentPercent:[16,{},{state:!0}],highActive:[16,{},{state:!0}],highPercent:[16,{},{state:!0}],lowActive:[16,{},{state:!0}],lowPercent:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillType:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],high:[11,{},{reflect:!0,type:Number}],label:1,low:[11,{},{reflect:!0,type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,rangeLabelType:[3,{},{reflect:!0}],rangeLabels:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],unitLabel:1,value:[9,{},{type:Number}],valueLabel:[7,{},{reflect:!0,type:Boolean}],valueLabelType:[3,{},{reflect:!0}]}}static{this.styles=N}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}load(){this.calculateValues()}willUpdate(e){(e.has("min")&&(this.hasUpdated||this.min!==0)||e.has("max")&&(this.hasUpdated||this.max!==100)||e.has("low")||e.has("high")||e.has("value"))&&this.handleRangeChange(),(e.has("rangeLabels")&&(this.hasUpdated||this.rangeLabels!==!1)||e.has("rangeLabelType")&&(this.hasUpdated||this.rangeLabelType!=="percent")||e.has("unitLabel")&&(this.hasUpdated||this.unitLabel!=="")||e.has("valueLabel")&&(this.hasUpdated||this.valueLabel!==!1)||e.has("valueLabelType")&&(this.hasUpdated||this.valueLabelType!=="percent"))&&this.updateLabels()}loaded(){this.updateLabels()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.determineValueLabelPosition(),this.determineVisibleLabels()}calculateValues(){let{min:e,max:a,low:t,high:l,value:i}=this,n=t===void 0?NaN:100*(t-e)/(a-e),s=l===void 0?NaN:100*(l-e)/(a-e),c=i===void 0?NaN:100*(i-e)/(a-e);(!t||t<e||l!==void 0&&t>l||t>a)&&(this.low=e),(!l||l>a||t!==void 0&&l<t||l<e)&&(this.high=a),i||(this.value=e),this.lowPercent=n,this.highPercent=s,this.currentPercent=i?c:0,this.lowActive=!!t&&t>e&&(!i||t>i)&&(!l||t<l),this.highActive=!!l&&e<=l&&l<a&&(!i||l>i)&&(!t||l>t)}formatLabel(e,a){if(a==="percent"){if(!this.percentFormatting){let t=this.messages._lang,l=new Intl.NumberFormat(t,{useGrouping:this.groupSeparator,style:"percent"});this.percentFormatting={formatter:l,locale:t}}return this.percentFormatting.formatter.format(e)}else return L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())}getMeterKindCssClass(){let{low:e,high:a,min:t,max:l,value:i}=this,n=e||t,s=a||l,c=i!==void 0&&i>=n,d=i!==void 0&&i<n,f=i!==void 0&&i>=s,o=i!==void 0&&i<s;return!i||!e&&o||d?r.success:c&&o?r.warning:f?r.danger:r.success}intersects(e,a){return!!(e&&a&&V(e.getBoundingClientRect(),a.getBoundingClientRect()))}determineVisibleLabels(){if(!this.rangeLabels)return;let{minLabelRef:{value:e},lowLabelRef:{value:a},highLabelRef:{value:t},maxLabelRef:{value:l}}=this,i=this.intersects(t,l),n=this.intersects(a,t),s=this.intersects(a,l),c=this.intersects(e,t),d=this.intersects(e,a),f=this.intersects(e,l),o=r.labelHidden;a&&(d||s||n?a.classList.add(o):a.classList.remove(o)),t&&(c||s||i?t.classList.add(o):t.classList.remove(o)),e&&l&&(f?l.classList.add(o):l.classList.remove(o))}determineValueLabelPosition(){let{valueLabelRef:{value:e},meterContainerRef:{value:a},currentPercent:t}=this;if(!e||!a)return;let l=t>100?100:t>0?t:0,i=e.getBoundingClientRect().width,n=a.getBoundingClientRect().width,s=100*(i-0)/(n-0);l+s>=100?(e.style.insetInlineEnd="0%",e.style.removeProperty("inset-inline-start")):(e.style.insetInlineStart=`${l}% `,e.style.removeProperty("inset-inline-end"))}renderMeterFill(){let{currentPercent:e,fillType:a}=this,t=this.getMeterKindCssClass();return h`<div class=${b({[r.fill]:!0,[t]:a!=="single"})} style=${v({width:`${e}%`})}></div>`}renderRangeLine(e){let a={insetInlineStart:`${e}%`};return h`<div class=${b(r.stepLine)} style=${v(a)}></div>`}renderValueLabel(){let{currentPercent:e,valueLabelType:a,unitLabel:t,value:l}=this,i=this.formatLabel(a==="percent"?e/100:l||0,a);return p("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelValue]:!0})} ${m(this.valueLabelRef)}>${i}${t&&a!=="percent"&&h`<span class=${b(r.unitLabel)}>${t}</span>`||""}</div>`)}renderMinLabel(){let{rangeLabelType:e,min:a,minPercent:t,unitLabel:l}=this,i={insetInlineStart:`${t}%`},n=this.formatLabel(e==="percent"?t:a,e);return p("min-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${v(i)} ${m(this.minLabelRef)}>${n}${l&&e!=="percent"&&h`<span class=${b(r.unitLabel)}>${l}</span>`||""}</div>`)}renderLowLabel(){let{rangeLabelType:e,low:a,lowPercent:t,highPercent:l,labelFlipProximity:i}=this,n=a?this.formatLabel(e==="percent"?t/100:a,e):"",s={insetInlineStart:`${t}%`},c={insetInlineEnd:`${100-t}%`},d=(l-t)/100<i?c:s;return p("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${v(d)} ${m(this.lowLabelRef)}>${n}</div>`)}renderHighLabel(){let{rangeLabelType:e,high:a,highPercent:t,labelFlipMax:l}=this,i=a?this.formatLabel(e==="percent"?t/100:a,e):"",n={insetInlineStart:`${t}%`},s={insetInlineEnd:`${100-t}%`},c=t/100>=l?s:n;return p("high-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${v(c)} ${m(this.highLabelRef)}>${i}</div>`)}renderMaxLabel(){let{rangeLabelType:e,max:a,maxPercent:t}=this,l={insetInlineEnd:`${100-t}%`},i=this.formatLabel(e==="percent"?t/100:a,e);return p("max-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${v(l)} ${m(this.maxLabelRef)}>${i}</div>`)}render(){let{appearance:e,currentPercent:a,highActive:t,highPercent:l,label:i,lowActive:n,lowPercent:s,max:c,maxPercent:d,min:f,minPercent:o,rangeLabels:g,rangeLabelType:x,unitLabel:w,value:$,valueLabel:P,valueLabelType:R}=this,S=this.formatLabel(a/100,"percent"),F=`${$} ${w}`;return h`<div .ariaLabel=${i} .ariaValueMax=${x==="percent"?d:c} .ariaValueMin=${x==="percent"?o:f} .ariaValueNow=${R==="percent"?a:$} .ariaValueText=${R==="percent"?S:w?F:void 0} class=${b({[r.container]:!0,[r.stepsVisible]:g,[r.valueVisible]:P,[e]:e!=="outline-fill"})} role=meter ${m(this.meterContainerRef)}>${this.renderMeterFill()}${P&&this.renderValueLabel()||""}${n&&this.renderRangeLine(s)||""}${t&&this.renderRangeLine(l)||""}${g&&this.renderMinLabel()||""}${g&&n&&this.renderLowLabel()||""}${g&&t&&this.renderHighLabel()||""}${g&&this.renderMaxLabel()||""}</div>`}};C("calcite-meter",y);export{y as Meter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{d as t}from"./ICVHIOLT.js";import{a as y}from"./65NP4EGJ.js";import{a as v}from"./XSVS2DOW.js";import{a as k}from"./SX6TNVU7.js";import{e as w}from"./CGJCCSPN.js";import"./SXHYAGRQ.js";import{E as d,F as p,G as m,H as g,T as $,g as u,h as r,l as b,p as a}from"./QAAX5OQX.js";var L={backButton:"back-button"},B={backLeft:"chevron-left",backRight:"chevron-right"},o={actionBar:"action-bar",alerts:"alerts",contentTop:"content-top",contentBottom:"content-bottom",headerTop:"header-top",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",description:"description",heading:"heading",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerEnd:"footer-end",footerStart:"footer-start"},A=u`:host{box-sizing:border-box;background-color:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1));color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}: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{position:relative;display:none;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([selected]){display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}calcite-panel{--calcite-panel-background-color: var(--calcite-flow-background-color);--calcite-panel-border-color: var(--calcite-flow-border-color, var(--calcite-flow-item-header-border-block-end));--calcite-panel-corner-radius: var(--calcite-flow-corner-radius);--calcite-panel-description-text-color: var(--calcite-flow-description-text-color);--calcite-panel-footer-background-color: var(--calcite-flow-footer-background-color);--calcite-panel-footer-space: var(--calcite-flow-footer-space, var(--calcite-flow-item-footer-padding));--calcite-panel-header-action-background-color-hover: var(--calcite-flow-header-action-background-color-hover);--calcite-panel-header-action-background-color-press: var(--calcite-flow-header-action-background-color-press);--calcite-panel-header-action-background-color: var(--calcite-flow-header-action-background-color);--calcite-panel-header-action-indicator-color: var(--calcite-flow-header-action-indicator-color);--calcite-panel-header-action-text-color-press: var(--calcite-flow-header-action-text-color-press);--calcite-panel-header-action-text-color: var(--calcite-flow-header-action-text-color);--calcite-panel-header-background-color: var(--calcite-flow-header-background-color);--calcite-panel-header-content-space: var(--calcite-flow-header-content-space);--calcite-panel-header-top-space: var(--calcite-flow-header-top-space);--calcite-panel-heading-text-color: var(--calcite-flow-heading-text-color);--calcite-panel-icon-color: var(--calcite-flow-icon-color);--calcite-panel-space: var(--calcite-flow-space);--calcite-panel-content-top-space: var(--calcite-flow-content-top-space);--calcite-panel-content-bottom-space: var(--calcite-flow-content-bottom-space)}:host([hidden]){display:none}[hidden]{display:none}`,h=class extends m{constructor(){super(...arguments),this.backButtonRef=d(),this.containerRef=d(),this.direction=w(),this.messages=k(),this.interactiveContainer=y(this),this.closable=!1,this.closed=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.focusTrapDisabled=!1,this.menuOpen=!1,this.overlayPositioning="absolute",this.scale="m",this.selected=!1,this.showBackButton=!1,this.topLayerDisabled=!1,this.calciteFlowItemBack=a(),this.calciteFlowItemClose=a({cancelable:!1}),this.calciteFlowItemCollapse=a({cancelable:!1}),this.calciteFlowItemExpand=a({cancelable:!1}),this.calciteFlowItemScroll=a({cancelable:!1}),this.calciteFlowItemToggle=a({cancelable:!1}),this.calciteInternalFlowItemChange=a({cancelable:!1})}static{this.properties={beforeBack:[0,{},{attribute:!1}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],focusTrapDisabled:[5,{},{type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],showBackButton:[5,{},{type:Boolean}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=A}async scrollContentTo(e){await this.containerRef.value?.scrollContentTo(e)}async setFocus(e){return this.containerRef.value?.setFocus(e)}async updateFocusTrapElements(e){this.containerRef.value?.updateFocusTrapElements(e)}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.calciteInternalFlowItemChange.emit(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteFlowItemCollapse.emit():this.calciteFlowItemExpand.emit())}handleInternalPanelScroll(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.calciteFlowItemScroll.emit())}handleInternalPanelClose(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.closed=!0,this.calciteFlowItemClose.emit())}handleInternalPanelToggle(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.collapsed=e.target.collapsed,this.calciteFlowItemToggle.emit())}backButtonClick(){this.calciteFlowItemBack.emit()}renderBackButton(){let e=this.direction==="rtl",{showBackButton:c,backButtonClick:s,messages:i}=this,l=i.back,n=e?B.backRight:B.backLeft;return c?v("flow-back-button",r`<calcite-action class=${g(L.backButton)} .icon=${n} @click=${s} .scale=${this.scale} slot=${o.headerActionsStart} .text=${l} title=${l??b} ${p(this.backButtonRef)}></calcite-action>`):null}render(){let{collapsed:e,collapseDirection:c,collapsible:s,closable:i,closed:l,description:n,disabled:f,heading:T,headingLevel:C,loading:I,menuOpen:F,messageOverrides:x,overlayPositioning:S,beforeClose:R,icon:P,iconFlipRtl:D,focusTrapDisabled:E,focusTrapOptions:O}=this;return this.interactiveContainer({disabled:f,children:r`<calcite-panel .beforeClose=${R} .closable=${i} .closed=${l} .collapsed=${e} .collapseDirection=${c} .collapsible=${s} .description=${n} .disabled=${f} .focusTrapDisabled=${E} focus-trap-enabled-by-parent .focusTrapOptions=${O} .heading=${T} .headingLevel=${C} .icon=${P} .iconFlipRtl=${D} .loading=${I} .menuOpen=${F} .messageOverrides=${x} @calcitePanelClose=${this.handleInternalPanelClose} @calcitePanelScroll=${this.handleInternalPanelScroll} @calcitePanelToggle=${this.handleInternalPanelToggle} .overlayPositioning=${S} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${p(this.containerRef)}>${this.renderBackButton()}<slot name=${o.actionBar} slot=${t.actionBar}></slot><slot name=${o.alerts} slot=${t.alerts}></slot><slot name=${o.headerActionsStart} slot=${t.headerActionsStart}></slot><slot name=${o.headerActionsEnd} slot=${t.headerActionsEnd}></slot><slot name=${o.headerTop} slot=${t.headerTop}></slot><slot name=${o.description} slot=${t.description}></slot><slot name=${o.heading} slot=${t.heading}></slot><slot name=${o.headerContent} slot=${t.headerContent}></slot><slot name=${o.headerMenuActions} slot=${t.headerMenuActions}></slot><slot name=${o.fab} slot=${t.fab}></slot><slot name=${o.contentTop} slot=${t.contentTop}></slot><slot name=${o.contentBottom} slot=${t.contentBottom}></slot><slot name=${o.footerStart} slot=${t.footerStart}></slot><slot name=${o.footer} slot=${t.footer}></slot><slot name=${o.footerEnd} slot=${t.footerEnd}></slot><slot></slot></calcite-panel>`})}};$("calcite-flow-item",h);export{h as FlowItem};
2
+ import{d as t}from"./ICVHIOLT.js";import{a as y}from"./BUD3X4EV.js";import{a as v}from"./54Y2XWNM.js";import{a as k}from"./BZZ3PDRE.js";import{e as w}from"./AGD2EOLY.js";import"./PO6YL62I.js";import{E as d,F as p,G as m,H as g,T as $,g as u,h as r,l as b,p as a}from"./G7VCDZAH.js";var L={backButton:"back-button"},B={backLeft:"chevron-left",backRight:"chevron-right"},o={actionBar:"action-bar",alerts:"alerts",contentTop:"content-top",contentBottom:"content-bottom",headerTop:"header-top",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",description:"description",heading:"heading",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerEnd:"footer-end",footerStart:"footer-start"},A=u`:host{box-sizing:border-box;background-color:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1));color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}: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{position:relative;display:none;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([selected]){display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}calcite-panel{--calcite-panel-background-color: var(--calcite-flow-background-color);--calcite-panel-border-color: var(--calcite-flow-border-color, var(--calcite-flow-item-header-border-block-end));--calcite-panel-corner-radius: var(--calcite-flow-corner-radius);--calcite-panel-description-text-color: var(--calcite-flow-description-text-color);--calcite-panel-footer-background-color: var(--calcite-flow-footer-background-color);--calcite-panel-footer-space: var(--calcite-flow-footer-space, var(--calcite-flow-item-footer-padding));--calcite-panel-header-action-background-color-hover: var(--calcite-flow-header-action-background-color-hover);--calcite-panel-header-action-background-color-press: var(--calcite-flow-header-action-background-color-press);--calcite-panel-header-action-background-color: var(--calcite-flow-header-action-background-color);--calcite-panel-header-action-indicator-color: var(--calcite-flow-header-action-indicator-color);--calcite-panel-header-action-text-color-press: var(--calcite-flow-header-action-text-color-press);--calcite-panel-header-action-text-color: var(--calcite-flow-header-action-text-color);--calcite-panel-header-background-color: var(--calcite-flow-header-background-color);--calcite-panel-header-content-space: var(--calcite-flow-header-content-space);--calcite-panel-header-top-space: var(--calcite-flow-header-top-space);--calcite-panel-heading-text-color: var(--calcite-flow-heading-text-color);--calcite-panel-icon-color: var(--calcite-flow-icon-color);--calcite-panel-space: var(--calcite-flow-space);--calcite-panel-content-top-space: var(--calcite-flow-content-top-space);--calcite-panel-content-bottom-space: var(--calcite-flow-content-bottom-space)}:host([hidden]){display:none}[hidden]{display:none}`,h=class extends m{constructor(){super(...arguments),this.backButtonRef=d(),this.containerRef=d(),this.direction=w(),this.messages=k(),this.interactiveContainer=y(this),this.closable=!1,this.closed=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.focusTrapDisabled=!1,this.menuOpen=!1,this.overlayPositioning="absolute",this.scale="m",this.selected=!1,this.showBackButton=!1,this.topLayerDisabled=!1,this.calciteFlowItemBack=a(),this.calciteFlowItemClose=a({cancelable:!1}),this.calciteFlowItemCollapse=a({cancelable:!1}),this.calciteFlowItemExpand=a({cancelable:!1}),this.calciteFlowItemScroll=a({cancelable:!1}),this.calciteFlowItemToggle=a({cancelable:!1}),this.calciteInternalFlowItemChange=a({cancelable:!1})}static{this.properties={beforeBack:[0,{},{attribute:!1}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],focusTrapDisabled:[5,{},{type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],showBackButton:[5,{},{type:Boolean}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=A}async scrollContentTo(e){await this.containerRef.value?.scrollContentTo(e)}async setFocus(e){return this.containerRef.value?.setFocus(e)}async updateFocusTrapElements(e){this.containerRef.value?.updateFocusTrapElements(e)}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.calciteInternalFlowItemChange.emit(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteFlowItemCollapse.emit():this.calciteFlowItemExpand.emit())}handleInternalPanelScroll(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.calciteFlowItemScroll.emit())}handleInternalPanelClose(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.closed=!0,this.calciteFlowItemClose.emit())}handleInternalPanelToggle(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.collapsed=e.target.collapsed,this.calciteFlowItemToggle.emit())}backButtonClick(){this.calciteFlowItemBack.emit()}renderBackButton(){let e=this.direction==="rtl",{showBackButton:c,backButtonClick:s,messages:i}=this,l=i.back,n=e?B.backRight:B.backLeft;return c?v("flow-back-button",r`<calcite-action class=${g(L.backButton)} .icon=${n} @click=${s} .scale=${this.scale} slot=${o.headerActionsStart} .text=${l} title=${l??b} ${p(this.backButtonRef)}></calcite-action>`):null}render(){let{collapsed:e,collapseDirection:c,collapsible:s,closable:i,closed:l,description:n,disabled:f,heading:T,headingLevel:C,loading:I,menuOpen:F,messageOverrides:x,overlayPositioning:S,beforeClose:R,icon:P,iconFlipRtl:D,focusTrapDisabled:E,focusTrapOptions:O}=this;return this.interactiveContainer({disabled:f,children:r`<calcite-panel .beforeClose=${R} .closable=${i} .closed=${l} .collapsed=${e} .collapseDirection=${c} .collapsible=${s} .description=${n} .disabled=${f} .focusTrapDisabled=${E} focus-trap-enabled-by-parent .focusTrapOptions=${O} .heading=${T} .headingLevel=${C} .icon=${P} .iconFlipRtl=${D} .loading=${I} .menuOpen=${F} .messageOverrides=${x} @calcitePanelClose=${this.handleInternalPanelClose} @calcitePanelScroll=${this.handleInternalPanelScroll} @calcitePanelToggle=${this.handleInternalPanelToggle} .overlayPositioning=${S} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${p(this.containerRef)}>${this.renderBackButton()}<slot name=${o.actionBar} slot=${t.actionBar}></slot><slot name=${o.alerts} slot=${t.alerts}></slot><slot name=${o.headerActionsStart} slot=${t.headerActionsStart}></slot><slot name=${o.headerActionsEnd} slot=${t.headerActionsEnd}></slot><slot name=${o.headerTop} slot=${t.headerTop}></slot><slot name=${o.description} slot=${t.description}></slot><slot name=${o.heading} slot=${t.heading}></slot><slot name=${o.headerContent} slot=${t.headerContent}></slot><slot name=${o.headerMenuActions} slot=${t.headerMenuActions}></slot><slot name=${o.fab} slot=${t.fab}></slot><slot name=${o.contentTop} slot=${t.contentTop}></slot><slot name=${o.contentBottom} slot=${t.contentBottom}></slot><slot name=${o.footerStart} slot=${t.footerStart}></slot><slot name=${o.footer} slot=${t.footer}></slot><slot name=${o.footerEnd} slot=${t.footerEnd}></slot><slot></slot></calcite-panel>`})}};$("calcite-flow-item",h);export{h as FlowItem};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as S,b}from"./6RCNPDD6.js";import{b as v}from"./22NLVRMQ.js";import{c as A}from"./ODU6JYNH.js";import{a as $}from"./65NP4EGJ.js";import{a}from"./XSVS2DOW.js";import{a as k}from"./JN6YLTUP.js";import"./2IM7ZZ7U.js";import{a as T}from"./VMHJHFFS.js";import"./CGJCCSPN.js";import"./SXHYAGRQ.js";import{B as g,E as h}from"./RRBGCYLX.js";import{E as r,F as o,G as C,H as R,T as y,g as w,h as s,m,p as u}from"./QAAX5OQX.js";var I=w`: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:contents}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) tr{opacity:var(--calcite-opacity-disabled);pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}calcite-table-cell{--calcite-internal-table-cell-background-color: var( --calcite-table-row-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)) )}:host([slot=table-header]) tr{position:var(--calcite-internal-table-header-row-position);inset-block-start:var(--calcite-internal-table-header-offset, 0);z-index:var(--calcite-internal-table-header-z-index, calc(var(--calcite-z-index) + 1))}:host([selected]) calcite-table-cell{--calcite-internal-table-cell-background-color: var( --calcite-table-row-background-color-selected, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)) )}tr{--calcite-internal-table-row-border-block-end-width: var(--calcite-border-width-sm);--calcite-internal-table-row-border-block-end-color: var(--calcite-table-row-border-color, transparent);background-color:var(--calcite-table-row-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}tr.last-visible-row{--calcite-internal-table-row-border-block-end-width: 0;--calcite-internal-table-row-border-block-end-color: transparent}:host([item-hidden]){display:none}`,f=class extends C{constructor(){super(),this.numberedCellRef=r(),this.numberedHeaderRef=r(),this.rowCells=[],this.rowSlotRef=r(),this.selectionCellRef=r(),this.selectionHeaderRef=r(),this.userTriggered=!1,this._selected=!1,this.clickHandler=()=>{this.handleRowSelection()},this.handleKeyboardSelection=e=>{k(e.key)&&(e.key===" "&&e.preventDefault(),this.handleRowSelection())},this.interactiveContainer=$(this),this.itemHidden=!1,this.disabled=!1,this.interactionMode="interactive",this.lastVisibleRow=!1,this.numbered=!1,this.stickyHeaderEnabled=!1,this.selectionMode="none",this.calciteInternalTableRowFocusRequest=u({cancelable:!1}),this.calciteInternalTableRowSelect=u({cancelable:!1}),this.calciteTableRowSelect=u({cancelable:!1})}static{this.properties={alignment:[3,{},{reflect:!0}],itemHidden:[7,{},{reflect:!0,type:Boolean}],bodyRowCount:[9,{},{type:Number}],cellCount:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],interactionMode:1,lastVisibleRow:[5,{},{type:Boolean}],numbered:[5,{},{type:Boolean}],positionAll:[9,{},{type:Number}],positionSection:[9,{},{type:Number}],positionSectionLocalized:1,readCellContentsToAT:[5,{},{type:Boolean}],rowType:1,scale:1,stickyHeaderEnabled:[5,{},{type:Boolean}],selected:[7,{},{reflect:!0,type:Boolean}],selectedRowCount:[9,{},{type:Number}],selectedRowCountLocalized:1,selectionMode:1}}static{this.styles=I}get selected(){return this._selected}set selected(e){let l=this._selected;e!==l&&(this._selected=e,this.handleCellChanges())}load(){this.listenOn(document,"calciteInternalTableRowFocusChange",this.calciteInternalTableRowFocusChangeHandler),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}willUpdate(e){(e.has("bodyRowCount")||e.has("scale")||e.has("selectedRowCount")||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive"))&&this.handleCellChanges(),(e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none"))&&this.handleDelayedCellChanges(),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&!this.userTriggered&&this.calciteInternalTableRowSelect.emit()}loaded(){this.rowCells.length>0&&this.updateCells()}handleSlotChange(){this.updateCells()}handleCellChanges(){this.rowCells.length>0&&this.updateCells()}handleDelayedCellChanges(){this.rowCells.length>0&&requestAnimationFrame(()=>this.updateCells())}calciteInternalTableRowFocusChangeHandler(e){if(e.target.contains(this.el)){let l=e.detail.cellPosition,n=e.detail.rowPosition,i=e.detail.destination,t=e.detail.lastCell;if(n===this.positionAll){if(this.disabled){let d=i==="last"?"previous":i==="first"?"next":i;this.emitTableRowFocusRequest(l,this.positionAll,d);return}let c=t?this.rowCells[this.rowCells.length-1]:this.rowCells?.find((d,p)=>p+1===l);c&&c.setFocus()}}}keyDownHandler(e){if(this.interactionMode!=="interactive")return;let l=e.target,n=e.key,i=e.ctrlKey,t=this.rowCells;if(v(l)||A(l))switch(n){case"ArrowUp":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"previous"),e.preventDefault();break;case"ArrowDown":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"next"),e.preventDefault();break;case"PageUp":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"first"),e.preventDefault();break;case"PageDown":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"last"),e.preventDefault();break;case"ArrowLeft":h(t,l,"previous",!1,!1),e.preventDefault();break;case"ArrowRight":h(t,l,"next",!1,!1),e.preventDefault();break;case"Home":i?(this.emitTableRowFocusRequest(1,this.positionAll,"first"),e.preventDefault()):(h(t,l,"first",!1,!1),e.preventDefault());break;case"End":i?(this.emitTableRowFocusRequest(this.rowCells?.length,this.positionAll,"last",!0),e.preventDefault()):(h(t,l,"last",!1,!1),e.preventDefault());break}}emitTableRowFocusRequest(e,l,n,i=!1){this.calciteInternalTableRowFocusRequest.emit({cellPosition:e,rowPosition:l,destination:n,lastCell:i})}updateCells(){let e=this.alignment?this.alignment:this.rowType!=="head"?"center":"start",l=this.rowSlotRef.value?g(this.rowSlotRef.value,"calcite-table-cell, calcite-table-header"):[],i=[this.numberedCellRef.value,this.numberedHeaderRef.value,this.selectionCellRef.value,this.selectionHeaderRef.value].filter(t=>t!=null).concat(l);i.length>0&&i?.forEach((t,c)=>{if(t.interactionMode=this.interactionMode,t.lastCell=c===i.length-1,t.parentRowAlignment=e,t.parentRowIsSelected=this.selected,t.parentRowType=this.rowType,t.positionInRow=c+1,t.scale=this.scale,t.nodeName==="CALCITE-TABLE-CELL"){let d=t.rowSpan||1,p=this.rowType==="body"&&d>1&&this.positionSection+d>=this.bodyRowCount;t.readCellContentsToAT=this.readCellContentsToAT,t.disabled=this.disabled,t.reachesBodyEnd=p}}),this.rowCells=i||[],this.cellCount=i?.length}async handleRowSelection(){(this.rowType==="body"||this.rowType==="head"&&this.selectionMode==="multiple")&&(this.userTriggered=!0,this.selected=!this.selected,await this.updateComplete,this.calciteTableRowSelect.emit())}renderSelectionIcon(){let e=this.selectionMode==="multiple"&&this.selected?b.checkSquare:this.selectionMode==="multiple"?b.square:this.selected?b.circleF:b.circle;return s`<calcite-icon .icon=${e} .scale=${T(this.scale)}></calcite-icon>`}renderSelectableCell(){return this.rowType==="head"?a("selection-head",s`<calcite-table-header alignment=center .bodyRowCount=${this.bodyRowCount} @click=${this.clickHandler} @keydown=${this.handleKeyboardSelection} .parentRowAlignment=${this.alignment} .selectedRowCount=${this.selectedRowCount} .selectedRowCountLocalized=${this.selectedRowCountLocalized} .selectionCell=${!0} .selectionMode=${this.selectionMode} ${o(this.selectionHeaderRef)}></calcite-table-header>`):this.rowType==="body"?a("selection-body",s`<calcite-table-cell alignment=center @click=${this.clickHandler} @keydown=${this.handleKeyboardSelection} .parentRowAlignment=${this.alignment} .parentRowIsSelected=${this.selected} .parentRowPositionLocalized=${this.positionSectionLocalized} .selectionCell=${!0} ${o(this.selectionCellRef)}>${this.renderSelectionIcon()}</calcite-table-cell>`):a("selection-foot",s`<calcite-table-cell alignment=center .parentRowAlignment=${this.alignment} .selectionCell=${!0} ${o(this.selectionCellRef)}></calcite-table-cell>`)}renderNumberedCell(){return this.rowType==="head"?a("numbered-head",s`<calcite-table-header alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment} ${o(this.numberedHeaderRef)}></calcite-table-header>`):this.rowType==="body"?a("numbered-body",s`<calcite-table-cell alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment} ${o(this.numberedCellRef)}>${this.positionSectionLocalized}</calcite-table-cell>`):a("numbered-foot",s`<calcite-table-cell alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment} ${o(this.numberedCellRef)}></calcite-table-cell>`)}render(){return this.interactiveContainer({disabled:this.disabled,children:s`<tr .ariaRowIndex=${this.positionAll+1} .ariaSelected=${this.selected} class=${R({[S.lastVisibleRow]:this.lastVisibleRow})} @keydown=${this.keyDownHandler} ${o(e=>{e&&m(s`${this.numbered&&this.renderNumberedCell()||""}${this.selectionMode!=="none"&&this.renderSelectableCell()||""}<slot ${o(this.rowSlotRef)}></slot>`,e)})}></tr>`})}};y("calcite-table-row",f);export{f as TableRow};
2
+ import{a as S,b}from"./6RCNPDD6.js";import{b as v}from"./22NLVRMQ.js";import{c as A}from"./ODU6JYNH.js";import{a as $}from"./BUD3X4EV.js";import{a}from"./54Y2XWNM.js";import{a as k}from"./JN6YLTUP.js";import"./2IM7ZZ7U.js";import{a as T}from"./VMHJHFFS.js";import"./AGD2EOLY.js";import"./PO6YL62I.js";import{B as g,E as h}from"./RRBGCYLX.js";import{E as r,F as o,G as C,H as R,T as y,g as w,h as s,m,p as u}from"./G7VCDZAH.js";var I=w`: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:contents}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) tr{opacity:var(--calcite-opacity-disabled);pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}calcite-table-cell{--calcite-internal-table-cell-background-color: var( --calcite-table-row-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)) )}:host([slot=table-header]) tr{position:var(--calcite-internal-table-header-row-position);inset-block-start:var(--calcite-internal-table-header-offset, 0);z-index:var(--calcite-internal-table-header-z-index, calc(var(--calcite-z-index) + 1))}:host([selected]) calcite-table-cell{--calcite-internal-table-cell-background-color: var( --calcite-table-row-background-color-selected, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)) )}tr{--calcite-internal-table-row-border-block-end-width: var(--calcite-border-width-sm);--calcite-internal-table-row-border-block-end-color: var(--calcite-table-row-border-color, transparent);background-color:var(--calcite-table-row-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1)))}tr.last-visible-row{--calcite-internal-table-row-border-block-end-width: 0;--calcite-internal-table-row-border-block-end-color: transparent}:host([item-hidden]){display:none}`,f=class extends C{constructor(){super(),this.numberedCellRef=r(),this.numberedHeaderRef=r(),this.rowCells=[],this.rowSlotRef=r(),this.selectionCellRef=r(),this.selectionHeaderRef=r(),this.userTriggered=!1,this._selected=!1,this.clickHandler=()=>{this.handleRowSelection()},this.handleKeyboardSelection=e=>{k(e.key)&&(e.key===" "&&e.preventDefault(),this.handleRowSelection())},this.interactiveContainer=$(this),this.itemHidden=!1,this.disabled=!1,this.interactionMode="interactive",this.lastVisibleRow=!1,this.numbered=!1,this.stickyHeaderEnabled=!1,this.selectionMode="none",this.calciteInternalTableRowFocusRequest=u({cancelable:!1}),this.calciteInternalTableRowSelect=u({cancelable:!1}),this.calciteTableRowSelect=u({cancelable:!1})}static{this.properties={alignment:[3,{},{reflect:!0}],itemHidden:[7,{},{reflect:!0,type:Boolean}],bodyRowCount:[9,{},{type:Number}],cellCount:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],interactionMode:1,lastVisibleRow:[5,{},{type:Boolean}],numbered:[5,{},{type:Boolean}],positionAll:[9,{},{type:Number}],positionSection:[9,{},{type:Number}],positionSectionLocalized:1,readCellContentsToAT:[5,{},{type:Boolean}],rowType:1,scale:1,stickyHeaderEnabled:[5,{},{type:Boolean}],selected:[7,{},{reflect:!0,type:Boolean}],selectedRowCount:[9,{},{type:Number}],selectedRowCountLocalized:1,selectionMode:1}}static{this.styles=I}get selected(){return this._selected}set selected(e){let l=this._selected;e!==l&&(this._selected=e,this.handleCellChanges())}load(){this.listenOn(document,"calciteInternalTableRowFocusChange",this.calciteInternalTableRowFocusChangeHandler),this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}willUpdate(e){(e.has("bodyRowCount")||e.has("scale")||e.has("selectedRowCount")||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive"))&&this.handleCellChanges(),(e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none"))&&this.handleDelayedCellChanges(),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&!this.userTriggered&&this.calciteInternalTableRowSelect.emit()}loaded(){this.rowCells.length>0&&this.updateCells()}handleSlotChange(){this.updateCells()}handleCellChanges(){this.rowCells.length>0&&this.updateCells()}handleDelayedCellChanges(){this.rowCells.length>0&&requestAnimationFrame(()=>this.updateCells())}calciteInternalTableRowFocusChangeHandler(e){if(e.target.contains(this.el)){let l=e.detail.cellPosition,n=e.detail.rowPosition,i=e.detail.destination,t=e.detail.lastCell;if(n===this.positionAll){if(this.disabled){let d=i==="last"?"previous":i==="first"?"next":i;this.emitTableRowFocusRequest(l,this.positionAll,d);return}let c=t?this.rowCells[this.rowCells.length-1]:this.rowCells?.find((d,p)=>p+1===l);c&&c.setFocus()}}}keyDownHandler(e){if(this.interactionMode!=="interactive")return;let l=e.target,n=e.key,i=e.ctrlKey,t=this.rowCells;if(v(l)||A(l))switch(n){case"ArrowUp":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"previous"),e.preventDefault();break;case"ArrowDown":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"next"),e.preventDefault();break;case"PageUp":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"first"),e.preventDefault();break;case"PageDown":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"last"),e.preventDefault();break;case"ArrowLeft":h(t,l,"previous",!1,!1),e.preventDefault();break;case"ArrowRight":h(t,l,"next",!1,!1),e.preventDefault();break;case"Home":i?(this.emitTableRowFocusRequest(1,this.positionAll,"first"),e.preventDefault()):(h(t,l,"first",!1,!1),e.preventDefault());break;case"End":i?(this.emitTableRowFocusRequest(this.rowCells?.length,this.positionAll,"last",!0),e.preventDefault()):(h(t,l,"last",!1,!1),e.preventDefault());break}}emitTableRowFocusRequest(e,l,n,i=!1){this.calciteInternalTableRowFocusRequest.emit({cellPosition:e,rowPosition:l,destination:n,lastCell:i})}updateCells(){let e=this.alignment?this.alignment:this.rowType!=="head"?"center":"start",l=this.rowSlotRef.value?g(this.rowSlotRef.value,"calcite-table-cell, calcite-table-header"):[],i=[this.numberedCellRef.value,this.numberedHeaderRef.value,this.selectionCellRef.value,this.selectionHeaderRef.value].filter(t=>t!=null).concat(l);i.length>0&&i?.forEach((t,c)=>{if(t.interactionMode=this.interactionMode,t.lastCell=c===i.length-1,t.parentRowAlignment=e,t.parentRowIsSelected=this.selected,t.parentRowType=this.rowType,t.positionInRow=c+1,t.scale=this.scale,t.nodeName==="CALCITE-TABLE-CELL"){let d=t.rowSpan||1,p=this.rowType==="body"&&d>1&&this.positionSection+d>=this.bodyRowCount;t.readCellContentsToAT=this.readCellContentsToAT,t.disabled=this.disabled,t.reachesBodyEnd=p}}),this.rowCells=i||[],this.cellCount=i?.length}async handleRowSelection(){(this.rowType==="body"||this.rowType==="head"&&this.selectionMode==="multiple")&&(this.userTriggered=!0,this.selected=!this.selected,await this.updateComplete,this.calciteTableRowSelect.emit())}renderSelectionIcon(){let e=this.selectionMode==="multiple"&&this.selected?b.checkSquare:this.selectionMode==="multiple"?b.square:this.selected?b.circleF:b.circle;return s`<calcite-icon .icon=${e} .scale=${T(this.scale)}></calcite-icon>`}renderSelectableCell(){return this.rowType==="head"?a("selection-head",s`<calcite-table-header alignment=center .bodyRowCount=${this.bodyRowCount} @click=${this.clickHandler} @keydown=${this.handleKeyboardSelection} .parentRowAlignment=${this.alignment} .selectedRowCount=${this.selectedRowCount} .selectedRowCountLocalized=${this.selectedRowCountLocalized} .selectionCell=${!0} .selectionMode=${this.selectionMode} ${o(this.selectionHeaderRef)}></calcite-table-header>`):this.rowType==="body"?a("selection-body",s`<calcite-table-cell alignment=center @click=${this.clickHandler} @keydown=${this.handleKeyboardSelection} .parentRowAlignment=${this.alignment} .parentRowIsSelected=${this.selected} .parentRowPositionLocalized=${this.positionSectionLocalized} .selectionCell=${!0} ${o(this.selectionCellRef)}>${this.renderSelectionIcon()}</calcite-table-cell>`):a("selection-foot",s`<calcite-table-cell alignment=center .parentRowAlignment=${this.alignment} .selectionCell=${!0} ${o(this.selectionCellRef)}></calcite-table-cell>`)}renderNumberedCell(){return this.rowType==="head"?a("numbered-head",s`<calcite-table-header alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment} ${o(this.numberedHeaderRef)}></calcite-table-header>`):this.rowType==="body"?a("numbered-body",s`<calcite-table-cell alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment} ${o(this.numberedCellRef)}>${this.positionSectionLocalized}</calcite-table-cell>`):a("numbered-foot",s`<calcite-table-cell alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment} ${o(this.numberedCellRef)}></calcite-table-cell>`)}render(){return this.interactiveContainer({disabled:this.disabled,children:s`<tr .ariaRowIndex=${this.positionAll+1} .ariaSelected=${this.selected} class=${R({[S.lastVisibleRow]:this.lastVisibleRow})} @keydown=${this.keyDownHandler} ${o(e=>{e&&m(s`${this.numbered&&this.renderNumberedCell()||""}${this.selectionMode!=="none"&&this.renderSelectableCell()||""}<slot ${o(this.rowSlotRef)}></slot>`,e)})}></tr>`})}};y("calcite-table-row",f);export{f as TableRow};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as h,b as S,c as x}from"./HJHRSII7.js";import{c as u}from"./TJGNWJF6.js";import{c as y}from"./UTXN6YZB.js";import{a as v}from"./SX6TNVU7.js";import"./2IM7ZZ7U.js";import{a as b}from"./TTY44OFP.js";import"./VMHJHFFS.js";import"./CGJCCSPN.js";import"./SXHYAGRQ.js";import{B as r,z as A}from"./RRBGCYLX.js";import{E as c,F as l,G as m,H as f,T as g,g as p,h as n,p as a}from"./QAAX5OQX.js";var E=p`:host{box-sizing:border-box;background-color:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1));color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-group-gap: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-group-gap: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-group-gap: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{display:flex;flex-direction:column;padding:var(--calcite-space-none);background-color:transparent;border-color:var(--calcite-action-group-border-color, var(--calcite-color-border-3));border-style:solid;border-width:0;gap:var(--calcite-internal-action-group-gap)}.container{display:flex;flex-direction:column;flex-grow:1;gap:inherit}:host([columns="1"]){--calcite-internal-action-group-columns: 1}:host([columns="2"]){--calcite-internal-action-group-columns: 2}:host([columns="3"]){--calcite-internal-action-group-columns: 3}:host([columns="4"]){--calcite-internal-action-group-columns: 4}:host([columns="5"]){--calcite-internal-action-group-columns: 5}:host([columns="6"]){--calcite-internal-action-group-columns: 6}:host(:first-child){padding-block-start:var(--calcite-space-none)}:host([layout=horizontal]),:host([layout=horizontal]) .container{flex-direction:row}:host([layout=grid]){display:grid}:host([layout=grid]) .container{display:grid;place-content:stretch;background-color:transparent;gap:var(--calcite-action-group-gap, var(--calcite-internal-action-group-gap));grid-template-columns:repeat(var(--calcite-action-group-columns, var(--calcite-internal-action-group-columns, 3)),auto);padding:var(--calcite-action-group-gap, 1px)}:host([layout=horizontal]) ::slotted(calcite-action-group){border-inline-end:var(--calcite-size-px)}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends m{constructor(){super(),this.messages=v(),this._actions=[],this.focusSetter=b()(this).setFocus,this.defaultSlotRef=c(),this.menuActionsSlotRef=c(),this.hasMenuActions=!1,this.expanded=!1,this.layout="vertical",this.menuOpen=!1,this.overlayPositioning="absolute",this.overflowActionsDisabled=!1,this.scale="m",this.selectionMode="none",this.topLayerDisabled=!1,this.selectedActions=[],this.calciteActionGroupChange=a({cancelable:!1}),this.calciteActionGroupCollapse=a({cancelable:!1}),this.calciteActionGroupExpand=a({cancelable:!1}),this.calciteInternalActionGroupActionsChange=a({cancelable:!1}),this.listen("click",this.handleActionClick)}static{this.properties={hasMenuActions:[16,{},{state:!0}],columns:[11,{},{type:Number,reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],label:1,layout:[3,{},{reflect:!0}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],actions:[32,{},{attribute:!1,readOnly:!0}],selectedActions:[0,{},{attribute:!1}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=E}get actions(){return this._actions}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){(this.hasUpdated||e.has("selectionMode"))&&this.syncSelectionState(),e.has("expanded")&&((this.hasUpdated||this.expanded!==!1)&&(this.menuOpen=!1),this.hasUpdated&&(this.expanded?this.calciteActionGroupExpand.emit():this.calciteActionGroupCollapse.emit()))}setActiveAction(e,t){let s=!t.active;switch(this.selectionMode){case"multiple":this.updateAction(t,s);break;case"single":this.actions.forEach((i,o)=>this.updateAction(i,o===e&&s));break;case"single-persist":this.actions[e].active||(this.actions.forEach((i,o)=>this.updateAction(i,o===e)),this.updateSelectedActions([t]),this.calciteActionGroupChange.emit());return;default:return}this.updateSelectedActions(this.actions.filter(i=>i.active)),this.calciteActionGroupChange.emit()}setMenuOpen(e){this.menuOpen=!!e.currentTarget.open}syncSelectionState(){if(this.selectionMode!=="none"?this.setRoleOnActions():this.clearActionAriaAttributes(),this.selectionMode==="single"||this.selectionMode==="single-persist"){let e=this.actions.filter(t=>t.active);e.length>1&&this.actions.forEach(t=>this.updateAction(t,t===e.at(-1)))}this.updateSelectedActions(this.selectionMode==="none"?[]:this.actions.filter(e=>e.active))}syncActions(){let e=this.defaultSlotRef.value?r(this.defaultSlotRef.value,"calcite-action"):[],t=this.menuActionsSlotRef.value?r(this.menuActionsSlotRef.value,"calcite-action"):[];this._actions=[...e,...t],this.syncSelectionState()}syncActionsAndEmitChange(){this.syncActions(),this.calciteInternalActionGroupActionsChange.emit()}handleDefaultSlotChange(){this.syncActionsAndEmitChange()}handleMenuActionsSlotChange(e){this.hasMenuActions=A(e),this.syncActionsAndEmitChange()}handleActionClick(e){let t=e.composedPath().find(y);if(!t||t.disabled)return;let s=this.actions.indexOf(t);s===-1||this.selectionMode==="none"||this.setActiveAction(s,t)}setRoleOnActions(){this.actions.forEach(e=>{e.aria={...e.aria,role:this.selectionMode==="single"||this.selectionMode==="single-persist"?"radio":"checkbox"},this.setActionAriaChecked(e,e.active)})}setActionAriaChecked(e,t){e.aria={...e.aria,checked:t?"true":"false"}}clearActionAriaAttributes(){this.selectionMode==="none"&&this.actions.forEach(e=>{e.aria&&(e.aria.checked=void 0,e.aria.role=void 0,e.aria={...e.aria})})}updateAction(e,t){e.active=t,this.setActionAriaChecked(e,t)}updateSelectedActions(e){let t=this.selectedActions;t.length===e.length&&t.every((i,o)=>i===e[o])||(this.selectedActions=e)}renderMenu(){let{expanded:e,menuOpen:t,scale:s,layout:i,messages:o,overlayPositioning:$,hasMenuActions:M,menuFlipPlacements:C,menuPlacement:O}=this;return n`<calcite-action-menu .expanded=${e} .flipPlacements=${C??(i==="horizontal"?["top","bottom"]:["left","right"])} .hidden=${!M} .label=${o.more} @calciteActionMenuOpen=${this.setMenuOpen} .open=${t} .overlayPositioning=${$} .placement=${O??(i==="horizontal"?"bottom-start":"leading-start")} .scale=${s} .topLayerDisabled=${this.topLayerDisabled}><calcite-action .aria=${{expanded:e}} .icon=${S.menu} .scale=${s} slot=${u.trigger} .text=${o.more} .textEnabled=${e}></calcite-action><slot name=${h.menuActions} @slotchange=${this.handleMenuActionsSlotChange} ${l(this.menuActionsSlotRef)}></slot><slot name=${h.menuTooltip} slot=${u.tooltip}></slot></calcite-action-menu>`}render(){return n`<div .ariaLabel=${this.label} class=${f(x.container)} .role=${this.selectionMode==="multiple"||this.selectionMode==="none"?"group":"radiogroup"}><slot @slotchange=${this.handleDefaultSlotChange} ${l(this.defaultSlotRef)}></slot>${this.renderMenu()}</div>`}};g("calcite-action-group",d);export{d as ActionGroup};
2
+ import{a as h,b as S,c as x}from"./HJHRSII7.js";import{c as u}from"./TJGNWJF6.js";import{c as y}from"./UTXN6YZB.js";import{a as v}from"./BZZ3PDRE.js";import"./2IM7ZZ7U.js";import{a as b}from"./FGPKBUR3.js";import"./VMHJHFFS.js";import"./AGD2EOLY.js";import"./PO6YL62I.js";import{B as r,z as A}from"./RRBGCYLX.js";import{E as c,F as l,G as m,H as f,T as g,g as p,h as n,p as a}from"./G7VCDZAH.js";var E=p`:host{box-sizing:border-box;background-color:var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1));color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-group-gap: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-action-group-gap: var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=l]){--calcite-internal-action-group-gap: var(--calcite-theme-space-sm-plus, var(--calcite-spacing-sm-plus))}:host{display:flex;flex-direction:column;padding:var(--calcite-space-none);background-color:transparent;border-color:var(--calcite-action-group-border-color, var(--calcite-color-border-3));border-style:solid;border-width:0;gap:var(--calcite-internal-action-group-gap)}.container{display:flex;flex-direction:column;flex-grow:1;gap:inherit}:host([columns="1"]){--calcite-internal-action-group-columns: 1}:host([columns="2"]){--calcite-internal-action-group-columns: 2}:host([columns="3"]){--calcite-internal-action-group-columns: 3}:host([columns="4"]){--calcite-internal-action-group-columns: 4}:host([columns="5"]){--calcite-internal-action-group-columns: 5}:host([columns="6"]){--calcite-internal-action-group-columns: 6}:host(:first-child){padding-block-start:var(--calcite-space-none)}:host([layout=horizontal]),:host([layout=horizontal]) .container{flex-direction:row}:host([layout=grid]){display:grid}:host([layout=grid]) .container{display:grid;place-content:stretch;background-color:transparent;gap:var(--calcite-action-group-gap, var(--calcite-internal-action-group-gap));grid-template-columns:repeat(var(--calcite-action-group-columns, var(--calcite-internal-action-group-columns, 3)),auto);padding:var(--calcite-action-group-gap, 1px)}:host([layout=horizontal]) ::slotted(calcite-action-group){border-inline-end:var(--calcite-size-px)}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends m{constructor(){super(),this.messages=v(),this._actions=[],this.focusSetter=b()(this).setFocus,this.defaultSlotRef=c(),this.menuActionsSlotRef=c(),this.hasMenuActions=!1,this.expanded=!1,this.layout="vertical",this.menuOpen=!1,this.overlayPositioning="absolute",this.overflowActionsDisabled=!1,this.scale="m",this.selectionMode="none",this.topLayerDisabled=!1,this.selectedActions=[],this.calciteActionGroupChange=a({cancelable:!1}),this.calciteActionGroupCollapse=a({cancelable:!1}),this.calciteActionGroupExpand=a({cancelable:!1}),this.calciteInternalActionGroupActionsChange=a({cancelable:!1}),this.listen("click",this.handleActionClick)}static{this.properties={hasMenuActions:[16,{},{state:!0}],columns:[11,{},{type:Number,reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],label:1,layout:[3,{},{reflect:!0}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],actions:[32,{},{attribute:!1,readOnly:!0}],selectedActions:[0,{},{attribute:!1}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=E}get actions(){return this._actions}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){(this.hasUpdated||e.has("selectionMode"))&&this.syncSelectionState(),e.has("expanded")&&((this.hasUpdated||this.expanded!==!1)&&(this.menuOpen=!1),this.hasUpdated&&(this.expanded?this.calciteActionGroupExpand.emit():this.calciteActionGroupCollapse.emit()))}setActiveAction(e,t){let s=!t.active;switch(this.selectionMode){case"multiple":this.updateAction(t,s);break;case"single":this.actions.forEach((i,o)=>this.updateAction(i,o===e&&s));break;case"single-persist":this.actions[e].active||(this.actions.forEach((i,o)=>this.updateAction(i,o===e)),this.updateSelectedActions([t]),this.calciteActionGroupChange.emit());return;default:return}this.updateSelectedActions(this.actions.filter(i=>i.active)),this.calciteActionGroupChange.emit()}setMenuOpen(e){this.menuOpen=!!e.currentTarget.open}syncSelectionState(){if(this.selectionMode!=="none"?this.setRoleOnActions():this.clearActionAriaAttributes(),this.selectionMode==="single"||this.selectionMode==="single-persist"){let e=this.actions.filter(t=>t.active);e.length>1&&this.actions.forEach(t=>this.updateAction(t,t===e.at(-1)))}this.updateSelectedActions(this.selectionMode==="none"?[]:this.actions.filter(e=>e.active))}syncActions(){let e=this.defaultSlotRef.value?r(this.defaultSlotRef.value,"calcite-action"):[],t=this.menuActionsSlotRef.value?r(this.menuActionsSlotRef.value,"calcite-action"):[];this._actions=[...e,...t],this.syncSelectionState()}syncActionsAndEmitChange(){this.syncActions(),this.calciteInternalActionGroupActionsChange.emit()}handleDefaultSlotChange(){this.syncActionsAndEmitChange()}handleMenuActionsSlotChange(e){this.hasMenuActions=A(e),this.syncActionsAndEmitChange()}handleActionClick(e){let t=e.composedPath().find(y);if(!t||t.disabled)return;let s=this.actions.indexOf(t);s===-1||this.selectionMode==="none"||this.setActiveAction(s,t)}setRoleOnActions(){this.actions.forEach(e=>{e.aria={...e.aria,role:this.selectionMode==="single"||this.selectionMode==="single-persist"?"radio":"checkbox"},this.setActionAriaChecked(e,e.active)})}setActionAriaChecked(e,t){e.aria={...e.aria,checked:t?"true":"false"}}clearActionAriaAttributes(){this.selectionMode==="none"&&this.actions.forEach(e=>{e.aria&&(e.aria.checked=void 0,e.aria.role=void 0,e.aria={...e.aria})})}updateAction(e,t){e.active=t,this.setActionAriaChecked(e,t)}updateSelectedActions(e){let t=this.selectedActions;t.length===e.length&&t.every((i,o)=>i===e[o])||(this.selectedActions=e)}renderMenu(){let{expanded:e,menuOpen:t,scale:s,layout:i,messages:o,overlayPositioning:$,hasMenuActions:M,menuFlipPlacements:C,menuPlacement:O}=this;return n`<calcite-action-menu .expanded=${e} .flipPlacements=${C??(i==="horizontal"?["top","bottom"]:["left","right"])} .hidden=${!M} .label=${o.more} @calciteActionMenuOpen=${this.setMenuOpen} .open=${t} .overlayPositioning=${$} .placement=${O??(i==="horizontal"?"bottom-start":"leading-start")} .scale=${s} .topLayerDisabled=${this.topLayerDisabled}><calcite-action .aria=${{expanded:e}} .icon=${S.menu} .scale=${s} slot=${u.trigger} .text=${o.more} .textEnabled=${e}></calcite-action><slot name=${h.menuActions} @slotchange=${this.handleMenuActionsSlotChange} ${l(this.menuActionsSlotRef)}></slot><slot name=${h.menuTooltip} slot=${u.tooltip}></slot></calcite-action-menu>`}render(){return n`<div .ariaLabel=${this.label} class=${f(x.container)} .role=${this.selectionMode==="multiple"||this.selectionMode==="none"?"group":"radiogroup"}><slot @slotchange=${this.handleDefaultSlotChange} ${l(this.defaultSlotRef)}></slot>${this.renderMenu()}</div>`}};g("calcite-action-group",d);export{d as ActionGroup};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as n,b as f,c}from"./BBSSYLOF.js";import{a as z}from"./65NP4EGJ.js";import{b as p}from"./WTNYMVTD.js";import{a as u}from"./XSVS2DOW.js";import{c as R}from"./2IM7ZZ7U.js";import{a as d}from"./VMHJHFFS.js";import{e as w}from"./CGJCCSPN.js";import"./SXHYAGRQ.js";import{A,s as T,z as M}from"./RRBGCYLX.js";import{E as y,F as S,G as I,H as i,K as $,M as s,T as E,g as k,h as a,l as C,p as r}from"./QAAX5OQX.js";var V=R("calcite-tree"),q=k`: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([scale=s]){--calcite-internal-tree-item-spacing-unit: .25rem;--calcite-internal-tree-item-padding-block: .25rem;--calcite-internal-tree-item-children-container-padding: 1.25rem;--calcite-internal-tree-item-line-left-position: .75rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host(:is([scale=s],[scale=m])){--calcite-internal-tree-item-action-spacing: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-tree-item-spacing-unit: .5rem;--calcite-internal-tree-item-padding-block: .5rem;--calcite-internal-tree-item-children-container-padding: 1.5rem;--calcite-internal-tree-item-line-left-position: 1rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=l]){--calcite-internal-tree-item-action-spacing: var(--calcite-theme-space-xs, var(--calcite-spacing-xs));--calcite-internal-tree-item-spacing-unit: .75rem;--calcite-internal-tree-item-padding-block: .625rem;--calcite-internal-tree-item-children-container-padding: 2.25rem;--calcite-internal-tree-item-line-left-position: 1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host{display:block;max-inline-size:100%;cursor:pointer}:host .children-container ::slotted(*){padding-inline-start:var(--calcite-internal-tree-item-children-container-padding);overflow:hidden}.node-actions-container{display:flex}.node-actions-container .node-container,.node-actions-container .checkbox-container{gap:var(--calcite-internal-tree-item-spacing-unit)}.node-actions-container .node-container{padding-inline:var(--calcite-internal-tree-item-spacing-unit);padding-block:var(--calcite-internal-tree-item-padding-block)}.node-actions-container{color:var(--calcite-tree-text-color, var(--calcite-color-text-1))}.icon-start{--calcite-icon-color: var(--calcite-color-text-3)}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}:host([lines]) .children-container:after{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;position:absolute;inset-block-start:0;inline-size:var(--calcite-space-px);transition-timing-function:var(--calcite-animation-easing-function);z-index:var(--calcite-z-index);block-size:100%;inset-inline-start:var(--calcite-internal-tree-item-line-left-position);content:"";background-color:var(--calcite-color-border-2)}:host(:not([lines])) .node-container:after{display:none}::slotted(*){min-inline-size:0;max-inline-size:100%;overflow-wrap:break-word;color:inherit;text-decoration:none!important}::slotted(*):hover{text-decoration:none!important}::slotted(a){inline-size:100%;text-decoration-line:none}:host{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md)}:host .node-container{outline-color:transparent}:host:focus .node-container,:host:active .node-container{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)))}:host(:focus:not([disabled])) .node-container{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)));outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md)}:host(:focus:not([disabled])) .checkbox{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md)}.actions-end{display:flex;align-self:stretch;flex-direction:row;align-items:center;gap:var(--calcite-internal-tree-item-action-spacing)}.checkbox-container{display:flex;align-items:center}.checkbox{line-height:0;color:var(--calcite-tree-selected-icon-color, var(--calcite-color-border-input))}.checkbox-label{pointer-events:none;display:flex;align-items:center}.children-container{display:grid;grid-template-rows:0fr;max-block-size:max-content;opacity:1;position:relative;transition:opacity var(--calcite-internal-animation-timing-slow) ease-in-out,grid-template-rows var(--calcite-internal-animation-timing-medium) ease-in-out}.item--expanded>.children-container{grid-template-rows:1fr;opacity:1;max-block-size:max-content}@starting-style{.item--expanded>.children-container{opacity:0;grid-template-rows:0fr}}.node-container{position:relative;display:flex;flex-grow:1;align-items:center;min-inline-size:0}.node-container .selection-icon{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;opacity:0;color:var(--calcite-color-border-1)}.node-container:hover .selection-icon,:host([selected]) .node-container:hover .selection-icon,:host(:focus:not([disabled])) .node-container .selection-icon{opacity:1}:host([selected]) .node-container,:host([selected]) .node-container:hover{--calcite-internal-tree-item-text-color: var(--calcite-tree-text-color-selected, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-medium);color:var(--calcite-internal-tree-item-text-color)}:host([selected]) .node-container .icon-start,:host([selected]) .node-container:hover .icon-start{--calcite-icon-color: var(--calcite-internal-tree-item-text-color)}:host([selected]) .node-container .selection-icon,:host([selected]) .node-container:hover .selection-icon{opacity:1;color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([has-children]) .node-container .selection-icon{display:none}.chevron{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;color:var(--calcite-color-text-3);position:relative;align-self:center;flex:0 0 auto;transform:rotate(0)}.calcite--rtl .chevron{transform:rotate(180deg)}.item--expanded .node-container>.chevron{transform:rotate(90deg)}:host([selected]) .selection-icon{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([selected]) .checkbox{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([has-children][indeterminate]) .checkbox{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends I{constructor(){super(),this.actionSlotWrapperRef=y(),this.childTree=null,this.direction=w(),this.isSelectionMultiLike=!1,this.userChangedValue=!1,this.interactiveContainer=z(this),this.hasEndActions=!1,this.updateAfterInitialRender=!1,this.depth=-1,this.disabled=!1,this.expanded=!1,this.indeterminate=!1,this.lines=!1,this.parentExpanded=!1,this.selected=!1,this.calciteInternalTreeItemSelect=r({cancelable:!1}),this.calciteTreeItemCollapse=r({cancelable:!1}),this.calciteTreeItemExpand=r({cancelable:!1}),this.calciteTreeItemSelect=r({cancelable:!1}),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasEndActions:[16,{},{state:!0}],updateAfterInitialRender:[16,{},{state:!0}],depth:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],hasChildren:[39,{},{reflect:!0,readOnly:!0,type:Boolean}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{},{reflect:!0}],indeterminate:[7,{},{reflect:!0,type:Boolean}],label:1,lines:[7,{},{reflect:!0,type:Boolean}],parentExpanded:[5,{},{type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=q}get hasChildren(){return!!this.childTree}connectedCallback(){super.connectedCallback(),this.parentTreeItem=this.el.parentElement?.closest("calcite-tree-item")??void 0}load(){requestAnimationFrame(()=>this.updateAfterInitialRender=!0)}willUpdate(e){this.preWillUpdate(),e.has("expanded")&&((this.hasUpdated||this.expanded!==!1)&&this.updateChildTree(),this.hasUpdated&&(this.expanded?this.calciteTreeItemExpand.emit():this.calciteTreeItemCollapse.emit())),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.handleSelectedChange(this.selected),e.has("selectionMode")&&this.getSelectionMode()}loaded(){this.updateAncestorTree()}handleSelectedChange(e){this.selectionMode==="ancestors"&&!this.userChangedValue&&(e&&(this.indeterminate=!1),this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:!0,updateItem:!1})),this.userChangedValue&&(this.calciteTreeItemSelect.emit(),this.userChangedValue=!1)}getSelectionMode(){this.isSelectionMultiLike=this.selectionMode==="multiple"||this.selectionMode==="multichildren"}onClick(e){if(this.disabled||this.isActionEndEvent(e))return;let[t]=T(this.el,"a");if(t&&e.composedPath()[0].tagName.toLowerCase()!=="a"){let l=t.target===""?"_self":t.target;window.open(t.href,l)}this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.selectionMode==="ancestors"||this.isSelectionMultiLike,updateItem:!0}),this.userChangedValue=!0}iconClickHandler(e){e.stopPropagation(),this.expanded=!this.expanded}childrenClickHandler(e){e.stopPropagation()}keyDownHandler(e){if(!(this.isActionEndEvent(e)||e.defaultPrevented))switch(e.key){case" ":this.userChangedValue=!0,this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,updateItem:!0}),e.preventDefault();break;case"Enter":{let t=Array.from(this.el.children).find(l=>l.matches("a"));this.userChangedValue=!0,t?(t.click(),this.selected=!0):this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,updateItem:!0}),e.preventDefault()}}}updateChildTree(){let{childTree:e}=this;e&&(e.parentExpanded=this.expanded)}handleChildrenSlotChange(e){let t=A(e).find(V)??null;this.childTree=t,this.requestUpdate("hasChildren"),this.updateChildTree()}isActionEndEvent(e){return e.composedPath().includes(this.actionSlotWrapperRef.value)}updateAncestorTree(){let e=this.parentTreeItem;if(!(this.selectionMode!=="ancestors"||!e)){if(this.selected){let t=this.el.parentElement;if(!t)return;let l=Array.from(t.children),h=l.filter(o=>o.selected);l.length===h.length?(e.selected=!0,e.indeterminate=!1):h.length>0&&(e.indeterminate=!0),Array.from(this.el.querySelectorAll("calcite-tree-item:not([disabled])")).forEach(o=>{o.selected=!0,o.indeterminate=!1})}else if(this.indeterminate){let t=this.parentTreeItem;t.indeterminate=!0}}}actionsEndSlotChangeHandler(e){this.hasEndActions=M(e)}preWillUpdate(){this.depth=0;let e=this.el.closest("calcite-tree");if(!e)return;this.selectionMode=e.selectionMode,this.scale=e.scale||"m",this.lines=e.lines;let t;for(;e&&(t=e.parentElement?.closest("calcite-tree")??null,t!==e);)e=t,this.depth=this.depth+1}getSelectionIcon(){let{selectionMode:e,hasChildren:t}=this;return e==="single"||e==="children"||e==="single-persist"?c.bulletPoint:e==="multiple"||e==="multichildren"?c.checkmark:e==="none"&&!t?c.blank:null}render(){let e=this.direction==="rtl",t=this.getSelectionIcon(),l=this.hasChildren&&this.indeterminate,h=this.hasChildren||this.selectionMode==="ancestors"?a`<calcite-icon class=${i({[n.chevron]:!0,[s.rtl]:e})} .icon=${this.hasChildren?c.chevronRight:c.blank} @click=${this.iconClickHandler} .scale=${d(this.scale)}></calcite-icon>`:null,m=u("default-slot",a`<slot></slot>`),o=this.selectionMode==="ancestors"?a`<div class=${i(n.checkboxContainer)}><calcite-icon class=${i(n.checkbox)} .icon=${this.selected?c.checkSquareF:l?c.minusSquareF:c.square} .scale=${d(this.scale)}></calcite-icon></div>`:null,L=t?a`<calcite-icon class=${i({[n.selectionIcon]:!0,[s.rtl]:e})} .icon=${t} .scale=${d(this.scale)}></calcite-icon>`:null,B=!(this.parentExpanded||this.depth===1),g=this.updateAfterInitialRender&&this.expanded,b=this.selectionMode==="multiple"||this.selectionMode==="multichildren"||this.selectionMode==="ancestors",x=this.selectionMode==="single"||this.selectionMode==="children"||this.selectionMode==="single-persist",{hasEndActions:H}=this,P=u("actionsEndSlot",a`<slot name=${f.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot>`),U=a`<calcite-icon class=${i(n.iconStart)} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${d(this.scale)}></calcite-icon>`;return this.el.ariaChecked=p(b&&this.selected,b?"false":null),this.el.ariaExpanded=p(this.hasChildren&&g,this.hasChildren?"false":null),this.el.inert=B,this.el.ariaLive="polite",this.el.ariaSelected=p(x&&this.selected,x?"false":null),this.el.role="treeitem",$(this.el,"tabIndex",this.disabled?-1:0),this.interactiveContainer({disabled:this.disabled,children:a`<div class=${i({[n.itemExpanded]:g})}><div class=${i(n.nodeAndActionsContainer)}><div class=${i({[n.nodeContainer]:!0,[s.rtl]:e})} data-selection-mode=${this.selectionMode??C}>${h}${L}${o||null}${this.iconStart?U:null}${o?a`<label class=${i(n.checkboxLabel)}>${m}</label>`:m}</div><div class=${i(n.actionsEnd)} .hidden=${!H} ${S(this.actionSlotWrapperRef)}>${P}</div></div><div class=${i({[n.childrenContainer]:!0,[s.rtl]:e})} @click=${this.childrenClickHandler} .role=${this.hasChildren?"group":void 0}><slot name=${f.children} @slotchange=${this.handleChildrenSlotChange}></slot></div></div>`})}};E("calcite-tree-item",v);export{v as TreeItem};
2
+ import{a as n,b as f,c}from"./BBSSYLOF.js";import{a as z}from"./BUD3X4EV.js";import{b as p}from"./WTNYMVTD.js";import{a as u}from"./54Y2XWNM.js";import{c as R}from"./2IM7ZZ7U.js";import{a as d}from"./VMHJHFFS.js";import{e as w}from"./AGD2EOLY.js";import"./PO6YL62I.js";import{A,s as T,z as M}from"./RRBGCYLX.js";import{E as y,F as S,G as I,H as i,K as $,M as s,T as E,g as k,h as a,l as C,p as r}from"./G7VCDZAH.js";var V=R("calcite-tree"),q=k`: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([scale=s]){--calcite-internal-tree-item-spacing-unit: .25rem;--calcite-internal-tree-item-padding-block: .25rem;--calcite-internal-tree-item-children-container-padding: 1.25rem;--calcite-internal-tree-item-line-left-position: .75rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host(:is([scale=s],[scale=m])){--calcite-internal-tree-item-action-spacing: var(--calcite-theme-space-2xs, var(--calcite-spacing-xxs))}:host([scale=m]){--calcite-internal-tree-item-spacing-unit: .5rem;--calcite-internal-tree-item-padding-block: .5rem;--calcite-internal-tree-item-children-container-padding: 1.5rem;--calcite-internal-tree-item-line-left-position: 1rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=l]){--calcite-internal-tree-item-action-spacing: var(--calcite-theme-space-xs, var(--calcite-spacing-xs));--calcite-internal-tree-item-spacing-unit: .75rem;--calcite-internal-tree-item-padding-block: .625rem;--calcite-internal-tree-item-children-container-padding: 2.25rem;--calcite-internal-tree-item-line-left-position: 1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host{display:block;max-inline-size:100%;cursor:pointer}:host .children-container ::slotted(*){padding-inline-start:var(--calcite-internal-tree-item-children-container-padding);overflow:hidden}.node-actions-container{display:flex}.node-actions-container .node-container,.node-actions-container .checkbox-container{gap:var(--calcite-internal-tree-item-spacing-unit)}.node-actions-container .node-container{padding-inline:var(--calcite-internal-tree-item-spacing-unit);padding-block:var(--calcite-internal-tree-item-padding-block)}.node-actions-container{color:var(--calcite-tree-text-color, var(--calcite-color-text-1))}.icon-start{--calcite-icon-color: var(--calcite-color-text-3)}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:var(--calcite-opacity-full)}.interaction-container{display:contents}:host([lines]) .children-container:after{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;position:absolute;inset-block-start:0;inline-size:var(--calcite-space-px);transition-timing-function:var(--calcite-animation-easing-function);z-index:var(--calcite-z-index);block-size:100%;inset-inline-start:var(--calcite-internal-tree-item-line-left-position);content:"";background-color:var(--calcite-color-border-2)}:host(:not([lines])) .node-container:after{display:none}::slotted(*){min-inline-size:0;max-inline-size:100%;overflow-wrap:break-word;color:inherit;text-decoration:none!important}::slotted(*):hover{text-decoration:none!important}::slotted(a){inline-size:100%;text-decoration-line:none}:host{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md)}:host .node-container{outline-color:transparent}:host:focus .node-container,:host:active .node-container{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)))}:host(:focus:not([disabled])) .node-container{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)));outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md)}:host(:focus:not([disabled])) .checkbox{outline:var(--calcite-border-width-md) solid transparent;outline-offset:var(--calcite-border-width-md)}.actions-end{display:flex;align-self:stretch;flex-direction:row;align-items:center;gap:var(--calcite-internal-tree-item-action-spacing)}.checkbox-container{display:flex;align-items:center}.checkbox{line-height:0;color:var(--calcite-tree-selected-icon-color, var(--calcite-color-border-input))}.checkbox-label{pointer-events:none;display:flex;align-items:center}.children-container{display:grid;grid-template-rows:0fr;max-block-size:max-content;opacity:1;position:relative;transition:opacity var(--calcite-internal-animation-timing-slow) ease-in-out,grid-template-rows var(--calcite-internal-animation-timing-medium) ease-in-out}.item--expanded>.children-container{grid-template-rows:1fr;opacity:1;max-block-size:max-content}@starting-style{.item--expanded>.children-container{opacity:0;grid-template-rows:0fr}}.node-container{position:relative;display:flex;flex-grow:1;align-items:center;min-inline-size:0}.node-container .selection-icon{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;opacity:0;color:var(--calcite-color-border-1)}.node-container:hover .selection-icon,:host([selected]) .node-container:hover .selection-icon,:host(:focus:not([disabled])) .node-container .selection-icon{opacity:1}:host([selected]) .node-container,:host([selected]) .node-container:hover{--calcite-internal-tree-item-text-color: var(--calcite-tree-text-color-selected, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-medium);color:var(--calcite-internal-tree-item-text-color)}:host([selected]) .node-container .icon-start,:host([selected]) .node-container:hover .icon-start{--calcite-icon-color: var(--calcite-internal-tree-item-text-color)}:host([selected]) .node-container .selection-icon,:host([selected]) .node-container:hover .selection-icon{opacity:1;color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([has-children]) .node-container .selection-icon{display:none}.chevron{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;color:var(--calcite-color-text-3);position:relative;align-self:center;flex:0 0 auto;transform:rotate(0)}.calcite--rtl .chevron{transform:rotate(180deg)}.item--expanded .node-container>.chevron{transform:rotate(90deg)}:host([selected]) .selection-icon{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([selected]) .checkbox{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([has-children][indeterminate]) .checkbox{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends I{constructor(){super(),this.actionSlotWrapperRef=y(),this.childTree=null,this.direction=w(),this.isSelectionMultiLike=!1,this.userChangedValue=!1,this.interactiveContainer=z(this),this.hasEndActions=!1,this.updateAfterInitialRender=!1,this.depth=-1,this.disabled=!1,this.expanded=!1,this.indeterminate=!1,this.lines=!1,this.parentExpanded=!1,this.selected=!1,this.calciteInternalTreeItemSelect=r({cancelable:!1}),this.calciteTreeItemCollapse=r({cancelable:!1}),this.calciteTreeItemExpand=r({cancelable:!1}),this.calciteTreeItemSelect=r({cancelable:!1}),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasEndActions:[16,{},{state:!0}],updateAfterInitialRender:[16,{},{state:!0}],depth:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],hasChildren:[39,{},{reflect:!0,readOnly:!0,type:Boolean}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{},{reflect:!0}],indeterminate:[7,{},{reflect:!0,type:Boolean}],label:1,lines:[7,{},{reflect:!0,type:Boolean}],parentExpanded:[5,{},{type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=q}get hasChildren(){return!!this.childTree}connectedCallback(){super.connectedCallback(),this.parentTreeItem=this.el.parentElement?.closest("calcite-tree-item")??void 0}load(){requestAnimationFrame(()=>this.updateAfterInitialRender=!0)}willUpdate(e){this.preWillUpdate(),e.has("expanded")&&((this.hasUpdated||this.expanded!==!1)&&this.updateChildTree(),this.hasUpdated&&(this.expanded?this.calciteTreeItemExpand.emit():this.calciteTreeItemCollapse.emit())),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.handleSelectedChange(this.selected),e.has("selectionMode")&&this.getSelectionMode()}loaded(){this.updateAncestorTree()}handleSelectedChange(e){this.selectionMode==="ancestors"&&!this.userChangedValue&&(e&&(this.indeterminate=!1),this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:!0,updateItem:!1})),this.userChangedValue&&(this.calciteTreeItemSelect.emit(),this.userChangedValue=!1)}getSelectionMode(){this.isSelectionMultiLike=this.selectionMode==="multiple"||this.selectionMode==="multichildren"}onClick(e){if(this.disabled||this.isActionEndEvent(e))return;let[t]=T(this.el,"a");if(t&&e.composedPath()[0].tagName.toLowerCase()!=="a"){let l=t.target===""?"_self":t.target;window.open(t.href,l)}this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.selectionMode==="ancestors"||this.isSelectionMultiLike,updateItem:!0}),this.userChangedValue=!0}iconClickHandler(e){e.stopPropagation(),this.expanded=!this.expanded}childrenClickHandler(e){e.stopPropagation()}keyDownHandler(e){if(!(this.isActionEndEvent(e)||e.defaultPrevented))switch(e.key){case" ":this.userChangedValue=!0,this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,updateItem:!0}),e.preventDefault();break;case"Enter":{let t=Array.from(this.el.children).find(l=>l.matches("a"));this.userChangedValue=!0,t?(t.click(),this.selected=!0):this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,updateItem:!0}),e.preventDefault()}}}updateChildTree(){let{childTree:e}=this;e&&(e.parentExpanded=this.expanded)}handleChildrenSlotChange(e){let t=A(e).find(V)??null;this.childTree=t,this.requestUpdate("hasChildren"),this.updateChildTree()}isActionEndEvent(e){return e.composedPath().includes(this.actionSlotWrapperRef.value)}updateAncestorTree(){let e=this.parentTreeItem;if(!(this.selectionMode!=="ancestors"||!e)){if(this.selected){let t=this.el.parentElement;if(!t)return;let l=Array.from(t.children),h=l.filter(o=>o.selected);l.length===h.length?(e.selected=!0,e.indeterminate=!1):h.length>0&&(e.indeterminate=!0),Array.from(this.el.querySelectorAll("calcite-tree-item:not([disabled])")).forEach(o=>{o.selected=!0,o.indeterminate=!1})}else if(this.indeterminate){let t=this.parentTreeItem;t.indeterminate=!0}}}actionsEndSlotChangeHandler(e){this.hasEndActions=M(e)}preWillUpdate(){this.depth=0;let e=this.el.closest("calcite-tree");if(!e)return;this.selectionMode=e.selectionMode,this.scale=e.scale||"m",this.lines=e.lines;let t;for(;e&&(t=e.parentElement?.closest("calcite-tree")??null,t!==e);)e=t,this.depth=this.depth+1}getSelectionIcon(){let{selectionMode:e,hasChildren:t}=this;return e==="single"||e==="children"||e==="single-persist"?c.bulletPoint:e==="multiple"||e==="multichildren"?c.checkmark:e==="none"&&!t?c.blank:null}render(){let e=this.direction==="rtl",t=this.getSelectionIcon(),l=this.hasChildren&&this.indeterminate,h=this.hasChildren||this.selectionMode==="ancestors"?a`<calcite-icon class=${i({[n.chevron]:!0,[s.rtl]:e})} .icon=${this.hasChildren?c.chevronRight:c.blank} @click=${this.iconClickHandler} .scale=${d(this.scale)}></calcite-icon>`:null,m=u("default-slot",a`<slot></slot>`),o=this.selectionMode==="ancestors"?a`<div class=${i(n.checkboxContainer)}><calcite-icon class=${i(n.checkbox)} .icon=${this.selected?c.checkSquareF:l?c.minusSquareF:c.square} .scale=${d(this.scale)}></calcite-icon></div>`:null,L=t?a`<calcite-icon class=${i({[n.selectionIcon]:!0,[s.rtl]:e})} .icon=${t} .scale=${d(this.scale)}></calcite-icon>`:null,B=!(this.parentExpanded||this.depth===1),g=this.updateAfterInitialRender&&this.expanded,b=this.selectionMode==="multiple"||this.selectionMode==="multichildren"||this.selectionMode==="ancestors",x=this.selectionMode==="single"||this.selectionMode==="children"||this.selectionMode==="single-persist",{hasEndActions:H}=this,P=u("actionsEndSlot",a`<slot name=${f.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot>`),U=a`<calcite-icon class=${i(n.iconStart)} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${d(this.scale)}></calcite-icon>`;return this.el.ariaChecked=p(b&&this.selected,b?"false":null),this.el.ariaExpanded=p(this.hasChildren&&g,this.hasChildren?"false":null),this.el.inert=B,this.el.ariaLive="polite",this.el.ariaSelected=p(x&&this.selected,x?"false":null),this.el.role="treeitem",$(this.el,"tabIndex",this.disabled?-1:0),this.interactiveContainer({disabled:this.disabled,children:a`<div class=${i({[n.itemExpanded]:g})}><div class=${i(n.nodeAndActionsContainer)}><div class=${i({[n.nodeContainer]:!0,[s.rtl]:e})} data-selection-mode=${this.selectionMode??C}>${h}${L}${o||null}${this.iconStart?U:null}${o?a`<label class=${i(n.checkboxLabel)}>${m}</label>`:m}</div><div class=${i(n.actionsEnd)} .hidden=${!H} ${S(this.actionSlotWrapperRef)}>${P}</div></div><div class=${i({[n.childrenContainer]:!0,[s.rtl]:e})} @click=${this.childrenClickHandler} .role=${this.hasChildren?"group":void 0}><slot name=${f.children} @slotchange=${this.handleChildrenSlotChange}></slot></div></div>`})}};E("calcite-tree-item",v);export{v as TreeItem};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as B,b as G,c as T}from"./6MDH7C4R.js";import{d as I}from"./5K4OZJAZ.js";var O={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let t in O)Object.freeze(O[t]);var y=Object.freeze(O);var q=Object.create(null);for(let t in y)Object.hasOwn(y,t)&&(q[y[t]]=t);var g={to:{},get:{}};g.get=function(t){let n=t.slice(0,3).toLowerCase(),e,r;switch(n){case"hsl":{e=g.get.hsl(t),r="hsl";break}case"hwb":{e=g.get.hwb(t),r="hwb";break}default:{e=g.get.rgb(t),r="rgb";break}}return e?{model:r,value:e}:null};g.get.rgb=function(t){if(!t)return null;let n=/^#([a-f\d]{3,4})$/i,e=/^#([a-f\d]{6})([a-f\d]{2})?$/i,r=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,o=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,c=/^(\w+)$/,s=[0,0,0,1],a,i,h;if(a=t.match(e)){for(h=a[2],a=a[1],i=0;i<3;i++){let _=i*2;s[i]=Number.parseInt(a.slice(_,_+2),16)}h&&(s[3]=Number.parseInt(h,16)/255)}else if(a=t.match(n)){for(a=a[1],h=a[3],i=0;i<3;i++)s[i]=Number.parseInt(a[i]+a[i],16);h&&(s[3]=Number.parseInt(h+h,16)/255)}else if(a=t.match(r)){for(i=0;i<3;i++)s[i]=Number.parseFloat(a[i+1]);a[4]&&(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=t.match(o)){for(i=0;i<3;i++)s[i]=Math.round(Number.parseFloat(a[i+1])*2.55);a[4]&&(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=t.toLowerCase().match(c))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn(y,a[1])?(s=y[a[1]].slice(),s[3]=1,s):null:null;for(i=0;i<3;i++)s[i]=k(s[i],0,255);return s[3]=k(s[3],0,1),s};g.get.hsl=function(t){if(!t)return null;let n=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,e=t.match(n);if(e){let r=Number.parseFloat(e[4]),o=(Number.parseFloat(e[1])%360+360)%360,c=k(Number.parseFloat(e[2]),0,100),s=k(Number.parseFloat(e[3]),0,100),a=k(Number.isNaN(r)?1:r,0,1);return[o,c,s,a]}return null};g.get.hwb=function(t){if(!t)return null;let n=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,e=t.match(n);if(e){let r=Number.parseFloat(e[4]),o=(Number.parseFloat(e[1])%360+360)%360,c=k(Number.parseFloat(e[2]),0,100),s=k(Number.parseFloat(e[3]),0,100),a=k(Number.isNaN(r)?1:r,0,1);return[o,c,s,a]}return null};g.to.hex=function(...t){return"#"+H(t[0])+H(t[1])+H(t[2])+(t[3]<1?H(Math.round(t[3]*255)):"")};g.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};g.to.rgb.percent=function(...t){let n=Math.round(t[0]/255*100),e=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+n+"%, "+e+"%, "+r+"%)":"rgba("+n+"%, "+e+"%, "+r+"%, "+t[3]+")"};g.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};g.to.hwb=function(...t){let n="";return t.length>=4&&t[3]!==1&&(n=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+n+")"};g.to.keyword=function(...t){return q[t.slice(0,3)]};function k(t,n,e){return Math.min(Math.max(n,t),e)}function H(t){let n=Math.round(t).toString(16).toUpperCase();return n.length<2?"0"+n:n}var M=g;var W={};for(let t of Object.keys(y))W[y[t]]=t;var l={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},S=l,v=(6/29)**3;function x(t){let n=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,n),1)}function A(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(l)){if(!("channels"in l[t]))throw new Error("missing channels property: "+t);if(!("labels"in l[t]))throw new Error("missing channel labels property: "+t);if(l[t].labels.length!==l[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:n,labels:e}=l[t];delete l[t].channels,delete l[t].labels,Object.defineProperty(l[t],"channels",{value:n}),Object.defineProperty(l[t],"labels",{value:e})}l.rgb.hsl=function(t){let n=t[0]/255,e=t[1]/255,r=t[2]/255,o=Math.min(n,e,r),c=Math.max(n,e,r),s=c-o,a,i;switch(c){case o:{a=0;break}case n:{a=(e-r)/s;break}case e:{a=2+(r-n)/s;break}case r:{a=4+(n-e)/s;break}}a=Math.min(a*60,360),a<0&&(a+=360);let h=(o+c)/2;return c===o?i=0:h<=.5?i=s/(c+o):i=s/(2-c-o),[a,i*100,h*100]};l.rgb.hsv=function(t){let n,e,r,o,c,s=t[0]/255,a=t[1]/255,i=t[2]/255,h=Math.max(s,a,i),_=h-Math.min(s,a,i),w=function(J){return(h-J)/6/_+1/2};if(_===0)o=0,c=0;else{switch(c=_/h,n=w(s),e=w(a),r=w(i),h){case s:{o=r-e;break}case a:{o=1/3+n-r;break}case i:{o=2/3+e-n;break}}o<0?o+=1:o>1&&(o-=1)}return[o*360,c*100,h*100]};l.rgb.hwb=function(t){let n=t[0],e=t[1],r=t[2],o=l.rgb.hsl(t)[0],c=1/255*Math.min(n,Math.min(e,r));return r=1-1/255*Math.max(n,Math.max(e,r)),[o,c*100,r*100]};l.rgb.oklab=function(t){let n=A(t[0]/255),e=A(t[1]/255),r=A(t[2]/255),o=Math.cbrt(.4122214708*n+.5363325363*e+.0514459929*r),c=Math.cbrt(.2119034982*n+.6806995451*e+.1073969566*r),s=Math.cbrt(.0883024619*n+.2817188376*e+.6299787005*r),a=.2104542553*o+.793617785*c-.0040720468*s,i=1.9779984951*o-2.428592205*c+.4505937099*s,h=.0259040371*o+.7827717662*c-.808675766*s;return[a*100,i*100,h*100]};l.rgb.cmyk=function(t){let n=t[0]/255,e=t[1]/255,r=t[2]/255,o=Math.min(1-n,1-e,1-r),c=(1-n-o)/(1-o)||0,s=(1-e-o)/(1-o)||0,a=(1-r-o)/(1-o)||0;return[c*100,s*100,a*100,o*100]};function Z(t,n){return(t[0]-n[0])**2+(t[1]-n[1])**2+(t[2]-n[2])**2}l.rgb.keyword=function(t){let n=W[t];if(n)return n;let e=Number.POSITIVE_INFINITY,r;for(let o of Object.keys(y)){let c=y[o],s=Z(t,c);s<e&&(e=s,r=o)}return r};l.keyword.rgb=function(t){return[...y[t]]};l.rgb.xyz=function(t){let n=A(t[0]/255),e=A(t[1]/255),r=A(t[2]/255),o=n*.4124564+e*.3575761+r*.1804375,c=n*.2126729+e*.7151522+r*.072175,s=n*.0193339+e*.119192+r*.9503041;return[o*100,c*100,s*100]};l.rgb.lab=function(t){let n=l.rgb.xyz(t),e=n[0],r=n[1],o=n[2];e/=95.047,r/=100,o/=108.883,e=e>v?e**(1/3):7.787*e+16/116,r=r>v?r**(1/3):7.787*r+16/116,o=o>v?o**(1/3):7.787*o+16/116;let c=116*r-16,s=500*(e-r),a=200*(r-o);return[c,s,a]};l.hsl.rgb=function(t){let n=t[0]/360,e=t[1]/100,r=t[2]/100,o,c;if(e===0)return c=r*255,[c,c,c];let s=r<.5?r*(1+e):r+e-r*e,a=2*r-s,i=[0,0,0];for(let h=0;h<3;h++)o=n+1/3*-(h-1),o<0&&o++,o>1&&o--,6*o<1?c=a+(s-a)*6*o:2*o<1?c=s:3*o<2?c=a+(s-a)*(2/3-o)*6:c=a,i[h]=c*255;return i};l.hsl.hsv=function(t){let n=t[0],e=t[1]/100,r=t[2]/100,o=e,c=Math.max(r,.01);r*=2,e*=r<=1?r:2-r,o*=c<=1?c:2-c;let s=(r+e)/2,a=r===0?2*o/(c+o):2*e/(r+e);return[n,a*100,s*100]};l.hsv.rgb=function(t){let n=t[0]/60,e=t[1]/100,r=t[2]/100,o=Math.floor(n)%6,c=n-Math.floor(n),s=255*r*(1-e),a=255*r*(1-e*c),i=255*r*(1-e*(1-c));switch(r*=255,o){case 0:return[r,i,s];case 1:return[a,r,s];case 2:return[s,r,i];case 3:return[s,a,r];case 4:return[i,s,r];case 5:return[r,s,a]}};l.hsv.hsl=function(t){let n=t[0],e=t[1]/100,r=t[2]/100,o=Math.max(r,.01),c,s;s=(2-e)*r;let a=(2-e)*o;return c=e*o,c/=a<=1?a:2-a,c=c||0,s/=2,[n,c*100,s*100]};l.hwb.rgb=function(t){let n=t[0]/360,e=t[1]/100,r=t[2]/100,o=e+r,c;o>1&&(e/=o,r/=o);let s=Math.floor(6*n),a=1-r;c=6*n-s,(s&1)!==0&&(c=1-c);let i=e+c*(a-e),h,_,w;switch(s){default:case 6:case 0:{h=a,_=i,w=e;break}case 1:{h=i,_=a,w=e;break}case 2:{h=e,_=a,w=i;break}case 3:{h=e,_=i,w=a;break}case 4:{h=i,_=e,w=a;break}case 5:{h=a,_=e,w=i;break}}return[h*255,_*255,w*255]};l.cmyk.rgb=function(t){let n=t[0]/100,e=t[1]/100,r=t[2]/100,o=t[3]/100,c=1-Math.min(1,n*(1-o)+o),s=1-Math.min(1,e*(1-o)+o),a=1-Math.min(1,r*(1-o)+o);return[c*255,s*255,a*255]};l.xyz.rgb=function(t){let n=t[0]/100,e=t[1]/100,r=t[2]/100,o,c,s;return o=n*3.2404542+e*-1.5371385+r*-.4985314,c=n*-.969266+e*1.8760108+r*.041556,s=n*.0556434+e*-.2040259+r*1.0572252,o=x(o),c=x(c),s=x(s),[o*255,c*255,s*255]};l.xyz.lab=function(t){let n=t[0],e=t[1],r=t[2];n/=95.047,e/=100,r/=108.883,n=n>v?n**(1/3):7.787*n+16/116,e=e>v?e**(1/3):7.787*e+16/116,r=r>v?r**(1/3):7.787*r+16/116;let o=116*e-16,c=500*(n-e),s=200*(e-r);return[o,c,s]};l.xyz.oklab=function(t){let n=t[0]/100,e=t[1]/100,r=t[2]/100,o=Math.cbrt(.8189330101*n+.3618667424*e-.1288597137*r),c=Math.cbrt(.0329845436*n+.9293118715*e+.0361456387*r),s=Math.cbrt(.0482003018*n+.2643662691*e+.633851707*r),a=.2104542553*o+.793617785*c-.0040720468*s,i=1.9779984951*o-2.428592205*c+.4505937099*s,h=.0259040371*o+.7827717662*c-.808675766*s;return[a*100,i*100,h*100]};l.oklab.oklch=function(t){return l.lab.lch(t)};l.oklab.xyz=function(t){let n=t[0]/100,e=t[1]/100,r=t[2]/100,o=(.999999998*n+.396337792*e+.215803758*r)**3,c=(1.000000008*n-.105561342*e-.063854175*r)**3,s=(1.000000055*n-.089484182*e-1.291485538*r)**3,a=1.227013851*o-.55779998*c+.281256149*s,i=-.040580178*o+1.11225687*c-.071676679*s,h=-.076381285*o-.421481978*c+1.58616322*s;return[a*100,i*100,h*100]};l.oklab.rgb=function(t){let n=t[0]/100,e=t[1]/100,r=t[2]/100,o=(n+.3963377774*e+.2158037573*r)**3,c=(n-.1055613458*e-.0638541728*r)**3,s=(n-.0894841775*e-1.291485548*r)**3,a=x(4.0767416621*o-3.3077115913*c+.2309699292*s),i=x(-1.2684380046*o+2.6097574011*c-.3413193965*s),h=x(-.0041960863*o-.7034186147*c+1.707614701*s);return[a*255,i*255,h*255]};l.oklch.oklab=function(t){return l.lch.lab(t)};l.lab.xyz=function(t){let n=t[0],e=t[1],r=t[2],o,c,s;c=(n+16)/116,o=e/500+c,s=c-r/200;let a=c**3,i=o**3,h=s**3;return c=a>v?a:(c-16/116)/7.787,o=i>v?i:(o-16/116)/7.787,s=h>v?h:(s-16/116)/7.787,o*=95.047,c*=100,s*=108.883,[o,c,s]};l.lab.lch=function(t){let n=t[0],e=t[1],r=t[2],o;o=Math.atan2(r,e)*360/2/Math.PI,o<0&&(o+=360);let s=Math.sqrt(e*e+r*r);return[n,s,o]};l.lch.lab=function(t){let n=t[0],e=t[1],o=t[2]/360*2*Math.PI,c=e*Math.cos(o),s=e*Math.sin(o);return[n,c,s]};l.rgb.ansi16=function(t,n=null){let[e,r,o]=t,c=n===null?l.rgb.hsv(t)[2]:n;if(c=Math.round(c/50),c===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return c===2&&(s+=60),s};l.hsv.ansi16=function(t){return l.rgb.ansi16(l.hsv.rgb(t),t[2])};l.rgb.ansi256=function(t){let n=t[0],e=t[1],r=t[2];return n>>4===e>>4&&e>>4===r>>4?n<8?16:n>248?231:Math.round((n-8)/247*24)+232:16+36*Math.round(n/255*5)+6*Math.round(e/255*5)+Math.round(r/255*5)};l.ansi16.rgb=function(t){t=t[0];let n=t%10;if(n===0||n===7)return t>50&&(n+=3.5),n=n/10.5*255,[n,n,n];let e=(Math.trunc(t>50)+1)*.5,r=(n&1)*e*255,o=(n>>1&1)*e*255,c=(n>>2&1)*e*255;return[r,o,c]};l.ansi256.rgb=function(t){if(t=t[0],t>=232){let c=(t-232)*10+8;return[c,c,c]}t-=16;let n,e=Math.floor(t/36)/5*255,r=Math.floor((n=t%36)/6)/5*255,o=n%6/5*255;return[e,r,o]};l.rgb.hex=function(t){let e=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(e.length)+e};l.hex.rgb=function(t){let n=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!n)return[0,0,0];let e=n[0];n[0].length===3&&(e=[...e].map(a=>a+a).join(""));let r=Number.parseInt(e,16),o=r>>16&255,c=r>>8&255,s=r&255;return[o,c,s]};l.rgb.hcg=function(t){let n=t[0]/255,e=t[1]/255,r=t[2]/255,o=Math.max(Math.max(n,e),r),c=Math.min(Math.min(n,e),r),s=o-c,a,i=s<1?c/(1-s):0;return s<=0?a=0:o===n?a=(e-r)/s%6:o===e?a=2+(r-n)/s:a=4+(n-e)/s,a/=6,a%=1,[a*360,s*100,i*100]};l.hsl.hcg=function(t){let n=t[1]/100,e=t[2]/100,r=e<.5?2*n*e:2*n*(1-e),o=0;return r<1&&(o=(e-.5*r)/(1-r)),[t[0],r*100,o*100]};l.hsv.hcg=function(t){let n=t[1]/100,e=t[2]/100,r=n*e,o=0;return r<1&&(o=(e-r)/(1-r)),[t[0],r*100,o*100]};l.hcg.rgb=function(t){let n=t[0]/360,e=t[1]/100,r=t[2]/100;if(e===0)return[r*255,r*255,r*255];let o=[0,0,0],c=n%1*6,s=c%1,a=1-s,i=0;switch(Math.floor(c)){case 0:{o[0]=1,o[1]=s,o[2]=0;break}case 1:{o[0]=a,o[1]=1,o[2]=0;break}case 2:{o[0]=0,o[1]=1,o[2]=s;break}case 3:{o[0]=0,o[1]=a,o[2]=1;break}case 4:{o[0]=s,o[1]=0,o[2]=1;break}default:o[0]=1,o[1]=0,o[2]=a}return i=(1-e)*r,[(e*o[0]+i)*255,(e*o[1]+i)*255,(e*o[2]+i)*255]};l.hcg.hsv=function(t){let n=t[1]/100,e=t[2]/100,r=n+e*(1-n),o=0;return r>0&&(o=n/r),[t[0],o*100,r*100]};l.hcg.hsl=function(t){let n=t[1]/100,r=t[2]/100*(1-n)+.5*n,o=0;return r>0&&r<.5?o=n/(2*r):r>=.5&&r<1&&(o=n/(2*(1-r))),[t[0],o*100,r*100]};l.hcg.hwb=function(t){let n=t[1]/100,e=t[2]/100,r=n+e*(1-n);return[t[0],(r-n)*100,(1-r)*100]};l.hwb.hcg=function(t){let n=t[1]/100,r=1-t[2]/100,o=r-n,c=0;return o<1&&(c=(r-o)/(1-o)),[t[0],o*100,c*100]};l.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};l.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};l.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};l.gray.hsl=function(t){return[0,0,t[0]]};l.gray.hsv=l.gray.hsl;l.gray.hwb=function(t){return[0,100,t[0]]};l.gray.cmyk=function(t){return[0,0,0,t[0]]};l.gray.lab=function(t){return[t[0],0,0]};l.gray.hex=function(t){let n=Math.round(t[0]/100*255)&255,r=((n<<16)+(n<<8)+n).toString(16).toUpperCase();return"000000".slice(r.length)+r};l.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function Q(){let t={},n=Object.keys(S);for(let{length:e}=n,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}function V(t){let n=Q(),e=[t];for(n[t].distance=0;e.length>0;){let r=e.pop(),o=Object.keys(S[r]);for(let{length:c}=o,s=0;s<c;s++){let a=o[s],i=n[a];i.distance===-1&&(i.distance=n[r].distance+1,i.parent=r,e.unshift(a))}}return n}function tt(t,n){return function(e){return n(t(e))}}function nt(t,n){let e=[n[t].parent,t],r=S[n[t].parent][t],o=n[t].parent;for(;n[o].parent;)e.unshift(n[o].parent),r=tt(S[n[o].parent][o],r),o=n[o].parent;return r.conversion=e,r}function et(t){let n=V(t),e={},r=Object.keys(n);for(let{length:o}=r,c=0;c<o;c++){let s=r[c];n[s].parent!==null&&(e[s]=nt(s,n))}return e}var P=et;var F={},rt=Object.keys(S);function ot(t){let n=function(...e){let r=e[0];return r==null?r:(r.length>1&&(e=r),t(e))};return"conversion"in t&&(n.conversion=t.conversion),n}function st(t){let n=function(...e){let r=e[0];if(r==null)return r;r.length>1&&(e=r);let o=t(e);if(typeof o=="object")for(let{length:c}=o,s=0;s<c;s++)o[s]=Math.round(o[s]);return o};return"conversion"in t&&(n.conversion=t.conversion),n}for(let t of rt){F[t]={},Object.defineProperty(F[t],"channels",{value:S[t].channels}),Object.defineProperty(F[t],"labels",{value:S[t].labels});let n=P(t),e=Object.keys(n);for(let r of e){let o=n[r];F[t][r]=st(o),F[t][r].raw=ot(o)}}var m=F;var j=["keyword","gray","hex"],L={};for(let t of Object.keys(m))L[[...m[t].labels].sort().join("")]=t;var z={};function p(t,n){if(!(this instanceof p))return new p(t,n);if(n&&n in j&&(n=null),n&&!(n in m))throw new Error("Unknown model: "+n);let e,r;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof p)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let o=M.get(t);if(o===null)throw new Error("Unable to parse color from string: "+t);this.model=o.model,r=m[this.model].channels,this.color=o.value.slice(0,r),this.valpha=typeof o.value[r]=="number"?o.value[r]:1}else if(t.length>0){this.model=n||"rgb",r=m[this.model].channels;let o=Array.prototype.slice.call(t,0,r);this.color=R(o,r),this.valpha=typeof t[r]=="number"?t[r]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let o=Object.keys(t);"alpha"in t&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let c=o.sort().join("");if(!(c in L))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=L[c];let{labels:s}=m[this.model],a=[];for(e=0;e<s.length;e++)a.push(t[s[e]]);this.color=R(a)}if(z[this.model])for(r=m[this.model].channels,e=0;e<r;e++){let o=z[this.model][e];o&&(this.color[e]=o(this.color[e]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}p.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let n=this.model in M.to?this:this.rgb();n=n.round(typeof t=="number"?t:1);let e=n.valpha===1?n.color:[...n.color,this.valpha];return M.to[n.model](...e)},percentString(t){let n=this.rgb().round(typeof t=="number"?t:1),e=n.valpha===1?n.color:[...n.color,this.valpha];return M.to.rgb.percent(...e)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:n}=m[this.model],{labels:e}=m[this.model];for(let r=0;r<n;r++)t[e[r]]=this.color[r];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new p([...this.color.map(at(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new p([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:u("rgb",0,b(255)),green:u("rgb",1,b(255)),blue:u("rgb",2,b(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:u("hsl",1,b(100)),lightness:u("hsl",2,b(100)),saturationv:u("hsv",1,b(100)),value:u("hsv",2,b(100)),chroma:u("hcg",1,b(100)),gray:u("hcg",2,b(100)),white:u("hwb",1,b(100)),wblack:u("hwb",2,b(100)),cyan:u("cmyk",0,b(100)),magenta:u("cmyk",1,b(100)),yellow:u("cmyk",2,b(100)),black:u("cmyk",3,b(100)),x:u("xyz",0,b(95.047)),y:u("xyz",1,b(100)),z:u("xyz",2,b(108.833)),l:u("lab",0,b(100)),a:u("lab",1),b:u("lab",2),keyword(t){return t!==void 0?new p(t):m[this.model].keyword(this.color)},hex(t){return t!==void 0?new p(t):M.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new p(t);let n=this.rgb().round().color,e=Math.round(this.valpha*255).toString(16).toUpperCase();return e.length===1&&(e="0"+e),M.to.hex(...n)+e},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,n=[];for(let[e,r]of t.entries()){let o=r/255;n[e]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*n[0]+.7152*n[1]+.0722*n[2]},contrast(t){let n=this.luminosity(),e=t.luminosity();return n>e?(n+.05)/(e+.05):(e+.05)/(n+.05)},level(t){let n=this.contrast(t);return n>=7?"AAA":n>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let n=0;n<3;n++)t.color[n]=255-t.color[n];return t},lighten(t){let n=this.hsl();return n.color[2]+=n.color[2]*t,n},darken(t){let n=this.hsl();return n.color[2]-=n.color[2]*t,n},saturate(t){let n=this.hsl();return n.color[1]+=n.color[1]*t,n},desaturate(t){let n=this.hsl();return n.color[1]-=n.color[1]*t,n},whiten(t){let n=this.hwb();return n.color[1]+=n.color[1]*t,n},blacken(t){let n=this.hwb();return n.color[2]+=n.color[2]*t,n},grayscale(){let t=this.rgb().color,n=t[0]*.3+t[1]*.59+t[2]*.11;return p.rgb(n,n,n)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let n=this.hsl(),e=n.color[0];return e=(e+t)%360,e=e<0?360+e:e,n.color[0]=e,n},mix(t,n){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let e=t.rgb(),r=this.rgb(),o=n===void 0?.5:n,c=2*o-1,s=e.alpha()-r.alpha(),a=((c*s===-1?c:(c+s)/(1+c*s))+1)/2,i=1-a;return p.rgb(a*e.red()+i*r.red(),a*e.green()+i*r.green(),a*e.blue()+i*r.blue(),e.alpha()*o+r.alpha()*(1-o))}};for(let t of Object.keys(m)){if(j.includes(t))continue;let{channels:n}=m[t];p.prototype[t]=function(...e){return this.model===t?new p(this):e.length>0?new p(e,t):new p([...it(m[this.model][t].raw(this.color)),this.valpha],t)},p[t]=function(...e){let r=e[0];return typeof r=="number"&&(r=R(e,n)),new p(r,t)}}function ct(t,n){return Number(t.toFixed(n))}function at(t){return function(n){return ct(n,t)}}function u(t,n,e){t=Array.isArray(t)?t:[t];for(let r of t)(z[r]||=[])[n]=e;return t=t[0],function(r){let o;return r!==void 0?(e&&(r=e(r)),o=this[t](),o.color[n]=r,o):(o=this[t]().color[n],e&&(o=e(o)),o)}}function b(t){return function(n){return Math.max(0,Math.min(t,n))}}function it(t){return Array.isArray(t)?t:[t]}function R(t,n){for(let e=0;e<n;e++)typeof t[e]!="number"&&(t[e]=0);return t}var E=p;var Et={channel:"channel",channels:"channels",colorField:"color-field",colorFieldScope:"scope--color-field",colorMode:"color-mode",colorModeContainer:"color-mode-container",container:"container",control:"control",controlAndScope:"control-and-scope",controlSection:"control-section",deleteColor:"delete-color",header:"header",hexAndChannelsGroup:"hex-and-channels-group",hexOptions:"color-hex-options",hueScope:"scope--hue",hueSlider:"hue-slider",opacityScope:"scope--opacity",opacitySlider:"opacity-slider",preview:"preview",previewAndSliders:"preview-and-sliders",saveColor:"save-color",savedColor:"saved-color",savedColorsButtons:"saved-colors-buttons",savedColorsSection:"saved-colors-section",scope:"scope",section:"section",slider:"slider",sliders:"sliders",splitSection:"section--split",swatchGroup:"swatch-group"},$t=E("#007AC2"),Bt="calcite-color-",Gt={r:255,g:255,b:255},lt={h:360,s:100,v:100},Tt=lt.h-1,qt={min:0,max:100},ht={s:{gap:parseInt(B,10),slider:{height:12},thumb:{radius:7},preview:{size:20},minWidth:200},m:{gap:parseInt(G,10),slider:{height:12},thumb:{radius:7},preview:{size:24},minWidth:240},l:{gap:parseInt(T,10),slider:{height:12},thumb:{radius:7},preview:{size:32},minWidth:304}},Wt=1,Pt={minus:"minus",plus:"plus"},jt=/^[0-9A-F]$/i,ut=/^#[0-9A-F]{3}$/i,ft=/^#[0-9A-F]{6}$/i,dt=/^#[0-9A-F]{4}$/i,bt=/^#[0-9A-F]{8}$/i;function Xt(t,n=!1,e){if(!(n&&!t))return E(t!=null&&typeof t=="object"&&mt(e)?gt(t):t)}var Dt=t=>Number((t*100).toFixed()),Ut=t=>Number((t/100).toFixed(2));function pt(t,n=!1){return $(t,n)||_t(t,n)}function U(t,n,e){return t?t.length===n&&e.test(t):!1}function $(t,n=!1){return U(t,n?5:4,n?dt:ut)}function _t(t,n=!1){return U(t,n?9:7,n?bt:ft)}function Kt(t,n=!1,e=!1){if(t=t.toLowerCase(),t.startsWith("#")||(t=`#${t}`),$(t,n))return X(D(t));if(n&&e&&pt(t,!1)){let r=$(t,!1);return X(D(`${t}${r?"f":"ff"}`))}return t}function Yt(t,n=!1){return n?t.hexa():t.hex()}function X(t){let{r:n,g:e,b:r}=t,o=N(n),c=N(e),s=N(r),a="a"in t?N(t.a*255):"";return`#${o}${c}${s}${a}`.toLowerCase()}function N(t){return t.toString(16).padStart(2,"0")}function Jt(t){return{...I(t,["alpha"]),a:t.alpha??1}}function gt(t){return{...I(t,["a"]),alpha:t.a??1}}function D(t){t=t.replace("#","");let n,e,r,o;if(t.length===3||t.length===4){let[s,a,i,h]=t.split("");n=parseInt(`${s}${s}`,16),e=parseInt(`${a}${a}`,16),r=parseInt(`${i}${i}`,16),o=parseInt(`${h}${h}`,16)/255}else n=parseInt(t.slice(0,2),16),e=parseInt(t.slice(2,4),16),r=parseInt(t.slice(4,6),16),o=parseInt(t.slice(6,8),16)/255;return isNaN(o)?{r:n,g:e,b:r}:{r:n,g:e,b:r,a:o}}var K=t=>t,f=K({HEX:"hex",HEXA:"hexa",RGB_CSS:"rgb-css",RGBA_CSS:"rgba-css",HSL_CSS:"hsl-css",HSLA_CSS:"hsla-css"}),d=K({RGB:"rgb",RGBA:"rgba",HSL:"hsl",HSLA:"hsla",HSV:"hsv",HSVA:"hsva"});function Zt(t){if(typeof t=="string"){if(t.startsWith("#")){let{length:n}=t;if(n===4||n===7)return f.HEX;if(n===5||n===9)return f.HEXA}if(t.startsWith("rgba("))return f.RGBA_CSS;if(t.startsWith("rgb("))return f.RGB_CSS;if(t.startsWith("hsl("))return f.HSL_CSS;if(t.startsWith("hsla("))return f.HSLA_CSS}if(typeof t=="object"){if(C(t,"r","g","b"))return C(t,"a")?d.RGBA:d.RGB;if(C(t,"h","s","l"))return C(t,"a")?d.HSLA:d.HSL;if(C(t,"h","s","v"))return C(t,"a")?d.HSVA:d.HSV}}function C(t,...n){return n.every(e=>e&&t&&`${e}`in t)}function Qt(t,n){return t?.rgb().array().toString()===n?.rgb().array().toString()}function mt(t){return t===f.HEXA||t===f.RGBA_CSS||t===f.HSLA_CSS||t===d.RGBA||t===d.HSLA||t===d.HSVA}function Vt(t){return t===f.HEX?f.HEXA:t===f.RGB_CSS?f.RGBA_CSS:t===f.HSL_CSS?f.HSLA_CSS:t===d.RGB?d.RGBA:t===d.HSL?d.HSLA:t===d.HSV?d.HSVA:t}function tn(t){return t===f.HEXA?f.HEX:t===f.RGBA_CSS?f.RGB_CSS:t===f.HSLA_CSS?f.HSL_CSS:t===d.RGBA?d.RGB:t===d.HSLA?d.HSL:t===d.HSVA?d.HSV:t}var yt=1,Y=yt*2;function nn(t,n,e){let r=e?ht.l.preview.size:n.preview.size,o=t-Y,c=n.gap*3;return Math.max(o-c-r,0)}function en(t){let e=t-Y;return{width:Math.max(e,0),height:Math.max(Math.floor(e/1.8),0)}}export{E as a,Et as b,$t as c,Bt as d,Gt as e,lt as f,Tt as g,qt as h,ht as i,Wt as j,Pt as k,jt as l,Xt as m,Dt as n,Ut as o,pt as p,$ as q,_t as r,Kt as s,Yt as t,X as u,Jt as v,D as w,f as x,Zt as y,Qt as z,mt as A,Vt as B,tn as C,nn as D,en as E};
2
+ import{d as B,e as G,f as T}from"./6TP6A2OR.js";import{d as I}from"./5K4OZJAZ.js";var O={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let t in O)Object.freeze(O[t]);var y=Object.freeze(O);var q=Object.create(null);for(let t in y)Object.hasOwn(y,t)&&(q[y[t]]=t);var g={to:{},get:{}};g.get=function(t){let n=t.slice(0,3).toLowerCase(),e,r;switch(n){case"hsl":{e=g.get.hsl(t),r="hsl";break}case"hwb":{e=g.get.hwb(t),r="hwb";break}default:{e=g.get.rgb(t),r="rgb";break}}return e?{model:r,value:e}:null};g.get.rgb=function(t){if(!t)return null;let n=/^#([a-f\d]{3,4})$/i,e=/^#([a-f\d]{6})([a-f\d]{2})?$/i,r=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,o=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,c=/^(\w+)$/,s=[0,0,0,1],a,i,h;if(a=t.match(e)){for(h=a[2],a=a[1],i=0;i<3;i++){let _=i*2;s[i]=Number.parseInt(a.slice(_,_+2),16)}h&&(s[3]=Number.parseInt(h,16)/255)}else if(a=t.match(n)){for(a=a[1],h=a[3],i=0;i<3;i++)s[i]=Number.parseInt(a[i]+a[i],16);h&&(s[3]=Number.parseInt(h+h,16)/255)}else if(a=t.match(r)){for(i=0;i<3;i++)s[i]=Number.parseFloat(a[i+1]);a[4]&&(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=t.match(o)){for(i=0;i<3;i++)s[i]=Math.round(Number.parseFloat(a[i+1])*2.55);a[4]&&(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=t.toLowerCase().match(c))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn(y,a[1])?(s=y[a[1]].slice(),s[3]=1,s):null:null;for(i=0;i<3;i++)s[i]=k(s[i],0,255);return s[3]=k(s[3],0,1),s};g.get.hsl=function(t){if(!t)return null;let n=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,e=t.match(n);if(e){let r=Number.parseFloat(e[4]),o=(Number.parseFloat(e[1])%360+360)%360,c=k(Number.parseFloat(e[2]),0,100),s=k(Number.parseFloat(e[3]),0,100),a=k(Number.isNaN(r)?1:r,0,1);return[o,c,s,a]}return null};g.get.hwb=function(t){if(!t)return null;let n=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,e=t.match(n);if(e){let r=Number.parseFloat(e[4]),o=(Number.parseFloat(e[1])%360+360)%360,c=k(Number.parseFloat(e[2]),0,100),s=k(Number.parseFloat(e[3]),0,100),a=k(Number.isNaN(r)?1:r,0,1);return[o,c,s,a]}return null};g.to.hex=function(...t){return"#"+H(t[0])+H(t[1])+H(t[2])+(t[3]<1?H(Math.round(t[3]*255)):"")};g.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};g.to.rgb.percent=function(...t){let n=Math.round(t[0]/255*100),e=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+n+"%, "+e+"%, "+r+"%)":"rgba("+n+"%, "+e+"%, "+r+"%, "+t[3]+")"};g.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};g.to.hwb=function(...t){let n="";return t.length>=4&&t[3]!==1&&(n=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+n+")"};g.to.keyword=function(...t){return q[t.slice(0,3)]};function k(t,n,e){return Math.min(Math.max(n,t),e)}function H(t){let n=Math.round(t).toString(16).toUpperCase();return n.length<2?"0"+n:n}var M=g;var W={};for(let t of Object.keys(y))W[y[t]]=t;var l={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},S=l,v=(6/29)**3;function x(t){let n=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,n),1)}function A(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(l)){if(!("channels"in l[t]))throw new Error("missing channels property: "+t);if(!("labels"in l[t]))throw new Error("missing channel labels property: "+t);if(l[t].labels.length!==l[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:n,labels:e}=l[t];delete l[t].channels,delete l[t].labels,Object.defineProperty(l[t],"channels",{value:n}),Object.defineProperty(l[t],"labels",{value:e})}l.rgb.hsl=function(t){let n=t[0]/255,e=t[1]/255,r=t[2]/255,o=Math.min(n,e,r),c=Math.max(n,e,r),s=c-o,a,i;switch(c){case o:{a=0;break}case n:{a=(e-r)/s;break}case e:{a=2+(r-n)/s;break}case r:{a=4+(n-e)/s;break}}a=Math.min(a*60,360),a<0&&(a+=360);let h=(o+c)/2;return c===o?i=0:h<=.5?i=s/(c+o):i=s/(2-c-o),[a,i*100,h*100]};l.rgb.hsv=function(t){let n,e,r,o,c,s=t[0]/255,a=t[1]/255,i=t[2]/255,h=Math.max(s,a,i),_=h-Math.min(s,a,i),w=function(J){return(h-J)/6/_+1/2};if(_===0)o=0,c=0;else{switch(c=_/h,n=w(s),e=w(a),r=w(i),h){case s:{o=r-e;break}case a:{o=1/3+n-r;break}case i:{o=2/3+e-n;break}}o<0?o+=1:o>1&&(o-=1)}return[o*360,c*100,h*100]};l.rgb.hwb=function(t){let n=t[0],e=t[1],r=t[2],o=l.rgb.hsl(t)[0],c=1/255*Math.min(n,Math.min(e,r));return r=1-1/255*Math.max(n,Math.max(e,r)),[o,c*100,r*100]};l.rgb.oklab=function(t){let n=A(t[0]/255),e=A(t[1]/255),r=A(t[2]/255),o=Math.cbrt(.4122214708*n+.5363325363*e+.0514459929*r),c=Math.cbrt(.2119034982*n+.6806995451*e+.1073969566*r),s=Math.cbrt(.0883024619*n+.2817188376*e+.6299787005*r),a=.2104542553*o+.793617785*c-.0040720468*s,i=1.9779984951*o-2.428592205*c+.4505937099*s,h=.0259040371*o+.7827717662*c-.808675766*s;return[a*100,i*100,h*100]};l.rgb.cmyk=function(t){let n=t[0]/255,e=t[1]/255,r=t[2]/255,o=Math.min(1-n,1-e,1-r),c=(1-n-o)/(1-o)||0,s=(1-e-o)/(1-o)||0,a=(1-r-o)/(1-o)||0;return[c*100,s*100,a*100,o*100]};function Z(t,n){return(t[0]-n[0])**2+(t[1]-n[1])**2+(t[2]-n[2])**2}l.rgb.keyword=function(t){let n=W[t];if(n)return n;let e=Number.POSITIVE_INFINITY,r;for(let o of Object.keys(y)){let c=y[o],s=Z(t,c);s<e&&(e=s,r=o)}return r};l.keyword.rgb=function(t){return[...y[t]]};l.rgb.xyz=function(t){let n=A(t[0]/255),e=A(t[1]/255),r=A(t[2]/255),o=n*.4124564+e*.3575761+r*.1804375,c=n*.2126729+e*.7151522+r*.072175,s=n*.0193339+e*.119192+r*.9503041;return[o*100,c*100,s*100]};l.rgb.lab=function(t){let n=l.rgb.xyz(t),e=n[0],r=n[1],o=n[2];e/=95.047,r/=100,o/=108.883,e=e>v?e**(1/3):7.787*e+16/116,r=r>v?r**(1/3):7.787*r+16/116,o=o>v?o**(1/3):7.787*o+16/116;let c=116*r-16,s=500*(e-r),a=200*(r-o);return[c,s,a]};l.hsl.rgb=function(t){let n=t[0]/360,e=t[1]/100,r=t[2]/100,o,c;if(e===0)return c=r*255,[c,c,c];let s=r<.5?r*(1+e):r+e-r*e,a=2*r-s,i=[0,0,0];for(let h=0;h<3;h++)o=n+1/3*-(h-1),o<0&&o++,o>1&&o--,6*o<1?c=a+(s-a)*6*o:2*o<1?c=s:3*o<2?c=a+(s-a)*(2/3-o)*6:c=a,i[h]=c*255;return i};l.hsl.hsv=function(t){let n=t[0],e=t[1]/100,r=t[2]/100,o=e,c=Math.max(r,.01);r*=2,e*=r<=1?r:2-r,o*=c<=1?c:2-c;let s=(r+e)/2,a=r===0?2*o/(c+o):2*e/(r+e);return[n,a*100,s*100]};l.hsv.rgb=function(t){let n=t[0]/60,e=t[1]/100,r=t[2]/100,o=Math.floor(n)%6,c=n-Math.floor(n),s=255*r*(1-e),a=255*r*(1-e*c),i=255*r*(1-e*(1-c));switch(r*=255,o){case 0:return[r,i,s];case 1:return[a,r,s];case 2:return[s,r,i];case 3:return[s,a,r];case 4:return[i,s,r];case 5:return[r,s,a]}};l.hsv.hsl=function(t){let n=t[0],e=t[1]/100,r=t[2]/100,o=Math.max(r,.01),c,s;s=(2-e)*r;let a=(2-e)*o;return c=e*o,c/=a<=1?a:2-a,c=c||0,s/=2,[n,c*100,s*100]};l.hwb.rgb=function(t){let n=t[0]/360,e=t[1]/100,r=t[2]/100,o=e+r,c;o>1&&(e/=o,r/=o);let s=Math.floor(6*n),a=1-r;c=6*n-s,(s&1)!==0&&(c=1-c);let i=e+c*(a-e),h,_,w;switch(s){default:case 6:case 0:{h=a,_=i,w=e;break}case 1:{h=i,_=a,w=e;break}case 2:{h=e,_=a,w=i;break}case 3:{h=e,_=i,w=a;break}case 4:{h=i,_=e,w=a;break}case 5:{h=a,_=e,w=i;break}}return[h*255,_*255,w*255]};l.cmyk.rgb=function(t){let n=t[0]/100,e=t[1]/100,r=t[2]/100,o=t[3]/100,c=1-Math.min(1,n*(1-o)+o),s=1-Math.min(1,e*(1-o)+o),a=1-Math.min(1,r*(1-o)+o);return[c*255,s*255,a*255]};l.xyz.rgb=function(t){let n=t[0]/100,e=t[1]/100,r=t[2]/100,o,c,s;return o=n*3.2404542+e*-1.5371385+r*-.4985314,c=n*-.969266+e*1.8760108+r*.041556,s=n*.0556434+e*-.2040259+r*1.0572252,o=x(o),c=x(c),s=x(s),[o*255,c*255,s*255]};l.xyz.lab=function(t){let n=t[0],e=t[1],r=t[2];n/=95.047,e/=100,r/=108.883,n=n>v?n**(1/3):7.787*n+16/116,e=e>v?e**(1/3):7.787*e+16/116,r=r>v?r**(1/3):7.787*r+16/116;let o=116*e-16,c=500*(n-e),s=200*(e-r);return[o,c,s]};l.xyz.oklab=function(t){let n=t[0]/100,e=t[1]/100,r=t[2]/100,o=Math.cbrt(.8189330101*n+.3618667424*e-.1288597137*r),c=Math.cbrt(.0329845436*n+.9293118715*e+.0361456387*r),s=Math.cbrt(.0482003018*n+.2643662691*e+.633851707*r),a=.2104542553*o+.793617785*c-.0040720468*s,i=1.9779984951*o-2.428592205*c+.4505937099*s,h=.0259040371*o+.7827717662*c-.808675766*s;return[a*100,i*100,h*100]};l.oklab.oklch=function(t){return l.lab.lch(t)};l.oklab.xyz=function(t){let n=t[0]/100,e=t[1]/100,r=t[2]/100,o=(.999999998*n+.396337792*e+.215803758*r)**3,c=(1.000000008*n-.105561342*e-.063854175*r)**3,s=(1.000000055*n-.089484182*e-1.291485538*r)**3,a=1.227013851*o-.55779998*c+.281256149*s,i=-.040580178*o+1.11225687*c-.071676679*s,h=-.076381285*o-.421481978*c+1.58616322*s;return[a*100,i*100,h*100]};l.oklab.rgb=function(t){let n=t[0]/100,e=t[1]/100,r=t[2]/100,o=(n+.3963377774*e+.2158037573*r)**3,c=(n-.1055613458*e-.0638541728*r)**3,s=(n-.0894841775*e-1.291485548*r)**3,a=x(4.0767416621*o-3.3077115913*c+.2309699292*s),i=x(-1.2684380046*o+2.6097574011*c-.3413193965*s),h=x(-.0041960863*o-.7034186147*c+1.707614701*s);return[a*255,i*255,h*255]};l.oklch.oklab=function(t){return l.lch.lab(t)};l.lab.xyz=function(t){let n=t[0],e=t[1],r=t[2],o,c,s;c=(n+16)/116,o=e/500+c,s=c-r/200;let a=c**3,i=o**3,h=s**3;return c=a>v?a:(c-16/116)/7.787,o=i>v?i:(o-16/116)/7.787,s=h>v?h:(s-16/116)/7.787,o*=95.047,c*=100,s*=108.883,[o,c,s]};l.lab.lch=function(t){let n=t[0],e=t[1],r=t[2],o;o=Math.atan2(r,e)*360/2/Math.PI,o<0&&(o+=360);let s=Math.sqrt(e*e+r*r);return[n,s,o]};l.lch.lab=function(t){let n=t[0],e=t[1],o=t[2]/360*2*Math.PI,c=e*Math.cos(o),s=e*Math.sin(o);return[n,c,s]};l.rgb.ansi16=function(t,n=null){let[e,r,o]=t,c=n===null?l.rgb.hsv(t)[2]:n;if(c=Math.round(c/50),c===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return c===2&&(s+=60),s};l.hsv.ansi16=function(t){return l.rgb.ansi16(l.hsv.rgb(t),t[2])};l.rgb.ansi256=function(t){let n=t[0],e=t[1],r=t[2];return n>>4===e>>4&&e>>4===r>>4?n<8?16:n>248?231:Math.round((n-8)/247*24)+232:16+36*Math.round(n/255*5)+6*Math.round(e/255*5)+Math.round(r/255*5)};l.ansi16.rgb=function(t){t=t[0];let n=t%10;if(n===0||n===7)return t>50&&(n+=3.5),n=n/10.5*255,[n,n,n];let e=(Math.trunc(t>50)+1)*.5,r=(n&1)*e*255,o=(n>>1&1)*e*255,c=(n>>2&1)*e*255;return[r,o,c]};l.ansi256.rgb=function(t){if(t=t[0],t>=232){let c=(t-232)*10+8;return[c,c,c]}t-=16;let n,e=Math.floor(t/36)/5*255,r=Math.floor((n=t%36)/6)/5*255,o=n%6/5*255;return[e,r,o]};l.rgb.hex=function(t){let e=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(e.length)+e};l.hex.rgb=function(t){let n=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!n)return[0,0,0];let e=n[0];n[0].length===3&&(e=[...e].map(a=>a+a).join(""));let r=Number.parseInt(e,16),o=r>>16&255,c=r>>8&255,s=r&255;return[o,c,s]};l.rgb.hcg=function(t){let n=t[0]/255,e=t[1]/255,r=t[2]/255,o=Math.max(Math.max(n,e),r),c=Math.min(Math.min(n,e),r),s=o-c,a,i=s<1?c/(1-s):0;return s<=0?a=0:o===n?a=(e-r)/s%6:o===e?a=2+(r-n)/s:a=4+(n-e)/s,a/=6,a%=1,[a*360,s*100,i*100]};l.hsl.hcg=function(t){let n=t[1]/100,e=t[2]/100,r=e<.5?2*n*e:2*n*(1-e),o=0;return r<1&&(o=(e-.5*r)/(1-r)),[t[0],r*100,o*100]};l.hsv.hcg=function(t){let n=t[1]/100,e=t[2]/100,r=n*e,o=0;return r<1&&(o=(e-r)/(1-r)),[t[0],r*100,o*100]};l.hcg.rgb=function(t){let n=t[0]/360,e=t[1]/100,r=t[2]/100;if(e===0)return[r*255,r*255,r*255];let o=[0,0,0],c=n%1*6,s=c%1,a=1-s,i=0;switch(Math.floor(c)){case 0:{o[0]=1,o[1]=s,o[2]=0;break}case 1:{o[0]=a,o[1]=1,o[2]=0;break}case 2:{o[0]=0,o[1]=1,o[2]=s;break}case 3:{o[0]=0,o[1]=a,o[2]=1;break}case 4:{o[0]=s,o[1]=0,o[2]=1;break}default:o[0]=1,o[1]=0,o[2]=a}return i=(1-e)*r,[(e*o[0]+i)*255,(e*o[1]+i)*255,(e*o[2]+i)*255]};l.hcg.hsv=function(t){let n=t[1]/100,e=t[2]/100,r=n+e*(1-n),o=0;return r>0&&(o=n/r),[t[0],o*100,r*100]};l.hcg.hsl=function(t){let n=t[1]/100,r=t[2]/100*(1-n)+.5*n,o=0;return r>0&&r<.5?o=n/(2*r):r>=.5&&r<1&&(o=n/(2*(1-r))),[t[0],o*100,r*100]};l.hcg.hwb=function(t){let n=t[1]/100,e=t[2]/100,r=n+e*(1-n);return[t[0],(r-n)*100,(1-r)*100]};l.hwb.hcg=function(t){let n=t[1]/100,r=1-t[2]/100,o=r-n,c=0;return o<1&&(c=(r-o)/(1-o)),[t[0],o*100,c*100]};l.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};l.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};l.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};l.gray.hsl=function(t){return[0,0,t[0]]};l.gray.hsv=l.gray.hsl;l.gray.hwb=function(t){return[0,100,t[0]]};l.gray.cmyk=function(t){return[0,0,0,t[0]]};l.gray.lab=function(t){return[t[0],0,0]};l.gray.hex=function(t){let n=Math.round(t[0]/100*255)&255,r=((n<<16)+(n<<8)+n).toString(16).toUpperCase();return"000000".slice(r.length)+r};l.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function Q(){let t={},n=Object.keys(S);for(let{length:e}=n,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}function V(t){let n=Q(),e=[t];for(n[t].distance=0;e.length>0;){let r=e.pop(),o=Object.keys(S[r]);for(let{length:c}=o,s=0;s<c;s++){let a=o[s],i=n[a];i.distance===-1&&(i.distance=n[r].distance+1,i.parent=r,e.unshift(a))}}return n}function tt(t,n){return function(e){return n(t(e))}}function nt(t,n){let e=[n[t].parent,t],r=S[n[t].parent][t],o=n[t].parent;for(;n[o].parent;)e.unshift(n[o].parent),r=tt(S[n[o].parent][o],r),o=n[o].parent;return r.conversion=e,r}function et(t){let n=V(t),e={},r=Object.keys(n);for(let{length:o}=r,c=0;c<o;c++){let s=r[c];n[s].parent!==null&&(e[s]=nt(s,n))}return e}var P=et;var F={},rt=Object.keys(S);function ot(t){let n=function(...e){let r=e[0];return r==null?r:(r.length>1&&(e=r),t(e))};return"conversion"in t&&(n.conversion=t.conversion),n}function st(t){let n=function(...e){let r=e[0];if(r==null)return r;r.length>1&&(e=r);let o=t(e);if(typeof o=="object")for(let{length:c}=o,s=0;s<c;s++)o[s]=Math.round(o[s]);return o};return"conversion"in t&&(n.conversion=t.conversion),n}for(let t of rt){F[t]={},Object.defineProperty(F[t],"channels",{value:S[t].channels}),Object.defineProperty(F[t],"labels",{value:S[t].labels});let n=P(t),e=Object.keys(n);for(let r of e){let o=n[r];F[t][r]=st(o),F[t][r].raw=ot(o)}}var m=F;var j=["keyword","gray","hex"],L={};for(let t of Object.keys(m))L[[...m[t].labels].sort().join("")]=t;var z={};function p(t,n){if(!(this instanceof p))return new p(t,n);if(n&&n in j&&(n=null),n&&!(n in m))throw new Error("Unknown model: "+n);let e,r;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof p)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let o=M.get(t);if(o===null)throw new Error("Unable to parse color from string: "+t);this.model=o.model,r=m[this.model].channels,this.color=o.value.slice(0,r),this.valpha=typeof o.value[r]=="number"?o.value[r]:1}else if(t.length>0){this.model=n||"rgb",r=m[this.model].channels;let o=Array.prototype.slice.call(t,0,r);this.color=R(o,r),this.valpha=typeof t[r]=="number"?t[r]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let o=Object.keys(t);"alpha"in t&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let c=o.sort().join("");if(!(c in L))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=L[c];let{labels:s}=m[this.model],a=[];for(e=0;e<s.length;e++)a.push(t[s[e]]);this.color=R(a)}if(z[this.model])for(r=m[this.model].channels,e=0;e<r;e++){let o=z[this.model][e];o&&(this.color[e]=o(this.color[e]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}p.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let n=this.model in M.to?this:this.rgb();n=n.round(typeof t=="number"?t:1);let e=n.valpha===1?n.color:[...n.color,this.valpha];return M.to[n.model](...e)},percentString(t){let n=this.rgb().round(typeof t=="number"?t:1),e=n.valpha===1?n.color:[...n.color,this.valpha];return M.to.rgb.percent(...e)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:n}=m[this.model],{labels:e}=m[this.model];for(let r=0;r<n;r++)t[e[r]]=this.color[r];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new p([...this.color.map(at(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new p([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:u("rgb",0,b(255)),green:u("rgb",1,b(255)),blue:u("rgb",2,b(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:u("hsl",1,b(100)),lightness:u("hsl",2,b(100)),saturationv:u("hsv",1,b(100)),value:u("hsv",2,b(100)),chroma:u("hcg",1,b(100)),gray:u("hcg",2,b(100)),white:u("hwb",1,b(100)),wblack:u("hwb",2,b(100)),cyan:u("cmyk",0,b(100)),magenta:u("cmyk",1,b(100)),yellow:u("cmyk",2,b(100)),black:u("cmyk",3,b(100)),x:u("xyz",0,b(95.047)),y:u("xyz",1,b(100)),z:u("xyz",2,b(108.833)),l:u("lab",0,b(100)),a:u("lab",1),b:u("lab",2),keyword(t){return t!==void 0?new p(t):m[this.model].keyword(this.color)},hex(t){return t!==void 0?new p(t):M.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new p(t);let n=this.rgb().round().color,e=Math.round(this.valpha*255).toString(16).toUpperCase();return e.length===1&&(e="0"+e),M.to.hex(...n)+e},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,n=[];for(let[e,r]of t.entries()){let o=r/255;n[e]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*n[0]+.7152*n[1]+.0722*n[2]},contrast(t){let n=this.luminosity(),e=t.luminosity();return n>e?(n+.05)/(e+.05):(e+.05)/(n+.05)},level(t){let n=this.contrast(t);return n>=7?"AAA":n>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let n=0;n<3;n++)t.color[n]=255-t.color[n];return t},lighten(t){let n=this.hsl();return n.color[2]+=n.color[2]*t,n},darken(t){let n=this.hsl();return n.color[2]-=n.color[2]*t,n},saturate(t){let n=this.hsl();return n.color[1]+=n.color[1]*t,n},desaturate(t){let n=this.hsl();return n.color[1]-=n.color[1]*t,n},whiten(t){let n=this.hwb();return n.color[1]+=n.color[1]*t,n},blacken(t){let n=this.hwb();return n.color[2]+=n.color[2]*t,n},grayscale(){let t=this.rgb().color,n=t[0]*.3+t[1]*.59+t[2]*.11;return p.rgb(n,n,n)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let n=this.hsl(),e=n.color[0];return e=(e+t)%360,e=e<0?360+e:e,n.color[0]=e,n},mix(t,n){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let e=t.rgb(),r=this.rgb(),o=n===void 0?.5:n,c=2*o-1,s=e.alpha()-r.alpha(),a=((c*s===-1?c:(c+s)/(1+c*s))+1)/2,i=1-a;return p.rgb(a*e.red()+i*r.red(),a*e.green()+i*r.green(),a*e.blue()+i*r.blue(),e.alpha()*o+r.alpha()*(1-o))}};for(let t of Object.keys(m)){if(j.includes(t))continue;let{channels:n}=m[t];p.prototype[t]=function(...e){return this.model===t?new p(this):e.length>0?new p(e,t):new p([...it(m[this.model][t].raw(this.color)),this.valpha],t)},p[t]=function(...e){let r=e[0];return typeof r=="number"&&(r=R(e,n)),new p(r,t)}}function ct(t,n){return Number(t.toFixed(n))}function at(t){return function(n){return ct(n,t)}}function u(t,n,e){t=Array.isArray(t)?t:[t];for(let r of t)(z[r]||=[])[n]=e;return t=t[0],function(r){let o;return r!==void 0?(e&&(r=e(r)),o=this[t](),o.color[n]=r,o):(o=this[t]().color[n],e&&(o=e(o)),o)}}function b(t){return function(n){return Math.max(0,Math.min(t,n))}}function it(t){return Array.isArray(t)?t:[t]}function R(t,n){for(let e=0;e<n;e++)typeof t[e]!="number"&&(t[e]=0);return t}var E=p;var Et={channel:"channel",channels:"channels",colorField:"color-field",colorFieldScope:"scope--color-field",colorMode:"color-mode",colorModeContainer:"color-mode-container",container:"container",control:"control",controlAndScope:"control-and-scope",controlSection:"control-section",deleteColor:"delete-color",header:"header",hexAndChannelsGroup:"hex-and-channels-group",hexOptions:"color-hex-options",hueScope:"scope--hue",hueSlider:"hue-slider",opacityScope:"scope--opacity",opacitySlider:"opacity-slider",preview:"preview",previewAndSliders:"preview-and-sliders",saveColor:"save-color",savedColor:"saved-color",savedColorsButtons:"saved-colors-buttons",savedColorsSection:"saved-colors-section",scope:"scope",section:"section",slider:"slider",sliders:"sliders",splitSection:"section--split",swatchGroup:"swatch-group"},$t=E("#007AC2"),Bt="calcite-color-",Gt={r:255,g:255,b:255},lt={h:360,s:100,v:100},Tt=lt.h-1,qt={min:0,max:100},ht={s:{gap:Math.floor(parseFloat(B)*16),slider:{height:12},thumb:{radius:7},preview:{size:20},minWidth:200},m:{gap:Math.floor(parseFloat(G)*16),slider:{height:12},thumb:{radius:7},preview:{size:24},minWidth:240},l:{gap:Math.floor(parseFloat(T)*16),slider:{height:12},thumb:{radius:7},preview:{size:32},minWidth:304}},Wt=1,Pt={minus:"minus",plus:"plus"},jt=/^[0-9A-F]$/i,ut=/^#[0-9A-F]{3}$/i,ft=/^#[0-9A-F]{6}$/i,dt=/^#[0-9A-F]{4}$/i,bt=/^#[0-9A-F]{8}$/i;function Dt(t,n=!1,e){if(!(n&&!t))return E(t!=null&&typeof t=="object"&&mt(e)?gt(t):t)}var Ut=t=>Number((t*100).toFixed()),Xt=t=>Number((t/100).toFixed(2));function pt(t,n=!1){return $(t,n)||_t(t,n)}function X(t,n,e){return t?t.length===n&&e.test(t):!1}function $(t,n=!1){return X(t,n?5:4,n?dt:ut)}function _t(t,n=!1){return X(t,n?9:7,n?bt:ft)}function Kt(t,n=!1,e=!1){if(t=t.toLowerCase(),t.startsWith("#")||(t=`#${t}`),$(t,n))return D(U(t));if(n&&e&&pt(t,!1)){let r=$(t,!1);return D(U(`${t}${r?"f":"ff"}`))}return t}function Yt(t,n=!1){return n?t.hexa():t.hex()}function D(t){let{r:n,g:e,b:r}=t,o=N(n),c=N(e),s=N(r),a="a"in t?N(t.a*255):"";return`#${o}${c}${s}${a}`.toLowerCase()}function N(t){return t.toString(16).padStart(2,"0")}function Jt(t){return{...I(t,["alpha"]),a:t.alpha??1}}function gt(t){return{...I(t,["a"]),alpha:t.a??1}}function U(t){t=t.replace("#","");let n,e,r,o;if(t.length===3||t.length===4){let[s,a,i,h]=t.split("");n=parseInt(`${s}${s}`,16),e=parseInt(`${a}${a}`,16),r=parseInt(`${i}${i}`,16),o=parseInt(`${h}${h}`,16)/255}else n=parseInt(t.slice(0,2),16),e=parseInt(t.slice(2,4),16),r=parseInt(t.slice(4,6),16),o=parseInt(t.slice(6,8),16)/255;return isNaN(o)?{r:n,g:e,b:r}:{r:n,g:e,b:r,a:o}}var K=t=>t,f=K({HEX:"hex",HEXA:"hexa",RGB_CSS:"rgb-css",RGBA_CSS:"rgba-css",HSL_CSS:"hsl-css",HSLA_CSS:"hsla-css"}),d=K({RGB:"rgb",RGBA:"rgba",HSL:"hsl",HSLA:"hsla",HSV:"hsv",HSVA:"hsva"});function Zt(t){if(typeof t=="string"){if(t.startsWith("#")){let{length:n}=t;if(n===4||n===7)return f.HEX;if(n===5||n===9)return f.HEXA}if(t.startsWith("rgba("))return f.RGBA_CSS;if(t.startsWith("rgb("))return f.RGB_CSS;if(t.startsWith("hsl("))return f.HSL_CSS;if(t.startsWith("hsla("))return f.HSLA_CSS}if(typeof t=="object"){if(C(t,"r","g","b"))return C(t,"a")?d.RGBA:d.RGB;if(C(t,"h","s","l"))return C(t,"a")?d.HSLA:d.HSL;if(C(t,"h","s","v"))return C(t,"a")?d.HSVA:d.HSV}}function C(t,...n){return n.every(e=>e&&t&&`${e}`in t)}function Qt(t,n){return t?.rgb().array().toString()===n?.rgb().array().toString()}function mt(t){return t===f.HEXA||t===f.RGBA_CSS||t===f.HSLA_CSS||t===d.RGBA||t===d.HSLA||t===d.HSVA}function Vt(t){return t===f.HEX?f.HEXA:t===f.RGB_CSS?f.RGBA_CSS:t===f.HSL_CSS?f.HSLA_CSS:t===d.RGB?d.RGBA:t===d.HSL?d.HSLA:t===d.HSV?d.HSVA:t}function tn(t){return t===f.HEXA?f.HEX:t===f.RGBA_CSS?f.RGB_CSS:t===f.HSLA_CSS?f.HSL_CSS:t===d.RGBA?d.RGB:t===d.HSLA?d.HSL:t===d.HSVA?d.HSV:t}var yt=1,Y=yt*2;function nn(t,n,e){let r=e?ht.l.preview.size:n.preview.size,o=t-Y,c=n.gap*3;return Math.max(o-c-r,0)}function en(t){let e=t-Y;return{width:Math.max(e,0),height:Math.max(Math.floor(e/1.8),0)}}export{E as a,Et as b,$t as c,Bt as d,Gt as e,lt as f,Tt as g,qt as h,ht as i,Wt as j,Pt as k,jt as l,Dt as m,Ut as n,Xt as o,pt as p,$ as q,_t as r,Kt as s,Yt as t,D as u,Jt as v,U as w,f as x,Zt as y,Qt as z,mt as A,Vt as B,tn as C,nn as D,en as E};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{p as d,w as g}from"./F5ITNV4F.js";import"./6MDH7C4R.js";import"./5K4OZJAZ.js";import{G as b,H as o,I as v,J as h,T as p,g as f,h as c}from"./QAAX5OQX.js";var u={thumbnail:"thumbnail",background:"background",initials:"initials",icon:"icon"};function x(i){i=k(i);let e=0;for(let a=0;a<i.length;a++)e=i.charCodeAt(a)+((e<<5)-e);let t="#";for(let a=0;a<3;a++){let r=e>>a*8&255;t+=("00"+r.toString(16)).substr(-2)}return t}function k(i){let e=Math.floor(i.length/2),t=i.split("").reverse().join("");return t.substring(e)+t.slice(0,e)}function z(i){let{r:e,g:t,b:a}=i;e/=255,t/=255,a/=255;let r=Math.max(e,t,a),l=Math.min(e,t,a),n=r-l;if(r===l)return 0;let s=(r+l)/2;switch(r){case e:s=(t-a)/n+(t<a?6:0);break;case t:s=(a-e)/n+2;break;case a:s=(e-t)/n+4;break}return Math.round(s*60)}function $(i){return z(g(i))}var y=f`:host{display:inline-block;flex-shrink:0;overflow:hidden;border-radius:var(--calcite-avatar-corner-radius, 50%);color:var(--calcite-avatar-color, var(--calcite-color-text-2))}:host([scale=s]){font-size:var(--calcite-font-size-relative-xs);block-size:var(--calcite-space-2xl);inline-size:var(--calcite-space-2xl)}:host([scale=m]){font-size:var(--calcite-font-size-relative-sm);block-size:var(--calcite-space-3xl);inline-size:var(--calcite-space-3xl)}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);block-size:var(--calcite-space-4xl);inline-size:var(--calcite-space-4xl)}.icon{display:flex}.background{display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;border-radius:var(--calcite-avatar-corner-radius, 50%)}.initials{font-weight:var(--calcite-font-weight-bold);text-transform:uppercase}.thumbnail{block-size:100%;inline-size:100%;border-radius:var(--calcite-avatar-corner-radius, 50%)}:host([hidden]){display:none}[hidden]{display:none}`,m=class extends b{constructor(){super(...arguments),this.thumbnailFailedToLoad=!1,this.scale="m"}static{this.properties={thumbnailFailedToLoad:[16,{},{state:!0}],fullName:[3,{},{reflect:!0}],label:1,scale:[3,{},{reflect:!0}],thumbnail:[3,{},{reflect:!0}],userId:[3,{},{reflect:!0}],username:[3,{},{reflect:!0}]}}static{this.styles=y}determineContent(){if(this.thumbnail&&!this.thumbnailFailedToLoad)return c`<img alt=${(this.label||"")??h} class=${o(u.thumbnail)} @error=${()=>this.thumbnailFailedToLoad=!0} src=${this.thumbnail??h}>`;let e=this.generateInitials(),t=this.generateFillColor();return c`<span .ariaLabel=${this.label||this.fullName} class=${o(u.background)} role=figure style=${v({backgroundColor:t})}>${e?c`<span aria-hidden=true class=${o(u.initials)}>${e}</span>`:c`<calcite-icon class=${o(u.icon)} icon=user .scale=${this.scale}></calcite-icon>`}</span>`}generateFillColor(){let{userId:e,username:t,fullName:a}=this,r=e&&`#${e.substr(e.length-6)}`,l=t||a||"",n=r&&d(r)?r:x(l);if(!e&&!l||!d(n))return"var(--calcite-avatar-background-color, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)))";let s=$(n);return`var(--calcite-avatar-background-color, light-dark(hsl(${s}, 60%, 90%), hsl(${s}, 60%, 20%)))`}generateInitials(){let{fullName:e,username:t}=this;return e?e.trim().split(" ").map(a=>a.substring(0,1)).join(""):t?t.substring(0,2):!1}render(){return this.determineContent()}};p("calcite-avatar",m);export{m as Avatar};
2
+ import{p as d,w as g}from"./QYVKOLJZ.js";import"./6TP6A2OR.js";import"./5K4OZJAZ.js";import{G as b,H as o,I as v,J as h,T as p,g as f,h as c}from"./G7VCDZAH.js";var u={thumbnail:"thumbnail",background:"background",initials:"initials",icon:"icon"};function x(i){i=k(i);let e=0;for(let a=0;a<i.length;a++)e=i.charCodeAt(a)+((e<<5)-e);let t="#";for(let a=0;a<3;a++){let r=e>>a*8&255;t+=("00"+r.toString(16)).substr(-2)}return t}function k(i){let e=Math.floor(i.length/2),t=i.split("").reverse().join("");return t.substring(e)+t.slice(0,e)}function z(i){let{r:e,g:t,b:a}=i;e/=255,t/=255,a/=255;let r=Math.max(e,t,a),l=Math.min(e,t,a),n=r-l;if(r===l)return 0;let s=(r+l)/2;switch(r){case e:s=(t-a)/n+(t<a?6:0);break;case t:s=(a-e)/n+2;break;case a:s=(e-t)/n+4;break}return Math.round(s*60)}function $(i){return z(g(i))}var y=f`:host{display:inline-block;flex-shrink:0;overflow:hidden;border-radius:var(--calcite-avatar-corner-radius, 50%);color:var(--calcite-avatar-color, var(--calcite-color-text-2))}:host([scale=s]){font-size:var(--calcite-font-size-relative-xs);block-size:var(--calcite-space-2xl);inline-size:var(--calcite-space-2xl)}:host([scale=m]){font-size:var(--calcite-font-size-relative-sm);block-size:var(--calcite-space-3xl);inline-size:var(--calcite-space-3xl)}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);block-size:var(--calcite-space-4xl);inline-size:var(--calcite-space-4xl)}.icon{display:flex}.background{display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;border-radius:var(--calcite-avatar-corner-radius, 50%)}.initials{font-weight:var(--calcite-font-weight-bold);text-transform:uppercase}.thumbnail{block-size:100%;inline-size:100%;border-radius:var(--calcite-avatar-corner-radius, 50%)}:host([hidden]){display:none}[hidden]{display:none}`,m=class extends b{constructor(){super(...arguments),this.thumbnailFailedToLoad=!1,this.scale="m"}static{this.properties={thumbnailFailedToLoad:[16,{},{state:!0}],fullName:[3,{},{reflect:!0}],label:1,scale:[3,{},{reflect:!0}],thumbnail:[3,{},{reflect:!0}],userId:[3,{},{reflect:!0}],username:[3,{},{reflect:!0}]}}static{this.styles=y}determineContent(){if(this.thumbnail&&!this.thumbnailFailedToLoad)return c`<img alt=${(this.label||"")??h} class=${o(u.thumbnail)} @error=${()=>this.thumbnailFailedToLoad=!0} src=${this.thumbnail??h}>`;let e=this.generateInitials(),t=this.generateFillColor();return c`<span .ariaLabel=${this.label||this.fullName} class=${o(u.background)} role=figure style=${v({backgroundColor:t})}>${e?c`<span aria-hidden=true class=${o(u.initials)}>${e}</span>`:c`<calcite-icon class=${o(u.icon)} icon=user .scale=${this.scale}></calcite-icon>`}</span>`}generateFillColor(){let{userId:e,username:t,fullName:a}=this,r=e&&`#${e.substr(e.length-6)}`,l=t||a||"",n=r&&d(r)?r:x(l);if(!e&&!l||!d(n))return"var(--calcite-avatar-background-color, var(--calcite-theme-color-surface-3, var(--calcite-color-foreground-2)))";let s=$(n);return`var(--calcite-avatar-background-color, light-dark(hsl(${s}, 60%, 90%), hsl(${s}, 60%, 20%)))`}generateInitials(){let{fullName:e,username:t}=this;return e?e.trim().split(" ").map(a=>a.substring(0,1)).join(""):t?t.substring(0,2):!1}render(){return this.determineContent()}};p("calcite-avatar",m);export{m as Avatar};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{e as g}from"./XY2NGASJ.js";import{a as S}from"./65NP4EGJ.js";import"./2IM7ZZ7U.js";import{a as f}from"./TTY44OFP.js";import"./VMHJHFFS.js";import"./CGJCCSPN.js";import"./SXHYAGRQ.js";import{A as u,E as a}from"./RRBGCYLX.js";import{E as n,F as h,G as d,H as p,T as m,g as l,h as o,p as r}from"./QAAX5OQX.js";var w={container:"container"},b=l`: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:flex}.container{display:flex;flex-wrap:wrap;gap:var(--calcite-swatch-group-space, var(--calcite-theme-space-sm, var(--calcite-spacing-sm)))}:host([scale=s]) .container{gap:var(--calcite-swatch-group-space, var(--calcite-theme-space-xs, var(--calcite-spacing-xs)))}: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}`,c=class extends d{constructor(){super(),this.items=[],this.slotRef=n(),this.focusSetter=f()(this).setFocus,this.interactiveContainer=S(this),this.disabled=!1,this.scale="m",this.selectedItems=[],this.selectionMode="none",this.calciteSwatchGroupSelect=r({cancelable:!1}),this.listen("keydown",this.keyDownHandler),this.listen("calciteSwatchSelect",this.calciteSwatchSelectListener),this.listen("calciteInternalSwatchSelect",this.calciteInternalSwatchSelectListener),this.listen("calciteInternalSyncSelectedSwatches",this.calciteInternalSyncSelectedSwatches)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=b}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){(e.has("scale")||e.has("selectionMode"))&&(this.hasUpdated||this.selectionMode!=="none")&&this.updateItems()}keyDownHandler(e){let t=e.composedPath().find(g);if(e.defaultPrevented||!t||!this.el.contains(t))return;let s=this.items.filter(i=>!i.disabled);if(s.includes(t))switch(e.key){case"ArrowRight":a(s,t,"next"),e.preventDefault();break;case"ArrowLeft":a(s,t,"previous"),e.preventDefault();break;case"Home":a(s,t,"first"),e.preventDefault();break;case"End":a(s,t,"last"),e.preventDefault();break}}calciteSwatchSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!0,e.target),e.stopPropagation()}calciteInternalSwatchSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!1,e.target),e.stopPropagation()}calciteInternalSyncSelectedSwatches(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(),this.selectionMode==="single"&&this.selectedItems.length>1&&this.setSelectedItems(!1,e.target)),e.stopPropagation()}handleSlotChange(e){this.updateItems(u(e,"calcite-swatch"))}updateItems(e=this.items){this.items=e,!(this.items.length<1)&&(this.items.forEach(t=>{t.interactive=!0,t.scale=this.scale,t.selectionMode=this.selectionMode,t.parentSwatchGroup=this.el}),this.setSelectedItems(!1))}updateSelectedItems(){this.selectedItems=this.items.filter(e=>e.selected)}setSelectedItems(e,t){t&&this.items.forEach(s=>{let i=t===s;switch(this.selectionMode){case"multiple":i&&(s.selected=!s.selected);break;case"single":s.selected=i?!s.selected:!1;break;case"single-persist":s.selected=!!i;break}}),this.updateSelectedItems(),e&&this.calciteSwatchGroupSelect.emit()}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup",{disabled:t}=this;return this.interactiveContainer({disabled:t,children:o`<div .ariaLabel=${this.label} class=${p(w.container)} .role=${e}><slot @slotchange=${this.handleSlotChange} ${h(this.slotRef)}></slot></div>`})}};m("calcite-swatch-group",c);export{c as SwatchGroup};
2
+ import{e as g}from"./XY2NGASJ.js";import{a as S}from"./BUD3X4EV.js";import"./2IM7ZZ7U.js";import{a as f}from"./FGPKBUR3.js";import"./VMHJHFFS.js";import"./AGD2EOLY.js";import"./PO6YL62I.js";import{A as u,E as a}from"./RRBGCYLX.js";import{E as n,F as h,G as d,H as p,T as m,g as l,h as o,p as r}from"./G7VCDZAH.js";var w={container:"container"},b=l`: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:flex}.container{display:flex;flex-wrap:wrap;gap:var(--calcite-swatch-group-space, var(--calcite-theme-space-sm, var(--calcite-spacing-sm)))}:host([scale=s]) .container{gap:var(--calcite-swatch-group-space, var(--calcite-theme-space-xs, var(--calcite-spacing-xs)))}: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}`,c=class extends d{constructor(){super(),this.items=[],this.slotRef=n(),this.focusSetter=f()(this).setFocus,this.interactiveContainer=S(this),this.disabled=!1,this.scale="m",this.selectedItems=[],this.selectionMode="none",this.calciteSwatchGroupSelect=r({cancelable:!1}),this.listen("keydown",this.keyDownHandler),this.listen("calciteSwatchSelect",this.calciteSwatchSelectListener),this.listen("calciteInternalSwatchSelect",this.calciteInternalSwatchSelectListener),this.listen("calciteInternalSyncSelectedSwatches",this.calciteInternalSyncSelectedSwatches)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=b}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){(e.has("scale")||e.has("selectionMode"))&&(this.hasUpdated||this.selectionMode!=="none")&&this.updateItems()}keyDownHandler(e){let t=e.composedPath().find(g);if(e.defaultPrevented||!t||!this.el.contains(t))return;let s=this.items.filter(i=>!i.disabled);if(s.includes(t))switch(e.key){case"ArrowRight":a(s,t,"next"),e.preventDefault();break;case"ArrowLeft":a(s,t,"previous"),e.preventDefault();break;case"Home":a(s,t,"first"),e.preventDefault();break;case"End":a(s,t,"last"),e.preventDefault();break}}calciteSwatchSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!0,e.target),e.stopPropagation()}calciteInternalSwatchSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!1,e.target),e.stopPropagation()}calciteInternalSyncSelectedSwatches(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(),this.selectionMode==="single"&&this.selectedItems.length>1&&this.setSelectedItems(!1,e.target)),e.stopPropagation()}handleSlotChange(e){this.updateItems(u(e,"calcite-swatch"))}updateItems(e=this.items){this.items=e,!(this.items.length<1)&&(this.items.forEach(t=>{t.interactive=!0,t.scale=this.scale,t.selectionMode=this.selectionMode,t.parentSwatchGroup=this.el}),this.setSelectedItems(!1))}updateSelectedItems(){this.selectedItems=this.items.filter(e=>e.selected)}setSelectedItems(e,t){t&&this.items.forEach(s=>{let i=t===s;switch(this.selectionMode){case"multiple":i&&(s.selected=!s.selected);break;case"single":s.selected=i?!s.selected:!1;break;case"single-persist":s.selected=!!i;break}}),this.updateSelectedItems(),e&&this.calciteSwatchGroupSelect.emit()}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup",{disabled:t}=this;return this.interactiveContainer({disabled:t,children:o`<div .ariaLabel=${this.label} class=${p(w.container)} .role=${e}><slot @slotchange=${this.handleSlotChange} ${h(this.slotRef)}></slot></div>`})}};m("calcite-swatch-group",c);export{c as SwatchGroup};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as e}from"./FR6PIDS2.js";import{a as m}from"./EDHUB66C.js";import"./6B3Z35ZN.js";import{a as s}from"./XSVS2DOW.js";import"./2IM7ZZ7U.js";import{a as u}from"./TTY44OFP.js";import"./VMHJHFFS.js";import"./CGJCCSPN.js";import"./SXHYAGRQ.js";import"./RRBGCYLX.js";import{G as p,H as a,J as n,T as f,g as h,h as i}from"./QAAX5OQX.js";var x=h`:host{display:inline-flex}:host([scale=s]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-md);--calcite-internal-navigation-logo-image-size: 1.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-1);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-lg);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-lg)}:host([scale=m]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-lg);--calcite-internal-navigation-logo-image-size: 1.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-md);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-xl);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-lg)}:host([scale=l]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-xl);--calcite-internal-navigation-logo-image-size: 2.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-relative-2xl);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-lg);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-2xl);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-2xl)}.container{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);display:flex;margin:var(--calcite-space-none);align-items:center;justify-content:center;background-color:var(--calcite-navigation-background-color, var(--calcite-internal-navigation-logo-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))));border-block-end:2px solid var(--calcite-color-transparent)}.container--link{outline-color:var(--calcite-color-transparent);cursor:pointer;text-decoration-line:none}:host(:focus) .container--link{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)))}.image{block-size:var(--calcite-internal-navigation-logo-image-size)}.image,.icon{display:flex;margin:var(--calcite-space-none);color:var(--calcite-navigation-logo-text-color, var(--calcite-icon-color, var(--calcite-internal-navigation-logo-text-color, var(--calcite-ui-icon-color, inherit))));padding-inline:var(--calcite-internal-navigation-logo-padding-inline)}.image~.icon{padding-inline-start:var(--calcite-space-none)}.image~.text-container,.icon~.text-container{padding-inline-start:var(--calcite-space-none)}:host([href]:hover),:host([href]:focus){--calcite-internal-navigation-logo-background-color: var( --calcite-theme-color-surface-3, var(--calcite-color-foreground-2) )}:host([href]:active){--calcite-internal-navigation-logo-background-color: var( --calcite-theme-color-surface-4, var(--calcite-color-foreground-3) )}:host([active]) .container{border-block-end-color:var(--calcite-navigation-accent-color, var(--calcite-color-brand))}:host([active]),:host([href]:active){--calcite-internal-navigation-logo-text-color: var(--calcite-color-brand)}.text-container{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;flex-direction:column;text-align:start;margin-block-start:var(--calcite-space-base);padding-inline:var(--calcite-internal-navigation-logo-padding-inline)}.heading{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline-start:var(--calcite-space-none);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-navigation-logo-heading-text-color, var(--calcite-color-text-1));font-size:var(--calcite-internal-navigation-logo-heading-font-size);padding-block-start:var(--calcite-space-2xs);line-height:var(--calcite-internal-navigation-logo-heading-line-height)}.standalone{font-size:var(--calcite-internal-navigation-logo-heading-standalone-font-size);padding-block-start:0}.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--calcite-navigation-logo-text-color, var(--calcite-color-text-2));font-size:var(--calcite-internal-navigation-logo-description-font-size);line-height:var(--calcite-internal-navigation-logo-description-line-height)}:host([hidden]){display:none}[hidden]{display:none}`,g=class extends p{constructor(){super(...arguments),this.focusSetter=u()(this).setFocus,this.active=!1,this.iconFlipRtl=!1,this.scale="m"}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],description:1,heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],href:[3,{},{reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],label:1,rel:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],thumbnail:1,scale:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=x}async setFocus(t){return this.focusSetter(()=>this.href?this.el:void 0,t)}renderIcon(){return i`<calcite-icon class=${a(e.icon)} .flipRtl=${this.iconFlipRtl} .icon=${this.icon} .scale=${this.scale==="s"?"m":"l"}></calcite-icon>`}renderHeaderContent(){let{heading:t,headingLevel:o,description:c}=this,l=t?s(e.heading,m({class:{[e.heading]:!0,[e.standalone]:!this.description},level:o,children:t})):null,r=c?s(e.description,i`<span class=${a(e.description)}>${c}</span>`):null;return l||r?s(e.textContainer,i`<div class=${a(e.textContainer)}>${l}${r}</div>`):null}render(){let{icon:t,href:o,label:c,rel:l,target:r,thumbnail:v}=this,d=i`${v&&i`<img alt=${(c||"")??n} class=${a(e.image)} src=${v??n}>`||""}${t&&this.renderIcon()||""}${this.renderHeaderContent()}`;return o?i`<a class=${a({[e.container]:!0,[e.containerLink]:!0})} href=${o??n} rel=${l??n} target=${r??n}>${d}</a>`:i`<div class=${a(e.container)}>${d}</div>`}};f("calcite-navigation-logo",g);export{g as NavigationLogo};
2
+ import{a as e}from"./FR6PIDS2.js";import{a as m}from"./KETKIVWP.js";import"./HEQ6QW3K.js";import{a as s}from"./54Y2XWNM.js";import"./2IM7ZZ7U.js";import{a as u}from"./FGPKBUR3.js";import"./VMHJHFFS.js";import"./AGD2EOLY.js";import"./PO6YL62I.js";import"./RRBGCYLX.js";import{G as p,H as a,J as n,T as f,g as h,h as i}from"./G7VCDZAH.js";var x=h`:host{display:inline-flex}:host([scale=s]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-md);--calcite-internal-navigation-logo-image-size: 1.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-1);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-lg);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-lg)}:host([scale=m]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-lg);--calcite-internal-navigation-logo-image-size: 1.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-md);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-xl);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-lg)}:host([scale=l]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-xl);--calcite-internal-navigation-logo-image-size: 2.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-relative-2xl);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-lg);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-2xl);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-2xl)}.container{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);display:flex;margin:var(--calcite-space-none);align-items:center;justify-content:center;background-color:var(--calcite-navigation-background-color, var(--calcite-internal-navigation-logo-background-color, var(--calcite-theme-color-surface-2, var(--calcite-color-foreground-1))));border-block-end:2px solid var(--calcite-color-transparent)}.container--link{outline-color:var(--calcite-color-transparent);cursor:pointer;text-decoration-line:none}:host(:focus) .container--link{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)))}.image{block-size:var(--calcite-internal-navigation-logo-image-size)}.image,.icon{display:flex;margin:var(--calcite-space-none);color:var(--calcite-navigation-logo-text-color, var(--calcite-icon-color, var(--calcite-internal-navigation-logo-text-color, var(--calcite-ui-icon-color, inherit))));padding-inline:var(--calcite-internal-navigation-logo-padding-inline)}.image~.icon{padding-inline-start:var(--calcite-space-none)}.image~.text-container,.icon~.text-container{padding-inline-start:var(--calcite-space-none)}:host([href]:hover),:host([href]:focus){--calcite-internal-navigation-logo-background-color: var( --calcite-theme-color-surface-3, var(--calcite-color-foreground-2) )}:host([href]:active){--calcite-internal-navigation-logo-background-color: var( --calcite-theme-color-surface-4, var(--calcite-color-foreground-3) )}:host([active]) .container{border-block-end-color:var(--calcite-navigation-accent-color, var(--calcite-color-brand))}:host([active]),:host([href]:active){--calcite-internal-navigation-logo-text-color: var(--calcite-color-brand)}.text-container{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;flex-direction:column;text-align:start;margin-block-start:var(--calcite-space-base);padding-inline:var(--calcite-internal-navigation-logo-padding-inline)}.heading{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline-start:var(--calcite-space-none);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-navigation-logo-heading-text-color, var(--calcite-color-text-1));font-size:var(--calcite-internal-navigation-logo-heading-font-size);padding-block-start:var(--calcite-space-2xs);line-height:var(--calcite-internal-navigation-logo-heading-line-height)}.standalone{font-size:var(--calcite-internal-navigation-logo-heading-standalone-font-size);padding-block-start:0}.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--calcite-navigation-logo-text-color, var(--calcite-color-text-2));font-size:var(--calcite-internal-navigation-logo-description-font-size);line-height:var(--calcite-internal-navigation-logo-description-line-height)}:host([hidden]){display:none}[hidden]{display:none}`,g=class extends p{constructor(){super(...arguments),this.focusSetter=u()(this).setFocus,this.active=!1,this.iconFlipRtl=!1,this.scale="m"}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],description:1,heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],href:[3,{},{reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],label:1,rel:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],thumbnail:1,scale:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=x}async setFocus(t){return this.focusSetter(()=>this.href?this.el:void 0,t)}renderIcon(){return i`<calcite-icon class=${a(e.icon)} .flipRtl=${this.iconFlipRtl} .icon=${this.icon} .scale=${this.scale==="s"?"m":"l"}></calcite-icon>`}renderHeaderContent(){let{heading:t,headingLevel:o,description:c}=this,l=t?s(e.heading,m({class:{[e.heading]:!0,[e.standalone]:!this.description},level:o,children:t})):null,r=c?s(e.description,i`<span class=${a(e.description)}>${c}</span>`):null;return l||r?s(e.textContainer,i`<div class=${a(e.textContainer)}>${l}${r}</div>`):null}render(){let{icon:t,href:o,label:c,rel:l,target:r,thumbnail:v}=this,d=i`${v&&i`<img alt=${(c||"")??n} class=${a(e.image)} src=${v??n}>`||""}${t&&this.renderIcon()||""}${this.renderHeaderContent()}`;return o?i`<a class=${a({[e.container]:!0,[e.containerLink]:!0})} href=${o??n} rel=${l??n} target=${r??n}>${d}</a>`:i`<div class=${a(e.container)}>${d}</div>`}};f("calcite-navigation-logo",g);export{g as NavigationLogo};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as b,b as v,j as o,m as C,n as I,q as w}from"./BJFYIDJP.js";import"./HSXLUGF4.js";import{a as F}from"./XSVS2DOW.js";import"./JN6YLTUP.js";import"./SXHYAGRQ.js";import{F as $,G as A,H as u,T as R,g as x,h as g,p as m}from"./QAAX5OQX.js";var D={calendar:"calendar",calendarContainer:"calendar-container",calendarStart:"calendar--start",currentDay:"current-day",dayContainer:"day-container",month:"month",noncurrent:"noncurrent",weekDays:"week-days",weekHeader:"week-header",weekHeaderContainer:"week-header-container"},Y=x`:host([hidden]){display:none}[hidden]{display:none}.calendar-container{display:flex;inline-size:100%}:host([range][layout=vertical]) .calendar-container{flex-direction:column}.calendar{inline-size:100%}.week-header-container{display:flex;block-size:16px;padding-inline:var(--calcite-theme-space-sm, var(--calcite-spacing-sm));padding-block:var(--calcite-theme-space-md, var(--calcite-spacing-md))}.week-header{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);text-align:center;font-weight:var(--calcite-font-weight-bold);display:flex;justify-content:center;align-items:center;inline-size:14.2857142857%;color:var(--calcite-date-picker-week-header-text-color, var(--calcite-color-text-2))}.day-container{display:flex;min-inline-size:var(--calcite-space-none);justify-content:center;inline-size:100%}.day-container calcite-date-picker-day{inline-size:100%}.week-days{display:grid;grid-template-columns:repeat(7,1fr);grid-auto-rows:1fr;padding-inline:var(--calcite-theme-space-sm, var(--calcite-spacing-sm));padding-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}.month-header{display:flex;inline-size:100%;justify-content:space-between}.month{display:flex;inline-size:100%;justify-content:space-between;flex-direction:column}.day{font-size:var(--calcite-font-size)}:host([scale=s]) .week-days{padding-inline:var(--calcite-theme-space-xs, var(--calcite-spacing-xs));padding-block-end:var(--calcite-theme-space-xs, var(--calcite-spacing-xs))}:host([scale=s]) .week-header-container{padding-inline:var(--calcite-theme-space-xs, var(--calcite-spacing-xs));padding-block:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .day{font-size:var(--calcite-font-size-sm)}:host([scale=l]) .week-header{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=l]) .week-days{padding-inline:var(--calcite-theme-space-md, var(--calcite-spacing-md));padding-block-end:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .week-header-container{padding-inline:var(--calcite-theme-space-md, var(--calcite-spacing-md));padding-block:var(--calcite-theme-space-md-plus, var(--calcite-spacing-md-plus))}:host([scale=l]) .day{font-size:var(--calcite-font-size-md)}.calendar--start{border-style:solid;border-width:var(--calcite-border-width-none);border-color:var(--calcite-date-picker-range-calendar-divider-color, var(--calcite-color-border-1))}:host([range][layout=horizontal][calendars="2"]) .calendar--start{border-inline-end-width:var(--calcite-border-width-sm)}:host([range][layout=vertical][calendars="2"]) .calendar--start{border-block-end-width:var(--calcite-border-width-sm)}.noncurrent{pointer-events:none;opacity:0}`,p=7,M=6,P=42,S=class extends A{constructor(){super(),this.activeFocus=!1,this.storeDayRef=e=>{e?.active&&this.activeFocus&&e.setFocus()},this.activeDate=new Date,this.calendars=2,this.range=!1,this.calciteInternalDatePickerDayHover=m({cancelable:!1}),this.calciteInternalDatePickerDaySelect=m({cancelable:!1}),this.calciteInternalDatePickerMonthActiveDateChange=m({cancelable:!1}),this.calciteInternalDatePickerMonthChange=m({cancelable:!1}),this.calciteInternalDatePickerMonthMouseOut=m({cancelable:!1}),this.listen("pointerout",this.pointerOutHandler),this.listen("focusout",this.disableActiveFocus)}static{this.properties={focusedDate:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],calendars:[11,{},{type:Number,reflect:!0}],dateTimeFormat:[0,{},{attribute:!1}],endDate:[0,{},{attribute:!1}],headingLevel:[11,{},{type:Number,reflect:!0}],hoverRange:[0,{},{attribute:!1}],layout:[3,{},{reflect:!0}],localeData:[0,{},{attribute:!1}],max:[0,{},{attribute:!1}],messages:[0,{},{attribute:!1}],min:[0,{},{attribute:!1}],monthStyle:1,range:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedDate:[0,{},{attribute:!1}],startDate:[0,{},{attribute:!1}]}}static{this.styles=Y}load(){this.focusedDate=this.selectedDate||this.activeDate}willUpdate(e){e.has("activeDate")&&this.updateFocusedDateWithActive(this.activeDate),e.has("selectedDate")&&(this.focusedDate=this.selectedDate)}updateFocusedDateWithActive(e){this.selectedDate||(this.focusedDate=b(e,this.min,this.max)?e:v(e,this.min,this.max))}keyDownHandler(e){if(e.defaultPrevented)return;let a=this.el.dir==="rtl",t=e.target.value;switch(e.key){case"ArrowUp":e.preventDefault(),this.addDays(-7,t);break;case"ArrowRight":e.preventDefault(),this.addDays(a?-1:1,t);break;case"ArrowDown":e.preventDefault(),this.addDays(7,t);break;case"ArrowLeft":e.preventDefault(),this.addDays(a?1:-1,t);break;case"PageUp":e.preventDefault(),this.addMonths(-1,t);break;case"PageDown":e.preventDefault(),this.addMonths(1,t);break;case"Home":e.preventDefault(),this.activeDate.setDate(1),this.addDays(0,t);break;case"End":e.preventDefault(),this.activeDate.setDate(new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+1,0).getDate()),this.addDays(0,t);break;case"Enter":case" ":e.preventDefault();break;case"Tab":this.activeFocus=!1}}disableActiveFocus(){this.activeFocus=!1}pointerOutHandler(){this.calciteInternalDatePickerMonthMouseOut.emit()}addMonths(e,a){let t=new Date(a);t.setMonth(a.getMonth()+e),this.calciteInternalDatePickerMonthActiveDateChange.emit(v(t,this.min,this.max)),this.focusedDate=v(t,this.min,this.max),this.activeFocus=!0,this.calciteInternalDatePickerDayHover.emit(t)}addDays(e=0,a){let t=new Date(a);t.setDate(a.getDate()+e),this.calciteInternalDatePickerMonthActiveDateChange.emit(v(t,this.min,this.max)),this.focusedDate=v(t,this.min,this.max),this.activeFocus=!0,this.calciteInternalDatePickerDayHover.emit(t)}getPreviousMonthDays(e,a,t){let s=new Date(a,e,0),i=s.getDate(),n=s.getDay(),r=[];if(n===(t+M)%p)return r;if(n===t)return[i];for(let l=(p+n-t)%p;l>=0;l--)r.push(i-l);return r}getCurrentMonthDays(e,a){let t=new Date(a,e+1,0).getDate(),s=[];for(let i=0;i<t;i++)s.push(i+1);return s}getNextMonthDays(e,a,t){let s=new Date(a,e+1,0).getDay(),i=[];if(s===(t+M)%p)return i;for(let n=0;n<(M-(s-t))%p;n++)i.push(n+1);return i}betweenSelectedRange(e){return!!(this.startDate&&this.endDate&&e>this.startDate&&e<this.endDate&&!this.isRangeHover(e))}isSelected(e){return!!(o(e,this.selectedDate)||this.startDate&&o(e,this.startDate)||this.endDate&&o(e,this.endDate))}isStartOfRange(e){return!!(this.startDate&&!o(this.startDate,this.endDate)&&o(this.startDate,e)&&!this.isEndOfRange(e))}isEndOfRange(e){return!!(this.endDate&&!o(this.startDate,this.endDate)&&o(this.endDate,e)||!this.endDate&&this.hoverRange&&o(this.startDate,this.hoverRange.end)&&o(e,this.hoverRange.end))}dayHover(e){let a=e.target;a.disabled?this.calciteInternalDatePickerMonthMouseOut.emit():this.calciteInternalDatePickerDayHover.emit(a.value),e.stopPropagation()}daySelect(e){let a=e.target;this.activeFocus=!1,this.calciteInternalDatePickerDaySelect.emit(a.value),e.stopPropagation()}isFocusedOnStart(){return this.hoverRange?.focused==="start"}isHoverInRange(){if(!this.hoverRange||!this.startDate)return!1;let{start:e,end:a}=this.hoverRange,t=this.isFocusedOnStart(),s=this.startDate&&a&&a>this.startDate,i=this.endDate&&a&&a<this.endDate,n=this.startDate&&e&&e>this.startDate,r=this.endDate&&e&&e<this.endDate,l=!t&&this.startDate&&s&&(!this.endDate||i),c=t&&this.startDate&&n&&r;return!!(l||c)}isRangeHover(e){if(!this.hoverRange)return!1;let{start:a,end:t}=this.hoverRange,s=this.isFocusedOnStart(),i=this.isHoverInRange(),n=!!(a&&e>a&&this.startDate&&e<this.startDate),r=!!(t&&e<t&&this.endDate&&e>this.endDate),l=!!(t&&e>t&&this.endDate&&e<this.endDate),c=!!(a&&e<a&&this.startDate&&e>this.startDate),h=!!(t&&e<t&&this.startDate&&e>this.startDate),d=!!(a&&e>a&&this.endDate&&e<this.endDate),f=this.startDate&&this.endDate;if(i){if(f)return s?!!(this.endDate&&e<this.endDate)&&(c||n):l||r;if(this.startDate&&!this.endDate)return s?n:h;if(!this.startDate&&this.endDate)return s?d:r}else if(f)return s?n:r;return!1}getDays(e,a,t,s="start"){let i=this.activeDate.getMonth(),n=i+1;i=s==="end"?n:i;let r=this.activeDate.getFullYear();return[...e.map(c=>({active:!1,day:c,date:new Date(r,i-1,c)})),...a.map(c=>{let h=new Date(r,i,c),d=o(h,new Date);return{active:this.focusedDate&&this.focusedDate!==this.startDate&&this.focusedDate!==this.endDate?o(h,this.focusedDate):o(h,this.startDate)||o(h,this.endDate),currentMonth:!0,currentDay:d,day:c,date:h}}),...t.map(c=>({active:!1,day:c,date:new Date(r,n,c)}))]}monthHeaderSelectChange(e){let a=new Date(e.detail),t=e.target;this.updateFocusableDate(a),e.stopPropagation(),this.calciteInternalDatePickerMonthChange.emit({date:a,position:t.position})}updateFocusableDate(e){!this.selectedDate||!this.range?this.focusedDate=this.getFirstValidDateOfMonth(e):this.selectedDate&&this.range&&(!w(this.startDate,e)||!w(this.endDate,e))&&(this.focusedDate=this.getFirstValidDateOfMonth(e))}getFirstValidDateOfMonth(e){return e.getDate()===1?e:C(e,this.min,this.max)}render(){let e=this.activeDate.getMonth(),a=this.activeDate.getFullYear(),t=this.localeData.weekStart%7,{abbreviated:s,short:i,narrow:n}=this.localeData.days,r=this.scale==="s"?n||i||s:i||s||n,l=[...r.slice(t,7),...r.slice(0,t)],c=this.getCurrentMonthDays(e,a),h=this.getPreviousMonthDays(e,a,t),d=this.getNextMonthDays(e,a,t),f=c.length+h.length+d.length;if(f<P){let N=d.length?d[d.length-1]:0;for(let k=1;k<=P-f;k++)d.push(N+k)}let y=e+1,H=this.getPreviousMonthDays(y,a,t),E=this.getCurrentMonthDays(y,a),z=this.getNextMonthDays(y,a,t),O=this.getDays(h,c,d),B=this.getDays(H,E,z,"end");return g`<div class=${u({[D.calendarContainer]:!0})}>${this.renderCalendar(l,O)}${this.range&&this.calendars===2&&this.renderCalendar(l,B,!0)||""}</div>`}renderDateDay({active:e,currentMonth:a,currentDay:t,date:s,day:i},n){let r=b(s,this.min,this.max);return F(n,g`<div class=${u({[D.dayContainer]:!0})}><calcite-date-picker-day .active=${e} class=${u({[D.currentDay]:t,[D.noncurrent]:this.range&&this.calendars===2&&!a})} .currentMonth=${a} .dateTimeFormat=${this.dateTimeFormat} .day=${i} .disabled=${!r} .endOfRange=${this.isEndOfRange(s)} .highlighted=${this.betweenSelectedRange(s)} @calciteInternalDayHover=${this.dayHover} @calciteInternalDaySelect=${this.daySelect} .range=${!!this.startDate&&!!this.endDate&&!o(this.startDate,this.endDate)} .rangeHover=${r&&this.isRangeHover(s)} .scale=${this.scale} .selected=${this.isSelected(s)} .startOfRange=${this.isStartOfRange(s)} .value=${s} ${$(this.storeDayRef)}></calcite-date-picker-day></div>`)}renderCalendar(e,a,t=!1){return g`<div class=${u({[D.calendar]:!0,[D.calendarStart]:!t})}><calcite-date-picker-month-header .activeDate=${t?I(this.activeDate):this.activeDate} .headingLevel=${this.headingLevel} .localeData=${this.localeData} .max=${this.max} .messages=${this.messages} .min=${this.min} .monthStyle=${this.monthStyle} @calciteInternalDatePickerMonthHeaderSelectChange=${this.monthHeaderSelectChange} .position=${t?"end":this.range&&this.calendars===2?"start":void 0} .scale=${this.scale} .selectedDate=${this.selectedDate}></calcite-date-picker-month-header>${this.renderMonthCalendar(e,a,t)}</div>`}renderMonthCalendar(e,a,t=!1){return g`<div class=${u({[D.month]:!0})} @keydown=${this.keyDownHandler} role=grid><div class=${u({[D.weekHeaderContainer]:!0})} role=row>${e.map(i=>g`<span class=${u({[D.weekHeader]:!0})} role=columnheader>${i}</span>`)}</div><div class=${u({[D.weekDays]:!0})} role=row>${a.map((i,n)=>this.renderDateDay(i,t?50+n:n))}</div></div>`}};R("calcite-date-picker-month",S);export{S as DatePickerMonth};
2
+ import{a as b,b as v,j as o,m as C,n as I,q as w}from"./32L6XZV2.js";import"./V2AKOENX.js";import{a as F}from"./54Y2XWNM.js";import"./JN6YLTUP.js";import"./PO6YL62I.js";import{F as $,G as A,H as u,T as R,g as x,h as g,p as m}from"./G7VCDZAH.js";var D={calendar:"calendar",calendarContainer:"calendar-container",calendarStart:"calendar--start",currentDay:"current-day",dayContainer:"day-container",month:"month",noncurrent:"noncurrent",weekDays:"week-days",weekHeader:"week-header",weekHeaderContainer:"week-header-container"},Y=x`:host([hidden]){display:none}[hidden]{display:none}.calendar-container{display:flex;inline-size:100%}:host([range][layout=vertical]) .calendar-container{flex-direction:column}.calendar{inline-size:100%}.week-header-container{display:flex;block-size:16px;padding-inline:var(--calcite-theme-space-sm, var(--calcite-spacing-sm));padding-block:var(--calcite-theme-space-md, var(--calcite-spacing-md))}.week-header{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);text-align:center;font-weight:var(--calcite-font-weight-bold);display:flex;justify-content:center;align-items:center;inline-size:14.2857142857%;color:var(--calcite-date-picker-week-header-text-color, var(--calcite-color-text-2))}.day-container{display:flex;min-inline-size:var(--calcite-space-none);justify-content:center;inline-size:100%}.day-container calcite-date-picker-day{inline-size:100%}.week-days{display:grid;grid-template-columns:repeat(7,1fr);grid-auto-rows:1fr;padding-inline:var(--calcite-theme-space-sm, var(--calcite-spacing-sm));padding-block-end:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}.month-header{display:flex;inline-size:100%;justify-content:space-between}.month{display:flex;inline-size:100%;justify-content:space-between;flex-direction:column}.day{font-size:var(--calcite-font-size)}:host([scale=s]) .week-days{padding-inline:var(--calcite-theme-space-xs, var(--calcite-spacing-xs));padding-block-end:var(--calcite-theme-space-xs, var(--calcite-spacing-xs))}:host([scale=s]) .week-header-container{padding-inline:var(--calcite-theme-space-xs, var(--calcite-spacing-xs));padding-block:var(--calcite-theme-space-sm, var(--calcite-spacing-sm))}:host([scale=s]) .day{font-size:var(--calcite-font-size-sm)}:host([scale=l]) .week-header{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=l]) .week-days{padding-inline:var(--calcite-theme-space-md, var(--calcite-spacing-md));padding-block-end:var(--calcite-theme-space-md, var(--calcite-spacing-md))}:host([scale=l]) .week-header-container{padding-inline:var(--calcite-theme-space-md, var(--calcite-spacing-md));padding-block:var(--calcite-theme-space-md-plus, var(--calcite-spacing-md-plus))}:host([scale=l]) .day{font-size:var(--calcite-font-size-md)}.calendar--start{border-style:solid;border-width:var(--calcite-border-width-none);border-color:var(--calcite-date-picker-range-calendar-divider-color, var(--calcite-color-border-1))}:host([range][layout=horizontal][calendars="2"]) .calendar--start{border-inline-end-width:var(--calcite-border-width-sm)}:host([range][layout=vertical][calendars="2"]) .calendar--start{border-block-end-width:var(--calcite-border-width-sm)}.noncurrent{pointer-events:none;opacity:0}`,p=7,M=6,P=42,S=class extends A{constructor(){super(),this.activeFocus=!1,this.storeDayRef=e=>{e?.active&&this.activeFocus&&e.setFocus()},this.activeDate=new Date,this.calendars=2,this.range=!1,this.calciteInternalDatePickerDayHover=m({cancelable:!1}),this.calciteInternalDatePickerDaySelect=m({cancelable:!1}),this.calciteInternalDatePickerMonthActiveDateChange=m({cancelable:!1}),this.calciteInternalDatePickerMonthChange=m({cancelable:!1}),this.calciteInternalDatePickerMonthMouseOut=m({cancelable:!1}),this.listen("pointerout",this.pointerOutHandler),this.listen("focusout",this.disableActiveFocus)}static{this.properties={focusedDate:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],calendars:[11,{},{type:Number,reflect:!0}],dateTimeFormat:[0,{},{attribute:!1}],endDate:[0,{},{attribute:!1}],headingLevel:[11,{},{type:Number,reflect:!0}],hoverRange:[0,{},{attribute:!1}],layout:[3,{},{reflect:!0}],localeData:[0,{},{attribute:!1}],max:[0,{},{attribute:!1}],messages:[0,{},{attribute:!1}],min:[0,{},{attribute:!1}],monthStyle:1,range:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedDate:[0,{},{attribute:!1}],startDate:[0,{},{attribute:!1}]}}static{this.styles=Y}load(){this.focusedDate=this.selectedDate||this.activeDate}willUpdate(e){e.has("activeDate")&&this.updateFocusedDateWithActive(this.activeDate),e.has("selectedDate")&&(this.focusedDate=this.selectedDate)}updateFocusedDateWithActive(e){this.selectedDate||(this.focusedDate=b(e,this.min,this.max)?e:v(e,this.min,this.max))}keyDownHandler(e){if(e.defaultPrevented)return;let a=this.el.dir==="rtl",t=e.target.value;switch(e.key){case"ArrowUp":e.preventDefault(),this.addDays(-7,t);break;case"ArrowRight":e.preventDefault(),this.addDays(a?-1:1,t);break;case"ArrowDown":e.preventDefault(),this.addDays(7,t);break;case"ArrowLeft":e.preventDefault(),this.addDays(a?1:-1,t);break;case"PageUp":e.preventDefault(),this.addMonths(-1,t);break;case"PageDown":e.preventDefault(),this.addMonths(1,t);break;case"Home":e.preventDefault(),this.activeDate.setDate(1),this.addDays(0,t);break;case"End":e.preventDefault(),this.activeDate.setDate(new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+1,0).getDate()),this.addDays(0,t);break;case"Enter":case" ":e.preventDefault();break;case"Tab":this.activeFocus=!1}}disableActiveFocus(){this.activeFocus=!1}pointerOutHandler(){this.calciteInternalDatePickerMonthMouseOut.emit()}addMonths(e,a){let t=new Date(a);t.setMonth(a.getMonth()+e),this.calciteInternalDatePickerMonthActiveDateChange.emit(v(t,this.min,this.max)),this.focusedDate=v(t,this.min,this.max),this.activeFocus=!0,this.calciteInternalDatePickerDayHover.emit(t)}addDays(e=0,a){let t=new Date(a);t.setDate(a.getDate()+e),this.calciteInternalDatePickerMonthActiveDateChange.emit(v(t,this.min,this.max)),this.focusedDate=v(t,this.min,this.max),this.activeFocus=!0,this.calciteInternalDatePickerDayHover.emit(t)}getPreviousMonthDays(e,a,t){let s=new Date(a,e,0),i=s.getDate(),n=s.getDay(),r=[];if(n===(t+M)%p)return r;if(n===t)return[i];for(let l=(p+n-t)%p;l>=0;l--)r.push(i-l);return r}getCurrentMonthDays(e,a){let t=new Date(a,e+1,0).getDate(),s=[];for(let i=0;i<t;i++)s.push(i+1);return s}getNextMonthDays(e,a,t){let s=new Date(a,e+1,0).getDay(),i=[];if(s===(t+M)%p)return i;for(let n=0;n<(M-(s-t))%p;n++)i.push(n+1);return i}betweenSelectedRange(e){return!!(this.startDate&&this.endDate&&e>this.startDate&&e<this.endDate&&!this.isRangeHover(e))}isSelected(e){return!!(o(e,this.selectedDate)||this.startDate&&o(e,this.startDate)||this.endDate&&o(e,this.endDate))}isStartOfRange(e){return!!(this.startDate&&!o(this.startDate,this.endDate)&&o(this.startDate,e)&&!this.isEndOfRange(e))}isEndOfRange(e){return!!(this.endDate&&!o(this.startDate,this.endDate)&&o(this.endDate,e)||!this.endDate&&this.hoverRange&&o(this.startDate,this.hoverRange.end)&&o(e,this.hoverRange.end))}dayHover(e){let a=e.target;a.disabled?this.calciteInternalDatePickerMonthMouseOut.emit():this.calciteInternalDatePickerDayHover.emit(a.value),e.stopPropagation()}daySelect(e){let a=e.target;this.activeFocus=!1,this.calciteInternalDatePickerDaySelect.emit(a.value),e.stopPropagation()}isFocusedOnStart(){return this.hoverRange?.focused==="start"}isHoverInRange(){if(!this.hoverRange||!this.startDate)return!1;let{start:e,end:a}=this.hoverRange,t=this.isFocusedOnStart(),s=this.startDate&&a&&a>this.startDate,i=this.endDate&&a&&a<this.endDate,n=this.startDate&&e&&e>this.startDate,r=this.endDate&&e&&e<this.endDate,l=!t&&this.startDate&&s&&(!this.endDate||i),c=t&&this.startDate&&n&&r;return!!(l||c)}isRangeHover(e){if(!this.hoverRange)return!1;let{start:a,end:t}=this.hoverRange,s=this.isFocusedOnStart(),i=this.isHoverInRange(),n=!!(a&&e>a&&this.startDate&&e<this.startDate),r=!!(t&&e<t&&this.endDate&&e>this.endDate),l=!!(t&&e>t&&this.endDate&&e<this.endDate),c=!!(a&&e<a&&this.startDate&&e>this.startDate),h=!!(t&&e<t&&this.startDate&&e>this.startDate),d=!!(a&&e>a&&this.endDate&&e<this.endDate),f=this.startDate&&this.endDate;if(i){if(f)return s?!!(this.endDate&&e<this.endDate)&&(c||n):l||r;if(this.startDate&&!this.endDate)return s?n:h;if(!this.startDate&&this.endDate)return s?d:r}else if(f)return s?n:r;return!1}getDays(e,a,t,s="start"){let i=this.activeDate.getMonth(),n=i+1;i=s==="end"?n:i;let r=this.activeDate.getFullYear();return[...e.map(c=>({active:!1,day:c,date:new Date(r,i-1,c)})),...a.map(c=>{let h=new Date(r,i,c),d=o(h,new Date);return{active:this.focusedDate&&this.focusedDate!==this.startDate&&this.focusedDate!==this.endDate?o(h,this.focusedDate):o(h,this.startDate)||o(h,this.endDate),currentMonth:!0,currentDay:d,day:c,date:h}}),...t.map(c=>({active:!1,day:c,date:new Date(r,n,c)}))]}monthHeaderSelectChange(e){let a=new Date(e.detail),t=e.target;this.updateFocusableDate(a),e.stopPropagation(),this.calciteInternalDatePickerMonthChange.emit({date:a,position:t.position})}updateFocusableDate(e){!this.selectedDate||!this.range?this.focusedDate=this.getFirstValidDateOfMonth(e):this.selectedDate&&this.range&&(!w(this.startDate,e)||!w(this.endDate,e))&&(this.focusedDate=this.getFirstValidDateOfMonth(e))}getFirstValidDateOfMonth(e){return e.getDate()===1?e:C(e,this.min,this.max)}render(){let e=this.activeDate.getMonth(),a=this.activeDate.getFullYear(),t=this.localeData.weekStart%7,{abbreviated:s,short:i,narrow:n}=this.localeData.days,r=this.scale==="s"?n||i||s:i||s||n,l=[...r.slice(t,7),...r.slice(0,t)],c=this.getCurrentMonthDays(e,a),h=this.getPreviousMonthDays(e,a,t),d=this.getNextMonthDays(e,a,t),f=c.length+h.length+d.length;if(f<P){let N=d.length?d[d.length-1]:0;for(let k=1;k<=P-f;k++)d.push(N+k)}let y=e+1,H=this.getPreviousMonthDays(y,a,t),E=this.getCurrentMonthDays(y,a),z=this.getNextMonthDays(y,a,t),O=this.getDays(h,c,d),B=this.getDays(H,E,z,"end");return g`<div class=${u({[D.calendarContainer]:!0})}>${this.renderCalendar(l,O)}${this.range&&this.calendars===2&&this.renderCalendar(l,B,!0)||""}</div>`}renderDateDay({active:e,currentMonth:a,currentDay:t,date:s,day:i},n){let r=b(s,this.min,this.max);return F(n,g`<div class=${u({[D.dayContainer]:!0})}><calcite-date-picker-day .active=${e} class=${u({[D.currentDay]:t,[D.noncurrent]:this.range&&this.calendars===2&&!a})} .currentMonth=${a} .dateTimeFormat=${this.dateTimeFormat} .day=${i} .disabled=${!r} .endOfRange=${this.isEndOfRange(s)} .highlighted=${this.betweenSelectedRange(s)} @calciteInternalDayHover=${this.dayHover} @calciteInternalDaySelect=${this.daySelect} .range=${!!this.startDate&&!!this.endDate&&!o(this.startDate,this.endDate)} .rangeHover=${r&&this.isRangeHover(s)} .scale=${this.scale} .selected=${this.isSelected(s)} .startOfRange=${this.isStartOfRange(s)} .value=${s} ${$(this.storeDayRef)}></calcite-date-picker-day></div>`)}renderCalendar(e,a,t=!1){return g`<div class=${u({[D.calendar]:!0,[D.calendarStart]:!t})}><calcite-date-picker-month-header .activeDate=${t?I(this.activeDate):this.activeDate} .headingLevel=${this.headingLevel} .localeData=${this.localeData} .max=${this.max} .messages=${this.messages} .min=${this.min} .monthStyle=${this.monthStyle} @calciteInternalDatePickerMonthHeaderSelectChange=${this.monthHeaderSelectChange} .position=${t?"end":this.range&&this.calendars===2?"start":void 0} .scale=${this.scale} .selectedDate=${this.selectedDate}></calcite-date-picker-month-header>${this.renderMonthCalendar(e,a,t)}</div>`}renderMonthCalendar(e,a,t=!1){return g`<div class=${u({[D.month]:!0})} @keydown=${this.keyDownHandler} role=grid><div class=${u({[D.weekHeaderContainer]:!0})} role=row>${e.map(i=>g`<span class=${u({[D.weekHeader]:!0})} role=columnheader>${i}</span>`)}</div><div class=${u({[D.weekDays]:!0})} role=row>${a.map((i,n)=>this.renderDateDay(i,t?50+n:n))}</div></div>`}};R("calcite-date-picker-month",S);export{S as DatePickerMonth};