@esri/calcite-components 5.1.0-next.49 → 5.1.0-next.50

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 (155) hide show
  1. package/dist/cdn/{ZON3SXPK.js → 2BQNKQRI.js} +1 -1
  2. package/dist/cdn/{FTVWNINN.js → 2DYDJPQW.js} +1 -1
  3. package/dist/cdn/{VY7IDSQN.js → 2IX7I5VV.js} +1 -1
  4. package/dist/cdn/{LYE3YD62.js → 2MRHM2BO.js} +1 -1
  5. package/dist/cdn/{GQFV4HZP.js → 2YDPGI4H.js} +1 -1
  6. package/dist/cdn/{ZOAYKUJF.js → 3OJIBSJJ.js} +1 -1
  7. package/dist/cdn/{T7ONSGXM.js → 454O35TR.js} +1 -1
  8. package/dist/cdn/{34I3N2XG.js → 4DFUGGYA.js} +1 -1
  9. package/dist/cdn/{KU6H6IML.js → 4RG7C5Q7.js} +1 -1
  10. package/dist/cdn/{IEQN4QLJ.js → 5CDQW3XO.js} +1 -1
  11. package/dist/cdn/{GAE3QPJI.js → 5CXXZEDF.js} +1 -1
  12. package/dist/cdn/{JXJOABPD.js → 5G7AIDBP.js} +1 -1
  13. package/dist/cdn/{WOMKZ253.js → 5YECELO5.js} +1 -1
  14. package/dist/cdn/{H7VHHLD4.js → 5YJJRPPC.js} +1 -1
  15. package/dist/cdn/{KGVKB5H5.js → 6553ZRIF.js} +1 -1
  16. package/dist/cdn/{5OM4MGAH.js → 65UCZN4U.js} +1 -1
  17. package/dist/cdn/{74VHEPX3.js → 65ZXNKAP.js} +1 -1
  18. package/dist/cdn/{JDWCEPI5.js → 6BFAW3N5.js} +1 -1
  19. package/dist/cdn/{HT2ZXCE7.js → 6EO6DYWC.js} +1 -1
  20. package/dist/cdn/{WK2U5XLD.js → 6TIKVRXP.js} +1 -1
  21. package/dist/cdn/{PWGZIYHG.js → 7DLX3CKP.js} +1 -1
  22. package/dist/cdn/{L4WAZTMY.js → 7FSTHS3X.js} +1 -1
  23. package/dist/cdn/{ZHH7WC5F.js → 7L5FWUMX.js} +1 -1
  24. package/dist/cdn/{CNJHG5PP.js → 7V26OEC7.js} +1 -1
  25. package/dist/cdn/{VEQQ2LIL.js → AEVSXNU2.js} +1 -1
  26. package/dist/cdn/{F45U3ZUC.js → B44D3FDA.js} +1 -1
  27. package/dist/cdn/{XBN3B526.js → B6HC5XUY.js} +1 -1
  28. package/dist/cdn/{D3VIFMI6.js → BHD66HV4.js} +1 -1
  29. package/dist/cdn/{4JQ4OITV.js → BIILZIGG.js} +1 -1
  30. package/dist/cdn/{DQG7FOMS.js → BVKQYKOO.js} +1 -1
  31. package/dist/cdn/{6H2LBE46.js → CUG5IRRL.js} +1 -1
  32. package/dist/cdn/{XFK4MT53.js → CZFHMF2K.js} +1 -1
  33. package/dist/cdn/{DJUIFQRA.js → CZOONFMH.js} +1 -1
  34. package/dist/cdn/{Q66W52U2.js → D4A7Q4YZ.js} +1 -1
  35. package/dist/cdn/{GFU4OZGZ.js → DP6TNJTM.js} +1 -1
  36. package/dist/cdn/{42G5OIFP.js → DPTRTPLD.js} +1 -1
  37. package/dist/cdn/{EBYZGRIQ.js → DVC6MD2D.js} +1 -1
  38. package/dist/cdn/{QMAI4T7F.js → E24GSGDD.js} +1 -1
  39. package/dist/cdn/{P3SYSP2O.js → E4SS3COX.js} +1 -1
  40. package/dist/cdn/{CYLEETR4.js → E6J6DZZY.js} +1 -1
  41. package/dist/cdn/{Z3GNIVH4.js → EGBQZVDX.js} +1 -1
  42. package/dist/cdn/{562472MQ.js → EI4MHNNW.js} +1 -1
  43. package/dist/cdn/{A6BYFUAB.js → F4BSA6GV.js} +1 -1
  44. package/dist/cdn/{2BFU4RHK.js → F6B6A3DE.js} +1 -1
  45. package/dist/cdn/{IQA6BSEZ.js → FDEO2JWC.js} +1 -1
  46. package/dist/cdn/{Q6PWU5L3.js → FN4TGSRQ.js} +1 -1
  47. package/dist/cdn/{7VOJMNEL.js → FOQFSSLB.js} +1 -1
  48. package/dist/cdn/{PEPMEBOM.js → FOZK3QI2.js} +1 -1
  49. package/dist/cdn/{KRQX2WMK.js → FZG3OQC4.js} +1 -1
  50. package/dist/cdn/{VQ4PWNK5.js → G66UIFSH.js} +1 -1
  51. package/dist/cdn/{XVCAQP7J.js → GETFOPRM.js} +1 -1
  52. package/dist/cdn/{44THB6PN.js → GGEKSHUC.js} +1 -1
  53. package/dist/cdn/{HQGBDYIL.js → GKYLNL37.js} +1 -1
  54. package/dist/cdn/{BVZOM3TM.js → GOK6UUVH.js} +1 -1
  55. package/dist/cdn/{E7DR5ETF.js → GX4FOIRJ.js} +1 -1
  56. package/dist/cdn/{QVECF5A7.js → H2IZGMRU.js} +1 -1
  57. package/dist/cdn/{WXIGS77Y.js → H4LW5M3U.js} +1 -1
  58. package/dist/cdn/{V2OHVQOE.js → H5V4CXEU.js} +1 -1
  59. package/dist/cdn/{ODRBTFGL.js → HANIE3A7.js} +1 -1
  60. package/dist/cdn/{ZDQXRV6B.js → HM2N2CCW.js} +1 -1
  61. package/dist/cdn/{OZIFXBV3.js → HTCOSUPK.js} +1 -1
  62. package/dist/cdn/{FCJRCO2P.js → IDO7UXCH.js} +1 -1
  63. package/dist/cdn/{BATAW5TQ.js → ISHR72IK.js} +1 -1
  64. package/dist/cdn/{BF3CNTQ7.js → ITEJJJZW.js} +1 -1
  65. package/dist/cdn/{X3B5XHV4.js → J35A7ZYK.js} +1 -1
  66. package/dist/cdn/{62DDKSJD.js → JB775TAO.js} +1 -1
  67. package/dist/cdn/{MG6WUGLY.js → JDSHUV34.js} +1 -1
  68. package/dist/cdn/{2T4KUJOM.js → JRU4MCKT.js} +1 -1
  69. package/dist/cdn/JTQY42ZT.js +2 -0
  70. package/dist/cdn/{R4NDJXR3.js → KJMOIYCM.js} +1 -1
  71. package/dist/cdn/{WFR63VAB.js → KPR2DKVI.js} +1 -1
  72. package/dist/cdn/{5GQC2FEW.js → KRIRNHSC.js} +1 -1
  73. package/dist/cdn/{J6YYC36M.js → L5OBVKJN.js} +1 -1
  74. package/dist/cdn/{7BYIHMS3.js → LFYW7HOL.js} +1 -1
  75. package/dist/cdn/{CEYBZFIQ.js → LOGLKFMU.js} +1 -1
  76. package/dist/cdn/{MIX6BNWN.js → LWAXAU2P.js} +1 -1
  77. package/dist/cdn/{GT24NW3V.js → M5WSXZ4R.js} +1 -1
  78. package/dist/cdn/{QU5FK5F6.js → MKRCEA57.js} +1 -1
  79. package/dist/cdn/{EXFYSF5F.js → MVW4F7DQ.js} +1 -1
  80. package/dist/cdn/{T7PQGK5J.js → MXB4VAMW.js} +1 -1
  81. package/dist/cdn/N4QQO5F7.js +2 -0
  82. package/dist/cdn/{27KX4B5G.js → NGIVBXHW.js} +1 -1
  83. package/dist/cdn/{WYLLFKLX.js → NNXI6WVD.js} +1 -1
  84. package/dist/cdn/{WU5CTNTH.js → O55WIRUD.js} +1 -1
  85. package/dist/cdn/{XI3ASUE6.js → O6M5DBBM.js} +1 -1
  86. package/dist/cdn/{22SX432M.js → ODBJ5WTT.js} +1 -1
  87. package/dist/cdn/{L2X2FRRW.js → ODDLX4A2.js} +1 -1
  88. package/dist/cdn/{DI6LEX3E.js → ONOJ67SI.js} +1 -1
  89. package/dist/cdn/{7UIWSJ36.js → OYIADDSA.js} +1 -1
  90. package/dist/cdn/{HQOT43VS.js → OYL2S57T.js} +1 -1
  91. package/dist/cdn/{MKKHTLCC.js → P3DUED3C.js} +1 -1
  92. package/dist/cdn/{3CXAJ3GM.js → PGYGTX6H.js} +1 -1
  93. package/dist/cdn/{VXCJYD4P.js → PKL245LP.js} +1 -1
  94. package/dist/cdn/{7EGIAGGO.js → PT6XDY4O.js} +1 -1
  95. package/dist/cdn/{FYR5TQKZ.js → PXGUVRKO.js} +1 -1
  96. package/dist/cdn/{4SQDDLZG.js → Q2QMINL7.js} +1 -1
  97. package/dist/cdn/{V7M5VYRR.js → Q572T7QY.js} +1 -1
  98. package/dist/cdn/{XLVDGPXT.js → QE5Z7QLF.js} +1 -1
  99. package/dist/cdn/{P4KKQUII.js → QP6TVAJM.js} +1 -1
  100. package/dist/cdn/{C6TLFPKH.js → R25OYM2I.js} +1 -1
  101. package/dist/cdn/{MOW3FKBV.js → R2VFBL44.js} +1 -1
  102. package/dist/cdn/{VMH6WPL2.js → RI3BPIUH.js} +1 -1
  103. package/dist/cdn/{KS7HVFFO.js → RNRXZGW3.js} +1 -1
  104. package/dist/cdn/{26EJRTEG.js → RXLGGOGW.js} +1 -1
  105. package/dist/cdn/{JIC5EZNV.js → SC27WKHW.js} +1 -1
  106. package/dist/cdn/{BTPPINNG.js → SFQJT6YW.js} +1 -1
  107. package/dist/cdn/{7T3LFQX5.js → SOOH6THK.js} +1 -1
  108. package/dist/cdn/{33HE675N.js → SRA4ON3Z.js} +1 -1
  109. package/dist/cdn/{BFMU6BTZ.js → SRZOMG32.js} +1 -1
  110. package/dist/cdn/{HFY4YEHE.js → SWQWT6UY.js} +1 -1
  111. package/dist/cdn/{GL6MBV5C.js → T2BIGOOU.js} +1 -1
  112. package/dist/cdn/{EPLVZJTN.js → T5IAEO6K.js} +1 -1
  113. package/dist/cdn/{5Q4TZKGL.js → TGXINM27.js} +1 -1
  114. package/dist/cdn/{HVJ7ZYUC.js → THCVDEDQ.js} +1 -1
  115. package/dist/cdn/{6EIXBRWQ.js → TSUGHZGP.js} +1 -1
  116. package/dist/cdn/{RRPAVMQZ.js → U2S2OJXD.js} +1 -1
  117. package/dist/cdn/{5GBLT7PJ.js → U4BLA4YQ.js} +1 -1
  118. package/dist/cdn/{7KVXROJ4.js → UETXOCGM.js} +1 -1
  119. package/dist/cdn/{6GMP7CEX.js → UISO27PN.js} +1 -1
  120. package/dist/cdn/{CRWD7XBU.js → V3OD3OAU.js} +1 -1
  121. package/dist/cdn/{IPDRUE2N.js → VJ7EX6PH.js} +1 -1
  122. package/dist/cdn/{TNFBRRJO.js → VO3JGHAF.js} +1 -1
  123. package/dist/cdn/{5PO4GTCL.js → VQKHXIXM.js} +1 -1
  124. package/dist/cdn/{5UL5W56B.js → VY5SOQAQ.js} +1 -1
  125. package/dist/cdn/{D2IR7MXY.js → W4ULMZZ6.js} +1 -1
  126. package/dist/cdn/{OCTC5LSB.js → W7ADR7QV.js} +1 -1
  127. package/dist/cdn/{KWBPU2J5.js → WF6FXY63.js} +1 -1
  128. package/dist/cdn/{WVECYIU6.js → WFNTQKEK.js} +1 -1
  129. package/dist/cdn/WGVSYIK4.js +2 -0
  130. package/dist/cdn/{PWOYDOTW.js → WK36AMAE.js} +1 -1
  131. package/dist/cdn/{S4AUHXUP.js → WNBAMEP4.js} +1 -1
  132. package/dist/cdn/{5UH2LDOM.js → WZ2EOOBW.js} +1 -1
  133. package/dist/cdn/{Y2V47B44.js → XDF2XRSP.js} +1 -1
  134. package/dist/cdn/{H5LU4AUB.js → XOFNZQVZ.js} +1 -1
  135. package/dist/cdn/{DUDZBFRD.js → XVNZ5DWM.js} +1 -1
  136. package/dist/cdn/{5YWC632Q.js → YDNLNQTM.js} +1 -1
  137. package/dist/cdn/{SY5OK3OO.js → YG62SKHE.js} +1 -1
  138. package/dist/cdn/{AXPCXW6J.js → YPJFB3G7.js} +1 -1
  139. package/dist/cdn/{BJMK42XI.js → YQONJA6H.js} +1 -1
  140. package/dist/cdn/{ANT7M4PP.js → YUUGBEJE.js} +1 -1
  141. package/dist/cdn/{2SBK5U66.js → ZDYWF5EE.js} +1 -1
  142. package/dist/cdn/{U7SOU2M6.js → ZQ4LGVDF.js} +1 -1
  143. package/dist/cdn/{ZID6C4TA.js → ZUAXYEB6.js} +1 -1
  144. package/dist/cdn/index.js +1 -1
  145. package/dist/chunks/runtime.js +3 -3
  146. package/dist/chunks/utils3.js +18 -3
  147. package/dist/components/calcite-date-picker/customElement.js +3 -13
  148. package/dist/components/calcite-input-date-picker/customElement.js +35 -47
  149. package/dist/docs/api.json +1 -1
  150. package/dist/docs/docs.json +1 -1
  151. package/dist/docs/web-types.json +1 -1
  152. package/package.json +2 -2
  153. package/dist/cdn/BKRZAU7X.js +0 -2
  154. package/dist/cdn/R7ZSZ2JC.js +0 -2
  155. package/dist/cdn/WRKLQLS3.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as f,h as y,l as B,n as g,o as b,p,q as I,r as m,s as r,t as h,u as D}from"./DSQ47C3C.js";import"./CUJ2U3RS.js";import{a as T}from"./5UL5W56B.js";import{a as E}from"./HT2ZXCE7.js";import"./WGGFNK4Z.js";import"./DI6LEX3E.js";import"./62DDKSJD.js";import"./QU5FK5F6.js";import"./OAOQ5BXS.js";import{E as C,F as v,G as F,H as x,S as O,g as k,h as d,p as R}from"./KS7HVFFO.js";var $={container:"container",hexInput:"hex-input",opacityInput:"opacity-input"},U=k`:host{display:block}.container{display:flex;inline-size:100%;flex-wrap:nowrap;align-items:center}.hex-input{--calcite-input-text-background-color: var(--calcite-color-picker-input-background-color);--calcite-input-text-border-color: var(--calcite-color-picker-input-border-color);--calcite-input-text-text-color: var(--calcite-color-picker-input-text-color);--calcite-input-prefix-text-color: var(--calcite-color-picker-input-prefix-text-color)}.opacity-input{--calcite-input-number-background-color: var(--calcite-color-picker-input-background-color);--calcite-input-number-border-color: var(--calcite-color-picker-input-border-color);--calcite-input-number-text-color: var(--calcite-color-picker-input-text-color);--calcite-input-suffix-text-color: var(--calcite-color-picker-input-suffix-text-color)}.hex-input{flex-grow:1;text-transform:uppercase}.opacity-input{inline-size:100px;margin-inline-start:-1px}:host([hidden]){display:none}[hidden]{display:none}`,V=f(),w=class extends F{constructor(){super(...arguments),this.hexInputRef=C(),this.opacityInputRef=C(),this.focusSetter=E()(this),this.internalColor=V,this.alphaChannel=!1,this.allowEmpty=!1,this.hexLabel="Hex",this.scale="m",this.value=r(h(V,this.alphaChannel),this.alphaChannel,!0),this.calciteColorPickerHexInputChange=R({cancelable:!1})}static{this.properties={internalColor:[16,{},{state:!0}],alphaChannel:[5,{},{type:Boolean}],allowEmpty:[5,{},{type:Boolean}],hexLabel:1,messages:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],value:[3,{},{reflect:!0}]}}static{this.styles=U}async setFocus(t){return this.focusSetter(()=>this.hexInputRef.value,t)}connectedCallback(){super.connectedCallback(),this.previousNonNullValue=this.value;let{allowEmpty:t,alphaChannel:e,value:a}=this;if(a){let n=r(a,e);p(n,e)&&this.internalSetValue(n,n,!1);return}t&&this.internalSetValue(void 0,void 0,!1)}willUpdate(t){t.has("value")&&(this.hasUpdated||this.value!==r(h(V,this.alphaChannel),this.alphaChannel,!0))&&this.internalSetValue(this.value,t.get("value"),!1)}onHexInputBlur(){let t=this.hexInputRef.value,e=t.value,a=`#${e}`,{allowEmpty:n,internalColor:l}=this,o=n&&!e,i=m(a);(I(a,!0)||I(a,!1))&&this.onHexInputChange(),!(o||p(a)&&i)&&(t.value=n&&!l?"":this.formatHexForInternalInput(D(l.object())))}onOpacityInputBlur(){let t=this.opacityInputRef.value,e=t.value,{allowEmpty:a,internalColor:n}=this;a&&!e||(t.value=a&&!n?"":this.formatOpacityForInternalInput(n))}onOpacityInputInput(){this.onOpacityInputChange()}onHexInputChange(){let e=this.hexInputRef.value.value;if(e){let a=r(e,!1);if(p(a)&&this.alphaChannel&&this.internalColor){let l=r(this.internalColor.hexa(),!0).slice(-2);e=`${a+l}`}}this.internalSetValue(e,this.value)}onOpacityInputChange(){let t=this.opacityInputRef.value,e;if(!t.value)e=t.value;else{let a=b(Number(t.value));e=this.internalColor?.alpha(a).hexa()}this.internalSetValue(e,this.value)}onInputFocus(t){(t.type==="calciteInternalInputTextFocus"?this.hexInputRef:this.opacityInputRef).value.selectText()}onHexInputInput(){let t=`#${this.hexInputRef.value.value}`,e=this.value;p(t,this.alphaChannel)&&m(t,this.alphaChannel)&&this.internalSetValue(t,e)}onInputKeyDown(t){let{altKey:e,ctrlKey:a,metaKey:n,shiftKey:l}=t,{alphaChannel:o,hexInputRef:i,internalColor:s,value:c}=this,{key:u}=t,H=t.composedPath();if(u==="Tab"&&I(c,this.alphaChannel)||u==="Enter"){H.includes(i.value)?this.onHexInputChange():this.onOpacityInputChange(),u==="Enter"&&t.preventDefault();return}let L=u==="ArrowDown"||u==="ArrowUp",S=this.value;if(L){if(!c){this.internalSetValue(this.previousNonNullValue,S),t.preventDefault();return}let z=u==="ArrowUp"?1:-1,P=l?10:1;this.internalSetValue(h(this.nudgeRGBChannels(s,P*z,H.includes(i.value)?"rgb":"a"),o),S),t.preventDefault();return}let N=e||a||n,A=u.length===1,K=B.test(u);A&&!N&&!K&&t.preventDefault()}onHexInputPaste(t){let e=t.clipboardData.getData("text");p(e,this.alphaChannel)&&m(e,this.alphaChannel)&&(t.preventDefault(),this.hexInputRef.value.value=e.slice(1),this.internalSetValue(e,this.value))}internalSetValue(t,e,a=!0){if(t){let{alphaChannel:n}=this,l=r(t,n,n);if(p(l,n)){let{internalColor:o}=this,i=f(l),s=r(h(i,n),n),c=!o||s!==r(h(o,n),n);this.internalColor=i,this.previousNonNullValue=s,this.value=s,c&&a&&this.calciteColorPickerHexInputChange.emit();return}}else if(this.allowEmpty){this.internalColor=void 0,this.value=void 0,a&&this.calciteColorPickerHexInputChange.emit();return}this.value=e}formatHexForInternalInput(t){return t?t.replace("#","").slice(0,6):""}formatOpacityForInternalInput(t){return t?`${g(t.alpha())}`:""}nudgeRGBChannels(t,e,a){let n,l=t.array(),o=l.slice(0,3);if(a==="rgb")n=[...o.map(s=>s+e),this.alphaChannel?l[3]:void 0];else{let i=b(g(t.alpha())+e);n=[...o,i]}return f(n)}render(){let{alphaChannel:t,hexLabel:e,internalColor:a,messages:n,scale:l,value:o}=this,i=this.formatHexForInternalInput(o),s=this.formatOpacityForInternalInput(a),c=l==="l"?"m":"s";return d`<div class=${x($.container)}><calcite-input-text class=${x($.hexInput)} .label=${n?.hex||e} .maxLength=${this.alphaChannel?8:6} @keydown=${this.onInputKeyDown} @paste=${this.onHexInputPaste} @calciteInputTextChange=${this.onHexInputChange} @calciteInputTextInput=${this.onHexInputInput} @calciteInternalInputTextBlur=${this.onHexInputBlur} @calciteInternalInputTextFocus=${this.onInputFocus} prefix-text=# .scale=${c} .value=${i} ${v(this.hexInputRef)}></calcite-input-text>${t?T("opacity-input",d`<calcite-input-number class=${x($.opacityInput)} .label=${n?.opacity} .max=${y.max} max-length=3 .min=${y.min} number-button-type=none .numberingSystem=${this.numberingSystem} @keydown=${this.onInputKeyDown} @calciteInputNumberInput=${this.onOpacityInputInput} @calciteInternalInputNumberBlur=${this.onOpacityInputBlur} @calciteInternalInputNumberFocus=${this.onInputFocus} .scale=${c} suffix-text=% .value=${s} ${v(this.opacityInputRef)}></calcite-input-number>`):null}</div>`}};O("calcite-color-picker-hex-input",w);export{w as ColorPickerHexInput};
2
+ import{a as f,h as y,l as B,n as g,o as b,p,q as I,r as m,s as r,t as h,u as D}from"./DSQ47C3C.js";import"./CUJ2U3RS.js";import{a as T}from"./VY5SOQAQ.js";import{a as E}from"./6EO6DYWC.js";import"./WGGFNK4Z.js";import"./ONOJ67SI.js";import"./JB775TAO.js";import"./MKRCEA57.js";import"./OAOQ5BXS.js";import{E as C,F as v,G as F,H as x,S as O,g as k,h as d,p as R}from"./RNRXZGW3.js";var $={container:"container",hexInput:"hex-input",opacityInput:"opacity-input"},U=k`:host{display:block}.container{display:flex;inline-size:100%;flex-wrap:nowrap;align-items:center}.hex-input{--calcite-input-text-background-color: var(--calcite-color-picker-input-background-color);--calcite-input-text-border-color: var(--calcite-color-picker-input-border-color);--calcite-input-text-text-color: var(--calcite-color-picker-input-text-color);--calcite-input-prefix-text-color: var(--calcite-color-picker-input-prefix-text-color)}.opacity-input{--calcite-input-number-background-color: var(--calcite-color-picker-input-background-color);--calcite-input-number-border-color: var(--calcite-color-picker-input-border-color);--calcite-input-number-text-color: var(--calcite-color-picker-input-text-color);--calcite-input-suffix-text-color: var(--calcite-color-picker-input-suffix-text-color)}.hex-input{flex-grow:1;text-transform:uppercase}.opacity-input{inline-size:100px;margin-inline-start:-1px}:host([hidden]){display:none}[hidden]{display:none}`,V=f(),w=class extends F{constructor(){super(...arguments),this.hexInputRef=C(),this.opacityInputRef=C(),this.focusSetter=E()(this),this.internalColor=V,this.alphaChannel=!1,this.allowEmpty=!1,this.hexLabel="Hex",this.scale="m",this.value=r(h(V,this.alphaChannel),this.alphaChannel,!0),this.calciteColorPickerHexInputChange=R({cancelable:!1})}static{this.properties={internalColor:[16,{},{state:!0}],alphaChannel:[5,{},{type:Boolean}],allowEmpty:[5,{},{type:Boolean}],hexLabel:1,messages:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],value:[3,{},{reflect:!0}]}}static{this.styles=U}async setFocus(t){return this.focusSetter(()=>this.hexInputRef.value,t)}connectedCallback(){super.connectedCallback(),this.previousNonNullValue=this.value;let{allowEmpty:t,alphaChannel:e,value:a}=this;if(a){let n=r(a,e);p(n,e)&&this.internalSetValue(n,n,!1);return}t&&this.internalSetValue(void 0,void 0,!1)}willUpdate(t){t.has("value")&&(this.hasUpdated||this.value!==r(h(V,this.alphaChannel),this.alphaChannel,!0))&&this.internalSetValue(this.value,t.get("value"),!1)}onHexInputBlur(){let t=this.hexInputRef.value,e=t.value,a=`#${e}`,{allowEmpty:n,internalColor:l}=this,o=n&&!e,i=m(a);(I(a,!0)||I(a,!1))&&this.onHexInputChange(),!(o||p(a)&&i)&&(t.value=n&&!l?"":this.formatHexForInternalInput(D(l.object())))}onOpacityInputBlur(){let t=this.opacityInputRef.value,e=t.value,{allowEmpty:a,internalColor:n}=this;a&&!e||(t.value=a&&!n?"":this.formatOpacityForInternalInput(n))}onOpacityInputInput(){this.onOpacityInputChange()}onHexInputChange(){let e=this.hexInputRef.value.value;if(e){let a=r(e,!1);if(p(a)&&this.alphaChannel&&this.internalColor){let l=r(this.internalColor.hexa(),!0).slice(-2);e=`${a+l}`}}this.internalSetValue(e,this.value)}onOpacityInputChange(){let t=this.opacityInputRef.value,e;if(!t.value)e=t.value;else{let a=b(Number(t.value));e=this.internalColor?.alpha(a).hexa()}this.internalSetValue(e,this.value)}onInputFocus(t){(t.type==="calciteInternalInputTextFocus"?this.hexInputRef:this.opacityInputRef).value.selectText()}onHexInputInput(){let t=`#${this.hexInputRef.value.value}`,e=this.value;p(t,this.alphaChannel)&&m(t,this.alphaChannel)&&this.internalSetValue(t,e)}onInputKeyDown(t){let{altKey:e,ctrlKey:a,metaKey:n,shiftKey:l}=t,{alphaChannel:o,hexInputRef:i,internalColor:s,value:c}=this,{key:u}=t,H=t.composedPath();if(u==="Tab"&&I(c,this.alphaChannel)||u==="Enter"){H.includes(i.value)?this.onHexInputChange():this.onOpacityInputChange(),u==="Enter"&&t.preventDefault();return}let L=u==="ArrowDown"||u==="ArrowUp",S=this.value;if(L){if(!c){this.internalSetValue(this.previousNonNullValue,S),t.preventDefault();return}let z=u==="ArrowUp"?1:-1,P=l?10:1;this.internalSetValue(h(this.nudgeRGBChannels(s,P*z,H.includes(i.value)?"rgb":"a"),o),S),t.preventDefault();return}let N=e||a||n,A=u.length===1,K=B.test(u);A&&!N&&!K&&t.preventDefault()}onHexInputPaste(t){let e=t.clipboardData.getData("text");p(e,this.alphaChannel)&&m(e,this.alphaChannel)&&(t.preventDefault(),this.hexInputRef.value.value=e.slice(1),this.internalSetValue(e,this.value))}internalSetValue(t,e,a=!0){if(t){let{alphaChannel:n}=this,l=r(t,n,n);if(p(l,n)){let{internalColor:o}=this,i=f(l),s=r(h(i,n),n),c=!o||s!==r(h(o,n),n);this.internalColor=i,this.previousNonNullValue=s,this.value=s,c&&a&&this.calciteColorPickerHexInputChange.emit();return}}else if(this.allowEmpty){this.internalColor=void 0,this.value=void 0,a&&this.calciteColorPickerHexInputChange.emit();return}this.value=e}formatHexForInternalInput(t){return t?t.replace("#","").slice(0,6):""}formatOpacityForInternalInput(t){return t?`${g(t.alpha())}`:""}nudgeRGBChannels(t,e,a){let n,l=t.array(),o=l.slice(0,3);if(a==="rgb")n=[...o.map(s=>s+e),this.alphaChannel?l[3]:void 0];else{let i=b(g(t.alpha())+e);n=[...o,i]}return f(n)}render(){let{alphaChannel:t,hexLabel:e,internalColor:a,messages:n,scale:l,value:o}=this,i=this.formatHexForInternalInput(o),s=this.formatOpacityForInternalInput(a),c=l==="l"?"m":"s";return d`<div class=${x($.container)}><calcite-input-text class=${x($.hexInput)} .label=${n?.hex||e} .maxLength=${this.alphaChannel?8:6} @keydown=${this.onInputKeyDown} @paste=${this.onHexInputPaste} @calciteInputTextChange=${this.onHexInputChange} @calciteInputTextInput=${this.onHexInputInput} @calciteInternalInputTextBlur=${this.onHexInputBlur} @calciteInternalInputTextFocus=${this.onInputFocus} prefix-text=# .scale=${c} .value=${i} ${v(this.hexInputRef)}></calcite-input-text>${t?T("opacity-input",d`<calcite-input-number class=${x($.opacityInput)} .label=${n?.opacity} .max=${y.max} max-length=3 .min=${y.min} number-button-type=none .numberingSystem=${this.numberingSystem} @keydown=${this.onInputKeyDown} @calciteInputNumberInput=${this.onOpacityInputInput} @calciteInternalInputNumberBlur=${this.onOpacityInputBlur} @calciteInternalInputNumberFocus=${this.onInputFocus} .scale=${c} suffix-text=% .value=${s} ${v(this.opacityInputRef)}></calcite-input-number>`):null}</div>`}};O("calcite-color-picker-hex-input",w);export{w as ColorPickerHexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as t,b as w,c as S,d as l}from"./DCWL5FUH.js";import{a as K}from"./ZON3SXPK.js";import{b as _}from"./3CXAJ3GM.js";import{a as O}from"./ODRBTFGL.js";import"./BVZOM3TM.js";import{a as R}from"./A6BYFUAB.js";import{a as u}from"./5UL5W56B.js";import"./AP2LDRUV.js";import{a as D,b as N}from"./ENDXE7YY.js";import{a as L}from"./GQFV4HZP.js";import{c as j}from"./RRXOB3GM.js";import{a as I}from"./HT2ZXCE7.js";import{a as M}from"./WGGFNK4Z.js";import"./DI6LEX3E.js";import"./62DDKSJD.js";import{r as A,s as z,t as c,u as x}from"./QU5FK5F6.js";import"./OAOQ5BXS.js";import{E as B,F as k,G as P,H as o,S as T,g as F,h as n,l as y,p as $}from"./KS7HVFFO.js";var U=F`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.content-top{padding:var(--calcite-panel-content-top-space, var(--calcite-internal-panel-default-space))}.content-bottom{padding:var(--calcite-panel-content-bottom-space, var(--calcite-internal-panel-default-space))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`,E=class extends P{constructor(){super(),this.containerRef=B(),this.resizeObserver=D("resize",()=>this.resizeHandler()),this.messages=L(),this._closed=!1,this.focusSetter=I()(this),this.interactiveContainer=R(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasHeaderDescription=!1,this.hasHeaderHeading=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.menuPlacement=_,this.overlayPositioning="absolute",this.scale="m",this.topLayerDisabled=!1,this.calcitePanelClose=$({cancelable:!0}),this.calcitePanelCollapse=$({cancelable:!1}),this.calcitePanelExpand=$({cancelable:!1}),this.calcitePanelScroll=$({cancelable:!1}),this.calcitePanelToggle=$({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasHeaderDescription:[16,{},{state:!0}],hasHeaderHeading:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],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,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[K,U]}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){this.closable&&e.key==="Escape"&&!e.defaultPrevented&&(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=c(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=c(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=c(e)}handleActionBarSlotChange(e){let a=x(e).filter(i=>i?.matches("calcite-action-bar"));a.forEach(i=>i.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=c(e)}handleHeaderDescriptionSlotChange(e){this.hasHeaderDescription=z(e)||x(e).some(A)}handleHeaderHeadingSlotChange(e){this.hasHeaderHeading=z(e)||x(e).some(A)}handleFabSlotChange(e){this.hasFab=c(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=c(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=c(e)}handleFooterSlotChange(e){this.hasFooterContent=c(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=c(e)}contentTopSlotChangeHandler(e){this.hasContentTop=c(e)}setPanelScrollEl(e){N(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){x(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}renderHeaderContent(){let{heading:e,headingLevel:a,description:i,hasHeaderContent:s,hasHeaderDescription:d,hasHeaderHeading:r,icon:m,scale:f}=this,p=!!e||r,h=!!i||d,g=p||h,v=m?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${m} .scale=${M(f)}></calcite-icon>`:null,b=O({class:t.heading,hidden:!p,level:a,children:n`<slot .hidden=${!r} name=${l.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${r?null:e}`}),H=n`<span class=${o(t.description)} .hidden=${!h}><slot .hidden=${!d} name=${l.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${d?null:i}</span>`;return u("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})} .hidden=${s||!g}>${v}<div class=${o(t.headingTextContent)}>${b}${H}</div></div>`)}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${l.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return u("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${l.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderStartActions(){let{hasStartActions:e}=this;return u("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${l.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:i,collapsed:s,collapseDirection:d,collapsible:r,hasMenuItems:m}=this,{collapse:f,expand:p,close:h}=a,g=[S.expand,S.collapse];d==="up"&&g.reverse();let v=r?n`<calcite-action .aria=${{expanded:!s}} .icon=${s?g[0]:g[1]} id=${w.collapse} .label=${f} @click=${this.collapse} .scale=${this.scale} .text=${f} title=${(s?p:f)??y}></calcite-action>`:null,b=i?n`<calcite-action .ariaLabel=${h} .icon=${S.close} id=${w.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${h} title=${h??y}></calcite-action>`:null,H=n`<slot name=${l.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,C=e||v||b||m;return u("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!C}>${H}${this.renderMenu()}${v}${b}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:i,menuFlipPlacements:s,menuPlacement:d,scale:r}=this;return u("menu",n`<calcite-action-menu .flipPlacements=${s??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${i} .overlayPositioning=${this.overlayPositioning} .placement=${d} .scale=${r} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${o(t.menuAction)} .icon=${S.menu} .scale=${r} slot=${j.trigger} .text=${a.options}></calcite-action><slot name=${l.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasHeaderDescription:a,hasHeaderHeading:i,hasStartActions:s,hasEndActions:d,closable:r,collapsible:m,hasMenuItems:f,hasActionBar:p,hasContentTop:h,heading:g,description:v}=this,b=this.renderHeaderContent(),C=e||(!!g||!!v||i||a)||s||d||m||r||f||p||h;return this.showHeaderContent=C,n`<header class=${o(t.header)} .hidden=${!(C||p||h)}><div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:p})} .hidden=${!C}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${b}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:i}=this,s=a||e||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!i}><slot name=${l.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${i||!a}><slot name=${l.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${i||!e}><slot name=${l.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${k(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${l.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o(t.contentTop)} .hidden=${!this.hasContentTop}><slot name=${l.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${l.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:i}=this,s=n`<article .ariaBusy=${a} class=${o(t.container)} .hidden=${i} ${k(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${u("alerts",n`<slot name=${l.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</article>`;return this.interactiveContainer({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${s}`})}};T("calcite-panel",E);export{E as Panel};
2
+ import{a as t,b as w,c as S,d as l}from"./DCWL5FUH.js";import{a as K}from"./2BQNKQRI.js";import{b as _}from"./PGYGTX6H.js";import{a as O}from"./HANIE3A7.js";import"./GOK6UUVH.js";import{a as R}from"./F4BSA6GV.js";import{a as u}from"./VY5SOQAQ.js";import"./AP2LDRUV.js";import{a as D,b as N}from"./ENDXE7YY.js";import{a as L}from"./2YDPGI4H.js";import{c as j}from"./RRXOB3GM.js";import{a as I}from"./6EO6DYWC.js";import{a as M}from"./WGGFNK4Z.js";import"./ONOJ67SI.js";import"./JB775TAO.js";import{r as A,s as z,t as c,u as x}from"./MKRCEA57.js";import"./OAOQ5BXS.js";import{E as B,F as k,G as P,H as o,S as T,g as F,h as n,l as y,p as $}from"./RNRXZGW3.js";var U=F`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.content-top{padding:var(--calcite-panel-content-top-space, var(--calcite-internal-panel-default-space))}.content-bottom{padding:var(--calcite-panel-content-bottom-space, var(--calcite-internal-panel-default-space))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`,E=class extends P{constructor(){super(),this.containerRef=B(),this.resizeObserver=D("resize",()=>this.resizeHandler()),this.messages=L(),this._closed=!1,this.focusSetter=I()(this),this.interactiveContainer=R(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasHeaderDescription=!1,this.hasHeaderHeading=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.menuPlacement=_,this.overlayPositioning="absolute",this.scale="m",this.topLayerDisabled=!1,this.calcitePanelClose=$({cancelable:!0}),this.calcitePanelCollapse=$({cancelable:!1}),this.calcitePanelExpand=$({cancelable:!1}),this.calcitePanelScroll=$({cancelable:!1}),this.calcitePanelToggle=$({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasHeaderDescription:[16,{},{state:!0}],hasHeaderHeading:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],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,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[K,U]}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){this.closable&&e.key==="Escape"&&!e.defaultPrevented&&(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=c(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=c(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=c(e)}handleActionBarSlotChange(e){let a=x(e).filter(i=>i?.matches("calcite-action-bar"));a.forEach(i=>i.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=c(e)}handleHeaderDescriptionSlotChange(e){this.hasHeaderDescription=z(e)||x(e).some(A)}handleHeaderHeadingSlotChange(e){this.hasHeaderHeading=z(e)||x(e).some(A)}handleFabSlotChange(e){this.hasFab=c(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=c(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=c(e)}handleFooterSlotChange(e){this.hasFooterContent=c(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=c(e)}contentTopSlotChangeHandler(e){this.hasContentTop=c(e)}setPanelScrollEl(e){N(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){x(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}renderHeaderContent(){let{heading:e,headingLevel:a,description:i,hasHeaderContent:s,hasHeaderDescription:d,hasHeaderHeading:r,icon:m,scale:f}=this,p=!!e||r,h=!!i||d,g=p||h,v=m?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${m} .scale=${M(f)}></calcite-icon>`:null,b=O({class:t.heading,hidden:!p,level:a,children:n`<slot .hidden=${!r} name=${l.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${r?null:e}`}),H=n`<span class=${o(t.description)} .hidden=${!h}><slot .hidden=${!d} name=${l.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${d?null:i}</span>`;return u("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})} .hidden=${s||!g}>${v}<div class=${o(t.headingTextContent)}>${b}${H}</div></div>`)}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${l.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return u("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${l.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderStartActions(){let{hasStartActions:e}=this;return u("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${l.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:i,collapsed:s,collapseDirection:d,collapsible:r,hasMenuItems:m}=this,{collapse:f,expand:p,close:h}=a,g=[S.expand,S.collapse];d==="up"&&g.reverse();let v=r?n`<calcite-action .aria=${{expanded:!s}} .icon=${s?g[0]:g[1]} id=${w.collapse} .label=${f} @click=${this.collapse} .scale=${this.scale} .text=${f} title=${(s?p:f)??y}></calcite-action>`:null,b=i?n`<calcite-action .ariaLabel=${h} .icon=${S.close} id=${w.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${h} title=${h??y}></calcite-action>`:null,H=n`<slot name=${l.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,C=e||v||b||m;return u("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!C}>${H}${this.renderMenu()}${v}${b}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:i,menuFlipPlacements:s,menuPlacement:d,scale:r}=this;return u("menu",n`<calcite-action-menu .flipPlacements=${s??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${i} .overlayPositioning=${this.overlayPositioning} .placement=${d} .scale=${r} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${o(t.menuAction)} .icon=${S.menu} .scale=${r} slot=${j.trigger} .text=${a.options}></calcite-action><slot name=${l.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasHeaderDescription:a,hasHeaderHeading:i,hasStartActions:s,hasEndActions:d,closable:r,collapsible:m,hasMenuItems:f,hasActionBar:p,hasContentTop:h,heading:g,description:v}=this,b=this.renderHeaderContent(),C=e||(!!g||!!v||i||a)||s||d||m||r||f||p||h;return this.showHeaderContent=C,n`<header class=${o(t.header)} .hidden=${!(C||p||h)}><div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:p})} .hidden=${!C}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${b}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:i}=this,s=a||e||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!i}><slot name=${l.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${i||!a}><slot name=${l.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${i||!e}><slot name=${l.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${k(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${l.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o(t.contentTop)} .hidden=${!this.hasContentTop}><slot name=${l.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${l.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:i}=this,s=n`<article .ariaBusy=${a} class=${o(t.container)} .hidden=${i} ${k(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${u("alerts",n`<slot name=${l.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</article>`;return this.interactiveContainer({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${s}`})}};T("calcite-panel",E);export{E as Panel};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as k}from"./5UL5W56B.js";import{a as y}from"./YGX7CUXN.js";import{a as E}from"./CEYBZFIQ.js";import{a as w}from"./GQFV4HZP.js";import{a as S}from"./HT2ZXCE7.js";import{a as g}from"./WGGFNK4Z.js";import"./DI6LEX3E.js";import"./62DDKSJD.js";import{t as $}from"./QU5FK5F6.js";import"./OAOQ5BXS.js";import{G as f,H as o,J as m,S as b,g as x,h as l,p as d}from"./KS7HVFFO.js";var i={content:"content",toggle:"toggle"},t={chevronIcon:"chevron-icon",content:"content",iconStart:"icon--start",iconEnd:"icon--end",invalid:"invalid",sectionHeaderText:"section-header__text",statusIcon:"status-icon",switch:"switch",toggle:"toggle",toggleContainer:"toggle-container",toggleSwitchContent:"toggle--switch__content",toggleSwitchText:"toggle--switch__text",valid:"valid"},p={menuExpanded:"chevron-up",menuCollapsed:"chevron-down",valid:"check-circle",invalid:"exclamation-mark-triangle"},I=x`:host{box-sizing:border-box;display:block;color:var(--calcite-block-section-header-text-color, var(--calcite-color-text-2))}:host([expanded]){border-width:0px;border-block-end-width:1px;border-style:solid;border-block-end-color:var(--calcite-block-section-border-color, var(--calcite-color-border-3))}:host([expanded]) .toggle{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}:host([expanded]) .toggle:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}:host([expanded]) .icon--end,:host([expanded]) .icon--start{color:var(--calcite-block-section-text-color, var(--calcite-color-text-1))}:host([expanded]) .chevron-icon{color:var(--calcite-block-section-text-color, var(--calcite-color-text-3))}:host([expanded]) .chevron-icon:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}:host([expanded]) .toggle-container:hover calcite-switch{--calcite-switch-background-color: var(--calcite-color-brand-hover)}:host(:last-child){border-block-end-width:0px}:host([scale=s]) .toggle{padding-block:var(--calcite-spacing-xxs);gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm)}:host([scale=s]) .content{padding-block:var(--calcite-block-section-content-space, var(--calcite-spacing-xxs))}:host([scale=m]) .toggle{padding-block:var(--calcite-spacing-sm);gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size)}:host([scale=m]) .content{padding-block:var(--calcite-block-section-content-space, var(--calcite-spacing-sm))}:host([scale=l]) .toggle{padding-block:var(--calcite-spacing-md);gap:var(--calcite-spacing-lg);font-size:var(--calcite-font-size-md)}:host([scale=l]) .content{padding-block:var(--calcite-block-section-content-space, var(--calcite-spacing-md))}.toggle{display:flex;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;border-width:0px;outline-color:transparent;font-family:inherit;color:var(--calcite-block-section-header-text-color, var(--calcite-color-text-2));background-color:var(--calcite-block-section-background-color, var(--calcite-color-foreground-1));font-weight:var(--calcite-font-weight-regular);padding-inline:0;line-height:var(--calcite-font-line-height-relative-snug)}.toggle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));z-index:var(--calcite-z-index)}.toggle:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}.section-header__text{margin-block:0px;flex:1 1 auto;text-align:initial;word-wrap:anywhere}.toggle-container{position:relative;display:flex;align-items:center;word-break:break-word}.toggle-container .toggle--switch__content{display:flex;flex:1 1 auto;align-items:center}.toggle-container .icon--end,.toggle-container .icon--start,.toggle-container .chevron-icon{display:flex;align-items:center;color:var(--calcite-block-section-text-color, var(--calcite-color-text-3))}.toggle-container:hover .chevron-icon{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}.toggle-container:hover calcite-switch{--calcite-switch-background-color: var(--calcite-color-text-3)}.status-icon{display:flex;align-items:center}.status-icon.valid{color:var(--calcite-color-status-success)}.status-icon.invalid{color:var(--calcite-color-status-danger)}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends f{constructor(){super(...arguments),this.messages=w(),this.focusSetter=S()(this),this.defaultSlotHasElements=!1,this.expanded=!1,this.scale="m",this.toggleDisplay="button",this.calciteBlockSectionCollapse=d({cancelable:!1}),this.calciteBlockSectionExpand=d({cancelable:!1}),this.calciteBlockSectionToggle=d({cancelable:!1})}static{this.properties={defaultSlotHasElements:[16,{},{state:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],text:1,toggleDisplay:[3,{},{reflect:!0}]}}static{this.styles=I}get open(){return this.expanded}set open(e){E.deprecated("property",{component:this,name:"open",removalVersion:5,suggested:"expanded"}),this.expanded=e}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteBlockSectionExpand.emit():this.calciteBlockSectionCollapse.emit())}handleHeaderKeyDown(e){y(e.key)&&(this.toggleSection(),e.preventDefault(),e.stopPropagation())}toggleSection(){this.expanded=!this.expanded,this.calciteBlockSectionToggle.emit()}handleDefaultSlot(e){this.defaultSlotHasElements=$(e)}renderStatusIcon(){let{status:e}=this,c=p[e]??!1,a={[t.statusIcon]:!0,[t.valid]:e=="valid",[t.invalid]:e=="invalid"};return c?l`<calcite-icon class=${o(a)} .icon=${c} .scale=${g(this.scale)}></calcite-icon>`:null}renderIcon(e){let{iconFlipRtl:c,iconStart:a,iconEnd:n}=this;if((e==="start"?a:n)===void 0)return null;let s=c==="both"||c==="start",h=c==="both"||c==="end",r=e==="start";return k(r?a:n,l`<calcite-icon class=${o(r?t.iconStart:t.iconEnd)} .flipRtl=${r?s:h} .icon=${r?a:n} .scale=${g(this.scale)}></calcite-icon>`)}render(){let{messages:e,expanded:c,text:a,toggleDisplay:n}=this,u=c?p.menuExpanded:p.menuCollapsed,s=c?e.collapse:e.expand,h=n==="switch"?l`<div class=${o({[t.toggleContainer]:!0})}><div aria-controls=${i.content} .ariaExpanded=${c} class=${o({[t.toggle]:!0})} id=${i.toggle} @click=${this.toggleSection} @keydown=${this.handleHeaderKeyDown} role=button tabindex=0 title=${s??m}>${this.renderIcon("start")}<div class=${o(t.toggleSwitchContent)}><span class=${o(t.toggleSwitchText)}>${a}</span></div>${this.renderIcon("end")}${this.renderStatusIcon()}<calcite-switch .checked=${c} class=${o(t.switch)} inert .label=${s} .scale=${this.scale}></calcite-switch></div></div>`:l`<div class=${o({[t.toggleContainer]:!0})}><button aria-controls=${i.content} .ariaExpanded=${c} class=${o({[t.toggle]:!0})} id=${i.toggle} @click=${this.toggleSection}>${this.renderIcon("start")}<span class=${o(t.sectionHeaderText)}>${a}</span>${this.renderIcon("end")}${this.renderStatusIcon()}<calcite-icon class=${o(t.chevronIcon)} .icon=${u} .scale=${g(this.scale)}></calcite-icon></button></div>`;return l`${h}<section aria-labelledby=${i.toggle} class=${o({[t.content]:this.defaultSlotHasElements})} .hidden=${!c} id=${i.content}><slot @slotchange=${this.handleDefaultSlot}></slot></section>`}};b("calcite-block-section",v);export{v as BlockSection};
2
+ import{a as k}from"./VY5SOQAQ.js";import{a as y}from"./YGX7CUXN.js";import{a as E}from"./LOGLKFMU.js";import{a as w}from"./2YDPGI4H.js";import{a as S}from"./6EO6DYWC.js";import{a as g}from"./WGGFNK4Z.js";import"./ONOJ67SI.js";import"./JB775TAO.js";import{t as $}from"./MKRCEA57.js";import"./OAOQ5BXS.js";import{G as f,H as o,J as m,S as b,g as x,h as l,p as d}from"./RNRXZGW3.js";var i={content:"content",toggle:"toggle"},t={chevronIcon:"chevron-icon",content:"content",iconStart:"icon--start",iconEnd:"icon--end",invalid:"invalid",sectionHeaderText:"section-header__text",statusIcon:"status-icon",switch:"switch",toggle:"toggle",toggleContainer:"toggle-container",toggleSwitchContent:"toggle--switch__content",toggleSwitchText:"toggle--switch__text",valid:"valid"},p={menuExpanded:"chevron-up",menuCollapsed:"chevron-down",valid:"check-circle",invalid:"exclamation-mark-triangle"},I=x`:host{box-sizing:border-box;display:block;color:var(--calcite-block-section-header-text-color, var(--calcite-color-text-2))}:host([expanded]){border-width:0px;border-block-end-width:1px;border-style:solid;border-block-end-color:var(--calcite-block-section-border-color, var(--calcite-color-border-3))}:host([expanded]) .toggle{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}:host([expanded]) .toggle:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}:host([expanded]) .icon--end,:host([expanded]) .icon--start{color:var(--calcite-block-section-text-color, var(--calcite-color-text-1))}:host([expanded]) .chevron-icon{color:var(--calcite-block-section-text-color, var(--calcite-color-text-3))}:host([expanded]) .chevron-icon:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}:host([expanded]) .toggle-container:hover calcite-switch{--calcite-switch-background-color: var(--calcite-color-brand-hover)}:host(:last-child){border-block-end-width:0px}:host([scale=s]) .toggle{padding-block:var(--calcite-spacing-xxs);gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm)}:host([scale=s]) .content{padding-block:var(--calcite-block-section-content-space, var(--calcite-spacing-xxs))}:host([scale=m]) .toggle{padding-block:var(--calcite-spacing-sm);gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size)}:host([scale=m]) .content{padding-block:var(--calcite-block-section-content-space, var(--calcite-spacing-sm))}:host([scale=l]) .toggle{padding-block:var(--calcite-spacing-md);gap:var(--calcite-spacing-lg);font-size:var(--calcite-font-size-md)}:host([scale=l]) .content{padding-block:var(--calcite-block-section-content-space, var(--calcite-spacing-md))}.toggle{display:flex;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;border-width:0px;outline-color:transparent;font-family:inherit;color:var(--calcite-block-section-header-text-color, var(--calcite-color-text-2));background-color:var(--calcite-block-section-background-color, var(--calcite-color-foreground-1));font-weight:var(--calcite-font-weight-regular);padding-inline:0;line-height:var(--calcite-font-line-height-relative-snug)}.toggle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));z-index:var(--calcite-z-index)}.toggle:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}.section-header__text{margin-block:0px;flex:1 1 auto;text-align:initial;word-wrap:anywhere}.toggle-container{position:relative;display:flex;align-items:center;word-break:break-word}.toggle-container .toggle--switch__content{display:flex;flex:1 1 auto;align-items:center}.toggle-container .icon--end,.toggle-container .icon--start,.toggle-container .chevron-icon{display:flex;align-items:center;color:var(--calcite-block-section-text-color, var(--calcite-color-text-3))}.toggle-container:hover .chevron-icon{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}.toggle-container:hover calcite-switch{--calcite-switch-background-color: var(--calcite-color-text-3)}.status-icon{display:flex;align-items:center}.status-icon.valid{color:var(--calcite-color-status-success)}.status-icon.invalid{color:var(--calcite-color-status-danger)}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends f{constructor(){super(...arguments),this.messages=w(),this.focusSetter=S()(this),this.defaultSlotHasElements=!1,this.expanded=!1,this.scale="m",this.toggleDisplay="button",this.calciteBlockSectionCollapse=d({cancelable:!1}),this.calciteBlockSectionExpand=d({cancelable:!1}),this.calciteBlockSectionToggle=d({cancelable:!1})}static{this.properties={defaultSlotHasElements:[16,{},{state:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],text:1,toggleDisplay:[3,{},{reflect:!0}]}}static{this.styles=I}get open(){return this.expanded}set open(e){E.deprecated("property",{component:this,name:"open",removalVersion:5,suggested:"expanded"}),this.expanded=e}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteBlockSectionExpand.emit():this.calciteBlockSectionCollapse.emit())}handleHeaderKeyDown(e){y(e.key)&&(this.toggleSection(),e.preventDefault(),e.stopPropagation())}toggleSection(){this.expanded=!this.expanded,this.calciteBlockSectionToggle.emit()}handleDefaultSlot(e){this.defaultSlotHasElements=$(e)}renderStatusIcon(){let{status:e}=this,c=p[e]??!1,a={[t.statusIcon]:!0,[t.valid]:e=="valid",[t.invalid]:e=="invalid"};return c?l`<calcite-icon class=${o(a)} .icon=${c} .scale=${g(this.scale)}></calcite-icon>`:null}renderIcon(e){let{iconFlipRtl:c,iconStart:a,iconEnd:n}=this;if((e==="start"?a:n)===void 0)return null;let s=c==="both"||c==="start",h=c==="both"||c==="end",r=e==="start";return k(r?a:n,l`<calcite-icon class=${o(r?t.iconStart:t.iconEnd)} .flipRtl=${r?s:h} .icon=${r?a:n} .scale=${g(this.scale)}></calcite-icon>`)}render(){let{messages:e,expanded:c,text:a,toggleDisplay:n}=this,u=c?p.menuExpanded:p.menuCollapsed,s=c?e.collapse:e.expand,h=n==="switch"?l`<div class=${o({[t.toggleContainer]:!0})}><div aria-controls=${i.content} .ariaExpanded=${c} class=${o({[t.toggle]:!0})} id=${i.toggle} @click=${this.toggleSection} @keydown=${this.handleHeaderKeyDown} role=button tabindex=0 title=${s??m}>${this.renderIcon("start")}<div class=${o(t.toggleSwitchContent)}><span class=${o(t.toggleSwitchText)}>${a}</span></div>${this.renderIcon("end")}${this.renderStatusIcon()}<calcite-switch .checked=${c} class=${o(t.switch)} inert .label=${s} .scale=${this.scale}></calcite-switch></div></div>`:l`<div class=${o({[t.toggleContainer]:!0})}><button aria-controls=${i.content} .ariaExpanded=${c} class=${o({[t.toggle]:!0})} id=${i.toggle} @click=${this.toggleSection}>${this.renderIcon("start")}<span class=${o(t.sectionHeaderText)}>${a}</span>${this.renderIcon("end")}${this.renderStatusIcon()}<calcite-icon class=${o(t.chevronIcon)} .icon=${u} .scale=${g(this.scale)}></calcite-icon></button></div>`;return l`${h}<section aria-labelledby=${i.toggle} class=${o({[t.content]:this.defaultSlotHasElements})} .hidden=${!c} id=${i.content}><slot @slotchange=${this.handleDefaultSlot}></slot></section>`}};b("calcite-block-section",v);export{v as BlockSection};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as O,b as w,e as L,g as _}from"./62DDKSJD.js";import{a as x,b as C,c as u,d as m,e as P,f,o as v,q as g}from"./KS7HVFFO.js";var A=e=>(...s)=>{let t=m(),o=new e(...s),r=o.exports;u(t.at(-1));let n=o.component.manager;n.W(o,r),o.watchExports(n.W.bind(n,o)),P(o);let a=[o.component,...t].reverse();return v(a,i=>i===void 0?void 0:j(o,i,r),r)},j=(e,{host:s,key:t,isReactive:o},r)=>{let n=s,a=n[t]!==e.exports,i=n[t]!==r,c=r!==e.exports;if(a&&!i&&c&&(n[t]=e.exports),s===e.component){if(o){let p=e.component.manager;i&&p.W(e,n[t]),e.onUpdate(h=>{if(h.has(t)){let E=n[t];E!==e.exports&&p.W(e,E)}})}e.O=o?void 0:t}let d=e.component.constructor.elementProperties.get(t)?.readOnly;e.watchExports(()=>{n[t]!==e.exports&&(d?f(()=>{n[t]=e.exports}):n[t]=e.exports)})};var N=e=>R(void 0,e),oe=e=>s=>R(s,e),b=class extends g{constructor(s,t){super(s);let o=this.exports;try{C(this.component);let r=t(this.component,this),n=this.exports!==o;if(x(r)){n||this.setProvisionalExports(r);let a=r.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await a)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r)}}catchUpLifecycle(){}},R=A(b),se=(e,s)=>new y(e,s),y=class extends g{#e;#t;#o;constructor(s,t){super(),!!1&&(this.#t=s,this.#o=t,this.#e=new MutationObserver(o=>{o.forEach(r=>{s.includes(r.attributeName)&&t.call(this.component,this.component.el.getAttribute(r.attributeName),r.oldValue,r.attributeName)})}))}hostConnected(){this.#t.forEach(s=>{this.component.el.hasAttribute(s)&&this.#o.call(this.component,this.component.el.getAttribute(s),null,s)}),this.#e.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this.#t})}hostDisconnected(){this.#e.disconnect()}};var re=e=>(...s)=>{let t=m(),o=new e(...s);return u(t.at(-1)),o};var D="ltr",ne=()=>N((e,s)=>{s.exports=D,s.onLifecycle(()=>{let t=()=>{let o=w(e.el,"dir",D);s.exports=o==="rtl"?"rtl":"ltr"};return t(),O(e.el,["dir"],t)})}),ie=e=>(s={})=>N((t,o)=>{let r=L(t.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=t;o.onLifecycle(()=>_(t.el,()=>e("./assets"),({t9nLocale:c,t9nStrings:l,lang:d})=>{let p={...l,_lang:d,_t9nLocale:c,_loading:!1};o.exports=p;let h=l.componentLabel;typeof h=="string"&&"label"in t&&t.label==null&&(t.label??=h),i(a.messageOverrides)},s.name));let i=c=>{let l=o.exports,d=l._original??l,p=V(d,c);c&&(p._original=d),o.exports=p};return"messageOverrides"in a&&o.onUpdate(c=>{c.has("messageOverrides")&&i(a.messageOverrides)}),s.blocking?(o.setProvisionalExports(n,!1),o.ready):n}),V=(e,s)=>{if(!s)return e;let t={...e};return Object.entries(s).forEach(([o,r])=>{e[o]!==void 0&&(typeof r=="object"?t[o]=V(e[o],r):t[o]=r??e[o])}),t};export{N as a,oe as b,se as c,re as d,ne as e,ie as f};
2
+ import{a as O,b as w,e as L,g as _}from"./JB775TAO.js";import{a as x,b as C,c as u,d as m,e as P,f,o as v,q as g}from"./RNRXZGW3.js";var A=e=>(...s)=>{let t=m(),o=new e(...s),r=o.exports;u(t.at(-1));let n=o.component.manager;n.W(o,r),o.watchExports(n.W.bind(n,o)),P(o);let a=[o.component,...t].reverse();return v(a,i=>i===void 0?void 0:j(o,i,r),r)},j=(e,{host:s,key:t,isReactive:o},r)=>{let n=s,a=n[t]!==e.exports,i=n[t]!==r,c=r!==e.exports;if(a&&!i&&c&&(n[t]=e.exports),s===e.component){if(o){let p=e.component.manager;i&&p.W(e,n[t]),e.onUpdate(h=>{if(h.has(t)){let E=n[t];E!==e.exports&&p.W(e,E)}})}e.O=o?void 0:t}let d=e.component.constructor.elementProperties.get(t)?.readOnly;e.watchExports(()=>{n[t]!==e.exports&&(d?f(()=>{n[t]=e.exports}):n[t]=e.exports)})};var N=e=>R(void 0,e),oe=e=>s=>R(s,e),b=class extends g{constructor(s,t){super(s);let o=this.exports;try{C(this.component);let r=t(this.component,this),n=this.exports!==o;if(x(r)){n||this.setProvisionalExports(r);let a=r.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await a)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r)}}catchUpLifecycle(){}},R=A(b),se=(e,s)=>new y(e,s),y=class extends g{#e;#t;#o;constructor(s,t){super(),!!1&&(this.#t=s,this.#o=t,this.#e=new MutationObserver(o=>{o.forEach(r=>{s.includes(r.attributeName)&&t.call(this.component,this.component.el.getAttribute(r.attributeName),r.oldValue,r.attributeName)})}))}hostConnected(){this.#t.forEach(s=>{this.component.el.hasAttribute(s)&&this.#o.call(this.component,this.component.el.getAttribute(s),null,s)}),this.#e.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this.#t})}hostDisconnected(){this.#e.disconnect()}};var re=e=>(...s)=>{let t=m(),o=new e(...s);return u(t.at(-1)),o};var D="ltr",ne=()=>N((e,s)=>{s.exports=D,s.onLifecycle(()=>{let t=()=>{let o=w(e.el,"dir",D);s.exports=o==="rtl"?"rtl":"ltr"};return t(),O(e.el,["dir"],t)})}),ie=e=>(s={})=>N((t,o)=>{let r=L(t.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=t;o.onLifecycle(()=>_(t.el,()=>e("./assets"),({t9nLocale:c,t9nStrings:l,lang:d})=>{let p={...l,_lang:d,_t9nLocale:c,_loading:!1};o.exports=p;let h=l.componentLabel;typeof h=="string"&&"label"in t&&t.label==null&&(t.label??=h),i(a.messageOverrides)},s.name));let i=c=>{let l=o.exports,d=l._original??l,p=V(d,c);c&&(p._original=d),o.exports=p};return"messageOverrides"in a&&o.onUpdate(c=>{c.has("messageOverrides")&&i(a.messageOverrides)}),s.blocking?(o.setProvisionalExports(n,!1),o.ready):n}),V=(e,s)=>{if(!s)return e;let t={...e};return Object.entries(s).forEach(([o,r])=>{e[o]!==void 0&&(typeof r=="object"?t[o]=V(e[o],r):t[o]=r??e[o])}),t};export{N as a,oe as b,se as c,re as d,ne as e,ie as f};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{F as n,H as o,h as a,l as t}from"./KS7HVFFO.js";var m={validationContainer:"validation-container"},d=()=>{},$=({scale:e,status:s,id:r,icon:l,message:c,ref:i})=>a`<div class=${o(m.validationContainer)} ${n(i||d)}><calcite-input-message aria-live=polite .icon=${l} id=${r??t} .scale=${e} .status=${s}>${c}</calcite-input-message></div>`;export{$ as a};
2
+ import{F as n,H as o,h as a,l as t}from"./RNRXZGW3.js";var m={validationContainer:"validation-container"},d=()=>{},$=({scale:e,status:s,id:r,icon:l,message:c,ref:i})=>a`<div class=${o(m.validationContainer)} ${n(i||d)}><calcite-input-message aria-live=polite .icon=${l} id=${r??t} .scale=${e} .status=${s}>${c}</calcite-input-message></div>`;export{$ as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as I}from"./5GQC2FEW.js";import{a as R}from"./7VOJMNEL.js";import{c as y,d as B,e as w}from"./5Q4TZKGL.js";import{a as x}from"./A6BYFUAB.js";import{a as l}from"./YSDXNIIL.js";import{a as k}from"./HT2ZXCE7.js";import"./WGGFNK4Z.js";import{e as g}from"./DI6LEX3E.js";import"./62DDKSJD.js";import"./QU5FK5F6.js";import"./OAOQ5BXS.js";import{E as f,F as p,G as m,H as s,S as v,g as h,h as u,l as b,p as c}from"./KS7HVFFO.js";var C={container:"container",radio:"radio"},A=h`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px;display:flex}:host .radio{cursor:pointer;outline-color:transparent;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;border-radius:var(--calcite-radio-button-corner-radius, var(--calcite-corner-radius-pill));background-color:var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1));box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-radio-button-border-color, var(--calcite-color-brand-hover))}:host([hovered]) .radio:active,:host(:not([checked])[focused]:not([disabled])) .radio:active{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-brand-press)}:host([focused]) .radio{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([scale=s]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-md))}:host([scale=m]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-md-plus))}:host([scale=l]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-lg))}.radio{block-size:var(--calcite-internal-radio-size);inline-size:var(--calcite-internal-radio-size);size:var(--calcite-internal-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}@media(forced-colors:active){:host([checked]) .radio:after,:host([checked][disabled]) .radio:after{content:"";inline-size:var(--calcite-internal-radio-size);block-size:var(--calcite-internal-radio-size);background-color:CanvasText;display:block}}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends m{constructor(){super(),this.containerRef=f(),this.direction=g(),this.formSupport=R({inputType:"radio"})(this),this.focusSetter=k()(this),this.interactiveContainer=x(this),this.checked=!1,this.disabled=!1,this.focused=!1,this.hovered=!1,this.required=!1,this.scale="m",this.calciteInternalRadioButtonBlur=c({cancelable:!1}),this.calciteInternalRadioButtonCheckedChange=c({cancelable:!1}),this.calciteInternalRadioButtonFocus=c({cancelable:!1}),this.calciteRadioButtonChange=c({cancelable:!1}),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("click",this.clickHandler),this.listen("keydown",this.handleKeyDown)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],focused:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hovered:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=A}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}async setValidity(e,i=""){this.elementInternals.setValidity(e,i)}connectedCallback(){this.rootNode=this.el.getRootNode(),this.name&&this.checkLastRadioButton(),y(this),this.updateTabIndexOfOtherRadioButtonsInGroup(),super.connectedCallback()}willUpdate(e){this.hasUpdated&&e.has("checked")&&this.checkedChanged(this.checked),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.updateTabIndexOfOtherRadioButtonsInGroup(),e.has("name")&&this.checkLastRadioButton()}loaded(){this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){super.disconnectedCallback(),B(this),this.updateTabIndexOfOtherRadioButtonsInGroup()}checkedChanged(e){e&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}selectItem(e,i){e[i].click()}queryButtons(){return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(e=>e.name===this.name)}isFocusable(){let e=this.queryButtons(),i=e.find(a=>!a.disabled),t=e.find(a=>a.checked);return i===this.el&&!t}check(){this.disabled||(this.focused=!0,this.setFocus(),!this.checked&&(this.checked=!0,this.calciteRadioButtonChange.emit()))}clickHandler(){this.disabled||this.check()}onLabelClick(e){if(this.disabled||this.el.hidden)return;let i=e.currentTarget,t=i.for?this.rootNode.querySelector(`calcite-radio-button[id="${i.for}"]`):i.querySelector(`calcite-radio-button[name="${this.name}"]`);t&&(t.focused=!0,this.setFocus(),!t.checked&&(this.uncheckOtherRadioButtonsInGroup(),t.checked=!0,this.calciteRadioButtonChange.emit()))}checkLastRadioButton(){let i=this.queryButtons().filter(t=>t.checked);if(i?.length>1){let t=i[i.length-1];i.filter(a=>a!==t).forEach(a=>{a.checked=!1,a.emitCheckedChange()})}}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el).forEach(t=>{t.checked&&(t.checked=!1,t.focused=!1)})}updateTabIndexOfOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el&&!t.disabled).forEach(t=>{t.manager?.component.requestUpdate()})}getTabIndex(){if(!this.disabled)return this.checked||this.isFocusable()?0:-1}pointerEnterHandler(){this.disabled||(this.hovered=!0)}pointerLeaveHandler(){this.disabled||(this.hovered=!1)}handleKeyDown(e){let i=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:t}=e;if(i.indexOf(t)===-1)return;if(t===" "){this.check(),e.preventDefault();return}let a=t;this.direction==="rtl"&&(t==="ArrowRight"&&(a="ArrowLeft"),t==="ArrowLeft"&&(a="ArrowRight"));let o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(n=>n.name===this.name),r=0;switch(o.some((n,z)=>{if(n.checked)return r=z,!0}),a){case"ArrowLeft":case"ArrowUp":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,r,"left"));return;case"ArrowRight":case"ArrowDown":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,r,"right"));return;default:return}}getNextNonDisabledIndex(e,i,t){let a=e.length,o=t==="left"?-1:1,r=l(i+o,a);for(;e[r].disabled;)r=l(r+o,a);return r}onContainerBlur(){this.focused=!1,this.calciteInternalRadioButtonBlur.emit()}onContainerFocus(){this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())}render(){let e=this.getTabIndex();return this.interactiveContainer({disabled:this.disabled,children:u`<div .ariaChecked=${this.checked} .ariaLabel=${w(this)} class=${s(C.container)} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} role=radio tabindex=${e??b} ${p(this.containerRef)}><div class=${s(C.radio)}></div>${this.labelText&&I({labelText:this.labelText,spacingInlineStart:!0})||""}</div>`})}};v("calcite-radio-button",d);export{d as RadioButton};
2
+ import{a as I}from"./KRIRNHSC.js";import{a as R}from"./FOQFSSLB.js";import{c as y,d as B,e as w}from"./TGXINM27.js";import{a as x}from"./F4BSA6GV.js";import{a as l}from"./YSDXNIIL.js";import{a as k}from"./6EO6DYWC.js";import"./WGGFNK4Z.js";import{e as g}from"./ONOJ67SI.js";import"./JB775TAO.js";import"./MKRCEA57.js";import"./OAOQ5BXS.js";import{E as f,F as p,G as m,H as s,S as v,g as h,h as u,l as b,p as c}from"./RNRXZGW3.js";var C={container:"container",radio:"radio"},A=h`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px;display:flex}:host .radio{cursor:pointer;outline-color:transparent;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;border-radius:var(--calcite-radio-button-corner-radius, var(--calcite-corner-radius-pill));background-color:var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1));box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-radio-button-border-color, var(--calcite-color-brand-hover))}:host([hovered]) .radio:active,:host(:not([checked])[focused]:not([disabled])) .radio:active{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-brand-press)}:host([focused]) .radio{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([scale=s]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-md))}:host([scale=m]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-md-plus))}:host([scale=l]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-lg))}.radio{block-size:var(--calcite-internal-radio-size);inline-size:var(--calcite-internal-radio-size);size:var(--calcite-internal-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}@media(forced-colors:active){:host([checked]) .radio:after,:host([checked][disabled]) .radio:after{content:"";inline-size:var(--calcite-internal-radio-size);block-size:var(--calcite-internal-radio-size);background-color:CanvasText;display:block}}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends m{constructor(){super(),this.containerRef=f(),this.direction=g(),this.formSupport=R({inputType:"radio"})(this),this.focusSetter=k()(this),this.interactiveContainer=x(this),this.checked=!1,this.disabled=!1,this.focused=!1,this.hovered=!1,this.required=!1,this.scale="m",this.calciteInternalRadioButtonBlur=c({cancelable:!1}),this.calciteInternalRadioButtonCheckedChange=c({cancelable:!1}),this.calciteInternalRadioButtonFocus=c({cancelable:!1}),this.calciteRadioButtonChange=c({cancelable:!1}),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("click",this.clickHandler),this.listen("keydown",this.handleKeyDown)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],focused:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hovered:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=A}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}async setValidity(e,i=""){this.elementInternals.setValidity(e,i)}connectedCallback(){this.rootNode=this.el.getRootNode(),this.name&&this.checkLastRadioButton(),y(this),this.updateTabIndexOfOtherRadioButtonsInGroup(),super.connectedCallback()}willUpdate(e){this.hasUpdated&&e.has("checked")&&this.checkedChanged(this.checked),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.updateTabIndexOfOtherRadioButtonsInGroup(),e.has("name")&&this.checkLastRadioButton()}loaded(){this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){super.disconnectedCallback(),B(this),this.updateTabIndexOfOtherRadioButtonsInGroup()}checkedChanged(e){e&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}selectItem(e,i){e[i].click()}queryButtons(){return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(e=>e.name===this.name)}isFocusable(){let e=this.queryButtons(),i=e.find(a=>!a.disabled),t=e.find(a=>a.checked);return i===this.el&&!t}check(){this.disabled||(this.focused=!0,this.setFocus(),!this.checked&&(this.checked=!0,this.calciteRadioButtonChange.emit()))}clickHandler(){this.disabled||this.check()}onLabelClick(e){if(this.disabled||this.el.hidden)return;let i=e.currentTarget,t=i.for?this.rootNode.querySelector(`calcite-radio-button[id="${i.for}"]`):i.querySelector(`calcite-radio-button[name="${this.name}"]`);t&&(t.focused=!0,this.setFocus(),!t.checked&&(this.uncheckOtherRadioButtonsInGroup(),t.checked=!0,this.calciteRadioButtonChange.emit()))}checkLastRadioButton(){let i=this.queryButtons().filter(t=>t.checked);if(i?.length>1){let t=i[i.length-1];i.filter(a=>a!==t).forEach(a=>{a.checked=!1,a.emitCheckedChange()})}}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el).forEach(t=>{t.checked&&(t.checked=!1,t.focused=!1)})}updateTabIndexOfOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el&&!t.disabled).forEach(t=>{t.manager?.component.requestUpdate()})}getTabIndex(){if(!this.disabled)return this.checked||this.isFocusable()?0:-1}pointerEnterHandler(){this.disabled||(this.hovered=!0)}pointerLeaveHandler(){this.disabled||(this.hovered=!1)}handleKeyDown(e){let i=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:t}=e;if(i.indexOf(t)===-1)return;if(t===" "){this.check(),e.preventDefault();return}let a=t;this.direction==="rtl"&&(t==="ArrowRight"&&(a="ArrowLeft"),t==="ArrowLeft"&&(a="ArrowRight"));let o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(n=>n.name===this.name),r=0;switch(o.some((n,z)=>{if(n.checked)return r=z,!0}),a){case"ArrowLeft":case"ArrowUp":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,r,"left"));return;case"ArrowRight":case"ArrowDown":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,r,"right"));return;default:return}}getNextNonDisabledIndex(e,i,t){let a=e.length,o=t==="left"?-1:1,r=l(i+o,a);for(;e[r].disabled;)r=l(r+o,a);return r}onContainerBlur(){this.focused=!1,this.calciteInternalRadioButtonBlur.emit()}onContainerFocus(){this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())}render(){let e=this.getTabIndex();return this.interactiveContainer({disabled:this.disabled,children:u`<div .ariaChecked=${this.checked} .ariaLabel=${w(this)} class=${s(C.container)} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} role=radio tabindex=${e??b} ${p(this.containerRef)}><div class=${s(C.radio)}></div>${this.labelText&&I({labelText:this.labelText,spacingInlineStart:!0})||""}</div>`})}};v("calcite-radio-button",d);export{d as RadioButton};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as u}from"./A6BYFUAB.js";import{a as p}from"./HT2ZXCE7.js";import"./WGGFNK4Z.js";import"./DI6LEX3E.js";import"./62DDKSJD.js";import"./QU5FK5F6.js";import"./OAOQ5BXS.js";import{G as l,H as t,L as s,S as d,g as n,h as c,p as o}from"./KS7HVFFO.js";var r={container:"container",dividerContainer:"divider-container",divider:"divider"},h={trigger:"trigger"},e={chevronDown:"chevronDown",caretDown:"caretDown",ellipsis:"ellipsis",handleVertical:"handle-vertical"},b=n`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([kind=brand]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-brand);--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([kind=danger]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-status-danger);--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([kind=neutral]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-foreground-3);--calcite-internal-split-button-divider-color: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-inverse);--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([appearance=transparent]){--calcite-internal-split-button-divider-border-color: transparent}:host([appearance=transparent]):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand)}:host([appearance=transparent]):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-status-danger)}:host([appearance=transparent]):host([kind=neutral]){--calcite-internal-split-button-divider-color: var(--calcite-color-text-1)}:host([appearance=transparent]):host([kind=inverse]){--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline]):host([kind=danger]),:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline]):host([kind=inverse]){--calcite-internal-split-button-divider-border-color: transparent}:host([appearance=outline-fill]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-background)}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand)}:host([appearance=outline]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-status-danger)}:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=neutral]){--calcite-internal-split-button-divider-color: var(--calcite-color-border-1)}:host([appearance=outline]):host([kind=inverse]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider-color: var(--calcite-color-inverse)}.container{display:flex;align-items:stretch}.container>calcite-dropdown>calcite-button{block-size:100%;vertical-align:top}.divider-container{display:flex;inline-size:1px;align-items:stretch;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;background-color:var(--calcite-split-button-divider-color, var(--calcite-internal-split-button-divider-border-color))}.divider{margin-block:.25rem;display:inline-block;inline-size:1px;background-color:var(--calcite-split-button-divider-border-color, var(--calcite-internal-split-button-divider-color))}:host([appearance=outline-fill]) .divider-container,:host([appearance=outline]) .divider-container{border-block:1px solid var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]):hover .divider-container,:host([appearance=outline]):hover .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]:hover) .divider-container,:host([appearance=outline]:hover) .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]:focus-within):host([kind=brand]),:host([appearance=outline]:focus-within):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill]:focus-within):host([kind=danger]),:host([appearance=outline]:focus-within):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-danger-press)}:host([appearance=outline-fill]:focus-within) .divider-container,:host([appearance=outline]:focus-within) .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}calcite-button[split-child=primary],calcite-button[split-child=secondary]{--calcite-button-background-color: var(--calcite-split-button-background-color);--calcite-button-border-color: var(--calcite-split-button-border-color);--calcite-button-text-color: var(--calcite-split-button-text-color);--calcite-button-icon-color: var(--calcite-split-button-icon-color);--calcite-button-loading-color: var(--calcite-split-button-loading-color);--calcite-button-shadow: var(--calcite-split-button-shadow)}calcite-button[split-child=primary]:hover,calcite-button[split-child=secondary]:hover{--calcite-button-background-color: var(--calcite-split-button-background-color-hover)}calcite-button[split-child=primary]:focus,calcite-button[split-child=secondary]:focus{--calcite-button-background-color: var(--calcite-split-button-background-color-focus)}calcite-button[split-child=primary]:active,calcite-button[split-child=secondary]:active{--calcite-button-background-color: var(--calcite-split-button-background-color-press)}calcite-button[split-child=primary]{--calcite-button-corner-radius: var(--calcite-split-button-corner-radius) var(--calcite-corner-radius-none) var(--calcite-corner-radius-none) var(--calcite-split-button-corner-radius)}calcite-button[split-child=secondary]{--calcite-button-corner-radius: var(--calcite-corner-radius-none) var(--calcite-split-button-corner-radius) var(--calcite-split-button-corner-radius) var(--calcite-corner-radius-none)}calcite-dropdown{--calcite-dropdown-shadow: var(--calcite-split-button-dropdown-shadow);--calcite-dropdown-background-color: var(--calcite-split-button-dropdown-background-color);--calcite-dropdown-width: var(--calcite-split-button-dropdown-width)}:host([disabled]) calcite-dropdown>calcite-button{pointer-events:none}:host([disabled]):host([appearance=outline-fill]) .divider-container{background-color:var(--calcite-color-background)}:host([disabled]):host([appearance=outline]) .divider-container{background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends l{constructor(){super(...arguments),this.focusSetter=p()(this),this.interactiveContainer=u(this),this.active=!1,this.appearance="solid",this.disabled=!1,this.download=!1,this.dropdownIconType="chevron",this.kind="brand",this.loading=!1,this.overlayPositioning="absolute",this.placement="bottom-end",this.scale="m",this.topLayerDisabled=!1,this.width="auto",this.calciteSplitButtonPrimaryClick=o({cancelable:!1}),this.calciteSplitButtonSecondaryClick=o({cancelable:!1})}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:s},{reflect:!0}],dropdownIconType:[3,{},{reflect:!0}],dropdownLabel:[3,{},{reflect:!0}],flipPlacements:[0,{},{attribute:!1}],href:[3,{},{reflect:!0}],kind:[3,{},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],primaryIconEnd:[3,{type:String},{reflect:!0}],primaryIconFlipRtl:[3,{},{reflect:!0}],primaryIconStart:[3,{type:String},{reflect:!0}],primaryLabel:[3,{},{reflect:!0}],primaryText:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=b}get dropdownIcon(){return this.dropdownIconType==="chevron"?e.chevronDown:this.dropdownIconType==="caret"?e.caretDown:this.dropdownIconType==="ellipsis"?e.ellipsis:e.handleVertical}async setFocus(i){return this.focusSetter(()=>this.el,i)}calciteSplitButtonPrimaryClickHandler(){this.calciteSplitButtonPrimaryClick.emit()}calciteSplitButtonSecondaryClickHandler(){this.calciteSplitButtonSecondaryClick.emit()}render(){let i=this.width==="auto"?"auto":"full";return this.interactiveContainer({disabled:this.disabled,children:c`<div class=${t(r.container)}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .download=${this.download} .href=${this.href} .iconEnd=${this.primaryIconEnd?this.primaryIconEnd:null} .iconFlipRtl=${this.primaryIconFlipRtl?this.primaryIconFlipRtl:null} .iconStart=${this.primaryIconStart?this.primaryIconStart:null} .kind=${this.kind} .label=${this.primaryLabel} .loading=${this.loading} @click=${this.calciteSplitButtonPrimaryClickHandler} .rel=${this.rel} .scale=${this.scale} split-child=primary .target=${this.target} type=button .width=${i}>${this.primaryText}</calcite-button><div class=${t(r.dividerContainer)}><div class=${t(r.divider)}></div></div><calcite-dropdown .disabled=${this.disabled} .flipPlacements=${this.flipPlacements} @click=${this.calciteSplitButtonSecondaryClickHandler} .open=${this.active} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} .widthScale=${this.scale}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .iconStart=${this.dropdownIcon} .kind=${this.kind} .label=${this.dropdownLabel} .scale=${this.scale} slot=${h.trigger} split-child=secondary type=button></calcite-button><slot></slot></calcite-dropdown></div>`})}};d("calcite-split-button",a);export{a as SplitButton};
2
+ import{a as u}from"./F4BSA6GV.js";import{a as p}from"./6EO6DYWC.js";import"./WGGFNK4Z.js";import"./ONOJ67SI.js";import"./JB775TAO.js";import"./MKRCEA57.js";import"./OAOQ5BXS.js";import{G as l,H as t,L as s,S as d,g as n,h as c,p as o}from"./RNRXZGW3.js";var r={container:"container",dividerContainer:"divider-container",divider:"divider"},h={trigger:"trigger"},e={chevronDown:"chevronDown",caretDown:"caretDown",ellipsis:"ellipsis",handleVertical:"handle-vertical"},b=n`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([kind=brand]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-brand);--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([kind=danger]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-status-danger);--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([kind=neutral]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-foreground-3);--calcite-internal-split-button-divider-color: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-inverse);--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([appearance=transparent]){--calcite-internal-split-button-divider-border-color: transparent}:host([appearance=transparent]):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand)}:host([appearance=transparent]):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-status-danger)}:host([appearance=transparent]):host([kind=neutral]){--calcite-internal-split-button-divider-color: var(--calcite-color-text-1)}:host([appearance=transparent]):host([kind=inverse]){--calcite-internal-split-button-divider-color: var(--calcite-color-foreground-1)}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline]):host([kind=danger]),:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline]):host([kind=inverse]){--calcite-internal-split-button-divider-border-color: transparent}:host([appearance=outline-fill]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider-border-color: var(--calcite-color-background)}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand)}:host([appearance=outline]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-status-danger)}:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=neutral]){--calcite-internal-split-button-divider-color: var(--calcite-color-border-1)}:host([appearance=outline]):host([kind=inverse]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider-color: var(--calcite-color-inverse)}.container{display:flex;align-items:stretch}.container>calcite-dropdown>calcite-button{block-size:100%;vertical-align:top}.divider-container{display:flex;inline-size:1px;align-items:stretch;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;background-color:var(--calcite-split-button-divider-color, var(--calcite-internal-split-button-divider-border-color))}.divider{margin-block:.25rem;display:inline-block;inline-size:1px;background-color:var(--calcite-split-button-divider-border-color, var(--calcite-internal-split-button-divider-color))}:host([appearance=outline-fill]) .divider-container,:host([appearance=outline]) .divider-container{border-block:1px solid var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]):hover .divider-container,:host([appearance=outline]):hover .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]:hover) .divider-container,:host([appearance=outline]:hover) .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}:host([appearance=outline-fill]:focus-within):host([kind=brand]),:host([appearance=outline]:focus-within):host([kind=brand]){--calcite-internal-split-button-divider-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill]:focus-within):host([kind=danger]),:host([appearance=outline]:focus-within):host([kind=danger]){--calcite-internal-split-button-divider-color: var(--calcite-color-danger-press)}:host([appearance=outline-fill]:focus-within) .divider-container,:host([appearance=outline]:focus-within) .divider-container{background-color:var(--calcite-internal-split-button-divider-color)}calcite-button[split-child=primary],calcite-button[split-child=secondary]{--calcite-button-background-color: var(--calcite-split-button-background-color);--calcite-button-border-color: var(--calcite-split-button-border-color);--calcite-button-text-color: var(--calcite-split-button-text-color);--calcite-button-icon-color: var(--calcite-split-button-icon-color);--calcite-button-loading-color: var(--calcite-split-button-loading-color);--calcite-button-shadow: var(--calcite-split-button-shadow)}calcite-button[split-child=primary]:hover,calcite-button[split-child=secondary]:hover{--calcite-button-background-color: var(--calcite-split-button-background-color-hover)}calcite-button[split-child=primary]:focus,calcite-button[split-child=secondary]:focus{--calcite-button-background-color: var(--calcite-split-button-background-color-focus)}calcite-button[split-child=primary]:active,calcite-button[split-child=secondary]:active{--calcite-button-background-color: var(--calcite-split-button-background-color-press)}calcite-button[split-child=primary]{--calcite-button-corner-radius: var(--calcite-split-button-corner-radius) var(--calcite-corner-radius-none) var(--calcite-corner-radius-none) var(--calcite-split-button-corner-radius)}calcite-button[split-child=secondary]{--calcite-button-corner-radius: var(--calcite-corner-radius-none) var(--calcite-split-button-corner-radius) var(--calcite-split-button-corner-radius) var(--calcite-corner-radius-none)}calcite-dropdown{--calcite-dropdown-shadow: var(--calcite-split-button-dropdown-shadow);--calcite-dropdown-background-color: var(--calcite-split-button-dropdown-background-color);--calcite-dropdown-width: var(--calcite-split-button-dropdown-width)}:host([disabled]) calcite-dropdown>calcite-button{pointer-events:none}:host([disabled]):host([appearance=outline-fill]) .divider-container{background-color:var(--calcite-color-background)}:host([disabled]):host([appearance=outline]) .divider-container{background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends l{constructor(){super(...arguments),this.focusSetter=p()(this),this.interactiveContainer=u(this),this.active=!1,this.appearance="solid",this.disabled=!1,this.download=!1,this.dropdownIconType="chevron",this.kind="brand",this.loading=!1,this.overlayPositioning="absolute",this.placement="bottom-end",this.scale="m",this.topLayerDisabled=!1,this.width="auto",this.calciteSplitButtonPrimaryClick=o({cancelable:!1}),this.calciteSplitButtonSecondaryClick=o({cancelable:!1})}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:s},{reflect:!0}],dropdownIconType:[3,{},{reflect:!0}],dropdownLabel:[3,{},{reflect:!0}],flipPlacements:[0,{},{attribute:!1}],href:[3,{},{reflect:!0}],kind:[3,{},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],primaryIconEnd:[3,{type:String},{reflect:!0}],primaryIconFlipRtl:[3,{},{reflect:!0}],primaryIconStart:[3,{type:String},{reflect:!0}],primaryLabel:[3,{},{reflect:!0}],primaryText:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=b}get dropdownIcon(){return this.dropdownIconType==="chevron"?e.chevronDown:this.dropdownIconType==="caret"?e.caretDown:this.dropdownIconType==="ellipsis"?e.ellipsis:e.handleVertical}async setFocus(i){return this.focusSetter(()=>this.el,i)}calciteSplitButtonPrimaryClickHandler(){this.calciteSplitButtonPrimaryClick.emit()}calciteSplitButtonSecondaryClickHandler(){this.calciteSplitButtonSecondaryClick.emit()}render(){let i=this.width==="auto"?"auto":"full";return this.interactiveContainer({disabled:this.disabled,children:c`<div class=${t(r.container)}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .download=${this.download} .href=${this.href} .iconEnd=${this.primaryIconEnd?this.primaryIconEnd:null} .iconFlipRtl=${this.primaryIconFlipRtl?this.primaryIconFlipRtl:null} .iconStart=${this.primaryIconStart?this.primaryIconStart:null} .kind=${this.kind} .label=${this.primaryLabel} .loading=${this.loading} @click=${this.calciteSplitButtonPrimaryClickHandler} .rel=${this.rel} .scale=${this.scale} split-child=primary .target=${this.target} type=button .width=${i}>${this.primaryText}</calcite-button><div class=${t(r.dividerContainer)}><div class=${t(r.divider)}></div></div><calcite-dropdown .disabled=${this.disabled} .flipPlacements=${this.flipPlacements} @click=${this.calciteSplitButtonSecondaryClickHandler} .open=${this.active} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} .widthScale=${this.scale}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .iconStart=${this.dropdownIcon} .kind=${this.kind} .label=${this.dropdownLabel} .scale=${this.scale} slot=${h.trigger} split-child=secondary type=button></calcite-button><slot></slot></calcite-dropdown></div>`})}};d("calcite-split-button",a);export{a as SplitButton};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as Dt}from"./AP2LDRUV.js";import{N as Lt}from"./KS7HVFFO.js";var vt=["top","right","bottom","left"],Mt=["start","end"],bt=vt.reduce((t,e)=>t.concat(e,e+"-"+Mt[0],e+"-"+Mt[1]),[]),j=Math.min,V=Math.max,rt=Math.round,ct=Math.floor,F=t=>({x:t,y:t}),Re={left:"right",right:"left",bottom:"top",top:"bottom"};function ut(t,e,n){return V(t,j(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function B(t){return t.split("-")[0]}function N(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}function z(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function mt(t){return At(z(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=N(t),i=mt(t),r=dt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function kt(t){let e=st(t);return[it(t),e,it(e)]}function it(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Ft=["left","right"],Nt=["right","left"],Se=["top","bottom"],Pe=["bottom","top"];function Ce(t,e,n){switch(t){case"top":case"bottom":return n?e?Nt:Ft:e?Ft:Nt;case"left":case"right":return e?Se:Pe;default:return[]}}function Bt(t,e,n,o){let i=N(t),r=Ce(B(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(it)))),r}function st(t){let e=B(t);return Re[e]+t.slice(e.length)}function Ee(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Ee(t):{top:t,right:t,bottom:t,left:t}}function K(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,r=z(e),s=mt(e),c=dt(s),l=B(e),f=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,a;switch(l){case"top":a={x:d,y:o.y-i.height};break;case"bottom":a={x:d,y:o.y+o.height};break;case"right":a={x:o.x+o.width,y:u};break;case"left":a={x:o.x-i.width,y:u};break;default:a={x:o.x,y:o.y}}switch(N(e)){case"start":a[s]-=m*(n&&f?-1:1);break;case"end":a[s]+=m*(n&&f?-1:1);break}return a}async function _t(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:a=0}=X(e,t),g=Rt(a),w=c[m?u==="floating"?"reference":"floating":u],h=K(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(w)))==null||n?w:w.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:f,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),v=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},b=K(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(h.top-b.top+g.top)/v.y,bottom:(b.bottom-h.bottom+g.bottom)/v.y,left:(h.left-b.left+g.left)/v.x,right:(b.right-h.right+g.right)/v.x}}var Te=50,Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:_t},l=await(s.isRTL==null?void 0:s.isRTL(e)),f=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(f,o,l),m=o,a=0,g={};for(let p=0;p<r.length;p++){let w=r[p];if(!w)continue;let{name:h,fn:x}=w,{x:y,y:v,data:b,reset:A}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:g,rects:f,platform:c,elements:{reference:t,floating:e}});d=y??d,u=v??u,g[h]={...g[h],...b},A&&a<Te&&(a++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(f=A.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:d,y:u}=Wt(f,m,l)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:g}},zt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:f,padding:d=0}=X(t,e)||{};if(f==null)return{};let u=Rt(d),m={x:n,y:o},a=mt(i),g=dt(a),p=await s.getDimensions(f),w=a==="y",h=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",v=r.reference[g]+r.reference[a]-m[a]-r.floating[g],b=m[a]-r.reference[a],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f)),R=A?A[y]:0;(!R||!await(s.isElement==null?void 0:s.isElement(A)))&&(R=c.floating[y]||r.floating[g]);let $=v/2-b/2,C=R/2-p[g]/2-1,O=j(u[h],C),L=j(u[x],C),H=O,Y=R-p[g]-L,S=R/2-p[g]/2+$,q=ut(H,S,Y),_=!l.arrow&&N(i)!=null&&S!==q&&r.reference[g]/2-(S<H?O:L)-p[g]/2<0,D=_?S<H?S-H:S-Y:0;return{[a]:m[a]+D,data:{[a]:q,centerOffset:S-q-D,..._&&{alignmentOffset:D}},reset:_}}});function Le(t,e,n){return(t?[...n.filter(i=>N(i)===t),...n.filter(i=>N(i)!==t)]:n.filter(i=>B(i)===i)).filter(i=>t?N(i)===t||(e?it(i)!==i:!1):!0)}var Ut=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:f}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=bt,autoAlignment:a=!0,...g}=X(t,e),p=u!==void 0||m===bt?Le(u||null,a,m):m,w=await l.detectOverflow(e,g),h=((n=s.autoPlacement)==null?void 0:n.index)||0,x=p[h];if(x==null)return{};let y=Ot(x,r,await(l.isRTL==null?void 0:l.isRTL(f.floating)));if(c!==x)return{reset:{placement:p[0]}};let v=[w[B(x)],w[y[0]],w[y[1]]],b=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:v}],A=p[h+1];if(A)return{data:{index:h+1,overflows:b},reset:{placement:A}};let R=b.map(O=>{let L=N(O.placement);return[O.placement,L&&d?O.overflows.slice(0,2).reduce((H,Y)=>H+Y,0):O.overflows[0],O.overflows]}).sort((O,L)=>O[1]-L[1]),C=((i=R.filter(O=>O[2].slice(0,N(O[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||R[0][0];return C!==c?{data:{index:h+1,overflows:b},reset:{placement:C}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:f}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:a="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...w}=X(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let h=B(i),x=z(c),y=B(c)===c,v=await(l.isRTL==null?void 0:l.isRTL(f.floating)),b=m||(y||!p?[st(c)]:kt(c)),A=g!=="none";!m&&A&&b.push(...Bt(c,p,g,v));let R=[c,...b],$=await l.detectOverflow(e,w),C=[],O=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&C.push($[h]),u){let S=Ot(i,s,v);C.push($[S[0]],$[S[1]])}if(O=[...O,{placement:i,overflows:C}],!C.every(S=>S<=0)){var L,H;let S=(((L=r.flip)==null?void 0:L.index)||0)+1,q=R[S];if(q&&(!(u==="alignment"?x!==z(q):!1)||O.every(M=>z(M.placement)===x?M.overflows[0]>0:!0)))return{data:{index:S,overflows:O},reset:{placement:q}};let _=(H=O.filter(D=>D.overflows[0]<=0).sort((D,M)=>D.overflows[1]-M.overflows[1])[0])==null?void 0:H.placement;if(!_)switch(a){case"bestFit":{var Y;let D=(Y=O.filter(M=>{if(A){let I=z(M.placement);return I===x||I==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(I=>I>0).reduce((I,Oe)=>I+Oe,0)]).sort((M,I)=>M[1]-I[1])[0])==null?void 0:Y[0];D&&(_=D);break}case"initialPlacement":_=c;break}if(i!==_)return{reset:{placement:_}}}return{}}}};function $t(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ht(t){return vt.some(e=>t[e]>=0)}var jt=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n,platform:o}=e,{strategy:i="referenceHidden",...r}=X(t,e);switch(i){case"referenceHidden":{let s=await o.detectOverflow(e,{...r,elementContext:"reference"}),c=$t(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ht(c)}}}case"escaped":{let s=await o.detectOverflow(e,{...r,altBoundary:!0}),c=$t(s,n.floating);return{data:{escapedOffsets:c,escaped:Ht(c)}}}default:return{}}}}};var De=new Set(["left","top"]);async function Me(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=B(n),c=N(n),l=z(n)==="y",f=De.has(s)?-1:1,d=r&&l?-1:1,u=X(e,t),{mainAxis:m,crossAxis:a,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(a=c==="end"?g*-1:g),l?{x:a*d,y:m*f}:{x:m*f,y:a*d}}var Xt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Me(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Yt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i,platform:r}=e,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:h=>{let{x,y}=h;return{x,y}}},...f}=X(t,e),d={x:n,y:o},u=await r.detectOverflow(e,f),m=z(B(i)),a=At(m),g=d[a],p=d[m];if(s){let h=a==="y"?"top":"left",x=a==="y"?"bottom":"right",y=g+u[h],v=g-u[x];g=ut(y,g,v)}if(c){let h=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=p+u[h],v=p-u[x];p=ut(y,p,v)}let w=l.fn({...e,[a]:g,[m]:p});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[a]:s,[m]:c}}}}}};function gt(){return typeof window<"u"}function J(t){return Kt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function k(t){var e;return(e=(Kt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Kt(t){return gt()?t instanceof Node||t instanceof P(t).Node:!1}function E(t){return gt()?t instanceof Element||t instanceof P(t).Element:!1}function W(t){return gt()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function qt(t){return!gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}function et(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function Gt(t){return/^(table|td|th)$/.test(J(t))}function lt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Fe=/transform|translate|scale|rotate|perspective|filter/,Ne=/paint|layout|strict|content/,G=t=>!!t&&t!=="none",St;function nt(t){let e=E(t)?T(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!ht()&&(G(e.backdropFilter)||G(e.filter))||Fe.test(e.willChange||"")||Ne.test(e.contain||"")}function Jt(t){let e=U(t);for(;W(e)&&!Q(e);){if(nt(e))return e;if(lt(e))return null;e=U(e)}return null}function ht(){return St==null&&(St=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),St}function Q(t){return/^(html|body|#document)$/.test(J(t))}function T(t){return P(t).getComputedStyle(t)}function at(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function U(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||qt(t)&&t.host||k(t);return qt(e)?e.host:e}function Qt(t){let e=U(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:W(e)&&et(e)?e:Qt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Qt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=P(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}else return e.concat(i,tt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ne(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=W(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=rt(n)!==r||rt(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Ct(t){return E(t)?t:t.contextElement}function ot(t){let e=Ct(t);if(!W(e))return F(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ne(e),s=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var ke=F(0);function oe(t){let e=P(t);return!ht()||!e.visualViewport?ke:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Be(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function Z(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=Ct(t),s=F(1);e&&(o?E(o)&&(s=ot(o)):s=ot(t));let c=Be(r,n,o)?oe(r):F(0),l=(i.left+c.x)/s.x,f=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=P(r),a=o&&E(o)?P(o):o,g=m,p=pt(g);for(;p&&o&&a!==g;){let w=ot(p),h=p.getBoundingClientRect(),x=T(p),y=h.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,v=h.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,f*=w.y,d*=w.x,u*=w.y,l+=y,f+=v,g=P(p),p=pt(g)}}return K({width:d,height:u,x:l,y:f})}function wt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Z(k(t)).left+n}function ie(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function We(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=k(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},f=F(1),d=F(0),u=W(o);if((u||!u&&!r)&&((J(o)!=="body"||et(s))&&(l=at(o)),u)){let a=Z(o);f=ot(o),d.x=a.x+o.clientLeft,d.y=a.y+o.clientTop}let m=s&&!u&&!r?ie(s,l):F(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+d.x+m.x,y:n.y*f.y-l.scrollTop*f.y+d.y+m.y}}function $e(t){return Array.from(t.getClientRects())}function He(t){let e=k(t),n=at(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+wt(t),c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}var Zt=25;function _e(t,e){let n=P(t),o=k(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let d=ht();(!d||d&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}let f=wt(o);if(f<=0){let d=o.ownerDocument,u=d.body,m=getComputedStyle(u),a=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-a);g<=Zt&&(r-=g)}else f<=Zt&&(r+=f);return{width:r,height:s,x:c,y:l}}function Ve(t,e){let n=Z(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=W(t)?ot(t):F(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,f=o*r.y;return{width:s,height:c,x:l,y:f}}function te(t,e,n){let o;if(e==="viewport")o=_e(t,n);else if(e==="document")o=He(k(t));else if(E(e))o=Ve(e,n);else{let i=oe(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return K(o)}function se(t,e){let n=U(t);return n===e||!E(n)||Q(n)?!1:T(n).position==="fixed"||se(n,e)}function ze(t,e){let n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>E(c)&&J(c)!=="body"),i=null,r=T(t).position==="fixed",s=r?U(t):t;for(;E(s)&&!Q(s);){let c=T(s),l=nt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||et(s)&&!l&&se(t,s))?o=o.filter(d=>d!==s):i=c,s=U(s)}return e.set(t,o),o}function Ue(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?lt(e)?[]:ze(e,this._c):[].concat(n),o],c=te(e,s[0],i),l=c.top,f=c.right,d=c.bottom,u=c.left;for(let m=1;m<s.length;m++){let a=te(e,s[m],i);l=V(a.top,l),f=j(a.right,f),d=j(a.bottom,d),u=V(a.left,u)}return{width:f-u,height:d-l,x:u,y:l}}function Ie(t){let{width:e,height:n}=ne(t);return{width:e,height:n}}function je(t,e,n){let o=W(e),i=k(e),r=n==="fixed",s=Z(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=F(0);function f(){l.x=wt(i)}if(o||!o&&!r)if((J(e)!=="body"||et(i))&&(c=at(e)),o){let a=Z(e,!0,r,e);l.x=a.x+e.clientLeft,l.y=a.y+e.clientTop}else i&&f();r&&!o&&i&&f();let d=i&&!o&&!r?ie(i,c):F(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function Pt(t){return T(t).position==="static"}function ee(t,e){if(!W(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return k(t)===n&&(n=n.ownerDocument.body),n}function re(t,e){let n=P(t);if(lt(t))return n;if(!W(t)){let i=U(t);for(;i&&!Q(i);){if(E(i)&&!Pt(i))return i;i=U(i)}return n}let o=ee(t,e);for(;o&&Gt(o)&&Pt(o);)o=ee(o,e);return o&&Q(o)&&Pt(o)&&!nt(o)?n:o||Jt(t)||n}var Xe=async function(t){let e=this.getOffsetParent||re,n=this.getDimensions,o=await n(t.floating);return{reference:je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ye(t){return T(t).direction==="rtl"}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:We,getDocumentElement:k,getClippingRect:Ue,getOffsetParent:re,getElementRects:Xe,getClientRects:$e,getDimensions:Ie,getScale:ot,isElement:E,isRTL:Ye};function ce(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function qe(t,e){let n=null,o,i=k(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let f=t.getBoundingClientRect(),{left:d,top:u,width:m,height:a}=f;if(c||e(),!m||!a)return;let g=ct(u),p=ct(i.clientWidth-(d+m)),w=ct(i.clientHeight-(u+a)),h=ct(d),y={rootMargin:-g+"px "+-p+"px "+-w+"px "+-h+"px",threshold:V(0,j(1,l))||1},v=!0;function b(A){let R=A[0].intersectionRatio;if(R!==l){if(!v)return s();R?s(!1,R):o=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!ce(f,t.getBoundingClientRect())&&s(),v=!1}try{n=new IntersectionObserver(b,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,y)}n.observe(t)}return s(!0),r}function le(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,f=Ct(t),d=i||r?[...f?tt(f):[],...e?tt(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),r&&h.addEventListener("resize",n)});let u=f&&c?qe(f,n):null,m=-1,a=null;s&&(a=new ResizeObserver(h=>{let[x]=h;x&&x.target===f&&a&&e&&(a.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=a)==null||y.observe(e)})),n()}),f&&!l&&a.observe(f),e&&a.observe(e));let g,p=l?Z(t):null;l&&w();function w(){let h=Z(t);p&&!ce(p,h)&&n(),p=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(h=a)==null||h.disconnect(),a=null,l&&cancelAnimationFrame(g)}}var ae=Xt,fe=Ut,ue=Yt,Et=It;var de=jt,me=zt;var ge=(t,e,n)=>{let o=new Map,i={platform:xt,...n},r={...i.platform,_c:o};return Vt(t,e,{...i,platform:r})};function he(t){return Ke(t)}function Tt(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Ke(t){for(let e=t;e;e=Tt(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Tt(t);e;e=Tt(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||nt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=xt.getOffsetParent;xt.getOffsetParent=n=>e(n,he)}})();function pe(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ve=(async(t,{arrowEl:e,direction:n,flipDisabled:o,flipPlacements:i,floatingEl:r,offsetDistance:s,offsetSkidding:c,overlayPositioning:l="absolute",placement:f,referenceEl:d,type:u})=>{if(!d||!r)return;let m=n==="rtl",{x:a,y:g,placement:p,strategy:w,middlewareData:h}=await ge(d,r,{strategy:l,placement:f==="auto"||f==="auto-start"||f==="auto-end"?void 0:we(f,m),middleware:Je({placement:f,flipDisabled:o,flipPlacements:i?.map(b=>we(b,m)),offsetDistance:s,offsetSkidding:c,arrowEl:e,type:u})});if(e&&h.arrow){let{x:b,y:A}=h.arrow,R=p.split("-")[0],$=b!=null?"left":"top",C=tn[R],O={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(e.style,{...O,[$]:`${$=="left"?b:A}px`,[R]:"100%",transform:C})}let y=h.hide?.referenceHidden?"hidden":null,v=y?"none":null;r.setAttribute(Ge,p),Object.assign(r.style,{pointerEvents:v,position:w,transform:`translate(${pe(a)}px,${pe(g)}px)`,visibility:y})}),Ge="data-placement",be=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],On="bottom-start",Rn="bottom-end",Sn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Je({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[ue(),de()];return s==="menu"&&c.push(Et({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(ae({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(fe({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Et(n?{fallbackPlacements:n}:{})),r&&c.push(me({element:r})),c}function Qe(t){return be.includes(t)}function Pn(t,e){let n=t.filter(Qe);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${be.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function we(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Cn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",inset:"unset",left:"0",position:e.overlayPositioning??"absolute",top:"0"}),!ft.get(t))return Ae(t);await(n?Ze(t):ve)(t,e)}function Ze(t){let e=yt.get(t);return e||(e=Dt(ve,Lt.reposition,{edges:["leading","trailing"]}),yt.set(t,e),e)}var tn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,yt=new WeakMap;async function Ae(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=le;ft.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ft.set(t,{state:"active",cleanUp:r}),i}function en(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",left:"",pointerEvents:"",position:"",top:"",transform:"",visibility:""})}async function En(t){let{floatingEl:e,referenceEl:n}=t;if(en(t),nn(t),!(!e||!n||!t.open))return Ae(t)}function nn(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),yt.get(t)?.cancel(),yt.delete(t)}var xe=4,Tn=Math.ceil(Math.hypot(xe,xe));export{On as a,Rn as b,Sn as c,Pn as d,Cn as e,en as f,En as g,nn as h,Tn as i};
2
+ import{a as Dt}from"./AP2LDRUV.js";import{N as Lt}from"./RNRXZGW3.js";var vt=["top","right","bottom","left"],Mt=["start","end"],bt=vt.reduce((t,e)=>t.concat(e,e+"-"+Mt[0],e+"-"+Mt[1]),[]),j=Math.min,V=Math.max,rt=Math.round,ct=Math.floor,F=t=>({x:t,y:t}),Re={left:"right",right:"left",bottom:"top",top:"bottom"};function ut(t,e,n){return V(t,j(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function B(t){return t.split("-")[0]}function N(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}function z(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function mt(t){return At(z(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=N(t),i=mt(t),r=dt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function kt(t){let e=st(t);return[it(t),e,it(e)]}function it(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Ft=["left","right"],Nt=["right","left"],Se=["top","bottom"],Pe=["bottom","top"];function Ce(t,e,n){switch(t){case"top":case"bottom":return n?e?Nt:Ft:e?Ft:Nt;case"left":case"right":return e?Se:Pe;default:return[]}}function Bt(t,e,n,o){let i=N(t),r=Ce(B(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(it)))),r}function st(t){let e=B(t);return Re[e]+t.slice(e.length)}function Ee(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Ee(t):{top:t,right:t,bottom:t,left:t}}function K(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,r=z(e),s=mt(e),c=dt(s),l=B(e),f=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,a;switch(l){case"top":a={x:d,y:o.y-i.height};break;case"bottom":a={x:d,y:o.y+o.height};break;case"right":a={x:o.x+o.width,y:u};break;case"left":a={x:o.x-i.width,y:u};break;default:a={x:o.x,y:o.y}}switch(N(e)){case"start":a[s]-=m*(n&&f?-1:1);break;case"end":a[s]+=m*(n&&f?-1:1);break}return a}async function _t(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:a=0}=X(e,t),g=Rt(a),w=c[m?u==="floating"?"reference":"floating":u],h=K(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(w)))==null||n?w:w.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:f,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),v=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},b=K(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(h.top-b.top+g.top)/v.y,bottom:(b.bottom-h.bottom+g.bottom)/v.y,left:(h.left-b.left+g.left)/v.x,right:(b.right-h.right+g.right)/v.x}}var Te=50,Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:_t},l=await(s.isRTL==null?void 0:s.isRTL(e)),f=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(f,o,l),m=o,a=0,g={};for(let p=0;p<r.length;p++){let w=r[p];if(!w)continue;let{name:h,fn:x}=w,{x:y,y:v,data:b,reset:A}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:g,rects:f,platform:c,elements:{reference:t,floating:e}});d=y??d,u=v??u,g[h]={...g[h],...b},A&&a<Te&&(a++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(f=A.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:d,y:u}=Wt(f,m,l)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:g}},zt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:f,padding:d=0}=X(t,e)||{};if(f==null)return{};let u=Rt(d),m={x:n,y:o},a=mt(i),g=dt(a),p=await s.getDimensions(f),w=a==="y",h=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",v=r.reference[g]+r.reference[a]-m[a]-r.floating[g],b=m[a]-r.reference[a],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f)),R=A?A[y]:0;(!R||!await(s.isElement==null?void 0:s.isElement(A)))&&(R=c.floating[y]||r.floating[g]);let $=v/2-b/2,C=R/2-p[g]/2-1,O=j(u[h],C),L=j(u[x],C),H=O,Y=R-p[g]-L,S=R/2-p[g]/2+$,q=ut(H,S,Y),_=!l.arrow&&N(i)!=null&&S!==q&&r.reference[g]/2-(S<H?O:L)-p[g]/2<0,D=_?S<H?S-H:S-Y:0;return{[a]:m[a]+D,data:{[a]:q,centerOffset:S-q-D,..._&&{alignmentOffset:D}},reset:_}}});function Le(t,e,n){return(t?[...n.filter(i=>N(i)===t),...n.filter(i=>N(i)!==t)]:n.filter(i=>B(i)===i)).filter(i=>t?N(i)===t||(e?it(i)!==i:!1):!0)}var Ut=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:f}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=bt,autoAlignment:a=!0,...g}=X(t,e),p=u!==void 0||m===bt?Le(u||null,a,m):m,w=await l.detectOverflow(e,g),h=((n=s.autoPlacement)==null?void 0:n.index)||0,x=p[h];if(x==null)return{};let y=Ot(x,r,await(l.isRTL==null?void 0:l.isRTL(f.floating)));if(c!==x)return{reset:{placement:p[0]}};let v=[w[B(x)],w[y[0]],w[y[1]]],b=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:v}],A=p[h+1];if(A)return{data:{index:h+1,overflows:b},reset:{placement:A}};let R=b.map(O=>{let L=N(O.placement);return[O.placement,L&&d?O.overflows.slice(0,2).reduce((H,Y)=>H+Y,0):O.overflows[0],O.overflows]}).sort((O,L)=>O[1]-L[1]),C=((i=R.filter(O=>O[2].slice(0,N(O[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||R[0][0];return C!==c?{data:{index:h+1,overflows:b},reset:{placement:C}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:f}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:a="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...w}=X(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let h=B(i),x=z(c),y=B(c)===c,v=await(l.isRTL==null?void 0:l.isRTL(f.floating)),b=m||(y||!p?[st(c)]:kt(c)),A=g!=="none";!m&&A&&b.push(...Bt(c,p,g,v));let R=[c,...b],$=await l.detectOverflow(e,w),C=[],O=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&C.push($[h]),u){let S=Ot(i,s,v);C.push($[S[0]],$[S[1]])}if(O=[...O,{placement:i,overflows:C}],!C.every(S=>S<=0)){var L,H;let S=(((L=r.flip)==null?void 0:L.index)||0)+1,q=R[S];if(q&&(!(u==="alignment"?x!==z(q):!1)||O.every(M=>z(M.placement)===x?M.overflows[0]>0:!0)))return{data:{index:S,overflows:O},reset:{placement:q}};let _=(H=O.filter(D=>D.overflows[0]<=0).sort((D,M)=>D.overflows[1]-M.overflows[1])[0])==null?void 0:H.placement;if(!_)switch(a){case"bestFit":{var Y;let D=(Y=O.filter(M=>{if(A){let I=z(M.placement);return I===x||I==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(I=>I>0).reduce((I,Oe)=>I+Oe,0)]).sort((M,I)=>M[1]-I[1])[0])==null?void 0:Y[0];D&&(_=D);break}case"initialPlacement":_=c;break}if(i!==_)return{reset:{placement:_}}}return{}}}};function $t(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ht(t){return vt.some(e=>t[e]>=0)}var jt=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n,platform:o}=e,{strategy:i="referenceHidden",...r}=X(t,e);switch(i){case"referenceHidden":{let s=await o.detectOverflow(e,{...r,elementContext:"reference"}),c=$t(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ht(c)}}}case"escaped":{let s=await o.detectOverflow(e,{...r,altBoundary:!0}),c=$t(s,n.floating);return{data:{escapedOffsets:c,escaped:Ht(c)}}}default:return{}}}}};var De=new Set(["left","top"]);async function Me(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=B(n),c=N(n),l=z(n)==="y",f=De.has(s)?-1:1,d=r&&l?-1:1,u=X(e,t),{mainAxis:m,crossAxis:a,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(a=c==="end"?g*-1:g),l?{x:a*d,y:m*f}:{x:m*f,y:a*d}}var Xt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Me(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Yt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i,platform:r}=e,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:h=>{let{x,y}=h;return{x,y}}},...f}=X(t,e),d={x:n,y:o},u=await r.detectOverflow(e,f),m=z(B(i)),a=At(m),g=d[a],p=d[m];if(s){let h=a==="y"?"top":"left",x=a==="y"?"bottom":"right",y=g+u[h],v=g-u[x];g=ut(y,g,v)}if(c){let h=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=p+u[h],v=p-u[x];p=ut(y,p,v)}let w=l.fn({...e,[a]:g,[m]:p});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[a]:s,[m]:c}}}}}};function gt(){return typeof window<"u"}function J(t){return Kt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function k(t){var e;return(e=(Kt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Kt(t){return gt()?t instanceof Node||t instanceof P(t).Node:!1}function E(t){return gt()?t instanceof Element||t instanceof P(t).Element:!1}function W(t){return gt()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function qt(t){return!gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}function et(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function Gt(t){return/^(table|td|th)$/.test(J(t))}function lt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Fe=/transform|translate|scale|rotate|perspective|filter/,Ne=/paint|layout|strict|content/,G=t=>!!t&&t!=="none",St;function nt(t){let e=E(t)?T(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!ht()&&(G(e.backdropFilter)||G(e.filter))||Fe.test(e.willChange||"")||Ne.test(e.contain||"")}function Jt(t){let e=U(t);for(;W(e)&&!Q(e);){if(nt(e))return e;if(lt(e))return null;e=U(e)}return null}function ht(){return St==null&&(St=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),St}function Q(t){return/^(html|body|#document)$/.test(J(t))}function T(t){return P(t).getComputedStyle(t)}function at(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function U(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||qt(t)&&t.host||k(t);return qt(e)?e.host:e}function Qt(t){let e=U(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:W(e)&&et(e)?e:Qt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Qt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=P(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}else return e.concat(i,tt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ne(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=W(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=rt(n)!==r||rt(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Ct(t){return E(t)?t:t.contextElement}function ot(t){let e=Ct(t);if(!W(e))return F(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ne(e),s=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var ke=F(0);function oe(t){let e=P(t);return!ht()||!e.visualViewport?ke:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Be(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function Z(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=Ct(t),s=F(1);e&&(o?E(o)&&(s=ot(o)):s=ot(t));let c=Be(r,n,o)?oe(r):F(0),l=(i.left+c.x)/s.x,f=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=P(r),a=o&&E(o)?P(o):o,g=m,p=pt(g);for(;p&&o&&a!==g;){let w=ot(p),h=p.getBoundingClientRect(),x=T(p),y=h.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,v=h.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,f*=w.y,d*=w.x,u*=w.y,l+=y,f+=v,g=P(p),p=pt(g)}}return K({width:d,height:u,x:l,y:f})}function wt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Z(k(t)).left+n}function ie(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function We(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=k(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},f=F(1),d=F(0),u=W(o);if((u||!u&&!r)&&((J(o)!=="body"||et(s))&&(l=at(o)),u)){let a=Z(o);f=ot(o),d.x=a.x+o.clientLeft,d.y=a.y+o.clientTop}let m=s&&!u&&!r?ie(s,l):F(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+d.x+m.x,y:n.y*f.y-l.scrollTop*f.y+d.y+m.y}}function $e(t){return Array.from(t.getClientRects())}function He(t){let e=k(t),n=at(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+wt(t),c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}var Zt=25;function _e(t,e){let n=P(t),o=k(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let d=ht();(!d||d&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}let f=wt(o);if(f<=0){let d=o.ownerDocument,u=d.body,m=getComputedStyle(u),a=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-a);g<=Zt&&(r-=g)}else f<=Zt&&(r+=f);return{width:r,height:s,x:c,y:l}}function Ve(t,e){let n=Z(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=W(t)?ot(t):F(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,f=o*r.y;return{width:s,height:c,x:l,y:f}}function te(t,e,n){let o;if(e==="viewport")o=_e(t,n);else if(e==="document")o=He(k(t));else if(E(e))o=Ve(e,n);else{let i=oe(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return K(o)}function se(t,e){let n=U(t);return n===e||!E(n)||Q(n)?!1:T(n).position==="fixed"||se(n,e)}function ze(t,e){let n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>E(c)&&J(c)!=="body"),i=null,r=T(t).position==="fixed",s=r?U(t):t;for(;E(s)&&!Q(s);){let c=T(s),l=nt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||et(s)&&!l&&se(t,s))?o=o.filter(d=>d!==s):i=c,s=U(s)}return e.set(t,o),o}function Ue(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?lt(e)?[]:ze(e,this._c):[].concat(n),o],c=te(e,s[0],i),l=c.top,f=c.right,d=c.bottom,u=c.left;for(let m=1;m<s.length;m++){let a=te(e,s[m],i);l=V(a.top,l),f=j(a.right,f),d=j(a.bottom,d),u=V(a.left,u)}return{width:f-u,height:d-l,x:u,y:l}}function Ie(t){let{width:e,height:n}=ne(t);return{width:e,height:n}}function je(t,e,n){let o=W(e),i=k(e),r=n==="fixed",s=Z(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=F(0);function f(){l.x=wt(i)}if(o||!o&&!r)if((J(e)!=="body"||et(i))&&(c=at(e)),o){let a=Z(e,!0,r,e);l.x=a.x+e.clientLeft,l.y=a.y+e.clientTop}else i&&f();r&&!o&&i&&f();let d=i&&!o&&!r?ie(i,c):F(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function Pt(t){return T(t).position==="static"}function ee(t,e){if(!W(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return k(t)===n&&(n=n.ownerDocument.body),n}function re(t,e){let n=P(t);if(lt(t))return n;if(!W(t)){let i=U(t);for(;i&&!Q(i);){if(E(i)&&!Pt(i))return i;i=U(i)}return n}let o=ee(t,e);for(;o&&Gt(o)&&Pt(o);)o=ee(o,e);return o&&Q(o)&&Pt(o)&&!nt(o)?n:o||Jt(t)||n}var Xe=async function(t){let e=this.getOffsetParent||re,n=this.getDimensions,o=await n(t.floating);return{reference:je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ye(t){return T(t).direction==="rtl"}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:We,getDocumentElement:k,getClippingRect:Ue,getOffsetParent:re,getElementRects:Xe,getClientRects:$e,getDimensions:Ie,getScale:ot,isElement:E,isRTL:Ye};function ce(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function qe(t,e){let n=null,o,i=k(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let f=t.getBoundingClientRect(),{left:d,top:u,width:m,height:a}=f;if(c||e(),!m||!a)return;let g=ct(u),p=ct(i.clientWidth-(d+m)),w=ct(i.clientHeight-(u+a)),h=ct(d),y={rootMargin:-g+"px "+-p+"px "+-w+"px "+-h+"px",threshold:V(0,j(1,l))||1},v=!0;function b(A){let R=A[0].intersectionRatio;if(R!==l){if(!v)return s();R?s(!1,R):o=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!ce(f,t.getBoundingClientRect())&&s(),v=!1}try{n=new IntersectionObserver(b,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,y)}n.observe(t)}return s(!0),r}function le(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,f=Ct(t),d=i||r?[...f?tt(f):[],...e?tt(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),r&&h.addEventListener("resize",n)});let u=f&&c?qe(f,n):null,m=-1,a=null;s&&(a=new ResizeObserver(h=>{let[x]=h;x&&x.target===f&&a&&e&&(a.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=a)==null||y.observe(e)})),n()}),f&&!l&&a.observe(f),e&&a.observe(e));let g,p=l?Z(t):null;l&&w();function w(){let h=Z(t);p&&!ce(p,h)&&n(),p=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(h=a)==null||h.disconnect(),a=null,l&&cancelAnimationFrame(g)}}var ae=Xt,fe=Ut,ue=Yt,Et=It;var de=jt,me=zt;var ge=(t,e,n)=>{let o=new Map,i={platform:xt,...n},r={...i.platform,_c:o};return Vt(t,e,{...i,platform:r})};function he(t){return Ke(t)}function Tt(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Ke(t){for(let e=t;e;e=Tt(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Tt(t);e;e=Tt(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||nt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=xt.getOffsetParent;xt.getOffsetParent=n=>e(n,he)}})();function pe(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ve=(async(t,{arrowEl:e,direction:n,flipDisabled:o,flipPlacements:i,floatingEl:r,offsetDistance:s,offsetSkidding:c,overlayPositioning:l="absolute",placement:f,referenceEl:d,type:u})=>{if(!d||!r)return;let m=n==="rtl",{x:a,y:g,placement:p,strategy:w,middlewareData:h}=await ge(d,r,{strategy:l,placement:f==="auto"||f==="auto-start"||f==="auto-end"?void 0:we(f,m),middleware:Je({placement:f,flipDisabled:o,flipPlacements:i?.map(b=>we(b,m)),offsetDistance:s,offsetSkidding:c,arrowEl:e,type:u})});if(e&&h.arrow){let{x:b,y:A}=h.arrow,R=p.split("-")[0],$=b!=null?"left":"top",C=tn[R],O={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(e.style,{...O,[$]:`${$=="left"?b:A}px`,[R]:"100%",transform:C})}let y=h.hide?.referenceHidden?"hidden":null,v=y?"none":null;r.setAttribute(Ge,p),Object.assign(r.style,{pointerEvents:v,position:w,transform:`translate(${pe(a)}px,${pe(g)}px)`,visibility:y})}),Ge="data-placement",be=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],On="bottom-start",Rn="bottom-end",Sn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Je({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[ue(),de()];return s==="menu"&&c.push(Et({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(ae({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(fe({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Et(n?{fallbackPlacements:n}:{})),r&&c.push(me({element:r})),c}function Qe(t){return be.includes(t)}function Pn(t,e){let n=t.filter(Qe);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${be.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function we(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Cn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",inset:"unset",left:"0",position:e.overlayPositioning??"absolute",top:"0"}),!ft.get(t))return Ae(t);await(n?Ze(t):ve)(t,e)}function Ze(t){let e=yt.get(t);return e||(e=Dt(ve,Lt.reposition,{edges:["leading","trailing"]}),yt.set(t,e),e)}var tn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,yt=new WeakMap;async function Ae(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=le;ft.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ft.set(t,{state:"active",cleanUp:r}),i}function en(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",left:"",pointerEvents:"",position:"",top:"",transform:"",visibility:""})}async function En(t){let{floatingEl:e,referenceEl:n}=t;if(en(t),nn(t),!(!e||!n||!t.open))return Ae(t)}function nn(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),yt.get(t)?.cancel(),yt.delete(t)}var xe=4,Tn=Math.ceil(Math.hypot(xe,xe));export{On as a,Rn as b,Sn as c,Pn as d,Cn as e,en as f,En as g,nn as h,Tn as i};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as I,t as g}from"./DSQ47C3C.js";import"./CUJ2U3RS.js";import{a as k}from"./A6BYFUAB.js";import{a as C}from"./5UL5W56B.js";import{a as z}from"./HT2ZXCE7.js";import"./WGGFNK4Z.js";import"./DI6LEX3E.js";import"./62DDKSJD.js";import{t as x}from"./QU5FK5F6.js";import"./OAOQ5BXS.js";import{E as S,F as $,G as b,H as s,S as y,g as m,h as l,i as o,l as i,p as d}from"./KS7HVFFO.js";var t={imageContainer:"image-container",container:"container",selectable:"selectable",nonInteractive:"non-interactive",selected:"selected",internalSvgContainer:"internal-svg-container",internalSvgDisabled:"internal-svg-disabled",internalSvgEmpty:"internal-svg-empty",swatch:"swatch",checker:"checker",noColorSwatch:"swatch--no-color"},D={image:"image"},E=4,n={squareSize:E,size:E*2},w={checker:"checker",shape:"shape",swatchRect:"swatch-rect",swatchSolid:"swatch-solid",swatchTransparent:"swatch-transparent"},P=m`:host{display:block;--calcite-internal-swatch-inset: var(--calcite-spacing-xxs)}:host([scale=s]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xl)}:host([scale=m]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxl)}:host([scale=l]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxxl)}.container{position:relative;box-sizing:border-box;justify-content:center;overflow:hidden;outline-color:transparent;font-size:var(--calcite-internal-swatch-font-size, var(--calcite-font-size));block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}.container:not(.non-interactive):hover{cursor:pointer;box-shadow:0 0 0 var(--calcite-border-width-md) var(--calcite-color-border-1)}.container.selectable{cursor:pointer}.container:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.swatch{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 1);block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}:host([selected]) .swatch{inset:var(--calcite-internal-swatch-inset);block-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));min-inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset))}:host([selected]) .container{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-text-1),inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-color-foreground-1)}:host([selected]) .image-container{inset:var(--calcite-internal-swatch-inset)}.image-container{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 2);inset:var(--calcite-spacing-px);display:flex;align-items:center;justify-content:center;pointer-events:none;border-radius:var(--calcite-swatch-corner-radius, 0)}.internal-svg-container{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:calc(var(--calcite-z-index) + 2)}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch--no-color rect{fill:var(--calcite-color-foreground-1)}:host([selected]) #swatch-rect,:host([selected]) #swatch-solid,:host([selected]) #swatch-transparent{stroke-width:0}#swatch-rect,#swatch-solid,#swatch-transparent{stroke:var(--calcite-color-text-1);stroke-width:var(--calcite-border-width-md);stroke-opacity:.3;rx:var(--calcite-swatch-corner-radius)}.internal-svg-disabled{stroke:#6a6a6a;fill:#fff}.internal-svg-empty{stroke:var(--calcite-color-status-danger);stroke-width:3}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends b{constructor(){super(),this.containerRef=S(),this.focusSetter=z()(this),this.interactiveContainer=k(this),this.hasImage=!1,this.disabled=!1,this.interactive=!1,this.scale="m",this.selected=!1,this.selectionMode="none",this.calciteInternalSwatchKeyEvent=d({cancelable:!1}),this.calciteInternalSwatchSelect=d({cancelable:!1}),this.calciteInternalSyncSelectedSwatches=d({cancelable:!1}),this.calciteSwatchSelect=d({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasImage:[16,{},{state:!0}],color:1,disabled:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],label:1,parentSwatchGroup:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,value:1}}static{this.styles=P}async setFocus(e){return this.focusSetter(()=>this.el,e)}async load(){this.handleColorChange(this.color)}willUpdate(e){e.has("selected")&&this.hasUpdated&&this.watchSelected(this.selected),e.has("color")&&this.handleColorChange(this.color)}loaded(){this.selectionMode!=="none"&&this.interactive&&this.selected&&this.handleSelectionPropertyChange(this.selected)}watchSelected(e){this.selectionMode!=="none"&&this.handleSelectionPropertyChange(e)}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleEmittingEvent(),e.preventDefault();break;case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalSwatchKeyEvent.emit(e),e.preventDefault();break}}handleSlotImageChange(e){this.hasImage=x(e)}handleEmittingEvent(){this.interactive&&this.calciteSwatchSelect.emit()}handleSelectionPropertyChange(e){this.selectionMode==="single"&&this.calciteInternalSyncSelectedSwatches.emit(),!this.parentSwatchGroup.selectedItems.includes(this.el)&&e&&this.selectionMode!=="multiple"&&this.calciteInternalSwatchSelect.emit(),this.selectionMode!=="single"&&this.calciteInternalSyncSelectedSwatches.emit()}handleColorChange(e){this.internalColor=e?I(e):null}renderSwatchImage(){return l`<div class=${s(t.imageContainer)}><slot name=${D.image} @slotchange=${this.handleSlotImageChange}></slot></div>`}renderEmptyDisplay(){let e=this.scale==="s"?"12":this.scale==="m"?"16":"20";return l`<div class=${s(t.internalSvgContainer)}><svg fill=none height=${e??i} viewBox=${`0 0 ${e} ${e}`} width=${e??i} xmlns=http://www.w3.org/2000/svg>${o`<path class=${s(t.internalSvgEmpty)} d=${`M${e} 0L0 ${e}`} />`}</svg></div>`}renderDisabledDisplay(){let e=l`<svg fill=none height=14 viewBox="0 0 14 14" width=14 xmlns=http://www.w3.org/2000/svg>${o`<path class=${s(t.internalSvgDisabled)} d="M7 0.5C10.5899 0.5 13.5 3.41015 13.5 7C13.5 10.5899 10.5899 13.5 7 13.5C3.41015 13.5 0.5 10.5899 0.5 7C0.5 3.41015 3.41015 0.5 7 0.5ZM4.78906 10.917C5.44221 11.2866 6.19529 11.5 7 11.5C9.48528 11.5 11.5 9.48528 11.5 7C11.5 6.19529 11.2866 5.44221 10.917 4.78906L4.78906 10.917ZM7 2.5C4.51472 2.5 2.5 4.51472 2.5 7C2.5 7.95644 2.79808 8.84235 3.30664 9.57129L9.57129 3.30664C8.84235 2.79808 7.95644 2.5 7 2.5Z" />`}</svg>`,a=l`<svg fill=none height=18 viewBox="0 0 18 18" width=18 xmlns=http://www.w3.org/2000/svg>${o`<path class=${s(t.internalSvgDisabled)} d="M9 0.5C13.6944 0.5 17.5 4.30558 17.5 9C17.5 13.6944 13.6944 17.5 9 17.5C4.30558 17.5 0.5 13.6944 0.5 9C0.5 4.30558 4.30558 0.5 9 0.5ZM5.78125 14.2588C6.71828 14.8337 7.81941 15.167 9 15.167C12.4058 15.167 15.167 12.4058 15.167 9C15.167 7.81941 14.8337 6.71828 14.2588 5.78125L5.78125 14.2588ZM9 2.83301C5.59424 2.83301 2.83301 5.59424 2.83301 9C2.83301 10.3817 3.28731 11.6565 4.05469 12.6846L12.6846 4.05469C11.6565 3.28731 10.3817 2.83301 9 2.83301Z" />`}</svg>`;return l`<div class=${s(t.internalSvgContainer)}>${this.scale==="l"?a:e}</div>`}renderSwatch(){let{internalColor:e}=this,a="0",h=!e,c={height:"100%",rx:a,width:"100%"};if(h)return o`<clipPath id=${w.shape}><rect height=100% rx=${a} width=100% /></clipPath>${this.renderSwatchRect({clipPath:`inset(0 round "${a}")`,...c})}<line clip-path=url(#shape) x1=100% x2=0 y1=0 y2=100% />`;let r=e.alpha(),v=g(e),p=g(e,r<1);return o`<defs><pattern height=${n.size} id=${w.checker} patternUnits=userSpaceOnUse width=${n.size} x=0 y=0><rect class=${s(t.checker)} height=${n.squareSize} width=${n.squareSize} x=0 y=0 /><rect class=${s(t.checker)} height=${n.squareSize} width=${n.squareSize} x=${n.squareSize} y=${n.squareSize} /></pattern></defs>${this.renderSwatchRect({fill:"url(#checker)",rx:c.rx,height:c.height,width:c.width})}${this.renderSwatchRect({clipPath:r<1?"polygon(100% 0, 0 0, 0 100%)":`inset(0 round "${a}")`,fill:v,id:w.swatchSolid,...c})}${r<1?this.renderSwatchRect({clipPath:"polygon(100% 0, 100% 100%, 0 100%)",fill:p,id:w.swatchTransparent,key:"opacity-fill",...c}):null}`}renderSwatchRect({clipPath:e,fill:a,height:h,key:c,rx:r,stroke:v,strokeWidth:p,width:M,id:f}){return C(c,o`<rect clip-path=${e??i} fill=${a??i} height=${h??i} id=${(f||w.swatchRect)??i} rx=${r??i} stroke=${v??i} stroke-width=${p??i} width=${M??i} />`)}render(){let{disabled:e}=this,a=e||!e&&!this.interactive,h=this.selectionMode==="multiple"&&this.interactive?"checkbox":this.selectionMode!=="none"&&this.interactive?"radio":this.interactive?"button":"presentation",c=!this.internalColor,r={[t.swatch]:!0,[t.noColorSwatch]:c||this.hasImage&&!this.internalColor};return this.interactiveContainer({disabled:e,children:l`<div .ariaChecked=${this.selectionMode!=="none"&&this.interactive?this.selected:void 0} .ariaLabel=${h!=="presentation"?this.label:""} class=${s({[t.container]:!0,[t.selectable]:this.selectionMode!=="none",[t.selected]:this.selected,[t.nonInteractive]:!this.interactive})} @click=${this.handleEmittingEvent} .role=${h} .tabIndex=${a?-1:0} title=${this.label??i} ${$(this.containerRef)}>${this.renderSwatchImage()}${!this.internalColor&&!this.hasImage&&this.renderEmptyDisplay()||""}${this.disabled&&this.renderDisabledDisplay()||""}<svg class=${s(r)} role=presentation xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg></div>`})}};y("calcite-swatch",u);export{u as Swatch};
2
+ import{a as I,t as g}from"./DSQ47C3C.js";import"./CUJ2U3RS.js";import{a as k}from"./F4BSA6GV.js";import{a as C}from"./VY5SOQAQ.js";import{a as z}from"./6EO6DYWC.js";import"./WGGFNK4Z.js";import"./ONOJ67SI.js";import"./JB775TAO.js";import{t as x}from"./MKRCEA57.js";import"./OAOQ5BXS.js";import{E as S,F as $,G as b,H as s,S as y,g as m,h as l,i as o,l as i,p as d}from"./RNRXZGW3.js";var t={imageContainer:"image-container",container:"container",selectable:"selectable",nonInteractive:"non-interactive",selected:"selected",internalSvgContainer:"internal-svg-container",internalSvgDisabled:"internal-svg-disabled",internalSvgEmpty:"internal-svg-empty",swatch:"swatch",checker:"checker",noColorSwatch:"swatch--no-color"},D={image:"image"},E=4,n={squareSize:E,size:E*2},w={checker:"checker",shape:"shape",swatchRect:"swatch-rect",swatchSolid:"swatch-solid",swatchTransparent:"swatch-transparent"},P=m`:host{display:block;--calcite-internal-swatch-inset: var(--calcite-spacing-xxs)}:host([scale=s]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xl)}:host([scale=m]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxl)}:host([scale=l]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxxl)}.container{position:relative;box-sizing:border-box;justify-content:center;overflow:hidden;outline-color:transparent;font-size:var(--calcite-internal-swatch-font-size, var(--calcite-font-size));block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}.container:not(.non-interactive):hover{cursor:pointer;box-shadow:0 0 0 var(--calcite-border-width-md) var(--calcite-color-border-1)}.container.selectable{cursor:pointer}.container:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.swatch{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 1);block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}:host([selected]) .swatch{inset:var(--calcite-internal-swatch-inset);block-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));min-inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset))}:host([selected]) .container{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-text-1),inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-color-foreground-1)}:host([selected]) .image-container{inset:var(--calcite-internal-swatch-inset)}.image-container{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 2);inset:var(--calcite-spacing-px);display:flex;align-items:center;justify-content:center;pointer-events:none;border-radius:var(--calcite-swatch-corner-radius, 0)}.internal-svg-container{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:calc(var(--calcite-z-index) + 2)}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch--no-color rect{fill:var(--calcite-color-foreground-1)}:host([selected]) #swatch-rect,:host([selected]) #swatch-solid,:host([selected]) #swatch-transparent{stroke-width:0}#swatch-rect,#swatch-solid,#swatch-transparent{stroke:var(--calcite-color-text-1);stroke-width:var(--calcite-border-width-md);stroke-opacity:.3;rx:var(--calcite-swatch-corner-radius)}.internal-svg-disabled{stroke:#6a6a6a;fill:#fff}.internal-svg-empty{stroke:var(--calcite-color-status-danger);stroke-width:3}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends b{constructor(){super(),this.containerRef=S(),this.focusSetter=z()(this),this.interactiveContainer=k(this),this.hasImage=!1,this.disabled=!1,this.interactive=!1,this.scale="m",this.selected=!1,this.selectionMode="none",this.calciteInternalSwatchKeyEvent=d({cancelable:!1}),this.calciteInternalSwatchSelect=d({cancelable:!1}),this.calciteInternalSyncSelectedSwatches=d({cancelable:!1}),this.calciteSwatchSelect=d({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasImage:[16,{},{state:!0}],color:1,disabled:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],label:1,parentSwatchGroup:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,value:1}}static{this.styles=P}async setFocus(e){return this.focusSetter(()=>this.el,e)}async load(){this.handleColorChange(this.color)}willUpdate(e){e.has("selected")&&this.hasUpdated&&this.watchSelected(this.selected),e.has("color")&&this.handleColorChange(this.color)}loaded(){this.selectionMode!=="none"&&this.interactive&&this.selected&&this.handleSelectionPropertyChange(this.selected)}watchSelected(e){this.selectionMode!=="none"&&this.handleSelectionPropertyChange(e)}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleEmittingEvent(),e.preventDefault();break;case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalSwatchKeyEvent.emit(e),e.preventDefault();break}}handleSlotImageChange(e){this.hasImage=x(e)}handleEmittingEvent(){this.interactive&&this.calciteSwatchSelect.emit()}handleSelectionPropertyChange(e){this.selectionMode==="single"&&this.calciteInternalSyncSelectedSwatches.emit(),!this.parentSwatchGroup.selectedItems.includes(this.el)&&e&&this.selectionMode!=="multiple"&&this.calciteInternalSwatchSelect.emit(),this.selectionMode!=="single"&&this.calciteInternalSyncSelectedSwatches.emit()}handleColorChange(e){this.internalColor=e?I(e):null}renderSwatchImage(){return l`<div class=${s(t.imageContainer)}><slot name=${D.image} @slotchange=${this.handleSlotImageChange}></slot></div>`}renderEmptyDisplay(){let e=this.scale==="s"?"12":this.scale==="m"?"16":"20";return l`<div class=${s(t.internalSvgContainer)}><svg fill=none height=${e??i} viewBox=${`0 0 ${e} ${e}`} width=${e??i} xmlns=http://www.w3.org/2000/svg>${o`<path class=${s(t.internalSvgEmpty)} d=${`M${e} 0L0 ${e}`} />`}</svg></div>`}renderDisabledDisplay(){let e=l`<svg fill=none height=14 viewBox="0 0 14 14" width=14 xmlns=http://www.w3.org/2000/svg>${o`<path class=${s(t.internalSvgDisabled)} d="M7 0.5C10.5899 0.5 13.5 3.41015 13.5 7C13.5 10.5899 10.5899 13.5 7 13.5C3.41015 13.5 0.5 10.5899 0.5 7C0.5 3.41015 3.41015 0.5 7 0.5ZM4.78906 10.917C5.44221 11.2866 6.19529 11.5 7 11.5C9.48528 11.5 11.5 9.48528 11.5 7C11.5 6.19529 11.2866 5.44221 10.917 4.78906L4.78906 10.917ZM7 2.5C4.51472 2.5 2.5 4.51472 2.5 7C2.5 7.95644 2.79808 8.84235 3.30664 9.57129L9.57129 3.30664C8.84235 2.79808 7.95644 2.5 7 2.5Z" />`}</svg>`,a=l`<svg fill=none height=18 viewBox="0 0 18 18" width=18 xmlns=http://www.w3.org/2000/svg>${o`<path class=${s(t.internalSvgDisabled)} d="M9 0.5C13.6944 0.5 17.5 4.30558 17.5 9C17.5 13.6944 13.6944 17.5 9 17.5C4.30558 17.5 0.5 13.6944 0.5 9C0.5 4.30558 4.30558 0.5 9 0.5ZM5.78125 14.2588C6.71828 14.8337 7.81941 15.167 9 15.167C12.4058 15.167 15.167 12.4058 15.167 9C15.167 7.81941 14.8337 6.71828 14.2588 5.78125L5.78125 14.2588ZM9 2.83301C5.59424 2.83301 2.83301 5.59424 2.83301 9C2.83301 10.3817 3.28731 11.6565 4.05469 12.6846L12.6846 4.05469C11.6565 3.28731 10.3817 2.83301 9 2.83301Z" />`}</svg>`;return l`<div class=${s(t.internalSvgContainer)}>${this.scale==="l"?a:e}</div>`}renderSwatch(){let{internalColor:e}=this,a="0",h=!e,c={height:"100%",rx:a,width:"100%"};if(h)return o`<clipPath id=${w.shape}><rect height=100% rx=${a} width=100% /></clipPath>${this.renderSwatchRect({clipPath:`inset(0 round "${a}")`,...c})}<line clip-path=url(#shape) x1=100% x2=0 y1=0 y2=100% />`;let r=e.alpha(),v=g(e),p=g(e,r<1);return o`<defs><pattern height=${n.size} id=${w.checker} patternUnits=userSpaceOnUse width=${n.size} x=0 y=0><rect class=${s(t.checker)} height=${n.squareSize} width=${n.squareSize} x=0 y=0 /><rect class=${s(t.checker)} height=${n.squareSize} width=${n.squareSize} x=${n.squareSize} y=${n.squareSize} /></pattern></defs>${this.renderSwatchRect({fill:"url(#checker)",rx:c.rx,height:c.height,width:c.width})}${this.renderSwatchRect({clipPath:r<1?"polygon(100% 0, 0 0, 0 100%)":`inset(0 round "${a}")`,fill:v,id:w.swatchSolid,...c})}${r<1?this.renderSwatchRect({clipPath:"polygon(100% 0, 100% 100%, 0 100%)",fill:p,id:w.swatchTransparent,key:"opacity-fill",...c}):null}`}renderSwatchRect({clipPath:e,fill:a,height:h,key:c,rx:r,stroke:v,strokeWidth:p,width:M,id:f}){return C(c,o`<rect clip-path=${e??i} fill=${a??i} height=${h??i} id=${(f||w.swatchRect)??i} rx=${r??i} stroke=${v??i} stroke-width=${p??i} width=${M??i} />`)}render(){let{disabled:e}=this,a=e||!e&&!this.interactive,h=this.selectionMode==="multiple"&&this.interactive?"checkbox":this.selectionMode!=="none"&&this.interactive?"radio":this.interactive?"button":"presentation",c=!this.internalColor,r={[t.swatch]:!0,[t.noColorSwatch]:c||this.hasImage&&!this.internalColor};return this.interactiveContainer({disabled:e,children:l`<div .ariaChecked=${this.selectionMode!=="none"&&this.interactive?this.selected:void 0} .ariaLabel=${h!=="presentation"?this.label:""} class=${s({[t.container]:!0,[t.selectable]:this.selectionMode!=="none",[t.selected]:this.selected,[t.nonInteractive]:!this.interactive})} @click=${this.handleEmittingEvent} .role=${h} .tabIndex=${a?-1:0} title=${this.label??i} ${$(this.containerRef)}>${this.renderSwatchImage()}${!this.internalColor&&!this.hasImage&&this.renderEmptyDisplay()||""}${this.disabled&&this.renderDisabledDisplay()||""}<svg class=${s(r)} role=presentation xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg></div>`})}};y("calcite-swatch",u);export{u as Swatch};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as y}from"./A6BYFUAB.js";import{a as x}from"./CEYBZFIQ.js";import{a as v}from"./GQFV4HZP.js";import{a as g}from"./HT2ZXCE7.js";import"./WGGFNK4Z.js";import"./DI6LEX3E.js";import"./62DDKSJD.js";import"./QU5FK5F6.js";import"./OAOQ5BXS.js";import{E as u,F as b,G as p,H as f,S as m,g as d,h,l as s,p as l}from"./KS7HVFFO.js";var S={handle:"handle",handleSelected:"handle--selected"},k={drag:"drag"},i={itemLabel:"{itemLabel}",position:"{position}",total:"{total}"},C=d`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.handle{display:flex;align-items:center;justify-content:center;align-self:stretch;border-style:none;outline-color:transparent;color:var(--calcite-handle-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-handle-background-color, transparent);padding-block:.75rem;padding-inline:.25rem;line-height:0}.handle calcite-icon{color:inherit}:host(:not([disabled])) .handle{cursor:move}:host(:not([disabled])) .handle:hover{color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-hover, var(--calcite-color-foreground-2))}:host(:not([disabled])) .handle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1))}:host(:not([disabled])) .handle--selected{color:var(--calcite-handle-icon-color-selected, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-selected, var(--calcite-color-foreground-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,o=class extends p{constructor(){super(...arguments),this.handleButtonRef=u(),this.messages=v({blocking:!0}),this.focusSetter=g()(this),this.interactiveContainer=y(this),this.blurUnselectDisabled=!1,this.disabled=!1,this.selected=!1,this.calciteHandleChange=l({cancelable:!1}),this.calciteHandleNudge=l({cancelable:!1}),this.calciteInternalAssistiveTextChange=l({cancelable:!1})}static{this.properties={blurUnselectDisabled:[5,{},{type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],selected:[7,{},{reflect:!0,type:Boolean}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}]}}static{this.styles=C}async setFocus(e){return this.focusSetter(()=>this.handleButtonRef.value,e)}willUpdate(e){(e.has("messages")||e.has("label")||e.has("selected")&&(this.hasUpdated||this.selected!==!1)||e.has("setPosition")||e.has("setSize"))&&this.handleAriaTextChange()}loaded(){x.deprecated("component",{component:this,name:"handle",removalVersion:5,suggested:"sort-handle"})}handleAriaTextChange(){let e=this.getAriaText("live");e&&this.calciteInternalAssistiveTextChange.emit({message:e})}getTooltip(){let{label:e,messages:t}=this;return t?e?t.dragHandle.replace(i.itemLabel,e):t.dragHandleUntitled:""}getAriaText(e){let{setPosition:t,setSize:r,label:c,messages:a,selected:n}=this;return!a||!c||typeof r!="number"||typeof t!="number"?null:(e==="label"?n?a.dragHandleChange:a.dragHandleIdle:n?a.dragHandleActive:a.dragHandleCommit).replace(i.position,t.toString()).replace(i.itemLabel,c).replace(i.total,r.toString())}handleKeyDown(e){if(!this.disabled)switch(e.key){case" ":this.selected=!this.selected,this.calciteHandleChange.emit(),e.preventDefault();break;case"ArrowUp":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"up"});break;case"ArrowDown":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"down"});break}}handleBlur(){this.blurUnselectDisabled||this.disabled||this.selected&&(this.selected=!1,this.calciteHandleChange.emit())}render(){return this.interactiveContainer({disabled:this.disabled,children:h`<span .ariaChecked=${this.disabled?null:this.selected} .ariaDisabled=${this.disabled?this.disabled:null} .ariaLabel=${this.disabled?null:this.getAriaText("label")} class=${f({[S.handle]:!0,[S.handleSelected]:!this.disabled&&this.selected})} @blur=${this.handleBlur} @keydown=${this.handleKeyDown} role=radio tabindex=${(this.disabled?null:0)??s} title=${this.getTooltip()??s} ${b(this.handleButtonRef)}><calcite-icon .icon=${k.drag} scale=s></calcite-icon></span>`})}};m("calcite-handle",o);export{o as Handle};
2
+ import{a as y}from"./F4BSA6GV.js";import{a as x}from"./LOGLKFMU.js";import{a as v}from"./2YDPGI4H.js";import{a as g}from"./6EO6DYWC.js";import"./WGGFNK4Z.js";import"./ONOJ67SI.js";import"./JB775TAO.js";import"./MKRCEA57.js";import"./OAOQ5BXS.js";import{E as u,F as b,G as p,H as f,S as m,g as d,h,l as s,p as l}from"./RNRXZGW3.js";var S={handle:"handle",handleSelected:"handle--selected"},k={drag:"drag"},i={itemLabel:"{itemLabel}",position:"{position}",total:"{total}"},C=d`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.handle{display:flex;align-items:center;justify-content:center;align-self:stretch;border-style:none;outline-color:transparent;color:var(--calcite-handle-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-handle-background-color, transparent);padding-block:.75rem;padding-inline:.25rem;line-height:0}.handle calcite-icon{color:inherit}:host(:not([disabled])) .handle{cursor:move}:host(:not([disabled])) .handle:hover{color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-hover, var(--calcite-color-foreground-2))}:host(:not([disabled])) .handle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1))}:host(:not([disabled])) .handle--selected{color:var(--calcite-handle-icon-color-selected, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-selected, var(--calcite-color-foreground-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,o=class extends p{constructor(){super(...arguments),this.handleButtonRef=u(),this.messages=v({blocking:!0}),this.focusSetter=g()(this),this.interactiveContainer=y(this),this.blurUnselectDisabled=!1,this.disabled=!1,this.selected=!1,this.calciteHandleChange=l({cancelable:!1}),this.calciteHandleNudge=l({cancelable:!1}),this.calciteInternalAssistiveTextChange=l({cancelable:!1})}static{this.properties={blurUnselectDisabled:[5,{},{type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],selected:[7,{},{reflect:!0,type:Boolean}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}]}}static{this.styles=C}async setFocus(e){return this.focusSetter(()=>this.handleButtonRef.value,e)}willUpdate(e){(e.has("messages")||e.has("label")||e.has("selected")&&(this.hasUpdated||this.selected!==!1)||e.has("setPosition")||e.has("setSize"))&&this.handleAriaTextChange()}loaded(){x.deprecated("component",{component:this,name:"handle",removalVersion:5,suggested:"sort-handle"})}handleAriaTextChange(){let e=this.getAriaText("live");e&&this.calciteInternalAssistiveTextChange.emit({message:e})}getTooltip(){let{label:e,messages:t}=this;return t?e?t.dragHandle.replace(i.itemLabel,e):t.dragHandleUntitled:""}getAriaText(e){let{setPosition:t,setSize:r,label:c,messages:a,selected:n}=this;return!a||!c||typeof r!="number"||typeof t!="number"?null:(e==="label"?n?a.dragHandleChange:a.dragHandleIdle:n?a.dragHandleActive:a.dragHandleCommit).replace(i.position,t.toString()).replace(i.itemLabel,c).replace(i.total,r.toString())}handleKeyDown(e){if(!this.disabled)switch(e.key){case" ":this.selected=!this.selected,this.calciteHandleChange.emit(),e.preventDefault();break;case"ArrowUp":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"up"});break;case"ArrowDown":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"down"});break}}handleBlur(){this.blurUnselectDisabled||this.disabled||this.selected&&(this.selected=!1,this.calciteHandleChange.emit())}render(){return this.interactiveContainer({disabled:this.disabled,children:h`<span .ariaChecked=${this.disabled?null:this.selected} .ariaDisabled=${this.disabled?this.disabled:null} .ariaLabel=${this.disabled?null:this.getAriaText("label")} class=${f({[S.handle]:!0,[S.handleSelected]:!this.disabled&&this.selected})} @blur=${this.handleBlur} @keydown=${this.handleKeyDown} role=radio tabindex=${(this.disabled?null:0)??s} title=${this.getTooltip()??s} ${b(this.handleButtonRef)}><calcite-icon .icon=${k.drag} scale=s></calcite-icon></span>`})}};m("calcite-handle",o);export{o as Handle};